OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
MDTreeParser.cpp
1/* $ANTLR 2.7.7 (2006-11-01): "MDTreeParser.g" -> "MDTreeParser.cpp"$ */
2#include "MDTreeParser.hpp"
3#include <antlr/Token.hpp>
4#include <antlr/AST.hpp>
5#include <antlr/NoViableAltException.hpp>
6#include <antlr/MismatchedTokenException.hpp>
7#include <antlr/SemanticException.hpp>
8#include <antlr/BitSet.hpp>
9#line 1 "MDTreeParser.g"
10#line 11 "MDTreeParser.cpp"
11MDTreeParser::MDTreeParser()
12 : ANTLR_USE_NAMESPACE(antlr)TreeParser() {
13}
14
15void MDTreeParser::mdfile(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
16 ANTLR_USE_NAMESPACE(antlr)RefAST mdfile_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
17
18 try { // for error handling
19 { // ( ... )*
20 for (;;) {
21 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
22 _t = ASTNULL;
23 if ((_tokenSet_0.member(_t->getType()))) {
24 statement(_t);
25 _t = _retTree;
26 }
27 else {
28 goto _loop3;
29 }
30
31 }
32 _loop3:;
33 } // ( ... )*
34#line 34 "MDTreeParser.g"
35 blockStack.top()->validate(); blockStack.pop();
36#line 37 "MDTreeParser.cpp"
37 }
38 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
39 reportError(ex);
40 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
41 _t = _t->getNextSibling();
42 }
43 _retTree = _t;
44}
45
46void MDTreeParser::statement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
47 ANTLR_USE_NAMESPACE(antlr)RefAST statement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
48
49 try { // for error handling
50 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
51 _t = ASTNULL;
52 switch ( _t->getType()) {
53 case ASSIGNEQUAL:
54 {
55 assignment(_t);
56 _t = _retTree;
57 break;
58 }
59 case COMPONENT:
60 {
61 componentblock(_t);
62 _t = _retTree;
63 break;
64 }
65 case MOLECULE:
66 {
67 moleculeblock(_t);
68 _t = _retTree;
69 break;
70 }
71 case FRAGMENT:
72 {
73 fragmentblock(_t);
74 _t = _retTree;
75 break;
76 }
77 case ZCONSTRAINT:
78 {
79 zconstraintblock(_t);
80 _t = _retTree;
81 break;
82 }
83 case RESTRAINT:
84 {
85 restraintblock(_t);
86 _t = _retTree;
87 break;
88 }
89 case FLUCQ:
90 {
91 flucqblock(_t);
92 _t = _retTree;
93 break;
94 }
95 case RNEMD:
96 {
97 rnemdblock(_t);
98 _t = _retTree;
99 break;
100 }
101 case LIGHT:
102 {
103 lightblock(_t);
104 _t = _retTree;
105 break;
106 }
107 case MINIMIZER:
108 {
109 minimizerblock(_t);
110 _t = _retTree;
111 break;
112 }
113 default:
114 {
115 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
116 }
117 }
118 }
119 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
120 reportError(ex);
121 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
122 _t = _t->getNextSibling();
123 }
124 _retTree = _t;
125}
126
127void MDTreeParser::assignment(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
128 ANTLR_USE_NAMESPACE(antlr)RefAST assignment_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
129 ANTLR_USE_NAMESPACE(antlr)RefAST id = ANTLR_USE_NAMESPACE(antlr)nullAST;
130
131 try { // for error handling
132 ANTLR_USE_NAMESPACE(antlr)RefAST __t6 = _t;
133 ANTLR_USE_NAMESPACE(antlr)RefAST tmp1_AST_in = _t;
134 match(_t,ASSIGNEQUAL);
135 _t = _t->getFirstChild();
136 id = _t;
137 match(_t,ID);
138 _t = _t->getNextSibling();
139 constant(_t,id);
140 _t = _retTree;
141 _t = __t6;
142 _t = _t->getNextSibling();
143 }
144 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
145 reportError(ex);
146 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
147 _t = _t->getNextSibling();
148 }
149 _retTree = _t;
150}
151
152void MDTreeParser::componentblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
153 ANTLR_USE_NAMESPACE(antlr)RefAST componentblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
154
155 try { // for error handling
156 ANTLR_USE_NAMESPACE(antlr)RefAST __t10 = _t;
157 ANTLR_USE_NAMESPACE(antlr)RefAST tmp2_AST_in = _t;
158 match(_t,COMPONENT);
159 _t = _t->getFirstChild();
160#line 72 "MDTreeParser.g"
161 Component* currComponet = new Component(); blockStack.push(currComponet);
162#line 163 "MDTreeParser.cpp"
163 { // ( ... )*
164 for (;;) {
165 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
166 _t = ASTNULL;
167 if ((_t->getType() == ASSIGNEQUAL)) {
168 assignment(_t);
169 _t = _retTree;
170 }
171 else {
172 goto _loop12;
173 }
174
175 }
176 _loop12:;
177 } // ( ... )*
178 ANTLR_USE_NAMESPACE(antlr)RefAST tmp3_AST_in = _t;
179 match(_t,ENDBLOCK);
180 _t = _t->getNextSibling();
181 _t = __t10;
182 _t = _t->getNextSibling();
183#line 74 "MDTreeParser.g"
184 blockStack.top()->validate();blockStack.pop(); currConf->addComponent(currComponet);
185#line 186 "MDTreeParser.cpp"
186 }
187 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
188 reportError(ex);
189 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
190 _t = _t->getNextSibling();
191 }
192 _retTree = _t;
193}
194
195void MDTreeParser::moleculeblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
196 ANTLR_USE_NAMESPACE(antlr)RefAST moleculeblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
197
198 try { // for error handling
199 ANTLR_USE_NAMESPACE(antlr)RefAST __t38 = _t;
200 ANTLR_USE_NAMESPACE(antlr)RefAST tmp4_AST_in = _t;
201 match(_t,MOLECULE);
202 _t = _t->getFirstChild();
203#line 108 "MDTreeParser.g"
204 MoleculeStamp* currMoleculeStamp = new MoleculeStamp(); blockStack.push(currMoleculeStamp);
205#line 206 "MDTreeParser.cpp"
206 { // ( ... )*
207 for (;;) {
208 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
209 _t = ASTNULL;
210 if ((_tokenSet_1.member(_t->getType()))) {
211 moleculestatement(_t);
212 _t = _retTree;
213 }
214 else {
215 goto _loop40;
216 }
217
218 }
219 _loop40:;
220 } // ( ... )*
221 ANTLR_USE_NAMESPACE(antlr)RefAST tmp5_AST_in = _t;
222 match(_t,ENDBLOCK);
223 _t = _t->getNextSibling();
224 _t = __t38;
225 _t = _t->getNextSibling();
226#line 110 "MDTreeParser.g"
227 blockStack.top()->validate(); blockStack.pop(); currConf->addMoleculeStamp(currMoleculeStamp);
228#line 229 "MDTreeParser.cpp"
229 }
230 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
231 reportError(ex);
232 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
233 _t = _t->getNextSibling();
234 }
235 _retTree = _t;
236}
237
238void MDTreeParser::fragmentblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
239 ANTLR_USE_NAMESPACE(antlr)RefAST fragmentblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
240
241 try { // for error handling
242 ANTLR_USE_NAMESPACE(antlr)RefAST __t45 = _t;
243 ANTLR_USE_NAMESPACE(antlr)RefAST tmp6_AST_in = _t;
244 match(_t,FRAGMENT);
245 _t = _t->getFirstChild();
246#line 128 "MDTreeParser.g"
247 FragmentStamp* currFragmentStamp = new FragmentStamp(); blockStack.push(currFragmentStamp);
248#line 249 "MDTreeParser.cpp"
249 { // ( ... )*
250 for (;;) {
251 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
252 _t = ASTNULL;
253 if ((_tokenSet_2.member(_t->getType()))) {
254 fragmentstatement(_t);
255 _t = _retTree;
256 }
257 else {
258 goto _loop47;
259 }
260
261 }
262 _loop47:;
263 } // ( ... )*
264 ANTLR_USE_NAMESPACE(antlr)RefAST tmp7_AST_in = _t;
265 match(_t,ENDBLOCK);
266 _t = _t->getNextSibling();
267 _t = __t45;
268 _t = _t->getNextSibling();
269#line 130 "MDTreeParser.g"
270 blockStack.top()->validate(); blockStack.pop(); currConf->addFragmentStamp(currFragmentStamp);
271#line 272 "MDTreeParser.cpp"
272 }
273 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
274 reportError(ex);
275 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
276 _t = _t->getNextSibling();
277 }
278 _retTree = _t;
279}
280
281void MDTreeParser::zconstraintblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
282 ANTLR_USE_NAMESPACE(antlr)RefAST zconstraintblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
283
284 try { // for error handling
285 ANTLR_USE_NAMESPACE(antlr)RefAST __t14 = _t;
286 ANTLR_USE_NAMESPACE(antlr)RefAST tmp8_AST_in = _t;
287 match(_t,ZCONSTRAINT);
288 _t = _t->getFirstChild();
289#line 77 "MDTreeParser.g"
290 ZConsStamp* currZConsStamp = new ZConsStamp(); blockStack.push(currZConsStamp);
291#line 292 "MDTreeParser.cpp"
292 { // ( ... )*
293 for (;;) {
294 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
295 _t = ASTNULL;
296 if ((_t->getType() == ASSIGNEQUAL)) {
297 assignment(_t);
298 _t = _retTree;
299 }
300 else {
301 goto _loop16;
302 }
303
304 }
305 _loop16:;
306 } // ( ... )*
307 ANTLR_USE_NAMESPACE(antlr)RefAST tmp9_AST_in = _t;
308 match(_t,ENDBLOCK);
309 _t = _t->getNextSibling();
310 _t = __t14;
311 _t = _t->getNextSibling();
312#line 79 "MDTreeParser.g"
313 blockStack.top()->validate();blockStack.pop(); currConf->addZConsStamp(currZConsStamp);
314#line 315 "MDTreeParser.cpp"
315 }
316 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
317 reportError(ex);
318 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
319 _t = _t->getNextSibling();
320 }
321 _retTree = _t;
322}
323
324void MDTreeParser::restraintblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
325 ANTLR_USE_NAMESPACE(antlr)RefAST restraintblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
326
327 try { // for error handling
328 ANTLR_USE_NAMESPACE(antlr)RefAST __t18 = _t;
329 ANTLR_USE_NAMESPACE(antlr)RefAST tmp10_AST_in = _t;
330 match(_t,RESTRAINT);
331 _t = _t->getFirstChild();
332#line 82 "MDTreeParser.g"
333 RestraintStamp* currRestraintStamp = new RestraintStamp(); blockStack.push(currRestraintStamp);
334#line 335 "MDTreeParser.cpp"
335 { // ( ... )*
336 for (;;) {
337 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
338 _t = ASTNULL;
339 if ((_t->getType() == ASSIGNEQUAL)) {
340 assignment(_t);
341 _t = _retTree;
342 }
343 else {
344 goto _loop20;
345 }
346
347 }
348 _loop20:;
349 } // ( ... )*
350 ANTLR_USE_NAMESPACE(antlr)RefAST tmp11_AST_in = _t;
351 match(_t,ENDBLOCK);
352 _t = _t->getNextSibling();
353 _t = __t18;
354 _t = _t->getNextSibling();
355#line 84 "MDTreeParser.g"
356 blockStack.top()->validate();blockStack.pop(); currConf->addRestraintStamp(currRestraintStamp);
357#line 358 "MDTreeParser.cpp"
358 }
359 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
360 reportError(ex);
361 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
362 _t = _t->getNextSibling();
363 }
364 _retTree = _t;
365}
366
367void MDTreeParser::flucqblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
368 ANTLR_USE_NAMESPACE(antlr)RefAST flucqblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
369
370 try { // for error handling
371 ANTLR_USE_NAMESPACE(antlr)RefAST __t22 = _t;
372 ANTLR_USE_NAMESPACE(antlr)RefAST tmp12_AST_in = _t;
373 match(_t,FLUCQ);
374 _t = _t->getFirstChild();
375#line 87 "MDTreeParser.g"
376 FluctuatingChargeParameters* flucQpars = new FluctuatingChargeParameters(); blockStack.push(flucQpars);
377#line 378 "MDTreeParser.cpp"
378 { // ( ... )*
379 for (;;) {
380 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
381 _t = ASTNULL;
382 if ((_t->getType() == ASSIGNEQUAL)) {
383 assignment(_t);
384 _t = _retTree;
385 }
386 else {
387 goto _loop24;
388 }
389
390 }
391 _loop24:;
392 } // ( ... )*
393 ANTLR_USE_NAMESPACE(antlr)RefAST tmp13_AST_in = _t;
394 match(_t,ENDBLOCK);
395 _t = _t->getNextSibling();
396 _t = __t22;
397 _t = _t->getNextSibling();
398#line 89 "MDTreeParser.g"
399 blockStack.top()->validate();blockStack.pop(); currConf->addFluctuatingChargeParameters(flucQpars);
400#line 401 "MDTreeParser.cpp"
401 }
402 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
403 reportError(ex);
404 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
405 _t = _t->getNextSibling();
406 }
407 _retTree = _t;
408}
409
410void MDTreeParser::rnemdblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
411 ANTLR_USE_NAMESPACE(antlr)RefAST rnemdblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
412
413 try { // for error handling
414 ANTLR_USE_NAMESPACE(antlr)RefAST __t26 = _t;
415 ANTLR_USE_NAMESPACE(antlr)RefAST tmp14_AST_in = _t;
416 match(_t,RNEMD);
417 _t = _t->getFirstChild();
418#line 92 "MDTreeParser.g"
419 RNEMD::RNEMDParameters* rnemdPars = new RNEMD::RNEMDParameters(); blockStack.push(rnemdPars);
420#line 421 "MDTreeParser.cpp"
421 { // ( ... )*
422 for (;;) {
423 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
424 _t = ASTNULL;
425 if ((_t->getType() == ASSIGNEQUAL)) {
426 assignment(_t);
427 _t = _retTree;
428 }
429 else {
430 goto _loop28;
431 }
432
433 }
434 _loop28:;
435 } // ( ... )*
436 ANTLR_USE_NAMESPACE(antlr)RefAST tmp15_AST_in = _t;
437 match(_t,ENDBLOCK);
438 _t = _t->getNextSibling();
439 _t = __t26;
440 _t = _t->getNextSibling();
441#line 94 "MDTreeParser.g"
442 blockStack.top()->validate();blockStack.pop(); currConf->addRNEMDParameters(rnemdPars);
443#line 444 "MDTreeParser.cpp"
444 }
445 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
446 reportError(ex);
447 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
448 _t = _t->getNextSibling();
449 }
450 _retTree = _t;
451}
452
453void MDTreeParser::lightblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
454 ANTLR_USE_NAMESPACE(antlr)RefAST lightblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
455
456 try { // for error handling
457 ANTLR_USE_NAMESPACE(antlr)RefAST __t30 = _t;
458 ANTLR_USE_NAMESPACE(antlr)RefAST tmp16_AST_in = _t;
459 match(_t,LIGHT);
460 _t = _t->getFirstChild();
461#line 97 "MDTreeParser.g"
462 Perturbations::LightParameters* lightPars = new Perturbations::LightParameters(); blockStack.push(lightPars);
463#line 464 "MDTreeParser.cpp"
464 { // ( ... )*
465 for (;;) {
466 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
467 _t = ASTNULL;
468 if ((_t->getType() == ASSIGNEQUAL)) {
469 assignment(_t);
470 _t = _retTree;
471 }
472 else {
473 goto _loop32;
474 }
475
476 }
477 _loop32:;
478 } // ( ... )*
479 ANTLR_USE_NAMESPACE(antlr)RefAST tmp17_AST_in = _t;
480 match(_t,ENDBLOCK);
481 _t = _t->getNextSibling();
482 _t = __t30;
483 _t = _t->getNextSibling();
484#line 99 "MDTreeParser.g"
485 blockStack.top()->validate();blockStack.pop(); currConf->addLightParameters(lightPars);
486#line 487 "MDTreeParser.cpp"
487 }
488 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
489 reportError(ex);
490 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
491 _t = _t->getNextSibling();
492 }
493 _retTree = _t;
494}
495
496void MDTreeParser::minimizerblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
497 ANTLR_USE_NAMESPACE(antlr)RefAST minimizerblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
498
499 try { // for error handling
500 ANTLR_USE_NAMESPACE(antlr)RefAST __t34 = _t;
501 ANTLR_USE_NAMESPACE(antlr)RefAST tmp18_AST_in = _t;
502 match(_t,MINIMIZER);
503 _t = _t->getFirstChild();
504#line 102 "MDTreeParser.g"
505 MinimizerParameters* minimizerPars = new MinimizerParameters(); blockStack.push(minimizerPars);
506#line 507 "MDTreeParser.cpp"
507 { // ( ... )*
508 for (;;) {
509 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
510 _t = ASTNULL;
511 if ((_t->getType() == ASSIGNEQUAL)) {
512 assignment(_t);
513 _t = _retTree;
514 }
515 else {
516 goto _loop36;
517 }
518
519 }
520 _loop36:;
521 } // ( ... )*
522 ANTLR_USE_NAMESPACE(antlr)RefAST tmp19_AST_in = _t;
523 match(_t,ENDBLOCK);
524 _t = _t->getNextSibling();
525 _t = __t34;
526 _t = _t->getNextSibling();
527#line 104 "MDTreeParser.g"
528 blockStack.top()->validate();blockStack.pop(); currConf->addMinimizerParameters(minimizerPars);
529#line 530 "MDTreeParser.cpp"
530 }
531 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
532 reportError(ex);
533 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
534 _t = _t->getNextSibling();
535 }
536 _retTree = _t;
537}
538
539void MDTreeParser::constant(ANTLR_USE_NAMESPACE(antlr)RefAST _t,
540 ANTLR_USE_NAMESPACE(antlr)RefAST id
541) {
542 ANTLR_USE_NAMESPACE(antlr)RefAST constant_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
543 ANTLR_USE_NAMESPACE(antlr)RefAST str1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
544 ANTLR_USE_NAMESPACE(antlr)RefAST str2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
545#line 52 "MDTreeParser.g"
546
547 int ival;
548 RealType dval;
549 std::vector<RealType> dvec;
550
551#line 552 "MDTreeParser.cpp"
552
553 try { // for error handling
554 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
555 _t = ASTNULL;
556 switch ( _t->getType()) {
557 case NUM_INT:
558 case NUM_LONG:
559 {
560 ival=intConst(_t);
561 _t = _retTree;
562#line 58 "MDTreeParser.g"
563 blockStack.top()->assign(id->getText(), ival);
564#line 565 "MDTreeParser.cpp"
565 break;
566 }
567 case NUM_FLOAT:
568 case NUM_DOUBLE:
569 {
570 dval=floatConst(_t);
571 _t = _retTree;
572#line 59 "MDTreeParser.g"
573 blockStack.top()->assign(id->getText(), dval);
574#line 575 "MDTreeParser.cpp"
575 break;
576 }
577 case ID:
578 {
579 str1 = _t;
580 match(_t,ID);
581 _t = _t->getNextSibling();
582#line 60 "MDTreeParser.g"
583 blockStack.top()->assign(id->getText(), str1->getText());
584#line 585 "MDTreeParser.cpp"
585 break;
586 }
587 case StringLiteral:
588 {
589 str2 = _t;
590 match(_t,StringLiteral);
591 _t = _t->getNextSibling();
592#line 61 "MDTreeParser.g"
593 std::string s = str2->getText();
594 s = s.substr(1, s.length()-2);
595 blockStack.top()->assign(id->getText(),s);
596
597#line 598 "MDTreeParser.cpp"
598 break;
599 }
600 case LPAREN:
601 {
602 ANTLR_USE_NAMESPACE(antlr)RefAST __t8 = _t;
603 ANTLR_USE_NAMESPACE(antlr)RefAST tmp20_AST_in = _t;
604 match(_t,LPAREN);
605 _t = _t->getFirstChild();
606 dvec=doubleNumberTuple(_t);
607 _t = _retTree;
608 ANTLR_USE_NAMESPACE(antlr)RefAST tmp21_AST_in = _t;
609 match(_t,RPAREN);
610 _t = _t->getNextSibling();
611 _t = __t8;
612 _t = _t->getNextSibling();
613#line 66 "MDTreeParser.g"
614
615 blockStack.top()->assign(id->getText(), dvec);
616
617#line 618 "MDTreeParser.cpp"
618 break;
619 }
620 default:
621 {
622 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
623 }
624 }
625 }
626 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
627 reportError(ex);
628 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
629 _t = _t->getNextSibling();
630 }
631 _retTree = _t;
632}
633
634int MDTreeParser::intConst(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
635#line 382 "MDTreeParser.g"
636 int ival;
637#line 638 "MDTreeParser.cpp"
638 ANTLR_USE_NAMESPACE(antlr)RefAST intConst_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
639 ANTLR_USE_NAMESPACE(antlr)RefAST i1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
640 ANTLR_USE_NAMESPACE(antlr)RefAST i2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
641
642 try { // for error handling
643 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
644 _t = ASTNULL;
645 switch ( _t->getType()) {
646 case NUM_INT:
647 {
648 i1 = _t;
649 match(_t,NUM_INT);
650 _t = _t->getNextSibling();
651#line 383 "MDTreeParser.g"
652 ival = lexi_cast<int>(i1->getText());
653#line 654 "MDTreeParser.cpp"
654 break;
655 }
656 case NUM_LONG:
657 {
658 i2 = _t;
659 match(_t,NUM_LONG);
660 _t = _t->getNextSibling();
661#line 384 "MDTreeParser.g"
662 ival = lexi_cast<int>(i2->getText());
663#line 664 "MDTreeParser.cpp"
664 break;
665 }
666 default:
667 {
668 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
669 }
670 }
671 }
672 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
673 reportError(ex);
674 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
675 _t = _t->getNextSibling();
676 }
677 _retTree = _t;
678 return ival;
679}
680
681RealType MDTreeParser::floatConst(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
682#line 394 "MDTreeParser.g"
683 RealType dval;
684#line 685 "MDTreeParser.cpp"
685 ANTLR_USE_NAMESPACE(antlr)RefAST floatConst_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
686 ANTLR_USE_NAMESPACE(antlr)RefAST d1 = ANTLR_USE_NAMESPACE(antlr)nullAST;
687 ANTLR_USE_NAMESPACE(antlr)RefAST d2 = ANTLR_USE_NAMESPACE(antlr)nullAST;
688
689 try { // for error handling
690 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
691 _t = ASTNULL;
692 switch ( _t->getType()) {
693 case NUM_FLOAT:
694 {
695 d1 = _t;
696 match(_t,NUM_FLOAT);
697 _t = _t->getNextSibling();
698#line 395 "MDTreeParser.g"
699 dval = lexi_cast<RealType>(d1->getText());
700#line 701 "MDTreeParser.cpp"
701 break;
702 }
703 case NUM_DOUBLE:
704 {
705 d2 = _t;
706 match(_t,NUM_DOUBLE);
707 _t = _t->getNextSibling();
708#line 396 "MDTreeParser.g"
709 dval = lexi_cast<RealType>(d2->getText());
710#line 711 "MDTreeParser.cpp"
711 break;
712 }
713 default:
714 {
715 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
716 }
717 }
718 }
719 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
720 reportError(ex);
721 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
722 _t = _t->getNextSibling();
723 }
724 _retTree = _t;
725 return dval;
726}
727
728vector<RealType> MDTreeParser::doubleNumberTuple(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
729#line 366 "MDTreeParser.g"
730 vector<RealType> dvec;
731#line 732 "MDTreeParser.cpp"
732 ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumberTuple_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
733#line 366 "MDTreeParser.g"
734
735 RealType dval;
736
737#line 738 "MDTreeParser.cpp"
738
739 try { // for error handling
740 { // ( ... )+
741 int _cnt134=0;
742 for (;;) {
743 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
744 _t = ASTNULL;
745 if (((_t->getType() >= NUM_INT && _t->getType() <= NUM_DOUBLE))) {
746 dval=doubleNumber(_t);
747 _t = _retTree;
748#line 370 "MDTreeParser.g"
749 dvec.push_back(dval);
750#line 751 "MDTreeParser.cpp"
751 }
752 else {
753 if ( _cnt134>=1 ) { goto _loop134; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);}
754 }
755
756 _cnt134++;
757 }
758 _loop134:;
759 } // ( ... )+
760 }
761 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
762 reportError(ex);
763 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
764 _t = _t->getNextSibling();
765 }
766 _retTree = _t;
767 return dvec;
768}
769
770void MDTreeParser::moleculestatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
771 ANTLR_USE_NAMESPACE(antlr)RefAST moleculestatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
772
773 try { // for error handling
774 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
775 _t = ASTNULL;
776 switch ( _t->getType()) {
777 case ATOM:
778 {
779 atomblock(_t);
780 _t = _retTree;
781 break;
782 }
783 case BOND:
784 {
785 bondblock(_t);
786 _t = _retTree;
787 break;
788 }
789 case BEND:
790 {
791 bendblock(_t);
792 _t = _retTree;
793 break;
794 }
795 case TORSION:
796 {
797 torsionblock(_t);
798 _t = _retTree;
799 break;
800 }
801 case INVERSION:
802 {
803 inversionblock(_t);
804 _t = _retTree;
805 break;
806 }
807 case RIGIDBODY:
808 {
809 rigidbodyblock(_t);
810 _t = _retTree;
811 break;
812 }
813 case CUTOFFGROUP:
814 {
815 cutoffgroupblock(_t);
816 _t = _retTree;
817 break;
818 }
819 case CONSTRAINT:
820 {
821 constraintblock(_t);
822 _t = _retTree;
823 break;
824 }
825 default:
826 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
827 _t = ASTNULL;
828 if ((_t->getType() == ASSIGNEQUAL)) {
829 assignment(_t);
830 _t = _retTree;
831 }
832 else if ((_t->getType() == ASSIGNEQUAL)) {
833 sequencestring(_t);
834 _t = _retTree;
835 }
836 else {
837 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
838 }
839 }
840 }
841 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
842 reportError(ex);
843 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
844 _t = _t->getNextSibling();
845 }
846 _retTree = _t;
847}
848
849void MDTreeParser::atomblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
850 ANTLR_USE_NAMESPACE(antlr)RefAST atomblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
851#line 145 "MDTreeParser.g"
852
853 int index;
854
855#line 856 "MDTreeParser.cpp"
856
857 try { // for error handling
858 ANTLR_USE_NAMESPACE(antlr)RefAST __t50 = _t;
859 ANTLR_USE_NAMESPACE(antlr)RefAST tmp22_AST_in = _t;
860 match(_t,ATOM);
861 _t = _t->getFirstChild();
862 index=intConst(_t);
863 _t = _retTree;
864#line 149 "MDTreeParser.g"
865 AtomStamp* currAtomStamp = new AtomStamp(index); blockStack.push(currAtomStamp);
866#line 867 "MDTreeParser.cpp"
867 { // ( ... )*
868 for (;;) {
869 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
870 _t = ASTNULL;
871 if ((_tokenSet_3.member(_t->getType()))) {
872 atomstatement(_t);
873 _t = _retTree;
874 }
875 else {
876 goto _loop52;
877 }
878
879 }
880 _loop52:;
881 } // ( ... )*
882 ANTLR_USE_NAMESPACE(antlr)RefAST tmp23_AST_in = _t;
883 match(_t,ENDBLOCK);
884 _t = _t->getNextSibling();
885 _t = __t50;
886 _t = _t->getNextSibling();
887#line 151 "MDTreeParser.g"
888
889 blockStack.top()->validate();
890 blockStack.pop();
891 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
892 currMoleculeStamp->addAtomStamp(currAtomStamp);
893
894#line 895 "MDTreeParser.cpp"
895 }
896 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
897 reportError(ex);
898 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
899 _t = _t->getNextSibling();
900 }
901 _retTree = _t;
902}
903
904void MDTreeParser::bondblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
905 ANTLR_USE_NAMESPACE(antlr)RefAST bondblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
906
907 try { // for error handling
908 ANTLR_USE_NAMESPACE(antlr)RefAST __t58 = _t;
909 ANTLR_USE_NAMESPACE(antlr)RefAST tmp24_AST_in = _t;
910 match(_t,BOND);
911 _t = _t->getFirstChild();
912#line 174 "MDTreeParser.g"
913 BondStamp* currBondStamp = new BondStamp(); blockStack.push(currBondStamp);
914#line 915 "MDTreeParser.cpp"
915 { // ( ... )*
916 for (;;) {
917 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
918 _t = ASTNULL;
919 if ((_tokenSet_4.member(_t->getType()))) {
920 bondstatement(_t);
921 _t = _retTree;
922 }
923 else {
924 goto _loop60;
925 }
926
927 }
928 _loop60:;
929 } // ( ... )*
930 ANTLR_USE_NAMESPACE(antlr)RefAST tmp25_AST_in = _t;
931 match(_t,ENDBLOCK);
932 _t = _t->getNextSibling();
933 _t = __t58;
934 _t = _t->getNextSibling();
935#line 176 "MDTreeParser.g"
936
937 blockStack.top()->validate();
938 blockStack.pop();
939 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
940 currMoleculeStamp->addBondStamp(currBondStamp);
941
942#line 943 "MDTreeParser.cpp"
943 }
944 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
945 reportError(ex);
946 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
947 _t = _t->getNextSibling();
948 }
949 _retTree = _t;
950}
951
952void MDTreeParser::bendblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
953 ANTLR_USE_NAMESPACE(antlr)RefAST bendblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
954
955 try { // for error handling
956 ANTLR_USE_NAMESPACE(antlr)RefAST __t70 = _t;
957 ANTLR_USE_NAMESPACE(antlr)RefAST tmp26_AST_in = _t;
958 match(_t,BEND);
959 _t = _t->getFirstChild();
960#line 201 "MDTreeParser.g"
961 BendStamp* currBendStamp = new BendStamp(); blockStack.push(currBendStamp);
962#line 963 "MDTreeParser.cpp"
963 { // ( ... )*
964 for (;;) {
965 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
966 _t = ASTNULL;
967 if ((_tokenSet_5.member(_t->getType()))) {
968 bendstatement(_t);
969 _t = _retTree;
970 }
971 else {
972 goto _loop72;
973 }
974
975 }
976 _loop72:;
977 } // ( ... )*
978 ANTLR_USE_NAMESPACE(antlr)RefAST tmp27_AST_in = _t;
979 match(_t,ENDBLOCK);
980 _t = _t->getNextSibling();
981 _t = __t70;
982 _t = _t->getNextSibling();
983#line 203 "MDTreeParser.g"
984
985 blockStack.top()->validate();
986 blockStack.pop();
987 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
988 currMoleculeStamp->addBendStamp(currBendStamp);
989
990#line 991 "MDTreeParser.cpp"
991 }
992 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
993 reportError(ex);
994 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
995 _t = _t->getNextSibling();
996 }
997 _retTree = _t;
998}
999
1000void MDTreeParser::torsionblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1001 ANTLR_USE_NAMESPACE(antlr)RefAST torsionblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1002
1003 try { // for error handling
1004 ANTLR_USE_NAMESPACE(antlr)RefAST __t83 = _t;
1005 ANTLR_USE_NAMESPACE(antlr)RefAST tmp28_AST_in = _t;
1006 match(_t,TORSION);
1007 _t = _t->getFirstChild();
1008#line 228 "MDTreeParser.g"
1009 TorsionStamp* currTorsionStamp = new TorsionStamp(); blockStack.push(currTorsionStamp);
1010#line 1011 "MDTreeParser.cpp"
1011 { // ( ... )*
1012 for (;;) {
1013 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1014 _t = ASTNULL;
1015 if ((_tokenSet_6.member(_t->getType()))) {
1016 torsionstatement(_t);
1017 _t = _retTree;
1018 }
1019 else {
1020 goto _loop85;
1021 }
1022
1023 }
1024 _loop85:;
1025 } // ( ... )*
1026 ANTLR_USE_NAMESPACE(antlr)RefAST tmp29_AST_in = _t;
1027 match(_t,ENDBLOCK);
1028 _t = _t->getNextSibling();
1029 _t = __t83;
1030 _t = _t->getNextSibling();
1031#line 230 "MDTreeParser.g"
1032
1033 blockStack.top()->validate();
1034 blockStack.pop();
1035 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
1036 currMoleculeStamp->addTorsionStamp(currTorsionStamp);
1037
1038#line 1039 "MDTreeParser.cpp"
1039 }
1040 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1041 reportError(ex);
1042 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1043 _t = _t->getNextSibling();
1044 }
1045 _retTree = _t;
1046}
1047
1048void MDTreeParser::inversionblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1049 ANTLR_USE_NAMESPACE(antlr)RefAST inversionblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1050
1051 try { // for error handling
1052 ANTLR_USE_NAMESPACE(antlr)RefAST __t97 = _t;
1053 ANTLR_USE_NAMESPACE(antlr)RefAST tmp30_AST_in = _t;
1054 match(_t,INVERSION);
1055 _t = _t->getFirstChild();
1056#line 257 "MDTreeParser.g"
1057 InversionStamp* currInversionStamp = new InversionStamp(); blockStack.push(currInversionStamp);
1058#line 1059 "MDTreeParser.cpp"
1059 { // ( ... )*
1060 for (;;) {
1061 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1062 _t = ASTNULL;
1063 if ((_tokenSet_7.member(_t->getType()))) {
1064 inversionstatement(_t);
1065 _t = _retTree;
1066 }
1067 else {
1068 goto _loop99;
1069 }
1070
1071 }
1072 _loop99:;
1073 } // ( ... )*
1074 ANTLR_USE_NAMESPACE(antlr)RefAST tmp31_AST_in = _t;
1075 match(_t,ENDBLOCK);
1076 _t = _t->getNextSibling();
1077 _t = __t97;
1078 _t = _t->getNextSibling();
1079#line 259 "MDTreeParser.g"
1080
1081 blockStack.top()->validate();
1082 blockStack.pop();
1083 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
1084 currMoleculeStamp->addInversionStamp(currInversionStamp);
1085
1086#line 1087 "MDTreeParser.cpp"
1087 }
1088 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1089 reportError(ex);
1090 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1091 _t = _t->getNextSibling();
1092 }
1093 _retTree = _t;
1094}
1095
1096void MDTreeParser::rigidbodyblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1097 ANTLR_USE_NAMESPACE(antlr)RefAST rigidbodyblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1098#line 285 "MDTreeParser.g"
1099
1100 int index;
1101
1102#line 1103 "MDTreeParser.cpp"
1103
1104 try { // for error handling
1105 ANTLR_USE_NAMESPACE(antlr)RefAST __t109 = _t;
1106 ANTLR_USE_NAMESPACE(antlr)RefAST tmp32_AST_in = _t;
1107 match(_t,RIGIDBODY);
1108 _t = _t->getFirstChild();
1109 index=intConst(_t);
1110 _t = _retTree;
1111#line 289 "MDTreeParser.g"
1112 RigidBodyStamp* currRigidBodyStamp = new RigidBodyStamp(index); blockStack.push(currRigidBodyStamp);
1113#line 1114 "MDTreeParser.cpp"
1114 { // ( ... )*
1115 for (;;) {
1116 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1117 _t = ASTNULL;
1118 if ((_t->getType() == MEMBERS || _t->getType() == ASSIGNEQUAL)) {
1119 rigidbodystatement(_t);
1120 _t = _retTree;
1121 }
1122 else {
1123 goto _loop111;
1124 }
1125
1126 }
1127 _loop111:;
1128 } // ( ... )*
1129 ANTLR_USE_NAMESPACE(antlr)RefAST tmp33_AST_in = _t;
1130 match(_t,ENDBLOCK);
1131 _t = _t->getNextSibling();
1132 _t = __t109;
1133 _t = _t->getNextSibling();
1134#line 291 "MDTreeParser.g"
1135
1136 blockStack.top()->validate();
1137 blockStack.pop();
1138 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
1139 currMoleculeStamp->addRigidBodyStamp(currRigidBodyStamp);
1140
1141#line 1142 "MDTreeParser.cpp"
1142 }
1143 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1144 reportError(ex);
1145 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1146 _t = _t->getNextSibling();
1147 }
1148 _retTree = _t;
1149}
1150
1151void MDTreeParser::cutoffgroupblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1152 ANTLR_USE_NAMESPACE(antlr)RefAST cutoffgroupblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1153
1154 try { // for error handling
1155 ANTLR_USE_NAMESPACE(antlr)RefAST __t115 = _t;
1156 ANTLR_USE_NAMESPACE(antlr)RefAST tmp34_AST_in = _t;
1157 match(_t,CUTOFFGROUP);
1158 _t = _t->getFirstChild();
1159#line 308 "MDTreeParser.g"
1160 CutoffGroupStamp* currCutoffGroupStamp = new CutoffGroupStamp(); blockStack.push(currCutoffGroupStamp);
1161#line 1162 "MDTreeParser.cpp"
1162 { // ( ... )*
1163 for (;;) {
1164 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1165 _t = ASTNULL;
1166 if ((_t->getType() == MEMBERS || _t->getType() == ASSIGNEQUAL)) {
1167 cutoffgroupstatement(_t);
1168 _t = _retTree;
1169 }
1170 else {
1171 goto _loop117;
1172 }
1173
1174 }
1175 _loop117:;
1176 } // ( ... )*
1177 ANTLR_USE_NAMESPACE(antlr)RefAST tmp35_AST_in = _t;
1178 match(_t,ENDBLOCK);
1179 _t = _t->getNextSibling();
1180 _t = __t115;
1181 _t = _t->getNextSibling();
1182#line 310 "MDTreeParser.g"
1183
1184 blockStack.top()->validate();
1185 blockStack.pop();
1186 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
1187 currMoleculeStamp->addCutoffGroupStamp(currCutoffGroupStamp);
1188
1189#line 1190 "MDTreeParser.cpp"
1190 }
1191 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1192 reportError(ex);
1193 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1194 _t = _t->getNextSibling();
1195 }
1196 _retTree = _t;
1197}
1198
1199void MDTreeParser::constraintblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1200 ANTLR_USE_NAMESPACE(antlr)RefAST constraintblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1201
1202 try { // for error handling
1203 ANTLR_USE_NAMESPACE(antlr)RefAST __t121 = _t;
1204 ANTLR_USE_NAMESPACE(antlr)RefAST tmp36_AST_in = _t;
1205 match(_t,CONSTRAINT);
1206 _t = _t->getFirstChild();
1207#line 328 "MDTreeParser.g"
1208 ConstraintStamp* currConstraintStamp = new ConstraintStamp(); blockStack.push(currConstraintStamp);
1209#line 1210 "MDTreeParser.cpp"
1210 { // ( ... )*
1211 for (;;) {
1212 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1213 _t = ASTNULL;
1214 if ((_t->getType() == MEMBERS || _t->getType() == ASSIGNEQUAL)) {
1215 constraintstatement(_t);
1216 _t = _retTree;
1217 }
1218 else {
1219 goto _loop123;
1220 }
1221
1222 }
1223 _loop123:;
1224 } // ( ... )*
1225 ANTLR_USE_NAMESPACE(antlr)RefAST tmp37_AST_in = _t;
1226 match(_t,ENDBLOCK);
1227 _t = _t->getNextSibling();
1228 _t = __t121;
1229 _t = _t->getNextSibling();
1230#line 330 "MDTreeParser.g"
1231
1232 blockStack.pop();
1233 MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
1234 currMoleculeStamp->addConstraintStamp(currConstraintStamp);
1235
1236#line 1237 "MDTreeParser.cpp"
1237 }
1238 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1239 reportError(ex);
1240 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1241 _t = _t->getNextSibling();
1242 }
1243 _retTree = _t;
1244}
1245
1246void MDTreeParser::sequencestring(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1247 ANTLR_USE_NAMESPACE(antlr)RefAST sequencestring_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1248 ANTLR_USE_NAMESPACE(antlr)RefAST id = ANTLR_USE_NAMESPACE(antlr)nullAST;
1249
1250 try { // for error handling
1251 ANTLR_USE_NAMESPACE(antlr)RefAST __t43 = _t;
1252 ANTLR_USE_NAMESPACE(antlr)RefAST tmp38_AST_in = _t;
1253 match(_t,ASSIGNEQUAL);
1254 _t = _t->getFirstChild();
1255 id = _t;
1256 match(_t,SEQUENCE);
1257 _t = _t->getNextSibling();
1258 constant(_t,id);
1259 _t = _retTree;
1260 _t = __t43;
1261 _t = _t->getNextSibling();
1262 }
1263 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1264 reportError(ex);
1265 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1266 _t = _t->getNextSibling();
1267 }
1268 _retTree = _t;
1269}
1270
1271void MDTreeParser::fragmentstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1272 ANTLR_USE_NAMESPACE(antlr)RefAST fragmentstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1273
1274 try { // for error handling
1275 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1276 _t = ASTNULL;
1277 switch ( _t->getType()) {
1278 case ASSIGNEQUAL:
1279 {
1280 assignment(_t);
1281 _t = _retTree;
1282 break;
1283 }
1284 case ATOM:
1285 {
1286 atomblock(_t);
1287 _t = _retTree;
1288 break;
1289 }
1290 case BOND:
1291 {
1292 bondblock(_t);
1293 _t = _retTree;
1294 break;
1295 }
1296 case BEND:
1297 {
1298 bendblock(_t);
1299 _t = _retTree;
1300 break;
1301 }
1302 case TORSION:
1303 {
1304 torsionblock(_t);
1305 _t = _retTree;
1306 break;
1307 }
1308 case INVERSION:
1309 {
1310 inversionblock(_t);
1311 _t = _retTree;
1312 break;
1313 }
1314 case RIGIDBODY:
1315 {
1316 rigidbodyblock(_t);
1317 _t = _retTree;
1318 break;
1319 }
1320 case CUTOFFGROUP:
1321 {
1322 cutoffgroupblock(_t);
1323 _t = _retTree;
1324 break;
1325 }
1326 case CONSTRAINT:
1327 {
1328 constraintblock(_t);
1329 _t = _retTree;
1330 break;
1331 }
1332 case NODES:
1333 {
1334 nodesblock(_t);
1335 _t = _retTree;
1336 break;
1337 }
1338 default:
1339 {
1340 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
1341 }
1342 }
1343 }
1344 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1345 reportError(ex);
1346 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1347 _t = _t->getNextSibling();
1348 }
1349 _retTree = _t;
1350}
1351
1352void MDTreeParser::nodesblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1353 ANTLR_USE_NAMESPACE(antlr)RefAST nodesblock_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1354
1355 try { // for error handling
1356 ANTLR_USE_NAMESPACE(antlr)RefAST __t127 = _t;
1357 ANTLR_USE_NAMESPACE(antlr)RefAST tmp39_AST_in = _t;
1358 match(_t,NODES);
1359 _t = _t->getFirstChild();
1360#line 347 "MDTreeParser.g"
1361 NodesStamp* currNodesStamp = new NodesStamp(); blockStack.push(currNodesStamp);
1362#line 1363 "MDTreeParser.cpp"
1363 { // ( ... )*
1364 for (;;) {
1365 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1366 _t = ASTNULL;
1367 if ((_t->getType() == MEMBERS || _t->getType() == ASSIGNEQUAL)) {
1368 nodesstatement(_t);
1369 _t = _retTree;
1370 }
1371 else {
1372 goto _loop129;
1373 }
1374
1375 }
1376 _loop129:;
1377 } // ( ... )*
1378 ANTLR_USE_NAMESPACE(antlr)RefAST tmp40_AST_in = _t;
1379 match(_t,ENDBLOCK);
1380 _t = _t->getNextSibling();
1381 _t = __t127;
1382 _t = _t->getNextSibling();
1383#line 349 "MDTreeParser.g"
1384
1385 blockStack.top()->validate();
1386 blockStack.pop();
1387 FragmentStamp* currFragmentStamp = static_cast<FragmentStamp*>(blockStack.top());
1388 currFragmentStamp->addNodesStamp(currNodesStamp);
1389
1390#line 1391 "MDTreeParser.cpp"
1391 }
1392 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1393 reportError(ex);
1394 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1395 _t = _t->getNextSibling();
1396 }
1397 _retTree = _t;
1398}
1399
1400void MDTreeParser::atomstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1401 ANTLR_USE_NAMESPACE(antlr)RefAST atomstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1402#line 159 "MDTreeParser.g"
1403
1404 vector<RealType> dvec;
1405 RealType rval;
1406 AtomStamp* currAtomStamp = static_cast<AtomStamp*>(blockStack.top());
1407
1408
1409#line 1410 "MDTreeParser.cpp"
1410
1411 try { // for error handling
1412 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1413 _t = ASTNULL;
1414 switch ( _t->getType()) {
1415 case ASSIGNEQUAL:
1416 {
1417 assignment(_t);
1418 _t = _retTree;
1419 break;
1420 }
1421 case POSITION:
1422 {
1423 ANTLR_USE_NAMESPACE(antlr)RefAST __t54 = _t;
1424 ANTLR_USE_NAMESPACE(antlr)RefAST tmp41_AST_in = _t;
1425 match(_t,POSITION);
1426 _t = _t->getFirstChild();
1427 dvec=doubleNumberTuple(_t);
1428 _t = _retTree;
1429 _t = __t54;
1430 _t = _t->getNextSibling();
1431#line 167 "MDTreeParser.g"
1432 currAtomStamp->setPosition(dvec);
1433#line 1434 "MDTreeParser.cpp"
1434 break;
1435 }
1436 case ORIENTATION:
1437 {
1438 ANTLR_USE_NAMESPACE(antlr)RefAST __t55 = _t;
1439 ANTLR_USE_NAMESPACE(antlr)RefAST tmp42_AST_in = _t;
1440 match(_t,ORIENTATION);
1441 _t = _t->getFirstChild();
1442 dvec=doubleNumberTuple(_t);
1443 _t = _retTree;
1444 _t = __t55;
1445 _t = _t->getNextSibling();
1446#line 168 "MDTreeParser.g"
1447 currAtomStamp->setOrientation(dvec);
1448#line 1449 "MDTreeParser.cpp"
1449 break;
1450 }
1451 case CHARGE:
1452 {
1453 ANTLR_USE_NAMESPACE(antlr)RefAST __t56 = _t;
1454 ANTLR_USE_NAMESPACE(antlr)RefAST tmp43_AST_in = _t;
1455 match(_t,CHARGE);
1456 _t = _t->getFirstChild();
1457 rval=doubleNumber(_t);
1458 _t = _retTree;
1459 _t = __t56;
1460 _t = _t->getNextSibling();
1461#line 169 "MDTreeParser.g"
1462 currAtomStamp->overrideCharge(rval);
1463#line 1464 "MDTreeParser.cpp"
1464 break;
1465 }
1466 default:
1467 {
1468 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
1469 }
1470 }
1471 }
1472 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1473 reportError(ex);
1474 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1475 _t = _t->getNextSibling();
1476 }
1477 _retTree = _t;
1478}
1479
1480RealType MDTreeParser::doubleNumber(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1481#line 388 "MDTreeParser.g"
1482 RealType dval;
1483#line 1484 "MDTreeParser.cpp"
1484 ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumber_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1485 ANTLR_USE_NAMESPACE(antlr)RefAST ic = ANTLR_USE_NAMESPACE(antlr)nullAST;
1486 ANTLR_USE_NAMESPACE(antlr)RefAST fc = ANTLR_USE_NAMESPACE(antlr)nullAST;
1487
1488 try { // for error handling
1489 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1490 _t = ASTNULL;
1491 switch ( _t->getType()) {
1492 case NUM_INT:
1493 case NUM_LONG:
1494 {
1495 ic = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1496 intConst(_t);
1497 _t = _retTree;
1498#line 389 "MDTreeParser.g"
1499 dval = lexi_cast<RealType>(ic->getText());
1500#line 1501 "MDTreeParser.cpp"
1501 break;
1502 }
1503 case NUM_FLOAT:
1504 case NUM_DOUBLE:
1505 {
1506 fc = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1507 floatConst(_t);
1508 _t = _retTree;
1509#line 390 "MDTreeParser.g"
1510 dval = lexi_cast<RealType>(fc->getText());
1511#line 1512 "MDTreeParser.cpp"
1512 break;
1513 }
1514 default:
1515 {
1516 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
1517 }
1518 }
1519 }
1520 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1521 reportError(ex);
1522 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1523 _t = _t->getNextSibling();
1524 }
1525 _retTree = _t;
1526 return dval;
1527}
1528
1529void MDTreeParser::bondstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1530 ANTLR_USE_NAMESPACE(antlr)RefAST bondstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1531#line 184 "MDTreeParser.g"
1532
1533 vector<int> ivec;
1534 RealType rval;
1535 vector<RealType> dvec;
1536 BondStamp* currBondStamp = static_cast<BondStamp*>(blockStack.top());
1537
1538#line 1539 "MDTreeParser.cpp"
1539
1540 try { // for error handling
1541 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1542 _t = ASTNULL;
1543 switch ( _t->getType()) {
1544 case ASSIGNEQUAL:
1545 {
1546 assignment(_t);
1547 _t = _retTree;
1548 break;
1549 }
1550 case MEMBERS:
1551 {
1552 ANTLR_USE_NAMESPACE(antlr)RefAST __t62 = _t;
1553 ANTLR_USE_NAMESPACE(antlr)RefAST tmp44_AST_in = _t;
1554 match(_t,MEMBERS);
1555 _t = _t->getFirstChild();
1556 ivec=inttuple(_t);
1557 _t = _retTree;
1558 _t = __t62;
1559 _t = _t->getNextSibling();
1560#line 192 "MDTreeParser.g"
1561 currBondStamp->setMembers(ivec);
1562#line 1563 "MDTreeParser.cpp"
1563 break;
1564 }
1565 case FIXED:
1566 {
1567 ANTLR_USE_NAMESPACE(antlr)RefAST __t63 = _t;
1568 ANTLR_USE_NAMESPACE(antlr)RefAST tmp45_AST_in = _t;
1569 match(_t,FIXED);
1570 _t = _t->getFirstChild();
1571 rval=doubleNumber(_t);
1572 _t = _retTree;
1573 _t = __t63;
1574 _t = _t->getNextSibling();
1575#line 193 "MDTreeParser.g"
1576 currBondStamp->overrideType("Fixed", rval);
1577#line 1578 "MDTreeParser.cpp"
1578 break;
1579 }
1580 case HARMONIC:
1581 {
1582 ANTLR_USE_NAMESPACE(antlr)RefAST __t64 = _t;
1583 ANTLR_USE_NAMESPACE(antlr)RefAST tmp46_AST_in = _t;
1584 match(_t,HARMONIC);
1585 _t = _t->getFirstChild();
1586 dvec=doubleNumberTuple(_t);
1587 _t = _retTree;
1588 _t = __t64;
1589 _t = _t->getNextSibling();
1590#line 194 "MDTreeParser.g"
1591 currBondStamp->overrideType("Harmonic", dvec);
1592#line 1593 "MDTreeParser.cpp"
1593 break;
1594 }
1595 case CUBIC:
1596 {
1597 ANTLR_USE_NAMESPACE(antlr)RefAST __t65 = _t;
1598 ANTLR_USE_NAMESPACE(antlr)RefAST tmp47_AST_in = _t;
1599 match(_t,CUBIC);
1600 _t = _t->getFirstChild();
1601 dvec=doubleNumberTuple(_t);
1602 _t = _retTree;
1603 _t = __t65;
1604 _t = _t->getNextSibling();
1605#line 195 "MDTreeParser.g"
1606 currBondStamp->overrideType("Cubic", dvec);
1607#line 1608 "MDTreeParser.cpp"
1608 break;
1609 }
1610 case QUARTIC:
1611 {
1612 ANTLR_USE_NAMESPACE(antlr)RefAST __t66 = _t;
1613 ANTLR_USE_NAMESPACE(antlr)RefAST tmp48_AST_in = _t;
1614 match(_t,QUARTIC);
1615 _t = _t->getFirstChild();
1616 dvec=doubleNumberTuple(_t);
1617 _t = _retTree;
1618 _t = __t66;
1619 _t = _t->getNextSibling();
1620#line 196 "MDTreeParser.g"
1621 currBondStamp->overrideType("Quartic", dvec);
1622#line 1623 "MDTreeParser.cpp"
1623 break;
1624 }
1625 case POLYNOMIAL:
1626 {
1627 ANTLR_USE_NAMESPACE(antlr)RefAST __t67 = _t;
1628 ANTLR_USE_NAMESPACE(antlr)RefAST tmp49_AST_in = _t;
1629 match(_t,POLYNOMIAL);
1630 _t = _t->getFirstChild();
1631 dvec=doubleNumberTuple(_t);
1632 _t = _retTree;
1633 _t = __t67;
1634 _t = _t->getNextSibling();
1635#line 197 "MDTreeParser.g"
1636 currBondStamp->overrideType("Polynomial", dvec);
1637#line 1638 "MDTreeParser.cpp"
1638 break;
1639 }
1640 case MORSE:
1641 {
1642 ANTLR_USE_NAMESPACE(antlr)RefAST __t68 = _t;
1643 ANTLR_USE_NAMESPACE(antlr)RefAST tmp50_AST_in = _t;
1644 match(_t,MORSE);
1645 _t = _t->getFirstChild();
1646 dvec=doubleNumberTuple(_t);
1647 _t = _retTree;
1648 _t = __t68;
1649 _t = _t->getNextSibling();
1650#line 198 "MDTreeParser.g"
1651 currBondStamp->overrideType("Morse", dvec);
1652#line 1653 "MDTreeParser.cpp"
1653 break;
1654 }
1655 default:
1656 {
1657 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
1658 }
1659 }
1660 }
1661 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1662 reportError(ex);
1663 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1664 _t = _t->getNextSibling();
1665 }
1666 _retTree = _t;
1667}
1668
1669vector<int> MDTreeParser::inttuple(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1670#line 374 "MDTreeParser.g"
1671 vector<int> ivec;
1672#line 1673 "MDTreeParser.cpp"
1673 ANTLR_USE_NAMESPACE(antlr)RefAST inttuple_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1674#line 374 "MDTreeParser.g"
1675
1676 int ival;
1677
1678#line 1679 "MDTreeParser.cpp"
1679
1680 try { // for error handling
1681 { // ( ... )+
1682 int _cnt137=0;
1683 for (;;) {
1684 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1685 _t = ASTNULL;
1686 if ((_t->getType() == NUM_INT || _t->getType() == NUM_LONG)) {
1687 ival=intConst(_t);
1688 _t = _retTree;
1689#line 378 "MDTreeParser.g"
1690 ivec.push_back(ival);
1691#line 1692 "MDTreeParser.cpp"
1692 }
1693 else {
1694 if ( _cnt137>=1 ) { goto _loop137; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);}
1695 }
1696
1697 _cnt137++;
1698 }
1699 _loop137:;
1700 } // ( ... )+
1701 }
1702 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1703 reportError(ex);
1704 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1705 _t = _t->getNextSibling();
1706 }
1707 _retTree = _t;
1708 return ivec;
1709}
1710
1711void MDTreeParser::bendstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1712 ANTLR_USE_NAMESPACE(antlr)RefAST bendstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1713#line 211 "MDTreeParser.g"
1714
1715 vector<int> ivec;
1716 vector<RealType> dvec;
1717 BendStamp* currBendStamp = static_cast<BendStamp*>(blockStack.top());
1718
1719#line 1720 "MDTreeParser.cpp"
1720
1721 try { // for error handling
1722 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1723 _t = ASTNULL;
1724 switch ( _t->getType()) {
1725 case ASSIGNEQUAL:
1726 {
1727 assignment(_t);
1728 _t = _retTree;
1729 break;
1730 }
1731 case MEMBERS:
1732 {
1733 ANTLR_USE_NAMESPACE(antlr)RefAST __t74 = _t;
1734 ANTLR_USE_NAMESPACE(antlr)RefAST tmp51_AST_in = _t;
1735 match(_t,MEMBERS);
1736 _t = _t->getFirstChild();
1737 ivec=inttuple(_t);
1738 _t = _retTree;
1739 _t = __t74;
1740 _t = _t->getNextSibling();
1741#line 218 "MDTreeParser.g"
1742 currBendStamp->setMembers(ivec);
1743#line 1744 "MDTreeParser.cpp"
1744 break;
1745 }
1746 case HARMONIC:
1747 {
1748 ANTLR_USE_NAMESPACE(antlr)RefAST __t75 = _t;
1749 ANTLR_USE_NAMESPACE(antlr)RefAST tmp52_AST_in = _t;
1750 match(_t,HARMONIC);
1751 _t = _t->getFirstChild();
1752 dvec=doubleNumberTuple(_t);
1753 _t = _retTree;
1754 _t = __t75;
1755 _t = _t->getNextSibling();
1756#line 219 "MDTreeParser.g"
1757 currBendStamp->overrideType("Harmonic", dvec);
1758#line 1759 "MDTreeParser.cpp"
1759 break;
1760 }
1761 case GHOSTBEND:
1762 {
1763 ANTLR_USE_NAMESPACE(antlr)RefAST __t76 = _t;
1764 ANTLR_USE_NAMESPACE(antlr)RefAST tmp53_AST_in = _t;
1765 match(_t,GHOSTBEND);
1766 _t = _t->getFirstChild();
1767 dvec=doubleNumberTuple(_t);
1768 _t = _retTree;
1769 _t = __t76;
1770 _t = _t->getNextSibling();
1771#line 220 "MDTreeParser.g"
1772 currBendStamp->overrideType("GhostBend", dvec);
1773#line 1774 "MDTreeParser.cpp"
1774 break;
1775 }
1776 case UREYBRADLEY:
1777 {
1778 ANTLR_USE_NAMESPACE(antlr)RefAST __t77 = _t;
1779 ANTLR_USE_NAMESPACE(antlr)RefAST tmp54_AST_in = _t;
1780 match(_t,UREYBRADLEY);
1781 _t = _t->getFirstChild();
1782 dvec=doubleNumberTuple(_t);
1783 _t = _retTree;
1784 _t = __t77;
1785 _t = _t->getNextSibling();
1786#line 221 "MDTreeParser.g"
1787 currBendStamp->overrideType("UreyBradley", dvec);
1788#line 1789 "MDTreeParser.cpp"
1789 break;
1790 }
1791 case CUBIC:
1792 {
1793 ANTLR_USE_NAMESPACE(antlr)RefAST __t78 = _t;
1794 ANTLR_USE_NAMESPACE(antlr)RefAST tmp55_AST_in = _t;
1795 match(_t,CUBIC);
1796 _t = _t->getFirstChild();
1797 dvec=doubleNumberTuple(_t);
1798 _t = _retTree;
1799 _t = __t78;
1800 _t = _t->getNextSibling();
1801#line 222 "MDTreeParser.g"
1802 currBendStamp->overrideType("Cubic", dvec);
1803#line 1804 "MDTreeParser.cpp"
1804 break;
1805 }
1806 case QUARTIC:
1807 {
1808 ANTLR_USE_NAMESPACE(antlr)RefAST __t79 = _t;
1809 ANTLR_USE_NAMESPACE(antlr)RefAST tmp56_AST_in = _t;
1810 match(_t,QUARTIC);
1811 _t = _t->getFirstChild();
1812 dvec=doubleNumberTuple(_t);
1813 _t = _retTree;
1814 _t = __t79;
1815 _t = _t->getNextSibling();
1816#line 223 "MDTreeParser.g"
1817 currBendStamp->overrideType("Quartic", dvec);
1818#line 1819 "MDTreeParser.cpp"
1819 break;
1820 }
1821 case POLYNOMIAL:
1822 {
1823 ANTLR_USE_NAMESPACE(antlr)RefAST __t80 = _t;
1824 ANTLR_USE_NAMESPACE(antlr)RefAST tmp57_AST_in = _t;
1825 match(_t,POLYNOMIAL);
1826 _t = _t->getFirstChild();
1827 dvec=doubleNumberTuple(_t);
1828 _t = _retTree;
1829 _t = __t80;
1830 _t = _t->getNextSibling();
1831#line 224 "MDTreeParser.g"
1832 currBendStamp->overrideType("Polynomial", dvec);
1833#line 1834 "MDTreeParser.cpp"
1834 break;
1835 }
1836 case COSINE:
1837 {
1838 ANTLR_USE_NAMESPACE(antlr)RefAST __t81 = _t;
1839 ANTLR_USE_NAMESPACE(antlr)RefAST tmp58_AST_in = _t;
1840 match(_t,COSINE);
1841 _t = _t->getFirstChild();
1842 dvec=doubleNumberTuple(_t);
1843 _t = _retTree;
1844 _t = __t81;
1845 _t = _t->getNextSibling();
1846#line 225 "MDTreeParser.g"
1847 currBendStamp->overrideType("Cosine", dvec);
1848#line 1849 "MDTreeParser.cpp"
1849 break;
1850 }
1851 default:
1852 {
1853 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
1854 }
1855 }
1856 }
1857 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
1858 reportError(ex);
1859 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
1860 _t = _t->getNextSibling();
1861 }
1862 _retTree = _t;
1863}
1864
1865void MDTreeParser::torsionstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
1866 ANTLR_USE_NAMESPACE(antlr)RefAST torsionstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
1867#line 238 "MDTreeParser.g"
1868
1869 vector<int> ivec;
1870 vector<RealType> dvec;
1871 TorsionStamp* currTorsionStamp = static_cast<TorsionStamp*>(blockStack.top());
1872
1873#line 1874 "MDTreeParser.cpp"
1874
1875 try { // for error handling
1876 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
1877 _t = ASTNULL;
1878 switch ( _t->getType()) {
1879 case ASSIGNEQUAL:
1880 {
1881 assignment(_t);
1882 _t = _retTree;
1883 break;
1884 }
1885 case MEMBERS:
1886 {
1887 ANTLR_USE_NAMESPACE(antlr)RefAST __t87 = _t;
1888 ANTLR_USE_NAMESPACE(antlr)RefAST tmp59_AST_in = _t;
1889 match(_t,MEMBERS);
1890 _t = _t->getFirstChild();
1891 ivec=inttuple(_t);
1892 _t = _retTree;
1893 _t = __t87;
1894 _t = _t->getNextSibling();
1895#line 245 "MDTreeParser.g"
1896 currTorsionStamp->setMembers(ivec);
1897#line 1898 "MDTreeParser.cpp"
1898 break;
1899 }
1900 case GHOSTTORSION:
1901 {
1902 ANTLR_USE_NAMESPACE(antlr)RefAST __t88 = _t;
1903 ANTLR_USE_NAMESPACE(antlr)RefAST tmp60_AST_in = _t;
1904 match(_t,GHOSTTORSION);
1905 _t = _t->getFirstChild();
1906 dvec=doubleNumberTuple(_t);
1907 _t = _retTree;
1908 _t = __t88;
1909 _t = _t->getNextSibling();
1910#line 246 "MDTreeParser.g"
1911 currTorsionStamp->overrideType("GhostTorsion", dvec);
1912#line 1913 "MDTreeParser.cpp"
1913 break;
1914 }
1915 case CUBIC:
1916 {
1917 ANTLR_USE_NAMESPACE(antlr)RefAST __t89 = _t;
1918 ANTLR_USE_NAMESPACE(antlr)RefAST tmp61_AST_in = _t;
1919 match(_t,CUBIC);
1920 _t = _t->getFirstChild();
1921 dvec=doubleNumberTuple(_t);
1922 _t = _retTree;
1923 _t = __t89;
1924 _t = _t->getNextSibling();
1925#line 247 "MDTreeParser.g"
1926 currTorsionStamp->overrideType("Cubic", dvec);
1927#line 1928 "MDTreeParser.cpp"
1928 break;
1929 }
1930 case QUARTIC:
1931 {
1932 ANTLR_USE_NAMESPACE(antlr)RefAST __t90 = _t;
1933 ANTLR_USE_NAMESPACE(antlr)RefAST tmp62_AST_in = _t;
1934 match(_t,QUARTIC);
1935 _t = _t->getFirstChild();
1936 dvec=doubleNumberTuple(_t);
1937 _t = _retTree;
1938 _t = __t90;
1939 _t = _t->getNextSibling();
1940#line 248 "MDTreeParser.g"
1941 currTorsionStamp->overrideType("Quartic", dvec);
1942#line 1943 "MDTreeParser.cpp"
1943 break;
1944 }
1945 case POLYNOMIAL:
1946 {
1947 ANTLR_USE_NAMESPACE(antlr)RefAST __t91 = _t;
1948 ANTLR_USE_NAMESPACE(antlr)RefAST tmp63_AST_in = _t;
1949 match(_t,POLYNOMIAL);
1950 _t = _t->getFirstChild();
1951 dvec=doubleNumberTuple(_t);
1952 _t = _retTree;
1953 _t = __t91;
1954 _t = _t->getNextSibling();
1955#line 249 "MDTreeParser.g"
1956 currTorsionStamp->overrideType("Polynomial", dvec);
1957#line 1958 "MDTreeParser.cpp"
1958 break;
1959 }
1960 case CHARMM:
1961 {
1962 ANTLR_USE_NAMESPACE(antlr)RefAST __t92 = _t;
1963 ANTLR_USE_NAMESPACE(antlr)RefAST tmp64_AST_in = _t;
1964 match(_t,CHARMM);
1965 _t = _t->getFirstChild();
1966 dvec=doubleNumberTuple(_t);
1967 _t = _retTree;
1968 _t = __t92;
1969 _t = _t->getNextSibling();
1970#line 250 "MDTreeParser.g"
1971 currTorsionStamp->overrideType("Charmm", dvec);
1972#line 1973 "MDTreeParser.cpp"
1973 break;
1974 }
1975 case OPLS:
1976 {
1977 ANTLR_USE_NAMESPACE(antlr)RefAST __t93 = _t;
1978 ANTLR_USE_NAMESPACE(antlr)RefAST tmp65_AST_in = _t;
1979 match(_t,OPLS);
1980 _t = _t->getFirstChild();
1981 dvec=doubleNumberTuple(_t);
1982 _t = _retTree;
1983 _t = __t93;
1984 _t = _t->getNextSibling();
1985#line 251 "MDTreeParser.g"
1986 currTorsionStamp->overrideType("Opls", dvec);
1987#line 1988 "MDTreeParser.cpp"
1988 break;
1989 }
1990 case TRAPPE:
1991 {
1992 ANTLR_USE_NAMESPACE(antlr)RefAST __t94 = _t;
1993 ANTLR_USE_NAMESPACE(antlr)RefAST tmp66_AST_in = _t;
1994 match(_t,TRAPPE);
1995 _t = _t->getFirstChild();
1996 dvec=doubleNumberTuple(_t);
1997 _t = _retTree;
1998 _t = __t94;
1999 _t = _t->getNextSibling();
2000#line 252 "MDTreeParser.g"
2001 currTorsionStamp->overrideType("Trappe", dvec);
2002#line 2003 "MDTreeParser.cpp"
2003 break;
2004 }
2005 case HARMONIC:
2006 {
2007 ANTLR_USE_NAMESPACE(antlr)RefAST __t95 = _t;
2008 ANTLR_USE_NAMESPACE(antlr)RefAST tmp67_AST_in = _t;
2009 match(_t,HARMONIC);
2010 _t = _t->getFirstChild();
2011 dvec=doubleNumberTuple(_t);
2012 _t = _retTree;
2013 _t = __t95;
2014 _t = _t->getNextSibling();
2015#line 253 "MDTreeParser.g"
2016 currTorsionStamp->overrideType("Harmonic", dvec);
2017#line 2018 "MDTreeParser.cpp"
2018 break;
2019 }
2020 default:
2021 {
2022 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
2023 }
2024 }
2025 }
2026 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
2027 reportError(ex);
2028 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
2029 _t = _t->getNextSibling();
2030 }
2031 _retTree = _t;
2032}
2033
2034void MDTreeParser::inversionstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
2035 ANTLR_USE_NAMESPACE(antlr)RefAST inversionstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
2036#line 267 "MDTreeParser.g"
2037
2038 int icent;
2039 vector<int> ivec;
2040 vector<RealType> dvec;
2041 InversionStamp* currInversionStamp = static_cast<InversionStamp*>(blockStack.top());
2042
2043#line 2044 "MDTreeParser.cpp"
2044
2045 try { // for error handling
2046 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
2047 _t = ASTNULL;
2048 switch ( _t->getType()) {
2049 case ASSIGNEQUAL:
2050 {
2051 assignment(_t);
2052 _t = _retTree;
2053 break;
2054 }
2055 case CENTER:
2056 {
2057 ANTLR_USE_NAMESPACE(antlr)RefAST __t101 = _t;
2058 ANTLR_USE_NAMESPACE(antlr)RefAST tmp68_AST_in = _t;
2059 match(_t,CENTER);
2060 _t = _t->getFirstChild();
2061 icent=intConst(_t);
2062 _t = _retTree;
2063 _t = __t101;
2064 _t = _t->getNextSibling();
2065#line 275 "MDTreeParser.g"
2066 currInversionStamp->setCenter(icent);
2067#line 2068 "MDTreeParser.cpp"
2068 break;
2069 }
2070 case SATELLITES:
2071 {
2072 ANTLR_USE_NAMESPACE(antlr)RefAST __t102 = _t;
2073 ANTLR_USE_NAMESPACE(antlr)RefAST tmp69_AST_in = _t;
2074 match(_t,SATELLITES);
2075 _t = _t->getFirstChild();
2076 ivec=inttuple(_t);
2077 _t = _retTree;
2078 _t = __t102;
2079 _t = _t->getNextSibling();
2080#line 276 "MDTreeParser.g"
2081 currInversionStamp->setSatellites(ivec);
2082#line 2083 "MDTreeParser.cpp"
2083 break;
2084 }
2085 case AMBERIMPROPER:
2086 {
2087 ANTLR_USE_NAMESPACE(antlr)RefAST __t103 = _t;
2088 ANTLR_USE_NAMESPACE(antlr)RefAST tmp70_AST_in = _t;
2089 match(_t,AMBERIMPROPER);
2090 _t = _t->getFirstChild();
2091 dvec=doubleNumberTuple(_t);
2092 _t = _retTree;
2093 _t = __t103;
2094 _t = _t->getNextSibling();
2095#line 277 "MDTreeParser.g"
2096 currInversionStamp->overrideType("AmberImproper", dvec);
2097#line 2098 "MDTreeParser.cpp"
2098 break;
2099 }
2100 case IMPROPERCOSINE:
2101 {
2102 ANTLR_USE_NAMESPACE(antlr)RefAST __t104 = _t;
2103 ANTLR_USE_NAMESPACE(antlr)RefAST tmp71_AST_in = _t;
2104 match(_t,IMPROPERCOSINE);
2105 _t = _t->getFirstChild();
2106 dvec=doubleNumberTuple(_t);
2107 _t = _retTree;
2108 _t = __t104;
2109 _t = _t->getNextSibling();
2110#line 278 "MDTreeParser.g"
2111 currInversionStamp->overrideType("ImproperCosine", dvec);
2112#line 2113 "MDTreeParser.cpp"
2113 break;
2114 }
2115 case HARMONIC:
2116 {
2117 ANTLR_USE_NAMESPACE(antlr)RefAST __t105 = _t;
2118 ANTLR_USE_NAMESPACE(antlr)RefAST tmp72_AST_in = _t;
2119 match(_t,HARMONIC);
2120 _t = _t->getFirstChild();
2121 dvec=doubleNumberTuple(_t);
2122 _t = _retTree;
2123 _t = __t105;
2124 _t = _t->getNextSibling();
2125#line 279 "MDTreeParser.g"
2126 currInversionStamp->overrideType("Harmonic", dvec);
2127#line 2128 "MDTreeParser.cpp"
2128 break;
2129 }
2130 case CENTRALATOMHEIGHT:
2131 {
2132 ANTLR_USE_NAMESPACE(antlr)RefAST __t106 = _t;
2133 ANTLR_USE_NAMESPACE(antlr)RefAST tmp73_AST_in = _t;
2134 match(_t,CENTRALATOMHEIGHT);
2135 _t = _t->getFirstChild();
2136 dvec=doubleNumberTuple(_t);
2137 _t = _retTree;
2138 _t = __t106;
2139 _t = _t->getNextSibling();
2140#line 280 "MDTreeParser.g"
2141 currInversionStamp->overrideType("CentralAtomHeight", dvec);
2142#line 2143 "MDTreeParser.cpp"
2143 break;
2144 }
2145 case DREIDING:
2146 {
2147 ANTLR_USE_NAMESPACE(antlr)RefAST __t107 = _t;
2148 ANTLR_USE_NAMESPACE(antlr)RefAST tmp74_AST_in = _t;
2149 match(_t,DREIDING);
2150 _t = _t->getFirstChild();
2151 dvec=doubleNumberTuple(_t);
2152 _t = _retTree;
2153 _t = __t107;
2154 _t = _t->getNextSibling();
2155#line 281 "MDTreeParser.g"
2156 currInversionStamp->overrideType("Dreiding", dvec);
2157#line 2158 "MDTreeParser.cpp"
2158 break;
2159 }
2160 default:
2161 {
2162 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
2163 }
2164 }
2165 }
2166 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
2167 reportError(ex);
2168 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
2169 _t = _t->getNextSibling();
2170 }
2171 _retTree = _t;
2172}
2173
2174void MDTreeParser::rigidbodystatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
2175 ANTLR_USE_NAMESPACE(antlr)RefAST rigidbodystatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
2176#line 299 "MDTreeParser.g"
2177
2178 vector<int> ivec;
2179 RigidBodyStamp* currRigidBodyStamp = static_cast<RigidBodyStamp*>(blockStack.top());
2180
2181#line 2182 "MDTreeParser.cpp"
2182
2183 try { // for error handling
2184 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
2185 _t = ASTNULL;
2186 switch ( _t->getType()) {
2187 case ASSIGNEQUAL:
2188 {
2189 assignment(_t);
2190 _t = _retTree;
2191 break;
2192 }
2193 case MEMBERS:
2194 {
2195 ANTLR_USE_NAMESPACE(antlr)RefAST __t113 = _t;
2196 ANTLR_USE_NAMESPACE(antlr)RefAST tmp75_AST_in = _t;
2197 match(_t,MEMBERS);
2198 _t = _t->getFirstChild();
2199 ivec=inttuple(_t);
2200 _t = _retTree;
2201 _t = __t113;
2202 _t = _t->getNextSibling();
2203#line 305 "MDTreeParser.g"
2204 currRigidBodyStamp->setMembers(ivec);
2205#line 2206 "MDTreeParser.cpp"
2206 break;
2207 }
2208 default:
2209 {
2210 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
2211 }
2212 }
2213 }
2214 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
2215 reportError(ex);
2216 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
2217 _t = _t->getNextSibling();
2218 }
2219 _retTree = _t;
2220}
2221
2222void MDTreeParser::cutoffgroupstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
2223 ANTLR_USE_NAMESPACE(antlr)RefAST cutoffgroupstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
2224#line 318 "MDTreeParser.g"
2225
2226 vector<int> ivec;
2227 CutoffGroupStamp* currCutoffGroupStamp = static_cast<CutoffGroupStamp*>(blockStack.top());
2228
2229#line 2230 "MDTreeParser.cpp"
2230
2231 try { // for error handling
2232 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
2233 _t = ASTNULL;
2234 switch ( _t->getType()) {
2235 case ASSIGNEQUAL:
2236 {
2237 assignment(_t);
2238 _t = _retTree;
2239 break;
2240 }
2241 case MEMBERS:
2242 {
2243 ANTLR_USE_NAMESPACE(antlr)RefAST __t119 = _t;
2244 ANTLR_USE_NAMESPACE(antlr)RefAST tmp76_AST_in = _t;
2245 match(_t,MEMBERS);
2246 _t = _t->getFirstChild();
2247 ivec=inttuple(_t);
2248 _t = _retTree;
2249 _t = __t119;
2250 _t = _t->getNextSibling();
2251#line 324 "MDTreeParser.g"
2252 currCutoffGroupStamp->setMembers(ivec);
2253#line 2254 "MDTreeParser.cpp"
2254 break;
2255 }
2256 default:
2257 {
2258 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
2259 }
2260 }
2261 }
2262 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
2263 reportError(ex);
2264 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
2265 _t = _t->getNextSibling();
2266 }
2267 _retTree = _t;
2268}
2269
2270void MDTreeParser::constraintstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
2271 ANTLR_USE_NAMESPACE(antlr)RefAST constraintstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
2272#line 337 "MDTreeParser.g"
2273
2274 vector<int> ivec;
2275 ConstraintStamp* currConstraintStamp = static_cast<ConstraintStamp*>(blockStack.top());
2276
2277#line 2278 "MDTreeParser.cpp"
2278
2279 try { // for error handling
2280 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
2281 _t = ASTNULL;
2282 switch ( _t->getType()) {
2283 case ASSIGNEQUAL:
2284 {
2285 assignment(_t);
2286 _t = _retTree;
2287 break;
2288 }
2289 case MEMBERS:
2290 {
2291 ANTLR_USE_NAMESPACE(antlr)RefAST __t125 = _t;
2292 ANTLR_USE_NAMESPACE(antlr)RefAST tmp77_AST_in = _t;
2293 match(_t,MEMBERS);
2294 _t = _t->getFirstChild();
2295 ivec=inttuple(_t);
2296 _t = _retTree;
2297 _t = __t125;
2298 _t = _t->getNextSibling();
2299#line 343 "MDTreeParser.g"
2300 currConstraintStamp->setMembers(ivec);
2301#line 2302 "MDTreeParser.cpp"
2302 break;
2303 }
2304 default:
2305 {
2306 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
2307 }
2308 }
2309 }
2310 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
2311 reportError(ex);
2312 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
2313 _t = _t->getNextSibling();
2314 }
2315 _retTree = _t;
2316}
2317
2318void MDTreeParser::nodesstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
2319 ANTLR_USE_NAMESPACE(antlr)RefAST nodesstatement_AST_in = (_t == ANTLR_USE_NAMESPACE(antlr)RefAST(ASTNULL)) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t;
2320#line 357 "MDTreeParser.g"
2321
2322 vector<int> ivec;
2323 NodesStamp* currNodesStamp = static_cast<NodesStamp*>(blockStack.top());
2324
2325#line 2326 "MDTreeParser.cpp"
2326
2327 try { // for error handling
2328 if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST )
2329 _t = ASTNULL;
2330 switch ( _t->getType()) {
2331 case ASSIGNEQUAL:
2332 {
2333 assignment(_t);
2334 _t = _retTree;
2335 break;
2336 }
2337 case MEMBERS:
2338 {
2339 ANTLR_USE_NAMESPACE(antlr)RefAST __t131 = _t;
2340 ANTLR_USE_NAMESPACE(antlr)RefAST tmp78_AST_in = _t;
2341 match(_t,MEMBERS);
2342 _t = _t->getFirstChild();
2343 ivec=inttuple(_t);
2344 _t = _retTree;
2345 _t = __t131;
2346 _t = _t->getNextSibling();
2347#line 363 "MDTreeParser.g"
2348 currNodesStamp->setMembers(ivec);
2349#line 2350 "MDTreeParser.cpp"
2350 break;
2351 }
2352 default:
2353 {
2354 throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);
2355 }
2356 }
2357 }
2358 catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
2359 reportError(ex);
2360 if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST )
2361 _t = _t->getNextSibling();
2362 }
2363 _retTree = _t;
2364}
2365
2366void MDTreeParser::initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& )
2367{
2368}
2369const char* MDTreeParser::tokenNames[] = {
2370 "<0>",
2371 "EOF",
2372 "<2>",
2373 "NULL_TREE_LOOKAHEAD",
2374 "\"component\"",
2375 "\"molecule\"",
2376 "\"zconstraint\"",
2377 "\"restraint\"",
2378 "\"atom\"",
2379 "\"bond\"",
2380 "\"bend\"",
2381 "\"torsion\"",
2382 "\"inversion\"",
2383 "\"rigidBody\"",
2384 "\"cutoffGroup\"",
2385 "\"constraint\"",
2386 "\"distance\"",
2387 "\"fragment\"",
2388 "\"sequence\"",
2389 "\"members\"",
2390 "\"center\"",
2391 "\"satellites\"",
2392 "\"position\"",
2393 "\"orientation\"",
2394 "\"flucQ\"",
2395 "\"RNEMD\"",
2396 "\"light\"",
2397 "\"minimizer\"",
2398 "\"Fixed\"",
2399 "\"Harmonic\"",
2400 "\"Cubic\"",
2401 "\"Quartic\"",
2402 "\"Polynomial\"",
2403 "\"Morse\"",
2404 "\"GhostBend\"",
2405 "\"UreyBradley\"",
2406 "\"Cosine\"",
2407 "\"GhostTorsion\"",
2408 "\"Charmm\"",
2409 "\"Opls\"",
2410 "\"Trappe\"",
2411 "\"AmberImproper\"",
2412 "\"ImproperCosine\"",
2413 "\"CentralAtomHeight\"",
2414 "\"Dreiding\"",
2415 "\"charge\"",
2416 "\"nodes\"",
2417 "ENDBLOCK",
2418 "ID",
2419 "ASSIGNEQUAL",
2420 "SEMICOLON",
2421 "StringLiteral",
2422 "LCURLY",
2423 "RCURLY",
2424 "LBRACKET",
2425 "RBRACKET",
2426 "LPAREN",
2427 "RPAREN",
2428 "COMMA",
2429 "NUM_INT",
2430 "NUM_LONG",
2431 "NUM_FLOAT",
2432 "NUM_DOUBLE",
2433 "DOT",
2434 "COLON",
2435 "QUESTIONMARK",
2436 "Whitespace",
2437 "Comment",
2438 "CPPComment",
2439 "a line directive",
2440 "LineDirective",
2441 "Space",
2442 "CharLiteral",
2443 "EndOfLine",
2444 "Escape",
2445 "Vocabulary",
2446 "Digit",
2447 "Decimal",
2448 "HEX_DIGIT",
2449 "EXPONENT",
2450 "FLOAT_SUFFIX",
2451 0
2452};
2453
2454const unsigned long MDTreeParser::_tokenSet_0_data_[] = { 251789552UL, 131072UL, 0UL, 0UL };
2455// "component" "molecule" "zconstraint" "restraint" "fragment" "flucQ"
2456// "RNEMD" "light" "minimizer" ASSIGNEQUAL
2457const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_0(_tokenSet_0_data_,4);
2458const unsigned long MDTreeParser::_tokenSet_1_data_[] = { 65280UL, 131072UL, 0UL, 0UL };
2459// "atom" "bond" "bend" "torsion" "inversion" "rigidBody" "cutoffGroup"
2460// "constraint" ASSIGNEQUAL
2461const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_1(_tokenSet_1_data_,4);
2462const unsigned long MDTreeParser::_tokenSet_2_data_[] = { 65280UL, 147456UL, 0UL, 0UL };
2463// "atom" "bond" "bend" "torsion" "inversion" "rigidBody" "cutoffGroup"
2464// "constraint" "nodes" ASSIGNEQUAL
2465const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_2(_tokenSet_2_data_,4);
2466const unsigned long MDTreeParser::_tokenSet_3_data_[] = { 12582912UL, 139264UL, 0UL, 0UL };
2467// "position" "orientation" "charge" ASSIGNEQUAL
2468const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_3(_tokenSet_3_data_,4);
2469const unsigned long MDTreeParser::_tokenSet_4_data_[] = { 4027056128UL, 131075UL, 0UL, 0UL };
2470// "members" "Fixed" "Harmonic" "Cubic" "Quartic" "Polynomial" "Morse"
2471// ASSIGNEQUAL
2472const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_4(_tokenSet_4_data_,4);
2473const unsigned long MDTreeParser::_tokenSet_5_data_[] = { 3758620672UL, 131101UL, 0UL, 0UL };
2474// "members" "Harmonic" "Cubic" "Quartic" "Polynomial" "GhostBend" "UreyBradley"
2475// "Cosine" ASSIGNEQUAL
2476const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_5(_tokenSet_5_data_,4);
2477const unsigned long MDTreeParser::_tokenSet_6_data_[] = { 3758620672UL, 131553UL, 0UL, 0UL };
2478// "members" "Harmonic" "Cubic" "Quartic" "Polynomial" "GhostTorsion" "Charmm"
2479// "Opls" "Trappe" ASSIGNEQUAL
2480const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_6(_tokenSet_6_data_,4);
2481const unsigned long MDTreeParser::_tokenSet_7_data_[] = { 540016640UL, 138752UL, 0UL, 0UL };
2482// "center" "satellites" "Harmonic" "AmberImproper" "ImproperCosine" "CentralAtomHeight"
2483// "Dreiding" ASSIGNEQUAL
2484const ANTLR_USE_NAMESPACE(antlr)BitSet MDTreeParser::_tokenSet_7(_tokenSet_7_data_,4);
2485
2486
virtual RefAST getNextSibling() const =0
Get the next sibling in line after this one.
@ INVERSION
Inversions.
@ TORSION
Torsions.
@ BEND
Bends.
@ BOND
Bonds.
@ MOLECULE
Molecules.