--- trunk/src/mdParser/MDTreeParser.g 2008/07/04 20:54:29 1275 +++ branches/development/src/mdParser/MDTreeParser.g 2010/07/09 23:08:25 1465 @@ -4,7 +4,7 @@ using namespace std; #include "io/Globals.hpp" #include "utils/StringUtils.hpp" using namespace std; -using namespace oopse; +using namespace OpenMD; } options { @@ -15,7 +15,7 @@ options options { - k = 3; + k = 1; importVocab = MD; } { @@ -38,6 +38,7 @@ statement : assignment | componentblock | moleculeblock | zconstraintblock + | restraintblock ; @@ -68,6 +69,11 @@ zconstraintblock : #(ZCONSTRAINT {ZConsStamp* currZCo (assignment)* ENDBLOCK ) {blockStack.top()->validate();blockStack.pop(); currConf->addZConsStamp(currZConsStamp);} ; + +restraintblock : #(RESTRAINT {RestraintStamp* currRestraintStamp = new RestraintStamp(); blockStack.push(currRestraintStamp);} + (assignment)* + ENDBLOCK ) {blockStack.top()->validate();blockStack.pop(); currConf->addRestraintStamp(currRestraintStamp);} + ; moleculeblock : #(MOLECULE {MoleculeStamp* currMoleculeStamp = new MoleculeStamp(); blockStack.push(currMoleculeStamp);} (moleculestatement)*