--- trunk/src/mdParser/MDParser.g 2008/07/04 20:54:29 1275 +++ trunk/src/mdParser/MDParser.g 2010/05/10 17:28:26 1442 @@ -28,6 +28,7 @@ tokens COMPONENT = "component"; MOLECULE = "molecule"; ZCONSTRAINT = "zconstraint"; + RESTRAINT = "restraint"; ATOM = "atom"; BOND = "bond"; BEND = "bend"; @@ -51,6 +52,7 @@ statement : assignment | componentblock | moleculeblock | zconstraintblock + | restraintblock ; assignment : ID ASSIGNEQUAL^ constant SEMICOLON! @@ -66,6 +68,9 @@ zconstraintblock : ZCONSTRAINT^ LCURLY! (assignment)* ; zconstraintblock : ZCONSTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} + ; + +restraintblock : RESTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} ; moleculeblock : MOLECULE^ LCURLY! (moleculestatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} @@ -76,6 +81,7 @@ moleculestatement : assignment | bondblock | bendblock | torsionblock + | inversionblock | rigidbodyblock | cutoffgroupblock | fragmentblock @@ -266,7 +272,7 @@ LineDirective } ("line")? // this would be for if the directive started "#line" (Space)+ - n:Decimal { setLine(oopse::lexi_cast(n->getText()) - 1); } + n:Decimal { setLine(OpenMD::lexi_cast(n->getText()) - 1); } (Space)+ (sl:StringLiteral) {std::string filename = sl->getText().substr(1,sl->getText().length()-2); observer->notify(filename);} ((Space)+ Decimal)* // To support cpp flags (GNU)