OILS / mycpp / examples / expr.asdl View on Github | oilshell.org

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