public String nextValue() throws IOException {
        if (tokenCache == null){
            tokenCache = lexer.getNextToken();
            lineCache = lexer.getLineNumber();
        }
        lastLine = lineCache;
        String result = tokenCache;
        tokenCache = null;
        return result;
    }