/* This file was generated by SableCC (http://www.sablecc.org/). */
package org.openflexo.antar.expr.parser.lexer;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.PushbackReader;
import org.openflexo.antar.expr.parser.node.EOF;
import org.openflexo.antar.expr.parser.node.TAcos;
import org.openflexo.antar.expr.parser.node.TAnd;
import org.openflexo.antar.expr.parser.node.TAnd2;
import org.openflexo.antar.expr.parser.node.TAsin;
import org.openflexo.antar.expr.parser.node.TAtan;
import org.openflexo.antar.expr.parser.node.TBlank;
import org.openflexo.antar.expr.parser.node.TCharsValue;
import org.openflexo.antar.expr.parser.node.TComma;
import org.openflexo.antar.expr.parser.node.TCos;
import org.openflexo.antar.expr.parser.node.TDecimalNumber;
import org.openflexo.antar.expr.parser.node.TDiv;
import org.openflexo.antar.expr.parser.node.TDot;
import org.openflexo.antar.expr.parser.node.TElseToken;
import org.openflexo.antar.expr.parser.node.TEq;
import org.openflexo.antar.expr.parser.node.TEq2;
import org.openflexo.antar.expr.parser.node.TExp;
import org.openflexo.antar.expr.parser.node.TFalse;
import org.openflexo.antar.expr.parser.node.TGt;
import org.openflexo.antar.expr.parser.node.TGte;
import org.openflexo.antar.expr.parser.node.TIdentifier;
import org.openflexo.antar.expr.parser.node.TIfToken;
import org.openflexo.antar.expr.parser.node.TLPar;
import org.openflexo.antar.expr.parser.node.TLog;
import org.openflexo.antar.expr.parser.node.TLt;
import org.openflexo.antar.expr.parser.node.TLte;
import org.openflexo.antar.expr.parser.node.TMinus;
import org.openflexo.antar.expr.parser.node.TMod;
import org.openflexo.antar.expr.parser.node.TMult;
import org.openflexo.antar.expr.parser.node.TNeq;
import org.openflexo.antar.expr.parser.node.TNot;
import org.openflexo.antar.expr.parser.node.TNull;
import org.openflexo.antar.expr.parser.node.TOr;
import org.openflexo.antar.expr.parser.node.TOr2;
import org.openflexo.antar.expr.parser.node.TPi;
import org.openflexo.antar.expr.parser.node.TPlus;
import org.openflexo.antar.expr.parser.node.TPower;
import org.openflexo.antar.expr.parser.node.TPreciseNumber;
import org.openflexo.antar.expr.parser.node.TRPar;
import org.openflexo.antar.expr.parser.node.TScientificNotationNumber;
import org.openflexo.antar.expr.parser.node.TSin;
import org.openflexo.antar.expr.parser.node.TSqrt;
import org.openflexo.antar.expr.parser.node.TStringValue;
import org.openflexo.antar.expr.parser.node.TTan;
import org.openflexo.antar.expr.parser.node.TTrue;
import org.openflexo.antar.expr.parser.node.Token;
@SuppressWarnings("nls")
public class Lexer {
protected Token token;
protected State state = State.INITIAL;
private PushbackReader in;
private int line;
private int pos;
private boolean cr;
private boolean eof;
private final StringBuffer text = new StringBuffer();
@SuppressWarnings("unused")
protected void filter() throws LexerException, IOException {
// Do nothing
}
public Lexer(@SuppressWarnings("hiding") PushbackReader in) {
this.in = in;
}
public Token peek() throws LexerException, IOException {
while (this.token == null) {
this.token = getToken();
filter();
}
return this.token;
}
public Token next() throws LexerException, IOException {
while (this.token == null) {
this.token = getToken();
filter();
}
Token result = this.token;
this.token = null;
return result;
}
protected Token getToken() throws IOException, LexerException {
int dfa_state = 0;
int start_pos = this.pos;
int start_line = this.line;
int accept_state = -1;
int accept_token = -1;
int accept_length = -1;
int accept_pos = -1;
int accept_line = -1;
@SuppressWarnings("hiding")
int[][][] gotoTable = Lexer.gotoTable[this.state.id()];
@SuppressWarnings("hiding")
int[] accept = Lexer.accept[this.state.id()];
this.text.setLength(0);
while (true) {
int c = getChar();
if (c != -1) {
switch (c) {
case 10:
if (this.cr) {
this.cr = false;
} else {
this.line++;
this.pos = 0;
}
break;
case 13:
this.line++;
this.pos = 0;
this.cr = true;
break;
default:
this.pos++;
this.cr = false;
break;
}
this.text.append((char) c);
do {
int oldState = dfa_state < -1 ? -2 - dfa_state : dfa_state;
dfa_state = -1;
int[][] tmp1 = gotoTable[oldState];
int low = 0;
int high = tmp1.length - 1;
while (low <= high) {
int middle = (low + high) / 2;
int[] tmp2 = tmp1[middle];
if (c < tmp2[0]) {
high = middle - 1;
} else if (c > tmp2[1]) {
low = middle + 1;
} else {
dfa_state = tmp2[2];
break;
}
}
} while (dfa_state < -1);
} else {
dfa_state = -1;
}
if (dfa_state >= 0) {
if (accept[dfa_state] != -1) {
accept_state = dfa_state;
accept_token = accept[dfa_state];
accept_length = this.text.length();
accept_pos = this.pos;
accept_line = this.line;
}
} else {
if (accept_state != -1) {
switch (accept_token) {
case 0: {
@SuppressWarnings("hiding")
Token token = new0(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 1: {
@SuppressWarnings("hiding")
Token token = new1(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 2: {
@SuppressWarnings("hiding")
Token token = new2(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 3: {
@SuppressWarnings("hiding")
Token token = new3(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 4: {
@SuppressWarnings("hiding")
Token token = new4(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 5: {
@SuppressWarnings("hiding")
Token token = new5(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 6: {
@SuppressWarnings("hiding")
Token token = new6(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 7: {
@SuppressWarnings("hiding")
Token token = new7(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 8: {
@SuppressWarnings("hiding")
Token token = new8(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 9: {
@SuppressWarnings("hiding")
Token token = new9(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 10: {
@SuppressWarnings("hiding")
Token token = new10(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 11: {
@SuppressWarnings("hiding")
Token token = new11(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 12: {
@SuppressWarnings("hiding")
Token token = new12(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 13: {
@SuppressWarnings("hiding")
Token token = new13(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 14: {
@SuppressWarnings("hiding")
Token token = new14(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 15: {
@SuppressWarnings("hiding")
Token token = new15(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 16: {
@SuppressWarnings("hiding")
Token token = new16(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 17: {
@SuppressWarnings("hiding")
Token token = new17(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 18: {
@SuppressWarnings("hiding")
Token token = new18(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 19: {
@SuppressWarnings("hiding")
Token token = new19(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 20: {
@SuppressWarnings("hiding")
Token token = new20(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 21: {
@SuppressWarnings("hiding")
Token token = new21(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 22: {
@SuppressWarnings("hiding")
Token token = new22(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 23: {
@SuppressWarnings("hiding")
Token token = new23(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 24: {
@SuppressWarnings("hiding")
Token token = new24(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 25: {
@SuppressWarnings("hiding")
Token token = new25(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 26: {
@SuppressWarnings("hiding")
Token token = new26(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 27: {
@SuppressWarnings("hiding")
Token token = new27(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 28: {
@SuppressWarnings("hiding")
Token token = new28(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 29: {
@SuppressWarnings("hiding")
Token token = new29(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 30: {
@SuppressWarnings("hiding")
Token token = new30(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 31: {
@SuppressWarnings("hiding")
Token token = new31(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 32: {
@SuppressWarnings("hiding")
Token token = new32(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 33: {
@SuppressWarnings("hiding")
Token token = new33(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 34: {
@SuppressWarnings("hiding")
Token token = new34(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 35: {
@SuppressWarnings("hiding")
Token token = new35(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 36: {
@SuppressWarnings("hiding")
Token token = new36(start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 37: {
@SuppressWarnings("hiding")
Token token = new37(getText(accept_length), start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 38: {
@SuppressWarnings("hiding")
Token token = new38(getText(accept_length), start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 39: {
@SuppressWarnings("hiding")
Token token = new39(getText(accept_length), start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 40: {
@SuppressWarnings("hiding")
Token token = new40(getText(accept_length), start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 41: {
@SuppressWarnings("hiding")
Token token = new41(getText(accept_length), start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 42: {
@SuppressWarnings("hiding")
Token token = new42(getText(accept_length), start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
case 43: {
@SuppressWarnings("hiding")
Token token = new43(getText(accept_length), start_line + 1, start_pos + 1);
pushBack(accept_length);
this.pos = accept_pos;
this.line = accept_line;
return token;
}
}
} else {
if (this.text.length() > 0) {
throw new LexerException("[" + (start_line + 1) + "," + (start_pos + 1) + "]" + " Unknown token: " + this.text);
}
@SuppressWarnings("hiding")
EOF token = new EOF(start_line + 1, start_pos + 1);
return token;
}
}
}
}
Token new0(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TPlus(line, pos);
}
Token new1(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TMinus(line, pos);
}
Token new2(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TMult(line, pos);
}
Token new3(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TDiv(line, pos);
}
Token new4(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TMod(line, pos);
}
Token new5(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TPower(line, pos);
}
Token new6(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TLt(line, pos);
}
Token new7(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TGt(line, pos);
}
Token new8(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TLte(line, pos);
}
Token new9(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TGte(line, pos);
}
Token new10(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TAnd(line, pos);
}
Token new11(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TAnd2(line, pos);
}
Token new12(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TOr(line, pos);
}
Token new13(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TOr2(line, pos);
}
Token new14(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TEq(line, pos);
}
Token new15(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TEq2(line, pos);
}
Token new16(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TNeq(line, pos);
}
Token new17(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TNot(line, pos);
}
Token new18(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TLPar(line, pos);
}
Token new19(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TRPar(line, pos);
}
Token new20(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TDot(line, pos);
}
Token new21(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TComma(line, pos);
}
Token new22(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TIfToken(line, pos);
}
Token new23(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TElseToken(line, pos);
}
Token new24(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TPi(line, pos);
}
Token new25(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TCos(line, pos);
}
Token new26(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TAcos(line, pos);
}
Token new27(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TSin(line, pos);
}
Token new28(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TAsin(line, pos);
}
Token new29(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TTan(line, pos);
}
Token new30(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TAtan(line, pos);
}
Token new31(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TLog(line, pos);
}
Token new32(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TExp(line, pos);
}
Token new33(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TSqrt(line, pos);
}
Token new34(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TTrue(line, pos);
}
Token new35(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TFalse(line, pos);
}
Token new36(@SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TNull(line, pos);
}
Token new37(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TDecimalNumber(text, line, pos);
}
Token new38(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TPreciseNumber(text, line, pos);
}
Token new39(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TScientificNotationNumber(text, line, pos);
}
Token new40(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TStringValue(text, line, pos);
}
Token new41(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TCharsValue(text, line, pos);
}
Token new42(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TIdentifier(text, line, pos);
}
Token new43(@SuppressWarnings("hiding") String text, @SuppressWarnings("hiding") int line, @SuppressWarnings("hiding") int pos) {
return new TBlank(text, line, pos);
}
private int getChar() throws IOException {
if (this.eof) {
return -1;
}
int result = this.in.read();
if (result == -1) {
this.eof = true;
}
return result;
}
private void pushBack(int acceptLength) throws IOException {
int length = this.text.length();
for (int i = length - 1; i >= acceptLength; i--) {
this.eof = false;
this.in.unread(this.text.charAt(i));
}
}
protected void unread(@SuppressWarnings("hiding") Token token) throws IOException {
@SuppressWarnings("hiding")
String text = token.getText();
int length = text.length();
for (int i = length - 1; i >= 0; i--) {
this.eof = false;
this.in.unread(text.charAt(i));
}
this.pos = token.getPos() - 1;
this.line = token.getLine() - 1;
}
private String getText(int acceptLength) {
StringBuffer s = new StringBuffer(acceptLength);
for (int i = 0; i < acceptLength; i++) {
s.append(this.text.charAt(i));
}
return s.toString();
}
private static int[][][][] gotoTable;
/* {
{ // INITIAL
{{10, 10, 1}, {13, 13, 2}, {32, 32, 3}, {33, 33, 4}, {34, 34, 5}, {37, 37, 6}, {38, 38, 7}, {39, 39, 8}, {40, 40, 9}, {41, 41, 10}, {42, 42, 11}, {43, 43, 12}, {44, 44, 13}, {45, 45, 14}, {46, 46, 15}, {47, 47, 16}, {48, 57, 17}, {58, 58, 18}, {60, 60, 19}, {61, 61, 20}, {62, 62, 21}, {63, 63, 22}, {65, 90, 23}, {94, 94, 24}, {95, 95, 25}, {97, 97, 26}, {98, 98, 27}, {99, 99, 28}, {100, 100, 27}, {101, 101, 29}, {102, 102, 30}, {103, 107, 27}, {108, 108, 31}, {109, 109, 27}, {110, 110, 32}, {111, 111, 27}, {112, 112, 33}, {113, 114, 27}, {115, 115, 34}, {116, 116, 35}, {117, 122, 27}, {124, 124, 36}, },
{{10, 32, -2}, },
{{10, 32, -2}, },
{{10, 32, -2}, },
{{61, 61, 37}, },
{{0, 33, 38}, {34, 34, 39}, {35, 65535, 38}, },
{},
{{38, 38, 40}, },
{{0, 38, 41}, {39, 39, 42}, {40, 65535, 41}, },
{},
{},
{},
{},
{},
{},
{},
{},
{{46, 46, 43}, {48, 57, 17}, },
{},
{{61, 61, 44}, },
{{61, 61, 45}, },
{{61, 61, 46}, },
{},
{{48, 57, 47}, {65, 90, 48}, {95, 95, 49}, {97, 122, 50}, },
{},
{{48, 122, -25}, },
{{48, 95, -25}, {97, 98, 50}, {99, 99, 51}, {100, 114, 50}, {115, 115, 52}, {116, 116, 53}, {117, 122, 50}, },
{{48, 122, -25}, },
{{48, 95, -25}, {97, 110, 50}, {111, 111, 54}, {112, 122, 50}, },
{{48, 95, -25}, {97, 119, 50}, {120, 120, 55}, {121, 122, 50}, },
{{48, 95, -25}, {97, 97, 56}, {98, 122, 50}, },
{{48, 110, -30}, {111, 111, 57}, {112, 122, 50}, },
{{48, 95, -25}, {97, 116, 50}, {117, 117, 58}, {118, 122, 50}, },
{{48, 95, -25}, {97, 104, 50}, {105, 105, 59}, {106, 122, 50}, },
{{48, 104, -35}, {105, 105, 60}, {106, 112, 50}, {113, 113, 61}, {114, 122, 50}, },
{{48, 95, -25}, {97, 97, 62}, {98, 113, 50}, {114, 114, 63}, {115, 122, 50}, },
{{124, 124, 64}, },
{},
{{0, 65535, -7}, },
{},
{},
{{0, 65535, -10}, },
{},
{{48, 57, 65}, },
{},
{},
{},
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 110, -30}, {111, 111, 66}, {112, 122, 50}, },
{{48, 104, -35}, {105, 105, 67}, {106, 122, 50}, },
{{48, 95, -25}, {97, 97, 68}, {98, 122, 50}, },
{{48, 95, -25}, {97, 114, 50}, {115, 115, 69}, {116, 122, 50}, },
{{48, 95, -25}, {97, 111, 50}, {112, 112, 70}, {113, 122, 50}, },
{{48, 95, -25}, {97, 107, 50}, {108, 108, 71}, {109, 122, 50}, },
{{48, 95, -25}, {97, 102, 50}, {103, 103, 72}, {104, 122, 50}, },
{{48, 107, -58}, {108, 108, 73}, {109, 122, 50}, },
{{48, 122, -25}, },
{{48, 95, -25}, {97, 109, 50}, {110, 110, 74}, {111, 122, 50}, },
{{48, 95, -25}, {97, 113, 50}, {114, 114, 75}, {115, 122, 50}, },
{{48, 109, -62}, {110, 110, 76}, {111, 122, 50}, },
{{48, 116, -34}, {117, 117, 77}, {118, 122, 50}, },
{},
{{48, 57, 65}, {69, 69, 78}, {101, 101, 79}, },
{{48, 114, -56}, {115, 115, 80}, {116, 122, 50}, },
{{48, 109, -62}, {110, 110, 81}, {111, 122, 50}, },
{{48, 109, -62}, {110, 110, 82}, {111, 122, 50}, },
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 114, -56}, {115, 115, 83}, {116, 122, 50}, },
{{48, 122, -25}, },
{{48, 107, -58}, {108, 108, 84}, {109, 122, 50}, },
{{48, 122, -25}, },
{{48, 95, -25}, {97, 115, 50}, {116, 116, 85}, {117, 122, 50}, },
{{48, 122, -25}, },
{{48, 95, -25}, {97, 100, 50}, {101, 101, 86}, {102, 122, 50}, },
{{45, 45, 87}, {48, 57, 88}, },
{{45, 45, 89}, {48, 57, 90}, },
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 100, -79}, {101, 101, 91}, {102, 122, 50}, },
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 122, -25}, },
{{48, 57, 92}, },
{{48, 57, 88}, },
{{48, 57, 93}, },
{{48, 57, 90}, },
{{48, 122, -25}, },
{{48, 57, 92}, },
{{48, 57, 93}, },
}
};*/
private static int[][] accept;
/* {
// INITIAL
{-1, 43, 43, 43, 17, -1, 4, 10, -1, 18, 19, 2, 0, 21, 1, 20, 3, 37, 23, 6, 14, 7, 22, 42, 5, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 12, 16, -1, 40, 11, -1, 41, -1, 8, 15, 9, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 24, 42, 42, 42, 42, 13, 38, 42, 42, 42, 25, 32, 42, 31, 42, 27, 42, 29, 42, -1, -1, 26, 28, 30, 42, 36, 33, 34, -1, 39, -1, 39, 35, 39, 39, },
};*/
public static class State {
public final static State INITIAL = new State(0);
private int id;
private State(@SuppressWarnings("hiding") int id) {
this.id = id;
}
public int id() {
return this.id;
}
}
static {
try {
DataInputStream s = new DataInputStream(new BufferedInputStream(Lexer.class.getResourceAsStream("lexer.dat")));
// read gotoTable
int length = s.readInt();
gotoTable = new int[length][][][];
for (int i = 0; i < gotoTable.length; i++) {
length = s.readInt();
gotoTable[i] = new int[length][][];
for (int j = 0; j < gotoTable[i].length; j++) {
length = s.readInt();
gotoTable[i][j] = new int[length][3];
for (int k = 0; k < gotoTable[i][j].length; k++) {
for (int l = 0; l < 3; l++) {
gotoTable[i][j][k][l] = s.readInt();
}
}
}
}
// read accept
length = s.readInt();
accept = new int[length][];
for (int i = 0; i < accept.length; i++) {
length = s.readInt();
accept[i] = new int[length];
for (int j = 0; j < accept[i].length; j++) {
accept[i][j] = s.readInt();
}
}
s.close();
} catch (Exception e) {
throw new RuntimeException("The file \"lexer.dat\" is either missing or corrupted.");
}
}
}