-
Notifications
You must be signed in to change notification settings - Fork 3
/
CTL.g4
24 lines (22 loc) · 775 Bytes
/
CTL.g4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
grammar CTL;
formula: TRUE # True
| FALSE # False
| PROPOSITION # Proposition
| '(!' formula ')' # Negation
| '(' formula '&' formula ')' # And
| '(' formula '|' formula ')' # Or
| '(' formula '=>' formula ')' # implication
| '(' formula '<=>' formula ')' # equivalence
| 'AX' formula # AX
| 'EX' formula # EX
| 'AF' formula # AF
| 'EF' formula # EF
| 'AG' formula # AG
| 'EG' formula # EG
| 'A[' formula 'U' formula ']' # AU
| 'E[' formula 'U' formula ']' # EU
;
PROPOSITION: [a-z0-9]+ ; // match lowercase letters and digits
TRUE: [+] ; // match boolean true
FALSE: [-] ; // match boolean false
WS : [ \t\r\n]+ -> skip ; // toss out spaces, tabs and newlines