Better HF grammar implementation (#4953)
This commit is contained in:
parent
aa200f8723
commit
12690d3ffc
19 changed files with 830 additions and 116 deletions
7
grammars/simple_arithmetic.gbnf
Normal file
7
grammars/simple_arithmetic.gbnf
Normal file
|
@ -0,0 +1,7 @@
|
|||
root ::= (expr "=" ws term "\n")+
|
||||
expr ::= term ([-+*/] term)*
|
||||
term ::= num | "(" ws expr ")" ws
|
||||
num ::= [0-9]+ ws
|
||||
ws ::= [ \t\n]*
|
||||
# this is a comment
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue