--- trunk/src/mdParser/MDParser.g 2005/12/16 02:57:00 814 +++ trunk/src/mdParser/MDParser.g 2009/09/07 16:31:51 1360 @@ -28,14 +28,17 @@ 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"; ENDBLOCK; @@ -49,6 +52,7 @@ statement : assignment | componentblock | moleculeblock | zconstraintblock + | restraintblock ; assignment : ID ASSIGNEQUAL^ constant SEMICOLON! @@ -65,6 +69,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);} ; @@ -74,6 +81,7 @@ moleculestatement : assignment | bondblock | bendblock | torsionblock + | inversionblock | rigidbodyblock | cutoffgroupblock | fragmentblock @@ -109,6 +117,13 @@ 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);} ; @@ -457,7 +472,7 @@ EXPONENT // a couple protected methods to assist in matching floating point numbers protected EXPONENT - : ('e'|'E') ('+'|'-')? ('0'..'9')+ + : ('e'|'E'|'d'|'D') ('+'|'-')? ('0'..'9')+ ; protected