text-generation-webui/grammars/simple_arithmetic.gbnf
2023-12-17 02:01:23 -03:00

8 lines
160 B
Plaintext

root ::= (expr "=" ws term "\n")+
expr ::= term ([-+*/] term)*
term ::= num | "(" ws expr ")" ws
num ::= [0-9]+ ws
ws ::= [ \t\n]*
# this is a comment