Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.projectnessie.nessie.cli.grammar.NessieCliLexer Maven / Gradle / Ivy
/* Generated by: CongoCC Parser Generator. NessieCliLexer.java */
package org.projectnessie.nessie.cli.grammar;
import org.projectnessie.nessie.cli.grammar.Token.TokenType;
import static org.projectnessie.nessie.cli.grammar.Token.TokenType.*;
import java.util.*;
public class NessieCliLexer extends TokenSource {
private static MatcherHook MATCHER_HOOK;
// this cannot be initialize here, since hook must be set afterwards
public enum LexicalState {
DEFAULT
}
LexicalState lexicalState = LexicalState.values()[0];
EnumSet activeTokenTypes = EnumSet.allOf(TokenType.class);
{
activeTokenTypes.remove(POSITIVE_INT);
activeTokenTypes.remove(STRING_LITERAL);
activeTokenTypes.remove(IDENTIFIER);
activeTokenTypes.remove(URI);
}
// Token types that are "regular" tokens that participate in parsing,
// i.e. declared as TOKEN
static final EnumSet regularTokens = EnumSet.of(EOF, USE, DROP, LIST, SHOW, HELP, EXIT, ALTER, MERGE, ASSIGN, CREATE, REVERT, CONNECT, SEMICOLON, EQUAL, AT, IF, IN, OF, ON, TO, AND, DRY, LOG, NOT, SET, FROM, INTO, VIEW, WITH, ALLOW, FORCE, LIMIT, STATE, TABLE, USING, COMMIT, EXISTS, FILTER, NORMAL, REMOVE, CONTENT, DELETES, LICENSE, BEHAVIOR, CONTENTS, STARTING, BEHAVIORS, NAMESPACE, TIMESTAMP, REFERENCE, REFERENCES, CONTAINING, TRUE, FALSE, BRANCH, TAG, STRING_LITERAL, IDENTIFIER, URI, POSITIVE_INT);
// Token types that do not participate in parsing
// i.e. declared as UNPARSED (or SPECIAL_TOKEN)
static final EnumSet unparsedTokens = EnumSet.of(SINGLE_LINE_DASH_COMMENT, SINGLE_LINE_COMMENT, MULTI_LINE_COMMENT);
// Tokens that are skipped, i.e. SKIP
static final EnumSet skippedTokens = EnumSet.of(WHITESPACE);
// Tokens that correspond to a MORE, i.e. that are pending
// additional input
static final EnumSet moreTokens = EnumSet.noneOf(TokenType.class);
public NessieCliLexer(CharSequence input) {
this("input", input);
}
/**
* @param inputSource just the name of the input source (typically the filename)
* that will be used in error messages and so on.
* @param input the input
*/
public NessieCliLexer(String inputSource, CharSequence input) {
this(inputSource, input, LexicalState.DEFAULT, 1, 1);
}
/**
* @param inputSource just the name of the input source (typically the filename) that
* will be used in error messages and so on.
* @param input the input
* @param lexicalState The starting lexical state, may be null to indicate the default
* starting state
* @param line The line number at which we are starting for the purposes of location/error messages. In most
* normal usage, this is 1.
* @param column number at which we are starting for the purposes of location/error messages. In most normal
* usages this is 1.
*/
public NessieCliLexer(String inputSource, CharSequence input, LexicalState lexState, int startingLine, int startingColumn) {
super(inputSource, input, startingLine, startingColumn, 1, true, false, false, "");
if (lexicalState != null) switchTo(lexState);
}
public Token getNextToken(Token tok) {
return getNextToken(tok, this.activeTokenTypes);
}
/**
* The public method for getting the next token, that is
* called by NessieCliParser.
* It checks whether we have already cached
* the token after this one. If not, it finally goes
* to the NFA machinery
*/
public Token getNextToken(Token tok, EnumSet activeTokenTypes) {
if (tok == null) {
tok = tokenizeAt(0, null, activeTokenTypes);
cacheToken(tok);
return tok;
}
Token cachedToken = tok.nextCachedToken();
// If the cached next token is not currently active, we
// throw it away and go back to the NessieCliLexer
if (cachedToken != null && activeTokenTypes != null && !activeTokenTypes.contains(cachedToken.getType())) {
reset(tok);
cachedToken = null;
}
if (cachedToken == null) {
Token token = tokenizeAt(tok.getEndOffset(), null, activeTokenTypes);
cacheToken(token);
return token;
}
return cachedToken;
}
static class MatchInfo {
TokenType matchedType;
int matchLength;
@Override
public int hashCode() {
return Objects.hash(matchLength, matchedType);
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
MatchInfo other = (MatchInfo) obj;
return matchLength == other.matchLength && matchedType == other.matchedType;
}
}
@FunctionalInterface
private interface MatcherHook {
MatchInfo apply(LexicalState lexicalState, CharSequence input, int position, EnumSet activeTokenTypes, NfaFunction[] nfaFunctions, BitSet currentStates, BitSet nextStates, MatchInfo matchInfo);
}
/**
* Core tokenization method. Note that this can be called from a static context.
* Hence the extra parameters that need to be passed in.
*/
static MatchInfo getMatchInfo(CharSequence input, int position, EnumSet activeTokenTypes, NfaFunction[] nfaFunctions, BitSet currentStates, BitSet nextStates, MatchInfo matchInfo) {
if (matchInfo == null) {
matchInfo = new MatchInfo();
}
if (position >= input.length()) {
matchInfo.matchedType = EOF;
matchInfo.matchLength = 0;
return matchInfo;
}
int start = position;
int matchLength = 0;
TokenType matchedType = TokenType.INVALID;
EnumSet alreadyMatchedTypes = EnumSet.noneOf(TokenType.class);
if (currentStates == null) currentStates = new BitSet(320);
else currentStates.clear();
if (nextStates == null) nextStates = new BitSet(320);
else nextStates.clear();
// the core NFA loop
do {
// Holder for the new type (if any) matched on this iteration
if (position > start) {
// What was nextStates on the last iteration
// is now the currentStates!
BitSet temp = currentStates;
currentStates = nextStates;
nextStates = temp;
nextStates.clear();
} else {
currentStates.set(0);
}
if (position >= input.length()) {
break;
}
int curChar = Character.codePointAt(input, position++);
if (curChar > 0xFFFF) position++;
int nextActive = currentStates.nextSetBit(0);
while (nextActive != -1) {
TokenType returnedType = nfaFunctions[nextActive].apply(curChar, nextStates, activeTokenTypes, alreadyMatchedTypes);
if (returnedType != null && (position - start > matchLength || returnedType.ordinal() < matchedType.ordinal())) {
matchedType = returnedType;
matchLength = position - start;
alreadyMatchedTypes.add(returnedType);
}
nextActive = currentStates.nextSetBit(nextActive + 1);
}
if (position >= input.length()) break;
}
while (!nextStates.isEmpty());
matchInfo.matchedType = matchedType;
matchInfo.matchLength = matchLength;
return matchInfo;
}
/**
* @param position The position at which to tokenize.
* @param lexicalState The lexical state in which to tokenize. If this is null, it is the instance variable #lexicalState
* @param activeTokenTypes The active token types. If this is null, they are all active.
* @return the Token at position
*/
final Token tokenizeAt(int position, LexicalState lexicalState, EnumSet activeTokenTypes) {
if (lexicalState == null) lexicalState = this.lexicalState;
int tokenBeginOffset = position;
boolean inMore = false;
int invalidRegionStart = -1;
Token matchedToken = null;
TokenType matchedType = null;
// The core tokenization loop
MatchInfo matchInfo = new MatchInfo();
BitSet currentStates = new BitSet(320);
BitSet nextStates = new BitSet(320);
while (matchedToken == null) {
if (!inMore) tokenBeginOffset = position;
if (MATCHER_HOOK != null) {
matchInfo = MATCHER_HOOK.apply(lexicalState, this, position, activeTokenTypes, nfaFunctions, currentStates, nextStates, matchInfo);
if (matchInfo == null) {
matchInfo = getMatchInfo(this, position, activeTokenTypes, nfaFunctions, currentStates, nextStates, matchInfo);
}
} else {
matchInfo = getMatchInfo(this, position, activeTokenTypes, nfaFunctions, currentStates, nextStates, matchInfo);
}
matchedType = matchInfo.matchedType;
inMore = moreTokens.contains(matchedType);
position += matchInfo.matchLength;
if (matchedType == TokenType.INVALID) {
if (invalidRegionStart == -1) {
invalidRegionStart = tokenBeginOffset;
}
int cp = Character.codePointAt(this, position);
++position;
if (cp > 0xFFFF) ++position;
continue;
}
if (invalidRegionStart != -1) {
return new InvalidToken(this, invalidRegionStart, tokenBeginOffset);
}
if (skippedTokens.contains(matchedType)) {
skipTokens(tokenBeginOffset, position);
} else if (regularTokens.contains(matchedType) || unparsedTokens.contains(matchedType)) {
matchedToken = Token.newToken(matchedType, this, tokenBeginOffset, position);
matchedToken.setUnparsed(!regularTokens.contains(matchedType));
}
}
return matchedToken;
}
/**
* Switch to specified lexical state.
* @param lexState the lexical state to switch to
* @return whether we switched (i.e. we weren't already in the desired lexical state)
*/
public boolean switchTo(LexicalState lexState) {
if (this.lexicalState != lexState) {
this.lexicalState = lexState;
return true;
}
return false;
}
// Reset the token source input
// to just after the Token passed in.
void reset(Token t, LexicalState state) {
uncacheTokens(t);
if (state != null) {
switchTo(state);
}
}
void reset(Token t) {
reset(t, null);
}
// NFA related code follows.
// The functional interface that represents
// the acceptance method of an NFA state
@FunctionalInterface
interface NfaFunction {
TokenType apply(int ch, BitSet bs, EnumSet validTypes, EnumSet alreadyMatchedTypes);
}
private static NfaFunction[] nfaFunctions;
// Initialize the various NFA method tables
static {
DEFAULT.NFA_FUNCTIONS_init();
}
//The Nitty-gritty of the NFA code follows.
/**
* Holder class for NFA code related to DEFAULT lexical state
*/
private static class DEFAULT {
private static TokenType getNfaIndex0(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if (ch == '"') {
if (validTypes == null || validTypes.contains(STRING_LITERAL)) {
nextStates.set(39);
}
} else if (ch == '\'') {
if (validTypes == null || validTypes.contains(STRING_LITERAL)) {
nextStates.set(40);
}
} else if (ch == '-') {
if (validTypes == null || validTypes.contains(SINGLE_LINE_DASH_COMMENT)) {
nextStates.set(2);
}
} else if (ch == '/') {
if (validTypes == null || validTypes.contains(SINGLE_LINE_COMMENT)) {
nextStates.set(8);
}
if (validTypes == null || validTypes.contains(MULTI_LINE_COMMENT)) {
nextStates.set(235);
}
} else if ((ch == 'A' || ch == 'a')) {
if (validTypes == null || validTypes.contains(AT)) {
nextStates.set(22);
}
if (validTypes == null || validTypes.contains(ASSIGN)) {
nextStates.set(147);
}
if (validTypes == null || validTypes.contains(AND)) {
nextStates.set(171);
}
if (validTypes == null || validTypes.contains(ALTER)) {
nextStates.set(230);
}
if (validTypes == null || validTypes.contains(ALLOW)) {
nextStates.set(239);
}
} else if ((ch == 'B' || ch == 'b')) {
if (validTypes == null || validTypes.contains(BRANCH)) {
nextStates.set(74);
}
if (validTypes == null || validTypes.contains(BEHAVIORS)) {
nextStates.set(173);
}
if (validTypes == null || validTypes.contains(BEHAVIOR)) {
nextStates.set(242);
}
} else if ((ch == 'C' || ch == 'c')) {
if (validTypes == null || validTypes.contains(CREATE)) {
nextStates.set(84);
}
if (validTypes == null || validTypes.contains(COMMIT)) {
nextStates.set(93);
}
if (validTypes == null || validTypes.contains(CONNECT)) {
nextStates.set(109);
}
if (validTypes == null || validTypes.contains(CONTENTS)) {
nextStates.set(114);
}
if (validTypes == null || validTypes.contains(CONTENT)) {
nextStates.set(128);
}
if (validTypes == null || validTypes.contains(CONTAINING)) {
nextStates.set(194);
}
} else if ((ch == 'D' || ch == 'd')) {
if (validTypes == null || validTypes.contains(DELETES)) {
nextStates.set(88);
}
if (validTypes == null || validTypes.contains(DROP)) {
nextStates.set(120);
}
if (validTypes == null || validTypes.contains(DRY)) {
nextStates.set(135);
}
} else if ((ch == 'E' || ch == 'e')) {
if (validTypes == null || validTypes.contains(EXIT)) {
nextStates.set(133);
}
if (validTypes == null || validTypes.contains(EXISTS)) {
nextStates.set(216);
}
} else if ((ch == 'F' || ch == 'f')) {
if (validTypes == null || validTypes.contains(FALSE)) {
nextStates.set(67);
}
if (validTypes == null || validTypes.contains(FILTER)) {
nextStates.set(70);
}
if (validTypes == null || validTypes.contains(FROM)) {
nextStates.set(124);
}
if (validTypes == null || validTypes.contains(FORCE)) {
nextStates.set(153);
}
} else if ((ch == 'H' || ch == 'h')) {
if (validTypes == null || validTypes.contains(URI)) {
nextStates.set(202);
}
if (validTypes == null || validTypes.contains(HELP)) {
nextStates.set(237);
}
} else if ((ch == 'I' || ch == 'i')) {
if (validTypes == null || validTypes.contains(INTO)) {
nextStates.set(136);
}
if (validTypes == null || validTypes.contains(IF)) {
nextStates.set(52);
}
if (validTypes == null || validTypes.contains(IN)) {
nextStates.set(58);
}
} else if ((ch == 'L' || ch == 'l')) {
if (validTypes == null || validTypes.contains(LICENSE)) {
nextStates.set(104);
}
if (validTypes == null || validTypes.contains(LIST)) {
nextStates.set(180);
}
if (validTypes == null || validTypes.contains(LIMIT)) {
nextStates.set(213);
}
if (validTypes == null || validTypes.contains(LOG)) {
nextStates.set(233);
}
} else if ((ch == 'M' || ch == 'm')) {
if (validTypes == null || validTypes.contains(MERGE)) {
nextStates.set(227);
}
} else if ((ch == 'N' || ch == 'n')) {
if (validTypes == null || validTypes.contains(NORMAL)) {
nextStates.set(143);
}
if (validTypes == null || validTypes.contains(NOT)) {
nextStates.set(159);
}
if (validTypes == null || validTypes.contains(NAMESPACE)) {
nextStates.set(164);
}
} else if ((ch == 'O' || ch == 'o')) {
if (validTypes == null || validTypes.contains(OF)) {
nextStates.set(25);
}
if (validTypes == null || validTypes.contains(ON)) {
nextStates.set(38);
}
} else if ((ch == 'R' || ch == 'r')) {
if (validTypes == null || validTypes.contains(REVERT)) {
nextStates.set(160);
}
if (validTypes == null || validTypes.contains(REMOVE)) {
nextStates.set(182);
}
if (validTypes == null || validTypes.contains(REFERENCES)) {
nextStates.set(186);
}
if (validTypes == null || validTypes.contains(REFERENCE)) {
nextStates.set(220);
}
} else if ((ch == 'S' || ch == 's')) {
if (validTypes == null || validTypes.contains(STARTING)) {
nextStates.set(78);
}
if (validTypes == null || validTypes.contains(SHOW)) {
nextStates.set(141);
}
if (validTypes == null || validTypes.contains(STATE)) {
nextStates.set(156);
}
if (validTypes == null || validTypes.contains(SET)) {
nextStates.set(209);
}
} else if ((ch == 'T' || ch == 't')) {
if (validTypes == null || validTypes.contains(TIMESTAMP)) {
nextStates.set(97);
}
if (validTypes == null || validTypes.contains(TRUE)) {
nextStates.set(126);
}
if (validTypes == null || validTypes.contains(TABLE)) {
nextStates.set(138);
}
if (validTypes == null || validTypes.contains(TO)) {
nextStates.set(51);
}
if (validTypes == null || validTypes.contains(TAG)) {
nextStates.set(234);
}
} else if ((ch == 'U' || ch == 'u')) {
if (validTypes == null || validTypes.contains(USE)) {
nextStates.set(172);
}
if (validTypes == null || validTypes.contains(USING)) {
nextStates.set(210);
}
} else if ((ch == 'V' || ch == 'v')) {
if (validTypes == null || validTypes.contains(VIEW)) {
nextStates.set(151);
}
} else if ((ch == 'W' || ch == 'w')) {
if (validTypes == null || validTypes.contains(WITH)) {
nextStates.set(122);
}
} else if (ch == '`') {
if (validTypes == null || validTypes.contains(STRING_LITERAL)) {
nextStates.set(32);
}
} else if (ch >= '1' && ch <= '9') {
if (validTypes == null || validTypes.contains(POSITIVE_INT)) {
nextStates.set(15);
type = POSITIVE_INT;
}
}
if ((ch >= '0' && ch <= '9' || (ch >= 'A' && ch <= 'Z' || ch >= 'a' && ch <= 'z'))) {
if (validTypes == null || validTypes.contains(IDENTIFIER)) {
nextStates.set(42);
type = IDENTIFIER;
}
} else if (ch == '\t') {
if (validTypes == null || validTypes.contains(WHITESPACE)) {
nextStates.set(35);
type = WHITESPACE;
}
} else if (ch == '\n') {
if (validTypes == null || validTypes.contains(WHITESPACE)) {
nextStates.set(35);
type = WHITESPACE;
}
} else if (ch == '\r') {
if (validTypes == null || validTypes.contains(WHITESPACE)) {
nextStates.set(35);
type = WHITESPACE;
}
} else if (ch == ' ') {
if (validTypes == null || validTypes.contains(WHITESPACE)) {
nextStates.set(35);
type = WHITESPACE;
}
} else if (ch == '=') {
if (validTypes == null || validTypes.contains(EQUAL)) {
type = EQUAL;
}
} else if (ch == ';') {
if (validTypes == null || validTypes.contains(SEMICOLON)) {
type = SEMICOLON;
}
}
return type;
}
private static TokenType getNfaIndex1(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return FALSE;
}
return null;
}
private static TokenType getNfaIndex2(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '-') {
nextStates.set(3);
return SINGLE_LINE_DASH_COMMENT;
}
return null;
}
private static TokenType getNfaIndex3(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch >= 0x0 && ch <= '\t' || ch >= 0xb)) {
nextStates.set(3);
return SINGLE_LINE_DASH_COMMENT;
}
return null;
}
private static TokenType getNfaIndex4(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'R' || ch == 'r')) {
return FILTER;
}
return null;
}
private static TokenType getNfaIndex5(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'H' || ch == 'h')) {
return BRANCH;
}
return null;
}
private static TokenType getNfaIndex6(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'G' || ch == 'g')) {
return STARTING;
}
return null;
}
private static TokenType getNfaIndex7(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return CREATE;
}
return null;
}
private static TokenType getNfaIndex8(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '/') {
nextStates.set(9);
return SINGLE_LINE_COMMENT;
}
return null;
}
private static TokenType getNfaIndex9(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch >= 0x0 && ch <= '\t' || ch >= 0xb)) {
nextStates.set(9);
return SINGLE_LINE_COMMENT;
}
return null;
}
private static TokenType getNfaIndex10(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
return DELETES;
}
return null;
}
private static TokenType getNfaIndex11(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return COMMIT;
}
return null;
}
private static TokenType getNfaIndex12(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'P' || ch == 'p')) {
return TIMESTAMP;
}
return null;
}
private static TokenType getNfaIndex13(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return LICENSE;
}
return null;
}
private static TokenType getNfaIndex14(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return CONNECT;
}
return null;
}
private static TokenType getNfaIndex15(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch >= '0' && ch <= '9') {
nextStates.set(15);
return POSITIVE_INT;
}
return null;
}
private static TokenType getNfaIndex16(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
return CONTENTS;
}
return null;
}
private static TokenType getNfaIndex17(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'P' || ch == 'p')) {
return DROP;
}
return null;
}
private static TokenType getNfaIndex18(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'H' || ch == 'h')) {
return WITH;
}
return null;
}
private static TokenType getNfaIndex19(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'M' || ch == 'm')) {
return FROM;
}
return null;
}
private static TokenType getNfaIndex20(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return TRUE;
}
return null;
}
private static TokenType getNfaIndex21(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return CONTENT;
}
return null;
}
private static TokenType getNfaIndex22(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return AT;
}
return null;
}
private static TokenType getNfaIndex23(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return EXIT;
}
return null;
}
private static TokenType getNfaIndex24(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'Y' || ch == 'y')) {
return DRY;
}
return null;
}
private static TokenType getNfaIndex25(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'F' || ch == 'f')) {
return OF;
}
return null;
}
private static TokenType getNfaIndex26(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'O' || ch == 'o')) {
return INTO;
}
return null;
}
private static TokenType getNfaIndex27(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return TABLE;
}
return null;
}
private static TokenType getNfaIndex28(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'W' || ch == 'w')) {
return SHOW;
}
return null;
}
private static TokenType getNfaIndex29(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'L' || ch == 'l')) {
return NORMAL;
}
return null;
}
private static TokenType getNfaIndex30(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
return ASSIGN;
}
return null;
}
private static TokenType getNfaIndex31(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'W' || ch == 'w')) {
return VIEW;
}
return null;
}
private static TokenType getNfaIndex32(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch >= 0x0 && ch <= '\t' || (ch == 0xb || ch == '\f' || (ch >= 0xe && ch <= '_' || ch >= 'a')))) {
nextStates.set(32);
} else if (ch == '`') {
type = STRING_LITERAL;
}
return type;
}
private static TokenType getNfaIndex33(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return FORCE;
}
return null;
}
private static TokenType getNfaIndex34(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return STATE;
}
return null;
}
private static TokenType getNfaIndex35(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if (ch == '\t') {
nextStates.set(35);
type = WHITESPACE;
} else if (ch == '\n') {
nextStates.set(35);
type = WHITESPACE;
} else if (ch == '\r') {
nextStates.set(35);
type = WHITESPACE;
} else if (ch == ' ') {
nextStates.set(35);
type = WHITESPACE;
}
return type;
}
private static TokenType getNfaIndex36(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return NOT;
}
return null;
}
private static TokenType getNfaIndex37(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return REVERT;
}
return null;
}
private static TokenType getNfaIndex38(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
return ON;
}
return null;
}
private static TokenType getNfaIndex39(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch >= 0x0 && ch <= '\t' || (ch == 0xb || ch == '\f' || (ch >= 0xe && ch <= '!' || (ch >= '#' && ch <= '[' || ch >= ']'))))) {
nextStates.set(39);
} else if (ch == '"') {
type = STRING_LITERAL;
}
return type;
}
private static TokenType getNfaIndex40(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch >= 0x0 && ch <= '\t' || (ch == 0xb || ch == '\f' || (ch >= 0xe && ch <= '_' || ch >= 'a')))) {
nextStates.set(40);
}
if (ch == '\'') {
type = STRING_LITERAL;
}
return type;
}
private static TokenType getNfaIndex41(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return NAMESPACE;
}
return null;
}
private static TokenType getNfaIndex42(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch >= '-' && ch <= ':' || (ch >= 'A' && ch <= 'Z' || (ch == '_' || ch >= 'a' && ch <= 'z')))) {
nextStates.set(42);
}
if ((ch == '-' || (ch >= '0' && ch <= '9' || (ch >= 'A' && ch <= 'Z' || (ch == '_' || ch >= 'a' && ch <= 'z'))))) {
type = IDENTIFIER;
}
return type;
}
private static TokenType getNfaIndex43(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'D' || ch == 'd')) {
return AND;
}
return null;
}
private static TokenType getNfaIndex44(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return USE;
}
return null;
}
private static TokenType getNfaIndex45(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
return BEHAVIORS;
}
return null;
}
private static TokenType getNfaIndex46(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return LIST;
}
return null;
}
private static TokenType getNfaIndex47(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return REMOVE;
}
return null;
}
private static TokenType getNfaIndex48(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
return REFERENCES;
}
return null;
}
private static TokenType getNfaIndex49(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'G' || ch == 'g')) {
return CONTAINING;
}
return null;
}
private static TokenType getNfaIndex50(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (checkIntervals(NFA_MOVES_297, ch)) {
nextStates.set(50);
return URI;
}
return null;
}
private static TokenType getNfaIndex51(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'O' || ch == 'o')) {
return TO;
}
return null;
}
private static TokenType getNfaIndex52(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'F' || ch == 'f')) {
return IF;
}
return null;
}
private static TokenType getNfaIndex53(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return SET;
}
return null;
}
private static TokenType getNfaIndex54(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'G' || ch == 'g')) {
return USING;
}
return null;
}
private static TokenType getNfaIndex55(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
return LIMIT;
}
return null;
}
private static TokenType getNfaIndex56(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
return EXISTS;
}
return null;
}
private static TokenType getNfaIndex57(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return REFERENCE;
}
return null;
}
private static TokenType getNfaIndex58(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
return IN;
}
return null;
}
private static TokenType getNfaIndex59(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
return MERGE;
}
return null;
}
private static TokenType getNfaIndex60(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'R' || ch == 'r')) {
return ALTER;
}
return null;
}
private static TokenType getNfaIndex61(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'G' || ch == 'g')) {
return LOG;
}
return null;
}
private static TokenType getNfaIndex62(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'G' || ch == 'g')) {
return TAG;
}
return null;
}
private static TokenType getNfaIndex63(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (alreadyMatchedTypes.contains(MULTI_LINE_COMMENT)) return null;
if (ch == '/') {
return MULTI_LINE_COMMENT;
}
return null;
}
private static TokenType getNfaIndex64(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'P' || ch == 'p')) {
return HELP;
}
return null;
}
private static TokenType getNfaIndex65(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'W' || ch == 'w')) {
return ALLOW;
}
return null;
}
private static TokenType getNfaIndex66(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'R' || ch == 'r')) {
return BEHAVIOR;
}
return null;
}
private static TokenType getNfaIndex67(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'A' || ch == 'a')) {
nextStates.set(68);
}
return null;
}
private static TokenType getNfaIndex68(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'L' || ch == 'l')) {
nextStates.set(69);
}
return null;
}
private static TokenType getNfaIndex69(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
nextStates.set(1);
}
return null;
}
private static TokenType getNfaIndex70(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'I' || ch == 'i')) {
nextStates.set(71);
}
return null;
}
private static TokenType getNfaIndex71(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'L' || ch == 'l')) {
nextStates.set(72);
}
return null;
}
private static TokenType getNfaIndex72(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
nextStates.set(73);
}
return null;
}
private static TokenType getNfaIndex73(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(4);
}
return null;
}
private static TokenType getNfaIndex74(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'R' || ch == 'r')) {
nextStates.set(75);
}
return null;
}
private static TokenType getNfaIndex75(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'A' || ch == 'a')) {
nextStates.set(76);
}
return null;
}
private static TokenType getNfaIndex76(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
nextStates.set(77);
}
return null;
}
private static TokenType getNfaIndex77(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'C' || ch == 'c')) {
nextStates.set(5);
}
return null;
}
private static TokenType getNfaIndex78(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
nextStates.set(79);
}
return null;
}
private static TokenType getNfaIndex79(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'A' || ch == 'a')) {
nextStates.set(80);
}
return null;
}
private static TokenType getNfaIndex80(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'R' || ch == 'r')) {
nextStates.set(81);
}
return null;
}
private static TokenType getNfaIndex81(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
nextStates.set(82);
}
return null;
}
private static TokenType getNfaIndex82(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'I' || ch == 'i')) {
nextStates.set(83);
}
return null;
}
private static TokenType getNfaIndex83(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
nextStates.set(6);
}
return null;
}
private static TokenType getNfaIndex84(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'R' || ch == 'r')) {
nextStates.set(85);
}
return null;
}
private static TokenType getNfaIndex85(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(86);
}
return null;
}
private static TokenType getNfaIndex86(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'A' || ch == 'a')) {
nextStates.set(87);
}
return null;
}
private static TokenType getNfaIndex87(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
nextStates.set(7);
}
return null;
}
private static TokenType getNfaIndex88(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(89);
}
return null;
}
private static TokenType getNfaIndex89(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'L' || ch == 'l')) {
nextStates.set(90);
}
return null;
}
private static TokenType getNfaIndex90(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(91);
}
return null;
}
private static TokenType getNfaIndex91(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
nextStates.set(92);
}
return null;
}
private static TokenType getNfaIndex92(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(10);
}
return null;
}
private static TokenType getNfaIndex93(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'O' || ch == 'o')) {
nextStates.set(94);
}
return null;
}
private static TokenType getNfaIndex94(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'M' || ch == 'm')) {
nextStates.set(95);
}
return null;
}
private static TokenType getNfaIndex95(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'M' || ch == 'm')) {
nextStates.set(96);
}
return null;
}
private static TokenType getNfaIndex96(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'I' || ch == 'i')) {
nextStates.set(11);
}
return null;
}
private static TokenType getNfaIndex97(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'I' || ch == 'i')) {
nextStates.set(98);
}
return null;
}
private static TokenType getNfaIndex98(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'M' || ch == 'm')) {
nextStates.set(99);
}
return null;
}
private static TokenType getNfaIndex99(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(100);
}
return null;
}
private static TokenType getNfaIndex100(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
nextStates.set(101);
}
return null;
}
private static TokenType getNfaIndex101(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
nextStates.set(102);
}
return null;
}
private static TokenType getNfaIndex102(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'A' || ch == 'a')) {
nextStates.set(103);
}
return null;
}
private static TokenType getNfaIndex103(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'M' || ch == 'm')) {
nextStates.set(12);
}
return null;
}
private static TokenType getNfaIndex104(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'I' || ch == 'i')) {
nextStates.set(105);
}
return null;
}
private static TokenType getNfaIndex105(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'C' || ch == 'c')) {
nextStates.set(106);
}
return null;
}
private static TokenType getNfaIndex106(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(107);
}
return null;
}
private static TokenType getNfaIndex107(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
nextStates.set(108);
}
return null;
}
private static TokenType getNfaIndex108(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'S' || ch == 's')) {
nextStates.set(13);
}
return null;
}
private static TokenType getNfaIndex109(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'O' || ch == 'o')) {
nextStates.set(110);
}
return null;
}
private static TokenType getNfaIndex110(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
nextStates.set(111);
}
return null;
}
private static TokenType getNfaIndex111(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
nextStates.set(112);
}
return null;
}
private static TokenType getNfaIndex112(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(113);
}
return null;
}
private static TokenType getNfaIndex113(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'C' || ch == 'c')) {
nextStates.set(14);
}
return null;
}
private static TokenType getNfaIndex114(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'O' || ch == 'o')) {
nextStates.set(115);
}
return null;
}
private static TokenType getNfaIndex115(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
nextStates.set(116);
}
return null;
}
private static TokenType getNfaIndex116(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'T' || ch == 't')) {
nextStates.set(117);
}
return null;
}
private static TokenType getNfaIndex117(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'E' || ch == 'e')) {
nextStates.set(118);
}
return null;
}
private static TokenType getNfaIndex118(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == 'N' || ch == 'n')) {
nextStates.set(119);
}
return null;
}
private static TokenType getNfaIndex119(int ch, BitSet nextStates, EnumSet