Add grammar to llama.cpp loader (closes #4019)
This commit is contained in:
parent
a3ad9fe6c0
commit
b227e65d86
18 changed files with 162 additions and 0 deletions
6
grammars/arithmetic.gbnf
Normal file
6
grammars/arithmetic.gbnf
Normal file
|
@ -0,0 +1,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]*
|
Loading…
Add table
Add a link
Reference in a new issue