-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathson.ebnf
37 lines (30 loc) · 963 Bytes
/
son.ebnf
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
value ::= object | array | string | number | boolean | "null"
boolean ::= "true" | "false"
object ::= "{" ( member ( "," member )* )? "}"
member ::= string ":" value
array ::= "[" ( value ( "," value )* )? "]"
number ::= "-"? (positiveInteger fraction? | "0" fraction)
| "0"
fraction ::= "." digit* nonZeroDigit
positiveInteger ::= nonZeroDigit digit*
digit ::= [#x30 - #x39]
nonZeroDigit ::= [#x31 - #x39]
string ::= '"'
( unescaped
| "\" (shortcutEscape | codepointEscape)
)*
'"'
unescaped ::= ( [#x20 - #x21]
| [#x23 - #x5B]
| [#x5D - #x10FFFF]
)
shortcutEscape ::= '"'
| "\"
| "b"
| "t"
| "n"
| "f"
| "r"
codepointEscape ::= "u00" ( "0" ([#x0 - #x7] | #xB | [#xE - #xF])
| [#x10 - #x1F]
)