aboutsummaryrefslogtreecommitdiff
path: root/grammars/arithmetic.gbnf
blob: 3aa95a9dda7e80dc6ffc5fa07773e334aa6fb9f0 (plain)
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]*