KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ro > infoiasi > donald > compiler > parser > SpecLexer


1 /* The following code was generated by JFlex 1.4 on 19/10/04 10:42 */
2
3 /*
4 A Simple Context Free Grammar Lexer
5 Catalin Hritcu <donald at infoiasi dot ro>
6 */

7
8 package ro.infoiasi.donald.compiler.parser;
9
10 /**
11  * This class is a scanner generated by
12  * <a HREF="http://www.jflex.de/">JFlex</a> 1.4
13  * on 19/10/04 10:42 from the specification file
14  * <tt>SpecLexer.flex</tt>
15  */

16 public class SpecLexer implements java_cup.runtime.Scanner {
17
18   /** This character denotes the end of file */
19   public static final int YYEOF = -1;
20
21   /** initial size of the lookahead buffer */
22   private static final int ZZ_BUFFERSIZE = 16384;
23
24   /** lexical states */
25   public static final int CODE = 1;
26   public static final int YYINITIAL = 0;
27
28   /**
29    * Translates characters to character classes
30    */

31   private static final char [] ZZ_CMAP = {
32      7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 2, 0, 3, 1, 7, 7,
33      7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0,
34      3, 0, 0, 0, 6, 26, 0, 0, 0, 0, 5, 0, 31, 0, 32, 4,
35      7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 27, 30, 0, 28, 0, 0,
36      0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
37      6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 33, 0, 34, 0, 6,
38      0, 9, 6, 10, 21, 13, 25, 12, 23, 14, 6, 11, 24, 15, 19, 16,
39      8, 6, 17, 20, 18, 6, 6, 22, 6, 6, 6, 35, 29, 36, 0, 7
40   };
41
42   /**
43    * Translates DFA states to action switch labels.
44    */

45   private static final int [] ZZ_ACTION = zzUnpackAction();
46
47   private static final String JavaDoc ZZ_ACTION_PACKED_0 =
48     "\2\0\1\1\2\2\1\1\1\3\13\4\1\1\1\5"+
49     "\1\6\1\7\1\10\1\11\1\12\1\13\1\1\2\14"+
50     "\1\2\1\0\15\4\2\0\1\15\1\16\1\0\11\4"+
51     "\1\17\4\4\1\0\1\20\1\0\4\4\1\21\1\4"+
52     "\1\22\4\4\1\23\1\4\1\24\1\25\1\0\5\4"+
53     "\1\26\3\4\1\27\1\30\1\4\1\31\1\4\1\32"+
54     "\1\33\3\4\1\34\5\4\1\35\1\36\3\4\1\37"+
55     "\1\4\1\40";
56
57   private static int [] zzUnpackAction() {
58     int [] result = new int[115];
59     int offset = 0;
60     offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
61     return result;
62   }
63
64   private static int zzUnpackAction(String JavaDoc packed, int offset, int [] result) {
65     int i = 0; /* index in packed string */
66     int j = offset; /* index in unpacked array */
67     int l = packed.length();
68     while (i < l) {
69       int count = packed.charAt(i++);
70       int value = packed.charAt(i++);
71       do result[j++] = value; while (--count > 0);
72     }
73     return j;
74   }
75
76
77   /**
78    * Translates a state to a row index in the transition table
79    */

80   private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
81
82   private static final String JavaDoc ZZ_ROWMAP_PACKED_0 =
83     "\0\0\0\45\0\112\0\157\0\112\0\224\0\112\0\271"+
84     "\0\336\0\u0103\0\u0128\0\u014d\0\u0172\0\u0197\0\u01bc\0\u01e1"+
85     "\0\u0206\0\u022b\0\u0250\0\u0275\0\112\0\112\0\112\0\112"+
86     "\0\112\0\112\0\u029a\0\112\0\u02bf\0\u02e4\0\u0309\0\u032e"+
87     "\0\u0353\0\u0378\0\u039d\0\u03c2\0\u03e7\0\u040c\0\u0431\0\u0456"+
88     "\0\u047b\0\u04a0\0\u04c5\0\u04ea\0\u050f\0\u0534\0\112\0\112"+
89     "\0\u0559\0\u057e\0\u05a3\0\u05c8\0\u05ed\0\u0612\0\u0637\0\u065c"+
90     "\0\u0681\0\u06a6\0\u06cb\0\u06f0\0\u0715\0\u073a\0\u075f\0\u0784"+
91     "\0\112\0\u07a9\0\u07ce\0\u07f3\0\u0818\0\u083d\0\271\0\u0862"+
92     "\0\271\0\u0887\0\u08ac\0\u08d1\0\u08f6\0\271\0\u091b\0\271"+
93     "\0\271\0\u0940\0\u0965\0\u098a\0\u09af\0\u09d4\0\u09f9\0\271"+
94     "\0\u0a1e\0\u0a43\0\u0a68\0\271\0\112\0\u0a8d\0\271\0\u0ab2"+
95     "\0\271\0\271\0\u0ad7\0\u0afc\0\u0b21\0\271\0\u0b46\0\u0b6b"+
96     "\0\u0b90\0\u0bb5\0\u0bda\0\271\0\271\0\u0bff\0\u0c24\0\u0c49"+
97     "\0\271\0\u0c6e\0\271";
98
99   private static int [] zzUnpackRowMap() {
100     int [] result = new int[115];
101     int offset = 0;
102     offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
103     return result;
104   }
105
106   private static int zzUnpackRowMap(String JavaDoc packed, int offset, int [] result) {
107     int i = 0; /* index in packed string */
108     int j = offset; /* index in unpacked array */
109     int l = packed.length();
110     while (i < l) {
111       int high = packed.charAt(i++) << 16;
112       result[j++] = high | packed.charAt(i++);
113     }
114     return j;
115   }
116
117   /**
118    * The transition table of the DFA
119    */

120   private static final int [] ZZ_TRANS = zzUnpackTrans();
121
122   private static final String JavaDoc ZZ_TRANS_PACKED_0 =
123     "\1\3\1\4\2\5\1\6\1\7\1\10\1\3\1\11"+
124     "\1\12\1\13\3\10\1\14\2\10\1\15\1\16\1\17"+
125     "\1\20\1\10\1\21\1\10\1\22\1\10\1\23\1\24"+
126     "\1\3\1\25\1\26\1\27\1\30\1\31\1\32\1\33"+
127     "\1\3\33\34\1\35\11\34\47\0\1\5\46\0\1\36"+
128     "\1\37\45\0\24\10\21\0\3\10\1\40\7\10\1\41"+
129     "\10\10\21\0\4\10\1\42\17\10\21\0\12\10\1\43"+
130     "\11\10\21\0\11\10\1\44\3\10\1\45\6\10\21\0"+
131     "\10\10\1\46\13\10\21\0\7\10\1\47\14\10\21\0"+
132     "\12\10\1\50\11\10\21\0\4\10\1\51\7\10\1\52"+
133     "\7\10\21\0\10\10\1\53\13\10\21\0\7\10\1\54"+
134     "\14\10\23\0\1\55\67\0\1\56\44\0\1\57\55\0"+
135     "\1\60\1\36\1\4\1\5\42\36\45\61\6\0\4\10"+
136     "\1\62\6\10\1\63\10\10\21\0\7\10\1\64\14\10"+
137     "\21\0\14\10\1\65\7\10\21\0\17\10\1\66\4\10"+
138     "\21\0\2\10\1\67\21\10\21\0\10\10\1\70\13\10"+
139     "\21\0\6\10\1\71\15\10\21\0\13\10\1\72\10\10"+
140     "\21\0\15\10\1\73\6\10\21\0\3\10\1\74\20\10"+
141     "\21\0\3\10\1\75\20\10\21\0\14\10\1\76\7\10"+
142     "\21\0\23\10\1\77\34\0\1\100\57\0\1\101\10\0"+
143     "\5\61\1\102\37\61\6\0\5\10\1\103\16\10\21\0"+
144     "\16\10\1\104\5\10\21\0\4\10\1\105\17\10\21\0"+
145     "\10\10\1\106\13\10\21\0\7\10\1\107\14\10\21\0"+
146     "\12\10\1\110\11\10\21\0\14\10\1\111\7\10\21\0"+
147     "\21\10\1\112\2\10\21\0\11\10\1\113\12\10\21\0"+
148     "\3\10\1\114\10\10\1\115\7\10\21\0\15\10\1\116"+
149     "\6\10\21\0\13\10\1\117\10\10\21\0\21\10\1\120"+
150     "\2\10\21\0\14\10\1\121\7\10\30\0\1\122\27\0"+
151     "\4\61\1\5\1\102\37\61\6\0\3\10\1\123\20\10"+
152     "\21\0\7\10\1\124\14\10\21\0\7\10\1\125\14\10"+
153     "\21\0\12\10\1\126\11\10\21\0\13\10\1\127\10\10"+
154     "\21\0\14\10\1\130\7\10\21\0\10\10\1\131\13\10"+
155     "\21\0\16\10\1\132\5\10\21\0\7\10\1\133\14\10"+
156     "\21\0\14\10\1\134\7\10\25\0\1\135\40\0\6\10"+
157     "\1\136\15\10\21\0\13\10\1\137\10\10\21\0\17\10"+
158     "\1\140\4\10\21\0\15\10\1\141\6\10\21\0\14\10"+
159     "\1\142\7\10\21\0\15\10\1\143\6\10\21\0\16\10"+
160     "\1\144\5\10\21\0\13\10\1\145\10\10\21\0\7\10"+
161     "\1\146\14\10\21\0\7\10\1\147\14\10\21\0\3\10"+
162     "\1\150\20\10\21\0\12\10\1\151\11\10\21\0\11\10"+
163     "\1\152\12\10\21\0\15\10\1\153\6\10\21\0\22\10"+
164     "\1\154\1\10\21\0\4\10\1\155\17\10\21\0\10\10"+
165     "\1\156\13\10\21\0\4\10\1\157\17\10\21\0\15\10"+
166     "\1\160\6\10\21\0\7\10\1\161\14\10\21\0\3\10"+
167     "\1\162\20\10\21\0\22\10\1\163\1\10\13\0";
168
169   private static int [] zzUnpackTrans() {
170     int [] result = new int[3219];
171     int offset = 0;
172     offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
173     return result;
174   }
175
176   private static int zzUnpackTrans(String JavaDoc packed, int offset, int [] result) {
177     int i = 0; /* index in packed string */
178     int j = offset; /* index in unpacked array */
179     int l = packed.length();
180     while (i < l) {
181       int count = packed.charAt(i++);
182       int value = packed.charAt(i++);
183       value--;
184       do result[j++] = value; while (--count > 0);
185     }
186     return j;
187   }
188
189
190   /* error codes */
191   private static final int ZZ_UNKNOWN_ERROR = 0;
192   private static final int ZZ_NO_MATCH = 1;
193   private static final int ZZ_PUSHBACK_2BIG = 2;
194
195   /* error messages for the codes above */
196   private static final String JavaDoc ZZ_ERROR_MSG[] = {
197     "Unkown internal scanner error",
198     "Error: could not match input",
199     "Error: pushback value was too large"
200   };
201
202   /**
203    * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
204    */

205   private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
206
207   private static final String JavaDoc ZZ_ATTRIBUTE_PACKED_0 =
208     "\2\0\1\11\1\1\1\11\1\1\1\11\15\1\6\11"+
209     "\1\1\1\11\2\1\1\0\15\1\2\0\2\11\1\0"+
210     "\16\1\1\0\1\11\1\0\17\1\1\0\12\1\1\11"+
211     "\26\1";
212
213   private static int [] zzUnpackAttribute() {
214     int [] result = new int[115];
215     int offset = 0;
216     offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
217     return result;
218   }
219
220   private static int zzUnpackAttribute(String JavaDoc packed, int offset, int [] result) {
221     int i = 0; /* index in packed string */
222     int j = offset; /* index in unpacked array */
223     int l = packed.length();
224     while (i < l) {
225       int count = packed.charAt(i++);
226       int value = packed.charAt(i++);
227       do result[j++] = value; while (--count > 0);
228     }
229     return j;
230   }
231
232   /** the input device */
233   private java.io.Reader JavaDoc zzReader;
234
235   /** the current state of the DFA */
236   private int zzState;
237
238   /** the current lexical state */
239   private int zzLexicalState = YYINITIAL;
240
241   /** this buffer contains the current text to be matched and is
242       the source of the yytext() string */

243   private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
244
245   /** the textposition at the last accepting state */
246   private int zzMarkedPos;
247
248   /** the textposition at the last state to be included in yytext */
249   private int zzPushbackPos;
250
251   /** the current text position in the buffer */
252   private int zzCurrentPos;
253
254   /** startRead marks the beginning of the yytext() string in the buffer */
255   private int zzStartRead;
256
257   /** endRead marks the last character in the buffer, that has been read
258       from input */

259   private int zzEndRead;
260
261   /** number of newlines encountered up to the start of the matched text */
262   private int yyline;
263
264   /** the number of characters up to the start of the matched text */
265   private int yychar;
266
267   /**
268    * the number of characters from the last newline up to the start of the
269    * matched text
270    */

271   private int yycolumn;
272
273   /**
274    * zzAtBOL == true <=> the scanner is currently at the beginning of a line
275    */

276   private boolean zzAtBOL = true;
277
278   /** zzAtEOF == true <=> the scanner is at the EOF */
279   private boolean zzAtEOF;
280
281   /** denotes if the user-EOF-code has already been executed */
282   private boolean zzEOFDone;
283
284   /* user code: */
285     class LexerError extends RuntimeException JavaDoc {
286         LexerError() { super(); }
287         LexerError(String JavaDoc msg, String JavaDoc reason, int line, int column) {
288             super("Lexer Error: "+msg+((reason.length()>0)? " \""+reason+"\"":"")
289                 +" line: "+line+" column:"+column );
290         }
291     }
292
293     private StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
294
295     private java_cup.runtime.Symbol symbol(int type) {
296         return new java_cup.runtime.Symbol(type, yyline+1, yycolumn+1);
297     }
298
299     private java_cup.runtime.Symbol symbol(int type, Object JavaDoc value) {
300         return new java_cup.runtime.Symbol(type, yyline+1, yycolumn+1, value);
301     }
302     
303     private void error(String JavaDoc msg) throws LexerError {
304         throw new LexerError(msg, yytext(), yyline, yycolumn);
305     }
306
307
308   /**
309    * Creates a new scanner
310    * There is also a java.io.InputStream version of this constructor.
311    *
312    * @param in the java.io.Reader to read input from.
313    */

314   public SpecLexer(java.io.Reader JavaDoc in) {
315     this.zzReader = in;
316   }
317
318   /**
319    * Creates a new scanner.
320    * There is also java.io.Reader version of this constructor.
321    *
322    * @param in the java.io.Inputstream to read input from.
323    */

324   public SpecLexer(java.io.InputStream JavaDoc in) {
325     this(new java.io.InputStreamReader JavaDoc(in));
326   }
327
328
329   /**
330    * Refills the input buffer.
331    *
332    * @return <code>false</code>, iff there was new input.
333    *
334    * @exception java.io.IOException if any I/O-Error occurs
335    */

336   private boolean zzRefill() throws java.io.IOException JavaDoc {
337
338     /* first: make room (if you can) */
339     if (zzStartRead > 0) {
340       System.arraycopy(zzBuffer, zzStartRead,
341                        zzBuffer, 0,
342                        zzEndRead-zzStartRead);
343
344       /* translate stored positions */
345       zzEndRead-= zzStartRead;
346       zzCurrentPos-= zzStartRead;
347       zzMarkedPos-= zzStartRead;
348       zzPushbackPos-= zzStartRead;
349       zzStartRead = 0;
350     }
351
352     /* is the buffer big enough? */
353     if (zzCurrentPos >= zzBuffer.length) {
354       /* if not: blow it up */
355       char newBuffer[] = new char[zzCurrentPos*2];
356       System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
357       zzBuffer = newBuffer;
358     }
359
360     /* finally: fill the buffer with new input */
361     int numRead = zzReader.read(zzBuffer, zzEndRead,
362                                             zzBuffer.length-zzEndRead);
363
364     if (numRead < 0) {
365       return true;
366     }
367     else {
368       zzEndRead+= numRead;
369       return false;
370     }
371   }
372
373     
374   /**
375    * Closes the input stream.
376    */

377   public final void yyclose() throws java.io.IOException JavaDoc {
378     zzAtEOF = true; /* indicate end of file */
379     zzEndRead = zzStartRead; /* invalidate buffer */
380
381     if (zzReader != null)
382       zzReader.close();
383   }
384
385
386   /**
387    * Resets the scanner to read from a new input stream.
388    * Does not close the old reader.
389    *
390    * All internal variables are reset, the old input stream
391    * <b>cannot</b> be reused (internal buffer is discarded and lost).
392    * Lexical state is set to <tt>ZZ_INITIAL</tt>.
393    *
394    * @param reader the new input stream
395    */

396   public final void yyreset(java.io.Reader JavaDoc reader) {
397     zzReader = reader;
398     zzAtBOL = true;
399     zzAtEOF = false;
400     zzEndRead = zzStartRead = 0;
401     zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;
402     yyline = yychar = yycolumn = 0;
403     zzLexicalState = YYINITIAL;
404   }
405
406
407   /**
408    * Returns the current lexical state.
409    */

410   public final int yystate() {
411     return zzLexicalState;
412   }
413
414
415   /**
416    * Enters a new lexical state
417    *
418    * @param newState the new lexical state
419    */

420   public final void yybegin(int newState) {
421     zzLexicalState = newState;
422   }
423
424
425   /**
426    * Returns the text matched by the current regular expression.
427    */

428   public final String JavaDoc yytext() {
429     return new String JavaDoc( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
430   }
431
432
433   /**
434    * Returns the character at position <tt>pos</tt> from the
435    * matched text.
436    *
437    * It is equivalent to yytext().charAt(pos), but faster
438    *
439    * @param pos the position of the character to fetch.
440    * A value from 0 to yylength()-1.
441    *
442    * @return the character at position pos
443    */

444   public final char yycharat(int pos) {
445     return zzBuffer[zzStartRead+pos];
446   }
447
448
449   /**
450    * Returns the length of the matched text region.
451    */

452   public final int yylength() {
453     return zzMarkedPos-zzStartRead;
454   }
455
456
457   /**
458    * Reports an error that occured while scanning.
459    *
460    * In a wellformed scanner (no or only correct usage of
461    * yypushback(int) and a match-all fallback rule) this method
462    * will only be called with things that "Can't Possibly Happen".
463    * If this method is called, something is seriously wrong
464    * (e.g. a JFlex bug producing a faulty scanner etc.).
465    *
466    * Usual syntax/scanner level error handling should be done
467    * in error fallback rules.
468    *
469    * @param errorCode the code of the errormessage to display
470    */

471   private void zzScanError(int errorCode) {
472     String JavaDoc message;
473     try {
474       message = ZZ_ERROR_MSG[errorCode];
475     }
476     catch (ArrayIndexOutOfBoundsException JavaDoc e) {
477       message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
478     }
479
480     throw new Error JavaDoc(message);
481   }
482
483
484   /**
485    * Pushes the specified amount of characters back into the input stream.
486    *
487    * They will be read again by then next call of the scanning method
488    *
489    * @param number the number of characters to be read again.
490    * This number must not be greater than yylength()!
491    */

492   public void yypushback(int number) {
493     if ( number > yylength() )
494       zzScanError(ZZ_PUSHBACK_2BIG);
495
496     zzMarkedPos -= number;
497   }
498
499
500   /**
501    * Contains user EOF-code, which will be executed exactly once,
502    * when the end of file is reached
503    */

504   private void zzDoEOF() throws java.io.IOException JavaDoc {
505     if (!zzEOFDone) {
506       zzEOFDone = true;
507       yyclose();
508     }
509   }
510
511
512   /**
513    * Resumes scanning until the next regular expression is matched,
514    * the end of input is encountered or an I/O-Error occurs.
515    *
516    * @return the next token
517    * @exception java.io.IOException if any I/O-Error occurs
518    */

519   public java_cup.runtime.Symbol next_token() throws java.io.IOException JavaDoc {
520     int zzInput;
521     int zzAction;
522
523     // cached fields:
524
int zzCurrentPosL;
525     int zzMarkedPosL;
526     int zzEndReadL = zzEndRead;
527     char [] zzBufferL = zzBuffer;
528     char [] zzCMapL = ZZ_CMAP;
529
530     int [] zzTransL = ZZ_TRANS;
531     int [] zzRowMapL = ZZ_ROWMAP;
532     int [] zzAttrL = ZZ_ATTRIBUTE;
533
534     while (true) {
535       zzMarkedPosL = zzMarkedPos;
536
537       boolean zzR = false;
538       for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL;
539                                                              zzCurrentPosL++) {
540         switch (zzBufferL[zzCurrentPosL]) {
541         case '\u000B':
542         case '\u000C':
543         case '\u0085':
544         case '\u2028':
545         case '\u2029':
546           yyline++;
547           yycolumn = 0;
548           zzR = false;
549           break;
550         case '\r':
551           yyline++;
552           yycolumn = 0;
553           zzR = true;
554           break;
555         case '\n':
556           if (zzR)
557             zzR = false;
558           else {
559             yyline++;
560             yycolumn = 0;
561           }
562           break;
563         default:
564           zzR = false;
565           yycolumn++;
566         }
567       }
568
569       if (zzR) {
570         // peek one character ahead if it is \n (if we have counted one line too much)
571
boolean zzPeek;
572         if (zzMarkedPosL < zzEndReadL)
573           zzPeek = zzBufferL[zzMarkedPosL] == '\n';
574         else if (zzAtEOF)
575           zzPeek = false;
576         else {
577           boolean eof = zzRefill();
578           zzMarkedPosL = zzMarkedPos;
579           zzBufferL = zzBuffer;
580           if (eof)
581             zzPeek = false;
582           else
583             zzPeek = zzBufferL[zzMarkedPosL] == '\n';
584         }
585         if (zzPeek) yyline--;
586       }
587       zzAction = -1;
588
589       zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
590   
591       zzState = zzLexicalState;
592
593
594       zzForAction: {
595         while (true) {
596     
597           if (zzCurrentPosL < zzEndReadL)
598             zzInput = zzBufferL[zzCurrentPosL++];
599           else if (zzAtEOF) {
600             zzInput = YYEOF;
601             break zzForAction;
602           }
603           else {
604             // store back cached positions
605
zzCurrentPos = zzCurrentPosL;
606             zzMarkedPos = zzMarkedPosL;
607             boolean eof = zzRefill();
608             // get translated positions and possibly new buffer
609
zzCurrentPosL = zzCurrentPos;
610             zzMarkedPosL = zzMarkedPos;
611             zzBufferL = zzBuffer;
612             zzEndReadL = zzEndRead;
613             if (eof) {
614               zzInput = YYEOF;
615               break zzForAction;
616             }
617             else {
618               zzInput = zzBufferL[zzCurrentPosL++];
619             }
620           }
621           int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
622           if (zzNext == -1) break zzForAction;
623           zzState = zzNext;
624
625           int zzAttributes = zzAttrL[zzState];
626           if ( (zzAttributes & 1) == 1 ) {
627             zzAction = zzState;
628             zzMarkedPosL = zzCurrentPosL;
629             if ( (zzAttributes & 8) == 8 ) break zzForAction;
630           }
631
632         }
633       }
634
635       // store back cached position
636
zzMarkedPos = zzMarkedPosL;
637
638       switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
639         case 1:
640           { error("illegal character");
641           }
642         case 33: break;
643         case 12:
644           { sb.append(yytext());
645           }
646         case 34: break;
647         case 7:
648           { return symbol(sym.SEMI);
649           }
650         case 35: break;
651         case 30:
652           { return symbol(sym.NONASSOC);
653           }
654         case 36: break;
655         case 32:
656           { return symbol(sym.NONTERMINAL);
657           }
658         case 37: break;
659         case 14:
660           { yybegin(YYINITIAL);
661                                 return symbol(sym.CODE_STRING, sb.toString());
662           }
663         case 38: break;
664         case 21:
665           { return symbol(sym.LEFT);
666           }
667         case 39: break;
668         case 5:
669           { return symbol(sym.COLON);
670           }
671         case 40: break;
672         case 23:
673           { return symbol(sym.START);
674           }
675         case 41: break;
676         case 11:
677           { return symbol(sym.RBRACK);
678           }
679         case 42: break;
680         case 4:
681           { return symbol(sym.ID, yytext());
682           }
683         case 43: break;
684         case 6:
685           { return symbol(sym.BAR);
686           }
687         case 44: break;
688         case 8:
689           { return symbol(sym.COMMA);
690           }
691         case 45: break;
692         case 26:
693           { return symbol(sym.ACTION);
694           }
695         case 46: break;
696         case 24:
697           { return symbol(sym.PERCENT_PREC);
698           }
699         case 47: break;
700         case 31:
701           { return symbol(sym.PRECEDENCE);
702           }
703         case 48: break;
704         case 3:
705           { return symbol(sym.STAR);
706           }
707         case 49: break;
708         case 29:
709           { return symbol(sym.TERMINAL);
710           }
711         case 50: break;
712         case 20:
713           { return symbol(sym.WITH);
714           }
715         case 51: break;
716         case 28:
717           { return symbol(sym.PACKAGE);
718           }
719         case 52: break;
720         case 17:
721           { return symbol(sym.CODE);
722           }
723         case 53: break;
724         case 15:
725           { return symbol(sym.NON);
726           }
727         case 54: break;
728         case 25:
729           { return symbol(sym.PARSER);
730           }
731         case 55: break;
732         case 16:
733           { return symbol(sym.COLON_COLON_EQUALS);
734           }
735         case 56: break;
736         case 22:
737           { return symbol(sym.RIGHT);
738           }
739         case 57: break;
740         case 27:
741           { return symbol(sym.IMPORT);
742           }
743         case 58: break;
744         case 19:
745           { return symbol(sym.SCAN);
746           }
747         case 59: break;
748         case 13:
749           { sb.setLength(0); yybegin(CODE);
750           }
751         case 60: break;
752         case 9:
753           { return symbol(sym.DOT);
754           }
755         case 61: break;
756         case 18:
757           { return symbol(sym.INIT);
758           }
759         case 62: break;
760         case 2:
761           { /* ignore */
762           }
763         case 63: break;
764         case 10:
765           { return symbol(sym.LBRACK);
766           }
767         case 64: break;
768         default:
769           if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
770             zzAtEOF = true;
771             zzDoEOF();
772               { return new java_cup.runtime.Symbol(sym.EOF); }
773           }
774           else {
775             zzScanError(ZZ_NO_MATCH);
776           }
777       }
778     }
779   }
780
781
782 }
783
Popular Tags