%start RaaTt %title "RaaTt grammar" %comment "Grammar to define expressions in propositional calculus" %line_comment "//" %% /* 0 */ Not: '!'; /* 1 */ And: '&'; /* 2 */ Or: '|'; /* 3 */ Cond: '->'; /* 4 */ BiCond: '<->'; /* 5 */ LPar: '('; /* 6 */ RPar: ')'; /* 7 */ Var: /[a-z][_a-zA-Z0-9]*/; /* 8 */ RaaTt: RaaTtList /* Vec */; /* 9 */ RaaTtList /* Vec::Push */: Biconditional RaaTtList; /* 10 */ RaaTtList /* Vec::New */: ; /* 11 */ Biconditional: Conditional BiconditionalList /* Vec */; /* 12 */ BiconditionalList /* Vec::Push */: BiCond^ /* Clipped */ Conditional BiconditionalList; /* 13 */ BiconditionalList /* Vec::New */: ; /* 14 */ Conditional: Disjunction ConditionalList /* Vec */; /* 15 */ ConditionalList /* Vec::Push */: Cond^ /* Clipped */ Disjunction ConditionalList; /* 16 */ ConditionalList /* Vec::New */: ; /* 17 */ Disjunction: Conjunction DisjunctionList /* Vec */; /* 18 */ DisjunctionList /* Vec::Push */: Or^ /* Clipped */ Conjunction DisjunctionList; /* 19 */ DisjunctionList /* Vec::New */: ; /* 20 */ Conjunction: Factor ConjunctionList /* Vec */; /* 21 */ ConjunctionList /* Vec::Push */: And^ /* Clipped */ Factor ConjunctionList; /* 22 */ ConjunctionList /* Vec::New */: ; /* 23 */ Negation: Not^ /* Clipped */ Factor; /* 24 */ Factor: Var; /* 25 */ Factor: Negation; /* 26 */ Factor: LPar^ /* Clipped */ Biconditional RPar^ /* Clipped */;