160 |
|
tmp6_AST = astFactory->create(LT(1)); |
161 |
|
astFactory->addASTChild(currentAST, tmp6_AST); |
162 |
|
match(RCURLY); |
163 |
< |
#line 62 "MDParser.g" |
163 |
> |
#line 63 "MDParser.g" |
164 |
|
tmp6_AST->setType(ENDBLOCK); |
165 |
|
#line 166 "MDParser.cpp" |
166 |
|
componentblock_AST = currentAST.root; |
200 |
|
tmp9_AST = astFactory->create(LT(1)); |
201 |
|
astFactory->addASTChild(currentAST, tmp9_AST); |
202 |
|
match(RCURLY); |
203 |
< |
#line 68 "MDParser.g" |
203 |
> |
#line 69 "MDParser.g" |
204 |
|
tmp9_AST->setType(ENDBLOCK); |
205 |
|
#line 206 "MDParser.cpp" |
206 |
|
moleculeblock_AST = currentAST.root; |
240 |
|
tmp12_AST = astFactory->create(LT(1)); |
241 |
|
astFactory->addASTChild(currentAST, tmp12_AST); |
242 |
|
match(RCURLY); |
243 |
< |
#line 65 "MDParser.g" |
243 |
> |
#line 66 "MDParser.g" |
244 |
|
tmp12_AST->setType(ENDBLOCK); |
245 |
|
#line 246 "MDParser.cpp" |
246 |
|
zconstraintblock_AST = currentAST.root; |
259 |
|
|
260 |
|
try { // for error handling |
261 |
|
switch ( LA(1)) { |
262 |
< |
case OCTALINT: |
263 |
< |
case DECIMALINT: |
264 |
< |
case HEXADECIMALINT: |
265 |
< |
case FLOATONE: |
266 |
< |
case FLOATTWO: |
262 |
> |
case NUM_INT: |
263 |
> |
case NUM_LONG: |
264 |
|
{ |
265 |
< |
signedNumber(); |
265 |
> |
intConst(); |
266 |
|
astFactory->addASTChild( currentAST, returnAST ); |
267 |
|
constant_AST = currentAST.root; |
268 |
|
break; |
269 |
|
} |
270 |
+ |
case NUM_FLOAT: |
271 |
+ |
case NUM_DOUBLE: |
272 |
+ |
{ |
273 |
+ |
floatConst(); |
274 |
+ |
astFactory->addASTChild( currentAST, returnAST ); |
275 |
+ |
constant_AST = currentAST.root; |
276 |
+ |
break; |
277 |
+ |
} |
278 |
|
case ID: |
279 |
|
{ |
280 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST tmp13_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
306 |
|
returnAST = constant_AST; |
307 |
|
} |
308 |
|
|
309 |
< |
void MDParser::signedNumber() { |
309 |
> |
void MDParser::intConst() { |
310 |
|
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
311 |
|
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
312 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST signedNumber_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
312 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST intConst_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
313 |
|
|
314 |
|
try { // for error handling |
310 |
– |
{ |
315 |
|
switch ( LA(1)) { |
316 |
< |
case OCTALINT: |
313 |
< |
case DECIMALINT: |
314 |
< |
case HEXADECIMALINT: |
316 |
> |
case NUM_INT: |
317 |
|
{ |
318 |
< |
intConst(); |
319 |
< |
astFactory->addASTChild( currentAST, returnAST ); |
318 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp15_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
319 |
> |
tmp15_AST = astFactory->create(LT(1)); |
320 |
> |
astFactory->addASTChild(currentAST, tmp15_AST); |
321 |
> |
match(NUM_INT); |
322 |
> |
intConst_AST = currentAST.root; |
323 |
|
break; |
324 |
|
} |
325 |
< |
case FLOATONE: |
321 |
< |
case FLOATTWO: |
325 |
> |
case NUM_LONG: |
326 |
|
{ |
327 |
< |
floatConst(); |
328 |
< |
astFactory->addASTChild( currentAST, returnAST ); |
327 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp16_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
328 |
> |
tmp16_AST = astFactory->create(LT(1)); |
329 |
> |
astFactory->addASTChild(currentAST, tmp16_AST); |
330 |
> |
match(NUM_LONG); |
331 |
> |
intConst_AST = currentAST.root; |
332 |
|
break; |
333 |
|
} |
334 |
|
default: |
336 |
|
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); |
337 |
|
} |
338 |
|
} |
332 |
– |
} |
333 |
– |
signedNumber_AST = currentAST.root; |
339 |
|
} |
340 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
341 |
|
reportError(ex); |
342 |
|
recover(ex,_tokenSet_6); |
343 |
|
} |
344 |
< |
returnAST = signedNumber_AST; |
344 |
> |
returnAST = intConst_AST; |
345 |
|
} |
346 |
|
|
347 |
+ |
void MDParser::floatConst() { |
348 |
+ |
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
349 |
+ |
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
350 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST floatConst_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
351 |
+ |
|
352 |
+ |
try { // for error handling |
353 |
+ |
switch ( LA(1)) { |
354 |
+ |
case NUM_FLOAT: |
355 |
+ |
{ |
356 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp17_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
357 |
+ |
tmp17_AST = astFactory->create(LT(1)); |
358 |
+ |
astFactory->addASTChild(currentAST, tmp17_AST); |
359 |
+ |
match(NUM_FLOAT); |
360 |
+ |
floatConst_AST = currentAST.root; |
361 |
+ |
break; |
362 |
+ |
} |
363 |
+ |
case NUM_DOUBLE: |
364 |
+ |
{ |
365 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp18_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
366 |
+ |
tmp18_AST = astFactory->create(LT(1)); |
367 |
+ |
astFactory->addASTChild(currentAST, tmp18_AST); |
368 |
+ |
match(NUM_DOUBLE); |
369 |
+ |
floatConst_AST = currentAST.root; |
370 |
+ |
break; |
371 |
+ |
} |
372 |
+ |
default: |
373 |
+ |
{ |
374 |
+ |
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); |
375 |
+ |
} |
376 |
+ |
} |
377 |
+ |
} |
378 |
+ |
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
379 |
+ |
reportError(ex); |
380 |
+ |
recover(ex,_tokenSet_7); |
381 |
+ |
} |
382 |
+ |
returnAST = floatConst_AST; |
383 |
+ |
} |
384 |
+ |
|
385 |
|
void MDParser::moleculestatement() { |
386 |
|
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
387 |
|
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
453 |
|
} |
454 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
455 |
|
reportError(ex); |
456 |
< |
recover(ex,_tokenSet_7); |
456 |
> |
recover(ex,_tokenSet_8); |
457 |
|
} |
458 |
|
returnAST = moleculestatement_AST; |
459 |
|
} |
464 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST atomblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
465 |
|
|
466 |
|
try { // for error handling |
467 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp15_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
468 |
< |
tmp15_AST = astFactory->create(LT(1)); |
469 |
< |
astFactory->makeASTRoot(currentAST, tmp15_AST); |
467 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp19_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
468 |
> |
tmp19_AST = astFactory->create(LT(1)); |
469 |
> |
astFactory->makeASTRoot(currentAST, tmp19_AST); |
470 |
|
match(ATOM); |
471 |
|
match(LBRACKET); |
472 |
|
intConst(); |
475 |
|
match(LCURLY); |
476 |
|
{ // ( ... )* |
477 |
|
for (;;) { |
478 |
< |
if ((_tokenSet_8.member(LA(1)))) { |
478 |
> |
if ((_tokenSet_9.member(LA(1)))) { |
479 |
|
atomstatement(); |
480 |
|
astFactory->addASTChild( currentAST, returnAST ); |
481 |
|
} |
486 |
|
} |
487 |
|
_loop19:; |
488 |
|
} // ( ... )* |
489 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp19_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
490 |
< |
tmp19_AST = astFactory->create(LT(1)); |
491 |
< |
astFactory->addASTChild(currentAST, tmp19_AST); |
489 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp23_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
490 |
> |
tmp23_AST = astFactory->create(LT(1)); |
491 |
> |
astFactory->addASTChild(currentAST, tmp23_AST); |
492 |
|
match(RCURLY); |
493 |
< |
#line 81 "MDParser.g" |
494 |
< |
tmp19_AST->setType(ENDBLOCK); |
495 |
< |
#line 453 "MDParser.cpp" |
493 |
> |
#line 82 "MDParser.g" |
494 |
> |
tmp23_AST->setType(ENDBLOCK); |
495 |
> |
#line 496 "MDParser.cpp" |
496 |
|
atomblock_AST = currentAST.root; |
497 |
|
} |
498 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
499 |
|
reportError(ex); |
500 |
< |
recover(ex,_tokenSet_7); |
500 |
> |
recover(ex,_tokenSet_8); |
501 |
|
} |
502 |
|
returnAST = atomblock_AST; |
503 |
|
} |
508 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST bondblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
509 |
|
|
510 |
|
try { // for error handling |
511 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp20_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
512 |
< |
tmp20_AST = astFactory->create(LT(1)); |
513 |
< |
astFactory->makeASTRoot(currentAST, tmp20_AST); |
511 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp24_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
512 |
> |
tmp24_AST = astFactory->create(LT(1)); |
513 |
> |
astFactory->makeASTRoot(currentAST, tmp24_AST); |
514 |
|
match(BOND); |
515 |
|
{ |
516 |
|
switch ( LA(1)) { |
545 |
|
} |
546 |
|
_loop24:; |
547 |
|
} // ( ... )* |
548 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp24_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
549 |
< |
tmp24_AST = astFactory->create(LT(1)); |
550 |
< |
astFactory->addASTChild(currentAST, tmp24_AST); |
548 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp28_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
549 |
> |
tmp28_AST = astFactory->create(LT(1)); |
550 |
> |
astFactory->addASTChild(currentAST, tmp28_AST); |
551 |
|
match(RCURLY); |
552 |
< |
#line 90 "MDParser.g" |
553 |
< |
tmp24_AST->setType(ENDBLOCK); |
554 |
< |
#line 512 "MDParser.cpp" |
552 |
> |
#line 91 "MDParser.g" |
553 |
> |
tmp28_AST->setType(ENDBLOCK); |
554 |
> |
#line 555 "MDParser.cpp" |
555 |
|
bondblock_AST = currentAST.root; |
556 |
|
} |
557 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
558 |
|
reportError(ex); |
559 |
< |
recover(ex,_tokenSet_7); |
559 |
> |
recover(ex,_tokenSet_8); |
560 |
|
} |
561 |
|
returnAST = bondblock_AST; |
562 |
|
} |
567 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST bendblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
568 |
|
|
569 |
|
try { // for error handling |
570 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp25_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
571 |
< |
tmp25_AST = astFactory->create(LT(1)); |
572 |
< |
astFactory->makeASTRoot(currentAST, tmp25_AST); |
570 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp29_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
571 |
> |
tmp29_AST = astFactory->create(LT(1)); |
572 |
> |
astFactory->makeASTRoot(currentAST, tmp29_AST); |
573 |
|
match(BEND); |
574 |
|
{ |
575 |
|
switch ( LA(1)) { |
604 |
|
} |
605 |
|
_loop29:; |
606 |
|
} // ( ... )* |
607 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp29_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
608 |
< |
tmp29_AST = astFactory->create(LT(1)); |
609 |
< |
astFactory->addASTChild(currentAST, tmp29_AST); |
607 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp33_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
608 |
> |
tmp33_AST = astFactory->create(LT(1)); |
609 |
> |
astFactory->addASTChild(currentAST, tmp33_AST); |
610 |
|
match(RCURLY); |
611 |
< |
#line 97 "MDParser.g" |
612 |
< |
tmp29_AST->setType(ENDBLOCK); |
613 |
< |
#line 571 "MDParser.cpp" |
611 |
> |
#line 98 "MDParser.g" |
612 |
> |
tmp33_AST->setType(ENDBLOCK); |
613 |
> |
#line 614 "MDParser.cpp" |
614 |
|
bendblock_AST = currentAST.root; |
615 |
|
} |
616 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
617 |
|
reportError(ex); |
618 |
< |
recover(ex,_tokenSet_7); |
618 |
> |
recover(ex,_tokenSet_8); |
619 |
|
} |
620 |
|
returnAST = bendblock_AST; |
621 |
|
} |
626 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST torsionblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
627 |
|
|
628 |
|
try { // for error handling |
629 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp30_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
630 |
< |
tmp30_AST = astFactory->create(LT(1)); |
631 |
< |
astFactory->makeASTRoot(currentAST, tmp30_AST); |
629 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp34_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
630 |
> |
tmp34_AST = astFactory->create(LT(1)); |
631 |
> |
astFactory->makeASTRoot(currentAST, tmp34_AST); |
632 |
|
match(TORSION); |
633 |
|
{ |
634 |
|
switch ( LA(1)) { |
663 |
|
} |
664 |
|
_loop34:; |
665 |
|
} // ( ... )* |
666 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp34_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
667 |
< |
tmp34_AST = astFactory->create(LT(1)); |
668 |
< |
astFactory->addASTChild(currentAST, tmp34_AST); |
666 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp38_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
667 |
> |
tmp38_AST = astFactory->create(LT(1)); |
668 |
> |
astFactory->addASTChild(currentAST, tmp38_AST); |
669 |
|
match(RCURLY); |
670 |
< |
#line 104 "MDParser.g" |
671 |
< |
tmp34_AST->setType(ENDBLOCK); |
672 |
< |
#line 630 "MDParser.cpp" |
670 |
> |
#line 105 "MDParser.g" |
671 |
> |
tmp38_AST->setType(ENDBLOCK); |
672 |
> |
#line 673 "MDParser.cpp" |
673 |
|
torsionblock_AST = currentAST.root; |
674 |
|
} |
675 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
676 |
|
reportError(ex); |
677 |
< |
recover(ex,_tokenSet_7); |
677 |
> |
recover(ex,_tokenSet_8); |
678 |
|
} |
679 |
|
returnAST = torsionblock_AST; |
680 |
|
} |
685 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST rigidbodyblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
686 |
|
|
687 |
|
try { // for error handling |
688 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp35_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
689 |
< |
tmp35_AST = astFactory->create(LT(1)); |
690 |
< |
astFactory->makeASTRoot(currentAST, tmp35_AST); |
688 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp39_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
689 |
> |
tmp39_AST = astFactory->create(LT(1)); |
690 |
> |
astFactory->makeASTRoot(currentAST, tmp39_AST); |
691 |
|
match(RIGIDBODY); |
692 |
|
match(LBRACKET); |
693 |
|
intConst(); |
707 |
|
} |
708 |
|
_loop38:; |
709 |
|
} // ( ... )* |
710 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp39_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
711 |
< |
tmp39_AST = astFactory->create(LT(1)); |
712 |
< |
astFactory->addASTChild(currentAST, tmp39_AST); |
710 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp43_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
711 |
> |
tmp43_AST = astFactory->create(LT(1)); |
712 |
> |
astFactory->addASTChild(currentAST, tmp43_AST); |
713 |
|
match(RCURLY); |
714 |
< |
#line 111 "MDParser.g" |
715 |
< |
tmp39_AST->setType(ENDBLOCK); |
716 |
< |
#line 674 "MDParser.cpp" |
714 |
> |
#line 112 "MDParser.g" |
715 |
> |
tmp43_AST->setType(ENDBLOCK); |
716 |
> |
#line 717 "MDParser.cpp" |
717 |
|
rigidbodyblock_AST = currentAST.root; |
718 |
|
} |
719 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
720 |
|
reportError(ex); |
721 |
< |
recover(ex,_tokenSet_7); |
721 |
> |
recover(ex,_tokenSet_8); |
722 |
|
} |
723 |
|
returnAST = rigidbodyblock_AST; |
724 |
|
} |
729 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST cutoffgroupblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
730 |
|
|
731 |
|
try { // for error handling |
732 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp40_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
733 |
< |
tmp40_AST = astFactory->create(LT(1)); |
734 |
< |
astFactory->makeASTRoot(currentAST, tmp40_AST); |
732 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp44_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
733 |
> |
tmp44_AST = astFactory->create(LT(1)); |
734 |
> |
astFactory->makeASTRoot(currentAST, tmp44_AST); |
735 |
|
match(CUTOFFGROUP); |
736 |
|
{ |
737 |
|
switch ( LA(1)) { |
766 |
|
} |
767 |
|
_loop43:; |
768 |
|
} // ( ... )* |
769 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp44_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
770 |
< |
tmp44_AST = astFactory->create(LT(1)); |
771 |
< |
astFactory->addASTChild(currentAST, tmp44_AST); |
769 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp48_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
770 |
> |
tmp48_AST = astFactory->create(LT(1)); |
771 |
> |
astFactory->addASTChild(currentAST, tmp48_AST); |
772 |
|
match(RCURLY); |
773 |
< |
#line 118 "MDParser.g" |
774 |
< |
tmp44_AST->setType(ENDBLOCK); |
775 |
< |
#line 733 "MDParser.cpp" |
773 |
> |
#line 119 "MDParser.g" |
774 |
> |
tmp48_AST->setType(ENDBLOCK); |
775 |
> |
#line 776 "MDParser.cpp" |
776 |
|
cutoffgroupblock_AST = currentAST.root; |
777 |
|
} |
778 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
779 |
|
reportError(ex); |
780 |
< |
recover(ex,_tokenSet_7); |
780 |
> |
recover(ex,_tokenSet_8); |
781 |
|
} |
782 |
|
returnAST = cutoffgroupblock_AST; |
783 |
|
} |
788 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST fragmentblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
789 |
|
|
790 |
|
try { // for error handling |
791 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp45_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
792 |
< |
tmp45_AST = astFactory->create(LT(1)); |
793 |
< |
astFactory->makeASTRoot(currentAST, tmp45_AST); |
791 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp49_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
792 |
> |
tmp49_AST = astFactory->create(LT(1)); |
793 |
> |
astFactory->makeASTRoot(currentAST, tmp49_AST); |
794 |
|
match(FRAGMENT); |
795 |
|
match(LBRACKET); |
796 |
|
intConst(); |
810 |
|
} |
811 |
|
_loop47:; |
812 |
|
} // ( ... )* |
813 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp49_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
814 |
< |
tmp49_AST = astFactory->create(LT(1)); |
815 |
< |
astFactory->addASTChild(currentAST, tmp49_AST); |
813 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp53_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
814 |
> |
tmp53_AST = astFactory->create(LT(1)); |
815 |
> |
astFactory->addASTChild(currentAST, tmp53_AST); |
816 |
|
match(RCURLY); |
817 |
< |
#line 125 "MDParser.g" |
818 |
< |
tmp49_AST->setType(ENDBLOCK); |
819 |
< |
#line 777 "MDParser.cpp" |
817 |
> |
#line 126 "MDParser.g" |
818 |
> |
tmp53_AST->setType(ENDBLOCK); |
819 |
> |
#line 820 "MDParser.cpp" |
820 |
|
fragmentblock_AST = currentAST.root; |
821 |
|
} |
822 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
823 |
|
reportError(ex); |
824 |
< |
recover(ex,_tokenSet_7); |
824 |
> |
recover(ex,_tokenSet_8); |
825 |
|
} |
826 |
|
returnAST = fragmentblock_AST; |
827 |
|
} |
828 |
|
|
786 |
– |
void MDParser::intConst() { |
787 |
– |
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
788 |
– |
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
789 |
– |
ANTLR_USE_NAMESPACE(antlr)RefAST intConst_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
790 |
– |
|
791 |
– |
try { // for error handling |
792 |
– |
switch ( LA(1)) { |
793 |
– |
case OCTALINT: |
794 |
– |
{ |
795 |
– |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp50_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
796 |
– |
tmp50_AST = astFactory->create(LT(1)); |
797 |
– |
astFactory->addASTChild(currentAST, tmp50_AST); |
798 |
– |
match(OCTALINT); |
799 |
– |
intConst_AST = currentAST.root; |
800 |
– |
break; |
801 |
– |
} |
802 |
– |
case DECIMALINT: |
803 |
– |
{ |
804 |
– |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp51_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
805 |
– |
tmp51_AST = astFactory->create(LT(1)); |
806 |
– |
astFactory->addASTChild(currentAST, tmp51_AST); |
807 |
– |
match(DECIMALINT); |
808 |
– |
intConst_AST = currentAST.root; |
809 |
– |
break; |
810 |
– |
} |
811 |
– |
case HEXADECIMALINT: |
812 |
– |
{ |
813 |
– |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp52_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
814 |
– |
tmp52_AST = astFactory->create(LT(1)); |
815 |
– |
astFactory->addASTChild(currentAST, tmp52_AST); |
816 |
– |
match(HEXADECIMALINT); |
817 |
– |
intConst_AST = currentAST.root; |
818 |
– |
break; |
819 |
– |
} |
820 |
– |
default: |
821 |
– |
{ |
822 |
– |
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); |
823 |
– |
} |
824 |
– |
} |
825 |
– |
} |
826 |
– |
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
827 |
– |
reportError(ex); |
828 |
– |
recover(ex,_tokenSet_9); |
829 |
– |
} |
830 |
– |
returnAST = intConst_AST; |
831 |
– |
} |
832 |
– |
|
829 |
|
void MDParser::atomstatement() { |
830 |
|
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
831 |
|
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
842 |
|
} |
843 |
|
case POSITION: |
844 |
|
{ |
845 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp53_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
846 |
< |
tmp53_AST = astFactory->create(LT(1)); |
847 |
< |
astFactory->makeASTRoot(currentAST, tmp53_AST); |
845 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp54_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
846 |
> |
tmp54_AST = astFactory->create(LT(1)); |
847 |
> |
astFactory->makeASTRoot(currentAST, tmp54_AST); |
848 |
|
match(POSITION); |
849 |
|
match(LPAREN); |
850 |
< |
signedNumberTuple(); |
850 |
> |
doubleNumberTuple(); |
851 |
|
astFactory->addASTChild( currentAST, returnAST ); |
852 |
|
match(RPAREN); |
853 |
|
match(SEMICOLON); |
856 |
|
} |
857 |
|
case ORIENTATION: |
858 |
|
{ |
859 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp57_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
860 |
< |
tmp57_AST = astFactory->create(LT(1)); |
861 |
< |
astFactory->makeASTRoot(currentAST, tmp57_AST); |
859 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp58_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
860 |
> |
tmp58_AST = astFactory->create(LT(1)); |
861 |
> |
astFactory->makeASTRoot(currentAST, tmp58_AST); |
862 |
|
match(ORIENTATION); |
863 |
|
match(LPAREN); |
864 |
< |
signedNumberTuple(); |
864 |
> |
doubleNumberTuple(); |
865 |
|
astFactory->addASTChild( currentAST, returnAST ); |
866 |
|
match(RPAREN); |
867 |
|
match(SEMICOLON); |
881 |
|
returnAST = atomstatement_AST; |
882 |
|
} |
883 |
|
|
884 |
< |
void MDParser::signedNumberTuple() { |
884 |
> |
void MDParser::doubleNumberTuple() { |
885 |
|
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
886 |
|
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
887 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST signedNumberTuple_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
887 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumberTuple_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
888 |
|
|
889 |
|
try { // for error handling |
890 |
< |
signedNumber(); |
890 |
> |
doubleNumber(); |
891 |
|
astFactory->addASTChild( currentAST, returnAST ); |
892 |
|
{ // ( ... )* |
893 |
|
for (;;) { |
894 |
|
if ((LA(1) == COMMA)) { |
895 |
|
match(COMMA); |
896 |
< |
signedNumber(); |
896 |
> |
doubleNumber(); |
897 |
|
astFactory->addASTChild( currentAST, returnAST ); |
898 |
|
} |
899 |
|
else { |
903 |
|
} |
904 |
|
_loop51:; |
905 |
|
} // ( ... )* |
906 |
< |
signedNumberTuple_AST = currentAST.root; |
906 |
> |
doubleNumberTuple_AST = currentAST.root; |
907 |
|
} |
908 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
909 |
|
reportError(ex); |
910 |
|
recover(ex,_tokenSet_11); |
911 |
|
} |
912 |
< |
returnAST = signedNumberTuple_AST; |
912 |
> |
returnAST = doubleNumberTuple_AST; |
913 |
|
} |
914 |
|
|
915 |
|
void MDParser::bondstatement() { |
928 |
|
} |
929 |
|
case MEMBERS: |
930 |
|
{ |
931 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp62_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
932 |
< |
tmp62_AST = astFactory->create(LT(1)); |
933 |
< |
astFactory->makeASTRoot(currentAST, tmp62_AST); |
931 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp63_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
932 |
> |
tmp63_AST = astFactory->create(LT(1)); |
933 |
> |
astFactory->makeASTRoot(currentAST, tmp63_AST); |
934 |
|
match(MEMBERS); |
935 |
|
match(LPAREN); |
936 |
|
inttuple(); |
1000 |
|
} |
1001 |
|
case MEMBERS: |
1002 |
|
{ |
1003 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp67_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1004 |
< |
tmp67_AST = astFactory->create(LT(1)); |
1005 |
< |
astFactory->makeASTRoot(currentAST, tmp67_AST); |
1003 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp68_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1004 |
> |
tmp68_AST = astFactory->create(LT(1)); |
1005 |
> |
astFactory->makeASTRoot(currentAST, tmp68_AST); |
1006 |
|
match(MEMBERS); |
1007 |
|
match(LPAREN); |
1008 |
|
inttuple(); |
1041 |
|
} |
1042 |
|
case MEMBERS: |
1043 |
|
{ |
1044 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp71_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1045 |
< |
tmp71_AST = astFactory->create(LT(1)); |
1046 |
< |
astFactory->makeASTRoot(currentAST, tmp71_AST); |
1044 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp72_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1045 |
> |
tmp72_AST = astFactory->create(LT(1)); |
1046 |
> |
astFactory->makeASTRoot(currentAST, tmp72_AST); |
1047 |
|
match(MEMBERS); |
1048 |
|
match(LPAREN); |
1049 |
|
inttuple(); |
1082 |
|
} |
1083 |
|
case MEMBERS: |
1084 |
|
{ |
1085 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp75_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1086 |
< |
tmp75_AST = astFactory->create(LT(1)); |
1087 |
< |
astFactory->makeASTRoot(currentAST, tmp75_AST); |
1085 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp76_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1086 |
> |
tmp76_AST = astFactory->create(LT(1)); |
1087 |
> |
astFactory->makeASTRoot(currentAST, tmp76_AST); |
1088 |
|
match(MEMBERS); |
1089 |
|
match(LPAREN); |
1090 |
|
inttuple(); |
1123 |
|
} |
1124 |
|
case MEMBERS: |
1125 |
|
{ |
1126 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp79_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1127 |
< |
tmp79_AST = astFactory->create(LT(1)); |
1128 |
< |
astFactory->makeASTRoot(currentAST, tmp79_AST); |
1126 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp80_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1127 |
> |
tmp80_AST = astFactory->create(LT(1)); |
1128 |
> |
astFactory->makeASTRoot(currentAST, tmp80_AST); |
1129 |
|
match(MEMBERS); |
1130 |
|
match(LPAREN); |
1131 |
|
inttuple(); |
1165 |
|
returnAST = fragmentstatement_AST; |
1166 |
|
} |
1167 |
|
|
1168 |
< |
void MDParser::floatConst() { |
1168 |
> |
void MDParser::doubleNumber() { |
1169 |
|
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1170 |
|
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
1171 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST floatConst_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1171 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumber_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1172 |
|
|
1173 |
|
try { // for error handling |
1174 |
+ |
{ |
1175 |
|
switch ( LA(1)) { |
1176 |
< |
case FLOATONE: |
1176 |
> |
case NUM_INT: |
1177 |
> |
case NUM_LONG: |
1178 |
|
{ |
1179 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp83_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1180 |
< |
tmp83_AST = astFactory->create(LT(1)); |
1183 |
< |
astFactory->addASTChild(currentAST, tmp83_AST); |
1184 |
< |
match(FLOATONE); |
1185 |
< |
floatConst_AST = currentAST.root; |
1179 |
> |
intConst(); |
1180 |
> |
astFactory->addASTChild( currentAST, returnAST ); |
1181 |
|
break; |
1182 |
|
} |
1183 |
< |
case FLOATTWO: |
1183 |
> |
case NUM_FLOAT: |
1184 |
> |
case NUM_DOUBLE: |
1185 |
|
{ |
1186 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp84_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1187 |
< |
tmp84_AST = astFactory->create(LT(1)); |
1192 |
< |
astFactory->addASTChild(currentAST, tmp84_AST); |
1193 |
< |
match(FLOATTWO); |
1194 |
< |
floatConst_AST = currentAST.root; |
1186 |
> |
floatConst(); |
1187 |
> |
astFactory->addASTChild( currentAST, returnAST ); |
1188 |
|
break; |
1189 |
|
} |
1190 |
|
default: |
1192 |
|
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); |
1193 |
|
} |
1194 |
|
} |
1195 |
+ |
} |
1196 |
+ |
doubleNumber_AST = currentAST.root; |
1197 |
|
} |
1198 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
1199 |
|
reportError(ex); |
1200 |
< |
recover(ex,_tokenSet_6); |
1200 |
> |
recover(ex,_tokenSet_14); |
1201 |
|
} |
1202 |
< |
returnAST = floatConst_AST; |
1202 |
> |
returnAST = doubleNumber_AST; |
1203 |
|
} |
1204 |
|
|
1205 |
|
void MDParser::initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ) |
1206 |
|
{ |
1207 |
< |
factory.setMaxNodeType(53); |
1207 |
> |
factory.setMaxNodeType(50); |
1208 |
|
} |
1209 |
|
const char* MDParser::tokenNames[] = { |
1210 |
|
"<0>", |
1236 |
|
"LPAREN", |
1237 |
|
"RPAREN", |
1238 |
|
"COMMA", |
1239 |
< |
"OCTALINT", |
1240 |
< |
"DECIMALINT", |
1241 |
< |
"HEXADECIMALINT", |
1242 |
< |
"FLOATONE", |
1248 |
< |
"FLOATTWO", |
1239 |
> |
"NUM_INT", |
1240 |
> |
"NUM_LONG", |
1241 |
> |
"NUM_FLOAT", |
1242 |
> |
"NUM_DOUBLE", |
1243 |
|
"DOT", |
1244 |
|
"COLON", |
1245 |
|
"QUESTIONMARK", |
1252 |
|
"CharLiteral", |
1253 |
|
"EndOfLine", |
1254 |
|
"Escape", |
1255 |
+ |
"Vocabulary", |
1256 |
|
"Digit", |
1257 |
|
"Decimal", |
1258 |
< |
"LongSuffix", |
1259 |
< |
"UnsignedSuffix", |
1260 |
< |
"FloatSuffix", |
1266 |
< |
"Exponent", |
1267 |
< |
"Vocabulary", |
1268 |
< |
"Number", |
1258 |
> |
"HEX_DIGIT", |
1259 |
> |
"EXPONENT", |
1260 |
> |
"FLOAT_SUFFIX", |
1261 |
|
0 |
1262 |
|
}; |
1263 |
|
|
1282 |
|
const unsigned long MDParser::_tokenSet_5_data_[] = { 1048576UL, 0UL, 0UL, 0UL }; |
1283 |
|
// SEMICOLON |
1284 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_5(_tokenSet_5_data_,4); |
1285 |
< |
const unsigned long MDParser::_tokenSet_6_data_[] = { 403701760UL, 0UL, 0UL, 0UL }; |
1286 |
< |
// SEMICOLON RPAREN COMMA |
1285 |
> |
const unsigned long MDParser::_tokenSet_6_data_[] = { 437256192UL, 0UL, 0UL, 0UL }; |
1286 |
> |
// SEMICOLON RBRACKET RPAREN COMMA |
1287 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_6(_tokenSet_6_data_,4); |
1288 |
< |
const unsigned long MDParser::_tokenSet_7_data_[] = { 8667008UL, 0UL, 0UL, 0UL }; |
1288 |
> |
const unsigned long MDParser::_tokenSet_7_data_[] = { 403701760UL, 0UL, 0UL, 0UL }; |
1289 |
> |
// SEMICOLON RPAREN COMMA |
1290 |
> |
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_7(_tokenSet_7_data_,4); |
1291 |
> |
const unsigned long MDParser::_tokenSet_8_data_[] = { 8667008UL, 0UL, 0UL, 0UL }; |
1292 |
|
// "atom" "bond" "bend" "torsion" "rigidBody" "cutoffGroup" "fragment" |
1293 |
|
// ID RCURLY |
1299 |
– |
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_7(_tokenSet_7_data_,4); |
1300 |
– |
const unsigned long MDParser::_tokenSet_8_data_[] = { 360448UL, 0UL, 0UL, 0UL }; |
1301 |
– |
// "position" "orientation" ID |
1294 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_8(_tokenSet_8_data_,4); |
1295 |
< |
const unsigned long MDParser::_tokenSet_9_data_[] = { 437256192UL, 0UL, 0UL, 0UL }; |
1296 |
< |
// SEMICOLON RBRACKET RPAREN COMMA |
1295 |
> |
const unsigned long MDParser::_tokenSet_9_data_[] = { 360448UL, 0UL, 0UL, 0UL }; |
1296 |
> |
// "position" "orientation" ID |
1297 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_9(_tokenSet_9_data_,4); |
1298 |
|
const unsigned long MDParser::_tokenSet_10_data_[] = { 8749056UL, 0UL, 0UL, 0UL }; |
1299 |
|
// "position" "orientation" ID RCURLY |
1307 |
|
const unsigned long MDParser::_tokenSet_13_data_[] = { 8650752UL, 0UL, 0UL, 0UL }; |
1308 |
|
// ID RCURLY |
1309 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_13(_tokenSet_13_data_,4); |
1310 |
+ |
const unsigned long MDParser::_tokenSet_14_data_[] = { 402653184UL, 0UL, 0UL, 0UL }; |
1311 |
+ |
// RPAREN COMMA |
1312 |
+ |
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_14(_tokenSet_14_data_,4); |
1313 |
|
|
1314 |
|
|