Files
llama.cpp/grammars/arithmetic.gbnf
T

7 lines
177 B
Plaintext
Raw Normal View History

2023-07-23 23:58:10 -04:00
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]*