| 1 |
< |
/* $ANTLR 2.7.7 (20120725): "MDParser.g" -> "MDParser.cpp"$ */ |
| 1 |
> |
/* $ANTLR 2.7.7 (20140107): "MDParser.g" -> "MDParser.cpp"$ */ |
| 2 |
|
#include "MDParser.hpp" |
| 3 |
|
#include <antlr/NoViableAltException.hpp> |
| 4 |
|
#include <antlr/SemanticException.hpp> |
| 188 |
|
tmp6_AST = astFactory->create(LT(1)); |
| 189 |
|
astFactory->addASTChild(currentAST, tmp6_AST); |
| 190 |
|
match(RCURLY); |
| 191 |
< |
#line 74 "MDParser.g" |
| 191 |
> |
#line 77 "MDParser.g" |
| 192 |
|
tmp6_AST->setType(ENDBLOCK); |
| 193 |
|
#line 194 "MDParser.cpp" |
| 194 |
|
componentblock_AST = currentAST.root; |
| 228 |
|
tmp9_AST = astFactory->create(LT(1)); |
| 229 |
|
astFactory->addASTChild(currentAST, tmp9_AST); |
| 230 |
|
match(RCURLY); |
| 231 |
< |
#line 92 "MDParser.g" |
| 231 |
> |
#line 95 "MDParser.g" |
| 232 |
|
tmp9_AST->setType(ENDBLOCK); |
| 233 |
|
#line 234 "MDParser.cpp" |
| 234 |
|
moleculeblock_AST = currentAST.root; |
| 268 |
|
tmp12_AST = astFactory->create(LT(1)); |
| 269 |
|
astFactory->addASTChild(currentAST, tmp12_AST); |
| 270 |
|
match(RCURLY); |
| 271 |
< |
#line 77 "MDParser.g" |
| 271 |
> |
#line 80 "MDParser.g" |
| 272 |
|
tmp12_AST->setType(ENDBLOCK); |
| 273 |
|
#line 274 "MDParser.cpp" |
| 274 |
|
zconstraintblock_AST = currentAST.root; |
| 308 |
|
tmp15_AST = astFactory->create(LT(1)); |
| 309 |
|
astFactory->addASTChild(currentAST, tmp15_AST); |
| 310 |
|
match(RCURLY); |
| 311 |
< |
#line 80 "MDParser.g" |
| 311 |
> |
#line 83 "MDParser.g" |
| 312 |
|
tmp15_AST->setType(ENDBLOCK); |
| 313 |
|
#line 314 "MDParser.cpp" |
| 314 |
|
restraintblock_AST = currentAST.root; |
| 348 |
|
tmp18_AST = astFactory->create(LT(1)); |
| 349 |
|
astFactory->addASTChild(currentAST, tmp18_AST); |
| 350 |
|
match(RCURLY); |
| 351 |
< |
#line 83 "MDParser.g" |
| 351 |
> |
#line 86 "MDParser.g" |
| 352 |
|
tmp18_AST->setType(ENDBLOCK); |
| 353 |
|
#line 354 "MDParser.cpp" |
| 354 |
|
flucqblock_AST = currentAST.root; |
| 388 |
|
tmp21_AST = astFactory->create(LT(1)); |
| 389 |
|
astFactory->addASTChild(currentAST, tmp21_AST); |
| 390 |
|
match(RCURLY); |
| 391 |
< |
#line 86 "MDParser.g" |
| 391 |
> |
#line 89 "MDParser.g" |
| 392 |
|
tmp21_AST->setType(ENDBLOCK); |
| 393 |
|
#line 394 "MDParser.cpp" |
| 394 |
|
rnemdblock_AST = currentAST.root; |
| 428 |
|
tmp24_AST = astFactory->create(LT(1)); |
| 429 |
|
astFactory->addASTChild(currentAST, tmp24_AST); |
| 430 |
|
match(RCURLY); |
| 431 |
< |
#line 89 "MDParser.g" |
| 431 |
> |
#line 92 "MDParser.g" |
| 432 |
|
tmp24_AST->setType(ENDBLOCK); |
| 433 |
|
#line 434 "MDParser.cpp" |
| 434 |
|
minimizerblock_AST = currentAST.root; |
| 680 |
|
case FRAGMENT: |
| 681 |
|
{ |
| 682 |
|
fragmentblock(); |
| 683 |
+ |
astFactory->addASTChild( currentAST, returnAST ); |
| 684 |
+ |
moleculestatement_AST = currentAST.root; |
| 685 |
+ |
break; |
| 686 |
+ |
} |
| 687 |
+ |
case CONSTRAINT: |
| 688 |
+ |
{ |
| 689 |
+ |
constraintblock(); |
| 690 |
|
astFactory->addASTChild( currentAST, returnAST ); |
| 691 |
|
moleculestatement_AST = currentAST.root; |
| 692 |
|
break; |
| 736 |
|
tmp39_AST = astFactory->create(LT(1)); |
| 737 |
|
astFactory->addASTChild(currentAST, tmp39_AST); |
| 738 |
|
match(RCURLY); |
| 739 |
< |
#line 106 "MDParser.g" |
| 739 |
> |
#line 110 "MDParser.g" |
| 740 |
|
tmp39_AST->setType(ENDBLOCK); |
| 741 |
< |
#line 735 "MDParser.cpp" |
| 741 |
> |
#line 742 "MDParser.cpp" |
| 742 |
|
atomblock_AST = currentAST.root; |
| 743 |
|
} |
| 744 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 795 |
|
tmp44_AST = astFactory->create(LT(1)); |
| 796 |
|
astFactory->addASTChild(currentAST, tmp44_AST); |
| 797 |
|
match(RCURLY); |
| 798 |
< |
#line 115 "MDParser.g" |
| 798 |
> |
#line 119 "MDParser.g" |
| 799 |
|
tmp44_AST->setType(ENDBLOCK); |
| 800 |
< |
#line 794 "MDParser.cpp" |
| 800 |
> |
#line 801 "MDParser.cpp" |
| 801 |
|
bondblock_AST = currentAST.root; |
| 802 |
|
} |
| 803 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 854 |
|
tmp49_AST = astFactory->create(LT(1)); |
| 855 |
|
astFactory->addASTChild(currentAST, tmp49_AST); |
| 856 |
|
match(RCURLY); |
| 857 |
< |
#line 122 "MDParser.g" |
| 857 |
> |
#line 126 "MDParser.g" |
| 858 |
|
tmp49_AST->setType(ENDBLOCK); |
| 859 |
< |
#line 853 "MDParser.cpp" |
| 859 |
> |
#line 860 "MDParser.cpp" |
| 860 |
|
bendblock_AST = currentAST.root; |
| 861 |
|
} |
| 862 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 913 |
|
tmp54_AST = astFactory->create(LT(1)); |
| 914 |
|
astFactory->addASTChild(currentAST, tmp54_AST); |
| 915 |
|
match(RCURLY); |
| 916 |
< |
#line 129 "MDParser.g" |
| 916 |
> |
#line 133 "MDParser.g" |
| 917 |
|
tmp54_AST->setType(ENDBLOCK); |
| 918 |
< |
#line 912 "MDParser.cpp" |
| 918 |
> |
#line 919 "MDParser.cpp" |
| 919 |
|
torsionblock_AST = currentAST.root; |
| 920 |
|
} |
| 921 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 957 |
|
match(LCURLY); |
| 958 |
|
{ // ( ... )* |
| 959 |
|
for (;;) { |
| 960 |
< |
if ((LA(1) == CENTER || LA(1) == ID)) { |
| 960 |
> |
if ((_tokenSet_10.member(LA(1)))) { |
| 961 |
|
inversionstatement(); |
| 962 |
|
astFactory->addASTChild( currentAST, returnAST ); |
| 963 |
|
} |
| 972 |
|
tmp59_AST = astFactory->create(LT(1)); |
| 973 |
|
astFactory->addASTChild(currentAST, tmp59_AST); |
| 974 |
|
match(RCURLY); |
| 975 |
< |
#line 136 "MDParser.g" |
| 975 |
> |
#line 140 "MDParser.g" |
| 976 |
|
tmp59_AST->setType(ENDBLOCK); |
| 977 |
< |
#line 971 "MDParser.cpp" |
| 977 |
> |
#line 978 "MDParser.cpp" |
| 978 |
|
inversionblock_AST = currentAST.root; |
| 979 |
|
} |
| 980 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1016 |
|
tmp64_AST = astFactory->create(LT(1)); |
| 1017 |
|
astFactory->addASTChild(currentAST, tmp64_AST); |
| 1018 |
|
match(RCURLY); |
| 1019 |
< |
#line 143 "MDParser.g" |
| 1019 |
> |
#line 148 "MDParser.g" |
| 1020 |
|
tmp64_AST->setType(ENDBLOCK); |
| 1021 |
< |
#line 1015 "MDParser.cpp" |
| 1021 |
> |
#line 1022 "MDParser.cpp" |
| 1022 |
|
rigidbodyblock_AST = currentAST.root; |
| 1023 |
|
} |
| 1024 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1075 |
|
tmp69_AST = astFactory->create(LT(1)); |
| 1076 |
|
astFactory->addASTChild(currentAST, tmp69_AST); |
| 1077 |
|
match(RCURLY); |
| 1078 |
< |
#line 150 "MDParser.g" |
| 1078 |
> |
#line 155 "MDParser.g" |
| 1079 |
|
tmp69_AST->setType(ENDBLOCK); |
| 1080 |
< |
#line 1074 "MDParser.cpp" |
| 1080 |
> |
#line 1081 "MDParser.cpp" |
| 1081 |
|
cutoffgroupblock_AST = currentAST.root; |
| 1082 |
|
} |
| 1083 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1119 |
|
tmp74_AST = astFactory->create(LT(1)); |
| 1120 |
|
astFactory->addASTChild(currentAST, tmp74_AST); |
| 1121 |
|
match(RCURLY); |
| 1122 |
< |
#line 157 "MDParser.g" |
| 1122 |
> |
#line 162 "MDParser.g" |
| 1123 |
|
tmp74_AST->setType(ENDBLOCK); |
| 1124 |
< |
#line 1118 "MDParser.cpp" |
| 1124 |
> |
#line 1125 "MDParser.cpp" |
| 1125 |
|
fragmentblock_AST = currentAST.root; |
| 1126 |
|
} |
| 1127 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1129 |
|
recover(ex,_tokenSet_8); |
| 1130 |
|
} |
| 1131 |
|
returnAST = fragmentblock_AST; |
| 1132 |
+ |
} |
| 1133 |
+ |
|
| 1134 |
+ |
void MDParser::constraintblock() { |
| 1135 |
+ |
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1136 |
+ |
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
| 1137 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST constraintblock_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1138 |
+ |
|
| 1139 |
+ |
try { // for error handling |
| 1140 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp75_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1141 |
+ |
tmp75_AST = astFactory->create(LT(1)); |
| 1142 |
+ |
astFactory->makeASTRoot(currentAST, tmp75_AST); |
| 1143 |
+ |
match(CONSTRAINT); |
| 1144 |
+ |
{ |
| 1145 |
+ |
switch ( LA(1)) { |
| 1146 |
+ |
case LBRACKET: |
| 1147 |
+ |
{ |
| 1148 |
+ |
match(LBRACKET); |
| 1149 |
+ |
intConst(); |
| 1150 |
+ |
match(RBRACKET); |
| 1151 |
+ |
break; |
| 1152 |
+ |
} |
| 1153 |
+ |
case LCURLY: |
| 1154 |
+ |
{ |
| 1155 |
+ |
break; |
| 1156 |
+ |
} |
| 1157 |
+ |
default: |
| 1158 |
+ |
{ |
| 1159 |
+ |
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); |
| 1160 |
+ |
} |
| 1161 |
+ |
} |
| 1162 |
+ |
} |
| 1163 |
+ |
match(LCURLY); |
| 1164 |
+ |
{ // ( ... )* |
| 1165 |
+ |
for (;;) { |
| 1166 |
+ |
if ((LA(1) == MEMBERS || LA(1) == ID)) { |
| 1167 |
+ |
constraintstatement(); |
| 1168 |
+ |
astFactory->addASTChild( currentAST, returnAST ); |
| 1169 |
+ |
} |
| 1170 |
+ |
else { |
| 1171 |
+ |
goto _loop69; |
| 1172 |
+ |
} |
| 1173 |
+ |
|
| 1174 |
+ |
} |
| 1175 |
+ |
_loop69:; |
| 1176 |
+ |
} // ( ... )* |
| 1177 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp79_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1178 |
+ |
tmp79_AST = astFactory->create(LT(1)); |
| 1179 |
+ |
astFactory->addASTChild(currentAST, tmp79_AST); |
| 1180 |
+ |
match(RCURLY); |
| 1181 |
+ |
#line 168 "MDParser.g" |
| 1182 |
+ |
tmp79_AST->setType(ENDBLOCK); |
| 1183 |
+ |
#line 1184 "MDParser.cpp" |
| 1184 |
+ |
constraintblock_AST = currentAST.root; |
| 1185 |
+ |
} |
| 1186 |
+ |
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1187 |
+ |
reportError(ex); |
| 1188 |
+ |
recover(ex,_tokenSet_8); |
| 1189 |
+ |
} |
| 1190 |
+ |
returnAST = constraintblock_AST; |
| 1191 |
|
} |
| 1192 |
|
|
| 1193 |
|
void MDParser::atomstatement() { |
| 1206 |
|
} |
| 1207 |
|
case POSITION: |
| 1208 |
|
{ |
| 1209 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp75_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1210 |
< |
tmp75_AST = astFactory->create(LT(1)); |
| 1211 |
< |
astFactory->makeASTRoot(currentAST, tmp75_AST); |
| 1209 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp80_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1210 |
> |
tmp80_AST = astFactory->create(LT(1)); |
| 1211 |
> |
astFactory->makeASTRoot(currentAST, tmp80_AST); |
| 1212 |
|
match(POSITION); |
| 1213 |
|
match(LPAREN); |
| 1214 |
|
doubleNumberTuple(); |
| 1220 |
|
} |
| 1221 |
|
case ORIENTATION: |
| 1222 |
|
{ |
| 1223 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp79_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1224 |
< |
tmp79_AST = astFactory->create(LT(1)); |
| 1225 |
< |
astFactory->makeASTRoot(currentAST, tmp79_AST); |
| 1223 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp84_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1224 |
> |
tmp84_AST = astFactory->create(LT(1)); |
| 1225 |
> |
astFactory->makeASTRoot(currentAST, tmp84_AST); |
| 1226 |
|
match(ORIENTATION); |
| 1227 |
|
match(LPAREN); |
| 1228 |
|
doubleNumberTuple(); |
| 1240 |
|
} |
| 1241 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1242 |
|
reportError(ex); |
| 1243 |
< |
recover(ex,_tokenSet_10); |
| 1243 |
> |
recover(ex,_tokenSet_11); |
| 1244 |
|
} |
| 1245 |
|
returnAST = atomstatement_AST; |
| 1246 |
|
} |
| 1261 |
|
astFactory->addASTChild( currentAST, returnAST ); |
| 1262 |
|
} |
| 1263 |
|
else { |
| 1264 |
< |
goto _loop68; |
| 1264 |
> |
goto _loop73; |
| 1265 |
|
} |
| 1266 |
|
|
| 1267 |
|
} |
| 1268 |
< |
_loop68:; |
| 1268 |
> |
_loop73:; |
| 1269 |
|
} // ( ... )* |
| 1270 |
|
doubleNumberTuple_AST = currentAST.root; |
| 1271 |
|
} |
| 1272 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1273 |
|
reportError(ex); |
| 1274 |
< |
recover(ex,_tokenSet_11); |
| 1274 |
> |
recover(ex,_tokenSet_12); |
| 1275 |
|
} |
| 1276 |
|
returnAST = doubleNumberTuple_AST; |
| 1277 |
|
} |
| 1292 |
|
} |
| 1293 |
|
case MEMBERS: |
| 1294 |
|
{ |
| 1295 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp84_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1296 |
< |
tmp84_AST = astFactory->create(LT(1)); |
| 1297 |
< |
astFactory->makeASTRoot(currentAST, tmp84_AST); |
| 1295 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp89_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1296 |
> |
tmp89_AST = astFactory->create(LT(1)); |
| 1297 |
> |
astFactory->makeASTRoot(currentAST, tmp89_AST); |
| 1298 |
|
match(MEMBERS); |
| 1299 |
|
match(LPAREN); |
| 1300 |
|
inttuple(); |
| 1312 |
|
} |
| 1313 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1314 |
|
reportError(ex); |
| 1315 |
< |
recover(ex,_tokenSet_12); |
| 1315 |
> |
recover(ex,_tokenSet_13); |
| 1316 |
|
} |
| 1317 |
|
returnAST = bondstatement_AST; |
| 1318 |
|
} |
| 1333 |
|
astFactory->addASTChild( currentAST, returnAST ); |
| 1334 |
|
} |
| 1335 |
|
else { |
| 1336 |
< |
goto _loop71; |
| 1336 |
> |
goto _loop76; |
| 1337 |
|
} |
| 1338 |
|
|
| 1339 |
|
} |
| 1340 |
< |
_loop71:; |
| 1340 |
> |
_loop76:; |
| 1341 |
|
} // ( ... )* |
| 1342 |
|
inttuple_AST = currentAST.root; |
| 1343 |
|
} |
| 1344 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1345 |
|
reportError(ex); |
| 1346 |
< |
recover(ex,_tokenSet_11); |
| 1346 |
> |
recover(ex,_tokenSet_12); |
| 1347 |
|
} |
| 1348 |
|
returnAST = inttuple_AST; |
| 1349 |
|
} |
| 1364 |
|
} |
| 1365 |
|
case MEMBERS: |
| 1366 |
|
{ |
| 1367 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp89_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1368 |
< |
tmp89_AST = astFactory->create(LT(1)); |
| 1369 |
< |
astFactory->makeASTRoot(currentAST, tmp89_AST); |
| 1367 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp94_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1368 |
> |
tmp94_AST = astFactory->create(LT(1)); |
| 1369 |
> |
astFactory->makeASTRoot(currentAST, tmp94_AST); |
| 1370 |
|
match(MEMBERS); |
| 1371 |
|
match(LPAREN); |
| 1372 |
|
inttuple(); |
| 1384 |
|
} |
| 1385 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1386 |
|
reportError(ex); |
| 1387 |
< |
recover(ex,_tokenSet_12); |
| 1387 |
> |
recover(ex,_tokenSet_13); |
| 1388 |
|
} |
| 1389 |
|
returnAST = bendstatement_AST; |
| 1390 |
|
} |
| 1405 |
|
} |
| 1406 |
|
case MEMBERS: |
| 1407 |
|
{ |
| 1408 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp93_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1409 |
< |
tmp93_AST = astFactory->create(LT(1)); |
| 1410 |
< |
astFactory->makeASTRoot(currentAST, tmp93_AST); |
| 1408 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp98_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1409 |
> |
tmp98_AST = astFactory->create(LT(1)); |
| 1410 |
> |
astFactory->makeASTRoot(currentAST, tmp98_AST); |
| 1411 |
|
match(MEMBERS); |
| 1412 |
|
match(LPAREN); |
| 1413 |
|
inttuple(); |
| 1425 |
|
} |
| 1426 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1427 |
|
reportError(ex); |
| 1428 |
< |
recover(ex,_tokenSet_12); |
| 1428 |
> |
recover(ex,_tokenSet_13); |
| 1429 |
|
} |
| 1430 |
|
returnAST = torsionstatement_AST; |
| 1431 |
|
} |
| 1446 |
|
} |
| 1447 |
|
case CENTER: |
| 1448 |
|
{ |
| 1449 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp97_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1450 |
< |
tmp97_AST = astFactory->create(LT(1)); |
| 1451 |
< |
astFactory->makeASTRoot(currentAST, tmp97_AST); |
| 1449 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp102_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1450 |
> |
tmp102_AST = astFactory->create(LT(1)); |
| 1451 |
> |
astFactory->makeASTRoot(currentAST, tmp102_AST); |
| 1452 |
|
match(CENTER); |
| 1453 |
|
match(LPAREN); |
| 1454 |
|
intConst(); |
| 1458 |
|
inversionstatement_AST = currentAST.root; |
| 1459 |
|
break; |
| 1460 |
|
} |
| 1461 |
+ |
case SATELLITES: |
| 1462 |
+ |
{ |
| 1463 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp106_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1464 |
+ |
tmp106_AST = astFactory->create(LT(1)); |
| 1465 |
+ |
astFactory->makeASTRoot(currentAST, tmp106_AST); |
| 1466 |
+ |
match(SATELLITES); |
| 1467 |
+ |
match(LPAREN); |
| 1468 |
+ |
inttuple(); |
| 1469 |
+ |
astFactory->addASTChild( currentAST, returnAST ); |
| 1470 |
+ |
match(RPAREN); |
| 1471 |
+ |
match(SEMICOLON); |
| 1472 |
+ |
inversionstatement_AST = currentAST.root; |
| 1473 |
+ |
break; |
| 1474 |
+ |
} |
| 1475 |
|
default: |
| 1476 |
|
{ |
| 1477 |
|
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); |
| 1480 |
|
} |
| 1481 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1482 |
|
reportError(ex); |
| 1483 |
< |
recover(ex,_tokenSet_13); |
| 1483 |
> |
recover(ex,_tokenSet_14); |
| 1484 |
|
} |
| 1485 |
|
returnAST = inversionstatement_AST; |
| 1486 |
|
} |
| 1501 |
|
} |
| 1502 |
|
case MEMBERS: |
| 1503 |
|
{ |
| 1504 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp101_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1505 |
< |
tmp101_AST = astFactory->create(LT(1)); |
| 1506 |
< |
astFactory->makeASTRoot(currentAST, tmp101_AST); |
| 1504 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp110_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1505 |
> |
tmp110_AST = astFactory->create(LT(1)); |
| 1506 |
> |
astFactory->makeASTRoot(currentAST, tmp110_AST); |
| 1507 |
|
match(MEMBERS); |
| 1508 |
|
match(LPAREN); |
| 1509 |
|
inttuple(); |
| 1521 |
|
} |
| 1522 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1523 |
|
reportError(ex); |
| 1524 |
< |
recover(ex,_tokenSet_12); |
| 1524 |
> |
recover(ex,_tokenSet_13); |
| 1525 |
|
} |
| 1526 |
|
returnAST = rigidbodystatement_AST; |
| 1527 |
|
} |
| 1542 |
|
} |
| 1543 |
|
case MEMBERS: |
| 1544 |
|
{ |
| 1545 |
< |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp105_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1546 |
< |
tmp105_AST = astFactory->create(LT(1)); |
| 1547 |
< |
astFactory->makeASTRoot(currentAST, tmp105_AST); |
| 1545 |
> |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp114_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1546 |
> |
tmp114_AST = astFactory->create(LT(1)); |
| 1547 |
> |
astFactory->makeASTRoot(currentAST, tmp114_AST); |
| 1548 |
|
match(MEMBERS); |
| 1549 |
|
match(LPAREN); |
| 1550 |
|
inttuple(); |
| 1562 |
|
} |
| 1563 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1564 |
|
reportError(ex); |
| 1565 |
< |
recover(ex,_tokenSet_12); |
| 1565 |
> |
recover(ex,_tokenSet_13); |
| 1566 |
|
} |
| 1567 |
|
returnAST = cutoffgroupstatement_AST; |
| 1568 |
|
} |
| 1579 |
|
} |
| 1580 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1581 |
|
reportError(ex); |
| 1582 |
< |
recover(ex,_tokenSet_14); |
| 1582 |
> |
recover(ex,_tokenSet_15); |
| 1583 |
|
} |
| 1584 |
|
returnAST = fragmentstatement_AST; |
| 1585 |
|
} |
| 1586 |
|
|
| 1587 |
+ |
void MDParser::constraintstatement() { |
| 1588 |
+ |
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1589 |
+ |
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
| 1590 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST constraintstatement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1591 |
+ |
|
| 1592 |
+ |
try { // for error handling |
| 1593 |
+ |
switch ( LA(1)) { |
| 1594 |
+ |
case ID: |
| 1595 |
+ |
{ |
| 1596 |
+ |
assignment(); |
| 1597 |
+ |
astFactory->addASTChild( currentAST, returnAST ); |
| 1598 |
+ |
constraintstatement_AST = currentAST.root; |
| 1599 |
+ |
break; |
| 1600 |
+ |
} |
| 1601 |
+ |
case MEMBERS: |
| 1602 |
+ |
{ |
| 1603 |
+ |
ANTLR_USE_NAMESPACE(antlr)RefAST tmp118_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1604 |
+ |
tmp118_AST = astFactory->create(LT(1)); |
| 1605 |
+ |
astFactory->makeASTRoot(currentAST, tmp118_AST); |
| 1606 |
+ |
match(MEMBERS); |
| 1607 |
+ |
match(LPAREN); |
| 1608 |
+ |
inttuple(); |
| 1609 |
+ |
astFactory->addASTChild( currentAST, returnAST ); |
| 1610 |
+ |
match(RPAREN); |
| 1611 |
+ |
match(SEMICOLON); |
| 1612 |
+ |
constraintstatement_AST = currentAST.root; |
| 1613 |
+ |
break; |
| 1614 |
+ |
} |
| 1615 |
+ |
default: |
| 1616 |
+ |
{ |
| 1617 |
+ |
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); |
| 1618 |
+ |
} |
| 1619 |
+ |
} |
| 1620 |
+ |
} |
| 1621 |
+ |
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1622 |
+ |
reportError(ex); |
| 1623 |
+ |
recover(ex,_tokenSet_13); |
| 1624 |
+ |
} |
| 1625 |
+ |
returnAST = constraintstatement_AST; |
| 1626 |
+ |
} |
| 1627 |
+ |
|
| 1628 |
|
void MDParser::doubleNumber() { |
| 1629 |
|
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; |
| 1630 |
|
ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; |
| 1657 |
|
} |
| 1658 |
|
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) { |
| 1659 |
|
reportError(ex); |
| 1660 |
< |
recover(ex,_tokenSet_15); |
| 1660 |
> |
recover(ex,_tokenSet_16); |
| 1661 |
|
} |
| 1662 |
|
returnAST = doubleNumber_AST; |
| 1663 |
|
} |
| 1664 |
|
|
| 1665 |
|
void MDParser::initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ) |
| 1666 |
|
{ |
| 1667 |
< |
factory.setMaxNodeType(56); |
| 1667 |
> |
factory.setMaxNodeType(59); |
| 1668 |
|
} |
| 1669 |
|
const char* MDParser::tokenNames[] = { |
| 1670 |
|
"<0>", |
| 1682 |
|
"\"inversion\"", |
| 1683 |
|
"\"rigidBody\"", |
| 1684 |
|
"\"cutoffGroup\"", |
| 1685 |
+ |
"\"constraint\"", |
| 1686 |
+ |
"\"distance\"", |
| 1687 |
|
"\"fragment\"", |
| 1688 |
|
"\"members\"", |
| 1689 |
|
"\"center\"", |
| 1690 |
+ |
"\"satellites\"", |
| 1691 |
|
"\"position\"", |
| 1692 |
|
"\"orientation\"", |
| 1693 |
|
"\"flucQ\"", |
| 1730 |
|
0 |
| 1731 |
|
}; |
| 1732 |
|
|
| 1733 |
< |
const unsigned long MDParser::_tokenSet_0_data_[] = { 24117488UL, 0UL, 0UL, 0UL }; |
| 1733 |
> |
const unsigned long MDParser::_tokenSet_0_data_[] = { 192938224UL, 0UL, 0UL, 0UL }; |
| 1734 |
|
// "component" "molecule" "zconstraint" "restraint" "flucQ" "RNEMD" "minimizer" |
| 1735 |
|
// ID |
| 1736 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_0(_tokenSet_0_data_,4); |
| 1737 |
|
const unsigned long MDParser::_tokenSet_1_data_[] = { 2UL, 0UL, 0UL, 0UL }; |
| 1738 |
|
// EOF |
| 1739 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_1(_tokenSet_1_data_,4); |
| 1740 |
< |
const unsigned long MDParser::_tokenSet_2_data_[] = { 24117490UL, 0UL, 0UL, 0UL }; |
| 1740 |
> |
const unsigned long MDParser::_tokenSet_2_data_[] = { 192938226UL, 0UL, 0UL, 0UL }; |
| 1741 |
|
// EOF "component" "molecule" "zconstraint" "restraint" "flucQ" "RNEMD" |
| 1742 |
|
// "minimizer" ID |
| 1743 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_2(_tokenSet_2_data_,4); |
| 1744 |
< |
const unsigned long MDParser::_tokenSet_3_data_[] = { 562036722UL, 0UL, 0UL, 0UL }; |
| 1744 |
> |
const unsigned long MDParser::_tokenSet_3_data_[] = { 201261042UL, 1UL, 0UL, 0UL }; |
| 1745 |
|
// EOF "component" "molecule" "zconstraint" "restraint" "atom" "bond" "bend" |
| 1746 |
< |
// "torsion" "inversion" "rigidBody" "cutoffGroup" "fragment" "members" |
| 1747 |
< |
// "center" "position" "orientation" "flucQ" "RNEMD" "minimizer" ID RCURLY |
| 1746 |
> |
// "torsion" "inversion" "rigidBody" "cutoffGroup" "constraint" "fragment" |
| 1747 |
> |
// "members" "center" "satellites" "position" "orientation" "flucQ" "RNEMD" |
| 1748 |
> |
// "minimizer" ID RCURLY |
| 1749 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_3(_tokenSet_3_data_,4); |
| 1750 |
< |
const unsigned long MDParser::_tokenSet_4_data_[] = { 16842496UL, 0UL, 0UL, 0UL }; |
| 1750 |
> |
const unsigned long MDParser::_tokenSet_4_data_[] = { 134414080UL, 0UL, 0UL, 0UL }; |
| 1751 |
|
// "atom" "bond" "bend" "torsion" "inversion" "rigidBody" "cutoffGroup" |
| 1752 |
< |
// "fragment" ID |
| 1752 |
> |
// "constraint" "fragment" ID |
| 1753 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_4(_tokenSet_4_data_,4); |
| 1754 |
< |
const unsigned long MDParser::_tokenSet_5_data_[] = { 67108864UL, 0UL, 0UL, 0UL }; |
| 1754 |
> |
const unsigned long MDParser::_tokenSet_5_data_[] = { 536870912UL, 0UL, 0UL, 0UL }; |
| 1755 |
|
// SEMICOLON |
| 1756 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_5(_tokenSet_5_data_,4); |
| 1757 |
< |
const unsigned long MDParser::_tokenSet_6_data_[] = { 2214592512UL, 6UL, 0UL, 0UL }; |
| 1757 |
> |
const unsigned long MDParser::_tokenSet_6_data_[] = { 536870912UL, 52UL, 0UL, 0UL }; |
| 1758 |
|
// SEMICOLON RBRACKET RPAREN COMMA |
| 1759 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_6(_tokenSet_6_data_,4); |
| 1760 |
< |
const unsigned long MDParser::_tokenSet_7_data_[] = { 67108864UL, 6UL, 0UL, 0UL }; |
| 1760 |
> |
const unsigned long MDParser::_tokenSet_7_data_[] = { 536870912UL, 48UL, 0UL, 0UL }; |
| 1761 |
|
// SEMICOLON RPAREN COMMA |
| 1762 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_7(_tokenSet_7_data_,4); |
| 1763 |
< |
const unsigned long MDParser::_tokenSet_8_data_[] = { 553713408UL, 0UL, 0UL, 0UL }; |
| 1763 |
> |
const unsigned long MDParser::_tokenSet_8_data_[] = { 134414080UL, 1UL, 0UL, 0UL }; |
| 1764 |
|
// "atom" "bond" "bend" "torsion" "inversion" "rigidBody" "cutoffGroup" |
| 1765 |
< |
// "fragment" ID RCURLY |
| 1765 |
> |
// "constraint" "fragment" ID RCURLY |
| 1766 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_8(_tokenSet_8_data_,4); |
| 1767 |
< |
const unsigned long MDParser::_tokenSet_9_data_[] = { 17563648UL, 0UL, 0UL, 0UL }; |
| 1767 |
> |
const unsigned long MDParser::_tokenSet_9_data_[] = { 140509184UL, 0UL, 0UL, 0UL }; |
| 1768 |
|
// "position" "orientation" ID |
| 1769 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_9(_tokenSet_9_data_,4); |
| 1770 |
< |
const unsigned long MDParser::_tokenSet_10_data_[] = { 554434560UL, 0UL, 0UL, 0UL }; |
| 1771 |
< |
// "position" "orientation" ID RCURLY |
| 1770 |
> |
const unsigned long MDParser::_tokenSet_10_data_[] = { 135790592UL, 0UL, 0UL, 0UL }; |
| 1771 |
> |
// "center" "satellites" ID |
| 1772 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_10(_tokenSet_10_data_,4); |
| 1773 |
< |
const unsigned long MDParser::_tokenSet_11_data_[] = { 0UL, 2UL, 0UL, 0UL }; |
| 1774 |
< |
// RPAREN |
| 1773 |
> |
const unsigned long MDParser::_tokenSet_11_data_[] = { 140509184UL, 1UL, 0UL, 0UL }; |
| 1774 |
> |
// "position" "orientation" ID RCURLY |
| 1775 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_11(_tokenSet_11_data_,4); |
| 1776 |
< |
const unsigned long MDParser::_tokenSet_12_data_[] = { 553713664UL, 0UL, 0UL, 0UL }; |
| 1777 |
< |
// "members" ID RCURLY |
| 1776 |
> |
const unsigned long MDParser::_tokenSet_12_data_[] = { 0UL, 16UL, 0UL, 0UL }; |
| 1777 |
> |
// RPAREN |
| 1778 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_12(_tokenSet_12_data_,4); |
| 1779 |
< |
const unsigned long MDParser::_tokenSet_13_data_[] = { 553779200UL, 0UL, 0UL, 0UL }; |
| 1780 |
< |
// "center" ID RCURLY |
| 1779 |
> |
const unsigned long MDParser::_tokenSet_13_data_[] = { 134479872UL, 1UL, 0UL, 0UL }; |
| 1780 |
> |
// "members" ID RCURLY |
| 1781 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_13(_tokenSet_13_data_,4); |
| 1782 |
< |
const unsigned long MDParser::_tokenSet_14_data_[] = { 553648128UL, 0UL, 0UL, 0UL }; |
| 1783 |
< |
// ID RCURLY |
| 1782 |
> |
const unsigned long MDParser::_tokenSet_14_data_[] = { 135790592UL, 1UL, 0UL, 0UL }; |
| 1783 |
> |
// "center" "satellites" ID RCURLY |
| 1784 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_14(_tokenSet_14_data_,4); |
| 1785 |
< |
const unsigned long MDParser::_tokenSet_15_data_[] = { 0UL, 6UL, 0UL, 0UL }; |
| 1786 |
< |
// RPAREN COMMA |
| 1785 |
> |
const unsigned long MDParser::_tokenSet_15_data_[] = { 134217728UL, 1UL, 0UL, 0UL }; |
| 1786 |
> |
// ID RCURLY |
| 1787 |
|
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_15(_tokenSet_15_data_,4); |
| 1788 |
+ |
const unsigned long MDParser::_tokenSet_16_data_[] = { 0UL, 48UL, 0UL, 0UL }; |
| 1789 |
+ |
// RPAREN COMMA |
| 1790 |
+ |
const ANTLR_USE_NAMESPACE(antlr)BitSet MDParser::_tokenSet_16(_tokenSet_16_data_,4); |
| 1791 |
|
|
| 1792 |
|
|