OILS
/
mycpp
/
examples
/ expr.asdl
View on Github
|
oilshell.org
20 lines, 15 significant
1
module expr {
2
3
tok =
4
Const
5
| Var
6
| Op1
7
| Op2
8
| Paren
9
| Eof
10
| Invalid
11
12
expr =
13
Const(int i)
14
| Var(string name)
15
| Binary(string op, expr left, expr right)
16
17
# Test iteration
18
CompoundWord < List[str]
19
20
}