0001: // $ANTLR 2.7.2a2 (20020112-1): "sql.g" -> "SQLLexer.java"$
0002:
0003: package com.quadcap.sql;
0004:
0005: import java.io.InputStream;
0006: import antlr.TokenStreamException;
0007: import antlr.TokenStreamIOException;
0008: import antlr.TokenStreamRecognitionException;
0009: import antlr.CharStreamException;
0010: import antlr.CharStreamIOException;
0011: import antlr.ANTLRException;
0012: import java.io.Reader;
0013: import java.util.Hashtable;
0014: import antlr.CharScanner;
0015: import antlr.InputBuffer;
0016: import antlr.ByteBuffer;
0017: import antlr.CharBuffer;
0018: import antlr.Token;
0019: import antlr.CommonToken;
0020: import antlr.RecognitionException;
0021: import antlr.NoViableAltForCharException;
0022: import antlr.MismatchedCharException;
0023: import antlr.TokenStream;
0024: import antlr.ANTLRHashString;
0025: import antlr.LexerSharedInputState;
0026: import antlr.collections.impl.BitSet;
0027: import antlr.SemanticException;
0028:
0029: public class SQLLexer extends antlr.CharScanner implements
0030: SQLTokenTypes, TokenStream {
0031: public SQLLexer(InputStream in) {
0032: this (new ByteBuffer(in));
0033: }
0034:
0035: public SQLLexer(Reader in) {
0036: this (new CharBuffer(in));
0037: }
0038:
0039: public SQLLexer(InputBuffer ib) {
0040: this (new LexerSharedInputState(ib));
0041: }
0042:
0043: public SQLLexer(LexerSharedInputState state) {
0044: super (state);
0045: caseSensitiveLiterals = false;
0046: setCaseSensitive(true);
0047: literals = new Hashtable();
0048: literals.put(new ANTLRHashString("local", this ),
0049: new Integer(46));
0050: literals.put(new ANTLRHashString("sql_tsi_month", this ),
0051: new Integer(154));
0052: literals
0053: .put(new ANTLRHashString("blob", this ), new Integer(72));
0054: literals.put(new ANTLRHashString("action", this ), new Integer(
0055: 63));
0056: literals.put(new ANTLRHashString("public", this ), new Integer(
0057: 48));
0058: literals.put(new ANTLRHashString("smallint", this ),
0059: new Integer(81));
0060: literals.put(new ANTLRHashString("between", this ), new Integer(
0061: 116));
0062: literals
0063: .put(new ANTLRHashString("time", this ), new Integer(93));
0064: literals.put(new ANTLRHashString("case", this ),
0065: new Integer(129));
0066: literals.put(new ANTLRHashString("option", this ), new Integer(
0067: 37));
0068: literals.put(new ANTLRHashString("sql_tsi_frac_second", this ),
0069: new Integer(148));
0070: literals.put(new ANTLRHashString("tinyint", this ), new Integer(
0071: 82));
0072: literals.put(new ANTLRHashString("delete", this ), new Integer(
0073: 42));
0074: literals.put(new ANTLRHashString("transaction", this ),
0075: new Integer(15));
0076: literals
0077: .put(new ANTLRHashString("end", this ), new Integer(133));
0078: literals.put(new ANTLRHashString("object", this ), new Integer(
0079: 74));
0080: literals
0081: .put(new ANTLRHashString("view", this ), new Integer(10));
0082: literals.put(new ANTLRHashString("system_user", this ),
0083: new Integer(144));
0084: literals.put(new ANTLRHashString("initially", this ),
0085: new Integer(64));
0086: literals.put(new ANTLRHashString("timestamp", this ),
0087: new Integer(95));
0088: literals.put(new ANTLRHashString("insert", this ), new Integer(
0089: 52));
0090: literals.put(new ANTLRHashString("distinct", this ),
0091: new Integer(104));
0092: literals.put(new ANTLRHashString("check", this ),
0093: new Integer(24));
0094: literals.put(new ANTLRHashString("binary", this ), new Integer(
0095: 71));
0096: literals.put(new ANTLRHashString("grant", this ),
0097: new Integer(47));
0098: literals.put(new ANTLRHashString("where", this ),
0099: new Integer(40));
0100: literals.put(new ANTLRHashString("alter", this ),
0101: new Integer(19));
0102: literals.put(new ANTLRHashString("varbinary", this ),
0103: new Integer(70));
0104: literals
0105: .put(new ANTLRHashString("zone", this ), new Integer(94));
0106: literals.put(new ANTLRHashString("integer", this ), new Integer(
0107: 80));
0108: literals.put(new ANTLRHashString("sql_tsi_minute", this ),
0109: new Integer(150));
0110: literals.put(new ANTLRHashString("then", this ),
0111: new Integer(131));
0112: literals.put(new ANTLRHashString("match", this ),
0113: new Integer(59));
0114: literals.put(new ANTLRHashString("decimal", this ), new Integer(
0115: 85));
0116: literals.put(new ANTLRHashString("select", this ), new Integer(
0117: 51));
0118: literals.put(new ANTLRHashString("cascade", this ), new Integer(
0119: 30));
0120: literals.put(new ANTLRHashString("to", this ), new Integer(33));
0121: literals
0122: .put(new ANTLRHashString("and", this ), new Integer(113));
0123: literals.put(new ANTLRHashString("outer", this ), new Integer(
0124: 181));
0125: literals.put(new ANTLRHashString("float", this ),
0126: new Integer(90));
0127: literals.put(new ANTLRHashString("not", this ), new Integer(55));
0128: literals.put(new ANTLRHashString("constraint", this ),
0129: new Integer(21));
0130: literals.put(new ANTLRHashString("interval", this ),
0131: new Integer(96));
0132: literals.put(new ANTLRHashString("schema", this ),
0133: new Integer(7));
0134: literals.put(new ANTLRHashString("numeric", this ), new Integer(
0135: 86));
0136: literals.put(new ANTLRHashString("usage", this ),
0137: new Integer(54));
0138: literals
0139: .put(new ANTLRHashString("date", this ), new Integer(92));
0140: literals.put(new ANTLRHashString("using", this ), new Integer(
0141: 109));
0142: literals.put(new ANTLRHashString("no", this ), new Integer(62));
0143: literals.put(new ANTLRHashString("key", this ), new Integer(57));
0144: literals.put(new ANTLRHashString("month", this ), new Integer(
0145: 137));
0146: literals
0147: .put(new ANTLRHashString("from", this ), new Integer(43));
0148: literals.put(new ANTLRHashString("bigint", this ), new Integer(
0149: 83));
0150: literals
0151: .put(new ANTLRHashString("null", this ), new Integer(56));
0152: literals.put(new ANTLRHashString("count", this ), new Integer(
0153: 165));
0154: literals
0155: .put(new ANTLRHashString("real", this ), new Integer(87));
0156: literals.put(new ANTLRHashString("add", this ), new Integer(20));
0157: literals.put(new ANTLRHashString("deferrable", this ),
0158: new Integer(67));
0159: literals.put(new ANTLRHashString("current_user", this ),
0160: new Integer(142));
0161: literals.put(new ANTLRHashString("like", this ),
0162: new Integer(115));
0163: literals.put(new ANTLRHashString("natural", this ), new Integer(
0164: 178));
0165: literals.put(new ANTLRHashString("when", this ),
0166: new Integer(130));
0167: literals.put(new ANTLRHashString("inner", this ), new Integer(
0168: 180));
0169: literals.put(new ANTLRHashString("except", this ), new Integer(
0170: 183));
0171: literals.put(new ANTLRHashString("sql_tsi_quarter", this ),
0172: new Integer(155));
0173: literals.put(new ANTLRHashString("character", this ),
0174: new Integer(76));
0175: literals.put(new ANTLRHashString("authorization", this ),
0176: new Integer(44));
0177: literals.put(new ANTLRHashString("sql_tsi_day", this ),
0178: new Integer(152));
0179: literals.put(new ANTLRHashString("cascaded", this ),
0180: new Integer(36));
0181: literals
0182: .put(new ANTLRHashString("with", this ), new Integer(35));
0183: literals.put(new ANTLRHashString("set", this ), new Integer(31));
0184: literals.put(new ANTLRHashString("current_time", this ),
0185: new Integer(146));
0186: literals.put(new ANTLRHashString("escape", this ), new Integer(
0187: 119));
0188: literals
0189: .put(new ANTLRHashString("only", this ), new Integer(99));
0190: literals.put(new ANTLRHashString("global", this ), new Integer(
0191: 45));
0192: literals.put(new ANTLRHashString("foreign", this ), new Integer(
0193: 23));
0194: literals.put(new ANTLRHashString("intersect", this ),
0195: new Integer(182));
0196: literals
0197: .put(new ANTLRHashString("work", this ), new Integer(13));
0198: literals.put(new ANTLRHashString("**", this ), new Integer(120));
0199: literals.put(new ANTLRHashString("join", this ),
0200: new Integer(177));
0201: literals.put(new ANTLRHashString("rollback", this ),
0202: new Integer(14));
0203: literals.put(new ANTLRHashString("commit", this ), new Integer(
0204: 12));
0205: literals.put(new ANTLRHashString("is", this ), new Integer(114));
0206: literals.put(new ANTLRHashString("or", this ), new Integer(112));
0207: literals
0208: .put(new ANTLRHashString("any", this ), new Integer(173));
0209: literals.put(new ANTLRHashString("create", this ),
0210: new Integer(4));
0211: literals.put(new ANTLRHashString("dec", this ), new Integer(84));
0212: literals
0213: .put(new ANTLRHashString("full", this ), new Integer(60));
0214: literals.put(new ANTLRHashString("double", this ), new Integer(
0215: 88));
0216: literals
0217: .put(new ANTLRHashString("min", this ), new Integer(162));
0218: literals.put(new ANTLRHashString("sql_tsi_hour", this ),
0219: new Integer(151));
0220: literals.put(new ANTLRHashString("as", this ), new Integer(34));
0221: literals.put(new ANTLRHashString("first", this ),
0222: new Integer(27));
0223: literals.put(new ANTLRHashString("by", this ), new Integer(101));
0224: literals.put(new ANTLRHashString("second", this ), new Integer(
0225: 139));
0226: literals.put(new ANTLRHashString("all", this ), new Integer(49));
0227: literals.put(new ANTLRHashString("union", this ), new Integer(
0228: 179));
0229: literals
0230: .put(new ANTLRHashString("drop", this ), new Integer(11));
0231: literals.put(new ANTLRHashString("order", this ), new Integer(
0232: 100));
0233: literals.put(new ANTLRHashString("privileges", this ),
0234: new Integer(50));
0235: literals.put(new ANTLRHashString("hour", this ),
0236: new Integer(134));
0237: literals.put(new ANTLRHashString("primary", this ), new Integer(
0238: 22));
0239: literals.put(new ANTLRHashString("current_date", this ),
0240: new Integer(145));
0241: literals.put(new ANTLRHashString("some", this ),
0242: new Integer(174));
0243: literals.put(new ANTLRHashString("values", this ), new Integer(
0244: 108));
0245: literals.put(new ANTLRHashString("int", this ), new Integer(79));
0246: literals.put(new ANTLRHashString("for", this ), new Integer(97));
0247: literals.put(new ANTLRHashString("boolean", this ), new Integer(
0248: 91));
0249: literals.put(new ANTLRHashString("cross", this ), new Integer(
0250: 176));
0251: literals.put(new ANTLRHashString("varchar", this ), new Integer(
0252: 78));
0253: literals
0254: .put(new ANTLRHashString("char", this ), new Integer(77));
0255: literals.put(new ANTLRHashString("bit", this ), new Integer(68));
0256: literals.put(new ANTLRHashString("large", this ),
0257: new Integer(73));
0258: literals
0259: .put(new ANTLRHashString("index", this ), new Integer(6));
0260: literals.put(new ANTLRHashString("default", this ), new Integer(
0261: 32));
0262: literals
0263: .put(new ANTLRHashString("clob", this ), new Integer(75));
0264: literals.put(new ANTLRHashString("false", this ), new Integer(
0265: 160));
0266: literals.put(new ANTLRHashString("session_user", this ),
0267: new Integer(143));
0268: literals.put(new ANTLRHashString("exists", this ), new Integer(
0269: 118));
0270: literals
0271: .put(new ANTLRHashString("table", this ), new Integer(9));
0272: literals
0273: .put(new ANTLRHashString("asc", this ), new Integer(102));
0274: literals.put(new ANTLRHashString("unknown", this ), new Integer(
0275: 167));
0276: literals.put(new ANTLRHashString("sql_tsi_year", this ),
0277: new Integer(156));
0278: literals.put(new ANTLRHashString("minute", this ), new Integer(
0279: 136));
0280: literals.put(new ANTLRHashString("left", this ),
0281: new Integer(135));
0282: literals
0283: .put(new ANTLRHashString("day", this ), new Integer(158));
0284: literals.put(new ANTLRHashString("partial", this ), new Integer(
0285: 61));
0286: literals.put(new ANTLRHashString("desc", this ),
0287: new Integer(103));
0288: literals.put(new ANTLRHashString("temporary", this ),
0289: new Integer(8));
0290: literals
0291: .put(new ANTLRHashString("max", this ), new Integer(163));
0292: literals
0293: .put(new ANTLRHashString("sum", this ), new Integer(164));
0294: literals.put(new ANTLRHashString("year", this ),
0295: new Integer(140));
0296: literals.put(new ANTLRHashString("on", this ), new Integer(16));
0297: literals.put(new ANTLRHashString("after", this ),
0298: new Integer(28));
0299: literals.put(new ANTLRHashString("cast", this ),
0300: new Integer(157));
0301: literals.put(new ANTLRHashString("identity", this ),
0302: new Integer(58));
0303: literals.put(new ANTLRHashString("restrict", this ),
0304: new Integer(29));
0305: literals.put(new ANTLRHashString("into", this ),
0306: new Integer(166));
0307: literals.put(new ANTLRHashString("rename", this ), new Integer(
0308: 25));
0309: literals.put(new ANTLRHashString("sql_tsi_week", this ),
0310: new Integer(153));
0311: literals.put(new ANTLRHashString("else", this ),
0312: new Integer(132));
0313: literals.put(new ANTLRHashString("right", this ), new Integer(
0314: 138));
0315: literals.put(new ANTLRHashString("in", this ), new Integer(117));
0316: literals.put(new ANTLRHashString("sql_tsi_second", this ),
0317: new Integer(149));
0318: literals
0319: .put(new ANTLRHashString("avg", this ), new Integer(161));
0320: literals.put(new ANTLRHashString("precision", this ),
0321: new Integer(89));
0322: literals.put(new ANTLRHashString("update", this ), new Integer(
0323: 38));
0324: literals.put(new ANTLRHashString("true", this ),
0325: new Integer(159));
0326: literals.put(new ANTLRHashString("group", this ), new Integer(
0327: 110));
0328: literals.put(new ANTLRHashString("immediate", this ),
0329: new Integer(66));
0330: literals
0331: .put(new ANTLRHashString("read", this ), new Integer(98));
0332: literals.put(new ANTLRHashString("having", this ), new Integer(
0333: 106));
0334: literals.put(new ANTLRHashString("column", this ), new Integer(
0335: 26));
0336: literals.put(new ANTLRHashString("corresponding", this ),
0337: new Integer(107));
0338: literals.put(new ANTLRHashString("user", this ),
0339: new Integer(141));
0340: literals.put(new ANTLRHashString("unique", this ),
0341: new Integer(5));
0342: literals.put(new ANTLRHashString("references", this ),
0343: new Integer(53));
0344: literals.put(new ANTLRHashString("current_timestamp", this ),
0345: new Integer(147));
0346: literals.put(new ANTLRHashString("varying", this ), new Integer(
0347: 69));
0348: literals.put(new ANTLRHashString("deferred", this ),
0349: new Integer(65));
0350: }
0351:
0352: public Token nextToken() throws TokenStreamException {
0353: Token theRetToken = null;
0354: tryAgain: for (;;) {
0355: Token _token = null;
0356: int _ttype = Token.INVALID_TYPE;
0357: resetText();
0358: try { // for char stream error handling
0359: try { // for lexical error handling
0360: switch (LA(1)) {
0361: case '\t':
0362: case '\r':
0363: case ' ': {
0364: mWS(true);
0365: theRetToken = _returnToken;
0366: break;
0367: }
0368: case '\n': {
0369: mNL(true);
0370: theRetToken = _returnToken;
0371: break;
0372: }
0373: case '(': {
0374: mLPAREN(true);
0375: theRetToken = _returnToken;
0376: break;
0377: }
0378: case ')': {
0379: mRPAREN(true);
0380: theRetToken = _returnToken;
0381: break;
0382: }
0383: case ',': {
0384: mCOMMA(true);
0385: theRetToken = _returnToken;
0386: break;
0387: }
0388: case '?': {
0389: mQUESTION(true);
0390: theRetToken = _returnToken;
0391: break;
0392: }
0393: case '+': {
0394: mPLUS(true);
0395: theRetToken = _returnToken;
0396: break;
0397: }
0398: case '|': {
0399: mCONCAT(true);
0400: theRetToken = _returnToken;
0401: break;
0402: }
0403: case '=': {
0404: mEQ(true);
0405: theRetToken = _returnToken;
0406: break;
0407: }
0408: case '*': {
0409: mSTAR(true);
0410: theRetToken = _returnToken;
0411: break;
0412: }
0413: case '{': {
0414: mLCURLY(true);
0415: theRetToken = _returnToken;
0416: break;
0417: }
0418: case '}': {
0419: mRCURLY(true);
0420: theRetToken = _returnToken;
0421: break;
0422: }
0423: case ';': {
0424: mSEMI(true);
0425: theRetToken = _returnToken;
0426: break;
0427: }
0428: case '\'': {
0429: mSTRING_LITERAL(true);
0430: theRetToken = _returnToken;
0431: break;
0432: }
0433: case '.':
0434: case '0':
0435: case '1':
0436: case '2':
0437: case '3':
0438: case '4':
0439: case '5':
0440: case '6':
0441: case '7':
0442: case '8':
0443: case '9': {
0444: mINT_OR_REAL(true);
0445: theRetToken = _returnToken;
0446: break;
0447: }
0448: default:
0449: if ((LA(1) == 'B')
0450: && (LA(2) == '\'')
0451: && (LA(3) == '0' || LA(3) == '1')
0452: && (LA(4) == '\'' || LA(4) == '0' || LA(4) == '1')) {
0453: mBINSTR(true);
0454: theRetToken = _returnToken;
0455: } else if ((LA(1) == 'X') && (LA(2) == '\'')
0456: && (_tokenSet_0.member(LA(3)))
0457: && (_tokenSet_1.member(LA(4)))) {
0458: mHEXSTR(true);
0459: theRetToken = _returnToken;
0460: } else if ((LA(1) == '-') && (LA(2) == '-')) {
0461: mSL_COMMENT(true);
0462: theRetToken = _returnToken;
0463: } else if ((LA(1) == '/') && (LA(2) == '*')) {
0464: mML_COMMENT(true);
0465: theRetToken = _returnToken;
0466: } else if ((LA(1) == '<') && (LA(2) == '=')) {
0467: mLE(true);
0468: theRetToken = _returnToken;
0469: } else if ((LA(1) == '>') && (LA(2) == '=')) {
0470: mGE(true);
0471: theRetToken = _returnToken;
0472: } else if ((LA(1) == '<') && (LA(2) == '>')) {
0473: mNE(true);
0474: theRetToken = _returnToken;
0475: } else if ((LA(1) == '-') && (true)) {
0476: mMINUS(true);
0477: theRetToken = _returnToken;
0478: } else if ((LA(1) == '<') && (true)) {
0479: mLT(true);
0480: theRetToken = _returnToken;
0481: } else if ((LA(1) == '>') && (true)) {
0482: mGT(true);
0483: theRetToken = _returnToken;
0484: } else if ((LA(1) == '/') && (true)) {
0485: mSLASH(true);
0486: theRetToken = _returnToken;
0487: } else if ((_tokenSet_2.member(LA(1))) && (true) && (true) && (true)) {
0488: mID(true);
0489: theRetToken = _returnToken;
0490: } else {
0491: if (LA(1) == EOF_CHAR) {
0492: uponEOF();
0493: _returnToken = makeToken(Token.EOF_TYPE);
0494: } else {
0495: throw new NoViableAltForCharException(
0496: (char) LA(1), getFilename(),
0497: getLine(), getColumn());
0498: }
0499: }
0500: }
0501: if (_returnToken == null)
0502: continue tryAgain; // found SKIP token
0503: _ttype = _returnToken.getType();
0504: _returnToken.setType(_ttype);
0505: return _returnToken;
0506: } catch (RecognitionException e) {
0507: throw new TokenStreamRecognitionException(e);
0508: }
0509: } catch (CharStreamException cse) {
0510: if (cse instanceof CharStreamIOException) {
0511: throw new TokenStreamIOException(
0512: ((CharStreamIOException) cse).io);
0513: } else {
0514: throw new TokenStreamException(cse.getMessage());
0515: }
0516: }
0517: }
0518: }
0519:
0520: public final void mWS(boolean _createToken)
0521: throws RecognitionException, CharStreamException,
0522: TokenStreamException {
0523: int _ttype;
0524: Token _token = null;
0525: int _begin = text.length();
0526: _ttype = WS;
0527: int _saveIndex;
0528:
0529: {
0530: int _cnt349 = 0;
0531: _loop349: do {
0532: switch (LA(1)) {
0533: case ' ': {
0534: match(' ');
0535: break;
0536: }
0537: case '\t': {
0538: match('\t');
0539: break;
0540: }
0541: case '\r': {
0542: match('\r');
0543: break;
0544: }
0545: default: {
0546: if (_cnt349 >= 1) {
0547: break _loop349;
0548: } else {
0549: throw new NoViableAltForCharException(
0550: (char) LA(1), getFilename(), getLine(),
0551: getColumn());
0552: }
0553: }
0554: }
0555: _cnt349++;
0556: } while (true);
0557: }
0558: if (inputState.guessing == 0) {
0559: _ttype = Token.SKIP;
0560: }
0561: if (_createToken && _token == null && _ttype != Token.SKIP) {
0562: _token = makeToken(_ttype);
0563: _token.setText(new String(text.getBuffer(), _begin, text
0564: .length()
0565: - _begin));
0566: }
0567: _returnToken = _token;
0568: }
0569:
0570: public final void mSL_COMMENT(boolean _createToken)
0571: throws RecognitionException, CharStreamException,
0572: TokenStreamException {
0573: int _ttype;
0574: Token _token = null;
0575: int _begin = text.length();
0576: _ttype = SL_COMMENT;
0577: int _saveIndex;
0578:
0579: match("--");
0580: {
0581: _loop352: do {
0582: if ((_tokenSet_3.member(LA(1)))) {
0583: matchNot('\n');
0584: } else {
0585: break _loop352;
0586: }
0587:
0588: } while (true);
0589: }
0590: if (inputState.guessing == 0) {
0591: _ttype = Token.SKIP;
0592: }
0593: if (_createToken && _token == null && _ttype != Token.SKIP) {
0594: _token = makeToken(_ttype);
0595: _token.setText(new String(text.getBuffer(), _begin, text
0596: .length()
0597: - _begin));
0598: }
0599: _returnToken = _token;
0600: }
0601:
0602: public final void mML_COMMENT(boolean _createToken)
0603: throws RecognitionException, CharStreamException,
0604: TokenStreamException {
0605: int _ttype;
0606: Token _token = null;
0607: int _begin = text.length();
0608: _ttype = ML_COMMENT;
0609: int _saveIndex;
0610:
0611: match("/*");
0612: {
0613: _loop356: do {
0614: if (((LA(1) == '*')
0615: && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')))
0616: && (LA(2) != '/')) {
0617: match('*');
0618: } else if ((LA(1) == '\n')) {
0619: match('\n');
0620: if (inputState.guessing == 0) {
0621: newline();
0622: }
0623: } else if ((_tokenSet_4.member(LA(1)))) {
0624: {
0625: match(_tokenSet_4);
0626: }
0627: } else {
0628: break _loop356;
0629: }
0630:
0631: } while (true);
0632: }
0633: match("*/");
0634: if (inputState.guessing == 0) {
0635: _ttype = Token.SKIP;
0636: }
0637: if (_createToken && _token == null && _ttype != Token.SKIP) {
0638: _token = makeToken(_ttype);
0639: _token.setText(new String(text.getBuffer(), _begin, text
0640: .length()
0641: - _begin));
0642: }
0643: _returnToken = _token;
0644: }
0645:
0646: public final void mNL(boolean _createToken)
0647: throws RecognitionException, CharStreamException,
0648: TokenStreamException {
0649: int _ttype;
0650: Token _token = null;
0651: int _begin = text.length();
0652: _ttype = NL;
0653: int _saveIndex;
0654:
0655: match('\n');
0656: if (inputState.guessing == 0) {
0657: _ttype = Token.SKIP;
0658: newline();
0659: }
0660: if (_createToken && _token == null && _ttype != Token.SKIP) {
0661: _token = makeToken(_ttype);
0662: _token.setText(new String(text.getBuffer(), _begin, text
0663: .length()
0664: - _begin));
0665: }
0666: _returnToken = _token;
0667: }
0668:
0669: public final void mLPAREN(boolean _createToken)
0670: throws RecognitionException, CharStreamException,
0671: TokenStreamException {
0672: int _ttype;
0673: Token _token = null;
0674: int _begin = text.length();
0675: _ttype = LPAREN;
0676: int _saveIndex;
0677:
0678: match('(');
0679: if (_createToken && _token == null && _ttype != Token.SKIP) {
0680: _token = makeToken(_ttype);
0681: _token.setText(new String(text.getBuffer(), _begin, text
0682: .length()
0683: - _begin));
0684: }
0685: _returnToken = _token;
0686: }
0687:
0688: public final void mRPAREN(boolean _createToken)
0689: throws RecognitionException, CharStreamException,
0690: TokenStreamException {
0691: int _ttype;
0692: Token _token = null;
0693: int _begin = text.length();
0694: _ttype = RPAREN;
0695: int _saveIndex;
0696:
0697: match(')');
0698: if (_createToken && _token == null && _ttype != Token.SKIP) {
0699: _token = makeToken(_ttype);
0700: _token.setText(new String(text.getBuffer(), _begin, text
0701: .length()
0702: - _begin));
0703: }
0704: _returnToken = _token;
0705: }
0706:
0707: public final void mCOMMA(boolean _createToken)
0708: throws RecognitionException, CharStreamException,
0709: TokenStreamException {
0710: int _ttype;
0711: Token _token = null;
0712: int _begin = text.length();
0713: _ttype = COMMA;
0714: int _saveIndex;
0715:
0716: match(',');
0717: if (_createToken && _token == null && _ttype != Token.SKIP) {
0718: _token = makeToken(_ttype);
0719: _token.setText(new String(text.getBuffer(), _begin, text
0720: .length()
0721: - _begin));
0722: }
0723: _returnToken = _token;
0724: }
0725:
0726: public final void mQUESTION(boolean _createToken)
0727: throws RecognitionException, CharStreamException,
0728: TokenStreamException {
0729: int _ttype;
0730: Token _token = null;
0731: int _begin = text.length();
0732: _ttype = QUESTION;
0733: int _saveIndex;
0734:
0735: match('?');
0736: if (_createToken && _token == null && _ttype != Token.SKIP) {
0737: _token = makeToken(_ttype);
0738: _token.setText(new String(text.getBuffer(), _begin, text
0739: .length()
0740: - _begin));
0741: }
0742: _returnToken = _token;
0743: }
0744:
0745: public final void mPLUS(boolean _createToken)
0746: throws RecognitionException, CharStreamException,
0747: TokenStreamException {
0748: int _ttype;
0749: Token _token = null;
0750: int _begin = text.length();
0751: _ttype = PLUS;
0752: int _saveIndex;
0753:
0754: match('+');
0755: if (_createToken && _token == null && _ttype != Token.SKIP) {
0756: _token = makeToken(_ttype);
0757: _token.setText(new String(text.getBuffer(), _begin, text
0758: .length()
0759: - _begin));
0760: }
0761: _returnToken = _token;
0762: }
0763:
0764: public final void mMINUS(boolean _createToken)
0765: throws RecognitionException, CharStreamException,
0766: TokenStreamException {
0767: int _ttype;
0768: Token _token = null;
0769: int _begin = text.length();
0770: _ttype = MINUS;
0771: int _saveIndex;
0772:
0773: match('-');
0774: if (_createToken && _token == null && _ttype != Token.SKIP) {
0775: _token = makeToken(_ttype);
0776: _token.setText(new String(text.getBuffer(), _begin, text
0777: .length()
0778: - _begin));
0779: }
0780: _returnToken = _token;
0781: }
0782:
0783: public final void mCONCAT(boolean _createToken)
0784: throws RecognitionException, CharStreamException,
0785: TokenStreamException {
0786: int _ttype;
0787: Token _token = null;
0788: int _begin = text.length();
0789: _ttype = CONCAT;
0790: int _saveIndex;
0791:
0792: match("||");
0793: if (_createToken && _token == null && _ttype != Token.SKIP) {
0794: _token = makeToken(_ttype);
0795: _token.setText(new String(text.getBuffer(), _begin, text
0796: .length()
0797: - _begin));
0798: }
0799: _returnToken = _token;
0800: }
0801:
0802: public final void mLT(boolean _createToken)
0803: throws RecognitionException, CharStreamException,
0804: TokenStreamException {
0805: int _ttype;
0806: Token _token = null;
0807: int _begin = text.length();
0808: _ttype = LT;
0809: int _saveIndex;
0810:
0811: match('<');
0812: if (_createToken && _token == null && _ttype != Token.SKIP) {
0813: _token = makeToken(_ttype);
0814: _token.setText(new String(text.getBuffer(), _begin, text
0815: .length()
0816: - _begin));
0817: }
0818: _returnToken = _token;
0819: }
0820:
0821: public final void mGT(boolean _createToken)
0822: throws RecognitionException, CharStreamException,
0823: TokenStreamException {
0824: int _ttype;
0825: Token _token = null;
0826: int _begin = text.length();
0827: _ttype = GT;
0828: int _saveIndex;
0829:
0830: match('>');
0831: if (_createToken && _token == null && _ttype != Token.SKIP) {
0832: _token = makeToken(_ttype);
0833: _token.setText(new String(text.getBuffer(), _begin, text
0834: .length()
0835: - _begin));
0836: }
0837: _returnToken = _token;
0838: }
0839:
0840: public final void mLE(boolean _createToken)
0841: throws RecognitionException, CharStreamException,
0842: TokenStreamException {
0843: int _ttype;
0844: Token _token = null;
0845: int _begin = text.length();
0846: _ttype = LE;
0847: int _saveIndex;
0848:
0849: match("<=");
0850: if (_createToken && _token == null && _ttype != Token.SKIP) {
0851: _token = makeToken(_ttype);
0852: _token.setText(new String(text.getBuffer(), _begin, text
0853: .length()
0854: - _begin));
0855: }
0856: _returnToken = _token;
0857: }
0858:
0859: public final void mGE(boolean _createToken)
0860: throws RecognitionException, CharStreamException,
0861: TokenStreamException {
0862: int _ttype;
0863: Token _token = null;
0864: int _begin = text.length();
0865: _ttype = GE;
0866: int _saveIndex;
0867:
0868: match(">=");
0869: if (_createToken && _token == null && _ttype != Token.SKIP) {
0870: _token = makeToken(_ttype);
0871: _token.setText(new String(text.getBuffer(), _begin, text
0872: .length()
0873: - _begin));
0874: }
0875: _returnToken = _token;
0876: }
0877:
0878: public final void mEQ(boolean _createToken)
0879: throws RecognitionException, CharStreamException,
0880: TokenStreamException {
0881: int _ttype;
0882: Token _token = null;
0883: int _begin = text.length();
0884: _ttype = EQ;
0885: int _saveIndex;
0886:
0887: match('=');
0888: if (_createToken && _token == null && _ttype != Token.SKIP) {
0889: _token = makeToken(_ttype);
0890: _token.setText(new String(text.getBuffer(), _begin, text
0891: .length()
0892: - _begin));
0893: }
0894: _returnToken = _token;
0895: }
0896:
0897: public final void mNE(boolean _createToken)
0898: throws RecognitionException, CharStreamException,
0899: TokenStreamException {
0900: int _ttype;
0901: Token _token = null;
0902: int _begin = text.length();
0903: _ttype = NE;
0904: int _saveIndex;
0905:
0906: match("<>");
0907: if (_createToken && _token == null && _ttype != Token.SKIP) {
0908: _token = makeToken(_ttype);
0909: _token.setText(new String(text.getBuffer(), _begin, text
0910: .length()
0911: - _begin));
0912: }
0913: _returnToken = _token;
0914: }
0915:
0916: public final void mSTAR(boolean _createToken)
0917: throws RecognitionException, CharStreamException,
0918: TokenStreamException {
0919: int _ttype;
0920: Token _token = null;
0921: int _begin = text.length();
0922: _ttype = STAR;
0923: int _saveIndex;
0924:
0925: match('*');
0926: if (_createToken && _token == null && _ttype != Token.SKIP) {
0927: _token = makeToken(_ttype);
0928: _token.setText(new String(text.getBuffer(), _begin, text
0929: .length()
0930: - _begin));
0931: }
0932: _returnToken = _token;
0933: }
0934:
0935: public final void mSLASH(boolean _createToken)
0936: throws RecognitionException, CharStreamException,
0937: TokenStreamException {
0938: int _ttype;
0939: Token _token = null;
0940: int _begin = text.length();
0941: _ttype = SLASH;
0942: int _saveIndex;
0943:
0944: match('/');
0945: if (_createToken && _token == null && _ttype != Token.SKIP) {
0946: _token = makeToken(_ttype);
0947: _token.setText(new String(text.getBuffer(), _begin, text
0948: .length()
0949: - _begin));
0950: }
0951: _returnToken = _token;
0952: }
0953:
0954: public final void mLCURLY(boolean _createToken)
0955: throws RecognitionException, CharStreamException,
0956: TokenStreamException {
0957: int _ttype;
0958: Token _token = null;
0959: int _begin = text.length();
0960: _ttype = LCURLY;
0961: int _saveIndex;
0962:
0963: match('{');
0964: if (_createToken && _token == null && _ttype != Token.SKIP) {
0965: _token = makeToken(_ttype);
0966: _token.setText(new String(text.getBuffer(), _begin, text
0967: .length()
0968: - _begin));
0969: }
0970: _returnToken = _token;
0971: }
0972:
0973: public final void mRCURLY(boolean _createToken)
0974: throws RecognitionException, CharStreamException,
0975: TokenStreamException {
0976: int _ttype;
0977: Token _token = null;
0978: int _begin = text.length();
0979: _ttype = RCURLY;
0980: int _saveIndex;
0981:
0982: match('}');
0983: if (_createToken && _token == null && _ttype != Token.SKIP) {
0984: _token = makeToken(_ttype);
0985: _token.setText(new String(text.getBuffer(), _begin, text
0986: .length()
0987: - _begin));
0988: }
0989: _returnToken = _token;
0990: }
0991:
0992: public final void mSEMI(boolean _createToken)
0993: throws RecognitionException, CharStreamException,
0994: TokenStreamException {
0995: int _ttype;
0996: Token _token = null;
0997: int _begin = text.length();
0998: _ttype = SEMI;
0999: int _saveIndex;
1000:
1001: match(';');
1002: if (inputState.guessing == 0) {
1003: _ttype = Token.SKIP;
1004: }
1005: if (_createToken && _token == null && _ttype != Token.SKIP) {
1006: _token = makeToken(_ttype);
1007: _token.setText(new String(text.getBuffer(), _begin, text
1008: .length()
1009: - _begin));
1010: }
1011: _returnToken = _token;
1012: }
1013:
1014: public final void mSTRING_LITERAL(boolean _createToken)
1015: throws RecognitionException, CharStreamException,
1016: TokenStreamException {
1017: int _ttype;
1018: Token _token = null;
1019: int _begin = text.length();
1020: _ttype = STRING_LITERAL;
1021: int _saveIndex;
1022:
1023: _saveIndex = text.length();
1024: match('\'');
1025: text.setLength(_saveIndex);
1026: {
1027: _loop379: do {
1028: if ((LA(1) == '\'') && (LA(2) == '\'')) {
1029: match('\'');
1030: {
1031: _saveIndex = text.length();
1032: match('\'');
1033: text.setLength(_saveIndex);
1034: }
1035: } else if ((_tokenSet_5.member(LA(1)))) {
1036: matchNot('\'');
1037: } else {
1038: break _loop379;
1039: }
1040:
1041: } while (true);
1042: }
1043: _saveIndex = text.length();
1044: match('\'');
1045: text.setLength(_saveIndex);
1046: if (_createToken && _token == null && _ttype != Token.SKIP) {
1047: _token = makeToken(_ttype);
1048: _token.setText(new String(text.getBuffer(), _begin, text
1049: .length()
1050: - _begin));
1051: }
1052: _returnToken = _token;
1053: }
1054:
1055: protected final void mDIGIT(boolean _createToken)
1056: throws RecognitionException, CharStreamException,
1057: TokenStreamException {
1058: int _ttype;
1059: Token _token = null;
1060: int _begin = text.length();
1061: _ttype = DIGIT;
1062: int _saveIndex;
1063:
1064: matchRange('0', '9');
1065: if (_createToken && _token == null && _ttype != Token.SKIP) {
1066: _token = makeToken(_ttype);
1067: _token.setText(new String(text.getBuffer(), _begin, text
1068: .length()
1069: - _begin));
1070: }
1071: _returnToken = _token;
1072: }
1073:
1074: protected final void mINT(boolean _createToken)
1075: throws RecognitionException, CharStreamException,
1076: TokenStreamException {
1077: int _ttype;
1078: Token _token = null;
1079: int _begin = text.length();
1080: _ttype = INT;
1081: int _saveIndex;
1082:
1083: {
1084: int _cnt383 = 0;
1085: _loop383: do {
1086: if (((LA(1) >= '0' && LA(1) <= '9'))) {
1087: mDIGIT(false);
1088: } else {
1089: if (_cnt383 >= 1) {
1090: break _loop383;
1091: } else {
1092: throw new NoViableAltForCharException(
1093: (char) LA(1), getFilename(), getLine(),
1094: getColumn());
1095: }
1096: }
1097:
1098: _cnt383++;
1099: } while (true);
1100: }
1101: if (_createToken && _token == null && _ttype != Token.SKIP) {
1102: _token = makeToken(_ttype);
1103: _token.setText(new String(text.getBuffer(), _begin, text
1104: .length()
1105: - _begin));
1106: }
1107: _returnToken = _token;
1108: }
1109:
1110: protected final void mREAL(boolean _createToken)
1111: throws RecognitionException, CharStreamException,
1112: TokenStreamException {
1113: int _ttype;
1114: Token _token = null;
1115: int _begin = text.length();
1116: _ttype = REAL;
1117: int _saveIndex;
1118:
1119: {
1120: _loop386: do {
1121: if (((LA(1) >= '0' && LA(1) <= '9'))) {
1122: mDIGIT(false);
1123: } else {
1124: break _loop386;
1125: }
1126:
1127: } while (true);
1128: }
1129: match('.');
1130: {
1131: if (((LA(1) >= '0' && LA(1) <= '9'))) {
1132: mINT(false);
1133: {
1134: if ((LA(1) == 'E' || LA(1) == 'e')) {
1135: {
1136: switch (LA(1)) {
1137: case 'E': {
1138: match('E');
1139: break;
1140: }
1141: case 'e': {
1142: match('e');
1143: break;
1144: }
1145: default: {
1146: throw new NoViableAltForCharException(
1147: (char) LA(1), getFilename(),
1148: getLine(), getColumn());
1149: }
1150: }
1151: }
1152: {
1153: switch (LA(1)) {
1154: case '-': {
1155: match('-');
1156: break;
1157: }
1158: case '+': {
1159: match('+');
1160: break;
1161: }
1162: case '0':
1163: case '1':
1164: case '2':
1165: case '3':
1166: case '4':
1167: case '5':
1168: case '6':
1169: case '7':
1170: case '8':
1171: case '9': {
1172: break;
1173: }
1174: default: {
1175: throw new NoViableAltForCharException(
1176: (char) LA(1), getFilename(),
1177: getLine(), getColumn());
1178: }
1179: }
1180: }
1181: mINT(false);
1182: } else {
1183: }
1184:
1185: }
1186: } else {
1187: }
1188:
1189: }
1190: if (_createToken && _token == null && _ttype != Token.SKIP) {
1191: _token = makeToken(_ttype);
1192: _token.setText(new String(text.getBuffer(), _begin, text
1193: .length()
1194: - _begin));
1195: }
1196: _returnToken = _token;
1197: }
1198:
1199: protected final void mEXP(boolean _createToken)
1200: throws RecognitionException, CharStreamException,
1201: TokenStreamException {
1202: int _ttype;
1203: Token _token = null;
1204: int _begin = text.length();
1205: _ttype = EXP;
1206: int _saveIndex;
1207:
1208: mINT(false);
1209: {
1210: switch (LA(1)) {
1211: case 'E': {
1212: match('E');
1213: break;
1214: }
1215: case 'e': {
1216: match('e');
1217: break;
1218: }
1219: default: {
1220: throw new NoViableAltForCharException((char) LA(1),
1221: getFilename(), getLine(), getColumn());
1222: }
1223: }
1224: }
1225: {
1226: switch (LA(1)) {
1227: case '-': {
1228: match('-');
1229: break;
1230: }
1231: case '+': {
1232: match('+');
1233: break;
1234: }
1235: case '0':
1236: case '1':
1237: case '2':
1238: case '3':
1239: case '4':
1240: case '5':
1241: case '6':
1242: case '7':
1243: case '8':
1244: case '9': {
1245: break;
1246: }
1247: default: {
1248: throw new NoViableAltForCharException((char) LA(1),
1249: getFilename(), getLine(), getColumn());
1250: }
1251: }
1252: }
1253: mINT(false);
1254: if (_createToken && _token == null && _ttype != Token.SKIP) {
1255: _token = makeToken(_ttype);
1256: _token.setText(new String(text.getBuffer(), _begin, text
1257: .length()
1258: - _begin));
1259: }
1260: _returnToken = _token;
1261: }
1262:
1263: public final void mINT_OR_REAL(boolean _createToken)
1264: throws RecognitionException, CharStreamException,
1265: TokenStreamException {
1266: int _ttype;
1267: Token _token = null;
1268: int _begin = text.length();
1269: _ttype = INT_OR_REAL;
1270: int _saveIndex;
1271:
1272: boolean synPredMatched401 = false;
1273: if ((((LA(1) >= '0' && LA(1) <= '9'))
1274: && (_tokenSet_6.member(LA(2)))
1275: && (_tokenSet_7.member(LA(3))) && (true))) {
1276: int _m401 = mark();
1277: synPredMatched401 = true;
1278: inputState.guessing++;
1279: try {
1280: {
1281: mINT(false);
1282: {
1283: switch (LA(1)) {
1284: case 'E': {
1285: match('E');
1286: break;
1287: }
1288: case 'e': {
1289: match('e');
1290: break;
1291: }
1292: default: {
1293: throw new NoViableAltForCharException(
1294: (char) LA(1), getFilename(),
1295: getLine(), getColumn());
1296: }
1297: }
1298: }
1299: mINT(false);
1300: }
1301: } catch (RecognitionException pe) {
1302: synPredMatched401 = false;
1303: }
1304: rewind(_m401);
1305: inputState.guessing--;
1306: }
1307: if (synPredMatched401) {
1308: mEXP(false);
1309: if (inputState.guessing == 0) {
1310: _ttype = REAL;
1311: }
1312: } else {
1313: boolean synPredMatched404 = false;
1314: if ((((LA(1) >= '0' && LA(1) <= '9'))
1315: && (_tokenSet_6.member(LA(2)))
1316: && (_tokenSet_7.member(LA(3))) && (true))) {
1317: int _m404 = mark();
1318: synPredMatched404 = true;
1319: inputState.guessing++;
1320: try {
1321: {
1322: mINT(false);
1323: {
1324: switch (LA(1)) {
1325: case 'E': {
1326: match('E');
1327: break;
1328: }
1329: case 'e': {
1330: match('e');
1331: break;
1332: }
1333: default: {
1334: throw new NoViableAltForCharException(
1335: (char) LA(1), getFilename(),
1336: getLine(), getColumn());
1337: }
1338: }
1339: }
1340: match('-');
1341: mINT(false);
1342: }
1343: } catch (RecognitionException pe) {
1344: synPredMatched404 = false;
1345: }
1346: rewind(_m404);
1347: inputState.guessing--;
1348: }
1349: if (synPredMatched404) {
1350: mEXP(false);
1351: if (inputState.guessing == 0) {
1352: _ttype = REAL;
1353: }
1354: } else {
1355: boolean synPredMatched407 = false;
1356: if ((((LA(1) >= '0' && LA(1) <= '9'))
1357: && (_tokenSet_6.member(LA(2)))
1358: && (_tokenSet_7.member(LA(3))) && (true))) {
1359: int _m407 = mark();
1360: synPredMatched407 = true;
1361: inputState.guessing++;
1362: try {
1363: {
1364: mINT(false);
1365: {
1366: switch (LA(1)) {
1367: case 'E': {
1368: match('E');
1369: break;
1370: }
1371: case 'e': {
1372: match('e');
1373: break;
1374: }
1375: default: {
1376: throw new NoViableAltForCharException(
1377: (char) LA(1),
1378: getFilename(), getLine(),
1379: getColumn());
1380: }
1381: }
1382: }
1383: match('+');
1384: mINT(false);
1385: }
1386: } catch (RecognitionException pe) {
1387: synPredMatched407 = false;
1388: }
1389: rewind(_m407);
1390: inputState.guessing--;
1391: }
1392: if (synPredMatched407) {
1393: mEXP(false);
1394: if (inputState.guessing == 0) {
1395: _ttype = REAL;
1396: }
1397: } else {
1398: boolean synPredMatched396 = false;
1399: if (((_tokenSet_8.member(LA(1))) && (true) && (true) && (true))) {
1400: int _m396 = mark();
1401: synPredMatched396 = true;
1402: inputState.guessing++;
1403: try {
1404: {
1405: mINT(false);
1406: match('.');
1407: }
1408: } catch (RecognitionException pe) {
1409: synPredMatched396 = false;
1410: }
1411: rewind(_m396);
1412: inputState.guessing--;
1413: }
1414: if (synPredMatched396) {
1415: mREAL(false);
1416: if (inputState.guessing == 0) {
1417: _ttype = REAL;
1418: }
1419: } else {
1420: boolean synPredMatched398 = false;
1421: if (((_tokenSet_8.member(LA(1))) && (true) && (true) && (true))) {
1422: int _m398 = mark();
1423: synPredMatched398 = true;
1424: inputState.guessing++;
1425: try {
1426: {
1427: match('.');
1428: mINT(false);
1429: }
1430: } catch (RecognitionException pe) {
1431: synPredMatched398 = false;
1432: }
1433: rewind(_m398);
1434: inputState.guessing--;
1435: }
1436: if (synPredMatched398) {
1437: mREAL(false);
1438: if (inputState.guessing == 0) {
1439: _ttype = REAL;
1440: }
1441: } else {
1442: boolean synPredMatched409 = false;
1443: if ((((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true) && (true))) {
1444: int _m409 = mark();
1445: synPredMatched409 = true;
1446: inputState.guessing++;
1447: try {
1448: {
1449: mINT(false);
1450: }
1451: } catch (RecognitionException pe) {
1452: synPredMatched409 = false;
1453: }
1454: rewind(_m409);
1455: inputState.guessing--;
1456: }
1457: if (synPredMatched409) {
1458: mINT(false);
1459: if (inputState.guessing == 0) {
1460: _ttype = INT;
1461: }
1462: } else {
1463: throw new NoViableAltForCharException(
1464: (char) LA(1), getFilename(),
1465: getLine(), getColumn());
1466: }
1467: }
1468: }
1469: }
1470: }
1471: }
1472: if (_createToken && _token == null && _ttype != Token.SKIP) {
1473: _token = makeToken(_ttype);
1474: _token.setText(new String(text.getBuffer(), _begin, text
1475: .length()
1476: - _begin));
1477: }
1478: _returnToken = _token;
1479: }
1480:
1481: protected final void mHEXDIGIT(boolean _createToken)
1482: throws RecognitionException, CharStreamException,
1483: TokenStreamException {
1484: int _ttype;
1485: Token _token = null;
1486: int _begin = text.length();
1487: _ttype = HEXDIGIT;
1488: int _saveIndex;
1489:
1490: switch (LA(1)) {
1491: case '0':
1492: case '1':
1493: case '2':
1494: case '3':
1495: case '4':
1496: case '5':
1497: case '6':
1498: case '7':
1499: case '8':
1500: case '9': {
1501: mDIGIT(false);
1502: break;
1503: }
1504: case 'A':
1505: case 'B':
1506: case 'C':
1507: case 'D':
1508: case 'E':
1509: case 'F': {
1510: matchRange('A', 'F');
1511: break;
1512: }
1513: default: {
1514: throw new NoViableAltForCharException((char) LA(1),
1515: getFilename(), getLine(), getColumn());
1516: }
1517: }
1518: if (_createToken && _token == null && _ttype != Token.SKIP) {
1519: _token = makeToken(_ttype);
1520: _token.setText(new String(text.getBuffer(), _begin, text
1521: .length()
1522: - _begin));
1523: }
1524: _returnToken = _token;
1525: }
1526:
1527: public final void mBINSTR(boolean _createToken)
1528: throws RecognitionException, CharStreamException,
1529: TokenStreamException {
1530: int _ttype;
1531: Token _token = null;
1532: int _begin = text.length();
1533: _ttype = BINSTR;
1534: int _saveIndex;
1535:
1536: match('B');
1537: match('\'');
1538: {
1539: int _cnt413 = 0;
1540: _loop413: do {
1541: switch (LA(1)) {
1542: case '0': {
1543: match('0');
1544: break;
1545: }
1546: case '1': {
1547: match('1');
1548: break;
1549: }
1550: default: {
1551: if (_cnt413 >= 1) {
1552: break _loop413;
1553: } else {
1554: throw new NoViableAltForCharException(
1555: (char) LA(1), getFilename(), getLine(),
1556: getColumn());
1557: }
1558: }
1559: }
1560: _cnt413++;
1561: } while (true);
1562: }
1563: match('\'');
1564: if (_createToken && _token == null && _ttype != Token.SKIP) {
1565: _token = makeToken(_ttype);
1566: _token.setText(new String(text.getBuffer(), _begin, text
1567: .length()
1568: - _begin));
1569: }
1570: _returnToken = _token;
1571: }
1572:
1573: public final void mHEXSTR(boolean _createToken)
1574: throws RecognitionException, CharStreamException,
1575: TokenStreamException {
1576: int _ttype;
1577: Token _token = null;
1578: int _begin = text.length();
1579: _ttype = HEXSTR;
1580: int _saveIndex;
1581:
1582: match('X');
1583: match('\'');
1584: {
1585: int _cnt416 = 0;
1586: _loop416: do {
1587: if ((_tokenSet_0.member(LA(1)))) {
1588: mHEXDIGIT(false);
1589: } else {
1590: if (_cnt416 >= 1) {
1591: break _loop416;
1592: } else {
1593: throw new NoViableAltForCharException(
1594: (char) LA(1), getFilename(), getLine(),
1595: getColumn());
1596: }
1597: }
1598:
1599: _cnt416++;
1600: } while (true);
1601: }
1602: match('\'');
1603: if (_createToken && _token == null && _ttype != Token.SKIP) {
1604: _token = makeToken(_ttype);
1605: _token.setText(new String(text.getBuffer(), _begin, text
1606: .length()
1607: - _begin));
1608: }
1609: _returnToken = _token;
1610: }
1611:
1612: public final void mID(boolean _createToken)
1613: throws RecognitionException, CharStreamException,
1614: TokenStreamException {
1615: int _ttype;
1616: Token _token = null;
1617: int _begin = text.length();
1618: _ttype = ID;
1619: int _saveIndex;
1620:
1621: mIDTERM(false);
1622: {
1623: if ((LA(1) == '.')) {
1624: match('.');
1625: {
1626: switch (LA(1)) {
1627: case '*': {
1628: match('*');
1629: break;
1630: }
1631: case '"':
1632: case 'A':
1633: case 'B':
1634: case 'C':
1635: case 'D':
1636: case 'E':
1637: case 'F':
1638: case 'G':
1639: case 'H':
1640: case 'I':
1641: case 'J':
1642: case 'K':
1643: case 'L':
1644: case 'M':
1645: case 'N':
1646: case 'O':
1647: case 'P':
1648: case 'Q':
1649: case 'R':
1650: case 'S':
1651: case 'T':
1652: case 'U':
1653: case 'V':
1654: case 'W':
1655: case 'X':
1656: case 'Y':
1657: case 'Z':
1658: case '_':
1659: case 'a':
1660: case 'b':
1661: case 'c':
1662: case 'd':
1663: case 'e':
1664: case 'f':
1665: case 'g':
1666: case 'h':
1667: case 'i':
1668: case 'j':
1669: case 'k':
1670: case 'l':
1671: case 'm':
1672: case 'n':
1673: case 'o':
1674: case 'p':
1675: case 'q':
1676: case 'r':
1677: case 's':
1678: case 't':
1679: case 'u':
1680: case 'v':
1681: case 'w':
1682: case 'x':
1683: case 'y':
1684: case 'z': {
1685: {
1686: mIDTERM(false);
1687: {
1688: if ((LA(1) == '.')) {
1689: match('.');
1690: {
1691: switch (LA(1)) {
1692: case '*': {
1693: match('*');
1694: break;
1695: }
1696: case '"':
1697: case 'A':
1698: case 'B':
1699: case 'C':
1700: case 'D':
1701: case 'E':
1702: case 'F':
1703: case 'G':
1704: case 'H':
1705: case 'I':
1706: case 'J':
1707: case 'K':
1708: case 'L':
1709: case 'M':
1710: case 'N':
1711: case 'O':
1712: case 'P':
1713: case 'Q':
1714: case 'R':
1715: case 'S':
1716: case 'T':
1717: case 'U':
1718: case 'V':
1719: case 'W':
1720: case 'X':
1721: case 'Y':
1722: case 'Z':
1723: case '_':
1724: case 'a':
1725: case 'b':
1726: case 'c':
1727: case 'd':
1728: case 'e':
1729: case 'f':
1730: case 'g':
1731: case 'h':
1732: case 'i':
1733: case 'j':
1734: case 'k':
1735: case 'l':
1736: case 'm':
1737: case 'n':
1738: case 'o':
1739: case 'p':
1740: case 'q':
1741: case 'r':
1742: case 's':
1743: case 't':
1744: case 'u':
1745: case 'v':
1746: case 'w':
1747: case 'x':
1748: case 'y':
1749: case 'z': {
1750: mIDTERM(false);
1751: break;
1752: }
1753: default: {
1754: throw new NoViableAltForCharException(
1755: (char) LA(1),
1756: getFilename(),
1757: getLine(),
1758: getColumn());
1759: }
1760: }
1761: }
1762: } else {
1763: }
1764:
1765: }
1766: }
1767: break;
1768: }
1769: default: {
1770: throw new NoViableAltForCharException(
1771: (char) LA(1), getFilename(), getLine(),
1772: getColumn());
1773: }
1774: }
1775: }
1776: } else {
1777: }
1778:
1779: }
1780: _ttype = testLiteralsTable(_ttype);
1781: if (_createToken && _token == null && _ttype != Token.SKIP) {
1782: _token = makeToken(_ttype);
1783: _token.setText(new String(text.getBuffer(), _begin, text
1784: .length()
1785: - _begin));
1786: }
1787: _returnToken = _token;
1788: }
1789:
1790: protected final void mIDTERM(boolean _createToken)
1791: throws RecognitionException, CharStreamException,
1792: TokenStreamException {
1793: int _ttype;
1794: Token _token = null;
1795: int _begin = text.length();
1796: _ttype = IDTERM;
1797: int _saveIndex;
1798:
1799: switch (LA(1)) {
1800: case 'A':
1801: case 'B':
1802: case 'C':
1803: case 'D':
1804: case 'E':
1805: case 'F':
1806: case 'G':
1807: case 'H':
1808: case 'I':
1809: case 'J':
1810: case 'K':
1811: case 'L':
1812: case 'M':
1813: case 'N':
1814: case 'O':
1815: case 'P':
1816: case 'Q':
1817: case 'R':
1818: case 'S':
1819: case 'T':
1820: case 'U':
1821: case 'V':
1822: case 'W':
1823: case 'X':
1824: case 'Y':
1825: case 'Z':
1826: case '_':
1827: case 'a':
1828: case 'b':
1829: case 'c':
1830: case 'd':
1831: case 'e':
1832: case 'f':
1833: case 'g':
1834: case 'h':
1835: case 'i':
1836: case 'j':
1837: case 'k':
1838: case 'l':
1839: case 'm':
1840: case 'n':
1841: case 'o':
1842: case 'p':
1843: case 'q':
1844: case 'r':
1845: case 's':
1846: case 't':
1847: case 'u':
1848: case 'v':
1849: case 'w':
1850: case 'x':
1851: case 'y':
1852: case 'z': {
1853: mSIMPID(false);
1854: break;
1855: }
1856: case '"': {
1857: mCASEID(false);
1858: break;
1859: }
1860: default: {
1861: throw new NoViableAltForCharException((char) LA(1),
1862: getFilename(), getLine(), getColumn());
1863: }
1864: }
1865: if (_createToken && _token == null && _ttype != Token.SKIP) {
1866: _token = makeToken(_ttype);
1867: _token.setText(new String(text.getBuffer(), _begin, text
1868: .length()
1869: - _begin));
1870: }
1871: _returnToken = _token;
1872: }
1873:
1874: protected final void mIDCHAR(boolean _createToken)
1875: throws RecognitionException, CharStreamException,
1876: TokenStreamException {
1877: int _ttype;
1878: Token _token = null;
1879: int _begin = text.length();
1880: _ttype = IDCHAR;
1881: int _saveIndex;
1882:
1883: {
1884: switch (LA(1)) {
1885: case 'a':
1886: case 'b':
1887: case 'c':
1888: case 'd':
1889: case 'e':
1890: case 'f':
1891: case 'g':
1892: case 'h':
1893: case 'i':
1894: case 'j':
1895: case 'k':
1896: case 'l':
1897: case 'm':
1898: case 'n':
1899: case 'o':
1900: case 'p':
1901: case 'q':
1902: case 'r':
1903: case 's':
1904: case 't':
1905: case 'u':
1906: case 'v':
1907: case 'w':
1908: case 'x':
1909: case 'y':
1910: case 'z': {
1911: matchRange('a', 'z');
1912: break;
1913: }
1914: case 'A':
1915: case 'B':
1916: case 'C':
1917: case 'D':
1918: case 'E':
1919: case 'F':
1920: case 'G':
1921: case 'H':
1922: case 'I':
1923: case 'J':
1924: case 'K':
1925: case 'L':
1926: case 'M':
1927: case 'N':
1928: case 'O':
1929: case 'P':
1930: case 'Q':
1931: case 'R':
1932: case 'S':
1933: case 'T':
1934: case 'U':
1935: case 'V':
1936: case 'W':
1937: case 'X':
1938: case 'Y':
1939: case 'Z': {
1940: matchRange('A', 'Z');
1941: break;
1942: }
1943: case '_': {
1944: match('_');
1945: break;
1946: }
1947: default: {
1948: throw new NoViableAltForCharException((char) LA(1),
1949: getFilename(), getLine(), getColumn());
1950: }
1951: }
1952: }
1953: if (_createToken && _token == null && _ttype != Token.SKIP) {
1954: _token = makeToken(_ttype);
1955: _token.setText(new String(text.getBuffer(), _begin, text
1956: .length()
1957: - _begin));
1958: }
1959: _returnToken = _token;
1960: }
1961:
1962: protected final void mIDCHAR2(boolean _createToken)
1963: throws RecognitionException, CharStreamException,
1964: TokenStreamException {
1965: int _ttype;
1966: Token _token = null;
1967: int _begin = text.length();
1968: _ttype = IDCHAR2;
1969: int _saveIndex;
1970:
1971: switch (LA(1)) {
1972: case 'A':
1973: case 'B':
1974: case 'C':
1975: case 'D':
1976: case 'E':
1977: case 'F':
1978: case 'G':
1979: case 'H':
1980: case 'I':
1981: case 'J':
1982: case 'K':
1983: case 'L':
1984: case 'M':
1985: case 'N':
1986: case 'O':
1987: case 'P':
1988: case 'Q':
1989: case 'R':
1990: case 'S':
1991: case 'T':
1992: case 'U':
1993: case 'V':
1994: case 'W':
1995: case 'X':
1996: case 'Y':
1997: case 'Z':
1998: case '_':
1999: case 'a':
2000: case 'b':
2001: case 'c':
2002: case 'd':
2003: case 'e':
2004: case 'f':
2005: case 'g':
2006: case 'h':
2007: case 'i':
2008: case 'j':
2009: case 'k':
2010: case 'l':
2011: case 'm':
2012: case 'n':
2013: case 'o':
2014: case 'p':
2015: case 'q':
2016: case 'r':
2017: case 's':
2018: case 't':
2019: case 'u':
2020: case 'v':
2021: case 'w':
2022: case 'x':
2023: case 'y':
2024: case 'z': {
2025: mIDCHAR(false);
2026: break;
2027: }
2028: case '0':
2029: case '1':
2030: case '2':
2031: case '3':
2032: case '4':
2033: case '5':
2034: case '6':
2035: case '7':
2036: case '8':
2037: case '9': {
2038: mDIGIT(false);
2039: break;
2040: }
2041: default: {
2042: throw new NoViableAltForCharException((char) LA(1),
2043: getFilename(), getLine(), getColumn());
2044: }
2045: }
2046: if (_createToken && _token == null && _ttype != Token.SKIP) {
2047: _token = makeToken(_ttype);
2048: _token.setText(new String(text.getBuffer(), _begin, text
2049: .length()
2050: - _begin));
2051: }
2052: _returnToken = _token;
2053: }
2054:
2055: protected final void mSIMPID(boolean _createToken)
2056: throws RecognitionException, CharStreamException,
2057: TokenStreamException {
2058: int _ttype;
2059: Token _token = null;
2060: int _begin = text.length();
2061: _ttype = SIMPID;
2062: int _saveIndex;
2063:
2064: mIDCHAR(false);
2065: {
2066: _loop428: do {
2067: if ((_tokenSet_9.member(LA(1)))) {
2068: mIDCHAR2(false);
2069: } else {
2070: break _loop428;
2071: }
2072:
2073: } while (true);
2074: }
2075: if (_createToken && _token == null && _ttype != Token.SKIP) {
2076: _token = makeToken(_ttype);
2077: _token.setText(new String(text.getBuffer(), _begin, text
2078: .length()
2079: - _begin));
2080: }
2081: _returnToken = _token;
2082: }
2083:
2084: protected final void mCASEID(boolean _createToken)
2085: throws RecognitionException, CharStreamException,
2086: TokenStreamException {
2087: int _ttype;
2088: Token _token = null;
2089: int _begin = text.length();
2090: _ttype = CASEID;
2091: int _saveIndex;
2092:
2093: match('"');
2094: {
2095: _loop432: do {
2096: if ((LA(1) == '"') && (LA(2) == '"')) {
2097: match('"');
2098: {
2099: _saveIndex = text.length();
2100: match('"');
2101: text.setLength(_saveIndex);
2102: }
2103: } else if ((_tokenSet_10.member(LA(1)))) {
2104: matchNot('"');
2105: } else {
2106: break _loop432;
2107: }
2108:
2109: } while (true);
2110: }
2111: match('"');
2112: if (_createToken && _token == null && _ttype != Token.SKIP) {
2113: _token = makeToken(_ttype);
2114: _token.setText(new String(text.getBuffer(), _begin, text
2115: .length()
2116: - _begin));
2117: }
2118: _returnToken = _token;
2119: }
2120:
2121: private static final long[] mk_tokenSet_0() {
2122: long[] data = new long[1025];
2123: data[0] = 287948901175001088L;
2124: data[1] = 126L;
2125: for (int i = 2; i <= 1024; i++) {
2126: data[i] = 0L;
2127: }
2128: return data;
2129: }
2130:
2131: public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
2132:
2133: private static final long[] mk_tokenSet_1() {
2134: long[] data = new long[1025];
2135: data[0] = 287949450930814976L;
2136: data[1] = 126L;
2137: for (int i = 2; i <= 1024; i++) {
2138: data[i] = 0L;
2139: }
2140: return data;
2141: }
2142:
2143: public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
2144:
2145: private static final long[] mk_tokenSet_2() {
2146: long[] data = new long[1025];
2147: data[0] = 17179869184L;
2148: data[1] = 576460745995190270L;
2149: for (int i = 2; i <= 1024; i++) {
2150: data[i] = 0L;
2151: }
2152: return data;
2153: }
2154:
2155: public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
2156:
2157: private static final long[] mk_tokenSet_3() {
2158: long[] data = new long[2048];
2159: data[0] = -1025L;
2160: for (int i = 1; i <= 1022; i++) {
2161: data[i] = -1L;
2162: }
2163: data[1023] = 9223372036854775807L;
2164: for (int i = 1024; i <= 2047; i++) {
2165: data[i] = 0L;
2166: }
2167: return data;
2168: }
2169:
2170: public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
2171:
2172: private static final long[] mk_tokenSet_4() {
2173: long[] data = new long[2048];
2174: data[0] = -4398046512129L;
2175: for (int i = 1; i <= 1022; i++) {
2176: data[i] = -1L;
2177: }
2178: data[1023] = 9223372036854775807L;
2179: for (int i = 1024; i <= 2047; i++) {
2180: data[i] = 0L;
2181: }
2182: return data;
2183: }
2184:
2185: public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
2186:
2187: private static final long[] mk_tokenSet_5() {
2188: long[] data = new long[2048];
2189: data[0] = -549755813889L;
2190: for (int i = 1; i <= 1022; i++) {
2191: data[i] = -1L;
2192: }
2193: data[1023] = 9223372036854775807L;
2194: for (int i = 1024; i <= 2047; i++) {
2195: data[i] = 0L;
2196: }
2197: return data;
2198: }
2199:
2200: public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
2201:
2202: private static final long[] mk_tokenSet_6() {
2203: long[] data = new long[1025];
2204: data[0] = 287948901175001088L;
2205: data[1] = 137438953504L;
2206: for (int i = 2; i <= 1024; i++) {
2207: data[i] = 0L;
2208: }
2209: return data;
2210: }
2211:
2212: public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
2213:
2214: private static final long[] mk_tokenSet_7() {
2215: long[] data = new long[1025];
2216: data[0] = 287992881640112128L;
2217: data[1] = 137438953504L;
2218: for (int i = 2; i <= 1024; i++) {
2219: data[i] = 0L;
2220: }
2221: return data;
2222: }
2223:
2224: public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
2225:
2226: private static final long[] mk_tokenSet_8() {
2227: long[] data = new long[1025];
2228: data[0] = 288019269919178752L;
2229: for (int i = 1; i <= 1024; i++) {
2230: data[i] = 0L;
2231: }
2232: return data;
2233: }
2234:
2235: public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
2236:
2237: private static final long[] mk_tokenSet_9() {
2238: long[] data = new long[1025];
2239: data[0] = 287948901175001088L;
2240: data[1] = 576460745995190270L;
2241: for (int i = 2; i <= 1024; i++) {
2242: data[i] = 0L;
2243: }
2244: return data;
2245: }
2246:
2247: public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
2248:
2249: private static final long[] mk_tokenSet_10() {
2250: long[] data = new long[2048];
2251: data[0] = -17179869185L;
2252: for (int i = 1; i <= 1022; i++) {
2253: data[i] = -1L;
2254: }
2255: data[1023] = 9223372036854775807L;
2256: for (int i = 1024; i <= 2047; i++) {
2257: data[i] = 0L;
2258: }
2259: return data;
2260: }
2261:
2262: public static final BitSet _tokenSet_10 = new BitSet(
2263: mk_tokenSet_10());
2264:
2265: }
|