text-generation-webui / grammars /arithmetic.gbnf
blaketm's picture
Upload folder using huggingface_hub
60be607
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]*