JSON

Properties

The grammar has 11 terminals, 7 nonterminals, 17 productions, 27 LALR states and 36 DFA states.

It is case-sensitive.

Whitespace characters are ignored.

It was generated by Farkle 0.0.0-local on .

Syntax

LALR States

State 0
SymbolAction
String Shift to State 2
Number Shift to State 3
true Shift to State 6
false Shift to State 7
null Shift to State 8
{ Shift to State 9
[ Shift to State 10
JSON Go to State 1
Object Go to State 4
Array Go to State 5
State 1
SymbolAction
EOF Accept
State 2
SymbolAction
} Reduce <JSON> ::= String
] Reduce <JSON> ::= String
, Reduce <JSON> ::= String
EOF Reduce <JSON> ::= String
State 3
SymbolAction
} Reduce <JSON> ::= Number
] Reduce <JSON> ::= Number
, Reduce <JSON> ::= Number
EOF Reduce <JSON> ::= Number
State 4
SymbolAction
} Reduce <JSON> ::= <Object>
] Reduce <JSON> ::= <Object>
, Reduce <JSON> ::= <Object>
EOF Reduce <JSON> ::= <Object>
State 5
SymbolAction
} Reduce <JSON> ::= <Array>
] Reduce <JSON> ::= <Array>
, Reduce <JSON> ::= <Array>
EOF Reduce <JSON> ::= <Array>
State 6
SymbolAction
} Reduce <JSON> ::= true
] Reduce <JSON> ::= true
, Reduce <JSON> ::= true
EOF Reduce <JSON> ::= true
State 7
SymbolAction
} Reduce <JSON> ::= false
] Reduce <JSON> ::= false
, Reduce <JSON> ::= false
EOF Reduce <JSON> ::= false
State 8
SymbolAction
} Reduce <JSON> ::= null
] Reduce <JSON> ::= null
, Reduce <JSON> ::= null
EOF Reduce <JSON> ::= null
State 9
SymbolAction
String Shift to State 13
} Reduce <Object Optional> ::=
Object Optional Go to State 11
Object Element Go to State 12
State 10
SymbolAction
String Shift to State 2
Number Shift to State 3
true Shift to State 6
false Shift to State 7
null Shift to State 8
{ Shift to State 9
[ Shift to State 10
] Reduce <Array Optional> ::=
JSON Go to State 16
Object Go to State 4
Array Go to State 5
Array Optional Go to State 14
Array Reversed Go to State 15
State 11
SymbolAction
} Shift to State 17
State 12
SymbolAction
} Reduce <Object Optional> ::= <Object Element>
, Shift to State 18
State 13
SymbolAction
: Shift to State 19
State 14
SymbolAction
] Shift to State 20
State 15
SymbolAction
] Reduce <Array Optional> ::= <Array Reversed>
, Shift to State 21
State 16
SymbolAction
] Reduce <Array Reversed> ::= <JSON>
, Reduce <Array Reversed> ::= <JSON>
State 17
SymbolAction
} Reduce <Object> ::= '{' <Object Optional> '}'
] Reduce <Object> ::= '{' <Object Optional> '}'
, Reduce <Object> ::= '{' <Object Optional> '}'
EOF Reduce <Object> ::= '{' <Object Optional> '}'
State 18
SymbolAction
String Shift to State 22
State 19
SymbolAction
String Shift to State 2
Number Shift to State 3
true Shift to State 6
false Shift to State 7
null Shift to State 8
{ Shift to State 9
[ Shift to State 10
JSON Go to State 23
Object Go to State 4
Array Go to State 5
State 20
SymbolAction
} Reduce <Array> ::= '[' <Array Optional> ']'
] Reduce <Array> ::= '[' <Array Optional> ']'
, Reduce <Array> ::= '[' <Array Optional> ']'
EOF Reduce <Array> ::= '[' <Array Optional> ']'
State 21
SymbolAction
String Shift to State 2
Number Shift to State 3
true Shift to State 6
false Shift to State 7
null Shift to State 8
{ Shift to State 9
[ Shift to State 10
JSON Go to State 24
Object Go to State 4
Array Go to State 5
State 22
SymbolAction
: Shift to State 25
State 23
SymbolAction
} Reduce <Object Element> ::= String ':' <JSON>
, Reduce <Object Element> ::= String ':' <JSON>
State 24
SymbolAction
] Reduce <Array Reversed> ::= <Array Reversed> ',' <JSON>
, Reduce <Array Reversed> ::= <Array Reversed> ',' <JSON>
State 25
SymbolAction
String Shift to State 2
Number Shift to State 3
true Shift to State 6
false Shift to State 7
null Shift to State 8
{ Shift to State 9
[ Shift to State 10
JSON Go to State 26
Object Go to State 4
Array Go to State 5
State 26
SymbolAction
} Reduce <Object Element> ::= <Object Element> ',' String ':' <JSON>
, Reduce <Object Element> ::= <Object Element> ',' String ':' <JSON>

DFA States

State 0
CharactersAction
Tab, Line Feed, Carriage Return, Space Go to State 1
" Go to State 2
Comma Go to State 3
- Go to State 4
0 Go to State 5
1…9 Go to State 6
: Go to State 7
[ Go to State 8
] Go to State 9
f Go to State 10
n Go to State 11
t Go to State 12
{ Go to State 13
} Go to State 14
State 1
CharactersAction
Tab, Line Feed, Carriage Return, Space Go to State 1
Accept Whitespace (Noise)
State 2
CharactersAction
" Go to State 30
\ Go to State 31
In all other cases Go to State 2
State 3
Accept ,
State 4
CharactersAction
0 Go to State 5
1…9 Go to State 6
State 5
CharactersAction
. Go to State 25
E, e Go to State 26
Accept Number
State 6
CharactersAction
0…9 Go to State 6
. Go to State 25
E, e Go to State 26
Accept Number
State 7
Accept :
State 8
Accept [
State 9
Accept ]
State 10
CharactersAction
a Go to State 21
State 11
CharactersAction
u Go to State 18
State 12
CharactersAction
r Go to State 15
State 13
Accept {
State 14
Accept }
State 15
CharactersAction
u Go to State 16
State 16
CharactersAction
e Go to State 17
State 17
Accept true
State 18
CharactersAction
l Go to State 19
State 19
CharactersAction
l Go to State 20
State 20
Accept null
State 21
CharactersAction
l Go to State 22
State 22
CharactersAction
s Go to State 23
State 23
CharactersAction
e Go to State 24
State 24
Accept false
State 25
CharactersAction
0…9 Go to State 29
State 26
CharactersAction
+, - Go to State 27
0…9 Go to State 28
State 27
CharactersAction
0…9 Go to State 28
State 28
CharactersAction
0…9 Go to State 28
Accept Number
State 29
CharactersAction
E, e Go to State 26
0…9 Go to State 29
Accept Number
State 30
Accept String
State 31
CharactersAction
", /, \, b, f, n, r, t Go to State 2
u Go to State 32
State 32
CharactersAction
0…9, A…F, a…f Go to State 33
State 33
CharactersAction
0…9, A…F, a…f Go to State 34
State 34
CharactersAction
0…9, A…F, a…f Go to State 35
State 35
CharactersAction
0…9, A…F, a…f Go to State 2