# | Line 1 | Line 1 | |
---|---|---|
1 | < | /* $ANTLR 2.7.5 (20050406): "MDParser.g" -> "MDLexer.cpp"$ */ |
1 | > | /* $ANTLR 2.7.7 (20080702): "MDParser.g" -> "MDLexer.cpp"$ */ |
2 | #include "MDLexer.hpp" | |
3 | #include <antlr/CharBuffer.hpp> | |
4 | #include <antlr/TokenStreamException.hpp> | |
# | Line 30 | Line 30 | void MDLexer::initLiterals() | |
30 | ||
31 | void MDLexer::initLiterals() | |
32 | { | |
33 | < | literals["members"] = 14; |
34 | < | literals["position"] = 15; |
33 | > | literals["members"] = 15; |
34 | > | literals["position"] = 17; |
35 | literals["torsion"] = 10; | |
36 | literals["component"] = 4; | |
37 | < | literals["rigidBody"] = 11; |
38 | < | literals["zconstraint"] = 6; |
39 | < | literals["cutoffGroup"] = 12; |
37 | > | literals["rigidBody"] = 12; |
38 | > | literals["center"] = 16; |
39 | > | literals["inversion"] = 11; |
40 | > | literals["zconstraint"] = 6; |
41 | > | literals["cutoffGroup"] = 13; |
42 | literals["bend"] = 9; | |
43 | < | literals["orientation"] = 16; |
44 | < | literals["fragment"] = 13; |
43 | > | literals["orientation"] = 18; |
44 | > | literals["fragment"] = 14; |
45 | literals["bond"] = 8; | |
46 | literals["molecule"] = 5; | |
47 | literals["atom"] = 7; | |
# | Line 473 | Line 475 | void MDLexer::mWhitespace(bool _createToken) { | |
475 | ||
476 | } | |
477 | if ( inputState->guessing==0 ) { | |
478 | < | #line 218 "MDParser.g" |
478 | > | #line 228 "MDParser.g" |
479 | newline(); | |
480 | < | #line 479 "MDLexer.cpp" |
480 | > | #line 481 "MDLexer.cpp" |
481 | } | |
482 | break; | |
483 | } | |
# | Line 501 | Line 503 | void MDLexer::mWhitespace(bool _createToken) { | |
503 | ||
504 | } | |
505 | if ( inputState->guessing==0 ) { | |
506 | < | #line 223 "MDParser.g" |
506 | > | #line 233 "MDParser.g" |
507 | printf("CPP_parser.g continuation line detected\n"); | |
508 | deferredNewline(); | |
509 | < | #line 508 "MDLexer.cpp" |
509 | > | #line 510 "MDLexer.cpp" |
510 | } | |
511 | break; | |
512 | } | |
# | Line 515 | Line 517 | void MDLexer::mWhitespace(bool _createToken) { | |
517 | } | |
518 | } | |
519 | if ( inputState->guessing==0 ) { | |
520 | < | #line 226 "MDParser.g" |
520 | > | #line 236 "MDParser.g" |
521 | _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; | |
522 | < | #line 521 "MDLexer.cpp" |
522 | > | #line 523 "MDLexer.cpp" |
523 | } | |
524 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
525 | _token = makeToken(_ttype); | |
# | Line 541 | Line 543 | void MDLexer::mComment(bool _createToken) { | |
543 | else if ((LA(1) == 0xa /* '\n' */ || LA(1) == 0xd /* '\r' */ )) { | |
544 | mEndOfLine(false); | |
545 | if ( inputState->guessing==0 ) { | |
546 | < | #line 233 "MDParser.g" |
546 | > | #line 243 "MDParser.g" |
547 | deferredNewline(); | |
548 | < | #line 547 "MDLexer.cpp" |
548 | > | #line 549 "MDLexer.cpp" |
549 | } | |
550 | } | |
551 | else if ((_tokenSet_0.member(LA(1)))) { | |
# | Line 552 | Line 554 | void MDLexer::mComment(bool _createToken) { | |
554 | } | |
555 | } | |
556 | else { | |
557 | < | goto _loop78; |
557 | > | goto _loop83; |
558 | } | |
559 | ||
560 | } | |
561 | < | _loop78:; |
561 | > | _loop83:; |
562 | } // ( ... )* | |
563 | match("*/"); | |
564 | if ( inputState->guessing==0 ) { | |
565 | < | #line 236 "MDParser.g" |
565 | > | #line 246 "MDParser.g" |
566 | _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; | |
567 | < | #line 566 "MDLexer.cpp" |
567 | > | #line 568 "MDLexer.cpp" |
568 | } | |
569 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
570 | _token = makeToken(_ttype); | |
# | Line 614 | Line 616 | void MDLexer::mCPPComment(bool _createToken) { | |
616 | } | |
617 | } | |
618 | else { | |
619 | < | goto _loop82; |
619 | > | goto _loop87; |
620 | } | |
621 | ||
622 | } | |
623 | < | _loop82:; |
623 | > | _loop87:; |
624 | } // ( ... )* | |
625 | mEndOfLine(false); | |
626 | if ( inputState->guessing==0 ) { | |
627 | < | #line 242 "MDParser.g" |
627 | > | #line 252 "MDParser.g" |
628 | _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline(); | |
629 | < | #line 628 "MDLexer.cpp" |
629 | > | #line 630 "MDLexer.cpp" |
630 | } | |
631 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
632 | _token = makeToken(_ttype); | |
# | Line 642 | Line 644 | void MDLexer::mPREPROC_DIRECTIVE(bool _createToken) { | |
644 | match('#' /* charlit */ ); | |
645 | mLineDirective(false); | |
646 | if ( inputState->guessing==0 ) { | |
647 | < | #line 249 "MDParser.g" |
647 | > | #line 259 "MDParser.g" |
648 | _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline(); | |
649 | < | #line 648 "MDLexer.cpp" |
649 | > | #line 650 "MDLexer.cpp" |
650 | } | |
651 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
652 | _token = makeToken(_ttype); | |
# | Line 662 | Line 664 | void MDLexer::mLineDirective(bool _createToken) { | |
664 | ANTLR_USE_NAMESPACE(antlr)RefToken sl; | |
665 | ||
666 | if ( inputState->guessing==0 ) { | |
667 | < | #line 255 "MDParser.g" |
667 | > | #line 265 "MDParser.g" |
668 | ||
669 | deferredLineCount = 0; | |
670 | ||
671 | < | #line 670 "MDLexer.cpp" |
671 | > | #line 672 "MDLexer.cpp" |
672 | } | |
673 | { | |
674 | switch ( LA(1)) { | |
# | Line 688 | Line 690 | void MDLexer::mLineDirective(bool _createToken) { | |
690 | } | |
691 | } | |
692 | { // ( ... )+ | |
693 | < | int _cnt87=0; |
693 | > | int _cnt92=0; |
694 | for (;;) { | |
695 | if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) { | |
696 | mSpace(false); | |
697 | } | |
698 | else { | |
699 | < | if ( _cnt87>=1 ) { goto _loop87; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
699 | > | if ( _cnt92>=1 ) { goto _loop92; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
700 | } | |
701 | ||
702 | < | _cnt87++; |
702 | > | _cnt92++; |
703 | } | |
704 | < | _loop87:; |
704 | > | _loop92:; |
705 | } // ( ... )+ | |
706 | mDecimal(true); | |
707 | n=_returnToken; | |
708 | if ( inputState->guessing==0 ) { | |
709 | < | #line 260 "MDParser.g" |
709 | > | #line 270 "MDParser.g" |
710 | setLine(oopse::lexi_cast<int>(n->getText()) - 1); | |
711 | < | #line 710 "MDLexer.cpp" |
711 | > | #line 712 "MDLexer.cpp" |
712 | } | |
713 | { // ( ... )+ | |
714 | < | int _cnt89=0; |
714 | > | int _cnt94=0; |
715 | for (;;) { | |
716 | if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) { | |
717 | mSpace(false); | |
718 | } | |
719 | else { | |
720 | < | if ( _cnt89>=1 ) { goto _loop89; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
720 | > | if ( _cnt94>=1 ) { goto _loop94; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
721 | } | |
722 | ||
723 | < | _cnt89++; |
723 | > | _cnt94++; |
724 | } | |
725 | < | _loop89:; |
725 | > | _loop94:; |
726 | } // ( ... )+ | |
727 | { | |
728 | mStringLiteral(true); | |
729 | sl=_returnToken; | |
730 | } | |
731 | if ( inputState->guessing==0 ) { | |
732 | < | #line 262 "MDParser.g" |
732 | > | #line 272 "MDParser.g" |
733 | std::string filename = sl->getText().substr(1,sl->getText().length()-2); observer->notify(filename); | |
734 | < | #line 733 "MDLexer.cpp" |
734 | > | #line 735 "MDLexer.cpp" |
735 | } | |
736 | { // ( ... )* | |
737 | for (;;) { | |
738 | if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) { | |
739 | { // ( ... )+ | |
740 | < | int _cnt93=0; |
740 | > | int _cnt98=0; |
741 | for (;;) { | |
742 | if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) { | |
743 | mSpace(false); | |
744 | } | |
745 | else { | |
746 | < | if ( _cnt93>=1 ) { goto _loop93; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
746 | > | if ( _cnt98>=1 ) { goto _loop98; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
747 | } | |
748 | ||
749 | < | _cnt93++; |
749 | > | _cnt98++; |
750 | } | |
751 | < | _loop93:; |
751 | > | _loop98:; |
752 | } // ( ... )+ | |
753 | mDecimal(false); | |
754 | } | |
755 | else { | |
756 | < | goto _loop94; |
756 | > | goto _loop99; |
757 | } | |
758 | ||
759 | } | |
760 | < | _loop94:; |
760 | > | _loop99:; |
761 | } // ( ... )* | |
762 | mEndOfLine(false); | |
763 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
# | Line 808 | Line 810 | void MDLexer::mDecimal(bool _createToken) { | |
810 | ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; | |
811 | ||
812 | { // ( ... )+ | |
813 | < | int _cnt124=0; |
813 | > | int _cnt129=0; |
814 | for (;;) { | |
815 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { | |
816 | matchRange('0','9'); | |
817 | } | |
818 | else { | |
819 | < | if ( _cnt124>=1 ) { goto _loop124; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
819 | > | if ( _cnt129>=1 ) { goto _loop129; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
820 | } | |
821 | ||
822 | < | _cnt124++; |
822 | > | _cnt129++; |
823 | } | |
824 | < | _loop124:; |
824 | > | _loop129:; |
825 | } // ( ... )+ | |
826 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
827 | _token = makeToken(_ttype); | |
# | Line 857 | Line 859 | void MDLexer::mStringLiteral(bool _createToken) { | |
859 | ||
860 | } | |
861 | if ( inputState->guessing==0 ) { | |
862 | < | #line 302 "MDParser.g" |
862 | > | #line 312 "MDParser.g" |
863 | deferredNewline(); | |
864 | < | #line 863 "MDLexer.cpp" |
864 | > | #line 865 "MDLexer.cpp" |
865 | } | |
866 | } | |
867 | else if ((_tokenSet_3.member(LA(1)))) { | |
# | Line 868 | Line 870 | void MDLexer::mStringLiteral(bool _createToken) { | |
870 | } | |
871 | } | |
872 | else { | |
873 | < | goto _loop104; |
873 | > | goto _loop109; |
874 | } | |
875 | ||
876 | } | |
877 | < | _loop104:; |
877 | > | _loop109:; |
878 | } // ( ... )* | |
879 | match('\"' /* charlit */ ); | |
880 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
# | Line 1032 | Line 1034 | void MDLexer::mEscape(bool _createToken) { | |
1034 | { | |
1035 | match('x' /* charlit */ ); | |
1036 | { // ( ... )+ | |
1037 | < | int _cnt115=0; |
1037 | > | int _cnt120=0; |
1038 | for (;;) { | |
1039 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_1.member(LA(2))) && (true)) { | |
1040 | mDigit(false); | |
# | Line 1044 | Line 1046 | void MDLexer::mEscape(bool _createToken) { | |
1046 | matchRange('A','F'); | |
1047 | } | |
1048 | else { | |
1049 | < | if ( _cnt115>=1 ) { goto _loop115; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1049 | > | if ( _cnt120>=1 ) { goto _loop120; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1050 | } | |
1051 | ||
1052 | < | _cnt115++; |
1052 | > | _cnt120++; |
1053 | } | |
1054 | < | _loop115:; |
1054 | > | _loop120:; |
1055 | } // ( ... )+ | |
1056 | break; | |
1057 | } | |
# | Line 1257 | Line 1259 | void MDLexer::mID(bool _createToken) { | |
1259 | } | |
1260 | default: | |
1261 | { | |
1262 | < | goto _loop120; |
1262 | > | goto _loop125; |
1263 | } | |
1264 | } | |
1265 | } | |
1266 | < | _loop120:; |
1266 | > | _loop125:; |
1267 | } // ( ... )* | |
1268 | _ttype = testLiteralsTable(_ttype); | |
1269 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
# | Line 1335 | Line 1337 | void MDLexer::mNUM_INT(bool _createToken) { | |
1337 | ANTLR_USE_NAMESPACE(antlr)RefToken f2; | |
1338 | ANTLR_USE_NAMESPACE(antlr)RefToken f3; | |
1339 | ANTLR_USE_NAMESPACE(antlr)RefToken f4; | |
1340 | < | #line 395 "MDParser.g" |
1340 | > | #line 405 "MDParser.g" |
1341 | ||
1342 | bool isDecimal = false; | |
1343 | ANTLR_USE_NAMESPACE(antlr)RefToken t = ANTLR_USE_NAMESPACE(antlr)nullToken; | |
1344 | ||
1345 | < | #line 1344 "MDLexer.cpp" |
1345 | > | #line 1346 "MDLexer.cpp" |
1346 | ||
1347 | { | |
1348 | switch ( LA(1)) { | |
# | Line 1380 | Line 1382 | void MDLexer::mNUM_INT(bool _createToken) { | |
1382 | { | |
1383 | match('.' /* charlit */ ); | |
1384 | if ( inputState->guessing==0 ) { | |
1385 | < | #line 402 "MDParser.g" |
1385 | > | #line 412 "MDParser.g" |
1386 | _ttype = DOT; | |
1387 | < | #line 1386 "MDLexer.cpp" |
1387 | > | #line 1388 "MDLexer.cpp" |
1388 | } | |
1389 | { | |
1390 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { | |
1391 | { // ( ... )+ | |
1392 | < | int _cnt132=0; |
1392 | > | int _cnt137=0; |
1393 | for (;;) { | |
1394 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { | |
1395 | matchRange('0','9'); | |
1396 | } | |
1397 | else { | |
1398 | < | if ( _cnt132>=1 ) { goto _loop132; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1398 | > | if ( _cnt137>=1 ) { goto _loop137; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1399 | } | |
1400 | ||
1401 | < | _cnt132++; |
1401 | > | _cnt137++; |
1402 | } | |
1403 | < | _loop132:; |
1403 | > | _loop137:; |
1404 | } // ( ... )+ | |
1405 | { | |
1406 | < | if ((LA(1) == 0x45 /* 'E' */ || LA(1) == 0x65 /* 'e' */ )) { |
1406 | > | if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) { |
1407 | mEXPONENT(false); | |
1408 | } | |
1409 | else { | |
# | Line 1409 | Line 1411 | void MDLexer::mNUM_INT(bool _createToken) { | |
1411 | ||
1412 | } | |
1413 | { | |
1414 | < | if ((_tokenSet_6.member(LA(1)))) { |
1414 | > | if ((_tokenSet_8.member(LA(1)))) { |
1415 | mFLOAT_SUFFIX(true); | |
1416 | f1=_returnToken; | |
1417 | if ( inputState->guessing==0 ) { | |
1418 | < | #line 403 "MDParser.g" |
1418 | > | #line 413 "MDParser.g" |
1419 | t=f1; | |
1420 | < | #line 1419 "MDLexer.cpp" |
1420 | > | #line 1421 "MDLexer.cpp" |
1421 | } | |
1422 | } | |
1423 | else { | |
# | Line 1423 | Line 1425 | void MDLexer::mNUM_INT(bool _createToken) { | |
1425 | ||
1426 | } | |
1427 | if ( inputState->guessing==0 ) { | |
1428 | < | #line 404 "MDParser.g" |
1428 | > | #line 414 "MDParser.g" |
1429 | ||
1430 | if ( t && | |
1431 | (t->getText().find('f') != ANTLR_USE_NAMESPACE(std)string::npos || | |
# | Line 1434 | Line 1436 | void MDLexer::mNUM_INT(bool _createToken) { | |
1436 | _ttype = NUM_DOUBLE; // assume double | |
1437 | } | |
1438 | ||
1439 | < | #line 1438 "MDLexer.cpp" |
1439 | > | #line 1440 "MDLexer.cpp" |
1440 | } | |
1441 | } | |
1442 | else { | |
# | Line 1460 | Line 1462 | void MDLexer::mNUM_INT(bool _createToken) { | |
1462 | { | |
1463 | match('0' /* charlit */ ); | |
1464 | if ( inputState->guessing==0 ) { | |
1465 | < | #line 416 "MDParser.g" |
1465 | > | #line 426 "MDParser.g" |
1466 | isDecimal = true; | |
1467 | < | #line 1466 "MDLexer.cpp" |
1467 | > | #line 1468 "MDLexer.cpp" |
1468 | } | |
1469 | { | |
1470 | if ((LA(1) == 0x58 /* 'X' */ || LA(1) == 0x78 /* 'x' */ )) { | |
# | Line 1485 | Line 1487 | void MDLexer::mNUM_INT(bool _createToken) { | |
1487 | } | |
1488 | } | |
1489 | { // ( ... )+ | |
1490 | < | int _cnt139=0; |
1490 | > | int _cnt144=0; |
1491 | for (;;) { | |
1492 | < | if ((_tokenSet_7.member(LA(1))) && (true) && (true)) { |
1492 | > | if ((_tokenSet_9.member(LA(1))) && (true) && (true)) { |
1493 | mHEX_DIGIT(false); | |
1494 | } | |
1495 | else { | |
1496 | < | if ( _cnt139>=1 ) { goto _loop139; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1496 | > | if ( _cnt144>=1 ) { goto _loop144; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1497 | } | |
1498 | ||
1499 | < | _cnt139++; |
1499 | > | _cnt144++; |
1500 | } | |
1501 | < | _loop139:; |
1501 | > | _loop144:; |
1502 | } // ( ... )+ | |
1503 | } | |
1504 | else { | |
1505 | < | bool synPredMatched144 = false; |
1505 | > | bool synPredMatched149 = false; |
1506 | if ((((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (true) && (true))) { | |
1507 | < | int _m144 = mark(); |
1508 | < | synPredMatched144 = true; |
1507 | > | int _m149 = mark(); |
1508 | > | synPredMatched149 = true; |
1509 | inputState->guessing++; | |
1510 | try { | |
1511 | { | |
1512 | { // ( ... )+ | |
1513 | < | int _cnt142=0; |
1513 | > | int _cnt147=0; |
1514 | for (;;) { | |
1515 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { | |
1516 | matchRange('0','9'); | |
1517 | } | |
1518 | else { | |
1519 | < | if ( _cnt142>=1 ) { goto _loop142; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1519 | > | if ( _cnt147>=1 ) { goto _loop147; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1520 | } | |
1521 | ||
1522 | < | _cnt142++; |
1522 | > | _cnt147++; |
1523 | } | |
1524 | < | _loop142:; |
1524 | > | _loop147:; |
1525 | } // ( ... )+ | |
1526 | { | |
1527 | < | switch ( LA(1)) { |
1526 | < | case 0x2e /* '.' */ : |
1527 | < | { |
1528 | < | match('.' /* charlit */ ); |
1529 | < | break; |
1530 | < | } |
1531 | < | case 0x45 /* 'E' */ : |
1532 | < | case 0x65 /* 'e' */ : |
1533 | < | { |
1527 | > | if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) { |
1528 | mEXPONENT(false); | |
1535 | – | break; |
1529 | } | |
1530 | < | case 0x44 /* 'D' */ : |
1531 | < | case 0x46 /* 'F' */ : |
1532 | < | case 0x64 /* 'd' */ : |
1533 | < | case 0x66 /* 'f' */ : |
1541 | < | { |
1530 | > | else if ((LA(1) == 0x2e /* '.' */ )) { |
1531 | > | match('.' /* charlit */ ); |
1532 | > | } |
1533 | > | else if ((_tokenSet_8.member(LA(1))) && (true)) { |
1534 | mFLOAT_SUFFIX(false); | |
1543 | – | break; |
1535 | } | |
1536 | < | default: |
1546 | < | { |
1536 | > | else { |
1537 | throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); | |
1538 | } | |
1539 | + | |
1540 | } | |
1541 | } | |
1551 | – | } |
1542 | } | |
1543 | catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) { | |
1544 | < | synPredMatched144 = false; |
1544 | > | synPredMatched149 = false; |
1545 | } | |
1546 | < | rewind(_m144); |
1546 | > | rewind(_m149); |
1547 | inputState->guessing--; | |
1548 | } | |
1549 | < | if ( synPredMatched144 ) { |
1549 | > | if ( synPredMatched149 ) { |
1550 | { // ( ... )+ | |
1551 | < | int _cnt146=0; |
1551 | > | int _cnt151=0; |
1552 | for (;;) { | |
1553 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { | |
1554 | matchRange('0','9'); | |
1555 | } | |
1556 | else { | |
1557 | < | if ( _cnt146>=1 ) { goto _loop146; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1557 | > | if ( _cnt151>=1 ) { goto _loop151; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1558 | } | |
1559 | ||
1560 | < | _cnt146++; |
1560 | > | _cnt151++; |
1561 | } | |
1562 | < | _loop146:; |
1562 | > | _loop151:; |
1563 | } // ( ... )+ | |
1564 | } | |
1565 | else if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x37 /* '7' */ )) && (true) && (true)) { | |
1566 | { // ( ... )+ | |
1567 | < | int _cnt148=0; |
1567 | > | int _cnt153=0; |
1568 | for (;;) { | |
1569 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x37 /* '7' */ ))) { | |
1570 | matchRange('0','7'); | |
1571 | } | |
1572 | else { | |
1573 | < | if ( _cnt148>=1 ) { goto _loop148; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1573 | > | if ( _cnt153>=1 ) { goto _loop153; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1574 | } | |
1575 | ||
1576 | < | _cnt148++; |
1576 | > | _cnt153++; |
1577 | } | |
1578 | < | _loop148:; |
1578 | > | _loop153:; |
1579 | } // ( ... )+ | |
1580 | } | |
1581 | else { | |
# | Line 1613 | Line 1603 | void MDLexer::mNUM_INT(bool _createToken) { | |
1603 | matchRange('0','9'); | |
1604 | } | |
1605 | else { | |
1606 | < | goto _loop151; |
1606 | > | goto _loop156; |
1607 | } | |
1608 | ||
1609 | } | |
1610 | < | _loop151:; |
1610 | > | _loop156:; |
1611 | } // ( ... )* | |
1612 | if ( inputState->guessing==0 ) { | |
1613 | < | #line 433 "MDParser.g" |
1613 | > | #line 443 "MDParser.g" |
1614 | isDecimal=true; | |
1615 | < | #line 1626 "MDLexer.cpp" |
1615 | > | #line 1616 "MDLexer.cpp" |
1616 | } | |
1617 | break; | |
1618 | } | |
# | Line 1653 | Line 1643 | void MDLexer::mNUM_INT(bool _createToken) { | |
1643 | } | |
1644 | } | |
1645 | if ( inputState->guessing==0 ) { | |
1646 | < | #line 435 "MDParser.g" |
1646 | > | #line 445 "MDParser.g" |
1647 | _ttype = NUM_LONG; | |
1648 | < | #line 1659 "MDLexer.cpp" |
1648 | > | #line 1649 "MDLexer.cpp" |
1649 | } | |
1650 | } | |
1651 | < | else if (((_tokenSet_8.member(LA(1))))&&(isDecimal)) { |
1651 | > | else if (((_tokenSet_10.member(LA(1))))&&(isDecimal)) { |
1652 | { | |
1653 | < | switch ( LA(1)) { |
1654 | < | case 0x2e /* '.' */ : |
1655 | < | { |
1653 | > | if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) { |
1654 | > | mEXPONENT(false); |
1655 | > | { |
1656 | > | if ((_tokenSet_8.member(LA(1)))) { |
1657 | > | mFLOAT_SUFFIX(true); |
1658 | > | f3=_returnToken; |
1659 | > | if ( inputState->guessing==0 ) { |
1660 | > | #line 450 "MDParser.g" |
1661 | > | t=f3; |
1662 | > | #line 1663 "MDLexer.cpp" |
1663 | > | } |
1664 | > | } |
1665 | > | else { |
1666 | > | } |
1667 | > | |
1668 | > | } |
1669 | > | } |
1670 | > | else if ((LA(1) == 0x2e /* '.' */ )) { |
1671 | match('.' /* charlit */ ); | |
1672 | { // ( ... )* | |
1673 | for (;;) { | |
# | Line 1670 | Line 1675 | void MDLexer::mNUM_INT(bool _createToken) { | |
1675 | matchRange('0','9'); | |
1676 | } | |
1677 | else { | |
1678 | < | goto _loop156; |
1678 | > | goto _loop161; |
1679 | } | |
1680 | ||
1681 | } | |
1682 | < | _loop156:; |
1682 | > | _loop161:; |
1683 | } // ( ... )* | |
1684 | { | |
1685 | < | if ((LA(1) == 0x45 /* 'E' */ || LA(1) == 0x65 /* 'e' */ )) { |
1685 | > | if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) { |
1686 | mEXPONENT(false); | |
1687 | } | |
1688 | else { | |
# | Line 1685 | Line 1690 | void MDLexer::mNUM_INT(bool _createToken) { | |
1690 | ||
1691 | } | |
1692 | { | |
1693 | < | if ((_tokenSet_6.member(LA(1)))) { |
1693 | > | if ((_tokenSet_8.member(LA(1)))) { |
1694 | mFLOAT_SUFFIX(true); | |
1695 | f2=_returnToken; | |
1696 | if ( inputState->guessing==0 ) { | |
1697 | < | #line 439 "MDParser.g" |
1697 | > | #line 449 "MDParser.g" |
1698 | t=f2; | |
1699 | < | #line 1695 "MDLexer.cpp" |
1699 | > | #line 1700 "MDLexer.cpp" |
1700 | } | |
1701 | } | |
1702 | else { | |
1703 | } | |
1704 | ||
1705 | } | |
1701 | – | break; |
1706 | } | |
1707 | < | case 0x45 /* 'E' */ : |
1704 | < | case 0x65 /* 'e' */ : |
1705 | < | { |
1706 | < | mEXPONENT(false); |
1707 | < | { |
1708 | < | if ((_tokenSet_6.member(LA(1)))) { |
1709 | < | mFLOAT_SUFFIX(true); |
1710 | < | f3=_returnToken; |
1711 | < | if ( inputState->guessing==0 ) { |
1712 | < | #line 440 "MDParser.g" |
1713 | < | t=f3; |
1714 | < | #line 1715 "MDLexer.cpp" |
1715 | < | } |
1716 | < | } |
1717 | < | else { |
1718 | < | } |
1719 | < | |
1720 | < | } |
1721 | < | break; |
1722 | < | } |
1723 | < | case 0x44 /* 'D' */ : |
1724 | < | case 0x46 /* 'F' */ : |
1725 | < | case 0x64 /* 'd' */ : |
1726 | < | case 0x66 /* 'f' */ : |
1727 | < | { |
1707 | > | else if ((_tokenSet_8.member(LA(1))) && (true)) { |
1708 | mFLOAT_SUFFIX(true); | |
1709 | f4=_returnToken; | |
1710 | if ( inputState->guessing==0 ) { | |
1711 | < | #line 441 "MDParser.g" |
1711 | > | #line 451 "MDParser.g" |
1712 | t=f4; | |
1713 | < | #line 1734 "MDLexer.cpp" |
1713 | > | #line 1714 "MDLexer.cpp" |
1714 | } | |
1735 | – | break; |
1715 | } | |
1716 | < | default: |
1738 | < | { |
1716 | > | else { |
1717 | throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); | |
1718 | } | |
1719 | + | |
1720 | } | |
1742 | – | } |
1721 | if ( inputState->guessing==0 ) { | |
1722 | < | #line 443 "MDParser.g" |
1722 | > | #line 453 "MDParser.g" |
1723 | ||
1724 | if ( t && | |
1725 | (t->getText().find('f') != ANTLR_USE_NAMESPACE(std)string::npos || | |
# | Line 1752 | Line 1730 | void MDLexer::mNUM_INT(bool _createToken) { | |
1730 | _ttype = NUM_DOUBLE; // assume double | |
1731 | } | |
1732 | ||
1733 | < | #line 1756 "MDLexer.cpp" |
1733 | > | #line 1734 "MDLexer.cpp" |
1734 | } | |
1735 | } | |
1736 | else { | |
# | Line 1792 | Line 1770 | void MDLexer::mEXPONENT(bool _createToken) { | |
1770 | match('E' /* charlit */ ); | |
1771 | break; | |
1772 | } | |
1773 | + | case 0x64 /* 'd' */ : |
1774 | + | { |
1775 | + | match('d' /* charlit */ ); |
1776 | + | break; |
1777 | + | } |
1778 | + | case 0x44 /* 'D' */ : |
1779 | + | { |
1780 | + | match('D' /* charlit */ ); |
1781 | + | break; |
1782 | + | } |
1783 | default: | |
1784 | { | |
1785 | throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); | |
# | Line 1830 | Line 1818 | void MDLexer::mEXPONENT(bool _createToken) { | |
1818 | } | |
1819 | } | |
1820 | { // ( ... )+ | |
1821 | < | int _cnt164=0; |
1821 | > | int _cnt169=0; |
1822 | for (;;) { | |
1823 | if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { | |
1824 | matchRange('0','9'); | |
1825 | } | |
1826 | else { | |
1827 | < | if ( _cnt164>=1 ) { goto _loop164; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1827 | > | if ( _cnt169>=1 ) { goto _loop169; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} |
1828 | } | |
1829 | ||
1830 | < | _cnt164++; |
1830 | > | _cnt169++; |
1831 | } | |
1832 | < | _loop164:; |
1832 | > | _loop169:; |
1833 | } // ( ... )+ | |
1834 | if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { | |
1835 | _token = makeToken(_ttype); | |
# | Line 1894 | Line 1882 | const unsigned long MDLexer::_tokenSet_0_data_[] = { 4 | |
1882 | const unsigned long MDLexer::_tokenSet_0_data_[] = { 4294958079UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; | |
1883 | // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12 | |
1884 | // 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f ! | |
1885 | < | // \" # $ % & \' ( ) + , - . / 0 1 2 |
1885 | > | // \" # $ % & \' ( ) + , - . / 0 1 2 3 4 |
1886 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_0(_tokenSet_0_data_,16); | |
1887 | const unsigned long MDLexer::_tokenSet_1_data_[] = { 4294958079UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; | |
1888 | // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12 | |
1889 | // 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f ! | |
1890 | < | // \" # $ % & \' ( ) * + , - . / 0 1 2 |
1890 | > | // \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 |
1891 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_1(_tokenSet_1_data_,16); | |
1892 | const unsigned long MDLexer::_tokenSet_2_data_[] = { 0UL, 2164195460UL, 268435456UL, 22298694UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; | |
1893 | < | // \" \' 0 1 2 |
1893 | > | // \" \' 0 1 2 3 4 |
1894 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_2(_tokenSet_2_data_,10); | |
1895 | const unsigned long MDLexer::_tokenSet_3_data_[] = { 4294958079UL, 4294967291UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; | |
1896 | // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12 | |
1897 | // 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f ! | |
1898 | < | // # $ % & \' ( ) * + , - . / 0 1 2 |
1898 | > | // # $ % & \' ( ) * + , - . / 0 1 2 3 4 |
1899 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_3(_tokenSet_3_data_,16); | |
1900 | const unsigned long MDLexer::_tokenSet_4_data_[] = { 0UL, 67043456UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; | |
1901 | < | // \' 0 1 2 |
1901 | > | // \' 0 1 2 3 4 |
1902 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_4(_tokenSet_4_data_,10); | |
1903 | const unsigned long MDLexer::_tokenSet_5_data_[] = { 4294967295UL, 4294967167UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; | |
1904 | // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 | |
1905 | // 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e | |
1906 | < | // 0x1f ! \" # $ % & ( ) * + , - . / 0 1 2 |
1906 | > | // 0x1f ! \" # $ % & ( ) * + , - . / 0 1 2 3 4 |
1907 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_5(_tokenSet_5_data_,16); | |
1908 | < | const unsigned long MDLexer::_tokenSet_6_data_[] = { 0UL, 0UL, 80UL, 80UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1908 | > | const unsigned long MDLexer::_tokenSet_6_data_[] = { 0UL, 0UL, 48UL, 48UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1909 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_6(_tokenSet_6_data_,10); | |
1910 | < | const unsigned long MDLexer::_tokenSet_7_data_[] = { 0UL, 67043328UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1911 | < | // 0 1 2 |
1910 | > | const unsigned long MDLexer::_tokenSet_7_data_[] = { 0UL, 67053568UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1911 | > | // + - 0 1 2 3 4 |
1912 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_7(_tokenSet_7_data_,10); | |
1913 | < | const unsigned long MDLexer::_tokenSet_8_data_[] = { 0UL, 16384UL, 112UL, 112UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1926 | < | // . |
1913 | > | const unsigned long MDLexer::_tokenSet_8_data_[] = { 0UL, 0UL, 80UL, 80UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1914 | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_8(_tokenSet_8_data_,10); | |
1915 | + | const unsigned long MDLexer::_tokenSet_9_data_[] = { 0UL, 67043328UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1916 | + | // 0 1 2 3 4 |
1917 | + | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_9(_tokenSet_9_data_,10); |
1918 | + | const unsigned long MDLexer::_tokenSet_10_data_[] = { 0UL, 16384UL, 112UL, 112UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; |
1919 | + | // . |
1920 | + | const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_10(_tokenSet_10_data_,10); |
1921 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |