forked from hi-paris/agent-theory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLTL.g4
23 lines (19 loc) · 1.04 KB
/
LTL.g4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
grammar LTL;
ltlExpr :
('!' | 'not') child=ltlExpr # Negation
// temporal operators
| ('next' | 'X') child=ltlExpr # Next
| ('eventually' | 'F') child=ltlExpr # Eventually
| ('always' | 'G') child=ltlExpr # Always
| left=ltlExpr ('until' | 'U') right=ltlExpr # Until
| left=ltlExpr ('release' | 'R') right=ltlExpr # Release
// boolean operators
| left=ltlExpr ('&&' | 'and') right=ltlExpr # Conjunction
| left=ltlExpr ('||' | 'or') right=ltlExpr # Disjunction
| left=ltlExpr ('->' | 'implies') right=ltlExpr # Implies
| '(' ltlExpr ')' # Grouping
| child=atomExpr # Evaluation
;
atomExpr : ATOM;
ATOM : [_a-z][_a-z0-9]*;
WS : [ \t\r\n\u000C]+ -> skip;