Better HF grammar implementation (#4953)
This commit is contained in:
parent
aa200f8723
commit
12690d3ffc
19 changed files with 830 additions and 116 deletions
14
grammars/json_w_trailing_space.gbnf
Normal file
14
grammars/json_w_trailing_space.gbnf
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
root ::= object
|
||||
|
||||
object ::= "{" ws ( string ":" ws value ("," ws string ":" ws value)* )? "}" ws
|
||||
|
||||
value ::= object | array | string | number | ("true" | "false" | "null") ws
|
||||
|
||||
array ::= "[" ws ( value ("," ws value)* )? "]" ws
|
||||
|
||||
string ::= "\"" ( [a-zA-Z0-9] )* "\"" ws
|
||||
|
||||
number ::= ("-"? ([0-9] | [1-9] [0-9]*)) ("." [0-9]+)? ([eE] [-+]? [0-9]+)? ws
|
||||
|
||||
|
||||
ws ::= ([ \t\n] ws)?
|
||||
Loading…
Add table
Add a link
Reference in a new issue