text-chat-ui / grammars /arithmetic.gbnf
minhxthanh's picture
Upload 340 files
71e47a3
raw
history blame
177 Bytes
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]*