All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.projectnessie.nessie.cli.grammar.NessieCliParser Maven / Gradle / Ivy

There is a newer version: 0.101.3
Show newest version
/* Generated by: CongoCC Parser Generator. NessieCliParser.java  */
package org.projectnessie.nessie.cli.grammar;

import org.projectnessie.nessie.cli.cmdspec.*;
import java.util.*;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.ListIterator;
import java.util.Map;
import java.util.concurrent.CancellationException;
import org.projectnessie.nessie.cli.grammar.Token.TokenType;
import static org.projectnessie.nessie.cli.grammar.Token.TokenType.*;
import org.projectnessie.nessie.cli.grammar.ast.Script;
import org.projectnessie.nessie.cli.grammar.ast.SingleStatement;
import org.projectnessie.nessie.cli.grammar.ast.Statement;
import org.projectnessie.nessie.cli.grammar.ast.HelpStatement;
import org.projectnessie.nessie.cli.grammar.ast.ExitStatement;
import org.projectnessie.nessie.cli.grammar.ast.ConnectStatement;
import org.projectnessie.nessie.cli.grammar.ast.CreateStatement;
import org.projectnessie.nessie.cli.grammar.ast.CreateNamespaceStatement;
import org.projectnessie.nessie.cli.grammar.ast.RevertContentStatement;
import org.projectnessie.nessie.cli.grammar.ast.CreateReferenceStatement;
import org.projectnessie.nessie.cli.grammar.ast.AssignReferenceStatement;
import org.projectnessie.nessie.cli.grammar.ast.AlterStatement;
import org.projectnessie.nessie.cli.grammar.ast.AlterNamespaceStatement;
import org.projectnessie.nessie.cli.grammar.ast.DropStatement;
import org.projectnessie.nessie.cli.grammar.ast.DropReferenceStatement;
import org.projectnessie.nessie.cli.grammar.ast.DropContentStatement;
import org.projectnessie.nessie.cli.grammar.ast.UseReferenceStatement;
import org.projectnessie.nessie.cli.grammar.ast.ShowStatement;
import org.projectnessie.nessie.cli.grammar.ast.ShowLogStatement;
import org.projectnessie.nessie.cli.grammar.ast.ShowContentStatement;
import org.projectnessie.nessie.cli.grammar.ast.ShowReferenceStatement;
import org.projectnessie.nessie.cli.grammar.ast.ListStatement;
import org.projectnessie.nessie.cli.grammar.ast.ListContentsStatement;
import org.projectnessie.nessie.cli.grammar.ast.ListReferencesStatement;
import org.projectnessie.nessie.cli.grammar.ast.MergeBranchStatement;
import org.projectnessie.nessie.cli.grammar.ast.ContentKind;
import org.projectnessie.nessie.cli.grammar.ast.ReferenceType;
import org.projectnessie.nessie.cli.grammar.ast.TimestampOrCommit;
import org.projectnessie.nessie.cli.grammar.ast.ContentKey;
import org.projectnessie.nessie.cli.grammar.ast.ReferenceName;
import org.projectnessie.nessie.cli.grammar.ast.CatalogName;
import org.projectnessie.nessie.cli.grammar.ast.ExistingReference;
import org.projectnessie.nessie.cli.grammar.ast.Uri;
import org.projectnessie.nessie.cli.grammar.ast.ParamKey;
import org.projectnessie.nessie.cli.grammar.ast.Value;
import org.projectnessie.nessie.cli.grammar.ast.PositiveInt;
import org.projectnessie.nessie.cli.grammar.ast.UriIdentifier;
import org.projectnessie.nessie.cli.grammar.ast.Identifier;
import org.projectnessie.nessie.cli.grammar.ast.PositiveInteger;
import org.projectnessie.nessie.cli.grammar.ast.MergeBehaviorKind;


public class NessieCliParser implements ParserExtension {
    private CompletionType completionType = CompletionType.NONE;
    private List optionalNextTokenTypes = Collections.emptyList();
    private static final Map TOKEN_LITERAL_REPRESENTATION = new EnumMap<>(TokenType.class);
    static {
        TOKEN_LITERAL_REPRESENTATION.put(TokenType.EQUAL, "=");
        TOKEN_LITERAL_REPRESENTATION.put(TokenType.SEMICOLON, ";");
    }

    public boolean isTokenActive(TokenType tokenType) {
        return token_source.activeTokenTypes.contains(tokenType);
    }

    @Override
    public String tokenToLiteral(TokenType tokenType) {
        return TOKEN_LITERAL_REPRESENTATION.getOrDefault(tokenType, tokenType.name());
    }

    @Override
    public List optionalNextTokenTypes() {
        return optionalNextTokenTypes;
    }

    void setOptionalNextTokenTypes(TokenType...tokenTypes) {
        optionalNextTokenTypes = Arrays.asList(tokenTypes);
    }

    @Override
    public CompletionType completionType() {
        return completionType;
    }

    public void activateTokenType(TokenType type) {
        activateTokenTypes(type);
    }

    public void deactivateTokenType(TokenType type) {
        deactivateTokenTypes(type);
    }

    static final int UNLIMITED = Integer.MAX_VALUE;
    // The last token successfully "consumed"
    Token lastConsumedToken;
    private TokenType nextTokenType;
    // Normally null when parsing, populated when doing lookahead
    private Token currentLookaheadToken;
    private int remainingLookahead;
    private boolean hitFailure;
    private boolean passedPredicate;
    private int passedPredicateThreshold = -1;
    private String currentlyParsedProduction;
    private String currentLookaheadProduction;
    private int lookaheadRoutineNesting;
    private final boolean legacyGlitchyLookahead = false;
    private final Token DUMMY_START_TOKEN = new Token();
    private boolean cancelled;

    public void cancel() {
        cancelled = true;
    }

    public boolean isCancelled() {
        return cancelled;
    }

    /** Generated Lexer. */
    private NessieCliLexer token_source;

    public void setInputSource(String inputSource) {
        token_source.setInputSource(inputSource);
    }

    String getInputSource() {
        return token_source.getInputSource();
    }

    //=================================
    // Generated constructors
    //=================================
    public NessieCliParser(String inputSource, CharSequence content) {
        this(new NessieCliLexer(inputSource, content));
    }

    public NessieCliParser(CharSequence content) {
        this("input", content);
    }

    /**
    * @param inputSource just the name of the input source (typically the filename) that
    * will be used in error messages and so on.
    * @param path The location (typically the filename) from which to get the input to parse
    */
    public NessieCliParser(String inputSource, Path path) throws IOException {
        this(inputSource, TokenSource.stringFromBytes(Files.readAllBytes(path)));
    }

    public NessieCliParser(String inputSource, Path path, Charset charset) throws IOException {
        this(inputSource, TokenSource.stringFromBytes(Files.readAllBytes(path), charset));
    }

    /**
    * @param path The location (typically the filename) from which to get the input to parse
    */
    public NessieCliParser(Path path) throws IOException {
        this(path.toString(), path);
    }

    /** Constructor with user supplied Lexer. */
    public NessieCliParser(NessieCliLexer lexer) {
        token_source = lexer;
        lastConsumedToken = DUMMY_START_TOKEN;
        lastConsumedToken.setTokenSource(lexer);
    }

    /**
    * Set the starting line/column for location reporting.
    * By default, this is 1,1.
    */
    public void setStartingPos(int startingLine, int startingColumn) {
        token_source.setStartingPos(startingLine, startingColumn);
    }

    // this method is for testing only.
    public boolean getLegacyGlitchyLookahead() {
        return legacyGlitchyLookahead;
    }

    // If the next token is cached, it returns that
    // Otherwise, it goes to the token_source, i.e. the Lexer.
    private Token nextToken(final Token tok) {
        Token result = token_source.getNextToken(tok);
        while (result.isUnparsed()) {
            result = token_source.getNextToken(result);
        }
        nextTokenType = null;
        return result;
    }

    /**
    * @return the next Token off the stream. This is the same as #getToken(1)
    */
    public final Token getNextToken() {
        return getToken(1);
    }

    /**
    * @param index how many tokens to look ahead
    * @return the specific regular (i.e. parsed) Token index ahead/behind in the stream.
    * If we are in a lookahead, it looks ahead from the currentLookaheadToken
    * Otherwise, it is the lastConsumedToken. If you pass in a negative
    * number it goes backward.
    */
    public final Token getToken(final int index) {
        Token t = currentLookaheadToken == null ? lastConsumedToken : currentLookaheadToken;
        for (int i = 0; i < index; i++) {
            t = nextToken(t);
        }
        for (int i = 0; i > index; i--) {
            t = t.getPrevious();
            if (t == null) break;
        }
        return t;
    }

    private TokenType nextTokenType() {
        if (nextTokenType == null) {
            nextTokenType = nextToken(lastConsumedToken).getType();
        }
        return nextTokenType;
    }

    boolean activateTokenTypes(TokenType...types) {
        if (token_source.activeTokenTypes == null) return false;
        boolean result = false;
        for (TokenType tt : types) {
            result |= token_source.activeTokenTypes.add(tt);
        }
        if (result) {
            token_source.reset(getToken(0));
            nextTokenType = null;
        }
        return result;
    }

    boolean deactivateTokenTypes(TokenType...types) {
        boolean result = false;
        if (token_source.activeTokenTypes == null) {
            token_source.activeTokenTypes = EnumSet.allOf(TokenType.class);
        }
        for (TokenType tt : types) {
            result |= token_source.activeTokenTypes.remove(tt);
        }
        if (result) {
            token_source.reset(getToken(0));
            nextTokenType = null;
        }
        return result;
    }

    private static final HashMap> enumSetCache = new HashMap<>();

    private static EnumSet tokenTypeSet(TokenType first, TokenType...rest) {
        TokenType[] key = new TokenType[1 + rest.length];
        key[0] = first;
        if (rest.length > 0) {
            System.arraycopy(rest, 0, key, 1, rest.length);
        }
        Arrays.sort(key);
        if (enumSetCache.containsKey(key)) {
            return enumSetCache.get(key);
        }
        EnumSet result = (rest.length == 0) ? EnumSet.of(first) : EnumSet.of(first, rest);
        enumSetCache.put(key, result);
        return result;
    }

    // src/main/congocc/nessie/nessie-cli.ccc:41:1
    final public void Script() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "Script";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:41:1
        Script thisProduction = null;
        if (buildTree) {
            thisProduction = new Script();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:42:4
            pushOntoCallStack("Script", "src/main/congocc/nessie/nessie-cli.ccc", 42, 4);
            try {
                Statement();
            } finally {
                popCallStack();
            }
            // Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:43:4
            while (true) {
                if (!(scan$nessiecli_ccc$43$5())) break;
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:43:5
                consumeToken(SEMICOLON);
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:43:17
                pushOntoCallStack("Script", "src/main/congocc/nessie/nessie-cli.ccc", 43, 17);
                try {
                    Statement();
                } finally {
                    popCallStack();
                }
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:44:4
            if (nextTokenType() == SEMICOLON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:44:5
                consumeToken(SEMICOLON);
            }
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:45:4
            consumeToken(EOF);
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:48:1
    final public void SingleStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "SingleStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:48:1
        SingleStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new SingleStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:49:3
            pushOntoCallStack("SingleStatement", "src/main/congocc/nessie/nessie-cli.ccc", 49, 3);
            try {
                Statement();
            } finally {
                popCallStack();
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:50:3
            if (nextTokenType() == SEMICOLON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:50:4
                consumeToken(SEMICOLON);
            }
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:51:3
            consumeToken(EOF);
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    private static final EnumSet Statement_FIRST_SET = Statement_FIRST_SET_init();

    private static EnumSet Statement_FIRST_SET_init() {
        return tokenTypeSet(USE, DROP, LIST, SHOW, HELP, EXIT, ALTER, MERGE, ASSIGN, CREATE, REVERT, CONNECT);
    }

    // src/main/congocc/nessie/nessie-cli.ccc:54:1
    final public void Statement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "Statement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:54:1
        Statement thisProduction = null;
        if (buildTree) {
            thisProduction = new Statement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:55:5
            if (nextTokenType() == CONNECT) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:55:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 55, 5);
                try {
                    ConnectStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == CREATE) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:56:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 56, 5);
                try {
                    CreateStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == ALTER) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:57:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 57, 5);
                try {
                    AlterStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == DROP) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:58:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 58, 5);
                try {
                    DropStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == ASSIGN) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:59:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 59, 5);
                try {
                    AssignReferenceStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == REVERT) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:60:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 60, 5);
                try {
                    RevertContentStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == USE) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:61:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 61, 5);
                try {
                    UseReferenceStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == LIST) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:62:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 62, 5);
                try {
                    ListStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == SHOW) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:63:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 63, 5);
                try {
                    ShowStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == MERGE) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:64:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 64, 5);
                try {
                    MergeBranchStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == EXIT) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:65:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 65, 5);
                try {
                    ExitStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == HELP) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:66:5
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 66, 5);
                try {
                    HelpStatement();
                } finally {
                    popCallStack();
                }
            } else {
                pushOntoCallStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 55, 5);
                throw new ParseException(lastConsumedToken, Statement_FIRST_SET, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:69:1
    final public void HelpStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "HelpStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:69:1
        HelpStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new HelpStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:70:7
            consumeToken(HELP);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:71:7
            setOptionalNextTokenTypes(TokenType.USE, TokenType.CONNECT, TokenType.CREATE, TokenType.ALTER, TokenType.DROP, TokenType.LIST, TokenType.SHOW, TokenType.ASSIGN, TokenType.MERGE, TokenType.REVERT, TokenType.HELP, TokenType.EXIT, TokenType.LICENSE);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:86:7
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:87:12
            if (nextTokenType() == USE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:87:12
                consumeToken(USE);
            } else if (nextTokenType() == CONNECT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:88:12
                consumeToken(CONNECT);
            } else if (nextTokenType() == CREATE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:89:12
                consumeToken(CREATE);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:90:12
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG, TokenType.NAMESPACE);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:91:12
                if (nextTokenType() == NAMESPACE || nextTokenType == BRANCH || nextTokenType == TAG) {
                    if (nextTokenType() == BRANCH) {
                        // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:91:15
                        consumeToken(BRANCH);
                    } else if (nextTokenType() == TAG) {
                        // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:91:26
                        consumeToken(TAG);
                    } else if (nextTokenType() == NAMESPACE) {
                        // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:91:34
                        consumeToken(NAMESPACE);
                    } else {
                        pushOntoCallStack("HelpStatement", "src/main/congocc/nessie/nessie-cli.ccc", 91, 15);
                        throw new ParseException(lastConsumedToken, first_set$nessiecli_ccc$91$15, parsingStack);
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:92:14
                    setOptionalNextTokenTypes();
                }
            } else if (nextTokenType() == ALTER) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:94:12
                consumeToken(ALTER);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:95:12
                setOptionalNextTokenTypes(TokenType.NAMESPACE);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:96:12
                if (nextTokenType() == NAMESPACE) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:96:14
                    consumeToken(NAMESPACE);
                }
            } else if (nextTokenType() == DROP) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:97:12
                consumeToken(DROP);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:98:12
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG, TokenType.NAMESPACE, TokenType.TABLE, TokenType.VIEW);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:99:12
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:99:14
                if (nextTokenType() == BRANCH) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:99:14
                    consumeToken(BRANCH);
                } else if (nextTokenType() == TAG) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:99:25
                    consumeToken(TAG);
                } else if (nextTokenType() == NAMESPACE) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:99:33
                    consumeToken(NAMESPACE);
                } else if (nextTokenType() == TABLE) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:99:47
                    consumeToken(TABLE);
                } else if (nextTokenType() == VIEW) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:99:57
                    consumeToken(VIEW);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:100:14
                    setOptionalNextTokenTypes();
                }
            } else if (nextTokenType() == LIST) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:102:12
                consumeToken(LIST);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:103:12
                setOptionalNextTokenTypes(TokenType.CONTENTS, TokenType.REFERENCES);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:104:12
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:104:14
                if (nextTokenType() == CONTENTS) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:104:14
                    consumeToken(CONTENTS);
                } else if (nextTokenType() == REFERENCES) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:104:27
                    consumeToken(REFERENCES);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:105:14
                    setOptionalNextTokenTypes();
                }
            } else if (nextTokenType() == SHOW) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:107:12
                consumeToken(SHOW);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:108:12
                setOptionalNextTokenTypes(TokenType.LOG, TokenType.TABLE, TokenType.VIEW, TokenType.NAMESPACE, TokenType.REFERENCE);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:109:12
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:109:14
                if (nextTokenType() == LOG) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:109:14
                    consumeToken(LOG);
                } else if (nextTokenType() == TABLE) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:109:22
                    consumeToken(TABLE);
                } else if (nextTokenType() == VIEW) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:109:32
                    consumeToken(VIEW);
                } else if (nextTokenType() == NAMESPACE) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:109:41
                    consumeToken(NAMESPACE);
                } else if (nextTokenType() == REFERENCE) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:109:55
                    consumeToken(REFERENCE);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:110:14
                    setOptionalNextTokenTypes();
                }
            } else if (nextTokenType() == ASSIGN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:112:12
                consumeToken(ASSIGN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:113:12
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:114:12
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:114:14
                if (nextTokenType() == BRANCH) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:114:14
                    consumeToken(BRANCH);
                } else if (nextTokenType() == TAG) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:114:25
                    consumeToken(TAG);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:115:14
                    setOptionalNextTokenTypes();
                }
            } else if (nextTokenType() == MERGE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:117:12
                consumeToken(MERGE);
            } else if (nextTokenType() == REVERT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:118:12
                consumeToken(REVERT);
            } else if (nextTokenType() == HELP) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:119:12
                consumeToken(HELP);
            } else if (nextTokenType() == EXIT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:120:12
                consumeToken(EXIT);
            } else if (nextTokenType() == LICENSE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:121:12
                consumeToken(LICENSE);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:125:1
    final public void ExitStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ExitStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:125:1
        ExitStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ExitStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:126:7
            consumeToken(EXIT);
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:129:1
    final public void ConnectStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ConnectStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:129:1
        ConnectStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ConnectStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:130:7
            consumeToken(CONNECT);
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:131:7
            consumeToken(TO);
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:131:12
            pushOntoCallStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 131, 12);
            try {
                Uri();
                if (buildTree) {
                    thisProduction.setNamedChild("uri", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:132:7
            setOptionalNextTokenTypes(TokenType.ON, TokenType.USING);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:133:7
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:133:9
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:134:9
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:135:9
                pushOntoCallStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 135, 9);
                try {
                    ReferenceName();
                    if (buildTree) {
                        thisProduction.setNamedChild("initialRef", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:136:9
                setOptionalNextTokenTypes(TokenType.USING);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:138:7
            if (nextTokenType() == USING) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:138:9
                consumeToken(USING);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:139:9
                setOptionalNextTokenTypes();
                completionType = CompletionType.CONNECT_OPTIONS;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:141:9
                pushOntoCallStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 141, 9);
                try {
                    ParamKey();
                } finally {
                    popCallStack();
                }
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:142:9
                consumeToken(EQUAL);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:143:9
                completionType = CompletionType.NONE;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:144:9
                pushOntoCallStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 144, 9);
                try {
                    Value();
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:145:9
                setOptionalNextTokenTypes(TokenType.AND);
                // Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:146:9
                while (true) {
                    if (!(nextTokenType() == AND)) break;
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:147:11
                    consumeToken(AND);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:148:11
                    setOptionalNextTokenTypes();
                    completionType = CompletionType.CONNECT_OPTIONS;
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:150:11
                    pushOntoCallStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 150, 11);
                    try {
                        ParamKey();
                    } finally {
                        popCallStack();
                    }
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:151:11
                    consumeToken(EQUAL);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:152:11
                    completionType = CompletionType.NONE;
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:153:11
                    pushOntoCallStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 153, 11);
                    try {
                        Value();
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:154:11
                    setOptionalNextTokenTypes(TokenType.AND);
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:159:1
    final public void CreateStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "CreateStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:159:1
        CreateStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new CreateStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:160:7
            consumeToken(CREATE);
            if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:161:7
                pushOntoCallStack("CreateStatement", "src/main/congocc/nessie/nessie-cli.ccc", 161, 7);
                try {
                    CreateReferenceStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == NAMESPACE) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:162:7
                pushOntoCallStack("CreateStatement", "src/main/congocc/nessie/nessie-cli.ccc", 162, 7);
                try {
                    CreateNamespaceStatement();
                } finally {
                    popCallStack();
                }
            } else {
                pushOntoCallStack("CreateStatement", "src/main/congocc/nessie/nessie-cli.ccc", 161, 7);
                throw new ParseException(lastConsumedToken, first_set$nessiecli_ccc$161$7, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:166:1
    final public void CreateNamespaceStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "CreateNamespaceStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:166:1
        CreateNamespaceStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new CreateNamespaceStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:167:7
            consumeToken(NAMESPACE);
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:168:7
            pushOntoCallStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 168, 7);
            try {
                ContentKey();
                if (buildTree) {
                    thisProduction.setNamedChild("namespace", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:169:7
            setOptionalNextTokenTypes(TokenType.ON, TokenType.SET);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:170:7
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:170:9
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:171:9
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:172:9
                if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:172:11
                    pushOntoCallStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 172, 11);
                    try {
                        ReferenceType();
                        if (buildTree) {
                            thisProduction.setNamedChild("type", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:173:11
                    setOptionalNextTokenTypes();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:175:9
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:176:9
                pushOntoCallStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 176, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:177:9
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes(TokenType.SET);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:180:7
            if (nextTokenType() == SET) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:180:9
                consumeToken(SET);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:181:9
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:182:9
                pushOntoCallStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 182, 9);
                try {
                    ParamKey();
                } finally {
                    popCallStack();
                }
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:183:9
                consumeToken(EQUAL);
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:184:9
                pushOntoCallStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 184, 9);
                try {
                    Value();
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:185:9
                setOptionalNextTokenTypes(TokenType.AND);
                // Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:186:9
                while (true) {
                    if (!(nextTokenType() == AND)) break;
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:187:11
                    consumeToken(AND);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:188:11
                    setOptionalNextTokenTypes();
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:189:11
                    pushOntoCallStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 189, 11);
                    try {
                        ParamKey();
                    } finally {
                        popCallStack();
                    }
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:190:11
                    consumeToken(EQUAL);
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:191:11
                    pushOntoCallStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 191, 11);
                    try {
                        Value();
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:192:11
                    setOptionalNextTokenTypes(TokenType.AND);
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:197:1
    final public void RevertContentStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "RevertContentStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:197:1
        RevertContentStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new RevertContentStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:198:7
            consumeToken(REVERT);
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:199:7
            consumeToken(CONTENT);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:200:7
            setOptionalNextTokenTypes(TokenType.DRY);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:201:7
            if (nextTokenType() == DRY) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:201:9
                thisProduction.setNamedChild("dryRun", consumeToken(DRY));
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:202:9
                setOptionalNextTokenTypes();
            }
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:204:7
            consumeToken(OF);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:205:7
            setOptionalNextTokenTypes();
            completionType = CompletionType.CONTENT_KEY;
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:207:7
            pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 207, 7);
            try {
                ContentKey();
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:208:7
            completionType = CompletionType.NONE;
            setOptionalNextTokenTypes(TokenType.ON, TokenType.AND);
            // Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:210:7
            while (true) {
                if (!(nextTokenType() == AND)) break;
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:210:9
                consumeToken(AND);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:211:9
                completionType = CompletionType.CONTENT_KEY;
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:213:9
                pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 213, 9);
                try {
                    ContentKey();
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:214:9
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes(TokenType.ON, TokenType.AND);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:217:7
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:217:9
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:218:9
                setOptionalNextTokenTypes(TokenType.BRANCH);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:219:9
                if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:219:11
                    pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 219, 11);
                    try {
                        ReferenceType();
                        if (buildTree) {
                            thisProduction.setNamedChild("type", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:220:11
                    setOptionalNextTokenTypes();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:222:9
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:223:9
                pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 223, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:224:9
                completionType = CompletionType.NONE;
            }
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:226:7
            consumeToken(TO);
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:226:12
            consumeToken(STATE);
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:228:9
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:229:9
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:230:9
                if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:230:11
                    pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 230, 11);
                    try {
                        ReferenceType();
                        if (buildTree) {
                            thisProduction.setNamedChild("sourceType", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:231:11
                    setOptionalNextTokenTypes();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:233:9
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:234:9
                pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 234, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("sourceRef", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:235:9
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes(TokenType.ALLOW, TokenType.AT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:237:9
                if (nextTokenType() == AT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:237:11
                    consumeToken(AT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:238:11
                    setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                    // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:239:11
                    // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:239:13
                    if (nextTokenType() == TIMESTAMP) {
                        // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:239:13
                        consumeToken(TIMESTAMP);
                    } else if (nextTokenType() == COMMIT) {
                        // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:239:27
                        consumeToken(COMMIT);
                        // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:240:13
                        setOptionalNextTokenTypes();
                    }
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:242:11
                    pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 242, 11);
                    try {
                        TimestampOrCommit();
                        if (buildTree) {
                            thisProduction.setNamedChild("sourceAt", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:243:11
                    setOptionalNextTokenTypes(TokenType.ALLOW);
                }
            } else if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:246:9
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:247:9
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:248:9
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:248:11
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:248:11
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:248:25
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:249:11
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:251:9
                pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 251, 9);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("sourceAt", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:252:9
                setOptionalNextTokenTypes(TokenType.ALLOW);
            } else {
                pushOntoCallStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 228, 9);
                throw new ParseException(lastConsumedToken, first_set$nessiecli_ccc$228$9, parsingStack);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:254:7
            if (nextTokenType() == ALLOW) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:254:9
                consumeToken(ALLOW);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:255:9
                setOptionalNextTokenTypes();
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:256:9
                thisProduction.setNamedChild("allowDeletes", consumeToken(DELETES));
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:260:1
    final public void CreateReferenceStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "CreateReferenceStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:260:1
        CreateReferenceStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new CreateReferenceStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:261:7
            pushOntoCallStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 261, 7);
            try {
                ReferenceType();
                if (buildTree) {
                    thisProduction.setNamedChild("type", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:262:7
            setOptionalNextTokenTypes(TokenType.IF);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:263:7
            if (nextTokenType() == IF) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:263:9
                thisProduction.setNamedChild("conditional", consumeToken(IF));
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:264:9
                setOptionalNextTokenTypes();
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:265:9
                consumeToken(NOT);
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:265:15
                consumeToken(EXISTS);
            }
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:267:7
            pushOntoCallStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 267, 7);
            try {
                ReferenceName();
                if (buildTree) {
                    thisProduction.setNamedChild("ref", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:268:7
            setOptionalNextTokenTypes(TokenType.IN, TokenType.FROM, TokenType.AT);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:270:7
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:270:9
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:270:14
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:270:47
                pushOntoCallStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 270, 47);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:271:9
                setOptionalNextTokenTypes(TokenType.FROM, TokenType.AT);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:274:7
            if (nextTokenType() == FROM) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:274:9
                consumeToken(FROM);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:275:9
                setOptionalNextTokenTypes();
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:278:9
                pushOntoCallStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 278, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("from", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:279:9
                setOptionalNextTokenTypes(TokenType.AT);
                completionType = CompletionType.NONE;
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:283:7
            if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:283:9
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:284:9
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:285:9
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:285:11
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:285:11
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:285:25
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:286:11
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:288:9
                pushOntoCallStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 288, 9);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("at", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:289:9
                setOptionalNextTokenTypes();
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:293:1
    final public void AssignReferenceStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "AssignReferenceStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:293:1
        AssignReferenceStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new AssignReferenceStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:294:7
            consumeToken(ASSIGN);
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:295:9
            pushOntoCallStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 295, 9);
            try {
                ReferenceType();
                if (buildTree) {
                    thisProduction.setNamedChild("type", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:296:9
            completionType = CompletionType.REFERENCE_NAME;
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:297:9
            if (scan$nessiecli_ccc$297$10()) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:297:10
                pushOntoCallStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 297, 10);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:298:9
            completionType = CompletionType.NONE;
            setOptionalNextTokenTypes(TokenType.TO, TokenType.IN);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:300:9
            if (nextTokenType() == TO) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:300:10
                consumeToken(TO);
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:301:11
                pushOntoCallStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 301, 11);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("to", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:302:11
                setOptionalNextTokenTypes(TokenType.AT, TokenType.IN);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:303:11
                if (nextTokenType() == AT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:303:13
                    consumeToken(AT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:304:13
                    setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                    // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:305:13
                    // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:305:15
                    if (nextTokenType() == TIMESTAMP) {
                        // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:305:15
                        consumeToken(TIMESTAMP);
                    } else if (nextTokenType() == COMMIT) {
                        // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:305:29
                        consumeToken(COMMIT);
                        // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:306:15
                        setOptionalNextTokenTypes();
                    }
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:308:13
                    pushOntoCallStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 308, 13);
                    try {
                        TimestampOrCommit();
                        if (buildTree) {
                            thisProduction.setNamedChild("at", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                }
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:311:9
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:311:11
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:311:16
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:311:49
                pushOntoCallStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 311, 49);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:315:1
    final public void AlterStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "AlterStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:315:1
        AlterStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new AlterStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:316:7
            consumeToken(ALTER);
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:317:7
            pushOntoCallStack("AlterStatement", "src/main/congocc/nessie/nessie-cli.ccc", 317, 7);
            try {
                AlterNamespaceStatement();
            } finally {
                popCallStack();
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:320:1
    final public void AlterNamespaceStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "AlterNamespaceStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:320:1
        AlterNamespaceStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new AlterNamespaceStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:321:7
            consumeToken(NAMESPACE);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:322:7
            completionType = CompletionType.CONTENT_KEY;
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:323:7
            pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 323, 7);
            try {
                ContentKey();
                if (buildTree) {
                    thisProduction.setNamedChild("namespace", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:324:7
            completionType = CompletionType.NONE;
            setOptionalNextTokenTypes(TokenType.ON, TokenType.SET, TokenType.REMOVE);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:326:7
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:326:9
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:327:9
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:328:9
                if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:328:11
                    pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 328, 11);
                    try {
                        ReferenceType();
                        if (buildTree) {
                            thisProduction.setNamedChild("type", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:329:11
                    setOptionalNextTokenTypes();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:331:9
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:332:9
                pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 332, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:333:9
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:336:7
            setOptionalNextTokenTypes(TokenType.SET, TokenType.REMOVE);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:337:7
            if (nextTokenType() == SET) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:337:9
                consumeToken(SET);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:338:9
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:339:9
                pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 339, 9);
                try {
                    ParamKey();
                } finally {
                    popCallStack();
                }
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:340:9
                consumeToken(EQUAL);
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:341:9
                pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 341, 9);
                try {
                    Value();
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:342:9
                setOptionalNextTokenTypes(TokenType.AND, TokenType.REMOVE);
                // Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:343:9
                while (true) {
                    if (!(nextTokenType() == AND)) break;
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:344:11
                    consumeToken(AND);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:345:11
                    setOptionalNextTokenTypes();
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:346:11
                    pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 346, 11);
                    try {
                        ParamKey();
                    } finally {
                        popCallStack();
                    }
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:347:11
                    consumeToken(EQUAL);
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:348:11
                    pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 348, 11);
                    try {
                        Value();
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:349:11
                    setOptionalNextTokenTypes(TokenType.AND, TokenType.REMOVE);
                }
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:352:7
            if (nextTokenType() == REMOVE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:352:9
                consumeToken(REMOVE);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:353:9
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:354:9
                pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 354, 9);
                try {
                    ParamKey();
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:355:9
                setOptionalNextTokenTypes(TokenType.AND);
                // Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:356:9
                while (true) {
                    if (!(nextTokenType() == AND)) break;
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:357:11
                    consumeToken(AND);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:358:11
                    setOptionalNextTokenTypes();
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:359:11
                    pushOntoCallStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 359, 11);
                    try {
                        ParamKey();
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:360:11
                    setOptionalNextTokenTypes(TokenType.AND);
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:365:1
    final public void DropStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "DropStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:365:1
        DropStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new DropStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:366:7
            consumeToken(DROP);
            if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:367:7
                pushOntoCallStack("DropStatement", "src/main/congocc/nessie/nessie-cli.ccc", 367, 7);
                try {
                    DropReferenceStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == VIEW || nextTokenType == TABLE || nextTokenType == NAMESPACE) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:368:7
                pushOntoCallStack("DropStatement", "src/main/congocc/nessie/nessie-cli.ccc", 368, 7);
                try {
                    DropContentStatement();
                } finally {
                    popCallStack();
                }
            } else {
                pushOntoCallStack("DropStatement", "src/main/congocc/nessie/nessie-cli.ccc", 367, 7);
                throw new ParseException(lastConsumedToken, first_set$nessiecli_ccc$367$7, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:371:1
    final public void DropReferenceStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "DropReferenceStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:371:1
        DropReferenceStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new DropReferenceStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:372:7
            pushOntoCallStack("DropReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 372, 7);
            try {
                ReferenceType();
                if (buildTree) {
                    thisProduction.setNamedChild("type", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:373:7
            completionType = CompletionType.REFERENCE_NAME;
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:374:7
            setOptionalNextTokenTypes(TokenType.IF);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:375:7
            if (nextTokenType() == IF) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:375:9
                thisProduction.setNamedChild("conditional", consumeToken(IF));
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:376:9
                setOptionalNextTokenTypes();
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:377:9
                consumeToken(EXISTS);
            }
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:379:7
            pushOntoCallStack("DropReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 379, 7);
            try {
                ExistingReference();
                if (buildTree) {
                    thisProduction.setNamedChild("ref", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:380:7
            completionType = CompletionType.REFERENCE_NAME;
            setOptionalNextTokenTypes(TokenType.IN);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:383:7
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:383:9
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:383:14
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:383:47
                pushOntoCallStack("DropReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 383, 47);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:387:1
    final public void DropContentStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "DropContentStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:387:1
        DropContentStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new DropContentStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:388:7
            pushOntoCallStack("DropContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 388, 7);
            try {
                ContentKind();
                if (buildTree) {
                    thisProduction.setNamedChild("contentKind", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:389:7
            completionType = CompletionType.CONTENT_KEY;
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:390:7
            pushOntoCallStack("DropContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 390, 7);
            try {
                ContentKey();
                if (buildTree) {
                    thisProduction.setNamedChild("contentKey", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:391:7
            completionType = CompletionType.NONE;
            setOptionalNextTokenTypes(TokenType.ON);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:393:7
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:393:9
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:394:9
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:395:9
                if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:395:11
                    pushOntoCallStack("DropContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 395, 11);
                    try {
                        ReferenceType();
                        if (buildTree) {
                            thisProduction.setNamedChild("type", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:396:11
                    setOptionalNextTokenTypes();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:398:9
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:399:9
                pushOntoCallStack("DropContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 399, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:400:9
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes();
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:405:1
    final public void UseReferenceStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "UseReferenceStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:405:1
        UseReferenceStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new UseReferenceStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:406:7
            consumeToken(USE);
            if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:407:9
                pushOntoCallStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 407, 9);
                try {
                    ReferenceType();
                    if (buildTree) {
                        thisProduction.setNamedChild("type", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == REFERENCE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:407:32
                consumeToken(REFERENCE);
            } else {
                pushOntoCallStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 407, 9);
                throw new ParseException(lastConsumedToken, first_set$nessiecli_ccc$407$9, parsingStack);
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:408:7
            setOptionalNextTokenTypes();
            completionType = CompletionType.REFERENCE_NAME;
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:410:7
            pushOntoCallStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 410, 7);
            try {
                ExistingReference();
                if (buildTree) {
                    thisProduction.setNamedChild("ref", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:411:7
            completionType = CompletionType.NONE;
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:412:7
            setOptionalNextTokenTypes(TokenType.AT, TokenType.IN);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:413:7
            if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:413:9
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:414:9
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:415:9
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:415:11
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:415:11
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:415:25
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:416:11
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:418:9
                pushOntoCallStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 418, 9);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("at", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:419:9
                setOptionalNextTokenTypes(TokenType.IN);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:422:7
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:422:9
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:422:14
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:422:47
                pushOntoCallStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 422, 47);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:426:1
    final public void ShowStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ShowStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:426:1
        ShowStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ShowStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:427:7
            consumeToken(SHOW);
            if (nextTokenType() == LOG) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:428:7
                pushOntoCallStack("ShowStatement", "src/main/congocc/nessie/nessie-cli.ccc", 428, 7);
                try {
                    ShowLogStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == VIEW || nextTokenType == TABLE || nextTokenType == NAMESPACE) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:429:7
                pushOntoCallStack("ShowStatement", "src/main/congocc/nessie/nessie-cli.ccc", 429, 7);
                try {
                    ShowContentStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == REFERENCE) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:430:7
                pushOntoCallStack("ShowStatement", "src/main/congocc/nessie/nessie-cli.ccc", 430, 7);
                try {
                    ShowReferenceStatement();
                } finally {
                    popCallStack();
                }
            } else {
                pushOntoCallStack("ShowStatement", "src/main/congocc/nessie/nessie-cli.ccc", 428, 7);
                throw new ParseException(lastConsumedToken, first_set$nessiecli_ccc$428$7, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:434:1
    final public void ShowLogStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ShowLogStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:434:1
        ShowLogStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ShowLogStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:435:7
            consumeToken(LOG);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:436:7
            setOptionalNextTokenTypes(TokenType.ON, TokenType.AT, TokenType.LIMIT, TokenType.IN);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:437:7
            if (scan$nessiecli_ccc$437$9()) {
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:437:9
                if (nextTokenType() == ON) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:437:11
                    consumeToken(ON);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:438:11
                    setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                    // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:439:11
                    if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                        // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:439:13
                        pushOntoCallStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 439, 13);
                        try {
                            ReferenceType();
                            if (buildTree) {
                                thisProduction.setNamedChild("type", peekNode());
                            }
                        } finally {
                            popCallStack();
                        }
                        // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:440:13
                        setOptionalNextTokenTypes();
                    }
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:443:9
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:444:9
                pushOntoCallStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 444, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:445:9
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes(TokenType.AT, TokenType.LIMIT, TokenType.IN);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:448:7
            if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:448:9
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:449:9
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:450:9
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:450:11
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:450:11
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:450:25
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:451:11
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:453:9
                pushOntoCallStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 453, 9);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("at", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:454:9
                setOptionalNextTokenTypes(TokenType.LIMIT, TokenType.IN);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:456:7
            if (nextTokenType() == LIMIT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:456:9
                consumeToken(LIMIT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:457:9
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:458:9
                pushOntoCallStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 458, 9);
                try {
                    PositiveInt();
                    if (buildTree) {
                        thisProduction.setNamedChild("limit", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:459:9
                setOptionalNextTokenTypes(TokenType.IN);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:462:7
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:462:9
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:462:14
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:462:47
                pushOntoCallStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 462, 47);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:466:1
    final public void ShowContentStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ShowContentStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:466:1
        ShowContentStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ShowContentStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:467:7
            pushOntoCallStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 467, 7);
            try {
                ContentKind();
                if (buildTree) {
                    thisProduction.setNamedChild("contentKind", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:468:5
            setOptionalNextTokenTypes(TokenType.ON, TokenType.AT);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:469:5
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:469:7
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:470:7
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:471:7
                if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:471:9
                    pushOntoCallStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 471, 9);
                    try {
                        ReferenceType();
                        if (buildTree) {
                            thisProduction.setNamedChild("type", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:472:9
                    setOptionalNextTokenTypes();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:474:7
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:475:7
                pushOntoCallStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 475, 7);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:476:7
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes(TokenType.AT);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:480:5
            if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:480:7
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:481:7
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:482:7
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:482:9
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:482:9
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:482:23
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:483:9
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:485:7
                pushOntoCallStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 485, 7);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("at", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:487:5
            pushOntoCallStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 487, 5);
            try {
                ContentKey();
                if (buildTree) {
                    thisProduction.setNamedChild("contentKey", peekNode());
                }
            } finally {
                popCallStack();
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:490:1
    final public void ShowReferenceStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ShowReferenceStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:490:1
        ShowReferenceStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ShowReferenceStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:491:7
            consumeToken(REFERENCE);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:492:7
            setOptionalNextTokenTypes(TokenType.AT, TokenType.IN);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:493:7
            if (scan$nessiecli_ccc$493$9()) {
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:493:9
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:494:9
                pushOntoCallStack("ShowReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 494, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:495:7
            if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:495:9
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:496:9
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT, TokenType.IN);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:497:9
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:497:11
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:497:11
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:497:25
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:498:11
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:500:9
                pushOntoCallStack("ShowReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 500, 9);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("at", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:503:7
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:503:9
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:503:14
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:503:47
                pushOntoCallStack("ShowReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 503, 47);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:507:1
    final public void ListStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ListStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:507:1
        ListStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ListStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:508:7
            consumeToken(LIST);
            if (nextTokenType() == REFERENCES) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:509:9
                pushOntoCallStack("ListStatement", "src/main/congocc/nessie/nessie-cli.ccc", 509, 9);
                try {
                    ListReferencesStatement();
                } finally {
                    popCallStack();
                }
            } else if (nextTokenType() == CONTENTS) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:510:9
                pushOntoCallStack("ListStatement", "src/main/congocc/nessie/nessie-cli.ccc", 510, 9);
                try {
                    ListContentsStatement();
                } finally {
                    popCallStack();
                }
            } else {
                pushOntoCallStack("ListStatement", "src/main/congocc/nessie/nessie-cli.ccc", 509, 9);
                throw new ParseException(lastConsumedToken, first_set$nessiecli_ccc$509$9, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:514:1
    final public void ListContentsStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ListContentsStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:514:1
        ListContentsStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ListContentsStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:515:7
            consumeToken(CONTENTS);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:516:5
            setOptionalNextTokenTypes(TokenType.ON, TokenType.AT, TokenType.FILTER, TokenType.STARTING, TokenType.CONTAINING);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:517:5
            if (nextTokenType() == ON) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:517:7
                consumeToken(ON);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:518:7
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:519:7
                if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:519:9
                    pushOntoCallStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 519, 9);
                    try {
                        ReferenceType();
                        if (buildTree) {
                            thisProduction.setNamedChild("type", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:520:9
                    setOptionalNextTokenTypes();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:522:7
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:523:7
                pushOntoCallStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 523, 7);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("ref", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:524:7
                completionType = CompletionType.NONE;
                setOptionalNextTokenTypes(TokenType.AT, TokenType.FILTER, TokenType.STARTING, TokenType.CONTAINING);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:528:5
            if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:528:7
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:529:7
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:530:7
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:530:9
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:530:9
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:530:23
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:531:9
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:533:7
                pushOntoCallStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 533, 7);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("at", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:534:7
                setOptionalNextTokenTypes(TokenType.FILTER, TokenType.STARTING, TokenType.CONTAINING);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:536:5
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:536:7
            if (nextTokenType() == FILTER) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:536:7
                consumeToken(FILTER);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:537:7
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:538:7
                pushOntoCallStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 538, 7);
                try {
                    Value();
                    if (buildTree) {
                        thisProduction.setNamedChild("filter", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            } else {
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:539:7
                if (nextTokenType() == STARTING) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:539:9
                    consumeToken(STARTING);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:540:9
                    setOptionalNextTokenTypes();
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:541:9
                    consumeToken(WITH);
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:541:16
                    pushOntoCallStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 541, 16);
                    try {
                        Value();
                        if (buildTree) {
                            thisProduction.setNamedChild("startsWith", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:542:9
                    setOptionalNextTokenTypes(TokenType.CONTAINING);
                }
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:544:7
                if (nextTokenType() == CONTAINING) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:544:9
                    consumeToken(CONTAINING);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:545:9
                    setOptionalNextTokenTypes();
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:546:9
                    pushOntoCallStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 546, 9);
                    try {
                        Value();
                        if (buildTree) {
                            thisProduction.setNamedChild("contains", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:551:1
    final public void ListReferencesStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ListReferencesStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:551:1
        ListReferencesStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new ListReferencesStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:552:7
            consumeToken(REFERENCES);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:553:5
            setOptionalNextTokenTypes(TokenType.FILTER, TokenType.STARTING, TokenType.CONTAINING, TokenType.IN);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:554:5
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:554:7
            if (nextTokenType() == FILTER) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:554:7
                consumeToken(FILTER);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:555:7
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:556:7
                pushOntoCallStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 556, 7);
                try {
                    Value();
                    if (buildTree) {
                        thisProduction.setNamedChild("filter", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:557:7
                setOptionalNextTokenTypes(TokenType.IN);
            } else {
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:558:7
                if (nextTokenType() == STARTING) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:558:9
                    consumeToken(STARTING);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:559:9
                    setOptionalNextTokenTypes();
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:560:9
                    consumeToken(WITH);
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:560:16
                    pushOntoCallStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 560, 16);
                    try {
                        Value();
                        if (buildTree) {
                            thisProduction.setNamedChild("startsWith", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:561:9
                    setOptionalNextTokenTypes(TokenType.CONTAINING, TokenType.IN);
                }
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:563:7
                if (nextTokenType() == CONTAINING) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:563:9
                    consumeToken(CONTAINING);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:564:9
                    setOptionalNextTokenTypes();
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:565:9
                    pushOntoCallStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 565, 9);
                    try {
                        Value();
                        if (buildTree) {
                            thisProduction.setNamedChild("contains", peekNode());
                        }
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:566:9
                    setOptionalNextTokenTypes(TokenType.IN);
                }
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:570:5
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:570:7
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:570:12
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:570:45
                pushOntoCallStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 570, 45);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:574:1
    final public void MergeBranchStatement() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "MergeBranchStatement";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:574:1
        MergeBranchStatement thisProduction = null;
        if (buildTree) {
            thisProduction = new MergeBranchStatement();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:575:7
            consumeToken(MERGE);
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:576:7
            setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG, TokenType.DRY);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:577:7
            if (nextTokenType() == DRY) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:577:9
                thisProduction.setNamedChild("dryRun", consumeToken(DRY));
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:578:9
                setOptionalNextTokenTypes(TokenType.BRANCH, TokenType.TAG);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:580:7
            if (nextTokenType() == BRANCH || nextTokenType == TAG) {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:580:9
                pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 580, 9);
                try {
                    ReferenceType();
                    if (buildTree) {
                        thisProduction.setNamedChild("type", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:581:7
            completionType = CompletionType.REFERENCE_NAME;
            // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:582:7
            pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 582, 7);
            try {
                ExistingReference();
                if (buildTree) {
                    thisProduction.setNamedChild("ref", peekNode());
                }
            } finally {
                popCallStack();
            }
            // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:583:7
            completionType = CompletionType.NONE;
            setOptionalNextTokenTypes(TokenType.AT, TokenType.INTO, TokenType.BEHAVIOR, TokenType.BEHAVIORS, TokenType.IN);
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:586:7
            if (nextTokenType() == AT) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:586:9
                consumeToken(AT);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:587:9
                setOptionalNextTokenTypes(TokenType.TIMESTAMP, TokenType.COMMIT);
                // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:588:9
                // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:588:11
                if (nextTokenType() == TIMESTAMP) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:588:11
                    consumeToken(TIMESTAMP);
                } else if (nextTokenType() == COMMIT) {
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:588:25
                    consumeToken(COMMIT);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:589:11
                    setOptionalNextTokenTypes();
                }
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:591:9
                pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 591, 9);
                try {
                    TimestampOrCommit();
                    if (buildTree) {
                        thisProduction.setNamedChild("at", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:592:9
                setOptionalNextTokenTypes(TokenType.INTO, TokenType.BEHAVIOR, TokenType.BEHAVIORS, TokenType.IN);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:594:7
            if (nextTokenType() == INTO) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:594:9
                consumeToken(INTO);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:595:9
                setOptionalNextTokenTypes();
                completionType = CompletionType.REFERENCE_NAME;
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:597:9
                pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 597, 9);
                try {
                    ExistingReference();
                    if (buildTree) {
                        thisProduction.setNamedChild("into", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:598:9
                setOptionalNextTokenTypes(TokenType.BEHAVIOR, TokenType.BEHAVIORS, TokenType.IN);
                completionType = CompletionType.NONE;
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:601:7
            if (nextTokenType() == BEHAVIOR) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:601:9
                consumeToken(BEHAVIOR);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:602:9
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:603:9
                pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 603, 9);
                try {
                    MergeBehaviorKind();
                    if (buildTree) {
                        thisProduction.setNamedChild("defaultMergeBehavior", peekNode());
                    }
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:604:9
                setOptionalNextTokenTypes(TokenType.BEHAVIORS, TokenType.IN);
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:606:7
            if (nextTokenType() == BEHAVIORS) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:606:9
                thisProduction.setNamedChild("behaviors", consumeToken(BEHAVIORS));
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:607:9
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:608:9
                pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 608, 9);
                try {
                    ContentKey();
                } finally {
                    popCallStack();
                }
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:609:9
                consumeToken(EQUAL);
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:610:9
                pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 610, 9);
                try {
                    MergeBehaviorKind();
                } finally {
                    popCallStack();
                }
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:611:9
                setOptionalNextTokenTypes(TokenType.AND, TokenType.IN);
                // Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:612:9
                while (true) {
                    if (!(nextTokenType() == AND)) break;
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:612:11
                    consumeToken(AND);
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:613:11
                    setOptionalNextTokenTypes();
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:614:11
                    pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 614, 11);
                    try {
                        ContentKey();
                    } finally {
                        popCallStack();
                    }
                    // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:615:11
                    consumeToken(EQUAL);
                    // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:616:11
                    pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 616, 11);
                    try {
                        MergeBehaviorKind();
                    } finally {
                        popCallStack();
                    }
                    // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:617:11
                    setOptionalNextTokenTypes(TokenType.AND, TokenType.IN);
                }
            }
            // Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:621:7
            if (nextTokenType() == IN) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:621:9
                consumeToken(IN);
                // Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:621:14
                setOptionalNextTokenTypes();
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:621:47
                pushOntoCallStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 621, 47);
                try {
                    CatalogName();
                    if (buildTree) {
                        thisProduction.setNamedChild("inCatalog", peekNode());
                    }
                } finally {
                    popCallStack();
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    private static final EnumSet ContentKind_FIRST_SET = tokenTypeSet(VIEW, TABLE, NAMESPACE);

    // src/main/congocc/nessie/nessie-cli.ccc:625:1
    final public void ContentKind() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ContentKind";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:625:1
        ContentKind thisProduction = null;
        if (buildTree) {
            thisProduction = new ContentKind();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:626:5
            if (nextTokenType() == TABLE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:626:5
                consumeToken(TABLE);
            } else if (nextTokenType() == VIEW) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:627:5
                consumeToken(VIEW);
            } else if (nextTokenType() == NAMESPACE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:628:5
                consumeToken(NAMESPACE);
            } else {
                pushOntoCallStack("ContentKind", "src/main/congocc/nessie/nessie-cli.ccc", 626, 5);
                throw new ParseException(lastConsumedToken, ContentKind_FIRST_SET, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    private static final EnumSet ReferenceType_FIRST_SET = tokenTypeSet(BRANCH, TAG);

    // src/main/congocc/nessie/nessie-cli.ccc:631:1
    final public void ReferenceType() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ReferenceType";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:631:1
        ReferenceType thisProduction = null;
        if (buildTree) {
            thisProduction = new ReferenceType();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:632:5
            if (nextTokenType() == BRANCH) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:632:5
                consumeToken(BRANCH);
            } else if (nextTokenType() == TAG) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:633:5
                consumeToken(TAG);
            } else {
                pushOntoCallStack("ReferenceType", "src/main/congocc/nessie/nessie-cli.ccc", 632, 5);
                throw new ParseException(lastConsumedToken, ReferenceType_FIRST_SET, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:636:1
    final public void TimestampOrCommit() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "TimestampOrCommit";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:636:1
        TimestampOrCommit thisProduction = null;
        if (buildTree) {
            thisProduction = new TimestampOrCommit();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:638:51
                pushOntoCallStack("TimestampOrCommit", "src/main/congocc/nessie/nessie-cli.ccc", 638, 51);
                try {
                    Identifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:640:1
    final public void ContentKey() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ContentKey";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:640:1
        ContentKey thisProduction = null;
        if (buildTree) {
            thisProduction = new ContentKey();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:641:51
                pushOntoCallStack("ContentKey", "src/main/congocc/nessie/nessie-cli.ccc", 641, 51);
                try {
                    Identifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:643:1
    final public void ReferenceName() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ReferenceName";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:643:1
        ReferenceName thisProduction = null;
        if (buildTree) {
            thisProduction = new ReferenceName();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:644:51
                pushOntoCallStack("ReferenceName", "src/main/congocc/nessie/nessie-cli.ccc", 644, 51);
                try {
                    Identifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:646:1
    final public void CatalogName() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "CatalogName";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:646:1
        CatalogName thisProduction = null;
        if (buildTree) {
            thisProduction = new CatalogName();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:647:51
                pushOntoCallStack("CatalogName", "src/main/congocc/nessie/nessie-cli.ccc", 647, 51);
                try {
                    Identifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:649:1
    final public void ExistingReference() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ExistingReference";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:649:1
        ExistingReference thisProduction = null;
        if (buildTree) {
            thisProduction = new ExistingReference();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:650:51
                pushOntoCallStack("ExistingReference", "src/main/congocc/nessie/nessie-cli.ccc", 650, 51);
                try {
                    Identifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:652:1
    final public void Uri() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "Uri";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:652:1
        Uri thisProduction = null;
        if (buildTree) {
            thisProduction = new Uri();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(URI, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:653:44
                pushOntoCallStack("Uri", "src/main/congocc/nessie/nessie-cli.ccc", 653, 44);
                try {
                    UriIdentifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:655:1
    final public void ParamKey() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "ParamKey";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:655:1
        ParamKey thisProduction = null;
        if (buildTree) {
            thisProduction = new ParamKey();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:656:51
                pushOntoCallStack("ParamKey", "src/main/congocc/nessie/nessie-cli.ccc", 656, 51);
                try {
                    Identifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:658:1
    final public void Value() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "Value";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:658:1
        Value thisProduction = null;
        if (buildTree) {
            thisProduction = new Value();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:659:51
                pushOntoCallStack("Value", "src/main/congocc/nessie/nessie-cli.ccc", 659, 51);
                try {
                    Identifier();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:661:1
    final public void PositiveInt() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "PositiveInt";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:661:1
        PositiveInt thisProduction = null;
        if (buildTree) {
            thisProduction = new PositiveInt();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            EnumSet previousActives10 = EnumSet.copyOf(token_source.activeTokenTypes);
            boolean somethingChanged11 = false;
            somethingChanged11 = activateTokenTypes(POSITIVE_INT);
            try {
                // Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:662:37
                pushOntoCallStack("PositiveInt", "src/main/congocc/nessie/nessie-cli.ccc", 662, 37);
                try {
                    PositiveInteger();
                } finally {
                    popCallStack();
                }
            } finally {
                token_source.activeTokenTypes = previousActives10;
                if (somethingChanged11) {
                    token_source.reset(lastConsumedToken);
                    nextTokenType = null;
                }
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    private static final EnumSet UriIdentifier_FIRST_SET = tokenTypeSet(STRING_LITERAL, URI);

    // src/main/congocc/nessie/nessie-cli.ccc:664:1
    final public void UriIdentifier() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "UriIdentifier";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:664:1
        UriIdentifier thisProduction = null;
        if (buildTree) {
            thisProduction = new UriIdentifier();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:665:5
            if (nextTokenType() == URI) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:665:5
                consumeToken(URI);
            } else if (nextTokenType() == STRING_LITERAL) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:666:5
                consumeToken(STRING_LITERAL);
            } else {
                pushOntoCallStack("UriIdentifier", "src/main/congocc/nessie/nessie-cli.ccc", 665, 5);
                throw new ParseException(lastConsumedToken, UriIdentifier_FIRST_SET, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    private static final EnumSet Identifier_FIRST_SET = tokenTypeSet(STRING_LITERAL, IDENTIFIER);

    // src/main/congocc/nessie/nessie-cli.ccc:669:1
    final public void Identifier() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "Identifier";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:669:1
        Identifier thisProduction = null;
        if (buildTree) {
            thisProduction = new Identifier();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:670:5
            if (nextTokenType() == IDENTIFIER) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:670:5
                consumeToken(IDENTIFIER);
            } else if (nextTokenType() == STRING_LITERAL) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:671:5
                consumeToken(STRING_LITERAL);
            } else {
                pushOntoCallStack("Identifier", "src/main/congocc/nessie/nessie-cli.ccc", 670, 5);
                throw new ParseException(lastConsumedToken, Identifier_FIRST_SET, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    // src/main/congocc/nessie/nessie-cli.ccc:674:1
    final public void PositiveInteger() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "PositiveInteger";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:674:1
        PositiveInteger thisProduction = null;
        if (buildTree) {
            thisProduction = new PositiveInteger();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:675:5
            consumeToken(POSITIVE_INT);
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    private static final EnumSet MergeBehaviorKind_FIRST_SET = tokenTypeSet(DROP, FORCE, NORMAL);

    // src/main/congocc/nessie/nessie-cli.ccc:678:1
    final public void MergeBehaviorKind() {
        if (cancelled) throw new CancellationException();
        this.currentlyParsedProduction = "MergeBehaviorKind";
        // Code for BNFProduction specified at src/main/congocc/nessie/nessie-cli.ccc:678:1
        MergeBehaviorKind thisProduction = null;
        if (buildTree) {
            thisProduction = new MergeBehaviorKind();
            openNodeScope(thisProduction);
        }
        ParseException parseException3 = null;
        int callStackSize4 = parsingStack.size();
        try {
            // Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:679:5
            if (nextTokenType() == NORMAL) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:679:5
                consumeToken(NORMAL);
            } else if (nextTokenType() == FORCE) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:680:5
                consumeToken(FORCE);
            } else if (nextTokenType() == DROP) {
                // Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:681:5
                consumeToken(DROP);
            } else {
                pushOntoCallStack("MergeBehaviorKind", "src/main/congocc/nessie/nessie-cli.ccc", 679, 5);
                throw new ParseException(lastConsumedToken, MergeBehaviorKind_FIRST_SET, parsingStack);
            }
        } catch (ParseException e) {
            parseException3 = e;
            throw e;
        } finally {
            restoreCallStack(callStackSize4);
            if (thisProduction != null) {
                if (parseException3 == null) {
                    closeNodeScope(thisProduction, nodeArity() > 1);
                } else {
                    clearNodeScope();
                }
            }
        }
    }

    private static final EnumSet first_set$nessiecli_ccc$91$15 = tokenTypeSet(NAMESPACE, BRANCH, TAG);
    private static final EnumSet first_set$nessiecli_ccc$99$14 = tokenTypeSet(VIEW, TABLE, NAMESPACE, BRANCH, TAG);
    private static final EnumSet first_set$nessiecli_ccc$109$14 = tokenTypeSet(LOG, VIEW, TABLE, NAMESPACE, REFERENCE);
    private static final EnumSet first_set$nessiecli_ccc$161$7 = tokenTypeSet(NAMESPACE, BRANCH, TAG);
    private static final EnumSet first_set$nessiecli_ccc$228$9 = tokenTypeSet(AT, ON);
    private static final EnumSet first_set$nessiecli_ccc$367$7 = tokenTypeSet(VIEW, TABLE, NAMESPACE, BRANCH, TAG);
    private static final EnumSet first_set$nessiecli_ccc$407$9 = tokenTypeSet(REFERENCE, BRANCH, TAG);
    private static final EnumSet first_set$nessiecli_ccc$428$7 = tokenTypeSet(LOG, VIEW, TABLE, NAMESPACE, REFERENCE);
    private static final EnumSet first_set$nessiecli_ccc$509$9 = tokenTypeSet(CONTENTS, REFERENCES);

    private boolean scanToken(TokenType expectedType, TokenType...additionalTypes) {
        Token peekedToken = nextToken(currentLookaheadToken);
        TokenType type = peekedToken.getType();
        if (type != expectedType) {
            boolean matched = false;
            for (TokenType tt : additionalTypes) {
                if (type == tt) {
                    matched = true;
                    break;
                }
            }
            if (!matched) return false;
        }
        --remainingLookahead;
        currentLookaheadToken = peekedToken;
        return true;
    }

    private boolean scanToken(EnumSet types) {
        Token peekedToken = nextToken(currentLookaheadToken);
        TokenType type = peekedToken.getType();
        if (!types.contains(type)) return false;
        --remainingLookahead;
        currentLookaheadToken = peekedToken;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:55:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$55$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:55:5
            // NonTerminal ConnectStatement at src/main/congocc/nessie/nessie-cli.ccc:55:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 55, 5);
            currentLookaheadProduction = "ConnectStatement";
            try {
                if (!check$ConnectStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:56:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$56$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:56:5
            // NonTerminal CreateStatement at src/main/congocc/nessie/nessie-cli.ccc:56:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 56, 5);
            currentLookaheadProduction = "CreateStatement";
            try {
                if (!check$CreateStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:57:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$57$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:57:5
            // NonTerminal AlterStatement at src/main/congocc/nessie/nessie-cli.ccc:57:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 57, 5);
            currentLookaheadProduction = "AlterStatement";
            try {
                if (!check$AlterStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:58:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$58$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:58:5
            // NonTerminal DropStatement at src/main/congocc/nessie/nessie-cli.ccc:58:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 58, 5);
            currentLookaheadProduction = "DropStatement";
            try {
                if (!check$DropStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:59:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$59$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:59:5
            // NonTerminal AssignReferenceStatement at src/main/congocc/nessie/nessie-cli.ccc:59:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 59, 5);
            currentLookaheadProduction = "AssignReferenceStatement";
            try {
                if (!check$AssignReferenceStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:60:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$60$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:60:5
            // NonTerminal RevertContentStatement at src/main/congocc/nessie/nessie-cli.ccc:60:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 60, 5);
            currentLookaheadProduction = "RevertContentStatement";
            try {
                if (!check$RevertContentStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:61:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$61$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:61:5
            // NonTerminal UseReferenceStatement at src/main/congocc/nessie/nessie-cli.ccc:61:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 61, 5);
            currentLookaheadProduction = "UseReferenceStatement";
            try {
                if (!check$UseReferenceStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:62:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$62$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:62:5
            // NonTerminal ListStatement at src/main/congocc/nessie/nessie-cli.ccc:62:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 62, 5);
            currentLookaheadProduction = "ListStatement";
            try {
                if (!check$ListStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:63:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$63$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:63:5
            // NonTerminal ShowStatement at src/main/congocc/nessie/nessie-cli.ccc:63:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 63, 5);
            currentLookaheadProduction = "ShowStatement";
            try {
                if (!check$ShowStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:64:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$64$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:64:5
            // NonTerminal MergeBranchStatement at src/main/congocc/nessie/nessie-cli.ccc:64:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 64, 5);
            currentLookaheadProduction = "MergeBranchStatement";
            try {
                if (!check$MergeBranchStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:66:5
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$66$5(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:66:5
            // NonTerminal HelpStatement at src/main/congocc/nessie/nessie-cli.ccc:66:5
            pushOntoLookaheadStack("Statement", "src/main/congocc/nessie/nessie-cli.ccc", 66, 5);
            currentLookaheadProduction = "HelpStatement";
            try {
                if (!check$HelpStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:87:12
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$87$12(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:87:12
            Token token2 = currentLookaheadToken;
            int remainingLookahead2 = remainingLookahead;
            boolean hitFailure2 = hitFailure;
            boolean passedPredicate2 = passedPredicate;
            try {
                passedPredicate = false;
                if (!scanToken(USE)) {
                    currentLookaheadToken = token2;
                    remainingLookahead = remainingLookahead2;
                    hitFailure = hitFailure2;
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    passedPredicate = false;
                    if (!scanToken(CONNECT)) {
                        currentLookaheadToken = token2;
                        remainingLookahead = remainingLookahead2;
                        hitFailure = hitFailure2;
                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                        passedPredicate = false;
                        if (!check$nessiecli_ccc$89$12(false)) {
                            currentLookaheadToken = token2;
                            remainingLookahead = remainingLookahead2;
                            hitFailure = hitFailure2;
                            if (passedPredicate && !legacyGlitchyLookahead) return false;
                            passedPredicate = false;
                            if (!check$nessiecli_ccc$94$12(false)) {
                                currentLookaheadToken = token2;
                                remainingLookahead = remainingLookahead2;
                                hitFailure = hitFailure2;
                                if (passedPredicate && !legacyGlitchyLookahead) return false;
                                passedPredicate = false;
                                if (!check$nessiecli_ccc$97$12(false)) {
                                    currentLookaheadToken = token2;
                                    remainingLookahead = remainingLookahead2;
                                    hitFailure = hitFailure2;
                                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                                    passedPredicate = false;
                                    if (!check$nessiecli_ccc$102$12(false)) {
                                        currentLookaheadToken = token2;
                                        remainingLookahead = remainingLookahead2;
                                        hitFailure = hitFailure2;
                                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                                        passedPredicate = false;
                                        if (!check$nessiecli_ccc$107$12(false)) {
                                            currentLookaheadToken = token2;
                                            remainingLookahead = remainingLookahead2;
                                            hitFailure = hitFailure2;
                                            if (passedPredicate && !legacyGlitchyLookahead) return false;
                                            passedPredicate = false;
                                            if (!check$nessiecli_ccc$112$12(false)) {
                                                currentLookaheadToken = token2;
                                                remainingLookahead = remainingLookahead2;
                                                hitFailure = hitFailure2;
                                                if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                passedPredicate = false;
                                                if (!scanToken(MERGE)) {
                                                    currentLookaheadToken = token2;
                                                    remainingLookahead = remainingLookahead2;
                                                    hitFailure = hitFailure2;
                                                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                    passedPredicate = false;
                                                    if (!scanToken(REVERT)) {
                                                        currentLookaheadToken = token2;
                                                        remainingLookahead = remainingLookahead2;
                                                        hitFailure = hitFailure2;
                                                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                        passedPredicate = false;
                                                        if (!scanToken(HELP)) {
                                                            currentLookaheadToken = token2;
                                                            remainingLookahead = remainingLookahead2;
                                                            hitFailure = hitFailure2;
                                                            if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                            passedPredicate = false;
                                                            if (!scanToken(EXIT)) {
                                                                currentLookaheadToken = token2;
                                                                remainingLookahead = remainingLookahead2;
                                                                hitFailure = hitFailure2;
                                                                if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                                passedPredicate = false;
                                                                if (!scanToken(LICENSE)) {
                                                                    currentLookaheadToken = token2;
                                                                    remainingLookahead = remainingLookahead2;
                                                                    hitFailure = hitFailure2;
                                                                    return false;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            } finally {
                passedPredicate = passedPredicate2;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:89:12
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$89$12(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:89:12
            if (!scanToken(CREATE)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:90:12
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:91:12
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(NAMESPACE, BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:94:12
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$94$12(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:94:12
            if (!scanToken(ALTER)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:95:12
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:96:12
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(NAMESPACE)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:97:12
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$97$12(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:97:12
            if (!scanToken(DROP)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:98:12
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:99:12
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(first_set$nessiecli_ccc$99$14)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:102:12
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$102$12(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:102:12
            if (!scanToken(LIST)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:103:12
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:104:12
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(CONTENTS, REFERENCES)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:107:12
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$107$12(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:107:12
            if (!scanToken(SHOW)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:108:12
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:109:12
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(first_set$nessiecli_ccc$109$14)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:112:12
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$112$12(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:112:12
            if (!scanToken(ASSIGN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:113:12
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:114:12
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:133:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$133$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:133:9
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:134:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:135:9
            // NonTerminal ReferenceName at src/main/congocc/nessie/nessie-cli.ccc:135:9
            pushOntoLookaheadStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 135, 9);
            currentLookaheadProduction = "ReferenceName";
            try {
                if (!check$ReferenceName(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:136:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:138:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$138$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:138:9
            if (!scanToken(USING)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:139:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:141:9
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:141:9
            pushOntoLookaheadStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 141, 9);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:142:9
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:143:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:144:9
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:144:9
            pushOntoLookaheadStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 144, 9);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:145:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:146:9
            boolean passedPredicate10 = passedPredicate;
            try {
                while (remainingLookahead > 0 && !hitFailure) {
                    Token token11 = currentLookaheadToken;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$147$11(false)) {
                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                        currentLookaheadToken = token11;
                        break;
                    }
                }
            } finally {
                passedPredicate = passedPredicate10;
            }
            hitFailure = false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:147:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$147$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:147:11
            if (!scanToken(AND)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:148:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:150:11
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:150:11
            pushOntoLookaheadStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 150, 11);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:151:11
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:152:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:153:11
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:153:11
            pushOntoLookaheadStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 153, 11);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:154:11
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:161:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$161$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:161:7
            // NonTerminal CreateReferenceStatement at src/main/congocc/nessie/nessie-cli.ccc:161:7
            pushOntoLookaheadStack("CreateStatement", "src/main/congocc/nessie/nessie-cli.ccc", 161, 7);
            currentLookaheadProduction = "CreateReferenceStatement";
            try {
                if (!check$CreateReferenceStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:162:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$162$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:162:7
            // NonTerminal CreateNamespaceStatement at src/main/congocc/nessie/nessie-cli.ccc:162:7
            pushOntoLookaheadStack("CreateStatement", "src/main/congocc/nessie/nessie-cli.ccc", 162, 7);
            currentLookaheadProduction = "CreateNamespaceStatement";
            try {
                if (!check$CreateNamespaceStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:170:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$170$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:170:9
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:171:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:172:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:175:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:176:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:176:9
            pushOntoLookaheadStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 176, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:177:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:180:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$180$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:180:9
            if (!scanToken(SET)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:181:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:182:9
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:182:9
            pushOntoLookaheadStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 182, 9);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:183:9
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:184:9
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:184:9
            pushOntoLookaheadStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 184, 9);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:185:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:186:9
            boolean passedPredicate9 = passedPredicate;
            try {
                while (remainingLookahead > 0 && !hitFailure) {
                    Token token10 = currentLookaheadToken;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$187$11(false)) {
                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                        currentLookaheadToken = token10;
                        break;
                    }
                }
            } finally {
                passedPredicate = passedPredicate9;
            }
            hitFailure = false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:187:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$187$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:187:11
            if (!scanToken(AND)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:188:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:189:11
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:189:11
            pushOntoLookaheadStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 189, 11);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:190:11
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:191:11
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:191:11
            pushOntoLookaheadStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 191, 11);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:192:11
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:210:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$210$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:210:9
            if (!scanToken(AND)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:211:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:213:9
            // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:213:9
            pushOntoLookaheadStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 213, 9);
            currentLookaheadProduction = "ContentKey";
            try {
                if (!check$ContentKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:214:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:217:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$217$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:217:9
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:218:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:219:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:222:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:223:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:223:9
            pushOntoLookaheadStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 223, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:224:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:228:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$228$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:228:9
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:229:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:230:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:233:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:234:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:234:9
            pushOntoLookaheadStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 234, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:235:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:237:9
            Token token10 = currentLookaheadToken;
            boolean passedPredicate10 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$237$11(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token10;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate10;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:237:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$237$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:237:11
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:238:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:239:11
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:242:11
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:242:11
            pushOntoLookaheadStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 242, 11);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:243:11
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:246:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$246$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:246:9
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:247:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:248:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:251:9
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:251:9
            pushOntoLookaheadStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 251, 9);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:252:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:254:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$254$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:254:9
            if (!scanToken(ALLOW)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:255:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:256:9
            if (!scanToken(DELETES)) return false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:263:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$263$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:263:9
            if (!scanToken(IF)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:264:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:265:9
            if (!scanToken(NOT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:265:15
            if (!scanToken(EXISTS)) return false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:270:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$270$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:270:9
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:270:14
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:270:47
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:270:47
            pushOntoLookaheadStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 270, 47);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:271:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:274:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$274$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:274:9
            if (!scanToken(FROM)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:275:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:278:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:278:9
            pushOntoLookaheadStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 278, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:279:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:283:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$283$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:283:9
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:284:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:285:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:288:9
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:288:9
            pushOntoLookaheadStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 288, 9);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:289:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:297:10
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$297$10(boolean scanToEnd) {
        int prevPassedPredicateThreshold = this.passedPredicateThreshold;
        this.passedPredicateThreshold = -1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:297:10
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:297:10
            pushOntoLookaheadStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 297, 10);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (remainingLookahead <= this.passedPredicateThreshold) {
                passedPredicate = true;
                this.passedPredicateThreshold = prevPassedPredicateThreshold;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:300:10
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$300$10(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:300:10
            if (!scanToken(TO)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:301:11
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:301:11
            pushOntoLookaheadStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 301, 11);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:302:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:303:11
            Token token6 = currentLookaheadToken;
            boolean passedPredicate6 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$303$13(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token6;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate6;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:303:13
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$303$13(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:303:13
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:304:13
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:305:13
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:308:13
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:308:13
            pushOntoLookaheadStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 308, 13);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:311:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$311$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:311:11
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:311:16
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:311:49
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:311:49
            pushOntoLookaheadStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 311, 49);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:326:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$326$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:326:9
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:327:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:328:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:331:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:332:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:332:9
            pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 332, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:333:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:337:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$337$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:337:9
            if (!scanToken(SET)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:338:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:339:9
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:339:9
            pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 339, 9);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:340:9
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:341:9
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:341:9
            pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 341, 9);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:342:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:343:9
            boolean passedPredicate9 = passedPredicate;
            try {
                while (remainingLookahead > 0 && !hitFailure) {
                    Token token10 = currentLookaheadToken;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$344$11(false)) {
                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                        currentLookaheadToken = token10;
                        break;
                    }
                }
            } finally {
                passedPredicate = passedPredicate9;
            }
            hitFailure = false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:344:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$344$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:344:11
            if (!scanToken(AND)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:345:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:346:11
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:346:11
            pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 346, 11);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:347:11
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:348:11
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:348:11
            pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 348, 11);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:349:11
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:352:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$352$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:352:9
            if (!scanToken(REMOVE)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:353:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:354:9
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:354:9
            pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 354, 9);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:355:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:356:9
            boolean passedPredicate7 = passedPredicate;
            try {
                while (remainingLookahead > 0 && !hitFailure) {
                    Token token8 = currentLookaheadToken;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$357$11(false)) {
                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                        currentLookaheadToken = token8;
                        break;
                    }
                }
            } finally {
                passedPredicate = passedPredicate7;
            }
            hitFailure = false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:357:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$357$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:357:11
            if (!scanToken(AND)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:358:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:359:11
            // NonTerminal ParamKey at src/main/congocc/nessie/nessie-cli.ccc:359:11
            pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 359, 11);
            currentLookaheadProduction = "ParamKey";
            try {
                if (!check$ParamKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:360:11
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:367:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$367$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:367:7
            // NonTerminal DropReferenceStatement at src/main/congocc/nessie/nessie-cli.ccc:367:7
            pushOntoLookaheadStack("DropStatement", "src/main/congocc/nessie/nessie-cli.ccc", 367, 7);
            currentLookaheadProduction = "DropReferenceStatement";
            try {
                if (!check$DropReferenceStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:368:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$368$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:368:7
            // NonTerminal DropContentStatement at src/main/congocc/nessie/nessie-cli.ccc:368:7
            pushOntoLookaheadStack("DropStatement", "src/main/congocc/nessie/nessie-cli.ccc", 368, 7);
            currentLookaheadProduction = "DropContentStatement";
            try {
                if (!check$DropContentStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:375:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$375$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:375:9
            if (!scanToken(IF)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:376:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:377:9
            if (!scanToken(EXISTS)) return false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:383:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$383$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:383:9
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:383:14
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:383:47
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:383:47
            pushOntoLookaheadStack("DropReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 383, 47);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:393:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$393$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:393:9
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:394:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:395:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:398:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:399:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:399:9
            pushOntoLookaheadStack("DropContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 399, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:400:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:413:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$413$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:413:9
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:414:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:415:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:418:9
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:418:9
            pushOntoLookaheadStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 418, 9);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:419:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:422:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$422$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:422:9
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:422:14
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:422:47
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:422:47
            pushOntoLookaheadStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 422, 47);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:428:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$428$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:428:7
            // NonTerminal ShowLogStatement at src/main/congocc/nessie/nessie-cli.ccc:428:7
            pushOntoLookaheadStack("ShowStatement", "src/main/congocc/nessie/nessie-cli.ccc", 428, 7);
            currentLookaheadProduction = "ShowLogStatement";
            try {
                if (!check$ShowLogStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:429:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$429$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:429:7
            // NonTerminal ShowContentStatement at src/main/congocc/nessie/nessie-cli.ccc:429:7
            pushOntoLookaheadStack("ShowStatement", "src/main/congocc/nessie/nessie-cli.ccc", 429, 7);
            currentLookaheadProduction = "ShowContentStatement";
            try {
                if (!check$ShowContentStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:430:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$430$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:430:7
            // NonTerminal ShowReferenceStatement at src/main/congocc/nessie/nessie-cli.ccc:430:7
            pushOntoLookaheadStack("ShowStatement", "src/main/congocc/nessie/nessie-cli.ccc", 430, 7);
            currentLookaheadProduction = "ShowReferenceStatement";
            try {
                if (!check$ShowReferenceStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:437:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$437$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:437:9
            Token token3 = currentLookaheadToken;
            boolean passedPredicate3 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$437$11(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token3;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate3;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:443:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:444:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:444:9
            pushOntoLookaheadStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 444, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(false)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:445:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:437:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$437$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:437:11
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:438:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:439:11
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:448:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$448$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:448:9
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:449:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:450:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:453:9
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:453:9
            pushOntoLookaheadStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 453, 9);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:454:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:456:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$456$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:456:9
            if (!scanToken(LIMIT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:457:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:458:9
            // NonTerminal PositiveInt at src/main/congocc/nessie/nessie-cli.ccc:458:9
            pushOntoLookaheadStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 458, 9);
            currentLookaheadProduction = "PositiveInt";
            try {
                if (!check$PositiveInt(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:459:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:462:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$462$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:462:9
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:462:14
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:462:47
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:462:47
            pushOntoLookaheadStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 462, 47);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:469:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$469$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:469:7
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:470:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:471:7
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:474:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:475:7
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:475:7
            pushOntoLookaheadStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 475, 7);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:476:7
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:480:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$480$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:480:7
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:481:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:482:7
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:485:7
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:485:7
            pushOntoLookaheadStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 485, 7);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:493:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$493$9(boolean scanToEnd) {
        int prevPassedPredicateThreshold = this.passedPredicateThreshold;
        this.passedPredicateThreshold = -1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:493:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:494:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:494:9
            pushOntoLookaheadStack("ShowReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 494, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (remainingLookahead <= this.passedPredicateThreshold) {
                passedPredicate = true;
                this.passedPredicateThreshold = prevPassedPredicateThreshold;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:495:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$495$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:495:9
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:496:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:497:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:500:9
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:500:9
            pushOntoLookaheadStack("ShowReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 500, 9);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:503:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$503$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:503:9
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:503:14
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:503:47
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:503:47
            pushOntoLookaheadStack("ShowReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 503, 47);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:509:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$509$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:509:9
            // NonTerminal ListReferencesStatement at src/main/congocc/nessie/nessie-cli.ccc:509:9
            pushOntoLookaheadStack("ListStatement", "src/main/congocc/nessie/nessie-cli.ccc", 509, 9);
            currentLookaheadProduction = "ListReferencesStatement";
            try {
                if (!check$ListReferencesStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:510:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$510$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:510:9
            // NonTerminal ListContentsStatement at src/main/congocc/nessie/nessie-cli.ccc:510:9
            pushOntoLookaheadStack("ListStatement", "src/main/congocc/nessie/nessie-cli.ccc", 510, 9);
            currentLookaheadProduction = "ListContentsStatement";
            try {
                if (!check$ListContentsStatement(false)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:517:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$517$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:517:7
            if (!scanToken(ON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:518:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:519:7
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(BRANCH, TAG)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:522:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:523:7
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:523:7
            pushOntoLookaheadStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 523, 7);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:524:7
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:528:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$528$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:528:7
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:529:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:530:7
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:533:7
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:533:7
            pushOntoLookaheadStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 533, 7);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:534:7
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:536:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$536$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:536:7
            Token token2 = currentLookaheadToken;
            int remainingLookahead2 = remainingLookahead;
            boolean hitFailure2 = hitFailure;
            boolean passedPredicate2 = passedPredicate;
            try {
                passedPredicate = false;
                if (!check$nessiecli_ccc$536$7$(false)) {
                    currentLookaheadToken = token2;
                    remainingLookahead = remainingLookahead2;
                    hitFailure = hitFailure2;
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$539$7(false)) {
                        currentLookaheadToken = token2;
                        remainingLookahead = remainingLookahead2;
                        hitFailure = hitFailure2;
                        return false;
                    }
                }
            } finally {
                passedPredicate = passedPredicate2;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:536:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$536$7$(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:536:7
            if (!scanToken(FILTER)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:537:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:538:7
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:538:7
            pushOntoLookaheadStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 538, 7);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:539:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$539$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 0;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            passedPredicate = true;
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:539:7
            Token token3 = currentLookaheadToken;
            boolean passedPredicate3 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$539$9(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token3;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate3;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:544:7
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$544$9(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:539:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$539$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:539:9
            if (!scanToken(STARTING)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:540:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:541:9
            if (!scanToken(WITH)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:541:16
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:541:16
            pushOntoLookaheadStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 541, 16);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:542:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:544:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$544$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:544:9
            if (!scanToken(CONTAINING)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:545:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:546:9
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:546:9
            pushOntoLookaheadStack("ListContentsStatement", "src/main/congocc/nessie/nessie-cli.ccc", 546, 9);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:554:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$554$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:554:7
            Token token2 = currentLookaheadToken;
            int remainingLookahead2 = remainingLookahead;
            boolean hitFailure2 = hitFailure;
            boolean passedPredicate2 = passedPredicate;
            try {
                passedPredicate = false;
                if (!check$nessiecli_ccc$554$7$(false)) {
                    currentLookaheadToken = token2;
                    remainingLookahead = remainingLookahead2;
                    hitFailure = hitFailure2;
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$558$7(false)) {
                        currentLookaheadToken = token2;
                        remainingLookahead = remainingLookahead2;
                        hitFailure = hitFailure2;
                        return false;
                    }
                }
            } finally {
                passedPredicate = passedPredicate2;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:554:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$554$7$(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:554:7
            if (!scanToken(FILTER)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:555:7
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:556:7
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:556:7
            pushOntoLookaheadStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 556, 7);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:557:7
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:558:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$558$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 0;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            passedPredicate = true;
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:558:7
            Token token3 = currentLookaheadToken;
            boolean passedPredicate3 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$558$9(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token3;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate3;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:563:7
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$563$9(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:558:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$558$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:558:9
            if (!scanToken(STARTING)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:559:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:560:9
            if (!scanToken(WITH)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:560:16
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:560:16
            pushOntoLookaheadStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 560, 16);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:561:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:563:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$563$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:563:9
            if (!scanToken(CONTAINING)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:564:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:565:9
            // NonTerminal Value at src/main/congocc/nessie/nessie-cli.ccc:565:9
            pushOntoLookaheadStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 565, 9);
            currentLookaheadProduction = "Value";
            try {
                if (!check$Value(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:566:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:570:7
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$570$7(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:570:7
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:570:12
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:570:45
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:570:45
            pushOntoLookaheadStack("ListReferencesStatement", "src/main/congocc/nessie/nessie-cli.ccc", 570, 45);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:586:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$586$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:586:9
            if (!scanToken(AT)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:587:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:588:9
            Token token5 = currentLookaheadToken;
            boolean passedPredicate5 = passedPredicate;
            passedPredicate = false;
            try {
                if (!scanToken(COMMIT, TIMESTAMP)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token5;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate5;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:591:9
            // NonTerminal TimestampOrCommit at src/main/congocc/nessie/nessie-cli.ccc:591:9
            pushOntoLookaheadStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 591, 9);
            currentLookaheadProduction = "TimestampOrCommit";
            try {
                if (!check$TimestampOrCommit(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:592:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:594:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$594$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:594:9
            if (!scanToken(INTO)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:595:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:597:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:597:9
            pushOntoLookaheadStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 597, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:598:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:601:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$601$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:601:9
            if (!scanToken(BEHAVIOR)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:602:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:603:9
            if (!scanToken(DROP, FORCE, NORMAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:604:9
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:606:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$606$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:606:9
            if (!scanToken(BEHAVIORS)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:607:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:608:9
            // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:608:9
            pushOntoLookaheadStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 608, 9);
            currentLookaheadProduction = "ContentKey";
            try {
                if (!check$ContentKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:609:9
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:610:9
            if (!scanToken(DROP, FORCE, NORMAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:611:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:612:9
            boolean passedPredicate9 = passedPredicate;
            try {
                while (remainingLookahead > 0 && !hitFailure) {
                    Token token10 = currentLookaheadToken;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$612$11(false)) {
                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                        currentLookaheadToken = token10;
                        break;
                    }
                }
            } finally {
                passedPredicate = passedPredicate9;
            }
            hitFailure = false;
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:612:11
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$612$11(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:612:11
            if (!scanToken(AND)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:613:11
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:614:11
            // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:614:11
            pushOntoLookaheadStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 614, 11);
            currentLookaheadProduction = "ContentKey";
            try {
                if (!check$ContentKey(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:615:11
            if (!scanToken(EQUAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:616:11
            if (!scanToken(DROP, FORCE, NORMAL)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:617:11
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // scanahead routine for expansion at:
    // src/main/congocc/nessie/nessie-cli.ccc:621:9
    // BuildScanRoutine macro
    private boolean check$nessiecli_ccc$621$9(boolean scanToEnd) {
        boolean reachedScanCode = false;
        int passedPredicateThreshold = remainingLookahead - 1;
        try {
            lookaheadRoutineNesting++;
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            reachedScanCode = true;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:621:9
            if (!scanToken(IN)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:621:14
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:621:47
            // NonTerminal CatalogName at src/main/congocc/nessie/nessie-cli.ccc:621:47
            pushOntoLookaheadStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 621, 47);
            currentLookaheadProduction = "CatalogName";
            try {
                if (!check$CatalogName(true)) return false;
            } finally {
                popLookaheadStack();
            }
        } finally {
            lookaheadRoutineNesting--;
            if (reachedScanCode && remainingLookahead <= passedPredicateThreshold) {
                passedPredicate = true;
            }
        }
        passedPredicate = false;
        return true;
    }

    // BuildPredicateRoutine: expansion at src/main/congocc/nessie/nessie-cli.ccc:43:5
    private boolean scan$nessiecli_ccc$43$5() {
        remainingLookahead = UNLIMITED;
        currentLookaheadToken = lastConsumedToken;
        final boolean scanToEnd = false;
        try {
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:43:5
            if (!scanToken(SEMICOLON)) return false;
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:43:17
            // NonTerminal Statement at src/main/congocc/nessie/nessie-cli.ccc:43:17
            pushOntoLookaheadStack("Script", "src/main/congocc/nessie/nessie-cli.ccc", 43, 17);
            currentLookaheadProduction = "Statement";
            try {
                if (!check$Statement(true)) return false;
            } finally {
                popLookaheadStack();
            }
            if (!scanToEnd && lookaheadStack.size() <= 1) {
                if (lookaheadRoutineNesting == 0) {
                    remainingLookahead = 0;
                } else if (lookaheadStack.size() == 1) {
                    passedPredicateThreshold = remainingLookahead;
                }
            }
            return true;
        } finally {
            lookaheadRoutineNesting = 0;
            currentLookaheadToken = null;
            hitFailure = false;
        }
    }

    // BuildPredicateRoutine: expansion at src/main/congocc/nessie/nessie-cli.ccc:297:10
    private boolean scan$nessiecli_ccc$297$10() {
        remainingLookahead = UNLIMITED;
        currentLookaheadToken = lastConsumedToken;
        final boolean scanToEnd = false;
        try {
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:297:10
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:297:10
            pushOntoLookaheadStack("AssignReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 297, 10);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(false)) return false;
            } finally {
                popLookaheadStack();
            }
            return true;
        } finally {
            lookaheadRoutineNesting = 0;
            currentLookaheadToken = null;
            hitFailure = false;
        }
    }

    // BuildPredicateRoutine: expansion at src/main/congocc/nessie/nessie-cli.ccc:437:9
    private boolean scan$nessiecli_ccc$437$9() {
        remainingLookahead = 1;
        currentLookaheadToken = lastConsumedToken;
        final boolean scanToEnd = false;
        try {
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:437:9
            Token token3 = currentLookaheadToken;
            boolean passedPredicate3 = passedPredicate;
            passedPredicate = false;
            try {
                if (!check$nessiecli_ccc$437$11(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token3;
                    hitFailure = false;
                }
            } finally {
                passedPredicate = passedPredicate3;
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:443:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:444:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:444:9
            pushOntoLookaheadStack("ShowLogStatement", "src/main/congocc/nessie/nessie-cli.ccc", 444, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(false)) return false;
            } finally {
                popLookaheadStack();
            }
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:445:9
            return true;
        } finally {
            lookaheadRoutineNesting = 0;
            currentLookaheadToken = null;
            hitFailure = false;
        }
    }

    // BuildPredicateRoutine: expansion at src/main/congocc/nessie/nessie-cli.ccc:493:9
    private boolean scan$nessiecli_ccc$493$9() {
        remainingLookahead = UNLIMITED;
        currentLookaheadToken = lastConsumedToken;
        final boolean scanToEnd = false;
        try {
            // BuildPredicateCode macro
            // End BuildPredicateCode macro
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:493:9
            if (hitFailure) return false;
            if (remainingLookahead <= 0) return true;
            // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:494:9
            // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:494:9
            pushOntoLookaheadStack("ShowReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 494, 9);
            currentLookaheadProduction = "ExistingReference";
            try {
                if (!check$ExistingReference(false)) return false;
            } finally {
                popLookaheadStack();
            }
            return true;
        } finally {
            lookaheadRoutineNesting = 0;
            currentLookaheadToken = null;
            hitFailure = false;
        }
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$Statement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:55:5
        Token token2 = currentLookaheadToken;
        int remainingLookahead2 = remainingLookahead;
        boolean hitFailure2 = hitFailure;
        boolean passedPredicate2 = passedPredicate;
        try {
            passedPredicate = false;
            if (!check$nessiecli_ccc$55$5(false)) {
                currentLookaheadToken = token2;
                remainingLookahead = remainingLookahead2;
                hitFailure = hitFailure2;
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                passedPredicate = false;
                if (!check$nessiecli_ccc$56$5(false)) {
                    currentLookaheadToken = token2;
                    remainingLookahead = remainingLookahead2;
                    hitFailure = hitFailure2;
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$57$5(false)) {
                        currentLookaheadToken = token2;
                        remainingLookahead = remainingLookahead2;
                        hitFailure = hitFailure2;
                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                        passedPredicate = false;
                        if (!check$nessiecli_ccc$58$5(false)) {
                            currentLookaheadToken = token2;
                            remainingLookahead = remainingLookahead2;
                            hitFailure = hitFailure2;
                            if (passedPredicate && !legacyGlitchyLookahead) return false;
                            passedPredicate = false;
                            if (!check$nessiecli_ccc$59$5(false)) {
                                currentLookaheadToken = token2;
                                remainingLookahead = remainingLookahead2;
                                hitFailure = hitFailure2;
                                if (passedPredicate && !legacyGlitchyLookahead) return false;
                                passedPredicate = false;
                                if (!check$nessiecli_ccc$60$5(false)) {
                                    currentLookaheadToken = token2;
                                    remainingLookahead = remainingLookahead2;
                                    hitFailure = hitFailure2;
                                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                                    passedPredicate = false;
                                    if (!check$nessiecli_ccc$61$5(false)) {
                                        currentLookaheadToken = token2;
                                        remainingLookahead = remainingLookahead2;
                                        hitFailure = hitFailure2;
                                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                                        passedPredicate = false;
                                        if (!check$nessiecli_ccc$62$5(false)) {
                                            currentLookaheadToken = token2;
                                            remainingLookahead = remainingLookahead2;
                                            hitFailure = hitFailure2;
                                            if (passedPredicate && !legacyGlitchyLookahead) return false;
                                            passedPredicate = false;
                                            if (!check$nessiecli_ccc$63$5(false)) {
                                                currentLookaheadToken = token2;
                                                remainingLookahead = remainingLookahead2;
                                                hitFailure = hitFailure2;
                                                if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                passedPredicate = false;
                                                if (!check$nessiecli_ccc$64$5(false)) {
                                                    currentLookaheadToken = token2;
                                                    remainingLookahead = remainingLookahead2;
                                                    hitFailure = hitFailure2;
                                                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                    passedPredicate = false;
                                                    if (!scanToken(EXIT)) {
                                                        currentLookaheadToken = token2;
                                                        remainingLookahead = remainingLookahead2;
                                                        hitFailure = hitFailure2;
                                                        if (passedPredicate && !legacyGlitchyLookahead) return false;
                                                        passedPredicate = false;
                                                        if (!check$nessiecli_ccc$66$5(false)) {
                                                            currentLookaheadToken = token2;
                                                            remainingLookahead = remainingLookahead2;
                                                            hitFailure = hitFailure2;
                                                            return false;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        } finally {
            passedPredicate = passedPredicate2;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$HelpStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:70:7
        if (!scanToken(HELP)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:71:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:86:7
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$87$12(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ConnectStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:130:7
        if (!scanToken(CONNECT)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:131:7
        if (!scanToken(TO)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:131:12
        // NonTerminal Uri at src/main/congocc/nessie/nessie-cli.ccc:131:12
        pushOntoLookaheadStack("ConnectStatement", "src/main/congocc/nessie/nessie-cli.ccc", 131, 12);
        currentLookaheadProduction = "Uri";
        try {
            if (!check$Uri(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:132:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:133:7
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$133$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:138:7
        Token token9 = currentLookaheadToken;
        boolean passedPredicate9 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$138$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token9;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate9;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$CreateStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:160:7
        if (!scanToken(CREATE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:161:7
        Token token5 = currentLookaheadToken;
        int remainingLookahead5 = remainingLookahead;
        boolean hitFailure5 = hitFailure;
        boolean passedPredicate5 = passedPredicate;
        try {
            passedPredicate = false;
            if (!check$nessiecli_ccc$161$7(false)) {
                currentLookaheadToken = token5;
                remainingLookahead = remainingLookahead5;
                hitFailure = hitFailure5;
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                passedPredicate = false;
                if (!check$nessiecli_ccc$162$7(false)) {
                    currentLookaheadToken = token5;
                    remainingLookahead = remainingLookahead5;
                    hitFailure = hitFailure5;
                    return false;
                }
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$CreateNamespaceStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:167:7
        if (!scanToken(NAMESPACE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:168:7
        // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:168:7
        pushOntoLookaheadStack("CreateNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 168, 7);
        currentLookaheadProduction = "ContentKey";
        try {
            if (!check$ContentKey(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:169:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:170:7
        Token token6 = currentLookaheadToken;
        boolean passedPredicate6 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$170$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token6;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate6;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:180:7
        Token token8 = currentLookaheadToken;
        boolean passedPredicate8 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$180$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token8;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate8;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$RevertContentStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:198:7
        if (!scanToken(REVERT)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:199:7
        if (!scanToken(CONTENT)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:200:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:201:7
        Token token6 = currentLookaheadToken;
        boolean passedPredicate6 = passedPredicate;
        passedPredicate = false;
        try {
            if (!scanToken(DRY)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token6;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate6;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:204:7
        if (!scanToken(OF)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:205:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:207:7
        // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:207:7
        pushOntoLookaheadStack("RevertContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 207, 7);
        currentLookaheadProduction = "ContentKey";
        try {
            if (!check$ContentKey(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:208:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrMore specified at src/main/congocc/nessie/nessie-cli.ccc:210:7
        boolean passedPredicate12 = passedPredicate;
        try {
            while (remainingLookahead > 0 && !hitFailure) {
                Token token13 = currentLookaheadToken;
                passedPredicate = false;
                if (!check$nessiecli_ccc$210$9(false)) {
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    currentLookaheadToken = token13;
                    break;
                }
            }
        } finally {
            passedPredicate = passedPredicate12;
        }
        hitFailure = false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:217:7
        Token token15 = currentLookaheadToken;
        boolean passedPredicate15 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$217$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token15;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate15;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:226:7
        if (!scanToken(TO)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:226:12
        if (!scanToken(STATE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:228:9
        Token token20 = currentLookaheadToken;
        int remainingLookahead20 = remainingLookahead;
        boolean hitFailure20 = hitFailure;
        boolean passedPredicate20 = passedPredicate;
        try {
            passedPredicate = false;
            if (!check$nessiecli_ccc$228$9(false)) {
                currentLookaheadToken = token20;
                remainingLookahead = remainingLookahead20;
                hitFailure = hitFailure20;
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                passedPredicate = false;
                if (!check$nessiecli_ccc$246$9(false)) {
                    currentLookaheadToken = token20;
                    remainingLookahead = remainingLookahead20;
                    hitFailure = hitFailure20;
                    return false;
                }
            }
        } finally {
            passedPredicate = passedPredicate20;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:254:7
        Token token22 = currentLookaheadToken;
        boolean passedPredicate22 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$254$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token22;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate22;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$CreateReferenceStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:261:7
        if (!scanToken(BRANCH, TAG)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:262:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:263:7
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$263$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:267:7
        // NonTerminal ReferenceName at src/main/congocc/nessie/nessie-cli.ccc:267:7
        pushOntoLookaheadStack("CreateReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 267, 7);
        currentLookaheadProduction = "ReferenceName";
        try {
            if (!check$ReferenceName(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:268:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:270:7
        Token token9 = currentLookaheadToken;
        boolean passedPredicate9 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$270$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token9;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate9;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:274:7
        Token token11 = currentLookaheadToken;
        boolean passedPredicate11 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$274$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token11;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate11;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:283:7
        Token token13 = currentLookaheadToken;
        boolean passedPredicate13 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$283$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token13;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate13;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$AssignReferenceStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:294:7
        if (!scanToken(ASSIGN)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:295:9
        if (!scanToken(BRANCH, TAG)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:296:9
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:297:9
        Token token6 = currentLookaheadToken;
        boolean passedPredicate6 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$297$10(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token6;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate6;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:298:9
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:300:9
        Token token9 = currentLookaheadToken;
        boolean passedPredicate9 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$300$10(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token9;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate9;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:311:9
        Token token11 = currentLookaheadToken;
        boolean passedPredicate11 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$311$11(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token11;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate11;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$AlterStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:316:7
        if (!scanToken(ALTER)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:317:7
        // NonTerminal AlterNamespaceStatement at src/main/congocc/nessie/nessie-cli.ccc:317:7
        pushOntoLookaheadStack("AlterStatement", "src/main/congocc/nessie/nessie-cli.ccc", 317, 7);
        currentLookaheadProduction = "AlterNamespaceStatement";
        try {
            if (!check$AlterNamespaceStatement(true)) return false;
        } finally {
            popLookaheadStack();
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$AlterNamespaceStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:321:7
        if (!scanToken(NAMESPACE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:322:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:323:7
        // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:323:7
        pushOntoLookaheadStack("AlterNamespaceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 323, 7);
        currentLookaheadProduction = "ContentKey";
        try {
            if (!check$ContentKey(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:324:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:326:7
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$326$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:336:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:337:7
        Token token10 = currentLookaheadToken;
        boolean passedPredicate10 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$337$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token10;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate10;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:352:7
        Token token12 = currentLookaheadToken;
        boolean passedPredicate12 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$352$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token12;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate12;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$DropStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:366:7
        if (!scanToken(DROP)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:367:7
        Token token5 = currentLookaheadToken;
        int remainingLookahead5 = remainingLookahead;
        boolean hitFailure5 = hitFailure;
        boolean passedPredicate5 = passedPredicate;
        try {
            passedPredicate = false;
            if (!check$nessiecli_ccc$367$7(false)) {
                currentLookaheadToken = token5;
                remainingLookahead = remainingLookahead5;
                hitFailure = hitFailure5;
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                passedPredicate = false;
                if (!check$nessiecli_ccc$368$7(false)) {
                    currentLookaheadToken = token5;
                    remainingLookahead = remainingLookahead5;
                    hitFailure = hitFailure5;
                    return false;
                }
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$DropReferenceStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:372:7
        if (!scanToken(BRANCH, TAG)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:373:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:374:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:375:7
        Token token6 = currentLookaheadToken;
        boolean passedPredicate6 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$375$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token6;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate6;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:379:7
        // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:379:7
        pushOntoLookaheadStack("DropReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 379, 7);
        currentLookaheadProduction = "ExistingReference";
        try {
            if (!check$ExistingReference(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:380:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:383:7
        Token token10 = currentLookaheadToken;
        boolean passedPredicate10 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$383$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token10;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate10;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$DropContentStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:388:7
        if (!scanToken(VIEW, TABLE, NAMESPACE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:389:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:390:7
        // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:390:7
        pushOntoLookaheadStack("DropContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 390, 7);
        currentLookaheadProduction = "ContentKey";
        try {
            if (!check$ContentKey(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:391:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:393:7
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$393$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$UseReferenceStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:406:7
        if (!scanToken(USE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:407:9
        if (!scanToken(REFERENCE, BRANCH, TAG)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:408:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:410:7
        // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:410:7
        pushOntoLookaheadStack("UseReferenceStatement", "src/main/congocc/nessie/nessie-cli.ccc", 410, 7);
        currentLookaheadProduction = "ExistingReference";
        try {
            if (!check$ExistingReference(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:411:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:412:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:413:7
        Token token10 = currentLookaheadToken;
        boolean passedPredicate10 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$413$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token10;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate10;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:422:7
        Token token12 = currentLookaheadToken;
        boolean passedPredicate12 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$422$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token12;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate12;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ShowStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:427:7
        if (!scanToken(SHOW)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:428:7
        Token token5 = currentLookaheadToken;
        int remainingLookahead5 = remainingLookahead;
        boolean hitFailure5 = hitFailure;
        boolean passedPredicate5 = passedPredicate;
        try {
            passedPredicate = false;
            if (!check$nessiecli_ccc$428$7(false)) {
                currentLookaheadToken = token5;
                remainingLookahead = remainingLookahead5;
                hitFailure = hitFailure5;
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                passedPredicate = false;
                if (!check$nessiecli_ccc$429$7(false)) {
                    currentLookaheadToken = token5;
                    remainingLookahead = remainingLookahead5;
                    hitFailure = hitFailure5;
                    if (passedPredicate && !legacyGlitchyLookahead) return false;
                    passedPredicate = false;
                    if (!check$nessiecli_ccc$430$7(false)) {
                        currentLookaheadToken = token5;
                        remainingLookahead = remainingLookahead5;
                        hitFailure = hitFailure5;
                        return false;
                    }
                }
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ShowLogStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:435:7
        if (!scanToken(LOG)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:436:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:437:7
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$437$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:448:7
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$448$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:456:7
        Token token9 = currentLookaheadToken;
        boolean passedPredicate9 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$456$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token9;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate9;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:462:7
        Token token11 = currentLookaheadToken;
        boolean passedPredicate11 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$462$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token11;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate11;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ShowContentStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:467:7
        if (!scanToken(VIEW, TABLE, NAMESPACE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:468:5
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:469:5
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$469$7(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:480:5
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$480$7(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:487:5
        // NonTerminal ContentKey at src/main/congocc/nessie/nessie-cli.ccc:487:5
        pushOntoLookaheadStack("ShowContentStatement", "src/main/congocc/nessie/nessie-cli.ccc", 487, 5);
        currentLookaheadProduction = "ContentKey";
        try {
            if (!check$ContentKey(true)) return false;
        } finally {
            popLookaheadStack();
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ShowReferenceStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:491:7
        if (!scanToken(REFERENCE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:492:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:493:7
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$493$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:495:7
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$495$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:503:7
        Token token9 = currentLookaheadToken;
        boolean passedPredicate9 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$503$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token9;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate9;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ListStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:508:7
        if (!scanToken(LIST)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionChoice specified at src/main/congocc/nessie/nessie-cli.ccc:509:9
        Token token5 = currentLookaheadToken;
        int remainingLookahead5 = remainingLookahead;
        boolean hitFailure5 = hitFailure;
        boolean passedPredicate5 = passedPredicate;
        try {
            passedPredicate = false;
            if (!check$nessiecli_ccc$509$9(false)) {
                currentLookaheadToken = token5;
                remainingLookahead = remainingLookahead5;
                hitFailure = hitFailure5;
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                passedPredicate = false;
                if (!check$nessiecli_ccc$510$9(false)) {
                    currentLookaheadToken = token5;
                    remainingLookahead = remainingLookahead5;
                    hitFailure = hitFailure5;
                    return false;
                }
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ListContentsStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:515:7
        if (!scanToken(CONTENTS)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:516:5
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:517:5
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$517$7(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:528:5
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$528$7(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:536:5
        Token token9 = currentLookaheadToken;
        boolean passedPredicate9 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$536$7(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token9;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate9;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ListReferencesStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:552:7
        if (!scanToken(REFERENCES)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:553:5
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:554:5
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$554$7(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:570:5
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$570$7(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$MergeBranchStatement(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for Terminal specified at src/main/congocc/nessie/nessie-cli.ccc:575:7
        if (!scanToken(MERGE)) return false;
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:576:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:577:7
        Token token5 = currentLookaheadToken;
        boolean passedPredicate5 = passedPredicate;
        passedPredicate = false;
        try {
            if (!scanToken(DRY)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token5;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate5;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:580:7
        Token token7 = currentLookaheadToken;
        boolean passedPredicate7 = passedPredicate;
        passedPredicate = false;
        try {
            if (!scanToken(BRANCH, TAG)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token7;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate7;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:581:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for NonTerminal specified at src/main/congocc/nessie/nessie-cli.ccc:582:7
        // NonTerminal ExistingReference at src/main/congocc/nessie/nessie-cli.ccc:582:7
        pushOntoLookaheadStack("MergeBranchStatement", "src/main/congocc/nessie/nessie-cli.ccc", 582, 7);
        currentLookaheadProduction = "ExistingReference";
        try {
            if (!check$ExistingReference(true)) return false;
        } finally {
            popLookaheadStack();
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for CodeBlock specified at src/main/congocc/nessie/nessie-cli.ccc:583:7
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:586:7
        Token token12 = currentLookaheadToken;
        boolean passedPredicate12 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$586$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token12;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate12;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:594:7
        Token token14 = currentLookaheadToken;
        boolean passedPredicate14 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$594$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token14;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate14;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:601:7
        Token token16 = currentLookaheadToken;
        boolean passedPredicate16 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$601$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token16;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate16;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:606:7
        Token token18 = currentLookaheadToken;
        boolean passedPredicate18 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$606$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token18;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate18;
        }
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ZeroOrOne specified at src/main/congocc/nessie/nessie-cli.ccc:621:7
        Token token20 = currentLookaheadToken;
        boolean passedPredicate20 = passedPredicate;
        passedPredicate = false;
        try {
            if (!check$nessiecli_ccc$621$9(false)) {
                if (passedPredicate && !legacyGlitchyLookahead) return false;
                currentLookaheadToken = token20;
                hitFailure = false;
            }
        } finally {
            passedPredicate = passedPredicate20;
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$TimestampOrCommit(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:638:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, IDENTIFIER)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ContentKey(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:641:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, IDENTIFIER)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ReferenceName(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:644:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, IDENTIFIER)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$CatalogName(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:647:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, IDENTIFIER)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ExistingReference(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:650:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, IDENTIFIER)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$Uri(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:653:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(URI, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, URI)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$ParamKey(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:656:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, IDENTIFIER)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$Value(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:659:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(IDENTIFIER, STRING_LITERAL);
        try {
            if (!scanToken(STRING_LITERAL, IDENTIFIER)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    // BuildProductionLookaheadMethod macro
    private boolean check$PositiveInt(boolean scanToEnd) {
        if (hitFailure) return false;
        if (remainingLookahead <= 0) return true;
        // Lookahead Code for ExpansionWithParentheses specified at src/main/congocc/nessie/nessie-cli.ccc:662:7
        EnumSet previousActives3 = EnumSet.copyOf(token_source.activeTokenTypes);
        boolean somethingChanged4 = false;
        somethingChanged4 = activateTokenTypes(POSITIVE_INT);
        try {
            if (!scanToken(POSITIVE_INT)) return false;
        } finally {
            token_source.activeTokenTypes = previousActives3;
            if (somethingChanged4) {
                token_source.reset(currentLookaheadToken);
                nextTokenType = null;
            }
        }
        if (!scanToEnd && lookaheadStack.size() <= 1) {
            if (lookaheadRoutineNesting == 0) {
                remainingLookahead = 0;
            } else if (lookaheadStack.size() == 1) {
                passedPredicateThreshold = remainingLookahead;
            }
        }
        return true;
    }

    private ArrayList parsingStack = new ArrayList<>();
    private final ArrayList lookaheadStack = new ArrayList<>();

    private void pushOntoCallStack(String methodName, String fileName, int line, int column) {
        parsingStack.add(new NonTerminalCall("NessieCliParser", token_source, fileName, methodName, line, column));
    }

    private void popCallStack() {
        NonTerminalCall ntc = parsingStack.remove(parsingStack.size() - 1);
        this.currentlyParsedProduction = ntc.productionName;
    }

    private void restoreCallStack(int prevSize) {
        while (parsingStack.size() > prevSize) {
            popCallStack();
        }
    }

    private void pushOntoLookaheadStack(String methodName, String fileName, int line, int column) {
        lookaheadStack.add(new NonTerminalCall("NessieCliParser", token_source, fileName, methodName, line, column));
    }

    private void popLookaheadStack() {
        NonTerminalCall ntc = lookaheadStack.remove(lookaheadStack.size() - 1);
        this.currentLookaheadProduction = ntc.productionName;
    }

    void dumpLookaheadStack(PrintStream ps) {
        ListIterator it = lookaheadStack.listIterator(lookaheadStack.size());
        while (it.hasPrevious()) {
            it.previous().dump(ps);
        }
    }

    void dumpCallStack(PrintStream ps) {
        ListIterator it = parsingStack.listIterator(parsingStack.size());
        while (it.hasPrevious()) {
            it.previous().dump(ps);
        }
    }

    void dumpLookaheadCallStack(PrintStream ps) {
        ps.println("Current Parser Production is: " + currentlyParsedProduction);
        ps.println("Current Lookahead Production is: " + currentLookaheadProduction);
        ps.println("---Lookahead Stack---");
        dumpLookaheadStack(ps);
        ps.println("---Call Stack---");
        dumpCallStack(ps);
    }

    public boolean isParserTolerant() {
        return false;
    }

    public void setParserTolerant(boolean tolerantParsing) {
        if (tolerantParsing) {
            throw new UnsupportedOperationException("This parser was not built with that feature!");
        }
    }

    private Token consumeToken(TokenType expectedType) {
        Token nextToken = nextToken(lastConsumedToken);
        if (nextToken.getType() != expectedType) {
            nextToken = handleUnexpectedTokenType(expectedType, nextToken);
        }
        this.lastConsumedToken = nextToken;
        this.nextTokenType = null;
        if (buildTree && tokensAreNodes) {
            lastConsumedToken.open();
            pushNode(lastConsumedToken);
            lastConsumedToken.close();
        }
        return lastConsumedToken;
    }

    private Token handleUnexpectedTokenType(TokenType expectedType, Token nextToken) {
        throw new ParseException(nextToken, EnumSet.of(expectedType), parsingStack);
    }

    private boolean buildTree = true;
    private boolean tokensAreNodes = true;
    private boolean unparsedTokensAreNodes = false;

    public boolean isTreeBuildingEnabled() {
        return buildTree;
    }

    public void setUnparsedTokensAreNodes(boolean unparsedTokensAreNodes) {
        this.unparsedTokensAreNodes = unparsedTokensAreNodes;
    }

    public void setTokensAreNodes(boolean tokensAreNodes) {
        this.tokensAreNodes = tokensAreNodes;
    }

    NodeScope currentNodeScope = new NodeScope();

    /**
    * @return the root node of the AST. It only makes sense to call
    * this after a successful parse.
    */
    public Node rootNode() {
        return currentNodeScope.rootNode();
    }

    /**
    * push a node onto the top of the node stack
    * @param n the node to push
    */
    public void pushNode(Node n) {
        currentNodeScope.add(n);
    }

    /**
    * @return the node on the top of the stack, and remove it from the
    * stack.
    */
    public Node popNode() {
        return currentNodeScope.pop();
    }

    /**
    * @return the node currently on the top of the tree-building stack.
    */
    public Node peekNode() {
        return currentNodeScope.peek();
    }

    /**
    * Puts the node on the top of the stack. However, unlike pushNode()
    * it replaces the node that is currently on the top of the stack.
    * This is effectively equivalent to popNode() followed by pushNode(n)
    * @param n the node to poke
    */
    public void pokeNode(Node n) {
        currentNodeScope.poke(n);
    }

    /**
    * Replace the type of the last consumed token and poke it onto the
    * stack.
    */
    protected void replaceTokenType(TokenType tt) {
        lastConsumedToken = lastConsumedToken.replaceType(tt);
        pokeNode(lastConsumedToken);
    }

    /**
    * @return the number of Nodes on the tree-building stack in the current node
    * scope.
    */
    public int nodeArity() {
        return currentNodeScope.size();
    }

    private void clearNodeScope() {
        currentNodeScope.clear();
    }

    private void openNodeScope(Node n) {
        new NodeScope();
        if (n != null) {
            n.setTokenSource(lastConsumedToken.getTokenSource());
            // We set the begin/end offsets based on the ending location
            // of the last consumed token. So, we start with a Node
            // of length zero. Typically this is overridden in the
            // closeNodeScope() method, unless this node has no children
            n.setBeginOffset(lastConsumedToken.getEndOffset());
            n.setEndOffset(n.getBeginOffset());
            n.setTokenSource(this.token_source);
            n.open();
        }
    }

    /* A definite node is constructed from a specified number of
    * children.  That number of nodes are popped from the stack and
    * made the children of the definite node.  Then the definite node
    * is pushed on to the stack.
    * @param n is the node whose scope is being closed
    * @param num is the number of child nodes to pop as children
    * @return @{code true}
    */
    private boolean closeNodeScope(Node n, int num) {
        n.setBeginOffset(lastConsumedToken.getEndOffset());
        n.setEndOffset(lastConsumedToken.getEndOffset());
        currentNodeScope.close();
        ArrayList nodes = new ArrayList<>();
        for (int i = 0; i < num; i++) {
            nodes.add(popNode());
        }
        Collections.reverse(nodes);
        for (Node child : nodes) {
            if (child.getInputSource() == n.getInputSource()) {
                n.setBeginOffset(child.getBeginOffset());
                break;
            }
        }
        for (Node child : nodes) {
            if (unparsedTokensAreNodes && child instanceof Token) {
                Token tok = (Token) child;
                while (tok.previousCachedToken() != null && tok.previousCachedToken().isUnparsed()) {
                    tok = tok.previousCachedToken();
                }
                boolean locationSet = false;
                while (tok.isUnparsed()) {
                    n.add(tok);
                    if (!locationSet && tok.getInputSource() == n.getInputSource() && tok.getBeginOffset() < n.getBeginOffset()) {
                        n.setBeginOffset(tok.getBeginOffset());
                        locationSet = true;
                    }
                    tok = tok.nextCachedToken();
                }
            }
            if (child.getInputSource() == n.getInputSource()) {
                n.setEndOffset(child.getEndOffset());
            }
            n.add(child);
        }
        n.close();
        pushNode(n);
        return true;
    }

    /**
    * A conditional node is constructed if the condition is true.  All
    * the nodes that have been pushed since the node was opened are
    * made children of the conditional node, which is then pushed
    * on to the stack.  If the condition is false the node is not
    * constructed and they are left on the stack.
    */
    private boolean closeNodeScope(Node n, boolean condition) {
        if (n == null || !condition) {
            currentNodeScope.close();
            return false;
        }
        return closeNodeScope(n, nodeArity());
    }

    public boolean getBuildTree() {
        return buildTree;
    }

    public void setBuildTree(boolean buildTree) {
        this.buildTree = buildTree;
    }


    @SuppressWarnings("serial")
    class NodeScope extends ArrayList {
        NodeScope parentScope;

        NodeScope() {
            this.parentScope = NessieCliParser.this.currentNodeScope;
            NessieCliParser.this.currentNodeScope = this;
        }

        boolean isRootScope() {
            return parentScope == null;
        }

        Node rootNode() {
            NodeScope ns = this;
            while (ns.parentScope != null) {
                ns = ns.parentScope;
            }
            return ns.isEmpty() ? null : ns.get(0);
        }

        Node peek() {
            if (isEmpty()) {
                return parentScope == null ? null : parentScope.peek();
            }
            return get(size() - 1);
        }

        Node pop() {
            return isEmpty() ? parentScope.pop() : remove(size() - 1);
        }

        void poke(Node n) {
            if (isEmpty()) {
                parentScope.poke(n);
            } else {
                set(size() - 1, n);
            }
        }

        void close() {
            parentScope.addAll(this);
            NessieCliParser.this.currentNodeScope = parentScope;
        }

        int nestingLevel() {
            int result = 0;
            NodeScope parent = this;
            while (parent.parentScope != null) {
                result++;
                parent = parent.parentScope;
            }
            return result;
        }

        public NodeScope clone() {
            NodeScope clone = (NodeScope) super.clone();
            if (parentScope != null) {
                clone.parentScope = parentScope.clone();
            }
            return clone;
        }

    }

}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy