0001: // $ANTLR 2.7.2: "groovy.g" -> "GroovyLexer.java"$
0002:
0003: package org.codehaus.groovy.antlr.parser;
0004:
0005: import org.codehaus.groovy.antlr.*;
0006: import java.util.*;
0007: import java.io.InputStream;
0008: import java.io.Reader;
0009: import antlr.InputBuffer;
0010: import antlr.LexerSharedInputState;
0011:
0012: import java.io.InputStream;
0013: import antlr.TokenStreamException;
0014: import antlr.TokenStreamIOException;
0015: import antlr.TokenStreamRecognitionException;
0016: import antlr.CharStreamException;
0017: import antlr.CharStreamIOException;
0018: import antlr.ANTLRException;
0019: import java.io.Reader;
0020: import java.util.Hashtable;
0021: import antlr.CharScanner;
0022: import antlr.InputBuffer;
0023: import antlr.ByteBuffer;
0024: import antlr.CharBuffer;
0025: import antlr.Token;
0026: import antlr.CommonToken;
0027: import antlr.RecognitionException;
0028: import antlr.NoViableAltForCharException;
0029: import antlr.MismatchedCharException;
0030: import antlr.TokenStream;
0031: import antlr.ANTLRHashString;
0032: import antlr.LexerSharedInputState;
0033: import antlr.collections.impl.BitSet;
0034: import antlr.SemanticException;
0035:
0036: public class GroovyLexer extends antlr.CharScanner implements
0037: GroovyTokenTypes, TokenStream {
0038:
0039: /** flag for enabling the "assert" keyword */
0040: private boolean assertEnabled = true;
0041: /** flag for enabling the "enum" keyword */
0042: private boolean enumEnabled = true;
0043: /** flag for including whitespace tokens (for IDE preparsing) */
0044: private boolean whitespaceIncluded = false;
0045:
0046: /** Enable the "assert" keyword */
0047: public void enableAssert(boolean shouldEnable) {
0048: assertEnabled = shouldEnable;
0049: }
0050:
0051: /** Query the "assert" keyword state */
0052: public boolean isAssertEnabled() {
0053: return assertEnabled;
0054: }
0055:
0056: /** Enable the "enum" keyword */
0057: public void enableEnum(boolean shouldEnable) {
0058: enumEnabled = shouldEnable;
0059: }
0060:
0061: /** Query the "enum" keyword state */
0062: public boolean isEnumEnabled() {
0063: return enumEnabled;
0064: }
0065:
0066: /** Include whitespace tokens. Note that this breaks the parser. */
0067: public void setWhitespaceIncluded(boolean z) {
0068: whitespaceIncluded = z;
0069: }
0070:
0071: /** Are whitespace tokens included? */
0072: public boolean isWhitespaceIncluded() {
0073: return whitespaceIncluded;
0074: }
0075:
0076: {
0077: // Initialization actions performed on construction.
0078: setTabSize(1); // get rid of special tab interpretation, for IDEs and general clarity
0079: }
0080:
0081: /** Bumped when inside '[x]' or '(x)', reset inside '{x}'. See ONE_NL. */
0082: protected int parenLevel = 0;
0083: protected int suppressNewline = 0; // be really mean to newlines inside strings
0084: protected static final int SCS_TYPE = 3, SCS_VAL = 4, SCS_LIT = 8,
0085: SCS_LIMIT = 16;
0086: protected static final int SCS_SQ_TYPE = 0, SCS_TQ_TYPE = 1,
0087: SCS_RE_TYPE = 2;
0088: protected int stringCtorState = 0; // hack string and regexp constructor boundaries
0089: /** Push parenLevel here and reset whenever inside '{x}'. */
0090: protected ArrayList parenLevelStack = new ArrayList();
0091: protected int lastSigTokenType = EOF; // last returned non-whitespace token
0092:
0093: protected void pushParenLevel() {
0094: parenLevelStack.add(new Integer(parenLevel * SCS_LIMIT
0095: + stringCtorState));
0096: parenLevel = 0;
0097: stringCtorState = 0;
0098: }
0099:
0100: protected void popParenLevel() {
0101: int npl = parenLevelStack.size();
0102: if (npl == 0)
0103: return;
0104: int i = ((Integer) parenLevelStack.remove(--npl)).intValue();
0105: parenLevel = i / SCS_LIMIT;
0106: stringCtorState = i % SCS_LIMIT;
0107: }
0108:
0109: protected void restartStringCtor(boolean expectLiteral) {
0110: if (stringCtorState != 0) {
0111: stringCtorState = (expectLiteral ? SCS_LIT : SCS_VAL)
0112: + (stringCtorState & SCS_TYPE);
0113: }
0114: }
0115:
0116: protected boolean allowRegexpLiteral() {
0117: return !isExpressionEndingToken(lastSigTokenType);
0118: }
0119:
0120: /** Return true for an operator or punctuation which can end an expression.
0121: * Return true for keywords, identifiers, and literals.
0122: * Return true for tokens which can end expressions (right brackets, ++, --).
0123: * Return false for EOF and all other operator and punctuation tokens.
0124: * Used to suppress the recognition of /foo/ as opposed to the simple division operator '/'.
0125: */
0126: // Cf. 'constant' and 'balancedBrackets' rules in the grammar.)
0127: protected static boolean isExpressionEndingToken(int ttype) {
0128: switch (ttype) {
0129: case INC: // x++ / y
0130: case DEC: // x-- / y
0131: case RPAREN: // (x) / y
0132: case RBRACK: // f[x] / y
0133: case RCURLY: // f{x} / y
0134: case STRING_LITERAL: // "x" / y
0135: case STRING_CTOR_END: // "$x" / y
0136: case NUM_INT: // 0 / y
0137: case NUM_FLOAT: // 0f / y
0138: case NUM_LONG: // 0l / y
0139: case NUM_DOUBLE: // 0.0 / y
0140: case NUM_BIG_INT: // 0g / y
0141: case NUM_BIG_DECIMAL: // 0.0g / y
0142: case IDENT: // x / y
0143: // and a bunch of keywords (all of them; no sense picking and choosing):
0144: case LITERAL_any:
0145: case LITERAL_as:
0146: case LITERAL_assert:
0147: case LITERAL_boolean:
0148: case LITERAL_break:
0149: case LITERAL_byte:
0150: case LITERAL_case:
0151: case LITERAL_catch:
0152: case LITERAL_char:
0153: case LITERAL_class:
0154: case LITERAL_continue:
0155: case LITERAL_def:
0156: case LITERAL_default:
0157: case LITERAL_double:
0158: case LITERAL_else:
0159: case LITERAL_enum:
0160: case LITERAL_extends:
0161: case LITERAL_false:
0162: case LITERAL_finally:
0163: case LITERAL_float:
0164: case LITERAL_for:
0165: case LITERAL_if:
0166: case LITERAL_implements :
0167: case LITERAL_import:
0168: case LITERAL_in:
0169: case LITERAL_instanceof :
0170: case LITERAL_int:
0171: case LITERAL_interface:
0172: case LITERAL_long:
0173: case LITERAL_native:
0174: case LITERAL_new:
0175: case LITERAL_null:
0176: case LITERAL_package:
0177: case LITERAL_private:
0178: case LITERAL_protected:
0179: case LITERAL_public:
0180: case LITERAL_return:
0181: case LITERAL_short:
0182: case LITERAL_static:
0183: case LITERAL_super :
0184: case LITERAL_switch:
0185: case LITERAL_synchronized:
0186: case LITERAL_this :
0187: case LITERAL_threadsafe:
0188: case LITERAL_throw:
0189: case LITERAL_throws:
0190: case LITERAL_transient:
0191: case LITERAL_true:
0192: case LITERAL_try:
0193: case LITERAL_void:
0194: case LITERAL_volatile:
0195: case LITERAL_while:
0196: case LITERAL_with:
0197: return true;
0198: default:
0199: return false;
0200: }
0201: }
0202:
0203: protected void newlineCheck(boolean check)
0204: throws RecognitionException {
0205: if (check && suppressNewline > 0) {
0206: require(
0207: suppressNewline == 0,
0208: "end of line reached within a simple string 'x' or \"x\" or /x/",
0209: "for multi-line literals, use triple quotes '''x''' or \"\"\"x\"\"\"");
0210: suppressNewline = 0; // shut down any flood of errors
0211: }
0212: newline();
0213: }
0214:
0215: protected boolean atValidDollarEscape() throws CharStreamException {
0216: // '$' (('*')? ('{' | LETTER)) =>
0217: int k = 1;
0218: char lc = LA(k++);
0219: if (lc != '$')
0220: return false;
0221: lc = LA(k++);
0222: if (lc == '*')
0223: lc = LA(k++);
0224: return (lc == '{' || (lc != '$' && Character
0225: .isJavaIdentifierStart(lc)));
0226: }
0227:
0228: /** This is a bit of plumbing which resumes collection of string constructor bodies,
0229: * after an embedded expression has been parsed.
0230: * Usage: new GroovyRecognizer(new GroovyLexer(in).plumb()).
0231: */
0232: public TokenStream plumb() {
0233: return new TokenStream() {
0234: public Token nextToken() throws TokenStreamException {
0235: if (stringCtorState >= SCS_LIT) {
0236: // This goo is modeled upon the ANTLR code for nextToken:
0237: int quoteType = (stringCtorState & SCS_TYPE);
0238: stringCtorState = 0; // get out of this mode, now
0239: resetText();
0240: try {
0241: switch (quoteType) {
0242: case SCS_SQ_TYPE:
0243: mSTRING_CTOR_END(true, /*fromStart:*/
0244: false, false);
0245: break;
0246: case SCS_TQ_TYPE:
0247: mSTRING_CTOR_END(true, /*fromStart:*/
0248: false, true);
0249: break;
0250: case SCS_RE_TYPE:
0251: mREGEXP_CTOR_END(true, /*fromStart:*/false);
0252: break;
0253: default:
0254: throw new AssertionError(false);
0255: }
0256: lastSigTokenType = _returnToken.getType();
0257: return _returnToken;
0258: } catch (RecognitionException e) {
0259: throw new TokenStreamRecognitionException(e);
0260: } catch (CharStreamException cse) {
0261: if (cse instanceof CharStreamIOException) {
0262: throw new TokenStreamIOException(
0263: ((CharStreamIOException) cse).io);
0264: } else {
0265: throw new TokenStreamException(cse
0266: .getMessage());
0267: }
0268: }
0269: }
0270: Token token = GroovyLexer.this .nextToken();
0271: int lasttype = token.getType();
0272: if (whitespaceIncluded) {
0273: switch (lasttype) { // filter out insignificant types
0274: case WS:
0275: case ONE_NL:
0276: case SL_COMMENT:
0277: case ML_COMMENT:
0278: lasttype = lastSigTokenType; // back up!
0279: }
0280: }
0281: lastSigTokenType = lasttype;
0282: return token;
0283: }
0284: };
0285: }
0286:
0287: // stuff to adjust ANTLR's tracing machinery
0288: public static boolean tracing = false; // only effective if antlr.Tool is run with -traceLexer
0289:
0290: public void traceIn(String rname) throws CharStreamException {
0291: if (!GroovyLexer.tracing)
0292: return;
0293: super .traceIn(rname);
0294: }
0295:
0296: public void traceOut(String rname) throws CharStreamException {
0297: if (!GroovyLexer.tracing)
0298: return;
0299: if (_returnToken != null)
0300: rname += tokenStringOf(_returnToken);
0301: super .traceOut(rname);
0302: }
0303:
0304: private static java.util.HashMap ttypes;
0305:
0306: private static String tokenStringOf(Token t) {
0307: if (ttypes == null) {
0308: java.util.HashMap map = new java.util.HashMap();
0309: java.lang.reflect.Field[] fields = GroovyTokenTypes.class
0310: .getDeclaredFields();
0311: for (int i = 0; i < fields.length; i++) {
0312: if (fields[i].getType() != int.class)
0313: continue;
0314: try {
0315: map.put(fields[i].get(null), fields[i].getName());
0316: } catch (IllegalAccessException ee) {
0317: }
0318: }
0319: ttypes = map;
0320: }
0321: Integer tt = new Integer(t.getType());
0322: Object ttn = ttypes.get(tt);
0323: if (ttn == null)
0324: ttn = "<" + tt + ">";
0325: return "[" + ttn + ",\"" + t.getText() + "\"]";
0326: }
0327:
0328: protected GroovyRecognizer parser; // little-used link; TODO: get rid of
0329:
0330: private void require(boolean z, String problem, String solution)
0331: throws SemanticException {
0332: // TODO: Direct to a common error handler, rather than through the parser.
0333: if (!z)
0334: parser.requireFailed(problem, solution);
0335: }
0336:
0337: public GroovyLexer(InputStream in) {
0338: this (new ByteBuffer(in));
0339: }
0340:
0341: public GroovyLexer(Reader in) {
0342: this (new CharBuffer(in));
0343: }
0344:
0345: public GroovyLexer(InputBuffer ib) {
0346: this (new LexerSharedInputState(ib));
0347: }
0348:
0349: public GroovyLexer(LexerSharedInputState state) {
0350: super (state);
0351: caseSensitiveLiterals = true;
0352: setCaseSensitive(true);
0353: literals = new Hashtable();
0354: literals.put(new ANTLRHashString("byte", this ),
0355: new Integer(101));
0356: literals.put(new ANTLRHashString("public", this ), new Integer(
0357: 112));
0358: literals.put(new ANTLRHashString("case", this ),
0359: new Integer(148));
0360: literals.put(new ANTLRHashString("short", this ), new Integer(
0361: 103));
0362: literals.put(new ANTLRHashString("break", this ), new Integer(
0363: 142));
0364: literals.put(new ANTLRHashString("while", this ), new Integer(
0365: 136));
0366: literals
0367: .put(new ANTLRHashString("new", this ), new Integer(192));
0368: literals.put(new ANTLRHashString("instanceof", this ),
0369: new Integer(178));
0370: literals.put(new ANTLRHashString("implements", this ),
0371: new Integer(128));
0372: literals.put(new ANTLRHashString("synchronized", this ),
0373: new Integer(117));
0374: literals.put(new ANTLRHashString("const", this ),
0375: new Integer(40));
0376: literals.put(new ANTLRHashString("float", this ), new Integer(
0377: 105));
0378: literals.put(new ANTLRHashString("package", this ), new Integer(
0379: 78));
0380: literals.put(new ANTLRHashString("return", this ), new Integer(
0381: 141));
0382: literals.put(new ANTLRHashString("throw", this ), new Integer(
0383: 144));
0384: literals.put(new ANTLRHashString("null", this ),
0385: new Integer(195));
0386: literals.put(new ANTLRHashString("def", this ), new Integer(81));
0387: literals.put(new ANTLRHashString("threadsafe", this ),
0388: new Integer(116));
0389: literals.put(new ANTLRHashString("protected", this ),
0390: new Integer(113));
0391: literals.put(new ANTLRHashString("class", this ),
0392: new Integer(88));
0393: literals.put(new ANTLRHashString("throws", this ), new Integer(
0394: 127));
0395: literals.put(new ANTLRHashString("do", this ), new Integer(41));
0396: literals.put(new ANTLRHashString("strictfp", this ),
0397: new Integer(42));
0398: literals.put(new ANTLRHashString("super", this ),
0399: new Integer(93));
0400: literals.put(new ANTLRHashString("with", this ),
0401: new Integer(137));
0402: literals.put(new ANTLRHashString("transient", this ),
0403: new Integer(114));
0404: literals.put(new ANTLRHashString("native", this ), new Integer(
0405: 115));
0406: literals.put(new ANTLRHashString("interface", this ),
0407: new Integer(89));
0408: literals.put(new ANTLRHashString("final", this ),
0409: new Integer(37));
0410: literals
0411: .put(new ANTLRHashString("any", this ), new Integer(108));
0412: literals.put(new ANTLRHashString("if", this ), new Integer(134));
0413: literals.put(new ANTLRHashString("double", this ), new Integer(
0414: 107));
0415: literals.put(new ANTLRHashString("volatile", this ),
0416: new Integer(118));
0417: literals.put(new ANTLRHashString("as", this ), new Integer(110));
0418: literals.put(new ANTLRHashString("assert", this ), new Integer(
0419: 145));
0420: literals.put(new ANTLRHashString("catch", this ), new Integer(
0421: 151));
0422: literals
0423: .put(new ANTLRHashString("try", this ), new Integer(149));
0424: literals
0425: .put(new ANTLRHashString("goto", this ), new Integer(39));
0426: literals
0427: .put(new ANTLRHashString("enum", this ), new Integer(90));
0428: literals
0429: .put(new ANTLRHashString("int", this ), new Integer(104));
0430: literals
0431: .put(new ANTLRHashString("for", this ), new Integer(139));
0432: literals.put(new ANTLRHashString("extends", this ), new Integer(
0433: 92));
0434: literals.put(new ANTLRHashString("boolean", this ), new Integer(
0435: 100));
0436: literals.put(new ANTLRHashString("char", this ),
0437: new Integer(102));
0438: literals.put(new ANTLRHashString("private", this ), new Integer(
0439: 111));
0440: literals.put(new ANTLRHashString("default", this ), new Integer(
0441: 126));
0442: literals.put(new ANTLRHashString("false", this ), new Integer(
0443: 194));
0444: literals.put(new ANTLRHashString("this", this ),
0445: new Integer(129));
0446: literals.put(new ANTLRHashString("static", this ), new Integer(
0447: 80));
0448: literals.put(new ANTLRHashString("abstract", this ),
0449: new Integer(38));
0450: literals.put(new ANTLRHashString("continue", this ),
0451: new Integer(143));
0452: literals.put(new ANTLRHashString("finally", this ), new Integer(
0453: 150));
0454: literals.put(new ANTLRHashString("else", this ),
0455: new Integer(135));
0456: literals.put(new ANTLRHashString("import", this ), new Integer(
0457: 79));
0458: literals.put(new ANTLRHashString("in", this ), new Integer(140));
0459: literals
0460: .put(new ANTLRHashString("void", this ), new Integer(99));
0461: literals.put(new ANTLRHashString("switch", this ), new Integer(
0462: 138));
0463: literals.put(new ANTLRHashString("true", this ),
0464: new Integer(193));
0465: literals.put(new ANTLRHashString("long", this ),
0466: new Integer(106));
0467: }
0468:
0469: public Token nextToken() throws TokenStreamException {
0470: Token theRetToken = null;
0471: tryAgain: for (;;) {
0472: Token _token = null;
0473: int _ttype = Token.INVALID_TYPE;
0474: resetText();
0475: try { // for char stream error handling
0476: try { // for lexical error handling
0477: switch (LA(1)) {
0478: case '(': {
0479: mLPAREN(true);
0480: theRetToken = _returnToken;
0481: break;
0482: }
0483: case ')': {
0484: mRPAREN(true);
0485: theRetToken = _returnToken;
0486: break;
0487: }
0488: case '[': {
0489: mLBRACK(true);
0490: theRetToken = _returnToken;
0491: break;
0492: }
0493: case ']': {
0494: mRBRACK(true);
0495: theRetToken = _returnToken;
0496: break;
0497: }
0498: case '{': {
0499: mLCURLY(true);
0500: theRetToken = _returnToken;
0501: break;
0502: }
0503: case '}': {
0504: mRCURLY(true);
0505: theRetToken = _returnToken;
0506: break;
0507: }
0508: case ':': {
0509: mCOLON(true);
0510: theRetToken = _returnToken;
0511: break;
0512: }
0513: case ',': {
0514: mCOMMA(true);
0515: theRetToken = _returnToken;
0516: break;
0517: }
0518: case '~': {
0519: mBNOT(true);
0520: theRetToken = _returnToken;
0521: break;
0522: }
0523: case ';': {
0524: mSEMI(true);
0525: theRetToken = _returnToken;
0526: break;
0527: }
0528: case '$': {
0529: mDOLLAR(true);
0530: theRetToken = _returnToken;
0531: break;
0532: }
0533: case '\t':
0534: case '\u000c':
0535: case ' ':
0536: case '\\': {
0537: mWS(true);
0538: theRetToken = _returnToken;
0539: break;
0540: }
0541: case '\n':
0542: case '\r': {
0543: mNLS(true);
0544: theRetToken = _returnToken;
0545: break;
0546: }
0547: case '"':
0548: case '\'': {
0549: mSTRING_LITERAL(true);
0550: theRetToken = _returnToken;
0551: break;
0552: }
0553: case '0':
0554: case '1':
0555: case '2':
0556: case '3':
0557: case '4':
0558: case '5':
0559: case '6':
0560: case '7':
0561: case '8':
0562: case '9': {
0563: mNUM_INT(true);
0564: theRetToken = _returnToken;
0565: break;
0566: }
0567: case '@': {
0568: mAT(true);
0569: theRetToken = _returnToken;
0570: break;
0571: }
0572: default:
0573: if ((LA(1) == '>') && (LA(2) == '>')
0574: && (LA(3) == '>') && (LA(4) == '=')) {
0575: mBSR_ASSIGN(true);
0576: theRetToken = _returnToken;
0577: } else if ((LA(1) == '<') && (LA(2) == '=')
0578: && (LA(3) == '>')) {
0579: mCOMPARE_TO(true);
0580: theRetToken = _returnToken;
0581: } else if ((LA(1) == '>') && (LA(2) == '>')
0582: && (LA(3) == '=')) {
0583: mSR_ASSIGN(true);
0584: theRetToken = _returnToken;
0585: } else if ((LA(1) == '>') && (LA(2) == '>')
0586: && (LA(3) == '>') && (true)) {
0587: mBSR(true);
0588: theRetToken = _returnToken;
0589: } else if ((LA(1) == '<') && (LA(2) == '<')
0590: && (LA(3) == '=')) {
0591: mSL_ASSIGN(true);
0592: theRetToken = _returnToken;
0593: } else if ((LA(1) == '.') && (LA(2) == '.')
0594: && (LA(3) == '<')) {
0595: mRANGE_EXCLUSIVE(true);
0596: theRetToken = _returnToken;
0597: } else if ((LA(1) == '.') && (LA(2) == '.')
0598: && (LA(3) == '.')) {
0599: mTRIPLE_DOT(true);
0600: theRetToken = _returnToken;
0601: } else if ((LA(1) == '=') && (LA(2) == '=')
0602: && (LA(3) == '~')) {
0603: mREGEX_MATCH(true);
0604: theRetToken = _returnToken;
0605: } else if ((LA(1) == '*') && (LA(2) == '*')
0606: && (LA(3) == '=')) {
0607: mSTAR_STAR_ASSIGN(true);
0608: theRetToken = _returnToken;
0609: } else if ((LA(1) == '=') && (LA(2) == '=')
0610: && (true)) {
0611: mEQUAL(true);
0612: theRetToken = _returnToken;
0613: } else if ((LA(1) == '!') && (LA(2) == '=')) {
0614: mNOT_EQUAL(true);
0615: theRetToken = _returnToken;
0616: } else if ((LA(1) == '+') && (LA(2) == '=')) {
0617: mPLUS_ASSIGN(true);
0618: theRetToken = _returnToken;
0619: } else if ((LA(1) == '+') && (LA(2) == '+')) {
0620: mINC(true);
0621: theRetToken = _returnToken;
0622: } else if ((LA(1) == '-') && (LA(2) == '=')) {
0623: mMINUS_ASSIGN(true);
0624: theRetToken = _returnToken;
0625: } else if ((LA(1) == '-') && (LA(2) == '-')) {
0626: mDEC(true);
0627: theRetToken = _returnToken;
0628: } else if ((LA(1) == '*') && (LA(2) == '=')) {
0629: mSTAR_ASSIGN(true);
0630: theRetToken = _returnToken;
0631: } else if ((LA(1) == '%') && (LA(2) == '=')) {
0632: mMOD_ASSIGN(true);
0633: theRetToken = _returnToken;
0634: } else if ((LA(1) == '>') && (LA(2) == '>')
0635: && (true)) {
0636: mSR(true);
0637: theRetToken = _returnToken;
0638: } else if ((LA(1) == '>') && (LA(2) == '=')) {
0639: mGE(true);
0640: theRetToken = _returnToken;
0641: } else if ((LA(1) == '<') && (LA(2) == '<')
0642: && (true)) {
0643: mSL(true);
0644: theRetToken = _returnToken;
0645: } else if ((LA(1) == '<') && (LA(2) == '=')
0646: && (true)) {
0647: mLE(true);
0648: theRetToken = _returnToken;
0649: } else if ((LA(1) == '^') && (LA(2) == '=')) {
0650: mBXOR_ASSIGN(true);
0651: theRetToken = _returnToken;
0652: } else if ((LA(1) == '|') && (LA(2) == '=')) {
0653: mBOR_ASSIGN(true);
0654: theRetToken = _returnToken;
0655: } else if ((LA(1) == '|') && (LA(2) == '|')) {
0656: mLOR(true);
0657: theRetToken = _returnToken;
0658: } else if ((LA(1) == '&') && (LA(2) == '=')) {
0659: mBAND_ASSIGN(true);
0660: theRetToken = _returnToken;
0661: } else if ((LA(1) == '&') && (LA(2) == '&')) {
0662: mLAND(true);
0663: theRetToken = _returnToken;
0664: } else if ((LA(1) == '.') && (LA(2) == '.')
0665: && (true)) {
0666: mRANGE_INCLUSIVE(true);
0667: theRetToken = _returnToken;
0668: } else if ((LA(1) == '*') && (LA(2) == '.')) {
0669: mSPREAD_DOT(true);
0670: theRetToken = _returnToken;
0671: } else if ((LA(1) == '?') && (LA(2) == '.')) {
0672: mOPTIONAL_DOT(true);
0673: theRetToken = _returnToken;
0674: } else if ((LA(1) == '.') && (LA(2) == '&')) {
0675: mMEMBER_POINTER(true);
0676: theRetToken = _returnToken;
0677: } else if ((LA(1) == '=') && (LA(2) == '~')) {
0678: mREGEX_FIND(true);
0679: theRetToken = _returnToken;
0680: } else if ((LA(1) == '*') && (LA(2) == '*')
0681: && (true)) {
0682: mSTAR_STAR(true);
0683: theRetToken = _returnToken;
0684: } else if ((LA(1) == '-') && (LA(2) == '>')) {
0685: mCLOSABLE_BLOCK_OP(true);
0686: theRetToken = _returnToken;
0687: } else if ((LA(1) == '/') && (LA(2) == '/')) {
0688: mSL_COMMENT(true);
0689: theRetToken = _returnToken;
0690: } else if ((LA(1) == '/') && (LA(2) == '*')) {
0691: mML_COMMENT(true);
0692: theRetToken = _returnToken;
0693: } else if ((LA(1) == '?') && (true)) {
0694: mQUESTION(true);
0695: theRetToken = _returnToken;
0696: } else if ((LA(1) == '.') && (true)) {
0697: mDOT(true);
0698: theRetToken = _returnToken;
0699: } else if ((LA(1) == '=') && (true)) {
0700: mASSIGN(true);
0701: theRetToken = _returnToken;
0702: } else if ((LA(1) == '!') && (true)) {
0703: mLNOT(true);
0704: theRetToken = _returnToken;
0705: } else if ((LA(1) == '+') && (true)) {
0706: mPLUS(true);
0707: theRetToken = _returnToken;
0708: } else if ((LA(1) == '-') && (true)) {
0709: mMINUS(true);
0710: theRetToken = _returnToken;
0711: } else if ((LA(1) == '*') && (true)) {
0712: mSTAR(true);
0713: theRetToken = _returnToken;
0714: } else if ((LA(1) == '%') && (true)) {
0715: mMOD(true);
0716: theRetToken = _returnToken;
0717: } else if ((LA(1) == '>') && (true)) {
0718: mGT(true);
0719: theRetToken = _returnToken;
0720: } else if ((LA(1) == '<') && (true)) {
0721: mLT(true);
0722: theRetToken = _returnToken;
0723: } else if ((LA(1) == '^') && (true)) {
0724: mBXOR(true);
0725: theRetToken = _returnToken;
0726: } else if ((LA(1) == '|') && (true)) {
0727: mBOR(true);
0728: theRetToken = _returnToken;
0729: } else if ((LA(1) == '&') && (true)) {
0730: mBAND(true);
0731: theRetToken = _returnToken;
0732: } else if (((LA(1) == '#'))
0733: && (getLine() == 1 && getColumn() == 1)) {
0734: mSH_COMMENT(true);
0735: theRetToken = _returnToken;
0736: } else if ((LA(1) == '/') && (true)) {
0737: mREGEXP_LITERAL(true);
0738: theRetToken = _returnToken;
0739: } else if ((_tokenSet_0.member(LA(1)))) {
0740: mIDENT(true);
0741: theRetToken = _returnToken;
0742: } else {
0743: if (LA(1) == EOF_CHAR) {
0744: uponEOF();
0745: _returnToken = makeToken(Token.EOF_TYPE);
0746: } else {
0747: throw new NoViableAltForCharException(
0748: (char) LA(1), getFilename(),
0749: getLine(), getColumn());
0750: }
0751: }
0752: }
0753: if (_returnToken == null)
0754: continue tryAgain; // found SKIP token
0755: _ttype = _returnToken.getType();
0756: _returnToken.setType(_ttype);
0757: return _returnToken;
0758: } catch (RecognitionException e) {
0759: throw new TokenStreamRecognitionException(e);
0760: }
0761: } catch (CharStreamException cse) {
0762: if (cse instanceof CharStreamIOException) {
0763: throw new TokenStreamIOException(
0764: ((CharStreamIOException) cse).io);
0765: } else {
0766: throw new TokenStreamException(cse.getMessage());
0767: }
0768: }
0769: }
0770: }
0771:
0772: public final void mQUESTION(boolean _createToken)
0773: throws RecognitionException, CharStreamException,
0774: TokenStreamException {
0775: int _ttype;
0776: Token _token = null;
0777: int _begin = text.length();
0778: _ttype = QUESTION;
0779: int _saveIndex;
0780:
0781: match('?');
0782: if (_createToken && _token == null && _ttype != Token.SKIP) {
0783: _token = makeToken(_ttype);
0784: _token.setText(new String(text.getBuffer(), _begin, text
0785: .length()
0786: - _begin));
0787: }
0788: _returnToken = _token;
0789: }
0790:
0791: public final void mLPAREN(boolean _createToken)
0792: throws RecognitionException, CharStreamException,
0793: TokenStreamException {
0794: int _ttype;
0795: Token _token = null;
0796: int _begin = text.length();
0797: _ttype = LPAREN;
0798: int _saveIndex;
0799:
0800: match('(');
0801: if (inputState.guessing == 0) {
0802: ++parenLevel;
0803: }
0804: if (_createToken && _token == null && _ttype != Token.SKIP) {
0805: _token = makeToken(_ttype);
0806: _token.setText(new String(text.getBuffer(), _begin, text
0807: .length()
0808: - _begin));
0809: }
0810: _returnToken = _token;
0811: }
0812:
0813: public final void mRPAREN(boolean _createToken)
0814: throws RecognitionException, CharStreamException,
0815: TokenStreamException {
0816: int _ttype;
0817: Token _token = null;
0818: int _begin = text.length();
0819: _ttype = RPAREN;
0820: int _saveIndex;
0821:
0822: match(')');
0823: if (inputState.guessing == 0) {
0824: --parenLevel;
0825: }
0826: if (_createToken && _token == null && _ttype != Token.SKIP) {
0827: _token = makeToken(_ttype);
0828: _token.setText(new String(text.getBuffer(), _begin, text
0829: .length()
0830: - _begin));
0831: }
0832: _returnToken = _token;
0833: }
0834:
0835: public final void mLBRACK(boolean _createToken)
0836: throws RecognitionException, CharStreamException,
0837: TokenStreamException {
0838: int _ttype;
0839: Token _token = null;
0840: int _begin = text.length();
0841: _ttype = LBRACK;
0842: int _saveIndex;
0843:
0844: match('[');
0845: if (inputState.guessing == 0) {
0846: ++parenLevel;
0847: }
0848: if (_createToken && _token == null && _ttype != Token.SKIP) {
0849: _token = makeToken(_ttype);
0850: _token.setText(new String(text.getBuffer(), _begin, text
0851: .length()
0852: - _begin));
0853: }
0854: _returnToken = _token;
0855: }
0856:
0857: public final void mRBRACK(boolean _createToken)
0858: throws RecognitionException, CharStreamException,
0859: TokenStreamException {
0860: int _ttype;
0861: Token _token = null;
0862: int _begin = text.length();
0863: _ttype = RBRACK;
0864: int _saveIndex;
0865:
0866: match(']');
0867: if (inputState.guessing == 0) {
0868: --parenLevel;
0869: }
0870: if (_createToken && _token == null && _ttype != Token.SKIP) {
0871: _token = makeToken(_ttype);
0872: _token.setText(new String(text.getBuffer(), _begin, text
0873: .length()
0874: - _begin));
0875: }
0876: _returnToken = _token;
0877: }
0878:
0879: public final void mLCURLY(boolean _createToken)
0880: throws RecognitionException, CharStreamException,
0881: TokenStreamException {
0882: int _ttype;
0883: Token _token = null;
0884: int _begin = text.length();
0885: _ttype = LCURLY;
0886: int _saveIndex;
0887:
0888: match('{');
0889: if (inputState.guessing == 0) {
0890: pushParenLevel();
0891: }
0892: if (_createToken && _token == null && _ttype != Token.SKIP) {
0893: _token = makeToken(_ttype);
0894: _token.setText(new String(text.getBuffer(), _begin, text
0895: .length()
0896: - _begin));
0897: }
0898: _returnToken = _token;
0899: }
0900:
0901: public final void mRCURLY(boolean _createToken)
0902: throws RecognitionException, CharStreamException,
0903: TokenStreamException {
0904: int _ttype;
0905: Token _token = null;
0906: int _begin = text.length();
0907: _ttype = RCURLY;
0908: int _saveIndex;
0909:
0910: match('}');
0911: if (inputState.guessing == 0) {
0912: popParenLevel();
0913: if (stringCtorState != 0)
0914: restartStringCtor(true);
0915: }
0916: if (_createToken && _token == null && _ttype != Token.SKIP) {
0917: _token = makeToken(_ttype);
0918: _token.setText(new String(text.getBuffer(), _begin, text
0919: .length()
0920: - _begin));
0921: }
0922: _returnToken = _token;
0923: }
0924:
0925: public final void mCOLON(boolean _createToken)
0926: throws RecognitionException, CharStreamException,
0927: TokenStreamException {
0928: int _ttype;
0929: Token _token = null;
0930: int _begin = text.length();
0931: _ttype = COLON;
0932: int _saveIndex;
0933:
0934: match(':');
0935: if (_createToken && _token == null && _ttype != Token.SKIP) {
0936: _token = makeToken(_ttype);
0937: _token.setText(new String(text.getBuffer(), _begin, text
0938: .length()
0939: - _begin));
0940: }
0941: _returnToken = _token;
0942: }
0943:
0944: public final void mCOMMA(boolean _createToken)
0945: throws RecognitionException, CharStreamException,
0946: TokenStreamException {
0947: int _ttype;
0948: Token _token = null;
0949: int _begin = text.length();
0950: _ttype = COMMA;
0951: int _saveIndex;
0952:
0953: match(',');
0954: if (_createToken && _token == null && _ttype != Token.SKIP) {
0955: _token = makeToken(_ttype);
0956: _token.setText(new String(text.getBuffer(), _begin, text
0957: .length()
0958: - _begin));
0959: }
0960: _returnToken = _token;
0961: }
0962:
0963: public final void mDOT(boolean _createToken)
0964: throws RecognitionException, CharStreamException,
0965: TokenStreamException {
0966: int _ttype;
0967: Token _token = null;
0968: int _begin = text.length();
0969: _ttype = DOT;
0970: int _saveIndex;
0971:
0972: match('.');
0973: if (_createToken && _token == null && _ttype != Token.SKIP) {
0974: _token = makeToken(_ttype);
0975: _token.setText(new String(text.getBuffer(), _begin, text
0976: .length()
0977: - _begin));
0978: }
0979: _returnToken = _token;
0980: }
0981:
0982: public final void mASSIGN(boolean _createToken)
0983: throws RecognitionException, CharStreamException,
0984: TokenStreamException {
0985: int _ttype;
0986: Token _token = null;
0987: int _begin = text.length();
0988: _ttype = ASSIGN;
0989: int _saveIndex;
0990:
0991: match('=');
0992: if (_createToken && _token == null && _ttype != Token.SKIP) {
0993: _token = makeToken(_ttype);
0994: _token.setText(new String(text.getBuffer(), _begin, text
0995: .length()
0996: - _begin));
0997: }
0998: _returnToken = _token;
0999: }
1000:
1001: public final void mCOMPARE_TO(boolean _createToken)
1002: throws RecognitionException, CharStreamException,
1003: TokenStreamException {
1004: int _ttype;
1005: Token _token = null;
1006: int _begin = text.length();
1007: _ttype = COMPARE_TO;
1008: int _saveIndex;
1009:
1010: match("<=>");
1011: if (_createToken && _token == null && _ttype != Token.SKIP) {
1012: _token = makeToken(_ttype);
1013: _token.setText(new String(text.getBuffer(), _begin, text
1014: .length()
1015: - _begin));
1016: }
1017: _returnToken = _token;
1018: }
1019:
1020: public final void mEQUAL(boolean _createToken)
1021: throws RecognitionException, CharStreamException,
1022: TokenStreamException {
1023: int _ttype;
1024: Token _token = null;
1025: int _begin = text.length();
1026: _ttype = EQUAL;
1027: int _saveIndex;
1028:
1029: match("==");
1030: if (_createToken && _token == null && _ttype != Token.SKIP) {
1031: _token = makeToken(_ttype);
1032: _token.setText(new String(text.getBuffer(), _begin, text
1033: .length()
1034: - _begin));
1035: }
1036: _returnToken = _token;
1037: }
1038:
1039: public final void mLNOT(boolean _createToken)
1040: throws RecognitionException, CharStreamException,
1041: TokenStreamException {
1042: int _ttype;
1043: Token _token = null;
1044: int _begin = text.length();
1045: _ttype = LNOT;
1046: int _saveIndex;
1047:
1048: match('!');
1049: if (_createToken && _token == null && _ttype != Token.SKIP) {
1050: _token = makeToken(_ttype);
1051: _token.setText(new String(text.getBuffer(), _begin, text
1052: .length()
1053: - _begin));
1054: }
1055: _returnToken = _token;
1056: }
1057:
1058: public final void mBNOT(boolean _createToken)
1059: throws RecognitionException, CharStreamException,
1060: TokenStreamException {
1061: int _ttype;
1062: Token _token = null;
1063: int _begin = text.length();
1064: _ttype = BNOT;
1065: int _saveIndex;
1066:
1067: match('~');
1068: if (_createToken && _token == null && _ttype != Token.SKIP) {
1069: _token = makeToken(_ttype);
1070: _token.setText(new String(text.getBuffer(), _begin, text
1071: .length()
1072: - _begin));
1073: }
1074: _returnToken = _token;
1075: }
1076:
1077: public final void mNOT_EQUAL(boolean _createToken)
1078: throws RecognitionException, CharStreamException,
1079: TokenStreamException {
1080: int _ttype;
1081: Token _token = null;
1082: int _begin = text.length();
1083: _ttype = NOT_EQUAL;
1084: int _saveIndex;
1085:
1086: match("!=");
1087: if (_createToken && _token == null && _ttype != Token.SKIP) {
1088: _token = makeToken(_ttype);
1089: _token.setText(new String(text.getBuffer(), _begin, text
1090: .length()
1091: - _begin));
1092: }
1093: _returnToken = _token;
1094: }
1095:
1096: protected final void mDIV(boolean _createToken)
1097: throws RecognitionException, CharStreamException,
1098: TokenStreamException {
1099: int _ttype;
1100: Token _token = null;
1101: int _begin = text.length();
1102: _ttype = DIV;
1103: int _saveIndex;
1104:
1105: match('/');
1106: if (_createToken && _token == null && _ttype != Token.SKIP) {
1107: _token = makeToken(_ttype);
1108: _token.setText(new String(text.getBuffer(), _begin, text
1109: .length()
1110: - _begin));
1111: }
1112: _returnToken = _token;
1113: }
1114:
1115: protected final void mDIV_ASSIGN(boolean _createToken)
1116: throws RecognitionException, CharStreamException,
1117: TokenStreamException {
1118: int _ttype;
1119: Token _token = null;
1120: int _begin = text.length();
1121: _ttype = DIV_ASSIGN;
1122: int _saveIndex;
1123:
1124: match("/=");
1125: if (_createToken && _token == null && _ttype != Token.SKIP) {
1126: _token = makeToken(_ttype);
1127: _token.setText(new String(text.getBuffer(), _begin, text
1128: .length()
1129: - _begin));
1130: }
1131: _returnToken = _token;
1132: }
1133:
1134: public final void mPLUS(boolean _createToken)
1135: throws RecognitionException, CharStreamException,
1136: TokenStreamException {
1137: int _ttype;
1138: Token _token = null;
1139: int _begin = text.length();
1140: _ttype = PLUS;
1141: int _saveIndex;
1142:
1143: match('+');
1144: if (_createToken && _token == null && _ttype != Token.SKIP) {
1145: _token = makeToken(_ttype);
1146: _token.setText(new String(text.getBuffer(), _begin, text
1147: .length()
1148: - _begin));
1149: }
1150: _returnToken = _token;
1151: }
1152:
1153: public final void mPLUS_ASSIGN(boolean _createToken)
1154: throws RecognitionException, CharStreamException,
1155: TokenStreamException {
1156: int _ttype;
1157: Token _token = null;
1158: int _begin = text.length();
1159: _ttype = PLUS_ASSIGN;
1160: int _saveIndex;
1161:
1162: match("+=");
1163: if (_createToken && _token == null && _ttype != Token.SKIP) {
1164: _token = makeToken(_ttype);
1165: _token.setText(new String(text.getBuffer(), _begin, text
1166: .length()
1167: - _begin));
1168: }
1169: _returnToken = _token;
1170: }
1171:
1172: public final void mINC(boolean _createToken)
1173: throws RecognitionException, CharStreamException,
1174: TokenStreamException {
1175: int _ttype;
1176: Token _token = null;
1177: int _begin = text.length();
1178: _ttype = INC;
1179: int _saveIndex;
1180:
1181: match("++");
1182: if (_createToken && _token == null && _ttype != Token.SKIP) {
1183: _token = makeToken(_ttype);
1184: _token.setText(new String(text.getBuffer(), _begin, text
1185: .length()
1186: - _begin));
1187: }
1188: _returnToken = _token;
1189: }
1190:
1191: public final void mMINUS(boolean _createToken)
1192: throws RecognitionException, CharStreamException,
1193: TokenStreamException {
1194: int _ttype;
1195: Token _token = null;
1196: int _begin = text.length();
1197: _ttype = MINUS;
1198: int _saveIndex;
1199:
1200: match('-');
1201: if (_createToken && _token == null && _ttype != Token.SKIP) {
1202: _token = makeToken(_ttype);
1203: _token.setText(new String(text.getBuffer(), _begin, text
1204: .length()
1205: - _begin));
1206: }
1207: _returnToken = _token;
1208: }
1209:
1210: public final void mMINUS_ASSIGN(boolean _createToken)
1211: throws RecognitionException, CharStreamException,
1212: TokenStreamException {
1213: int _ttype;
1214: Token _token = null;
1215: int _begin = text.length();
1216: _ttype = MINUS_ASSIGN;
1217: int _saveIndex;
1218:
1219: match("-=");
1220: if (_createToken && _token == null && _ttype != Token.SKIP) {
1221: _token = makeToken(_ttype);
1222: _token.setText(new String(text.getBuffer(), _begin, text
1223: .length()
1224: - _begin));
1225: }
1226: _returnToken = _token;
1227: }
1228:
1229: public final void mDEC(boolean _createToken)
1230: throws RecognitionException, CharStreamException,
1231: TokenStreamException {
1232: int _ttype;
1233: Token _token = null;
1234: int _begin = text.length();
1235: _ttype = DEC;
1236: int _saveIndex;
1237:
1238: match("--");
1239: if (_createToken && _token == null && _ttype != Token.SKIP) {
1240: _token = makeToken(_ttype);
1241: _token.setText(new String(text.getBuffer(), _begin, text
1242: .length()
1243: - _begin));
1244: }
1245: _returnToken = _token;
1246: }
1247:
1248: public final void mSTAR(boolean _createToken)
1249: throws RecognitionException, CharStreamException,
1250: TokenStreamException {
1251: int _ttype;
1252: Token _token = null;
1253: int _begin = text.length();
1254: _ttype = STAR;
1255: int _saveIndex;
1256:
1257: match('*');
1258: if (_createToken && _token == null && _ttype != Token.SKIP) {
1259: _token = makeToken(_ttype);
1260: _token.setText(new String(text.getBuffer(), _begin, text
1261: .length()
1262: - _begin));
1263: }
1264: _returnToken = _token;
1265: }
1266:
1267: public final void mSTAR_ASSIGN(boolean _createToken)
1268: throws RecognitionException, CharStreamException,
1269: TokenStreamException {
1270: int _ttype;
1271: Token _token = null;
1272: int _begin = text.length();
1273: _ttype = STAR_ASSIGN;
1274: int _saveIndex;
1275:
1276: match("*=");
1277: if (_createToken && _token == null && _ttype != Token.SKIP) {
1278: _token = makeToken(_ttype);
1279: _token.setText(new String(text.getBuffer(), _begin, text
1280: .length()
1281: - _begin));
1282: }
1283: _returnToken = _token;
1284: }
1285:
1286: public final void mMOD(boolean _createToken)
1287: throws RecognitionException, CharStreamException,
1288: TokenStreamException {
1289: int _ttype;
1290: Token _token = null;
1291: int _begin = text.length();
1292: _ttype = MOD;
1293: int _saveIndex;
1294:
1295: match('%');
1296: if (_createToken && _token == null && _ttype != Token.SKIP) {
1297: _token = makeToken(_ttype);
1298: _token.setText(new String(text.getBuffer(), _begin, text
1299: .length()
1300: - _begin));
1301: }
1302: _returnToken = _token;
1303: }
1304:
1305: public final void mMOD_ASSIGN(boolean _createToken)
1306: throws RecognitionException, CharStreamException,
1307: TokenStreamException {
1308: int _ttype;
1309: Token _token = null;
1310: int _begin = text.length();
1311: _ttype = MOD_ASSIGN;
1312: int _saveIndex;
1313:
1314: match("%=");
1315: if (_createToken && _token == null && _ttype != Token.SKIP) {
1316: _token = makeToken(_ttype);
1317: _token.setText(new String(text.getBuffer(), _begin, text
1318: .length()
1319: - _begin));
1320: }
1321: _returnToken = _token;
1322: }
1323:
1324: public final void mSR(boolean _createToken)
1325: throws RecognitionException, CharStreamException,
1326: TokenStreamException {
1327: int _ttype;
1328: Token _token = null;
1329: int _begin = text.length();
1330: _ttype = SR;
1331: int _saveIndex;
1332:
1333: match(">>");
1334: if (_createToken && _token == null && _ttype != Token.SKIP) {
1335: _token = makeToken(_ttype);
1336: _token.setText(new String(text.getBuffer(), _begin, text
1337: .length()
1338: - _begin));
1339: }
1340: _returnToken = _token;
1341: }
1342:
1343: public final void mSR_ASSIGN(boolean _createToken)
1344: throws RecognitionException, CharStreamException,
1345: TokenStreamException {
1346: int _ttype;
1347: Token _token = null;
1348: int _begin = text.length();
1349: _ttype = SR_ASSIGN;
1350: int _saveIndex;
1351:
1352: match(">>=");
1353: if (_createToken && _token == null && _ttype != Token.SKIP) {
1354: _token = makeToken(_ttype);
1355: _token.setText(new String(text.getBuffer(), _begin, text
1356: .length()
1357: - _begin));
1358: }
1359: _returnToken = _token;
1360: }
1361:
1362: public final void mBSR(boolean _createToken)
1363: throws RecognitionException, CharStreamException,
1364: TokenStreamException {
1365: int _ttype;
1366: Token _token = null;
1367: int _begin = text.length();
1368: _ttype = BSR;
1369: int _saveIndex;
1370:
1371: match(">>>");
1372: if (_createToken && _token == null && _ttype != Token.SKIP) {
1373: _token = makeToken(_ttype);
1374: _token.setText(new String(text.getBuffer(), _begin, text
1375: .length()
1376: - _begin));
1377: }
1378: _returnToken = _token;
1379: }
1380:
1381: public final void mBSR_ASSIGN(boolean _createToken)
1382: throws RecognitionException, CharStreamException,
1383: TokenStreamException {
1384: int _ttype;
1385: Token _token = null;
1386: int _begin = text.length();
1387: _ttype = BSR_ASSIGN;
1388: int _saveIndex;
1389:
1390: match(">>>=");
1391: if (_createToken && _token == null && _ttype != Token.SKIP) {
1392: _token = makeToken(_ttype);
1393: _token.setText(new String(text.getBuffer(), _begin, text
1394: .length()
1395: - _begin));
1396: }
1397: _returnToken = _token;
1398: }
1399:
1400: public final void mGE(boolean _createToken)
1401: throws RecognitionException, CharStreamException,
1402: TokenStreamException {
1403: int _ttype;
1404: Token _token = null;
1405: int _begin = text.length();
1406: _ttype = GE;
1407: int _saveIndex;
1408:
1409: match(">=");
1410: if (_createToken && _token == null && _ttype != Token.SKIP) {
1411: _token = makeToken(_ttype);
1412: _token.setText(new String(text.getBuffer(), _begin, text
1413: .length()
1414: - _begin));
1415: }
1416: _returnToken = _token;
1417: }
1418:
1419: public final void mGT(boolean _createToken)
1420: throws RecognitionException, CharStreamException,
1421: TokenStreamException {
1422: int _ttype;
1423: Token _token = null;
1424: int _begin = text.length();
1425: _ttype = GT;
1426: int _saveIndex;
1427:
1428: match(">");
1429: if (_createToken && _token == null && _ttype != Token.SKIP) {
1430: _token = makeToken(_ttype);
1431: _token.setText(new String(text.getBuffer(), _begin, text
1432: .length()
1433: - _begin));
1434: }
1435: _returnToken = _token;
1436: }
1437:
1438: public final void mSL(boolean _createToken)
1439: throws RecognitionException, CharStreamException,
1440: TokenStreamException {
1441: int _ttype;
1442: Token _token = null;
1443: int _begin = text.length();
1444: _ttype = SL;
1445: int _saveIndex;
1446:
1447: match("<<");
1448: if (_createToken && _token == null && _ttype != Token.SKIP) {
1449: _token = makeToken(_ttype);
1450: _token.setText(new String(text.getBuffer(), _begin, text
1451: .length()
1452: - _begin));
1453: }
1454: _returnToken = _token;
1455: }
1456:
1457: public final void mSL_ASSIGN(boolean _createToken)
1458: throws RecognitionException, CharStreamException,
1459: TokenStreamException {
1460: int _ttype;
1461: Token _token = null;
1462: int _begin = text.length();
1463: _ttype = SL_ASSIGN;
1464: int _saveIndex;
1465:
1466: match("<<=");
1467: if (_createToken && _token == null && _ttype != Token.SKIP) {
1468: _token = makeToken(_ttype);
1469: _token.setText(new String(text.getBuffer(), _begin, text
1470: .length()
1471: - _begin));
1472: }
1473: _returnToken = _token;
1474: }
1475:
1476: public final void mLE(boolean _createToken)
1477: throws RecognitionException, CharStreamException,
1478: TokenStreamException {
1479: int _ttype;
1480: Token _token = null;
1481: int _begin = text.length();
1482: _ttype = LE;
1483: int _saveIndex;
1484:
1485: match("<=");
1486: if (_createToken && _token == null && _ttype != Token.SKIP) {
1487: _token = makeToken(_ttype);
1488: _token.setText(new String(text.getBuffer(), _begin, text
1489: .length()
1490: - _begin));
1491: }
1492: _returnToken = _token;
1493: }
1494:
1495: public final void mLT(boolean _createToken)
1496: throws RecognitionException, CharStreamException,
1497: TokenStreamException {
1498: int _ttype;
1499: Token _token = null;
1500: int _begin = text.length();
1501: _ttype = LT;
1502: int _saveIndex;
1503:
1504: match('<');
1505: if (_createToken && _token == null && _ttype != Token.SKIP) {
1506: _token = makeToken(_ttype);
1507: _token.setText(new String(text.getBuffer(), _begin, text
1508: .length()
1509: - _begin));
1510: }
1511: _returnToken = _token;
1512: }
1513:
1514: public final void mBXOR(boolean _createToken)
1515: throws RecognitionException, CharStreamException,
1516: TokenStreamException {
1517: int _ttype;
1518: Token _token = null;
1519: int _begin = text.length();
1520: _ttype = BXOR;
1521: int _saveIndex;
1522:
1523: match('^');
1524: if (_createToken && _token == null && _ttype != Token.SKIP) {
1525: _token = makeToken(_ttype);
1526: _token.setText(new String(text.getBuffer(), _begin, text
1527: .length()
1528: - _begin));
1529: }
1530: _returnToken = _token;
1531: }
1532:
1533: public final void mBXOR_ASSIGN(boolean _createToken)
1534: throws RecognitionException, CharStreamException,
1535: TokenStreamException {
1536: int _ttype;
1537: Token _token = null;
1538: int _begin = text.length();
1539: _ttype = BXOR_ASSIGN;
1540: int _saveIndex;
1541:
1542: match("^=");
1543: if (_createToken && _token == null && _ttype != Token.SKIP) {
1544: _token = makeToken(_ttype);
1545: _token.setText(new String(text.getBuffer(), _begin, text
1546: .length()
1547: - _begin));
1548: }
1549: _returnToken = _token;
1550: }
1551:
1552: public final void mBOR(boolean _createToken)
1553: throws RecognitionException, CharStreamException,
1554: TokenStreamException {
1555: int _ttype;
1556: Token _token = null;
1557: int _begin = text.length();
1558: _ttype = BOR;
1559: int _saveIndex;
1560:
1561: match('|');
1562: if (_createToken && _token == null && _ttype != Token.SKIP) {
1563: _token = makeToken(_ttype);
1564: _token.setText(new String(text.getBuffer(), _begin, text
1565: .length()
1566: - _begin));
1567: }
1568: _returnToken = _token;
1569: }
1570:
1571: public final void mBOR_ASSIGN(boolean _createToken)
1572: throws RecognitionException, CharStreamException,
1573: TokenStreamException {
1574: int _ttype;
1575: Token _token = null;
1576: int _begin = text.length();
1577: _ttype = BOR_ASSIGN;
1578: int _saveIndex;
1579:
1580: match("|=");
1581: if (_createToken && _token == null && _ttype != Token.SKIP) {
1582: _token = makeToken(_ttype);
1583: _token.setText(new String(text.getBuffer(), _begin, text
1584: .length()
1585: - _begin));
1586: }
1587: _returnToken = _token;
1588: }
1589:
1590: public final void mLOR(boolean _createToken)
1591: throws RecognitionException, CharStreamException,
1592: TokenStreamException {
1593: int _ttype;
1594: Token _token = null;
1595: int _begin = text.length();
1596: _ttype = LOR;
1597: int _saveIndex;
1598:
1599: match("||");
1600: if (_createToken && _token == null && _ttype != Token.SKIP) {
1601: _token = makeToken(_ttype);
1602: _token.setText(new String(text.getBuffer(), _begin, text
1603: .length()
1604: - _begin));
1605: }
1606: _returnToken = _token;
1607: }
1608:
1609: public final void mBAND(boolean _createToken)
1610: throws RecognitionException, CharStreamException,
1611: TokenStreamException {
1612: int _ttype;
1613: Token _token = null;
1614: int _begin = text.length();
1615: _ttype = BAND;
1616: int _saveIndex;
1617:
1618: match('&');
1619: if (_createToken && _token == null && _ttype != Token.SKIP) {
1620: _token = makeToken(_ttype);
1621: _token.setText(new String(text.getBuffer(), _begin, text
1622: .length()
1623: - _begin));
1624: }
1625: _returnToken = _token;
1626: }
1627:
1628: public final void mBAND_ASSIGN(boolean _createToken)
1629: throws RecognitionException, CharStreamException,
1630: TokenStreamException {
1631: int _ttype;
1632: Token _token = null;
1633: int _begin = text.length();
1634: _ttype = BAND_ASSIGN;
1635: int _saveIndex;
1636:
1637: match("&=");
1638: if (_createToken && _token == null && _ttype != Token.SKIP) {
1639: _token = makeToken(_ttype);
1640: _token.setText(new String(text.getBuffer(), _begin, text
1641: .length()
1642: - _begin));
1643: }
1644: _returnToken = _token;
1645: }
1646:
1647: public final void mLAND(boolean _createToken)
1648: throws RecognitionException, CharStreamException,
1649: TokenStreamException {
1650: int _ttype;
1651: Token _token = null;
1652: int _begin = text.length();
1653: _ttype = LAND;
1654: int _saveIndex;
1655:
1656: match("&&");
1657: if (_createToken && _token == null && _ttype != Token.SKIP) {
1658: _token = makeToken(_ttype);
1659: _token.setText(new String(text.getBuffer(), _begin, text
1660: .length()
1661: - _begin));
1662: }
1663: _returnToken = _token;
1664: }
1665:
1666: public final void mSEMI(boolean _createToken)
1667: throws RecognitionException, CharStreamException,
1668: TokenStreamException {
1669: int _ttype;
1670: Token _token = null;
1671: int _begin = text.length();
1672: _ttype = SEMI;
1673: int _saveIndex;
1674:
1675: match(';');
1676: if (_createToken && _token == null && _ttype != Token.SKIP) {
1677: _token = makeToken(_ttype);
1678: _token.setText(new String(text.getBuffer(), _begin, text
1679: .length()
1680: - _begin));
1681: }
1682: _returnToken = _token;
1683: }
1684:
1685: public final void mDOLLAR(boolean _createToken)
1686: throws RecognitionException, CharStreamException,
1687: TokenStreamException {
1688: int _ttype;
1689: Token _token = null;
1690: int _begin = text.length();
1691: _ttype = DOLLAR;
1692: int _saveIndex;
1693:
1694: match('$');
1695: if (_createToken && _token == null && _ttype != Token.SKIP) {
1696: _token = makeToken(_ttype);
1697: _token.setText(new String(text.getBuffer(), _begin, text
1698: .length()
1699: - _begin));
1700: }
1701: _returnToken = _token;
1702: }
1703:
1704: public final void mRANGE_INCLUSIVE(boolean _createToken)
1705: throws RecognitionException, CharStreamException,
1706: TokenStreamException {
1707: int _ttype;
1708: Token _token = null;
1709: int _begin = text.length();
1710: _ttype = RANGE_INCLUSIVE;
1711: int _saveIndex;
1712:
1713: match("..");
1714: if (_createToken && _token == null && _ttype != Token.SKIP) {
1715: _token = makeToken(_ttype);
1716: _token.setText(new String(text.getBuffer(), _begin, text
1717: .length()
1718: - _begin));
1719: }
1720: _returnToken = _token;
1721: }
1722:
1723: public final void mRANGE_EXCLUSIVE(boolean _createToken)
1724: throws RecognitionException, CharStreamException,
1725: TokenStreamException {
1726: int _ttype;
1727: Token _token = null;
1728: int _begin = text.length();
1729: _ttype = RANGE_EXCLUSIVE;
1730: int _saveIndex;
1731:
1732: match("..<");
1733: if (_createToken && _token == null && _ttype != Token.SKIP) {
1734: _token = makeToken(_ttype);
1735: _token.setText(new String(text.getBuffer(), _begin, text
1736: .length()
1737: - _begin));
1738: }
1739: _returnToken = _token;
1740: }
1741:
1742: public final void mTRIPLE_DOT(boolean _createToken)
1743: throws RecognitionException, CharStreamException,
1744: TokenStreamException {
1745: int _ttype;
1746: Token _token = null;
1747: int _begin = text.length();
1748: _ttype = TRIPLE_DOT;
1749: int _saveIndex;
1750:
1751: match("...");
1752: if (_createToken && _token == null && _ttype != Token.SKIP) {
1753: _token = makeToken(_ttype);
1754: _token.setText(new String(text.getBuffer(), _begin, text
1755: .length()
1756: - _begin));
1757: }
1758: _returnToken = _token;
1759: }
1760:
1761: public final void mSPREAD_DOT(boolean _createToken)
1762: throws RecognitionException, CharStreamException,
1763: TokenStreamException {
1764: int _ttype;
1765: Token _token = null;
1766: int _begin = text.length();
1767: _ttype = SPREAD_DOT;
1768: int _saveIndex;
1769:
1770: match("*.");
1771: if (_createToken && _token == null && _ttype != Token.SKIP) {
1772: _token = makeToken(_ttype);
1773: _token.setText(new String(text.getBuffer(), _begin, text
1774: .length()
1775: - _begin));
1776: }
1777: _returnToken = _token;
1778: }
1779:
1780: public final void mOPTIONAL_DOT(boolean _createToken)
1781: throws RecognitionException, CharStreamException,
1782: TokenStreamException {
1783: int _ttype;
1784: Token _token = null;
1785: int _begin = text.length();
1786: _ttype = OPTIONAL_DOT;
1787: int _saveIndex;
1788:
1789: match("?.");
1790: if (_createToken && _token == null && _ttype != Token.SKIP) {
1791: _token = makeToken(_ttype);
1792: _token.setText(new String(text.getBuffer(), _begin, text
1793: .length()
1794: - _begin));
1795: }
1796: _returnToken = _token;
1797: }
1798:
1799: public final void mMEMBER_POINTER(boolean _createToken)
1800: throws RecognitionException, CharStreamException,
1801: TokenStreamException {
1802: int _ttype;
1803: Token _token = null;
1804: int _begin = text.length();
1805: _ttype = MEMBER_POINTER;
1806: int _saveIndex;
1807:
1808: match(".&");
1809: if (_createToken && _token == null && _ttype != Token.SKIP) {
1810: _token = makeToken(_ttype);
1811: _token.setText(new String(text.getBuffer(), _begin, text
1812: .length()
1813: - _begin));
1814: }
1815: _returnToken = _token;
1816: }
1817:
1818: public final void mREGEX_FIND(boolean _createToken)
1819: throws RecognitionException, CharStreamException,
1820: TokenStreamException {
1821: int _ttype;
1822: Token _token = null;
1823: int _begin = text.length();
1824: _ttype = REGEX_FIND;
1825: int _saveIndex;
1826:
1827: match("=~");
1828: if (_createToken && _token == null && _ttype != Token.SKIP) {
1829: _token = makeToken(_ttype);
1830: _token.setText(new String(text.getBuffer(), _begin, text
1831: .length()
1832: - _begin));
1833: }
1834: _returnToken = _token;
1835: }
1836:
1837: public final void mREGEX_MATCH(boolean _createToken)
1838: throws RecognitionException, CharStreamException,
1839: TokenStreamException {
1840: int _ttype;
1841: Token _token = null;
1842: int _begin = text.length();
1843: _ttype = REGEX_MATCH;
1844: int _saveIndex;
1845:
1846: match("==~");
1847: if (_createToken && _token == null && _ttype != Token.SKIP) {
1848: _token = makeToken(_ttype);
1849: _token.setText(new String(text.getBuffer(), _begin, text
1850: .length()
1851: - _begin));
1852: }
1853: _returnToken = _token;
1854: }
1855:
1856: public final void mSTAR_STAR(boolean _createToken)
1857: throws RecognitionException, CharStreamException,
1858: TokenStreamException {
1859: int _ttype;
1860: Token _token = null;
1861: int _begin = text.length();
1862: _ttype = STAR_STAR;
1863: int _saveIndex;
1864:
1865: match("**");
1866: if (_createToken && _token == null && _ttype != Token.SKIP) {
1867: _token = makeToken(_ttype);
1868: _token.setText(new String(text.getBuffer(), _begin, text
1869: .length()
1870: - _begin));
1871: }
1872: _returnToken = _token;
1873: }
1874:
1875: public final void mSTAR_STAR_ASSIGN(boolean _createToken)
1876: throws RecognitionException, CharStreamException,
1877: TokenStreamException {
1878: int _ttype;
1879: Token _token = null;
1880: int _begin = text.length();
1881: _ttype = STAR_STAR_ASSIGN;
1882: int _saveIndex;
1883:
1884: match("**=");
1885: if (_createToken && _token == null && _ttype != Token.SKIP) {
1886: _token = makeToken(_ttype);
1887: _token.setText(new String(text.getBuffer(), _begin, text
1888: .length()
1889: - _begin));
1890: }
1891: _returnToken = _token;
1892: }
1893:
1894: public final void mCLOSABLE_BLOCK_OP(boolean _createToken)
1895: throws RecognitionException, CharStreamException,
1896: TokenStreamException {
1897: int _ttype;
1898: Token _token = null;
1899: int _begin = text.length();
1900: _ttype = CLOSABLE_BLOCK_OP;
1901: int _saveIndex;
1902:
1903: match("->");
1904: if (_createToken && _token == null && _ttype != Token.SKIP) {
1905: _token = makeToken(_ttype);
1906: _token.setText(new String(text.getBuffer(), _begin, text
1907: .length()
1908: - _begin));
1909: }
1910: _returnToken = _token;
1911: }
1912:
1913: public final void mWS(boolean _createToken)
1914: throws RecognitionException, CharStreamException,
1915: TokenStreamException {
1916: int _ttype;
1917: Token _token = null;
1918: int _begin = text.length();
1919: _ttype = WS;
1920: int _saveIndex;
1921:
1922: {
1923: int _cnt547 = 0;
1924: _loop547: do {
1925: if ((LA(1) == '\\') && (LA(2) == '\n' || LA(2) == '\r')
1926: && (true) && (true)) {
1927: match('\\');
1928: mONE_NL(false, false);
1929: } else if ((LA(1) == ' ') && (true) && (true) && (true)) {
1930: match(' ');
1931: } else if ((LA(1) == '\t') && (true) && (true) && (true)) {
1932: match('\t');
1933: } else if ((LA(1) == '\u000c') && (true) && (true) && (true)) {
1934: match('\f');
1935: } else {
1936: if (_cnt547 >= 1) {
1937: break _loop547;
1938: } else {
1939: throw new NoViableAltForCharException(
1940: (char) LA(1), getFilename(), getLine(),
1941: getColumn());
1942: }
1943: }
1944:
1945: _cnt547++;
1946: } while (true);
1947: }
1948: if (inputState.guessing == 0) {
1949: if (!whitespaceIncluded)
1950: _ttype = Token.SKIP;
1951: }
1952: if (_createToken && _token == null && _ttype != Token.SKIP) {
1953: _token = makeToken(_ttype);
1954: _token.setText(new String(text.getBuffer(), _begin, text
1955: .length()
1956: - _begin));
1957: }
1958: _returnToken = _token;
1959: }
1960:
1961: protected final void mONE_NL(boolean _createToken, boolean check)
1962: throws RecognitionException, CharStreamException,
1963: TokenStreamException {
1964: int _ttype;
1965: Token _token = null;
1966: int _begin = text.length();
1967: _ttype = ONE_NL;
1968: int _saveIndex;
1969:
1970: {
1971: if ((LA(1) == '\r') && (LA(2) == '\n') && (true) && (true)) {
1972: _saveIndex = text.length();
1973: match("\r\n");
1974: text.setLength(_saveIndex);
1975: } else if ((LA(1) == '\r') && (true) && (true) && (true)) {
1976: _saveIndex = text.length();
1977: match('\r');
1978: text.setLength(_saveIndex);
1979: } else if ((LA(1) == '\n')) {
1980: _saveIndex = text.length();
1981: match('\n');
1982: text.setLength(_saveIndex);
1983: } else {
1984: throw new NoViableAltForCharException((char) LA(1),
1985: getFilename(), getLine(), getColumn());
1986: }
1987:
1988: }
1989: if (inputState.guessing == 0) {
1990:
1991: // update current line number for error reporting
1992: newlineCheck(check);
1993:
1994: }
1995: if (_createToken && _token == null && _ttype != Token.SKIP) {
1996: _token = makeToken(_ttype);
1997: _token.setText(new String(text.getBuffer(), _begin, text
1998: .length()
1999: - _begin));
2000: }
2001: _returnToken = _token;
2002: }
2003:
2004: public final void mNLS(boolean _createToken)
2005: throws RecognitionException, CharStreamException,
2006: TokenStreamException {
2007: int _ttype;
2008: Token _token = null;
2009: int _begin = text.length();
2010: _ttype = NLS;
2011: int _saveIndex;
2012:
2013: mONE_NL(false, true);
2014: {
2015: if (((LA(1) == '\t' || LA(1) == '\n' || LA(1) == '\u000c'
2016: || LA(1) == '\r' || LA(1) == ' ' || LA(1) == '/' || LA(1) == '\\'))
2017: && (!whitespaceIncluded)) {
2018: {
2019: int _cnt553 = 0;
2020: _loop553: do {
2021: switch (LA(1)) {
2022: case '\n':
2023: case '\r': {
2024: mONE_NL(false, true);
2025: break;
2026: }
2027: case '\t':
2028: case '\u000c':
2029: case ' ':
2030: case '\\': {
2031: mWS(false);
2032: break;
2033: }
2034: default:
2035: if ((LA(1) == '/') && (LA(2) == '/')) {
2036: mSL_COMMENT(false);
2037: } else if ((LA(1) == '/') && (LA(2) == '*')) {
2038: mML_COMMENT(false);
2039: } else {
2040: if (_cnt553 >= 1) {
2041: break _loop553;
2042: } else {
2043: throw new NoViableAltForCharException(
2044: (char) LA(1),
2045: getFilename(), getLine(),
2046: getColumn());
2047: }
2048: }
2049: }
2050: _cnt553++;
2051: } while (true);
2052: }
2053: } else {
2054: }
2055:
2056: }
2057: if (inputState.guessing == 0) {
2058: if (whitespaceIncluded) {
2059: // keep the token as-is
2060: } else if (parenLevel != 0) {
2061: // when directly inside parens, all newlines are ignored here
2062: _ttype = Token.SKIP;
2063: } else {
2064: // inside {...}, newlines must be explicitly matched as 'nls!'
2065: text.setLength(_begin);
2066: text.append("<newline>");
2067: }
2068:
2069: }
2070: if (_createToken && _token == null && _ttype != Token.SKIP) {
2071: _token = makeToken(_ttype);
2072: _token.setText(new String(text.getBuffer(), _begin, text
2073: .length()
2074: - _begin));
2075: }
2076: _returnToken = _token;
2077: }
2078:
2079: public final void mSL_COMMENT(boolean _createToken)
2080: throws RecognitionException, CharStreamException,
2081: TokenStreamException {
2082: int _ttype;
2083: Token _token = null;
2084: int _begin = text.length();
2085: _ttype = SL_COMMENT;
2086: int _saveIndex;
2087:
2088: match("//");
2089: {
2090: _loop557: do {
2091: if ((_tokenSet_1.member(LA(1))) && (true) && (true) && (true)) {
2092: {
2093: match(_tokenSet_1);
2094: }
2095: } else {
2096: break _loop557;
2097: }
2098:
2099: } while (true);
2100: }
2101: if (inputState.guessing == 0) {
2102: if (!whitespaceIncluded)
2103: _ttype = Token.SKIP;
2104: }
2105: if (_createToken && _token == null && _ttype != Token.SKIP) {
2106: _token = makeToken(_ttype);
2107: _token.setText(new String(text.getBuffer(), _begin, text
2108: .length()
2109: - _begin));
2110: }
2111: _returnToken = _token;
2112: }
2113:
2114: public final void mML_COMMENT(boolean _createToken)
2115: throws RecognitionException, CharStreamException,
2116: TokenStreamException {
2117: int _ttype;
2118: Token _token = null;
2119: int _begin = text.length();
2120: _ttype = ML_COMMENT;
2121: int _saveIndex;
2122:
2123: match("/*");
2124: {
2125: _loop567: do {
2126: boolean synPredMatched565 = false;
2127: if (((LA(1) == '*')
2128: && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe'))
2129: && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && (true))) {
2130: int _m565 = mark();
2131: synPredMatched565 = true;
2132: inputState.guessing++;
2133: try {
2134: {
2135: match('*');
2136: matchNot('/');
2137: }
2138: } catch (RecognitionException pe) {
2139: synPredMatched565 = false;
2140: }
2141: rewind(_m565);
2142: inputState.guessing--;
2143: }
2144: if (synPredMatched565) {
2145: match('*');
2146: } else if ((LA(1) == '\n' || LA(1) == '\r')) {
2147: mONE_NL(false, true);
2148: } else if ((_tokenSet_2.member(LA(1)))) {
2149: {
2150: match(_tokenSet_2);
2151: }
2152: } else {
2153: break _loop567;
2154: }
2155:
2156: } while (true);
2157: }
2158: match("*/");
2159: if (inputState.guessing == 0) {
2160: if (!whitespaceIncluded)
2161: _ttype = Token.SKIP;
2162: }
2163: if (_createToken && _token == null && _ttype != Token.SKIP) {
2164: _token = makeToken(_ttype);
2165: _token.setText(new String(text.getBuffer(), _begin, text
2166: .length()
2167: - _begin));
2168: }
2169: _returnToken = _token;
2170: }
2171:
2172: public final void mSH_COMMENT(boolean _createToken)
2173: throws RecognitionException, CharStreamException,
2174: TokenStreamException {
2175: int _ttype;
2176: Token _token = null;
2177: int _begin = text.length();
2178: _ttype = SH_COMMENT;
2179: int _saveIndex;
2180:
2181: if (!(getLine() == 1 && getColumn() == 1))
2182: throw new SemanticException(
2183: "getLine() == 1 && getColumn() == 1");
2184: match("#!");
2185: {
2186: _loop561: do {
2187: if ((_tokenSet_1.member(LA(1)))) {
2188: {
2189: match(_tokenSet_1);
2190: }
2191: } else {
2192: break _loop561;
2193: }
2194:
2195: } while (true);
2196: }
2197: if (inputState.guessing == 0) {
2198: if (!whitespaceIncluded)
2199: _ttype = Token.SKIP;
2200: }
2201: if (_createToken && _token == null && _ttype != Token.SKIP) {
2202: _token = makeToken(_ttype);
2203: _token.setText(new String(text.getBuffer(), _begin, text
2204: .length()
2205: - _begin));
2206: }
2207: _returnToken = _token;
2208: }
2209:
2210: public final void mSTRING_LITERAL(boolean _createToken)
2211: throws RecognitionException, CharStreamException,
2212: TokenStreamException {
2213: int _ttype;
2214: Token _token = null;
2215: int _begin = text.length();
2216: _ttype = STRING_LITERAL;
2217: int _saveIndex;
2218: int tt = 0;
2219:
2220: boolean synPredMatched570 = false;
2221: if (((LA(1) == '\'') && (LA(2) == '\'') && (LA(3) == '\'') && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe')))) {
2222: int _m570 = mark();
2223: synPredMatched570 = true;
2224: inputState.guessing++;
2225: try {
2226: {
2227: match("'''");
2228: }
2229: } catch (RecognitionException pe) {
2230: synPredMatched570 = false;
2231: }
2232: rewind(_m570);
2233: inputState.guessing--;
2234: }
2235: if (synPredMatched570) {
2236: _saveIndex = text.length();
2237: match("'''");
2238: text.setLength(_saveIndex);
2239: {
2240: _loop575: do {
2241: switch (LA(1)) {
2242: case '\\': {
2243: mESC(false);
2244: break;
2245: }
2246: case '"': {
2247: match('"');
2248: break;
2249: }
2250: case '$': {
2251: match('$');
2252: break;
2253: }
2254: case '\n':
2255: case '\r': {
2256: mSTRING_NL(false, true);
2257: break;
2258: }
2259: default:
2260: boolean synPredMatched574 = false;
2261: if (((LA(1) == '\'')
2262: && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe'))
2263: && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe')))) {
2264: int _m574 = mark();
2265: synPredMatched574 = true;
2266: inputState.guessing++;
2267: try {
2268: {
2269: match('\'');
2270: {
2271: if ((_tokenSet_3.member(LA(1)))) {
2272: matchNot('\'');
2273: } else if ((LA(1) == '\'')) {
2274: match('\'');
2275: matchNot('\'');
2276: } else {
2277: throw new NoViableAltForCharException(
2278: (char) LA(1),
2279: getFilename(),
2280: getLine(),
2281: getColumn());
2282: }
2283:
2284: }
2285: }
2286: } catch (RecognitionException pe) {
2287: synPredMatched574 = false;
2288: }
2289: rewind(_m574);
2290: inputState.guessing--;
2291: }
2292: if (synPredMatched574) {
2293: match('\'');
2294: } else if ((_tokenSet_4.member(LA(1)))) {
2295: mSTRING_CH(false);
2296: } else {
2297: break _loop575;
2298: }
2299: }
2300: } while (true);
2301: }
2302: _saveIndex = text.length();
2303: match("'''");
2304: text.setLength(_saveIndex);
2305: } else {
2306: boolean synPredMatched579 = false;
2307: if (((LA(1) == '"') && (LA(2) == '"') && (LA(3) == '"') && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe')))) {
2308: int _m579 = mark();
2309: synPredMatched579 = true;
2310: inputState.guessing++;
2311: try {
2312: {
2313: match("\"\"\"");
2314: }
2315: } catch (RecognitionException pe) {
2316: synPredMatched579 = false;
2317: }
2318: rewind(_m579);
2319: inputState.guessing--;
2320: }
2321: if (synPredMatched579) {
2322: _saveIndex = text.length();
2323: match("\"\"\"");
2324: text.setLength(_saveIndex);
2325: tt = mSTRING_CTOR_END(false, true, /*tripleQuote:*/
2326: true);
2327: if (inputState.guessing == 0) {
2328: _ttype = tt;
2329: }
2330: } else if ((LA(1) == '\'') && (_tokenSet_1.member(LA(2)))
2331: && (true) && (true)) {
2332: _saveIndex = text.length();
2333: match('\'');
2334: text.setLength(_saveIndex);
2335: if (inputState.guessing == 0) {
2336: ++suppressNewline;
2337: }
2338: {
2339: _loop577: do {
2340: switch (LA(1)) {
2341: case '\\': {
2342: mESC(false);
2343: break;
2344: }
2345: case '"': {
2346: match('"');
2347: break;
2348: }
2349: case '$': {
2350: match('$');
2351: break;
2352: }
2353: default:
2354: if ((_tokenSet_4.member(LA(1)))) {
2355: mSTRING_CH(false);
2356: } else {
2357: break _loop577;
2358: }
2359: }
2360: } while (true);
2361: }
2362: if (inputState.guessing == 0) {
2363: --suppressNewline;
2364: }
2365: _saveIndex = text.length();
2366: match('\'');
2367: text.setLength(_saveIndex);
2368: } else if ((LA(1) == '"')
2369: && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe'))
2370: && (true) && (true)) {
2371: _saveIndex = text.length();
2372: match('"');
2373: text.setLength(_saveIndex);
2374: if (inputState.guessing == 0) {
2375: ++suppressNewline;
2376: }
2377: tt = mSTRING_CTOR_END(false, true, /*tripleQuote:*/
2378: false);
2379: if (inputState.guessing == 0) {
2380: _ttype = tt;
2381: }
2382: } else {
2383: throw new NoViableAltForCharException((char) LA(1),
2384: getFilename(), getLine(), getColumn());
2385: }
2386: }
2387: if (_createToken && _token == null && _ttype != Token.SKIP) {
2388: _token = makeToken(_ttype);
2389: _token.setText(new String(text.getBuffer(), _begin, text
2390: .length()
2391: - _begin));
2392: }
2393: _returnToken = _token;
2394: }
2395:
2396: protected final void mSTRING_CH(boolean _createToken)
2397: throws RecognitionException, CharStreamException,
2398: TokenStreamException {
2399: int _ttype;
2400: Token _token = null;
2401: int _begin = text.length();
2402: _ttype = STRING_CH;
2403: int _saveIndex;
2404:
2405: {
2406: match(_tokenSet_4);
2407: }
2408: if (_createToken && _token == null && _ttype != Token.SKIP) {
2409: _token = makeToken(_ttype);
2410: _token.setText(new String(text.getBuffer(), _begin, text
2411: .length()
2412: - _begin));
2413: }
2414: _returnToken = _token;
2415: }
2416:
2417: protected final void mESC(boolean _createToken)
2418: throws RecognitionException, CharStreamException,
2419: TokenStreamException {
2420: int _ttype;
2421: Token _token = null;
2422: int _begin = text.length();
2423: _ttype = ESC;
2424: int _saveIndex;
2425:
2426: if ((LA(1) == '\\')
2427: && (LA(2) == '"' || LA(2) == '$' || LA(2) == '\''
2428: || LA(2) == '0' || LA(2) == '1' || LA(2) == '2'
2429: || LA(2) == '3' || LA(2) == '4' || LA(2) == '5'
2430: || LA(2) == '6' || LA(2) == '7'
2431: || LA(2) == '\\' || LA(2) == 'b'
2432: || LA(2) == 'f' || LA(2) == 'n' || LA(2) == 'r'
2433: || LA(2) == 't' || LA(2) == 'u')) {
2434: _saveIndex = text.length();
2435: match('\\');
2436: text.setLength(_saveIndex);
2437: {
2438: switch (LA(1)) {
2439: case 'n': {
2440: match('n');
2441: if (inputState.guessing == 0) {
2442: text.setLength(_begin);
2443: text.append("\n");
2444: }
2445: break;
2446: }
2447: case 'r': {
2448: match('r');
2449: if (inputState.guessing == 0) {
2450: text.setLength(_begin);
2451: text.append("\r");
2452: }
2453: break;
2454: }
2455: case 't': {
2456: match('t');
2457: if (inputState.guessing == 0) {
2458: text.setLength(_begin);
2459: text.append("\t");
2460: }
2461: break;
2462: }
2463: case 'b': {
2464: match('b');
2465: if (inputState.guessing == 0) {
2466: text.setLength(_begin);
2467: text.append("\b");
2468: }
2469: break;
2470: }
2471: case 'f': {
2472: match('f');
2473: if (inputState.guessing == 0) {
2474: text.setLength(_begin);
2475: text.append("\f");
2476: }
2477: break;
2478: }
2479: case '"': {
2480: match('"');
2481: break;
2482: }
2483: case '\'': {
2484: match('\'');
2485: break;
2486: }
2487: case '\\': {
2488: match('\\');
2489: break;
2490: }
2491: case '$': {
2492: match('$');
2493: break;
2494: }
2495: case 'u': {
2496: {
2497: int _cnt605 = 0;
2498: _loop605: do {
2499: if ((LA(1) == 'u')) {
2500: match('u');
2501: } else {
2502: if (_cnt605 >= 1) {
2503: break _loop605;
2504: } else {
2505: throw new NoViableAltForCharException(
2506: (char) LA(1),
2507: getFilename(), getLine(),
2508: getColumn());
2509: }
2510: }
2511:
2512: _cnt605++;
2513: } while (true);
2514: }
2515: if (inputState.guessing == 0) {
2516: text.setLength(_begin);
2517: text.append("");
2518: }
2519: mHEX_DIGIT(false);
2520: mHEX_DIGIT(false);
2521: mHEX_DIGIT(false);
2522: mHEX_DIGIT(false);
2523: if (inputState.guessing == 0) {
2524: char ch = (char) Integer.parseInt(new String(
2525: text.getBuffer(), _begin, text.length()
2526: - _begin), 16);
2527: text.setLength(_begin);
2528: text.append(ch);
2529: }
2530: break;
2531: }
2532: case '0':
2533: case '1':
2534: case '2':
2535: case '3': {
2536: matchRange('0', '3');
2537: {
2538: if (((LA(1) >= '0' && LA(1) <= '7'))
2539: && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe'))
2540: && (true) && (true)) {
2541: matchRange('0', '7');
2542: {
2543: if (((LA(1) >= '0' && LA(1) <= '7'))
2544: && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe'))
2545: && (true) && (true)) {
2546: matchRange('0', '7');
2547: } else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
2548: } else {
2549: throw new NoViableAltForCharException(
2550: (char) LA(1),
2551: getFilename(), getLine(),
2552: getColumn());
2553: }
2554:
2555: }
2556: } else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
2557: } else {
2558: throw new NoViableAltForCharException(
2559: (char) LA(1), getFilename(),
2560: getLine(), getColumn());
2561: }
2562:
2563: }
2564: if (inputState.guessing == 0) {
2565: char ch = (char) Integer.parseInt(new String(
2566: text.getBuffer(), _begin, text.length()
2567: - _begin), 8);
2568: text.setLength(_begin);
2569: text.append(ch);
2570: }
2571: break;
2572: }
2573: case '4':
2574: case '5':
2575: case '6':
2576: case '7': {
2577: matchRange('4', '7');
2578: {
2579: if (((LA(1) >= '0' && LA(1) <= '7'))
2580: && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe'))
2581: && (true) && (true)) {
2582: matchRange('0', '7');
2583: } else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
2584: } else {
2585: throw new NoViableAltForCharException(
2586: (char) LA(1), getFilename(),
2587: getLine(), getColumn());
2588: }
2589:
2590: }
2591: if (inputState.guessing == 0) {
2592: char ch = (char) Integer.parseInt(new String(
2593: text.getBuffer(), _begin, text.length()
2594: - _begin), 8);
2595: text.setLength(_begin);
2596: text.append(ch);
2597: }
2598: break;
2599: }
2600: default: {
2601: throw new NoViableAltForCharException((char) LA(1),
2602: getFilename(), getLine(), getColumn());
2603: }
2604: }
2605: }
2606: } else if ((LA(1) == '\\') && (LA(2) == '\n' || LA(2) == '\r')) {
2607: _saveIndex = text.length();
2608: match('\\');
2609: text.setLength(_saveIndex);
2610: _saveIndex = text.length();
2611: mONE_NL(false, false);
2612: text.setLength(_saveIndex);
2613: } else {
2614: throw new NoViableAltForCharException((char) LA(1),
2615: getFilename(), getLine(), getColumn());
2616: }
2617:
2618: if (_createToken && _token == null && _ttype != Token.SKIP) {
2619: _token = makeToken(_ttype);
2620: _token.setText(new String(text.getBuffer(), _begin, text
2621: .length()
2622: - _begin));
2623: }
2624: _returnToken = _token;
2625: }
2626:
2627: protected final void mSTRING_NL(boolean _createToken,
2628: boolean allowNewline) throws RecognitionException,
2629: CharStreamException, TokenStreamException {
2630: int _ttype;
2631: Token _token = null;
2632: int _begin = text.length();
2633: _ttype = STRING_NL;
2634: int _saveIndex;
2635:
2636: if (inputState.guessing == 0) {
2637: if (!allowNewline)
2638: throw new MismatchedCharException('\n', '\n', true,
2639: this );
2640: }
2641: mONE_NL(false, false);
2642: if (inputState.guessing == 0) {
2643: text.setLength(_begin);
2644: text.append('\n');
2645: }
2646: if (_createToken && _token == null && _ttype != Token.SKIP) {
2647: _token = makeToken(_ttype);
2648: _token.setText(new String(text.getBuffer(), _begin, text
2649: .length()
2650: - _begin));
2651: }
2652: _returnToken = _token;
2653: }
2654:
2655: protected final int mSTRING_CTOR_END(boolean _createToken,
2656: boolean fromStart, boolean tripleQuote)
2657: throws RecognitionException, CharStreamException,
2658: TokenStreamException {
2659: int tt = STRING_CTOR_END;
2660: int _ttype;
2661: Token _token = null;
2662: int _begin = text.length();
2663: _ttype = STRING_CTOR_END;
2664: int _saveIndex;
2665: boolean dollarOK = false;
2666:
2667: {
2668: _loop585: do {
2669: switch (LA(1)) {
2670: case '\\': {
2671: mESC(false);
2672: break;
2673: }
2674: case '\'': {
2675: match('\'');
2676: break;
2677: }
2678: case '\n':
2679: case '\r': {
2680: mSTRING_NL(false, tripleQuote);
2681: break;
2682: }
2683: default:
2684: boolean synPredMatched584 = false;
2685: if ((((LA(1) == '"')
2686: && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe'))
2687: && (true) && (true)) && (tripleQuote))) {
2688: int _m584 = mark();
2689: synPredMatched584 = true;
2690: inputState.guessing++;
2691: try {
2692: {
2693: match('"');
2694: {
2695: if ((_tokenSet_5.member(LA(1)))) {
2696: matchNot('"');
2697: } else if ((LA(1) == '"')) {
2698: match('"');
2699: matchNot('"');
2700: } else {
2701: throw new NoViableAltForCharException(
2702: (char) LA(1),
2703: getFilename(),
2704: getLine(), getColumn());
2705: }
2706:
2707: }
2708: }
2709: } catch (RecognitionException pe) {
2710: synPredMatched584 = false;
2711: }
2712: rewind(_m584);
2713: inputState.guessing--;
2714: }
2715: if (synPredMatched584) {
2716: match('"');
2717: } else if ((_tokenSet_4.member(LA(1)))) {
2718: mSTRING_CH(false);
2719: } else {
2720: break _loop585;
2721: }
2722: }
2723: } while (true);
2724: }
2725: {
2726: switch (LA(1)) {
2727: case '"': {
2728: {
2729: if (((LA(1) == '"') && (LA(2) == '"'))
2730: && (tripleQuote)) {
2731: _saveIndex = text.length();
2732: match("\"\"\"");
2733: text.setLength(_saveIndex);
2734: } else if (((LA(1) == '"') && (true))
2735: && (!tripleQuote)) {
2736: _saveIndex = text.length();
2737: match("\"");
2738: text.setLength(_saveIndex);
2739: } else {
2740: throw new NoViableAltForCharException(
2741: (char) LA(1), getFilename(), getLine(),
2742: getColumn());
2743: }
2744:
2745: }
2746: if (inputState.guessing == 0) {
2747:
2748: if (fromStart)
2749: tt = STRING_LITERAL; // plain string literal!
2750: if (!tripleQuote) {
2751: --suppressNewline;
2752: }
2753: // done with string constructor!
2754: //assert(stringCtorState == 0);
2755:
2756: }
2757: break;
2758: }
2759: case '$': {
2760: if (inputState.guessing == 0) {
2761: dollarOK = atValidDollarEscape();
2762: }
2763: _saveIndex = text.length();
2764: match('$');
2765: text.setLength(_saveIndex);
2766: if (inputState.guessing == 0) {
2767:
2768: require(
2769: dollarOK,
2770: "illegal string body character after dollar sign",
2771: "either escape a literal dollar sign \"\\$5\" or bracket the value expression \"${5}\"");
2772: // Yes, it's a string constructor, and we've got a value part.
2773: tt = (fromStart ? STRING_CTOR_START
2774: : STRING_CTOR_MIDDLE);
2775: stringCtorState = SCS_VAL
2776: + (tripleQuote ? SCS_TQ_TYPE : SCS_SQ_TYPE);
2777:
2778: }
2779: break;
2780: }
2781: default: {
2782: throw new NoViableAltForCharException((char) LA(1),
2783: getFilename(), getLine(), getColumn());
2784: }
2785: }
2786: }
2787: if (inputState.guessing == 0) {
2788: _ttype = tt;
2789: }
2790: if (_createToken && _token == null && _ttype != Token.SKIP) {
2791: _token = makeToken(_ttype);
2792: _token.setText(new String(text.getBuffer(), _begin, text
2793: .length()
2794: - _begin));
2795: }
2796: _returnToken = _token;
2797: return tt;
2798: }
2799:
2800: public final void mREGEXP_LITERAL(boolean _createToken)
2801: throws RecognitionException, CharStreamException,
2802: TokenStreamException {
2803: int _ttype;
2804: Token _token = null;
2805: int _begin = text.length();
2806: _ttype = REGEXP_LITERAL;
2807: int _saveIndex;
2808: int tt = 0;
2809:
2810: if (((LA(1) == '/') && (_tokenSet_6.member(LA(2))) && (true) && (true))
2811: && (allowRegexpLiteral())) {
2812: _saveIndex = text.length();
2813: match('/');
2814: text.setLength(_saveIndex);
2815: if (inputState.guessing == 0) {
2816: ++suppressNewline;
2817: }
2818: {
2819: if (((LA(1) == '$') && (_tokenSet_2.member(LA(2))))
2820: && (!atValidDollarEscape())) {
2821: match('$');
2822: tt = mREGEXP_CTOR_END(false, true);
2823: } else if ((_tokenSet_7.member(LA(1)))) {
2824: mREGEXP_SYMBOL(false);
2825: tt = mREGEXP_CTOR_END(false, true);
2826: } else if ((LA(1) == '$') && (true)) {
2827: _saveIndex = text.length();
2828: match('$');
2829: text.setLength(_saveIndex);
2830: if (inputState.guessing == 0) {
2831:
2832: // Yes, it's a regexp constructor, and we've got a value part.
2833: tt = STRING_CTOR_START;
2834: stringCtorState = SCS_VAL + SCS_RE_TYPE;
2835:
2836: }
2837: } else {
2838: throw new NoViableAltForCharException((char) LA(1),
2839: getFilename(), getLine(), getColumn());
2840: }
2841:
2842: }
2843: if (inputState.guessing == 0) {
2844: _ttype = tt;
2845: }
2846: } else if ((LA(1) == '/') && (LA(2) == '=') && (true) && (true)) {
2847: mDIV_ASSIGN(false);
2848: if (inputState.guessing == 0) {
2849: _ttype = DIV_ASSIGN;
2850: }
2851: } else if ((LA(1) == '/') && (true)) {
2852: mDIV(false);
2853: if (inputState.guessing == 0) {
2854: _ttype = DIV;
2855: }
2856: } else {
2857: throw new NoViableAltForCharException((char) LA(1),
2858: getFilename(), getLine(), getColumn());
2859: }
2860:
2861: if (_createToken && _token == null && _ttype != Token.SKIP) {
2862: _token = makeToken(_ttype);
2863: _token.setText(new String(text.getBuffer(), _begin, text
2864: .length()
2865: - _begin));
2866: }
2867: _returnToken = _token;
2868: }
2869:
2870: protected final void mREGEXP_SYMBOL(boolean _createToken)
2871: throws RecognitionException, CharStreamException,
2872: TokenStreamException {
2873: int _ttype;
2874: Token _token = null;
2875: int _begin = text.length();
2876: _ttype = REGEXP_SYMBOL;
2877: int _saveIndex;
2878:
2879: {
2880: if ((LA(1) == '\\') && (_tokenSet_8.member(LA(2)))) {
2881: match('\\');
2882: {
2883: match(_tokenSet_8);
2884: }
2885: } else if ((LA(1) == '\\')
2886: && (LA(2) == '\n' || LA(2) == '\r')) {
2887: _saveIndex = text.length();
2888: match('\\');
2889: text.setLength(_saveIndex);
2890: _saveIndex = text.length();
2891: mONE_NL(false, false);
2892: text.setLength(_saveIndex);
2893: if (inputState.guessing == 0) {
2894: text.setLength(_begin);
2895: text.append('\n');
2896: }
2897: } else if ((_tokenSet_9.member(LA(1)))) {
2898: {
2899: match(_tokenSet_9);
2900: }
2901: } else {
2902: throw new NoViableAltForCharException((char) LA(1),
2903: getFilename(), getLine(), getColumn());
2904: }
2905:
2906: }
2907: {
2908: _loop601: do {
2909: if ((LA(1) == '*')) {
2910: match('*');
2911: } else {
2912: break _loop601;
2913: }
2914:
2915: } while (true);
2916: }
2917: if (_createToken && _token == null && _ttype != Token.SKIP) {
2918: _token = makeToken(_ttype);
2919: _token.setText(new String(text.getBuffer(), _begin, text
2920: .length()
2921: - _begin));
2922: }
2923: _returnToken = _token;
2924: }
2925:
2926: protected final int mREGEXP_CTOR_END(boolean _createToken,
2927: boolean fromStart) throws RecognitionException,
2928: CharStreamException, TokenStreamException {
2929: int tt = STRING_CTOR_END;
2930: int _ttype;
2931: Token _token = null;
2932: int _begin = text.length();
2933: _ttype = REGEXP_CTOR_END;
2934: int _saveIndex;
2935:
2936: {
2937: _loop594: do {
2938: if (((LA(1) == '$') && (_tokenSet_2.member(LA(2))))
2939: && (!atValidDollarEscape())) {
2940: match('$');
2941: } else if ((_tokenSet_7.member(LA(1)))) {
2942: mREGEXP_SYMBOL(false);
2943: } else {
2944: break _loop594;
2945: }
2946:
2947: } while (true);
2948: }
2949: {
2950: switch (LA(1)) {
2951: case '/': {
2952: _saveIndex = text.length();
2953: match('/');
2954: text.setLength(_saveIndex);
2955: if (inputState.guessing == 0) {
2956:
2957: if (fromStart)
2958: tt = STRING_LITERAL; // plain regexp literal!
2959: {
2960: --suppressNewline;
2961: }
2962: // done with regexp constructor!
2963: //assert(stringCtorState == 0);
2964:
2965: }
2966: break;
2967: }
2968: case '$': {
2969: _saveIndex = text.length();
2970: match('$');
2971: text.setLength(_saveIndex);
2972: if (inputState.guessing == 0) {
2973:
2974: // Yes, it's a regexp constructor, and we've got a value part.
2975: tt = (fromStart ? STRING_CTOR_START
2976: : STRING_CTOR_MIDDLE);
2977: stringCtorState = SCS_VAL + SCS_RE_TYPE;
2978:
2979: }
2980: break;
2981: }
2982: default: {
2983: throw new NoViableAltForCharException((char) LA(1),
2984: getFilename(), getLine(), getColumn());
2985: }
2986: }
2987: }
2988: if (inputState.guessing == 0) {
2989: _ttype = tt;
2990: }
2991: if (_createToken && _token == null && _ttype != Token.SKIP) {
2992: _token = makeToken(_ttype);
2993: _token.setText(new String(text.getBuffer(), _begin, text
2994: .length()
2995: - _begin));
2996: }
2997: _returnToken = _token;
2998: return tt;
2999: }
3000:
3001: protected final void mHEX_DIGIT(boolean _createToken)
3002: throws RecognitionException, CharStreamException,
3003: TokenStreamException {
3004: int _ttype;
3005: Token _token = null;
3006: int _begin = text.length();
3007: _ttype = HEX_DIGIT;
3008: int _saveIndex;
3009:
3010: {
3011: switch (LA(1)) {
3012: case '0':
3013: case '1':
3014: case '2':
3015: case '3':
3016: case '4':
3017: case '5':
3018: case '6':
3019: case '7':
3020: case '8':
3021: case '9': {
3022: matchRange('0', '9');
3023: break;
3024: }
3025: case 'A':
3026: case 'B':
3027: case 'C':
3028: case 'D':
3029: case 'E':
3030: case 'F': {
3031: matchRange('A', 'F');
3032: break;
3033: }
3034: case 'a':
3035: case 'b':
3036: case 'c':
3037: case 'd':
3038: case 'e':
3039: case 'f': {
3040: matchRange('a', 'f');
3041: break;
3042: }
3043: default: {
3044: throw new NoViableAltForCharException((char) LA(1),
3045: getFilename(), getLine(), getColumn());
3046: }
3047: }
3048: }
3049: if (_createToken && _token == null && _ttype != Token.SKIP) {
3050: _token = makeToken(_ttype);
3051: _token.setText(new String(text.getBuffer(), _begin, text
3052: .length()
3053: - _begin));
3054: }
3055: _returnToken = _token;
3056: }
3057:
3058: protected final void mVOCAB(boolean _createToken)
3059: throws RecognitionException, CharStreamException,
3060: TokenStreamException {
3061: int _ttype;
3062: Token _token = null;
3063: int _begin = text.length();
3064: _ttype = VOCAB;
3065: int _saveIndex;
3066:
3067: matchRange('\3', '\377');
3068: if (_createToken && _token == null && _ttype != Token.SKIP) {
3069: _token = makeToken(_ttype);
3070: _token.setText(new String(text.getBuffer(), _begin, text
3071: .length()
3072: - _begin));
3073: }
3074: _returnToken = _token;
3075: }
3076:
3077: public final void mIDENT(boolean _createToken)
3078: throws RecognitionException, CharStreamException,
3079: TokenStreamException {
3080: int _ttype;
3081: Token _token = null;
3082: int _begin = text.length();
3083: _ttype = IDENT;
3084: int _saveIndex;
3085:
3086: mLETTER(false);
3087: {
3088: _loop615: do {
3089: if ((_tokenSet_0.member(LA(1)))) {
3090: mLETTER(false);
3091: } else if (((LA(1) >= '0' && LA(1) <= '9'))) {
3092: mDIGIT(false);
3093: } else {
3094: break _loop615;
3095: }
3096:
3097: } while (true);
3098: }
3099: if (inputState.guessing == 0) {
3100:
3101: if (stringCtorState != 0) {
3102: if (LA(1) == '.' && LA(2) != '$'
3103: && Character.isJavaIdentifierStart(LA(2))) {
3104: // pick up another name component before going literal again:
3105: restartStringCtor(false);
3106: } else {
3107: // go back to the string
3108: restartStringCtor(true);
3109: }
3110: }
3111: int ttype = testLiteralsTable(IDENT);
3112: /* The grammar allows a few keywords to follow dot.
3113: * TODO: Reinstate this logic if we change or remove keywordPropertyNames.
3114: if (ttype != IDENT && lastSigTokenType == DOT) {
3115: // A few keywords can follow a dot:
3116: switch (ttype) {
3117: case LITERAL_this: case LITERAL_super: case LITERAL_class:
3118: break;
3119: default:
3120: ttype = LITERAL_in; // the poster child for bad dotted names
3121: }
3122: }
3123: */
3124: _ttype = ttype;
3125:
3126: // check if "assert" keyword is enabled
3127: if (assertEnabled
3128: && "assert".equals(new String(text.getBuffer(),
3129: _begin, text.length() - _begin))) {
3130: _ttype = LITERAL_assert; // set token type for the rule in the parser
3131: }
3132: // check if "enum" keyword is enabled
3133: if (enumEnabled
3134: && "enum".equals(new String(text.getBuffer(),
3135: _begin, text.length() - _begin))) {
3136: _ttype = LITERAL_enum; // set token type for the rule in the parser
3137: }
3138:
3139: }
3140: if (_createToken && _token == null && _ttype != Token.SKIP) {
3141: _token = makeToken(_ttype);
3142: _token.setText(new String(text.getBuffer(), _begin, text
3143: .length()
3144: - _begin));
3145: }
3146: _returnToken = _token;
3147: }
3148:
3149: protected final void mLETTER(boolean _createToken)
3150: throws RecognitionException, CharStreamException,
3151: TokenStreamException {
3152: int _ttype;
3153: Token _token = null;
3154: int _begin = text.length();
3155: _ttype = LETTER;
3156: int _saveIndex;
3157:
3158: switch (LA(1)) {
3159: case 'a':
3160: case 'b':
3161: case 'c':
3162: case 'd':
3163: case 'e':
3164: case 'f':
3165: case 'g':
3166: case 'h':
3167: case 'i':
3168: case 'j':
3169: case 'k':
3170: case 'l':
3171: case 'm':
3172: case 'n':
3173: case 'o':
3174: case 'p':
3175: case 'q':
3176: case 'r':
3177: case 's':
3178: case 't':
3179: case 'u':
3180: case 'v':
3181: case 'w':
3182: case 'x':
3183: case 'y':
3184: case 'z': {
3185: matchRange('a', 'z');
3186: break;
3187: }
3188: case 'A':
3189: case 'B':
3190: case 'C':
3191: case 'D':
3192: case 'E':
3193: case 'F':
3194: case 'G':
3195: case 'H':
3196: case 'I':
3197: case 'J':
3198: case 'K':
3199: case 'L':
3200: case 'M':
3201: case 'N':
3202: case 'O':
3203: case 'P':
3204: case 'Q':
3205: case 'R':
3206: case 'S':
3207: case 'T':
3208: case 'U':
3209: case 'V':
3210: case 'W':
3211: case 'X':
3212: case 'Y':
3213: case 'Z': {
3214: matchRange('A', 'Z');
3215: break;
3216: }
3217: case '\u00c0':
3218: case '\u00c1':
3219: case '\u00c2':
3220: case '\u00c3':
3221: case '\u00c4':
3222: case '\u00c5':
3223: case '\u00c6':
3224: case '\u00c7':
3225: case '\u00c8':
3226: case '\u00c9':
3227: case '\u00ca':
3228: case '\u00cb':
3229: case '\u00cc':
3230: case '\u00cd':
3231: case '\u00ce':
3232: case '\u00cf':
3233: case '\u00d0':
3234: case '\u00d1':
3235: case '\u00d2':
3236: case '\u00d3':
3237: case '\u00d4':
3238: case '\u00d5':
3239: case '\u00d6': {
3240: matchRange('\u00C0', '\u00D6');
3241: break;
3242: }
3243: case '\u00d8':
3244: case '\u00d9':
3245: case '\u00da':
3246: case '\u00db':
3247: case '\u00dc':
3248: case '\u00dd':
3249: case '\u00de':
3250: case '\u00df':
3251: case '\u00e0':
3252: case '\u00e1':
3253: case '\u00e2':
3254: case '\u00e3':
3255: case '\u00e4':
3256: case '\u00e5':
3257: case '\u00e6':
3258: case '\u00e7':
3259: case '\u00e8':
3260: case '\u00e9':
3261: case '\u00ea':
3262: case '\u00eb':
3263: case '\u00ec':
3264: case '\u00ed':
3265: case '\u00ee':
3266: case '\u00ef':
3267: case '\u00f0':
3268: case '\u00f1':
3269: case '\u00f2':
3270: case '\u00f3':
3271: case '\u00f4':
3272: case '\u00f5':
3273: case '\u00f6': {
3274: matchRange('\u00D8', '\u00F6');
3275: break;
3276: }
3277: case '\u00f8':
3278: case '\u00f9':
3279: case '\u00fa':
3280: case '\u00fb':
3281: case '\u00fc':
3282: case '\u00fd':
3283: case '\u00fe':
3284: case '\u00ff': {
3285: matchRange('\u00F8', '\u00FF');
3286: break;
3287: }
3288: case '_': {
3289: match('_');
3290: break;
3291: }
3292: default:
3293: if (((LA(1) >= '\u0100' && LA(1) <= '\ufffe'))) {
3294: matchRange('\u0100', '\uFFFE');
3295: } else {
3296: throw new NoViableAltForCharException((char) LA(1),
3297: getFilename(), getLine(), getColumn());
3298: }
3299: }
3300: if (_createToken && _token == null && _ttype != Token.SKIP) {
3301: _token = makeToken(_ttype);
3302: _token.setText(new String(text.getBuffer(), _begin, text
3303: .length()
3304: - _begin));
3305: }
3306: _returnToken = _token;
3307: }
3308:
3309: protected final void mDIGIT(boolean _createToken)
3310: throws RecognitionException, CharStreamException,
3311: TokenStreamException {
3312: int _ttype;
3313: Token _token = null;
3314: int _begin = text.length();
3315: _ttype = DIGIT;
3316: int _saveIndex;
3317:
3318: matchRange('0', '9');
3319: if (_createToken && _token == null && _ttype != Token.SKIP) {
3320: _token = makeToken(_ttype);
3321: _token.setText(new String(text.getBuffer(), _begin, text
3322: .length()
3323: - _begin));
3324: }
3325: _returnToken = _token;
3326: }
3327:
3328: public final void mNUM_INT(boolean _createToken)
3329: throws RecognitionException, CharStreamException,
3330: TokenStreamException {
3331: int _ttype;
3332: Token _token = null;
3333: int _begin = text.length();
3334: _ttype = NUM_INT;
3335: int _saveIndex;
3336: Token f2 = null;
3337: Token g2 = null;
3338: Token f3 = null;
3339: Token g3 = null;
3340: Token f4 = null;
3341: boolean isDecimal = false;
3342: Token t = null;
3343:
3344: {
3345: switch (LA(1)) {
3346: case '0': {
3347: match('0');
3348: if (inputState.guessing == 0) {
3349: isDecimal = true;
3350: }
3351: {
3352: if ((LA(1) == 'X' || LA(1) == 'x')) {
3353: {
3354: switch (LA(1)) {
3355: case 'x': {
3356: match('x');
3357: break;
3358: }
3359: case 'X': {
3360: match('X');
3361: break;
3362: }
3363: default: {
3364: throw new NoViableAltForCharException(
3365: (char) LA(1), getFilename(),
3366: getLine(), getColumn());
3367: }
3368: }
3369: }
3370: if (inputState.guessing == 0) {
3371: isDecimal = false;
3372: }
3373: {
3374: int _cnt623 = 0;
3375: _loop623: do {
3376: if ((_tokenSet_10.member(LA(1))) && (true) && (true) && (true)) {
3377: mHEX_DIGIT(false);
3378: } else {
3379: if (_cnt623 >= 1) {
3380: break _loop623;
3381: } else {
3382: throw new NoViableAltForCharException(
3383: (char) LA(1),
3384: getFilename(),
3385: getLine(), getColumn());
3386: }
3387: }
3388:
3389: _cnt623++;
3390: } while (true);
3391: }
3392: } else {
3393: boolean synPredMatched629 = false;
3394: if ((((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true) && (true))) {
3395: int _m629 = mark();
3396: synPredMatched629 = true;
3397: inputState.guessing++;
3398: try {
3399: {
3400: {
3401: int _cnt626 = 0;
3402: _loop626: do {
3403: if (((LA(1) >= '0' && LA(1) <= '9'))) {
3404: matchRange('0', '9');
3405: } else {
3406: if (_cnt626 >= 1) {
3407: break _loop626;
3408: } else {
3409: throw new NoViableAltForCharException(
3410: (char) LA(1),
3411: getFilename(),
3412: getLine(),
3413: getColumn());
3414: }
3415: }
3416:
3417: _cnt626++;
3418: } while (true);
3419: }
3420: {
3421: switch (LA(1)) {
3422: case '.': {
3423: match('.');
3424: {
3425: matchRange('0', '9');
3426: }
3427: break;
3428: }
3429: case 'E':
3430: case 'e': {
3431: mEXPONENT(false);
3432: break;
3433: }
3434: case 'D':
3435: case 'F':
3436: case 'd':
3437: case 'f': {
3438: mFLOAT_SUFFIX(false);
3439: break;
3440: }
3441: default: {
3442: throw new NoViableAltForCharException(
3443: (char) LA(1),
3444: getFilename(),
3445: getLine(),
3446: getColumn());
3447: }
3448: }
3449: }
3450: }
3451: } catch (RecognitionException pe) {
3452: synPredMatched629 = false;
3453: }
3454: rewind(_m629);
3455: inputState.guessing--;
3456: }
3457: if (synPredMatched629) {
3458: {
3459: int _cnt631 = 0;
3460: _loop631: do {
3461: if (((LA(1) >= '0' && LA(1) <= '9'))) {
3462: matchRange('0', '9');
3463: } else {
3464: if (_cnt631 >= 1) {
3465: break _loop631;
3466: } else {
3467: throw new NoViableAltForCharException(
3468: (char) LA(1),
3469: getFilename(),
3470: getLine(),
3471: getColumn());
3472: }
3473: }
3474:
3475: _cnt631++;
3476: } while (true);
3477: }
3478: } else if (((LA(1) >= '0' && LA(1) <= '7')) && (true) && (true) && (true)) {
3479: {
3480: int _cnt633 = 0;
3481: _loop633: do {
3482: if (((LA(1) >= '0' && LA(1) <= '7'))) {
3483: matchRange('0', '7');
3484: } else {
3485: if (_cnt633 >= 1) {
3486: break _loop633;
3487: } else {
3488: throw new NoViableAltForCharException(
3489: (char) LA(1),
3490: getFilename(),
3491: getLine(),
3492: getColumn());
3493: }
3494: }
3495:
3496: _cnt633++;
3497: } while (true);
3498: }
3499: if (inputState.guessing == 0) {
3500: isDecimal = false;
3501: }
3502: } else {
3503: }
3504: }
3505: }
3506: break;
3507: }
3508: case '1':
3509: case '2':
3510: case '3':
3511: case '4':
3512: case '5':
3513: case '6':
3514: case '7':
3515: case '8':
3516: case '9': {
3517: {
3518: matchRange('1', '9');
3519: }
3520: {
3521: _loop636: do {
3522: if (((LA(1) >= '0' && LA(1) <= '9'))) {
3523: matchRange('0', '9');
3524: } else {
3525: break _loop636;
3526: }
3527:
3528: } while (true);
3529: }
3530: if (inputState.guessing == 0) {
3531: isDecimal = true;
3532: }
3533: break;
3534: }
3535: default: {
3536: throw new NoViableAltForCharException((char) LA(1),
3537: getFilename(), getLine(), getColumn());
3538: }
3539: }
3540: }
3541: {
3542: switch (LA(1)) {
3543: case 'L':
3544: case 'l': {
3545: {
3546: switch (LA(1)) {
3547: case 'l': {
3548: match('l');
3549: break;
3550: }
3551: case 'L': {
3552: match('L');
3553: break;
3554: }
3555: default: {
3556: throw new NoViableAltForCharException(
3557: (char) LA(1), getFilename(), getLine(),
3558: getColumn());
3559: }
3560: }
3561: }
3562: if (inputState.guessing == 0) {
3563: _ttype = NUM_LONG;
3564: }
3565: break;
3566: }
3567: case 'I':
3568: case 'i': {
3569: {
3570: switch (LA(1)) {
3571: case 'i': {
3572: match('i');
3573: break;
3574: }
3575: case 'I': {
3576: match('I');
3577: break;
3578: }
3579: default: {
3580: throw new NoViableAltForCharException(
3581: (char) LA(1), getFilename(), getLine(),
3582: getColumn());
3583: }
3584: }
3585: }
3586: if (inputState.guessing == 0) {
3587: _ttype = NUM_INT;
3588: }
3589: break;
3590: }
3591: case 'G':
3592: case 'g': {
3593: mBIG_SUFFIX(false);
3594: if (inputState.guessing == 0) {
3595: _ttype = NUM_BIG_INT;
3596: }
3597: break;
3598: }
3599: default:
3600: boolean synPredMatched642 = false;
3601: if ((((LA(1) == '.' || LA(1) == 'D' || LA(1) == 'E'
3602: || LA(1) == 'F' || LA(1) == 'd' || LA(1) == 'e' || LA(1) == 'f')) && (isDecimal))) {
3603: int _m642 = mark();
3604: synPredMatched642 = true;
3605: inputState.guessing++;
3606: try {
3607: {
3608: if ((_tokenSet_11.member(LA(1)))) {
3609: matchNot('.');
3610: } else if ((LA(1) == '.')) {
3611: match('.');
3612: {
3613: matchRange('0', '9');
3614: }
3615: } else {
3616: throw new NoViableAltForCharException(
3617: (char) LA(1), getFilename(),
3618: getLine(), getColumn());
3619: }
3620:
3621: }
3622: } catch (RecognitionException pe) {
3623: synPredMatched642 = false;
3624: }
3625: rewind(_m642);
3626: inputState.guessing--;
3627: }
3628: if (synPredMatched642) {
3629: {
3630: switch (LA(1)) {
3631: case '.': {
3632: match('.');
3633: {
3634: int _cnt645 = 0;
3635: _loop645: do {
3636: if (((LA(1) >= '0' && LA(1) <= '9'))) {
3637: matchRange('0', '9');
3638: } else {
3639: if (_cnt645 >= 1) {
3640: break _loop645;
3641: } else {
3642: throw new NoViableAltForCharException(
3643: (char) LA(1),
3644: getFilename(),
3645: getLine(),
3646: getColumn());
3647: }
3648: }
3649:
3650: _cnt645++;
3651: } while (true);
3652: }
3653: {
3654: if ((LA(1) == 'E' || LA(1) == 'e')) {
3655: mEXPONENT(false);
3656: } else {
3657: }
3658:
3659: }
3660: {
3661: switch (LA(1)) {
3662: case 'D':
3663: case 'F':
3664: case 'd':
3665: case 'f': {
3666: mFLOAT_SUFFIX(true);
3667: f2 = _returnToken;
3668: if (inputState.guessing == 0) {
3669: t = f2;
3670: }
3671: break;
3672: }
3673: case 'G':
3674: case 'g': {
3675: mBIG_SUFFIX(true);
3676: g2 = _returnToken;
3677: if (inputState.guessing == 0) {
3678: t = g2;
3679: }
3680: break;
3681: }
3682: default: {
3683: }
3684: }
3685: }
3686: break;
3687: }
3688: case 'E':
3689: case 'e': {
3690: mEXPONENT(false);
3691: {
3692: switch (LA(1)) {
3693: case 'D':
3694: case 'F':
3695: case 'd':
3696: case 'f': {
3697: mFLOAT_SUFFIX(true);
3698: f3 = _returnToken;
3699: if (inputState.guessing == 0) {
3700: t = f3;
3701: }
3702: break;
3703: }
3704: case 'G':
3705: case 'g': {
3706: mBIG_SUFFIX(true);
3707: g3 = _returnToken;
3708: if (inputState.guessing == 0) {
3709: t = g3;
3710: }
3711: break;
3712: }
3713: default: {
3714: }
3715: }
3716: }
3717: break;
3718: }
3719: case 'D':
3720: case 'F':
3721: case 'd':
3722: case 'f': {
3723: mFLOAT_SUFFIX(true);
3724: f4 = _returnToken;
3725: if (inputState.guessing == 0) {
3726: t = f4;
3727: }
3728: break;
3729: }
3730: default: {
3731: throw new NoViableAltForCharException(
3732: (char) LA(1), getFilename(),
3733: getLine(), getColumn());
3734: }
3735: }
3736: }
3737: if (inputState.guessing == 0) {
3738:
3739: String txt = (t == null ? "" : t.getText()
3740: .toUpperCase());
3741: if (txt.indexOf('F') >= 0) {
3742: _ttype = NUM_FLOAT;
3743: } else if (txt.indexOf('G') >= 0) {
3744: _ttype = NUM_BIG_DECIMAL;
3745: } else {
3746: _ttype = NUM_DOUBLE; // assume double
3747: }
3748:
3749: }
3750: } else {
3751: }
3752: }
3753: }
3754: if (_createToken && _token == null && _ttype != Token.SKIP) {
3755: _token = makeToken(_ttype);
3756: _token.setText(new String(text.getBuffer(), _begin, text
3757: .length()
3758: - _begin));
3759: }
3760: _returnToken = _token;
3761: }
3762:
3763: protected final void mEXPONENT(boolean _createToken)
3764: throws RecognitionException, CharStreamException,
3765: TokenStreamException {
3766: int _ttype;
3767: Token _token = null;
3768: int _begin = text.length();
3769: _ttype = EXPONENT;
3770: int _saveIndex;
3771:
3772: {
3773: switch (LA(1)) {
3774: case 'e': {
3775: match('e');
3776: break;
3777: }
3778: case 'E': {
3779: match('E');
3780: break;
3781: }
3782: default: {
3783: throw new NoViableAltForCharException((char) LA(1),
3784: getFilename(), getLine(), getColumn());
3785: }
3786: }
3787: }
3788: {
3789: switch (LA(1)) {
3790: case '+': {
3791: match('+');
3792: break;
3793: }
3794: case '-': {
3795: match('-');
3796: break;
3797: }
3798: case '0':
3799: case '1':
3800: case '2':
3801: case '3':
3802: case '4':
3803: case '5':
3804: case '6':
3805: case '7':
3806: case '8':
3807: case '9': {
3808: break;
3809: }
3810: default: {
3811: throw new NoViableAltForCharException((char) LA(1),
3812: getFilename(), getLine(), getColumn());
3813: }
3814: }
3815: }
3816: {
3817: int _cnt654 = 0;
3818: _loop654: do {
3819: if (((LA(1) >= '0' && LA(1) <= '9'))) {
3820: matchRange('0', '9');
3821: } else {
3822: if (_cnt654 >= 1) {
3823: break _loop654;
3824: } else {
3825: throw new NoViableAltForCharException(
3826: (char) LA(1), getFilename(), getLine(),
3827: getColumn());
3828: }
3829: }
3830:
3831: _cnt654++;
3832: } while (true);
3833: }
3834: if (_createToken && _token == null && _ttype != Token.SKIP) {
3835: _token = makeToken(_ttype);
3836: _token.setText(new String(text.getBuffer(), _begin, text
3837: .length()
3838: - _begin));
3839: }
3840: _returnToken = _token;
3841: }
3842:
3843: protected final void mFLOAT_SUFFIX(boolean _createToken)
3844: throws RecognitionException, CharStreamException,
3845: TokenStreamException {
3846: int _ttype;
3847: Token _token = null;
3848: int _begin = text.length();
3849: _ttype = FLOAT_SUFFIX;
3850: int _saveIndex;
3851:
3852: switch (LA(1)) {
3853: case 'f': {
3854: match('f');
3855: break;
3856: }
3857: case 'F': {
3858: match('F');
3859: break;
3860: }
3861: case 'd': {
3862: match('d');
3863: break;
3864: }
3865: case 'D': {
3866: match('D');
3867: break;
3868: }
3869: default: {
3870: throw new NoViableAltForCharException((char) LA(1),
3871: getFilename(), getLine(), getColumn());
3872: }
3873: }
3874: if (_createToken && _token == null && _ttype != Token.SKIP) {
3875: _token = makeToken(_ttype);
3876: _token.setText(new String(text.getBuffer(), _begin, text
3877: .length()
3878: - _begin));
3879: }
3880: _returnToken = _token;
3881: }
3882:
3883: protected final void mBIG_SUFFIX(boolean _createToken)
3884: throws RecognitionException, CharStreamException,
3885: TokenStreamException {
3886: int _ttype;
3887: Token _token = null;
3888: int _begin = text.length();
3889: _ttype = BIG_SUFFIX;
3890: int _saveIndex;
3891:
3892: switch (LA(1)) {
3893: case 'g': {
3894: match('g');
3895: break;
3896: }
3897: case 'G': {
3898: match('G');
3899: break;
3900: }
3901: default: {
3902: throw new NoViableAltForCharException((char) LA(1),
3903: getFilename(), getLine(), getColumn());
3904: }
3905: }
3906: if (_createToken && _token == null && _ttype != Token.SKIP) {
3907: _token = makeToken(_ttype);
3908: _token.setText(new String(text.getBuffer(), _begin, text
3909: .length()
3910: - _begin));
3911: }
3912: _returnToken = _token;
3913: }
3914:
3915: public final void mAT(boolean _createToken)
3916: throws RecognitionException, CharStreamException,
3917: TokenStreamException {
3918: int _ttype;
3919: Token _token = null;
3920: int _begin = text.length();
3921: _ttype = AT;
3922: int _saveIndex;
3923:
3924: match('@');
3925: if (_createToken && _token == null && _ttype != Token.SKIP) {
3926: _token = makeToken(_ttype);
3927: _token.setText(new String(text.getBuffer(), _begin, text
3928: .length()
3929: - _begin));
3930: }
3931: _returnToken = _token;
3932: }
3933:
3934: private static final long[] mk_tokenSet_0() {
3935: long[] data = new long[2560];
3936: data[1] = 576460745995190270L;
3937: data[3] = -36028797027352577L;
3938: for (int i = 4; i <= 1022; i++) {
3939: data[i] = -1L;
3940: }
3941: data[1023] = 9223372036854775807L;
3942: return data;
3943: }
3944:
3945: public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
3946:
3947: private static final long[] mk_tokenSet_1() {
3948: long[] data = new long[2048];
3949: data[0] = -9224L;
3950: for (int i = 1; i <= 1022; i++) {
3951: data[i] = -1L;
3952: }
3953: data[1023] = 9223372036854775807L;
3954: return data;
3955: }
3956:
3957: public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
3958:
3959: private static final long[] mk_tokenSet_2() {
3960: long[] data = new long[2048];
3961: data[0] = -4398046520328L;
3962: for (int i = 1; i <= 1022; i++) {
3963: data[i] = -1L;
3964: }
3965: data[1023] = 9223372036854775807L;
3966: return data;
3967: }
3968:
3969: public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
3970:
3971: private static final long[] mk_tokenSet_3() {
3972: long[] data = new long[2048];
3973: data[0] = -549755813896L;
3974: for (int i = 1; i <= 1023; i++) {
3975: data[i] = -1L;
3976: }
3977: return data;
3978: }
3979:
3980: public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
3981:
3982: private static final long[] mk_tokenSet_4() {
3983: long[] data = new long[2048];
3984: data[0] = -635655169032L;
3985: data[1] = -268435457L;
3986: for (int i = 2; i <= 1022; i++) {
3987: data[i] = -1L;
3988: }
3989: data[1023] = 9223372036854775807L;
3990: return data;
3991: }
3992:
3993: public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
3994:
3995: private static final long[] mk_tokenSet_5() {
3996: long[] data = new long[2048];
3997: data[0] = -17179869192L;
3998: for (int i = 1; i <= 1023; i++) {
3999: data[i] = -1L;
4000: }
4001: return data;
4002: }
4003:
4004: public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
4005:
4006: private static final long[] mk_tokenSet_6() {
4007: long[] data = new long[2048];
4008: data[0] = -145135534875656L;
4009: for (int i = 1; i <= 1022; i++) {
4010: data[i] = -1L;
4011: }
4012: data[1023] = 9223372036854775807L;
4013: return data;
4014: }
4015:
4016: public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
4017:
4018: private static final long[] mk_tokenSet_7() {
4019: long[] data = new long[2048];
4020: data[0] = -145204254352392L;
4021: for (int i = 1; i <= 1022; i++) {
4022: data[i] = -1L;
4023: }
4024: data[1023] = 9223372036854775807L;
4025: return data;
4026: }
4027:
4028: public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
4029:
4030: private static final long[] mk_tokenSet_8() {
4031: long[] data = new long[2048];
4032: data[0] = -9224L;
4033: for (int i = 1; i <= 1023; i++) {
4034: data[i] = -1L;
4035: }
4036: return data;
4037: }
4038:
4039: public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
4040:
4041: private static final long[] mk_tokenSet_9() {
4042: long[] data = new long[2048];
4043: data[0] = -145204254352392L;
4044: data[1] = -268435457L;
4045: for (int i = 2; i <= 1022; i++) {
4046: data[i] = -1L;
4047: }
4048: data[1023] = 9223372036854775807L;
4049: return data;
4050: }
4051:
4052: public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
4053:
4054: private static final long[] mk_tokenSet_10() {
4055: long[] data = new long[1025];
4056: data[0] = 287948901175001088L;
4057: data[1] = 541165879422L;
4058: return data;
4059: }
4060:
4061: public static final BitSet _tokenSet_10 = new BitSet(
4062: mk_tokenSet_10());
4063:
4064: private static final long[] mk_tokenSet_11() {
4065: long[] data = new long[2048];
4066: data[0] = -70368744177672L;
4067: for (int i = 1; i <= 1023; i++) {
4068: data[i] = -1L;
4069: }
4070: return data;
4071: }
4072:
4073: public static final BitSet _tokenSet_11 = new BitSet(
4074: mk_tokenSet_11());
4075:
4076: }
|