1
2
3 package org.codehaus.groovy.antlr.parser;
4 import org.codehaus.groovy.antlr.*;
5 import java.util.*;
6 import java.io.InputStream;
7 import java.io.Reader;
8 import antlr.InputBuffer;
9 import antlr.LexerSharedInputState;
10
11 import java.io.InputStream;
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;
19 import java.util.Hashtable;
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
61 setTabSize(1);
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;
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;
70 /*** Push parenLevel here and reset whenever inside '{x}'. */
71 protected ArrayList parenLevelStack = new ArrayList();
72 protected int lastSigTokenType = EOF;
73
74 protected void pushParenLevel() {
75 parenLevelStack.add(new Integer(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) 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
104 protected static boolean isExpressionEndingToken(int ttype) {
105 switch (ttype) {
106 case INC:
107 case DEC:
108 case RPAREN:
109 case RBRACK:
110 case RCURLY:
111 case STRING_LITERAL:
112 case STRING_CTOR_END:
113 case NUM_INT:
114 case NUM_FLOAT:
115 case NUM_LONG:
116 case NUM_DOUBLE:
117 case NUM_BIG_INT:
118 case NUM_BIG_DECIMAL:
119 case IDENT:
120
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</strong> 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() throws RecognitionException {
181 if (suppressNewline > 0) {
182 suppressNewline = 0;
183 require(suppressNewline == 0,
184 "end of line reached within a simple string 'x' or \"x\"",
185 "for multi-line literals, use triple quotes '''x''' or \"\"\"x\"\"\"");
186 }
187 newline();
188 }
189
190 protected boolean atValidDollarEscape() throws CharStreamException {
191
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
209 int quoteType = (stringCtorState & SCS_TYPE);
210 stringCtorState = 0;
211 resetText();
212 try {
213 switch (quoteType) {
214 case SCS_SQ_TYPE:
215 mSTRING_CTOR_END(true,
216 case SCS_TQ_TYPE:
217 mSTRING_CTOR_END(true,
218 case SCS_RE_TYPE:
219 mREGEXP_CTOR_END(true,
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) {
239 case WS:
240 case ONE_NL:
241 case SL_COMMENT:
242 case ML_COMMENT:
243 lasttype = lastSigTokenType;
244 }
245 }
246 lastSigTokenType = lasttype;
247 return token;
248 }
249 };
250 }
251
252
253 public static boolean tracing = false;
254 public void traceIn(String rname) throws CharStreamException {
255 if (!GroovyLexer.tracing) return;
256 super.traceIn(rname);
257 }
258 public void traceOut(String 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 ttypes;
264 private static String tokenStringOf(Token t) {
265 if (ttypes == null) {
266 java.util.HashMap map = new java.util.HashMap();
267 java.lang.reflect.Field[] 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 ee) {
273 }
274 }
275 ttypes = map;
276 }
277 Integer tt = new Integer(t.getType());
278 Object ttn = ttypes.get(tt);
279 if (ttn == null) ttn = "<"+tt+">";
280 return "["+ttn+",\""+t.getText()+"\"]";
281 }
282
283 protected GroovyRecognizer parser;
284 private void require(boolean z, String problem, String solution) throws SemanticException {
285
286 if (!z) parser.requireFailed(problem, solution);
287 }
288 public GroovyLexer(InputStream in) {
289 this(new ByteBuffer(in));
290 }
291 public GroovyLexer(Reader 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();
302 literals.put(new ANTLRHashString("byte", this), new Integer(101));
303 literals.put(new ANTLRHashString("public", this), new Integer(112));
304 literals.put(new ANTLRHashString("case", this), new Integer(150));
305 literals.put(new ANTLRHashString("short", this), new Integer(103));
306 literals.put(new ANTLRHashString("break", this), new Integer(144));
307 literals.put(new ANTLRHashString("while", this), new Integer(138));
308 literals.put(new ANTLRHashString("new", this), new Integer(192));
309 literals.put(new ANTLRHashString("instanceof", this), new Integer(178));
310 literals.put(new ANTLRHashString("implements", this), new Integer(127));
311 literals.put(new ANTLRHashString("synchronized", this), new Integer(117));
312 literals.put(new ANTLRHashString("const", this), new Integer(40));
313 literals.put(new ANTLRHashString("float", this), new Integer(105));
314 literals.put(new ANTLRHashString("package", this), new Integer(78));
315 literals.put(new ANTLRHashString("return", this), new Integer(143));
316 literals.put(new ANTLRHashString("throw", this), new Integer(146));
317 literals.put(new ANTLRHashString("null", this), new Integer(195));
318 literals.put(new ANTLRHashString("def", this), new Integer(81));
319 literals.put(new ANTLRHashString("threadsafe", this), new Integer(116));
320 literals.put(new ANTLRHashString("protected", this), new Integer(113));
321 literals.put(new ANTLRHashString("class", this), new Integer(88));
322 literals.put(new ANTLRHashString("throws", this), new Integer(130));
323 literals.put(new ANTLRHashString("do", this), new Integer(41));
324 literals.put(new ANTLRHashString("strictfp", this), new Integer(42));
325 literals.put(new ANTLRHashString("super", this), new Integer(93));
326 literals.put(new ANTLRHashString("with", this), new Integer(139));
327 literals.put(new ANTLRHashString("transient", this), new Integer(114));
328 literals.put(new ANTLRHashString("native", this), new Integer(115));
329 literals.put(new ANTLRHashString("interface", this), new Integer(89));
330 literals.put(new ANTLRHashString("final", this), new Integer(37));
331 literals.put(new ANTLRHashString("any", this), new Integer(108));
332 literals.put(new ANTLRHashString("if", this), new Integer(136));
333 literals.put(new ANTLRHashString("double", this), new Integer(107));
334 literals.put(new ANTLRHashString("volatile", this), new Integer(118));
335 literals.put(new ANTLRHashString("as", this), new Integer(110));
336 literals.put(new ANTLRHashString("assert", this), new Integer(147));
337 literals.put(new ANTLRHashString("catch", this), new Integer(153));
338 literals.put(new ANTLRHashString("try", this), new Integer(151));
339 literals.put(new ANTLRHashString("goto", this), new Integer(39));
340 literals.put(new ANTLRHashString("enum", this), new Integer(90));
341 literals.put(new ANTLRHashString("int", this), new Integer(104));
342 literals.put(new ANTLRHashString("for", this), new Integer(141));
343 literals.put(new ANTLRHashString("extends", this), new Integer(92));
344 literals.put(new ANTLRHashString("boolean", this), new Integer(100));
345 literals.put(new ANTLRHashString("char", this), new Integer(102));
346 literals.put(new ANTLRHashString("private", this), new Integer(111));
347 literals.put(new ANTLRHashString("default", this), new Integer(126));
348 literals.put(new ANTLRHashString("false", this), new Integer(194));
349 literals.put(new ANTLRHashString("this", this), new Integer(128));
350 literals.put(new ANTLRHashString("static", this), new Integer(80));
351 literals.put(new ANTLRHashString("abstract", this), new Integer(38));
352 literals.put(new ANTLRHashString("continue", this), new Integer(145));
353 literals.put(new ANTLRHashString("finally", this), new Integer(152));
354 literals.put(new ANTLRHashString("else", this), new Integer(137));
355 literals.put(new ANTLRHashString("import", this), new Integer(79));
356 literals.put(new ANTLRHashString("in", this), new Integer(142));
357 literals.put(new ANTLRHashString("void", this), new Integer(99));
358 literals.put(new ANTLRHashString("switch", this), new Integer(140));
359 literals.put(new ANTLRHashString("true", this), new Integer(193));
360 literals.put(new ANTLRHashString("long", this), new Integer(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 {
371 try {
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 ' ':
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 'A': case 'B': case 'C': case 'D':
458 case 'E': case 'F': case 'G': case 'H':
459 case 'I': case 'J': case 'K': case 'L':
460 case 'M': case 'N': case 'O': case 'P':
461 case 'Q': case 'R': case 'S': case 'T':
462 case 'U': case 'V': case 'W': case 'X':
463 case 'Y': case 'Z': case '_': case 'a':
464 case 'b': case 'c': case 'd': case 'e':
465 case 'f': case 'g': case 'h': case 'i':
466 case 'j': case 'k': case 'l': case 'm':
467 case 'n': case 'o': case 'p': case 'q':
468 case 'r': case 's': case 't': case 'u':
469 case 'v': case 'w': case 'x': case 'y':
470 case 'z':
471 {
472 mIDENT(true);
473 theRetToken=_returnToken;
474 break;
475 }
476 case '0': case '1': case '2': case '3':
477 case '4': case '5': case '6': case '7':
478 case '8': case '9':
479 {
480 mNUM_INT(true);
481 theRetToken=_returnToken;
482 break;
483 }
484 case '@':
485 {
486 mAT(true);
487 theRetToken=_returnToken;
488 break;
489 }
490 default:
491 if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (LA(4)=='=')) {
492 mBSR_ASSIGN(true);
493 theRetToken=_returnToken;
494 }
495 else if ((LA(1)=='<') && (LA(2)=='=') && (LA(3)=='>')) {
496 mCOMPARE_TO(true);
497 theRetToken=_returnToken;
498 }
499 else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) {
500 mSR_ASSIGN(true);
501 theRetToken=_returnToken;
502 }
503 else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (true)) {
504 mBSR(true);
505 theRetToken=_returnToken;
506 }
507 else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) {
508 mSL_ASSIGN(true);
509 theRetToken=_returnToken;
510 }
511 else if ((LA(1)=='.') && (LA(2)=='.') && (LA(3)=='<')) {
512 mRANGE_EXCLUSIVE(true);
513 theRetToken=_returnToken;
514 }
515 else if ((LA(1)=='.') && (LA(2)=='.') && (LA(3)=='.')) {
516 mTRIPLE_DOT(true);
517 theRetToken=_returnToken;
518 }
519 else if ((LA(1)=='=') && (LA(2)=='=') && (LA(3)=='~')) {
520 mREGEX_MATCH(true);
521 theRetToken=_returnToken;
522 }
523 else if ((LA(1)=='*') && (LA(2)=='*') && (LA(3)=='=')) {
524 mSTAR_STAR_ASSIGN(true);
525 theRetToken=_returnToken;
526 }
527 else if ((LA(1)=='=') && (LA(2)=='=') && (true)) {
528 mEQUAL(true);
529 theRetToken=_returnToken;
530 }
531 else if ((LA(1)=='!') && (LA(2)=='=')) {
532 mNOT_EQUAL(true);
533 theRetToken=_returnToken;
534 }
535 else if ((LA(1)=='+') && (LA(2)=='=')) {
536 mPLUS_ASSIGN(true);
537 theRetToken=_returnToken;
538 }
539 else if ((LA(1)=='+') && (LA(2)=='+')) {
540 mINC(true);
541 theRetToken=_returnToken;
542 }
543 else if ((LA(1)=='-') && (LA(2)=='=')) {
544 mMINUS_ASSIGN(true);
545 theRetToken=_returnToken;
546 }
547 else if ((LA(1)=='-') && (LA(2)=='-')) {
548 mDEC(true);
549 theRetToken=_returnToken;
550 }
551 else if ((LA(1)=='*') && (LA(2)=='=')) {
552 mSTAR_ASSIGN(true);
553 theRetToken=_returnToken;
554 }
555 else if ((LA(1)=='%') && (LA(2)=='=')) {
556 mMOD_ASSIGN(true);
557 theRetToken=_returnToken;
558 }
559 else if ((LA(1)=='>') && (LA(2)=='>') && (true)) {
560 mSR(true);
561 theRetToken=_returnToken;
562 }
563 else if ((LA(1)=='>') && (LA(2)=='=')) {
564 mGE(true);
565 theRetToken=_returnToken;
566 }
567 else if ((LA(1)=='<') && (LA(2)=='<') && (true)) {
568 mSL(true);
569 theRetToken=_returnToken;
570 }
571 else if ((LA(1)=='<') && (LA(2)=='=') && (true)) {
572 mLE(true);
573 theRetToken=_returnToken;
574 }
575 else if ((LA(1)=='^') && (LA(2)=='=')) {
576 mBXOR_ASSIGN(true);
577 theRetToken=_returnToken;
578 }
579 else if ((LA(1)=='|') && (LA(2)=='=')) {
580 mBOR_ASSIGN(true);
581 theRetToken=_returnToken;
582 }
583 else if ((LA(1)=='|') && (LA(2)=='|')) {
584 mLOR(true);
585 theRetToken=_returnToken;
586 }
587 else if ((LA(1)=='&') && (LA(2)=='=')) {
588 mBAND_ASSIGN(true);
589 theRetToken=_returnToken;
590 }
591 else if ((LA(1)=='&') && (LA(2)=='&')) {
592 mLAND(true);
593 theRetToken=_returnToken;
594 }
595 else if ((LA(1)=='.') && (LA(2)=='.') && (true)) {
596 mRANGE_INCLUSIVE(true);
597 theRetToken=_returnToken;
598 }
599 else if ((LA(1)=='*') && (LA(2)=='.')) {
600 mSPREAD_DOT(true);
601 theRetToken=_returnToken;
602 }
603 else if ((LA(1)=='?') && (LA(2)=='.')) {
604 mOPTIONAL_DOT(true);
605 theRetToken=_returnToken;
606 }
607 else if ((LA(1)=='.') && (LA(2)=='&')) {
608 mMEMBER_POINTER(true);
609 theRetToken=_returnToken;
610 }
611 else if ((LA(1)=='=') && (LA(2)=='~')) {
612 mREGEX_FIND(true);
613 theRetToken=_returnToken;
614 }
615 else if ((LA(1)=='*') && (LA(2)=='*') && (true)) {
616 mSTAR_STAR(true);
617 theRetToken=_returnToken;
618 }
619 else if ((LA(1)=='-') && (LA(2)=='>')) {
620 mCLOSURE_OP(true);
621 theRetToken=_returnToken;
622 }
623 else if ((LA(1)=='/') && (LA(2)=='/')) {
624 mSL_COMMENT(true);
625 theRetToken=_returnToken;
626 }
627 else if ((LA(1)=='/') && (LA(2)=='*')) {
628 mML_COMMENT(true);
629 theRetToken=_returnToken;
630 }
631 else if ((LA(1)=='?') && (true)) {
632 mQUESTION(true);
633 theRetToken=_returnToken;
634 }
635 else if ((LA(1)=='.') && (true)) {
636 mDOT(true);
637 theRetToken=_returnToken;
638 }
639 else if ((LA(1)=='=') && (true)) {
640 mASSIGN(true);
641 theRetToken=_returnToken;
642 }
643 else if ((LA(1)=='!') && (true)) {
644 mLNOT(true);
645 theRetToken=_returnToken;
646 }
647 else if ((LA(1)=='+') && (true)) {
648 mPLUS(true);
649 theRetToken=_returnToken;
650 }
651 else if ((LA(1)=='-') && (true)) {
652 mMINUS(true);
653 theRetToken=_returnToken;
654 }
655 else if ((LA(1)=='*') && (true)) {
656 mSTAR(true);
657 theRetToken=_returnToken;
658 }
659 else if ((LA(1)=='%') && (true)) {
660 mMOD(true);
661 theRetToken=_returnToken;
662 }
663 else if ((LA(1)=='>') && (true)) {
664 mGT(true);
665 theRetToken=_returnToken;
666 }
667 else if ((LA(1)=='<') && (true)) {
668 mLT(true);
669 theRetToken=_returnToken;
670 }
671 else if ((LA(1)=='^') && (true)) {
672 mBXOR(true);
673 theRetToken=_returnToken;
674 }
675 else if ((LA(1)=='|') && (true)) {
676 mBOR(true);
677 theRetToken=_returnToken;
678 }
679 else if ((LA(1)=='&') && (true)) {
680 mBAND(true);
681 theRetToken=_returnToken;
682 }
683 else if (((LA(1)=='#'))&&(getLine() == 1 && getColumn() == 1)) {
684 mSH_COMMENT(true);
685 theRetToken=_returnToken;
686 }
687 else if ((LA(1)=='/') && (true)) {
688 mREGEXP_LITERAL(true);
689 theRetToken=_returnToken;
690 }
691 else {
692 if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
693 else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
694 }
695 }
696 if ( _returnToken==null ) continue tryAgain;
697 _ttype = _returnToken.getType();
698 _returnToken.setType(_ttype);
699 return _returnToken;
700 }
701 catch (RecognitionException e) {
702 throw new TokenStreamRecognitionException(e);
703 }
704 }
705 catch (CharStreamException cse) {
706 if ( cse instanceof CharStreamIOException ) {
707 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
708 }
709 else {
710 throw new TokenStreamException(cse.getMessage());
711 }
712 }
713 }
714 }
715
716 public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
717 int _ttype; Token _token=null; int _begin=text.length();
718 _ttype = QUESTION;
719 int _saveIndex;
720
721 match('?');
722 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
723 _token = makeToken(_ttype);
724 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
725 }
726 _returnToken = _token;
727 }
728
729 public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
730 int _ttype; Token _token=null; int _begin=text.length();
731 _ttype = LPAREN;
732 int _saveIndex;
733
734 match('(');
735 if ( inputState.guessing==0 ) {
736 ++parenLevel;
737 }
738 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
739 _token = makeToken(_ttype);
740 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
741 }
742 _returnToken = _token;
743 }
744
745 public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
746 int _ttype; Token _token=null; int _begin=text.length();
747 _ttype = RPAREN;
748 int _saveIndex;
749
750 match(')');
751 if ( inputState.guessing==0 ) {
752 --parenLevel;
753 }
754 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
755 _token = makeToken(_ttype);
756 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
757 }
758 _returnToken = _token;
759 }
760
761 public final void mLBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
762 int _ttype; Token _token=null; int _begin=text.length();
763 _ttype = LBRACK;
764 int _saveIndex;
765
766 match('[');
767 if ( inputState.guessing==0 ) {
768 ++parenLevel;
769 }
770 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
771 _token = makeToken(_ttype);
772 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
773 }
774 _returnToken = _token;
775 }
776
777 public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
778 int _ttype; Token _token=null; int _begin=text.length();
779 _ttype = RBRACK;
780 int _saveIndex;
781
782 match(']');
783 if ( inputState.guessing==0 ) {
784 --parenLevel;
785 }
786 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
787 _token = makeToken(_ttype);
788 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
789 }
790 _returnToken = _token;
791 }
792
793 public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
794 int _ttype; Token _token=null; int _begin=text.length();
795 _ttype = LCURLY;
796 int _saveIndex;
797
798 match('{');
799 if ( inputState.guessing==0 ) {
800 pushParenLevel();
801 }
802 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
803 _token = makeToken(_ttype);
804 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
805 }
806 _returnToken = _token;
807 }
808
809 public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
810 int _ttype; Token _token=null; int _begin=text.length();
811 _ttype = RCURLY;
812 int _saveIndex;
813
814 match('}');
815 if ( inputState.guessing==0 ) {
816 popParenLevel(); if(stringCtorState!=0) restartStringCtor(true);
817 }
818 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
819 _token = makeToken(_ttype);
820 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
821 }
822 _returnToken = _token;
823 }
824
825 public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
826 int _ttype; Token _token=null; int _begin=text.length();
827 _ttype = COLON;
828 int _saveIndex;
829
830 match(':');
831 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
832 _token = makeToken(_ttype);
833 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
834 }
835 _returnToken = _token;
836 }
837
838 public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
839 int _ttype; Token _token=null; int _begin=text.length();
840 _ttype = COMMA;
841 int _saveIndex;
842
843 match(',');
844 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
845 _token = makeToken(_ttype);
846 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
847 }
848 _returnToken = _token;
849 }
850
851 public final void mDOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
852 int _ttype; Token _token=null; int _begin=text.length();
853 _ttype = DOT;
854 int _saveIndex;
855
856 match('.');
857 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
858 _token = makeToken(_ttype);
859 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
860 }
861 _returnToken = _token;
862 }
863
864 public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
865 int _ttype; Token _token=null; int _begin=text.length();
866 _ttype = ASSIGN;
867 int _saveIndex;
868
869 match('=');
870 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
871 _token = makeToken(_ttype);
872 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
873 }
874 _returnToken = _token;
875 }
876
877 public final void mCOMPARE_TO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
878 int _ttype; Token _token=null; int _begin=text.length();
879 _ttype = COMPARE_TO;
880 int _saveIndex;
881
882 match("<=>");
883 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
884 _token = makeToken(_ttype);
885 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
886 }
887 _returnToken = _token;
888 }
889
890 public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
891 int _ttype; Token _token=null; int _begin=text.length();
892 _ttype = EQUAL;
893 int _saveIndex;
894
895 match("==");
896 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
897 _token = makeToken(_ttype);
898 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
899 }
900 _returnToken = _token;
901 }
902
903 public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
904 int _ttype; Token _token=null; int _begin=text.length();
905 _ttype = LNOT;
906 int _saveIndex;
907
908 match('!');
909 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
910 _token = makeToken(_ttype);
911 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
912 }
913 _returnToken = _token;
914 }
915
916 public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
917 int _ttype; Token _token=null; int _begin=text.length();
918 _ttype = BNOT;
919 int _saveIndex;
920
921 match('~');
922 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
923 _token = makeToken(_ttype);
924 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
925 }
926 _returnToken = _token;
927 }
928
929 public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
930 int _ttype; Token _token=null; int _begin=text.length();
931 _ttype = NOT_EQUAL;
932 int _saveIndex;
933
934 match("!=");
935 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
936 _token = makeToken(_ttype);
937 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
938 }
939 _returnToken = _token;
940 }
941
942 protected final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
943 int _ttype; Token _token=null; int _begin=text.length();
944 _ttype = DIV;
945 int _saveIndex;
946
947 match('/');
948 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
949 _token = makeToken(_ttype);
950 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
951 }
952 _returnToken = _token;
953 }
954
955 protected final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
956 int _ttype; Token _token=null; int _begin=text.length();
957 _ttype = DIV_ASSIGN;
958 int _saveIndex;
959
960 match("/=");
961 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
962 _token = makeToken(_ttype);
963 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
964 }
965 _returnToken = _token;
966 }
967
968 public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
969 int _ttype; Token _token=null; int _begin=text.length();
970 _ttype = PLUS;
971 int _saveIndex;
972
973 match('+');
974 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
975 _token = makeToken(_ttype);
976 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
977 }
978 _returnToken = _token;
979 }
980
981 public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
982 int _ttype; Token _token=null; int _begin=text.length();
983 _ttype = PLUS_ASSIGN;
984 int _saveIndex;
985
986 match("+=");
987 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
988 _token = makeToken(_ttype);
989 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
990 }
991 _returnToken = _token;
992 }
993
994 public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
995 int _ttype; Token _token=null; int _begin=text.length();
996 _ttype = INC;
997 int _saveIndex;
998
999 match("++");
1000 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1001 _token = makeToken(_ttype);
1002 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1003 }
1004 _returnToken = _token;
1005 }
1006
1007 public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1008 int _ttype; Token _token=null; int _begin=text.length();
1009 _ttype = MINUS;
1010 int _saveIndex;
1011
1012 match('-');
1013 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1014 _token = makeToken(_ttype);
1015 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1016 }
1017 _returnToken = _token;
1018 }
1019
1020 public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1021 int _ttype; Token _token=null; int _begin=text.length();
1022 _ttype = MINUS_ASSIGN;
1023 int _saveIndex;
1024
1025 match("-=");
1026 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1027 _token = makeToken(_ttype);
1028 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1029 }
1030 _returnToken = _token;
1031 }
1032
1033 public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1034 int _ttype; Token _token=null; int _begin=text.length();
1035 _ttype = DEC;
1036 int _saveIndex;
1037
1038 match("--");
1039 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1040 _token = makeToken(_ttype);
1041 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1042 }
1043 _returnToken = _token;
1044 }
1045
1046 public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1047 int _ttype; Token _token=null; int _begin=text.length();
1048 _ttype = STAR;
1049 int _saveIndex;
1050
1051 match('*');
1052 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1053 _token = makeToken(_ttype);
1054 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1055 }
1056 _returnToken = _token;
1057 }
1058
1059 public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1060 int _ttype; Token _token=null; int _begin=text.length();
1061 _ttype = STAR_ASSIGN;
1062 int _saveIndex;
1063
1064 match("*=");
1065 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1066 _token = makeToken(_ttype);
1067 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1068 }
1069 _returnToken = _token;
1070 }
1071
1072 public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1073 int _ttype; Token _token=null; int _begin=text.length();
1074 _ttype = MOD;
1075 int _saveIndex;
1076
1077 match('%');
1078 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1079 _token = makeToken(_ttype);
1080 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1081 }
1082 _returnToken = _token;
1083 }
1084
1085 public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1086 int _ttype; Token _token=null; int _begin=text.length();
1087 _ttype = MOD_ASSIGN;
1088 int _saveIndex;
1089
1090 match("%=");
1091 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1092 _token = makeToken(_ttype);
1093 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1094 }
1095 _returnToken = _token;
1096 }
1097
1098 public final void mSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1099 int _ttype; Token _token=null; int _begin=text.length();
1100 _ttype = SR;
1101 int _saveIndex;
1102
1103 match(">>");
1104 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1105 _token = makeToken(_ttype);
1106 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1107 }
1108 _returnToken = _token;
1109 }
1110
1111 public final void mSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1112 int _ttype; Token _token=null; int _begin=text.length();
1113 _ttype = SR_ASSIGN;
1114 int _saveIndex;
1115
1116 match(">>=");
1117 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1118 _token = makeToken(_ttype);
1119 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1120 }
1121 _returnToken = _token;
1122 }
1123
1124 public final void mBSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1125 int _ttype; Token _token=null; int _begin=text.length();
1126 _ttype = BSR;
1127 int _saveIndex;
1128
1129 match(">>>");
1130 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1131 _token = makeToken(_ttype);
1132 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1133 }
1134 _returnToken = _token;
1135 }
1136
1137 public final void mBSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1138 int _ttype; Token _token=null; int _begin=text.length();
1139 _ttype = BSR_ASSIGN;
1140 int _saveIndex;
1141
1142 match(">>>=");
1143 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1144 _token = makeToken(_ttype);
1145 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1146 }
1147 _returnToken = _token;
1148 }
1149
1150 public final void mGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1151 int _ttype; Token _token=null; int _begin=text.length();
1152 _ttype = GE;
1153 int _saveIndex;
1154
1155 match(">=");
1156 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1157 _token = makeToken(_ttype);
1158 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1159 }
1160 _returnToken = _token;
1161 }
1162
1163 public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1164 int _ttype; Token _token=null; int _begin=text.length();
1165 _ttype = GT;
1166 int _saveIndex;
1167
1168 match(">");
1169 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1170 _token = makeToken(_ttype);
1171 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1172 }
1173 _returnToken = _token;
1174 }
1175
1176 public final void mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1177 int _ttype; Token _token=null; int _begin=text.length();
1178 _ttype = SL;
1179 int _saveIndex;
1180
1181 match("<<");
1182 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1183 _token = makeToken(_ttype);
1184 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1185 }
1186 _returnToken = _token;
1187 }
1188
1189 public final void mSL_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1190 int _ttype; Token _token=null; int _begin=text.length();
1191 _ttype = SL_ASSIGN;
1192 int _saveIndex;
1193
1194 match("<<=");
1195 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1196 _token = makeToken(_ttype);
1197 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1198 }
1199 _returnToken = _token;
1200 }
1201
1202 public final void mLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1203 int _ttype; Token _token=null; int _begin=text.length();
1204 _ttype = LE;
1205 int _saveIndex;
1206
1207 match("<=");
1208 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1209 _token = makeToken(_ttype);
1210 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1211 }
1212 _returnToken = _token;
1213 }
1214
1215 public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1216 int _ttype; Token _token=null; int _begin=text.length();
1217 _ttype = LT;
1218 int _saveIndex;
1219
1220 match('<');
1221 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1222 _token = makeToken(_ttype);
1223 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1224 }
1225 _returnToken = _token;
1226 }
1227
1228 public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1229 int _ttype; Token _token=null; int _begin=text.length();
1230 _ttype = BXOR;
1231 int _saveIndex;
1232
1233 match('^');
1234 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1235 _token = makeToken(_ttype);
1236 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1237 }
1238 _returnToken = _token;
1239 }
1240
1241 public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1242 int _ttype; Token _token=null; int _begin=text.length();
1243 _ttype = BXOR_ASSIGN;
1244 int _saveIndex;
1245
1246 match("^=");
1247 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1248 _token = makeToken(_ttype);
1249 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1250 }
1251 _returnToken = _token;
1252 }
1253
1254 public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1255 int _ttype; Token _token=null; int _begin=text.length();
1256 _ttype = BOR;
1257 int _saveIndex;
1258
1259 match('|');
1260 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1261 _token = makeToken(_ttype);
1262 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1263 }
1264 _returnToken = _token;
1265 }
1266
1267 public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1268 int _ttype; Token _token=null; int _begin=text.length();
1269 _ttype = BOR_ASSIGN;
1270 int _saveIndex;
1271
1272 match("|=");
1273 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1274 _token = makeToken(_ttype);
1275 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1276 }
1277 _returnToken = _token;
1278 }
1279
1280 public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1281 int _ttype; Token _token=null; int _begin=text.length();
1282 _ttype = LOR;
1283 int _saveIndex;
1284
1285 match("||");
1286 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1287 _token = makeToken(_ttype);
1288 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1289 }
1290 _returnToken = _token;
1291 }
1292
1293 public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1294 int _ttype; Token _token=null; int _begin=text.length();
1295 _ttype = BAND;
1296 int _saveIndex;
1297
1298 match('&');
1299 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1300 _token = makeToken(_ttype);
1301 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1302 }
1303 _returnToken = _token;
1304 }
1305
1306 public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1307 int _ttype; Token _token=null; int _begin=text.length();
1308 _ttype = BAND_ASSIGN;
1309 int _saveIndex;
1310
1311 match("&=");
1312 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1313 _token = makeToken(_ttype);
1314 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1315 }
1316 _returnToken = _token;
1317 }
1318
1319 public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1320 int _ttype; Token _token=null; int _begin=text.length();
1321 _ttype = LAND;
1322 int _saveIndex;
1323
1324 match("&&");
1325 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1326 _token = makeToken(_ttype);
1327 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1328 }
1329 _returnToken = _token;
1330 }
1331
1332 public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1333 int _ttype; Token _token=null; int _begin=text.length();
1334 _ttype = SEMI;
1335 int _saveIndex;
1336
1337 match(';');
1338 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1339 _token = makeToken(_ttype);
1340 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1341 }
1342 _returnToken = _token;
1343 }
1344
1345 public final void mDOLLAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1346 int _ttype; Token _token=null; int _begin=text.length();
1347 _ttype = DOLLAR;
1348 int _saveIndex;
1349
1350 match('$');
1351 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1352 _token = makeToken(_ttype);
1353 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1354 }
1355 _returnToken = _token;
1356 }
1357
1358 public final void mRANGE_INCLUSIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1359 int _ttype; Token _token=null; int _begin=text.length();
1360 _ttype = RANGE_INCLUSIVE;
1361 int _saveIndex;
1362
1363 match("..");
1364 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1365 _token = makeToken(_ttype);
1366 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1367 }
1368 _returnToken = _token;
1369 }
1370
1371 public final void mRANGE_EXCLUSIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1372 int _ttype; Token _token=null; int _begin=text.length();
1373 _ttype = RANGE_EXCLUSIVE;
1374 int _saveIndex;
1375
1376 match("..<");
1377 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1378 _token = makeToken(_ttype);
1379 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1380 }
1381 _returnToken = _token;
1382 }
1383
1384 public final void mTRIPLE_DOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1385 int _ttype; Token _token=null; int _begin=text.length();
1386 _ttype = TRIPLE_DOT;
1387 int _saveIndex;
1388
1389 match("...");
1390 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1391 _token = makeToken(_ttype);
1392 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1393 }
1394 _returnToken = _token;
1395 }
1396
1397 public final void mSPREAD_DOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1398 int _ttype; Token _token=null; int _begin=text.length();
1399 _ttype = SPREAD_DOT;
1400 int _saveIndex;
1401
1402 match("*.");
1403 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1404 _token = makeToken(_ttype);
1405 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1406 }
1407 _returnToken = _token;
1408 }
1409
1410 public final void mOPTIONAL_DOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1411 int _ttype; Token _token=null; int _begin=text.length();
1412 _ttype = OPTIONAL_DOT;
1413 int _saveIndex;
1414
1415 match("?.");
1416 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1417 _token = makeToken(_ttype);
1418 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1419 }
1420 _returnToken = _token;
1421 }
1422
1423 public final void mMEMBER_POINTER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1424 int _ttype; Token _token=null; int _begin=text.length();
1425 _ttype = MEMBER_POINTER;
1426 int _saveIndex;
1427
1428 match(".&");
1429 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1430 _token = makeToken(_ttype);
1431 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1432 }
1433 _returnToken = _token;
1434 }
1435
1436 public final void mREGEX_FIND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1437 int _ttype; Token _token=null; int _begin=text.length();
1438 _ttype = REGEX_FIND;
1439 int _saveIndex;
1440
1441 match("=~");
1442 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1443 _token = makeToken(_ttype);
1444 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1445 }
1446 _returnToken = _token;
1447 }
1448
1449 public final void mREGEX_MATCH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1450 int _ttype; Token _token=null; int _begin=text.length();
1451 _ttype = REGEX_MATCH;
1452 int _saveIndex;
1453
1454 match("==~");
1455 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1456 _token = makeToken(_ttype);
1457 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1458 }
1459 _returnToken = _token;
1460 }
1461
1462 public final void mSTAR_STAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1463 int _ttype; Token _token=null; int _begin=text.length();
1464 _ttype = STAR_STAR;
1465 int _saveIndex;
1466
1467 match("**");
1468 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1469 _token = makeToken(_ttype);
1470 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1471 }
1472 _returnToken = _token;
1473 }
1474
1475 public final void mSTAR_STAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1476 int _ttype; Token _token=null; int _begin=text.length();
1477 _ttype = STAR_STAR_ASSIGN;
1478 int _saveIndex;
1479
1480 match("**=");
1481 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1482 _token = makeToken(_ttype);
1483 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1484 }
1485 _returnToken = _token;
1486 }
1487
1488 public final void mCLOSURE_OP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1489 int _ttype; Token _token=null; int _begin=text.length();
1490 _ttype = CLOSURE_OP;
1491 int _saveIndex;
1492
1493 match("->");
1494 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1495 _token = makeToken(_ttype);
1496 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1497 }
1498 _returnToken = _token;
1499 }
1500
1501 public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1502 int _ttype; Token _token=null; int _begin=text.length();
1503 _ttype = WS;
1504 int _saveIndex;
1505
1506 {
1507 int _cnt555=0;
1508 _loop555:
1509 do {
1510 if ((LA(1)==' ') && (true) && (true) && (true)) {
1511 match(' ');
1512 }
1513 else if ((LA(1)=='\t') && (true) && (true) && (true)) {
1514 match('\t');
1515 }
1516 else if ((LA(1)=='\u000c') && (true) && (true) && (true)) {
1517 match('\f');
1518 }
1519 else {
1520 if ( _cnt555>=1 ) { break _loop555; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1521 }
1522
1523 _cnt555++;
1524 } while (true);
1525 }
1526 if ( inputState.guessing==0 ) {
1527 if (!whitespaceIncluded) _ttype = Token.SKIP;
1528 }
1529 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1530 _token = makeToken(_ttype);
1531 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1532 }
1533 _returnToken = _token;
1534 }
1535
1536 protected final void mONE_NL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1537 int _ttype; Token _token=null; int _begin=text.length();
1538 _ttype = ONE_NL;
1539 int _saveIndex;
1540
1541 {
1542 if ((LA(1)=='\r') && (LA(2)=='\n') && (true) && (true)) {
1543 _saveIndex=text.length();
1544 match("\r\n");
1545 text.setLength(_saveIndex);
1546 }
1547 else if ((LA(1)=='\r') && (true) && (true) && (true)) {
1548 _saveIndex=text.length();
1549 match('\r');
1550 text.setLength(_saveIndex);
1551 }
1552 else if ((LA(1)=='\n')) {
1553 _saveIndex=text.length();
1554 match('\n');
1555 text.setLength(_saveIndex);
1556 }
1557 else {
1558 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1559 }
1560
1561 }
1562 if ( inputState.guessing==0 ) {
1563
1564
1565 newlineCheck();
1566
1567 }
1568 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1569 _token = makeToken(_ttype);
1570 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1571 }
1572 _returnToken = _token;
1573 }
1574
1575 public final void mNLS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1576 int _ttype; Token _token=null; int _begin=text.length();
1577 _ttype = NLS;
1578 int _saveIndex;
1579
1580 mONE_NL(false);
1581 {
1582 if (((LA(1)=='\t'||LA(1)=='\n'||LA(1)=='\u000c'||LA(1)=='\r'||LA(1)==' '||LA(1)=='/'))&&(!whitespaceIncluded)) {
1583 {
1584 int _cnt561=0;
1585 _loop561:
1586 do {
1587 switch ( LA(1)) {
1588 case '\n': case '\r':
1589 {
1590 mONE_NL(false);
1591 break;
1592 }
1593 case '\t': case '\u000c': case ' ':
1594 {
1595 mWS(false);
1596 break;
1597 }
1598 default:
1599 if ((LA(1)=='/') && (LA(2)=='/')) {
1600 mSL_COMMENT(false);
1601 }
1602 else if ((LA(1)=='/') && (LA(2)=='*')) {
1603 mML_COMMENT(false);
1604 }
1605 else {
1606 if ( _cnt561>=1 ) { break _loop561; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
1607 }
1608 }
1609 _cnt561++;
1610 } while (true);
1611 }
1612 }
1613 else {
1614 }
1615
1616 }
1617 if ( inputState.guessing==0 ) {
1618 if (whitespaceIncluded) {
1619
1620 } else if (parenLevel != 0) {
1621
1622 _ttype = Token.SKIP;
1623 } else {
1624
1625 text.setLength(_begin); text.append("<newline>");
1626 }
1627
1628 }
1629 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1630 _token = makeToken(_ttype);
1631 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1632 }
1633 _returnToken = _token;
1634 }
1635
1636 public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1637 int _ttype; Token _token=null; int _begin=text.length();
1638 _ttype = SL_COMMENT;
1639 int _saveIndex;
1640
1641 match("//");
1642 {
1643 _loop565:
1644 do {
1645 if ((_tokenSet_0.member(LA(1))) && (true) && (true) && (true)) {
1646 {
1647 match(_tokenSet_0);
1648 }
1649 }
1650 else {
1651 break _loop565;
1652 }
1653
1654 } while (true);
1655 }
1656 if ( inputState.guessing==0 ) {
1657 if (!whitespaceIncluded) _ttype = Token.SKIP;
1658 }
1659 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1660 _token = makeToken(_ttype);
1661 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1662 }
1663 _returnToken = _token;
1664 }
1665
1666 public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1667 int _ttype; Token _token=null; int _begin=text.length();
1668 _ttype = ML_COMMENT;
1669 int _saveIndex;
1670
1671 match("/*");
1672 {
1673 _loop575:
1674 do {
1675 if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && ((LA(4) >= '\u0003' && LA(4) <= '\uffff'))) {
1676 match('\r');
1677 match('\n');
1678 if ( inputState.guessing==0 ) {
1679 newlineCheck();
1680 }
1681 }
1682 else {
1683 boolean synPredMatched573 = false;
1684 if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && (true))) {
1685 int _m573 = mark();
1686 synPredMatched573 = true;
1687 inputState.guessing++;
1688 try {
1689 {
1690 match('*');
1691 matchNot('/');
1692 }
1693 }
1694 catch (RecognitionException pe) {
1695 synPredMatched573 = false;
1696 }
1697 rewind(_m573);
1698 inputState.guessing--;
1699 }
1700 if ( synPredMatched573 ) {
1701 match('*');
1702 }
1703 else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && (true)) {
1704 match('\r');
1705 if ( inputState.guessing==0 ) {
1706 newlineCheck();
1707 }
1708 }
1709 else if ((LA(1)=='\n')) {
1710 match('\n');
1711 if ( inputState.guessing==0 ) {
1712 newlineCheck();
1713 }
1714 }
1715 else if ((_tokenSet_1.member(LA(1)))) {
1716 {
1717 match(_tokenSet_1);
1718 }
1719 }
1720 else {
1721 break _loop575;
1722 }
1723 }
1724 } while (true);
1725 }
1726 match("*/");
1727 if ( inputState.guessing==0 ) {
1728 if (!whitespaceIncluded) _ttype = Token.SKIP;
1729 }
1730 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1731 _token = makeToken(_ttype);
1732 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1733 }
1734 _returnToken = _token;
1735 }
1736
1737 public final void mSH_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1738 int _ttype; Token _token=null; int _begin=text.length();
1739 _ttype = SH_COMMENT;
1740 int _saveIndex;
1741
1742 if (!(getLine() == 1 && getColumn() == 1))
1743 throw new SemanticException("getLine() == 1 && getColumn() == 1");
1744 match("#!");
1745 {
1746 _loop569:
1747 do {
1748 if ((_tokenSet_2.member(LA(1)))) {
1749 {
1750 match(_tokenSet_2);
1751 }
1752 }
1753 else {
1754 break _loop569;
1755 }
1756
1757 } while (true);
1758 }
1759 if ( inputState.guessing==0 ) {
1760 if (!whitespaceIncluded) _ttype = Token.SKIP;
1761 }
1762 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1763 _token = makeToken(_ttype);
1764 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1765 }
1766 _returnToken = _token;
1767 }
1768
1769 public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1770 int _ttype; Token _token=null; int _begin=text.length();
1771 _ttype = STRING_LITERAL;
1772 int _saveIndex;
1773 int tt=0;
1774
1775 boolean synPredMatched578 = false;
1776 if (((LA(1)=='\'') && (LA(2)=='\'') && (LA(3)=='\'') && ((LA(4) >= '\u0003' && LA(4) <= '\uffff')))) {
1777 int _m578 = mark();
1778 synPredMatched578 = true;
1779 inputState.guessing++;
1780 try {
1781 {
1782 match("'''");
1783 }
1784 }
1785 catch (RecognitionException pe) {
1786 synPredMatched578 = false;
1787 }
1788 rewind(_m578);
1789 inputState.guessing--;
1790 }
1791 if ( synPredMatched578 ) {
1792 _saveIndex=text.length();
1793 match("'''");
1794 text.setLength(_saveIndex);
1795 {
1796 _loop583:
1797 do {
1798 switch ( LA(1)) {
1799 case '\n': case '\r': case '//':
1800 {
1801 mESC(false);
1802 break;
1803 }
1804 case '"':
1805 {
1806 match('"');
1807 break;
1808 }
1809 case '$':
1810 {
1811 match('$');
1812 break;
1813 }
1814 default:
1815 boolean synPredMatched582 = false;
1816 if (((LA(1)=='\'') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && ((LA(4) >= '\u0003' && LA(4) <= '\uffff')))) {
1817 int _m582 = mark();
1818 synPredMatched582 = true;
1819 inputState.guessing++;
1820 try {
1821 {
1822 match('\'');
1823 {
1824 if ((_tokenSet_3.member(LA(1)))) {
1825 matchNot('\'');
1826 }
1827 else if ((LA(1)=='\'')) {
1828 match('\'');
1829 matchNot('\'');
1830 }
1831 else {
1832 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1833 }
1834
1835 }
1836 }
1837 }
1838 catch (RecognitionException pe) {
1839 synPredMatched582 = false;
1840 }
1841 rewind(_m582);
1842 inputState.guessing--;
1843 }
1844 if ( synPredMatched582 ) {
1845 match('\'');
1846 }
1847 else if ((_tokenSet_4.member(LA(1)))) {
1848 mSTRING_CH(false);
1849 }
1850 else {
1851 break _loop583;
1852 }
1853 }
1854 } while (true);
1855 }
1856 _saveIndex=text.length();
1857 match("'''");
1858 text.setLength(_saveIndex);
1859 }
1860 else {
1861 boolean synPredMatched587 = false;
1862 if (((LA(1)=='"') && (LA(2)=='"') && (LA(3)=='"') && ((LA(4) >= '\u0003' && LA(4) <= '\uffff')))) {
1863 int _m587 = mark();
1864 synPredMatched587 = true;
1865 inputState.guessing++;
1866 try {
1867 {
1868 match("\"\"\"");
1869 }
1870 }
1871 catch (RecognitionException pe) {
1872 synPredMatched587 = false;
1873 }
1874 rewind(_m587);
1875 inputState.guessing--;
1876 }
1877 if ( synPredMatched587 ) {
1878 _saveIndex=text.length();
1879 match("\"\"\"");
1880 text.setLength(_saveIndex);
1881 tt=mSTRING_CTOR_END(false,true,
1882 if ( inputState.guessing==0 ) {
1883 _ttype = tt;
1884 }
1885 }
1886 else if ((LA(1)=='\'') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && (true) && (true)) {
1887 _saveIndex=text.length();
1888 match('\'');
1889 text.setLength(_saveIndex);
1890 if ( inputState.guessing==0 ) {
1891 ++suppressNewline;
1892 }
1893 {
1894 _loop585:
1895 do {
1896 switch ( LA(1)) {
1897 case '\n': case '\r': case '//':
1898 {
1899 mESC(false);
1900 break;
1901 }
1902 case '"':
1903 {
1904 match('"');
1905 break;
1906 }
1907 case '$':
1908 {
1909 match('$');
1910 break;
1911 }
1912 default:
1913 if ((_tokenSet_4.member(LA(1)))) {
1914 mSTRING_CH(false);
1915 }
1916 else {
1917 break _loop585;
1918 }
1919 }
1920 } while (true);
1921 }
1922 if ( inputState.guessing==0 ) {
1923 --suppressNewline;
1924 }
1925 _saveIndex=text.length();
1926 match('\'');
1927 text.setLength(_saveIndex);
1928 }
1929 else if ((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && (true) && (true)) {
1930 _saveIndex=text.length();
1931 match('"');
1932 text.setLength(_saveIndex);
1933 if ( inputState.guessing==0 ) {
1934 ++suppressNewline;
1935 }
1936 tt=mSTRING_CTOR_END(false,true,
1937 if ( inputState.guessing==0 ) {
1938 _ttype = tt;
1939 }
1940 }
1941 else {
1942 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
1943 }
1944 }
1945 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1946 _token = makeToken(_ttype);
1947 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1948 }
1949 _returnToken = _token;
1950 }
1951
1952 protected final void mSTRING_CH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1953 int _ttype; Token _token=null; int _begin=text.length();
1954 _ttype = STRING_CH;
1955 int _saveIndex;
1956
1957 {
1958 match(_tokenSet_4);
1959 }
1960 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
1961 _token = makeToken(_ttype);
1962 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
1963 }
1964 _returnToken = _token;
1965 }
1966
1967 protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
1968 int _ttype; Token _token=null; int _begin=text.length();
1969 _ttype = ESC;
1970 int _saveIndex;
1971
1972 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')) {
1973 _saveIndex=text.length();
1974 match('//');
1975 text.setLength(_saveIndex);
1976 {
1977 switch ( LA(1)) {
1978 case 'n':
1979 {
1980 match('n');
1981 if ( inputState.guessing==0 ) {
1982 text.setLength(_begin); text.append("\n");
1983 }
1984 break;
1985 }
1986 case 'r':
1987 {
1988 match('r');
1989 if ( inputState.guessing==0 ) {
1990 text.setLength(_begin); text.append("\r");
1991 }
1992 break;
1993 }
1994 case 't':
1995 {
1996 match('t');
1997 if ( inputState.guessing==0 ) {
1998 text.setLength(_begin); text.append("\t");
1999 }
2000 break;
2001 }
2002 case 'b':
2003 {
2004 match('b');
2005 if ( inputState.guessing==0 ) {
2006 text.setLength(_begin); text.append("\b");
2007 }
2008 break;
2009 }
2010 case 'f':
2011 {
2012 match('f');
2013 if ( inputState.guessing==0 ) {
2014 text.setLength(_begin); text.append("\f");
2015 }
2016 break;
2017 }
2018 case '"':
2019 {
2020 match('"');
2021 break;
2022 }
2023 case '\'':
2024 {
2025 match('\'');
2026 break;
2027 }
2028 case '//':
2029 {
2030 match('//');
2031 break;
2032 }
2033 case '$':
2034 {
2035 match('$');
2036 break;
2037 }
2038 case 'u':
2039 {
2040 {
2041 int _cnt613=0;
2042 _loop613:
2043 do {
2044 if ((LA(1)=='u')) {
2045 match('u');
2046 }
2047 else {
2048 if ( _cnt613>=1 ) { break _loop613; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2049 }
2050
2051 _cnt613++;
2052 } while (true);
2053 }
2054 if ( inputState.guessing==0 ) {
2055 text.setLength(_begin); text.append("");
2056 }
2057 mHEX_DIGIT(false);
2058 mHEX_DIGIT(false);
2059 mHEX_DIGIT(false);
2060 mHEX_DIGIT(false);
2061 if ( inputState.guessing==0 ) {
2062 char ch = (char)Integer.parseInt(new String(text.getBuffer(),_begin,text.length()-_begin),16); text.setLength(_begin); text.append(ch);
2063 }
2064 break;
2065 }
2066 case '0': case '1': case '2': case '3':
2067 {
2068 matchRange('0','3');
2069 {
2070 if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && (true) && (true)) {
2071 matchRange('0','7');
2072 {
2073 if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && (true) && (true)) {
2074 matchRange('0','7');
2075 }
2076 else if (((LA(1) >= '\u0003' && LA(1) <= '\uffff')) && (true) && (true) && (true)) {
2077 }
2078 else {
2079 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2080 }
2081
2082 }
2083 }
2084 else if (((LA(1) >= '\u0003' && LA(1) <= '\uffff')) && (true) && (true) && (true)) {
2085 }
2086 else {
2087 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2088 }
2089
2090 }
2091 if ( inputState.guessing==0 ) {
2092 char ch = (char)Integer.parseInt(new String(text.getBuffer(),_begin,text.length()-_begin),8); text.setLength(_begin); text.append(ch);
2093 }
2094 break;
2095 }
2096 case '4': case '5': case '6': case '7':
2097 {
2098 matchRange('4','7');
2099 {
2100 if (((LA(1) >= '0' && LA(1) <= '7')) && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && (true) && (true)) {
2101 matchRange('0','7');
2102 }
2103 else if (((LA(1) >= '\u0003' && LA(1) <= '\uffff')) && (true) && (true) && (true)) {
2104 }
2105 else {
2106 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2107 }
2108
2109 }
2110 if ( inputState.guessing==0 ) {
2111 char ch = (char)Integer.parseInt(new String(text.getBuffer(),_begin,text.length()-_begin),8); text.setLength(_begin); text.append(ch);
2112 }
2113 break;
2114 }
2115 default:
2116 {
2117 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2118 }
2119 }
2120 }
2121 }
2122 else if ((LA(1)=='//') && (LA(2)=='\n'||LA(2)=='\r')) {
2123 _saveIndex=text.length();
2124 match('//');
2125 text.setLength(_saveIndex);
2126 _saveIndex=text.length();
2127 mONE_NL(false);
2128 text.setLength(_saveIndex);
2129 }
2130 else if ((LA(1)=='\n'||LA(1)=='\r')) {
2131 _saveIndex=text.length();
2132 mONE_NL(false);
2133 text.setLength(_saveIndex);
2134 if ( inputState.guessing==0 ) {
2135 text.setLength(_begin); text.append('\n');
2136 }
2137 }
2138 else {
2139 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2140 }
2141
2142 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2143 _token = makeToken(_ttype);
2144 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2145 }
2146 _returnToken = _token;
2147 }
2148
2149 protected final int mSTRING_CTOR_END(boolean _createToken,
2150 boolean fromStart, boolean tripleQuote
2151 ) throws RecognitionException, CharStreamException, TokenStreamException {
2152 int tt=STRING_CTOR_END;
2153 int _ttype; Token _token=null; int _begin=text.length();
2154 _ttype = STRING_CTOR_END;
2155 int _saveIndex;
2156 boolean dollarOK = false;
2157
2158 {
2159 _loop593:
2160 do {
2161 switch ( LA(1)) {
2162 case '\n': case '\r': case '//':
2163 {
2164 mESC(false);
2165 break;
2166 }
2167 case '\'':
2168 {
2169 match('\'');
2170 break;
2171 }
2172 default:
2173 boolean synPredMatched592 = false;
2174 if ((((LA(1)=='"') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && (true) && (true))&&(tripleQuote))) {
2175 int _m592 = mark();
2176 synPredMatched592 = true;
2177 inputState.guessing++;
2178 try {
2179 {
2180 match('"');
2181 {
2182 if ((_tokenSet_5.member(LA(1)))) {
2183 matchNot('"');
2184 }
2185 else if ((LA(1)=='"')) {
2186 match('"');
2187 matchNot('"');
2188 }
2189 else {
2190 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2191 }
2192
2193 }
2194 }
2195 }
2196 catch (RecognitionException pe) {
2197 synPredMatched592 = false;
2198 }
2199 rewind(_m592);
2200 inputState.guessing--;
2201 }
2202 if ( synPredMatched592 ) {
2203 match('"');
2204 }
2205 else if ((_tokenSet_4.member(LA(1)))) {
2206 mSTRING_CH(false);
2207 }
2208 else {
2209 break _loop593;
2210 }
2211 }
2212 } while (true);
2213 }
2214 {
2215 switch ( LA(1)) {
2216 case '"':
2217 {
2218 {
2219 if (((LA(1)=='"') && (LA(2)=='"'))&&( tripleQuote )) {
2220 _saveIndex=text.length();
2221 match("\"\"\"");
2222 text.setLength(_saveIndex);
2223 }
2224 else if (((LA(1)=='"') && (true))&&( !tripleQuote )) {
2225 _saveIndex=text.length();
2226 match("\"");
2227 text.setLength(_saveIndex);
2228 }
2229 else {
2230 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2231 }
2232
2233 }
2234 if ( inputState.guessing==0 ) {
2235
2236 if (fromStart) tt = STRING_LITERAL;
2237 if (!tripleQuote) {--suppressNewline;}
2238
2239
2240
2241 }
2242 break;
2243 }
2244 case '$':
2245 {
2246 if ( inputState.guessing==0 ) {
2247 dollarOK = atValidDollarEscape();
2248 }
2249 _saveIndex=text.length();
2250 match('$');
2251 text.setLength(_saveIndex);
2252 if ( inputState.guessing==0 ) {
2253
2254 require(dollarOK,
2255 "illegal string body character after dollar sign",
2256 "either escape a literal dollar sign \"//$5\" or bracket the value expression \"${5}\"");
2257
2258 tt = (fromStart ? STRING_CTOR_START : STRING_CTOR_MIDDLE);
2259 stringCtorState = SCS_VAL + (tripleQuote? SCS_TQ_TYPE: SCS_SQ_TYPE);
2260
2261 }
2262 break;
2263 }
2264 default:
2265 {
2266 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2267 }
2268 }
2269 }
2270 if ( inputState.guessing==0 ) {
2271 _ttype = tt;
2272 }
2273 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2274 _token = makeToken(_ttype);
2275 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2276 }
2277 _returnToken = _token;
2278 return tt;
2279 }
2280
2281 public final void mREGEXP_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2282 int _ttype; Token _token=null; int _begin=text.length();
2283 _ttype = REGEXP_LITERAL;
2284 int _saveIndex;
2285 int tt=0;
2286
2287 if (((LA(1)=='/') && (_tokenSet_6.member(LA(2))) && (true) && (true))&&(allowRegexpLiteral())) {
2288 _saveIndex=text.length();
2289 match('/');
2290 text.setLength(_saveIndex);
2291 if ( inputState.guessing==0 ) {
2292 ++suppressNewline;
2293 }
2294 {
2295 if (((LA(1)=='$') && (_tokenSet_1.member(LA(2))))&&(!atValidDollarEscape())) {
2296 match('$');
2297 tt=mREGEXP_CTOR_END(false,true);
2298 }
2299 else if ((_tokenSet_7.member(LA(1)))) {
2300 mREGEXP_SYMBOL(false);
2301 tt=mREGEXP_CTOR_END(false,true);
2302 }
2303 else if ((LA(1)=='$') && (true)) {
2304 _saveIndex=text.length();
2305 match('$');
2306 text.setLength(_saveIndex);
2307 if ( inputState.guessing==0 ) {
2308
2309
2310 tt = STRING_CTOR_START;
2311 stringCtorState = SCS_VAL + SCS_RE_TYPE;
2312
2313 }
2314 }
2315 else {
2316 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2317 }
2318
2319 }
2320 if ( inputState.guessing==0 ) {
2321 _ttype = tt;
2322 }
2323 }
2324 else if ((LA(1)=='/') && (LA(2)=='=') && (true) && (true)) {
2325 mDIV_ASSIGN(false);
2326 if ( inputState.guessing==0 ) {
2327 _ttype = DIV_ASSIGN;
2328 }
2329 }
2330 else if ((LA(1)=='/') && (true)) {
2331 mDIV(false);
2332 if ( inputState.guessing==0 ) {
2333 _ttype = DIV;
2334 }
2335 }
2336 else {
2337 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2338 }
2339
2340 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2341 _token = makeToken(_ttype);
2342 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2343 }
2344 _returnToken = _token;
2345 }
2346
2347 protected final void mREGEXP_SYMBOL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2348 int _ttype; Token _token=null; int _begin=text.length();
2349 _ttype = REGEXP_SYMBOL;
2350 int _saveIndex;
2351
2352 {
2353 if ((LA(1)=='//') && (_tokenSet_2.member(LA(2)))) {
2354 match('//');
2355 {
2356 match(_tokenSet_2);
2357 }
2358 }
2359 else if ((LA(1)=='//') && (LA(2)=='\n'||LA(2)=='\r')) {
2360 _saveIndex=text.length();
2361 match('//');
2362 text.setLength(_saveIndex);
2363 _saveIndex=text.length();
2364 mONE_NL(false);
2365 text.setLength(_saveIndex);
2366 if ( inputState.guessing==0 ) {
2367 text.setLength(_begin); text.append('\n');
2368 }
2369 }
2370 else if ((_tokenSet_8.member(LA(1)))) {
2371 {
2372 match(_tokenSet_8);
2373 }
2374 }
2375 else {
2376 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2377 }
2378
2379 }
2380 {
2381 _loop609:
2382 do {
2383 if ((LA(1)=='*')) {
2384 match('*');
2385 }
2386 else {
2387 break _loop609;
2388 }
2389
2390 } while (true);
2391 }
2392 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2393 _token = makeToken(_ttype);
2394 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2395 }
2396 _returnToken = _token;
2397 }
2398
2399 protected final int mREGEXP_CTOR_END(boolean _createToken,
2400 boolean fromStart
2401 ) throws RecognitionException, CharStreamException, TokenStreamException {
2402 int tt=STRING_CTOR_END;
2403 int _ttype; Token _token=null; int _begin=text.length();
2404 _ttype = REGEXP_CTOR_END;
2405 int _saveIndex;
2406
2407 {
2408 _loop602:
2409 do {
2410 if (((LA(1)=='$') && (_tokenSet_1.member(LA(2))))&&(!atValidDollarEscape())) {
2411 match('$');
2412 }
2413 else if ((_tokenSet_7.member(LA(1)))) {
2414 mREGEXP_SYMBOL(false);
2415 }
2416 else {
2417 break _loop602;
2418 }
2419
2420 } while (true);
2421 }
2422 {
2423 switch ( LA(1)) {
2424 case '/':
2425 {
2426 _saveIndex=text.length();
2427 match('/');
2428 text.setLength(_saveIndex);
2429 if ( inputState.guessing==0 ) {
2430
2431 if (fromStart) tt = STRING_LITERAL;
2432 {--suppressNewline;}
2433
2434
2435
2436 }
2437 break;
2438 }
2439 case '$':
2440 {
2441 _saveIndex=text.length();
2442 match('$');
2443 text.setLength(_saveIndex);
2444 if ( inputState.guessing==0 ) {
2445
2446
2447 tt = (fromStart ? STRING_CTOR_START : STRING_CTOR_MIDDLE);
2448 stringCtorState = SCS_VAL + SCS_RE_TYPE;
2449
2450 }
2451 break;
2452 }
2453 default:
2454 {
2455 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2456 }
2457 }
2458 }
2459 if ( inputState.guessing==0 ) {
2460 _ttype = tt;
2461 }
2462 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2463 _token = makeToken(_ttype);
2464 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2465 }
2466 _returnToken = _token;
2467 return tt;
2468 }
2469
2470 protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2471 int _ttype; Token _token=null; int _begin=text.length();
2472 _ttype = HEX_DIGIT;
2473 int _saveIndex;
2474
2475 {
2476 switch ( LA(1)) {
2477 case '0': case '1': case '2': case '3':
2478 case '4': case '5': case '6': case '7':
2479 case '8': case '9':
2480 {
2481 matchRange('0','9');
2482 break;
2483 }
2484 case 'A': case 'B': case 'C': case 'D':
2485 case 'E': case 'F':
2486 {
2487 matchRange('A','F');
2488 break;
2489 }
2490 case 'a': case 'b': case 'c': case 'd':
2491 case 'e': case 'f':
2492 {
2493 matchRange('a','f');
2494 break;
2495 }
2496 default:
2497 {
2498 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2499 }
2500 }
2501 }
2502 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2503 _token = makeToken(_ttype);
2504 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2505 }
2506 _returnToken = _token;
2507 }
2508
2509 protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2510 int _ttype; Token _token=null; int _begin=text.length();
2511 _ttype = VOCAB;
2512 int _saveIndex;
2513
2514 matchRange('\3','\377');
2515 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2516 _token = makeToken(_ttype);
2517 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2518 }
2519 _returnToken = _token;
2520 }
2521
2522 public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2523 int _ttype; Token _token=null; int _begin=text.length();
2524 _ttype = IDENT;
2525 int _saveIndex;
2526
2527 mLETTER(false);
2528 {
2529 _loop622:
2530 do {
2531 switch ( LA(1)) {
2532 case 'A': case 'B': case 'C': case 'D':
2533 case 'E': case 'F': case 'G': case 'H':
2534 case 'I': case 'J': case 'K': case 'L':
2535 case 'M': case 'N': case 'O': case 'P':
2536 case 'Q': case 'R': case 'S': case 'T':
2537 case 'U': case 'V': case 'W': case 'X':
2538 case 'Y': case 'Z': case '_': case 'a':
2539 case 'b': case 'c': case 'd': case 'e':
2540 case 'f': case 'g': case 'h': case 'i':
2541 case 'j': case 'k': case 'l': case 'm':
2542 case 'n': case 'o': case 'p': case 'q':
2543 case 'r': case 's': case 't': case 'u':
2544 case 'v': case 'w': case 'x': case 'y':
2545 case 'z':
2546 {
2547 mLETTER(false);
2548 break;
2549 }
2550 case '0': case '1': case '2': case '3':
2551 case '4': case '5': case '6': case '7':
2552 case '8': case '9':
2553 {
2554 mDIGIT(false);
2555 break;
2556 }
2557 default:
2558 {
2559 break _loop622;
2560 }
2561 }
2562 } while (true);
2563 }
2564 if ( inputState.guessing==0 ) {
2565
2566 if (stringCtorState != 0) {
2567 if (LA(1) == '.' && LA(2) != '$' &&
2568 Character.isJavaIdentifierStart(LA(2))) {
2569
2570 restartStringCtor(false);
2571 } else {
2572
2573 restartStringCtor(true);
2574 }
2575 }
2576 int ttype = testLiteralsTable(IDENT);
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589 _ttype = ttype;
2590
2591
2592 if (assertEnabled && "assert".equals(new String(text.getBuffer(),_begin,text.length()-_begin))) {
2593 _ttype = LITERAL_assert;
2594 }
2595
2596 if (enumEnabled && "enum".equals(new String(text.getBuffer(),_begin,text.length()-_begin))) {
2597 _ttype = LITERAL_enum;
2598 }
2599
2600 }
2601 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2602 _token = makeToken(_ttype);
2603 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2604 }
2605 _returnToken = _token;
2606 }
2607
2608 protected final void mLETTER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2609 int _ttype; Token _token=null; int _begin=text.length();
2610 _ttype = LETTER;
2611 int _saveIndex;
2612
2613 switch ( LA(1)) {
2614 case 'a': case 'b': case 'c': case 'd':
2615 case 'e': case 'f': case 'g': case 'h':
2616 case 'i': case 'j': case 'k': case 'l':
2617 case 'm': case 'n': case 'o': case 'p':
2618 case 'q': case 'r': case 's': case 't':
2619 case 'u': case 'v': case 'w': case 'x':
2620 case 'y': case 'z':
2621 {
2622 matchRange('a','z');
2623 break;
2624 }
2625 case 'A': case 'B': case 'C': case 'D':
2626 case 'E': case 'F': case 'G': case 'H':
2627 case 'I': case 'J': case 'K': case 'L':
2628 case 'M': case 'N': case 'O': case 'P':
2629 case 'Q': case 'R': case 'S': case 'T':
2630 case 'U': case 'V': case 'W': case 'X':
2631 case 'Y': case 'Z':
2632 {
2633 matchRange('A','Z');
2634 break;
2635 }
2636 case '_':
2637 {
2638 match('_');
2639 break;
2640 }
2641 default:
2642 {
2643 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2644 }
2645 }
2646 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2647 _token = makeToken(_ttype);
2648 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2649 }
2650 _returnToken = _token;
2651 }
2652
2653 protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2654 int _ttype; Token _token=null; int _begin=text.length();
2655 _ttype = DIGIT;
2656 int _saveIndex;
2657
2658 matchRange('0','9');
2659 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
2660 _token = makeToken(_ttype);
2661 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
2662 }
2663 _returnToken = _token;
2664 }
2665
2666 public final void mNUM_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
2667 int _ttype; Token _token=null; int _begin=text.length();
2668 _ttype = NUM_INT;
2669 int _saveIndex;
2670 Token f2=null;
2671 Token g2=null;
2672 Token f3=null;
2673 Token g3=null;
2674 Token f4=null;
2675 boolean isDecimal=false; Token t=null;
2676
2677 {
2678 switch ( LA(1)) {
2679 case '0':
2680 {
2681 match('0');
2682 if ( inputState.guessing==0 ) {
2683 isDecimal = true;
2684 }
2685 {
2686 if ((LA(1)=='X'||LA(1)=='x')) {
2687 {
2688 switch ( LA(1)) {
2689 case 'x':
2690 {
2691 match('x');
2692 break;
2693 }
2694 case 'X':
2695 {
2696 match('X');
2697 break;
2698 }
2699 default:
2700 {
2701 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2702 }
2703 }
2704 }
2705 if ( inputState.guessing==0 ) {
2706 isDecimal = false;
2707 }
2708 {
2709 int _cnt630=0;
2710 _loop630:
2711 do {
2712 if ((_tokenSet_9.member(LA(1))) && (true) && (true) && (true)) {
2713 mHEX_DIGIT(false);
2714 }
2715 else {
2716 if ( _cnt630>=1 ) { break _loop630; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2717 }
2718
2719 _cnt630++;
2720 } while (true);
2721 }
2722 }
2723 else {
2724 boolean synPredMatched636 = false;
2725 if ((((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true) && (true))) {
2726 int _m636 = mark();
2727 synPredMatched636 = true;
2728 inputState.guessing++;
2729 try {
2730 {
2731 {
2732 int _cnt633=0;
2733 _loop633:
2734 do {
2735 if (((LA(1) >= '0' && LA(1) <= '9'))) {
2736 matchRange('0','9');
2737 }
2738 else {
2739 if ( _cnt633>=1 ) { break _loop633; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2740 }
2741
2742 _cnt633++;
2743 } while (true);
2744 }
2745 {
2746 switch ( LA(1)) {
2747 case '.':
2748 {
2749 match('.');
2750 {
2751 matchRange('0','9');
2752 }
2753 break;
2754 }
2755 case 'E': case 'e':
2756 {
2757 mEXPONENT(false);
2758 break;
2759 }
2760 case 'D': case 'F': case 'd': case 'f':
2761 {
2762 mFLOAT_SUFFIX(false);
2763 break;
2764 }
2765 default:
2766 {
2767 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2768 }
2769 }
2770 }
2771 }
2772 }
2773 catch (RecognitionException pe) {
2774 synPredMatched636 = false;
2775 }
2776 rewind(_m636);
2777 inputState.guessing--;
2778 }
2779 if ( synPredMatched636 ) {
2780 {
2781 int _cnt638=0;
2782 _loop638:
2783 do {
2784 if (((LA(1) >= '0' && LA(1) <= '9'))) {
2785 matchRange('0','9');
2786 }
2787 else {
2788 if ( _cnt638>=1 ) { break _loop638; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2789 }
2790
2791 _cnt638++;
2792 } while (true);
2793 }
2794 }
2795 else if (((LA(1) >= '0' && LA(1) <= '7')) && (true) && (true) && (true)) {
2796 {
2797 int _cnt640=0;
2798 _loop640:
2799 do {
2800 if (((LA(1) >= '0' && LA(1) <= '7'))) {
2801 matchRange('0','7');
2802 }
2803 else {
2804 if ( _cnt640>=1 ) { break _loop640; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2805 }
2806
2807 _cnt640++;
2808 } while (true);
2809 }
2810 if ( inputState.guessing==0 ) {
2811 isDecimal = false;
2812 }
2813 }
2814 else {
2815 }
2816 }
2817 }
2818 break;
2819 }
2820 case '1': case '2': case '3': case '4':
2821 case '5': case '6': case '7': case '8':
2822 case '9':
2823 {
2824 {
2825 matchRange('1','9');
2826 }
2827 {
2828 _loop643:
2829 do {
2830 if (((LA(1) >= '0' && LA(1) <= '9'))) {
2831 matchRange('0','9');
2832 }
2833 else {
2834 break _loop643;
2835 }
2836
2837 } while (true);
2838 }
2839 if ( inputState.guessing==0 ) {
2840 isDecimal=true;
2841 }
2842 break;
2843 }
2844 default:
2845 {
2846 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2847 }
2848 }
2849 }
2850 {
2851 switch ( LA(1)) {
2852 case 'L': case 'l':
2853 {
2854 {
2855 switch ( LA(1)) {
2856 case 'l':
2857 {
2858 match('l');
2859 break;
2860 }
2861 case 'L':
2862 {
2863 match('L');
2864 break;
2865 }
2866 default:
2867 {
2868 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2869 }
2870 }
2871 }
2872 if ( inputState.guessing==0 ) {
2873 _ttype = NUM_LONG;
2874 }
2875 break;
2876 }
2877 case 'I': case 'i':
2878 {
2879 {
2880 switch ( LA(1)) {
2881 case 'i':
2882 {
2883 match('i');
2884 break;
2885 }
2886 case 'I':
2887 {
2888 match('I');
2889 break;
2890 }
2891 default:
2892 {
2893 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2894 }
2895 }
2896 }
2897 if ( inputState.guessing==0 ) {
2898 _ttype = NUM_INT;
2899 }
2900 break;
2901 }
2902 case 'G': case 'g':
2903 {
2904 mBIG_SUFFIX(false);
2905 if ( inputState.guessing==0 ) {
2906 _ttype = NUM_BIG_INT;
2907 }
2908 break;
2909 }
2910 default:
2911 boolean synPredMatched649 = false;
2912 if ((((LA(1)=='.'||LA(1)=='D'||LA(1)=='E'||LA(1)=='F'||LA(1)=='d'||LA(1)=='e'||LA(1)=='f'))&&(isDecimal))) {
2913 int _m649 = mark();
2914 synPredMatched649 = true;
2915 inputState.guessing++;
2916 try {
2917 {
2918 if ((_tokenSet_10.member(LA(1)))) {
2919 matchNot('.');
2920 }
2921 else if ((LA(1)=='.')) {
2922 match('.');
2923 {
2924 matchRange('0','9');
2925 }
2926 }
2927 else {
2928 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
2929 }
2930
2931 }
2932 }
2933 catch (RecognitionException pe) {
2934 synPredMatched649 = false;
2935 }
2936 rewind(_m649);
2937 inputState.guessing--;
2938 }
2939 if ( synPredMatched649 ) {
2940 {
2941 switch ( LA(1)) {
2942 case '.':
2943 {
2944 match('.');
2945 {
2946 int _cnt652=0;
2947 _loop652:
2948 do {
2949 if (((LA(1) >= '0' && LA(1) <= '9'))) {
2950 matchRange('0','9');
2951 }
2952 else {
2953 if ( _cnt652>=1 ) { break _loop652; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
2954 }
2955
2956 _cnt652++;
2957 } while (true);
2958 }
2959 {
2960 if ((LA(1)=='E'||LA(1)=='e')) {
2961 mEXPONENT(false);
2962 }
2963 else {
2964 }
2965
2966 }
2967 {
2968 switch ( LA(1)) {
2969 case 'D': case 'F': case 'd': case 'f':
2970 {
2971 mFLOAT_SUFFIX(true);
2972 f2=_returnToken;
2973 if ( inputState.guessing==0 ) {
2974 t=f2;
2975 }
2976 break;
2977 }
2978 case 'G': case 'g':
2979 {
2980 mBIG_SUFFIX(true);
2981 g2=_returnToken;
2982 if ( inputState.guessing==0 ) {
2983 t=g2;
2984 }
2985 break;
2986 }
2987 default:
2988 {
2989 }
2990 }
2991 }
2992 break;
2993 }
2994 case 'E': case 'e':
2995 {
2996 mEXPONENT(false);
2997 {
2998 switch ( LA(1)) {
2999 case 'D': case 'F': case 'd': case 'f':
3000 {
3001 mFLOAT_SUFFIX(true);
3002 f3=_returnToken;
3003 if ( inputState.guessing==0 ) {
3004 t=f3;
3005 }
3006 break;
3007 }
3008 case 'G': case 'g':
3009 {
3010 mBIG_SUFFIX(true);
3011 g3=_returnToken;
3012 if ( inputState.guessing==0 ) {
3013 t=g3;
3014 }
3015 break;
3016 }
3017 default:
3018 {
3019 }
3020 }
3021 }
3022 break;
3023 }
3024 case 'D': case 'F': case 'd': case 'f':
3025 {
3026 mFLOAT_SUFFIX(true);
3027 f4=_returnToken;
3028 if ( inputState.guessing==0 ) {
3029 t=f4;
3030 }
3031 break;
3032 }
3033 default:
3034 {
3035 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3036 }
3037 }
3038 }
3039 if ( inputState.guessing==0 ) {
3040
3041 String txt = (t == null ? "" : t.getText().toUpperCase());
3042 if (txt.indexOf('F') >= 0) {
3043 _ttype = NUM_FLOAT;
3044 } else if (txt.indexOf('G') >= 0) {
3045 _ttype = NUM_BIG_DECIMAL;
3046 } else {
3047 _ttype = NUM_DOUBLE;
3048 }
3049
3050 }
3051 }
3052 else {
3053 }
3054 }
3055 }
3056 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3057 _token = makeToken(_ttype);
3058 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
3059 }
3060 _returnToken = _token;
3061 }
3062
3063 protected final void mEXPONENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3064 int _ttype; Token _token=null; int _begin=text.length();
3065 _ttype = EXPONENT;
3066 int _saveIndex;
3067
3068 {
3069 switch ( LA(1)) {
3070 case 'e':
3071 {
3072 match('e');
3073 break;
3074 }
3075 case 'E':
3076 {
3077 match('E');
3078 break;
3079 }
3080 default:
3081 {
3082 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3083 }
3084 }
3085 }
3086 {
3087 switch ( LA(1)) {
3088 case '+':
3089 {
3090 match('+');
3091 break;
3092 }
3093 case '-':
3094 {
3095 match('-');
3096 break;
3097 }
3098 case '0': case '1': case '2': case '3':
3099 case '4': case '5': case '6': case '7':
3100 case '8': case '9':
3101 {
3102 break;
3103 }
3104 default:
3105 {
3106 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3107 }
3108 }
3109 }
3110 {
3111 int _cnt661=0;
3112 _loop661:
3113 do {
3114 if (((LA(1) >= '0' && LA(1) <= '9'))) {
3115 matchRange('0','9');
3116 }
3117 else {
3118 if ( _cnt661>=1 ) { break _loop661; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
3119 }
3120
3121 _cnt661++;
3122 } while (true);
3123 }
3124 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3125 _token = makeToken(_ttype);
3126 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
3127 }
3128 _returnToken = _token;
3129 }
3130
3131 protected final void mFLOAT_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3132 int _ttype; Token _token=null; int _begin=text.length();
3133 _ttype = FLOAT_SUFFIX;
3134 int _saveIndex;
3135
3136 switch ( LA(1)) {
3137 case 'f':
3138 {
3139 match('f');
3140 break;
3141 }
3142 case 'F':
3143 {
3144 match('F');
3145 break;
3146 }
3147 case 'd':
3148 {
3149 match('d');
3150 break;
3151 }
3152 case 'D':
3153 {
3154 match('D');
3155 break;
3156 }
3157 default:
3158 {
3159 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3160 }
3161 }
3162 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3163 _token = makeToken(_ttype);
3164 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
3165 }
3166 _returnToken = _token;
3167 }
3168
3169 protected final void mBIG_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3170 int _ttype; Token _token=null; int _begin=text.length();
3171 _ttype = BIG_SUFFIX;
3172 int _saveIndex;
3173
3174 switch ( LA(1)) {
3175 case 'g':
3176 {
3177 match('g');
3178 break;
3179 }
3180 case 'G':
3181 {
3182 match('G');
3183 break;
3184 }
3185 default:
3186 {
3187 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
3188 }
3189 }
3190 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3191 _token = makeToken(_ttype);
3192 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
3193 }
3194 _returnToken = _token;
3195 }
3196
3197 public final void mAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
3198 int _ttype; Token _token=null; int _begin=text.length();
3199 _ttype = AT;
3200 int _saveIndex;
3201
3202 match('@');
3203 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
3204 _token = makeToken(_ttype);
3205 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
3206 }
3207 _returnToken = _token;
3208 }
3209
3210
3211 private static final long[] mk_tokenSet_0() {
3212 long[] data = new long[2048];
3213 data[0]=-9224L;
3214 for (int i = 1; i<=1022; i++) { data[i]=-1L; }
3215 data[1023]=9223372036854775807L;
3216 return data;
3217 }
3218 public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
3219 private static final long[] mk_tokenSet_1() {
3220 long[] data = new long[2048];
3221 data[0]=-4398046520328L;
3222 for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3223 return data;
3224 }
3225 public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
3226 private static final long[] mk_tokenSet_2() {
3227 long[] data = new long[2048];
3228 data[0]=-9224L;
3229 for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3230 return data;
3231 }
3232 public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
3233 private static final long[] mk_tokenSet_3() {
3234 long[] data = new long[2048];
3235 data[0]=-549755813896L;
3236 for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3237 return data;
3238 }
3239 public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
3240 private static final long[] mk_tokenSet_4() {
3241 long[] data = new long[2048];
3242 data[0]=-635655169032L;
3243 data[1]=-268435457L;
3244 for (int i = 2; i<=1023; i++) { data[i]=-1L; }
3245 return data;
3246 }
3247 public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4());
3248 private static final long[] mk_tokenSet_5() {
3249 long[] data = new long[2048];
3250 data[0]=-17179869192L;
3251 for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3252 return data;
3253 }
3254 public static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5());
3255 private static final long[] mk_tokenSet_6() {
3256 long[] data = new long[2048];
3257 data[0]=-145135534875656L;
3258 for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3259 return data;
3260 }
3261 public static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6());
3262 private static final long[] mk_tokenSet_7() {
3263 long[] data = new long[2048];
3264 data[0]=-145204254352392L;
3265 for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3266 return data;
3267 }
3268 public static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7());
3269 private static final long[] mk_tokenSet_8() {
3270 long[] data = new long[2048];
3271 data[0]=-145204254352392L;
3272 data[1]=-268435457L;
3273 for (int i = 2; i<=1023; i++) { data[i]=-1L; }
3274 return data;
3275 }
3276 public static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8());
3277 private static final long[] mk_tokenSet_9() {
3278 long[] data = new long[1025];
3279 data[0]=287948901175001088L;
3280 data[1]=541165879422L;
3281 return data;
3282 }
3283 public static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9());
3284 private static final long[] mk_tokenSet_10() {
3285 long[] data = new long[2048];
3286 data[0]=-70368744177672L;
3287 for (int i = 1; i<=1023; i++) { data[i]=-1L; }
3288 return data;
3289 }
3290 public static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10());
3291
3292 }