OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
MDLexer.cpp
1/* $ANTLR 2.7.7 (2006-11-01): "MDParser.g" -> "MDLexer.cpp"$ */
2#include "MDLexer.hpp"
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>
10
11#line 1 "MDParser.g"
12#line 13 "MDLexer.cpp"
13MDLexer::MDLexer(ANTLR_USE_NAMESPACE(std)istream& in)
14 : ANTLR_USE_NAMESPACE(antlr)CharScanner(new ANTLR_USE_NAMESPACE(antlr)CharBuffer(in),true)
15{
16 initLiterals();
17}
18
19MDLexer::MDLexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib)
20 : ANTLR_USE_NAMESPACE(antlr)CharScanner(ib,true)
21{
22 initLiterals();
23}
24
25MDLexer::MDLexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state)
26 : ANTLR_USE_NAMESPACE(antlr)CharScanner(state,true)
27{
28 initLiterals();
29}
30
31void MDLexer::initLiterals()
32{
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;
65 literals["atom"] = 8;
66 literals["molecule"] = 5;
67 literals["nodes"] = 46;
68 literals["CentralAtomHeight"] = 43;
69 literals["Morse"] = 33;
70 literals["restraint"] = 7;
71 literals["inversion"] = 12;
72 literals["bond"] = 9;
73 literals["GhostTorsion"] = 37;
74 literals["ImproperCosine"] = 42;
75 literals["Dreiding"] = 44;
76}
77
78ANTLR_USE_NAMESPACE(antlr)RefToken MDLexer::nextToken()
79{
80 ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken;
81 for (;;) {
82 ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken;
83 int _ttype = ANTLR_USE_NAMESPACE(antlr)Token::INVALID_TYPE;
84 resetText();
85 try { // for lexical and char stream error handling
86 switch ( LA(1)) {
87 case 0x3d /* '=' */ :
88 {
89 mASSIGNEQUAL(true);
90 theRetToken=_returnToken;
91 break;
92 }
93 case 0x3a /* ':' */ :
94 {
95 mCOLON(true);
96 theRetToken=_returnToken;
97 break;
98 }
99 case 0x2c /* ',' */ :
100 {
101 mCOMMA(true);
102 theRetToken=_returnToken;
103 break;
104 }
105 case 0x3f /* '?' */ :
106 {
107 mQUESTIONMARK(true);
108 theRetToken=_returnToken;
109 break;
110 }
111 case 0x3b /* ';' */ :
112 {
113 mSEMICOLON(true);
114 theRetToken=_returnToken;
115 break;
116 }
117 case 0x28 /* '(' */ :
118 {
119 mLPAREN(true);
120 theRetToken=_returnToken;
121 break;
122 }
123 case 0x29 /* ')' */ :
124 {
125 mRPAREN(true);
126 theRetToken=_returnToken;
127 break;
128 }
129 case 0x5b /* '[' */ :
130 {
131 mLBRACKET(true);
132 theRetToken=_returnToken;
133 break;
134 }
135 case 0x5d /* ']' */ :
136 {
137 mRBRACKET(true);
138 theRetToken=_returnToken;
139 break;
140 }
141 case 0x7b /* '{' */ :
142 {
143 mLCURLY(true);
144 theRetToken=_returnToken;
145 break;
146 }
147 case 0x7d /* '}' */ :
148 {
149 mRCURLY(true);
150 theRetToken=_returnToken;
151 break;
152 }
153 case 0x9 /* '\t' */ :
154 case 0xa /* '\n' */ :
155 case 0xc /* '\14' */ :
156 case 0xd /* '\r' */ :
157 case 0x20 /* ' ' */ :
158 case 0x5c /* '\\' */ :
159 {
160 mWhitespace(true);
161 theRetToken=_returnToken;
162 break;
163 }
164 case 0x23 /* '#' */ :
165 {
166 mPREPROC_DIRECTIVE(true);
167 theRetToken=_returnToken;
168 break;
169 }
170 case 0x22 /* '\"' */ :
171 {
172 mStringLiteral(true);
173 theRetToken=_returnToken;
174 break;
175 }
176 case 0x27 /* '\'' */ :
177 {
178 mCharLiteral(true);
179 theRetToken=_returnToken;
180 break;
181 }
182 case 0x41 /* 'A' */ :
183 case 0x42 /* 'B' */ :
184 case 0x43 /* 'C' */ :
185 case 0x44 /* 'D' */ :
186 case 0x45 /* 'E' */ :
187 case 0x46 /* 'F' */ :
188 case 0x47 /* 'G' */ :
189 case 0x48 /* 'H' */ :
190 case 0x49 /* 'I' */ :
191 case 0x4a /* 'J' */ :
192 case 0x4b /* 'K' */ :
193 case 0x4c /* 'L' */ :
194 case 0x4d /* 'M' */ :
195 case 0x4e /* 'N' */ :
196 case 0x4f /* 'O' */ :
197 case 0x50 /* 'P' */ :
198 case 0x51 /* 'Q' */ :
199 case 0x52 /* 'R' */ :
200 case 0x53 /* 'S' */ :
201 case 0x54 /* 'T' */ :
202 case 0x55 /* 'U' */ :
203 case 0x56 /* 'V' */ :
204 case 0x57 /* 'W' */ :
205 case 0x58 /* 'X' */ :
206 case 0x59 /* 'Y' */ :
207 case 0x5a /* 'Z' */ :
208 case 0x5f /* '_' */ :
209 case 0x61 /* 'a' */ :
210 case 0x62 /* 'b' */ :
211 case 0x63 /* 'c' */ :
212 case 0x64 /* 'd' */ :
213 case 0x65 /* 'e' */ :
214 case 0x66 /* 'f' */ :
215 case 0x67 /* 'g' */ :
216 case 0x68 /* 'h' */ :
217 case 0x69 /* 'i' */ :
218 case 0x6a /* 'j' */ :
219 case 0x6b /* 'k' */ :
220 case 0x6c /* 'l' */ :
221 case 0x6d /* 'm' */ :
222 case 0x6e /* 'n' */ :
223 case 0x6f /* 'o' */ :
224 case 0x70 /* 'p' */ :
225 case 0x71 /* 'q' */ :
226 case 0x72 /* 'r' */ :
227 case 0x73 /* 's' */ :
228 case 0x74 /* 't' */ :
229 case 0x75 /* 'u' */ :
230 case 0x76 /* 'v' */ :
231 case 0x77 /* 'w' */ :
232 case 0x78 /* 'x' */ :
233 case 0x79 /* 'y' */ :
234 case 0x7a /* 'z' */ :
235 {
236 mID(true);
237 theRetToken=_returnToken;
238 break;
239 }
240 case 0x2b /* '+' */ :
241 case 0x2d /* '-' */ :
242 case 0x2e /* '.' */ :
243 case 0x30 /* '0' */ :
244 case 0x31 /* '1' */ :
245 case 0x32 /* '2' */ :
246 case 0x33 /* '3' */ :
247 case 0x34 /* '4' */ :
248 case 0x35 /* '5' */ :
249 case 0x36 /* '6' */ :
250 case 0x37 /* '7' */ :
251 case 0x38 /* '8' */ :
252 case 0x39 /* '9' */ :
253 {
254 mNUM_INT(true);
255 theRetToken=_returnToken;
256 break;
257 }
258 default:
259 if ((LA(1) == 0x2f /* '/' */ ) && (LA(2) == 0x2a /* '*' */ )) {
260 mComment(true);
261 theRetToken=_returnToken;
262 }
263 else if ((LA(1) == 0x2f /* '/' */ ) && (LA(2) == 0x2f /* '/' */ )) {
264 mCPPComment(true);
265 theRetToken=_returnToken;
266 }
267 else {
268 if (LA(1)==EOF_CHAR)
269 {
270 uponEOF();
271 _returnToken = makeToken(ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE);
272 }
273 else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
274 }
275 }
276 if ( !_returnToken )
277 goto tryAgain; // found SKIP token
278
279 _ttype = _returnToken->getType();
280 _returnToken->setType(_ttype);
281 return _returnToken;
282 }
283 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& e) {
284 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamRecognitionException(e);
285 }
286 catch (ANTLR_USE_NAMESPACE(antlr)CharStreamIOException& csie) {
287 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamIOException(csie.io);
288 }
289 catch (ANTLR_USE_NAMESPACE(antlr)CharStreamException& cse) {
290 throw ANTLR_USE_NAMESPACE(antlr)TokenStreamException(cse.getMessage());
291 }
292tryAgain:;
293 }
294}
295
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;
300
301 match('=' /* charlit */ );
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));
305 }
306 _returnToken = _token;
307 _saveIndex=0;
308}
309
310void MDLexer::mCOLON(bool _createToken) {
311 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
312 _ttype = COLON;
313 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
314
315 match(':' /* charlit */ );
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));
319 }
320 _returnToken = _token;
321 _saveIndex=0;
322}
323
324void MDLexer::mCOMMA(bool _createToken) {
325 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
326 _ttype = COMMA;
327 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
328
329 match(',' /* charlit */ );
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));
333 }
334 _returnToken = _token;
335 _saveIndex=0;
336}
337
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;
342
343 match('?' /* charlit */ );
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));
347 }
348 _returnToken = _token;
349 _saveIndex=0;
350}
351
352void MDLexer::mSEMICOLON(bool _createToken) {
353 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
354 _ttype = SEMICOLON;
355 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
356
357 match(';' /* charlit */ );
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));
361 }
362 _returnToken = _token;
363 _saveIndex=0;
364}
365
366void MDLexer::mLPAREN(bool _createToken) {
367 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
368 _ttype = LPAREN;
369 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
370
371 match('(' /* charlit */ );
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));
375 }
376 _returnToken = _token;
377 _saveIndex=0;
378}
379
380void MDLexer::mRPAREN(bool _createToken) {
381 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
382 _ttype = RPAREN;
383 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
384
385 match(')' /* charlit */ );
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));
389 }
390 _returnToken = _token;
391 _saveIndex=0;
392}
393
394void MDLexer::mLBRACKET(bool _createToken) {
395 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
396 _ttype = LBRACKET;
397 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
398
399 match('[' /* charlit */ );
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));
403 }
404 _returnToken = _token;
405 _saveIndex=0;
406}
407
408void MDLexer::mRBRACKET(bool _createToken) {
409 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
410 _ttype = RBRACKET;
411 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
412
413 match(']' /* charlit */ );
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));
417 }
418 _returnToken = _token;
419 _saveIndex=0;
420}
421
422void MDLexer::mLCURLY(bool _createToken) {
423 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
424 _ttype = LCURLY;
425 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
426
427 match('{' /* charlit */ );
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));
431 }
432 _returnToken = _token;
433 _saveIndex=0;
434}
435
436void MDLexer::mRCURLY(bool _createToken) {
437 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
438 _ttype = RCURLY;
439 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
440
441 match('}' /* charlit */ );
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));
445 }
446 _returnToken = _token;
447 _saveIndex=0;
448}
449
450void MDLexer::mWhitespace(bool _createToken) {
451 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
452 _ttype = Whitespace;
453 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
454
455 {
456 switch ( LA(1)) {
457 case 0x9 /* '\t' */ :
458 case 0xc /* '\14' */ :
459 case 0x20 /* ' ' */ :
460 {
461 {
462 switch ( LA(1)) {
463 case 0x20 /* ' ' */ :
464 {
465 match(' ' /* charlit */ );
466 break;
467 }
468 case 0x9 /* '\t' */ :
469 {
470 match('\t' /* charlit */ );
471 break;
472 }
473 case 0xc /* '\14' */ :
474 {
475 match('\14' /* charlit */ );
476 break;
477 }
478 default:
479 {
480 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
481 }
482 }
483 }
484 break;
485 }
486 case 0xa /* '\n' */ :
487 case 0xd /* '\r' */ :
488 {
489 {
490 if ((LA(1) == 0xd /* '\r' */ ) && (LA(2) == 0xa /* '\n' */ )) {
491 match('\r' /* charlit */ );
492 match('\n' /* charlit */ );
493 }
494 else if ((LA(1) == 0xd /* '\r' */ ) && (true)) {
495 match('\r' /* charlit */ );
496 }
497 else if ((LA(1) == 0xa /* '\n' */ )) {
498 match('\n' /* charlit */ );
499 }
500 else {
501 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
502 }
503
504 }
505 if ( inputState->guessing==0 ) {
506#line 348 "MDParser.g"
507 newline();
508#line 509 "MDLexer.cpp"
509 }
510 break;
511 }
512 case 0x5c /* '\\' */ :
513 {
514 {
515 if ((LA(1) == 0x5c /* '\\' */ ) && (LA(2) == 0xd /* '\r' */ ) && (LA(3) == 0xa /* '\n' */ )) {
516 match('\\' /* charlit */ );
517 match('\r' /* charlit */ );
518 match('\n' /* charlit */ );
519 }
520 else if ((LA(1) == 0x5c /* '\\' */ ) && (LA(2) == 0xd /* '\r' */ ) && (true)) {
521 match('\\' /* charlit */ );
522 match('\r' /* charlit */ );
523 }
524 else if ((LA(1) == 0x5c /* '\\' */ ) && (LA(2) == 0xa /* '\n' */ )) {
525 match('\\' /* charlit */ );
526 match('\n' /* charlit */ );
527 }
528 else {
529 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
530 }
531
532 }
533 if ( inputState->guessing==0 ) {
534#line 353 "MDParser.g"
535 printf("CPP_parser.g continuation line detected\n");
536 deferredNewline();
537#line 538 "MDLexer.cpp"
538 }
539 break;
540 }
541 default:
542 {
543 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
544 }
545 }
546 }
547 if ( inputState->guessing==0 ) {
548#line 356 "MDParser.g"
549 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
550#line 551 "MDLexer.cpp"
551 }
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));
555 }
556 _returnToken = _token;
557 _saveIndex=0;
558}
559
560void MDLexer::mComment(bool _createToken) {
561 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
562 _ttype = Comment;
563 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
564
565 match("/*");
566 { // ( ... )*
567 for (;;) {
568 if (((LA(1) == 0x2a /* '*' */ ) && ((LA(2) >= 0x0 /* '\0' */ && LA(2) <= 0xff)) && ((LA(3) >= 0x0 /* '\0' */ && LA(3) <= 0xff)))&&(LA(2) != '/')) {
569 match('*' /* charlit */ );
570 }
571 else if ((LA(1) == 0xa /* '\n' */ || LA(1) == 0xd /* '\r' */ )) {
572 mEndOfLine(false);
573 if ( inputState->guessing==0 ) {
574#line 363 "MDParser.g"
575 deferredNewline();
576#line 577 "MDLexer.cpp"
577 }
578 }
579 else if ((_tokenSet_0.member(LA(1)))) {
580 {
581 match(_tokenSet_0);
582 }
583 }
584 else {
585 goto _loop110;
586 }
587
588 }
589 _loop110:;
590 } // ( ... )*
591 match("*/");
592 if ( inputState->guessing==0 ) {
593#line 366 "MDParser.g"
594 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
595#line 596 "MDLexer.cpp"
596 }
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));
600 }
601 _returnToken = _token;
602 _saveIndex=0;
603}
604
605void MDLexer::mEndOfLine(bool _createToken) {
606 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
607 _ttype = EndOfLine;
608 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
609
610 {
611 if ((LA(1) == 0xd /* '\r' */ ) && (LA(2) == 0xa /* '\n' */ ) && (true)) {
612 match("\r\n");
613 }
614 else if ((LA(1) == 0xd /* '\r' */ ) && (true) && (true)) {
615 match('\r' /* charlit */ );
616 }
617 else if ((LA(1) == 0xa /* '\n' */ )) {
618 match('\n' /* charlit */ );
619 }
620 else {
621 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
622 }
623
624 }
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));
628 }
629 _returnToken = _token;
630 _saveIndex=0;
631}
632
633void MDLexer::mCPPComment(bool _createToken) {
634 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
635 _ttype = CPPComment;
636 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
637
638 match("//");
639 { // ( ... )*
640 for (;;) {
641 if ((_tokenSet_1.member(LA(1)))) {
642 {
643 match(_tokenSet_1);
644 }
645 }
646 else {
647 goto _loop114;
648 }
649
650 }
651 _loop114:;
652 } // ( ... )*
653 mEndOfLine(false);
654 if ( inputState->guessing==0 ) {
655#line 372 "MDParser.g"
656 _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline();
657#line 658 "MDLexer.cpp"
658 }
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));
662 }
663 _returnToken = _token;
664 _saveIndex=0;
665}
666
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;
671
672 match('#' /* charlit */ );
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"
678 }
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));
682 }
683 _returnToken = _token;
684 _saveIndex=0;
685}
686
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;
693
694 if ( inputState->guessing==0 ) {
695#line 385 "MDParser.g"
696
697 deferredLineCount = 0;
698
699#line 700 "MDLexer.cpp"
700 }
701 {
702 switch ( LA(1)) {
703 case 0x6c /* 'l' */ :
704 {
705 match("line");
706 break;
707 }
708 case 0x9 /* '\t' */ :
709 case 0xc /* '\14' */ :
710 case 0x20 /* ' ' */ :
711 {
712 break;
713 }
714 default:
715 {
716 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
717 }
718 }
719 }
720 { // ( ... )+
721 int _cnt119=0;
722 for (;;) {
723 if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) {
724 mSpace(false);
725 }
726 else {
727 if ( _cnt119>=1 ) { goto _loop119; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
728 }
729
730 _cnt119++;
731 }
732 _loop119:;
733 } // ( ... )+
734 mDecimal(true);
735 n=_returnToken;
736 if ( inputState->guessing==0 ) {
737#line 390 "MDParser.g"
738 setLine(OpenMD::lexi_cast<int>(n->getText()) - 1);
739#line 740 "MDLexer.cpp"
740 }
741 { // ( ... )+
742 int _cnt121=0;
743 for (;;) {
744 if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) {
745 mSpace(false);
746 }
747 else {
748 if ( _cnt121>=1 ) { goto _loop121; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
749 }
750
751 _cnt121++;
752 }
753 _loop121:;
754 } // ( ... )+
755 {
756 mStringLiteral(true);
757 sl=_returnToken;
758 }
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"
763 }
764 { // ( ... )*
765 for (;;) {
766 if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) {
767 { // ( ... )+
768 int _cnt125=0;
769 for (;;) {
770 if ((LA(1) == 0x9 /* '\t' */ || LA(1) == 0xc /* '\14' */ || LA(1) == 0x20 /* ' ' */ )) {
771 mSpace(false);
772 }
773 else {
774 if ( _cnt125>=1 ) { goto _loop125; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
775 }
776
777 _cnt125++;
778 }
779 _loop125:;
780 } // ( ... )+
781 mDecimal(false);
782 }
783 else {
784 goto _loop126;
785 }
786
787 }
788 _loop126:;
789 } // ( ... )*
790 mEndOfLine(false);
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));
794 }
795 _returnToken = _token;
796 _saveIndex=0;
797}
798
799void MDLexer::mSpace(bool _createToken) {
800 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
801 _ttype = Space;
802 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
803
804 {
805 switch ( LA(1)) {
806 case 0x20 /* ' ' */ :
807 {
808 match(' ' /* charlit */ );
809 break;
810 }
811 case 0x9 /* '\t' */ :
812 {
813 match('\t' /* charlit */ );
814 break;
815 }
816 case 0xc /* '\14' */ :
817 {
818 match('\14' /* charlit */ );
819 break;
820 }
821 default:
822 {
823 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
824 }
825 }
826 }
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));
830 }
831 _returnToken = _token;
832 _saveIndex=0;
833}
834
835void MDLexer::mDecimal(bool _createToken) {
836 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
837 _ttype = Decimal;
838 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
839
840 { // ( ... )+
841 int _cnt156=0;
842 for (;;) {
843 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
844 matchRange('0','9');
845 }
846 else {
847 if ( _cnt156>=1 ) { goto _loop156; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
848 }
849
850 _cnt156++;
851 }
852 _loop156:;
853 } // ( ... )+
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));
857 }
858 _returnToken = _token;
859 _saveIndex=0;
860}
861
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;
866
867 match('\"' /* charlit */ );
868 { // ( ... )*
869 for (;;) {
870 if ((LA(1) == 0x5c /* '\\' */ ) && (_tokenSet_2.member(LA(2)))) {
871 mEscape(false);
872 }
873 else if ((LA(1) == 0x5c /* '\\' */ ) && (LA(2) == 0xa /* '\n' */ || LA(2) == 0xd /* '\r' */ )) {
874 {
875 if ((LA(1) == 0x5c /* '\\' */ ) && (LA(2) == 0xd /* '\r' */ ) && (LA(3) == 0xa /* '\n' */ )) {
876 match("\\\r\n");
877 }
878 else if ((LA(1) == 0x5c /* '\\' */ ) && (LA(2) == 0xd /* '\r' */ ) && (_tokenSet_1.member(LA(3)))) {
879 match("\\\r");
880 }
881 else if ((LA(1) == 0x5c /* '\\' */ ) && (LA(2) == 0xa /* '\n' */ )) {
882 match("\\\n");
883 }
884 else {
885 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
886 }
887
888 }
889 if ( inputState->guessing==0 ) {
890#line 432 "MDParser.g"
891 deferredNewline();
892#line 893 "MDLexer.cpp"
893 }
894 }
895 else if ((_tokenSet_3.member(LA(1)))) {
896 {
897 match(_tokenSet_3);
898 }
899 }
900 else {
901 goto _loop136;
902 }
903
904 }
905 _loop136:;
906 } // ( ... )*
907 match('\"' /* charlit */ );
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));
911 }
912 _returnToken = _token;
913 _saveIndex=0;
914}
915
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;
920
921 match('\'' /* charlit */ );
922 {
923 if ((LA(1) == 0x5c /* '\\' */ ) && (_tokenSet_2.member(LA(2))) && (_tokenSet_4.member(LA(3)))) {
924 mEscape(false);
925 }
926 else if ((_tokenSet_5.member(LA(1))) && (LA(2) == 0x27 /* '\'' */ ) && (true)) {
927 {
928 match(_tokenSet_5);
929 }
930 }
931 else {
932 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
933 }
934
935 }
936 match('\'' /* charlit */ );
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));
940 }
941 _returnToken = _token;
942 _saveIndex=0;
943}
944
945void MDLexer::mEscape(bool _createToken) {
946 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
947 _ttype = Escape;
948 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
949
950 match('\\' /* charlit */ );
951 {
952 switch ( LA(1)) {
953 case 0x61 /* 'a' */ :
954 {
955 match('a' /* charlit */ );
956 break;
957 }
958 case 0x62 /* 'b' */ :
959 {
960 match('b' /* charlit */ );
961 break;
962 }
963 case 0x66 /* 'f' */ :
964 {
965 match('f' /* charlit */ );
966 break;
967 }
968 case 0x6e /* 'n' */ :
969 {
970 match('n' /* charlit */ );
971 break;
972 }
973 case 0x72 /* 'r' */ :
974 {
975 match('r' /* charlit */ );
976 break;
977 }
978 case 0x74 /* 't' */ :
979 {
980 match('t' /* charlit */ );
981 break;
982 }
983 case 0x76 /* 'v' */ :
984 {
985 match('v' /* charlit */ );
986 break;
987 }
988 case 0x22 /* '\"' */ :
989 {
990 match('\"' /* charlit */ );
991 break;
992 }
993 case 0x27 /* '\'' */ :
994 {
995 match('\'' /* charlit */ );
996 break;
997 }
998 case 0x5c /* '\\' */ :
999 {
1000 match('\\' /* charlit */ );
1001 break;
1002 }
1003 case 0x3f /* '?' */ :
1004 {
1005 match('?' /* charlit */ );
1006 break;
1007 }
1008 case 0x30 /* '0' */ :
1009 case 0x31 /* '1' */ :
1010 case 0x32 /* '2' */ :
1011 case 0x33 /* '3' */ :
1012 {
1013 {
1014 matchRange('0','3');
1015 }
1016 {
1017 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_1.member(LA(2))) && (true)) {
1018 mDigit(false);
1019 {
1020 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_1.member(LA(2))) && (true)) {
1021 mDigit(false);
1022 }
1023 else if ((_tokenSet_1.member(LA(1))) && (true) && (true)) {
1024 }
1025 else {
1026 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1027 }
1028
1029 }
1030 }
1031 else if ((_tokenSet_1.member(LA(1))) && (true) && (true)) {
1032 }
1033 else {
1034 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1035 }
1036
1037 }
1038 break;
1039 }
1040 case 0x34 /* '4' */ :
1041 case 0x35 /* '5' */ :
1042 case 0x36 /* '6' */ :
1043 case 0x37 /* '7' */ :
1044 {
1045 {
1046 matchRange('4','7');
1047 }
1048 {
1049 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_1.member(LA(2))) && (true)) {
1050 mDigit(false);
1051 }
1052 else if ((_tokenSet_1.member(LA(1))) && (true) && (true)) {
1053 }
1054 else {
1055 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1056 }
1057
1058 }
1059 break;
1060 }
1061 case 0x78 /* 'x' */ :
1062 {
1063 match('x' /* charlit */ );
1064 { // ( ... )+
1065 int _cnt147=0;
1066 for (;;) {
1067 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_1.member(LA(2))) && (true)) {
1068 mDigit(false);
1069 }
1070 else if (((LA(1) >= 0x61 /* 'a' */ && LA(1) <= 0x66 /* 'f' */ )) && (_tokenSet_1.member(LA(2))) && (true)) {
1071 matchRange('a','f');
1072 }
1073 else if (((LA(1) >= 0x41 /* 'A' */ && LA(1) <= 0x46 /* 'F' */ )) && (_tokenSet_1.member(LA(2))) && (true)) {
1074 matchRange('A','F');
1075 }
1076 else {
1077 if ( _cnt147>=1 ) { goto _loop147; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1078 }
1079
1080 _cnt147++;
1081 }
1082 _loop147:;
1083 } // ( ... )+
1084 break;
1085 }
1086 default:
1087 {
1088 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1089 }
1090 }
1091 }
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));
1095 }
1096 _returnToken = _token;
1097 _saveIndex=0;
1098}
1099
1100void MDLexer::mDigit(bool _createToken) {
1101 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1102 _ttype = Digit;
1103 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1104
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));
1109 }
1110 _returnToken = _token;
1111 _saveIndex=0;
1112}
1113
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;
1118
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));
1123 }
1124 _returnToken = _token;
1125 _saveIndex=0;
1126}
1127
1128void MDLexer::mID(bool _createToken) {
1129 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1130 _ttype = ID;
1131 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1132
1133 {
1134 switch ( LA(1)) {
1135 case 0x61 /* 'a' */ :
1136 case 0x62 /* 'b' */ :
1137 case 0x63 /* 'c' */ :
1138 case 0x64 /* 'd' */ :
1139 case 0x65 /* 'e' */ :
1140 case 0x66 /* 'f' */ :
1141 case 0x67 /* 'g' */ :
1142 case 0x68 /* 'h' */ :
1143 case 0x69 /* 'i' */ :
1144 case 0x6a /* 'j' */ :
1145 case 0x6b /* 'k' */ :
1146 case 0x6c /* 'l' */ :
1147 case 0x6d /* 'm' */ :
1148 case 0x6e /* 'n' */ :
1149 case 0x6f /* 'o' */ :
1150 case 0x70 /* 'p' */ :
1151 case 0x71 /* 'q' */ :
1152 case 0x72 /* 'r' */ :
1153 case 0x73 /* 's' */ :
1154 case 0x74 /* 't' */ :
1155 case 0x75 /* 'u' */ :
1156 case 0x76 /* 'v' */ :
1157 case 0x77 /* 'w' */ :
1158 case 0x78 /* 'x' */ :
1159 case 0x79 /* 'y' */ :
1160 case 0x7a /* 'z' */ :
1161 {
1162 matchRange('a','z');
1163 break;
1164 }
1165 case 0x41 /* 'A' */ :
1166 case 0x42 /* 'B' */ :
1167 case 0x43 /* 'C' */ :
1168 case 0x44 /* 'D' */ :
1169 case 0x45 /* 'E' */ :
1170 case 0x46 /* 'F' */ :
1171 case 0x47 /* 'G' */ :
1172 case 0x48 /* 'H' */ :
1173 case 0x49 /* 'I' */ :
1174 case 0x4a /* 'J' */ :
1175 case 0x4b /* 'K' */ :
1176 case 0x4c /* 'L' */ :
1177 case 0x4d /* 'M' */ :
1178 case 0x4e /* 'N' */ :
1179 case 0x4f /* 'O' */ :
1180 case 0x50 /* 'P' */ :
1181 case 0x51 /* 'Q' */ :
1182 case 0x52 /* 'R' */ :
1183 case 0x53 /* 'S' */ :
1184 case 0x54 /* 'T' */ :
1185 case 0x55 /* 'U' */ :
1186 case 0x56 /* 'V' */ :
1187 case 0x57 /* 'W' */ :
1188 case 0x58 /* 'X' */ :
1189 case 0x59 /* 'Y' */ :
1190 case 0x5a /* 'Z' */ :
1191 {
1192 matchRange('A','Z');
1193 break;
1194 }
1195 case 0x5f /* '_' */ :
1196 {
1197 match('_' /* charlit */ );
1198 break;
1199 }
1200 default:
1201 {
1202 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1203 }
1204 }
1205 }
1206 { // ( ... )*
1207 for (;;) {
1208 switch ( LA(1)) {
1209 case 0x61 /* 'a' */ :
1210 case 0x62 /* 'b' */ :
1211 case 0x63 /* 'c' */ :
1212 case 0x64 /* 'd' */ :
1213 case 0x65 /* 'e' */ :
1214 case 0x66 /* 'f' */ :
1215 case 0x67 /* 'g' */ :
1216 case 0x68 /* 'h' */ :
1217 case 0x69 /* 'i' */ :
1218 case 0x6a /* 'j' */ :
1219 case 0x6b /* 'k' */ :
1220 case 0x6c /* 'l' */ :
1221 case 0x6d /* 'm' */ :
1222 case 0x6e /* 'n' */ :
1223 case 0x6f /* 'o' */ :
1224 case 0x70 /* 'p' */ :
1225 case 0x71 /* 'q' */ :
1226 case 0x72 /* 'r' */ :
1227 case 0x73 /* 's' */ :
1228 case 0x74 /* 't' */ :
1229 case 0x75 /* 'u' */ :
1230 case 0x76 /* 'v' */ :
1231 case 0x77 /* 'w' */ :
1232 case 0x78 /* 'x' */ :
1233 case 0x79 /* 'y' */ :
1234 case 0x7a /* 'z' */ :
1235 {
1236 matchRange('a','z');
1237 break;
1238 }
1239 case 0x41 /* 'A' */ :
1240 case 0x42 /* 'B' */ :
1241 case 0x43 /* 'C' */ :
1242 case 0x44 /* 'D' */ :
1243 case 0x45 /* 'E' */ :
1244 case 0x46 /* 'F' */ :
1245 case 0x47 /* 'G' */ :
1246 case 0x48 /* 'H' */ :
1247 case 0x49 /* 'I' */ :
1248 case 0x4a /* 'J' */ :
1249 case 0x4b /* 'K' */ :
1250 case 0x4c /* 'L' */ :
1251 case 0x4d /* 'M' */ :
1252 case 0x4e /* 'N' */ :
1253 case 0x4f /* 'O' */ :
1254 case 0x50 /* 'P' */ :
1255 case 0x51 /* 'Q' */ :
1256 case 0x52 /* 'R' */ :
1257 case 0x53 /* 'S' */ :
1258 case 0x54 /* 'T' */ :
1259 case 0x55 /* 'U' */ :
1260 case 0x56 /* 'V' */ :
1261 case 0x57 /* 'W' */ :
1262 case 0x58 /* 'X' */ :
1263 case 0x59 /* 'Y' */ :
1264 case 0x5a /* 'Z' */ :
1265 {
1266 matchRange('A','Z');
1267 break;
1268 }
1269 case 0x5f /* '_' */ :
1270 {
1271 match('_' /* charlit */ );
1272 break;
1273 }
1274 case 0x30 /* '0' */ :
1275 case 0x31 /* '1' */ :
1276 case 0x32 /* '2' */ :
1277 case 0x33 /* '3' */ :
1278 case 0x34 /* '4' */ :
1279 case 0x35 /* '5' */ :
1280 case 0x36 /* '6' */ :
1281 case 0x37 /* '7' */ :
1282 case 0x38 /* '8' */ :
1283 case 0x39 /* '9' */ :
1284 {
1285 matchRange('0','9');
1286 break;
1287 }
1288 default:
1289 {
1290 goto _loop152;
1291 }
1292 }
1293 }
1294 _loop152:;
1295 } // ( ... )*
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));
1300 }
1301 _returnToken = _token;
1302 _saveIndex=0;
1303}
1304
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();
1307 _ttype = HEX_DIGIT;
1308 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1309
1310 {
1311 switch ( LA(1)) {
1312 case 0x30 /* '0' */ :
1313 case 0x31 /* '1' */ :
1314 case 0x32 /* '2' */ :
1315 case 0x33 /* '3' */ :
1316 case 0x34 /* '4' */ :
1317 case 0x35 /* '5' */ :
1318 case 0x36 /* '6' */ :
1319 case 0x37 /* '7' */ :
1320 case 0x38 /* '8' */ :
1321 case 0x39 /* '9' */ :
1322 {
1323 matchRange('0','9');
1324 break;
1325 }
1326 case 0x41 /* 'A' */ :
1327 case 0x42 /* 'B' */ :
1328 case 0x43 /* 'C' */ :
1329 case 0x44 /* 'D' */ :
1330 case 0x45 /* 'E' */ :
1331 case 0x46 /* 'F' */ :
1332 {
1333 matchRange('A','F');
1334 break;
1335 }
1336 case 0x61 /* 'a' */ :
1337 case 0x62 /* 'b' */ :
1338 case 0x63 /* 'c' */ :
1339 case 0x64 /* 'd' */ :
1340 case 0x65 /* 'e' */ :
1341 case 0x66 /* 'f' */ :
1342 {
1343 matchRange('a','f');
1344 break;
1345 }
1346 default:
1347 {
1348 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1349 }
1350 }
1351 }
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));
1355 }
1356 _returnToken = _token;
1357 _saveIndex=0;
1358}
1359
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();
1362 _ttype = NUM_INT;
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"
1369
1370 bool isDecimal = false;
1371 ANTLR_USE_NAMESPACE(antlr)RefToken t = ANTLR_USE_NAMESPACE(antlr)nullToken;
1372
1373#line 1374 "MDLexer.cpp"
1374
1375 {
1376 switch ( LA(1)) {
1377 case 0x2b /* '+' */ :
1378 {
1379 match('+' /* charlit */ );
1380 break;
1381 }
1382 case 0x2d /* '-' */ :
1383 {
1384 match('-' /* charlit */ );
1385 break;
1386 }
1387 case 0x2e /* '.' */ :
1388 case 0x30 /* '0' */ :
1389 case 0x31 /* '1' */ :
1390 case 0x32 /* '2' */ :
1391 case 0x33 /* '3' */ :
1392 case 0x34 /* '4' */ :
1393 case 0x35 /* '5' */ :
1394 case 0x36 /* '6' */ :
1395 case 0x37 /* '7' */ :
1396 case 0x38 /* '8' */ :
1397 case 0x39 /* '9' */ :
1398 {
1399 break;
1400 }
1401 default:
1402 {
1403 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1404 }
1405 }
1406 }
1407 {
1408 switch ( LA(1)) {
1409 case 0x2e /* '.' */ :
1410 {
1411 match('.' /* charlit */ );
1412 if ( inputState->guessing==0 ) {
1413#line 532 "MDParser.g"
1414 _ttype = DOT;
1415#line 1416 "MDLexer.cpp"
1416 }
1417 {
1418 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
1419 { // ( ... )+
1420 int _cnt164=0;
1421 for (;;) {
1422 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
1423 matchRange('0','9');
1424 }
1425 else {
1426 if ( _cnt164>=1 ) { goto _loop164; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1427 }
1428
1429 _cnt164++;
1430 }
1431 _loop164:;
1432 } // ( ... )+
1433 {
1434 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1435 mEXPONENT(false);
1436 }
1437 else {
1438 }
1439
1440 }
1441 {
1442 if ((_tokenSet_8.member(LA(1)))) {
1443 mFLOAT_SUFFIX(true);
1444 f1=_returnToken;
1445 if ( inputState->guessing==0 ) {
1446#line 533 "MDParser.g"
1447 t=f1;
1448#line 1449 "MDLexer.cpp"
1449 }
1450 }
1451 else {
1452 }
1453
1454 }
1455 if ( inputState->guessing==0 ) {
1456#line 534 "MDParser.g"
1457
1458 if ( t &&
1459 (t->getText().find('f') != ANTLR_USE_NAMESPACE(std)string::npos ||
1460 t->getText().find('F') != ANTLR_USE_NAMESPACE(std)string::npos ) ) {
1461 _ttype = NUM_FLOAT;
1462 }
1463 else {
1464 _ttype = NUM_DOUBLE; // assume double
1465 }
1466
1467#line 1468 "MDLexer.cpp"
1468 }
1469 }
1470 else {
1471 }
1472
1473 }
1474 break;
1475 }
1476 case 0x30 /* '0' */ :
1477 case 0x31 /* '1' */ :
1478 case 0x32 /* '2' */ :
1479 case 0x33 /* '3' */ :
1480 case 0x34 /* '4' */ :
1481 case 0x35 /* '5' */ :
1482 case 0x36 /* '6' */ :
1483 case 0x37 /* '7' */ :
1484 case 0x38 /* '8' */ :
1485 case 0x39 /* '9' */ :
1486 {
1487 {
1488 switch ( LA(1)) {
1489 case 0x30 /* '0' */ :
1490 {
1491 match('0' /* charlit */ );
1492 if ( inputState->guessing==0 ) {
1493#line 546 "MDParser.g"
1494 isDecimal = true;
1495#line 1496 "MDLexer.cpp"
1496 }
1497 {
1498 if ((LA(1) == 0x58 /* 'X' */ || LA(1) == 0x78 /* 'x' */ )) {
1499 {
1500 switch ( LA(1)) {
1501 case 0x78 /* 'x' */ :
1502 {
1503 match('x' /* charlit */ );
1504 break;
1505 }
1506 case 0x58 /* 'X' */ :
1507 {
1508 match('X' /* charlit */ );
1509 break;
1510 }
1511 default:
1512 {
1513 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1514 }
1515 }
1516 }
1517 { // ( ... )+
1518 int _cnt171=0;
1519 for (;;) {
1520 if ((_tokenSet_9.member(LA(1))) && (true) && (true)) {
1521 mHEX_DIGIT(false);
1522 }
1523 else {
1524 if ( _cnt171>=1 ) { goto _loop171; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1525 }
1526
1527 _cnt171++;
1528 }
1529 _loop171:;
1530 } // ( ... )+
1531 }
1532 else {
1533 bool synPredMatched176 = false;
1534 if ((((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (true) && (true))) {
1535 int _m176 = mark();
1536 synPredMatched176 = true;
1537 inputState->guessing++;
1538 try {
1539 {
1540 { // ( ... )+
1541 int _cnt174=0;
1542 for (;;) {
1543 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
1544 matchRange('0','9');
1545 }
1546 else {
1547 if ( _cnt174>=1 ) { goto _loop174; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1548 }
1549
1550 _cnt174++;
1551 }
1552 _loop174:;
1553 } // ( ... )+
1554 {
1555 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1556 mEXPONENT(false);
1557 }
1558 else if ((LA(1) == 0x2e /* '.' */ )) {
1559 match('.' /* charlit */ );
1560 }
1561 else if ((_tokenSet_8.member(LA(1))) && (true)) {
1562 mFLOAT_SUFFIX(false);
1563 }
1564 else {
1565 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1566 }
1567
1568 }
1569 }
1570 }
1571 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
1572 synPredMatched176 = false;
1573 }
1574 rewind(_m176);
1575 inputState->guessing--;
1576 }
1577 if ( synPredMatched176 ) {
1578 { // ( ... )+
1579 int _cnt178=0;
1580 for (;;) {
1581 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
1582 matchRange('0','9');
1583 }
1584 else {
1585 if ( _cnt178>=1 ) { goto _loop178; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1586 }
1587
1588 _cnt178++;
1589 }
1590 _loop178:;
1591 } // ( ... )+
1592 }
1593 else if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x37 /* '7' */ )) && (true) && (true)) {
1594 { // ( ... )+
1595 int _cnt180=0;
1596 for (;;) {
1597 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x37 /* '7' */ ))) {
1598 matchRange('0','7');
1599 }
1600 else {
1601 if ( _cnt180>=1 ) { goto _loop180; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1602 }
1603
1604 _cnt180++;
1605 }
1606 _loop180:;
1607 } // ( ... )+
1608 }
1609 else {
1610 }
1611 }
1612 }
1613 break;
1614 }
1615 case 0x31 /* '1' */ :
1616 case 0x32 /* '2' */ :
1617 case 0x33 /* '3' */ :
1618 case 0x34 /* '4' */ :
1619 case 0x35 /* '5' */ :
1620 case 0x36 /* '6' */ :
1621 case 0x37 /* '7' */ :
1622 case 0x38 /* '8' */ :
1623 case 0x39 /* '9' */ :
1624 {
1625 {
1626 matchRange('1','9');
1627 }
1628 { // ( ... )*
1629 for (;;) {
1630 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
1631 matchRange('0','9');
1632 }
1633 else {
1634 goto _loop183;
1635 }
1636
1637 }
1638 _loop183:;
1639 } // ( ... )*
1640 if ( inputState->guessing==0 ) {
1641#line 563 "MDParser.g"
1642 isDecimal=true;
1643#line 1644 "MDLexer.cpp"
1644 }
1645 break;
1646 }
1647 default:
1648 {
1649 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1650 }
1651 }
1652 }
1653 {
1654 if ((LA(1) == 0x4c /* 'L' */ || LA(1) == 0x6c /* 'l' */ )) {
1655 {
1656 switch ( LA(1)) {
1657 case 0x6c /* 'l' */ :
1658 {
1659 match('l' /* charlit */ );
1660 break;
1661 }
1662 case 0x4c /* 'L' */ :
1663 {
1664 match('L' /* charlit */ );
1665 break;
1666 }
1667 default:
1668 {
1669 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1670 }
1671 }
1672 }
1673 if ( inputState->guessing==0 ) {
1674#line 565 "MDParser.g"
1675 _ttype = NUM_LONG;
1676#line 1677 "MDLexer.cpp"
1677 }
1678 }
1679 else if (((_tokenSet_10.member(LA(1))))&&(isDecimal)) {
1680 {
1681 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1682 mEXPONENT(false);
1683 {
1684 if ((_tokenSet_8.member(LA(1)))) {
1685 mFLOAT_SUFFIX(true);
1686 f3=_returnToken;
1687 if ( inputState->guessing==0 ) {
1688#line 570 "MDParser.g"
1689 t=f3;
1690#line 1691 "MDLexer.cpp"
1691 }
1692 }
1693 else {
1694 }
1695
1696 }
1697 }
1698 else if ((LA(1) == 0x2e /* '.' */ )) {
1699 match('.' /* charlit */ );
1700 { // ( ... )*
1701 for (;;) {
1702 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
1703 matchRange('0','9');
1704 }
1705 else {
1706 goto _loop188;
1707 }
1708
1709 }
1710 _loop188:;
1711 } // ( ... )*
1712 {
1713 if ((_tokenSet_6.member(LA(1))) && (_tokenSet_7.member(LA(2)))) {
1714 mEXPONENT(false);
1715 }
1716 else {
1717 }
1718
1719 }
1720 {
1721 if ((_tokenSet_8.member(LA(1)))) {
1722 mFLOAT_SUFFIX(true);
1723 f2=_returnToken;
1724 if ( inputState->guessing==0 ) {
1725#line 569 "MDParser.g"
1726 t=f2;
1727#line 1728 "MDLexer.cpp"
1728 }
1729 }
1730 else {
1731 }
1732
1733 }
1734 }
1735 else if ((_tokenSet_8.member(LA(1))) && (true)) {
1736 mFLOAT_SUFFIX(true);
1737 f4=_returnToken;
1738 if ( inputState->guessing==0 ) {
1739#line 571 "MDParser.g"
1740 t=f4;
1741#line 1742 "MDLexer.cpp"
1742 }
1743 }
1744 else {
1745 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1746 }
1747
1748 }
1749 if ( inputState->guessing==0 ) {
1750#line 573 "MDParser.g"
1751
1752 if ( t &&
1753 (t->getText().find('f') != ANTLR_USE_NAMESPACE(std)string::npos ||
1754 t->getText().find('F') != ANTLR_USE_NAMESPACE(std)string::npos ) ) {
1755 _ttype = NUM_FLOAT;
1756 }
1757 else {
1758 _ttype = NUM_DOUBLE; // assume double
1759 }
1760
1761#line 1762 "MDLexer.cpp"
1762 }
1763 }
1764 else {
1765 }
1766
1767 }
1768 break;
1769 }
1770 default:
1771 {
1772 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1773 }
1774 }
1775 }
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));
1779 }
1780 _returnToken = _token;
1781 _saveIndex=0;
1782}
1783
1784void MDLexer::mEXPONENT(bool _createToken) {
1785 int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
1786 _ttype = EXPONENT;
1787 ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
1788
1789 {
1790 switch ( LA(1)) {
1791 case 0x65 /* 'e' */ :
1792 {
1793 match('e' /* charlit */ );
1794 break;
1795 }
1796 case 0x45 /* 'E' */ :
1797 {
1798 match('E' /* charlit */ );
1799 break;
1800 }
1801 case 0x64 /* 'd' */ :
1802 {
1803 match('d' /* charlit */ );
1804 break;
1805 }
1806 case 0x44 /* 'D' */ :
1807 {
1808 match('D' /* charlit */ );
1809 break;
1810 }
1811 default:
1812 {
1813 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1814 }
1815 }
1816 }
1817 {
1818 switch ( LA(1)) {
1819 case 0x2b /* '+' */ :
1820 {
1821 match('+' /* charlit */ );
1822 break;
1823 }
1824 case 0x2d /* '-' */ :
1825 {
1826 match('-' /* charlit */ );
1827 break;
1828 }
1829 case 0x30 /* '0' */ :
1830 case 0x31 /* '1' */ :
1831 case 0x32 /* '2' */ :
1832 case 0x33 /* '3' */ :
1833 case 0x34 /* '4' */ :
1834 case 0x35 /* '5' */ :
1835 case 0x36 /* '6' */ :
1836 case 0x37 /* '7' */ :
1837 case 0x38 /* '8' */ :
1838 case 0x39 /* '9' */ :
1839 {
1840 break;
1841 }
1842 default:
1843 {
1844 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1845 }
1846 }
1847 }
1848 { // ( ... )+
1849 int _cnt196=0;
1850 for (;;) {
1851 if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
1852 matchRange('0','9');
1853 }
1854 else {
1855 if ( _cnt196>=1 ) { goto _loop196; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
1856 }
1857
1858 _cnt196++;
1859 }
1860 _loop196:;
1861 } // ( ... )+
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));
1865 }
1866 _returnToken = _token;
1867 _saveIndex=0;
1868}
1869
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;
1874
1875 switch ( LA(1)) {
1876 case 0x66 /* 'f' */ :
1877 {
1878 match('f' /* charlit */ );
1879 break;
1880 }
1881 case 0x46 /* 'F' */ :
1882 {
1883 match('F' /* charlit */ );
1884 break;
1885 }
1886 case 0x64 /* 'd' */ :
1887 {
1888 match('d' /* charlit */ );
1889 break;
1890 }
1891 case 0x44 /* 'D' */ :
1892 {
1893 match('D' /* charlit */ );
1894 break;
1895 }
1896 default:
1897 {
1898 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
1899 }
1900 }
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));
1904 }
1905 _returnToken = _token;
1906 _saveIndex=0;
1907}
1908
1909
1910const unsigned long MDLexer::_tokenSet_0_data_[] = { 4294958079UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
1911// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12
1912// 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f !
1913// \" # $ % & \' ( ) + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C
1914// D E F G H I J K L M N O P
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 };
1917// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12
1918// 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f !
1919// \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B
1920// C D E F G H I J K L M N O P
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 };
1923// \" \' 0 1 2 3 4 5 6 7 ?
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 };
1926// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12
1927// 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f !
1928// # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D
1929// E F G H I J K L M N O P
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 };
1932// \' 0 1 2 3 4 5 6 7 8 9 A B C D E F
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 };
1935// 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10
1936// 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e
1937// 0x1f ! \" # $ % & ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
1938// @ A B C D E F G H I J K L M N O P
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 };
1941// D E
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 };
1944// + - 0 1 2 3 4 5 6 7 8 9
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 };
1947// D F
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 };
1950// 0 1 2 3 4 5 6 7 8 9 A B C D E F
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 };
1953// . D E F
1954const ANTLR_USE_NAMESPACE(antlr)BitSet MDLexer::_tokenSet_10(_tokenSet_10_data_,10);
1955