KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > groovy > antlr > parser > GroovyLexer


1 // $ANTLR 2.7.2: "groovy.g" -> "GroovyLexer.java"$
2

3 package org.codehaus.groovy.antlr.parser;
4 import org.codehaus.groovy.antlr.*;
5 import java.util.*;
6 import java.io.InputStream JavaDoc;
7 import java.io.Reader JavaDoc;
8 import antlr.InputBuffer;
9 import antlr.LexerSharedInputState;
10
11 import java.io.InputStream JavaDoc;
12 import antlr.TokenStreamException;
13 import antlr.TokenStreamIOException;
14 import antlr.TokenStreamRecognitionException;
15 import antlr.CharStreamException;
16 import antlr.CharStreamIOException;
17 import antlr.ANTLRException;
18 import java.io.Reader JavaDoc;
19 import java.util.Hashtable JavaDoc;
20 import antlr.CharScanner;
21 import antlr.InputBuffer;
22 import antlr.ByteBuffer;
23 import antlr.CharBuffer;
24 import antlr.Token;
25 import antlr.CommonToken;
26 import antlr.RecognitionException;
27 import antlr.NoViableAltForCharException;
28 import antlr.MismatchedCharException;
29 import antlr.TokenStream;
30 import antlr.ANTLRHashString;
31 import antlr.LexerSharedInputState;
32 import antlr.collections.impl.BitSet;
33 import antlr.SemanticException;
34
35 public class GroovyLexer extends antlr.CharScanner implements GroovyTokenTypes, TokenStream
36  {
37
38     /** flag for enabling the "assert" keyword */
39     private boolean assertEnabled = true;
40     /** flag for enabling the "enum" keyword */
41     private boolean enumEnabled = true;
42     /** flag for including whitespace tokens (for IDE preparsing) */
43     private boolean whitespaceIncluded = false;
44
45     /** Enable the "assert" keyword */
46     public void enableAssert(boolean shouldEnable) { assertEnabled = shouldEnable; }
47     /** Query the "assert" keyword state */
48     public boolean isAssertEnabled() { return assertEnabled; }
49     /** Enable the "enum" keyword */
50     public void enableEnum(boolean shouldEnable) { enumEnabled = shouldEnable; }
51     /** Query the "enum" keyword state */
52     public boolean isEnumEnabled() { return enumEnabled; }
53
54     /** Include whitespace tokens. Note that this breaks the parser. */
55     public void setWhitespaceIncluded(boolean z) { whitespaceIncluded = z; }
56     /** Are whitespace tokens included? */
57     public boolean isWhitespaceIncluded() { return whitespaceIncluded; }
58
59     {
60         // Initialization actions performed on construction.
61
setTabSize(1); // get rid of special tab interpretation, for IDEs and general clarity
62
}
63
64     /** Bumped when inside '[x]' or '(x)', reset inside '{x}'. See ONE_NL. */
65     protected int parenLevel = 0;
66     protected int suppressNewline = 0; // be really mean to newlines inside strings
67
protected static final int SCS_TYPE = 3, SCS_VAL = 4, SCS_LIT = 8, SCS_LIMIT = 16;
68     protected static final int SCS_SQ_TYPE = 0, SCS_TQ_TYPE = 1, SCS_RE_TYPE = 2;
69     protected int stringCtorState = 0; // hack string and regexp constructor boundaries
70
/** Push parenLevel here and reset whenever inside '{x}'. */
71     protected ArrayList parenLevelStack = new ArrayList();
72     protected int lastSigTokenType = EOF; // last returned non-whitespace token
73

74     protected void pushParenLevel() {
75         parenLevelStack.add(new Integer JavaDoc(parenLevel*SCS_LIMIT + stringCtorState));
76         parenLevel = 0;
77         stringCtorState = 0;
78     }
79     protected void popParenLevel() {
80         int npl = parenLevelStack.size();
81         if (npl == 0) return;
82         int i = ((Integer JavaDoc) parenLevelStack.remove(--npl)).intValue();
83         parenLevel = i / SCS_LIMIT;
84         stringCtorState = i % SCS_LIMIT;
85     }
86
87     protected void restartStringCtor(boolean expectLiteral) {
88         if (stringCtorState != 0) {
89             stringCtorState = (expectLiteral? SCS_LIT: SCS_VAL) + (stringCtorState & SCS_TYPE);
90         }
91     }
92     
93     protected boolean allowRegexpLiteral() {
94         return !isExpressionEndingToken(lastSigTokenType);
95     }
96
97     /** Return true for an operator or punctuation which can end an expression.
98      * Return true for keywords, identifiers, and literals.
99      * Return true for tokens which can end expressions (right brackets, ++, --).
100      * Return false for EOF and all other operator and punctuation tokens.
101      * Used to suppress the recognition of /foo/ as opposed to the simple division operator '/'.
102      */

103     // Cf. 'constant' and 'balancedBrackets' rules in the grammar.)
104
protected static boolean isExpressionEndingToken(int ttype) {
105         switch (ttype) {
106         case INC: // x++ / y
107
case DEC: // x-- / y
108
case RPAREN: // (x) / y
109
case RBRACK: // f[x] / y
110
case RCURLY: // f{x} / y
111
case STRING_LITERAL: // "x" / y
112
case STRING_CTOR_END: // "$x" / y
113
case NUM_INT: // 0 / y
114
case NUM_FLOAT: // 0f / y
115
case NUM_LONG: // 0l / y
116
case NUM_DOUBLE: // 0.0 / y
117
case NUM_BIG_INT: // 0g / y
118
case NUM_BIG_DECIMAL: // 0.0g / y
119
case IDENT: // x / y
120
// and a bunch of keywords (all of them; no sense picking and choosing):
121
case LITERAL_any:
122         case LITERAL_as:
123         case LITERAL_assert:
124         case LITERAL_boolean:
125         case LITERAL_break:
126         case LITERAL_byte:
127         case LITERAL_case:
128         case LITERAL_catch:
129         case LITERAL_char:
130         case LITERAL_class:
131         case LITERAL_continue:
132         case LITERAL_def:
133         case LITERAL_default:
134         case LITERAL_double:
135         case LITERAL_else:
136         case LITERAL_enum:
137         case LITERAL_extends:
138         case LITERAL_false:
139         case LITERAL_finally:
140         case LITERAL_float:
141         case LITERAL_for:
142         case LITERAL_if:
143         case LITERAL_implements:
144         case LITERAL_import:
145         case LITERAL_in:
146         case LITERAL_instanceof:
147         case LITERAL_int:
148         case LITERAL_interface:
149         case LITERAL_long:
150         case LITERAL_native:
151         case LITERAL_new:
152         case LITERAL_null:
153         case LITERAL_package:
154         case LITERAL_private:
155         case LITERAL_protected:
156         case LITERAL_public:
157         case LITERAL_return:
158         case LITERAL_short:
159         case LITERAL_static:
160         case LITERAL_super:
161         case LITERAL_switch:
162         case LITERAL_synchronized:
163         case LITERAL_this:
164         case LITERAL_threadsafe:
165         case LITERAL_throw:
166         case LITERAL_throws:
167         case LITERAL_transient:
168         case LITERAL_true:
169         case LITERAL_try:
170         case LITERAL_void:
171         case LITERAL_volatile:
172         case LITERAL_while:
173         case LITERAL_with:
174             return true;
175         default:
176             return false;
177         }
178     }
179
180     protected void newlineCheck(boolean check) throws RecognitionException {
181         if (check && suppressNewline > 0) {
182             require(suppressNewline == 0,
183                 "end of line reached within a simple string 'x' or \"x\" or /x/",
184                 "for multi-line literals, use triple quotes '''x''' or \"\"\"x\"\"\"");
185             suppressNewline = 0; // shut down any flood of errors
186
}
187         newline();
188     }
189     
190     protected boolean atValidDollarEscape() throws CharStreamException {
191         // '$' (('*')? ('{' | LETTER)) =>
192
int k = 1;
193         char lc = LA(k++);
194         if (lc != '$') return false;
195         lc = LA(k++);
196         if (lc == '*') lc = LA(k++);
197         return (lc == '{' || (lc != '$' && Character.isJavaIdentifierStart(lc)));
198     }
199
200     /** This is a bit of plumbing which resumes collection of string constructor bodies,
201      * after an embedded expression has been parsed.
202      * Usage: new GroovyRecognizer(new GroovyLexer(in).plumb()).
203      */

204     public TokenStream plumb() {
205         return new TokenStream() {
206             public Token nextToken() throws TokenStreamException {
207                 if (stringCtorState >= SCS_LIT) {
208                     // This goo is modeled upon the ANTLR code for nextToken:
209
int quoteType = (stringCtorState & SCS_TYPE);
210                     stringCtorState = 0; // get out of this mode, now
211
resetText();
212                     try {
213                         switch (quoteType) {
214                         case SCS_SQ_TYPE:
215                             mSTRING_CTOR_END(true, /*fromStart:*/false, false); break;
216                         case SCS_TQ_TYPE:
217                             mSTRING_CTOR_END(true, /*fromStart:*/false, true); break;
218                         case SCS_RE_TYPE:
219                             mREGEXP_CTOR_END(true, /*fromStart:*/false); break;
220                         default: assert(false);
221                         }
222                         lastSigTokenType = _returnToken.getType();
223                         return _returnToken;
224                     } catch (RecognitionException e) {
225                         throw new TokenStreamRecognitionException(e);
226                     } catch (CharStreamException cse) {
227                         if ( cse instanceof CharStreamIOException ) {
228                             throw new TokenStreamIOException(((CharStreamIOException)cse).io);
229                         }
230                         else {
231                             throw new TokenStreamException(cse.getMessage());
232                         }
233                     }
234                 }
235                 Token token = GroovyLexer.this.nextToken();
236                 int lasttype = token.getType();
237                 if (whitespaceIncluded) {
238                     switch (lasttype) { // filter out insignificant types
239
case WS:
240                     case ONE_NL:
241                     case SL_COMMENT:
242                     case ML_COMMENT:
243                         lasttype = lastSigTokenType; // back up!
244
}
245                 }
246                 lastSigTokenType = lasttype;
247                 return token;
248             }
249         };
250     }
251
252         // stuff to adjust ANTLR's tracing machinery
253
public static boolean tracing = false; // only effective if antlr.Tool is run with -traceLexer
254
public void traceIn(String JavaDoc rname) throws CharStreamException {
255         if (!GroovyLexer.tracing) return;
256         super.traceIn(rname);
257     }
258     public void traceOut(String JavaDoc rname) throws CharStreamException {
259         if (!GroovyLexer.tracing) return;
260         if (_returnToken != null) rname += tokenStringOf(_returnToken);
261         super.traceOut(rname);
262     }
263     private static java.util.HashMap JavaDoc ttypes;
264     private static String JavaDoc tokenStringOf(Token t) {
265         if (ttypes == null) {
266             java.util.HashMap JavaDoc map = new java.util.HashMap JavaDoc();
267             java.lang.reflect.Field JavaDoc[] fields = GroovyTokenTypes.class.getDeclaredFields();
268             for (int i = 0; i < fields.length; i++) {
269                 if (fields[i].getType() != int.class) continue;
270                 try {
271                     map.put(fields[i].get(null), fields[i].getName());
272                 } catch (IllegalAccessException JavaDoc ee) {
273                 }
274             }
275             ttypes = map;
276         }
277         Integer JavaDoc tt = new Integer JavaDoc(t.getType());
278         Object JavaDoc ttn = ttypes.get(tt);
279         if (ttn == null) ttn = "<"+tt+">";
280         return "["+ttn+",\""+t.getText()+"\"]";
281     }
282
283     protected GroovyRecognizer parser; // little-used link; TODO: get rid of
284
private void require(boolean z, String JavaDoc problem, String JavaDoc solution) throws SemanticException {
285         // TODO: Direct to a common error handler, rather than through the parser.
286
if (!z) parser.requireFailed(problem, solution);
287     }
288 public GroovyLexer(InputStream JavaDoc in) {
289     this(new ByteBuffer(in));
290 }
291 public GroovyLexer(Reader JavaDoc in) {
292     this(new CharBuffer(in));
293 }
294 public GroovyLexer(InputBuffer ib) {
295     this(new LexerSharedInputState(ib));
296 }
297 public GroovyLexer(LexerSharedInputState state) {
298     super(state);
299     caseSensitiveLiterals = true;
300     setCaseSensitive(true);
301     literals = new Hashtable JavaDoc();
302     literals.put(new ANTLRHashString("byte", this), new Integer JavaDoc(101));
303     literals.put(new ANTLRHashString("public", this), new Integer JavaDoc(112));
304     literals.put(new ANTLRHashString("case", this), new Integer JavaDoc(150));
305     literals.put(new ANTLRHashString("short", this), new Integer JavaDoc(103));
306     literals.put(new ANTLRHashString("break", this), new Integer JavaDoc(144));
307     literals.put(new ANTLRHashString("while", this), new Integer JavaDoc(138));
308     literals.put(new ANTLRHashString("new", this), new Integer JavaDoc(192));
309     literals.put(new ANTLRHashString("instanceof", this), new Integer JavaDoc(178));
310     literals.put(new ANTLRHashString("implements", this), new Integer JavaDoc(127));
311     literals.put(new ANTLRHashString("synchronized", this), new Integer JavaDoc(117));
312     literals.put(new ANTLRHashString("const", this), new Integer JavaDoc(40));
313     literals.put(new ANTLRHashString("float", this), new Integer JavaDoc(105));
314     literals.put(new ANTLRHashString("package", this), new Integer JavaDoc(78));
315     literals.put(new ANTLRHashString("return", this), new Integer JavaDoc(143));
316     literals.put(new ANTLRHashString("throw", this), new Integer JavaDoc(146));
317     literals.put(new ANTLRHashString("null", this), new Integer JavaDoc(195));
318     literals.put(new ANTLRHashString("def", this), new Integer JavaDoc(81));
319     literals.put(new ANTLRHashString("threadsafe", this), new Integer JavaDoc(116));
320     literals.put(new ANTLRHashString("protected", this), new Integer JavaDoc(113));
321     literals.put(new ANTLRHashString("class", this), new Integer JavaDoc(88));
322     literals.put(new ANTLRHashString("throws", this), new Integer JavaDoc(130));
323     literals.put(new ANTLRHashString("do", this), new Integer JavaDoc(41));
324     literals.put(new ANTLRHashString("strictfp", this), new Integer JavaDoc(42));
325     literals.put(new ANTLRHashString("super", this), new Integer JavaDoc(93));
326     literals.put(new ANTLRHashString("with", this), new Integer JavaDoc(139));
327     literals.put(new ANTLRHashString("transient", this), new Integer JavaDoc(114));
328     literals.put(new ANTLRHashString("native", this), new Integer JavaDoc(115));
329     literals.put(new ANTLRHashString("interface", this), new Integer JavaDoc(89));
330     literals.put(new ANTLRHashString("final", this), new Integer JavaDoc(37));
331     literals.put(new ANTLRHashString("any", this), new Integer JavaDoc(108));
332     literals.put(new ANTLRHashString("if", this), new Integer JavaDoc(136));
333     literals.put(new ANTLRHashString("double", this), new Integer JavaDoc(107));
334     literals.put(new ANTLRHashString("volatile", this), new Integer JavaDoc(118));
335     literals.put(new ANTLRHashString("as", this), new Integer JavaDoc(110));
336     literals.put(new ANTLRHashString("assert", this), new Integer JavaDoc(147));
337     literals.put(new ANTLRHashString("catch", this), new Integer JavaDoc(153));
338     literals.put(new ANTLRHashString("try", this), new Integer JavaDoc(151));
339     literals.put(new ANTLRHashString("goto", this), new Integer JavaDoc(39));
340     literals.put(new ANTLRHashString("enum", this), new Integer JavaDoc(90));
341     literals.put(new ANTLRHashString("int", this), new Integer JavaDoc(104));
342     literals.put(new ANTLRHashString("for", this), new Integer JavaDoc(141));
343     literals.put(new ANTLRHashString("extends", this), new Integer JavaDoc(92));
344     literals.put(new ANTLRHashString("boolean", this), new Integer JavaDoc(100));
345     literals.put(new ANTLRHashString("char", this), new Integer JavaDoc(102));
346     literals.put(new ANTLRHashString("private", this), new Integer JavaDoc(111));
347     literals.put(new ANTLRHashString("default", this), new Integer JavaDoc(126));
348     literals.put(new ANTLRHashString("false", this), new Integer JavaDoc(194));
349     literals.put(new ANTLRHashString("this", this), new Integer JavaDoc(128));
350     literals.put(new ANTLRHashString("static", this), new Integer JavaDoc(80));
351     literals.put(new ANTLRHashString("abstract", this), new Integer JavaDoc(38));
352     literals.put(new ANTLRHashString("continue", this), new Integer JavaDoc(145));
353     literals.put(new ANTLRHashString("finally", this), new Integer JavaDoc(152));
354     literals.put(new ANTLRHashString("else", this), new Integer JavaDoc(137));
355     literals.put(new ANTLRHashString("import", this), new Integer JavaDoc(79));
356     literals.put(new ANTLRHashString("in", this), new Integer JavaDoc(142));
357     literals.put(new ANTLRHashString("void", this), new Integer JavaDoc(99));
358     literals.put(new ANTLRHashString("switch", this), new Integer JavaDoc(140));
359     literals.put(new ANTLRHashString("true", this), new Integer JavaDoc(193));
360     literals.put(new ANTLRHashString("long", this), new Integer JavaDoc(106));
361 }
362
363 public Token nextToken() throws TokenStreamException {
364     Token theRetToken=null;
365 tryAgain:
366     for (;;) {
367         Token _token = null;
368         int _ttype = Token.INVALID_TYPE;
369         resetText();
370         try { // for char stream error handling
371
try { // for lexical error handling
372
switch ( LA(1)) {
373                 case '(':
374                 {
375                     mLPAREN(true);
376                     theRetToken=_returnToken;
377                     break;
378                 }
379                 case ')':
380                 {
381                     mRPAREN(true);
382                     theRetToken=_returnToken;
383                     break;
384                 }
385                 case '[':
386                 {
387                     mLBRACK(true);
388                     theRetToken=_returnToken;
389                     break;
390                 }
391                 case ']':
392                 {
393                     mRBRACK(true);
394                     theRetToken=_returnToken;
395                     break;
396                 }
397                 case '{':
398                 {
399                     mLCURLY(true);
400                     theRetToken=_returnToken;
401                     break;
402                 }
403                 case '}':
404                 {
405                     mRCURLY(true);
406                     theRetToken=_returnToken;
407                     break;
408                 }
409                 case ':':
410                 {
411                     mCOLON(true);
412                     theRetToken=_returnToken;
413                     break;
414                 }
415                 case ',':
416                 {
417                     mCOMMA(true);
418                     theRetToken=_returnToken;
419                     break;
420                 }
421                 case '~':
422                 {
423                     mBNOT(true);
424                     theRetToken=_returnToken;
425                     break;
426                 }
427                 case ';':
428                 {
429                     mSEMI(true);
430                     theRetToken=_returnToken;
431                     break;
432                 }
433                 case '$':
434                 {
435                     mDOLLAR(true);
436                     theRetToken=_returnToken;
437                     break;
438                 }
439                 case '\t': case '\u000c': case ' ': case '\\':
440                 {
441                     mWS(true);
442                     theRetToken=_returnToken;
443                     break;
444                 }
445                 case '\n': case '\r':
446                 {
447                     mNLS(true);
448                     theRetToken=_returnToken;
449                     break;
450                 }
451                 case '"': case '\'':
452                 {
453                     mSTRING_LITERAL(true);
454                     theRetToken=_returnToken;
455                     break;
456                 }
457                 case '0': case '1': case '2': case '3':
458                 case '4': case '5': case '6': case '7':
459                 case '8': case '9':
460                 {
461                     mNUM_INT(true);
462                     theRetToken=_returnToken;
463                     break;
464                 }
465                 case '@':
466                 {
467                     mAT(true);
468                     theRetToken=_returnToken;
469                     break;
470                 }
471                 default:
472                     if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (LA(4)=='=')) {
473                         mBSR_ASSIGN(true);
474                         theRetToken=_returnToken;
475                     }
476                     else if ((LA(1)=='<') && (LA(2)=='=') && (LA(3)=='>')) {
477                         mCOMPARE_TO(true);
478                         theRetToken=_returnToken;
479                     }
480                     else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
481                         mSR_ASSIGN(true);
482                         theRetToken=_returnToken;
483                     }
484                     else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (true)) {
485                         mBSR(true);
486                         theRetToken=_returnToken;
487                     }
488                     else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
489                         mSL_ASSIGN(true);
490                         theRetToken=_returnToken;
491                     }
492                     else if ((LA(1)=='.') && (LA(2)=='.') && (LA(3)=='<')) {
493                         mRANGE_EXCLUSIVE(true);
494                         theRetToken=_returnToken;
495                     }
496                     else if ((LA(1)=='.') && (LA(2)=='.') && (LA(3)=='.')) {
497                         mTRIPLE_DOT(true);
498                         theRetToken=_returnToken;
499                     }
500                     else if ((LA(1)=='=') && (LA(2)=='=') && (LA(3)=='~')) {
501                         mREGEX_MATCH(true);
502                         theRetToken=_returnToken;
503                     }
504                     else if ((LA(1)=='*') && (LA(2)=='*') && (LA(3)=='=')) {
505                         mSTAR_STAR_ASSIGN(true);
506                         theRetToken=_returnToken;
507                     }
508                     else if ((LA(1)=='=') && (LA(2)=='=') && (true)) {
509                         mEQUAL(true);
510                         theRetToken=_returnToken;
511                     }
512                     else if ((LA(1)=='!') && (LA(2)=='=')) {
513                         mNOT_EQUAL(true);
514                         theRetToken=_returnToken;
515                     }
516                     else if ((LA(1)=='+') && (LA(2)=='=')) {
517                         mPLUS_ASSIGN(true);
518                         theRetToken=_returnToken;
519                     }
520                     else if ((LA(1)=='+') && (LA(2)=='+')) {
521                         mINC(true);
522                         theRetToken=_returnToken;
523                     }
524                     else if ((LA(1)=='-') && (LA(2)=='=')) {
525                         mMINUS_ASSIGN(true);
526                         theRetToken=_returnToken;
527                     }
528                     else if ((LA(1)=='-') && (LA(2)=='-')) {
529                         mDEC(true);
530                         theRetToken=_returnToken;
531                     }
532                     else if ((LA(1)=='*') && (LA(2)=='=')) {
533                         mSTAR_ASSIGN(true);
534                         theRetToken=_returnToken;
535                     }
536                     else if ((LA(1)=='%') && (LA(2)=='=')) {
537                         mMOD_ASSIGN(true);
538                         theRetToken=_returnToken;
539                     }
540                     else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
541                         mSR(true);
542                         theRetToken=_returnToken;
543                     }
544                     else if ((LA(1)=='>') && (LA(2)=='=')) {
545                         mGE(true);
546                         theRetToken=_returnToken;
547                     }
548                     else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
549                         mSL(true);
550                         theRetToken=_returnToken;
551                     }
552                     else if ((LA(1)=='<') && (LA(2)=='=') && (true)) {
553                         mLE(true);
554                         theRetToken=_returnToken;
555                     }
556                     else if ((LA(1)=='^') && (LA(2)=='=')) {
557                         mBXOR_ASSIGN(true);
558                         theRetToken=_returnToken;
559                     }
560                     else if ((LA(1)=='|') && (LA(2)=='=')) {
561                         mBOR_ASSIGN(true);
562                         theRetToken=_returnToken;
563                     }
564                     else if ((LA(1)=='|') && (LA(2)=='|')) {
565                         mLOR(true);
566                         theRetToken=_returnToken;
567                     }
568                     else if ((LA(1)=='&') && (LA(2)=='=')) {
569                         mBAND_ASSIGN(true);
570                         theRetToken=_returnToken;
571                     }
572                     else if ((LA(1)=='&') && (LA(2)=='&')) {
573                         mLAND(true);
574                         theRetToken=_returnToken;
575                     }
576                     else if ((LA(1)=='.') && (LA(2)=='.') && (true)) {
577                         mRANGE_INCLUSIVE(true);
578                         theRetToken=_returnToken;
579                     }
580                     else if ((LA(1)=='*') && (LA(2)=='.')) {
581                         mSPREAD_DOT(true);
582                         theRetToken=_returnToken;
583                     }
584                     else if ((LA(1)=='?') && (LA(2)=='.')) {
585                         mOPTIONAL_DOT(true);
586                         theRetToken=_returnToken;
587                     }
588                     else if ((LA(1)=='.') && (LA(2)=='&')) {
589                         mMEMBER_POINTER(true);
590                         theRetToken=_returnToken;
591                     }
592                     else if ((LA(1)=='=') && (LA(2)=='~')) {
593                         mREGEX_FIND(true);
594                         theRetToken=_returnToken;
595                     }
596                     else if ((LA(1)=='*') && (LA(2)=='*') && (true)) {
597                         mSTAR_STAR(true);
598                         theRetToken=_returnToken;
599                     }
600                     else if ((LA(1)=='-') && (LA(2)=='>')) {
601                         mCLOSURE_OP(true);
602                         theRetToken=_returnToken;
603                     }
604                     else if ((LA(1)=='/') && (LA(2)=='/')) {
605                         mSL_COMMENT(true);
606                         theRetToken=_returnToken;
607                     }
608                     else if ((LA(1)=='/') && (LA(2)=='*')) {
609                         mML_COMMENT(true);
610                         theRetToken=_returnToken;
611                     }
612                     else if ((LA(1)=='?') && (true)) {
613                         mQUESTION(true);
614                         theRetToken=_returnToken;
615                     }
616                     else if ((LA(1)=='.') && (true)) {
617                         mDOT(true);
618                         theRetToken=_returnToken;
619                     }
620                     else if ((LA(1)=='=') && (true)) {
621                         mASSIGN(true);
622                         theRetToken=_returnToken;
623                     }
624                     else if ((LA(1)=='!') && (true)) {
625                         mLNOT(true);
626                         theRetToken=_returnToken;
627                     }
628                     else if ((LA(1)=='+') && (true)) {
629                         mPLUS(true);
630                         theRetToken=_returnToken;
631                     }
632                     else if ((LA(1)=='-') && (true)) {
633                         mMINUS(true);
634                         theRetToken=_returnToken;
635                     }
636                     else if ((LA(1)=='*') && (true)) {
637                         mSTAR(true);
638                         theRetToken=_returnToken;
639                     }
640                     else if ((LA(1)=='%') && (true)) {
641                         mMOD(true);
642                         theRetToken=_returnToken;
643                     }
644                     else if ((LA(1)=='>') && (true)) {
645                         mGT(true);
646                         theRetToken=_returnToken;
647                     }
648                     else if ((LA(1)=='<') && (true)) {
649                         mLT(true);
650                         theRetToken=_returnToken;
651                     }
652                     else if ((LA(1)=='^') && (true)) {
653                         mBXOR(true);
654                         theRetToken=_returnToken;
655                     }
656                     else if ((LA(1)=='|') && (true)) {
657                         mBOR(true);
658                         theRetToken=_returnToken;
659                     }
660                     else if ((LA(1)=='&') && (true)) {
661                         mBAND(true);
662                         theRetToken=_returnToken;
663                     }
664                     else if (((LA(1)=='#'))&&(getLine() == 1 && getColumn() == 1)) {
665                         mSH_COMMENT(true);
666                         theRetToken=_returnToken;
667                     }
668                     else if ((LA(1)=='/') && (true)) {
669                         mREGEXP_LITERAL(true);
670                         theRetToken=_returnToken;
671                     }
672                     else if ((_tokenSet_0.member(LA(1)))) {
673                         mIDENT(true);
674                         theRetToken=_returnToken;
675                     }
676                 else {
677                     if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
678                 else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
679                 }
680                 }
681                 if ( _returnToken==null ) continue tryAgain; // found SKIP token
682
_ttype = _returnToken.getType();
683                 _returnToken.setType(_ttype);
684                 return _returnToken;
685             }
686             catch (RecognitionException e) {
687                 throw new TokenStreamRecognitionException(e);
688             }
689         }
690         catch (CharStreamException cse) {
691             if ( cse instanceof CharStreamIOException ) {
692                 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
693             }
694             else {
695                 throw new TokenStreamException(cse.getMessage());
696             }
697         }
698     }
699 }
700
701     public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
702         int _ttype; Token _token=null; int _begin=text.length();
703         _ttype = QUESTION;
704         int _saveIndex;
705         
706         match('?');
707         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
708             _token = makeToken(_ttype);
709             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
710         }
711         _returnToken = _token;
712     }
713     
714     public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
715         int _ttype; Token _token=null; int _begin=text.length();
716         _ttype = LPAREN;
717         int _saveIndex;
718         
719         match('(');
720         if ( inputState.guessing==0 ) {
721             ++parenLevel;
722         }
723         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
724             _token = makeToken(_ttype);
725             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
726         }
727         _returnToken = _token;
728     }
729     
730     public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
731         int _ttype; Token _token=null; int _begin=text.length();
732         _ttype = RPAREN;
733         int _saveIndex;
734         
735         match(')');
736         if ( inputState.guessing==0 ) {
737             --parenLevel;
738         }
739         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
740             _token = makeToken(_ttype);
741             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
742         }
743         _returnToken = _token;
744     }
745     
746     public final void mLBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
747         int _ttype; Token _token=null; int _begin=text.length();
748         _ttype = LBRACK;
749         int _saveIndex;
750         
751         match('[');
752         if ( inputState.guessing==0 ) {
753             ++parenLevel;
754         }
755         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
756             _token = makeToken(_ttype);
757             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
758         }
759         _returnToken = _token;
760     }
761     
762     public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
763         int _ttype; Token _token=null; int _begin=text.length();
764         _ttype = RBRACK;
765         int _saveIndex;
766         
767         match(']');
768         if ( inputState.guessing==0 ) {
769             --parenLevel;
770         }
771         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
772             _token = makeToken(_ttype);
773             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
774         }
775         _returnToken = _token;
776     }
777     
778     public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
779         int _ttype; Token _token=null; int _begin=text.length();
780         _ttype = LCURLY;
781         int _saveIndex;
782         
783         match('{');
784         if ( inputState.guessing==0 ) {
785             pushParenLevel();
786         }
787         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
788             _token = makeToken(_ttype);
789             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
790         }
791         _returnToken = _token;
792     }
793     
794     public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
795         int _ttype; Token _token=null; int _begin=text.length();
796         _ttype = RCURLY;
797         int _saveIndex;
798         
799         match('}');
800         if ( inputState.guessing==0 ) {
801             popParenLevel(); if(stringCtorState!=0) restartStringCtor(true);
802         }
803         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
804             _token = makeToken(_ttype);
805             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
806         }
807         _returnToken = _token;
808     }
809     
810     public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
811         int _ttype; Token _token=null; int _begin=text.length();
812         _ttype = COLON;
813         int _saveIndex;
814         
815         match(':');
816         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
817             _token = makeToken(_ttype);
818             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
819         }
820         _returnToken = _token;
821     }
822     
823     public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
824         int _ttype; Token _token=null; int _begin=text.length();
825         _ttype = COMMA;
826         int _saveIndex;
827         
828         match(',');
829         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
830             _token = makeToken(_ttype);
831             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
832         }
833         _returnToken = _token;
834     }
835     
836     public final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
837         int _ttype; Token _token=null; int _begin=text.length();
838         _ttype = DOT;
839         int _saveIndex;
840         
841         match('.');
842         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
843             _token = makeToken(_ttype);
844             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
845         }
846         _returnToken = _token;
847     }
848     
849     public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
850         int _ttype; Token _token=null; int _begin=text.length();
851         _ttype = ASSIGN;
852         int _saveIndex;
853         
854         match('=');
855         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
856             _token = makeToken(_ttype);
857             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
858         }
859         _returnToken = _token;
860     }
861     
862     public final void mCOMPARE_TO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
863         int _ttype; Token _token=null; int _begin=text.length();
864         _ttype = COMPARE_TO;
865         int _saveIndex;
866         
867         match("<=>");
868         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
869             _token = makeToken(_ttype);
870             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
871         }
872         _returnToken = _token;
873     }
874     
875     public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
876         int _ttype; Token _token=null; int _begin=text.length();
877         _ttype = EQUAL;
878         int _saveIndex;
879         
880         match("==");
881         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
882             _token = makeToken(_ttype);
883             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
884         }
885         _returnToken = _token;
886     }
887     
888     public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
889         int _ttype; Token _token=null; int _begin=text.length();
890         _ttype = LNOT;
891         int _saveIndex;
892         
893         match('!');
894         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
895             _token = makeToken(_ttype);
896             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
897         }
898         _returnToken = _token;
899     }
900     
901     public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
902         int _ttype; Token _token=null; int _begin=text.length();
903         _ttype = BNOT;
904         int _saveIndex;
905         
906         match('~');
907         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
908             _token = makeToken(_ttype);
909             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
910         }
911         _returnToken = _token;
912     }
913     
914     public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
915         int _ttype; Token _token=null; int _begin=text.length();
916         _ttype = NOT_EQUAL;
917         int _saveIndex;
918         
919         match("!=");
920         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
921             _token = makeToken(_ttype);
922             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
923         }
924         _returnToken = _token;
925     }
926     
927     protected final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
928         int _ttype; Token _token=null; int _begin=text.length();
929         _ttype = DIV;
930         int _saveIndex;
931         
932         match('/');
933         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
934             _token = makeToken(_ttype);
935             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
936         }
937         _returnToken = _token;
938     }
939     
940     protected final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
941         int _ttype; Token _token=null; int _begin=text.length();
942         _ttype = DIV_ASSIGN;
943         int _saveIndex;
944         
945         match("/=");
946         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
947             _token = makeToken(_ttype);
948             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
949         }
950         _returnToken = _token;
951     }
952     
953     public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
954         int _ttype; Token _token=null; int _begin=text.length();
955         _ttype = PLUS;
956         int _saveIndex;
957         
958         match('+');
959         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
960             _token = makeToken(_ttype);
961             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
962         }
963         _returnToken = _token;
964     }
965     
966     public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
967         int _ttype; Token _token=null; int _begin=text.length();
968         _ttype = PLUS_ASSIGN;
969         int _saveIndex;
970         
971         match("+=");
972         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
973             _token = makeToken(_ttype);
974             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
975         }
976         _returnToken = _token;
977     }
978     
979     public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
980         int _ttype; Token _token=null; int _begin=text.length();
981         _ttype = INC;
982         int _saveIndex;
983         
984         match("++");
985         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
986             _token = makeToken(_ttype);
987             _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
988         }
989         _returnToken = _token;
990     }
991     
992     public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
993         int _ttype; Token _token=null; int _begin=text.length();
994         _ttype = MINUS;
995         int _saveIndex;
996         
997         match('-');
998         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
999             _token = makeToken(_ttype);
1000            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1001        }
1002        _returnToken = _token;
1003    }
1004    
1005    public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1006        int _ttype; Token _token=null; int _begin=text.length();
1007        _ttype = MINUS_ASSIGN;
1008        int _saveIndex;
1009        
1010        match("-=");
1011        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1012            _token = makeToken(_ttype);
1013            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1014        }
1015        _returnToken = _token;
1016    }
1017    
1018    public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1019        int _ttype; Token _token=null; int _begin=text.length();
1020        _ttype = DEC;
1021        int _saveIndex;
1022        
1023        match("--");
1024        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1025            _token = makeToken(_ttype);
1026            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1027        }
1028        _returnToken = _token;
1029    }
1030    
1031    public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1032        int _ttype; Token _token=null; int _begin=text.length();
1033        _ttype = STAR;
1034        int _saveIndex;
1035        
1036        match('*');
1037        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1038            _token = makeToken(_ttype);
1039            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1040        }
1041        _returnToken = _token;
1042    }
1043    
1044    public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1045        int _ttype; Token _token=null; int _begin=text.length();
1046        _ttype = STAR_ASSIGN;
1047        int _saveIndex;
1048        
1049        match("*=");
1050        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1051            _token = makeToken(_ttype);
1052            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1053        }
1054        _returnToken = _token;
1055    }
1056    
1057    public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1058        int _ttype; Token _token=null; int _begin=text.length();
1059        _ttype = MOD;
1060        int _saveIndex;
1061        
1062        match('%');
1063        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1064            _token = makeToken(_ttype);
1065            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1066        }
1067        _returnToken = _token;
1068    }
1069    
1070    public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1071        int _ttype; Token _token=null; int _begin=text.length();
1072        _ttype = MOD_ASSIGN;
1073        int _saveIndex;
1074        
1075        match("%=");
1076        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1077            _token = makeToken(_ttype);
1078            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1079        }
1080        _returnToken = _token;
1081    }
1082    
1083    public final void mSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1084        int _ttype; Token _token=null; int _begin=text.length();
1085        _ttype = SR;
1086        int _saveIndex;
1087        
1088        match(">>");
1089        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1090            _token = makeToken(_ttype);
1091            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1092        }
1093        _returnToken = _token;
1094    }
1095    
1096    public final void mSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1097        int _ttype; Token _token=null; int _begin=text.length();
1098        _ttype = SR_ASSIGN;
1099        int _saveIndex;
1100        
1101        match(">>=");
1102        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1103            _token = makeToken(_ttype);
1104            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1105        }
1106        _returnToken = _token;
1107    }
1108    
1109    public final void mBSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1110        int _ttype; Token _token=null; int _begin=text.length();
1111        _ttype = BSR;
1112        int _saveIndex;
1113        
1114        match(">>>");
1115        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1116            _token = makeToken(_ttype);
1117            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1118        }
1119        _returnToken = _token;
1120    }
1121    
1122    public final void mBSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1123        int _ttype; Token _token=null; int _begin=text.length();
1124        _ttype = BSR_ASSIGN;
1125        int _saveIndex;
1126        
1127        match(">>>=");
1128        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1129            _token = makeToken(_ttype);
1130            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1131        }
1132        _returnToken = _token;
1133    }
1134    
1135    public final void mGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1136        int _ttype; Token _token=null; int _begin=text.length();
1137        _ttype = GE;
1138        int _saveIndex;
1139        
1140        match(">=");
1141        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1142            _token = makeToken(_ttype);
1143            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1144        }
1145        _returnToken = _token;
1146    }
1147    
1148    public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1149        int _ttype; Token _token=null; int _begin=text.length();
1150        _ttype = GT;
1151        int _saveIndex;
1152        
1153        match(">");
1154        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1155            _token = makeToken(_ttype);
1156            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1157        }
1158        _returnToken = _token;
1159    }
1160    
1161    public final void mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1162        int _ttype; Token _token=null; int _begin=text.length();
1163        _ttype = SL;
1164        int _saveIndex;
1165        
1166        match("<<");
1167        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1168            _token = makeToken(_ttype);
1169            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1170        }
1171        _returnToken = _token;
1172    }
1173    
1174    public final void mSL_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1175        int _ttype; Token _token=null; int _begin=text.length();
1176        _ttype = SL_ASSIGN;
1177        int _saveIndex;
1178        
1179        match("<<=");
1180        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1181            _token = makeToken(_ttype);
1182            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1183        }
1184        _returnToken = _token;
1185    }
1186    
1187    public final void mLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1188        int _ttype; Token _token=null; int _begin=text.length();
1189        _ttype = LE;
1190        int _saveIndex;
1191        
1192        match("<=");
1193        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1194            _token = makeToken(_ttype);
1195            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1196        }
1197        _returnToken = _token;
1198    }
1199    
1200    public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1201        int _ttype; Token _token=null; int _begin=text.length();
1202        _ttype = LT;
1203        int _saveIndex;
1204        
1205        match('<');
1206        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1207            _token = makeToken(_ttype);
1208            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1209        }
1210        _returnToken = _token;
1211    }
1212    
1213    public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1214        int _ttype; Token _token=null; int _begin=text.length();
1215        _ttype = BXOR;
1216        int _saveIndex;
1217        
1218        match('^');
1219        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1220            _token = makeToken(_ttype);
1221            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1222        }
1223        _returnToken = _token;
1224    }
1225    
1226    public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1227        int _ttype; Token _token=null; int _begin=text.length();
1228        _ttype = BXOR_ASSIGN;
1229        int _saveIndex;
1230        
1231        match("^=");
1232        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1233            _token = makeToken(_ttype);
1234            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1235        }
1236        _returnToken = _token;
1237    }
1238    
1239    public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1240        int _ttype; Token _token=null; int _begin=text.length();
1241        _ttype = BOR;
1242        int _saveIndex;
1243        
1244        match('|');
1245        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1246            _token = makeToken(_ttype);
1247            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1248        }
1249        _returnToken = _token;
1250    }
1251    
1252    public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1253        int _ttype; Token _token=null; int _begin=text.length();
1254        _ttype = BOR_ASSIGN;
1255        int _saveIndex;
1256        
1257        match("|=");
1258        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1259            _token = makeToken(_ttype);
1260            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1261        }
1262        _returnToken = _token;
1263    }
1264    
1265    public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1266        int _ttype; Token _token=null; int _begin=text.length();
1267        _ttype = LOR;
1268        int _saveIndex;
1269        
1270        match("||");
1271        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1272            _token = makeToken(_ttype);
1273            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1274        }
1275        _returnToken = _token;
1276    }
1277    
1278    public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1279        int _ttype; Token _token=null; int _begin=text.length();
1280        _ttype = BAND;
1281        int _saveIndex;
1282        
1283        match('&');
1284        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1285            _token = makeToken(_ttype);
1286            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1287        }
1288        _returnToken = _token;
1289    }
1290    
1291    public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1292        int _ttype; Token _token=null; int _begin=text.length();
1293        _ttype = BAND_ASSIGN;
1294        int _saveIndex;
1295        
1296        match("&=");
1297        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1298            _token = makeToken(_ttype);
1299            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1300        }
1301        _returnToken = _token;
1302    }
1303    
1304    public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1305        int _ttype; Token _token=null; int _begin=text.length();
1306        _ttype = LAND;
1307        int _saveIndex;
1308        
1309        match("&&");
1310        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1311            _token = makeToken(_ttype);
1312            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1313        }
1314        _returnToken = _token;
1315    }
1316    
1317    public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1318        int _ttype; Token _token=null; int _begin=text.length();
1319        _ttype = SEMI;
1320        int _saveIndex;
1321        
1322        match(';');
1323        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1324            _token = makeToken(_ttype);
1325            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1326        }
1327        _returnToken = _token;
1328    }
1329    
1330    public final void mDOLLAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1331        int _ttype; Token _token=null; int _begin=text.length();
1332        _ttype = DOLLAR;
1333        int _saveIndex;
1334        
1335        match('$');
1336        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1337            _token = makeToken(_ttype);
1338            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1339        }
1340        _returnToken = _token;
1341    }
1342    
1343    public final void mRANGE_INCLUSIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1344        int _ttype; Token _token=null; int _begin=text.length();
1345        _ttype = RANGE_INCLUSIVE;
1346        int _saveIndex;
1347        
1348        match("..");
1349        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1350            _token = makeToken(_ttype);
1351            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1352        }
1353        _returnToken = _token;
1354    }
1355    
1356    public final void mRANGE_EXCLUSIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1357        int _ttype; Token _token=null; int _begin=text.length();
1358        _ttype = RANGE_EXCLUSIVE;
1359        int _saveIndex;
1360        
1361        match("..<");
1362        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1363            _token = makeToken(_ttype);
1364            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1365        }
1366        _returnToken = _token;
1367    }
1368    
1369    public final void mTRIPLE_DOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1370        int _ttype; Token _token=null; int _begin=text.length();
1371        _ttype = TRIPLE_DOT;
1372        int _saveIndex;
1373        
1374        match("...");
1375        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1376            _token = makeToken(_ttype);
1377            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1378        }
1379        _returnToken = _token;
1380    }
1381    
1382    public final void mSPREAD_DOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1383        int _ttype; Token _token=null; int _begin=text.length();
1384        _ttype = SPREAD_DOT;
1385        int _saveIndex;
1386        
1387        match("*.");
1388        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1389            _token = makeToken(_ttype);
1390            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1391        }
1392        _returnToken = _token;
1393    }
1394    
1395    public final void mOPTIONAL_DOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1396        int _ttype; Token _token=null; int _begin=text.length();
1397        _ttype = OPTIONAL_DOT;
1398        int _saveIndex;
1399        
1400        match("?.");
1401        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1402            _token = makeToken(_ttype);
1403            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1404        }
1405        _returnToken = _token;
1406    }
1407    
1408    public final void mMEMBER_POINTER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1409        int _ttype; Token _token=null; int _begin=text.length();
1410        _ttype = MEMBER_POINTER;
1411        int _saveIndex;
1412        
1413        match(".&");
1414        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1415            _token = makeToken(_ttype);
1416            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1417        }
1418        _returnToken = _token;
1419    }
1420    
1421    public final void mREGEX_FIND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1422        int _ttype; Token _token=null; int _begin=text.length();
1423        _ttype = REGEX_FIND;
1424        int _saveIndex;
1425        
1426        match("=~");
1427        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1428            _token = makeToken(_ttype);
1429            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1430        }
1431        _returnToken = _token;
1432    }
1433    
1434    public final void mREGEX_MATCH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1435        int _ttype; Token _token=null; int _begin=text.length();
1436        _ttype = REGEX_MATCH;
1437        int _saveIndex;
1438        
1439        match("==~");
1440        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1441            _token = makeToken(_ttype);
1442            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1443        }
1444        _returnToken = _token;
1445    }
1446    
1447    public final void mSTAR_STAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1448        int _ttype; Token _token=null; int _begin=text.length();
1449        _ttype = STAR_STAR;
1450        int _saveIndex;
1451        
1452        match("**");
1453        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1454            _token = makeToken(_ttype);
1455            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1456        }
1457        _returnToken = _token;
1458    }
1459    
1460    public final void mSTAR_STAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1461        int _ttype; Token _token=null; int _begin=text.length();
1462        _ttype = STAR_STAR_ASSIGN;
1463        int _saveIndex;
1464        
1465        match("**=");
1466        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1467            _token = makeToken(_ttype);
1468            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1469        }
1470        _returnToken = _token;
1471    }
1472    
1473    public final void mCLOSURE_OP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1474        int _ttype; Token _token=null; int _begin=text.length();
1475        _ttype = CLOSURE_OP;
1476        int _saveIndex;
1477        
1478        match("->");
1479        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1480            _token = makeToken(_ttype);
1481            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1482        }
1483        _returnToken = _token;
1484    }
1485    
1486    public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1487        int _ttype; Token _token=null; int _begin=text.length();
1488        _ttype = WS;
1489        int _saveIndex;
1490        
1491        {
1492        int _cnt552=0;
1493        _loop552:
1494        do {
1495            if ((LA(1)=='\\') && (LA(2)=='\n'||LA(2)=='\r') && (true) && (true)) {
1496                match('\\');
1497                mONE_NL(false,false);
1498            }
1499            else if ((LA(1)==' ') && (true) && (true) && (true)) {
1500                match(' ');
1501            }
1502            else if ((LA(1)=='\t') && (true) && (true) && (true)) {
1503                match('\t');
1504            }
1505            else if ((LA(1)=='\u000c') && (true) && (true) && (true)) {
1506                match('\f');
1507            }
1508            else {
1509                if ( _cnt552>=1 ) { break _loop552; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1510            }
1511            
1512            _cnt552++;
1513        } while (true);
1514        }
1515        if ( inputState.guessing==0 ) {
1516            if (!whitespaceIncluded) _ttype = Token.SKIP;
1517        }
1518        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1519            _token = makeToken(_ttype);
1520            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1521        }
1522        _returnToken = _token;
1523    }
1524    
1525    protected final void mONE_NL(boolean _createToken,
1526        boolean check
1527    ) throws RecognitionException, CharStreamException, TokenStreamException {
1528        int _ttype; Token _token=null; int _begin=text.length();
1529        _ttype = ONE_NL;
1530        int _saveIndex;
1531        
1532        {
1533        if ((LA(1)=='\r') && (LA(2)=='\n') && (true) && (true)) {
1534            _saveIndex=text.length();
1535            match("\r\n");
1536            text.setLength(_saveIndex);
1537        }
1538        else if ((LA(1)=='\r') && (true) && (true) && (true)) {
1539            _saveIndex=text.length();
1540            match('\r');
1541            text.setLength(_saveIndex);
1542        }
1543        else if ((LA(1)=='\n')) {
1544            _saveIndex=text.length();
1545            match('\n');
1546            text.setLength(_saveIndex);
1547        }
1548        else {
1549            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1550        }
1551        
1552        }
1553        if ( inputState.guessing==0 ) {
1554            
1555            // update current line number for error reporting
1556
newlineCheck(check);
1557            
1558        }
1559        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1560            _token = makeToken(_ttype);
1561            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1562        }
1563        _returnToken = _token;
1564    }
1565    
1566    public final void mNLS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1567        int _ttype; Token _token=null; int _begin=text.length();
1568        _ttype = NLS;
1569        int _saveIndex;
1570        
1571        mONE_NL(false,true);
1572        {
1573        if (((LA(1)=='\t'||LA(1)=='\n'||LA(1)=='\u000c'||LA(1)=='\r'||LA(1)==' '||LA(1)=='/'||LA(1)=='\\'))&&(!whitespaceIncluded)) {
1574            {
1575            int _cnt558=0;
1576            _loop558:
1577            do {
1578                switch ( LA(1)) {
1579                case '\n': case '\r':
1580                {
1581                    mONE_NL(false,true);
1582                    break;
1583                }
1584                case '\t': case '\u000c': case ' ': case '\\':
1585                {
1586                    mWS(false);
1587                    break;
1588                }
1589                default:
1590                    if ((LA(1)=='/') && (LA(2)=='/')) {
1591                        mSL_COMMENT(false);
1592                    }
1593                    else if ((LA(1)=='/') && (LA(2)=='*')) {
1594                        mML_COMMENT(false);
1595                    }
1596                else {
1597                    if ( _cnt558>=1 ) { break _loop558; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1598                }
1599                }
1600                _cnt558++;
1601            } while (true);
1602            }
1603        }
1604        else {
1605        }
1606        
1607        }
1608        if ( inputState.guessing==0 ) {
1609            if (whitespaceIncluded) {
1610            // keep the token as-is
1611
} else if (parenLevel != 0) {
1612            // when directly inside parens, all newlines are ignored here
1613
_ttype = Token.SKIP;
1614            } else {
1615            // inside {...}, newlines must be explicitly matched as 'nls!'
1616
text.setLength(_begin); text.append("<newline>");
1617            }
1618            
1619        }
1620        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1621            _token = makeToken(_ttype);
1622            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1623        }
1624        _returnToken = _token;
1625    }
1626    
1627    public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1628        int _ttype; Token _token=null; int _begin=text.length();
1629        _ttype = SL_COMMENT;
1630        int _saveIndex;
1631        
1632        match("//");
1633        {
1634        _loop562:
1635        do {
1636            if ((_tokenSet_1.member(LA(1))) && (true) && (true) && (true)) {
1637                {
1638                match(_tokenSet_1);
1639                }
1640            }
1641            else {
1642                break _loop562;
1643            }
1644            
1645        } while (true);
1646        }
1647        if ( inputState.guessing==0 ) {
1648            if (!whitespaceIncluded) _ttype = Token.SKIP;
1649        }
1650        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1651            _token = makeToken(_ttype);
1652            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1653        }
1654        _returnToken = _token;
1655    }
1656    
1657    public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1658        int _ttype; Token _token=null; int _begin=text.length();
1659        _ttype = ML_COMMENT;
1660        int _saveIndex;
1661        
1662        match("/*");
1663        {
1664        _loop572:
1665        do {
1666            boolean synPredMatched570 = false;
1667            if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && (true))) {
1668                int _m570 = mark();
1669                synPredMatched570 = true;
1670                inputState.guessing++;
1671                try {
1672                    {
1673                    match('*');
1674                    matchNot('/');
1675                    }
1676                }
1677                catch (RecognitionException pe) {
1678                    synPredMatched570 = false;
1679                }
1680                rewind(_m570);
1681                inputState.guessing--;
1682            }
1683            if ( synPredMatched570 ) {
1684                match('*');
1685            }
1686            else if ((LA(1)=='\n'||LA(1)=='\r')) {
1687                mONE_NL(false,true);
1688            }
1689            else if ((_tokenSet_2.member(LA(1)))) {
1690                {
1691                match(_tokenSet_2);
1692                }
1693            }
1694            else {
1695                break _loop572;
1696            }
1697            
1698        } while (true);
1699        }
1700        match("*/");
1701        if ( inputState.guessing==0 ) {
1702            if (!whitespaceIncluded) _ttype = Token.SKIP;
1703        }
1704        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1705            _token = makeToken(_ttype);
1706            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1707        }
1708        _returnToken = _token;
1709    }
1710    
1711    public final void mSH_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1712        int _ttype; Token _token=null; int _begin=text.length();
1713        _ttype = SH_COMMENT;
1714        int _saveIndex;
1715        
1716        if (!(getLine() == 1 && getColumn() == 1))
1717          throw new SemanticException("getLine() == 1 && getColumn() == 1");
1718        match("#!");
1719        {
1720        _loop566:
1721        do {
1722            if ((_tokenSet_1.member(LA(1)))) {
1723                {
1724                match(_tokenSet_1);
1725                }
1726            }
1727            else {
1728                break _loop566;
1729            }
1730            
1731        } while (true);
1732        }
1733        if ( inputState.guessing==0 ) {
1734            if (!whitespaceIncluded) _ttype = Token.SKIP;
1735        }
1736        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1737            _token = makeToken(_ttype);
1738            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1739        }
1740        _returnToken = _token;
1741    }
1742    
1743    public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1744        int _ttype; Token _token=null; int _begin=text.length();
1745        _ttype = STRING_LITERAL;
1746        int _saveIndex;
1747        int tt=0;
1748        
1749        boolean synPredMatched575 = false;
1750        if (((LA(1)=='\'') && (LA(2)=='\'') && (LA(3)=='\'') && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe')))) {
1751            int _m575 = mark();
1752            synPredMatched575 = true;
1753            inputState.guessing++;
1754            try {
1755                {
1756                match("'''");
1757                }
1758            }
1759            catch (RecognitionException pe) {
1760                synPredMatched575 = false;
1761            }
1762            rewind(_m575);
1763            inputState.guessing--;
1764        }
1765        if ( synPredMatched575 ) {
1766            _saveIndex=text.length();
1767            match("'''");
1768            text.setLength(_saveIndex);
1769            {
1770            _loop580:
1771            do {
1772                switch ( LA(1)) {
1773                case '\\':
1774                {
1775                    mESC(false);
1776                    break;
1777                }
1778                case '"':
1779                {
1780                    match('"');
1781                    break;
1782                }
1783                case '$':
1784                {
1785                    match('$');
1786                    break;
1787                }
1788                case '\n': case '\r':
1789                {
1790                    mSTRING_NL(false,true);
1791                    break;
1792                }
1793                default:
1794                    boolean synPredMatched579 = false;
1795                    if (((LA(1)=='\'') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0003' && LA(3) <= '\ufffe')) && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe')))) {
1796                        int _m579 = mark();
1797                        synPredMatched579 = true;
1798                        inputState.guessing++;
1799                        try {
1800                            {
1801                            match('\'');
1802                            {
1803                            if ((_tokenSet_3.member(LA(1)))) {
1804                                matchNot('\'');
1805                            }
1806                            else if ((LA(1)=='\'')) {
1807                                match('\'');
1808                                matchNot('\'');
1809                            }
1810                            else {
1811                                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1812                            }
1813                            
1814                            }
1815                            }
1816                        }
1817                        catch (RecognitionException pe) {
1818                            synPredMatched579 = false;
1819                        }
1820                        rewind(_m579);
1821                        inputState.guessing--;
1822                    }
1823                    if ( synPredMatched579 ) {
1824                        match('\'');
1825                    }
1826                    else if ((_tokenSet_4.member(LA(1)))) {
1827                        mSTRING_CH(false);
1828                    }
1829                else {
1830                    break _loop580;
1831                }
1832                }
1833            } while (true);
1834            }
1835            _saveIndex=text.length();
1836            match("'''");
1837            text.setLength(_saveIndex);
1838        }
1839        else {
1840            boolean synPredMatched584 = false;
1841            if (((LA(1)=='"') && (LA(2)=='"') && (LA(3)=='"') && ((LA(4) >= '\u0003' && LA(4) <= '\ufffe')))) {
1842                int _m584 = mark();
1843                synPredMatched584 = true;
1844                inputState.guessing++;
1845                try {
1846                    {
1847                    match("\"\"\"");
1848                    }
1849                }
1850                catch (RecognitionException pe) {
1851                    synPredMatched584 = false;
1852                }
1853                rewind(_m584);
1854                inputState.guessing--;
1855            }
1856            if ( synPredMatched584 ) {
1857                _saveIndex=text.length();
1858                match("\"\"\"");
1859                text.setLength(_saveIndex);
1860                tt=mSTRING_CTOR_END(false,true, /*tripleQuote:*/ true);
1861                if ( inputState.guessing==0 ) {
1862                    _ttype = tt;
1863                }
1864            }
1865            else if ((LA(1)=='\'') && (_tokenSet_1.member(LA(2))) && (true) && (true)) {
1866                _saveIndex=text.length();
1867                match('\'');
1868                text.setLength(_saveIndex);
1869                if ( inputState.guessing==0 ) {
1870                    ++suppressNewline;
1871                }
1872                {
1873                _loop582:
1874                do {
1875                    switch ( LA(1)) {
1876                    case '\\':
1877                    {
1878                        mESC(false);
1879                        break;
1880                    }
1881                    case '"':
1882                    {
1883                        match('"');
1884                        break;
1885                    }
1886                    case '$':
1887                    {
1888                        match('$');
1889                        break;
1890                    }
1891                    default:
1892                        if ((_tokenSet_4.member(LA(1)))) {
1893                            mSTRING_CH(false);
1894                        }
1895                    else {
1896                        break _loop582;
1897                    }
1898                    }
1899                } while (true);
1900                }
1901                if ( inputState.guessing==0 ) {
1902                    --suppressNewline;
1903                }
1904                _saveIndex=text.length();
1905                match('\'');
1906                text.setLength(_saveIndex);
1907            }
1908            else if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true)) {
1909                _saveIndex=text.length();
1910                match('"');
1911                text.setLength(_saveIndex);
1912                if ( inputState.guessing==0 ) {
1913                    ++suppressNewline;
1914                }
1915                tt=mSTRING_CTOR_END(false,true, /*tripleQuote:*/ false);
1916                if ( inputState.guessing==0 ) {
1917                    _ttype = tt;
1918                }
1919            }
1920            else {
1921                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1922            }
1923            }
1924            if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1925                _token = makeToken(_ttype);
1926                _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1927            }
1928            _returnToken = _token;
1929        }
1930        
1931    protected final void mSTRING_CH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1932        int _ttype; Token _token=null; int _begin=text.length();
1933        _ttype = STRING_CH;
1934        int _saveIndex;
1935        
1936        {
1937        match(_tokenSet_4);
1938        }
1939        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1940            _token = makeToken(_ttype);
1941            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
1942        }
1943        _returnToken = _token;
1944    }
1945    
1946    protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1947        int _ttype; Token _token=null; int _begin=text.length();
1948        _ttype = ESC;
1949        int _saveIndex;
1950        
1951        if ((LA(1)=='\\') && (LA(2)=='"'||LA(2)=='$'||LA(2)=='\''||LA(2)=='0'||LA(2)=='1'||LA(2)=='2'||LA(2)=='3'||LA(2)=='4'||LA(2)=='5'||LA(2)=='6'||LA(2)=='7'||LA(2)=='\\'||LA(2)=='b'||LA(2)=='f'||LA(2)=='n'||LA(2)=='r'||LA(2)=='t'||LA(2)=='u')) {
1952            _saveIndex=text.length();
1953            match('\\');
1954            text.setLength(_saveIndex);
1955            {
1956            switch ( LA(1)) {
1957            case 'n':
1958            {
1959                match('n');
1960                if ( inputState.guessing==0 ) {
1961                    text.setLength(_begin); text.append("\n");
1962                }
1963                break;
1964            }
1965            case 'r':
1966            {
1967                match('r');
1968                if ( inputState.guessing==0 ) {
1969                    text.setLength(_begin); text.append("\r");
1970                }
1971                break;
1972            }
1973            case 't':
1974            {
1975                match('t');
1976                if ( inputState.guessing==0 ) {
1977                    text.setLength(_begin); text.append("\t");
1978                }
1979                break;
1980            }
1981            case 'b':
1982            {
1983                match('b');
1984                if ( inputState.guessing==0 ) {
1985                    text.setLength(_begin); text.append("\b");
1986                }
1987                break;
1988            }
1989            case 'f':
1990            {
1991                match('f');
1992                if ( inputState.guessing==0 ) {
1993                    text.setLength(_begin); text.append("\f");
1994                }
1995                break;
1996            }
1997            case '"':
1998            {
1999                match('"');
2000                break;
2001            }
2002            case '\'':
2003            {
2004                match('\'');
2005                break;
2006            }
2007            case '\\':
2008            {
2009                match('\\');
2010                break;
2011            }
2012            case '$':
2013            {
2014                match('$');
2015                break;
2016            }
2017            case 'u':
2018            {
2019                {
2020                int _cnt610=0;
2021                _loop610:
2022                do {
2023                    if ((LA(1)=='u')) {
2024                        match('u');
2025                    }
2026                    else {
2027                        if ( _cnt610>=1 ) { break _loop610; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2028                    }
2029                    
2030                    _cnt610++;
2031                } while (true);
2032                }
2033                if ( inputState.guessing==0 ) {
2034                    text.setLength(_begin); text.append("");
2035                }
2036                mHEX_DIGIT(false);
2037                mHEX_DIGIT(false);
2038                mHEX_DIGIT(false);
2039                mHEX_DIGIT(false);
2040                if ( inputState.guessing==0 ) {
2041                    char ch = (char)Integer.parseInt(new String JavaDoc(text.getBuffer(),_begin,text.length()-_begin),16); text.setLength(_begin); text.append(ch);
2042                }
2043                break;
2044            }
2045            case '0': case '1': case '2': case '3':
2046            {
2047                matchRange('0','3');
2048                {
2049                if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true)) {
2050                    matchRange('0','7');
2051                    {
2052                    if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true)) {
2053                        matchRange('0','7');
2054                    }
2055                    else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
2056                    }
2057                    else {
2058                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2059                    }
2060                    
2061                    }
2062                }
2063                else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
2064                }
2065                else {
2066                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2067                }
2068                
2069                }
2070                if ( inputState.guessing==0 ) {
2071                    char ch = (char)Integer.parseInt(new String JavaDoc(text.getBuffer(),_begin,text.length()-_begin),8); text.setLength(_begin); text.append(ch);
2072                }
2073                break;
2074            }
2075            case '4': case '5': case '6': case '7':
2076            {
2077                matchRange('4','7');
2078                {
2079                if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true)) {
2080                    matchRange('0','7');
2081                }
2082                else if (((LA(1) >= '\u0003' && LA(1) <= '\ufffe')) && (true) && (true) && (true)) {
2083                }
2084                else {
2085                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2086                }
2087                
2088                }
2089                if ( inputState.guessing==0 ) {
2090                    char ch = (char)Integer.parseInt(new String JavaDoc(text.getBuffer(),_begin,text.length()-_begin),8); text.setLength(_begin); text.append(ch);
2091                }
2092                break;
2093            }
2094            default:
2095            {
2096                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2097            }
2098            }
2099            }
2100        }
2101        else if ((LA(1)=='\\') && (LA(2)=='\n'||LA(2)=='\r')) {
2102            _saveIndex=text.length();
2103            match('\\');
2104            text.setLength(_saveIndex);
2105            _saveIndex=text.length();
2106            mONE_NL(false,false);
2107            text.setLength(_saveIndex);
2108        }
2109        else {
2110            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2111        }
2112        
2113        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2114            _token = makeToken(_ttype);
2115            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2116        }
2117        _returnToken = _token;
2118    }
2119    
2120    protected final void mSTRING_NL(boolean _createToken,
2121        boolean allowNewline
2122    ) throws RecognitionException, CharStreamException, TokenStreamException {
2123        int _ttype; Token _token=null; int _begin=text.length();
2124        _ttype = STRING_NL;
2125        int _saveIndex;
2126        
2127        if ( inputState.guessing==0 ) {
2128            if (!allowNewline) throw new MismatchedCharException('\n', '\n', true, this);
2129        }
2130        mONE_NL(false,false);
2131        if ( inputState.guessing==0 ) {
2132            text.setLength(_begin); text.append('\n');
2133        }
2134        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2135            _token = makeToken(_ttype);
2136            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2137        }
2138        _returnToken = _token;
2139    }
2140    
2141    protected final int mSTRING_CTOR_END(boolean _createToken,
2142        boolean fromStart, boolean tripleQuote
2143    ) throws RecognitionException, CharStreamException, TokenStreamException {
2144        int tt=STRING_CTOR_END;
2145        int _ttype; Token _token=null; int _begin=text.length();
2146        _ttype = STRING_CTOR_END;
2147        int _saveIndex;
2148        boolean dollarOK = false;
2149        
2150        {
2151        _loop590:
2152        do {
2153            switch ( LA(1)) {
2154            case '\\':
2155            {
2156                mESC(false);
2157                break;
2158            }
2159            case '\'':
2160            {
2161                match('\'');
2162                break;
2163            }
2164            case '\n': case '\r':
2165            {
2166                mSTRING_NL(false,tripleQuote);
2167                break;
2168            }
2169            default:
2170                boolean synPredMatched589 = false;
2171                if ((((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\ufffe')) && (true) && (true))&&(tripleQuote))) {
2172                    int _m589 = mark();
2173                    synPredMatched589 = true;
2174                    inputState.guessing++;
2175                    try {
2176                        {
2177                        match('"');
2178                        {
2179                        if ((_tokenSet_5.member(LA(1)))) {
2180                            matchNot('"');
2181                        }
2182                        else if ((LA(1)=='"')) {
2183                            match('"');
2184                            matchNot('"');
2185                        }
2186                        else {
2187                            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2188                        }
2189                        
2190                        }
2191                        }
2192                    }
2193                    catch (RecognitionException pe) {
2194                        synPredMatched589 = false;
2195                    }
2196                    rewind(_m589);
2197                    inputState.guessing--;
2198                }
2199                if ( synPredMatched589 ) {
2200                    match('"');
2201                }
2202                else if ((_tokenSet_4.member(LA(1)))) {
2203                    mSTRING_CH(false);
2204                }
2205            else {
2206                break _loop590;
2207            }
2208            }
2209        } while (true);
2210        }
2211        {
2212        switch ( LA(1)) {
2213        case '"':
2214        {
2215            {
2216            if (((LA(1)=='"') && (LA(2)=='"'))&&( tripleQuote )) {
2217                _saveIndex=text.length();
2218                match("\"\"\"");
2219                text.setLength(_saveIndex);
2220            }
2221            else if (((LA(1)=='"') && (true))&&( !tripleQuote )) {
2222                _saveIndex=text.length();
2223                match("\"");
2224                text.setLength(_saveIndex);
2225            }
2226            else {
2227                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2228            }
2229            
2230            }
2231            if ( inputState.guessing==0 ) {
2232                
2233                if (fromStart) tt = STRING_LITERAL; // plain string literal!
2234
if (!tripleQuote) {--suppressNewline;}
2235                // done with string constructor!
2236
//assert(stringCtorState == 0);
2237

2238            }
2239            break;
2240        }
2241        case '$':
2242        {
2243            if ( inputState.guessing==0 ) {
2244                dollarOK = atValidDollarEscape();
2245            }
2246            _saveIndex=text.length();
2247            match('$');
2248            text.setLength(_saveIndex);
2249            if ( inputState.guessing==0 ) {
2250                
2251                require(dollarOK,
2252                "illegal string body character after dollar sign",
2253                "either escape a literal dollar sign \"\\$5\" or bracket the value expression \"${5}\"");
2254                // Yes, it's a string constructor, and we've got a value part.
2255
tt = (fromStart ? STRING_CTOR_START : STRING_CTOR_MIDDLE);
2256                stringCtorState = SCS_VAL + (tripleQuote? SCS_TQ_TYPE: SCS_SQ_TYPE);
2257                
2258            }
2259            break;
2260        }
2261        default:
2262        {
2263            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2264        }
2265        }
2266        }
2267        if ( inputState.guessing==0 ) {
2268            _ttype = tt;
2269        }
2270        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2271            _token = makeToken(_ttype);
2272            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2273        }
2274        _returnToken = _token;
2275        return tt;
2276    }
2277    
2278    public final void mREGEXP_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2279        int _ttype; Token _token=null; int _begin=text.length();
2280        _ttype = REGEXP_LITERAL;
2281        int _saveIndex;
2282        int tt=0;
2283        
2284        if (((LA(1)=='/') && (_tokenSet_6.member(LA(2))) && (true) && (true))&&(allowRegexpLiteral())) {
2285            _saveIndex=text.length();
2286            match('/');
2287            text.setLength(_saveIndex);
2288            if ( inputState.guessing==0 ) {
2289                ++suppressNewline;
2290            }
2291            {
2292            if (((LA(1)=='$') && (_tokenSet_2.member(LA(2))))&&(!atValidDollarEscape())) {
2293                match('$');
2294                tt=mREGEXP_CTOR_END(false,true);
2295            }
2296            else if ((_tokenSet_7.member(LA(1)))) {
2297                mREGEXP_SYMBOL(false);
2298                tt=mREGEXP_CTOR_END(false,true);
2299            }
2300            else if ((LA(1)=='$') && (true)) {
2301                _saveIndex=text.length();
2302                match('$');
2303                text.setLength(_saveIndex);
2304                if ( inputState.guessing==0 ) {
2305                    
2306                    // Yes, it's a regexp constructor, and we've got a value part.
2307
tt = STRING_CTOR_START;
2308                    stringCtorState = SCS_VAL + SCS_RE_TYPE;
2309                    
2310                }
2311            }
2312            else {
2313                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2314            }
2315            
2316            }
2317            if ( inputState.guessing==0 ) {
2318                _ttype = tt;
2319            }
2320        }
2321        else if ((LA(1)=='/') && (LA(2)=='=') && (true) && (true)) {
2322            mDIV_ASSIGN(false);
2323            if ( inputState.guessing==0 ) {
2324                _ttype = DIV_ASSIGN;
2325            }
2326        }
2327        else if ((LA(1)=='/') && (true)) {
2328            mDIV(false);
2329            if ( inputState.guessing==0 ) {
2330                _ttype = DIV;
2331            }
2332        }
2333        else {
2334            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2335        }
2336        
2337        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2338            _token = makeToken(_ttype);
2339            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2340        }
2341        _returnToken = _token;
2342    }
2343    
2344    protected final void mREGEXP_SYMBOL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2345        int _ttype; Token _token=null; int _begin=text.length();
2346        _ttype = REGEXP_SYMBOL;
2347        int _saveIndex;
2348        
2349        {
2350        if ((LA(1)=='\\') && (_tokenSet_8.member(LA(2)))) {
2351            match('\\');
2352            {
2353            match(_tokenSet_8);
2354            }
2355        }
2356        else if ((LA(1)=='\\') && (LA(2)=='\n'||LA(2)=='\r')) {
2357            _saveIndex=text.length();
2358            match('\\');
2359            text.setLength(_saveIndex);
2360            _saveIndex=text.length();
2361            mONE_NL(false,false);
2362            text.setLength(_saveIndex);
2363            if ( inputState.guessing==0 ) {
2364                text.setLength(_begin); text.append('\n');
2365            }
2366        }
2367        else if ((_tokenSet_9.member(LA(1)))) {
2368            {
2369            match(_tokenSet_9);
2370            }
2371        }
2372        else {
2373            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2374        }
2375        
2376        }
2377        {
2378        _loop606:
2379        do {
2380            if ((LA(1)=='*')) {
2381                match('*');
2382            }
2383            else {
2384                break _loop606;
2385            }
2386            
2387        } while (true);
2388        }
2389        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2390            _token = makeToken(_ttype);
2391            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2392        }
2393        _returnToken = _token;
2394    }
2395    
2396    protected final int mREGEXP_CTOR_END(boolean _createToken,
2397        boolean fromStart
2398    ) throws RecognitionException, CharStreamException, TokenStreamException {
2399        int tt=STRING_CTOR_END;
2400        int _ttype; Token _token=null; int _begin=text.length();
2401        _ttype = REGEXP_CTOR_END;
2402        int _saveIndex;
2403        
2404        {
2405        _loop599:
2406        do {
2407            if (((LA(1)=='$') && (_tokenSet_2.member(LA(2))))&&(!atValidDollarEscape())) {
2408                match('$');
2409            }
2410            else if ((_tokenSet_7.member(LA(1)))) {
2411                mREGEXP_SYMBOL(false);
2412            }
2413            else {
2414                break _loop599;
2415            }
2416            
2417        } while (true);
2418        }
2419        {
2420        switch ( LA(1)) {
2421        case '/':
2422        {
2423            _saveIndex=text.length();
2424            match('/');
2425            text.setLength(_saveIndex);
2426            if ( inputState.guessing==0 ) {
2427                
2428                if (fromStart) tt = STRING_LITERAL; // plain regexp literal!
2429
{--suppressNewline;}
2430                // done with regexp constructor!
2431
//assert(stringCtorState == 0);
2432

2433            }
2434            break;
2435        }
2436        case '$':
2437        {
2438            _saveIndex=text.length();
2439            match('$');
2440            text.setLength(_saveIndex);
2441            if ( inputState.guessing==0 ) {
2442                
2443                // Yes, it's a regexp constructor, and we've got a value part.
2444
tt = (fromStart ? STRING_CTOR_START : STRING_CTOR_MIDDLE);
2445                stringCtorState = SCS_VAL + SCS_RE_TYPE;
2446                
2447            }
2448            break;
2449        }
2450        default:
2451        {
2452            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2453        }
2454        }
2455        }
2456        if ( inputState.guessing==0 ) {
2457            _ttype = tt;
2458        }
2459        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2460            _token = makeToken(_ttype);
2461            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2462        }
2463        _returnToken = _token;
2464        return tt;
2465    }
2466    
2467    protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2468        int _ttype; Token _token=null; int _begin=text.length();
2469        _ttype = HEX_DIGIT;
2470        int _saveIndex;
2471        
2472        {
2473        switch ( LA(1)) {
2474        case '0': case '1': case '2': case '3':
2475        case '4': case '5': case '6': case '7':
2476        case '8': case '9':
2477        {
2478            matchRange('0','9');
2479            break;
2480        }
2481        case 'A': case 'B': case 'C': case 'D':
2482        case 'E': case 'F':
2483        {
2484            matchRange('A','F');
2485            break;
2486        }
2487        case 'a': case 'b': case 'c': case 'd':
2488        case 'e': case 'f':
2489        {
2490            matchRange('a','f');
2491            break;
2492        }
2493        default:
2494        {
2495            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2496        }
2497        }
2498        }
2499        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2500            _token = makeToken(_ttype);
2501            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2502        }
2503        _returnToken = _token;
2504    }
2505    
2506    protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2507        int _ttype; Token _token=null; int _begin=text.length();
2508        _ttype = VOCAB;
2509        int _saveIndex;
2510        
2511        matchRange('\3','\377');
2512        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2513            _token = makeToken(_ttype);
2514            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2515        }
2516        _returnToken = _token;
2517    }
2518    
2519    public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2520        int _ttype; Token _token=null; int _begin=text.length();
2521        _ttype = IDENT;
2522        int _saveIndex;
2523        
2524        mLETTER(false);
2525        {
2526        _loop620:
2527        do {
2528            if ((_tokenSet_0.member(LA(1)))) {
2529                mLETTER(false);
2530            }
2531            else if (((LA(1) >= '0' && LA(1) <= '9'))) {
2532                mDIGIT(false);
2533            }
2534            else {
2535                break _loop620;
2536            }
2537            
2538        } while (true);
2539        }
2540        if ( inputState.guessing==0 ) {
2541            
2542            if (stringCtorState != 0) {
2543            if (LA(1) == '.' && LA(2) != '$' &&
2544            Character.isJavaIdentifierStart(LA(2))) {
2545            // pick up another name component before going literal again:
2546
restartStringCtor(false);
2547            } else {
2548            // go back to the string
2549
restartStringCtor(true);
2550            }
2551            }
2552            int ttype = testLiteralsTable(IDENT);
2553            /* The grammar allows a few keywords to follow dot.
2554            * TODO: Reinstate this logic if we change or remove keywordPropertyNames.
2555            if (ttype != IDENT && lastSigTokenType == DOT) {
2556            // A few keywords can follow a dot:
2557            switch (ttype) {
2558            case LITERAL_this: case LITERAL_super: case LITERAL_class:
2559            break;
2560            default:
2561            ttype = LITERAL_in; // the poster child for bad dotted names
2562            }
2563            }
2564            */

2565            _ttype = ttype;
2566            
2567            // check if "assert" keyword is enabled
2568
if (assertEnabled && "assert".equals(new String JavaDoc(text.getBuffer(),_begin,text.length()-_begin))) {
2569            _ttype = LITERAL_assert; // set token type for the rule in the parser
2570
}
2571            // check if "enum" keyword is enabled
2572
if (enumEnabled && "enum".equals(new String JavaDoc(text.getBuffer(),_begin,text.length()-_begin))) {
2573            _ttype = LITERAL_enum; // set token type for the rule in the parser
2574
}
2575            
2576        }
2577        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2578            _token = makeToken(_ttype);
2579            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2580        }
2581        _returnToken = _token;
2582    }
2583    
2584    protected final void mLETTER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2585        int _ttype; Token _token=null; int _begin=text.length();
2586        _ttype = LETTER;
2587        int _saveIndex;
2588        
2589        switch ( LA(1)) {
2590        case 'a': case 'b': case 'c': case 'd':
2591        case 'e': case 'f': case 'g': case 'h':
2592        case 'i': case 'j': case 'k': case 'l':
2593        case 'm': case 'n': case 'o': case 'p':
2594        case 'q': case 'r': case 's': case 't':
2595        case 'u': case 'v': case 'w': case 'x':
2596        case 'y': case 'z':
2597        {
2598            matchRange('a','z');
2599            break;
2600        }
2601        case 'A': case 'B': case 'C': case 'D':
2602        case 'E': case 'F': case 'G': case 'H':
2603        case 'I': case 'J': case 'K': case 'L':
2604        case 'M': case 'N': case 'O': case 'P':
2605        case 'Q': case 'R': case 'S': case 'T':
2606        case 'U': case 'V': case 'W': case 'X':
2607        case 'Y': case 'Z':
2608        {
2609            matchRange('A','Z');
2610            break;
2611        }
2612        case '_':
2613        {
2614            match('_');
2615            break;
2616        }
2617        default:
2618            if (((LA(1) >= '\u0100' && LA(1) <= '\ufffe'))) {
2619                matchRange('\u0100','\uFFFE');
2620            }
2621        else {
2622            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2623        }
2624        }
2625        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2626            _token = makeToken(_ttype);
2627            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2628        }
2629        _returnToken = _token;
2630    }
2631    
2632    protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2633        int _ttype; Token _token=null; int _begin=text.length();
2634        _ttype = DIGIT;
2635        int _saveIndex;
2636        
2637        matchRange('0','9');
2638        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2639            _token = makeToken(_ttype);
2640            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
2641        }
2642        _returnToken = _token;
2643    }
2644    
2645    public final void mNUM_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2646        int _ttype; Token _token=null; int _begin=text.length();
2647        _ttype = NUM_INT;
2648        int _saveIndex;
2649        Token f2=null;
2650        Token g2=null;
2651        Token f3=null;
2652        Token g3=null;
2653        Token f4=null;
2654        boolean isDecimal=false; Token t=null;
2655        
2656        {
2657        switch ( LA(1)) {
2658        case '0':
2659        {
2660            match('0');
2661            if ( inputState.guessing==0 ) {
2662                isDecimal = true;
2663            }
2664            {
2665            if ((LA(1)=='X'||LA(1)=='x')) {
2666                {
2667                switch ( LA(1)) {
2668                case 'x':
2669                {
2670                    match('x');
2671                    break;
2672                }
2673                case 'X':
2674                {
2675                    match('X');
2676                    break;
2677                }
2678                default:
2679                {
2680                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2681                }
2682                }
2683                }
2684                if ( inputState.guessing==0 ) {
2685                    isDecimal = false;
2686                }
2687                {
2688                int _cnt628=0;
2689                _loop628:
2690                do {
2691                    if ((_tokenSet_10.member(LA(1))) && (true) && (true) && (true)) {
2692                        mHEX_DIGIT(false);
2693                    }
2694                    else {
2695                        if ( _cnt628>=1 ) { break _loop628; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2696                    }
2697                    
2698                    _cnt628++;
2699                } while (true);
2700                }
2701            }
2702            else {
2703                boolean synPredMatched634 = false;
2704                if ((((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true) && (true))) {
2705                    int _m634 = mark();
2706                    synPredMatched634 = true;
2707                    inputState.guessing++;
2708                    try {
2709                        {
2710                        {
2711                        int _cnt631=0;
2712                        _loop631:
2713                        do {
2714                            if (((LA(1) >= '0' && LA(1) <= '9'))) {
2715                                matchRange('0','9');
2716                            }
2717                            else {
2718                                if ( _cnt631>=1 ) { break _loop631; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2719                            }
2720                            
2721                            _cnt631++;
2722                        } while (true);
2723                        }
2724                        {
2725                        switch ( LA(1)) {
2726                        case '.':
2727                        {
2728                            match('.');
2729                            {
2730                            matchRange('0','9');
2731                            }
2732                            break;
2733                        }
2734                        case 'E': case 'e':
2735                        {
2736                            mEXPONENT(false);
2737                            break;
2738                        }
2739                        case 'D': case 'F': case 'd': case 'f':
2740                        {
2741                            mFLOAT_SUFFIX(false);
2742                            break;
2743                        }
2744                        default:
2745                        {
2746                            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2747                        }
2748                        }
2749                        }
2750                        }
2751                    }
2752                    catch (RecognitionException pe) {
2753                        synPredMatched634 = false;
2754                    }
2755                    rewind(_m634);
2756                    inputState.guessing--;
2757                }
2758                if ( synPredMatched634 ) {
2759                    {
2760                    int _cnt636=0;
2761                    _loop636:
2762                    do {
2763                        if (((LA(1) >= '0' && LA(1) <= '9'))) {
2764                            matchRange('0','9');
2765                        }
2766                        else {
2767                            if ( _cnt636>=1 ) { break _loop636; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2768                        }
2769                        
2770                        _cnt636++;
2771                    } while (true);
2772                    }
2773                }
2774                else if (((LA(1) >= '0' && LA(1) <= '7')) && (true) && (true) && (true)) {
2775                    {
2776                    int _cnt638=0;
2777                    _loop638:
2778                    do {
2779                        if (((LA(1) >= '0' && LA(1) <= '7'))) {
2780                            matchRange('0','7');
2781                        }
2782                        else {
2783                            if ( _cnt638>=1 ) { break _loop638; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2784                        }
2785                        
2786                        _cnt638++;
2787                    } while (true);
2788                    }
2789                    if ( inputState.guessing==0 ) {
2790                        isDecimal = false;
2791                    }
2792                }
2793                else {
2794                }
2795                }
2796                }
2797                break;
2798            }
2799            case '1': case '2': case '3': case '4':
2800            case '5': case '6': case '7': case '8':
2801            case '9':
2802            {
2803                {
2804                matchRange('1','9');
2805                }
2806                {
2807                _loop641:
2808                do {
2809                    if (((LA(1) >= '0' && LA(1) <= '9'))) {
2810                        matchRange('0','9');
2811                    }
2812                    else {
2813                        break _loop641;
2814                    }
2815                    
2816                } while (true);
2817                }
2818                if ( inputState.guessing==0 ) {
2819                    isDecimal=true;
2820                }
2821                break;
2822            }
2823            default:
2824            {
2825                throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2826            }
2827            }
2828            }
2829            {
2830            switch ( LA(1)) {
2831            case 'L': case 'l':
2832            {
2833                {
2834                switch ( LA(1)) {
2835                case 'l':
2836                {
2837                    match('l');
2838                    break;
2839                }
2840                case 'L':
2841                {
2842                    match('L');
2843                    break;
2844                }
2845                default:
2846                {
2847                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2848                }
2849                }
2850                }
2851                if ( inputState.guessing==0 ) {
2852                    _ttype = NUM_LONG;
2853                }
2854                break;
2855            }
2856            case 'I': case 'i':
2857            {
2858                {
2859                switch ( LA(1)) {
2860                case 'i':
2861                {
2862                    match('i');
2863                    break;
2864                }
2865                case 'I':
2866                {
2867                    match('I');
2868                    break;
2869                }
2870                default:
2871                {
2872                    throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2873                }
2874                }
2875                }
2876                if ( inputState.guessing==0 ) {
2877                    _ttype = NUM_INT;
2878                }
2879                break;
2880            }
2881            case 'G': case 'g':
2882            {
2883                mBIG_SUFFIX(false);
2884                if ( inputState.guessing==0 ) {
2885                    _ttype = NUM_BIG_INT;
2886                }
2887                break;
2888            }
2889            default:
2890                boolean synPredMatched647 = false;
2891                if ((((LA(1)=='.'||LA(1)=='D'||LA(1)=='E'||LA(1)=='F'||LA(1)=='d'||LA(1)=='e'||LA(1)=='f'))&&(isDecimal))) {
2892                    int _m647 = mark();
2893                    synPredMatched647 = true;
2894                    inputState.guessing++;
2895                    try {
2896                        {
2897                        if ((_tokenSet_11.member(LA(1)))) {
2898                            matchNot('.');
2899                        }
2900                        else if ((LA(1)=='.')) {
2901                            match('.');
2902                            {
2903                            matchRange('0','9');
2904                            }
2905                        }
2906                        else {
2907                            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2908                        }
2909                        
2910                        }
2911                    }
2912                    catch (RecognitionException pe) {
2913                        synPredMatched647 = false;
2914                    }
2915                    rewind(_m647);
2916                    inputState.guessing--;
2917                }
2918                if ( synPredMatched647 ) {
2919                    {
2920                    switch ( LA(1)) {
2921                    case '.':
2922                    {
2923                        match('.');
2924                        {
2925                        int _cnt650=0;
2926                        _loop650:
2927                        do {
2928                            if (((LA(1) >= '0' && LA(1) <= '9'))) {
2929                                matchRange('0','9');
2930                            }
2931                            else {
2932                                if ( _cnt650>=1 ) { break _loop650; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2933                            }
2934                            
2935                            _cnt650++;
2936                        } while (true);
2937                        }
2938                        {
2939                        if ((LA(1)=='E'||LA(1)=='e')) {
2940                            mEXPONENT(false);
2941                        }
2942                        else {
2943                        }
2944                        
2945                        }
2946                        {
2947                        switch ( LA(1)) {
2948                        case 'D': case 'F': case 'd': case 'f':
2949                        {
2950                            mFLOAT_SUFFIX(true);
2951                            f2=_returnToken;
2952                            if ( inputState.guessing==0 ) {
2953                                t=f2;
2954                            }
2955                            break;
2956                        }
2957                        case 'G': case 'g':
2958                        {
2959                            mBIG_SUFFIX(true);
2960                            g2=_returnToken;
2961                            if ( inputState.guessing==0 ) {
2962                                t=g2;
2963                            }
2964                            break;
2965                        }
2966                        default:
2967                            {
2968                            }
2969                        }
2970                        }
2971                        break;
2972                    }
2973                    case 'E': case 'e':
2974                    {
2975                        mEXPONENT(false);
2976                        {
2977                        switch ( LA(1)) {
2978                        case 'D': case 'F': case 'd': case 'f':
2979                        {
2980                            mFLOAT_SUFFIX(true);
2981                            f3=_returnToken;
2982                            if ( inputState.guessing==0 ) {
2983                                t=f3;
2984                            }
2985                            break;
2986                        }
2987                        case 'G': case 'g':
2988                        {
2989                            mBIG_SUFFIX(true);
2990                            g3=_returnToken;
2991                            if ( inputState.guessing==0 ) {
2992                                t=g3;
2993                            }
2994                            break;
2995                        }
2996                        default:
2997                            {
2998                            }
2999                        }
3000                        }
3001                        break;
3002                    }
3003                    case 'D': case 'F': case 'd': case 'f':
3004                    {
3005                        mFLOAT_SUFFIX(true);
3006                        f4=_returnToken;
3007                        if ( inputState.guessing==0 ) {
3008                            t=f4;
3009                        }
3010                        break;
3011                    }
3012                    default:
3013                    {
3014                        throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3015                    }
3016                    }
3017                    }
3018                    if ( inputState.guessing==0 ) {
3019                        
3020                        String JavaDoc txt = (t == null ? "" : t.getText().toUpperCase());
3021                        if (txt.indexOf('F') >= 0) {
3022                        _ttype = NUM_FLOAT;
3023                        } else if (txt.indexOf('G') >= 0) {
3024                        _ttype = NUM_BIG_DECIMAL;
3025                        } else {
3026                        _ttype = NUM_DOUBLE; // assume double
3027
}
3028                        
3029                    }
3030                }
3031                else {
3032                }
3033            }
3034            }
3035            if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3036                _token = makeToken(_ttype);
3037                _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
3038            }
3039            _returnToken = _token;
3040        }
3041        
3042    protected final void mEXPONENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3043        int _ttype; Token _token=null; int _begin=text.length();
3044        _ttype = EXPONENT;
3045        int _saveIndex;
3046        
3047        {
3048        switch ( LA(1)) {
3049        case 'e':
3050        {
3051            match('e');
3052            break;
3053        }
3054        case 'E':
3055        {
3056            match('E');
3057            break;
3058        }
3059        default:
3060        {
3061            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3062        }
3063        }
3064        }
3065        {
3066        switch ( LA(1)) {
3067        case '+':
3068        {
3069            match('+');
3070            break;
3071        }
3072        case '-':
3073        {
3074            match('-');
3075            break;
3076        }
3077        case '0': case '1': case '2': case '3':
3078        case '4': case '5': case '6': case '7':
3079        case '8': case '9':
3080        {
3081            break;
3082        }
3083        default:
3084        {
3085            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3086        }
3087        }
3088        }
3089        {
3090        int _cnt659=0;
3091        _loop659:
3092        do {
3093            if (((LA(1) >= '0' && LA(1) <= '9'))) {
3094                matchRange('0','9');
3095            }
3096            else {
3097                if ( _cnt659>=1 ) { break _loop659; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
3098            }
3099            
3100            _cnt659++;
3101        } while (true);
3102        }
3103        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3104            _token = makeToken(_ttype);
3105            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
3106        }
3107        _returnToken = _token;
3108    }
3109    
3110    protected final void mFLOAT_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3111        int _ttype; Token _token=null; int _begin=text.length();
3112        _ttype = FLOAT_SUFFIX;
3113        int _saveIndex;
3114        
3115        switch ( LA(1)) {
3116        case 'f':
3117        {
3118            match('f');
3119            break;
3120        }
3121        case 'F':
3122        {
3123            match('F');
3124            break;
3125        }
3126        case 'd':
3127        {
3128            match('d');
3129            break;
3130        }
3131        case 'D':
3132        {
3133            match('D');
3134            break;
3135        }
3136        default:
3137        {
3138            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3139        }
3140        }
3141        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3142            _token = makeToken(_ttype);
3143            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
3144        }
3145        _returnToken = _token;
3146    }
3147    
3148    protected final void mBIG_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3149        int _ttype; Token _token=null; int _begin=text.length();
3150        _ttype = BIG_SUFFIX;
3151        int _saveIndex;
3152        
3153        switch ( LA(1)) {
3154        case 'g':
3155        {
3156            match('g');
3157            break;
3158        }
3159        case 'G':
3160        {
3161            match('G');
3162            break;
3163        }
3164        default:
3165        {
3166            throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3167        }
3168        }
3169        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3170            _token = makeToken(_ttype);
3171            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
3172        }
3173        _returnToken = _token;
3174    }
3175    
3176    public final void mAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3177        int _ttype; Token _token=null; int _begin=text.length();
3178        _ttype = AT;
3179        int _saveIndex;
3180        
3181        match('@');
3182        if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3183            _token = makeToken(_ttype);
3184            _token.setText(new String JavaDoc(text.getBuffer(), _begin, text.length()-_begin));
3185        }
3186        _returnToken = _token;
3187    }
3188    
3189    
3190    private static final long[] mk_tokenSet_0() {
3191        long[] data = new long[2560];
3192        data[1]=576460745995190270L;
3193        for (int i = 4; i<=1022; i++) { data[i]=-1L; }
3194        data[1023]=9223372036854775807L;
3195        return data;
3196    }
3197    public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
3198    private static final long[] mk_tokenSet_1() {
3199        long[] data = new long[2048];
3200        data[0]=-9224L;
3201        for (int i = 1; i<=1022; i++) { data[i]=-1L; }
3202        data[1023]=9223372036854775807L;
3203        return data;
3204    }
3205    public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
3206    private static final long[] mk_tokenSet_2() {
3207        long[] data = new long[2048];
3208        data[0]=-4398046520328L;
3209        for (int i = 1; i<=1022; i++) { data[i]=-1L; }
3210        data[1023]=9223372036854775807L;
3211        return data;
3212    }
3213    public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
3214    private static final long[] mk_tokenSet_3() {
3215        long[] data = new long[2048];
3216        data[0]=-549755813896L;
3217        for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3218        return data;
3219    }
3220    public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
3221    private static final long[] mk_tokenSet_4() {
3222        long[] data = new long[2048];
3223        data[0]=-635655169032L;
3224        data[1]=-268435457L;
3225        for (int i = 2; i<=1022; i++) { data[i]=-1L; }
3226        data[1023]=9223372036854775807L;
3227        return data;
3228    }
3229    public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
3230    private static final long[] mk_tokenSet_5() {
3231        long[] data = new long[2048];
3232        data[0]=-17179869192L;
3233        for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3234        return data;
3235    }
3236    public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
3237    private static final long[] mk_tokenSet_6() {
3238        long[] data = new long[2048];
3239        data[0]=-145135534875656L;
3240        for (int i = 1; i<=1022; i++) { data[i]=-1L; }
3241        data[1023]=9223372036854775807L;
3242        return data;
3243    }
3244    public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
3245    private static final long[] mk_tokenSet_7() {
3246        long[] data = new long[2048];
3247        data[0]=-145204254352392L;
3248        for (int i = 1; i<=1022; i++) { data[i]=-1L; }
3249        data[1023]=9223372036854775807L;
3250        return data;
3251    }
3252    public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
3253    private static final long[] mk_tokenSet_8() {
3254        long[] data = new long[2048];
3255        data[0]=-9224L;
3256        for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3257        return data;
3258    }
3259    public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
3260    private static final long[] mk_tokenSet_9() {
3261        long[] data = new long[2048];
3262        data[0]=-145204254352392L;
3263        data[1]=-268435457L;
3264        for (int i = 2; i<=1022; i++) { data[i]=-1L; }
3265        data[1023]=9223372036854775807L;
3266        return data;
3267    }
3268    public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
3269    private static final long[] mk_tokenSet_10() {
3270        long[] data = new long[1025];
3271        data[0]=287948901175001088L;
3272        data[1]=541165879422L;
3273        return data;
3274    }
3275    public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
3276    private static final long[] mk_tokenSet_11() {
3277        long[] data = new long[2048];
3278        data[0]=-70368744177672L;
3279        for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3280        return data;
3281    }
3282    public static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11());
3283    
3284    }
3285
Popular Tags