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"] = 29;
34 literals[
"UreyBradley"] = 33;
35 literals[
"Harmonic"] = 27;
36 literals[
"flucQ"] = 23;
37 literals[
"satellites"] = 20;
38 literals[
"Opls"] = 37;
39 literals[
"cutoffGroup"] = 14;
40 literals[
"RNEMD"] = 24;
41 literals[
"constraint"] = 15;
42 literals[
"Trappe"] = 38;
43 literals[
"distance"] = 16;
44 literals[
"Cosine"] = 34;
45 literals[
"rigidBody"] = 13;
46 literals[
"fragment"] = 17;
47 literals[
"charge"] = 43;
48 literals[
"zconstraint"] = 6;
49 literals[
"minimizer"] = 25;
50 literals[
"Cubic"] = 28;
51 literals[
"component"] = 4;
52 literals[
"GhostBend"] = 32;
53 literals[
"center"] = 19;
54 literals[
"members"] = 18;
55 literals[
"position"] = 21;
56 literals[
"Charmm"] = 36;
57 literals[
"AmberImproper"] = 39;
58 literals[
"Fixed"] = 26;
59 literals[
"Polynomial"] = 30;
60 literals[
"orientation"] = 22;
61 literals[
"bend"] = 10;
62 literals[
"torsion"] = 11;
64 literals[
"molecule"] = 5;
65 literals[
"CentralAtomHeight"] = 41;
66 literals[
"Morse"] = 31;
67 literals[
"restraint"] = 7;
68 literals[
"inversion"] = 12;
70 literals[
"GhostTorsion"] = 35;
71 literals[
"ImproperCosine"] = 40;
72 literals[
"Dreiding"] = 42;
75ANTLR_USE_NAMESPACE(antlr)RefToken MDLexer::nextToken()
77 ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken;
79 ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken;
80 int _ttype = ANTLR_USE_NAMESPACE(antlr)Token::INVALID_TYPE;
87 theRetToken=_returnToken;
93 theRetToken=_returnToken;
99 theRetToken=_returnToken;
105 theRetToken=_returnToken;
111 theRetToken=_returnToken;
117 theRetToken=_returnToken;
123 theRetToken=_returnToken;
129 theRetToken=_returnToken;
135 theRetToken=_returnToken;
141 theRetToken=_returnToken;
147 theRetToken=_returnToken;
158 theRetToken=_returnToken;
163 mPREPROC_DIRECTIVE(
true);
164 theRetToken=_returnToken;
169 mStringLiteral(
true);
170 theRetToken=_returnToken;
176 theRetToken=_returnToken;
234 theRetToken=_returnToken;
252 theRetToken=_returnToken;
256 if ((LA(1) == 0x2f ) && (LA(2) == 0x2a )) {
258 theRetToken=_returnToken;
260 else if ((LA(1) == 0x2f ) && (LA(2) == 0x2f )) {
262 theRetToken=_returnToken;
268 _returnToken = makeToken(ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE);
270 else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
276 _ttype = _returnToken->getType();
277 _returnToken->setType(_ttype);
280 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& e) {
281 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamRecognitionException(e);
283 catch (ANTLR_USE_NAMESPACE(antlr)CharStreamIOException& csie) {
284 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamIOException(csie.io);
286 catch (ANTLR_USE_NAMESPACE(antlr)CharStreamException& cse) {
287 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamException(cse.getMessage());
293void MDLexer::mASSIGNEQUAL(
bool _createToken) {
294 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
295 _ttype = ASSIGNEQUAL;
296 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
299 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
300 _token = makeToken(_ttype);
301 _token->setText(text.substr(_begin, text.length()-_begin));
303 _returnToken = _token;
307void MDLexer::mCOLON(
bool _createToken) {
308 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
310 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
313 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
314 _token = makeToken(_ttype);
315 _token->setText(text.substr(_begin, text.length()-_begin));
317 _returnToken = _token;
321void MDLexer::mCOMMA(
bool _createToken) {
322 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
324 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
327 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
328 _token = makeToken(_ttype);
329 _token->setText(text.substr(_begin, text.length()-_begin));
331 _returnToken = _token;
335void MDLexer::mQUESTIONMARK(
bool _createToken) {
336 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
337 _ttype = QUESTIONMARK;
338 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
341 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
342 _token = makeToken(_ttype);
343 _token->setText(text.substr(_begin, text.length()-_begin));
345 _returnToken = _token;
349void MDLexer::mSEMICOLON(
bool _createToken) {
350 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
352 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
355 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
356 _token = makeToken(_ttype);
357 _token->setText(text.substr(_begin, text.length()-_begin));
359 _returnToken = _token;
363void MDLexer::mLPAREN(
bool _createToken) {
364 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
366 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
369 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
370 _token = makeToken(_ttype);
371 _token->setText(text.substr(_begin, text.length()-_begin));
373 _returnToken = _token;
377void MDLexer::mRPAREN(
bool _createToken) {
378 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
380 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
383 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
384 _token = makeToken(_ttype);
385 _token->setText(text.substr(_begin, text.length()-_begin));
387 _returnToken = _token;
391void MDLexer::mLBRACKET(
bool _createToken) {
392 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
394 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
397 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
398 _token = makeToken(_ttype);
399 _token->setText(text.substr(_begin, text.length()-_begin));
401 _returnToken = _token;
405void MDLexer::mRBRACKET(
bool _createToken) {
406 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
408 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
411 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
412 _token = makeToken(_ttype);
413 _token->setText(text.substr(_begin, text.length()-_begin));
415 _returnToken = _token;
419void MDLexer::mLCURLY(
bool _createToken) {
420 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
422 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
425 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
426 _token = makeToken(_ttype);
427 _token->setText(text.substr(_begin, text.length()-_begin));
429 _returnToken = _token;
433void MDLexer::mRCURLY(
bool _createToken) {
434 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
436 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
439 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
440 _token = makeToken(_ttype);
441 _token->setText(text.substr(_begin, text.length()-_begin));
443 _returnToken = _token;
447void MDLexer::mWhitespace(
bool _createToken) {
448 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
450 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
477 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
487 if ((LA(1) == 0xd ) && (LA(2) == 0xa )) {
491 else if ((LA(1) == 0xd ) && (
true)) {
494 else if ((LA(1) == 0xa )) {
498 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
502 if ( inputState->guessing==0 ) {
503#line 321 "MDParser.g"
505#line 506 "MDLexer.cpp"
512 if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (LA(3) == 0xa )) {
517 else if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (
true)) {
521 else if ((LA(1) == 0x5c ) && (LA(2) == 0xa )) {
526 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
530 if ( inputState->guessing==0 ) {
531#line 326 "MDParser.g"
532 printf(
"CPP_parser.g continuation line detected\n");
534#line 535 "MDLexer.cpp"
540 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
544 if ( inputState->guessing==0 ) {
545#line 329 "MDParser.g"
546 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
547#line 548 "MDLexer.cpp"
549 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
550 _token = makeToken(_ttype);
551 _token->setText(text.substr(_begin, text.length()-_begin));
553 _returnToken = _token;
557void MDLexer::mComment(
bool _createToken) {
558 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
560 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
565 if (((LA(1) == 0x2a ) && ((LA(2) >= 0x0 && LA(2) <= 0xff)) && ((LA(3) >= 0x0 && LA(3) <= 0xff)))&&(LA(2) !=
'/')) {
568 else if ((LA(1) == 0xa || LA(1) == 0xd )) {
570 if ( inputState->guessing==0 ) {
571#line 336 "MDParser.g"
573#line 574 "MDLexer.cpp"
576 else if ((_tokenSet_0.member(LA(1)))) {
589 if ( inputState->guessing==0 ) {
590#line 339 "MDParser.g"
591 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
592#line 593 "MDLexer.cpp"
594 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
595 _token = makeToken(_ttype);
596 _token->setText(text.substr(_begin, text.length()-_begin));
598 _returnToken = _token;
602void MDLexer::mEndOfLine(
bool _createToken) {
603 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
605 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
608 if ((LA(1) == 0xd ) && (LA(2) == 0xa ) && (
true)) {
611 else if ((LA(1) == 0xd ) && (
true) && (
true)) {
614 else if ((LA(1) == 0xa )) {
618 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
622 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
623 _token = makeToken(_ttype);
624 _token->setText(text.substr(_begin, text.length()-_begin));
626 _returnToken = _token;
630void MDLexer::mCPPComment(
bool _createToken) {
631 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
633 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
638 if ((_tokenSet_1.member(LA(1)))) {
651 if ( inputState->guessing==0 ) {
652#line 345 "MDParser.g"
653 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline();
654#line 655 "MDLexer.cpp"
656 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
657 _token = makeToken(_ttype);
658 _token->setText(text.substr(_begin, text.length()-_begin));
660 _returnToken = _token;
664void MDLexer::mPREPROC_DIRECTIVE(
bool _createToken) {
665 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
666 _ttype = PREPROC_DIRECTIVE;
667 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
670 mLineDirective(
false);
671 if ( inputState->guessing==0 ) {
672#line 352 "MDParser.g"
673 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline();
674#line 675 "MDLexer.cpp"
676 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
677 _token = makeToken(_ttype);
678 _token->setText(text.substr(_begin, text.length()-_begin));
680 _returnToken = _token;
684void MDLexer::mLineDirective(
bool _createToken) {
685 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
686 _ttype = LineDirective;
687 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
688 ANTLR_USE_NAMESPACE(antlr)RefToken n;
689 ANTLR_USE_NAMESPACE(antlr)RefToken sl;
691 if ( inputState->guessing==0 ) {
692#line 358 "MDParser.g"
694 deferredLineCount = 0;
696#line 697 "MDLexer.cpp"
713 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
720 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
724 if ( _cnt110>=1 ) {
goto _loop110; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
733 if ( inputState->guessing==0 ) {
734#line 363 "MDParser.g"
735 setLine(OpenMD::lexi_cast<int>(n->getText()) - 1);
736#line 737 "MDLexer.cpp"
741 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
745 if ( _cnt112>=1 ) {
goto _loop112; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
753 mStringLiteral(
true);
756 if ( inputState->guessing==0 ) {
757#line 365 "MDParser.g"
758 std::string filename = sl->getText().substr(1,sl->getText().length()-2); observer->notify(filename);
759#line 760 "MDLexer.cpp"
763 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
767 if ((LA(1) == 0x9 || LA(1) == 0xc || LA(1) == 0x20 )) {
771 if ( _cnt116>=1 ) {
goto _loop116; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
788 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
789 _token = makeToken(_ttype);
790 _token->setText(text.substr(_begin, text.length()-_begin));
792 _returnToken = _token;
796void MDLexer::mSpace(
bool _createToken) {
797 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
799 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
820 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
824 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
825 _token = makeToken(_ttype);
826 _token->setText(text.substr(_begin, text.length()-_begin));
828 _returnToken = _token;
832void MDLexer::mDecimal(
bool _createToken) {
833 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
835 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
840 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
844 if ( _cnt147>=1 ) {
goto _loop147; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
851 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
852 _token = makeToken(_ttype);
853 _token->setText(text.substr(_begin, text.length()-_begin));
855 _returnToken = _token;
859void MDLexer::mStringLiteral(
bool _createToken) {
860 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
861 _ttype = StringLiteral;
862 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
867 if ((LA(1) == 0x5c ) && (_tokenSet_2.member(LA(2)))) {
870 else if ((LA(1) == 0x5c ) && (LA(2) == 0xa || LA(2) == 0xd )) {
872 if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (LA(3) == 0xa )) {
875 else if ((LA(1) == 0x5c ) && (LA(2) == 0xd ) && (_tokenSet_1.member(LA(3)))) {
878 else if ((LA(1) == 0x5c ) && (LA(2) == 0xa )) {
882 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
886 if ( inputState->guessing==0 ) {
887#line 405 "MDParser.g"
889#line 890 "MDLexer.cpp"
892 else if ((_tokenSet_3.member(LA(1)))) {
905 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
906 _token = makeToken(_ttype);
907 _token->setText(text.substr(_begin, text.length()-_begin));
909 _returnToken = _token;
913void MDLexer::mCharLiteral(
bool _createToken) {
914 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
915 _ttype = CharLiteral;
916 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
920 if ((LA(1) == 0x5c ) && (_tokenSet_2.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
923 else if ((_tokenSet_5.member(LA(1))) && (LA(2) == 0x27 ) && (
true)) {
929 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
934 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
935 _token = makeToken(_ttype);
936 _token->setText(text.substr(_begin, text.length()-_begin));
938 _returnToken = _token;
942void MDLexer::mEscape(
bool _createToken) {
943 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
945 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1011 matchRange(
'0',
'3');
1014 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1017 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1020 else if ((_tokenSet_1.member(LA(1))) && (
true) && (
true)) {
1023 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1028 else if ((_tokenSet_1.member(LA(1))) && (
true) && (
true)) {
1031 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1043 matchRange(
'4',
'7');
1046 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1049 else if ((_tokenSet_1.member(LA(1))) && (
true) && (
true)) {
1052 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1064 if (((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1067 else if (((LA(1) >= 0x61 && LA(1) <= 0x66 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1068 matchRange(
'a',
'f');
1070 else if (((LA(1) >= 0x41 && LA(1) <= 0x46 )) && (_tokenSet_1.member(LA(2))) && (
true)) {
1071 matchRange(
'A',
'F');
1074 if ( _cnt138>=1 ) {
goto _loop138; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1085 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1089 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1090 _token = makeToken(_ttype);
1091 _token->setText(text.substr(_begin, text.length()-_begin));
1093 _returnToken = _token;
1097void MDLexer::mDigit(
bool _createToken) {
1098 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1100 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1102 matchRange(
'0',
'9');
1103 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1104 _token = makeToken(_ttype);
1105 _token->setText(text.substr(_begin, text.length()-_begin));
1107 _returnToken = _token;
1111void MDLexer::mVocabulary(
bool _createToken) {
1112 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1113 _ttype = Vocabulary;
1114 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1116 matchRange(
'\3',
static_cast<unsigned char>(
'\377'));
1117 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1118 _token = makeToken(_ttype);
1119 _token->setText(text.substr(_begin, text.length()-_begin));
1121 _returnToken = _token;
1125void MDLexer::mID(
bool _createToken) {
1126 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1128 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1159 matchRange(
'a',
'z');
1189 matchRange(
'A',
'Z');
1199 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1233 matchRange(
'a',
'z');
1263 matchRange(
'A',
'Z');
1282 matchRange(
'0',
'9');
1293 _ttype = testLiteralsTable(_ttype);
1294 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1295 _token = makeToken(_ttype);
1296 _token->setText(text.substr(_begin, text.length()-_begin));
1298 _returnToken = _token;
1302void MDLexer::mHEX_DIGIT(
bool _createToken) {
1303 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1305 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1320 matchRange(
'0',
'9');
1330 matchRange(
'A',
'F');
1340 matchRange(
'a',
'f');
1345 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1349 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1350 _token = makeToken(_ttype);
1351 _token->setText(text.substr(_begin, text.length()-_begin));
1353 _returnToken = _token;
1357void MDLexer::mNUM_INT(
bool _createToken) {
1358 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1360 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1361 ANTLR_USE_NAMESPACE(antlr)RefToken f1;
1362 ANTLR_USE_NAMESPACE(antlr)RefToken f2;
1363 ANTLR_USE_NAMESPACE(antlr)RefToken f3;
1364 ANTLR_USE_NAMESPACE(antlr)RefToken f4;
1365#line 498 "MDParser.g"
1367 bool isDecimal =
false;
1368 ANTLR_USE_NAMESPACE(antlr)RefToken t = ANTLR_USE_NAMESPACE(antlr)nullToken;
1370#line 1371 "MDLexer.cpp"
1400 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1409 if ( inputState->guessing==0 ) {
1410#line 505 "MDParser.g"
1412#line 1413 "MDLexer.cpp"
1415 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1419 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1420 matchRange(
'0',
'9');
1423 if ( _cnt155>=1 ) {
goto _loop155; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1431 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1439 if ((_tokenSet_8.member(LA(1)))) {
1440 mFLOAT_SUFFIX(
true);
1442 if ( inputState->guessing==0 ) {
1443#line 506 "MDParser.g"
1445#line 1446 "MDLexer.cpp"
1452 if ( inputState->guessing==0 ) {
1453#line 507 "MDParser.g"
1456 (t->getText().find(
'f') != ANTLR_USE_NAMESPACE(std)string::npos ||
1457 t->getText().find(
'F') != ANTLR_USE_NAMESPACE(std)string::npos ) ) {
1461 _ttype = NUM_DOUBLE;
1464#line 1465 "MDLexer.cpp"
1489 if ( inputState->guessing==0 ) {
1490#line 519 "MDParser.g"
1492#line 1493 "MDLexer.cpp"
1495 if ((LA(1) == 0x58 || LA(1) == 0x78 )) {
1510 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1517 if ((_tokenSet_9.member(LA(1))) && (
true) && (
true)) {
1521 if ( _cnt162>=1 ) {
goto _loop162; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1530 bool synPredMatched167 =
false;
1531 if ((((LA(1) >= 0x30 && LA(1) <= 0x39 )) && (
true) && (
true))) {
1533 synPredMatched167 =
true;
1534 inputState->guessing++;
1540 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1541 matchRange(
'0',
'9');
1544 if ( _cnt165>=1 ) {
goto _loop165; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1552 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1555 else if ((LA(1) == 0x2e )) {
1558 else if ((_tokenSet_8.member(LA(1))) && (
true)) {
1559 mFLOAT_SUFFIX(
false);
1562 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1568 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
1569 synPredMatched167 =
false;
1572 inputState->guessing--;
1574 if ( synPredMatched167 ) {
1578 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1579 matchRange(
'0',
'9');
1582 if ( _cnt169>=1 ) {
goto _loop169; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1590 else if (((LA(1) >= 0x30 && LA(1) <= 0x37 )) && (
true) && (
true)) {
1594 if (((LA(1) >= 0x30 && LA(1) <= 0x37 ))) {
1595 matchRange(
'0',
'7');
1598 if ( _cnt171>=1 ) {
goto _loop171; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1623 matchRange(
'1',
'9');
1627 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1628 matchRange(
'0',
'9');
1637 if ( inputState->guessing==0 ) {
1638#line 536 "MDParser.g"
1640#line 1641 "MDLexer.cpp"
1646 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1651 if ((LA(1) == 0x4c || LA(1) == 0x6c )) {
1666 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1670 if ( inputState->guessing==0 ) {
1671#line 538 "MDParser.g"
1673#line 1674 "MDLexer.cpp"
1676 else if (((_tokenSet_10.member(LA(1))))&&(isDecimal)) {
1678 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1681 if ((_tokenSet_8.member(LA(1)))) {
1682 mFLOAT_SUFFIX(
true);
1684 if ( inputState->guessing==0 ) {
1685#line 543 "MDParser.g"
1687#line 1688 "MDLexer.cpp"
1695 else if ((LA(1) == 0x2e )) {
1699 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1700 matchRange(
'0',
'9');
1710 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1718 if ((_tokenSet_8.member(LA(1)))) {
1719 mFLOAT_SUFFIX(
true);
1721 if ( inputState->guessing==0 ) {
1722#line 542 "MDParser.g"
1724#line 1725 "MDLexer.cpp"
1732 else if ((_tokenSet_8.member(LA(1))) && (
true)) {
1733 mFLOAT_SUFFIX(
true);
1735 if ( inputState->guessing==0 ) {
1736#line 544 "MDParser.g"
1738#line 1739 "MDLexer.cpp"
1742 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1746 if ( inputState->guessing==0 ) {
1747#line 546 "MDParser.g"
1750 (t->getText().find(
'f') != ANTLR_USE_NAMESPACE(std)string::npos ||
1751 t->getText().find(
'F') != ANTLR_USE_NAMESPACE(std)string::npos ) ) {
1755 _ttype = NUM_DOUBLE;
1758#line 1759 "MDLexer.cpp"
1769 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1773 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1774 _token = makeToken(_ttype);
1775 _token->setText(text.substr(_begin, text.length()-_begin));
1777 _returnToken = _token;
1781void MDLexer::mEXPONENT(
bool _createToken) {
1782 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1784 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1810 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1841 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1848 if (((LA(1) >= 0x30 && LA(1) <= 0x39 ))) {
1849 matchRange(
'0',
'9');
1852 if ( _cnt187>=1 ) {
goto _loop187; }
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1859 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1860 _token = makeToken(_ttype);
1861 _token->setText(text.substr(_begin, text.length()-_begin));
1863 _returnToken = _token;
1867void MDLexer::mFLOAT_SUFFIX(
bool _createToken) {
1868 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1869 _ttype = FLOAT_SUFFIX;
1870 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1895 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1898 if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
1899 _token = makeToken(_ttype);
1900 _token->setText(text.substr(_begin, text.length()-_begin));
1902 _returnToken = _token;
1907const unsigned long MDLexer::_tokenSet_0_data_[] = { 4294958079UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1912const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_0(_tokenSet_0_data_,16);
1913const unsigned long MDLexer::_tokenSet_1_data_[] = { 4294958079UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1918const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_1(_tokenSet_1_data_,16);
1919const unsigned long MDLexer::_tokenSet_2_data_[] = { 0UL, 2164195460UL, 268435456UL, 22298694UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1921const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_2(_tokenSet_2_data_,10);
1922const unsigned long MDLexer::_tokenSet_3_data_[] = { 4294958079UL, 4294967291UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1927const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_3(_tokenSet_3_data_,16);
1928const unsigned long MDLexer::_tokenSet_4_data_[] = { 0UL, 67043456UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1930const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_4(_tokenSet_4_data_,10);
1931const unsigned long MDLexer::_tokenSet_5_data_[] = { 4294967295UL, 4294967167UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1936const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_5(_tokenSet_5_data_,16);
1937const unsigned long MDLexer::_tokenSet_6_data_[] = { 0UL, 0UL, 48UL, 48UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1939const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_6(_tokenSet_6_data_,10);
1940const unsigned long MDLexer::_tokenSet_7_data_[] = { 0UL, 67053568UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1942const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_7(_tokenSet_7_data_,10);
1943const unsigned long MDLexer::_tokenSet_8_data_[] = { 0UL, 0UL, 80UL, 80UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1945const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_8(_tokenSet_8_data_,10);
1946const unsigned long MDLexer::_tokenSet_9_data_[] = { 0UL, 67043328UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1948const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_9(_tokenSet_9_data_,10);
1949const unsigned long MDLexer::_tokenSet_10_data_[] = { 0UL, 16384UL, 112UL, 112UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1951const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_10(_tokenSet_10_data_,10);