3#include <antlr/CharBuffer.hpp>
4#include <antlr/TokenStreamException.hpp>
5#include <antlr/TokenStreamIOException.hpp>
6#include <antlr/TokenStreamRecognitionException.hpp>
7#include <antlr/CharStreamException.hpp>
8#include <antlr/CharStreamIOException.hpp>
9#include <antlr/NoViableAltForCharException.hpp>
13MDLexer::MDLexer(ANTLR_USE_NAMESPACE(std)istream& in)
14 : ANTLR_USE_NAMESPACE(antlr)CharScanner(new ANTLR_USE_NAMESPACE(antlr)CharBuffer(in),true)
19MDLexer::MDLexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib)
20 : ANTLR_USE_NAMESPACE(antlr)CharScanner(ib,true)
25MDLexer::MDLexer(
const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state)
26 : ANTLR_USE_NAMESPACE(antlr)CharScanner(state,true)
31void MDLexer::initLiterals()
33 literals[
"Quartic"] = 31;
34 literals[
"UreyBradley"] = 35;
35 literals[
"Harmonic"] = 29;
36 literals[
"flucQ"] = 24;
37 literals[
"satellites"] = 21;
38 literals[
"Opls"] = 39;
39 literals[
"cutoffGroup"] = 14;
40 literals[
"RNEMD"] = 25;
41 literals[
"constraint"] = 15;
42 literals[
"sequence"] = 18;
43 literals[
"Trappe"] = 40;
44 literals[
"distance"] = 16;
45 literals[
"Cosine"] = 36;
46 literals[
"rigidBody"] = 13;
47 literals[
"fragment"] = 17;
48 literals[
"charge"] = 45;
49 literals[
"zconstraint"] = 6;
50 literals[
"minimizer"] = 27;
51 literals[
"light"] = 26;
52 literals[
"Cubic"] = 30;
53 literals[
"component"] = 4;
54 literals[
"GhostBend"] = 34;
55 literals[
"center"] = 20;
56 literals[
"members"] = 19;
57 literals[
"position"] = 22;
58 literals[
"Charmm"] = 38;
59 literals[
"AmberImproper"] = 41;
60 literals[
"Fixed"] = 28;
61 literals[
"Polynomial"] = 32;
62 literals[
"orientation"] = 23;
63 literals[
"bend"] = 10;
64 literals[
"torsion"] = 11;
66 literals[
"molecule"] = 5;
67 literals[
"nodes"] = 46;
68 literals[
"CentralAtomHeight"] = 43;
69 literals[
"Morse"] = 33;
70 literals[
"restraint"] = 7;
71 literals[
"inversion"] = 12;
73 literals[
"GhostTorsion"] = 37;
74 literals[
"ImproperCosine"] = 42;
75 literals[
"Dreiding"] = 44;
78ANTLR_USE_NAMESPACE(antlr)RefToken MDLexer::nextToken()
80 ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken;
82 ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken;
83 int _ttype = ANTLR_USE_NAMESPACE(antlr)Token::INVALID_TYPE;
90 theRetToken=_returnToken;
96 theRetToken=_returnToken;
102 theRetToken=_returnToken;
108 theRetToken=_returnToken;
114 theRetToken=_returnToken;
120 theRetToken=_returnToken;
126 theRetToken=_returnToken;
132 theRetToken=_returnToken;
138 theRetToken=_returnToken;
144 theRetToken=_returnToken;
150 theRetToken=_returnToken;
161 theRetToken=_returnToken;
166 mPREPROC_DIRECTIVE(
true);
167 theRetToken=_returnToken;
172 mStringLiteral(
true);
173 theRetToken=_returnToken;
179 theRetToken=_returnToken;
237 theRetToken=_returnToken;
255 theRetToken=_returnToken;
259 if ((LA(1) == 0x2f ) && (LA(2) == 0x2a )) {
261 theRetToken=_returnToken;
263 else if ((LA(1) == 0x2f ) && (LA(2) == 0x2f )) {
265 theRetToken=_returnToken;
271 _returnToken = makeToken(ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE);
273 else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
279 _ttype = _returnToken->getType();
280 _returnToken->setType(_ttype);
283 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& e) {
284 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamRecognitionException(e);
286 catch (ANTLR_USE_NAMESPACE(antlr)CharStreamIOException& csie) {
287 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamIOException(csie.io);
289 catch (ANTLR_USE_NAMESPACE(antlr)CharStreamException& cse) {
290 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamException(cse.getMessage());
296void MDLexer::mASSIGNEQUAL(
bool _createToken) {
297 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
298 _ttype = ASSIGNEQUAL;
299 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
302 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
303 _token = makeToken(_ttype);
304 _token->setText(text.substr(_begin, text.length()-_begin));
306 _returnToken = _token;
310void MDLexer::mCOLON(
bool _createToken) {
311 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
313 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
316 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
317 _token = makeToken(_ttype);
318 _token->setText(text.substr(_begin, text.length()-_begin));
320 _returnToken = _token;
324void MDLexer::mCOMMA(
bool _createToken) {
325 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
327 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
330 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
331 _token = makeToken(_ttype);
332 _token->setText(text.substr(_begin, text.length()-_begin));
334 _returnToken = _token;
338void MDLexer::mQUESTIONMARK(
bool _createToken) {
339 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
340 _ttype = QUESTIONMARK;
341 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
344 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
345 _token = makeToken(_ttype);
346 _token->setText(text.substr(_begin, text.length()-_begin));
348 _returnToken = _token;
352void MDLexer::mSEMICOLON(
bool _createToken) {
353 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
355 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
358 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
359 _token = makeToken(_ttype);
360 _token->setText(text.substr(_begin, text.length()-_begin));
362 _returnToken = _token;
366void MDLexer::mLPAREN(
bool _createToken) {
367 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
369 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
372 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
373 _token = makeToken(_ttype);
374 _token->setText(text.substr(_begin, text.length()-_begin));
376 _returnToken = _token;
380void MDLexer::mRPAREN(
bool _createToken) {
381 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
383 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
386 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
387 _token = makeToken(_ttype);
388 _token->setText(text.substr(_begin, text.length()-_begin));
390 _returnToken = _token;
394void MDLexer::mLBRACKET(
bool _createToken) {
395 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
397 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
400 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
401 _token = makeToken(_ttype);
402 _token->setText(text.substr(_begin, text.length()-_begin));
404 _returnToken = _token;
408void MDLexer::mRBRACKET(
bool _createToken) {
409 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
411 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
414 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
415 _token = makeToken(_ttype);
416 _token->setText(text.substr(_begin, text.length()-_begin));
418 _returnToken = _token;
422void MDLexer::mLCURLY(
bool _createToken) {
423 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
425 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
428 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
429 _token = makeToken(_ttype);
430 _token->setText(text.substr(_begin, text.length()-_begin));
432 _returnToken = _token;
436void MDLexer::mRCURLY(
bool _createToken) {
437 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
439 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
442 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
443 _token = makeToken(_ttype);
444 _token->setText(text.substr(_begin, text.length()-_begin));
446 _returnToken = _token;
450void MDLexer::mWhitespace(
bool _createToken) {
451 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
453 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
480 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
490 if ((LA(1) == 0xd ) && (LA(2) == 0xa )) {
494 else if ((LA(1) == 0xd ) && (
true)) {
497 else if ((LA(1) == 0xa )) {
501 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
505 if ( inputState->guessing==0 ) {
506#line 348 "MDParser.g"
508#line 509 "MDLexer.cpp"
515 if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (LA(3) == 0xa )) {
520 else if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (
true)) {
524 else if ((LA(1) == 0x5c ) && (LA(2) == 0xa )) {
529 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
533 if ( inputState->guessing==0 ) {
534#line 353 "MDParser.g"
535 printf(
"CPP_parser.g continuation line detected\n");
537#line 538 "MDLexer.cpp"
543 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
547 if ( inputState->guessing==0 ) {
548#line 356 "MDParser.g"
549 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
550#line 551 "MDLexer.cpp"
552 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
553 _token = makeToken(_ttype);
554 _token->setText(text.substr(_begin, text.length()-_begin));
556 _returnToken = _token;
560void MDLexer::mComment(
bool _createToken) {
561 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
563 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
568 if (((LA(1) == 0x2a ) && ((LA(2) >= 0x0 && LA(2) <= 0xff)) && ((LA(3) >= 0x0 && LA(3) <= 0xff)))&&(LA(2) !=
'/')) {
571 else if ((LA(1) == 0xa || LA(1) == 0xd )) {
573 if ( inputState->guessing==0 ) {
574#line 363 "MDParser.g"
576#line 577 "MDLexer.cpp"
579 else if ((_tokenSet_0.member(LA(1)))) {
592 if ( inputState->guessing==0 ) {
593#line 366 "MDParser.g"
594 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
595#line 596 "MDLexer.cpp"
597 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
598 _token = makeToken(_ttype);
599 _token->setText(text.substr(_begin, text.length()-_begin));
601 _returnToken = _token;
605void MDLexer::mEndOfLine(
bool _createToken) {
606 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
608 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
611 if ((LA(1) == 0xd ) && (LA(2) == 0xa ) && (
true)) {
614 else if ((LA(1) == 0xd ) && (
true) && (
true)) {
617 else if ((LA(1) == 0xa )) {
621 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
625 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
626 _token = makeToken(_ttype);
627 _token->setText(text.substr(_begin, text.length()-_begin));
629 _returnToken = _token;
633void MDLexer::mCPPComment(
bool _createToken) {
634 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
636 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
641 if ((_tokenSet_1.member(LA(1)))) {
654 if ( inputState->guessing==0 ) {
655#line 372 "MDParser.g"
656 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline();
657#line 658 "MDLexer.cpp"
659 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
660 _token = makeToken(_ttype);
661 _token->setText(text.substr(_begin, text.length()-_begin));
663 _returnToken = _token;
667void MDLexer::mPREPROC_DIRECTIVE(
bool _createToken) {
668 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
669 _ttype = PREPROC_DIRECTIVE;
670 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
673 mLineDirective(
false);
674 if ( inputState->guessing==0 ) {
675#line 379 "MDParser.g"
676 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline();
677#line 678 "MDLexer.cpp"
679 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
680 _token = makeToken(_ttype);
681 _token->setText(text.substr(_begin, text.length()-_begin));
683 _returnToken = _token;
687void MDLexer::mLineDirective(
bool _createToken) {
688 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
689 _ttype = LineDirective;
690 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
691 ANTLR_USE_NAMESPACE(antlr)RefToken n;
692 ANTLR_USE_NAMESPACE(antlr)RefToken sl;
694 if ( inputState->guessing==0 ) {
695#line 385 "MDParser.g"
697 deferredLineCount = 0;
699#line 700 "MDLexer.cpp"
716 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
723 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
727 if ( _cnt119>=1 ) {
goto _loop119; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
736 if ( inputState->guessing==0 ) {
737#line 390 "MDParser.g"
738 setLine(OpenMD::lexi_cast<int>(n->getText()) - 1);
739#line 740 "MDLexer.cpp"
744 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
748 if ( _cnt121>=1 ) {
goto _loop121; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
756 mStringLiteral(
true);
759 if ( inputState->guessing==0 ) {
760#line 392 "MDParser.g"
761 std::string filename = sl->getText().substr(1,sl->getText().length()-2); observer->notify(filename);
762#line 763 "MDLexer.cpp"
766 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
770 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
774 if ( _cnt125>=1 ) {
goto _loop125; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
791 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
792 _token = makeToken(_ttype);
793 _token->setText(text.substr(_begin, text.length()-_begin));
795 _returnToken = _token;
799void MDLexer::mSpace(
bool _createToken) {
800 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
802 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
823 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
827 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
828 _token = makeToken(_ttype);
829 _token->setText(text.substr(_begin, text.length()-_begin));
831 _returnToken = _token;
835void MDLexer::mDecimal(
bool _createToken) {
836 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
838 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
843 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
847 if ( _cnt156>=1 ) {
goto _loop156; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
854 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
855 _token = makeToken(_ttype);
856 _token->setText(text.substr(_begin, text.length()-_begin));
858 _returnToken = _token;
862void MDLexer::mStringLiteral(
bool _createToken) {
863 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
864 _ttype = StringLiteral;
865 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
870 if ((LA(1) == 0x5c ) && (_tokenSet_2.member(LA(2)))) {
873 else if ((LA(1) == 0x5c ) && (LA(2) == 0xa || LA(2) == 0xd )) {
875 if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (LA(3) == 0xa )) {
878 else if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (_tokenSet_1.member(LA(3)))) {
881 else if ((LA(1) == 0x5c ) && (LA(2) == 0xa )) {
885 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
889 if ( inputState->guessing==0 ) {
890#line 432 "MDParser.g"
892#line 893 "MDLexer.cpp"
895 else if ((_tokenSet_3.member(LA(1)))) {
908 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
909 _token = makeToken(_ttype);
910 _token->setText(text.substr(_begin, text.length()-_begin));
912 _returnToken = _token;
916void MDLexer::mCharLiteral(
bool _createToken) {
917 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
918 _ttype = CharLiteral;
919 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
923 if ((LA(1) == 0x5c ) && (_tokenSet_2.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
926 else if ((_tokenSet_5.member(LA(1))) && (LA(2) == 0x27 ) && (
true)) {
932 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
937 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
938 _token = makeToken(_ttype);
939 _token->setText(text.substr(_begin, text.length()-_begin));
941 _returnToken = _token;
945void MDLexer::mEscape(
bool _createToken) {
946 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
948 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1014 matchRange(
'0',
'3');
1017 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1020 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1023 else if ((_tokenSet_1.member(LA(1))) && (
true) && (
true)) {
1026 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1031 else if ((_tokenSet_1.member(LA(1))) && (
true) && (
true)) {
1034 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1046 matchRange(
'4',
'7');
1049 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1052 else if ((_tokenSet_1.member(LA(1))) && (
true) && (
true)) {
1055 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1067 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1070 else if (((LA(1) >= 0x61 && LA(1) <= 0x66 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1071 matchRange(
'a',
'f');
1073 else if (((LA(1) >= 0x41 && LA(1) <= 0x46 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1074 matchRange(
'A',
'F');
1077 if ( _cnt147>=1 ) {
goto _loop147; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1088 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1092 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1093 _token = makeToken(_ttype);
1094 _token->setText(text.substr(_begin, text.length()-_begin));
1096 _returnToken = _token;
1100void MDLexer::mDigit(
bool _createToken) {
1101 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1103 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1105 matchRange(
'0',
'9');
1106 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1107 _token = makeToken(_ttype);
1108 _token->setText(text.substr(_begin, text.length()-_begin));
1110 _returnToken = _token;
1114void MDLexer::mVocabulary(
bool _createToken) {
1115 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1116 _ttype = Vocabulary;
1117 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1119 matchRange(
'\3',
static_cast<unsigned char>(
'\377'));
1120 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1121 _token = makeToken(_ttype);
1122 _token->setText(text.substr(_begin, text.length()-_begin));
1124 _returnToken = _token;
1128void MDLexer::mID(
bool _createToken) {
1129 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1131 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1162 matchRange(
'a',
'z');
1192 matchRange(
'A',
'Z');
1202 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1236 matchRange(
'a',
'z');
1266 matchRange(
'A',
'Z');
1285 matchRange(
'0',
'9');
1296 _ttype = testLiteralsTable(_ttype);
1297 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1298 _token = makeToken(_ttype);
1299 _token->setText(text.substr(_begin, text.length()-_begin));
1301 _returnToken = _token;
1305void MDLexer::mHEX_DIGIT(
bool _createToken) {
1306 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1308 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1323 matchRange(
'0',
'9');
1333 matchRange(
'A',
'F');
1343 matchRange(
'a',
'f');
1348 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1352 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1353 _token = makeToken(_ttype);
1354 _token->setText(text.substr(_begin, text.length()-_begin));
1356 _returnToken = _token;
1360void MDLexer::mNUM_INT(
bool _createToken) {
1361 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1363 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1364 ANTLR_USE_NAMESPACE(antlr)RefToken f1;
1365 ANTLR_USE_NAMESPACE(antlr)RefToken f2;
1366 ANTLR_USE_NAMESPACE(antlr)RefToken f3;
1367 ANTLR_USE_NAMESPACE(antlr)RefToken f4;
1368#line 525 "MDParser.g"
1370 bool isDecimal =
false;
1371 ANTLR_USE_NAMESPACE(antlr)RefToken t = ANTLR_USE_NAMESPACE(antlr)nullToken;
1373#line 1374 "MDLexer.cpp"
1403 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1412 if ( inputState->guessing==0 ) {
1413#line 532 "MDParser.g"
1415#line 1416 "MDLexer.cpp"
1418 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1422 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1423 matchRange(
'0',
'9');
1426 if ( _cnt164>=1 ) {
goto _loop164; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1434 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1442 if ((_tokenSet_8.member(LA(1)))) {
1443 mFLOAT_SUFFIX(
true);
1445 if ( inputState->guessing==0 ) {
1446#line 533 "MDParser.g"
1448#line 1449 "MDLexer.cpp"
1455 if ( inputState->guessing==0 ) {
1456#line 534 "MDParser.g"
1459 (t->getText().find(
'f') != ANTLR_USE_NAMESPACE(std)string::npos ||
1460 t->getText().find(
'F') != ANTLR_USE_NAMESPACE(std)string::npos ) ) {
1464 _ttype = NUM_DOUBLE;
1467#line 1468 "MDLexer.cpp"
1492 if ( inputState->guessing==0 ) {
1493#line 546 "MDParser.g"
1495#line 1496 "MDLexer.cpp"
1498 if ((LA(1) == 0x58 || LA(1) == 0x78 )) {
1513 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1520 if ((_tokenSet_9.member(LA(1))) && (
true) && (
true)) {
1524 if ( _cnt171>=1 ) {
goto _loop171; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1533 bool synPredMatched176 =
false;
1534 if ((((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (
true) && (
true))) {
1536 synPredMatched176 =
true;
1537 inputState->guessing++;
1543 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1544 matchRange(
'0',
'9');
1547 if ( _cnt174>=1 ) {
goto _loop174; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1555 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1558 else if ((LA(1) == 0x2e )) {
1561 else if ((_tokenSet_8.member(LA(1))) && (
true)) {
1562 mFLOAT_SUFFIX(
false);
1565 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1571 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
1572 synPredMatched176 =
false;
1575 inputState->guessing--;
1577 if ( synPredMatched176 ) {
1581 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1582 matchRange(
'0',
'9');
1585 if ( _cnt178>=1 ) {
goto _loop178; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1593 else if (((LA(1) >= 0x30 && LA(1) <= 0x37 )) && (
true) && (
true)) {
1597 if (((LA(1) >= 0x30 && LA(1) <= 0x37 ))) {
1598 matchRange(
'0',
'7');
1601 if ( _cnt180>=1 ) {
goto _loop180; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1626 matchRange(
'1',
'9');
1630 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1631 matchRange(
'0',
'9');
1640 if ( inputState->guessing==0 ) {
1641#line 563 "MDParser.g"
1643#line 1644 "MDLexer.cpp"
1649 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1654 if ((LA(1) == 0x4c || LA(1) == 0x6c )) {
1669 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1673 if ( inputState->guessing==0 ) {
1674#line 565 "MDParser.g"
1676#line 1677 "MDLexer.cpp"
1679 else if (((_tokenSet_10.member(LA(1))))&&(isDecimal)) {
1681 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1684 if ((_tokenSet_8.member(LA(1)))) {
1685 mFLOAT_SUFFIX(
true);
1687 if ( inputState->guessing==0 ) {
1688#line 570 "MDParser.g"
1690#line 1691 "MDLexer.cpp"
1698 else if ((LA(1) == 0x2e )) {
1702 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1703 matchRange(
'0',
'9');
1713 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1721 if ((_tokenSet_8.member(LA(1)))) {
1722 mFLOAT_SUFFIX(
true);
1724 if ( inputState->guessing==0 ) {
1725#line 569 "MDParser.g"
1727#line 1728 "MDLexer.cpp"
1735 else if ((_tokenSet_8.member(LA(1))) && (
true)) {
1736 mFLOAT_SUFFIX(
true);
1738 if ( inputState->guessing==0 ) {
1739#line 571 "MDParser.g"
1741#line 1742 "MDLexer.cpp"
1745 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1749 if ( inputState->guessing==0 ) {
1750#line 573 "MDParser.g"
1753 (t->getText().find(
'f') != ANTLR_USE_NAMESPACE(std)string::npos ||
1754 t->getText().find(
'F') != ANTLR_USE_NAMESPACE(std)string::npos ) ) {
1758 _ttype = NUM_DOUBLE;
1761#line 1762 "MDLexer.cpp"
1772 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1776 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1777 _token = makeToken(_ttype);
1778 _token->setText(text.substr(_begin, text.length()-_begin));
1780 _returnToken = _token;
1784void MDLexer::mEXPONENT(
bool _createToken) {
1785 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1787 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1813 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1844 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1851 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1852 matchRange(
'0',
'9');
1855 if ( _cnt196>=1 ) {
goto _loop196; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1862 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1863 _token = makeToken(_ttype);
1864 _token->setText(text.substr(_begin, text.length()-_begin));
1866 _returnToken = _token;
1870void MDLexer::mFLOAT_SUFFIX(
bool _createToken) {
1871 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1872 _ttype = FLOAT_SUFFIX;
1873 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1898 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1901 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1902 _token = makeToken(_ttype);
1903 _token->setText(text.substr(_begin, text.length()-_begin));
1905 _returnToken = _token;
1910const unsigned long MDLexer::_tokenSet_0_data_[] = { 4294958079UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1915const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_0(_tokenSet_0_data_,16);
1916const unsigned long MDLexer::_tokenSet_1_data_[] = { 4294958079UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1921const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_1(_tokenSet_1_data_,16);
1922const unsigned long MDLexer::_tokenSet_2_data_[] = { 0UL, 2164195460UL, 268435456UL, 22298694UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1924const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_2(_tokenSet_2_data_,10);
1925const unsigned long MDLexer::_tokenSet_3_data_[] = { 4294958079UL, 4294967291UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1930const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_3(_tokenSet_3_data_,16);
1931const unsigned long MDLexer::_tokenSet_4_data_[] = { 0UL, 67043456UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1933const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_4(_tokenSet_4_data_,10);
1934const unsigned long MDLexer::_tokenSet_5_data_[] = { 4294967295UL, 4294967167UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1939const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_5(_tokenSet_5_data_,16);
1940const unsigned long MDLexer::_tokenSet_6_data_[] = { 0UL, 0UL, 48UL, 48UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1942const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_6(_tokenSet_6_data_,10);
1943const unsigned long MDLexer::_tokenSet_7_data_[] = { 0UL, 67053568UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1945const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_7(_tokenSet_7_data_,10);
1946const unsigned long MDLexer::_tokenSet_8_data_[] = { 0UL, 0UL, 80UL, 80UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1948const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_8(_tokenSet_8_data_,10);
1949const unsigned long MDLexer::_tokenSet_9_data_[] = { 0UL, 67043328UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1951const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_9(_tokenSet_9_data_,10);
1952const unsigned long MDLexer::_tokenSet_10_data_[] = { 0UL, 16384UL, 112UL, 112UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1954const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_10(_tokenSet_10_data_,10);