OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
MDParser.cpp
1/* $ANTLR 2.7.7 (20191228): "MDParser.g" -> "MDParser.cpp"$ */
2#include "MDParser.hpp"
3#include <antlr/NoViableAltException.hpp>
4#include <antlr/SemanticException.hpp>
5#include <antlr/ASTFactory.hpp>
6#line 1 "MDParser.g"
7#line 8 "MDParser.cpp"
8MDParser::MDParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k)
9: ANTLR_USE_NAMESPACE(antlr)LLkParser(tokenBuf,k)
10{
11}
12
13MDParser::MDParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf)
14: ANTLR_USE_NAMESPACE(antlr)LLkParser(tokenBuf,3)
15{
16}
17
18MDParser::MDParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k)
19: ANTLR_USE_NAMESPACE(antlr)LLkParser(lexer,k)
20{
21}
22
23MDParser::MDParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer)
24: ANTLR_USE_NAMESPACE(antlr)LLkParser(lexer,3)
25{
26}
27
28MDParser::MDParser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state)
29: ANTLR_USE_NAMESPACE(antlr)LLkParser(state,3)
30{
31}
32
33void MDParser::mdfile() {
34 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
35 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
36 ANTLR_USE_NAMESPACE(antlr)RefAST mdfile_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
37
38 try { // for error handling
39 { // ( ... )*
40 for (;;) {
41 if ((_tokenSet_0.member(LA(1)))) {
42 statement();
43 astFactory->addASTChild( currentAST, returnAST );
44 }
45 else {
46 goto _loop3;
47 }
48
49 }
50 _loop3:;
51 } // ( ... )*
52 mdfile_AST = currentAST.root;
53 }
54 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
55 reportError(ex);
56 recover(ex,_tokenSet_1);
57 }
58 returnAST = mdfile_AST;
59}
60
61void MDParser::statement() {
62 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
63 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
64 ANTLR_USE_NAMESPACE(antlr)RefAST statement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
65
66 try { // for error handling
67 switch ( LA(1)) {
68 case ID:
69 {
70 assignment();
71 astFactory->addASTChild( currentAST, returnAST );
72 statement_AST = currentAST.root;
73 break;
74 }
75 case COMPONENT:
76 {
77 componentblock();
78 astFactory->addASTChild( currentAST, returnAST );
79 statement_AST = currentAST.root;
80 break;
81 }
82 case MOLECULE:
83 {
84 moleculeblock();
85 astFactory->addASTChild( currentAST, returnAST );
86 statement_AST = currentAST.root;
87 break;
88 }
89 case ZCONSTRAINT:
90 {
91 zconstraintblock();
92 astFactory->addASTChild( currentAST, returnAST );
93 statement_AST = currentAST.root;
94 break;
95 }
96 case RESTRAINT:
97 {
98 restraintblock();
99 astFactory->addASTChild( currentAST, returnAST );
100 statement_AST = currentAST.root;
101 break;
102 }
103 case FLUCQ:
104 {
105 flucqblock();
106 astFactory->addASTChild( currentAST, returnAST );
107 statement_AST = currentAST.root;
108 break;
109 }
110 case RNEMD:
111 {
112 rnemdblock();
113 astFactory->addASTChild( currentAST, returnAST );
114 statement_AST = currentAST.root;
115 break;
116 }
117 case MINIMIZER:
118 {
119 minimizerblock();
120 astFactory->addASTChild( currentAST, returnAST );
121 statement_AST = currentAST.root;
122 break;
123 }
124 default:
125 {
126 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
127 }
128 }
129 }
130 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
131 reportError(ex);
132 recover(ex,_tokenSet_2);
133 }
134 returnAST = statement_AST;
135}
136
137void MDParser::assignment() {
138 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
139 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
140 ANTLR_USE_NAMESPACE(antlr)RefAST assignment_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
141
142 try { // for error handling
143 ANTLR_USE_NAMESPACE(antlr)RefAST tmp1_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
144 tmp1_AST = astFactory->create(LT(1));
145 astFactory->addASTChild(currentAST, tmp1_AST);
146 match(ID);
147 ANTLR_USE_NAMESPACE(antlr)RefAST tmp2_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
148 tmp2_AST = astFactory->create(LT(1));
149 astFactory->makeASTRoot(currentAST, tmp2_AST);
150 match(ASSIGNEQUAL);
151 constant();
152 astFactory->addASTChild( currentAST, returnAST );
153 match(SEMICOLON);
154 assignment_AST = currentAST.root;
155 }
156 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
157 reportError(ex);
158 recover(ex,_tokenSet_3);
159 }
160 returnAST = assignment_AST;
161}
162
163void MDParser::componentblock() {
164 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
165 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
166 ANTLR_USE_NAMESPACE(antlr)RefAST componentblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
167
168 try { // for error handling
169 ANTLR_USE_NAMESPACE(antlr)RefAST tmp4_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
170 tmp4_AST = astFactory->create(LT(1));
171 astFactory->makeASTRoot(currentAST, tmp4_AST);
172 match(COMPONENT);
173 match(LCURLY);
174 { // ( ... )*
175 for (;;) {
176 if ((LA(1) == ID)) {
177 assignment();
178 astFactory->addASTChild( currentAST, returnAST );
179 }
180 else {
181 goto _loop9;
182 }
183
184 }
185 _loop9:;
186 } // ( ... )*
187 ANTLR_USE_NAMESPACE(antlr)RefAST tmp6_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
188 tmp6_AST = astFactory->create(LT(1));
189 astFactory->addASTChild(currentAST, tmp6_AST);
190 match(RCURLY);
191#line 95 "MDParser.g"
192 tmp6_AST->setType(ENDBLOCK);
193#line 194 "MDParser.cpp"
194 componentblock_AST = currentAST.root;
195 }
196 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
197 reportError(ex);
198 recover(ex,_tokenSet_2);
199 }
200 returnAST = componentblock_AST;
201}
202
203void MDParser::moleculeblock() {
204 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
205 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
206 ANTLR_USE_NAMESPACE(antlr)RefAST moleculeblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
207
208 try { // for error handling
209 ANTLR_USE_NAMESPACE(antlr)RefAST tmp7_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
210 tmp7_AST = astFactory->create(LT(1));
211 astFactory->makeASTRoot(currentAST, tmp7_AST);
212 match(MOLECULE);
213 match(LCURLY);
214 { // ( ... )*
215 for (;;) {
216 if ((_tokenSet_4.member(LA(1)))) {
217 moleculestatement();
218 astFactory->addASTChild( currentAST, returnAST );
219 }
220 else {
221 goto _loop27;
222 }
223
224 }
225 _loop27:;
226 } // ( ... )*
227 ANTLR_USE_NAMESPACE(antlr)RefAST tmp9_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
228 tmp9_AST = astFactory->create(LT(1));
229 astFactory->addASTChild(currentAST, tmp9_AST);
230 match(RCURLY);
231#line 113 "MDParser.g"
232 tmp9_AST->setType(ENDBLOCK);
233#line 234 "MDParser.cpp"
234 moleculeblock_AST = currentAST.root;
235 }
236 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
237 reportError(ex);
238 recover(ex,_tokenSet_2);
239 }
240 returnAST = moleculeblock_AST;
241}
242
243void MDParser::zconstraintblock() {
244 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
245 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
246 ANTLR_USE_NAMESPACE(antlr)RefAST zconstraintblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
247
248 try { // for error handling
249 ANTLR_USE_NAMESPACE(antlr)RefAST tmp10_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
250 tmp10_AST = astFactory->create(LT(1));
251 astFactory->makeASTRoot(currentAST, tmp10_AST);
252 match(ZCONSTRAINT);
253 match(LCURLY);
254 { // ( ... )*
255 for (;;) {
256 if ((LA(1) == ID)) {
257 assignment();
258 astFactory->addASTChild( currentAST, returnAST );
259 }
260 else {
261 goto _loop12;
262 }
263
264 }
265 _loop12:;
266 } // ( ... )*
267 ANTLR_USE_NAMESPACE(antlr)RefAST tmp12_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
268 tmp12_AST = astFactory->create(LT(1));
269 astFactory->addASTChild(currentAST, tmp12_AST);
270 match(RCURLY);
271#line 98 "MDParser.g"
272 tmp12_AST->setType(ENDBLOCK);
273#line 274 "MDParser.cpp"
274 zconstraintblock_AST = currentAST.root;
275 }
276 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
277 reportError(ex);
278 recover(ex,_tokenSet_2);
279 }
280 returnAST = zconstraintblock_AST;
281}
282
283void MDParser::restraintblock() {
284 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
285 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
286 ANTLR_USE_NAMESPACE(antlr)RefAST restraintblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
287
288 try { // for error handling
289 ANTLR_USE_NAMESPACE(antlr)RefAST tmp13_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
290 tmp13_AST = astFactory->create(LT(1));
291 astFactory->makeASTRoot(currentAST, tmp13_AST);
292 match(RESTRAINT);
293 match(LCURLY);
294 { // ( ... )*
295 for (;;) {
296 if ((LA(1) == ID)) {
297 assignment();
298 astFactory->addASTChild( currentAST, returnAST );
299 }
300 else {
301 goto _loop15;
302 }
303
304 }
305 _loop15:;
306 } // ( ... )*
307 ANTLR_USE_NAMESPACE(antlr)RefAST tmp15_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
308 tmp15_AST = astFactory->create(LT(1));
309 astFactory->addASTChild(currentAST, tmp15_AST);
310 match(RCURLY);
311#line 101 "MDParser.g"
312 tmp15_AST->setType(ENDBLOCK);
313#line 314 "MDParser.cpp"
314 restraintblock_AST = currentAST.root;
315 }
316 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
317 reportError(ex);
318 recover(ex,_tokenSet_2);
319 }
320 returnAST = restraintblock_AST;
321}
322
323void MDParser::flucqblock() {
324 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
325 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
326 ANTLR_USE_NAMESPACE(antlr)RefAST flucqblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
327
328 try { // for error handling
329 ANTLR_USE_NAMESPACE(antlr)RefAST tmp16_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
330 tmp16_AST = astFactory->create(LT(1));
331 astFactory->makeASTRoot(currentAST, tmp16_AST);
332 match(FLUCQ);
333 match(LCURLY);
334 { // ( ... )*
335 for (;;) {
336 if ((LA(1) == ID)) {
337 assignment();
338 astFactory->addASTChild( currentAST, returnAST );
339 }
340 else {
341 goto _loop18;
342 }
343
344 }
345 _loop18:;
346 } // ( ... )*
347 ANTLR_USE_NAMESPACE(antlr)RefAST tmp18_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
348 tmp18_AST = astFactory->create(LT(1));
349 astFactory->addASTChild(currentAST, tmp18_AST);
350 match(RCURLY);
351#line 104 "MDParser.g"
352 tmp18_AST->setType(ENDBLOCK);
353#line 354 "MDParser.cpp"
354 flucqblock_AST = currentAST.root;
355 }
356 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
357 reportError(ex);
358 recover(ex,_tokenSet_2);
359 }
360 returnAST = flucqblock_AST;
361}
362
363void MDParser::rnemdblock() {
364 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
365 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
366 ANTLR_USE_NAMESPACE(antlr)RefAST rnemdblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
367
368 try { // for error handling
369 ANTLR_USE_NAMESPACE(antlr)RefAST tmp19_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
370 tmp19_AST = astFactory->create(LT(1));
371 astFactory->makeASTRoot(currentAST, tmp19_AST);
372 match(RNEMD);
373 match(LCURLY);
374 { // ( ... )*
375 for (;;) {
376 if ((LA(1) == ID)) {
377 assignment();
378 astFactory->addASTChild( currentAST, returnAST );
379 }
380 else {
381 goto _loop21;
382 }
383
384 }
385 _loop21:;
386 } // ( ... )*
387 ANTLR_USE_NAMESPACE(antlr)RefAST tmp21_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
388 tmp21_AST = astFactory->create(LT(1));
389 astFactory->addASTChild(currentAST, tmp21_AST);
390 match(RCURLY);
391#line 107 "MDParser.g"
392 tmp21_AST->setType(ENDBLOCK);
393#line 394 "MDParser.cpp"
394 rnemdblock_AST = currentAST.root;
395 }
396 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
397 reportError(ex);
398 recover(ex,_tokenSet_2);
399 }
400 returnAST = rnemdblock_AST;
401}
402
403void MDParser::minimizerblock() {
404 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
405 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
406 ANTLR_USE_NAMESPACE(antlr)RefAST minimizerblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
407
408 try { // for error handling
409 ANTLR_USE_NAMESPACE(antlr)RefAST tmp22_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
410 tmp22_AST = astFactory->create(LT(1));
411 astFactory->makeASTRoot(currentAST, tmp22_AST);
412 match(MINIMIZER);
413 match(LCURLY);
414 { // ( ... )*
415 for (;;) {
416 if ((LA(1) == ID)) {
417 assignment();
418 astFactory->addASTChild( currentAST, returnAST );
419 }
420 else {
421 goto _loop24;
422 }
423
424 }
425 _loop24:;
426 } // ( ... )*
427 ANTLR_USE_NAMESPACE(antlr)RefAST tmp24_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
428 tmp24_AST = astFactory->create(LT(1));
429 astFactory->addASTChild(currentAST, tmp24_AST);
430 match(RCURLY);
431#line 110 "MDParser.g"
432 tmp24_AST->setType(ENDBLOCK);
433#line 434 "MDParser.cpp"
434 minimizerblock_AST = currentAST.root;
435 }
436 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
437 reportError(ex);
438 recover(ex,_tokenSet_2);
439 }
440 returnAST = minimizerblock_AST;
441}
442
443void MDParser::constant() {
444 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
445 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
446 ANTLR_USE_NAMESPACE(antlr)RefAST constant_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
447
448 try { // for error handling
449 switch ( LA(1)) {
450 case NUM_INT:
451 case NUM_LONG:
452 {
453 intConst();
454 astFactory->addASTChild( currentAST, returnAST );
455 constant_AST = currentAST.root;
456 break;
457 }
458 case NUM_FLOAT:
459 case NUM_DOUBLE:
460 {
461 floatConst();
462 astFactory->addASTChild( currentAST, returnAST );
463 constant_AST = currentAST.root;
464 break;
465 }
466 case LPAREN:
467 {
468 vectorConst();
469 astFactory->addASTChild( currentAST, returnAST );
470 constant_AST = currentAST.root;
471 break;
472 }
473 case ID:
474 {
475 ANTLR_USE_NAMESPACE(antlr)RefAST tmp25_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
476 tmp25_AST = astFactory->create(LT(1));
477 astFactory->addASTChild(currentAST, tmp25_AST);
478 match(ID);
479 constant_AST = currentAST.root;
480 break;
481 }
482 case StringLiteral:
483 {
484 ANTLR_USE_NAMESPACE(antlr)RefAST tmp26_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
485 tmp26_AST = astFactory->create(LT(1));
486 astFactory->addASTChild(currentAST, tmp26_AST);
487 match(StringLiteral);
488 constant_AST = currentAST.root;
489 break;
490 }
491 default:
492 {
493 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
494 }
495 }
496 }
497 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
498 reportError(ex);
499 recover(ex,_tokenSet_5);
500 }
501 returnAST = constant_AST;
502}
503
504void MDParser::intConst() {
505 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
506 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
507 ANTLR_USE_NAMESPACE(antlr)RefAST intConst_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
508
509 try { // for error handling
510 switch ( LA(1)) {
511 case NUM_INT:
512 {
513 ANTLR_USE_NAMESPACE(antlr)RefAST tmp27_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
514 tmp27_AST = astFactory->create(LT(1));
515 astFactory->addASTChild(currentAST, tmp27_AST);
516 match(NUM_INT);
517 intConst_AST = currentAST.root;
518 break;
519 }
520 case NUM_LONG:
521 {
522 ANTLR_USE_NAMESPACE(antlr)RefAST tmp28_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
523 tmp28_AST = astFactory->create(LT(1));
524 astFactory->addASTChild(currentAST, tmp28_AST);
525 match(NUM_LONG);
526 intConst_AST = currentAST.root;
527 break;
528 }
529 default:
530 {
531 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
532 }
533 }
534 }
535 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
536 reportError(ex);
537 recover(ex,_tokenSet_6);
538 }
539 returnAST = intConst_AST;
540}
541
542void MDParser::floatConst() {
543 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
544 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
545 ANTLR_USE_NAMESPACE(antlr)RefAST floatConst_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
546
547 try { // for error handling
548 switch ( LA(1)) {
549 case NUM_FLOAT:
550 {
551 ANTLR_USE_NAMESPACE(antlr)RefAST tmp29_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
552 tmp29_AST = astFactory->create(LT(1));
553 astFactory->addASTChild(currentAST, tmp29_AST);
554 match(NUM_FLOAT);
555 floatConst_AST = currentAST.root;
556 break;
557 }
558 case NUM_DOUBLE:
559 {
560 ANTLR_USE_NAMESPACE(antlr)RefAST tmp30_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
561 tmp30_AST = astFactory->create(LT(1));
562 astFactory->addASTChild(currentAST, tmp30_AST);
563 match(NUM_DOUBLE);
564 floatConst_AST = currentAST.root;
565 break;
566 }
567 default:
568 {
569 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
570 }
571 }
572 }
573 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
574 reportError(ex);
575 recover(ex,_tokenSet_7);
576 }
577 returnAST = floatConst_AST;
578}
579
580void MDParser::vectorConst() {
581 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
582 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
583 ANTLR_USE_NAMESPACE(antlr)RefAST vectorConst_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
584
585 try { // for error handling
586 ANTLR_USE_NAMESPACE(antlr)RefAST tmp31_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
587 tmp31_AST = astFactory->create(LT(1));
588 astFactory->makeASTRoot(currentAST, tmp31_AST);
589 match(LPAREN);
590 doubleNumberTuple();
591 astFactory->addASTChild( currentAST, returnAST );
592 ANTLR_USE_NAMESPACE(antlr)RefAST tmp32_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
593 tmp32_AST = astFactory->create(LT(1));
594 astFactory->addASTChild(currentAST, tmp32_AST);
595 match(RPAREN);
596 vectorConst_AST = currentAST.root;
597 }
598 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
599 reportError(ex);
600 recover(ex,_tokenSet_5);
601 }
602 returnAST = vectorConst_AST;
603}
604
605void MDParser::moleculestatement() {
606 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
607 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
608 ANTLR_USE_NAMESPACE(antlr)RefAST moleculestatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
609
610 try { // for error handling
611 switch ( LA(1)) {
612 case ID:
613 {
614 assignment();
615 astFactory->addASTChild( currentAST, returnAST );
616 moleculestatement_AST = currentAST.root;
617 break;
618 }
619 case ATOM:
620 {
621 atomblock();
622 astFactory->addASTChild( currentAST, returnAST );
623 moleculestatement_AST = currentAST.root;
624 break;
625 }
626 case BOND:
627 {
628 bondblock();
629 astFactory->addASTChild( currentAST, returnAST );
630 moleculestatement_AST = currentAST.root;
631 break;
632 }
633 case BEND:
634 {
635 bendblock();
636 astFactory->addASTChild( currentAST, returnAST );
637 moleculestatement_AST = currentAST.root;
638 break;
639 }
640 case TORSION:
641 {
642 torsionblock();
643 astFactory->addASTChild( currentAST, returnAST );
644 moleculestatement_AST = currentAST.root;
645 break;
646 }
647 case INVERSION:
648 {
649 inversionblock();
650 astFactory->addASTChild( currentAST, returnAST );
651 moleculestatement_AST = currentAST.root;
652 break;
653 }
654 case RIGIDBODY:
655 {
656 rigidbodyblock();
657 astFactory->addASTChild( currentAST, returnAST );
658 moleculestatement_AST = currentAST.root;
659 break;
660 }
661 case CUTOFFGROUP:
662 {
663 cutoffgroupblock();
664 astFactory->addASTChild( currentAST, returnAST );
665 moleculestatement_AST = currentAST.root;
666 break;
667 }
668 case FRAGMENT:
669 {
670 fragmentblock();
671 astFactory->addASTChild( currentAST, returnAST );
672 moleculestatement_AST = currentAST.root;
673 break;
674 }
675 case CONSTRAINT:
676 {
677 constraintblock();
678 astFactory->addASTChild( currentAST, returnAST );
679 moleculestatement_AST = currentAST.root;
680 break;
681 }
682 default:
683 {
684 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
685 }
686 }
687 }
688 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
689 reportError(ex);
690 recover(ex,_tokenSet_8);
691 }
692 returnAST = moleculestatement_AST;
693}
694
695void MDParser::atomblock() {
696 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
697 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
698 ANTLR_USE_NAMESPACE(antlr)RefAST atomblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
699
700 try { // for error handling
701 ANTLR_USE_NAMESPACE(antlr)RefAST tmp33_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
702 tmp33_AST = astFactory->create(LT(1));
703 astFactory->makeASTRoot(currentAST, tmp33_AST);
704 match(ATOM);
705 match(LBRACKET);
706 intConst();
707 astFactory->addASTChild( currentAST, returnAST );
708 match(RBRACKET);
709 match(LCURLY);
710 { // ( ... )*
711 for (;;) {
712 if ((_tokenSet_9.member(LA(1)))) {
713 atomstatement();
714 astFactory->addASTChild( currentAST, returnAST );
715 }
716 else {
717 goto _loop31;
718 }
719
720 }
721 _loop31:;
722 } // ( ... )*
723 ANTLR_USE_NAMESPACE(antlr)RefAST tmp37_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
724 tmp37_AST = astFactory->create(LT(1));
725 astFactory->addASTChild(currentAST, tmp37_AST);
726 match(RCURLY);
727#line 128 "MDParser.g"
728 tmp37_AST->setType(ENDBLOCK);
729#line 730 "MDParser.cpp"
730 atomblock_AST = currentAST.root;
731 }
732 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
733 reportError(ex);
734 recover(ex,_tokenSet_8);
735 }
736 returnAST = atomblock_AST;
737}
738
739void MDParser::bondblock() {
740 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
741 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
742 ANTLR_USE_NAMESPACE(antlr)RefAST bondblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
743
744 try { // for error handling
745 ANTLR_USE_NAMESPACE(antlr)RefAST tmp38_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
746 tmp38_AST = astFactory->create(LT(1));
747 astFactory->makeASTRoot(currentAST, tmp38_AST);
748 match(BOND);
749 {
750 switch ( LA(1)) {
751 case LBRACKET:
752 {
753 match(LBRACKET);
754 intConst();
755 match(RBRACKET);
756 break;
757 }
758 case LCURLY:
759 {
760 break;
761 }
762 default:
763 {
764 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
765 }
766 }
767 }
768 match(LCURLY);
769 { // ( ... )*
770 for (;;) {
771 if ((_tokenSet_10.member(LA(1)))) {
772 bondstatement();
773 astFactory->addASTChild( currentAST, returnAST );
774 }
775 else {
776 goto _loop36;
777 }
778
779 }
780 _loop36:;
781 } // ( ... )*
782 ANTLR_USE_NAMESPACE(antlr)RefAST tmp42_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
783 tmp42_AST = astFactory->create(LT(1));
784 astFactory->addASTChild(currentAST, tmp42_AST);
785 match(RCURLY);
786#line 138 "MDParser.g"
787 tmp42_AST->setType(ENDBLOCK);
788#line 789 "MDParser.cpp"
789 bondblock_AST = currentAST.root;
790 }
791 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
792 reportError(ex);
793 recover(ex,_tokenSet_8);
794 }
795 returnAST = bondblock_AST;
796}
797
798void MDParser::bendblock() {
799 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
800 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
801 ANTLR_USE_NAMESPACE(antlr)RefAST bendblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
802
803 try { // for error handling
804 ANTLR_USE_NAMESPACE(antlr)RefAST tmp43_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
805 tmp43_AST = astFactory->create(LT(1));
806 astFactory->makeASTRoot(currentAST, tmp43_AST);
807 match(BEND);
808 {
809 switch ( LA(1)) {
810 case LBRACKET:
811 {
812 match(LBRACKET);
813 intConst();
814 match(RBRACKET);
815 break;
816 }
817 case LCURLY:
818 {
819 break;
820 }
821 default:
822 {
823 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
824 }
825 }
826 }
827 match(LCURLY);
828 { // ( ... )*
829 for (;;) {
830 if ((_tokenSet_11.member(LA(1)))) {
831 bendstatement();
832 astFactory->addASTChild( currentAST, returnAST );
833 }
834 else {
835 goto _loop41;
836 }
837
838 }
839 _loop41:;
840 } // ( ... )*
841 ANTLR_USE_NAMESPACE(antlr)RefAST tmp47_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
842 tmp47_AST = astFactory->create(LT(1));
843 astFactory->addASTChild(currentAST, tmp47_AST);
844 match(RCURLY);
845#line 151 "MDParser.g"
846 tmp47_AST->setType(ENDBLOCK);
847#line 848 "MDParser.cpp"
848 bendblock_AST = currentAST.root;
849 }
850 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
851 reportError(ex);
852 recover(ex,_tokenSet_8);
853 }
854 returnAST = bendblock_AST;
855}
856
857void MDParser::torsionblock() {
858 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
859 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
860 ANTLR_USE_NAMESPACE(antlr)RefAST torsionblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
861
862 try { // for error handling
863 ANTLR_USE_NAMESPACE(antlr)RefAST tmp48_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
864 tmp48_AST = astFactory->create(LT(1));
865 astFactory->makeASTRoot(currentAST, tmp48_AST);
866 match(TORSION);
867 {
868 switch ( LA(1)) {
869 case LBRACKET:
870 {
871 match(LBRACKET);
872 intConst();
873 match(RBRACKET);
874 break;
875 }
876 case LCURLY:
877 {
878 break;
879 }
880 default:
881 {
882 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
883 }
884 }
885 }
886 match(LCURLY);
887 { // ( ... )*
888 for (;;) {
889 if ((_tokenSet_12.member(LA(1)))) {
890 torsionstatement();
891 astFactory->addASTChild( currentAST, returnAST );
892 }
893 else {
894 goto _loop46;
895 }
896
897 }
898 _loop46:;
899 } // ( ... )*
900 ANTLR_USE_NAMESPACE(antlr)RefAST tmp52_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
901 tmp52_AST = astFactory->create(LT(1));
902 astFactory->addASTChild(currentAST, tmp52_AST);
903 match(RCURLY);
904#line 165 "MDParser.g"
905 tmp52_AST->setType(ENDBLOCK);
906#line 907 "MDParser.cpp"
907 torsionblock_AST = currentAST.root;
908 }
909 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
910 reportError(ex);
911 recover(ex,_tokenSet_8);
912 }
913 returnAST = torsionblock_AST;
914}
915
916void MDParser::inversionblock() {
917 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
918 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
919 ANTLR_USE_NAMESPACE(antlr)RefAST inversionblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
920
921 try { // for error handling
922 ANTLR_USE_NAMESPACE(antlr)RefAST tmp53_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
923 tmp53_AST = astFactory->create(LT(1));
924 astFactory->makeASTRoot(currentAST, tmp53_AST);
925 match(INVERSION);
926 {
927 switch ( LA(1)) {
928 case LBRACKET:
929 {
930 match(LBRACKET);
931 intConst();
932 match(RBRACKET);
933 break;
934 }
935 case LCURLY:
936 {
937 break;
938 }
939 default:
940 {
941 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
942 }
943 }
944 }
945 match(LCURLY);
946 { // ( ... )*
947 for (;;) {
948 if ((_tokenSet_13.member(LA(1)))) {
949 inversionstatement();
950 astFactory->addASTChild( currentAST, returnAST );
951 }
952 else {
953 goto _loop51;
954 }
955
956 }
957 _loop51:;
958 } // ( ... )*
959 ANTLR_USE_NAMESPACE(antlr)RefAST tmp57_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
960 tmp57_AST = astFactory->create(LT(1));
961 astFactory->addASTChild(currentAST, tmp57_AST);
962 match(RCURLY);
963#line 180 "MDParser.g"
964 tmp57_AST->setType(ENDBLOCK);
965#line 966 "MDParser.cpp"
966 inversionblock_AST = currentAST.root;
967 }
968 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
969 reportError(ex);
970 recover(ex,_tokenSet_8);
971 }
972 returnAST = inversionblock_AST;
973}
974
975void MDParser::rigidbodyblock() {
976 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
977 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
978 ANTLR_USE_NAMESPACE(antlr)RefAST rigidbodyblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
979
980 try { // for error handling
981 ANTLR_USE_NAMESPACE(antlr)RefAST tmp58_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
982 tmp58_AST = astFactory->create(LT(1));
983 astFactory->makeASTRoot(currentAST, tmp58_AST);
984 match(RIGIDBODY);
985 match(LBRACKET);
986 intConst();
987 astFactory->addASTChild( currentAST, returnAST );
988 match(RBRACKET);
989 match(LCURLY);
990 { // ( ... )*
991 for (;;) {
992 if ((LA(1) == MEMBERS || LA(1) == ID)) {
993 rigidbodystatement();
994 astFactory->addASTChild( currentAST, returnAST );
995 }
996 else {
997 goto _loop55;
998 }
999
1000 }
1001 _loop55:;
1002 } // ( ... )*
1003 ANTLR_USE_NAMESPACE(antlr)RefAST tmp62_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1004 tmp62_AST = astFactory->create(LT(1));
1005 astFactory->addASTChild(currentAST, tmp62_AST);
1006 match(RCURLY);
1007#line 193 "MDParser.g"
1008 tmp62_AST->setType(ENDBLOCK);
1009#line 1010 "MDParser.cpp"
1010 rigidbodyblock_AST = currentAST.root;
1011 }
1012 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1013 reportError(ex);
1014 recover(ex,_tokenSet_8);
1015 }
1016 returnAST = rigidbodyblock_AST;
1017}
1018
1019void MDParser::cutoffgroupblock() {
1020 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1021 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1022 ANTLR_USE_NAMESPACE(antlr)RefAST cutoffgroupblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1023
1024 try { // for error handling
1025 ANTLR_USE_NAMESPACE(antlr)RefAST tmp63_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1026 tmp63_AST = astFactory->create(LT(1));
1027 astFactory->makeASTRoot(currentAST, tmp63_AST);
1028 match(CUTOFFGROUP);
1029 {
1030 switch ( LA(1)) {
1031 case LBRACKET:
1032 {
1033 match(LBRACKET);
1034 intConst();
1035 match(RBRACKET);
1036 break;
1037 }
1038 case LCURLY:
1039 {
1040 break;
1041 }
1042 default:
1043 {
1044 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1045 }
1046 }
1047 }
1048 match(LCURLY);
1049 { // ( ... )*
1050 for (;;) {
1051 if ((LA(1) == MEMBERS || LA(1) == ID)) {
1052 cutoffgroupstatement();
1053 astFactory->addASTChild( currentAST, returnAST );
1054 }
1055 else {
1056 goto _loop60;
1057 }
1058
1059 }
1060 _loop60:;
1061 } // ( ... )*
1062 ANTLR_USE_NAMESPACE(antlr)RefAST tmp67_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1063 tmp67_AST = astFactory->create(LT(1));
1064 astFactory->addASTChild(currentAST, tmp67_AST);
1065 match(RCURLY);
1066#line 200 "MDParser.g"
1067 tmp67_AST->setType(ENDBLOCK);
1068#line 1069 "MDParser.cpp"
1069 cutoffgroupblock_AST = currentAST.root;
1070 }
1071 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1072 reportError(ex);
1073 recover(ex,_tokenSet_8);
1074 }
1075 returnAST = cutoffgroupblock_AST;
1076}
1077
1078void MDParser::fragmentblock() {
1079 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1080 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1081 ANTLR_USE_NAMESPACE(antlr)RefAST fragmentblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1082
1083 try { // for error handling
1084 ANTLR_USE_NAMESPACE(antlr)RefAST tmp68_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1085 tmp68_AST = astFactory->create(LT(1));
1086 astFactory->makeASTRoot(currentAST, tmp68_AST);
1087 match(FRAGMENT);
1088 match(LBRACKET);
1089 intConst();
1090 astFactory->addASTChild( currentAST, returnAST );
1091 match(RBRACKET);
1092 match(LCURLY);
1093 { // ( ... )*
1094 for (;;) {
1095 if ((LA(1) == ID)) {
1096 fragmentstatement();
1097 astFactory->addASTChild( currentAST, returnAST );
1098 }
1099 else {
1100 goto _loop64;
1101 }
1102
1103 }
1104 _loop64:;
1105 } // ( ... )*
1106 ANTLR_USE_NAMESPACE(antlr)RefAST tmp72_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1107 tmp72_AST = astFactory->create(LT(1));
1108 astFactory->addASTChild(currentAST, tmp72_AST);
1109 match(RCURLY);
1110#line 207 "MDParser.g"
1111 tmp72_AST->setType(ENDBLOCK);
1112#line 1113 "MDParser.cpp"
1113 fragmentblock_AST = currentAST.root;
1114 }
1115 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1116 reportError(ex);
1117 recover(ex,_tokenSet_8);
1118 }
1119 returnAST = fragmentblock_AST;
1120}
1121
1122void MDParser::constraintblock() {
1123 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1124 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1125 ANTLR_USE_NAMESPACE(antlr)RefAST constraintblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1126
1127 try { // for error handling
1128 ANTLR_USE_NAMESPACE(antlr)RefAST tmp73_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1129 tmp73_AST = astFactory->create(LT(1));
1130 astFactory->makeASTRoot(currentAST, tmp73_AST);
1131 match(CONSTRAINT);
1132 {
1133 switch ( LA(1)) {
1134 case LBRACKET:
1135 {
1136 match(LBRACKET);
1137 intConst();
1138 match(RBRACKET);
1139 break;
1140 }
1141 case LCURLY:
1142 {
1143 break;
1144 }
1145 default:
1146 {
1147 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1148 }
1149 }
1150 }
1151 match(LCURLY);
1152 { // ( ... )*
1153 for (;;) {
1154 if ((LA(1) == MEMBERS || LA(1) == ID)) {
1155 constraintstatement();
1156 astFactory->addASTChild( currentAST, returnAST );
1157 }
1158 else {
1159 goto _loop69;
1160 }
1161
1162 }
1163 _loop69:;
1164 } // ( ... )*
1165 ANTLR_USE_NAMESPACE(antlr)RefAST tmp77_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1166 tmp77_AST = astFactory->create(LT(1));
1167 astFactory->addASTChild(currentAST, tmp77_AST);
1168 match(RCURLY);
1169#line 213 "MDParser.g"
1170 tmp77_AST->setType(ENDBLOCK);
1171#line 1172 "MDParser.cpp"
1172 constraintblock_AST = currentAST.root;
1173 }
1174 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1175 reportError(ex);
1176 recover(ex,_tokenSet_8);
1177 }
1178 returnAST = constraintblock_AST;
1179}
1180
1181void MDParser::atomstatement() {
1182 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1183 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1184 ANTLR_USE_NAMESPACE(antlr)RefAST atomstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1185
1186 try { // for error handling
1187 switch ( LA(1)) {
1188 case ID:
1189 {
1190 assignment();
1191 astFactory->addASTChild( currentAST, returnAST );
1192 atomstatement_AST = currentAST.root;
1193 break;
1194 }
1195 case POSITION:
1196 {
1197 ANTLR_USE_NAMESPACE(antlr)RefAST tmp78_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1198 tmp78_AST = astFactory->create(LT(1));
1199 astFactory->makeASTRoot(currentAST, tmp78_AST);
1200 match(POSITION);
1201 match(LPAREN);
1202 doubleNumberTuple();
1203 astFactory->addASTChild( currentAST, returnAST );
1204 match(RPAREN);
1205 match(SEMICOLON);
1206 atomstatement_AST = currentAST.root;
1207 break;
1208 }
1209 case ORIENTATION:
1210 {
1211 ANTLR_USE_NAMESPACE(antlr)RefAST tmp82_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1212 tmp82_AST = astFactory->create(LT(1));
1213 astFactory->makeASTRoot(currentAST, tmp82_AST);
1214 match(ORIENTATION);
1215 match(LPAREN);
1216 doubleNumberTuple();
1217 astFactory->addASTChild( currentAST, returnAST );
1218 match(RPAREN);
1219 match(SEMICOLON);
1220 atomstatement_AST = currentAST.root;
1221 break;
1222 }
1223 case CHARGE:
1224 {
1225 ANTLR_USE_NAMESPACE(antlr)RefAST tmp86_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1226 tmp86_AST = astFactory->create(LT(1));
1227 astFactory->makeASTRoot(currentAST, tmp86_AST);
1228 match(CHARGE);
1229 match(LPAREN);
1230 floatConst();
1231 astFactory->addASTChild( currentAST, returnAST );
1232 match(RPAREN);
1233 match(SEMICOLON);
1234 atomstatement_AST = currentAST.root;
1235 break;
1236 }
1237 default:
1238 {
1239 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1240 }
1241 }
1242 }
1243 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1244 reportError(ex);
1245 recover(ex,_tokenSet_14);
1246 }
1247 returnAST = atomstatement_AST;
1248}
1249
1250void MDParser::doubleNumberTuple() {
1251 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1252 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1253 ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumberTuple_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1254
1255 try { // for error handling
1256 doubleNumber();
1257 astFactory->addASTChild( currentAST, returnAST );
1258 { // ( ... )*
1259 for (;;) {
1260 if ((LA(1) == COMMA)) {
1261 match(COMMA);
1262 doubleNumber();
1263 astFactory->addASTChild( currentAST, returnAST );
1264 }
1265 else {
1266 goto _loop73;
1267 }
1268
1269 }
1270 _loop73:;
1271 } // ( ... )*
1272 doubleNumberTuple_AST = currentAST.root;
1273 }
1274 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1275 reportError(ex);
1276 recover(ex,_tokenSet_15);
1277 }
1278 returnAST = doubleNumberTuple_AST;
1279}
1280
1281void MDParser::bondstatement() {
1282 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1283 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1284 ANTLR_USE_NAMESPACE(antlr)RefAST bondstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1285
1286 try { // for error handling
1287 switch ( LA(1)) {
1288 case ID:
1289 {
1290 assignment();
1291 astFactory->addASTChild( currentAST, returnAST );
1292 bondstatement_AST = currentAST.root;
1293 break;
1294 }
1295 case MEMBERS:
1296 {
1297 ANTLR_USE_NAMESPACE(antlr)RefAST tmp91_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1298 tmp91_AST = astFactory->create(LT(1));
1299 astFactory->makeASTRoot(currentAST, tmp91_AST);
1300 match(MEMBERS);
1301 match(LPAREN);
1302 inttuple();
1303 astFactory->addASTChild( currentAST, returnAST );
1304 match(RPAREN);
1305 match(SEMICOLON);
1306 bondstatement_AST = currentAST.root;
1307 break;
1308 }
1309 case FIXED:
1310 {
1311 ANTLR_USE_NAMESPACE(antlr)RefAST tmp95_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1312 tmp95_AST = astFactory->create(LT(1));
1313 astFactory->makeASTRoot(currentAST, tmp95_AST);
1314 match(FIXED);
1315 match(LPAREN);
1316 floatConst();
1317 astFactory->addASTChild( currentAST, returnAST );
1318 match(RPAREN);
1319 match(SEMICOLON);
1320 bondstatement_AST = currentAST.root;
1321 break;
1322 }
1323 case HARMONIC:
1324 {
1325 ANTLR_USE_NAMESPACE(antlr)RefAST tmp99_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1326 tmp99_AST = astFactory->create(LT(1));
1327 astFactory->makeASTRoot(currentAST, tmp99_AST);
1328 match(HARMONIC);
1329 match(LPAREN);
1330 doubleNumberTuple();
1331 astFactory->addASTChild( currentAST, returnAST );
1332 match(RPAREN);
1333 match(SEMICOLON);
1334 bondstatement_AST = currentAST.root;
1335 break;
1336 }
1337 case CUBIC:
1338 {
1339 ANTLR_USE_NAMESPACE(antlr)RefAST tmp103_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1340 tmp103_AST = astFactory->create(LT(1));
1341 astFactory->makeASTRoot(currentAST, tmp103_AST);
1342 match(CUBIC);
1343 match(LPAREN);
1344 doubleNumberTuple();
1345 astFactory->addASTChild( currentAST, returnAST );
1346 match(RPAREN);
1347 match(SEMICOLON);
1348 bondstatement_AST = currentAST.root;
1349 break;
1350 }
1351 case QUARTIC:
1352 {
1353 ANTLR_USE_NAMESPACE(antlr)RefAST tmp107_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1354 tmp107_AST = astFactory->create(LT(1));
1355 astFactory->makeASTRoot(currentAST, tmp107_AST);
1356 match(QUARTIC);
1357 match(LPAREN);
1358 doubleNumberTuple();
1359 astFactory->addASTChild( currentAST, returnAST );
1360 match(RPAREN);
1361 match(SEMICOLON);
1362 bondstatement_AST = currentAST.root;
1363 break;
1364 }
1365 case POLYNOMIAL:
1366 {
1367 ANTLR_USE_NAMESPACE(antlr)RefAST tmp111_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1368 tmp111_AST = astFactory->create(LT(1));
1369 astFactory->makeASTRoot(currentAST, tmp111_AST);
1370 match(POLYNOMIAL);
1371 match(LPAREN);
1372 doubleNumberTuple();
1373 astFactory->addASTChild( currentAST, returnAST );
1374 match(RPAREN);
1375 match(SEMICOLON);
1376 bondstatement_AST = currentAST.root;
1377 break;
1378 }
1379 case MORSE:
1380 {
1381 ANTLR_USE_NAMESPACE(antlr)RefAST tmp115_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1382 tmp115_AST = astFactory->create(LT(1));
1383 astFactory->makeASTRoot(currentAST, tmp115_AST);
1384 match(MORSE);
1385 match(LPAREN);
1386 doubleNumberTuple();
1387 astFactory->addASTChild( currentAST, returnAST );
1388 match(RPAREN);
1389 match(SEMICOLON);
1390 bondstatement_AST = currentAST.root;
1391 break;
1392 }
1393 default:
1394 {
1395 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1396 }
1397 }
1398 }
1399 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1400 reportError(ex);
1401 recover(ex,_tokenSet_16);
1402 }
1403 returnAST = bondstatement_AST;
1404}
1405
1406void MDParser::inttuple() {
1407 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1408 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1409 ANTLR_USE_NAMESPACE(antlr)RefAST inttuple_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1410
1411 try { // for error handling
1412 intConst();
1413 astFactory->addASTChild( currentAST, returnAST );
1414 { // ( ... )*
1415 for (;;) {
1416 if ((LA(1) == COMMA)) {
1417 match(COMMA);
1418 intConst();
1419 astFactory->addASTChild( currentAST, returnAST );
1420 }
1421 else {
1422 goto _loop76;
1423 }
1424
1425 }
1426 _loop76:;
1427 } // ( ... )*
1428 inttuple_AST = currentAST.root;
1429 }
1430 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1431 reportError(ex);
1432 recover(ex,_tokenSet_15);
1433 }
1434 returnAST = inttuple_AST;
1435}
1436
1437void MDParser::bendstatement() {
1438 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1439 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1440 ANTLR_USE_NAMESPACE(antlr)RefAST bendstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1441
1442 try { // for error handling
1443 switch ( LA(1)) {
1444 case ID:
1445 {
1446 assignment();
1447 astFactory->addASTChild( currentAST, returnAST );
1448 bendstatement_AST = currentAST.root;
1449 break;
1450 }
1451 case MEMBERS:
1452 {
1453 ANTLR_USE_NAMESPACE(antlr)RefAST tmp120_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1454 tmp120_AST = astFactory->create(LT(1));
1455 astFactory->makeASTRoot(currentAST, tmp120_AST);
1456 match(MEMBERS);
1457 match(LPAREN);
1458 inttuple();
1459 astFactory->addASTChild( currentAST, returnAST );
1460 match(RPAREN);
1461 match(SEMICOLON);
1462 bendstatement_AST = currentAST.root;
1463 break;
1464 }
1465 case HARMONIC:
1466 {
1467 ANTLR_USE_NAMESPACE(antlr)RefAST tmp124_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1468 tmp124_AST = astFactory->create(LT(1));
1469 astFactory->makeASTRoot(currentAST, tmp124_AST);
1470 match(HARMONIC);
1471 match(LPAREN);
1472 doubleNumberTuple();
1473 astFactory->addASTChild( currentAST, returnAST );
1474 match(RPAREN);
1475 match(SEMICOLON);
1476 bendstatement_AST = currentAST.root;
1477 break;
1478 }
1479 case GHOSTBEND:
1480 {
1481 ANTLR_USE_NAMESPACE(antlr)RefAST tmp128_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1482 tmp128_AST = astFactory->create(LT(1));
1483 astFactory->makeASTRoot(currentAST, tmp128_AST);
1484 match(GHOSTBEND);
1485 match(LPAREN);
1486 doubleNumberTuple();
1487 astFactory->addASTChild( currentAST, returnAST );
1488 match(RPAREN);
1489 match(SEMICOLON);
1490 bendstatement_AST = currentAST.root;
1491 break;
1492 }
1493 case UREYBRADLEY:
1494 {
1495 ANTLR_USE_NAMESPACE(antlr)RefAST tmp132_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1496 tmp132_AST = astFactory->create(LT(1));
1497 astFactory->makeASTRoot(currentAST, tmp132_AST);
1498 match(UREYBRADLEY);
1499 match(LPAREN);
1500 doubleNumberTuple();
1501 astFactory->addASTChild( currentAST, returnAST );
1502 match(RPAREN);
1503 match(SEMICOLON);
1504 bendstatement_AST = currentAST.root;
1505 break;
1506 }
1507 case CUBIC:
1508 {
1509 ANTLR_USE_NAMESPACE(antlr)RefAST tmp136_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1510 tmp136_AST = astFactory->create(LT(1));
1511 astFactory->makeASTRoot(currentAST, tmp136_AST);
1512 match(CUBIC);
1513 match(LPAREN);
1514 doubleNumberTuple();
1515 astFactory->addASTChild( currentAST, returnAST );
1516 match(RPAREN);
1517 match(SEMICOLON);
1518 bendstatement_AST = currentAST.root;
1519 break;
1520 }
1521 case QUARTIC:
1522 {
1523 ANTLR_USE_NAMESPACE(antlr)RefAST tmp140_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1524 tmp140_AST = astFactory->create(LT(1));
1525 astFactory->makeASTRoot(currentAST, tmp140_AST);
1526 match(QUARTIC);
1527 match(LPAREN);
1528 doubleNumberTuple();
1529 astFactory->addASTChild( currentAST, returnAST );
1530 match(RPAREN);
1531 match(SEMICOLON);
1532 bendstatement_AST = currentAST.root;
1533 break;
1534 }
1535 case POLYNOMIAL:
1536 {
1537 ANTLR_USE_NAMESPACE(antlr)RefAST tmp144_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1538 tmp144_AST = astFactory->create(LT(1));
1539 astFactory->makeASTRoot(currentAST, tmp144_AST);
1540 match(POLYNOMIAL);
1541 match(LPAREN);
1542 doubleNumberTuple();
1543 astFactory->addASTChild( currentAST, returnAST );
1544 match(RPAREN);
1545 match(SEMICOLON);
1546 bendstatement_AST = currentAST.root;
1547 break;
1548 }
1549 case COSINE:
1550 {
1551 ANTLR_USE_NAMESPACE(antlr)RefAST tmp148_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1552 tmp148_AST = astFactory->create(LT(1));
1553 astFactory->makeASTRoot(currentAST, tmp148_AST);
1554 match(COSINE);
1555 match(LPAREN);
1556 doubleNumberTuple();
1557 astFactory->addASTChild( currentAST, returnAST );
1558 match(RPAREN);
1559 match(SEMICOLON);
1560 bendstatement_AST = currentAST.root;
1561 break;
1562 }
1563 default:
1564 {
1565 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1566 }
1567 }
1568 }
1569 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1570 reportError(ex);
1571 recover(ex,_tokenSet_17);
1572 }
1573 returnAST = bendstatement_AST;
1574}
1575
1576void MDParser::torsionstatement() {
1577 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1578 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1579 ANTLR_USE_NAMESPACE(antlr)RefAST torsionstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1580
1581 try { // for error handling
1582 switch ( LA(1)) {
1583 case ID:
1584 {
1585 assignment();
1586 astFactory->addASTChild( currentAST, returnAST );
1587 torsionstatement_AST = currentAST.root;
1588 break;
1589 }
1590 case MEMBERS:
1591 {
1592 ANTLR_USE_NAMESPACE(antlr)RefAST tmp152_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1593 tmp152_AST = astFactory->create(LT(1));
1594 astFactory->makeASTRoot(currentAST, tmp152_AST);
1595 match(MEMBERS);
1596 match(LPAREN);
1597 inttuple();
1598 astFactory->addASTChild( currentAST, returnAST );
1599 match(RPAREN);
1600 match(SEMICOLON);
1601 torsionstatement_AST = currentAST.root;
1602 break;
1603 }
1604 case GHOSTTORSION:
1605 {
1606 ANTLR_USE_NAMESPACE(antlr)RefAST tmp156_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1607 tmp156_AST = astFactory->create(LT(1));
1608 astFactory->makeASTRoot(currentAST, tmp156_AST);
1609 match(GHOSTTORSION);
1610 match(LPAREN);
1611 doubleNumberTuple();
1612 astFactory->addASTChild( currentAST, returnAST );
1613 match(RPAREN);
1614 match(SEMICOLON);
1615 torsionstatement_AST = currentAST.root;
1616 break;
1617 }
1618 case CUBIC:
1619 {
1620 ANTLR_USE_NAMESPACE(antlr)RefAST tmp160_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1621 tmp160_AST = astFactory->create(LT(1));
1622 astFactory->makeASTRoot(currentAST, tmp160_AST);
1623 match(CUBIC);
1624 match(LPAREN);
1625 doubleNumberTuple();
1626 astFactory->addASTChild( currentAST, returnAST );
1627 match(RPAREN);
1628 match(SEMICOLON);
1629 torsionstatement_AST = currentAST.root;
1630 break;
1631 }
1632 case QUARTIC:
1633 {
1634 ANTLR_USE_NAMESPACE(antlr)RefAST tmp164_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1635 tmp164_AST = astFactory->create(LT(1));
1636 astFactory->makeASTRoot(currentAST, tmp164_AST);
1637 match(QUARTIC);
1638 match(LPAREN);
1639 doubleNumberTuple();
1640 astFactory->addASTChild( currentAST, returnAST );
1641 match(RPAREN);
1642 match(SEMICOLON);
1643 torsionstatement_AST = currentAST.root;
1644 break;
1645 }
1646 case POLYNOMIAL:
1647 {
1648 ANTLR_USE_NAMESPACE(antlr)RefAST tmp168_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1649 tmp168_AST = astFactory->create(LT(1));
1650 astFactory->makeASTRoot(currentAST, tmp168_AST);
1651 match(POLYNOMIAL);
1652 match(LPAREN);
1653 doubleNumberTuple();
1654 astFactory->addASTChild( currentAST, returnAST );
1655 match(RPAREN);
1656 match(SEMICOLON);
1657 torsionstatement_AST = currentAST.root;
1658 break;
1659 }
1660 case CHARMM:
1661 {
1662 ANTLR_USE_NAMESPACE(antlr)RefAST tmp172_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1663 tmp172_AST = astFactory->create(LT(1));
1664 astFactory->makeASTRoot(currentAST, tmp172_AST);
1665 match(CHARMM);
1666 match(LPAREN);
1667 doubleNumberTuple();
1668 astFactory->addASTChild( currentAST, returnAST );
1669 match(RPAREN);
1670 match(SEMICOLON);
1671 torsionstatement_AST = currentAST.root;
1672 break;
1673 }
1674 case OPLS:
1675 {
1676 ANTLR_USE_NAMESPACE(antlr)RefAST tmp176_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1677 tmp176_AST = astFactory->create(LT(1));
1678 astFactory->makeASTRoot(currentAST, tmp176_AST);
1679 match(OPLS);
1680 match(LPAREN);
1681 doubleNumberTuple();
1682 astFactory->addASTChild( currentAST, returnAST );
1683 match(RPAREN);
1684 match(SEMICOLON);
1685 torsionstatement_AST = currentAST.root;
1686 break;
1687 }
1688 case TRAPPE:
1689 {
1690 ANTLR_USE_NAMESPACE(antlr)RefAST tmp180_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1691 tmp180_AST = astFactory->create(LT(1));
1692 astFactory->makeASTRoot(currentAST, tmp180_AST);
1693 match(TRAPPE);
1694 match(LPAREN);
1695 doubleNumberTuple();
1696 astFactory->addASTChild( currentAST, returnAST );
1697 match(RPAREN);
1698 match(SEMICOLON);
1699 torsionstatement_AST = currentAST.root;
1700 break;
1701 }
1702 case HARMONIC:
1703 {
1704 ANTLR_USE_NAMESPACE(antlr)RefAST tmp184_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1705 tmp184_AST = astFactory->create(LT(1));
1706 astFactory->makeASTRoot(currentAST, tmp184_AST);
1707 match(HARMONIC);
1708 match(LPAREN);
1709 doubleNumberTuple();
1710 astFactory->addASTChild( currentAST, returnAST );
1711 match(RPAREN);
1712 match(SEMICOLON);
1713 torsionstatement_AST = currentAST.root;
1714 break;
1715 }
1716 default:
1717 {
1718 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1719 }
1720 }
1721 }
1722 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1723 reportError(ex);
1724 recover(ex,_tokenSet_18);
1725 }
1726 returnAST = torsionstatement_AST;
1727}
1728
1729void MDParser::inversionstatement() {
1730 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1731 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1732 ANTLR_USE_NAMESPACE(antlr)RefAST inversionstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1733
1734 try { // for error handling
1735 switch ( LA(1)) {
1736 case ID:
1737 {
1738 assignment();
1739 astFactory->addASTChild( currentAST, returnAST );
1740 inversionstatement_AST = currentAST.root;
1741 break;
1742 }
1743 case CENTER:
1744 {
1745 ANTLR_USE_NAMESPACE(antlr)RefAST tmp188_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1746 tmp188_AST = astFactory->create(LT(1));
1747 astFactory->makeASTRoot(currentAST, tmp188_AST);
1748 match(CENTER);
1749 match(LPAREN);
1750 intConst();
1751 astFactory->addASTChild( currentAST, returnAST );
1752 match(RPAREN);
1753 match(SEMICOLON);
1754 inversionstatement_AST = currentAST.root;
1755 break;
1756 }
1757 case SATELLITES:
1758 {
1759 ANTLR_USE_NAMESPACE(antlr)RefAST tmp192_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1760 tmp192_AST = astFactory->create(LT(1));
1761 astFactory->makeASTRoot(currentAST, tmp192_AST);
1762 match(SATELLITES);
1763 match(LPAREN);
1764 inttuple();
1765 astFactory->addASTChild( currentAST, returnAST );
1766 match(RPAREN);
1767 match(SEMICOLON);
1768 inversionstatement_AST = currentAST.root;
1769 break;
1770 }
1771 case AMBERIMPROPER:
1772 {
1773 ANTLR_USE_NAMESPACE(antlr)RefAST tmp196_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1774 tmp196_AST = astFactory->create(LT(1));
1775 astFactory->makeASTRoot(currentAST, tmp196_AST);
1776 match(AMBERIMPROPER);
1777 match(LPAREN);
1778 doubleNumberTuple();
1779 astFactory->addASTChild( currentAST, returnAST );
1780 match(RPAREN);
1781 match(SEMICOLON);
1782 inversionstatement_AST = currentAST.root;
1783 break;
1784 }
1785 case IMPROPERCOSINE:
1786 {
1787 ANTLR_USE_NAMESPACE(antlr)RefAST tmp200_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1788 tmp200_AST = astFactory->create(LT(1));
1789 astFactory->makeASTRoot(currentAST, tmp200_AST);
1790 match(IMPROPERCOSINE);
1791 match(LPAREN);
1792 doubleNumberTuple();
1793 astFactory->addASTChild( currentAST, returnAST );
1794 match(RPAREN);
1795 match(SEMICOLON);
1796 inversionstatement_AST = currentAST.root;
1797 break;
1798 }
1799 case HARMONIC:
1800 {
1801 ANTLR_USE_NAMESPACE(antlr)RefAST tmp204_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1802 tmp204_AST = astFactory->create(LT(1));
1803 astFactory->makeASTRoot(currentAST, tmp204_AST);
1804 match(HARMONIC);
1805 match(LPAREN);
1806 doubleNumberTuple();
1807 astFactory->addASTChild( currentAST, returnAST );
1808 match(RPAREN);
1809 match(SEMICOLON);
1810 inversionstatement_AST = currentAST.root;
1811 break;
1812 }
1813 case CENTRALATOMHEIGHT:
1814 {
1815 ANTLR_USE_NAMESPACE(antlr)RefAST tmp208_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1816 tmp208_AST = astFactory->create(LT(1));
1817 astFactory->makeASTRoot(currentAST, tmp208_AST);
1818 match(CENTRALATOMHEIGHT);
1819 match(LPAREN);
1820 doubleNumberTuple();
1821 astFactory->addASTChild( currentAST, returnAST );
1822 match(RPAREN);
1823 match(SEMICOLON);
1824 inversionstatement_AST = currentAST.root;
1825 break;
1826 }
1827 case DREIDING:
1828 {
1829 ANTLR_USE_NAMESPACE(antlr)RefAST tmp212_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1830 tmp212_AST = astFactory->create(LT(1));
1831 astFactory->makeASTRoot(currentAST, tmp212_AST);
1832 match(DREIDING);
1833 match(LPAREN);
1834 doubleNumberTuple();
1835 astFactory->addASTChild( currentAST, returnAST );
1836 match(RPAREN);
1837 match(SEMICOLON);
1838 inversionstatement_AST = currentAST.root;
1839 break;
1840 }
1841 default:
1842 {
1843 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1844 }
1845 }
1846 }
1847 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1848 reportError(ex);
1849 recover(ex,_tokenSet_19);
1850 }
1851 returnAST = inversionstatement_AST;
1852}
1853
1854void MDParser::rigidbodystatement() {
1855 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1856 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1857 ANTLR_USE_NAMESPACE(antlr)RefAST rigidbodystatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1858
1859 try { // for error handling
1860 switch ( LA(1)) {
1861 case ID:
1862 {
1863 assignment();
1864 astFactory->addASTChild( currentAST, returnAST );
1865 rigidbodystatement_AST = currentAST.root;
1866 break;
1867 }
1868 case MEMBERS:
1869 {
1870 ANTLR_USE_NAMESPACE(antlr)RefAST tmp216_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1871 tmp216_AST = astFactory->create(LT(1));
1872 astFactory->makeASTRoot(currentAST, tmp216_AST);
1873 match(MEMBERS);
1874 match(LPAREN);
1875 inttuple();
1876 astFactory->addASTChild( currentAST, returnAST );
1877 match(RPAREN);
1878 match(SEMICOLON);
1879 rigidbodystatement_AST = currentAST.root;
1880 break;
1881 }
1882 default:
1883 {
1884 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1885 }
1886 }
1887 }
1888 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1889 reportError(ex);
1890 recover(ex,_tokenSet_20);
1891 }
1892 returnAST = rigidbodystatement_AST;
1893}
1894
1895void MDParser::cutoffgroupstatement() {
1896 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1897 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1898 ANTLR_USE_NAMESPACE(antlr)RefAST cutoffgroupstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1899
1900 try { // for error handling
1901 switch ( LA(1)) {
1902 case ID:
1903 {
1904 assignment();
1905 astFactory->addASTChild( currentAST, returnAST );
1906 cutoffgroupstatement_AST = currentAST.root;
1907 break;
1908 }
1909 case MEMBERS:
1910 {
1911 ANTLR_USE_NAMESPACE(antlr)RefAST tmp220_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1912 tmp220_AST = astFactory->create(LT(1));
1913 astFactory->makeASTRoot(currentAST, tmp220_AST);
1914 match(MEMBERS);
1915 match(LPAREN);
1916 inttuple();
1917 astFactory->addASTChild( currentAST, returnAST );
1918 match(RPAREN);
1919 match(SEMICOLON);
1920 cutoffgroupstatement_AST = currentAST.root;
1921 break;
1922 }
1923 default:
1924 {
1925 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1926 }
1927 }
1928 }
1929 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1930 reportError(ex);
1931 recover(ex,_tokenSet_20);
1932 }
1933 returnAST = cutoffgroupstatement_AST;
1934}
1935
1936void MDParser::fragmentstatement() {
1937 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1938 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1939 ANTLR_USE_NAMESPACE(antlr)RefAST fragmentstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1940
1941 try { // for error handling
1942 assignment();
1943 astFactory->addASTChild( currentAST, returnAST );
1944 fragmentstatement_AST = currentAST.root;
1945 }
1946 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1947 reportError(ex);
1948 recover(ex,_tokenSet_21);
1949 }
1950 returnAST = fragmentstatement_AST;
1951}
1952
1953void MDParser::constraintstatement() {
1954 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1955 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1956 ANTLR_USE_NAMESPACE(antlr)RefAST constraintstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1957
1958 try { // for error handling
1959 switch ( LA(1)) {
1960 case ID:
1961 {
1962 assignment();
1963 astFactory->addASTChild( currentAST, returnAST );
1964 constraintstatement_AST = currentAST.root;
1965 break;
1966 }
1967 case MEMBERS:
1968 {
1969 ANTLR_USE_NAMESPACE(antlr)RefAST tmp224_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1970 tmp224_AST = astFactory->create(LT(1));
1971 astFactory->makeASTRoot(currentAST, tmp224_AST);
1972 match(MEMBERS);
1973 match(LPAREN);
1974 inttuple();
1975 astFactory->addASTChild( currentAST, returnAST );
1976 match(RPAREN);
1977 match(SEMICOLON);
1978 constraintstatement_AST = currentAST.root;
1979 break;
1980 }
1981 default:
1982 {
1983 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
1984 }
1985 }
1986 }
1987 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1988 reportError(ex);
1989 recover(ex,_tokenSet_20);
1990 }
1991 returnAST = constraintstatement_AST;
1992}
1993
1994void MDParser::doubleNumber() {
1995 returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1996 ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST;
1997 ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumber_AST = ANTLR_USE_NAMESPACE(antlr)nullAST;
1998
1999 try { // for error handling
2000 {
2001 switch ( LA(1)) {
2002 case NUM_INT:
2003 case NUM_LONG:
2004 {
2005 intConst();
2006 astFactory->addASTChild( currentAST, returnAST );
2007 break;
2008 }
2009 case NUM_FLOAT:
2010 case NUM_DOUBLE:
2011 {
2012 floatConst();
2013 astFactory->addASTChild( currentAST, returnAST );
2014 break;
2015 }
2016 default:
2017 {
2018 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
2019 }
2020 }
2021 }
2022 doubleNumber_AST = currentAST.root;
2023 }
2024 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
2025 reportError(ex);
2026 recover(ex,_tokenSet_22);
2027 }
2028 returnAST = doubleNumber_AST;
2029}
2030
2031void MDParser::initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory )
2032{
2033 factory.setMaxNodeType(77);
2034}
2035const char* MDParser::tokenNames[] = {
2036 "<0>",
2037 "EOF",
2038 "<2>",
2039 "NULL_TREE_LOOKAHEAD",
2040 "\"component\"",
2041 "\"molecule\"",
2042 "\"zconstraint\"",
2043 "\"restraint\"",
2044 "\"atom\"",
2045 "\"bond\"",
2046 "\"bend\"",
2047 "\"torsion\"",
2048 "\"inversion\"",
2049 "\"rigidBody\"",
2050 "\"cutoffGroup\"",
2051 "\"constraint\"",
2052 "\"distance\"",
2053 "\"fragment\"",
2054 "\"members\"",
2055 "\"center\"",
2056 "\"satellites\"",
2057 "\"position\"",
2058 "\"orientation\"",
2059 "\"flucQ\"",
2060 "\"RNEMD\"",
2061 "\"minimizer\"",
2062 "\"Fixed\"",
2063 "\"Harmonic\"",
2064 "\"Cubic\"",
2065 "\"Quartic\"",
2066 "\"Polynomial\"",
2067 "\"Morse\"",
2068 "\"GhostBend\"",
2069 "\"UreyBradley\"",
2070 "\"Cosine\"",
2071 "\"GhostTorsion\"",
2072 "\"Charmm\"",
2073 "\"Opls\"",
2074 "\"Trappe\"",
2075 "\"AmberImproper\"",
2076 "\"ImproperCosine\"",
2077 "\"CentralAtomHeight\"",
2078 "\"Dreiding\"",
2079 "\"charge\"",
2080 "ENDBLOCK",
2081 "ID",
2082 "ASSIGNEQUAL",
2083 "SEMICOLON",
2084 "StringLiteral",
2085 "LCURLY",
2086 "RCURLY",
2087 "LBRACKET",
2088 "RBRACKET",
2089 "LPAREN",
2090 "RPAREN",
2091 "COMMA",
2092 "NUM_INT",
2093 "NUM_LONG",
2094 "NUM_FLOAT",
2095 "NUM_DOUBLE",
2096 "DOT",
2097 "COLON",
2098 "QUESTIONMARK",
2099 "Whitespace",
2100 "Comment",
2101 "CPPComment",
2102 "a line directive",
2103 "LineDirective",
2104 "Space",
2105 "CharLiteral",
2106 "EndOfLine",
2107 "Escape",
2108 "Vocabulary",
2109 "Digit",
2110 "Decimal",
2111 "HEX_DIGIT",
2112 "EXPONENT",
2113 "FLOAT_SUFFIX",
2114 0
2115};
2116
2117const unsigned long MDParser::_tokenSet_0_data_[] = { 58720496UL, 8192UL, 0UL, 0UL };
2118// "component" "molecule" "zconstraint" "restraint" "flucQ" "RNEMD" "minimizer"
2119// ID
2120const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_0(_tokenSet_0_data_,4);
2121const unsigned long MDParser::_tokenSet_1_data_[] = { 2UL, 0UL, 0UL, 0UL };
2122// EOF
2123const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_1(_tokenSet_1_data_,4);
2124const unsigned long MDParser::_tokenSet_2_data_[] = { 58720498UL, 8192UL, 0UL, 0UL };
2125// EOF "component" "molecule" "zconstraint" "restraint" "flucQ" "RNEMD"
2126// "minimizer" ID
2127const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_2(_tokenSet_2_data_,4);
2128const unsigned long MDParser::_tokenSet_3_data_[] = { 4294901746UL, 274431UL, 0UL, 0UL };
2129// EOF "component" "molecule" "zconstraint" "restraint" "atom" "bond" "bend"
2130// "torsion" "inversion" "rigidBody" "cutoffGroup" "constraint" "fragment"
2131// "members" "center" "satellites" "position" "orientation" "flucQ" "RNEMD"
2132// "minimizer" "Fixed" "Harmonic" "Cubic" "Quartic" "Polynomial" "Morse"
2133// "GhostBend" "UreyBradley" "Cosine" "GhostTorsion" "Charmm" "Opls" "Trappe"
2134// "AmberImproper" "ImproperCosine" "CentralAtomHeight" "Dreiding" "charge"
2135// ID RCURLY
2136const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_3(_tokenSet_3_data_,4);
2137const unsigned long MDParser::_tokenSet_4_data_[] = { 196352UL, 8192UL, 0UL, 0UL };
2138// "atom" "bond" "bend" "torsion" "inversion" "rigidBody" "cutoffGroup"
2139// "constraint" "fragment" ID
2140const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_4(_tokenSet_4_data_,4);
2141const unsigned long MDParser::_tokenSet_5_data_[] = { 0UL, 32768UL, 0UL, 0UL };
2142// SEMICOLON
2143const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_5(_tokenSet_5_data_,4);
2144const unsigned long MDParser::_tokenSet_6_data_[] = { 0UL, 13664256UL, 0UL, 0UL };
2145// SEMICOLON RBRACKET RPAREN COMMA
2146const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_6(_tokenSet_6_data_,4);
2147const unsigned long MDParser::_tokenSet_7_data_[] = { 0UL, 12615680UL, 0UL, 0UL };
2148// SEMICOLON RPAREN COMMA
2149const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_7(_tokenSet_7_data_,4);
2150const unsigned long MDParser::_tokenSet_8_data_[] = { 196352UL, 270336UL, 0UL, 0UL };
2151// "atom" "bond" "bend" "torsion" "inversion" "rigidBody" "cutoffGroup"
2152// "constraint" "fragment" ID RCURLY
2153const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_8(_tokenSet_8_data_,4);
2154const unsigned long MDParser::_tokenSet_9_data_[] = { 6291456UL, 10240UL, 0UL, 0UL };
2155// "position" "orientation" "charge" ID
2156const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_9(_tokenSet_9_data_,4);
2157const unsigned long MDParser::_tokenSet_10_data_[] = { 4228120576UL, 8192UL, 0UL, 0UL };
2158// "members" "Fixed" "Harmonic" "Cubic" "Quartic" "Polynomial" "Morse"
2159// ID
2160const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_10(_tokenSet_10_data_,4);
2161const unsigned long MDParser::_tokenSet_11_data_[] = { 2013528064UL, 8199UL, 0UL, 0UL };
2162// "members" "Harmonic" "Cubic" "Quartic" "Polynomial" "GhostBend" "UreyBradley"
2163// "Cosine" ID
2164const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_11(_tokenSet_11_data_,4);
2165const unsigned long MDParser::_tokenSet_12_data_[] = { 2013528064UL, 8312UL, 0UL, 0UL };
2166// "members" "Harmonic" "Cubic" "Quartic" "Polynomial" "GhostTorsion" "Charmm"
2167// "Opls" "Trappe" ID
2168const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_12(_tokenSet_12_data_,4);
2169const unsigned long MDParser::_tokenSet_13_data_[] = { 135790592UL, 10112UL, 0UL, 0UL };
2170// "center" "satellites" "Harmonic" "AmberImproper" "ImproperCosine" "CentralAtomHeight"
2171// "Dreiding" ID
2172const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_13(_tokenSet_13_data_,4);
2173const unsigned long MDParser::_tokenSet_14_data_[] = { 6291456UL, 272384UL, 0UL, 0UL };
2174// "position" "orientation" "charge" ID RCURLY
2175const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_14(_tokenSet_14_data_,4);
2176const unsigned long MDParser::_tokenSet_15_data_[] = { 0UL, 4194304UL, 0UL, 0UL };
2177// RPAREN
2178const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_15(_tokenSet_15_data_,4);
2179const unsigned long MDParser::_tokenSet_16_data_[] = { 4228120576UL, 270336UL, 0UL, 0UL };
2180// "members" "Fixed" "Harmonic" "Cubic" "Quartic" "Polynomial" "Morse"
2181// ID RCURLY
2182const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_16(_tokenSet_16_data_,4);
2183const unsigned long MDParser::_tokenSet_17_data_[] = { 2013528064UL, 270343UL, 0UL, 0UL };
2184// "members" "Harmonic" "Cubic" "Quartic" "Polynomial" "GhostBend" "UreyBradley"
2185// "Cosine" ID RCURLY
2186const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_17(_tokenSet_17_data_,4);
2187const unsigned long MDParser::_tokenSet_18_data_[] = { 2013528064UL, 270456UL, 0UL, 0UL };
2188// "members" "Harmonic" "Cubic" "Quartic" "Polynomial" "GhostTorsion" "Charmm"
2189// "Opls" "Trappe" ID RCURLY
2190const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_18(_tokenSet_18_data_,4);
2191const unsigned long MDParser::_tokenSet_19_data_[] = { 135790592UL, 272256UL, 0UL, 0UL };
2192// "center" "satellites" "Harmonic" "AmberImproper" "ImproperCosine" "CentralAtomHeight"
2193// "Dreiding" ID RCURLY
2194const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_19(_tokenSet_19_data_,4);
2195const unsigned long MDParser::_tokenSet_20_data_[] = { 262144UL, 270336UL, 0UL, 0UL };
2196// "members" ID RCURLY
2197const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_20(_tokenSet_20_data_,4);
2198const unsigned long MDParser::_tokenSet_21_data_[] = { 0UL, 270336UL, 0UL, 0UL };
2199// ID RCURLY
2200const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_21(_tokenSet_21_data_,4);
2201const unsigned long MDParser::_tokenSet_22_data_[] = { 0UL, 12582912UL, 0UL, 0UL };
2202// RPAREN COMMA
2203const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_22(_tokenSet_22_data_,4);
2204
2205