|
<<Grammar Name="json_fast"
encoding_class="unicode" encoding_detection="FirstCharIsAscii"
comment="source:www.ietf.org/rfc/rfc4627.txt">>
[1]json_text: top_element expect_file_end ;
[2]expect_file_end: !./ WARNING<"non-json stuff before end of file">;
[3]top_element: object / array /
FATAL<"json file must start with '{' or '['"> ;
[4]object: [ \t\r\n]*
'{' [ \t\r\n]* (&'}'/members) [ \t\r\n]* @'}' [ \t\r\n]*;
[5]members: pair [ \t\r\n]* (',' [ \t\r\n]* @pair [ \t\r\n]*)*;
[6]pair: @string [ \t\r\n]* ':' [ \t\r\n]* @value ;
[7]array: [ \t\r\n]*
'[' [ \t\r\n]* (&']'/elements) [ \t\r\n]* @']' [ \t\r\n]*;
[8]elements: value [ \t\r\n]* (','[ \t\r\n]* @value [ \t\r\n]*)*;
[9]value: @(string / number / object /
array / 'true' / 'false' / 'null') ;
[10]string: '"' char* @'"' ;
[11]char: '\\' (["\\/bfnrt] /
'u' ([0-9A-Fa-f]{4}/FATAL<"4 hex digits expected">)/
FATAL<"illegal escape">) /
[#x20-#x21#x23-#x5B#x5D-#xFFFF] ;
[13]number: '-'? ('0'/ [1-9][0-9]*) ('.' [0-9]+)? ([eE] [-+] [0-9]+)?;
<</Grammar>>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.