Felipe97/llama-cpp-compiled
01.1k
1# This is the same as json.gbnf but we restrict whitespaces at the end of the root array2# Useful for generating JSON arrays3 4root ::= arr5value ::= object | array | string | number | ("true" | "false" | "null") ws6 7arr ::=8 "[\n" ws (9 value10 (",\n" ws value)*11 )? "]"12 13object ::=14 "{" ws (15 string ":" ws value16 ("," ws string ":" ws value)*17 )? "}" ws18 19array ::=20 "[" ws (21 value22 ("," ws value)*23 )? "]" ws24 25string ::=26 "\"" (27 [^"\\\x7F\x00-\x1F] |28 "\\" (["\\bfnrt] | "u" [0-9a-fA-F]{4}) # escapes29 )* "\"" ws30 31number ::= ("-"? ([0-9] | [1-9] [0-9]{0,15})) ("." [0-9]+)? ([eE] [-+]? [1-9] [0-9]{0,15})? ws32 33# Optional space: by convention, applied in this grammar after literal chars when allowed34ws ::= | " " | "\n" [ \t]{0,20}35 