--- trunk/src/mdParser/MDParser.g 2008/07/14 12:35:58 1277 +++ branches/development/src/mdParser/MDParser.g 2012/05/31 12:25:30 1731 @@ -28,6 +28,7 @@ tokens COMPONENT = "component"; MOLECULE = "molecule"; ZCONSTRAINT = "zconstraint"; + RESTRAINT = "restraint"; ATOM = "atom"; BOND = "bond"; BEND = "bend"; @@ -40,6 +41,8 @@ tokens CENTER = "center"; POSITION = "position"; ORIENTATION = "orientation"; + FLUCQ = "flucQ"; + RNEMD = "RNEMD"; ENDBLOCK; } @@ -48,11 +51,14 @@ statement : assignment ; statement : assignment - | componentblock - | moleculeblock - | zconstraintblock - ; - + | componentblock + | moleculeblock + | zconstraintblock + | restraintblock + | flucqblock + | rnemdblock + ; + assignment : ID ASSIGNEQUAL^ constant SEMICOLON! ; @@ -67,6 +73,15 @@ 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);} + ; moleculeblock : MOLECULE^ LCURLY! (moleculestatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} ; @@ -267,7 +282,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)