<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/grammar_no_schema.ebnf
blob: 629c59a13dea8b53a3f017274142fec7ee977f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
value = map | array | string | multiline_string | number | boolean | null ;
map = "{", {field}, "}" ;
field = key, ":", value ;
key = '"', {-'"' | '""'}, '"' | (alphanumeric | "_" | "-"), {alphanumeric | "_" | "-"} ;
array = "[", {value}, "]" ;
string = '"', {-'"' | '\"'}, -("\" | '"'), '"' | '"\""' | '""' ;
inline_end = "\r" | "\n" | "]" | "}" | ";" | EOF ;
multiline_string = "|", end_sequence, "\n", ?any character?, "\n", end_sequence ;
end_sequence = {-("\r" | "\n")} ;
integer = ["-"], {digit}, ["e", {digit}] ;
float = ["-"], {digit}, [".", {digit}], ["e", {digit}] ;
number = (integer | float), "," | (integer | float) >> (inline_end | whitespace) ;
boolean = "%true" | "%false" ;
null = "%null" ;