a bit more progress on lua bindings
[philodendron.git] / sketches / json.parser
blobc9268a48664ad2afd1613106d3f91d05243c9c91
2 number   -> /(-)? ( 0 | ([1-9][0-9]*) ) (\. [0-9]+ )? ([eE] [+-]? [0-9]+ )?/;
3 str_frag -> chars=/[^\\"]+/ | unicode_char=/\\u ([0-9A-F]{4})/ | backslash_char=/\\[ntbr"\/\\]/;
4 string   -> '"' str_frag* '"';
5 value    -> string | number | "true" | "false" | "null" | object | array;
6 object   -> "{" (string ":" value) *(,) "}";
7 array    -> "[" value *(,)              "]";
9 whitespace -> /[\r\n\s\t]+/;
11 start object;
12 allow whitespace in object, array;