Primer paso para la referencia adelantada, guarda las declaraciones de tipos en una...
[PL2.git] / Analex.java
1 // $ANTLR : "Analex.g" -> "Analex.java"$
2
3 import java.io.InputStream;
4 import antlr.TokenStreamException;
5 import antlr.TokenStreamIOException;
6 import antlr.TokenStreamRecognitionException;
7 import antlr.CharStreamException;
8 import antlr.CharStreamIOException;
9 import antlr.ANTLRException;
10 import java.io.Reader;
11 import java.util.Hashtable;
12 import antlr.CharScanner;
13 import antlr.InputBuffer;
14 import antlr.ByteBuffer;
15 import antlr.CharBuffer;
16 import antlr.Token;
17 import antlr.CommonToken;
18 import antlr.RecognitionException;
19 import antlr.NoViableAltForCharException;
20 import antlr.MismatchedCharException;
21 import antlr.TokenStream;
22 import antlr.ANTLRHashString;
23 import antlr.LexerSharedInputState;
24 import antlr.collections.impl.BitSet;
25 import antlr.SemanticException;
26
27 public class Analex extends antlr.CharScanner implements AnalexTokenTypes, TokenStream
28  {
29 public Analex(InputStream in) {
30         this(new ByteBuffer(in));
31 }
32 public Analex(Reader in) {
33         this(new CharBuffer(in));
34 }
35 public Analex(InputBuffer ib) {
36         this(new LexerSharedInputState(ib));
37 }
38 public Analex(LexerSharedInputState state) {
39         super(state);
40         caseSensitiveLiterals = true;
41         setCaseSensitive(true);
42         literals = new Hashtable();
43         literals.put(new ANTLRHashString("exportacion", this), new Integer(33));
44         literals.put(new ANTLRHashString("entero", this), new Integer(73));
45         literals.put(new ANTLRHashString("si", this), new Integer(45));
46         literals.put(new ANTLRHashString("finsi", this), new Integer(48));
47         literals.put(new ANTLRHashString("y", this), new Integer(53));
48         literals.put(new ANTLRHashString("entonces", this), new Integer(46));
49         literals.put(new ANTLRHashString("no", this), new Integer(54));
50         literals.put(new ANTLRHashString("enteroareal", this), new Integer(79));
51         literals.put(new ANTLRHashString("modulo", this), new Integer(28));
52         literals.put(new ANTLRHashString("clase", this), new Integer(36));
53         literals.put(new ANTLRHashString("mientras", this), new Integer(49));
54         literals.put(new ANTLRHashString("oculto", this), new Integer(6));
55         literals.put(new ANTLRHashString("finmientras", this), new Integer(51));
56         literals.put(new ANTLRHashString("realaentero", this), new Integer(80));
57         literals.put(new ANTLRHashString("falso", this), new Integer(70));
58         literals.put(new ANTLRHashString("hacer", this), new Integer(50));
59         literals.put(new ANTLRHashString("importacion", this), new Integer(31));
60         literals.put(new ANTLRHashString("dev", this), new Integer(42));
61         literals.put(new ANTLRHashString("o", this), new Integer(52));
62         literals.put(new ANTLRHashString("cierto", this), new Integer(69));
63         literals.put(new ANTLRHashString("real", this), new Integer(74));
64         literals.put(new ANTLRHashString("sino", this), new Integer(47));
65         literals.put(new ANTLRHashString("crear", this), new Integer(44));
66         literals.put(new ANTLRHashString("inst", this), new Integer(35));
67         literals.put(new ANTLRHashString("formacion", this), new Integer(77));
68         literals.put(new ANTLRHashString("escribir", this), new Integer(78));
69         literals.put(new ANTLRHashString("logico", this), new Integer(75));
70         literals.put(new ANTLRHashString("caracter", this), new Integer(76));
71         literals.put(new ANTLRHashString("implementacion", this), new Integer(34));
72 }
73
74 public Token nextToken() throws TokenStreamException {
75         Token theRetToken=null;
76 tryAgain:
77         for (;;) {
78                 Token _token = null;
79                 int _ttype = Token.INVALID_TYPE;
80                 resetText();
81                 try {   // for char stream error handling
82                         try {   // for lexical error handling
83                                 switch ( LA(1)) {
84                                 case '\t':  case ' ':
85                                 {
86                                         mBT(true);
87                                         theRetToken=_returnToken;
88                                         break;
89                                 }
90                                 case '\n':  case '\r':
91                                 {
92                                         mSL(true);
93                                         theRetToken=_returnToken;
94                                         break;
95                                 }
96                                 case '(':
97                                 {
98                                         mPARENTESIS_ABIERTO(true);
99                                         theRetToken=_returnToken;
100                                         break;
101                                 }
102                                 case ')':
103                                 {
104                                         mPARENTESIS_CERRADO(true);
105                                         theRetToken=_returnToken;
106                                         break;
107                                 }
108                                 case '{':
109                                 {
110                                         mLLAVE_ABIERTA(true);
111                                         theRetToken=_returnToken;
112                                         break;
113                                 }
114                                 case '}':
115                                 {
116                                         mLLAVE_CERRADA(true);
117                                         theRetToken=_returnToken;
118                                         break;
119                                 }
120                                 case '[':
121                                 {
122                                         mCORCHETE_ABIERTO(true);
123                                         theRetToken=_returnToken;
124                                         break;
125                                 }
126                                 case ']':
127                                 {
128                                         mCORCHETE_CERRADO(true);
129                                         theRetToken=_returnToken;
130                                         break;
131                                 }
132                                 case ',':
133                                 {
134                                         mCOMA(true);
135                                         theRetToken=_returnToken;
136                                         break;
137                                 }
138                                 case ';':
139                                 {
140                                         mPUNTO_Y_COMA(true);
141                                         theRetToken=_returnToken;
142                                         break;
143                                 }
144                                 case '.':
145                                 {
146                                         mPUNTO(true);
147                                         theRetToken=_returnToken;
148                                         break;
149                                 }
150                                 case '+':
151                                 {
152                                         mMAS(true);
153                                         theRetToken=_returnToken;
154                                         break;
155                                 }
156                                 case '-':
157                                 {
158                                         mMENOS(true);
159                                         theRetToken=_returnToken;
160                                         break;
161                                 }
162                                 case '*':
163                                 {
164                                         mPOR(true);
165                                         theRetToken=_returnToken;
166                                         break;
167                                 }
168                                 case '=':
169                                 {
170                                         mIGUAL(true);
171                                         theRetToken=_returnToken;
172                                         break;
173                                 }
174                                 case '!':
175                                 {
176                                         mDISTINTO(true);
177                                         theRetToken=_returnToken;
178                                         break;
179                                 }
180                                 case '0':  case '1':  case '2':  case '3':
181                                 case '4':  case '5':  case '6':  case '7':
182                                 case '8':  case '9':
183                                 {
184                                         mNUMERO(true);
185                                         theRetToken=_returnToken;
186                                         break;
187                                 }
188                                 case '\'':
189                                 {
190                                         mLIT_CAR(true);
191                                         theRetToken=_returnToken;
192                                         break;
193                                 }
194                                 case 'A':  case 'B':  case 'C':  case 'D':
195                                 case 'E':  case 'F':  case 'G':  case 'H':
196                                 case 'I':  case 'J':  case 'K':  case 'L':
197                                 case 'M':  case 'N':  case 'O':  case 'P':
198                                 case 'Q':  case 'R':  case 'S':  case 'T':
199                                 case 'U':  case 'V':  case 'W':  case 'X':
200                                 case 'Y':  case 'Z':  case 'a':  case 'b':
201                                 case 'c':  case 'd':  case 'e':  case 'f':
202                                 case 'g':  case 'h':  case 'i':  case 'j':
203                                 case 'k':  case 'l':  case 'm':  case 'n':
204                                 case 'o':  case 'p':  case 'q':  case 'r':
205                                 case 's':  case 't':  case 'u':  case 'v':
206                                 case 'w':  case 'x':  case 'y':  case 'z':
207                                 {
208                                         mIDENT(true);
209                                         theRetToken=_returnToken;
210                                         break;
211                                 }
212                                 default:
213                                         if ((LA(1)=='/') && (LA(2)=='/')) {
214                                                 mCOMENT_LIN(true);
215                                                 theRetToken=_returnToken;
216                                         }
217                                         else if ((LA(1)=='<') && (LA(2)=='=')) {
218                                                 mMENOR_IGUAL(true);
219                                                 theRetToken=_returnToken;
220                                         }
221                                         else if ((LA(1)=='>') && (LA(2)=='=')) {
222                                                 mMAYOR_IGUAL(true);
223                                                 theRetToken=_returnToken;
224                                         }
225                                         else if ((LA(1)==':') && (LA(2)=='=')) {
226                                                 mASIGNACION(true);
227                                                 theRetToken=_returnToken;
228                                         }
229                                         else if ((LA(1)==':') && (true)) {
230                                                 mDOS_PUNTOS(true);
231                                                 theRetToken=_returnToken;
232                                         }
233                                         else if ((LA(1)=='/') && (true)) {
234                                                 mDIVISION(true);
235                                                 theRetToken=_returnToken;
236                                         }
237                                         else if ((LA(1)=='<') && (true)) {
238                                                 mMENOR(true);
239                                                 theRetToken=_returnToken;
240                                         }
241                                         else if ((LA(1)=='>') && (true)) {
242                                                 mMAYOR(true);
243                                                 theRetToken=_returnToken;
244                                         }
245                                 else {
246                                         if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
247                                 else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
248                                 }
249                                 }
250                                 if ( _returnToken==null ) continue tryAgain; // found SKIP token
251                                 _ttype = _returnToken.getType();
252                                 _returnToken.setType(_ttype);
253                                 return _returnToken;
254                         }
255                         catch (RecognitionException e) {
256                                 throw new TokenStreamRecognitionException(e);
257                         }
258                 }
259                 catch (CharStreamException cse) {
260                         if ( cse instanceof CharStreamIOException ) {
261                                 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
262                         }
263                         else {
264                                 throw new TokenStreamException(cse.getMessage());
265                         }
266                 }
267         }
268 }
269
270         public final void mBT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
271                 int _ttype; Token _token=null; int _begin=text.length();
272                 _ttype = BT;
273                 int _saveIndex;
274                 
275                 {
276                 switch ( LA(1)) {
277                 case ' ':
278                 {
279                         match(' ');
280                         break;
281                 }
282                 case '\t':
283                 {
284                         match('\t');
285                         break;
286                 }
287                 default:
288                 {
289                         throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
290                 }
291                 }
292                 }
293                 if ( inputState.guessing==0 ) {
294                         _ttype = Token.SKIP;
295                 }
296                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
297                         _token = makeToken(_ttype);
298                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
299                 }
300                 _returnToken = _token;
301         }
302         
303         public final void mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
304                 int _ttype; Token _token=null; int _begin=text.length();
305                 _ttype = SL;
306                 int _saveIndex;
307                 
308                 {
309                 switch ( LA(1)) {
310                 case '\r':
311                 {
312                         match("\r\n");
313                         break;
314                 }
315                 case '\n':
316                 {
317                         match("\n");
318                         break;
319                 }
320                 default:
321                 {
322                         throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
323                 }
324                 }
325                 }
326                 if ( inputState.guessing==0 ) {
327                         newline();_ttype = Token.SKIP;
328                 }
329                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
330                         _token = makeToken(_ttype);
331                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
332                 }
333                 _returnToken = _token;
334         }
335         
336         public final void mCOMENT_LIN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
337                 int _ttype; Token _token=null; int _begin=text.length();
338                 _ttype = COMENT_LIN;
339                 int _saveIndex;
340                 
341                 match("//");
342                 {
343                 _loop10027:
344                 do {
345                         if ((_tokenSet_0.member(LA(1))) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff'))) {
346                                 {
347                                 match(_tokenSet_0);
348                                 }
349                         }
350                         else {
351                                 break _loop10027;
352                         }
353                         
354                 } while (true);
355                 }
356                 mSL(false);
357                 if ( inputState.guessing==0 ) {
358                         newline();_ttype = Token.SKIP;
359                 }
360                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
361                         _token = makeToken(_ttype);
362                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
363                 }
364                 _returnToken = _token;
365         }
366         
367         public final void mDOS_PUNTOS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
368                 int _ttype; Token _token=null; int _begin=text.length();
369                 _ttype = DOS_PUNTOS;
370                 int _saveIndex;
371                 
372                 match(':');
373                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
374                         _token = makeToken(_ttype);
375                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
376                 }
377                 _returnToken = _token;
378         }
379         
380         public final void mPARENTESIS_ABIERTO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
381                 int _ttype; Token _token=null; int _begin=text.length();
382                 _ttype = PARENTESIS_ABIERTO;
383                 int _saveIndex;
384                 
385                 match('(');
386                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
387                         _token = makeToken(_ttype);
388                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
389                 }
390                 _returnToken = _token;
391         }
392         
393         public final void mPARENTESIS_CERRADO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
394                 int _ttype; Token _token=null; int _begin=text.length();
395                 _ttype = PARENTESIS_CERRADO;
396                 int _saveIndex;
397                 
398                 match(')');
399                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
400                         _token = makeToken(_ttype);
401                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
402                 }
403                 _returnToken = _token;
404         }
405         
406         public final void mLLAVE_ABIERTA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
407                 int _ttype; Token _token=null; int _begin=text.length();
408                 _ttype = LLAVE_ABIERTA;
409                 int _saveIndex;
410                 
411                 match('{');
412                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
413                         _token = makeToken(_ttype);
414                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
415                 }
416                 _returnToken = _token;
417         }
418         
419         public final void mLLAVE_CERRADA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
420                 int _ttype; Token _token=null; int _begin=text.length();
421                 _ttype = LLAVE_CERRADA;
422                 int _saveIndex;
423                 
424                 match('}');
425                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
426                         _token = makeToken(_ttype);
427                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
428                 }
429                 _returnToken = _token;
430         }
431         
432         public final void mCORCHETE_ABIERTO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
433                 int _ttype; Token _token=null; int _begin=text.length();
434                 _ttype = CORCHETE_ABIERTO;
435                 int _saveIndex;
436                 
437                 match('[');
438                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
439                         _token = makeToken(_ttype);
440                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
441                 }
442                 _returnToken = _token;
443         }
444         
445         public final void mCORCHETE_CERRADO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
446                 int _ttype; Token _token=null; int _begin=text.length();
447                 _ttype = CORCHETE_CERRADO;
448                 int _saveIndex;
449                 
450                 match(']');
451                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
452                         _token = makeToken(_ttype);
453                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
454                 }
455                 _returnToken = _token;
456         }
457         
458         public final void mCOMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
459                 int _ttype; Token _token=null; int _begin=text.length();
460                 _ttype = COMA;
461                 int _saveIndex;
462                 
463                 match(',');
464                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
465                         _token = makeToken(_ttype);
466                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
467                 }
468                 _returnToken = _token;
469         }
470         
471         public final void mPUNTO_Y_COMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
472                 int _ttype; Token _token=null; int _begin=text.length();
473                 _ttype = PUNTO_Y_COMA;
474                 int _saveIndex;
475                 
476                 match(';');
477                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
478                         _token = makeToken(_ttype);
479                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
480                 }
481                 _returnToken = _token;
482         }
483         
484         public final void mPUNTO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
485                 int _ttype; Token _token=null; int _begin=text.length();
486                 _ttype = PUNTO;
487                 int _saveIndex;
488                 
489                 match('.');
490                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
491                         _token = makeToken(_ttype);
492                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
493                 }
494                 _returnToken = _token;
495         }
496         
497         public final void mMAS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
498                 int _ttype; Token _token=null; int _begin=text.length();
499                 _ttype = MAS;
500                 int _saveIndex;
501                 
502                 match('+');
503                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
504                         _token = makeToken(_ttype);
505                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
506                 }
507                 _returnToken = _token;
508         }
509         
510         public final void mMENOS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
511                 int _ttype; Token _token=null; int _begin=text.length();
512                 _ttype = MENOS;
513                 int _saveIndex;
514                 
515                 match('-');
516                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
517                         _token = makeToken(_ttype);
518                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
519                 }
520                 _returnToken = _token;
521         }
522         
523         public final void mPOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
524                 int _ttype; Token _token=null; int _begin=text.length();
525                 _ttype = POR;
526                 int _saveIndex;
527                 
528                 match('*');
529                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
530                         _token = makeToken(_ttype);
531                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
532                 }
533                 _returnToken = _token;
534         }
535         
536         public final void mDIVISION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
537                 int _ttype; Token _token=null; int _begin=text.length();
538                 _ttype = DIVISION;
539                 int _saveIndex;
540                 
541                 match('/');
542                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
543                         _token = makeToken(_ttype);
544                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
545                 }
546                 _returnToken = _token;
547         }
548         
549         public final void mMENOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
550                 int _ttype; Token _token=null; int _begin=text.length();
551                 _ttype = MENOR;
552                 int _saveIndex;
553                 
554                 match('<');
555                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
556                         _token = makeToken(_ttype);
557                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
558                 }
559                 _returnToken = _token;
560         }
561         
562         public final void mMENOR_IGUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
563                 int _ttype; Token _token=null; int _begin=text.length();
564                 _ttype = MENOR_IGUAL;
565                 int _saveIndex;
566                 
567                 match("<=");
568                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
569                         _token = makeToken(_ttype);
570                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
571                 }
572                 _returnToken = _token;
573         }
574         
575         public final void mMAYOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
576                 int _ttype; Token _token=null; int _begin=text.length();
577                 _ttype = MAYOR;
578                 int _saveIndex;
579                 
580                 match('>');
581                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
582                         _token = makeToken(_ttype);
583                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
584                 }
585                 _returnToken = _token;
586         }
587         
588         public final void mMAYOR_IGUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
589                 int _ttype; Token _token=null; int _begin=text.length();
590                 _ttype = MAYOR_IGUAL;
591                 int _saveIndex;
592                 
593                 match(">=");
594                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
595                         _token = makeToken(_ttype);
596                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
597                 }
598                 _returnToken = _token;
599         }
600         
601         public final void mIGUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
602                 int _ttype; Token _token=null; int _begin=text.length();
603                 _ttype = IGUAL;
604                 int _saveIndex;
605                 
606                 match('=');
607                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
608                         _token = makeToken(_ttype);
609                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
610                 }
611                 _returnToken = _token;
612         }
613         
614         public final void mDISTINTO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
615                 int _ttype; Token _token=null; int _begin=text.length();
616                 _ttype = DISTINTO;
617                 int _saveIndex;
618                 
619                 match("!=");
620                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
621                         _token = makeToken(_ttype);
622                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
623                 }
624                 _returnToken = _token;
625         }
626         
627         public final void mASIGNACION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
628                 int _ttype; Token _token=null; int _begin=text.length();
629                 _ttype = ASIGNACION;
630                 int _saveIndex;
631                 
632                 match(":=");
633                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
634                         _token = makeToken(_ttype);
635                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
636                 }
637                 _returnToken = _token;
638         }
639         
640         protected final void mDIGITO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
641                 int _ttype; Token _token=null; int _begin=text.length();
642                 _ttype = DIGITO;
643                 int _saveIndex;
644                 
645                 {
646                 matchRange('0','9');
647                 }
648                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
649                         _token = makeToken(_ttype);
650                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
651                 }
652                 _returnToken = _token;
653         }
654         
655         protected final void mLETRA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
656                 int _ttype; Token _token=null; int _begin=text.length();
657                 _ttype = LETRA;
658                 int _saveIndex;
659                 
660                 {
661                 switch ( LA(1)) {
662                 case 'a':  case 'b':  case 'c':  case 'd':
663                 case 'e':  case 'f':  case 'g':  case 'h':
664                 case 'i':  case 'j':  case 'k':  case 'l':
665                 case 'm':  case 'n':  case 'o':  case 'p':
666                 case 'q':  case 'r':  case 's':  case 't':
667                 case 'u':  case 'v':  case 'w':  case 'x':
668                 case 'y':  case 'z':
669                 {
670                         matchRange('a','z');
671                         break;
672                 }
673                 case 'A':  case 'B':  case 'C':  case 'D':
674                 case 'E':  case 'F':  case 'G':  case 'H':
675                 case 'I':  case 'J':  case 'K':  case 'L':
676                 case 'M':  case 'N':  case 'O':  case 'P':
677                 case 'Q':  case 'R':  case 'S':  case 'T':
678                 case 'U':  case 'V':  case 'W':  case 'X':
679                 case 'Y':  case 'Z':
680                 {
681                         matchRange('A','Z');
682                         break;
683                 }
684                 default:
685                 {
686                         throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
687                 }
688                 }
689                 }
690                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
691                         _token = makeToken(_ttype);
692                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
693                 }
694                 _returnToken = _token;
695         }
696         
697         public final void mNUMERO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
698                 int _ttype; Token _token=null; int _begin=text.length();
699                 _ttype = NUMERO;
700                 int _saveIndex;
701                 
702                 boolean synPredMatched10057 = false;
703                 if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_1.member(LA(2))))) {
704                         int _m10057 = mark();
705                         synPredMatched10057 = true;
706                         inputState.guessing++;
707                         try {
708                                 {
709                                 {
710                                 int _cnt10056=0;
711                                 _loop10056:
712                                 do {
713                                         if (((LA(1) >= '0' && LA(1) <= '9'))) {
714                                                 mDIGITO(false);
715                                         }
716                                         else {
717                                                 if ( _cnt10056>=1 ) { break _loop10056; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
718                                         }
719                                         
720                                         _cnt10056++;
721                                 } while (true);
722                                 }
723                                 match('.');
724                                 }
725                         }
726                         catch (RecognitionException pe) {
727                                 synPredMatched10057 = false;
728                         }
729                         rewind(_m10057);
730 inputState.guessing--;
731                 }
732                 if ( synPredMatched10057 ) {
733                         {
734                         int _cnt10059=0;
735                         _loop10059:
736                         do {
737                                 if (((LA(1) >= '0' && LA(1) <= '9'))) {
738                                         mDIGITO(false);
739                                 }
740                                 else {
741                                         if ( _cnt10059>=1 ) { break _loop10059; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
742                                 }
743                                 
744                                 _cnt10059++;
745                         } while (true);
746                         }
747                         match('.');
748                         {
749                         int _cnt10061=0;
750                         _loop10061:
751                         do {
752                                 if (((LA(1) >= '0' && LA(1) <= '9'))) {
753                                         mDIGITO(false);
754                                 }
755                                 else {
756                                         if ( _cnt10061>=1 ) { break _loop10061; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
757                                 }
758                                 
759                                 _cnt10061++;
760                         } while (true);
761                         }
762                         if ( inputState.guessing==0 ) {
763                                 _ttype = LIT_REAL;
764                         }
765                 }
766                 else {
767                         boolean synPredMatched10065 = false;
768                         if ((((LA(1) >= '0' && LA(1) <= '9')) && (true))) {
769                                 int _m10065 = mark();
770                                 synPredMatched10065 = true;
771                                 inputState.guessing++;
772                                 try {
773                                         {
774                                         {
775                                         int _cnt10064=0;
776                                         _loop10064:
777                                         do {
778                                                 if (((LA(1) >= '0' && LA(1) <= '9'))) {
779                                                         mDIGITO(false);
780                                                 }
781                                                 else {
782                                                         if ( _cnt10064>=1 ) { break _loop10064; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
783                                                 }
784                                                 
785                                                 _cnt10064++;
786                                         } while (true);
787                                         }
788                                         }
789                                 }
790                                 catch (RecognitionException pe) {
791                                         synPredMatched10065 = false;
792                                 }
793                                 rewind(_m10065);
794 inputState.guessing--;
795                         }
796                         if ( synPredMatched10065 ) {
797                                 {
798                                 int _cnt10067=0;
799                                 _loop10067:
800                                 do {
801                                         if (((LA(1) >= '0' && LA(1) <= '9'))) {
802                                                 mDIGITO(false);
803                                         }
804                                         else {
805                                                 if ( _cnt10067>=1 ) { break _loop10067; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
806                                         }
807                                         
808                                         _cnt10067++;
809                                 } while (true);
810                                 }
811                                 if ( inputState.guessing==0 ) {
812                                         _ttype = LIT_ENTERO;
813                                 }
814                         }
815                         else {
816                                 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
817                         }
818                         }
819                         if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
820                                 _token = makeToken(_ttype);
821                                 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
822                         }
823                         _returnToken = _token;
824                 }
825                 
826         public final void mLIT_CAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
827                 int _ttype; Token _token=null; int _begin=text.length();
828                 _ttype = LIT_CAR;
829                 int _saveIndex;
830                 
831                 _saveIndex=text.length();
832                 match('\'');
833                 text.setLength(_saveIndex);
834                 {
835                 {
836                 match(_tokenSet_2);
837                 }
838                 }
839                 _saveIndex=text.length();
840                 match('\'');
841                 text.setLength(_saveIndex);
842                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
843                         _token = makeToken(_ttype);
844                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
845                 }
846                 _returnToken = _token;
847         }
848         
849         public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
850                 int _ttype; Token _token=null; int _begin=text.length();
851                 _ttype = IDENT;
852                 int _saveIndex;
853                 
854                 mLETRA(false);
855                 {
856                 _loop10073:
857                 do {
858                         switch ( LA(1)) {
859                         case 'A':  case 'B':  case 'C':  case 'D':
860                         case 'E':  case 'F':  case 'G':  case 'H':
861                         case 'I':  case 'J':  case 'K':  case 'L':
862                         case 'M':  case 'N':  case 'O':  case 'P':
863                         case 'Q':  case 'R':  case 'S':  case 'T':
864                         case 'U':  case 'V':  case 'W':  case 'X':
865                         case 'Y':  case 'Z':  case 'a':  case 'b':
866                         case 'c':  case 'd':  case 'e':  case 'f':
867                         case 'g':  case 'h':  case 'i':  case 'j':
868                         case 'k':  case 'l':  case 'm':  case 'n':
869                         case 'o':  case 'p':  case 'q':  case 'r':
870                         case 's':  case 't':  case 'u':  case 'v':
871                         case 'w':  case 'x':  case 'y':  case 'z':
872                         {
873                                 mLETRA(false);
874                                 break;
875                         }
876                         case '0':  case '1':  case '2':  case '3':
877                         case '4':  case '5':  case '6':  case '7':
878                         case '8':  case '9':
879                         {
880                                 mDIGITO(false);
881                                 break;
882                         }
883                         default:
884                         {
885                                 break _loop10073;
886                         }
887                         }
888                 } while (true);
889                 }
890                 _ttype = testLiteralsTable(_ttype);
891                 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
892                         _token = makeToken(_ttype);
893                         _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
894                 }
895                 _returnToken = _token;
896         }
897         
898         
899         private static final long[] mk_tokenSet_0() {
900                 long[] data = new long[8];
901                 data[0]=-1032L;
902                 for (int i = 1; i<=3; i++) { data[i]=-1L; }
903                 return data;
904         }
905         public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
906         private static final long[] mk_tokenSet_1() {
907                 long[] data = { 288019269919178752L, 0L, 0L, 0L, 0L};
908                 return data;
909         }
910         public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
911         private static final long[] mk_tokenSet_2() {
912                 long[] data = new long[8];
913                 data[0]=-549755823624L;
914                 for (int i = 1; i<=3; i++) { data[i]=-1L; }
915                 return data;
916         }
917         public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
918         
919         }