--- trunk/src/mdParser/MDParser.g 2006/01/11 23:06:08 848 +++ branches/development/src/mdParser/MDParser.g 2012/06/06 02:18:54 1746 @@ -28,16 +28,22 @@ tokens COMPONENT = "component"; MOLECULE = "molecule"; ZCONSTRAINT = "zconstraint"; + RESTRAINT = "restraint"; ATOM = "atom"; BOND = "bond"; BEND = "bend"; TORSION = "torsion"; + INVERSION = "inversion"; RIGIDBODY = "rigidBody"; CUTOFFGROUP = "cutoffGroup"; FRAGMENT = "fragment"; MEMBERS = "members"; + CENTER = "center"; POSITION = "position"; ORIENTATION = "orientation"; + FLUCQ = "flucQ"; + RNEMD = "RNEMD"; + MINIMIZER = "minimizer"; ENDBLOCK; } @@ -46,11 +52,15 @@ statement : assignment ; statement : assignment - | componentblock - | moleculeblock - | zconstraintblock - ; - + | componentblock + | moleculeblock + | zconstraintblock + | restraintblock + | flucqblock + | rnemdblock + | minimizerblock + ; + assignment : ID ASSIGNEQUAL^ constant SEMICOLON! ; @@ -64,7 +74,19 @@ zconstraintblock : ZCONSTRAINT^ LCURLY! (assignment)* ; zconstraintblock : ZCONSTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} + ; + +restraintblock : RESTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} ; + +flucqblock : FLUCQ^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} + ; + +rnemdblock : RNEMD^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} + ; + +minimizerblock : MINIMIZER^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} + ; moleculeblock : MOLECULE^ LCURLY! (moleculestatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} ; @@ -74,6 +96,7 @@ moleculestatement : assignment | bondblock | bendblock | torsionblock + | inversionblock | rigidbodyblock | cutoffgroupblock | fragmentblock @@ -107,6 +130,13 @@ torsionstatement : assignment torsionstatement : assignment | MEMBERS^ LPAREN! inttuple RPAREN! SEMICOLON! + ; + +inversionblock : INVERSION^ (LBRACKET! intConst! RBRACKET!)? LCURLY!(inversionstatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} + ; + +inversionstatement : assignment + | CENTER^ LPAREN! intConst RPAREN! SEMICOLON! ; rigidbodyblock : RIGIDBODY^ LBRACKET! intConst RBRACKET! LCURLY!(rigidbodystatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} @@ -257,7 +287,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)