Skip to content

Commit f49cee0

Browse files
committed
Remove unused tokens
Follow-up to ffb3496
1 parent 020a9d5 commit f49cee0

3 files changed

Lines changed: 61 additions & 68 deletions

File tree

grammar/handlebars.y

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
%token BOOLEAN
44
%token CLOSE
5-
%token CLOSE_ARRAY
65
%token CLOSE_BLOCK_PARAMS
76
%token CLOSE_RAW_BLOCK
87
%token CLOSE_SEXPR
@@ -18,7 +17,6 @@
1817
%token NULL
1918
%token NUMBER
2019
%token OPEN
21-
%token OPEN_ARRAY
2220
%token OPEN_BLOCK
2321
%token OPEN_BLOCK_PARAMS
2422
%token OPEN_ENDBLOCK

src/Lexer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ final class Lexer extends Phlexer
1414
{
1515
public const T_BOOLEAN = 'BOOLEAN';
1616
public const T_CLOSE = 'CLOSE';
17-
public const T_CLOSE_ARRAY = 'CLOSE_ARRAY';
1817
public const T_CLOSE_BLOCK_PARAMS = 'CLOSE_BLOCK_PARAMS';
1918
public const T_CLOSE_RAW_BLOCK = 'CLOSE_RAW_BLOCK';
2019
public const T_CLOSE_SEXPR = 'CLOSE_SEXPR';

src/Parser.php

Lines changed: 61 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,41 @@ class Parser extends ParserAbstract
3333
public const YYERRTOK = 256;
3434
public const BOOLEAN = 257;
3535
public const CLOSE = 258;
36-
public const CLOSE_ARRAY = 259;
37-
public const CLOSE_BLOCK_PARAMS = 260;
38-
public const CLOSE_RAW_BLOCK = 261;
39-
public const CLOSE_SEXPR = 262;
40-
public const CLOSE_UNESCAPED = 263;
41-
public const COMMENT = 264;
42-
public const CONTENT = 265;
43-
public const DATA = 266;
44-
public const END_RAW_BLOCK = 267;
45-
public const EQUALS = 268;
46-
public const ID = 269;
47-
public const INVALID = 270;
48-
public const INVERSE = 271;
49-
public const NULL = 272;
50-
public const NUMBER = 273;
51-
public const OPEN = 274;
52-
public const OPEN_ARRAY = 275;
53-
public const OPEN_BLOCK = 276;
54-
public const OPEN_BLOCK_PARAMS = 277;
55-
public const OPEN_ENDBLOCK = 278;
56-
public const OPEN_INVERSE = 279;
57-
public const OPEN_INVERSE_CHAIN = 280;
58-
public const OPEN_PARTIAL = 281;
59-
public const OPEN_PARTIAL_BLOCK = 282;
60-
public const OPEN_RAW_BLOCK = 283;
61-
public const OPEN_SEXPR = 284;
62-
public const OPEN_UNESCAPED = 285;
63-
public const PRIVATE_SEP = 286;
64-
public const SEP = 287;
65-
public const STRING = 288;
66-
public const UNDEFINED = 289;
36+
public const CLOSE_BLOCK_PARAMS = 259;
37+
public const CLOSE_RAW_BLOCK = 260;
38+
public const CLOSE_SEXPR = 261;
39+
public const CLOSE_UNESCAPED = 262;
40+
public const COMMENT = 263;
41+
public const CONTENT = 264;
42+
public const DATA = 265;
43+
public const END_RAW_BLOCK = 266;
44+
public const EQUALS = 267;
45+
public const ID = 268;
46+
public const INVALID = 269;
47+
public const INVERSE = 270;
48+
public const NULL = 271;
49+
public const NUMBER = 272;
50+
public const OPEN = 273;
51+
public const OPEN_BLOCK = 274;
52+
public const OPEN_BLOCK_PARAMS = 275;
53+
public const OPEN_ENDBLOCK = 276;
54+
public const OPEN_INVERSE = 277;
55+
public const OPEN_INVERSE_CHAIN = 278;
56+
public const OPEN_PARTIAL = 279;
57+
public const OPEN_PARTIAL_BLOCK = 280;
58+
public const OPEN_RAW_BLOCK = 281;
59+
public const OPEN_SEXPR = 282;
60+
public const OPEN_UNESCAPED = 283;
61+
public const PRIVATE_SEP = 284;
62+
public const SEP = 285;
63+
public const STRING = 286;
64+
public const UNDEFINED = 287;
6765

68-
protected int $tokenToSymbolMapSize = 290;
66+
protected int $tokenToSymbolMapSize = 288;
6967
protected int $actionTableSize = 45;
7068
protected int $gotoTableSize = 49;
7169

72-
protected int $invalidSymbol = 35;
70+
protected int $invalidSymbol = 33;
7371
protected int $errorSymbol = 1;
7472
protected int $defaultAction = -32766;
7573
protected int $unexpectedTokenRule = 32767;
@@ -110,41 +108,39 @@ class Parser extends ParserAbstract
110108
"SEP",
111109
"STRING",
112110
"UNDEFINED",
113-
"CLOSE_ARRAY",
114-
"INVALID",
115-
"OPEN_ARRAY"
111+
"INVALID"
116112
);
117113

118114
protected array $tokenToSymbol = array(
119-
0, 35, 35, 35, 35, 35, 35, 35, 35, 35,
120-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
121-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
122-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
123-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
124-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
125-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
126-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
127-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
128-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
129-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
130-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
131-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
132-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
133-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
134-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
135-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
136-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
137-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
138-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
139-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
140-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
141-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
142-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
143-
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
144-
35, 35, 35, 35, 35, 35, 1, 2, 3, 32,
145-
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
146-
33, 14, 15, 16, 17, 34, 18, 19, 20, 21,
147-
22, 23, 24, 25, 26, 27, 28, 29, 30, 31
115+
0, 33, 33, 33, 33, 33, 33, 33, 33, 33,
116+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
117+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
118+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
119+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
120+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
121+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
122+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
123+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
124+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
125+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
126+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
127+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
128+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
129+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
130+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
131+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
132+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
133+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
134+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
135+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
136+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
137+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
138+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
139+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
140+
33, 33, 33, 33, 33, 33, 1, 2, 3, 4,
141+
5, 6, 7, 8, 9, 10, 11, 12, 13, 32,
142+
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
143+
24, 25, 26, 27, 28, 29, 30, 31
148144
);
149145

150146
protected array $action = array(

0 commit comments

Comments
 (0)