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.
ai.vespa.schemals.parser.rankingexpression.RankingExpressionParserLexer Maven / Gradle / Ivy
/* Generated by: CongoCC Parser Generator. RankingExpressionParserLexer.java */
package ai.vespa.schemals.parser.rankingexpression;
import ai.vespa.schemals.parser.rankingexpression.Token.TokenType;
import static ai.vespa.schemals.parser.rankingexpression.Token.TokenType.*;
import java.util.*;
public class RankingExpressionParserLexer extends TokenSource {
public static EnumSet getRegularTokens() {
return EnumSet.copyOf(regularTokens);
}
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 = null;
// Token types that are "regular" tokens that participate in parsing,
// i.e. declared as TOKEN
static final EnumSet regularTokens = EnumSet.of(EOF, LBRACE, RBRACE, LSQUARE, RSQUARE, LCURLY, RCURLY, ADD, SUB, DIV, MUL, DOT, MOD, POWOP, DOLLAR, COMMA, COLON, GREATEREQUAL, GREATER, LESSEQUAL, LESS, APPROX, NOTEQUAL, EQUAL, IF, IN, F, NOT, AND, OR, ABS, ACOS, ASIN, ATAN, CEIL, COS, COSH, ELU, EXP, FABS, FLOOR, ISNAN, LOG, LOG10, RELU, ROUND, SIGMOID, SIGN, SIN, SINH, SQUARE, SQRT, TAN, TANH, ERF, ATAN2, FMOD, LDEXP, POW, BIT, HAMMING, MAP, MAP_SUBSPACES, UNPACK_BITS, REDUCE, JOIN, MERGE, RENAME, CONCAT, TENSOR, RANGE, DIAG, RANDOM, L1_NORMALIZE, L2_NORMALIZE, EUCLIDEAN_DISTANCE, COSINE_SIMILARITY, MATMUL, SOFTMAX, XW_PLUS_B, ARGMAX, ARGMIN, CELL_CAST, EXPAND, AVG, COUNT, MAX, MEDIAN, MIN, PROD, SUM, TRUE, FALSE, INTEGER, FLOAT, STRING, IDENTIFIER);
// Token types that do not participate in parsing
// i.e. declared as UNPARSED (or SPECIAL_TOKEN)
static final EnumSet unparsedTokens = EnumSet.of(SINGLE_LINE_COMMENT);
// Tokens that are skipped, i.e. SKIP
static final EnumSet skippedTokens = EnumSet.of(_TOKEN_93);
// Tokens that correspond to a MORE, i.e. that are pending
// additional input
static final EnumSet moreTokens = EnumSet.noneOf(TokenType.class);
public RankingExpressionParserLexer(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 RankingExpressionParserLexer(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 RankingExpressionParserLexer(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 RankingExpressionParser.
* 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 RankingExpressionParserLexer
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(417);
else currentStates.clear();
if (nextStates == null) nextStates = new BitSet(417);
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(417);
BitSet nextStates = new BitSet(417);
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(NOTEQUAL)) {
nextStates.set(39);
}
} else if (ch == '"') {
if (validTypes == null || validTypes.contains(STRING)) {
nextStates.set(78);
}
} else if (ch == '&') {
if (validTypes == null || validTypes.contains(AND)) {
nextStates.set(1);
}
} else if (ch == '\'') {
if (validTypes == null || validTypes.contains(STRING)) {
nextStates.set(58);
}
} else if (ch == '0') {
if (validTypes == null || validTypes.contains(INTEGER)) {
nextStates.set(276);
}
} else if (ch == '<') {
if (validTypes == null || validTypes.contains(LESSEQUAL)) {
nextStates.set(43);
}
} else if (ch == '=') {
if (validTypes == null || validTypes.contains(EQUAL)) {
nextStates.set(40);
}
} else if (ch == '>') {
if (validTypes == null || validTypes.contains(GREATEREQUAL)) {
nextStates.set(67);
}
} else if (ch == 'a') {
if (validTypes == null || validTypes.contains(ABS)) {
nextStates.set(91);
}
if (validTypes == null || validTypes.contains(ARGMAX)) {
nextStates.set(116);
}
if (validTypes == null || validTypes.contains(AVG)) {
nextStates.set(140);
}
if (validTypes == null || validTypes.contains(ATAN)) {
nextStates.set(150);
}
if (validTypes == null || validTypes.contains(ATAN2)) {
nextStates.set(185);
}
if (validTypes == null || validTypes.contains(ACOS)) {
nextStates.set(201);
}
if (validTypes == null || validTypes.contains(ASIN)) {
nextStates.set(221);
}
if (validTypes == null || validTypes.contains(ARGMIN)) {
nextStates.set(225);
}
} else if (ch == 'b') {
if (validTypes == null || validTypes.contains(BIT)) {
nextStates.set(282);
}
} else if (ch == 'c') {
if (validTypes == null || validTypes.contains(CELL_CAST)) {
nextStates.set(133);
}
if (validTypes == null || validTypes.contains(COS)) {
nextStates.set(153);
}
if (validTypes == null || validTypes.contains(CEIL)) {
nextStates.set(157);
}
if (validTypes == null || validTypes.contains(COSH)) {
nextStates.set(163);
}
if (validTypes == null || validTypes.contains(CONCAT)) {
nextStates.set(167);
}
if (validTypes == null || validTypes.contains(COUNT)) {
nextStates.set(171);
}
if (validTypes == null || validTypes.contains(COSINE_SIMILARITY)) {
nextStates.set(258);
}
} else if (ch == 'd') {
if (validTypes == null || validTypes.contains(DIAG)) {
nextStates.set(256);
}
} else if (ch == 'e') {
if (validTypes == null || validTypes.contains(ERF)) {
nextStates.set(110);
}
if (validTypes == null || validTypes.contains(EXP)) {
nextStates.set(156);
}
if (validTypes == null || validTypes.contains(EXPAND)) {
nextStates.set(159);
}
if (validTypes == null || validTypes.contains(ELU)) {
nextStates.set(196);
}
if (validTypes == null || validTypes.contains(EUCLIDEAN_DISTANCE)) {
nextStates.set(238);
}
} else if (ch == 'f') {
if (validTypes == null || validTypes.contains(FMOD)) {
nextStates.set(86);
}
if (validTypes == null || validTypes.contains(FABS)) {
nextStates.set(120);
}
if (validTypes == null || validTypes.contains(FALSE)) {
nextStates.set(288);
}
if (validTypes == null || validTypes.contains(FLOOR)) {
nextStates.set(292);
}
} else if (ch == 'h') {
if (validTypes == null || validTypes.contains(HAMMING)) {
nextStates.set(105);
}
} else if (ch == 'i') {
if (validTypes == null || validTypes.contains(ISNAN)) {
nextStates.set(88);
}
if (validTypes == null || validTypes.contains(IF)) {
nextStates.set(23);
}
if (validTypes == null || validTypes.contains(IN)) {
nextStates.set(31);
}
} else if (ch == 'j') {
if (validTypes == null || validTypes.contains(JOIN)) {
nextStates.set(199);
}
} else if (ch == 'l') {
if (validTypes == null || validTypes.contains(LOG10)) {
nextStates.set(122);
}
if (validTypes == null || validTypes.contains(LDEXP)) {
nextStates.set(174);
}
if (validTypes == null || validTypes.contains(LOG)) {
nextStates.set(197);
}
if (validTypes == null || validTypes.contains(L1_NORMALIZE)) {
nextStates.set(210);
}
if (validTypes == null || validTypes.contains(L2_NORMALIZE)) {
nextStates.set(300);
}
} else if (ch == 'm') {
if (validTypes == null || validTypes.contains(MAP_SUBSPACES)) {
nextStates.set(94);
}
if (validTypes == null || validTypes.contains(MATMUL)) {
nextStates.set(146);
}
if (validTypes == null || validTypes.contains(MIN)) {
nextStates.set(220);
}
if (validTypes == null || validTypes.contains(MERGE)) {
nextStates.set(279);
}
if (validTypes == null || validTypes.contains(MEDIAN)) {
nextStates.set(283);
}
if (validTypes == null || validTypes.contains(MAX)) {
nextStates.set(291);
}
if (validTypes == null || validTypes.contains(MAP)) {
nextStates.set(295);
}
} else if (ch == 'p') {
if (validTypes == null || validTypes.contains(PROD)) {
nextStates.set(165);
}
if (validTypes == null || validTypes.contains(POW)) {
nextStates.set(198);
}
} else if (ch == 'r') {
if (validTypes == null || validTypes.contains(RENAME)) {
nextStates.set(181);
}
if (validTypes == null || validTypes.contains(ROUND)) {
nextStates.set(193);
}
if (validTypes == null || validTypes.contains(RANDOM)) {
nextStates.set(203);
}
if (validTypes == null || validTypes.contains(RELU)) {
nextStates.set(254);
}
if (validTypes == null || validTypes.contains(RANGE)) {
nextStates.set(273);
}
if (validTypes == null || validTypes.contains(REDUCE)) {
nextStates.set(296);
}
} else if (ch == 's') {
if (validTypes == null || validTypes.contains(SIGN)) {
nextStates.set(92);
}
if (validTypes == null || validTypes.contains(SOFTMAX)) {
nextStates.set(111);
}
if (validTypes == null || validTypes.contains(SUM)) {
nextStates.set(141);
}
if (validTypes == null || validTypes.contains(SIN)) {
nextStates.set(152);
}
if (validTypes == null || validTypes.contains(SQUARE)) {
nextStates.set(177);
}
if (validTypes == null || validTypes.contains(SIGMOID)) {
nextStates.set(188);
}
if (validTypes == null || validTypes.contains(SINH)) {
nextStates.set(208);
}
if (validTypes == null || validTypes.contains(SQRT)) {
nextStates.set(277);
}
} else if (ch == 't') {
if (validTypes == null || validTypes.contains(TAN)) {
nextStates.set(132);
}
if (validTypes == null || validTypes.contains(TENSOR)) {
nextStates.set(142);
}
if (validTypes == null || validTypes.contains(TANH)) {
nextStates.set(154);
}
if (validTypes == null || validTypes.contains(TRUE)) {
nextStates.set(223);
}
} else if (ch == 'u') {
if (validTypes == null || validTypes.contains(UNPACK_BITS)) {
nextStates.set(229);
}
} else if (ch == 'x') {
if (validTypes == null || validTypes.contains(XW_PLUS_B)) {
nextStates.set(125);
}
} else if (ch == '|') {
if (validTypes == null || validTypes.contains(OR)) {
nextStates.set(82);
}
} else if (ch == '~') {
if (validTypes == null || validTypes.contains(APPROX)) {
nextStates.set(33);
}
} else if (ch == '#') {
if (validTypes == null || validTypes.contains(SINGLE_LINE_COMMENT)) {
nextStates.set(49);
type = SINGLE_LINE_COMMENT;
}
}
if ((ch >= '0' && ch <= '9') || ((ch >= '@' && ch <= 'Z') || ((ch == '_') || (ch >= 'a' && ch <= 'z')))) {
if (validTypes == null || validTypes.contains(IDENTIFIER)) {
nextStates.set(41);
type = IDENTIFIER;
}
}
if (ch >= '0' && ch <= '9') {
if (validTypes == null || validTypes.contains(FLOAT)) {
nextStates.set(6);
type = FLOAT;
}
}
if (ch == '0') {
if (validTypes == null || validTypes.contains(INTEGER)) {
nextStates.set(24);
type = INTEGER;
}
} else if (ch >= '1' && ch <= '9') {
if (validTypes == null || validTypes.contains(INTEGER)) {
nextStates.set(55);
type = INTEGER;
}
} else if ((ch == '\t' || ch == '\n') || ((ch == '\r') || (ch == ' '))) {
if (validTypes == null || validTypes.contains(_TOKEN_93)) {
type = _TOKEN_93;
}
} else if (ch == '!') {
if (validTypes == null || validTypes.contains(NOT)) {
type = NOT;
}
} else if (ch == 'f') {
if (validTypes == null || validTypes.contains(F)) {
type = F;
}
} else if (ch == '<') {
if (validTypes == null || validTypes.contains(LESS)) {
type = LESS;
}
} else if (ch == '>') {
if (validTypes == null || validTypes.contains(GREATER)) {
type = GREATER;
}
} else if (ch == ':') {
if (validTypes == null || validTypes.contains(COLON)) {
type = COLON;
}
} else if (ch == ',') {
if (validTypes == null || validTypes.contains(COMMA)) {
type = COMMA;
}
} else if (ch == '$') {
if (validTypes == null || validTypes.contains(DOLLAR)) {
type = DOLLAR;
}
} else if (ch == '^') {
if (validTypes == null || validTypes.contains(POWOP)) {
type = POWOP;
}
} else if (ch == '%') {
if (validTypes == null || validTypes.contains(MOD)) {
type = MOD;
}
} else if (ch == '.') {
if (validTypes == null || validTypes.contains(DOT)) {
type = DOT;
}
} else if (ch == '*') {
if (validTypes == null || validTypes.contains(MUL)) {
type = MUL;
}
} else if (ch == '/') {
if (validTypes == null || validTypes.contains(DIV)) {
type = DIV;
}
} else if (ch == '-') {
if (validTypes == null || validTypes.contains(SUB)) {
type = SUB;
}
} else if (ch == '+') {
if (validTypes == null || validTypes.contains(ADD)) {
type = ADD;
}
} else if (ch == '}') {
if (validTypes == null || validTypes.contains(RCURLY)) {
type = RCURLY;
}
} else if (ch == '{') {
if (validTypes == null || validTypes.contains(LCURLY)) {
type = LCURLY;
}
} else if (ch == ']') {
if (validTypes == null || validTypes.contains(RSQUARE)) {
type = RSQUARE;
}
} else if (ch == '[') {
if (validTypes == null || validTypes.contains(LSQUARE)) {
type = LSQUARE;
}
} else if (ch == ')') {
if (validTypes == null || validTypes.contains(RBRACE)) {
type = RBRACE;
}
} else if (ch == '(') {
if (validTypes == null || validTypes.contains(LBRACE)) {
type = LBRACE;
}
}
return type;
}
private static TokenType getNfaIndex1(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '&') {
return AND;
}
return null;
}
private static TokenType getNfaIndex2(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'd') {
return FMOD;
}
return null;
}
private static TokenType getNfaIndex3(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return ISNAN;
}
return null;
}
private static TokenType getNfaIndex4(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
return ABS;
}
return null;
}
private static TokenType getNfaIndex5(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return SIGN;
}
return null;
}
private static TokenType getNfaIndex6(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch == 'E') || (ch == 'e')) {
nextStates.set(7);
} else if (ch == '.') {
nextStates.set(10);
type = FLOAT;
} else if (ch >= '0' && ch <= '9') {
nextStates.set(6);
type = FLOAT;
} else if ((ch == 'D') || ((ch == 'F') || ((ch == 'd') || (ch == 'f')))) {
type = FLOAT;
}
return type;
}
private static TokenType getNfaIndex7(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch == '+') || (ch == '-')) {
nextStates.set(8);
} else if (ch >= '0' && ch <= '9') {
nextStates.set(9);
type = FLOAT;
}
return type;
}
private static TokenType getNfaIndex8(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch >= '0' && ch <= '9') {
nextStates.set(9);
return FLOAT;
}
return null;
}
private static TokenType getNfaIndex9(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if (ch >= '0' && ch <= '9') {
nextStates.set(9);
type = FLOAT;
} else if ((ch == 'D') || ((ch == 'F') || ((ch == 'd') || (ch == 'f')))) {
type = FLOAT;
}
return type;
}
private static TokenType getNfaIndex10(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch == 'E') || (ch == 'e')) {
nextStates.set(7);
} else if (ch >= '0' && ch <= '9') {
nextStates.set(10);
type = FLOAT;
} else if ((ch == 'D') || ((ch == 'F') || ((ch == 'd') || (ch == 'f')))) {
type = FLOAT;
}
return type;
}
private static TokenType getNfaIndex11(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
return MAP_SUBSPACES;
}
return null;
}
private static TokenType getNfaIndex12(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'g') {
return HAMMING;
}
return null;
}
private static TokenType getNfaIndex13(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'f') {
return ERF;
}
return null;
}
private static TokenType getNfaIndex14(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'x') {
return SOFTMAX;
}
return null;
}
private static TokenType getNfaIndex15(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'x') {
return ARGMAX;
}
return null;
}
private static TokenType getNfaIndex16(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
return FABS;
}
return null;
}
private static TokenType getNfaIndex17(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '0') {
return LOG10;
}
return null;
}
private static TokenType getNfaIndex18(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'b') {
return XW_PLUS_B;
}
return null;
}
private static TokenType getNfaIndex19(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return TAN;
}
return null;
}
private static TokenType getNfaIndex20(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 't') {
return CELL_CAST;
}
return null;
}
private static TokenType getNfaIndex21(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'g') {
return AVG;
}
return null;
}
private static TokenType getNfaIndex22(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'm') {
return SUM;
}
return null;
}
private static TokenType getNfaIndex23(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'f') {
return IF;
}
return null;
}
private static TokenType getNfaIndex24(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if (ch >= '0' && ch <= '7') {
nextStates.set(24);
type = INTEGER;
} else if ((ch == 'L') || (ch == 'l')) {
type = INTEGER;
}
return type;
}
private static TokenType getNfaIndex25(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'r') {
return TENSOR;
}
return null;
}
private static TokenType getNfaIndex26(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'l') {
return MATMUL;
}
return null;
}
private static TokenType getNfaIndex27(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return ATAN;
}
return null;
}
private static TokenType getNfaIndex28(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return SIN;
}
return null;
}
private static TokenType getNfaIndex29(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
return COS;
}
return null;
}
private static TokenType getNfaIndex30(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'h') {
return TANH;
}
return null;
}
private static TokenType getNfaIndex31(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return IN;
}
return null;
}
private static TokenType getNfaIndex32(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'p') {
return EXP;
}
return null;
}
private static TokenType getNfaIndex33(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '=') {
return APPROX;
}
return null;
}
private static TokenType getNfaIndex34(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'l') {
return CEIL;
}
return null;
}
private static TokenType getNfaIndex35(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'd') {
return EXPAND;
}
return null;
}
private static TokenType getNfaIndex36(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'h') {
return COSH;
}
return null;
}
private static TokenType getNfaIndex37(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'd') {
return PROD;
}
return null;
}
private static TokenType getNfaIndex38(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 't') {
return CONCAT;
}
return null;
}
private static TokenType getNfaIndex39(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '=') {
return NOTEQUAL;
}
return null;
}
private static TokenType getNfaIndex40(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '=') {
return EQUAL;
}
return null;
}
private static TokenType getNfaIndex41(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch == '$') || ((ch >= '0' && ch <= '9') || ((ch >= '@' && ch <= 'Z') || ((ch == '_') || (ch >= 'a' && ch <= 'z'))))) {
nextStates.set(41);
return IDENTIFIER;
}
return null;
}
private static TokenType getNfaIndex42(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 't') {
return COUNT;
}
return null;
}
private static TokenType getNfaIndex43(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '=') {
return LESSEQUAL;
}
return null;
}
private static TokenType getNfaIndex44(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'p') {
return LDEXP;
}
return null;
}
private static TokenType getNfaIndex45(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return SQUARE;
}
return null;
}
private static TokenType getNfaIndex46(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return RENAME;
}
return null;
}
private static TokenType getNfaIndex47(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '2') {
return ATAN2;
}
return null;
}
private static TokenType getNfaIndex48(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'd') {
return SIGMOID;
}
return null;
}
private static TokenType getNfaIndex49(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch >= 0x0 && ch <= '\t') || ((ch == 0xb || ch == '\f') || (ch >= 0xe))) {
nextStates.set(49);
return SINGLE_LINE_COMMENT;
}
return null;
}
private static TokenType getNfaIndex50(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'd') {
return ROUND;
}
return null;
}
private static TokenType getNfaIndex51(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'u') {
return ELU;
}
return null;
}
private static TokenType getNfaIndex52(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'g') {
return LOG;
}
return null;
}
private static TokenType getNfaIndex53(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'w') {
return POW;
}
return null;
}
private static TokenType getNfaIndex54(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return JOIN;
}
return null;
}
private static TokenType getNfaIndex55(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if (ch >= '0' && ch <= '9') {
nextStates.set(55);
type = INTEGER;
} else if ((ch == 'L') || (ch == 'l')) {
type = INTEGER;
}
return type;
}
private static TokenType getNfaIndex56(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
return ACOS;
}
return null;
}
private static TokenType getNfaIndex57(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'm') {
return RANDOM;
}
return null;
}
private static TokenType getNfaIndex58(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch >= 0x0 && ch <= '&') || (ch >= '(')) {
nextStates.set(58);
}
if (ch == '\\') {
nextStates.set(207);
} else if (ch == '\'') {
type = STRING;
}
return type;
}
private static TokenType getNfaIndex59(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'h') {
return SINH;
}
return null;
}
private static TokenType getNfaIndex60(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return L1_NORMALIZE;
}
return null;
}
private static TokenType getNfaIndex61(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return MIN;
}
return null;
}
private static TokenType getNfaIndex62(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return ASIN;
}
return null;
}
private static TokenType getNfaIndex63(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return TRUE;
}
return null;
}
private static TokenType getNfaIndex64(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return ARGMIN;
}
return null;
}
private static TokenType getNfaIndex65(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
return UNPACK_BITS;
}
return null;
}
private static TokenType getNfaIndex66(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return EUCLIDEAN_DISTANCE;
}
return null;
}
private static TokenType getNfaIndex67(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '=') {
return GREATEREQUAL;
}
return null;
}
private static TokenType getNfaIndex68(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'u') {
return RELU;
}
return null;
}
private static TokenType getNfaIndex69(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'g') {
return DIAG;
}
return null;
}
private static TokenType getNfaIndex70(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'y') {
return COSINE_SIMILARITY;
}
return null;
}
private static TokenType getNfaIndex71(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return RANGE;
}
return null;
}
private static TokenType getNfaIndex72(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if ((ch >= '0' && ch <= '9') || ((ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f'))) {
nextStates.set(73);
return INTEGER;
}
return null;
}
private static TokenType getNfaIndex73(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch >= '0' && ch <= '9') || ((ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f'))) {
nextStates.set(73);
type = INTEGER;
} else if ((ch == 'L') || (ch == 'l')) {
type = INTEGER;
}
return type;
}
private static TokenType getNfaIndex74(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 't') {
return SQRT;
}
return null;
}
private static TokenType getNfaIndex75(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return MERGE;
}
return null;
}
private static TokenType getNfaIndex76(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 't') {
return BIT;
}
return null;
}
private static TokenType getNfaIndex77(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
return MEDIAN;
}
return null;
}
private static TokenType getNfaIndex78(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
TokenType type = null;
if ((ch >= 0x0 && ch <= '!') || (ch >= '#')) {
nextStates.set(78);
}
if (ch == '\\') {
nextStates.set(287);
} else if (ch == '"') {
type = STRING;
}
return type;
}
private static TokenType getNfaIndex79(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return FALSE;
}
return null;
}
private static TokenType getNfaIndex80(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'x') {
return MAX;
}
return null;
}
private static TokenType getNfaIndex81(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'r') {
return FLOOR;
}
return null;
}
private static TokenType getNfaIndex82(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '|') {
return OR;
}
return null;
}
private static TokenType getNfaIndex83(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'p') {
return MAP;
}
return null;
}
private static TokenType getNfaIndex84(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return REDUCE;
}
return null;
}
private static TokenType getNfaIndex85(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
return L2_NORMALIZE;
}
return null;
}
private static TokenType getNfaIndex86(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'm') {
nextStates.set(87);
}
return null;
}
private static TokenType getNfaIndex87(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'o') {
nextStates.set(2);
}
return null;
}
private static TokenType getNfaIndex88(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
nextStates.set(89);
}
return null;
}
private static TokenType getNfaIndex89(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'N') {
nextStates.set(90);
}
return null;
}
private static TokenType getNfaIndex90(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'a') {
nextStates.set(3);
}
return null;
}
private static TokenType getNfaIndex91(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'b') {
nextStates.set(4);
}
return null;
}
private static TokenType getNfaIndex92(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'i') {
nextStates.set(93);
}
return null;
}
private static TokenType getNfaIndex93(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'g') {
nextStates.set(5);
}
return null;
}
private static TokenType getNfaIndex94(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'a') {
nextStates.set(95);
}
return null;
}
private static TokenType getNfaIndex95(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'p') {
nextStates.set(96);
}
return null;
}
private static TokenType getNfaIndex96(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == '_') {
nextStates.set(97);
}
return null;
}
private static TokenType getNfaIndex97(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
nextStates.set(98);
}
return null;
}
private static TokenType getNfaIndex98(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'u') {
nextStates.set(99);
}
return null;
}
private static TokenType getNfaIndex99(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'b') {
nextStates.set(100);
}
return null;
}
private static TokenType getNfaIndex100(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 's') {
nextStates.set(101);
}
return null;
}
private static TokenType getNfaIndex101(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'p') {
nextStates.set(102);
}
return null;
}
private static TokenType getNfaIndex102(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'a') {
nextStates.set(103);
}
return null;
}
private static TokenType getNfaIndex103(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'c') {
nextStates.set(104);
}
return null;
}
private static TokenType getNfaIndex104(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'e') {
nextStates.set(11);
}
return null;
}
private static TokenType getNfaIndex105(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'a') {
nextStates.set(106);
}
return null;
}
private static TokenType getNfaIndex106(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'm') {
nextStates.set(107);
}
return null;
}
private static TokenType getNfaIndex107(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'm') {
nextStates.set(108);
}
return null;
}
private static TokenType getNfaIndex108(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'i') {
nextStates.set(109);
}
return null;
}
private static TokenType getNfaIndex109(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'n') {
nextStates.set(12);
}
return null;
}
private static TokenType getNfaIndex110(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'r') {
nextStates.set(13);
}
return null;
}
private static TokenType getNfaIndex111(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'o') {
nextStates.set(112);
}
return null;
}
private static TokenType getNfaIndex112(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'f') {
nextStates.set(113);
}
return null;
}
private static TokenType getNfaIndex113(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 't') {
nextStates.set(114);
}
return null;
}
private static TokenType getNfaIndex114(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'm') {
nextStates.set(115);
}
return null;
}
private static TokenType getNfaIndex115(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'a') {
nextStates.set(14);
}
return null;
}
private static TokenType getNfaIndex116(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'r') {
nextStates.set(117);
}
return null;
}
private static TokenType getNfaIndex117(int ch, BitSet nextStates, EnumSet validTypes, EnumSet alreadyMatchedTypes) {
if (ch == 'g') {
nextStates.set(118);
}
return null;
}
private static TokenType getNfaIndex118(int ch, BitSet nextStates, EnumSet validTypes, EnumSet