| 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; |
| 52 |
|
| componentblock |
| 53 |
|
| moleculeblock |
| 54 |
|
| zconstraintblock |
| 55 |
+ |
| restraintblock |
| 56 |
|
; |
| 57 |
|
|
| 58 |
|
assignment : ID ASSIGNEQUAL^ constant SEMICOLON! |
| 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 |
|
; |
| 81 |
|
| bondblock |
| 82 |
|
| bendblock |
| 83 |
|
| torsionblock |
| 84 |
+ |
| inversionblock |
| 85 |
|
| rigidbodyblock |
| 86 |
|
| cutoffgroupblock |
| 87 |
|
| fragmentblock |
| 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 |
|
|
| 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) |
| 472 |
|
// a couple protected methods to assist in matching floating point numbers |
| 473 |
|
protected |
| 474 |
|
EXPONENT |
| 475 |
< |
: ('e'|'E') ('+'|'-')? ('0'..'9')+ |
| 475 |
> |
: ('e'|'E'|'d'|'D') ('+'|'-')? ('0'..'9')+ |
| 476 |
|
; |
| 477 |
|
|
| 478 |
|
protected |