-
Notifications
You must be signed in to change notification settings - Fork 0
/
raa_tt-exp.par
34 lines (32 loc) · 1.38 KB
/
raa_tt-exp.par
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%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<T>::Push */: Biconditional RaaTtList;
/* 10 */ RaaTtList /* Vec<T>::New */: ;
/* 11 */ Biconditional: Conditional BiconditionalList /* Vec */;
/* 12 */ BiconditionalList /* Vec<T>::Push */: BiCond^ /* Clipped */ Conditional BiconditionalList;
/* 13 */ BiconditionalList /* Vec<T>::New */: ;
/* 14 */ Conditional: Disjunction ConditionalList /* Vec */;
/* 15 */ ConditionalList /* Vec<T>::Push */: Cond^ /* Clipped */ Disjunction ConditionalList;
/* 16 */ ConditionalList /* Vec<T>::New */: ;
/* 17 */ Disjunction: Conjunction DisjunctionList /* Vec */;
/* 18 */ DisjunctionList /* Vec<T>::Push */: Or^ /* Clipped */ Conjunction DisjunctionList;
/* 19 */ DisjunctionList /* Vec<T>::New */: ;
/* 20 */ Conjunction: Factor ConjunctionList /* Vec */;
/* 21 */ ConjunctionList /* Vec<T>::Push */: And^ /* Clipped */ Factor ConjunctionList;
/* 22 */ ConjunctionList /* Vec<T>::New */: ;
/* 23 */ Negation: Not^ /* Clipped */ Factor;
/* 24 */ Factor: Var;
/* 25 */ Factor: Negation;
/* 26 */ Factor: LPar^ /* Clipped */ Biconditional RPar^ /* Clipped */;