ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/mdParser/MDTreeParser.g
(Generate patch)

Comparing trunk/src/mdParser/MDTreeParser.g (file contents):
Revision 1978 by gezelter, Tue Jul 16 17:16:45 2013 UTC vs.
Revision 1979 by gezelter, Sat Apr 5 20:56:01 2014 UTC

# Line 114 | Line 114 | moleculestatement : assignment
114                    | rigidbodyblock
115                    | cutoffgroupblock
116                    | fragmentblock
117 +                  | constraintblock
118                    ;
119  
120   atomblock
# Line 274 | Line 275 | fragmentstatement : assignment
275  
276   fragmentstatement : assignment
277      ;
278 +
279 + constraintblock : #(CONSTRAINT {ConstraintStamp* currConstraintStamp = new ConstraintStamp(); blockStack.push(currConstraintStamp);}
280 +                (constraintstatement)*
281 +                 ENDBLOCK )  {
282 +                                blockStack.pop();
283 +                                MoleculeStamp* currMoleculeStamp = static_cast<MoleculeStamp*>(blockStack.top());
284 +                                currMoleculeStamp->addConstraintStamp(currConstraintStamp);
285 +                             }
286 +          ;
287  
288 + constraintstatement
289 + {
290 +  vector<int> ivec;
291 +  ConstraintStamp* currConstraintStamp = static_cast<ConstraintStamp*>(blockStack.top());
292 + }
293 +              : assignment
294 +              | #(MEMBERS ivec=inttuple) {currConstraintStamp->setMembers(ivec);}
295 +              ;
296  
297                
298   doubleNumberTuple returns [vector<RealType> dvec]

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines