fact: Definition json'_pregrammar : pregrammar Ascii.ascii := Eval grammar_red in [[[ "json" ::== "object" || "array";; "object" ::== "{" "WS*" "pair WS*" "(',' pair WS*)+" "}" || "{" "WS*" "pair WS*" "}" || "{" "WS*" "}";; "(',' pair WS*)+" ::== "," "WS*" "pair WS*" || "," "WS*" "pair WS*" "(',' pair WS*)+";; "pair" ::== "STRING" "WS*" ":" "WS*" "value";; "pair WS*" ::== "STRING" "WS*" ":" "WS*" "value" "WS*";; "array" ::== "[" "WS*" "value WS*" "(',' value WS*)+" "]" || "[" "WS*" "value WS*" "]" || "[" "WS*" "]";; "(',' value WS*)+" ::== "," "WS*" "value WS*" || "," "WS*" "value WS*" "(',' value WS*)+";; "value" ::== "STRING" || "NUMBER" || "object" || "array" || "'true'" || "'false'" || "'null'";; "value WS*" ::== "value" "WS*";; "STRING" ::== """" "INNER_STRING" """";; "INNER_STRING" ::== "" || "\" "special_character" "INNER_STRING" || "\" "UNICODE" "INNER_STRING" || "unspecial_character" "INNER_STRING";; "special_character" ::== ("""" || "\" || "/" || "b" || "f" || "n" || "r" || "t")%char;; "unspecial_character" ::== ¬("""" || "\" || [\s] || ":" || "{" || "}" || "[" || "]" || ",");; "UNICODE" ::== "u" "HEX" "HEX" "HEX" "HEX";; "HEX" ::== [0-9a-fA-F];; "NUMBER" ::== "-?" "INT" "." "[0-9]+" "EXP?" || "-?" "INT" "EXP" || "-?" "INT";; "-?" ::== "" || "-";; "[0-9]+" ::== [0-9] || [0-9] "[0-9]+";; "EXP?" ::== "" || "EXP";; "INT" ::== "0" || [1-9] "[0-9]*";; "[0-9]*" ::== "" || [0-9] "[0-9]*";; "EXP" ::== ("E" || "e")%production "INT" || ("E" || "e")%production ("+" || "-")%production "INT";; "WS*" ::== "" || [\s] "WS*" ]]]%grammar.
imports: Fiat.Parsers.ContextFreeGrammar.Notations