-
Notifications
You must be signed in to change notification settings - Fork 0
/
json.h
41 lines (37 loc) · 1.21 KB
/
json.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Grammar:
* json = ( object | array ) , EOF;
* object = "{", [ pair { ",", pair } ], "}";
* pair = string, ":", value;
* array = "[", [ value, { ",", value } ], "]";
* value = (string | number | object | array | true | false | null);
* string = '"', { ( nodquoteslash, escaped ) }, '"';
* number = [ "-" ], ( "0" | nonzero, { digit } ), [ ".", digit,
* { digit } ], [ ( "e" | "E" ), [ ( "+" | "-" ) ], digit,
* { digit } ];
* nodquoteslash = [^\"];
* escaped = "\", ( '"' | "\" | "/" | "b" | "f" | "n" | "r" | "t" | "u", hex * 4);
* nonzero = ( "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" );
* digit = ( nonzero | "0" );
* true = "t", "r", "u", "e";
* false = "f", "a", "l", "s", "e";
* null = "n", "u", "l", "l";
*/
#ifndef __JSON_H
#define __JSON_H
#include "parser.h"
bool _false();
bool _null();
bool _true();
bool array();
bool digit();
bool escaped();
bool json();
bool nodquoteslash();
bool nonzero();
bool number();
bool object();
bool pair();
bool string();
bool value();
#endif /* __JSON_H */