1 // $ANTLR 2.7.2: "java.g" -> "JavaLexer.java"$
2 /* FOREGEJ - FOrmatting REfactoring GEnerating Java
3 *
4 * Copyright (C) 2003 Andreas Arrgard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 package com.octagroup.foregej.java.lang;
21 import java.io.InputStream;
22 import antlr.TokenStreamException;
23 import antlr.TokenStreamIOException;
24 import antlr.TokenStreamRecognitionException;
25 import antlr.CharStreamException;
26 import antlr.CharStreamIOException;
27 import java.io.Reader;
28 import java.util.Hashtable;
29 import antlr.InputBuffer;
30 import antlr.ByteBuffer;
31 import antlr.CharBuffer;
32 import antlr.Token;
33 import antlr.RecognitionException;
34 import antlr.NoViableAltForCharException;
35 import antlr.TokenStream;
36 import antlr.ANTLRHashString;
37 import antlr.LexerSharedInputState;
38 import antlr.collections.impl.BitSet;
39 public class JavaLexer extends JavaLexerBase implements JavaTokenTypes,
40 TokenStream
41 {
42 public JavaLexer(InputStream in)
43 {
44 this(new ByteBuffer(in));
45 }
46 public JavaLexer(Reader in)
47 {
48 this(new CharBuffer(in));
49 }
50 public JavaLexer(InputBuffer ib)
51 {
52 this(new LexerSharedInputState(ib));
53 }
54 public JavaLexer(LexerSharedInputState state)
55 {
56 super(state);
57 caseSensitiveLiterals=true;
58 setCaseSensitive(true);
59 literals=new Hashtable();
60 literals.put(new ANTLRHashString("byte", this), new Integer(69));
61 literals.put(new ANTLRHashString("public", this), new Integer(80));
62 literals.put(new ANTLRHashString("case", this), new Integer(112));
63 literals.put(new ANTLRHashString("short", this), new Integer(71));
64 literals.put(new ANTLRHashString("break", this), new Integer(107));
65 literals.put(new ANTLRHashString("while", this), new Integer(105));
66 literals.put(new ANTLRHashString("new", this), new Integer(155));
67 literals.put(new ANTLRHashString("instanceof", this),
68 new Integer(140));
69 literals.put(new ANTLRHashString("implements", this),
70 new Integer(94));
71 literals.put(new ANTLRHashString("synchronized", this),
72 new Integer(86));
73 literals.put(new ANTLRHashString("float", this), new Integer(73));
74 literals.put(new ANTLRHashString("package", this),
75 new Integer(62));
76 literals.put(new ANTLRHashString("return", this),
77 new Integer(109));
78 literals.put(new ANTLRHashString("throw", this), new Integer(111));
79 literals.put(new ANTLRHashString("null", this), new Integer(154));
80 literals.put(new ANTLRHashString("threadsafe", this),
81 new Integer(85));
82 literals.put(new ANTLRHashString("protected", this),
83 new Integer(81));
84 literals.put(new ANTLRHashString("class", this), new Integer(88));
85 literals.put(new ANTLRHashString("throws", this),
86 new Integer(100));
87 literals.put(new ANTLRHashString("do", this), new Integer(106));
88 literals.put(new ANTLRHashString("strictfp", this),
89 new Integer(41));
90 literals.put(new ANTLRHashString("super", this), new Integer(98));
91 literals.put(new ANTLRHashString("transient", this),
92 new Integer(83));
93 literals.put(new ANTLRHashString("native", this), new Integer(84));
94 literals.put(new ANTLRHashString("interface", this),
95 new Integer(90));
96 literals.put(new ANTLRHashString("final", this), new Integer(39));
97 literals.put(new ANTLRHashString("if", this), new Integer(102));
98 literals.put(new ANTLRHashString("double", this), new Integer(75));
99 literals.put(new ANTLRHashString("volatile", this),
100 new Integer(87));
101 literals.put(new ANTLRHashString("catch", this), new Integer(116));
102 literals.put(new ANTLRHashString("try", this), new Integer(114));
103 literals.put(new ANTLRHashString("int", this), new Integer(72));
104 literals.put(new ANTLRHashString("for", this), new Integer(104));
105 literals.put(new ANTLRHashString("extends", this),
106 new Integer(89));
107 literals.put(new ANTLRHashString("boolean", this),
108 new Integer(68));
109 literals.put(new ANTLRHashString("char", this), new Integer(70));
110 literals.put(new ANTLRHashString("private", this),
111 new Integer(79));
112 literals.put(new ANTLRHashString("default", this),
113 new Integer(113));
114 literals.put(new ANTLRHashString("false", this), new Integer(153));
115 literals.put(new ANTLRHashString("this", this), new Integer(97));
116 literals.put(new ANTLRHashString("static", this), new Integer(82));
117 literals.put(new ANTLRHashString("abstract", this),
118 new Integer(40));
119 literals.put(new ANTLRHashString("continue", this),
120 new Integer(108));
121 literals.put(new ANTLRHashString("finally", this),
122 new Integer(115));
123 literals.put(new ANTLRHashString("else", this), new Integer(103));
124 literals.put(new ANTLRHashString("import", this), new Integer(64));
125 literals.put(new ANTLRHashString("void", this), new Integer(67));
126 literals.put(new ANTLRHashString("switch", this),
127 new Integer(110));
128 literals.put(new ANTLRHashString("true", this), new Integer(152));
129 literals.put(new ANTLRHashString("long", this), new Integer(74));
130 }
131 /***
132 * @return
133 */
134 public Token nextToken() throws TokenStreamException
135 {
136 Token theRetToken=null;
137 tryAgain:
138
139 for(; ; ){
140 Token _token=null;
141 int _ttype=Token.INVALID_TYPE;
142 resetText();
143 try{
144 // for char stream error handling
145 try{
146 // for lexical error handling
147 switch(LA(1)) {
148 case '?':
149
150 {
151 mQUESTION(true);
152 theRetToken=_returnToken;
153 break;
154 }
155 case '(':
156
157 {
158 mLPAREN(true);
159 theRetToken=_returnToken;
160 break;
161 }
162 case ')':
163
164 {
165 mRPAREN(true);
166 theRetToken=_returnToken;
167 break;
168 }
169 case '[':
170
171 {
172 mLBRACK(true);
173 theRetToken=_returnToken;
174 break;
175 }
176 case ']':
177
178 {
179 mRBRACK(true);
180 theRetToken=_returnToken;
181 break;
182 }
183 case '{':
184
185 {
186 mLCURLY(true);
187 theRetToken=_returnToken;
188 break;
189 }
190 case '}':
191
192 {
193 mRCURLY(true);
194 theRetToken=_returnToken;
195 break;
196 }
197 case ':':
198
199 {
200 mCOLON(true);
201 theRetToken=_returnToken;
202 break;
203 }
204 case ',':
205
206 {
207 mCOMMA(true);
208 theRetToken=_returnToken;
209 break;
210 }
211 case '~':
212
213 {
214 mBNOT(true);
215 theRetToken=_returnToken;
216 break;
217 }
218 case ';':
219
220 {
221 mSEMI(true);
222 theRetToken=_returnToken;
223 break;
224 }
225 case '\t':
226 case '\n':
227 case '\u000c':
228 case '\r':
229 case ' ':
230
231 {
232 mWS(true);
233 theRetToken=_returnToken;
234 break;
235 }
236 case '\'':
237
238 {
239 mCHAR_LITERAL(true);
240 theRetToken=_returnToken;
241 break;
242 }
243 case '"':
244
245 {
246 mSTRING_LITERAL(true);
247 theRetToken=_returnToken;
248 break;
249 }
250 case '$':
251 case 'A':
252 case 'B':
253 case 'C':
254 case 'D':
255 case 'E':
256 case 'F':
257 case 'G':
258 case 'H':
259 case 'I':
260 case 'J':
261 case 'K':
262 case 'L':
263 case 'M':
264 case 'N':
265 case 'O':
266 case 'P':
267 case 'Q':
268 case 'R':
269 case 'S':
270 case 'T':
271 case 'U':
272 case 'V':
273 case 'W':
274 case 'X':
275 case 'Y':
276 case 'Z':
277 case '_':
278 case 'a':
279 case 'b':
280 case 'c':
281 case 'd':
282 case 'e':
283 case 'f':
284 case 'g':
285 case 'h':
286 case 'i':
287 case 'j':
288 case 'k':
289 case 'l':
290 case 'm':
291 case 'n':
292 case 'o':
293 case 'p':
294 case 'q':
295 case 'r':
296 case 's':
297 case 't':
298 case 'u':
299 case 'v':
300 case 'w':
301 case 'x':
302 case 'y':
303 case 'z':
304
305 {
306 mIDENT(true);
307 theRetToken=_returnToken;
308 break;
309 }
310 case '.':
311 case '0':
312 case '1':
313 case '2':
314 case '3':
315 case '4':
316 case '5':
317 case '6':
318 case '7':
319 case '8':
320 case '9':
321
322 {
323 mNUM_INT(true);
324 theRetToken=_returnToken;
325 break;
326 }
327 default:
328
329 if(LA(1)=='>'&&LA(2)=='>'&&LA(3)=='>'&&
330 LA(4)=='=') {
331 mBSR_ASSIGN(true);
332 theRetToken=_returnToken;
333 } else if(LA(1)=='>'&&LA(2)=='>'&&LA(3)=='=') {
334 mSR_ASSIGN(true);
335 theRetToken=_returnToken;
336 } else if(LA(1)=='>'&&LA(2)=='>'&&
337 LA(3)=='>'&&true) {
338 mBSR(true);
339 theRetToken=_returnToken;
340 } else if(LA(1)=='<'&&LA(2)=='<'&&LA(3)=='=') {
341 mSL_ASSIGN(true);
342 theRetToken=_returnToken;
343 } else if(LA(1)=='='&&LA(2)=='=') {
344 mEQUAL(true);
345 theRetToken=_returnToken;
346 } else if(LA(1)=='!'&&LA(2)=='=') {
347 mNOT_EQUAL(true);
348 theRetToken=_returnToken;
349 } else if(LA(1)=='/'&&LA(2)=='=') {
350 mDIV_ASSIGN(true);
351 theRetToken=_returnToken;
352 } else if(LA(1)=='+'&&LA(2)=='=') {
353 mPLUS_ASSIGN(true);
354 theRetToken=_returnToken;
355 } else if(LA(1)=='+'&&LA(2)=='+') {
356 mINC(true);
357 theRetToken=_returnToken;
358 } else if(LA(1)=='-'&&LA(2)=='=') {
359 mMINUS_ASSIGN(true);
360 theRetToken=_returnToken;
361 } else if(LA(1)=='-'&&LA(2)=='-') {
362 mDEC(true);
363 theRetToken=_returnToken;
364 } else if(LA(1)=='*'&&LA(2)=='=') {
365 mSTAR_ASSIGN(true);
366 theRetToken=_returnToken;
367 } else if(LA(1)=='%'&&LA(2)=='=') {
368 mMOD_ASSIGN(true);
369 theRetToken=_returnToken;
370 } else if(LA(1)=='>'&&LA(2)=='>'&&true) {
371 mSR(true);
372 theRetToken=_returnToken;
373 } else if(LA(1)=='>'&&LA(2)=='=') {
374 mGE(true);
375 theRetToken=_returnToken;
376 } else if(LA(1)=='<'&&LA(2)=='<'&&true) {
377 mSL(true);
378 theRetToken=_returnToken;
379 } else if(LA(1)=='<'&&LA(2)=='=') {
380 mLE(true);
381 theRetToken=_returnToken;
382 } else if(LA(1)=='^'&&LA(2)=='=') {
383 mBXOR_ASSIGN(true);
384 theRetToken=_returnToken;
385 } else if(LA(1)=='|'&&LA(2)=='=') {
386 mBOR_ASSIGN(true);
387 theRetToken=_returnToken;
388 } else if(LA(1)=='|'&&LA(2)=='|') {
389 mLOR(true);
390 theRetToken=_returnToken;
391 } else if(LA(1)=='&'&&LA(2)=='=') {
392 mBAND_ASSIGN(true);
393 theRetToken=_returnToken;
394 } else if(LA(1)=='&'&&LA(2)=='&') {
395 mLAND(true);
396 theRetToken=_returnToken;
397 } else if(LA(1)=='/'&&LA(2)=='/') {
398 mSL_COMMENT(true);
399 theRetToken=_returnToken;
400 } else if(LA(1)=='/'&&LA(2)=='*') {
401 mML_COMMENT(true);
402 theRetToken=_returnToken;
403 } else if(LA(1)=='='&&true) {
404 mASSIGN(true);
405 theRetToken=_returnToken;
406 } else if(LA(1)=='!'&&true) {
407 mLNOT(true);
408 theRetToken=_returnToken;
409 } else if(LA(1)=='/'&&true) {
410 mDIV(true);
411 theRetToken=_returnToken;
412 } else if(LA(1)=='+'&&true) {
413 mPLUS(true);
414 theRetToken=_returnToken;
415 } else if(LA(1)=='-'&&true) {
416 mMINUS(true);
417 theRetToken=_returnToken;
418 } else if(LA(1)=='*'&&true) {
419 mSTAR(true);
420 theRetToken=_returnToken;
421 } else if(LA(1)=='%'&&true) {
422 mMOD(true);
423 theRetToken=_returnToken;
424 } else if(LA(1)=='>'&&true) {
425 mGT(true);
426 theRetToken=_returnToken;
427 } else if(LA(1)=='<'&&true) {
428 mLT(true);
429 theRetToken=_returnToken;
430 } else if(LA(1)=='^'&&true) {
431 mBXOR(true);
432 theRetToken=_returnToken;
433 } else if(LA(1)=='|'&&true) {
434 mBOR(true);
435 theRetToken=_returnToken;
436 } else if(LA(1)=='&'&&true) {
437 mBAND(true);
438 theRetToken=_returnToken;
439 } else {
440 if(LA(1)==EOF_CHAR) {
441 uponEOF();
442 _returnToken=makeToken(Token.EOF_TYPE);
443 } else {
444 throw new NoViableAltForCharException((char)LA(1),
445 getFilename(), getLine(), getColumn());
446 }
447 }
448 }
449 if(_returnToken==null) continue tryAgain;
450 // found SKIP token
451 _ttype=_returnToken.getType();
452 _returnToken.setType(_ttype);
453 return _returnToken;
454 }catch (RecognitionException e) {
455 throw new TokenStreamRecognitionException(e);
456 }
457 }catch (CharStreamException cse) {
458 if(cse instanceof CharStreamIOException) {
459 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
460 } else {
461 throw new TokenStreamException(cse.getMessage());
462 }
463 }
464 }
465
466 }
467 /***
468 * @param _createToken
469 */
470 public final void mQUESTION(boolean _createToken) throws RecognitionException,
471 CharStreamException, TokenStreamException
472 {
473 int _ttype;
474 Token _token=null;
475 int _begin=text.length();
476 _ttype=QUESTION;
477 int _saveIndex;
478 match('?');
479 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
480 _token=makeToken(_ttype);
481 _token.setText(new String(text.getBuffer(), _begin,
482 text.length()-_begin));
483 }
484 _returnToken=_token;
485 }
486 /***
487 * @param _createToken
488 */
489 public final void mLPAREN(boolean _createToken) throws RecognitionException,
490 CharStreamException, TokenStreamException
491 {
492 int _ttype;
493 Token _token=null;
494 int _begin=text.length();
495 _ttype=LPAREN;
496 int _saveIndex;
497 match('(');
498 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
499 _token=makeToken(_ttype);
500 _token.setText(new String(text.getBuffer(), _begin,
501 text.length()-_begin));
502 }
503 _returnToken=_token;
504 }
505 /***
506 * @param _createToken
507 */
508 public final void mRPAREN(boolean _createToken) throws RecognitionException,
509 CharStreamException, TokenStreamException
510 {
511 int _ttype;
512 Token _token=null;
513 int _begin=text.length();
514 _ttype=RPAREN;
515 int _saveIndex;
516 match(')');
517 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
518 _token=makeToken(_ttype);
519 _token.setText(new String(text.getBuffer(), _begin,
520 text.length()-_begin));
521 }
522 _returnToken=_token;
523 }
524 /***
525 * @param _createToken
526 */
527 public final void mLBRACK(boolean _createToken) throws RecognitionException,
528 CharStreamException, TokenStreamException
529 {
530 int _ttype;
531 Token _token=null;
532 int _begin=text.length();
533 _ttype=LBRACK;
534 int _saveIndex;
535 match('[');
536 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
537 _token=makeToken(_ttype);
538 _token.setText(new String(text.getBuffer(), _begin,
539 text.length()-_begin));
540 }
541 _returnToken=_token;
542 }
543 /***
544 * @param _createToken
545 */
546 public final void mRBRACK(boolean _createToken) throws RecognitionException,
547 CharStreamException, TokenStreamException
548 {
549 int _ttype;
550 Token _token=null;
551 int _begin=text.length();
552 _ttype=RBRACK;
553 int _saveIndex;
554 match(']');
555 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
556 _token=makeToken(_ttype);
557 _token.setText(new String(text.getBuffer(), _begin,
558 text.length()-_begin));
559 }
560 _returnToken=_token;
561 }
562 /***
563 * @param _createToken
564 */
565 public final void mLCURLY(boolean _createToken) throws RecognitionException,
566 CharStreamException, TokenStreamException
567 {
568 int _ttype;
569 Token _token=null;
570 int _begin=text.length();
571 _ttype=LCURLY;
572 int _saveIndex;
573 match('{');
574 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
575 _token=makeToken(_ttype);
576 _token.setText(new String(text.getBuffer(), _begin,
577 text.length()-_begin));
578 }
579 _returnToken=_token;
580 }
581 /***
582 * @param _createToken
583 */
584 public final void mRCURLY(boolean _createToken) throws RecognitionException,
585 CharStreamException, TokenStreamException
586 {
587 int _ttype;
588 Token _token=null;
589 int _begin=text.length();
590 _ttype=RCURLY;
591 int _saveIndex;
592 match('}');
593 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
594 _token=makeToken(_ttype);
595 _token.setText(new String(text.getBuffer(), _begin,
596 text.length()-_begin));
597 }
598 _returnToken=_token;
599 }
600 /***
601 * @param _createToken
602 */
603 public final void mCOLON(boolean _createToken) throws RecognitionException,
604 CharStreamException, TokenStreamException
605 {
606 int _ttype;
607 Token _token=null;
608 int _begin=text.length();
609 _ttype=COLON;
610 int _saveIndex;
611 match(':');
612 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
613 _token=makeToken(_ttype);
614 _token.setText(new String(text.getBuffer(), _begin,
615 text.length()-_begin));
616 }
617 _returnToken=_token;
618 }
619 /***
620 * @param _createToken
621 */
622 public final void mCOMMA(boolean _createToken) throws RecognitionException,
623 CharStreamException, TokenStreamException
624 {
625 int _ttype;
626 Token _token=null;
627 int _begin=text.length();
628 _ttype=COMMA;
629 int _saveIndex;
630 match(',');
631 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
632 _token=makeToken(_ttype);
633 _token.setText(new String(text.getBuffer(), _begin,
634 text.length()-_begin));
635 }
636 _returnToken=_token;
637 }
638 /***
639 * @param _createToken
640 */
641 public final void mASSIGN(boolean _createToken) throws RecognitionException,
642 CharStreamException, TokenStreamException
643 {
644 int _ttype;
645 Token _token=null;
646 int _begin=text.length();
647 _ttype=ASSIGN;
648 int _saveIndex;
649 match('=');
650 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
651 _token=makeToken(_ttype);
652 _token.setText(new String(text.getBuffer(), _begin,
653 text.length()-_begin));
654 }
655 _returnToken=_token;
656 }
657 /***
658 * @param _createToken
659 */
660 public final void mEQUAL(boolean _createToken) throws RecognitionException,
661 CharStreamException, TokenStreamException
662 {
663 int _ttype;
664 Token _token=null;
665 int _begin=text.length();
666 _ttype=EQUAL;
667 int _saveIndex;
668 match("==");
669 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
670 _token=makeToken(_ttype);
671 _token.setText(new String(text.getBuffer(), _begin,
672 text.length()-_begin));
673 }
674 _returnToken=_token;
675 }
676 /***
677 * @param _createToken
678 */
679 public final void mLNOT(boolean _createToken) throws RecognitionException,
680 CharStreamException, TokenStreamException
681 {
682 int _ttype;
683 Token _token=null;
684 int _begin=text.length();
685 _ttype=LNOT;
686 int _saveIndex;
687 match('!');
688 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
689 _token=makeToken(_ttype);
690 _token.setText(new String(text.getBuffer(), _begin,
691 text.length()-_begin));
692 }
693 _returnToken=_token;
694 }
695 /***
696 * @param _createToken
697 */
698 public final void mBNOT(boolean _createToken) throws RecognitionException,
699 CharStreamException, TokenStreamException
700 {
701 int _ttype;
702 Token _token=null;
703 int _begin=text.length();
704 _ttype=BNOT;
705 int _saveIndex;
706 match('~');
707 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
708 _token=makeToken(_ttype);
709 _token.setText(new String(text.getBuffer(), _begin,
710 text.length()-_begin));
711 }
712 _returnToken=_token;
713 }
714 /***
715 * @param _createToken
716 */
717 public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException,
718 CharStreamException, TokenStreamException
719 {
720 int _ttype;
721 Token _token=null;
722 int _begin=text.length();
723 _ttype=NOT_EQUAL;
724 int _saveIndex;
725 match("!=");
726 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
727 _token=makeToken(_ttype);
728 _token.setText(new String(text.getBuffer(), _begin,
729 text.length()-_begin));
730 }
731 _returnToken=_token;
732 }
733 /***
734 * @param _createToken
735 */
736 public final void mDIV(boolean _createToken) throws RecognitionException,
737 CharStreamException, TokenStreamException
738 {
739 int _ttype;
740 Token _token=null;
741 int _begin=text.length();
742 _ttype=DIV;
743 int _saveIndex;
744 match('/');
745 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
746 _token=makeToken(_ttype);
747 _token.setText(new String(text.getBuffer(), _begin,
748 text.length()-_begin));
749 }
750 _returnToken=_token;
751 }
752 /***
753 * @param _createToken
754 */
755 public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException,
756 CharStreamException, TokenStreamException
757 {
758 int _ttype;
759 Token _token=null;
760 int _begin=text.length();
761 _ttype=DIV_ASSIGN;
762 int _saveIndex;
763 match("/=");
764 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
765 _token=makeToken(_ttype);
766 _token.setText(new String(text.getBuffer(), _begin,
767 text.length()-_begin));
768 }
769 _returnToken=_token;
770 }
771 /***
772 * @param _createToken
773 */
774 public final void mPLUS(boolean _createToken) throws RecognitionException,
775 CharStreamException, TokenStreamException
776 {
777 int _ttype;
778 Token _token=null;
779 int _begin=text.length();
780 _ttype=PLUS;
781 int _saveIndex;
782 match('+');
783 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
784 _token=makeToken(_ttype);
785 _token.setText(new String(text.getBuffer(), _begin,
786 text.length()-_begin));
787 }
788 _returnToken=_token;
789 }
790 /***
791 * @param _createToken
792 */
793 public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException,
794 CharStreamException, TokenStreamException
795 {
796 int _ttype;
797 Token _token=null;
798 int _begin=text.length();
799 _ttype=PLUS_ASSIGN;
800 int _saveIndex;
801 match("+=");
802 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
803 _token=makeToken(_ttype);
804 _token.setText(new String(text.getBuffer(), _begin,
805 text.length()-_begin));
806 }
807 _returnToken=_token;
808 }
809 /***
810 * @param _createToken
811 */
812 public final void mINC(boolean _createToken) throws RecognitionException,
813 CharStreamException, TokenStreamException
814 {
815 int _ttype;
816 Token _token=null;
817 int _begin=text.length();
818 _ttype=INC;
819 int _saveIndex;
820 match("++");
821 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
822 _token=makeToken(_ttype);
823 _token.setText(new String(text.getBuffer(), _begin,
824 text.length()-_begin));
825 }
826 _returnToken=_token;
827 }
828 /***
829 * @param _createToken
830 */
831 public final void mMINUS(boolean _createToken) throws RecognitionException,
832 CharStreamException, TokenStreamException
833 {
834 int _ttype;
835 Token _token=null;
836 int _begin=text.length();
837 _ttype=MINUS;
838 int _saveIndex;
839 match('-');
840 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
841 _token=makeToken(_ttype);
842 _token.setText(new String(text.getBuffer(), _begin,
843 text.length()-_begin));
844 }
845 _returnToken=_token;
846 }
847 /***
848 * @param _createToken
849 */
850 public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException,
851 CharStreamException, TokenStreamException
852 {
853 int _ttype;
854 Token _token=null;
855 int _begin=text.length();
856 _ttype=MINUS_ASSIGN;
857 int _saveIndex;
858 match("-=");
859 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
860 _token=makeToken(_ttype);
861 _token.setText(new String(text.getBuffer(), _begin,
862 text.length()-_begin));
863 }
864 _returnToken=_token;
865 }
866 /***
867 * @param _createToken
868 */
869 public final void mDEC(boolean _createToken) throws RecognitionException,
870 CharStreamException, TokenStreamException
871 {
872 int _ttype;
873 Token _token=null;
874 int _begin=text.length();
875 _ttype=DEC;
876 int _saveIndex;
877 match("--");
878 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
879 _token=makeToken(_ttype);
880 _token.setText(new String(text.getBuffer(), _begin,
881 text.length()-_begin));
882 }
883 _returnToken=_token;
884 }
885 /***
886 * @param _createToken
887 */
888 public final void mSTAR(boolean _createToken) throws RecognitionException,
889 CharStreamException, TokenStreamException
890 {
891 int _ttype;
892 Token _token=null;
893 int _begin=text.length();
894 _ttype=STAR;
895 int _saveIndex;
896 match('*');
897 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
898 _token=makeToken(_ttype);
899 _token.setText(new String(text.getBuffer(), _begin,
900 text.length()-_begin));
901 }
902 _returnToken=_token;
903 }
904 /***
905 * @param _createToken
906 */
907 public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException,
908 CharStreamException, TokenStreamException
909 {
910 int _ttype;
911 Token _token=null;
912 int _begin=text.length();
913 _ttype=STAR_ASSIGN;
914 int _saveIndex;
915 match("*=");
916 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
917 _token=makeToken(_ttype);
918 _token.setText(new String(text.getBuffer(), _begin,
919 text.length()-_begin));
920 }
921 _returnToken=_token;
922 }
923 /***
924 * @param _createToken
925 */
926 public final void mMOD(boolean _createToken) throws RecognitionException,
927 CharStreamException, TokenStreamException
928 {
929 int _ttype;
930 Token _token=null;
931 int _begin=text.length();
932 _ttype=MOD;
933 int _saveIndex;
934 match('%');
935 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
936 _token=makeToken(_ttype);
937 _token.setText(new String(text.getBuffer(), _begin,
938 text.length()-_begin));
939 }
940 _returnToken=_token;
941 }
942 /***
943 * @param _createToken
944 */
945 public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException,
946 CharStreamException, TokenStreamException
947 {
948 int _ttype;
949 Token _token=null;
950 int _begin=text.length();
951 _ttype=MOD_ASSIGN;
952 int _saveIndex;
953 match("%=");
954 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
955 _token=makeToken(_ttype);
956 _token.setText(new String(text.getBuffer(), _begin,
957 text.length()-_begin));
958 }
959 _returnToken=_token;
960 }
961 /***
962 * @param _createToken
963 */
964 public final void mSR(boolean _createToken) throws RecognitionException,
965 CharStreamException, TokenStreamException
966 {
967 int _ttype;
968 Token _token=null;
969 int _begin=text.length();
970 _ttype=SR;
971 int _saveIndex;
972 match(">>");
973 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
974 _token=makeToken(_ttype);
975 _token.setText(new String(text.getBuffer(), _begin,
976 text.length()-_begin));
977 }
978 _returnToken=_token;
979 }
980 /***
981 * @param _createToken
982 */
983 public final void mSR_ASSIGN(boolean _createToken) throws RecognitionException,
984 CharStreamException, TokenStreamException
985 {
986 int _ttype;
987 Token _token=null;
988 int _begin=text.length();
989 _ttype=SR_ASSIGN;
990 int _saveIndex;
991 match(">>=");
992 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
993 _token=makeToken(_ttype);
994 _token.setText(new String(text.getBuffer(), _begin,
995 text.length()-_begin));
996 }
997 _returnToken=_token;
998 }
999 /***
1000 * @param _createToken
1001 */
1002 public final void mBSR(boolean _createToken) throws RecognitionException,
1003 CharStreamException, TokenStreamException
1004 {
1005 int _ttype;
1006 Token _token=null;
1007 int _begin=text.length();
1008 _ttype=BSR;
1009 int _saveIndex;
1010 match(">>>");
1011 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1012 _token=makeToken(_ttype);
1013 _token.setText(new String(text.getBuffer(), _begin,
1014 text.length()-_begin));
1015 }
1016 _returnToken=_token;
1017 }
1018 /***
1019 * @param _createToken
1020 */
1021 public final void mBSR_ASSIGN(boolean _createToken) throws RecognitionException,
1022 CharStreamException, TokenStreamException
1023 {
1024 int _ttype;
1025 Token _token=null;
1026 int _begin=text.length();
1027 _ttype=BSR_ASSIGN;
1028 int _saveIndex;
1029 match(">>>=");
1030 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1031 _token=makeToken(_ttype);
1032 _token.setText(new String(text.getBuffer(), _begin,
1033 text.length()-_begin));
1034 }
1035 _returnToken=_token;
1036 }
1037 /***
1038 * @param _createToken
1039 */
1040 public final void mGE(boolean _createToken) throws RecognitionException,
1041 CharStreamException, TokenStreamException
1042 {
1043 int _ttype;
1044 Token _token=null;
1045 int _begin=text.length();
1046 _ttype=GE;
1047 int _saveIndex;
1048 match(">=");
1049 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1050 _token=makeToken(_ttype);
1051 _token.setText(new String(text.getBuffer(), _begin,
1052 text.length()-_begin));
1053 }
1054 _returnToken=_token;
1055 }
1056 /***
1057 * @param _createToken
1058 */
1059 public final void mGT(boolean _createToken) throws RecognitionException,
1060 CharStreamException, TokenStreamException
1061 {
1062 int _ttype;
1063 Token _token=null;
1064 int _begin=text.length();
1065 _ttype=GT;
1066 int _saveIndex;
1067 match(">");
1068 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1069 _token=makeToken(_ttype);
1070 _token.setText(new String(text.getBuffer(), _begin,
1071 text.length()-_begin));
1072 }
1073 _returnToken=_token;
1074 }
1075 /***
1076 * @param _createToken
1077 */
1078 public final void mSL(boolean _createToken) throws RecognitionException,
1079 CharStreamException, TokenStreamException
1080 {
1081 int _ttype;
1082 Token _token=null;
1083 int _begin=text.length();
1084 _ttype=SL;
1085 int _saveIndex;
1086 match("<<");
1087 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1088 _token=makeToken(_ttype);
1089 _token.setText(new String(text.getBuffer(), _begin,
1090 text.length()-_begin));
1091 }
1092 _returnToken=_token;
1093 }
1094 /***
1095 * @param _createToken
1096 */
1097 public final void mSL_ASSIGN(boolean _createToken) throws RecognitionException,
1098 CharStreamException, TokenStreamException
1099 {
1100 int _ttype;
1101 Token _token=null;
1102 int _begin=text.length();
1103 _ttype=SL_ASSIGN;
1104 int _saveIndex;
1105 match("<<=");
1106 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1107 _token=makeToken(_ttype);
1108 _token.setText(new String(text.getBuffer(), _begin,
1109 text.length()-_begin));
1110 }
1111 _returnToken=_token;
1112 }
1113 /***
1114 * @param _createToken
1115 */
1116 public final void mLE(boolean _createToken) throws RecognitionException,
1117 CharStreamException, TokenStreamException
1118 {
1119 int _ttype;
1120 Token _token=null;
1121 int _begin=text.length();
1122 _ttype=LE;
1123 int _saveIndex;
1124 match("<=");
1125 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1126 _token=makeToken(_ttype);
1127 _token.setText(new String(text.getBuffer(), _begin,
1128 text.length()-_begin));
1129 }
1130 _returnToken=_token;
1131 }
1132 /***
1133 * @param _createToken
1134 */
1135 public final void mLT(boolean _createToken) throws RecognitionException,
1136 CharStreamException, TokenStreamException
1137 {
1138 int _ttype;
1139 Token _token=null;
1140 int _begin=text.length();
1141 _ttype=LT;
1142 int _saveIndex;
1143 match('<');
1144 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1145 _token=makeToken(_ttype);
1146 _token.setText(new String(text.getBuffer(), _begin,
1147 text.length()-_begin));
1148 }
1149 _returnToken=_token;
1150 }
1151 /***
1152 * @param _createToken
1153 */
1154 public final void mBXOR(boolean _createToken) throws RecognitionException,
1155 CharStreamException, TokenStreamException
1156 {
1157 int _ttype;
1158 Token _token=null;
1159 int _begin=text.length();
1160 _ttype=BXOR;
1161 int _saveIndex;
1162 match('^');
1163 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1164 _token=makeToken(_ttype);
1165 _token.setText(new String(text.getBuffer(), _begin,
1166 text.length()-_begin));
1167 }
1168 _returnToken=_token;
1169 }
1170 /***
1171 * @param _createToken
1172 */
1173 public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException,
1174 CharStreamException, TokenStreamException
1175 {
1176 int _ttype;
1177 Token _token=null;
1178 int _begin=text.length();
1179 _ttype=BXOR_ASSIGN;
1180 int _saveIndex;
1181 match("^=");
1182 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1183 _token=makeToken(_ttype);
1184 _token.setText(new String(text.getBuffer(), _begin,
1185 text.length()-_begin));
1186 }
1187 _returnToken=_token;
1188 }
1189 /***
1190 * @param _createToken
1191 */
1192 public final void mBOR(boolean _createToken) throws RecognitionException,
1193 CharStreamException, TokenStreamException
1194 {
1195 int _ttype;
1196 Token _token=null;
1197 int _begin=text.length();
1198 _ttype=BOR;
1199 int _saveIndex;
1200 match('|');
1201 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1202 _token=makeToken(_ttype);
1203 _token.setText(new String(text.getBuffer(), _begin,
1204 text.length()-_begin));
1205 }
1206 _returnToken=_token;
1207 }
1208 /***
1209 * @param _createToken
1210 */
1211 public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException,
1212 CharStreamException, TokenStreamException
1213 {
1214 int _ttype;
1215 Token _token=null;
1216 int _begin=text.length();
1217 _ttype=BOR_ASSIGN;
1218 int _saveIndex;
1219 match("|=");
1220 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1221 _token=makeToken(_ttype);
1222 _token.setText(new String(text.getBuffer(), _begin,
1223 text.length()-_begin));
1224 }
1225 _returnToken=_token;
1226 }
1227 /***
1228 * @param _createToken
1229 */
1230 public final void mLOR(boolean _createToken) throws RecognitionException,
1231 CharStreamException, TokenStreamException
1232 {
1233 int _ttype;
1234 Token _token=null;
1235 int _begin=text.length();
1236 _ttype=LOR;
1237 int _saveIndex;
1238 match("||");
1239 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1240 _token=makeToken(_ttype);
1241 _token.setText(new String(text.getBuffer(), _begin,
1242 text.length()-_begin));
1243 }
1244 _returnToken=_token;
1245 }
1246 /***
1247 * @param _createToken
1248 */
1249 public final void mBAND(boolean _createToken) throws RecognitionException,
1250 CharStreamException, TokenStreamException
1251 {
1252 int _ttype;
1253 Token _token=null;
1254 int _begin=text.length();
1255 _ttype=BAND;
1256 int _saveIndex;
1257 match('&');
1258 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1259 _token=makeToken(_ttype);
1260 _token.setText(new String(text.getBuffer(), _begin,
1261 text.length()-_begin));
1262 }
1263 _returnToken=_token;
1264 }
1265 /***
1266 * @param _createToken
1267 */
1268 public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException,
1269 CharStreamException, TokenStreamException
1270 {
1271 int _ttype;
1272 Token _token=null;
1273 int _begin=text.length();
1274 _ttype=BAND_ASSIGN;
1275 int _saveIndex;
1276 match("&=");
1277 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1278 _token=makeToken(_ttype);
1279 _token.setText(new String(text.getBuffer(), _begin,
1280 text.length()-_begin));
1281 }
1282 _returnToken=_token;
1283 }
1284 /***
1285 * @param _createToken
1286 */
1287 public final void mLAND(boolean _createToken) throws RecognitionException,
1288 CharStreamException, TokenStreamException
1289 {
1290 int _ttype;
1291 Token _token=null;
1292 int _begin=text.length();
1293 _ttype=LAND;
1294 int _saveIndex;
1295 match("&&");
1296 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1297 _token=makeToken(_ttype);
1298 _token.setText(new String(text.getBuffer(), _begin,
1299 text.length()-_begin));
1300 }
1301 _returnToken=_token;
1302 }
1303 /***
1304 * @param _createToken
1305 */
1306 public final void mSEMI(boolean _createToken) throws RecognitionException,
1307 CharStreamException, TokenStreamException
1308 {
1309 int _ttype;
1310 Token _token=null;
1311 int _begin=text.length();
1312 _ttype=SEMI;
1313 int _saveIndex;
1314 match(';');
1315 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1316 _token=makeToken(_ttype);
1317 _token.setText(new String(text.getBuffer(), _begin,
1318 text.length()-_begin));
1319 }
1320 _returnToken=_token;
1321 }
1322 /***
1323 * @param _createToken
1324 */
1325 public final void mWS(boolean _createToken) throws RecognitionException,
1326 CharStreamException, TokenStreamException
1327 {
1328 int _ttype;
1329 Token _token=null;
1330 int _begin=text.length();
1331 _ttype=WS;
1332 int _saveIndex;
1333 {
1334 int _cnt245=0;
1335 _loop245:
1336
1337 do {
1338 switch(LA(1)) {
1339 case ' ':
1340
1341 {
1342 match(' ');
1343 break;
1344 }
1345 case '\t':
1346
1347 {
1348 match('\t');
1349 break;
1350 }
1351 case '\u000c':
1352
1353 {
1354 match('\f');
1355 break;
1356 }
1357 case '\n':
1358 case '\r':
1359
1360 {
1361 {
1362 if(LA(1)=='\r'&&LA(2)=='\n'&&true&&true) {
1363 match("\r\n");
1364 } else if(LA(1)=='\r'&&true&&true&&true) {
1365 match('\r');
1366 } else if(LA(1)=='\n') {
1367 match('\n');
1368 } else {
1369 throw new NoViableAltForCharException((char)LA(1),
1370 getFilename(), getLine(), getColumn());
1371 }
1372 }
1373 newline();
1374 break;
1375 }
1376 default:
1377
1378 {
1379 if(_cnt245>=1) {
1380 break _loop245;
1381 } else {
1382 throw new NoViableAltForCharException((char)LA(1),
1383 getFilename(), getLine(), getColumn());
1384 }
1385 }
1386 }
1387 _cnt245++;
1388 } while(true);
1389
1390 }
1391 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1392 _token=makeToken(_ttype);
1393 _token.setText(new String(text.getBuffer(), _begin,
1394 text.length()-_begin));
1395 }
1396 _returnToken=_token;
1397 }
1398 /***
1399 * @param _createToken
1400 */
1401 public final void mSL_COMMENT(boolean _createToken) throws RecognitionException,
1402 CharStreamException, TokenStreamException
1403 {
1404 int _ttype;
1405 Token _token=null;
1406 int _begin=text.length();
1407 _ttype=SL_COMMENT;
1408 int _saveIndex;
1409 match("//");
1410 {
1411 _loop249:
1412
1413 do {
1414 if(_tokenSet_0.member(LA(1))) {
1415 {
1416 match(_tokenSet_0);
1417 }
1418 } else {
1419 break _loop249;
1420 }
1421 } while(true);
1422
1423 }
1424 {
1425 switch(LA(1)) {
1426 case '\n':
1427
1428 {
1429 match('\n');
1430 break;
1431 }
1432 case '\r':
1433
1434 {
1435 match('\r');
1436 {
1437 if(LA(1)=='\n') {
1438 match('\n');
1439 } else {
1440 }
1441 }
1442 break;
1443 }
1444 default:
1445
1446 {
1447 throw new NoViableAltForCharException((char)LA(1),
1448 getFilename(), getLine(), getColumn());
1449 }
1450 }
1451 }
1452 newline();
1453 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1454 _token=makeToken(_ttype);
1455 _token.setText(new String(text.getBuffer(), _begin,
1456 text.length()-_begin));
1457 }
1458 _returnToken=_token;
1459 }
1460 /***
1461 * @param _createToken
1462 */
1463 public final void mML_COMMENT(boolean _createToken) throws RecognitionException,
1464 CharStreamException, TokenStreamException
1465 {
1466 int _ttype;
1467 Token _token=null;
1468 int _begin=text.length();
1469 _ttype=ML_COMMENT;
1470 int _saveIndex;
1471 match("/*");
1472 if(LA(1)=='*') _ttype=JAVA_COMMENT;
1473 {
1474 _loop255:
1475
1476 do {
1477 if(LA(1)=='\r'&&LA(2)=='\n'&&LA(3)>='\u0003'&&
1478 LA(3)<='\uffff'&&LA(4)>='\u0003'&&LA(4)<='\uffff') {
1479 match('\r');
1480 match('\n');
1481 newline();
1482 } else if(LA(1)=='*'&&LA(2)>='\u0003'&&
1483 LA(2)<='\uffff'&&LA(3)>='\u0003'&&
1484 LA(3)<='\uffff'&&LA(2)!='/') {
1485 match('*');
1486 } else if(LA(1)=='\r'&&LA(2)>='\u0003'&&
1487 LA(2)<='\uffff'&&LA(3)>='\u0003'&&
1488 LA(3)<='\uffff'&&true) {
1489 match('\r');
1490 newline();
1491 } else if(LA(1)=='\n') {
1492 match('\n');
1493 newline();
1494 } else if(_tokenSet_1.member(LA(1))) {
1495 {
1496 match(_tokenSet_1);
1497 }
1498 } else {
1499 break _loop255;
1500 }
1501 } while(true);
1502
1503 }
1504 match("*/");
1505 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1506 _token=makeToken(_ttype);
1507 _token.setText(new String(text.getBuffer(), _begin,
1508 text.length()-_begin));
1509 }
1510 _returnToken=_token;
1511 }
1512 /***
1513 * @param _createToken
1514 */
1515 public final void mCHAR_LITERAL(boolean _createToken) throws RecognitionException,
1516 CharStreamException, TokenStreamException
1517 {
1518 int _ttype;
1519 Token _token=null;
1520 int _begin=text.length();
1521 _ttype=CHAR_LITERAL;
1522 int _saveIndex;
1523 match('\'');
1524 {
1525 if(LA(1)=='//') {
1526 mESC(false);
1527 } else if(_tokenSet_2.member(LA(1))) {
1528 matchNot('\'');
1529 } else {
1530 throw new NoViableAltForCharException((char)LA(1),
1531 getFilename(), getLine(), getColumn());
1532 }
1533 }
1534 match('\'');
1535 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1536 _token=makeToken(_ttype);
1537 _token.setText(new String(text.getBuffer(), _begin,
1538 text.length()-_begin));
1539 }
1540 _returnToken=_token;
1541 }
1542 /***
1543 * @param _createToken
1544 */
1545 protected final void mESC(boolean _createToken) throws RecognitionException,
1546 CharStreamException, TokenStreamException
1547 {
1548 int _ttype;
1549 Token _token=null;
1550 int _begin=text.length();
1551 _ttype=ESC;
1552 int _saveIndex;
1553 match('//');
1554 {
1555 switch(LA(1)) {
1556 case 'n':
1557
1558 {
1559 match('n');
1560 break;
1561 }
1562 case 'r':
1563
1564 {
1565 match('r');
1566 break;
1567 }
1568 case 't':
1569
1570 {
1571 match('t');
1572 break;
1573 }
1574 case 'b':
1575
1576 {
1577 match('b');
1578 break;
1579 }
1580 case 'f':
1581
1582 {
1583 match('f');
1584 break;
1585 }
1586 case '"':
1587
1588 {
1589 match('"');
1590 break;
1591 }
1592 case '\'':
1593
1594 {
1595 match('\'');
1596 break;
1597 }
1598 case '//':
1599
1600 {
1601 match('//');
1602 break;
1603 }
1604 case 'u':
1605
1606 {
1607 {
1608 int _cnt265=0;
1609 _loop265:
1610
1611 do {
1612 if(LA(1)=='u') {
1613 match('u');
1614 } else {
1615 if(_cnt265>=1) {
1616 break _loop265;
1617 } else {
1618 throw new NoViableAltForCharException((char)LA(1),
1619 getFilename(), getLine(),
1620 getColumn());
1621 }
1622 }
1623 _cnt265++;
1624 } while(true);
1625
1626 }
1627 mHEX_DIGIT(false);
1628 mHEX_DIGIT(false);
1629 mHEX_DIGIT(false);
1630 mHEX_DIGIT(false);
1631 break;
1632 }
1633 case '0':
1634 case '1':
1635 case '2':
1636 case '3':
1637
1638 {
1639 matchRange('0', '3');
1640 {
1641 if(LA(1)>='0'&&LA(1)<='7'&&LA(2)>='\u0003'&&
1642 LA(2)<='\uffff'&&true&&true) {
1643 matchRange('0', '7');
1644 {
1645 if(LA(1)>='0'&&LA(1)<='7'&&
1646 LA(2)>='\u0003'&&
1647 LA(2)<='\uffff'&&true&&true) {
1648 matchRange('0', '7');
1649 } else if(LA(1)>='\u0003'&&
1650 LA(1)<='\uffff'&&true&&true&&true) {
1651 } else {
1652 throw new NoViableAltForCharException((char)LA(1),
1653 getFilename(), getLine(), getColumn());
1654 }
1655 }
1656 } else if(LA(1)>='\u0003'&&
1657 LA(1)<='\uffff'&&true&&true&&true) {
1658 } else {
1659 throw new NoViableAltForCharException((char)LA(1),
1660 getFilename(), getLine(), getColumn());
1661 }
1662 }
1663 break;
1664 }
1665 case '4':
1666 case '5':
1667 case '6':
1668 case '7':
1669
1670 {
1671 matchRange('4', '7');
1672 {
1673 if(LA(1)>='0'&&LA(1)<='7'&&LA(2)>='\u0003'&&
1674 LA(2)<='\uffff'&&true&&true) {
1675 matchRange('0', '7');
1676 } else if(LA(1)>='\u0003'&&
1677 LA(1)<='\uffff'&&true&&true&&true) {
1678 } else {
1679 throw new NoViableAltForCharException((char)LA(1),
1680 getFilename(), getLine(), getColumn());
1681 }
1682 }
1683 break;
1684 }
1685 default:
1686
1687 {
1688 throw new NoViableAltForCharException((char)LA(1),
1689 getFilename(), getLine(), getColumn());
1690 }
1691 }
1692 }
1693 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1694 _token=makeToken(_ttype);
1695 _token.setText(new String(text.getBuffer(), _begin,
1696 text.length()-_begin));
1697 }
1698 _returnToken=_token;
1699 }
1700 /***
1701 * @param _createToken
1702 */
1703 public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException,
1704 CharStreamException, TokenStreamException
1705 {
1706 int _ttype;
1707 Token _token=null;
1708 int _begin=text.length();
1709 _ttype=STRING_LITERAL;
1710 int _saveIndex;
1711 match('"');
1712 {
1713 _loop261:
1714
1715 do {
1716 if(LA(1)=='//') {
1717 mESC(false);
1718 } else if(_tokenSet_3.member(LA(1))) {
1719 {
1720 match(_tokenSet_3);
1721 }
1722 } else {
1723 break _loop261;
1724 }
1725 } while(true);
1726
1727 }
1728 match('"');
1729 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1730 _token=makeToken(_ttype);
1731 _token.setText(new String(text.getBuffer(), _begin,
1732 text.length()-_begin));
1733 }
1734 _returnToken=_token;
1735 }
1736 /***
1737 * @param _createToken
1738 */
1739 protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException,
1740 CharStreamException, TokenStreamException
1741 {
1742 int _ttype;
1743 Token _token=null;
1744 int _begin=text.length();
1745 _ttype=HEX_DIGIT;
1746 int _saveIndex;
1747 {
1748 switch(LA(1)) {
1749 case '0':
1750 case '1':
1751 case '2':
1752 case '3':
1753 case '4':
1754 case '5':
1755 case '6':
1756 case '7':
1757 case '8':
1758 case '9':
1759
1760 {
1761 matchRange('0', '9');
1762 break;
1763 }
1764 case 'A':
1765 case 'B':
1766 case 'C':
1767 case 'D':
1768 case 'E':
1769 case 'F':
1770
1771 {
1772 matchRange('A', 'F');
1773 break;
1774 }
1775 case 'a':
1776 case 'b':
1777 case 'c':
1778 case 'd':
1779 case 'e':
1780 case 'f':
1781
1782 {
1783 matchRange('a', 'f');
1784 break;
1785 }
1786 default:
1787
1788 {
1789 throw new NoViableAltForCharException((char)LA(1),
1790 getFilename(), getLine(), getColumn());
1791 }
1792 }
1793 }
1794 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1795 _token=makeToken(_ttype);
1796 _token.setText(new String(text.getBuffer(), _begin,
1797 text.length()-_begin));
1798 }
1799 _returnToken=_token;
1800 }
1801 /***
1802 * @param _createToken
1803 */
1804 protected final void mVOCAB(boolean _createToken) throws RecognitionException,
1805 CharStreamException, TokenStreamException
1806 {
1807 int _ttype;
1808 Token _token=null;
1809 int _begin=text.length();
1810 _ttype=VOCAB;
1811 int _saveIndex;
1812 matchRange('\3', '\377');
1813 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
1814 _token=makeToken(_ttype);
1815 _token.setText(new String(text.getBuffer(), _begin,
1816 text.length()-_begin));
1817 }
1818 _returnToken=_token;
1819 }
1820 /***
1821 * @param _createToken
1822 */
1823 public final void mIDENT(boolean _createToken) throws RecognitionException,
1824 CharStreamException, TokenStreamException
1825 {
1826 int _ttype;
1827 Token _token=null;
1828 int _begin=text.length();
1829 _ttype=IDENT;
1830 int _saveIndex;
1831 {
1832 switch(LA(1)) {
1833 case 'a':
1834 case 'b':
1835 case 'c':
1836 case 'd':
1837 case 'e':
1838 case 'f':
1839 case 'g':
1840 case 'h':
1841 case 'i':
1842 case 'j':
1843 case 'k':
1844 case 'l':
1845 case 'm':
1846 case 'n':
1847 case 'o':
1848 case 'p':
1849 case 'q':
1850 case 'r':
1851 case 's':
1852 case 't':
1853 case 'u':
1854 case 'v':
1855 case 'w':
1856 case 'x':
1857 case 'y':
1858 case 'z':
1859
1860 {
1861 matchRange('a', 'z');
1862 break;
1863 }
1864 case 'A':
1865 case 'B':
1866 case 'C':
1867 case 'D':
1868 case 'E':
1869 case 'F':
1870 case 'G':
1871 case 'H':
1872 case 'I':
1873 case 'J':
1874 case 'K':
1875 case 'L':
1876 case 'M':
1877 case 'N':
1878 case 'O':
1879 case 'P':
1880 case 'Q':
1881 case 'R':
1882 case 'S':
1883 case 'T':
1884 case 'U':
1885 case 'V':
1886 case 'W':
1887 case 'X':
1888 case 'Y':
1889 case 'Z':
1890
1891 {
1892 matchRange('A', 'Z');
1893 break;
1894 }
1895 case '_':
1896
1897 {
1898 match('_');
1899 break;
1900 }
1901 case '$':
1902
1903 {
1904 match('$');
1905 break;
1906 }
1907 default:
1908
1909 {
1910 throw new NoViableAltForCharException((char)LA(1),
1911 getFilename(), getLine(), getColumn());
1912 }
1913 }
1914 }
1915 {
1916 _loop275:
1917
1918 do {
1919 switch(LA(1)) {
1920 case 'a':
1921 case 'b':
1922 case 'c':
1923 case 'd':
1924 case 'e':
1925 case 'f':
1926 case 'g':
1927 case 'h':
1928 case 'i':
1929 case 'j':
1930 case 'k':
1931 case 'l':
1932 case 'm':
1933 case 'n':
1934 case 'o':
1935 case 'p':
1936 case 'q':
1937 case 'r':
1938 case 's':
1939 case 't':
1940 case 'u':
1941 case 'v':
1942 case 'w':
1943 case 'x':
1944 case 'y':
1945 case 'z':
1946
1947 {
1948 matchRange('a', 'z');
1949 break;
1950 }
1951 case 'A':
1952 case 'B':
1953 case 'C':
1954 case 'D':
1955 case 'E':
1956 case 'F':
1957 case 'G':
1958 case 'H':
1959 case 'I':
1960 case 'J':
1961 case 'K':
1962 case 'L':
1963 case 'M':
1964 case 'N':
1965 case 'O':
1966 case 'P':
1967 case 'Q':
1968 case 'R':
1969 case 'S':
1970 case 'T':
1971 case 'U':
1972 case 'V':
1973 case 'W':
1974 case 'X':
1975 case 'Y':
1976 case 'Z':
1977
1978 {
1979 matchRange('A', 'Z');
1980 break;
1981 }
1982 case '_':
1983
1984 {
1985 match('_');
1986 break;
1987 }
1988 case '0':
1989 case '1':
1990 case '2':
1991 case '3':
1992 case '4':
1993 case '5':
1994 case '6':
1995 case '7':
1996 case '8':
1997 case '9':
1998
1999 {
2000 matchRange('0', '9');
2001 break;
2002 }
2003 case '$':
2004
2005 {
2006 match('$');
2007 break;
2008 }
2009 default:
2010
2011 {
2012 break _loop275;
2013 }
2014 }
2015 } while(true);
2016
2017 }
2018 _ttype=testLiteralsTable(_ttype);
2019 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
2020 _token=makeToken(_ttype);
2021 _token.setText(new String(text.getBuffer(), _begin,
2022 text.length()-_begin));
2023 }
2024 _returnToken=_token;
2025 }
2026 /***
2027 * @param _createToken
2028 */
2029 public final void mNUM_INT(boolean _createToken) throws RecognitionException,
2030 CharStreamException, TokenStreamException
2031 {
2032 int _ttype;
2033 Token _token=null;
2034 int _begin=text.length();
2035 _ttype=NUM_INT;
2036 int _saveIndex;
2037 Token f1=null;
2038 Token f2=null;
2039 Token f3=null;
2040 Token f4=null;
2041 boolean isDecimal=false;
2042 Token t=null;
2043 switch(LA(1)) {
2044 case '.':
2045
2046 {
2047 match('.');
2048 _ttype=DOT;
2049 {
2050 if(LA(1)>='0'&&LA(1)<='9') {
2051 {
2052 int _cnt279=0;
2053 _loop279:
2054
2055 do {
2056 if(LA(1)>='0'&&LA(1)<='9') {
2057 matchRange('0', '9');
2058 } else {
2059 if(_cnt279>=1) {
2060 break _loop279;
2061 } else {
2062 throw new NoViableAltForCharException((char)LA(1),
2063 getFilename(), getLine(),
2064 getColumn());
2065 }
2066 }
2067 _cnt279++;
2068 } while(true);
2069
2070 }
2071 {
2072 if(LA(1)=='E'||LA(1)=='e') {
2073 mEXPONENT(false);
2074 } else {
2075 }
2076 }
2077 {
2078 if(LA(1)=='D'||LA(1)=='F'||LA(1)=='d'||
2079 LA(1)=='f') {
2080 mFLOAT_SUFFIX(true);
2081 f1=_returnToken;
2082 t=f1;
2083 } else {
2084 }
2085 }
2086 if(t!=null&&
2087 t.getText().toUpperCase().indexOf('F')>=0) {
2088 _ttype=NUM_FLOAT;
2089 } else {
2090 _ttype=NUM_DOUBLE;
2091 // assume double
2092 }
2093 } else {
2094 }
2095 }
2096 break;
2097 }
2098 case '0':
2099 case '1':
2100 case '2':
2101 case '3':
2102 case '4':
2103 case '5':
2104 case '6':
2105 case '7':
2106 case '8':
2107 case '9':
2108
2109 {
2110 {
2111 switch(LA(1)) {
2112 case '0':
2113
2114 {
2115 match('0');
2116 isDecimal=true;
2117 {
2118 switch(LA(1)) {
2119 case 'X':
2120 case 'x':
2121
2122 {
2123 {
2124 switch(LA(1)) {
2125 case 'x':
2126
2127 {
2128 match('x');
2129 break;
2130 }
2131 case 'X':
2132
2133 {
2134 match('X');
2135 break;
2136 }
2137 default:
2138
2139 {
2140 throw new NoViableAltForCharException((char)LA(1),
2141 getFilename(),
2142 getLine(),
2143 getColumn());
2144 }
2145 }
2146 }
2147 {
2148 int _cnt286=0;
2149 _loop286:
2150
2151 do {
2152 if(_tokenSet_4.member(LA(1))&&true&&true&&true) {
2153 mHEX_DIGIT(false);
2154 } else {
2155 if(_cnt286>=1) {
2156 break _loop286;
2157 } else {
2158 throw new NoViableAltForCharException((char)LA(1),
2159 getFilename(),
2160 getLine(),
2161 getColumn());
2162 }
2163 }
2164 _cnt286++;
2165 } while(true);
2166
2167 }
2168 break;
2169 }
2170 case '0':
2171 case '1':
2172 case '2':
2173 case '3':
2174 case '4':
2175 case '5':
2176 case '6':
2177 case '7':
2178
2179 {
2180 {
2181 int _cnt288=0;
2182 _loop288:
2183
2184 do {
2185 if(LA(1)>='0'&&
2186 LA(1)<='7') {
2187 matchRange('0',
2188 '7');
2189 } else {
2190 if(_cnt288>=1) {
2191 break _loop288;
2192 } else {
2193 throw new NoViableAltForCharException((char)LA(1),
2194 getFilename(),
2195 getLine(),
2196 getColumn());
2197 }
2198 }
2199 _cnt288++;
2200 } while(true);
2201
2202 }
2203 break;
2204 }
2205 default:
2206
2207 {
2208 }
2209 }
2210 }
2211 break;
2212 }
2213 case '1':
2214 case '2':
2215 case '3':
2216 case '4':
2217 case '5':
2218 case '6':
2219 case '7':
2220 case '8':
2221 case '9':
2222
2223 {
2224 {
2225 matchRange('1', '9');
2226 }
2227 {
2228 _loop291:
2229
2230 do {
2231 if(LA(1)>='0'&&LA(1)<='9') {
2232 matchRange('0', '9');
2233 } else {
2234 break _loop291;
2235 }
2236 } while(true);
2237
2238 }
2239 isDecimal=true;
2240 break;
2241 }
2242 default:
2243
2244 {
2245 throw new NoViableAltForCharException((char)LA(1),
2246 getFilename(), getLine(), getColumn());
2247 }
2248 }
2249 }
2250 {
2251 if(LA(1)=='L'||LA(1)=='l') {
2252 {
2253 switch(LA(1)) {
2254 case 'l':
2255
2256 {
2257 match('l');
2258 break;
2259 }
2260 case 'L':
2261
2262 {
2263 match('L');
2264 break;
2265 }
2266 default:
2267
2268 {
2269 throw new NoViableAltForCharException((char)LA(1),
2270 getFilename(), getLine(), getColumn());
2271 }
2272 }
2273 }
2274 _ttype=NUM_LONG;
2275 } else if((LA(1)=='.'||LA(1)=='D'||LA(1)=='E'||
2276 LA(1)=='F'||LA(1)=='d'||LA(1)=='e'||
2277 LA(1)=='f')&&isDecimal) {
2278 {
2279 switch(LA(1)) {
2280 case '.':
2281
2282 {
2283 match('.');
2284 {
2285 _loop296:
2286
2287 do {
2288 if(LA(1)>='0'&&
2289 LA(1)<='9') {
2290 matchRange('0', '9');
2291 } else {
2292 break _loop296;
2293 }
2294 } while(true);
2295
2296 }
2297 {
2298 if(LA(1)=='E'||LA(1)=='e') {
2299 mEXPONENT(false);
2300 } else {
2301 }
2302 }
2303 {
2304 if(LA(1)=='D'||LA(1)=='F'||
2305 LA(1)=='d'||LA(1)=='f') {
2306 mFLOAT_SUFFIX(true);
2307 f2=_returnToken;
2308 t=f2;
2309 } else {
2310 }
2311 }
2312 break;
2313 }
2314 case 'E':
2315 case 'e':
2316
2317 {
2318 mEXPONENT(false);
2319 {
2320 if(LA(1)=='D'||LA(1)=='F'||
2321 LA(1)=='d'||LA(1)=='f') {
2322 mFLOAT_SUFFIX(true);
2323 f3=_returnToken;
2324 t=f3;
2325 } else {
2326 }
2327 }
2328 break;
2329 }
2330 case 'D':
2331 case 'F':
2332 case 'd':
2333 case 'f':
2334
2335 {
2336 mFLOAT_SUFFIX(true);
2337 f4=_returnToken;
2338 t=f4;
2339 break;
2340 }
2341 default:
2342
2343 {
2344 throw new NoViableAltForCharException((char)LA(1),
2345 getFilename(), getLine(), getColumn());
2346 }
2347 }
2348 }
2349 if(t!=null&&
2350 t.getText().toUpperCase().indexOf('F')>=0) {
2351 _ttype=NUM_FLOAT;
2352 } else {
2353 _ttype=NUM_DOUBLE;
2354 // assume double
2355 }
2356 } else {
2357 }
2358 }
2359 break;
2360 }
2361 default:
2362
2363 {
2364 throw new NoViableAltForCharException((char)LA(1),
2365 getFilename(), getLine(), getColumn());
2366 }
2367 }
2368 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
2369 _token=makeToken(_ttype);
2370 _token.setText(new String(text.getBuffer(), _begin,
2371 text.length()-_begin));
2372 }
2373 _returnToken=_token;
2374 }
2375 /***
2376 * @param _createToken
2377 */
2378 protected final void mEXPONENT(boolean _createToken) throws RecognitionException,
2379 CharStreamException, TokenStreamException
2380 {
2381 int _ttype;
2382 Token _token=null;
2383 int _begin=text.length();
2384 _ttype=EXPONENT;
2385 int _saveIndex;
2386 {
2387 switch(LA(1)) {
2388 case 'e':
2389
2390 {
2391 match('e');
2392 break;
2393 }
2394 case 'E':
2395
2396 {
2397 match('E');
2398 break;
2399 }
2400 default:
2401
2402 {
2403 throw new NoViableAltForCharException((char)LA(1),
2404 getFilename(), getLine(), getColumn());
2405 }
2406 }
2407 }
2408 {
2409 switch(LA(1)) {
2410 case '+':
2411
2412 {
2413 match('+');
2414 break;
2415 }
2416 case '-':
2417
2418 {
2419 match('-');
2420 break;
2421 }
2422 case '0':
2423 case '1':
2424 case '2':
2425 case '3':
2426 case '4':
2427 case '5':
2428 case '6':
2429 case '7':
2430 case '8':
2431 case '9':
2432
2433 {
2434 break;
2435 }
2436 default:
2437
2438 {
2439 throw new NoViableAltForCharException((char)LA(1),
2440 getFilename(), getLine(), getColumn());
2441 }
2442 }
2443 }
2444 {
2445 int _cnt304=0;
2446 _loop304:
2447
2448 do {
2449 if(LA(1)>='0'&&LA(1)<='9') {
2450 matchRange('0', '9');
2451 } else {
2452 if(_cnt304>=1) {
2453 break _loop304;
2454 } else {
2455 throw new NoViableAltForCharException((char)LA(1),
2456 getFilename(), getLine(), getColumn());
2457 }
2458 }
2459 _cnt304++;
2460 } while(true);
2461
2462 }
2463 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
2464 _token=makeToken(_ttype);
2465 _token.setText(new String(text.getBuffer(), _begin,
2466 text.length()-_begin));
2467 }
2468 _returnToken=_token;
2469 }
2470 /***
2471 * @param _createToken
2472 */
2473 protected final void mFLOAT_SUFFIX(boolean _createToken) throws RecognitionException,
2474 CharStreamException, TokenStreamException
2475 {
2476 int _ttype;
2477 Token _token=null;
2478 int _begin=text.length();
2479 _ttype=FLOAT_SUFFIX;
2480 int _saveIndex;
2481 switch(LA(1)) {
2482 case 'f':
2483
2484 {
2485 match('f');
2486 break;
2487 }
2488 case 'F':
2489
2490 {
2491 match('F');
2492 break;
2493 }
2494 case 'd':
2495
2496 {
2497 match('d');
2498 break;
2499 }
2500 case 'D':
2501
2502 {
2503 match('D');
2504 break;
2505 }
2506 default:
2507
2508 {
2509 throw new NoViableAltForCharException((char)LA(1),
2510 getFilename(), getLine(), getColumn());
2511 }
2512 }
2513 if(_createToken&&_token==null&&_ttype!=Token.SKIP) {
2514 _token=makeToken(_ttype);
2515 _token.setText(new String(text.getBuffer(), _begin,
2516 text.length()-_begin));
2517 }
2518 _returnToken=_token;
2519 }
2520 /***
2521 * @return
2522 */
2523 private static final long[] mk_tokenSet_0()
2524 {
2525 long[] data=new long[2048];
2526 data[0]=-9224L;
2527 for(int i=1; i<=1023; i++){
2528 data[i]=-1L;
2529 }
2530 return data;
2531 }
2532 public static final BitSet _tokenSet_0=new BitSet(mk_tokenSet_0());
2533 /***
2534 * @return
2535 */
2536 private static final long[] mk_tokenSet_1()
2537 {
2538 long[] data=new long[2048];
2539 data[0]=-4398046520328L;
2540 for(int i=1; i<=1023; i++){
2541 data[i]=-1L;
2542 }
2543 return data;
2544 }
2545 public static final BitSet _tokenSet_1=new BitSet(mk_tokenSet_1());
2546 /***
2547 * @return
2548 */
2549 private static final long[] mk_tokenSet_2()
2550 {
2551 long[] data=new long[2048];
2552 data[0]=-549755813896L;
2553 data[1]=-268435457L;
2554 for(int i=2; i<=1023; i++){
2555 data[i]=-1L;
2556 }
2557 return data;
2558 }
2559 public static final BitSet _tokenSet_2=new BitSet(mk_tokenSet_2());
2560 /***
2561 * @return
2562 */
2563 private static final long[] mk_tokenSet_3()
2564 {
2565 long[] data=new long[2048];
2566 data[0]=-17179869192L;
2567 data[1]=-268435457L;
2568 for(int i=2; i<=1023; i++){
2569 data[i]=-1L;
2570 }
2571 return data;
2572 }
2573 public static final BitSet _tokenSet_3=new BitSet(mk_tokenSet_3());
2574 /***
2575 * @return
2576 */
2577 private static final long[] mk_tokenSet_4()
2578 {
2579 long[] data=new long[1025];
2580 data[0]=287948901175001088L;
2581 data[1]=541165879422L;
2582 return data;
2583 }
2584 public static final BitSet _tokenSet_4=new BitSet(mk_tokenSet_4());
2585 }
This page was automatically generated by Maven