--- trunk/src/mdParser/MDTreeParser.g 2009/09/07 16:31:51 1360 +++ branches/development/src/mdParser/MDTreeParser.g 2012/06/06 02:18:54 1746 @@ -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 { @@ -35,12 +35,14 @@ statement : assignment ; statement : assignment - | componentblock - | moleculeblock - | zconstraintblock - | restraintblock - ; - + | componentblock + | moleculeblock + | zconstraintblock + | restraintblock + | flucqblock + | rnemdblock + | minimizerblock + ; assignment : #(ASSIGNEQUAL id:ID constant[#id]) //{blockStack.top()->assign(#ID->getText(),);} ; @@ -75,6 +77,22 @@ restraintblock : #(RESTRAINT {RestraintStamp* currRes ENDBLOCK ) {blockStack.top()->validate();blockStack.pop(); currConf->addRestraintStamp(currRestraintStamp);} ; +flucqblock : #(FLUCQ {FluctuatingChargeParameters* flucQpars = new FluctuatingChargeParameters(); blockStack.push(flucQpars);} + (assignment)* + ENDBLOCK ) {blockStack.top()->validate();blockStack.pop(); currConf->addFluctuatingChargeParameters(flucQpars);} + ; + +rnemdblock : #(RNEMD {RNEMDParameters* rnemdPars = new RNEMDParameters(); blockStack.push(rnemdPars);} + (assignment)* + ENDBLOCK ) {blockStack.top()->validate();blockStack.pop(); currConf->addRNEMDParameters(rnemdPars);} + ; + +minimizerblock : #(MINIMIZER {MinimizerParameters* minimizerPars = new MinimizerParameters(); blockStack.push(minimizerPars);} + (assignment)* + ENDBLOCK ) {blockStack.top()->validate();blockStack.pop(); currConf->addMinimizerParameters(minimizerPars);} + ; + + moleculeblock : #(MOLECULE {MoleculeStamp* currMoleculeStamp = new MoleculeStamp(); blockStack.push(currMoleculeStamp);} (moleculestatement)* ENDBLOCK ) {blockStack.top()->validate(); blockStack.pop(); currConf->addMoleculeStamp(currMoleculeStamp);}