Quadcap Embeddable Database

com/quadcap/sql/SQLLexer.java

Go to the documentation of this file.
00001 // $ANTLR 2.7.2a2 (20020112-1): "sql.g" -> "SQLLexer.java"$ 00002 00003 package com.quadcap.sql; 00004 00005 import java.io.InputStream; 00006 import antlr.TokenStreamException; 00007 import antlr.TokenStreamIOException; 00008 import antlr.TokenStreamRecognitionException; 00009 import antlr.CharStreamException; 00010 import antlr.CharStreamIOException; 00011 import antlr.ANTLRException; 00012 import java.io.Reader; 00013 import java.util.Hashtable; 00014 import antlr.CharScanner; 00015 import antlr.InputBuffer; 00016 import antlr.ByteBuffer; 00017 import antlr.CharBuffer; 00018 import antlr.Token; 00019 import antlr.CommonToken; 00020 import antlr.RecognitionException; 00021 import antlr.NoViableAltForCharException; 00022 import antlr.MismatchedCharException; 00023 import antlr.TokenStream; 00024 import antlr.ANTLRHashString; 00025 import antlr.LexerSharedInputState; 00026 import antlr.collections.impl.BitSet; 00027 import antlr.SemanticException; 00028 00029 public class SQLLexer extends antlr.CharScanner implements SQLTokenTypes, TokenStream 00030 { 00031 public SQLLexer(InputStream in) { 00032 this(new ByteBuffer(in)); 00033 } 00034 public SQLLexer(Reader in) { 00035 this(new CharBuffer(in)); 00036 } 00037 public SQLLexer(InputBuffer ib) { 00038 this(new LexerSharedInputState(ib)); 00039 } 00040 public SQLLexer(LexerSharedInputState state) { 00041 super(state); 00042 caseSensitiveLiterals = false; 00043 setCaseSensitive(true); 00044 literals = new Hashtable(); 00045 literals.put(new ANTLRHashString("local", this), new Integer(46)); 00046 literals.put(new ANTLRHashString("sql_tsi_month", this), new Integer(154)); 00047 literals.put(new ANTLRHashString("blob", this), new Integer(72)); 00048 literals.put(new ANTLRHashString("action", this), new Integer(63)); 00049 literals.put(new ANTLRHashString("public", this), new Integer(48)); 00050 literals.put(new ANTLRHashString("smallint", this), new Integer(81)); 00051 literals.put(new ANTLRHashString("between", this), new Integer(116)); 00052 literals.put(new ANTLRHashString("time", this), new Integer(93)); 00053 literals.put(new ANTLRHashString("case", this), new Integer(129)); 00054 literals.put(new ANTLRHashString("option", this), new Integer(37)); 00055 literals.put(new ANTLRHashString("sql_tsi_frac_second", this), new Integer(148)); 00056 literals.put(new ANTLRHashString("tinyint", this), new Integer(82)); 00057 literals.put(new ANTLRHashString("delete", this), new Integer(42)); 00058 literals.put(new ANTLRHashString("transaction", this), new Integer(15)); 00059 literals.put(new ANTLRHashString("end", this), new Integer(133)); 00060 literals.put(new ANTLRHashString("object", this), new Integer(74)); 00061 literals.put(new ANTLRHashString("view", this), new Integer(10)); 00062 literals.put(new ANTLRHashString("system_user", this), new Integer(144)); 00063 literals.put(new ANTLRHashString("initially", this), new Integer(64)); 00064 literals.put(new ANTLRHashString("timestamp", this), new Integer(95)); 00065 literals.put(new ANTLRHashString("insert", this), new Integer(52)); 00066 literals.put(new ANTLRHashString("distinct", this), new Integer(104)); 00067 literals.put(new ANTLRHashString("check", this), new Integer(24)); 00068 literals.put(new ANTLRHashString("binary", this), new Integer(71)); 00069 literals.put(new ANTLRHashString("grant", this), new Integer(47)); 00070 literals.put(new ANTLRHashString("where", this), new Integer(40)); 00071 literals.put(new ANTLRHashString("alter", this), new Integer(19)); 00072 literals.put(new ANTLRHashString("varbinary", this), new Integer(70)); 00073 literals.put(new ANTLRHashString("zone", this), new Integer(94)); 00074 literals.put(new ANTLRHashString("integer", this), new Integer(80)); 00075 literals.put(new ANTLRHashString("sql_tsi_minute", this), new Integer(150)); 00076 literals.put(new ANTLRHashString("then", this), new Integer(131)); 00077 literals.put(new ANTLRHashString("match", this), new Integer(59)); 00078 literals.put(new ANTLRHashString("decimal", this), new Integer(85)); 00079 literals.put(new ANTLRHashString("select", this), new Integer(51)); 00080 literals.put(new ANTLRHashString("cascade", this), new Integer(30)); 00081 literals.put(new ANTLRHashString("to", this), new Integer(33)); 00082 literals.put(new ANTLRHashString("and", this), new Integer(113)); 00083 literals.put(new ANTLRHashString("outer", this), new Integer(181)); 00084 literals.put(new ANTLRHashString("float", this), new Integer(90)); 00085 literals.put(new ANTLRHashString("not", this), new Integer(55)); 00086 literals.put(new ANTLRHashString("constraint", this), new Integer(21)); 00087 literals.put(new ANTLRHashString("interval", this), new Integer(96)); 00088 literals.put(new ANTLRHashString("schema", this), new Integer(7)); 00089 literals.put(new ANTLRHashString("numeric", this), new Integer(86)); 00090 literals.put(new ANTLRHashString("usage", this), new Integer(54)); 00091 literals.put(new ANTLRHashString("date", this), new Integer(92)); 00092 literals.put(new ANTLRHashString("using", this), new Integer(109)); 00093 literals.put(new ANTLRHashString("no", this), new Integer(62)); 00094 literals.put(new ANTLRHashString("key", this), new Integer(57)); 00095 literals.put(new ANTLRHashString("month", this), new Integer(137)); 00096 literals.put(new ANTLRHashString("from", this), new Integer(43)); 00097 literals.put(new ANTLRHashString("bigint", this), new Integer(83)); 00098 literals.put(new ANTLRHashString("null", this), new Integer(56)); 00099 literals.put(new ANTLRHashString("count", this), new Integer(165)); 00100 literals.put(new ANTLRHashString("real", this), new Integer(87)); 00101 literals.put(new ANTLRHashString("add", this), new Integer(20)); 00102 literals.put(new ANTLRHashString("deferrable", this), new Integer(67)); 00103 literals.put(new ANTLRHashString("current_user", this), new Integer(142)); 00104 literals.put(new ANTLRHashString("like", this), new Integer(115)); 00105 literals.put(new ANTLRHashString("natural", this), new Integer(178)); 00106 literals.put(new ANTLRHashString("when", this), new Integer(130)); 00107 literals.put(new ANTLRHashString("inner", this), new Integer(180)); 00108 literals.put(new ANTLRHashString("except", this), new Integer(183)); 00109 literals.put(new ANTLRHashString("sql_tsi_quarter", this), new Integer(155)); 00110 literals.put(new ANTLRHashString("character", this), new Integer(76)); 00111 literals.put(new ANTLRHashString("authorization", this), new Integer(44)); 00112 literals.put(new ANTLRHashString("sql_tsi_day", this), new Integer(152)); 00113 literals.put(new ANTLRHashString("cascaded", this), new Integer(36)); 00114 literals.put(new ANTLRHashString("with", this), new Integer(35)); 00115 literals.put(new ANTLRHashString("set", this), new Integer(31)); 00116 literals.put(new ANTLRHashString("current_time", this), new Integer(146)); 00117 literals.put(new ANTLRHashString("escape", this), new Integer(119)); 00118 literals.put(new ANTLRHashString("only", this), new Integer(99)); 00119 literals.put(new ANTLRHashString("global", this), new Integer(45)); 00120 literals.put(new ANTLRHashString("foreign", this), new Integer(23)); 00121 literals.put(new ANTLRHashString("intersect", this), new Integer(182)); 00122 literals.put(new ANTLRHashString("work", this), new Integer(13)); 00123 literals.put(new ANTLRHashString("**", this), new Integer(120)); 00124 literals.put(new ANTLRHashString("join", this), new Integer(177)); 00125 literals.put(new ANTLRHashString("rollback", this), new Integer(14)); 00126 literals.put(new ANTLRHashString("commit", this), new Integer(12)); 00127 literals.put(new ANTLRHashString("is", this), new Integer(114)); 00128 literals.put(new ANTLRHashString("or", this), new Integer(112)); 00129 literals.put(new ANTLRHashString("any", this), new Integer(173)); 00130 literals.put(new ANTLRHashString("create", this), new Integer(4)); 00131 literals.put(new ANTLRHashString("dec", this), new Integer(84)); 00132 literals.put(new ANTLRHashString("full", this), new Integer(60)); 00133 literals.put(new ANTLRHashString("double", this), new Integer(88)); 00134 literals.put(new ANTLRHashString("min", this), new Integer(162)); 00135 literals.put(new ANTLRHashString("sql_tsi_hour", this), new Integer(151)); 00136 literals.put(new ANTLRHashString("as", this), new Integer(34)); 00137 literals.put(new ANTLRHashString("first", this), new Integer(27)); 00138 literals.put(new ANTLRHashString("by", this), new Integer(101)); 00139 literals.put(new ANTLRHashString("second", this), new Integer(139)); 00140 literals.put(new ANTLRHashString("all", this), new Integer(49)); 00141 literals.put(new ANTLRHashString("union", this), new Integer(179)); 00142 literals.put(new ANTLRHashString("drop", this), new Integer(11)); 00143 literals.put(new ANTLRHashString("order", this), new Integer(100)); 00144 literals.put(new ANTLRHashString("privileges", this), new Integer(50)); 00145 literals.put(new ANTLRHashString("hour", this), new Integer(134)); 00146 literals.put(new ANTLRHashString("primary", this), new Integer(22)); 00147 literals.put(new ANTLRHashString("current_date", this), new Integer(145)); 00148 literals.put(new ANTLRHashString("some", this), new Integer(174)); 00149 literals.put(new ANTLRHashString("values", this), new Integer(108)); 00150 literals.put(new ANTLRHashString("int", this), new Integer(79)); 00151 literals.put(new ANTLRHashString("for", this), new Integer(97)); 00152 literals.put(new ANTLRHashString("boolean", this), new Integer(91)); 00153 literals.put(new ANTLRHashString("cross", this), new Integer(176)); 00154 literals.put(new ANTLRHashString("varchar", this), new Integer(78)); 00155 literals.put(new ANTLRHashString("char", this), new Integer(77)); 00156 literals.put(new ANTLRHashString("bit", this), new Integer(68)); 00157 literals.put(new ANTLRHashString("large", this), new Integer(73)); 00158 literals.put(new ANTLRHashString("index", this), new Integer(6)); 00159 literals.put(new ANTLRHashString("default", this), new Integer(32)); 00160 literals.put(new ANTLRHashString("clob", this), new Integer(75)); 00161 literals.put(new ANTLRHashString("false", this), new Integer(160)); 00162 literals.put(new ANTLRHashString("session_user", this), new Integer(143)); 00163 literals.put(new ANTLRHashString("exists", this), new Integer(118)); 00164 literals.put(new ANTLRHashString("table", this), new Integer(9)); 00165 literals.put(new ANTLRHashString("asc", this), new Integer(102)); 00166 literals.put(new ANTLRHashString("unknown", this), new Integer(167)); 00167 literals.put(new ANTLRHashString("sql_tsi_year", this), new Integer(156)); 00168 literals.put(new ANTLRHashString("minute", this), new Integer(136)); 00169 literals.put(new ANTLRHashString("left", this), new Integer(135)); 00170 literals.put(new ANTLRHashString("day", this), new Integer(158)); 00171 literals.put(new ANTLRHashString("partial", this), new Integer(61)); 00172 literals.put(new ANTLRHashString("desc", this), new Integer(103)); 00173 literals.put(new ANTLRHashString("temporary", this), new Integer(8)); 00174 literals.put(new ANTLRHashString("max", this), new Integer(163)); 00175 literals.put(new ANTLRHashString("sum", this), new Integer(164)); 00176 literals.put(new ANTLRHashString("year", this), new Integer(140)); 00177 literals.put(new ANTLRHashString("on", this), new Integer(16)); 00178 literals.put(new ANTLRHashString("after", this), new Integer(28)); 00179 literals.put(new ANTLRHashString("cast", this), new Integer(157)); 00180 literals.put(new ANTLRHashString("identity", this), new Integer(58)); 00181 literals.put(new ANTLRHashString("restrict", this), new Integer(29)); 00182 literals.put(new ANTLRHashString("into", this), new Integer(166)); 00183 literals.put(new ANTLRHashString("rename", this), new Integer(25)); 00184 literals.put(new ANTLRHashString("sql_tsi_week", this), new Integer(153)); 00185 literals.put(new ANTLRHashString("else", this), new Integer(132)); 00186 literals.put(new ANTLRHashString("right", this), new Integer(138)); 00187 literals.put(new ANTLRHashString("in", this), new Integer(117)); 00188 literals.put(new ANTLRHashString("sql_tsi_second", this), new Integer(149)); 00189 literals.put(new ANTLRHashString("avg", this), new Integer(161)); 00190 literals.put(new ANTLRHashString("precision", this), new Integer(89)); 00191 literals.put(new ANTLRHashString("update", this), new Integer(38)); 00192 literals.put(new ANTLRHashString("true", this), new Integer(159)); 00193 literals.put(new ANTLRHashString("group", this), new Integer(110)); 00194 literals.put(new ANTLRHashString("immediate", this), new Integer(66)); 00195 literals.put(new ANTLRHashString("read", this), new Integer(98)); 00196 literals.put(new ANTLRHashString("having", this), new Integer(106)); 00197 literals.put(new ANTLRHashString("column", this), new Integer(26)); 00198 literals.put(new ANTLRHashString("corresponding", this), new Integer(107)); 00199 literals.put(new ANTLRHashString("user", this), new Integer(141)); 00200 literals.put(new ANTLRHashString("unique", this), new Integer(5)); 00201 literals.put(new ANTLRHashString("references", this), new Integer(53)); 00202 literals.put(new ANTLRHashString("current_timestamp", this), new Integer(147)); 00203 literals.put(new ANTLRHashString("varying", this), new Integer(69)); 00204 literals.put(new ANTLRHashString("deferred", this), new Integer(65)); 00205 } 00206 00207 public Token nextToken() throws TokenStreamException { 00208 Token theRetToken=null; 00209 tryAgain: 00210 for (;;) { 00211 Token _token = null; 00212 int _ttype = Token.INVALID_TYPE; 00213 resetText(); 00214 try { // for char stream error handling 00215 try { // for lexical error handling 00216 switch ( LA(1)) { 00217 case '\t': case '\r': case ' ': 00218 { 00219 mWS(true); 00220 theRetToken=_returnToken; 00221 break; 00222 } 00223 case '\n': 00224 { 00225 mNL(true); 00226 theRetToken=_returnToken; 00227 break; 00228 } 00229 case '(': 00230 { 00231 mLPAREN(true); 00232 theRetToken=_returnToken; 00233 break; 00234 } 00235 case ')': 00236 { 00237 mRPAREN(true); 00238 theRetToken=_returnToken; 00239 break; 00240 } 00241 case ',': 00242 { 00243 mCOMMA(true); 00244 theRetToken=_returnToken; 00245 break; 00246 } 00247 case '?': 00248 { 00249 mQUESTION(true); 00250 theRetToken=_returnToken; 00251 break; 00252 } 00253 case '+': 00254 { 00255 mPLUS(true); 00256 theRetToken=_returnToken; 00257 break; 00258 } 00259 case '|': 00260 { 00261 mCONCAT(true); 00262 theRetToken=_returnToken; 00263 break; 00264 } 00265 case '=': 00266 { 00267 mEQ(true); 00268 theRetToken=_returnToken; 00269 break; 00270 } 00271 case '*': 00272 { 00273 mSTAR(true); 00274 theRetToken=_returnToken; 00275 break; 00276 } 00277 case '{': 00278 { 00279 mLCURLY(true); 00280 theRetToken=_returnToken; 00281 break; 00282 } 00283 case '}': 00284 { 00285 mRCURLY(true); 00286 theRetToken=_returnToken; 00287 break; 00288 } 00289 case ';': 00290 { 00291 mSEMI(true); 00292 theRetToken=_returnToken; 00293 break; 00294 } 00295 case '\'': 00296 { 00297 mSTRING_LITERAL(true); 00298 theRetToken=_returnToken; 00299 break; 00300 } 00301 case '.': case '0': case '1': case '2': 00302 case '3': case '4': case '5': case '6': 00303 case '7': case '8': case '9': 00304 { 00305 mINT_OR_REAL(true); 00306 theRetToken=_returnToken; 00307 break; 00308 } 00309 default: 00310 if ((LA(1)=='B') && (LA(2)=='\'') && (LA(3)=='0'||LA(3)=='1') && (LA(4)=='\''||LA(4)=='0'||LA(4)=='1')) { 00311 mBINSTR(true); 00312 theRetToken=_returnToken; 00313 } 00314 else if ((LA(1)=='X') && (LA(2)=='\'') && (_tokenSet_0.member(LA(3))) && (_tokenSet_1.member(LA(4)))) { 00315 mHEXSTR(true); 00316 theRetToken=_returnToken; 00317 } 00318 else if ((LA(1)=='-') && (LA(2)=='-')) { 00319 mSL_COMMENT(true); 00320 theRetToken=_returnToken; 00321 } 00322 else if ((LA(1)=='/') && (LA(2)=='*')) { 00323 mML_COMMENT(true); 00324 theRetToken=_returnToken; 00325 } 00326 else if ((LA(1)=='<') && (LA(2)=='=')) { 00327 mLE(true); 00328 theRetToken=_returnToken; 00329 } 00330 else if ((LA(1)=='>') && (LA(2)=='=')) { 00331 mGE(true); 00332 theRetToken=_returnToken; 00333 } 00334 else if ((LA(1)=='<') && (LA(2)=='>')) { 00335 mNE(true); 00336 theRetToken=_returnToken; 00337 } 00338 else if ((LA(1)=='-') && (true)) { 00339 mMINUS(true); 00340 theRetToken=_returnToken; 00341 } 00342 else if ((LA(1)=='<') && (true)) { 00343 mLT(true); 00344 theRetToken=_returnToken; 00345 } 00346 else if ((LA(1)=='>') && (true)) { 00347 mGT(true); 00348 theRetToken=_returnToken; 00349 } 00350 else if ((LA(1)=='/') && (true)) { 00351 mSLASH(true); 00352 theRetToken=_returnToken; 00353 } 00354 else if ((_tokenSet_2.member(LA(1))) && (true) && (true) && (true)) { 00355 mID(true); 00356 theRetToken=_returnToken; 00357 } 00358 else { 00359 if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);} 00360 else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 00361 } 00362 } 00363 if ( _returnToken==null ) continue tryAgain; // found SKIP token 00364 _ttype = _returnToken.getType(); 00365 _returnToken.setType(_ttype); 00366 return _returnToken; 00367 } 00368 catch (RecognitionException e) { 00369 throw new TokenStreamRecognitionException(e); 00370 } 00371 } 00372 catch (CharStreamException cse) { 00373 if ( cse instanceof CharStreamIOException ) { 00374 throw new TokenStreamIOException(((CharStreamIOException)cse).io); 00375 } 00376 else { 00377 throw new TokenStreamException(cse.getMessage()); 00378 } 00379 } 00380 } 00381 } 00382 00383 public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00384 int _ttype; Token _token=null; int _begin=text.length(); 00385 _ttype = WS; 00386 int _saveIndex; 00387 00388 { 00389 int _cnt349=0; 00390 _loop349: 00391 do { 00392 switch ( LA(1)) { 00393 case ' ': 00394 { 00395 match(' '); 00396 break; 00397 } 00398 case '\t': 00399 { 00400 match('\t'); 00401 break; 00402 } 00403 case '\r': 00404 { 00405 match('\r'); 00406 break; 00407 } 00408 default: 00409 { 00410 if ( _cnt349>=1 ) { break _loop349; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 00411 } 00412 } 00413 _cnt349++; 00414 } while (true); 00415 } 00416 if ( inputState.guessing==0 ) { 00417 _ttype = Token.SKIP; 00418 } 00419 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00420 _token = makeToken(_ttype); 00421 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00422 } 00423 _returnToken = _token; 00424 } 00425 00426 public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00427 int _ttype; Token _token=null; int _begin=text.length(); 00428 _ttype = SL_COMMENT; 00429 int _saveIndex; 00430 00431 match("--"); 00432 { 00433 _loop352: 00434 do { 00435 if ((_tokenSet_3.member(LA(1)))) { 00436 matchNot('\n'); 00437 } 00438 else { 00439 break _loop352; 00440 } 00441 00442 } while (true); 00443 } 00444 if ( inputState.guessing==0 ) { 00445 _ttype = Token.SKIP; 00446 } 00447 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00448 _token = makeToken(_ttype); 00449 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00450 } 00451 _returnToken = _token; 00452 } 00453 00454 public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00455 int _ttype; Token _token=null; int _begin=text.length(); 00456 _ttype = ML_COMMENT; 00457 int _saveIndex; 00458 00459 match("/*"); 00460 { 00461 _loop356: 00462 do { 00463 if (((LA(1)=='*') && ((LA(2) >= '\u0000' && LA(2) <= '\ufffe')) && ((LA(3) >= '\u0000' && LA(3) <= '\ufffe')))&&( LA(2)!='/' )) { 00464 match('*'); 00465 } 00466 else if ((LA(1)=='\n')) { 00467 match('\n'); 00468 if ( inputState.guessing==0 ) { 00469 newline(); 00470 } 00471 } 00472 else if ((_tokenSet_4.member(LA(1)))) { 00473 { 00474 match(_tokenSet_4); 00475 } 00476 } 00477 else { 00478 break _loop356; 00479 } 00480 00481 } while (true); 00482 } 00483 match("*/"); 00484 if ( inputState.guessing==0 ) { 00485 _ttype = Token.SKIP; 00486 } 00487 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00488 _token = makeToken(_ttype); 00489 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00490 } 00491 _returnToken = _token; 00492 } 00493 00494 public final void mNL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00495 int _ttype; Token _token=null; int _begin=text.length(); 00496 _ttype = NL; 00497 int _saveIndex; 00498 00499 match('\n'); 00500 if ( inputState.guessing==0 ) { 00501 _ttype = Token.SKIP; newline(); 00502 } 00503 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00504 _token = makeToken(_ttype); 00505 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00506 } 00507 _returnToken = _token; 00508 } 00509 00510 public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00511 int _ttype; Token _token=null; int _begin=text.length(); 00512 _ttype = LPAREN; 00513 int _saveIndex; 00514 00515 match('('); 00516 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00517 _token = makeToken(_ttype); 00518 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00519 } 00520 _returnToken = _token; 00521 } 00522 00523 public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00524 int _ttype; Token _token=null; int _begin=text.length(); 00525 _ttype = RPAREN; 00526 int _saveIndex; 00527 00528 match(')'); 00529 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00530 _token = makeToken(_ttype); 00531 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00532 } 00533 _returnToken = _token; 00534 } 00535 00536 public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00537 int _ttype; Token _token=null; int _begin=text.length(); 00538 _ttype = COMMA; 00539 int _saveIndex; 00540 00541 match(','); 00542 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00543 _token = makeToken(_ttype); 00544 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00545 } 00546 _returnToken = _token; 00547 } 00548 00549 public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00550 int _ttype; Token _token=null; int _begin=text.length(); 00551 _ttype = QUESTION; 00552 int _saveIndex; 00553 00554 match('?'); 00555 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00556 _token = makeToken(_ttype); 00557 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00558 } 00559 _returnToken = _token; 00560 } 00561 00562 public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00563 int _ttype; Token _token=null; int _begin=text.length(); 00564 _ttype = PLUS; 00565 int _saveIndex; 00566 00567 match('+'); 00568 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00569 _token = makeToken(_ttype); 00570 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00571 } 00572 _returnToken = _token; 00573 } 00574 00575 public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00576 int _ttype; Token _token=null; int _begin=text.length(); 00577 _ttype = MINUS; 00578 int _saveIndex; 00579 00580 match('-'); 00581 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00582 _token = makeToken(_ttype); 00583 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00584 } 00585 _returnToken = _token; 00586 } 00587 00588 public final void mCONCAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00589 int _ttype; Token _token=null; int _begin=text.length(); 00590 _ttype = CONCAT; 00591 int _saveIndex; 00592 00593 match("||"); 00594 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00595 _token = makeToken(_ttype); 00596 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00597 } 00598 _returnToken = _token; 00599 } 00600 00601 public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00602 int _ttype; Token _token=null; int _begin=text.length(); 00603 _ttype = LT; 00604 int _saveIndex; 00605 00606 match('<'); 00607 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00608 _token = makeToken(_ttype); 00609 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00610 } 00611 _returnToken = _token; 00612 } 00613 00614 public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00615 int _ttype; Token _token=null; int _begin=text.length(); 00616 _ttype = GT; 00617 int _saveIndex; 00618 00619 match('>'); 00620 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00621 _token = makeToken(_ttype); 00622 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00623 } 00624 _returnToken = _token; 00625 } 00626 00627 public final void mLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00628 int _ttype; Token _token=null; int _begin=text.length(); 00629 _ttype = LE; 00630 int _saveIndex; 00631 00632 match("<="); 00633 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00634 _token = makeToken(_ttype); 00635 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00636 } 00637 _returnToken = _token; 00638 } 00639 00640 public final void mGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00641 int _ttype; Token _token=null; int _begin=text.length(); 00642 _ttype = GE; 00643 int _saveIndex; 00644 00645 match(">="); 00646 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00647 _token = makeToken(_ttype); 00648 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00649 } 00650 _returnToken = _token; 00651 } 00652 00653 public final void mEQ(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00654 int _ttype; Token _token=null; int _begin=text.length(); 00655 _ttype = EQ; 00656 int _saveIndex; 00657 00658 match('='); 00659 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00660 _token = makeToken(_ttype); 00661 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00662 } 00663 _returnToken = _token; 00664 } 00665 00666 public final void mNE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00667 int _ttype; Token _token=null; int _begin=text.length(); 00668 _ttype = NE; 00669 int _saveIndex; 00670 00671 match("<>"); 00672 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00673 _token = makeToken(_ttype); 00674 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00675 } 00676 _returnToken = _token; 00677 } 00678 00679 public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00680 int _ttype; Token _token=null; int _begin=text.length(); 00681 _ttype = STAR; 00682 int _saveIndex; 00683 00684 match('*'); 00685 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00686 _token = makeToken(_ttype); 00687 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00688 } 00689 _returnToken = _token; 00690 } 00691 00692 public final void mSLASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00693 int _ttype; Token _token=null; int _begin=text.length(); 00694 _ttype = SLASH; 00695 int _saveIndex; 00696 00697 match('/'); 00698 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00699 _token = makeToken(_ttype); 00700 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00701 } 00702 _returnToken = _token; 00703 } 00704 00705 public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00706 int _ttype; Token _token=null; int _begin=text.length(); 00707 _ttype = LCURLY; 00708 int _saveIndex; 00709 00710 match('{'); 00711 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00712 _token = makeToken(_ttype); 00713 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00714 } 00715 _returnToken = _token; 00716 } 00717 00718 public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00719 int _ttype; Token _token=null; int _begin=text.length(); 00720 _ttype = RCURLY; 00721 int _saveIndex; 00722 00723 match('}'); 00724 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00725 _token = makeToken(_ttype); 00726 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00727 } 00728 _returnToken = _token; 00729 } 00730 00731 public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00732 int _ttype; Token _token=null; int _begin=text.length(); 00733 _ttype = SEMI; 00734 int _saveIndex; 00735 00736 match(';'); 00737 if ( inputState.guessing==0 ) { 00738 _ttype = Token.SKIP; 00739 } 00740 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00741 _token = makeToken(_ttype); 00742 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00743 } 00744 _returnToken = _token; 00745 } 00746 00747 public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00748 int _ttype; Token _token=null; int _begin=text.length(); 00749 _ttype = STRING_LITERAL; 00750 int _saveIndex; 00751 00752 _saveIndex=text.length(); 00753 match('\''); 00754 text.setLength(_saveIndex); 00755 { 00756 _loop379: 00757 do { 00758 if ((LA(1)=='\'') && (LA(2)=='\'')) { 00759 match('\''); 00760 { 00761 _saveIndex=text.length(); 00762 match('\''); 00763 text.setLength(_saveIndex); 00764 } 00765 } 00766 else if ((_tokenSet_5.member(LA(1)))) { 00767 matchNot('\''); 00768 } 00769 else { 00770 break _loop379; 00771 } 00772 00773 } while (true); 00774 } 00775 _saveIndex=text.length(); 00776 match('\''); 00777 text.setLength(_saveIndex); 00778 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00779 _token = makeToken(_ttype); 00780 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00781 } 00782 _returnToken = _token; 00783 } 00784 00785 protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00786 int _ttype; Token _token=null; int _begin=text.length(); 00787 _ttype = DIGIT; 00788 int _saveIndex; 00789 00790 matchRange('0','9'); 00791 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00792 _token = makeToken(_ttype); 00793 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00794 } 00795 _returnToken = _token; 00796 } 00797 00798 protected final void mINT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00799 int _ttype; Token _token=null; int _begin=text.length(); 00800 _ttype = INT; 00801 int _saveIndex; 00802 00803 { 00804 int _cnt383=0; 00805 _loop383: 00806 do { 00807 if (((LA(1) >= '0' && LA(1) <= '9'))) { 00808 mDIGIT(false); 00809 } 00810 else { 00811 if ( _cnt383>=1 ) { break _loop383; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());} 00812 } 00813 00814 _cnt383++; 00815 } while (true); 00816 } 00817 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00818 _token = makeToken(_ttype); 00819 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00820 } 00821 _returnToken = _token; 00822 } 00823 00824 protected final void mREAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00825 int _ttype; Token _token=null; int _begin=text.length(); 00826 _ttype = REAL; 00827 int _saveIndex; 00828 00829 { 00830 _loop386: 00831 do { 00832 if (((LA(1) >= '0' && LA(1) <= '9'))) { 00833 mDIGIT(false); 00834 } 00835 else { 00836 break _loop386; 00837 } 00838 00839 } while (true); 00840 } 00841 match('.'); 00842 { 00843 if (((LA(1) >= '0' && LA(1) <= '9'))) { 00844 mINT(false); 00845 { 00846 if ((LA(1)=='E'||LA(1)=='e')) { 00847 { 00848 switch ( LA(1)) { 00849 case 'E': 00850 { 00851 match('E'); 00852 break; 00853 } 00854 case 'e': 00855 { 00856 match('e'); 00857 break; 00858 } 00859 default: 00860 { 00861 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 00862 } 00863 } 00864 } 00865 { 00866 switch ( LA(1)) { 00867 case '-': 00868 { 00869 match('-'); 00870 break; 00871 } 00872 case '+': 00873 { 00874 match('+'); 00875 break; 00876 } 00877 case '0': case '1': case '2': case '3': 00878 case '4': case '5': case '6': case '7': 00879 case '8': case '9': 00880 { 00881 break; 00882 } 00883 default: 00884 { 00885 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 00886 } 00887 } 00888 } 00889 mINT(false); 00890 } 00891 else { 00892 } 00893 00894 } 00895 } 00896 else { 00897 } 00898 00899 } 00900 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00901 _token = makeToken(_ttype); 00902 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00903 } 00904 _returnToken = _token; 00905 } 00906 00907 protected final void mEXP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00908 int _ttype; Token _token=null; int _begin=text.length(); 00909 _ttype = EXP; 00910 int _saveIndex; 00911 00912 mINT(false); 00913 { 00914 switch ( LA(1)) { 00915 case 'E': 00916 { 00917 match('E'); 00918 break; 00919 } 00920 case 'e': 00921 { 00922 match('e'); 00923 break; 00924 } 00925 default: 00926 { 00927 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 00928 } 00929 } 00930 } 00931 { 00932 switch ( LA(1)) { 00933 case '-': 00934 { 00935 match('-'); 00936 break; 00937 } 00938 case '+': 00939 { 00940 match('+'); 00941 break; 00942 } 00943 case '0': case '1': case '2': case '3': 00944 case '4': case '5': case '6': case '7': 00945 case '8': case '9': 00946 { 00947 break; 00948 } 00949 default: 00950 { 00951 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 00952 } 00953 } 00954 } 00955 mINT(false); 00956 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 00957 _token = makeToken(_ttype); 00958 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 00959 } 00960 _returnToken = _token; 00961 } 00962 00963 public final void mINT_OR_REAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 00964 int _ttype; Token _token=null; int _begin=text.length(); 00965 _ttype = INT_OR_REAL; 00966 int _saveIndex; 00967 00968 boolean synPredMatched401 = false; 00969 if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_6.member(LA(2))) && (_tokenSet_7.member(LA(3))) && (true))) { 00970 int _m401 = mark(); 00971 synPredMatched401 = true; 00972 inputState.guessing++; 00973 try { 00974 { 00975 mINT(false); 00976 { 00977 switch ( LA(1)) { 00978 case 'E': 00979 { 00980 match('E'); 00981 break; 00982 } 00983 case 'e': 00984 { 00985 match('e'); 00986 break; 00987 } 00988 default: 00989 { 00990 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 00991 } 00992 } 00993 } 00994 mINT(false); 00995 } 00996 } 00997 catch (RecognitionException pe) { 00998 synPredMatched401 = false; 00999 } 01000 rewind(_m401); 01001 inputState.guessing--; 01002 } 01003 if ( synPredMatched401 ) { 01004 mEXP(false); 01005 if ( inputState.guessing==0 ) { 01006 _ttype = REAL; 01007 } 01008 } 01009 else { 01010 boolean synPredMatched404 = false; 01011 if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_6.member(LA(2))) && (_tokenSet_7.member(LA(3))) && (true))) { 01012 int _m404 = mark(); 01013 synPredMatched404 = true; 01014 inputState.guessing++; 01015 try { 01016 { 01017 mINT(false); 01018 { 01019 switch ( LA(1)) { 01020 case 'E': 01021 { 01022 match('E'); 01023 break; 01024 } 01025 case 'e': 01026 { 01027 match('e'); 01028 break; 01029 } 01030 default: 01031 { 01032 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 01033 } 01034 } 01035 } 01036 match('-'); 01037 mINT(false); 01038 } 01039 } 01040 catch (RecognitionException pe) { 01041 synPredMatched404 = false; 01042 } 01043 rewind(_m404); 01044 inputState.guessing--; 01045 } 01046 if ( synPredMatched404 ) { 01047 mEXP(false); 01048 if ( inputState.guessing==0 ) { 01049 _ttype = REAL; 01050 } 01051 } 01052 else { 01053 boolean synPredMatched407 = false; 01054 if ((((LA(1) >= '0' && LA(1) <= '9')) && (_tokenSet_6.member(LA(2))) && (_tokenSet_7.member(LA(3))) && (true))) { 01055 int _m407 = mark(); 01056 synPredMatched407 = true; 01057 inputState.guessing++; 01058 try { 01059 { 01060 mINT(false); 01061 { 01062 switch ( LA(1)) { 01063 case 'E': 01064 { 01065 match('E'); 01066 break; 01067 } 01068 case 'e': 01069 { 01070 match('e'); 01071 break; 01072 } 01073 default: 01074 { 01075 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 01076 } 01077 } 01078 } 01079 match('+'); 01080 mINT(false); 01081 } 01082 } 01083 catch (RecognitionException pe) { 01084 synPredMatched407 = false; 01085 } 01086 rewind(_m407); 01087 inputState.guessing--; 01088 } 01089 if ( synPredMatched407 ) { 01090 mEXP(false); 01091 if ( inputState.guessing==0 ) { 01092 _ttype = REAL; 01093 } 01094 } 01095 else { 01096 boolean synPredMatched396 = false; 01097 if (((_tokenSet_8.member(LA(1))) && (true) && (true) && (true))) { 01098 int _m396 = mark(); 01099 synPredMatched396 = true; 01100 inputState.guessing++; 01101 try { 01102 { 01103 mINT(false); 01104 match('.'); 01105 } 01106 } 01107 catch (RecognitionException pe) { 01108 synPredMatched396 = false; 01109 } 01110 rewind(_m396); 01111 inputState.guessing--; 01112 } 01113 if ( synPredMatched396 ) { 01114 mREAL(false); 01115 if ( inputState.guessing==0 ) { 01116 _ttype = REAL; 01117 } 01118 } 01119 else { 01120 boolean synPredMatched398 = false; 01121 if (((_tokenSet_8.member(LA(1))) && (true) && (true) && (true))) { 01122 int _m398 = mark(); 01123 synPredMatched398 = true; 01124 inputState.guessing++; 01125 try { 01126 { 01127 match('.'); 01128 mINT(false); 01129 } 01130 } 01131 catch (RecognitionException pe) { 01132 synPredMatched398 = false; 01133 } 01134 rewind(_m398); 01135 inputState.guessing--; 01136 } 01137 if ( synPredMatched398 ) { 01138 mREAL(false); 01139 if ( inputState.guessing==0 ) { 01140 _ttype = REAL; 01141 } 01142 } 01143 else { 01144 boolean synPredMatched409 = false; 01145 if ((((LA(1) >= '0' && LA(1) <= '9')) && (true) && (true) && (true))) { 01146 int _m409 = mark(); 01147 synPredMatched409 = true; 01148 inputState.guessing++; 01149 try { 01150 { 01151 mINT(false); 01152 } 01153 } 01154 catch (RecognitionException pe) { 01155 synPredMatched409 = false; 01156 } 01157 rewind(_m409); 01158 inputState.guessing--; 01159 } 01160 if ( synPredMatched409 ) { 01161 mINT(false); 01162 if ( inputState.guessing==0 ) { 01163 _ttype = INT; 01164 } 01165 } 01166 else { 01167 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 01168 } 01169 }}}}} 01170 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 01171 _token = makeToken(_ttype); 01172 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 01173 } 01174 _returnToken = _token; 01175 } 01176 01177 protected final void mHEXDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 01178 int _ttype; Token _token=null; int _begin=text.length(); 01179 _ttype = HEXDIGIT; 01180 int _saveIndex; 01181 01182 switch ( LA(1)) { 01183 case '0': case '1': case '2': case '3': 01184 case '4': case '5': case '6': case '7': 01185 case '8': case '9': 01186 { 01187 mDIGIT(false); 01188 break; 01189 } 01190 case 'A': case 'B': case 'C': case 'D': 01191 case 'E': case 'F': 01192 { 01193 matchRange('A','F'); 01194 break; 01195 } 01196 default: 01197 { 01198 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn()); 01199 } 01200 } 01201 if ( _createToken && _token==null && _ttype!=Token.SKIP ) { 01202 _token = makeToken(_ttype); 01203 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin)); 01204 } 01205 _returnToken = _token; 01206 } 01207 01208 public final void mBINSTR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException { 01209 int _ttype; Token _token=null; int _begin=text.length(); 01210 _ttype = BINSTR; 01211 int _saveIndex; 01212 01213 match('B'); 01214 match('\''); 01215 { 01216 int _cnt413=0; 01217 _loop413: 01218 do { 01219 switch ( LA(1)) { 01220 case '0': 01221 { 01222 match('0'