Update changes.
[castle.git] / Experiments / Rook / Castle.Rook / RookLexer.cs
blob910450c605abd25a984b4a32eee949c4e47adad5
1 // $ANTLR 2.7.5 (20050128): "lang.g" -> "RookLexer.cs"$
3 // using CommonAST = antlr.CommonAST;
4 using System.Text;
5 using System.Collections;
6 using Castle.Rook.AST;
8 namespace Castle.Rook.Parse
10 // Generate header specific to lexer CSharp file
11 using System;
12 using Stream = System.IO.Stream;
13 using TextReader = System.IO.TextReader;
14 using Hashtable = System.Collections.Hashtable;
15 using Comparer = System.Collections.Comparer;
17 using TokenStreamException = antlr.TokenStreamException;
18 using TokenStreamIOException = antlr.TokenStreamIOException;
19 using TokenStreamRecognitionException = antlr.TokenStreamRecognitionException;
20 using CharStreamException = antlr.CharStreamException;
21 using CharStreamIOException = antlr.CharStreamIOException;
22 using ANTLRException = antlr.ANTLRException;
23 using CharScanner = antlr.CharScanner;
24 using InputBuffer = antlr.InputBuffer;
25 using ByteBuffer = antlr.ByteBuffer;
26 using CharBuffer = antlr.CharBuffer;
27 using Token = antlr.Token;
28 using IToken = antlr.IToken;
29 using CommonToken = antlr.CommonToken;
30 using SemanticException = antlr.SemanticException;
31 using RecognitionException = antlr.RecognitionException;
32 using NoViableAltForCharException = antlr.NoViableAltForCharException;
33 using MismatchedCharException = antlr.MismatchedCharException;
34 using TokenStream = antlr.TokenStream;
35 using LexerSharedInputState = antlr.LexerSharedInputState;
36 using BitSet = antlr.collections.impl.BitSet;
38 public class RookLexer : antlr.CharScanner , TokenStream
40 public const int EOF = 1;
41 public const int NULL_TREE_LOOKAHEAD = 3;
42 public const int CLASS_DEF = 4;
43 public const int MIXIN_DEF = 5;
44 public const int NAMESPACE = 6;
45 public const int INTERFACE = 7;
46 public const int INIT = 8;
47 public const int INIT2 = 9;
48 public const int END = 10;
49 public const int DEF = 11;
50 public const int ATTR = 12;
51 public const int GET = 13;
52 public const int SET = 14;
53 public const int INC = 15;
54 public const int DEC = 16;
55 public const int SELF = 17;
56 public const int BASE = 18;
57 public const int COLON = 19;
58 public const int DO = 20;
59 public const int EOS = 21;
60 public const int LESSTHAN = 22;
61 public const int COMMA = 23;
62 public const int LITERAL_public = 24;
63 public const int LITERAL_private = 25;
64 public const int LITERAL_protected = 26;
65 public const int LITERAL_internal = 27;
66 public const int IDENTIFIER = 28;
67 public const int DOT = 29;
68 public const int SEMI = 30;
69 public const int LPAREN = 31;
70 public const int RPAREN = 32;
71 public const int REF = 33;
72 public const int OUT = 34;
73 public const int STATIC_IDENTIFIER = 35;
74 public const int INSTANCE_IDENTIFIER = 36;
75 public const int ASSIGN = 37;
76 public const int INTEGER_LITERAL = 38;
77 public const int LBRACK = 39;
78 public const int RBRACK = 40;
79 public const int LCURLY = 41;
80 public const int RCURLY = 42;
81 public const int NEW_LINE = 43;
82 public const int NEW_LINE_CHARACTER = 44;
83 public const int NOT_NEW_LINE = 45;
84 public const int WHITESPACE = 46;
85 public const int SINGLE_LINE_COMMENT = 47;
86 public const int IDENTIFIER_START_CHARACTER = 48;
87 public const int IDENTIFIER_PART_CHARACTER = 49;
88 public const int NUMERIC_LITERAL = 50;
89 public const int DECIMAL_DIGIT = 51;
91 public RookLexer(Stream ins) : this(new ByteBuffer(ins))
95 public RookLexer(TextReader r) : this(new CharBuffer(r))
99 public RookLexer(InputBuffer ib) : this(new LexerSharedInputState(ib))
103 public RookLexer(LexerSharedInputState state) : base(state)
105 initialize();
107 private void initialize()
109 caseSensitiveLiterals = true;
110 setCaseSensitive(true);
111 literals = new Hashtable(100, (float) 0.4, null, Comparer.Default);
112 literals.Add("public", 24);
113 literals.Add("get", 13);
114 literals.Add("class", 4);
115 literals.Add("initialize", 8);
116 literals.Add("self", 17);
117 literals.Add("def", 11);
118 literals.Add("end", 10);
119 literals.Add("mixin", 5);
120 literals.Add("private", 25);
121 literals.Add("namespace", 6);
122 literals.Add("++", 15);
123 literals.Add("init", 9);
124 literals.Add("protected", 26);
125 literals.Add("attr", 12);
126 literals.Add("--", 16);
127 literals.Add(":", 19);
128 literals.Add("interface", 7);
129 literals.Add("do", 20);
130 literals.Add("base", 18);
131 literals.Add("internal", 27);
132 literals.Add("set", 14);
135 override public IToken nextToken() //throws TokenStreamException
137 IToken theRetToken = null;
138 tryAgain:
139 for (;;)
141 IToken _token = null;
142 int _ttype = Token.INVALID_TYPE;
143 setCommitToPath(false);
144 resetText();
145 try // for char stream error handling
147 try // for lexical error handling
149 switch ( cached_LA1 )
151 case '=':
153 mASSIGN(true);
154 theRetToken = returnToken_;
155 break;
157 case ';':
159 mSEMI(true);
160 theRetToken = returnToken_;
161 break;
163 case ',':
165 mCOMMA(true);
166 theRetToken = returnToken_;
167 break;
169 case '(':
171 mLPAREN(true);
172 theRetToken = returnToken_;
173 break;
175 case ')':
177 mRPAREN(true);
178 theRetToken = returnToken_;
179 break;
181 case '[':
183 mLBRACK(true);
184 theRetToken = returnToken_;
185 break;
187 case ']':
189 mRBRACK(true);
190 theRetToken = returnToken_;
191 break;
193 case '{':
195 mLCURLY(true);
196 theRetToken = returnToken_;
197 break;
199 case '}':
201 mRCURLY(true);
202 theRetToken = returnToken_;
203 break;
205 case ':':
207 mCOLON(true);
208 theRetToken = returnToken_;
209 break;
211 case '.':
213 mDOT(true);
214 theRetToken = returnToken_;
215 break;
217 case '<':
219 mLESSTHAN(true);
220 theRetToken = returnToken_;
221 break;
223 case '\t': case '\n': case '\u000b': case '\u000c':
224 case '\r': case ' ': case '\u2028': case '\u2029':
226 mWHITESPACE(true);
227 theRetToken = returnToken_;
228 break;
230 case '#':
232 mSINGLE_LINE_COMMENT(true);
233 theRetToken = returnToken_;
234 break;
236 case '$': case 'A': case 'B': case 'C':
237 case 'D': case 'E': case 'F': case 'G':
238 case 'H': case 'I': case 'J': case 'K':
239 case 'L': case 'M': case 'N': case 'O':
240 case 'P': case 'Q': case 'R': case 'S':
241 case 'T': case 'U': case 'V': case 'W':
242 case 'X': case 'Y': case 'Z': case '_':
243 case 'a': case 'b': case 'c': case 'd':
244 case 'e': case 'f': case 'g': case 'h':
245 case 'i': case 'j': case 'k': case 'l':
246 case 'm': case 'n': case 'o': case 'p':
247 case 'q': case 'r': case 's': case 't':
248 case 'u': case 'v': case 'w': case 'x':
249 case 'y': case 'z':
251 mIDENTIFIER(true);
252 theRetToken = returnToken_;
253 break;
255 case '0': case '1': case '2': case '3':
256 case '4': case '5': case '6': case '7':
257 case '8': case '9':
259 mNUMERIC_LITERAL(true);
260 theRetToken = returnToken_;
261 break;
263 default:
264 if ((cached_LA1=='@') && (cached_LA2=='@'))
266 mSTATIC_IDENTIFIER(true);
267 theRetToken = returnToken_;
269 else if ((cached_LA1=='@') && (tokenSet_0_.member(cached_LA2))) {
270 mINSTANCE_IDENTIFIER(true);
271 theRetToken = returnToken_;
273 else
275 if (cached_LA1==EOF_CHAR) { uponEOF(); returnToken_ = makeToken(Token.EOF_TYPE); }
276 else { consume(); goto tryAgain; }
278 break; }
279 if ( null==returnToken_ ) goto tryAgain; // found SKIP token
280 _ttype = returnToken_.Type;
281 returnToken_.Type = _ttype;
282 return returnToken_;
284 catch (RecognitionException e) {
285 if (!getCommitToPath())
287 consume();
288 goto tryAgain;
290 throw new TokenStreamRecognitionException(e);
293 catch (CharStreamException cse) {
294 if ( cse is CharStreamIOException ) {
295 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
297 else {
298 throw new TokenStreamException(cse.Message);
304 public void mASSIGN(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
306 int _ttype; IToken _token=null; int _begin=text.Length;
307 _ttype = ASSIGN;
309 match('=');
310 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
312 _token = makeToken(_ttype);
313 _token.setText(text.ToString(_begin, text.Length-_begin));
315 returnToken_ = _token;
318 public void mSEMI(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
320 int _ttype; IToken _token=null; int _begin=text.Length;
321 _ttype = SEMI;
323 match(';');
324 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
326 _token = makeToken(_ttype);
327 _token.setText(text.ToString(_begin, text.Length-_begin));
329 returnToken_ = _token;
332 public void mCOMMA(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
334 int _ttype; IToken _token=null; int _begin=text.Length;
335 _ttype = COMMA;
337 match(',');
338 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
340 _token = makeToken(_ttype);
341 _token.setText(text.ToString(_begin, text.Length-_begin));
343 returnToken_ = _token;
346 public void mLPAREN(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
348 int _ttype; IToken _token=null; int _begin=text.Length;
349 _ttype = LPAREN;
351 match('(');
352 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
354 _token = makeToken(_ttype);
355 _token.setText(text.ToString(_begin, text.Length-_begin));
357 returnToken_ = _token;
360 public void mRPAREN(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
362 int _ttype; IToken _token=null; int _begin=text.Length;
363 _ttype = RPAREN;
365 match(')');
366 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
368 _token = makeToken(_ttype);
369 _token.setText(text.ToString(_begin, text.Length-_begin));
371 returnToken_ = _token;
374 public void mLBRACK(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
376 int _ttype; IToken _token=null; int _begin=text.Length;
377 _ttype = LBRACK;
379 match('[');
380 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
382 _token = makeToken(_ttype);
383 _token.setText(text.ToString(_begin, text.Length-_begin));
385 returnToken_ = _token;
388 public void mRBRACK(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
390 int _ttype; IToken _token=null; int _begin=text.Length;
391 _ttype = RBRACK;
393 match(']');
394 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
396 _token = makeToken(_ttype);
397 _token.setText(text.ToString(_begin, text.Length-_begin));
399 returnToken_ = _token;
402 public void mLCURLY(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
404 int _ttype; IToken _token=null; int _begin=text.Length;
405 _ttype = LCURLY;
407 match('{');
408 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
410 _token = makeToken(_ttype);
411 _token.setText(text.ToString(_begin, text.Length-_begin));
413 returnToken_ = _token;
416 public void mRCURLY(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
418 int _ttype; IToken _token=null; int _begin=text.Length;
419 _ttype = RCURLY;
421 match('}');
422 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
424 _token = makeToken(_ttype);
425 _token.setText(text.ToString(_begin, text.Length-_begin));
427 returnToken_ = _token;
430 public void mCOLON(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
432 int _ttype; IToken _token=null; int _begin=text.Length;
433 _ttype = COLON;
435 match(':');
436 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
438 _token = makeToken(_ttype);
439 _token.setText(text.ToString(_begin, text.Length-_begin));
441 returnToken_ = _token;
444 public void mDOT(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
446 int _ttype; IToken _token=null; int _begin=text.Length;
447 _ttype = DOT;
449 match('.');
450 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
452 _token = makeToken(_ttype);
453 _token.setText(text.ToString(_begin, text.Length-_begin));
455 returnToken_ = _token;
458 public void mLESSTHAN(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
460 int _ttype; IToken _token=null; int _begin=text.Length;
461 _ttype = LESSTHAN;
463 match('<');
464 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
466 _token = makeToken(_ttype);
467 _token.setText(text.ToString(_begin, text.Length-_begin));
469 returnToken_ = _token;
472 protected void mNEW_LINE(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
474 int _ttype; IToken _token=null; int _begin=text.Length;
475 _ttype = NEW_LINE;
478 switch ( cached_LA1 )
480 case '\n':
482 match('\u000A');
483 break;
485 case '\u2028':
487 match('\u2028');
488 break;
490 case '\u2029':
492 match('\u2029');
493 break;
495 default:
496 if (((cached_LA1=='\r') && (cached_LA2=='\n') && (true) && (true))&&( LA(2)=='\u000A' ))
498 match('\u000D');
499 match('\u000A');
501 else if ((cached_LA1=='\r') && (true) && (true) && (true)) {
502 match('\u000D');
504 else
506 throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());
508 break; }
510 newline();
511 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
513 _token = makeToken(_ttype);
514 _token.setText(text.ToString(_begin, text.Length-_begin));
516 returnToken_ = _token;
519 protected void mNEW_LINE_CHARACTER(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
521 int _ttype; IToken _token=null; int _begin=text.Length;
522 _ttype = NEW_LINE_CHARACTER;
525 switch ( cached_LA1 )
527 case '\r':
529 match('\u000D');
530 break;
532 case '\n':
534 match('\u000A');
535 break;
537 case '\u2028':
539 match('\u2028');
540 break;
542 case '\u2029':
544 match('\u2029');
545 break;
547 default:
549 throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());
553 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
555 _token = makeToken(_ttype);
556 _token.setText(text.ToString(_begin, text.Length-_begin));
558 returnToken_ = _token;
561 protected void mNOT_NEW_LINE(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
563 int _ttype; IToken _token=null; int _begin=text.Length;
564 _ttype = NOT_NEW_LINE;
567 match(tokenSet_1_);
569 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
571 _token = makeToken(_ttype);
572 _token.setText(text.ToString(_begin, text.Length-_begin));
574 returnToken_ = _token;
577 public void mWHITESPACE(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
579 int _ttype; IToken _token=null; int _begin=text.Length;
580 _ttype = WHITESPACE;
582 { // ( ... )+
583 int _cnt94=0;
584 for (;;)
586 switch ( cached_LA1 )
588 case ' ':
590 match(' ');
591 break;
593 case '\t':
595 match('\u0009');
596 break;
598 case '\u000b':
600 match('\u000B');
601 break;
603 case '\u000c':
605 match('\u000C');
606 break;
608 case '\n': case '\r': case '\u2028': case '\u2029':
610 mNEW_LINE(false);
611 break;
613 default:
615 if (_cnt94 >= 1) { goto _loop94_breakloop; } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());; }
617 break; }
618 _cnt94++;
620 _loop94_breakloop: ;
621 } // ( ... )+
622 _ttype = Token.SKIP;
623 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
625 _token = makeToken(_ttype);
626 _token.setText(text.ToString(_begin, text.Length-_begin));
628 returnToken_ = _token;
631 public void mSINGLE_LINE_COMMENT(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
633 int _ttype; IToken _token=null; int _begin=text.Length;
634 _ttype = SINGLE_LINE_COMMENT;
636 match("#");
637 { // ( ... )*
638 for (;;)
640 if ((tokenSet_1_.member(cached_LA1)))
642 mNOT_NEW_LINE(false);
644 else
646 goto _loop97_breakloop;
650 _loop97_breakloop: ;
651 } // ( ... )*
653 if ((tokenSet_2_.member(cached_LA1)))
655 mNEW_LINE(false);
657 else {
661 _ttype = Token.SKIP;
662 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
664 _token = makeToken(_ttype);
665 _token.setText(text.ToString(_begin, text.Length-_begin));
667 returnToken_ = _token;
670 public void mIDENTIFIER(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
672 int _ttype; IToken _token=null; int _begin=text.Length;
673 _ttype = IDENTIFIER;
675 mIDENTIFIER_START_CHARACTER(false);
676 { // ( ... )*
677 for (;;)
679 if ((tokenSet_3_.member(cached_LA1)))
681 mIDENTIFIER_PART_CHARACTER(false);
683 else
685 goto _loop101_breakloop;
689 _loop101_breakloop: ;
690 } // ( ... )*
691 _ttype = testLiteralsTable(_ttype);
692 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
694 _token = makeToken(_ttype);
695 _token.setText(text.ToString(_begin, text.Length-_begin));
697 returnToken_ = _token;
700 protected void mIDENTIFIER_START_CHARACTER(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
702 int _ttype; IToken _token=null; int _begin=text.Length;
703 _ttype = IDENTIFIER_START_CHARACTER;
706 switch ( cached_LA1 )
708 case 'a': case 'b': case 'c': case 'd':
709 case 'e': case 'f': case 'g': case 'h':
710 case 'i': case 'j': case 'k': case 'l':
711 case 'm': case 'n': case 'o': case 'p':
712 case 'q': case 'r': case 's': case 't':
713 case 'u': case 'v': case 'w': case 'x':
714 case 'y': case 'z':
716 matchRange('a','z');
717 break;
719 case 'A': case 'B': case 'C': case 'D':
720 case 'E': case 'F': case 'G': case 'H':
721 case 'I': case 'J': case 'K': case 'L':
722 case 'M': case 'N': case 'O': case 'P':
723 case 'Q': case 'R': case 'S': case 'T':
724 case 'U': case 'V': case 'W': case 'X':
725 case 'Y': case 'Z':
727 matchRange('A','Z');
728 break;
730 case '_':
732 match('_');
733 break;
735 case '$':
737 match('$');
738 break;
740 default:
742 throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());
746 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
748 _token = makeToken(_ttype);
749 _token.setText(text.ToString(_begin, text.Length-_begin));
751 returnToken_ = _token;
754 protected void mIDENTIFIER_PART_CHARACTER(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
756 int _ttype; IToken _token=null; int _begin=text.Length;
757 _ttype = IDENTIFIER_PART_CHARACTER;
760 switch ( cached_LA1 )
762 case 'a': case 'b': case 'c': case 'd':
763 case 'e': case 'f': case 'g': case 'h':
764 case 'i': case 'j': case 'k': case 'l':
765 case 'm': case 'n': case 'o': case 'p':
766 case 'q': case 'r': case 's': case 't':
767 case 'u': case 'v': case 'w': case 'x':
768 case 'y': case 'z':
770 matchRange('a','z');
771 break;
773 case 'A': case 'B': case 'C': case 'D':
774 case 'E': case 'F': case 'G': case 'H':
775 case 'I': case 'J': case 'K': case 'L':
776 case 'M': case 'N': case 'O': case 'P':
777 case 'Q': case 'R': case 'S': case 'T':
778 case 'U': case 'V': case 'W': case 'X':
779 case 'Y': case 'Z':
781 matchRange('A','Z');
782 break;
784 case '_':
786 match('_');
787 break;
789 case '0': case '1': case '2': case '3':
790 case '4': case '5': case '6': case '7':
791 case '8': case '9':
793 matchRange('0','9');
794 break;
796 default:
798 throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());
802 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
804 _token = makeToken(_ttype);
805 _token.setText(text.ToString(_begin, text.Length-_begin));
807 returnToken_ = _token;
810 public void mSTATIC_IDENTIFIER(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
812 int _ttype; IToken _token=null; int _begin=text.Length;
813 _ttype = STATIC_IDENTIFIER;
815 match("@@");
816 mIDENTIFIER_START_CHARACTER(false);
817 { // ( ... )*
818 for (;;)
820 if ((tokenSet_3_.member(cached_LA1)))
822 mIDENTIFIER_PART_CHARACTER(false);
824 else
826 goto _loop108_breakloop;
830 _loop108_breakloop: ;
831 } // ( ... )*
832 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
834 _token = makeToken(_ttype);
835 _token.setText(text.ToString(_begin, text.Length-_begin));
837 returnToken_ = _token;
840 public void mINSTANCE_IDENTIFIER(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
842 int _ttype; IToken _token=null; int _begin=text.Length;
843 _ttype = INSTANCE_IDENTIFIER;
845 match("@");
846 mIDENTIFIER_START_CHARACTER(false);
847 { // ( ... )*
848 for (;;)
850 if ((tokenSet_3_.member(cached_LA1)))
852 mIDENTIFIER_PART_CHARACTER(false);
854 else
856 goto _loop111_breakloop;
860 _loop111_breakloop: ;
861 } // ( ... )*
862 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
864 _token = makeToken(_ttype);
865 _token.setText(text.ToString(_begin, text.Length-_begin));
867 returnToken_ = _token;
870 public void mNUMERIC_LITERAL(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
872 int _ttype; IToken _token=null; int _begin=text.Length;
873 _ttype = NUMERIC_LITERAL;
875 { // ( ... )+
876 int _cnt114=0;
877 for (;;)
879 if (((cached_LA1 >= '0' && cached_LA1 <= '9')))
881 mDECIMAL_DIGIT(false);
883 else
885 if (_cnt114 >= 1) { goto _loop114_breakloop; } else { throw new NoViableAltForCharException(cached_LA1, getFilename(), getLine(), getColumn());; }
888 _cnt114++;
890 _loop114_breakloop: ;
891 } // ( ... )+
893 _ttype = INTEGER_LITERAL;
895 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
897 _token = makeToken(_ttype);
898 _token.setText(text.ToString(_begin, text.Length-_begin));
900 returnToken_ = _token;
903 protected void mDECIMAL_DIGIT(bool _createToken) //throws RecognitionException, CharStreamException, TokenStreamException
905 int _ttype; IToken _token=null; int _begin=text.Length;
906 _ttype = DECIMAL_DIGIT;
909 matchRange('0','9');
911 if (_createToken && (null == _token) && (_ttype != Token.SKIP))
913 _token = makeToken(_ttype);
914 _token.setText(text.ToString(_begin, text.Length-_begin));
916 returnToken_ = _token;
920 private static long[] mk_tokenSet_0_()
922 long[] data = new long[513];
923 data[0]=68719476736L;
924 data[1]=576460745995190270L;
925 for (int i = 2; i<=512; i++) { data[i]=0L; }
926 return data;
928 public static readonly BitSet tokenSet_0_ = new BitSet(mk_tokenSet_0_());
929 private static long[] mk_tokenSet_1_()
931 long[] data = new long[1024];
932 data[0]=-9224L;
933 for (int i = 1; i<=127; i++) { data[i]=-1L; }
934 data[128]=-3298534883329L;
935 for (int i = 129; i<=511; i++) { data[i]=-1L; }
936 for (int i = 512; i<=1023; i++) { data[i]=0L; }
937 return data;
939 public static readonly BitSet tokenSet_1_ = new BitSet(mk_tokenSet_1_());
940 private static long[] mk_tokenSet_2_()
942 long[] data = new long[513];
943 data[0]=9216L;
944 for (int i = 1; i<=127; i++) { data[i]=0L; }
945 data[128]=3298534883328L;
946 for (int i = 129; i<=512; i++) { data[i]=0L; }
947 return data;
949 public static readonly BitSet tokenSet_2_ = new BitSet(mk_tokenSet_2_());
950 private static long[] mk_tokenSet_3_()
952 long[] data = new long[513];
953 data[0]=287948901175001088L;
954 data[1]=576460745995190270L;
955 for (int i = 2; i<=512; i++) { data[i]=0L; }
956 return data;
958 public static readonly BitSet tokenSet_3_ = new BitSet(mk_tokenSet_3_());