| 1 | package com.hammurapi.grammar.java; |
| 2 | // $ANTLR 2.7.5 (20050128): "java15.g" -> "JavaLexer.java"$ |
| 3 | |
| 4 | import java.io.InputStream; |
| 5 | import antlr.TokenStreamException; |
| 6 | import antlr.TokenStreamIOException; |
| 7 | import antlr.TokenStreamRecognitionException; |
| 8 | import antlr.CharStreamException; |
| 9 | import antlr.CharStreamIOException; |
| 10 | import antlr.ANTLRException; |
| 11 | import java.io.Reader; |
| 12 | import java.util.Hashtable; |
| 13 | import antlr.CharScanner; |
| 14 | import antlr.InputBuffer; |
| 15 | import antlr.ByteBuffer; |
| 16 | import antlr.CharBuffer; |
| 17 | import antlr.Token; |
| 18 | import antlr.CommonToken; |
| 19 | import antlr.RecognitionException; |
| 20 | import antlr.NoViableAltForCharException; |
| 21 | import antlr.MismatchedCharException; |
| 22 | import antlr.TokenStream; |
| 23 | import antlr.ANTLRHashString; |
| 24 | import antlr.LexerSharedInputState; |
| 25 | import antlr.collections.impl.BitSet; |
| 26 | import antlr.SemanticException; |
| 27 | |
| 28 | public class JavaLexer extends antlr.CharScanner implements JavaTokenTypes, TokenStream |
| 29 | { |
| 30 | |
| 31 | /** flag for enabling the "assert" keyword */ |
| 32 | private boolean assertEnabled = true; |
| 33 | /** flag for enabling the "enum" keyword */ |
| 34 | private boolean enumEnabled = true; |
| 35 | |
| 36 | /** Enable the "assert" keyword */ |
| 37 | public void enableAssert(boolean shouldEnable) { assertEnabled = shouldEnable; } |
| 38 | /** Query the "assert" keyword state */ |
| 39 | public boolean isAssertEnabled() { return assertEnabled; } |
| 40 | /** Enable the "enum" keyword */ |
| 41 | public void enableEnum(boolean shouldEnable) { enumEnabled = shouldEnable; } |
| 42 | /** Query the "enum" keyword state */ |
| 43 | public boolean isEnumEnabled() { return enumEnabled; } |
| 44 | public JavaLexer(InputStream in) { |
| 45 | this(new ByteBuffer(in)); |
| 46 | } |
| 47 | public JavaLexer(Reader in) { |
| 48 | this(new CharBuffer(in)); |
| 49 | } |
| 50 | public JavaLexer(InputBuffer ib) { |
| 51 | this(new LexerSharedInputState(ib)); |
| 52 | } |
| 53 | public JavaLexer(LexerSharedInputState state) { |
| 54 | super(state); |
| 55 | caseSensitiveLiterals = true; |
| 56 | setCaseSensitive(true); |
| 57 | literals = new Hashtable(); |
| 58 | literals.put(new ANTLRHashString("byte", this), new Integer(80)); |
| 59 | literals.put(new ANTLRHashString("public", this), new Integer(89)); |
| 60 | literals.put(new ANTLRHashString("case", this), new Integer(123)); |
| 61 | literals.put(new ANTLRHashString("short", this), new Integer(82)); |
| 62 | literals.put(new ANTLRHashString("break", this), new Integer(116)); |
| 63 | literals.put(new ANTLRHashString("while", this), new Integer(114)); |
| 64 | literals.put(new ANTLRHashString("new", this), new Integer(159)); |
| 65 | literals.put(new ANTLRHashString("instanceof", this), new Integer(146)); |
| 66 | literals.put(new ANTLRHashString("implements", this), new Integer(107)); |
| 67 | literals.put(new ANTLRHashString("synchronized", this), new Integer(94)); |
| 68 | literals.put(new ANTLRHashString("float", this), new Integer(84)); |
| 69 | literals.put(new ANTLRHashString("package", this), new Integer(62)); |
| 70 | literals.put(new ANTLRHashString("return", this), new Integer(118)); |
| 71 | literals.put(new ANTLRHashString("throw", this), new Integer(120)); |
| 72 | literals.put(new ANTLRHashString("null", this), new Integer(158)); |
| 73 | literals.put(new ANTLRHashString("threadsafe", this), new Integer(93)); |
| 74 | literals.put(new ANTLRHashString("protected", this), new Integer(90)); |
| 75 | literals.put(new ANTLRHashString("class", this), new Integer(102)); |
| 76 | literals.put(new ANTLRHashString("throws", this), new Integer(109)); |
| 77 | literals.put(new ANTLRHashString("do", this), new Integer(115)); |
| 78 | literals.put(new ANTLRHashString("strictfp", this), new Integer(41)); |
| 79 | literals.put(new ANTLRHashString("super", this), new Integer(72)); |
| 80 | literals.put(new ANTLRHashString("transient", this), new Integer(91)); |
| 81 | literals.put(new ANTLRHashString("native", this), new Integer(92)); |
| 82 | literals.put(new ANTLRHashString("interface", this), new Integer(103)); |
| 83 | literals.put(new ANTLRHashString("final", this), new Integer(39)); |
| 84 | literals.put(new ANTLRHashString("if", this), new Integer(112)); |
| 85 | literals.put(new ANTLRHashString("double", this), new Integer(86)); |
| 86 | literals.put(new ANTLRHashString("volatile", this), new Integer(95)); |
| 87 | literals.put(new ANTLRHashString("assert", this), new Integer(121)); |
| 88 | literals.put(new ANTLRHashString("catch", this), new Integer(126)); |
| 89 | literals.put(new ANTLRHashString("try", this), new Integer(124)); |
| 90 | literals.put(new ANTLRHashString("enum", this), new Integer(104)); |
| 91 | literals.put(new ANTLRHashString("int", this), new Integer(83)); |
| 92 | literals.put(new ANTLRHashString("for", this), new Integer(122)); |
| 93 | literals.put(new ANTLRHashString("extends", this), new Integer(71)); |
| 94 | literals.put(new ANTLRHashString("boolean", this), new Integer(79)); |
| 95 | literals.put(new ANTLRHashString("char", this), new Integer(81)); |
| 96 | literals.put(new ANTLRHashString("private", this), new Integer(88)); |
| 97 | literals.put(new ANTLRHashString("default", this), new Integer(106)); |
| 98 | literals.put(new ANTLRHashString("false", this), new Integer(157)); |
| 99 | literals.put(new ANTLRHashString("this", this), new Integer(108)); |
| 100 | literals.put(new ANTLRHashString("static", this), new Integer(65)); |
| 101 | literals.put(new ANTLRHashString("abstract", this), new Integer(40)); |
| 102 | literals.put(new ANTLRHashString("continue", this), new Integer(117)); |
| 103 | literals.put(new ANTLRHashString("finally", this), new Integer(125)); |
| 104 | literals.put(new ANTLRHashString("else", this), new Integer(113)); |
| 105 | literals.put(new ANTLRHashString("import", this), new Integer(64)); |
| 106 | literals.put(new ANTLRHashString("void", this), new Integer(78)); |
| 107 | literals.put(new ANTLRHashString("switch", this), new Integer(119)); |
| 108 | literals.put(new ANTLRHashString("true", this), new Integer(156)); |
| 109 | literals.put(new ANTLRHashString("long", this), new Integer(85)); |
| 110 | } |
| 111 | |
| 112 | public Token nextToken() throws TokenStreamException { |
| 113 | Token theRetToken=null; |
| 114 | tryAgain: |
| 115 | for (;;) { |
| 116 | Token _token = null; |
| 117 | int _ttype = Token.INVALID_TYPE; |
| 118 | resetText(); |
| 119 | try { // for char stream error handling |
| 120 | try { // for lexical error handling |
| 121 | switch ( LA(1)) { |
| 122 | case '?': |
| 123 | { |
| 124 | mQUESTION(true); |
| 125 | theRetToken=_returnToken; |
| 126 | break; |
| 127 | } |
| 128 | case '(': |
| 129 | { |
| 130 | mLPAREN(true); |
| 131 | theRetToken=_returnToken; |
| 132 | break; |
| 133 | } |
| 134 | case ')': |
| 135 | { |
| 136 | mRPAREN(true); |
| 137 | theRetToken=_returnToken; |
| 138 | break; |
| 139 | } |
| 140 | case '[': |
| 141 | { |
| 142 | mLBRACK(true); |
| 143 | theRetToken=_returnToken; |
| 144 | break; |
| 145 | } |
| 146 | case ']': |
| 147 | { |
| 148 | mRBRACK(true); |
| 149 | theRetToken=_returnToken; |
| 150 | break; |
| 151 | } |
| 152 | case '{': |
| 153 | { |
| 154 | mLCURLY(true); |
| 155 | theRetToken=_returnToken; |
| 156 | break; |
| 157 | } |
| 158 | case '}': |
| 159 | { |
| 160 | mRCURLY(true); |
| 161 | theRetToken=_returnToken; |
| 162 | break; |
| 163 | } |
| 164 | case ':': |
| 165 | { |
| 166 | mCOLON(true); |
| 167 | theRetToken=_returnToken; |
| 168 | break; |
| 169 | } |
| 170 | case ',': |
| 171 | { |
| 172 | mCOMMA(true); |
| 173 | theRetToken=_returnToken; |
| 174 | break; |
| 175 | } |
| 176 | case '~': |
| 177 | { |
| 178 | mBNOT(true); |
| 179 | theRetToken=_returnToken; |
| 180 | break; |
| 181 | } |
| 182 | case ';': |
| 183 | { |
| 184 | mSEMI(true); |
| 185 | theRetToken=_returnToken; |
| 186 | break; |
| 187 | } |
| 188 | case '\t': case '\n': case '\u000c': case '\r': |
| 189 | case ' ': |
| 190 | { |
| 191 | mWS(true); |
| 192 | theRetToken=_returnToken; |
| 193 | break; |
| 194 | } |
| 195 | case '\'': |
| 196 | { |
| 197 | mCHAR_LITERAL(true); |
| 198 | theRetToken=_returnToken; |
| 199 | break; |
| 200 | } |
| 201 | case '"': |
| 202 | { |
| 203 | mSTRING_LITERAL(true); |
| 204 | theRetToken=_returnToken; |
| 205 | break; |
| 206 | } |
| 207 | case '$': case 'A': case 'B': case 'C': |
| 208 | case 'D': case 'E': case 'F': case 'G': |
| 209 | case 'H': case 'I': case 'J': case 'K': |
| 210 | case 'L': case 'M': case 'N': case 'O': |
| 211 | case 'P': case 'Q': case 'R': case 'S': |
| 212 | case 'T': case 'U': case 'V': case 'W': |
| 213 | case 'X': case 'Y': case 'Z': case '_': |
| 214 | case 'a': case 'b': case 'c': case 'd': |
| 215 | case 'e': case 'f': case 'g': case 'h': |
| 216 | case 'i': case 'j': case 'k': case 'l': |
| 217 | case 'm': case 'n': case 'o': case 'p': |
| 218 | case 'q': case 'r': case 's': case 't': |
| 219 | case 'u': case 'v': case 'w': case 'x': |
| 220 | case 'y': case 'z': |
| 221 | { |
| 222 | mIDENT(true); |
| 223 | theRetToken=_returnToken; |
| 224 | break; |
| 225 | } |
| 226 | case '.': case '0': case '1': case '2': |
| 227 | case '3': case '4': case '5': case '6': |
| 228 | case '7': case '8': case '9': |
| 229 | { |
| 230 | mNUM_INT(true); |
| 231 | theRetToken=_returnToken; |
| 232 | break; |
| 233 | } |
| 234 | case '@': |
| 235 | { |
| 236 | mAT(true); |
| 237 | theRetToken=_returnToken; |
| 238 | break; |
| 239 | } |
| 240 | default: |
| 241 | if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (LA(4)=='=')) { |
| 242 | mBSR_ASSIGN(true); |
| 243 | theRetToken=_returnToken; |
| 244 | } |
| 245 | else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='=')) { |
| 246 | mSR_ASSIGN(true); |
| 247 | theRetToken=_returnToken; |
| 248 | } |
| 249 | else if ((LA(1)=='>') && (LA(2)=='>') && (LA(3)=='>') && (true)) { |
| 250 | mBSR(true); |
| 251 | theRetToken=_returnToken; |
| 252 | } |
| 253 | else if ((LA(1)=='<') && (LA(2)=='<') && (LA(3)=='=')) { |
| 254 | mSL_ASSIGN(true); |
| 255 | theRetToken=_returnToken; |
| 256 | } |
| 257 | else if ((LA(1)=='=') && (LA(2)=='=')) { |
| 258 | mEQUAL(true); |
| 259 | theRetToken=_returnToken; |
| 260 | } |
| 261 | else if ((LA(1)=='!') && (LA(2)=='=')) { |
| 262 | mNOT_EQUAL(true); |
| 263 | theRetToken=_returnToken; |
| 264 | } |
| 265 | else if ((LA(1)=='/') && (LA(2)=='=')) { |
| 266 | mDIV_ASSIGN(true); |
| 267 | theRetToken=_returnToken; |
| 268 | } |
| 269 | else if ((LA(1)=='+') && (LA(2)=='=')) { |
| 270 | mPLUS_ASSIGN(true); |
| 271 | theRetToken=_returnToken; |
| 272 | } |
| 273 | else if ((LA(1)=='+') && (LA(2)=='+')) { |
| 274 | mINC(true); |
| 275 | theRetToken=_returnToken; |
| 276 | } |
| 277 | else if ((LA(1)=='-') && (LA(2)=='=')) { |
| 278 | mMINUS_ASSIGN(true); |
| 279 | theRetToken=_returnToken; |
| 280 | } |
| 281 | else if ((LA(1)=='-') && (LA(2)=='-')) { |
| 282 | mDEC(true); |
| 283 | theRetToken=_returnToken; |
| 284 | } |
| 285 | else if ((LA(1)=='*') && (LA(2)=='=')) { |
| 286 | mSTAR_ASSIGN(true); |
| 287 | theRetToken=_returnToken; |
| 288 | } |
| 289 | else if ((LA(1)=='%') && (LA(2)=='=')) { |
| 290 | mMOD_ASSIGN(true); |
| 291 | theRetToken=_returnToken; |
| 292 | } |
| 293 | else if ((LA(1)=='>') && (LA(2)=='>') && (true)) { |
| 294 | mSR(true); |
| 295 | theRetToken=_returnToken; |
| 296 | } |
| 297 | else if ((LA(1)=='>') && (LA(2)=='=')) { |
| 298 | mGE(true); |
| 299 | theRetToken=_returnToken; |
| 300 | } |
| 301 | else if ((LA(1)=='<') && (LA(2)=='<') && (true)) { |
| 302 | mSL(true); |
| 303 | theRetToken=_returnToken; |
| 304 | } |
| 305 | else if ((LA(1)=='<') && (LA(2)=='=')) { |
| 306 | mLE(true); |
| 307 | theRetToken=_returnToken; |
| 308 | } |
| 309 | else if ((LA(1)=='^') && (LA(2)=='=')) { |
| 310 | mBXOR_ASSIGN(true); |
| 311 | theRetToken=_returnToken; |
| 312 | } |
| 313 | else if ((LA(1)=='|') && (LA(2)=='=')) { |
| 314 | mBOR_ASSIGN(true); |
| 315 | theRetToken=_returnToken; |
| 316 | } |
| 317 | else if ((LA(1)=='|') && (LA(2)=='|')) { |
| 318 | mLOR(true); |
| 319 | theRetToken=_returnToken; |
| 320 | } |
| 321 | else if ((LA(1)=='&') && (LA(2)=='=')) { |
| 322 | mBAND_ASSIGN(true); |
| 323 | theRetToken=_returnToken; |
| 324 | } |
| 325 | else if ((LA(1)=='&') && (LA(2)=='&')) { |
| 326 | mLAND(true); |
| 327 | theRetToken=_returnToken; |
| 328 | } |
| 329 | else if ((LA(1)=='/') && (LA(2)=='/')) { |
| 330 | mSL_COMMENT(true); |
| 331 | theRetToken=_returnToken; |
| 332 | } |
| 333 | else if ((LA(1)=='/') && (LA(2)=='*')) { |
| 334 | mML_COMMENT(true); |
| 335 | theRetToken=_returnToken; |
| 336 | } |
| 337 | else if ((LA(1)=='=') && (true)) { |
| 338 | mASSIGN(true); |
| 339 | theRetToken=_returnToken; |
| 340 | } |
| 341 | else if ((LA(1)=='!') && (true)) { |
| 342 | mLNOT(true); |
| 343 | theRetToken=_returnToken; |
| 344 | } |
| 345 | else if ((LA(1)=='/') && (true)) { |
| 346 | mDIV(true); |
| 347 | theRetToken=_returnToken; |
| 348 | } |
| 349 | else if ((LA(1)=='+') && (true)) { |
| 350 | mPLUS(true); |
| 351 | theRetToken=_returnToken; |
| 352 | } |
| 353 | else if ((LA(1)=='-') && (true)) { |
| 354 | mMINUS(true); |
| 355 | theRetToken=_returnToken; |
| 356 | } |
| 357 | else if ((LA(1)=='*') && (true)) { |
| 358 | mSTAR(true); |
| 359 | theRetToken=_returnToken; |
| 360 | } |
| 361 | else if ((LA(1)=='%') && (true)) { |
| 362 | mMOD(true); |
| 363 | theRetToken=_returnToken; |
| 364 | } |
| 365 | else if ((LA(1)=='>') && (true)) { |
| 366 | mGT(true); |
| 367 | theRetToken=_returnToken; |
| 368 | } |
| 369 | else if ((LA(1)=='<') && (true)) { |
| 370 | mLT(true); |
| 371 | theRetToken=_returnToken; |
| 372 | } |
| 373 | else if ((LA(1)=='^') && (true)) { |
| 374 | mBXOR(true); |
| 375 | theRetToken=_returnToken; |
| 376 | } |
| 377 | else if ((LA(1)=='|') && (true)) { |
| 378 | mBOR(true); |
| 379 | theRetToken=_returnToken; |
| 380 | } |
| 381 | else if ((LA(1)=='&') && (true)) { |
| 382 | mBAND(true); |
| 383 | theRetToken=_returnToken; |
| 384 | } |
| 385 | else { |
| 386 | if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);} |
| 387 | else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 388 | } |
| 389 | } |
| 390 | if ( _returnToken==null ) continue tryAgain; // found SKIP token |
| 391 | _ttype = _returnToken.getType(); |
| 392 | _returnToken.setType(_ttype); |
| 393 | return _returnToken; |
| 394 | } |
| 395 | catch (RecognitionException e) { |
| 396 | throw new TokenStreamRecognitionException(e); |
| 397 | } |
| 398 | } |
| 399 | catch (CharStreamException cse) { |
| 400 | if ( cse instanceof CharStreamIOException ) { |
| 401 | throw new TokenStreamIOException(((CharStreamIOException)cse).io); |
| 402 | } |
| 403 | else { |
| 404 | throw new TokenStreamException(cse.getMessage()); |
| 405 | } |
| 406 | } |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 411 | int _ttype; Token _token=null; int _begin=text.length(); |
| 412 | _ttype = QUESTION; |
| 413 | int _saveIndex; |
| 414 | |
| 415 | match('?'); |
| 416 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 417 | _token = makeToken(_ttype); |
| 418 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 419 | } |
| 420 | _returnToken = _token; |
| 421 | } |
| 422 | |
| 423 | public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 424 | int _ttype; Token _token=null; int _begin=text.length(); |
| 425 | _ttype = LPAREN; |
| 426 | int _saveIndex; |
| 427 | |
| 428 | match('('); |
| 429 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 430 | _token = makeToken(_ttype); |
| 431 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 432 | } |
| 433 | _returnToken = _token; |
| 434 | } |
| 435 | |
| 436 | public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 437 | int _ttype; Token _token=null; int _begin=text.length(); |
| 438 | _ttype = RPAREN; |
| 439 | int _saveIndex; |
| 440 | |
| 441 | match(')'); |
| 442 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 443 | _token = makeToken(_ttype); |
| 444 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 445 | } |
| 446 | _returnToken = _token; |
| 447 | } |
| 448 | |
| 449 | public final void mLBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 450 | int _ttype; Token _token=null; int _begin=text.length(); |
| 451 | _ttype = LBRACK; |
| 452 | int _saveIndex; |
| 453 | |
| 454 | match('['); |
| 455 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 456 | _token = makeToken(_ttype); |
| 457 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 458 | } |
| 459 | _returnToken = _token; |
| 460 | } |
| 461 | |
| 462 | public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 463 | int _ttype; Token _token=null; int _begin=text.length(); |
| 464 | _ttype = RBRACK; |
| 465 | int _saveIndex; |
| 466 | |
| 467 | match(']'); |
| 468 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 469 | _token = makeToken(_ttype); |
| 470 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 471 | } |
| 472 | _returnToken = _token; |
| 473 | } |
| 474 | |
| 475 | public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 476 | int _ttype; Token _token=null; int _begin=text.length(); |
| 477 | _ttype = LCURLY; |
| 478 | int _saveIndex; |
| 479 | |
| 480 | match('{'); |
| 481 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 482 | _token = makeToken(_ttype); |
| 483 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 484 | } |
| 485 | _returnToken = _token; |
| 486 | } |
| 487 | |
| 488 | public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 489 | int _ttype; Token _token=null; int _begin=text.length(); |
| 490 | _ttype = RCURLY; |
| 491 | int _saveIndex; |
| 492 | |
| 493 | match('}'); |
| 494 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 495 | _token = makeToken(_ttype); |
| 496 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 497 | } |
| 498 | _returnToken = _token; |
| 499 | } |
| 500 | |
| 501 | public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 502 | int _ttype; Token _token=null; int _begin=text.length(); |
| 503 | _ttype = COLON; |
| 504 | int _saveIndex; |
| 505 | |
| 506 | match(':'); |
| 507 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 508 | _token = makeToken(_ttype); |
| 509 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 510 | } |
| 511 | _returnToken = _token; |
| 512 | } |
| 513 | |
| 514 | public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 515 | int _ttype; Token _token=null; int _begin=text.length(); |
| 516 | _ttype = COMMA; |
| 517 | int _saveIndex; |
| 518 | |
| 519 | match(','); |
| 520 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 521 | _token = makeToken(_ttype); |
| 522 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 523 | } |
| 524 | _returnToken = _token; |
| 525 | } |
| 526 | |
| 527 | public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 528 | int _ttype; Token _token=null; int _begin=text.length(); |
| 529 | _ttype = ASSIGN; |
| 530 | int _saveIndex; |
| 531 | |
| 532 | match('='); |
| 533 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 534 | _token = makeToken(_ttype); |
| 535 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 536 | } |
| 537 | _returnToken = _token; |
| 538 | } |
| 539 | |
| 540 | public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 541 | int _ttype; Token _token=null; int _begin=text.length(); |
| 542 | _ttype = EQUAL; |
| 543 | int _saveIndex; |
| 544 | |
| 545 | match("=="); |
| 546 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 547 | _token = makeToken(_ttype); |
| 548 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 549 | } |
| 550 | _returnToken = _token; |
| 551 | } |
| 552 | |
| 553 | public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 554 | int _ttype; Token _token=null; int _begin=text.length(); |
| 555 | _ttype = LNOT; |
| 556 | int _saveIndex; |
| 557 | |
| 558 | match('!'); |
| 559 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 560 | _token = makeToken(_ttype); |
| 561 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 562 | } |
| 563 | _returnToken = _token; |
| 564 | } |
| 565 | |
| 566 | public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 567 | int _ttype; Token _token=null; int _begin=text.length(); |
| 568 | _ttype = BNOT; |
| 569 | int _saveIndex; |
| 570 | |
| 571 | match('~'); |
| 572 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 573 | _token = makeToken(_ttype); |
| 574 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 575 | } |
| 576 | _returnToken = _token; |
| 577 | } |
| 578 | |
| 579 | public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 580 | int _ttype; Token _token=null; int _begin=text.length(); |
| 581 | _ttype = NOT_EQUAL; |
| 582 | int _saveIndex; |
| 583 | |
| 584 | match("!="); |
| 585 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 586 | _token = makeToken(_ttype); |
| 587 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 588 | } |
| 589 | _returnToken = _token; |
| 590 | } |
| 591 | |
| 592 | public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 593 | int _ttype; Token _token=null; int _begin=text.length(); |
| 594 | _ttype = DIV; |
| 595 | int _saveIndex; |
| 596 | |
| 597 | match('/'); |
| 598 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 599 | _token = makeToken(_ttype); |
| 600 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 601 | } |
| 602 | _returnToken = _token; |
| 603 | } |
| 604 | |
| 605 | public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 606 | int _ttype; Token _token=null; int _begin=text.length(); |
| 607 | _ttype = DIV_ASSIGN; |
| 608 | int _saveIndex; |
| 609 | |
| 610 | match("/="); |
| 611 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 612 | _token = makeToken(_ttype); |
| 613 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 614 | } |
| 615 | _returnToken = _token; |
| 616 | } |
| 617 | |
| 618 | public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 619 | int _ttype; Token _token=null; int _begin=text.length(); |
| 620 | _ttype = PLUS; |
| 621 | int _saveIndex; |
| 622 | |
| 623 | match('+'); |
| 624 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 625 | _token = makeToken(_ttype); |
| 626 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 627 | } |
| 628 | _returnToken = _token; |
| 629 | } |
| 630 | |
| 631 | public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 632 | int _ttype; Token _token=null; int _begin=text.length(); |
| 633 | _ttype = PLUS_ASSIGN; |
| 634 | int _saveIndex; |
| 635 | |
| 636 | match("+="); |
| 637 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 638 | _token = makeToken(_ttype); |
| 639 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 640 | } |
| 641 | _returnToken = _token; |
| 642 | } |
| 643 | |
| 644 | public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 645 | int _ttype; Token _token=null; int _begin=text.length(); |
| 646 | _ttype = INC; |
| 647 | int _saveIndex; |
| 648 | |
| 649 | match("++"); |
| 650 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 651 | _token = makeToken(_ttype); |
| 652 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 653 | } |
| 654 | _returnToken = _token; |
| 655 | } |
| 656 | |
| 657 | public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 658 | int _ttype; Token _token=null; int _begin=text.length(); |
| 659 | _ttype = MINUS; |
| 660 | int _saveIndex; |
| 661 | |
| 662 | match('-'); |
| 663 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 664 | _token = makeToken(_ttype); |
| 665 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 666 | } |
| 667 | _returnToken = _token; |
| 668 | } |
| 669 | |
| 670 | public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 671 | int _ttype; Token _token=null; int _begin=text.length(); |
| 672 | _ttype = MINUS_ASSIGN; |
| 673 | int _saveIndex; |
| 674 | |
| 675 | match("-="); |
| 676 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 677 | _token = makeToken(_ttype); |
| 678 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 679 | } |
| 680 | _returnToken = _token; |
| 681 | } |
| 682 | |
| 683 | public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 684 | int _ttype; Token _token=null; int _begin=text.length(); |
| 685 | _ttype = DEC; |
| 686 | int _saveIndex; |
| 687 | |
| 688 | match("--"); |
| 689 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 690 | _token = makeToken(_ttype); |
| 691 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 692 | } |
| 693 | _returnToken = _token; |
| 694 | } |
| 695 | |
| 696 | public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 697 | int _ttype; Token _token=null; int _begin=text.length(); |
| 698 | _ttype = STAR; |
| 699 | int _saveIndex; |
| 700 | |
| 701 | match('*'); |
| 702 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 703 | _token = makeToken(_ttype); |
| 704 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 705 | } |
| 706 | _returnToken = _token; |
| 707 | } |
| 708 | |
| 709 | public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 710 | int _ttype; Token _token=null; int _begin=text.length(); |
| 711 | _ttype = STAR_ASSIGN; |
| 712 | int _saveIndex; |
| 713 | |
| 714 | match("*="); |
| 715 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 716 | _token = makeToken(_ttype); |
| 717 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 718 | } |
| 719 | _returnToken = _token; |
| 720 | } |
| 721 | |
| 722 | public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 723 | int _ttype; Token _token=null; int _begin=text.length(); |
| 724 | _ttype = MOD; |
| 725 | int _saveIndex; |
| 726 | |
| 727 | match('%'); |
| 728 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 729 | _token = makeToken(_ttype); |
| 730 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 731 | } |
| 732 | _returnToken = _token; |
| 733 | } |
| 734 | |
| 735 | public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 736 | int _ttype; Token _token=null; int _begin=text.length(); |
| 737 | _ttype = MOD_ASSIGN; |
| 738 | int _saveIndex; |
| 739 | |
| 740 | match("%="); |
| 741 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 742 | _token = makeToken(_ttype); |
| 743 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 744 | } |
| 745 | _returnToken = _token; |
| 746 | } |
| 747 | |
| 748 | public final void mSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 749 | int _ttype; Token _token=null; int _begin=text.length(); |
| 750 | _ttype = SR; |
| 751 | int _saveIndex; |
| 752 | |
| 753 | match(">>"); |
| 754 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 755 | _token = makeToken(_ttype); |
| 756 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 757 | } |
| 758 | _returnToken = _token; |
| 759 | } |
| 760 | |
| 761 | public final void mSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 762 | int _ttype; Token _token=null; int _begin=text.length(); |
| 763 | _ttype = SR_ASSIGN; |
| 764 | int _saveIndex; |
| 765 | |
| 766 | match(">>="); |
| 767 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 768 | _token = makeToken(_ttype); |
| 769 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 770 | } |
| 771 | _returnToken = _token; |
| 772 | } |
| 773 | |
| 774 | public final void mBSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 775 | int _ttype; Token _token=null; int _begin=text.length(); |
| 776 | _ttype = BSR; |
| 777 | int _saveIndex; |
| 778 | |
| 779 | match(">>>"); |
| 780 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 781 | _token = makeToken(_ttype); |
| 782 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 783 | } |
| 784 | _returnToken = _token; |
| 785 | } |
| 786 | |
| 787 | public final void mBSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 788 | int _ttype; Token _token=null; int _begin=text.length(); |
| 789 | _ttype = BSR_ASSIGN; |
| 790 | int _saveIndex; |
| 791 | |
| 792 | match(">>>="); |
| 793 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 794 | _token = makeToken(_ttype); |
| 795 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 796 | } |
| 797 | _returnToken = _token; |
| 798 | } |
| 799 | |
| 800 | public final void mGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 801 | int _ttype; Token _token=null; int _begin=text.length(); |
| 802 | _ttype = GE; |
| 803 | int _saveIndex; |
| 804 | |
| 805 | match(">="); |
| 806 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 807 | _token = makeToken(_ttype); |
| 808 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 809 | } |
| 810 | _returnToken = _token; |
| 811 | } |
| 812 | |
| 813 | public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 814 | int _ttype; Token _token=null; int _begin=text.length(); |
| 815 | _ttype = GT; |
| 816 | int _saveIndex; |
| 817 | |
| 818 | match(">"); |
| 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 mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 827 | int _ttype; Token _token=null; int _begin=text.length(); |
| 828 | _ttype = SL; |
| 829 | int _saveIndex; |
| 830 | |
| 831 | match("<<"); |
| 832 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 833 | _token = makeToken(_ttype); |
| 834 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 835 | } |
| 836 | _returnToken = _token; |
| 837 | } |
| 838 | |
| 839 | public final void mSL_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 840 | int _ttype; Token _token=null; int _begin=text.length(); |
| 841 | _ttype = SL_ASSIGN; |
| 842 | int _saveIndex; |
| 843 | |
| 844 | match("<<="); |
| 845 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 846 | _token = makeToken(_ttype); |
| 847 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 848 | } |
| 849 | _returnToken = _token; |
| 850 | } |
| 851 | |
| 852 | public final void mLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 853 | int _ttype; Token _token=null; int _begin=text.length(); |
| 854 | _ttype = LE; |
| 855 | int _saveIndex; |
| 856 | |
| 857 | match("<="); |
| 858 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 859 | _token = makeToken(_ttype); |
| 860 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 861 | } |
| 862 | _returnToken = _token; |
| 863 | } |
| 864 | |
| 865 | public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 866 | int _ttype; Token _token=null; int _begin=text.length(); |
| 867 | _ttype = LT; |
| 868 | int _saveIndex; |
| 869 | |
| 870 | match('<'); |
| 871 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 872 | _token = makeToken(_ttype); |
| 873 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 874 | } |
| 875 | _returnToken = _token; |
| 876 | } |
| 877 | |
| 878 | public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 879 | int _ttype; Token _token=null; int _begin=text.length(); |
| 880 | _ttype = BXOR; |
| 881 | int _saveIndex; |
| 882 | |
| 883 | match('^'); |
| 884 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 885 | _token = makeToken(_ttype); |
| 886 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 887 | } |
| 888 | _returnToken = _token; |
| 889 | } |
| 890 | |
| 891 | public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 892 | int _ttype; Token _token=null; int _begin=text.length(); |
| 893 | _ttype = BXOR_ASSIGN; |
| 894 | int _saveIndex; |
| 895 | |
| 896 | match("^="); |
| 897 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 898 | _token = makeToken(_ttype); |
| 899 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 900 | } |
| 901 | _returnToken = _token; |
| 902 | } |
| 903 | |
| 904 | public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 905 | int _ttype; Token _token=null; int _begin=text.length(); |
| 906 | _ttype = BOR; |
| 907 | int _saveIndex; |
| 908 | |
| 909 | match('|'); |
| 910 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 911 | _token = makeToken(_ttype); |
| 912 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 913 | } |
| 914 | _returnToken = _token; |
| 915 | } |
| 916 | |
| 917 | public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 918 | int _ttype; Token _token=null; int _begin=text.length(); |
| 919 | _ttype = BOR_ASSIGN; |
| 920 | int _saveIndex; |
| 921 | |
| 922 | match("|="); |
| 923 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 924 | _token = makeToken(_ttype); |
| 925 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 926 | } |
| 927 | _returnToken = _token; |
| 928 | } |
| 929 | |
| 930 | public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 931 | int _ttype; Token _token=null; int _begin=text.length(); |
| 932 | _ttype = LOR; |
| 933 | int _saveIndex; |
| 934 | |
| 935 | match("||"); |
| 936 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 937 | _token = makeToken(_ttype); |
| 938 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 939 | } |
| 940 | _returnToken = _token; |
| 941 | } |
| 942 | |
| 943 | public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 944 | int _ttype; Token _token=null; int _begin=text.length(); |
| 945 | _ttype = BAND; |
| 946 | int _saveIndex; |
| 947 | |
| 948 | match('&'); |
| 949 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 950 | _token = makeToken(_ttype); |
| 951 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 952 | } |
| 953 | _returnToken = _token; |
| 954 | } |
| 955 | |
| 956 | public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 957 | int _ttype; Token _token=null; int _begin=text.length(); |
| 958 | _ttype = BAND_ASSIGN; |
| 959 | int _saveIndex; |
| 960 | |
| 961 | match("&="); |
| 962 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 963 | _token = makeToken(_ttype); |
| 964 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 965 | } |
| 966 | _returnToken = _token; |
| 967 | } |
| 968 | |
| 969 | public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 970 | int _ttype; Token _token=null; int _begin=text.length(); |
| 971 | _ttype = LAND; |
| 972 | int _saveIndex; |
| 973 | |
| 974 | match("&&"); |
| 975 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 976 | _token = makeToken(_ttype); |
| 977 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 978 | } |
| 979 | _returnToken = _token; |
| 980 | } |
| 981 | |
| 982 | public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 983 | int _ttype; Token _token=null; int _begin=text.length(); |
| 984 | _ttype = SEMI; |
| 985 | int _saveIndex; |
| 986 | |
| 987 | match(';'); |
| 988 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 989 | _token = makeToken(_ttype); |
| 990 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 991 | } |
| 992 | _returnToken = _token; |
| 993 | } |
| 994 | |
| 995 | public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 996 | int _ttype; Token _token=null; int _begin=text.length(); |
| 997 | _ttype = WS; |
| 998 | int _saveIndex; |
| 999 | |
| 1000 | { |
| 1001 | int _cnt369=0; |
| 1002 | _loop369: |
| 1003 | do { |
| 1004 | switch ( LA(1)) { |
| 1005 | case ' ': |
| 1006 | { |
| 1007 | match(' '); |
| 1008 | break; |
| 1009 | } |
| 1010 | case '\t': |
| 1011 | { |
| 1012 | match('\t'); |
| 1013 | break; |
| 1014 | } |
| 1015 | case '\u000c': |
| 1016 | { |
| 1017 | match('\f'); |
| 1018 | break; |
| 1019 | } |
| 1020 | case '\n': case '\r': |
| 1021 | { |
| 1022 | { |
| 1023 | if ((LA(1)=='\r') && (LA(2)=='\n') && (true) && (true)) { |
| 1024 | match("\r\n"); |
| 1025 | } |
| 1026 | else if ((LA(1)=='\r') && (true) && (true) && (true)) { |
| 1027 | match('\r'); |
| 1028 | } |
| 1029 | else if ((LA(1)=='\n')) { |
| 1030 | match('\n'); |
| 1031 | } |
| 1032 | else { |
| 1033 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1034 | } |
| 1035 | |
| 1036 | } |
| 1037 | if ( inputState.guessing==0 ) { |
| 1038 | newline(); |
| 1039 | } |
| 1040 | break; |
| 1041 | } |
| 1042 | default: |
| 1043 | { |
| 1044 | if ( _cnt369>=1 ) { break _loop369; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1045 | } |
| 1046 | } |
| 1047 | _cnt369++; |
| 1048 | } while (true); |
| 1049 | } |
| 1050 | if ( inputState.guessing==0 ) { |
| 1051 | _ttype = Token.SKIP; |
| 1052 | } |
| 1053 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1054 | _token = makeToken(_ttype); |
| 1055 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1056 | } |
| 1057 | _returnToken = _token; |
| 1058 | } |
| 1059 | |
| 1060 | public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1061 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1062 | _ttype = SL_COMMENT; |
| 1063 | int _saveIndex; |
| 1064 | |
| 1065 | match("//"); |
| 1066 | { |
| 1067 | _loop373: |
| 1068 | do { |
| 1069 | if ((_tokenSet_0.member(LA(1)))) { |
| 1070 | { |
| 1071 | match(_tokenSet_0); |
| 1072 | } |
| 1073 | } |
| 1074 | else { |
| 1075 | break _loop373; |
| 1076 | } |
| 1077 | |
| 1078 | } while (true); |
| 1079 | } |
| 1080 | { |
| 1081 | switch ( LA(1)) { |
| 1082 | case '\n': |
| 1083 | { |
| 1084 | match('\n'); |
| 1085 | break; |
| 1086 | } |
| 1087 | case '\r': |
| 1088 | { |
| 1089 | match('\r'); |
| 1090 | { |
| 1091 | if ((LA(1)=='\n')) { |
| 1092 | match('\n'); |
| 1093 | } |
| 1094 | else { |
| 1095 | } |
| 1096 | |
| 1097 | } |
| 1098 | break; |
| 1099 | } |
| 1100 | default: |
| 1101 | { |
| 1102 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1103 | } |
| 1104 | } |
| 1105 | } |
| 1106 | if ( inputState.guessing==0 ) { |
| 1107 | _ttype = Token.SKIP; newline(); |
| 1108 | } |
| 1109 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1110 | _token = makeToken(_ttype); |
| 1111 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1112 | } |
| 1113 | _returnToken = _token; |
| 1114 | } |
| 1115 | |
| 1116 | public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1117 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1118 | _ttype = ML_COMMENT; |
| 1119 | int _saveIndex; |
| 1120 | |
| 1121 | match("/*"); |
| 1122 | { |
| 1123 | _loop379: |
| 1124 | do { |
| 1125 | if ((LA(1)=='\r') && (LA(2)=='\n') && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && ((LA(4) >= '\u0003' && LA(4) <= '\uffff'))) { |
| 1126 | match('\r'); |
| 1127 | match('\n'); |
| 1128 | if ( inputState.guessing==0 ) { |
| 1129 | newline(); |
| 1130 | } |
| 1131 | } |
| 1132 | else if (((LA(1)=='*') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')))&&( LA(2)!='/' )) { |
| 1133 | match('*'); |
| 1134 | } |
| 1135 | else if ((LA(1)=='\r') && ((LA(2) >= '\u0003' && LA(2) <= '\uffff')) && ((LA(3) >= '\u0003' && LA(3) <= '\uffff')) && (true)) { |
| 1136 | match('\r'); |
| 1137 | if ( inputState.guessing==0 ) { |
| 1138 | newline(); |
| 1139 | } |
| 1140 | } |
| 1141 | else if ((LA(1)=='\n')) { |
| 1142 | match('\n'); |
| 1143 | if ( inputState.guessing==0 ) { |
| 1144 | newline(); |
| 1145 | } |
| 1146 | } |
| 1147 | else if ((_tokenSet_1.member(LA(1)))) { |
| 1148 | { |
| 1149 | match(_tokenSet_1); |
| 1150 | } |
| 1151 | } |
| 1152 | else { |
| 1153 | break _loop379; |
| 1154 | } |
| 1155 | |
| 1156 | } while (true); |
| 1157 | } |
| 1158 | match("*/"); |
| 1159 | if ( inputState.guessing==0 ) { |
| 1160 | _ttype = Token.SKIP; |
| 1161 | } |
| 1162 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1163 | _token = makeToken(_ttype); |
| 1164 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1165 | } |
| 1166 | _returnToken = _token; |
| 1167 | } |
| 1168 | |
| 1169 | public final void mCHAR_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1170 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1171 | _ttype = CHAR_LITERAL; |
| 1172 | int _saveIndex; |
| 1173 | |
| 1174 | match('\''); |
| 1175 | { |
| 1176 | if ((LA(1)=='\\')) { |
| 1177 | mESC(false); |
| 1178 | } |
| 1179 | else if ((_tokenSet_2.member(LA(1)))) { |
| 1180 | { |
| 1181 | match(_tokenSet_2); |
| 1182 | } |
| 1183 | } |
| 1184 | else { |
| 1185 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1186 | } |
| 1187 | |
| 1188 | } |
| 1189 | match('\''); |
| 1190 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1191 | _token = makeToken(_ttype); |
| 1192 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1193 | } |
| 1194 | _returnToken = _token; |
| 1195 | } |
| 1196 | |
| 1197 | protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1198 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1199 | _ttype = ESC; |
| 1200 | int _saveIndex; |
| 1201 | |
| 1202 | match('\\'); |
| 1203 | { |
| 1204 | switch ( LA(1)) { |
| 1205 | case 'n': |
| 1206 | { |
| 1207 | match('n'); |
| 1208 | break; |
| 1209 | } |
| 1210 | case 'r': |
| 1211 | { |
| 1212 | match('r'); |
| 1213 | break; |
| 1214 | } |
| 1215 | case 't': |
| 1216 | { |
| 1217 | match('t'); |
| 1218 | break; |
| 1219 | } |
| 1220 | case 'b': |
| 1221 | { |
| 1222 | match('b'); |
| 1223 | break; |
| 1224 | } |
| 1225 | case 'f': |
| 1226 | { |
| 1227 | match('f'); |
| 1228 | break; |
| 1229 | } |
| 1230 | case '"': |
| 1231 | { |
| 1232 | match('"'); |
| 1233 | break; |
| 1234 | } |
| 1235 | case '\'': |
| 1236 | { |
| 1237 | match('\''); |
| 1238 | break; |
| 1239 | } |
| 1240 | case '\\': |
| 1241 | { |
| 1242 | match('\\'); |
| 1243 | break; |
| 1244 | } |
| 1245 | case 'u': |
| 1246 | { |
| 1247 | { |
| 1248 | int _cnt390=0; |
| 1249 | _loop390: |
| 1250 | do { |
| 1251 | if ((LA(1)=='u')) { |
| 1252 | match('u'); |
| 1253 | } |
| 1254 | else { |
| 1255 | if ( _cnt390>=1 ) { break _loop390; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1256 | } |
| 1257 | |
| 1258 | _cnt390++; |
| 1259 | } while (true); |
| 1260 | } |
| 1261 | mHEX_DIGIT(false); |
| 1262 | mHEX_DIGIT(false); |
| 1263 | mHEX_DIGIT(false); |
| 1264 | mHEX_DIGIT(false); |
| 1265 | break; |
| 1266 | } |
| 1267 | case '0': case '1': case '2': case '3': |
| 1268 | { |
| 1269 | matchRange('0','3'); |
| 1270 | { |
| 1271 | if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_0.member(LA(2))) && (true) && (true)) { |
| 1272 | matchRange('0','7'); |
| 1273 | { |
| 1274 | if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_0.member(LA(2))) && (true) && (true)) { |
| 1275 | matchRange('0','7'); |
| 1276 | } |
| 1277 | else if ((_tokenSet_0.member(LA(1))) && (true) && (true) && (true)) { |
| 1278 | } |
| 1279 | else { |
| 1280 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1281 | } |
| 1282 | |
| 1283 | } |
| 1284 | } |
| 1285 | else if ((_tokenSet_0.member(LA(1))) && (true) && (true) && (true)) { |
| 1286 | } |
| 1287 | else { |
| 1288 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1289 | } |
| 1290 | |
| 1291 | } |
| 1292 | break; |
| 1293 | } |
| 1294 | case '4': case '5': case '6': case '7': |
| 1295 | { |
| 1296 | matchRange('4','7'); |
| 1297 | { |
| 1298 | if (((LA(1) >= '0' && LA(1) <= '7')) && (_tokenSet_0.member(LA(2))) && (true) && (true)) { |
| 1299 | matchRange('0','7'); |
| 1300 | } |
| 1301 | else if ((_tokenSet_0.member(LA(1))) && (true) && (true) && (true)) { |
| 1302 | } |
| 1303 | else { |
| 1304 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1305 | } |
| 1306 | |
| 1307 | } |
| 1308 | break; |
| 1309 | } |
| 1310 | default: |
| 1311 | { |
| 1312 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1313 | } |
| 1314 | } |
| 1315 | } |
| 1316 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1317 | _token = makeToken(_ttype); |
| 1318 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1319 | } |
| 1320 | _returnToken = _token; |
| 1321 | } |
| 1322 | |
| 1323 | public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1324 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1325 | _ttype = STRING_LITERAL; |
| 1326 | int _saveIndex; |
| 1327 | |
| 1328 | match('"'); |
| 1329 | { |
| 1330 | _loop386: |
| 1331 | do { |
| 1332 | if ((LA(1)=='\\')) { |
| 1333 | mESC(false); |
| 1334 | } |
| 1335 | else if ((_tokenSet_3.member(LA(1)))) { |
| 1336 | { |
| 1337 | match(_tokenSet_3); |
| 1338 | } |
| 1339 | } |
| 1340 | else { |
| 1341 | break _loop386; |
| 1342 | } |
| 1343 | |
| 1344 | } while (true); |
| 1345 | } |
| 1346 | match('"'); |
| 1347 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1348 | _token = makeToken(_ttype); |
| 1349 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1350 | } |
| 1351 | _returnToken = _token; |
| 1352 | } |
| 1353 | |
| 1354 | protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1355 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1356 | _ttype = HEX_DIGIT; |
| 1357 | int _saveIndex; |
| 1358 | |
| 1359 | { |
| 1360 | switch ( LA(1)) { |
| 1361 | case '0': case '1': case '2': case '3': |
| 1362 | case '4': case '5': case '6': case '7': |
| 1363 | case '8': case '9': |
| 1364 | { |
| 1365 | matchRange('0','9'); |
| 1366 | break; |
| 1367 | } |
| 1368 | case 'A': case 'B': case 'C': case 'D': |
| 1369 | case 'E': case 'F': |
| 1370 | { |
| 1371 | matchRange('A','F'); |
| 1372 | break; |
| 1373 | } |
| 1374 | case 'a': case 'b': case 'c': case 'd': |
| 1375 | case 'e': case 'f': |
| 1376 | { |
| 1377 | matchRange('a','f'); |
| 1378 | break; |
| 1379 | } |
| 1380 | default: |
| 1381 | { |
| 1382 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1383 | } |
| 1384 | } |
| 1385 | } |
| 1386 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1387 | _token = makeToken(_ttype); |
| 1388 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1389 | } |
| 1390 | _returnToken = _token; |
| 1391 | } |
| 1392 | |
| 1393 | protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1394 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1395 | _ttype = VOCAB; |
| 1396 | int _saveIndex; |
| 1397 | |
| 1398 | matchRange('\3','\377'); |
| 1399 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1400 | _token = makeToken(_ttype); |
| 1401 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1402 | } |
| 1403 | _returnToken = _token; |
| 1404 | } |
| 1405 | |
| 1406 | public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1407 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1408 | _ttype = IDENT; |
| 1409 | int _saveIndex; |
| 1410 | |
| 1411 | { |
| 1412 | switch ( LA(1)) { |
| 1413 | case 'a': case 'b': case 'c': case 'd': |
| 1414 | case 'e': case 'f': case 'g': case 'h': |
| 1415 | case 'i': case 'j': case 'k': case 'l': |
| 1416 | case 'm': case 'n': case 'o': case 'p': |
| 1417 | case 'q': case 'r': case 's': case 't': |
| 1418 | case 'u': case 'v': case 'w': case 'x': |
| 1419 | case 'y': case 'z': |
| 1420 | { |
| 1421 | matchRange('a','z'); |
| 1422 | break; |
| 1423 | } |
| 1424 | case 'A': case 'B': case 'C': case 'D': |
| 1425 | case 'E': case 'F': case 'G': case 'H': |
| 1426 | case 'I': case 'J': case 'K': case 'L': |
| 1427 | case 'M': case 'N': case 'O': case 'P': |
| 1428 | case 'Q': case 'R': case 'S': case 'T': |
| 1429 | case 'U': case 'V': case 'W': case 'X': |
| 1430 | case 'Y': case 'Z': |
| 1431 | { |
| 1432 | matchRange('A','Z'); |
| 1433 | break; |
| 1434 | } |
| 1435 | case '_': |
| 1436 | { |
| 1437 | match('_'); |
| 1438 | break; |
| 1439 | } |
| 1440 | case '$': |
| 1441 | { |
| 1442 | match('$'); |
| 1443 | break; |
| 1444 | } |
| 1445 | default: |
| 1446 | { |
| 1447 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1448 | } |
| 1449 | } |
| 1450 | } |
| 1451 | { |
| 1452 | _loop400: |
| 1453 | do { |
| 1454 | switch ( LA(1)) { |
| 1455 | case 'a': case 'b': case 'c': case 'd': |
| 1456 | case 'e': case 'f': case 'g': case 'h': |
| 1457 | case 'i': case 'j': case 'k': case 'l': |
| 1458 | case 'm': case 'n': case 'o': case 'p': |
| 1459 | case 'q': case 'r': case 's': case 't': |
| 1460 | case 'u': case 'v': case 'w': case 'x': |
| 1461 | case 'y': case 'z': |
| 1462 | { |
| 1463 | matchRange('a','z'); |
| 1464 | break; |
| 1465 | } |
| 1466 | case 'A': case 'B': case 'C': case 'D': |
| 1467 | case 'E': case 'F': case 'G': case 'H': |
| 1468 | case 'I': case 'J': case 'K': case 'L': |
| 1469 | case 'M': case 'N': case 'O': case 'P': |
| 1470 | case 'Q': case 'R': case 'S': case 'T': |
| 1471 | case 'U': case 'V': case 'W': case 'X': |
| 1472 | case 'Y': case 'Z': |
| 1473 | { |
| 1474 | matchRange('A','Z'); |
| 1475 | break; |
| 1476 | } |
| 1477 | case '_': |
| 1478 | { |
| 1479 | match('_'); |
| 1480 | break; |
| 1481 | } |
| 1482 | case '0': case '1': case '2': case '3': |
| 1483 | case '4': case '5': case '6': case '7': |
| 1484 | case '8': case '9': |
| 1485 | { |
| 1486 | matchRange('0','9'); |
| 1487 | break; |
| 1488 | } |
| 1489 | case '$': |
| 1490 | { |
| 1491 | match('$'); |
| 1492 | break; |
| 1493 | } |
| 1494 | default: |
| 1495 | { |
| 1496 | break _loop400; |
| 1497 | } |
| 1498 | } |
| 1499 | } while (true); |
| 1500 | } |
| 1501 | if ( inputState.guessing==0 ) { |
| 1502 | |
| 1503 | // check if "assert" keyword is enabled |
| 1504 | if (assertEnabled && "assert".equals(new String(text.getBuffer(),_begin,text.length()-_begin))) { |
| 1505 | _ttype = LITERAL_assert; // set token type for the rule in the parser |
| 1506 | } |
| 1507 | // check if "enum" keyword is enabled |
| 1508 | if (enumEnabled && "enum".equals(new String(text.getBuffer(),_begin,text.length()-_begin))) { |
| 1509 | _ttype = LITERAL_enum; // set token type for the rule in the parser |
| 1510 | } |
| 1511 | |
| 1512 | } |
| 1513 | _ttype = testLiteralsTable(_ttype); |
| 1514 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1515 | _token = makeToken(_ttype); |
| 1516 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1517 | } |
| 1518 | _returnToken = _token; |
| 1519 | } |
| 1520 | |
| 1521 | public final void mNUM_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1522 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1523 | _ttype = NUM_INT; |
| 1524 | int _saveIndex; |
| 1525 | Token f1=null; |
| 1526 | Token f2=null; |
| 1527 | Token f3=null; |
| 1528 | Token f4=null; |
| 1529 | boolean isDecimal=false; Token t=null; |
| 1530 | |
| 1531 | switch ( LA(1)) { |
| 1532 | case '.': |
| 1533 | { |
| 1534 | match('.'); |
| 1535 | if ( inputState.guessing==0 ) { |
| 1536 | _ttype = DOT; |
| 1537 | } |
| 1538 | { |
| 1539 | switch ( LA(1)) { |
| 1540 | case '0': case '1': case '2': case '3': |
| 1541 | case '4': case '5': case '6': case '7': |
| 1542 | case '8': case '9': |
| 1543 | { |
| 1544 | { |
| 1545 | { |
| 1546 | int _cnt405=0; |
| 1547 | _loop405: |
| 1548 | do { |
| 1549 | if (((LA(1) >= '0' && LA(1) <= '9'))) { |
| 1550 | matchRange('0','9'); |
| 1551 | } |
| 1552 | else { |
| 1553 | if ( _cnt405>=1 ) { break _loop405; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1554 | } |
| 1555 | |
| 1556 | _cnt405++; |
| 1557 | } while (true); |
| 1558 | } |
| 1559 | { |
| 1560 | if ((LA(1)=='E'||LA(1)=='e')) { |
| 1561 | mEXPONENT(false); |
| 1562 | } |
| 1563 | else { |
| 1564 | } |
| 1565 | |
| 1566 | } |
| 1567 | { |
| 1568 | if ((LA(1)=='D'||LA(1)=='F'||LA(1)=='d'||LA(1)=='f')) { |
| 1569 | mFLOAT_SUFFIX(true); |
| 1570 | f1=_returnToken; |
| 1571 | if ( inputState.guessing==0 ) { |
| 1572 | t=f1; |
| 1573 | } |
| 1574 | } |
| 1575 | else { |
| 1576 | } |
| 1577 | |
| 1578 | } |
| 1579 | if ( inputState.guessing==0 ) { |
| 1580 | |
| 1581 | if (t != null && t.getText().toUpperCase().indexOf('F')>=0) { |
| 1582 | _ttype = NUM_FLOAT; |
| 1583 | } |
| 1584 | else { |
| 1585 | _ttype = NUM_DOUBLE; // assume double |
| 1586 | } |
| 1587 | |
| 1588 | } |
| 1589 | } |
| 1590 | break; |
| 1591 | } |
| 1592 | case '.': |
| 1593 | { |
| 1594 | { |
| 1595 | match(".."); |
| 1596 | if ( inputState.guessing==0 ) { |
| 1597 | _ttype = TRIPLE_DOT; |
| 1598 | } |
| 1599 | } |
| 1600 | break; |
| 1601 | } |
| 1602 | default: |
| 1603 | { |
| 1604 | } |
| 1605 | } |
| 1606 | } |
| 1607 | break; |
| 1608 | } |
| 1609 | case '0': case '1': case '2': case '3': |
| 1610 | case '4': case '5': case '6': case '7': |
| 1611 | case '8': case '9': |
| 1612 | { |
| 1613 | { |
| 1614 | switch ( LA(1)) { |
| 1615 | case '0': |
| 1616 | { |
| 1617 | match('0'); |
| 1618 | if ( inputState.guessing==0 ) { |
| 1619 | isDecimal = true; |
| 1620 | } |
| 1621 | { |
| 1622 | if ((LA(1)=='X'||LA(1)=='x')) { |
| 1623 | { |
| 1624 | switch ( LA(1)) { |
| 1625 | case 'x': |
| 1626 | { |
| 1627 | match('x'); |
| 1628 | break; |
| 1629 | } |
| 1630 | case 'X': |
| 1631 | { |
| 1632 | match('X'); |
| 1633 | break; |
| 1634 | } |
| 1635 | default: |
| 1636 | { |
| 1637 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1638 | } |
| 1639 | } |
| 1640 | } |
| 1641 | { |
| 1642 | int _cnt413=0; |
| 1643 | _loop413: |
| 1644 | do { |
| 1645 | if ((_tokenSet_4.member(LA(1))) && (true) && (true) && (true)) { |
| 1646 | mHEX_DIGIT(false); |
| 1647 | } |
| 1648 | else { |
| 1649 | if ( _cnt413>=1 ) { break _loop413; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1650 | } |
| 1651 | |
| 1652 | _cnt413++; |
| 1653 | } while (true); |
| 1654 | } |
| 1655 | } |
| 1656 | else { |
| 1657 | boolean synPredMatched418 = false; |
| 1658 | if ((((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true) && (true))) { |
| 1659 | int _m418 = mark(); |
| 1660 | synPredMatched418 = true; |
| 1661 | inputState.guessing++; |
| 1662 | try { |
| 1663 | { |
| 1664 | { |
| 1665 | int _cnt416=0; |
| 1666 | _loop416: |
| 1667 | do { |
| 1668 | if (((LA(1) >= '0' && LA(1) <= '9'))) { |
| 1669 | matchRange('0','9'); |
| 1670 | } |
| 1671 | else { |
| 1672 | if ( _cnt416>=1 ) { break _loop416; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1673 | } |
| 1674 | |
| 1675 | _cnt416++; |
| 1676 | } while (true); |
| 1677 | } |
| 1678 | { |
| 1679 | switch ( LA(1)) { |
| 1680 | case '.': |
| 1681 | { |
| 1682 | match('.'); |
| 1683 | break; |
| 1684 | } |
| 1685 | case 'E': case 'e': |
| 1686 | { |
| 1687 | mEXPONENT(false); |
| 1688 | break; |
| 1689 | } |
| 1690 | case 'D': case 'F': case 'd': case 'f': |
| 1691 | { |
| 1692 | mFLOAT_SUFFIX(false); |
| 1693 | break; |
| 1694 | } |
| 1695 | default: |
| 1696 | { |
| 1697 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1698 | } |
| 1699 | } |
| 1700 | } |
| 1701 | } |
| 1702 | } |
| 1703 | catch (RecognitionException pe) { |
| 1704 | synPredMatched418 = false; |
| 1705 | } |
| 1706 | rewind(_m418); |
| 1707 | inputState.guessing--; |
| 1708 | } |
| 1709 | if ( synPredMatched418 ) { |
| 1710 | { |
| 1711 | int _cnt420=0; |
| 1712 | _loop420: |
| 1713 | do { |
| 1714 | if (((LA(1) >= '0' && LA(1) <= '9'))) { |
| 1715 | matchRange('0','9'); |
| 1716 | } |
| 1717 | else { |
| 1718 | if ( _cnt420>=1 ) { break _loop420; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1719 | } |
| 1720 | |
| 1721 | _cnt420++; |
| 1722 | } while (true); |
| 1723 | } |
| 1724 | } |
| 1725 | else if (((LA(1) >= '0' && LA(1) <= '7')) && (true) && (true) && (true)) { |
| 1726 | { |
| 1727 | int _cnt422=0; |
| 1728 | _loop422: |
| 1729 | do { |
| 1730 | if (((LA(1) >= '0' && LA(1) <= '7'))) { |
| 1731 | matchRange('0','7'); |
| 1732 | } |
| 1733 | else { |
| 1734 | if ( _cnt422>=1 ) { break _loop422; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1735 | } |
| 1736 | |
| 1737 | _cnt422++; |
| 1738 | } while (true); |
| 1739 | } |
| 1740 | } |
| 1741 | else { |
| 1742 | } |
| 1743 | } |
| 1744 | } |
| 1745 | break; |
| 1746 | } |
| 1747 | case '1': case '2': case '3': case '4': |
| 1748 | case '5': case '6': case '7': case '8': |
| 1749 | case '9': |
| 1750 | { |
| 1751 | { |
| 1752 | matchRange('1','9'); |
| 1753 | } |
| 1754 | { |
| 1755 | _loop425: |
| 1756 | do { |
| 1757 | if (((LA(1) >= '0' && LA(1) <= '9'))) { |
| 1758 | matchRange('0','9'); |
| 1759 | } |
| 1760 | else { |
| 1761 | break _loop425; |
| 1762 | } |
| 1763 | |
| 1764 | } while (true); |
| 1765 | } |
| 1766 | if ( inputState.guessing==0 ) { |
| 1767 | isDecimal=true; |
| 1768 | } |
| 1769 | break; |
| 1770 | } |
| 1771 | default: |
| 1772 | { |
| 1773 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1774 | } |
| 1775 | } |
| 1776 | } |
| 1777 | { |
| 1778 | if ((LA(1)=='L'||LA(1)=='l')) { |
| 1779 | { |
| 1780 | switch ( LA(1)) { |
| 1781 | case 'l': |
| 1782 | { |
| 1783 | match('l'); |
| 1784 | break; |
| 1785 | } |
| 1786 | case 'L': |
| 1787 | { |
| 1788 | match('L'); |
| 1789 | break; |
| 1790 | } |
| 1791 | default: |
| 1792 | { |
| 1793 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1794 | } |
| 1795 | } |
| 1796 | } |
| 1797 | if ( inputState.guessing==0 ) { |
| 1798 | _ttype = NUM_LONG; |
| 1799 | } |
| 1800 | } |
| 1801 | else if (((LA(1)=='.'||LA(1)=='D'||LA(1)=='E'||LA(1)=='F'||LA(1)=='d'||LA(1)=='e'||LA(1)=='f'))&&(isDecimal)) { |
| 1802 | { |
| 1803 | switch ( LA(1)) { |
| 1804 | case '.': |
| 1805 | { |
| 1806 | match('.'); |
| 1807 | { |
| 1808 | _loop430: |
| 1809 | do { |
| 1810 | if (((LA(1) >= '0' && LA(1) <= '9'))) { |
| 1811 | matchRange('0','9'); |
| 1812 | } |
| 1813 | else { |
| 1814 | break _loop430; |
| 1815 | } |
| 1816 | |
| 1817 | } while (true); |
| 1818 | } |
| 1819 | { |
| 1820 | if ((LA(1)=='E'||LA(1)=='e')) { |
| 1821 | mEXPONENT(false); |
| 1822 | } |
| 1823 | else { |
| 1824 | } |
| 1825 | |
| 1826 | } |
| 1827 | { |
| 1828 | if ((LA(1)=='D'||LA(1)=='F'||LA(1)=='d'||LA(1)=='f')) { |
| 1829 | mFLOAT_SUFFIX(true); |
| 1830 | f2=_returnToken; |
| 1831 | if ( inputState.guessing==0 ) { |
| 1832 | t=f2; |
| 1833 | } |
| 1834 | } |
| 1835 | else { |
| 1836 | } |
| 1837 | |
| 1838 | } |
| 1839 | break; |
| 1840 | } |
| 1841 | case 'E': case 'e': |
| 1842 | { |
| 1843 | mEXPONENT(false); |
| 1844 | { |
| 1845 | if ((LA(1)=='D'||LA(1)=='F'||LA(1)=='d'||LA(1)=='f')) { |
| 1846 | mFLOAT_SUFFIX(true); |
| 1847 | f3=_returnToken; |
| 1848 | if ( inputState.guessing==0 ) { |
| 1849 | t=f3; |
| 1850 | } |
| 1851 | } |
| 1852 | else { |
| 1853 | } |
| 1854 | |
| 1855 | } |
| 1856 | break; |
| 1857 | } |
| 1858 | case 'D': case 'F': case 'd': case 'f': |
| 1859 | { |
| 1860 | mFLOAT_SUFFIX(true); |
| 1861 | f4=_returnToken; |
| 1862 | if ( inputState.guessing==0 ) { |
| 1863 | t=f4; |
| 1864 | } |
| 1865 | break; |
| 1866 | } |
| 1867 | default: |
| 1868 | { |
| 1869 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1870 | } |
| 1871 | } |
| 1872 | } |
| 1873 | if ( inputState.guessing==0 ) { |
| 1874 | |
| 1875 | if (t != null && t.getText().toUpperCase() .indexOf('F') >= 0) { |
| 1876 | _ttype = NUM_FLOAT; |
| 1877 | } |
| 1878 | else { |
| 1879 | _ttype = NUM_DOUBLE; // assume double |
| 1880 | } |
| 1881 | |
| 1882 | } |
| 1883 | } |
| 1884 | else { |
| 1885 | } |
| 1886 | |
| 1887 | } |
| 1888 | break; |
| 1889 | } |
| 1890 | default: |
| 1891 | { |
| 1892 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1893 | } |
| 1894 | } |
| 1895 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1896 | _token = makeToken(_ttype); |
| 1897 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1898 | } |
| 1899 | _returnToken = _token; |
| 1900 | } |
| 1901 | |
| 1902 | protected final void mEXPONENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1903 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1904 | _ttype = EXPONENT; |
| 1905 | int _saveIndex; |
| 1906 | |
| 1907 | { |
| 1908 | switch ( LA(1)) { |
| 1909 | case 'e': |
| 1910 | { |
| 1911 | match('e'); |
| 1912 | break; |
| 1913 | } |
| 1914 | case 'E': |
| 1915 | { |
| 1916 | match('E'); |
| 1917 | break; |
| 1918 | } |
| 1919 | default: |
| 1920 | { |
| 1921 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1922 | } |
| 1923 | } |
| 1924 | } |
| 1925 | { |
| 1926 | switch ( LA(1)) { |
| 1927 | case '+': |
| 1928 | { |
| 1929 | match('+'); |
| 1930 | break; |
| 1931 | } |
| 1932 | case '-': |
| 1933 | { |
| 1934 | match('-'); |
| 1935 | break; |
| 1936 | } |
| 1937 | case '0': case '1': case '2': case '3': |
| 1938 | case '4': case '5': case '6': case '7': |
| 1939 | case '8': case '9': |
| 1940 | { |
| 1941 | break; |
| 1942 | } |
| 1943 | default: |
| 1944 | { |
| 1945 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1946 | } |
| 1947 | } |
| 1948 | } |
| 1949 | { |
| 1950 | int _cnt439=0; |
| 1951 | _loop439: |
| 1952 | do { |
| 1953 | if (((LA(1) >= '0' && LA(1) <= '9'))) { |
| 1954 | matchRange('0','9'); |
| 1955 | } |
| 1956 | else { |
| 1957 | if ( _cnt439>=1 ) { break _loop439; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} |
| 1958 | } |
| 1959 | |
| 1960 | _cnt439++; |
| 1961 | } while (true); |
| 1962 | } |
| 1963 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 1964 | _token = makeToken(_ttype); |
| 1965 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 1966 | } |
| 1967 | _returnToken = _token; |
| 1968 | } |
| 1969 | |
| 1970 | protected final void mFLOAT_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 1971 | int _ttype; Token _token=null; int _begin=text.length(); |
| 1972 | _ttype = FLOAT_SUFFIX; |
| 1973 | int _saveIndex; |
| 1974 | |
| 1975 | switch ( LA(1)) { |
| 1976 | case 'f': |
| 1977 | { |
| 1978 | match('f'); |
| 1979 | break; |
| 1980 | } |
| 1981 | case 'F': |
| 1982 | { |
| 1983 | match('F'); |
| 1984 | break; |
| 1985 | } |
| 1986 | case 'd': |
| 1987 | { |
| 1988 | match('d'); |
| 1989 | break; |
| 1990 | } |
| 1991 | case 'D': |
| 1992 | { |
| 1993 | match('D'); |
| 1994 | break; |
| 1995 | } |
| 1996 | default: |
| 1997 | { |
| 1998 | throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); |
| 1999 | } |
| 2000 | } |
| 2001 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 2002 | _token = makeToken(_ttype); |
| 2003 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 2004 | } |
| 2005 | _returnToken = _token; |
| 2006 | } |
| 2007 | |
| 2008 | public final void mAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { |
| 2009 | int _ttype; Token _token=null; int _begin=text.length(); |
| 2010 | _ttype = AT; |
| 2011 | int _saveIndex; |
| 2012 | |
| 2013 | match('@'); |
| 2014 | if ( _createToken && _token==null && _ttype!=Token.SKIP ) { |
| 2015 | _token = makeToken(_ttype); |
| 2016 | _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); |
| 2017 | } |
| 2018 | _returnToken = _token; |
| 2019 | } |
| 2020 | |
| 2021 | |
| 2022 | private static final long[] mk_tokenSet_0() { |
| 2023 | long[] data = new long[2048]; |
| 2024 | data[0]=-9224L; |
| 2025 | for (int i = 1; i<=1023; i++) { data[i]=-1L; } |
| 2026 | return data; |
| 2027 | } |
| 2028 | public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0()); |
| 2029 | private static final long[] mk_tokenSet_1() { |
| 2030 | long[] data = new long[2048]; |
| 2031 | data[0]=-4398046520328L; |
| 2032 | for (int i = 1; i<=1023; i++) { data[i]=-1L; } |
| 2033 | return data; |
| 2034 | } |
| 2035 | public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1()); |
| 2036 | private static final long[] mk_tokenSet_2() { |
| 2037 | long[] data = new long[2048]; |
| 2038 | data[0]=-549755823112L; |
| 2039 | data[1]=-268435457L; |
| 2040 | for (int i = 2; i<=1023; i++) { data[i]=-1L; } |
| 2041 | return data; |
| 2042 | } |
| 2043 | public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2()); |
| 2044 | private static final long[] mk_tokenSet_3() { |
| 2045 | long[] data = new long[2048]; |
| 2046 | data[0]=-17179878408L; |
| 2047 | data[1]=-268435457L; |
| 2048 | for (int i = 2; i<=1023; i++) { data[i]=-1L; } |
| 2049 | return data; |
| 2050 | } |
| 2051 | public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3()); |
| 2052 | private static final long[] mk_tokenSet_4() { |
| 2053 | long[] data = new long[1025]; |
| 2054 | data[0]=287948901175001088L; |
| 2055 | data[1]=541165879422L; |
| 2056 | return data; |
| 2057 | } |
| 2058 | public static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4()); |
| 2059 | |
| 2060 | } |