001 /* The following code was generated by JFlex 1.4 on 2018-09-03 16:10 */ 002 003 package AST; 004 005 import beaver.Symbol; 006 import beaver.Scanner; 007 import AST.PicoJavaParser.Terminals; 008 009 010 /** 011 * This class is a scanner generated by 012 * <a href="http://www.jflex.de/">JFlex</a> 1.4 013 * on 2018-09-03 16:10 from the specification file 014 * <tt>/home/csz-naf/examples/PicoJavaMethods/spec/picojava-method.flex</tt> 015 */ 016 public final class PicoJavaScanner extends Scanner { 017 018 /** This character denotes the end of file */ 019 public static final int YYEOF = -1; 020 021 /** initial size of the lookahead buffer */ 022 private static final int ZZ_BUFFERSIZE = 16384; 023 024 /** lexical states */ 025 public static final int YYINITIAL = 0; 026 027 /** 028 * Translates characters to character classes 029 */ 030 private static final String ZZ_CMAP_PACKED = 031 "\11\0\1\3\1\2\1\0\1\3\1\1\22\0\1\3\7\0\1\26"+ 032 "\1\27\2\0\1\34\1\0\1\33\1\4\12\6\1\0\1\32\1\0"+ 033 "\1\35\3\0\32\5\6\0\1\11\1\5\1\7\1\17\1\13\1\25"+ 034 "\1\5\1\21\1\22\2\5\1\10\1\5\1\16\3\5\1\23\1\12"+ 035 "\1\15\1\24\1\5\1\20\1\14\2\5\1\30\1\0\1\31\54\0"+ 036 "\1\5\12\0\1\5\4\0\1\5\5\0\27\5\1\0\37\5\1\0"+ 037 "\u013f\5\31\0\162\5\4\0\14\5\16\0\5\5\11\0\1\5\213\0"+ 038 "\1\5\13\0\1\5\1\0\3\5\1\0\1\5\1\0\24\5\1\0"+ 039 "\54\5\1\0\46\5\1\0\5\5\4\0\202\5\10\0\105\5\1\0"+ 040 "\46\5\2\0\2\5\6\0\20\5\41\0\46\5\2\0\1\5\7\0"+ 041 "\47\5\110\0\33\5\5\0\3\5\56\0\32\5\5\0\13\5\25\0"+ 042 "\12\6\4\0\2\5\1\0\143\5\1\0\1\5\17\0\2\5\7\0"+ 043 "\2\5\12\6\3\5\2\0\1\5\20\0\1\5\1\0\36\5\35\0"+ 044 "\3\5\60\0\46\5\13\0\1\5\u0152\0\66\5\3\0\1\5\22\0"+ 045 "\1\5\7\0\12\5\4\0\12\6\25\0\10\5\2\0\2\5\2\0"+ 046 "\26\5\1\0\7\5\1\0\1\5\3\0\4\5\3\0\1\5\36\0"+ 047 "\2\5\1\0\3\5\4\0\12\6\2\5\23\0\6\5\4\0\2\5"+ 048 "\2\0\26\5\1\0\7\5\1\0\2\5\1\0\2\5\1\0\2\5"+ 049 "\37\0\4\5\1\0\1\5\7\0\12\6\2\0\3\5\20\0\11\5"+ 050 "\1\0\3\5\1\0\26\5\1\0\7\5\1\0\2\5\1\0\5\5"+ 051 "\3\0\1\5\22\0\1\5\17\0\2\5\4\0\12\6\25\0\10\5"+ 052 "\2\0\2\5\2\0\26\5\1\0\7\5\1\0\2\5\1\0\5\5"+ 053 "\3\0\1\5\36\0\2\5\1\0\3\5\4\0\12\6\1\0\1\5"+ 054 "\21\0\1\5\1\0\6\5\3\0\3\5\1\0\4\5\3\0\2\5"+ 055 "\1\0\1\5\1\0\2\5\3\0\2\5\3\0\3\5\3\0\10\5"+ 056 "\1\0\3\5\55\0\11\6\25\0\10\5\1\0\3\5\1\0\27\5"+ 057 "\1\0\12\5\1\0\5\5\46\0\2\5\4\0\12\6\25\0\10\5"+ 058 "\1\0\3\5\1\0\27\5\1\0\12\5\1\0\5\5\3\0\1\5"+ 059 "\40\0\1\5\1\0\2\5\4\0\12\6\25\0\10\5\1\0\3\5"+ 060 "\1\0\27\5\1\0\20\5\46\0\2\5\4\0\12\6\25\0\22\5"+ 061 "\3\0\30\5\1\0\11\5\1\0\1\5\2\0\7\5\72\0\60\5"+ 062 "\1\0\2\5\14\0\7\5\11\0\12\6\47\0\2\5\1\0\1\5"+ 063 "\2\0\2\5\1\0\1\5\2\0\1\5\6\0\4\5\1\0\7\5"+ 064 "\1\0\3\5\1\0\1\5\1\0\1\5\2\0\2\5\1\0\4\5"+ 065 "\1\0\2\5\11\0\1\5\2\0\5\5\1\0\1\5\11\0\12\6"+ 066 "\2\0\2\5\42\0\1\5\37\0\12\6\26\0\10\5\1\0\42\5"+ 067 "\35\0\4\5\164\0\42\5\1\0\5\5\1\0\2\5\25\0\12\6"+ 068 "\6\0\6\5\112\0\46\5\12\0\51\5\7\0\132\5\5\0\104\5"+ 069 "\5\0\122\5\6\0\7\5\1\0\77\5\1\0\1\5\1\0\4\5"+ 070 "\2\0\7\5\1\0\1\5\1\0\4\5\2\0\47\5\1\0\1\5"+ 071 "\1\0\4\5\2\0\37\5\1\0\1\5\1\0\4\5\2\0\7\5"+ 072 "\1\0\1\5\1\0\4\5\2\0\7\5\1\0\7\5\1\0\27\5"+ 073 "\1\0\37\5\1\0\1\5\1\0\4\5\2\0\7\5\1\0\47\5"+ 074 "\1\0\23\5\16\0\11\6\56\0\125\5\14\0\u026c\5\2\0\10\5"+ 075 "\12\0\32\5\5\0\113\5\25\0\15\5\1\0\4\5\16\0\22\5"+ 076 "\16\0\22\5\16\0\15\5\1\0\3\5\17\0\64\5\43\0\1\5"+ 077 "\4\0\1\5\3\0\12\6\46\0\12\6\6\0\130\5\10\0\51\5"+ 078 "\127\0\35\5\51\0\12\6\36\5\2\0\5\5\u038b\0\154\5\224\0"+ 079 "\234\5\4\0\132\5\6\0\26\5\2\0\6\5\2\0\46\5\2\0"+ 080 "\6\5\2\0\10\5\1\0\1\5\1\0\1\5\1\0\1\5\1\0"+ 081 "\37\5\2\0\65\5\1\0\7\5\1\0\1\5\3\0\3\5\1\0"+ 082 "\7\5\3\0\4\5\2\0\6\5\4\0\15\5\5\0\3\5\1\0"+ 083 "\7\5\164\0\1\5\15\0\1\5\202\0\1\5\4\0\1\5\2\0"+ 084 "\12\5\1\0\1\5\3\0\5\5\6\0\1\5\1\0\1\5\1\0"+ 085 "\1\5\1\0\4\5\1\0\3\5\1\0\7\5\3\0\3\5\5\0"+ 086 "\5\5\u0ebb\0\2\5\52\0\5\5\5\0\2\5\4\0\126\5\6\0"+ 087 "\3\5\1\0\132\5\1\0\4\5\5\0\50\5\4\0\136\5\21\0"+ 088 "\30\5\70\0\20\5\u0200\0\u19b6\5\112\0\u51a6\5\132\0\u048d\5\u0773\0"+ 089 "\u2ba4\5\u215c\0\u012e\5\2\0\73\5\225\0\7\5\14\0\5\5\5\0"+ 090 "\1\5\1\0\12\5\1\0\15\5\1\0\5\5\1\0\1\5\1\0"+ 091 "\2\5\1\0\2\5\1\0\154\5\41\0\u016b\5\22\0\100\5\2\0"+ 092 "\66\5\50\0\14\5\164\0\5\5\1\0\207\5\23\0\12\6\7\0"+ 093 "\32\5\6\0\32\5\13\0\131\5\3\0\6\5\2\0\6\5\2\0"+ 094 "\6\5\2\0\3\5\43\0"; 095 096 /** 097 * Translates characters to character classes 098 */ 099 private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); 100 101 /** 102 * Translates DFA states to action switch labels. 103 */ 104 private static final int [] ZZ_ACTION = zzUnpackAction(); 105 106 private static final String ZZ_ACTION_PACKED_0 = 107 "\1\0\1\1\2\2\1\1\7\3\1\4\1\5\1\6"+ 108 "\1\7\1\10\1\11\1\12\1\13\1\2\16\3\1\14"+ 109 "\2\3\1\15\1\3\1\16\2\3\1\17\1\20"; 110 111 private static int [] zzUnpackAction() { 112 int [] result = new int[45]; 113 int offset = 0; 114 offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); 115 return result; 116 } 117 118 private static int zzUnpackAction(String packed, int offset, int [] result) { 119 int i = 0; /* index in packed string */ 120 int j = offset; /* index in unpacked array */ 121 int l = packed.length(); 122 while (i < l) { 123 int count = packed.charAt(i++); 124 int value = packed.charAt(i++); 125 do result[j++] = value; while (--count > 0); 126 } 127 return j; 128 } 129 130 131 /** 132 * Translates a state to a row index in the transition table 133 */ 134 private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); 135 136 private static final String ZZ_ROWMAP_PACKED_0 = 137 "\0\0\0\36\0\74\0\36\0\132\0\170\0\226\0\264"+ 138 "\0\322\0\360\0\u010e\0\u012c\0\36\0\36\0\36\0\36"+ 139 "\0\36\0\36\0\36\0\36\0\u014a\0\u0168\0\u0186\0\u01a4"+ 140 "\0\u01c2\0\u01e0\0\u01fe\0\u021c\0\u023a\0\u0258\0\u0276\0\u0294"+ 141 "\0\u02b2\0\u02d0\0\u02ee\0\170\0\u030c\0\u032a\0\170\0\u0348"+ 142 "\0\170\0\u0366\0\u0384\0\170\0\170"; 143 144 private static int [] zzUnpackRowMap() { 145 int [] result = new int[45]; 146 int offset = 0; 147 offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); 148 return result; 149 } 150 151 private static int zzUnpackRowMap(String packed, int offset, int [] result) { 152 int i = 0; /* index in packed string */ 153 int j = offset; /* index in unpacked array */ 154 int l = packed.length(); 155 while (i < l) { 156 int high = packed.charAt(i++) << 16; 157 result[j++] = high | packed.charAt(i++); 158 } 159 return j; 160 } 161 162 /** 163 * The transition table of the DFA 164 */ 165 private static final int [] ZZ_TRANS = zzUnpackTrans(); 166 167 private static final String ZZ_TRANS_PACKED_0 = 168 "\1\2\1\3\2\4\1\5\1\6\1\2\1\7\3\6"+ 169 "\1\10\1\6\1\11\2\6\1\12\2\6\1\13\1\6"+ 170 "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\23"+ 171 "\1\24\40\0\1\4\37\0\1\25\36\0\21\6\15\0"+ 172 "\3\6\1\26\15\6\15\0\7\6\1\27\11\6\15\0"+ 173 "\16\6\1\30\2\6\15\0\14\6\1\31\4\6\15\0"+ 174 "\6\6\1\32\12\6\15\0\4\6\1\33\14\6\10\0"+ 175 "\1\25\1\3\1\4\33\25\5\0\4\6\1\34\14\6"+ 176 "\15\0\10\6\1\35\10\6\15\0\17\6\1\36\1\6"+ 177 "\15\0\15\6\1\37\3\6\15\0\10\6\1\40\10\6"+ 178 "\15\0\3\6\1\41\15\6\15\0\5\6\1\42\13\6"+ 179 "\15\0\6\6\1\43\12\6\15\0\6\6\1\44\12\6"+ 180 "\15\0\3\6\1\45\15\6\15\0\17\6\1\46\1\6"+ 181 "\15\0\5\6\1\36\13\6\15\0\5\6\1\47\13\6"+ 182 "\15\0\11\6\1\50\7\6\15\0\6\6\1\51\12\6"+ 183 "\15\0\16\6\1\52\2\6\15\0\12\6\1\53\6\6"+ 184 "\15\0\11\6\1\54\7\6\15\0\5\6\1\55\13\6"+ 185 "\10\0"; 186 187 private static int [] zzUnpackTrans() { 188 int [] result = new int[930]; 189 int offset = 0; 190 offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); 191 return result; 192 } 193 194 private static int zzUnpackTrans(String packed, int offset, int [] result) { 195 int i = 0; /* index in packed string */ 196 int j = offset; /* index in unpacked array */ 197 int l = packed.length(); 198 while (i < l) { 199 int count = packed.charAt(i++); 200 int value = packed.charAt(i++); 201 value--; 202 do result[j++] = value; while (--count > 0); 203 } 204 return j; 205 } 206 207 208 /* error codes */ 209 private static final int ZZ_UNKNOWN_ERROR = 0; 210 private static final int ZZ_NO_MATCH = 1; 211 private static final int ZZ_PUSHBACK_2BIG = 2; 212 213 /* error messages for the codes above */ 214 private static final String ZZ_ERROR_MSG[] = { 215 "Unkown internal scanner error", 216 "Error: could not match input", 217 "Error: pushback value was too large" 218 }; 219 220 /** 221 * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> 222 */ 223 private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); 224 225 private static final String ZZ_ATTRIBUTE_PACKED_0 = 226 "\1\0\1\11\1\1\1\11\10\1\10\11\31\1"; 227 228 private static int [] zzUnpackAttribute() { 229 int [] result = new int[45]; 230 int offset = 0; 231 offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); 232 return result; 233 } 234 235 private static int zzUnpackAttribute(String packed, int offset, int [] result) { 236 int i = 0; /* index in packed string */ 237 int j = offset; /* index in unpacked array */ 238 int l = packed.length(); 239 while (i < l) { 240 int count = packed.charAt(i++); 241 int value = packed.charAt(i++); 242 do result[j++] = value; while (--count > 0); 243 } 244 return j; 245 } 246 247 /** the input device */ 248 private java.io.Reader zzReader; 249 250 /** the current state of the DFA */ 251 private int zzState; 252 253 /** the current lexical state */ 254 private int zzLexicalState = YYINITIAL; 255 256 /** this buffer contains the current text to be matched and is 257 the source of the yytext() string */ 258 private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; 259 260 /** the textposition at the last accepting state */ 261 private int zzMarkedPos; 262 263 /** the textposition at the last state to be included in yytext */ 264 private int zzPushbackPos; 265 266 /** the current text position in the buffer */ 267 private int zzCurrentPos; 268 269 /** startRead marks the beginning of the yytext() string in the buffer */ 270 private int zzStartRead; 271 272 /** endRead marks the last character in the buffer, that has been read 273 from input */ 274 private int zzEndRead; 275 276 /** number of newlines encountered up to the start of the matched text */ 277 private int yyline; 278 279 /** the number of characters up to the start of the matched text */ 280 private int yychar; 281 282 /** 283 * the number of characters from the last newline up to the start of the 284 * matched text 285 */ 286 private int yycolumn; 287 288 /** 289 * zzAtBOL == true <=> the scanner is currently at the beginning of a line 290 */ 291 private boolean zzAtBOL = true; 292 293 /** zzAtEOF == true <=> the scanner is at the EOF */ 294 private boolean zzAtEOF; 295 296 /* user code: */ 297 private Symbol sym(short id) { 298 return new Symbol(id, yyline + 1, yycolumn + 1, yylength(), yytext()); 299 } 300 301 302 /** 303 * Creates a new scanner 304 * There is also a java.io.InputStream version of this constructor. 305 * 306 * @param in the java.io.Reader to read input from. 307 */ 308 public PicoJavaScanner(java.io.Reader in) { 309 this.zzReader = in; 310 } 311 312 /** 313 * Creates a new scanner. 314 * There is also java.io.Reader version of this constructor. 315 * 316 * @param in the java.io.Inputstream to read input from. 317 */ 318 public PicoJavaScanner(java.io.InputStream in) { 319 this(new java.io.InputStreamReader(in)); 320 } 321 322 /** 323 * Unpacks the compressed character translation table. 324 * 325 * @param packed the packed character translation table 326 * @return the unpacked character translation table 327 */ 328 private static char [] zzUnpackCMap(String packed) { 329 char [] map = new char[0x10000]; 330 int i = 0; /* index in packed string */ 331 int j = 0; /* index in unpacked array */ 332 while (i < 1268) { 333 int count = packed.charAt(i++); 334 char value = packed.charAt(i++); 335 do map[j++] = value; while (--count > 0); 336 } 337 return map; 338 } 339 340 341 /** 342 * Refills the input buffer. 343 * 344 * @return <code>false</code>, iff there was new input. 345 * 346 * @exception java.io.IOException if any I/O-Error occurs 347 */ 348 private boolean zzRefill() throws java.io.IOException { 349 350 /* first: make room (if you can) */ 351 if (zzStartRead > 0) { 352 System.arraycopy(zzBuffer, zzStartRead, 353 zzBuffer, 0, 354 zzEndRead-zzStartRead); 355 356 /* translate stored positions */ 357 zzEndRead-= zzStartRead; 358 zzCurrentPos-= zzStartRead; 359 zzMarkedPos-= zzStartRead; 360 zzPushbackPos-= zzStartRead; 361 zzStartRead = 0; 362 } 363 364 /* is the buffer big enough? */ 365 if (zzCurrentPos >= zzBuffer.length) { 366 /* if not: blow it up */ 367 char newBuffer[] = new char[zzCurrentPos*2]; 368 System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); 369 zzBuffer = newBuffer; 370 } 371 372 /* finally: fill the buffer with new input */ 373 int numRead = zzReader.read(zzBuffer, zzEndRead, 374 zzBuffer.length-zzEndRead); 375 376 if (numRead < 0) { 377 return true; 378 } 379 else { 380 zzEndRead+= numRead; 381 return false; 382 } 383 } 384 385 386 /** 387 * Closes the input stream. 388 */ 389 public final void yyclose() throws java.io.IOException { 390 zzAtEOF = true; /* indicate end of file */ 391 zzEndRead = zzStartRead; /* invalidate buffer */ 392 393 if (zzReader != null) 394 zzReader.close(); 395 } 396 397 398 /** 399 * Resets the scanner to read from a new input stream. 400 * Does not close the old reader. 401 * 402 * All internal variables are reset, the old input stream 403 * <b>cannot</b> be reused (internal buffer is discarded and lost). 404 * Lexical state is set to <tt>ZZ_INITIAL</tt>. 405 * 406 * @param reader the new input stream 407 */ 408 public final void yyreset(java.io.Reader reader) { 409 zzReader = reader; 410 zzAtBOL = true; 411 zzAtEOF = false; 412 zzEndRead = zzStartRead = 0; 413 zzCurrentPos = zzMarkedPos = zzPushbackPos = 0; 414 yyline = yychar = yycolumn = 0; 415 zzLexicalState = YYINITIAL; 416 } 417 418 419 /** 420 * Returns the current lexical state. 421 */ 422 public final int yystate() { 423 return zzLexicalState; 424 } 425 426 427 /** 428 * Enters a new lexical state 429 * 430 * @param newState the new lexical state 431 */ 432 public final void yybegin(int newState) { 433 zzLexicalState = newState; 434 } 435 436 437 /** 438 * Returns the text matched by the current regular expression. 439 */ 440 public final String yytext() { 441 return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); 442 } 443 444 445 /** 446 * Returns the character at position <tt>pos</tt> from the 447 * matched text. 448 * 449 * It is equivalent to yytext().charAt(pos), but faster 450 * 451 * @param pos the position of the character to fetch. 452 * A value from 0 to yylength()-1. 453 * 454 * @return the character at position pos 455 */ 456 public final char yycharat(int pos) { 457 return zzBuffer[zzStartRead+pos]; 458 } 459 460 461 /** 462 * Returns the length of the matched text region. 463 */ 464 public final int yylength() { 465 return zzMarkedPos-zzStartRead; 466 } 467 468 469 /** 470 * Reports an error that occured while scanning. 471 * 472 * In a wellformed scanner (no or only correct usage of 473 * yypushback(int) and a match-all fallback rule) this method 474 * will only be called with things that "Can't Possibly Happen". 475 * If this method is called, something is seriously wrong 476 * (e.g. a JFlex bug producing a faulty scanner etc.). 477 * 478 * Usual syntax/scanner level error handling should be done 479 * in error fallback rules. 480 * 481 * @param errorCode the code of the errormessage to display 482 */ 483 private void zzScanError(int errorCode) { 484 String message; 485 try { 486 message = ZZ_ERROR_MSG[errorCode]; 487 } 488 catch (ArrayIndexOutOfBoundsException e) { 489 message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; 490 } 491 492 throw new Error(message); 493 } 494 495 496 /** 497 * Pushes the specified amount of characters back into the input stream. 498 * 499 * They will be read again by then next call of the scanning method 500 * 501 * @param number the number of characters to be read again. 502 * This number must not be greater than yylength()! 503 */ 504 public void yypushback(int number) { 505 if ( number > yylength() ) 506 zzScanError(ZZ_PUSHBACK_2BIG); 507 508 zzMarkedPos -= number; 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 Symbol nextToken() throws java.io.IOException, Scanner.Exception { 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 yychar+= zzMarkedPosL-zzStartRead; 538 539 boolean zzR = false; 540 for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; 541 zzCurrentPosL++) { 542 switch (zzBufferL[zzCurrentPosL]) { 543 case '\u000B': 544 case '\u000C': 545 case '\u0085': 546 case '\u2028': 547 case '\u2029': 548 yyline++; 549 yycolumn = 0; 550 zzR = false; 551 break; 552 case '\r': 553 yyline++; 554 yycolumn = 0; 555 zzR = true; 556 break; 557 case '\n': 558 if (zzR) 559 zzR = false; 560 else { 561 yyline++; 562 yycolumn = 0; 563 } 564 break; 565 default: 566 zzR = false; 567 yycolumn++; 568 } 569 } 570 571 if (zzR) { 572 // peek one character ahead if it is \n (if we have counted one line too much) 573 boolean zzPeek; 574 if (zzMarkedPosL < zzEndReadL) 575 zzPeek = zzBufferL[zzMarkedPosL] == '\n'; 576 else if (zzAtEOF) 577 zzPeek = false; 578 else { 579 boolean eof = zzRefill(); 580 zzMarkedPosL = zzMarkedPos; 581 zzBufferL = zzBuffer; 582 if (eof) 583 zzPeek = false; 584 else 585 zzPeek = zzBufferL[zzMarkedPosL] == '\n'; 586 } 587 if (zzPeek) yyline--; 588 } 589 zzAction = -1; 590 591 zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; 592 593 zzState = zzLexicalState; 594 595 596 zzForAction: { 597 while (true) { 598 599 if (zzCurrentPosL < zzEndReadL) 600 zzInput = zzBufferL[zzCurrentPosL++]; 601 else if (zzAtEOF) { 602 zzInput = YYEOF; 603 break zzForAction; 604 } 605 else { 606 // store back cached positions 607 zzCurrentPos = zzCurrentPosL; 608 zzMarkedPos = zzMarkedPosL; 609 boolean eof = zzRefill(); 610 // get translated positions and possibly new buffer 611 zzCurrentPosL = zzCurrentPos; 612 zzMarkedPosL = zzMarkedPos; 613 zzBufferL = zzBuffer; 614 zzEndReadL = zzEndRead; 615 if (eof) { 616 zzInput = YYEOF; 617 break zzForAction; 618 } 619 else { 620 zzInput = zzBufferL[zzCurrentPosL++]; 621 } 622 } 623 int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; 624 if (zzNext == -1) break zzForAction; 625 zzState = zzNext; 626 627 int zzAttributes = zzAttrL[zzState]; 628 if ( (zzAttributes & 1) == 1 ) { 629 zzAction = zzState; 630 zzMarkedPosL = zzCurrentPosL; 631 if ( (zzAttributes & 8) == 8 ) break zzForAction; 632 } 633 634 } 635 } 636 637 // store back cached position 638 zzMarkedPos = zzMarkedPosL; 639 640 switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { 641 case 16: 642 { return sym(Terminals.EXTENDS); 643 } 644 case 17: break; 645 case 9: 646 { return sym(Terminals.DOT); 647 } 648 case 18: break; 649 case 11: 650 { return sym(Terminals.ASSIGN); 651 } 652 case 19: break; 653 case 8: 654 { return sym(Terminals.SEMICOLON); 655 } 656 case 20: break; 657 case 13: 658 { return sym(Terminals.CLASS); 659 } 660 case 21: break; 661 case 7: 662 { return sym(Terminals.RBRACE); 663 } 664 case 22: break; 665 case 6: 666 { return sym(Terminals.LBRACE); 667 } 668 case 23: break; 669 case 3: 670 { return sym(Terminals.IDENTIFIER); 671 } 672 case 24: break; 673 case 5: 674 { return sym(Terminals.RPAREN); 675 } 676 case 25: break; 677 case 4: 678 { return sym(Terminals.LPAREN); 679 } 680 case 26: break; 681 case 12: 682 { return sym(Terminals.BOOLEAN_LITERAL); 683 } 684 case 27: break; 685 case 1: 686 { throw new RuntimeException("Illegal character \""+yytext()+ "\" at line "+yyline+", column "+yycolumn); 687 } 688 case 28: break; 689 case 10: 690 { return sym(Terminals.COMMA); 691 } 692 case 29: break; 693 case 2: 694 { /* discard token */ 695 } 696 case 30: break; 697 case 15: 698 { return sym(Terminals.RETURN); 699 } 700 case 31: break; 701 case 14: 702 { return sym(Terminals.WHILE); 703 } 704 case 32: break; 705 default: 706 if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { 707 zzAtEOF = true; 708 { return sym(Terminals.EOF); } 709 } 710 else { 711 zzScanError(ZZ_NO_MATCH); 712 } 713 } 714 } 715 } 716 717 718 }