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

Comparing:
trunk/src/mdParser/MDParser.g (file contents), Revision 848 by gezelter, Wed Jan 11 23:06:08 2006 UTC vs.
branches/development/src/mdParser/MDParser.g (file contents), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 28 | Line 28 | tokens
28    COMPONENT   = "component";
29    MOLECULE    = "molecule";
30    ZCONSTRAINT = "zconstraint";
31 +  RESTRAINT   = "restraint";
32    ATOM        = "atom";
33    BOND        = "bond";
34    BEND        = "bend";
35    TORSION     = "torsion";
36 +  INVERSION   = "inversion";
37    RIGIDBODY   = "rigidBody";
38    CUTOFFGROUP = "cutoffGroup";
39    FRAGMENT    = "fragment";
40    MEMBERS     = "members";
41 +  CENTER      = "center";
42    POSITION    = "position";
43    ORIENTATION = "orientation";
44    ENDBLOCK;
# Line 49 | Line 52 | statement : assignment
52            | componentblock
53            | moleculeblock
54            | zconstraintblock
55 +          | restraintblock
56            ;
57              
58   assignment  : ID ASSIGNEQUAL^ constant SEMICOLON!
# Line 65 | Line 69 | zconstraintblock  : ZCONSTRAINT^ LCURLY! (assignment)*
69      
70   zconstraintblock  : ZCONSTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);}
71                    ;
72 +
73 + restraintblock  : RESTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);}
74 +                  ;
75    
76   moleculeblock : MOLECULE^ LCURLY! (moleculestatement)*  RCURLY {#RCURLY->setType(ENDBLOCK);}
77                ;
# Line 74 | Line 81 | moleculestatement : assignment
81                    | bondblock
82                    | bendblock
83                    | torsionblock
84 +                  | inversionblock
85                    | rigidbodyblock
86                    | cutoffgroupblock
87                    | fragmentblock
# Line 109 | Line 117 | torsionstatement  : assignment
117                | MEMBERS^ LPAREN! inttuple RPAREN! SEMICOLON!
118                ;
119  
120 + inversionblock  : INVERSION^ (LBRACKET! intConst! RBRACKET!)?  LCURLY!(inversionstatement)* RCURLY {#RCURLY->setType(ENDBLOCK);}
121 +          ;
122 +
123 + inversionstatement  : assignment
124 +              | CENTER^ LPAREN! intConst RPAREN! SEMICOLON!
125 +              ;
126 +
127   rigidbodyblock  : RIGIDBODY^  LBRACKET! intConst RBRACKET! LCURLY!(rigidbodystatement)* RCURLY {#RCURLY->setType(ENDBLOCK);}
128                  ;
129  
# Line 257 | Line 272 | LineDirective
272    }
273      ("line")?  // this would be for if the directive started "#line"
274      (Space)+
275 <    n:Decimal { setLine(oopse::lexi_cast<int>(n->getText()) - 1); }
275 >    n:Decimal { setLine(OpenMD::lexi_cast<int>(n->getText()) - 1); }
276      (Space)+
277      (sl:StringLiteral) {std::string filename = sl->getText().substr(1,sl->getText().length()-2); observer->notify(filename);}
278      ((Space)+ Decimal)* // To support cpp flags (GNU)

Comparing:
trunk/src/mdParser/MDParser.g (property svn:keywords), Revision 848 by gezelter, Wed Jan 11 23:06:08 2006 UTC vs.
branches/development/src/mdParser/MDParser.g (property svn:keywords), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines