117 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST componentblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
118 |
|
|
119 |
|
try { // for error handling |
120 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t13 = _t; |
120 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t9 = _t; |
121 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST tmp2_AST_in = _t; |
122 |
|
match(_t,COMPONENT); |
123 |
|
_t = _t->getFirstChild(); |
124 |
< |
#line 69 "MDTreeParser.g" |
124 |
> |
#line 62 "MDTreeParser.g" |
125 |
|
Component* currComponet = new Component(); blockStack.push(currComponet); |
126 |
|
#line 127 "MDTreeParser.cpp" |
127 |
|
{ // ( ... )* |
133 |
|
_t = _retTree; |
134 |
|
} |
135 |
|
else { |
136 |
< |
goto _loop15; |
136 |
> |
goto _loop11; |
137 |
|
} |
138 |
|
|
139 |
|
} |
140 |
< |
_loop15:; |
140 |
> |
_loop11:; |
141 |
|
} // ( ... )* |
142 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST tmp3_AST_in = _t; |
143 |
|
match(_t,ENDBLOCK); |
144 |
|
_t = _t->getNextSibling(); |
145 |
< |
_t = __t13; |
145 |
> |
_t = __t9; |
146 |
|
_t = _t->getNextSibling(); |
147 |
< |
#line 71 "MDTreeParser.g" |
147 |
> |
#line 64 "MDTreeParser.g" |
148 |
|
blockStack.top()->validate();blockStack.pop(); currConf->addComponent(currComponet); |
149 |
|
#line 150 "MDTreeParser.cpp" |
150 |
|
} |
160 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST moleculeblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
161 |
|
|
162 |
|
try { // for error handling |
163 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t21 = _t; |
163 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t17 = _t; |
164 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST tmp4_AST_in = _t; |
165 |
|
match(_t,MOLECULE); |
166 |
|
_t = _t->getFirstChild(); |
167 |
< |
#line 79 "MDTreeParser.g" |
167 |
> |
#line 72 "MDTreeParser.g" |
168 |
|
MoleculeStamp* currMoleculeStamp = new MoleculeStamp(); blockStack.push(currMoleculeStamp); |
169 |
|
#line 170 "MDTreeParser.cpp" |
170 |
|
{ // ( ... )* |
176 |
|
_t = _retTree; |
177 |
|
} |
178 |
|
else { |
179 |
< |
goto _loop23; |
179 |
> |
goto _loop19; |
180 |
|
} |
181 |
|
|
182 |
|
} |
183 |
< |
_loop23:; |
183 |
> |
_loop19:; |
184 |
|
} // ( ... )* |
185 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST tmp5_AST_in = _t; |
186 |
|
match(_t,ENDBLOCK); |
187 |
|
_t = _t->getNextSibling(); |
188 |
< |
_t = __t21; |
188 |
> |
_t = __t17; |
189 |
|
_t = _t->getNextSibling(); |
190 |
< |
#line 81 "MDTreeParser.g" |
190 |
> |
#line 74 "MDTreeParser.g" |
191 |
|
blockStack.top()->validate(); blockStack.pop(); currConf->addMoleculeStamp(currMoleculeStamp); |
192 |
|
#line 193 "MDTreeParser.cpp" |
193 |
|
} |
203 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST zconstraintblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
204 |
|
|
205 |
|
try { // for error handling |
206 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t17 = _t; |
206 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t13 = _t; |
207 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST tmp6_AST_in = _t; |
208 |
|
match(_t,ZCONSTRAINT); |
209 |
|
_t = _t->getFirstChild(); |
210 |
< |
#line 74 "MDTreeParser.g" |
210 |
> |
#line 67 "MDTreeParser.g" |
211 |
|
ZConsStamp* currZConsStamp = new ZConsStamp(); blockStack.push(currZConsStamp); |
212 |
|
#line 213 "MDTreeParser.cpp" |
213 |
|
{ // ( ... )* |
219 |
|
_t = _retTree; |
220 |
|
} |
221 |
|
else { |
222 |
< |
goto _loop19; |
222 |
> |
goto _loop15; |
223 |
|
} |
224 |
|
|
225 |
|
} |
226 |
< |
_loop19:; |
226 |
> |
_loop15:; |
227 |
|
} // ( ... )* |
228 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST tmp7_AST_in = _t; |
229 |
|
match(_t,ENDBLOCK); |
230 |
|
_t = _t->getNextSibling(); |
231 |
< |
_t = __t17; |
231 |
> |
_t = __t13; |
232 |
|
_t = _t->getNextSibling(); |
233 |
< |
#line 76 "MDTreeParser.g" |
233 |
> |
#line 69 "MDTreeParser.g" |
234 |
|
blockStack.top()->validate();blockStack.pop(); currConf->addZConsStamp(currZConsStamp); |
235 |
|
#line 236 "MDTreeParser.cpp" |
236 |
|
} |
248 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST constant_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
249 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST str1 = ANTLR_USE_NAMESPACE(antlr)nullAST; |
250 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST str2 = ANTLR_USE_NAMESPACE(antlr)nullAST; |
251 |
+ |
#line 47 "MDTreeParser.g" |
252 |
|
|
253 |
+ |
int ival; |
254 |
+ |
double dval; |
255 |
+ |
|
256 |
+ |
#line 257 "MDTreeParser.cpp" |
257 |
+ |
|
258 |
|
try { // for error handling |
259 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
260 |
|
_t = ASTNULL; |
261 |
|
switch ( _t->getType()) { |
262 |
< |
case OCTALINT: |
263 |
< |
case DECIMALINT: |
264 |
< |
case HEXADECIMALINT: |
265 |
< |
case FLOATONE: |
260 |
< |
case FLOATTWO: |
261 |
< |
case MINUS: |
262 |
< |
{ |
263 |
< |
signedIntOrFloat(_t,id); |
262 |
> |
case NUM_INT: |
263 |
> |
case NUM_LONG: |
264 |
> |
{ |
265 |
> |
ival=intConst(_t); |
266 |
|
_t = _retTree; |
267 |
+ |
#line 52 "MDTreeParser.g" |
268 |
+ |
blockStack.top()->assign(id->getText(), ival); |
269 |
+ |
#line 270 "MDTreeParser.cpp" |
270 |
|
break; |
271 |
|
} |
272 |
+ |
case NUM_FLOAT: |
273 |
+ |
case NUM_DOUBLE: |
274 |
+ |
{ |
275 |
+ |
dval=floatConst(_t); |
276 |
+ |
_t = _retTree; |
277 |
+ |
#line 53 "MDTreeParser.g" |
278 |
+ |
blockStack.top()->assign(id->getText(), dval); |
279 |
+ |
#line 280 "MDTreeParser.cpp" |
280 |
+ |
break; |
281 |
+ |
} |
282 |
|
case ID: |
283 |
|
{ |
284 |
|
str1 = _t; |
285 |
|
match(_t,ID); |
286 |
|
_t = _t->getNextSibling(); |
287 |
< |
#line 49 "MDTreeParser.g" |
287 |
> |
#line 54 "MDTreeParser.g" |
288 |
|
blockStack.top()->assign(id->getText(), str1->getText()); |
289 |
< |
#line 275 "MDTreeParser.cpp" |
289 |
> |
#line 290 "MDTreeParser.cpp" |
290 |
|
break; |
291 |
|
} |
292 |
|
case StringLiteral: |
294 |
|
str2 = _t; |
295 |
|
match(_t,StringLiteral); |
296 |
|
_t = _t->getNextSibling(); |
297 |
< |
#line 50 "MDTreeParser.g" |
297 |
> |
#line 55 "MDTreeParser.g" |
298 |
|
std::string s = str2->getText(); |
299 |
|
s = s.substr(1, s.length()-2); |
300 |
|
blockStack.top()->assign(id->getText(),s); |
301 |
|
|
302 |
< |
#line 288 "MDTreeParser.cpp" |
302 |
> |
#line 303 "MDTreeParser.cpp" |
303 |
|
break; |
304 |
|
} |
305 |
|
default: |
316 |
|
_retTree = _t; |
317 |
|
} |
318 |
|
|
319 |
< |
void MDTreeParser::signedIntOrFloat(ANTLR_USE_NAMESPACE(antlr)RefAST _t, |
320 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST id |
306 |
< |
) { |
307 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST signedIntOrFloat_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
308 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST icMinus = ANTLR_USE_NAMESPACE(antlr)nullAST; |
309 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST fcMinus = ANTLR_USE_NAMESPACE(antlr)nullAST; |
310 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST ic = ANTLR_USE_NAMESPACE(antlr)nullAST; |
311 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST fc = ANTLR_USE_NAMESPACE(antlr)nullAST; |
312 |
< |
#line 56 "MDTreeParser.g" |
313 |
< |
|
319 |
> |
int MDTreeParser::intConst(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
320 |
> |
#line 242 "MDTreeParser.g" |
321 |
|
int ival; |
322 |
< |
double dval; |
322 |
> |
#line 323 "MDTreeParser.cpp" |
323 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST intConst_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
324 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST i1 = ANTLR_USE_NAMESPACE(antlr)nullAST; |
325 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST i2 = ANTLR_USE_NAMESPACE(antlr)nullAST; |
326 |
|
|
317 |
– |
#line 318 "MDTreeParser.cpp" |
318 |
– |
|
327 |
|
try { // for error handling |
328 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
329 |
|
_t = ASTNULL; |
330 |
|
switch ( _t->getType()) { |
331 |
< |
case MINUS: |
331 |
> |
case NUM_INT: |
332 |
|
{ |
333 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t9 = _t; |
334 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp8_AST_in = _t; |
327 |
< |
match(_t,MINUS); |
328 |
< |
_t = _t->getFirstChild(); |
329 |
< |
{ |
330 |
< |
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
331 |
< |
_t = ASTNULL; |
332 |
< |
switch ( _t->getType()) { |
333 |
< |
case OCTALINT: |
334 |
< |
case DECIMALINT: |
335 |
< |
case HEXADECIMALINT: |
336 |
< |
{ |
337 |
< |
icMinus = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
338 |
< |
intConst(_t); |
339 |
< |
_t = _retTree; |
340 |
< |
#line 61 "MDTreeParser.g" |
341 |
< |
ival = lexi_cast<int>(icMinus->getText()); ival = -ival; blockStack.top()->assign(id->getText(), ival); |
342 |
< |
#line 343 "MDTreeParser.cpp" |
343 |
< |
break; |
344 |
< |
} |
345 |
< |
case FLOATONE: |
346 |
< |
case FLOATTWO: |
347 |
< |
{ |
348 |
< |
fcMinus = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
349 |
< |
floatConst(_t); |
350 |
< |
_t = _retTree; |
351 |
< |
break; |
352 |
< |
} |
353 |
< |
default: |
354 |
< |
{ |
355 |
< |
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t); |
356 |
< |
} |
357 |
< |
} |
358 |
< |
} |
359 |
< |
#line 62 "MDTreeParser.g" |
360 |
< |
dval = lexi_cast<double>(fcMinus->getText());dval = -dval; blockStack.top()->assign(id->getText(), dval); |
361 |
< |
#line 362 "MDTreeParser.cpp" |
362 |
< |
_t = __t9; |
333 |
> |
i1 = _t; |
334 |
> |
match(_t,NUM_INT); |
335 |
|
_t = _t->getNextSibling(); |
336 |
+ |
#line 243 "MDTreeParser.g" |
337 |
+ |
ival = lexi_cast<int>(i1->getText()); |
338 |
+ |
#line 339 "MDTreeParser.cpp" |
339 |
|
break; |
340 |
|
} |
341 |
< |
case OCTALINT: |
367 |
< |
case DECIMALINT: |
368 |
< |
case HEXADECIMALINT: |
369 |
< |
case FLOATONE: |
370 |
< |
case FLOATTWO: |
341 |
> |
case NUM_LONG: |
342 |
|
{ |
343 |
< |
{ |
344 |
< |
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
374 |
< |
_t = ASTNULL; |
375 |
< |
switch ( _t->getType()) { |
376 |
< |
case OCTALINT: |
377 |
< |
case DECIMALINT: |
378 |
< |
case HEXADECIMALINT: |
379 |
< |
{ |
380 |
< |
ic = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
381 |
< |
intConst(_t); |
382 |
< |
_t = _retTree; |
383 |
< |
#line 64 "MDTreeParser.g" |
384 |
< |
ival = lexi_cast<int>(ic->getText()); blockStack.top()->assign(id->getText(), ival); |
385 |
< |
#line 386 "MDTreeParser.cpp" |
386 |
< |
break; |
387 |
< |
} |
388 |
< |
case FLOATONE: |
389 |
< |
case FLOATTWO: |
390 |
< |
{ |
391 |
< |
fc = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
392 |
< |
floatConst(_t); |
393 |
< |
_t = _retTree; |
394 |
< |
#line 65 "MDTreeParser.g" |
395 |
< |
dval = lexi_cast<double>(fc->getText()); blockStack.top()->assign(id->getText(), dval); |
396 |
< |
#line 397 "MDTreeParser.cpp" |
397 |
< |
break; |
398 |
< |
} |
399 |
< |
default: |
400 |
< |
{ |
401 |
< |
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t); |
402 |
< |
} |
403 |
< |
} |
404 |
< |
} |
405 |
< |
break; |
406 |
< |
} |
407 |
< |
default: |
408 |
< |
{ |
409 |
< |
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t); |
410 |
< |
} |
411 |
< |
} |
412 |
< |
} |
413 |
< |
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
414 |
< |
reportError(ex); |
415 |
< |
if ( _t != ANTLR_USE_NAMESPACE(antlr)nullAST ) |
343 |
> |
i2 = _t; |
344 |
> |
match(_t,NUM_LONG); |
345 |
|
_t = _t->getNextSibling(); |
346 |
< |
} |
347 |
< |
_retTree = _t; |
348 |
< |
} |
420 |
< |
|
421 |
< |
int MDTreeParser::intConst(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
422 |
< |
#line 249 "MDTreeParser.g" |
423 |
< |
int ival; |
424 |
< |
#line 425 "MDTreeParser.cpp" |
425 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST intConst_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
426 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST oival = ANTLR_USE_NAMESPACE(antlr)nullAST; |
427 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST dival = ANTLR_USE_NAMESPACE(antlr)nullAST; |
428 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST hival = ANTLR_USE_NAMESPACE(antlr)nullAST; |
429 |
< |
|
430 |
< |
try { // for error handling |
431 |
< |
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
432 |
< |
_t = ASTNULL; |
433 |
< |
switch ( _t->getType()) { |
434 |
< |
case OCTALINT: |
435 |
< |
{ |
436 |
< |
oival = _t; |
437 |
< |
match(_t,OCTALINT); |
438 |
< |
_t = _t->getNextSibling(); |
439 |
< |
#line 250 "MDTreeParser.g" |
440 |
< |
ival = lexi_cast<int>(oival->getText()); |
441 |
< |
#line 442 "MDTreeParser.cpp" |
346 |
> |
#line 244 "MDTreeParser.g" |
347 |
> |
ival = lexi_cast<int>(i2->getText()); |
348 |
> |
#line 349 "MDTreeParser.cpp" |
349 |
|
break; |
350 |
|
} |
444 |
– |
case DECIMALINT: |
445 |
– |
{ |
446 |
– |
dival = _t; |
447 |
– |
match(_t,DECIMALINT); |
448 |
– |
_t = _t->getNextSibling(); |
449 |
– |
#line 251 "MDTreeParser.g" |
450 |
– |
ival = lexi_cast<int>(dival->getText()); |
451 |
– |
#line 452 "MDTreeParser.cpp" |
452 |
– |
break; |
453 |
– |
} |
454 |
– |
case HEXADECIMALINT: |
455 |
– |
{ |
456 |
– |
hival = _t; |
457 |
– |
match(_t,HEXADECIMALINT); |
458 |
– |
_t = _t->getNextSibling(); |
459 |
– |
#line 252 "MDTreeParser.g" |
460 |
– |
ival = lexi_cast<int>(hival->getText()); |
461 |
– |
#line 462 "MDTreeParser.cpp" |
462 |
– |
break; |
463 |
– |
} |
351 |
|
default: |
352 |
|
{ |
353 |
|
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t); |
364 |
|
} |
365 |
|
|
366 |
|
double MDTreeParser::floatConst(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
367 |
< |
#line 264 "MDTreeParser.g" |
367 |
> |
#line 256 "MDTreeParser.g" |
368 |
|
double dval; |
369 |
< |
#line 483 "MDTreeParser.cpp" |
369 |
> |
#line 370 "MDTreeParser.cpp" |
370 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST floatConst_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
371 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST d1 = ANTLR_USE_NAMESPACE(antlr)nullAST; |
372 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST d2 = ANTLR_USE_NAMESPACE(antlr)nullAST; |
375 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
376 |
|
_t = ASTNULL; |
377 |
|
switch ( _t->getType()) { |
378 |
< |
case FLOATONE: |
378 |
> |
case NUM_FLOAT: |
379 |
|
{ |
380 |
|
d1 = _t; |
381 |
< |
match(_t,FLOATONE); |
381 |
> |
match(_t,NUM_FLOAT); |
382 |
|
_t = _t->getNextSibling(); |
383 |
< |
#line 265 "MDTreeParser.g" |
383 |
> |
#line 257 "MDTreeParser.g" |
384 |
|
dval = lexi_cast<double>(d1->getText()); |
385 |
< |
#line 499 "MDTreeParser.cpp" |
385 |
> |
#line 386 "MDTreeParser.cpp" |
386 |
|
break; |
387 |
|
} |
388 |
< |
case FLOATTWO: |
388 |
> |
case NUM_DOUBLE: |
389 |
|
{ |
390 |
|
d2 = _t; |
391 |
< |
match(_t,FLOATTWO); |
391 |
> |
match(_t,NUM_DOUBLE); |
392 |
|
_t = _t->getNextSibling(); |
393 |
< |
#line 266 "MDTreeParser.g" |
393 |
> |
#line 258 "MDTreeParser.g" |
394 |
|
dval = lexi_cast<double>(d2->getText()); |
395 |
< |
#line 509 "MDTreeParser.cpp" |
395 |
> |
#line 396 "MDTreeParser.cpp" |
396 |
|
break; |
397 |
|
} |
398 |
|
default: |
481 |
|
|
482 |
|
void MDTreeParser::atomblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
483 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST atomblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
484 |
< |
#line 94 "MDTreeParser.g" |
484 |
> |
#line 87 "MDTreeParser.g" |
485 |
|
|
486 |
|
int index; |
487 |
|
|
488 |
< |
#line 602 "MDTreeParser.cpp" |
488 |
> |
#line 489 "MDTreeParser.cpp" |
489 |
|
|
490 |
|
try { // for error handling |
491 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t26 = _t; |
492 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp9_AST_in = _t; |
491 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t22 = _t; |
492 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp8_AST_in = _t; |
493 |
|
match(_t,ATOM); |
494 |
|
_t = _t->getFirstChild(); |
495 |
|
index=intConst(_t); |
496 |
|
_t = _retTree; |
497 |
< |
#line 98 "MDTreeParser.g" |
497 |
> |
#line 91 "MDTreeParser.g" |
498 |
|
AtomStamp* currAtomStamp = new AtomStamp(index); blockStack.push(currAtomStamp); |
499 |
< |
#line 613 "MDTreeParser.cpp" |
499 |
> |
#line 500 "MDTreeParser.cpp" |
500 |
|
{ // ( ... )* |
501 |
|
for (;;) { |
502 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
506 |
|
_t = _retTree; |
507 |
|
} |
508 |
|
else { |
509 |
< |
goto _loop28; |
509 |
> |
goto _loop24; |
510 |
|
} |
511 |
|
|
512 |
|
} |
513 |
< |
_loop28:; |
513 |
> |
_loop24:; |
514 |
|
} // ( ... )* |
515 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp10_AST_in = _t; |
515 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp9_AST_in = _t; |
516 |
|
match(_t,ENDBLOCK); |
517 |
|
_t = _t->getNextSibling(); |
518 |
< |
_t = __t26; |
518 |
> |
_t = __t22; |
519 |
|
_t = _t->getNextSibling(); |
520 |
< |
#line 100 "MDTreeParser.g" |
520 |
> |
#line 93 "MDTreeParser.g" |
521 |
|
|
522 |
|
blockStack.top()->validate(); |
523 |
|
blockStack.pop(); |
524 |
|
MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top()); |
525 |
|
currMoleculeStamp->addAtomStamp(currAtomStamp); |
526 |
|
|
527 |
< |
#line 641 "MDTreeParser.cpp" |
527 |
> |
#line 528 "MDTreeParser.cpp" |
528 |
|
} |
529 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
530 |
|
reportError(ex); |
538 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST bondblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
539 |
|
|
540 |
|
try { // for error handling |
541 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t33 = _t; |
542 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp11_AST_in = _t; |
541 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t29 = _t; |
542 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp10_AST_in = _t; |
543 |
|
match(_t,BOND); |
544 |
|
_t = _t->getFirstChild(); |
545 |
< |
#line 120 "MDTreeParser.g" |
545 |
> |
#line 113 "MDTreeParser.g" |
546 |
|
BondStamp* currBondStamp = new BondStamp(); blockStack.push(currBondStamp); |
547 |
< |
#line 661 "MDTreeParser.cpp" |
547 |
> |
#line 548 "MDTreeParser.cpp" |
548 |
|
{ // ( ... )* |
549 |
|
for (;;) { |
550 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
554 |
|
_t = _retTree; |
555 |
|
} |
556 |
|
else { |
557 |
< |
goto _loop35; |
557 |
> |
goto _loop31; |
558 |
|
} |
559 |
|
|
560 |
|
} |
561 |
< |
_loop35:; |
561 |
> |
_loop31:; |
562 |
|
} // ( ... )* |
563 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp12_AST_in = _t; |
563 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp11_AST_in = _t; |
564 |
|
match(_t,ENDBLOCK); |
565 |
|
_t = _t->getNextSibling(); |
566 |
< |
_t = __t33; |
566 |
> |
_t = __t29; |
567 |
|
_t = _t->getNextSibling(); |
568 |
< |
#line 122 "MDTreeParser.g" |
568 |
> |
#line 115 "MDTreeParser.g" |
569 |
|
|
570 |
|
blockStack.pop(); |
571 |
|
MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top()); |
572 |
|
currMoleculeStamp->addBondStamp(currBondStamp); |
573 |
|
|
574 |
< |
#line 688 "MDTreeParser.cpp" |
574 |
> |
#line 575 "MDTreeParser.cpp" |
575 |
|
} |
576 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
577 |
|
reportError(ex); |
585 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST bendblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
586 |
|
|
587 |
|
try { // for error handling |
588 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t39 = _t; |
589 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp13_AST_in = _t; |
588 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t35 = _t; |
589 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp12_AST_in = _t; |
590 |
|
match(_t,BEND); |
591 |
|
_t = _t->getFirstChild(); |
592 |
< |
#line 138 "MDTreeParser.g" |
592 |
> |
#line 131 "MDTreeParser.g" |
593 |
|
BendStamp* currBendStamp = new BendStamp(); blockStack.push(currBendStamp); |
594 |
< |
#line 708 "MDTreeParser.cpp" |
594 |
> |
#line 595 "MDTreeParser.cpp" |
595 |
|
{ // ( ... )* |
596 |
|
for (;;) { |
597 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
601 |
|
_t = _retTree; |
602 |
|
} |
603 |
|
else { |
604 |
< |
goto _loop41; |
604 |
> |
goto _loop37; |
605 |
|
} |
606 |
|
|
607 |
|
} |
608 |
< |
_loop41:; |
608 |
> |
_loop37:; |
609 |
|
} // ( ... )* |
610 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp14_AST_in = _t; |
610 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp13_AST_in = _t; |
611 |
|
match(_t,ENDBLOCK); |
612 |
|
_t = _t->getNextSibling(); |
613 |
< |
_t = __t39; |
613 |
> |
_t = __t35; |
614 |
|
_t = _t->getNextSibling(); |
615 |
< |
#line 140 "MDTreeParser.g" |
615 |
> |
#line 133 "MDTreeParser.g" |
616 |
|
|
617 |
|
blockStack.top()->validate(); |
618 |
|
blockStack.pop(); |
619 |
|
MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top()); |
620 |
|
currMoleculeStamp->addBendStamp(currBendStamp); |
621 |
|
|
622 |
< |
#line 736 "MDTreeParser.cpp" |
622 |
> |
#line 623 "MDTreeParser.cpp" |
623 |
|
} |
624 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
625 |
|
reportError(ex); |
633 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST torsionblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
634 |
|
|
635 |
|
try { // for error handling |
636 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t45 = _t; |
637 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp15_AST_in = _t; |
636 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t41 = _t; |
637 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp14_AST_in = _t; |
638 |
|
match(_t,TORSION); |
639 |
|
_t = _t->getFirstChild(); |
640 |
< |
#line 157 "MDTreeParser.g" |
640 |
> |
#line 150 "MDTreeParser.g" |
641 |
|
TorsionStamp* currTorsionStamp = new TorsionStamp(); blockStack.push(currTorsionStamp); |
642 |
< |
#line 756 "MDTreeParser.cpp" |
642 |
> |
#line 643 "MDTreeParser.cpp" |
643 |
|
{ // ( ... )* |
644 |
|
for (;;) { |
645 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
649 |
|
_t = _retTree; |
650 |
|
} |
651 |
|
else { |
652 |
< |
goto _loop47; |
652 |
> |
goto _loop43; |
653 |
|
} |
654 |
|
|
655 |
|
} |
656 |
< |
_loop47:; |
656 |
> |
_loop43:; |
657 |
|
} // ( ... )* |
658 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp16_AST_in = _t; |
658 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp15_AST_in = _t; |
659 |
|
match(_t,ENDBLOCK); |
660 |
|
_t = _t->getNextSibling(); |
661 |
< |
_t = __t45; |
661 |
> |
_t = __t41; |
662 |
|
_t = _t->getNextSibling(); |
663 |
< |
#line 159 "MDTreeParser.g" |
663 |
> |
#line 152 "MDTreeParser.g" |
664 |
|
|
665 |
|
blockStack.top()->validate(); |
666 |
|
blockStack.pop(); |
667 |
|
MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top()); |
668 |
|
currMoleculeStamp->addTorsionStamp(currTorsionStamp); |
669 |
|
|
670 |
< |
#line 784 "MDTreeParser.cpp" |
670 |
> |
#line 671 "MDTreeParser.cpp" |
671 |
|
} |
672 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
673 |
|
reportError(ex); |
679 |
|
|
680 |
|
void MDTreeParser::rigidbodyblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
681 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST rigidbodyblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
682 |
< |
#line 176 "MDTreeParser.g" |
682 |
> |
#line 169 "MDTreeParser.g" |
683 |
|
|
684 |
|
int index; |
685 |
|
|
686 |
< |
#line 800 "MDTreeParser.cpp" |
686 |
> |
#line 687 "MDTreeParser.cpp" |
687 |
|
|
688 |
|
try { // for error handling |
689 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t51 = _t; |
690 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp17_AST_in = _t; |
689 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t47 = _t; |
690 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp16_AST_in = _t; |
691 |
|
match(_t,RIGIDBODY); |
692 |
|
_t = _t->getFirstChild(); |
693 |
|
index=intConst(_t); |
694 |
|
_t = _retTree; |
695 |
< |
#line 180 "MDTreeParser.g" |
695 |
> |
#line 173 "MDTreeParser.g" |
696 |
|
RigidBodyStamp* currRigidBodyStamp = new RigidBodyStamp(index); blockStack.push(currRigidBodyStamp); |
697 |
< |
#line 811 "MDTreeParser.cpp" |
697 |
> |
#line 698 "MDTreeParser.cpp" |
698 |
|
{ // ( ... )* |
699 |
|
for (;;) { |
700 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
704 |
|
_t = _retTree; |
705 |
|
} |
706 |
|
else { |
707 |
< |
goto _loop53; |
707 |
> |
goto _loop49; |
708 |
|
} |
709 |
|
|
710 |
|
} |
711 |
< |
_loop53:; |
711 |
> |
_loop49:; |
712 |
|
} // ( ... )* |
713 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp18_AST_in = _t; |
713 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp17_AST_in = _t; |
714 |
|
match(_t,ENDBLOCK); |
715 |
|
_t = _t->getNextSibling(); |
716 |
< |
_t = __t51; |
716 |
> |
_t = __t47; |
717 |
|
_t = _t->getNextSibling(); |
718 |
< |
#line 182 "MDTreeParser.g" |
718 |
> |
#line 175 "MDTreeParser.g" |
719 |
|
|
720 |
|
blockStack.top()->validate(); |
721 |
|
blockStack.pop(); |
722 |
|
MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top()); |
723 |
|
currMoleculeStamp->addRigidBodyStamp(currRigidBodyStamp); |
724 |
|
|
725 |
< |
#line 839 "MDTreeParser.cpp" |
725 |
> |
#line 726 "MDTreeParser.cpp" |
726 |
|
} |
727 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
728 |
|
reportError(ex); |
736 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST cutoffgroupblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
737 |
|
|
738 |
|
try { // for error handling |
739 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t57 = _t; |
740 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp19_AST_in = _t; |
739 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t53 = _t; |
740 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp18_AST_in = _t; |
741 |
|
match(_t,CUTOFFGROUP); |
742 |
|
_t = _t->getFirstChild(); |
743 |
< |
#line 199 "MDTreeParser.g" |
743 |
> |
#line 192 "MDTreeParser.g" |
744 |
|
CutoffGroupStamp* currCutoffGroupStamp = new CutoffGroupStamp(); blockStack.push(currCutoffGroupStamp); |
745 |
< |
#line 859 "MDTreeParser.cpp" |
745 |
> |
#line 746 "MDTreeParser.cpp" |
746 |
|
{ // ( ... )* |
747 |
|
for (;;) { |
748 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
752 |
|
_t = _retTree; |
753 |
|
} |
754 |
|
else { |
755 |
< |
goto _loop59; |
755 |
> |
goto _loop55; |
756 |
|
} |
757 |
|
|
758 |
|
} |
759 |
< |
_loop59:; |
759 |
> |
_loop55:; |
760 |
|
} // ( ... )* |
761 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp20_AST_in = _t; |
761 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp19_AST_in = _t; |
762 |
|
match(_t,ENDBLOCK); |
763 |
|
_t = _t->getNextSibling(); |
764 |
< |
_t = __t57; |
764 |
> |
_t = __t53; |
765 |
|
_t = _t->getNextSibling(); |
766 |
< |
#line 201 "MDTreeParser.g" |
766 |
> |
#line 194 "MDTreeParser.g" |
767 |
|
|
768 |
|
blockStack.top()->validate(); |
769 |
|
blockStack.pop(); |
770 |
|
MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top()); |
771 |
|
currMoleculeStamp->addCutoffGroupStamp(currCutoffGroupStamp); |
772 |
|
|
773 |
< |
#line 887 "MDTreeParser.cpp" |
773 |
> |
#line 774 "MDTreeParser.cpp" |
774 |
|
} |
775 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
776 |
|
reportError(ex); |
782 |
|
|
783 |
|
void MDTreeParser::fragmentblock(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
784 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST fragmentblock_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
785 |
< |
#line 218 "MDTreeParser.g" |
785 |
> |
#line 211 "MDTreeParser.g" |
786 |
|
int ival; |
787 |
< |
#line 901 "MDTreeParser.cpp" |
787 |
> |
#line 788 "MDTreeParser.cpp" |
788 |
|
|
789 |
|
try { // for error handling |
790 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t63 = _t; |
791 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp21_AST_in = _t; |
790 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t59 = _t; |
791 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp20_AST_in = _t; |
792 |
|
match(_t,FRAGMENT); |
793 |
|
_t = _t->getFirstChild(); |
794 |
|
ival=intConst(_t); |
795 |
|
_t = _retTree; |
796 |
< |
#line 219 "MDTreeParser.g" |
796 |
> |
#line 212 "MDTreeParser.g" |
797 |
|
FragmentStamp* currFragmentStamp = new FragmentStamp(ival); blockStack.push(currFragmentStamp); |
798 |
< |
#line 912 "MDTreeParser.cpp" |
798 |
> |
#line 799 "MDTreeParser.cpp" |
799 |
|
{ // ( ... )* |
800 |
|
for (;;) { |
801 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
805 |
|
_t = _retTree; |
806 |
|
} |
807 |
|
else { |
808 |
< |
goto _loop65; |
808 |
> |
goto _loop61; |
809 |
|
} |
810 |
|
|
811 |
|
} |
812 |
< |
_loop65:; |
812 |
> |
_loop61:; |
813 |
|
} // ( ... )* |
814 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp22_AST_in = _t; |
814 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp21_AST_in = _t; |
815 |
|
match(_t,ENDBLOCK); |
816 |
|
_t = _t->getNextSibling(); |
817 |
< |
_t = __t63; |
817 |
> |
_t = __t59; |
818 |
|
_t = _t->getNextSibling(); |
819 |
< |
#line 221 "MDTreeParser.g" |
819 |
> |
#line 214 "MDTreeParser.g" |
820 |
|
|
821 |
|
blockStack.top()->validate(); |
822 |
|
blockStack.pop(); |
823 |
|
MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top()); |
824 |
|
currMoleculeStamp->addFragmentStamp(currFragmentStamp); |
825 |
|
|
826 |
< |
#line 940 "MDTreeParser.cpp" |
826 |
> |
#line 827 "MDTreeParser.cpp" |
827 |
|
} |
828 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
829 |
|
reportError(ex); |
835 |
|
|
836 |
|
void MDTreeParser::atomstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
837 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST atomstatement_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
838 |
< |
#line 108 "MDTreeParser.g" |
838 |
> |
#line 101 "MDTreeParser.g" |
839 |
|
|
840 |
|
vector<double> dvec; |
841 |
|
AtomStamp* currAtomStamp = static_cast<AtomStamp*>(blockStack.top()); |
842 |
|
|
843 |
|
|
844 |
< |
#line 958 "MDTreeParser.cpp" |
844 |
> |
#line 845 "MDTreeParser.cpp" |
845 |
|
|
846 |
|
try { // for error handling |
847 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
855 |
|
} |
856 |
|
case POSITION: |
857 |
|
{ |
858 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t30 = _t; |
859 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp23_AST_in = _t; |
858 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t26 = _t; |
859 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp22_AST_in = _t; |
860 |
|
match(_t,POSITION); |
861 |
|
_t = _t->getFirstChild(); |
862 |
< |
dvec=signedNumberTuple(_t); |
862 |
> |
dvec=doubleNumberTuple(_t); |
863 |
|
_t = _retTree; |
864 |
< |
_t = __t30; |
864 |
> |
_t = __t26; |
865 |
|
_t = _t->getNextSibling(); |
866 |
< |
#line 115 "MDTreeParser.g" |
866 |
> |
#line 108 "MDTreeParser.g" |
867 |
|
currAtomStamp->setPosition(dvec); |
868 |
< |
#line 982 "MDTreeParser.cpp" |
868 |
> |
#line 869 "MDTreeParser.cpp" |
869 |
|
break; |
870 |
|
} |
871 |
|
case ORIENTATION: |
872 |
|
{ |
873 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t31 = _t; |
874 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp24_AST_in = _t; |
873 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t27 = _t; |
874 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp23_AST_in = _t; |
875 |
|
match(_t,ORIENTATION); |
876 |
|
_t = _t->getFirstChild(); |
877 |
< |
dvec=signedNumberTuple(_t); |
877 |
> |
dvec=doubleNumberTuple(_t); |
878 |
|
_t = _retTree; |
879 |
< |
_t = __t31; |
879 |
> |
_t = __t27; |
880 |
|
_t = _t->getNextSibling(); |
881 |
< |
#line 116 "MDTreeParser.g" |
881 |
> |
#line 109 "MDTreeParser.g" |
882 |
|
currAtomStamp->setOrientation(dvec); |
883 |
< |
#line 997 "MDTreeParser.cpp" |
883 |
> |
#line 884 "MDTreeParser.cpp" |
884 |
|
break; |
885 |
|
} |
886 |
|
default: |
897 |
|
_retTree = _t; |
898 |
|
} |
899 |
|
|
900 |
< |
vector<double> MDTreeParser::signedNumberTuple(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
901 |
< |
#line 234 "MDTreeParser.g" |
900 |
> |
vector<double> MDTreeParser::doubleNumberTuple(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
901 |
> |
#line 227 "MDTreeParser.g" |
902 |
|
vector<double> dvec; |
903 |
< |
#line 1017 "MDTreeParser.cpp" |
904 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST signedNumberTuple_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
905 |
< |
#line 234 "MDTreeParser.g" |
903 |
> |
#line 904 "MDTreeParser.cpp" |
904 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumberTuple_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
905 |
> |
#line 227 "MDTreeParser.g" |
906 |
|
|
907 |
|
double dval; |
908 |
|
|
909 |
< |
#line 1023 "MDTreeParser.cpp" |
909 |
> |
#line 910 "MDTreeParser.cpp" |
910 |
|
|
911 |
|
try { // for error handling |
912 |
|
{ // ( ... )+ |
913 |
< |
int _cnt69=0; |
913 |
> |
int _cnt65=0; |
914 |
|
for (;;) { |
915 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
916 |
|
_t = ASTNULL; |
917 |
< |
if (((_t->getType() >= OCTALINT && _t->getType() <= FLOATTWO))) { |
918 |
< |
dval=signedNumber(_t); |
917 |
> |
if (((_t->getType() >= NUM_INT && _t->getType() <= NUM_DOUBLE))) { |
918 |
> |
dval=doubleNumber(_t); |
919 |
|
_t = _retTree; |
920 |
< |
#line 238 "MDTreeParser.g" |
920 |
> |
#line 231 "MDTreeParser.g" |
921 |
|
dvec.push_back(dval); |
922 |
< |
#line 1036 "MDTreeParser.cpp" |
922 |
> |
#line 923 "MDTreeParser.cpp" |
923 |
|
} |
924 |
|
else { |
925 |
< |
if ( _cnt69>=1 ) { goto _loop69; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);} |
925 |
> |
if ( _cnt65>=1 ) { goto _loop65; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);} |
926 |
|
} |
927 |
|
|
928 |
< |
_cnt69++; |
928 |
> |
_cnt65++; |
929 |
|
} |
930 |
< |
_loop69:; |
930 |
> |
_loop65:; |
931 |
|
} // ( ... )+ |
932 |
|
} |
933 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
941 |
|
|
942 |
|
void MDTreeParser::bondstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
943 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST bondstatement_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
944 |
< |
#line 129 "MDTreeParser.g" |
944 |
> |
#line 122 "MDTreeParser.g" |
945 |
|
|
946 |
|
vector<int> ivec; |
947 |
|
BondStamp* currBondStamp = static_cast<BondStamp*>(blockStack.top()); |
948 |
|
|
949 |
< |
#line 1063 "MDTreeParser.cpp" |
949 |
> |
#line 950 "MDTreeParser.cpp" |
950 |
|
|
951 |
|
try { // for error handling |
952 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
960 |
|
} |
961 |
|
case MEMBERS: |
962 |
|
{ |
963 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t37 = _t; |
964 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp25_AST_in = _t; |
963 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t33 = _t; |
964 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp24_AST_in = _t; |
965 |
|
match(_t,MEMBERS); |
966 |
|
_t = _t->getFirstChild(); |
967 |
|
ivec=inttuple(_t); |
968 |
|
_t = _retTree; |
969 |
< |
_t = __t37; |
969 |
> |
_t = __t33; |
970 |
|
_t = _t->getNextSibling(); |
971 |
< |
#line 135 "MDTreeParser.g" |
971 |
> |
#line 128 "MDTreeParser.g" |
972 |
|
currBondStamp->setMembers(ivec); |
973 |
< |
#line 1087 "MDTreeParser.cpp" |
973 |
> |
#line 974 "MDTreeParser.cpp" |
974 |
|
break; |
975 |
|
} |
976 |
|
default: |
988 |
|
} |
989 |
|
|
990 |
|
vector<int> MDTreeParser::inttuple(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
991 |
< |
#line 241 "MDTreeParser.g" |
991 |
> |
#line 234 "MDTreeParser.g" |
992 |
|
vector<int> ivec; |
993 |
< |
#line 1107 "MDTreeParser.cpp" |
993 |
> |
#line 994 "MDTreeParser.cpp" |
994 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST inttuple_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
995 |
< |
#line 241 "MDTreeParser.g" |
995 |
> |
#line 234 "MDTreeParser.g" |
996 |
|
|
997 |
|
int ival; |
998 |
|
|
999 |
< |
#line 1113 "MDTreeParser.cpp" |
999 |
> |
#line 1000 "MDTreeParser.cpp" |
1000 |
|
|
1001 |
|
try { // for error handling |
1002 |
|
{ // ( ... )+ |
1003 |
< |
int _cnt72=0; |
1003 |
> |
int _cnt68=0; |
1004 |
|
for (;;) { |
1005 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
1006 |
|
_t = ASTNULL; |
1007 |
< |
if (((_t->getType() >= OCTALINT && _t->getType() <= HEXADECIMALINT))) { |
1007 |
> |
if ((_t->getType() == NUM_INT || _t->getType() == NUM_LONG)) { |
1008 |
|
ival=intConst(_t); |
1009 |
|
_t = _retTree; |
1010 |
< |
#line 245 "MDTreeParser.g" |
1010 |
> |
#line 238 "MDTreeParser.g" |
1011 |
|
ivec.push_back(ival); |
1012 |
< |
#line 1126 "MDTreeParser.cpp" |
1012 |
> |
#line 1013 "MDTreeParser.cpp" |
1013 |
|
} |
1014 |
|
else { |
1015 |
< |
if ( _cnt72>=1 ) { goto _loop72; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);} |
1015 |
> |
if ( _cnt68>=1 ) { goto _loop68; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(_t);} |
1016 |
|
} |
1017 |
|
|
1018 |
< |
_cnt72++; |
1018 |
> |
_cnt68++; |
1019 |
|
} |
1020 |
< |
_loop72:; |
1020 |
> |
_loop68:; |
1021 |
|
} // ( ... )+ |
1022 |
|
} |
1023 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
1031 |
|
|
1032 |
|
void MDTreeParser::bendstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
1033 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST bendstatement_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1034 |
< |
#line 148 "MDTreeParser.g" |
1034 |
> |
#line 141 "MDTreeParser.g" |
1035 |
|
|
1036 |
|
vector<int> ivec; |
1037 |
|
BendStamp* currBendStamp = static_cast<BendStamp*>(blockStack.top()); |
1038 |
|
|
1039 |
< |
#line 1153 "MDTreeParser.cpp" |
1039 |
> |
#line 1040 "MDTreeParser.cpp" |
1040 |
|
|
1041 |
|
try { // for error handling |
1042 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
1050 |
|
} |
1051 |
|
case MEMBERS: |
1052 |
|
{ |
1053 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t43 = _t; |
1054 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp26_AST_in = _t; |
1053 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t39 = _t; |
1054 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp25_AST_in = _t; |
1055 |
|
match(_t,MEMBERS); |
1056 |
|
_t = _t->getFirstChild(); |
1057 |
|
ivec=inttuple(_t); |
1058 |
|
_t = _retTree; |
1059 |
< |
_t = __t43; |
1059 |
> |
_t = __t39; |
1060 |
|
_t = _t->getNextSibling(); |
1061 |
< |
#line 154 "MDTreeParser.g" |
1061 |
> |
#line 147 "MDTreeParser.g" |
1062 |
|
currBendStamp->setMembers(ivec); |
1063 |
< |
#line 1177 "MDTreeParser.cpp" |
1063 |
> |
#line 1064 "MDTreeParser.cpp" |
1064 |
|
break; |
1065 |
|
} |
1066 |
|
default: |
1079 |
|
|
1080 |
|
void MDTreeParser::torsionstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
1081 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST torsionstatement_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1082 |
< |
#line 167 "MDTreeParser.g" |
1082 |
> |
#line 160 "MDTreeParser.g" |
1083 |
|
|
1084 |
|
vector<int> ivec; |
1085 |
|
TorsionStamp* currTorsionStamp = static_cast<TorsionStamp*>(blockStack.top()); |
1086 |
|
|
1087 |
< |
#line 1201 "MDTreeParser.cpp" |
1087 |
> |
#line 1088 "MDTreeParser.cpp" |
1088 |
|
|
1089 |
|
try { // for error handling |
1090 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
1098 |
|
} |
1099 |
|
case MEMBERS: |
1100 |
|
{ |
1101 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t49 = _t; |
1102 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp27_AST_in = _t; |
1101 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t45 = _t; |
1102 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp26_AST_in = _t; |
1103 |
|
match(_t,MEMBERS); |
1104 |
|
_t = _t->getFirstChild(); |
1105 |
|
ivec=inttuple(_t); |
1106 |
|
_t = _retTree; |
1107 |
< |
_t = __t49; |
1107 |
> |
_t = __t45; |
1108 |
|
_t = _t->getNextSibling(); |
1109 |
< |
#line 173 "MDTreeParser.g" |
1109 |
> |
#line 166 "MDTreeParser.g" |
1110 |
|
currTorsionStamp->setMembers(ivec); |
1111 |
< |
#line 1225 "MDTreeParser.cpp" |
1111 |
> |
#line 1112 "MDTreeParser.cpp" |
1112 |
|
break; |
1113 |
|
} |
1114 |
|
default: |
1127 |
|
|
1128 |
|
void MDTreeParser::rigidbodystatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
1129 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST rigidbodystatement_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1130 |
< |
#line 190 "MDTreeParser.g" |
1130 |
> |
#line 183 "MDTreeParser.g" |
1131 |
|
|
1132 |
|
vector<int> ivec; |
1133 |
|
RigidBodyStamp* currRigidBodyStamp = static_cast<RigidBodyStamp*>(blockStack.top()); |
1134 |
|
|
1135 |
< |
#line 1249 "MDTreeParser.cpp" |
1135 |
> |
#line 1136 "MDTreeParser.cpp" |
1136 |
|
|
1137 |
|
try { // for error handling |
1138 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
1146 |
|
} |
1147 |
|
case MEMBERS: |
1148 |
|
{ |
1149 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t55 = _t; |
1150 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp28_AST_in = _t; |
1149 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t51 = _t; |
1150 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp27_AST_in = _t; |
1151 |
|
match(_t,MEMBERS); |
1152 |
|
_t = _t->getFirstChild(); |
1153 |
|
ivec=inttuple(_t); |
1154 |
|
_t = _retTree; |
1155 |
< |
_t = __t55; |
1155 |
> |
_t = __t51; |
1156 |
|
_t = _t->getNextSibling(); |
1157 |
< |
#line 196 "MDTreeParser.g" |
1157 |
> |
#line 189 "MDTreeParser.g" |
1158 |
|
currRigidBodyStamp->setMembers(ivec); |
1159 |
< |
#line 1273 "MDTreeParser.cpp" |
1159 |
> |
#line 1160 "MDTreeParser.cpp" |
1160 |
|
break; |
1161 |
|
} |
1162 |
|
default: |
1175 |
|
|
1176 |
|
void MDTreeParser::cutoffgroupstatement(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
1177 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST cutoffgroupstatement_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1178 |
< |
#line 209 "MDTreeParser.g" |
1178 |
> |
#line 202 "MDTreeParser.g" |
1179 |
|
|
1180 |
|
vector<int> ivec; |
1181 |
|
CutoffGroupStamp* currCutoffGroupStamp = static_cast<CutoffGroupStamp*>(blockStack.top()); |
1182 |
|
|
1183 |
< |
#line 1297 "MDTreeParser.cpp" |
1183 |
> |
#line 1184 "MDTreeParser.cpp" |
1184 |
|
|
1185 |
|
try { // for error handling |
1186 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
1194 |
|
} |
1195 |
|
case MEMBERS: |
1196 |
|
{ |
1197 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST __t61 = _t; |
1198 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp29_AST_in = _t; |
1197 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST __t57 = _t; |
1198 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp28_AST_in = _t; |
1199 |
|
match(_t,MEMBERS); |
1200 |
|
_t = _t->getFirstChild(); |
1201 |
|
ivec=inttuple(_t); |
1202 |
|
_t = _retTree; |
1203 |
< |
_t = __t61; |
1203 |
> |
_t = __t57; |
1204 |
|
_t = _t->getNextSibling(); |
1205 |
< |
#line 215 "MDTreeParser.g" |
1205 |
> |
#line 208 "MDTreeParser.g" |
1206 |
|
currCutoffGroupStamp->setMembers(ivec); |
1207 |
< |
#line 1321 "MDTreeParser.cpp" |
1207 |
> |
#line 1208 "MDTreeParser.cpp" |
1208 |
|
break; |
1209 |
|
} |
1210 |
|
default: |
1236 |
|
_retTree = _t; |
1237 |
|
} |
1238 |
|
|
1239 |
< |
double MDTreeParser::signedNumber(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
1240 |
< |
#line 256 "MDTreeParser.g" |
1239 |
> |
double MDTreeParser::doubleNumber(ANTLR_USE_NAMESPACE(antlr)RefAST _t) { |
1240 |
> |
#line 248 "MDTreeParser.g" |
1241 |
|
double dval; |
1242 |
< |
#line 1356 "MDTreeParser.cpp" |
1243 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST signedNumber_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1242 |
> |
#line 1243 "MDTreeParser.cpp" |
1243 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST doubleNumber_AST_in = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1244 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST ic = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1245 |
|
ANTLR_USE_NAMESPACE(antlr)RefAST fc = ANTLR_USE_NAMESPACE(antlr)nullAST; |
1246 |
|
|
1248 |
|
if (_t == ANTLR_USE_NAMESPACE(antlr)nullAST ) |
1249 |
|
_t = ASTNULL; |
1250 |
|
switch ( _t->getType()) { |
1251 |
< |
case OCTALINT: |
1252 |
< |
case DECIMALINT: |
1366 |
< |
case HEXADECIMALINT: |
1251 |
> |
case NUM_INT: |
1252 |
> |
case NUM_LONG: |
1253 |
|
{ |
1254 |
|
ic = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1255 |
|
intConst(_t); |
1256 |
|
_t = _retTree; |
1257 |
< |
#line 258 "MDTreeParser.g" |
1257 |
> |
#line 250 "MDTreeParser.g" |
1258 |
|
dval = lexi_cast<double>(ic->getText()); |
1259 |
< |
#line 1374 "MDTreeParser.cpp" |
1259 |
> |
#line 1260 "MDTreeParser.cpp" |
1260 |
|
break; |
1261 |
|
} |
1262 |
< |
case FLOATONE: |
1263 |
< |
case FLOATTWO: |
1262 |
> |
case NUM_FLOAT: |
1263 |
> |
case NUM_DOUBLE: |
1264 |
|
{ |
1265 |
|
fc = (_t == ASTNULL) ? ANTLR_USE_NAMESPACE(antlr)nullAST : _t; |
1266 |
|
floatConst(_t); |
1267 |
|
_t = _retTree; |
1268 |
< |
#line 259 "MDTreeParser.g" |
1268 |
> |
#line 251 "MDTreeParser.g" |
1269 |
|
dval = lexi_cast<double>(fc->getText()); |
1270 |
< |
#line 1385 "MDTreeParser.cpp" |
1270 |
> |
#line 1271 "MDTreeParser.cpp" |
1271 |
|
break; |
1272 |
|
} |
1273 |
|
default: |
1318 |
|
"LPAREN", |
1319 |
|
"RPAREN", |
1320 |
|
"COMMA", |
1321 |
< |
"OCTALINT", |
1322 |
< |
"DECIMALINT", |
1323 |
< |
"HEXADECIMALINT", |
1324 |
< |
"FLOATONE", |
1439 |
< |
"FLOATTWO", |
1321 |
> |
"NUM_INT", |
1322 |
> |
"NUM_LONG", |
1323 |
> |
"NUM_FLOAT", |
1324 |
> |
"NUM_DOUBLE", |
1325 |
|
"DOT", |
1326 |
|
"COLON", |
1327 |
|
"QUESTIONMARK", |
1334 |
|
"CharLiteral", |
1335 |
|
"EndOfLine", |
1336 |
|
"Escape", |
1337 |
+ |
"Vocabulary", |
1338 |
|
"Digit", |
1339 |
|
"Decimal", |
1340 |
< |
"LongSuffix", |
1341 |
< |
"UnsignedSuffix", |
1342 |
< |
"FloatSuffix", |
1457 |
< |
"Exponent", |
1458 |
< |
"Vocabulary", |
1459 |
< |
"Number", |
1460 |
< |
"MINUS", |
1340 |
> |
"HEX_DIGIT", |
1341 |
> |
"EXPONENT", |
1342 |
> |
"FLOAT_SUFFIX", |
1343 |
|
0 |
1344 |
|
}; |
1345 |
|
|