00001
00002 #include "EDILexer.hpp"
00003 #include <antlr/CharBuffer.hpp>
00004 #include <antlr/TokenStreamException.hpp>
00005 #include <antlr/TokenStreamIOException.hpp>
00006 #include <antlr/TokenStreamRecognitionException.hpp>
00007 #include <antlr/CharStreamException.hpp>
00008 #include <antlr/CharStreamIOException.hpp>
00009 #include <antlr/NoViableAltForCharException.hpp>
00010
00011 #line 1 "EdiParser2.g"
00012 #line 13 "EDILexer.cpp"
00013 EDILexer::EDILexer(std::istream& in)
00014 : antlr::CharScanner(new antlr::CharBuffer(in),false)
00015 {
00016 initLiterals();
00017 }
00018
00019 EDILexer::EDILexer(antlr::InputBuffer& ib)
00020 : antlr::CharScanner(ib,false)
00021 {
00022 initLiterals();
00023 }
00024
00025 EDILexer::EDILexer(const antlr::LexerSharedInputState& state)
00026 : antlr::CharScanner(state,false)
00027 {
00028 initLiterals();
00029 }
00030
00031 void EDILexer::initLiterals()
00032 {
00033 literals[">ZYYI.VAR"] = 51;
00034 literals[">TYI.EXP"] = 38;
00035 literals[">TXI.EXP"] = 36;
00036 literals[">TYVAR.EXP"] = 54;
00037 literals[">ZXYI"] = 30;
00038 literals["NFREQ"] = 4;
00039 literals[">ZXYR"] = 29;
00040 literals[">ZROT"] = 55;
00041 literals[">ZXXI"] = 28;
00042 literals[">ZYX.VAR"] = 49;
00043 literals["REFLAT"] = 10;
00044 literals[">ZXX.VAR"] = 43;
00045 literals[">ZXXR"] = 27;
00046 literals[">HMEAS"] = 19;
00047 literals["REFLONG"] = 9;
00048 literals["MTSECT"] = 26;
00049 literals[">END"] = 58;
00050 literals["LONGITUDE"] = 6;
00051 literals[";"] = 25;
00052 literals[">ZYYI"] = 34;
00053 literals[">ZYYR"] = 33;
00054 literals[">ZXYR.VAR"] = 44;
00055 literals["LATITUDE"] = 5;
00056 literals[">ZXXR.VAR"] = 41;
00057 literals[">ZYXI"] = 32;
00058 literals[">TXVAR.EXP"] = 53;
00059 literals[">ZYXR.VAR"] = 47;
00060 literals[">ZYYR.VAR"] = 50;
00061 literals[">ZYXR"] = 31;
00062 literals[">TYR.EXP"] = 37;
00063 literals[">TXR.EXP"] = 35;
00064 literals["AZIMUTH"] = 7;
00065 literals[">EMEAS"] = 18;
00066 literals["ELEVATION"] = 8;
00067 literals[">ZYY.VAR"] = 52;
00068 literals[">ZXY.VAR"] = 46;
00069 literals[">FREQ"] = 40;
00070 literals["//"] = 22;
00071 literals["SPECTRA"] = 24;
00072 literals[">INFO"] = 16;
00073 literals["SPECTRASET"] = 21;
00074 literals[">ZXXI.VAR"] = 42;
00075 literals[">ZXYI.VAR"] = 45;
00076 literals["DEFINEMEAS"] = 20;
00077 literals[">ZYXI.VAR"] = 48;
00078 }
00079
00080 antlr::RefToken EDILexer::nextToken()
00081 {
00082 antlr::RefToken theRetToken;
00083 for (;;) {
00084 antlr::RefToken theRetToken;
00085 int _ttype = antlr::Token::INVALID_TYPE;
00086 setCommitToPath(false);
00087 resetText();
00088 try {
00089 switch ( LA(1)) {
00090 case 0x22 :
00091 case 0x61 :
00092 case 0x62 :
00093 case 0x63 :
00094 case 0x64 :
00095 case 0x65 :
00096 case 0x66 :
00097 case 0x67 :
00098 case 0x68 :
00099 case 0x69 :
00100 case 0x6a :
00101 case 0x6b :
00102 case 0x6c :
00103 case 0x6d :
00104 case 0x6e :
00105 case 0x6f :
00106 case 0x70 :
00107 case 0x71 :
00108 case 0x72 :
00109 case 0x73 :
00110 case 0x74 :
00111 case 0x75 :
00112 case 0x76 :
00113 case 0x77 :
00114 case 0x78 :
00115 case 0x79 :
00116 case 0x7a :
00117 {
00118 mSTRING(true);
00119 theRetToken=_returnToken;
00120 break;
00121 }
00122 case 0x9 :
00123 case 0xa :
00124 case 0xd :
00125 case 0x20 :
00126 {
00127 mWS(true);
00128 theRetToken=_returnToken;
00129 break;
00130 }
00131 case 0x3d :
00132 {
00133 mEQUAL(true);
00134 theRetToken=_returnToken;
00135 break;
00136 }
00137 case 0x2f :
00138 {
00139 mSLASH(true);
00140 theRetToken=_returnToken;
00141 break;
00142 }
00143 case 0x21 :
00144 {
00145 mEXKL(true);
00146 theRetToken=_returnToken;
00147 break;
00148 }
00149 case 0x3a :
00150 {
00151 mCOLON(true);
00152 theRetToken=_returnToken;
00153 break;
00154 }
00155 default:
00156 if ((LA(1) == 0x3e ) && (LA(2) == 0x68 ) && (LA(3) == 0x65 ) && (LA(4) == 0x61 ) && (LA(5) == 0x64 ) && (true) && (true) && (true) && (true) && (true)) {
00157 mHEAD(true);
00158 theRetToken=_returnToken;
00159 }
00160 else if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && ((LA(2) >= 0x30 && LA(2) <= 0x39 )) && (LA(3) == 0x2f )) {
00161 mDATE(true);
00162 theRetToken=_returnToken;
00163 }
00164 else if ((LA(1) == 0x3e ) && (_tokenSet_0.member(LA(2))) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) {
00165 mKEYWORD(true);
00166 theRetToken=_returnToken;
00167 }
00168 else if ((LA(1) == 0x3e ) && (LA(2) == 0x21 )) {
00169 mCOMMENT(true);
00170 theRetToken=_returnToken;
00171 }
00172 else if ((LA(1) == 0x3e ) && (true)) {
00173 mSPECIAL(true);
00174 theRetToken=_returnToken;
00175 }
00176 else if ((_tokenSet_1.member(LA(1))) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) {
00177 mNUMBER(true);
00178 theRetToken=_returnToken;
00179 }
00180 else if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) {
00181 mDIGIT(true);
00182 theRetToken=_returnToken;
00183 }
00184 else if ((_tokenSet_2.member(LA(1))) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) {
00185 mOTHER(true);
00186 theRetToken=_returnToken;
00187 }
00188 else {
00189 if (LA(1)==EOF_CHAR)
00190 {
00191 uponEOF();
00192 _returnToken = makeToken(antlr::Token::EOF_TYPE);
00193 }
00194 else {consume(); goto tryAgain;}
00195 }
00196 }
00197 if ( !_returnToken )
00198 goto tryAgain;
00199
00200 _ttype = _returnToken->getType();
00201 _ttype = testLiteralsTable(_ttype);
00202 _returnToken->setType(_ttype);
00203 return _returnToken;
00204 }
00205 catch (antlr::RecognitionException& e) {
00206 if ( !getCommitToPath() ) {
00207 consume();
00208 goto tryAgain;
00209 }
00210 throw antlr::TokenStreamRecognitionException(e);
00211 }
00212 catch (antlr::CharStreamIOException& csie) {
00213 throw antlr::TokenStreamIOException(csie.io);
00214 }
00215 catch (antlr::CharStreamException& cse) {
00216 throw antlr::TokenStreamException(cse.getMessage());
00217 }
00218 tryAgain:;
00219 }
00220 }
00221
00222 void EDILexer::mHEAD(bool _createToken) {
00223 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00224 _ttype = HEAD;
00225 std::string::size_type _saveIndex;
00226
00227 match(">head");
00228 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00229 _token = makeToken(_ttype);
00230 _token->setText(text.substr(_begin, text.length()-_begin));
00231 }
00232 _returnToken = _token;
00233 _saveIndex=0;
00234 }
00235
00236 void EDILexer::mKEYWORD(bool _createToken) {
00237 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00238 _ttype = KEYWORD;
00239 std::string::size_type _saveIndex;
00240
00241 mSPECIAL(false);
00242 mSTRING(false);
00243 _ttype = testLiteralsTable(_ttype);
00244 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00245 _token = makeToken(_ttype);
00246 _token->setText(text.substr(_begin, text.length()-_begin));
00247 }
00248 _returnToken = _token;
00249 _saveIndex=0;
00250 }
00251
00252 void EDILexer::mSPECIAL(bool _createToken) {
00253 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00254 _ttype = SPECIAL;
00255 std::string::size_type _saveIndex;
00256
00257 match('>' );
00258 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00259 _token = makeToken(_ttype);
00260 _token->setText(text.substr(_begin, text.length()-_begin));
00261 }
00262 _returnToken = _token;
00263 _saveIndex=0;
00264 }
00265
00266 void EDILexer::mSTRING(bool _createToken) {
00267 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00268 _ttype = STRING;
00269 std::string::size_type _saveIndex;
00270
00271 switch ( LA(1)) {
00272 case 0x61 :
00273 case 0x62 :
00274 case 0x63 :
00275 case 0x64 :
00276 case 0x65 :
00277 case 0x66 :
00278 case 0x67 :
00279 case 0x68 :
00280 case 0x69 :
00281 case 0x6a :
00282 case 0x6b :
00283 case 0x6c :
00284 case 0x6d :
00285 case 0x6e :
00286 case 0x6f :
00287 case 0x70 :
00288 case 0x71 :
00289 case 0x72 :
00290 case 0x73 :
00291 case 0x74 :
00292 case 0x75 :
00293 case 0x76 :
00294 case 0x77 :
00295 case 0x78 :
00296 case 0x79 :
00297 case 0x7a :
00298 {
00299 mLETTER(false);
00300 {
00301 for (;;) {
00302 if ((_tokenSet_3.member(LA(1)))) {
00303 mLEGAL_CHAR(false);
00304 }
00305 else {
00306 goto _loop77;
00307 }
00308
00309 }
00310 _loop77:;
00311 }
00312 break;
00313 }
00314 case 0x22 :
00315 {
00316 {
00317 match('\"' );
00318 {
00319 for (;;) {
00320 switch ( LA(1)) {
00321 case 0x23 :
00322 case 0x24 :
00323 case 0x25 :
00324 case 0x26 :
00325 case 0x27 :
00326 case 0x28 :
00327 case 0x29 :
00328 case 0x2a :
00329 case 0x2b :
00330 case 0x2c :
00331 case 0x2d :
00332 case 0x2e :
00333 case 0x2f :
00334 case 0x30 :
00335 case 0x31 :
00336 case 0x32 :
00337 case 0x33 :
00338 case 0x34 :
00339 case 0x35 :
00340 case 0x36 :
00341 case 0x37 :
00342 case 0x38 :
00343 case 0x39 :
00344 case 0x3a :
00345 case 0x3b :
00346 case 0x3c :
00347 case 0x3f :
00348 case 0x40 :
00349 case 0x5b :
00350 case 0x5d :
00351 case 0x5e :
00352 case 0x5f :
00353 case 0x61 :
00354 case 0x62 :
00355 case 0x63 :
00356 case 0x64 :
00357 case 0x65 :
00358 case 0x66 :
00359 case 0x67 :
00360 case 0x68 :
00361 case 0x69 :
00362 case 0x6a :
00363 case 0x6b :
00364 case 0x6c :
00365 case 0x6d :
00366 case 0x6e :
00367 case 0x6f :
00368 case 0x70 :
00369 case 0x71 :
00370 case 0x72 :
00371 case 0x73 :
00372 case 0x74 :
00373 case 0x75 :
00374 case 0x76 :
00375 case 0x77 :
00376 case 0x78 :
00377 case 0x79 :
00378 case 0x7a :
00379 case 0x7b :
00380 case 0x7c :
00381 case 0x7d :
00382 case 0x7e :
00383 {
00384 mLEGAL_CHAR(false);
00385 break;
00386 }
00387 case 0x20 :
00388 {
00389 match(' ' );
00390 break;
00391 }
00392 default:
00393 {
00394 goto _loop80;
00395 }
00396 }
00397 }
00398 _loop80:;
00399 }
00400 match('\"' );
00401 }
00402 break;
00403 }
00404 default:
00405 {
00406 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
00407 }
00408 }
00409 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00410 _token = makeToken(_ttype);
00411 _token->setText(text.substr(_begin, text.length()-_begin));
00412 }
00413 _returnToken = _token;
00414 _saveIndex=0;
00415 }
00416
00417 void EDILexer::mWS(bool _createToken) {
00418 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00419 _ttype = WS;
00420 std::string::size_type _saveIndex;
00421
00422 {
00423 switch ( LA(1)) {
00424 case 0x20 :
00425 {
00426 match(' ' );
00427 break;
00428 }
00429 case 0x9 :
00430 {
00431 match('\t' );
00432 break;
00433 }
00434 case 0xd :
00435 {
00436 match('\r' );
00437 match('\n' );
00438 if ( inputState->guessing==0 ) {
00439 #line 244 "EdiParser2.g"
00440 newline();
00441 #line 442 "EDILexer.cpp"
00442 }
00443 break;
00444 }
00445 case 0xa :
00446 {
00447 match('\n' );
00448 if ( inputState->guessing==0 ) {
00449 #line 245 "EdiParser2.g"
00450 newline();
00451 #line 452 "EDILexer.cpp"
00452 }
00453 break;
00454 }
00455 default:
00456 {
00457 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
00458 }
00459 }
00460 }
00461 if ( inputState->guessing==0 ) {
00462 #line 247 "EdiParser2.g"
00463 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
00464 #line 465 "EDILexer.cpp"
00465 }
00466 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00467 _token = makeToken(_ttype);
00468 _token->setText(text.substr(_begin, text.length()-_begin));
00469 }
00470 _returnToken = _token;
00471 _saveIndex=0;
00472 }
00473
00474 void EDILexer::mEQUAL(bool _createToken) {
00475 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00476 _ttype = EQUAL;
00477 std::string::size_type _saveIndex;
00478
00479 match('=' );
00480 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00481 _token = makeToken(_ttype);
00482 _token->setText(text.substr(_begin, text.length()-_begin));
00483 }
00484 _returnToken = _token;
00485 _saveIndex=0;
00486 }
00487
00488 void EDILexer::mSLASH(bool _createToken) {
00489 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00490 _ttype = SLASH;
00491 std::string::size_type _saveIndex;
00492
00493 match('/' );
00494 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00495 _token = makeToken(_ttype);
00496 _token->setText(text.substr(_begin, text.length()-_begin));
00497 }
00498 _returnToken = _token;
00499 _saveIndex=0;
00500 }
00501
00502 void EDILexer::mEXKL(bool _createToken) {
00503 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00504 _ttype = EXKL;
00505 std::string::size_type _saveIndex;
00506
00507 match('!' );
00508 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00509 _token = makeToken(_ttype);
00510 _token->setText(text.substr(_begin, text.length()-_begin));
00511 }
00512 _returnToken = _token;
00513 _saveIndex=0;
00514 }
00515
00516 void EDILexer::mCOLON(bool _createToken) {
00517 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00518 _ttype = COLON;
00519 std::string::size_type _saveIndex;
00520
00521 match(':' );
00522 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00523 _token = makeToken(_ttype);
00524 _token->setText(text.substr(_begin, text.length()-_begin));
00525 }
00526 _returnToken = _token;
00527 _saveIndex=0;
00528 }
00529
00530 void EDILexer::mCOMMENT(bool _createToken) {
00531 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00532 _ttype = COMMENT;
00533 std::string::size_type _saveIndex;
00534
00535 mSPECIAL(false);
00536 mEXKL(false);
00537 {
00538 for (;;) {
00539 if ((_tokenSet_4.member(LA(1)))) {
00540 matchNot('!' );
00541 }
00542 else {
00543 goto _loop66;
00544 }
00545
00546 }
00547 _loop66:;
00548 }
00549 mEXKL(false);
00550 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00551 _token = makeToken(_ttype);
00552 _token->setText(text.substr(_begin, text.length()-_begin));
00553 }
00554 _returnToken = _token;
00555 _saveIndex=0;
00556 }
00557
00558 void EDILexer::mNUMBER(bool _createToken) {
00559 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00560 _ttype = NUMBER;
00561 std::string::size_type _saveIndex;
00562
00563 {
00564 switch ( LA(1)) {
00565 case 0x2b :
00566 {
00567 match('+' );
00568 break;
00569 }
00570 case 0x2d :
00571 {
00572 match('-' );
00573 break;
00574 }
00575 case 0x2e :
00576 case 0x30 :
00577 case 0x31 :
00578 case 0x32 :
00579 case 0x33 :
00580 case 0x34 :
00581 case 0x35 :
00582 case 0x36 :
00583 case 0x37 :
00584 case 0x38 :
00585 case 0x39 :
00586 {
00587 break;
00588 }
00589 default:
00590 {
00591 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
00592 }
00593 }
00594 }
00595 {
00596 bool synPredMatched71 = false;
00597 if (((_tokenSet_5.member(LA(1))) && (_tokenSet_5.member(LA(2))) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true))) {
00598 int _m71 = mark();
00599 synPredMatched71 = true;
00600 inputState->guessing++;
00601 try {
00602 {
00603 mREAL(false);
00604 }
00605 }
00606 catch (antlr::RecognitionException& pe) {
00607 synPredMatched71 = false;
00608 }
00609 rewind(_m71);
00610 inputState->guessing--;
00611 }
00612 if ( synPredMatched71 ) {
00613 mREAL(false);
00614 }
00615 else if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) {
00616 mINT(false);
00617 }
00618 else {
00619 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
00620 }
00621
00622 }
00623 {
00624 if ((LA(1) == 0x65 )) {
00625 {
00626 match('e' );
00627 }
00628 {
00629 switch ( LA(1)) {
00630 case 0x2b :
00631 {
00632 match('+' );
00633 break;
00634 }
00635 case 0x2d :
00636 {
00637 match('-' );
00638 break;
00639 }
00640 case 0x30 :
00641 case 0x31 :
00642 case 0x32 :
00643 case 0x33 :
00644 case 0x34 :
00645 case 0x35 :
00646 case 0x36 :
00647 case 0x37 :
00648 case 0x38 :
00649 case 0x39 :
00650 {
00651 break;
00652 }
00653 default:
00654 {
00655 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
00656 }
00657 }
00658 }
00659 mINT(false);
00660 }
00661 else {
00662 }
00663
00664 }
00665 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00666 _token = makeToken(_ttype);
00667 _token->setText(text.substr(_begin, text.length()-_begin));
00668 }
00669 _returnToken = _token;
00670 _saveIndex=0;
00671 }
00672
00673 void EDILexer::mREAL(bool _createToken) {
00674 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00675 _ttype = REAL;
00676 std::string::size_type _saveIndex;
00677
00678 {
00679 switch ( LA(1)) {
00680 case 0x2e :
00681 {
00682 match('.' );
00683 mINT(false);
00684 break;
00685 }
00686 case 0x30 :
00687 case 0x31 :
00688 case 0x32 :
00689 case 0x33 :
00690 case 0x34 :
00691 case 0x35 :
00692 case 0x36 :
00693 case 0x37 :
00694 case 0x38 :
00695 case 0x39 :
00696 {
00697 mINT(false);
00698 match('.' );
00699 {
00700 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
00701 mINT(false);
00702 }
00703 else {
00704 }
00705
00706 }
00707 break;
00708 }
00709 default:
00710 {
00711 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
00712 }
00713 }
00714 }
00715 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00716 _token = makeToken(_ttype);
00717 _token->setText(text.substr(_begin, text.length()-_begin));
00718 }
00719 _returnToken = _token;
00720 _saveIndex=0;
00721 }
00722
00723 void EDILexer::mINT(bool _createToken) {
00724 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00725 _ttype = INT;
00726 std::string::size_type _saveIndex;
00727
00728 {
00729 int _cnt88=0;
00730 for (;;) {
00731 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
00732 mDIGIT(false);
00733 }
00734 else {
00735 if ( _cnt88>=1 ) { goto _loop88; } else {throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
00736 }
00737
00738 _cnt88++;
00739 }
00740 _loop88:;
00741 }
00742 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00743 _token = makeToken(_ttype);
00744 _token->setText(text.substr(_begin, text.length()-_begin));
00745 }
00746 _returnToken = _token;
00747 _saveIndex=0;
00748 }
00749
00750 void EDILexer::mLETTER(bool _createToken) {
00751 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00752 _ttype = LETTER;
00753 std::string::size_type _saveIndex;
00754
00755 matchRange('a','z');
00756 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00757 _token = makeToken(_ttype);
00758 _token->setText(text.substr(_begin, text.length()-_begin));
00759 }
00760 _returnToken = _token;
00761 _saveIndex=0;
00762 }
00763
00764 void EDILexer::mLEGAL_CHAR(bool _createToken) {
00765 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00766 _ttype = LEGAL_CHAR;
00767 std::string::size_type _saveIndex;
00768
00769 switch ( LA(1)) {
00770 case 0x61 :
00771 case 0x62 :
00772 case 0x63 :
00773 case 0x64 :
00774 case 0x65 :
00775 case 0x66 :
00776 case 0x67 :
00777 case 0x68 :
00778 case 0x69 :
00779 case 0x6a :
00780 case 0x6b :
00781 case 0x6c :
00782 case 0x6d :
00783 case 0x6e :
00784 case 0x6f :
00785 case 0x70 :
00786 case 0x71 :
00787 case 0x72 :
00788 case 0x73 :
00789 case 0x74 :
00790 case 0x75 :
00791 case 0x76 :
00792 case 0x77 :
00793 case 0x78 :
00794 case 0x79 :
00795 case 0x7a :
00796 {
00797 mLETTER(false);
00798 break;
00799 }
00800 case 0x30 :
00801 case 0x31 :
00802 case 0x32 :
00803 case 0x33 :
00804 case 0x34 :
00805 case 0x35 :
00806 case 0x36 :
00807 case 0x37 :
00808 case 0x38 :
00809 case 0x39 :
00810 {
00811 mDIGIT(false);
00812 break;
00813 }
00814 case 0x23 :
00815 case 0x24 :
00816 case 0x25 :
00817 case 0x26 :
00818 case 0x27 :
00819 case 0x28 :
00820 case 0x29 :
00821 case 0x2a :
00822 case 0x2b :
00823 case 0x2c :
00824 case 0x2d :
00825 case 0x2e :
00826 case 0x3b :
00827 case 0x3c :
00828 case 0x3f :
00829 case 0x40 :
00830 case 0x5b :
00831 case 0x5d :
00832 case 0x5e :
00833 case 0x5f :
00834 case 0x7b :
00835 case 0x7c :
00836 case 0x7d :
00837 case 0x7e :
00838 {
00839 mOTHER(false);
00840 break;
00841 }
00842 case 0x3a :
00843 {
00844 mCOLON(false);
00845 break;
00846 }
00847 case 0x2f :
00848 {
00849 mSLASH(false);
00850 break;
00851 }
00852 default:
00853 {
00854 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
00855 }
00856 }
00857 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00858 _token = makeToken(_ttype);
00859 _token->setText(text.substr(_begin, text.length()-_begin));
00860 }
00861 _returnToken = _token;
00862 _saveIndex=0;
00863 }
00864
00865 void EDILexer::mDATE(bool _createToken) {
00866 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00867 _ttype = DATE;
00868 std::string::size_type _saveIndex;
00869
00870 mDIGIT(false);
00871 mDIGIT(false);
00872 match('/' );
00873 mDIGIT(false);
00874 mDIGIT(false);
00875 match('/' );
00876 mDIGIT(false);
00877 mDIGIT(false);
00878 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00879 _token = makeToken(_ttype);
00880 _token->setText(text.substr(_begin, text.length()-_begin));
00881 }
00882 _returnToken = _token;
00883 _saveIndex=0;
00884 }
00885
00886 void EDILexer::mDIGIT(bool _createToken) {
00887 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00888 _ttype = DIGIT;
00889 std::string::size_type _saveIndex;
00890
00891 matchRange('0','9');
00892 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
00893 _token = makeToken(_ttype);
00894 _token->setText(text.substr(_begin, text.length()-_begin));
00895 }
00896 _returnToken = _token;
00897 _saveIndex=0;
00898 }
00899
00900 void EDILexer::mOTHER(bool _createToken) {
00901 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
00902 _ttype = OTHER;
00903 std::string::size_type _saveIndex;
00904
00905 switch ( LA(1)) {
00906 case 0x27 :
00907 {
00908 match('\'' );
00909 break;
00910 }
00911 case 0x23 :
00912 {
00913 match('#' );
00914 break;
00915 }
00916 case 0x24 :
00917 {
00918 match('$' );
00919 break;
00920 }
00921 case 0x25 :
00922 {
00923 match('%' );
00924 break;
00925 }
00926 case 0x26 :
00927 {
00928 match('&' );
00929 break;
00930 }
00931 case 0x28 :
00932 {
00933 match('(' );
00934 break;
00935 }
00936 case 0x29 :
00937 {
00938 match(')' );
00939 break;
00940 }
00941 case 0x2a :
00942 {
00943 match('*' );
00944 break;
00945 }
00946 case 0x2b :
00947 {
00948 match('+' );
00949 break;
00950 }
00951 case 0x2c :
00952 {
00953 match(',' );
00954 break;
00955 }
00956 case 0x2d :
00957 {
00958 match('-' );
00959 break;
00960 }
00961 case 0x2e :
00962 {
00963 match('.' );
00964 break;
00965 }
00966 case 0x3b :
00967 {
00968 match(';' );
00969 break;
00970 }
00971 case 0x3c :
00972 {
00973 match('<' );
00974 break;
00975 }
00976 case 0x3f :
00977 {
00978 match('?' );
00979 break;
00980 }
00981 case 0x40 :
00982 {
00983 match('@' );
00984 break;
00985 }
00986 case 0x5b :
00987 {
00988 match('[' );
00989 break;
00990 }
00991 case 0x5d :
00992 {
00993 match(']' );
00994 break;
00995 }
00996 case 0x5e :
00997 {
00998 match('^' );
00999 break;
01000 }
01001 case 0x5f :
01002 {
01003 match('_' );
01004 break;
01005 }
01006 case 0x7b :
01007 {
01008 match('{' );
01009 break;
01010 }
01011 case 0x7c :
01012 {
01013 match('|' );
01014 break;
01015 }
01016 case 0x7d :
01017 {
01018 match('}' );
01019 break;
01020 }
01021 case 0x7e :
01022 {
01023 match('~' );
01024 break;
01025 }
01026 default:
01027 {
01028 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
01029 }
01030 }
01031 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
01032 _token = makeToken(_ttype);
01033 _token->setText(text.substr(_begin, text.length()-_begin));
01034 }
01035 _returnToken = _token;
01036 _saveIndex=0;
01037 }
01038
01039 void EDILexer::mSIGN(bool _createToken) {
01040 int _ttype; antlr::RefToken _token; std::string::size_type _begin = text.length();
01041 _ttype = SIGN;
01042 std::string::size_type _saveIndex;
01043
01044 switch ( LA(1)) {
01045 case 0x2b :
01046 {
01047 match('+' );
01048 break;
01049 }
01050 case 0x2d :
01051 {
01052 match('-' );
01053 break;
01054 }
01055 default:
01056 {
01057 throw antlr::NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
01058 }
01059 }
01060 if ( _createToken && _token==antlr::nullToken && _ttype!=antlr::Token::SKIP ) {
01061 _token = makeToken(_ttype);
01062 _token->setText(text.substr(_begin, text.length()-_begin));
01063 }
01064 _returnToken = _token;
01065 _saveIndex=0;
01066 }
01067
01068
01069 const unsigned long EDILexer::_tokenSet_0_data_[] = { 0UL, 4UL, 0UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
01070
01071 const antlr::BitSet EDILexer::_tokenSet_0(_tokenSet_0_data_,10);
01072 const unsigned long EDILexer::_tokenSet_1_data_[] = { 0UL, 67069952UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
01073
01074 const antlr::BitSet EDILexer::_tokenSet_1(_tokenSet_1_data_,10);
01075 const unsigned long EDILexer::_tokenSet_2_data_[] = { 0UL, 2550169592UL, 3892314113UL, 2013265920UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
01076
01077 const antlr::BitSet EDILexer::_tokenSet_2(_tokenSet_2_data_,10);
01078 const unsigned long EDILexer::_tokenSet_3_data_[] = { 0UL, 2684354552UL, 3892314113UL, 2147483646UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
01079
01080 const antlr::BitSet EDILexer::_tokenSet_3(_tokenSet_3_data_,10);
01081 const unsigned long EDILexer::_tokenSet_4_data_[] = { 4294967288UL, 4294967293UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
01082
01083
01084
01085 const antlr::BitSet EDILexer::_tokenSet_4(_tokenSet_4_data_,16);
01086 const unsigned long EDILexer::_tokenSet_5_data_[] = { 0UL, 67059712UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
01087
01088 const antlr::BitSet EDILexer::_tokenSet_5(_tokenSet_5_data_,10);
01089