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