arithmetic.gbnf 177 Bytes
Newer Older
xuxzh1's avatar
init  
xuxzh1 committed
1
2
3
4
5
6
root  ::= (expr "=" ws term "\n")+
expr  ::= term ([-+*/] term)*
term  ::= ident | num | "(" ws expr ")" ws
ident ::= [a-z] [a-z0-9_]* ws
num   ::= [0-9]+ ws
ws    ::= [ \t\n]*