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 |
+ |
FLUCQ = "flucQ"; |
45 |
+ |
RNEMD = "RNEMD"; |
46 |
|
ENDBLOCK; |
47 |
|
} |
48 |
|
|
51 |
|
; |
52 |
|
|
53 |
|
statement : assignment |
54 |
< |
| componentblock |
55 |
< |
| moleculeblock |
56 |
< |
| zconstraintblock |
57 |
< |
; |
58 |
< |
|
54 |
> |
| componentblock |
55 |
> |
| moleculeblock |
56 |
> |
| zconstraintblock |
57 |
> |
| restraintblock |
58 |
> |
| flucqblock |
59 |
> |
| rnemdblock |
60 |
> |
; |
61 |
> |
|
62 |
|
assignment : ID ASSIGNEQUAL^ constant SEMICOLON! |
63 |
|
; |
64 |
|
|
73 |
|
|
74 |
|
zconstraintblock : ZCONSTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} |
75 |
|
; |
76 |
+ |
|
77 |
+ |
restraintblock : RESTRAINT^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} |
78 |
+ |
; |
79 |
+ |
|
80 |
+ |
flucqblock : FLUCQ^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} |
81 |
+ |
; |
82 |
+ |
|
83 |
+ |
rnemdblock : RNEMD^ LCURLY! (assignment)* RCURLY {#RCURLY->setType(ENDBLOCK);} |
84 |
+ |
; |
85 |
|
|
86 |
|
moleculeblock : MOLECULE^ LCURLY! (moleculestatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} |
87 |
|
; |
91 |
|
| bondblock |
92 |
|
| bendblock |
93 |
|
| torsionblock |
94 |
+ |
| inversionblock |
95 |
|
| rigidbodyblock |
96 |
|
| cutoffgroupblock |
97 |
|
| fragmentblock |
127 |
|
| MEMBERS^ LPAREN! inttuple RPAREN! SEMICOLON! |
128 |
|
; |
129 |
|
|
130 |
+ |
inversionblock : INVERSION^ (LBRACKET! intConst! RBRACKET!)? LCURLY!(inversionstatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} |
131 |
+ |
; |
132 |
+ |
|
133 |
+ |
inversionstatement : assignment |
134 |
+ |
| CENTER^ LPAREN! intConst RPAREN! SEMICOLON! |
135 |
+ |
; |
136 |
+ |
|
137 |
|
rigidbodyblock : RIGIDBODY^ LBRACKET! intConst RBRACKET! LCURLY!(rigidbodystatement)* RCURLY {#RCURLY->setType(ENDBLOCK);} |
138 |
|
; |
139 |
|
|
282 |
|
} |
283 |
|
("line")? // this would be for if the directive started "#line" |
284 |
|
(Space)+ |
285 |
< |
n:Decimal { setLine(oopse::lexi_cast<int>(n->getText()) - 1); } |
285 |
> |
n:Decimal { setLine(OpenMD::lexi_cast<int>(n->getText()) - 1); } |
286 |
|
(Space)+ |
287 |
|
(sl:StringLiteral) {std::string filename = sl->getText().substr(1,sl->getText().length()-2); observer->notify(filename);} |
288 |
|
((Space)+ Decimal)* // To support cpp flags (GNU) |