|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* This file is part of Railt package. |
|
4
|
|
|
* |
|
5
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
6
|
|
|
* file that was distributed with this source code. |
|
7
|
|
|
*/ |
|
8
|
|
|
declare(strict_types=1); |
|
9
|
|
|
|
|
10
|
|
|
namespace Railt\SDL\Parser; |
|
11
|
|
|
|
|
12
|
|
|
use Railt\Lexer\Factory; |
|
13
|
|
|
use Railt\Lexer\LexerInterface; |
|
14
|
|
|
use Railt\Parser\Driver\Llk; |
|
15
|
|
|
use Railt\Parser\Driver\Stateful; |
|
16
|
|
|
use Railt\Parser\Grammar; |
|
17
|
|
|
use Railt\Parser\GrammarInterface; |
|
18
|
|
|
use Railt\Parser\ParserInterface; |
|
19
|
|
|
use Railt\Parser\Rule\Alternation; |
|
20
|
|
|
use Railt\Parser\Rule\Concatenation; |
|
21
|
|
|
use Railt\Parser\Rule\Repetition; |
|
22
|
|
|
use Railt\Parser\Rule\Terminal; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* --- DO NOT EDIT THIS FILE --- |
|
26
|
|
|
* |
|
27
|
|
|
* Class BaseParser has been auto-generated. |
|
28
|
|
|
* Generated at: 13-11-2018 20:17:35 |
|
29
|
|
|
* |
|
30
|
|
|
* --- DO NOT EDIT THIS FILE --- |
|
31
|
|
|
*/ |
|
32
|
|
|
class BaseParser extends Stateful |
|
33
|
|
|
{ |
|
34
|
|
|
public const T_NON_NULL = 'T_NON_NULL'; |
|
35
|
|
|
public const T_VAR = 'T_VAR'; |
|
36
|
|
|
public const T_PARENTHESIS_OPEN = 'T_PARENTHESIS_OPEN'; |
|
37
|
|
|
public const T_PARENTHESIS_CLOSE = 'T_PARENTHESIS_CLOSE'; |
|
38
|
|
|
public const T_THREE_DOTS = 'T_THREE_DOTS'; |
|
39
|
|
|
public const T_COLON = 'T_COLON'; |
|
40
|
|
|
public const T_EQUAL = 'T_EQUAL'; |
|
41
|
|
|
public const T_DIRECTIVE_AT = 'T_DIRECTIVE_AT'; |
|
42
|
|
|
public const T_BRACKET_OPEN = 'T_BRACKET_OPEN'; |
|
43
|
|
|
public const T_BRACKET_CLOSE = 'T_BRACKET_CLOSE'; |
|
44
|
|
|
public const T_BRACE_OPEN = 'T_BRACE_OPEN'; |
|
45
|
|
|
public const T_BRACE_CLOSE = 'T_BRACE_CLOSE'; |
|
46
|
|
|
public const T_OR = 'T_OR'; |
|
47
|
|
|
public const T_AND = 'T_AND'; |
|
48
|
|
|
public const T_NUMBER_VALUE = 'T_NUMBER_VALUE'; |
|
49
|
|
|
public const T_BOOL_TRUE = 'T_BOOL_TRUE'; |
|
50
|
|
|
public const T_BOOL_FALSE = 'T_BOOL_FALSE'; |
|
51
|
|
|
public const T_NULL = 'T_NULL'; |
|
52
|
|
|
public const T_MULTILINE_STRING = 'T_MULTILINE_STRING'; |
|
53
|
|
|
public const T_STRING = 'T_STRING'; |
|
54
|
|
|
public const T_EXTENDS = 'T_EXTENDS'; |
|
55
|
|
|
public const T_TYPE_IMPLEMENTS = 'T_TYPE_IMPLEMENTS'; |
|
56
|
|
|
public const T_ON = 'T_ON'; |
|
57
|
|
|
public const T_TYPE = 'T_TYPE'; |
|
58
|
|
|
public const T_ENUM = 'T_ENUM'; |
|
59
|
|
|
public const T_UNION = 'T_UNION'; |
|
60
|
|
|
public const T_INTERFACE = 'T_INTERFACE'; |
|
61
|
|
|
public const T_SCHEMA = 'T_SCHEMA'; |
|
62
|
|
|
public const T_SCHEMA_QUERY = 'T_SCHEMA_QUERY'; |
|
63
|
|
|
public const T_SCHEMA_MUTATION = 'T_SCHEMA_MUTATION'; |
|
64
|
|
|
public const T_SCHEMA_SUBSCRIPTION = 'T_SCHEMA_SUBSCRIPTION'; |
|
65
|
|
|
public const T_SCALAR = 'T_SCALAR'; |
|
66
|
|
|
public const T_DIRECTIVE = 'T_DIRECTIVE'; |
|
67
|
|
|
public const T_INPUT = 'T_INPUT'; |
|
68
|
|
|
public const T_EXTEND = 'T_EXTEND'; |
|
69
|
|
|
public const T_NAME = 'T_NAME'; |
|
70
|
|
|
public const T_VARIABLE = 'T_VARIABLE'; |
|
71
|
|
|
public const T_WHITESPACE = 'T_WHITESPACE'; |
|
72
|
|
|
public const T_COMMENT = 'T_COMMENT'; |
|
73
|
|
|
public const T_COMMA = 'T_COMMA'; |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* Lexical tokens list. |
|
77
|
|
|
* |
|
78
|
|
|
* @var string[] |
|
79
|
|
|
*/ |
|
80
|
|
|
protected const LEXER_TOKENS = [ |
|
81
|
|
|
self::T_NON_NULL => '!', |
|
82
|
|
|
self::T_VAR => '\\$', |
|
83
|
|
|
self::T_PARENTHESIS_OPEN => '\\(', |
|
84
|
|
|
self::T_PARENTHESIS_CLOSE => '\\)', |
|
85
|
|
|
self::T_THREE_DOTS => '\\.\\.\\.', |
|
86
|
|
|
self::T_COLON => ':', |
|
87
|
|
|
self::T_EQUAL => '=', |
|
88
|
|
|
self::T_DIRECTIVE_AT => '@', |
|
89
|
|
|
self::T_BRACKET_OPEN => '\\[', |
|
90
|
|
|
self::T_BRACKET_CLOSE => '\\]', |
|
91
|
|
|
self::T_BRACE_OPEN => '{', |
|
92
|
|
|
self::T_BRACE_CLOSE => '}', |
|
93
|
|
|
self::T_OR => '\\|', |
|
94
|
|
|
self::T_AND => '\\&', |
|
95
|
|
|
self::T_NUMBER_VALUE => '\\-?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][\\+\\-]?[0-9]+)?\\b', |
|
96
|
|
|
self::T_BOOL_TRUE => 'true\\b', |
|
97
|
|
|
self::T_BOOL_FALSE => 'false\\b', |
|
98
|
|
|
self::T_NULL => 'null\\b', |
|
99
|
|
|
self::T_MULTILINE_STRING => '"""(?:\\\\"""|(?!""").|\\s)*"""', |
|
100
|
|
|
self::T_STRING => '"[^"\\\\]*(\\\\.[^"\\\\]*)*"', |
|
101
|
|
|
self::T_EXTENDS => 'extends\\b', |
|
102
|
|
|
self::T_TYPE_IMPLEMENTS => 'implements\\b', |
|
103
|
|
|
self::T_ON => 'on\\b', |
|
104
|
|
|
self::T_TYPE => 'type\\b', |
|
105
|
|
|
self::T_ENUM => 'enum\\b', |
|
106
|
|
|
self::T_UNION => 'union\\b', |
|
107
|
|
|
self::T_INTERFACE => 'interface\\b', |
|
108
|
|
|
self::T_SCHEMA => 'schema\\b', |
|
109
|
|
|
self::T_SCHEMA_QUERY => 'query\\b', |
|
110
|
|
|
self::T_SCHEMA_MUTATION => 'mutation\\b', |
|
111
|
|
|
self::T_SCHEMA_SUBSCRIPTION => 'subscription\\b', |
|
112
|
|
|
self::T_SCALAR => 'scalar\\b', |
|
113
|
|
|
self::T_DIRECTIVE => 'directive\\b', |
|
114
|
|
|
self::T_INPUT => 'input\\b', |
|
115
|
|
|
self::T_EXTEND => 'extend\\b', |
|
116
|
|
|
self::T_NAME => '([_A-Za-z][_0-9A-Za-z]*)', |
|
117
|
|
|
self::T_VARIABLE => '(\\$[_A-Za-z][_0-9A-Za-z]*)', |
|
118
|
|
|
self::T_WHITESPACE => '[\\xfe\\xff|\\x20|\\x09|\\x0a|\\x0d]+', |
|
119
|
|
|
self::T_COMMENT => '#[^\\n]*', |
|
120
|
|
|
self::T_COMMA => ',', |
|
121
|
|
|
]; |
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* List of skipped tokens. |
|
125
|
|
|
* |
|
126
|
|
|
* @var string[] |
|
127
|
|
|
*/ |
|
128
|
|
|
protected const LEXER_SKIPPED_TOKENS = [ |
|
129
|
|
|
'T_WHITESPACE', |
|
130
|
|
|
'T_COMMENT', |
|
131
|
|
|
'T_COMMA', |
|
132
|
|
|
]; |
|
133
|
|
|
|
|
134
|
|
|
/** |
|
135
|
|
|
* @var int |
|
136
|
|
|
*/ |
|
137
|
|
|
protected const LEXER_FLAGS = Factory::LOOKAHEAD; |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* List of rule delegates. |
|
141
|
|
|
* |
|
142
|
|
|
* @var string[] |
|
143
|
|
|
*/ |
|
144
|
|
|
protected const PARSER_DELEGATES = [ |
|
145
|
|
|
]; |
|
146
|
|
|
|
|
147
|
|
|
/** |
|
148
|
|
|
* Parser root rule name. |
|
149
|
|
|
* |
|
150
|
|
|
* @var string |
|
151
|
|
|
*/ |
|
152
|
|
|
protected const PARSER_ROOT_RULE = 'Document'; |
|
153
|
|
|
|
|
154
|
|
|
/** |
|
155
|
|
|
* @return ParserInterface |
|
156
|
|
|
* @throws \InvalidArgumentException |
|
157
|
|
|
* @throws \Railt\Lexer\Exception\BadLexemeException |
|
158
|
|
|
*/ |
|
159
|
283 |
|
protected function boot(): ParserInterface |
|
160
|
|
|
{ |
|
161
|
283 |
|
return new Llk($this->bootLexer(), $this->bootGrammar()); |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
/** |
|
165
|
|
|
* @return LexerInterface |
|
166
|
|
|
* @throws \InvalidArgumentException |
|
167
|
|
|
* @throws \Railt\Lexer\Exception\BadLexemeException |
|
168
|
|
|
*/ |
|
169
|
283 |
|
protected function bootLexer(): LexerInterface |
|
170
|
|
|
{ |
|
171
|
283 |
|
return Factory::create(static::LEXER_TOKENS, static::LEXER_SKIPPED_TOKENS, static::LEXER_FLAGS); |
|
172
|
|
|
} |
|
173
|
|
|
|
|
174
|
|
|
/** |
|
175
|
|
|
* @return GrammarInterface |
|
176
|
|
|
*/ |
|
177
|
283 |
|
protected function bootGrammar(): GrammarInterface |
|
178
|
|
|
{ |
|
179
|
283 |
|
return new Grammar([ |
|
180
|
283 |
|
new Repetition(0, 0, -1, 'Directive', null), |
|
181
|
283 |
|
new Repetition(1, 0, -1, 'Definition', null), |
|
182
|
283 |
|
(new Concatenation('Document', [0, 1], 'Document'))->setDefaultId('Document'), |
|
183
|
283 |
|
new Concatenation(3, ['DirectiveDefinition'], null), |
|
184
|
283 |
|
new Alternation('Definition', ['ObjectDefinition', 'InterfaceDefinition', 'EnumDefinition', 'UnionDefinition', 'SchemaDefinition', 'ScalarDefinition', 'InputDefinition', 'ExtendDefinition', 3], null), |
|
185
|
283 |
|
new Terminal(5, 'T_BOOL_TRUE', true), |
|
186
|
283 |
|
new Terminal(6, 'T_BOOL_FALSE', true), |
|
187
|
283 |
|
new Terminal(7, 'T_NULL', true), |
|
188
|
283 |
|
new Alternation('ValueKeyword', [5, 6, 7], null), |
|
189
|
283 |
|
new Terminal(9, 'T_ON', true), |
|
190
|
283 |
|
new Terminal(10, 'T_TYPE', true), |
|
191
|
283 |
|
new Terminal(11, 'T_TYPE_IMPLEMENTS', true), |
|
192
|
283 |
|
new Terminal(12, 'T_ENUM', true), |
|
193
|
283 |
|
new Terminal(13, 'T_UNION', true), |
|
194
|
283 |
|
new Terminal(14, 'T_INTERFACE', true), |
|
195
|
283 |
|
new Terminal(15, 'T_SCHEMA', true), |
|
196
|
283 |
|
new Terminal(16, 'T_SCHEMA_QUERY', true), |
|
197
|
283 |
|
new Terminal(17, 'T_SCHEMA_MUTATION', true), |
|
198
|
283 |
|
new Terminal(18, 'T_SCHEMA_SUBSCRIPTION', true), |
|
199
|
283 |
|
new Terminal(19, 'T_SCALAR', true), |
|
200
|
283 |
|
new Terminal(20, 'T_DIRECTIVE', true), |
|
201
|
283 |
|
new Terminal(21, 'T_INPUT', true), |
|
202
|
283 |
|
new Terminal(22, 'T_EXTEND', true), |
|
203
|
283 |
|
new Alternation('Keyword', [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22], null), |
|
204
|
283 |
|
new Terminal('Number', 'T_NUMBER_VALUE', true), |
|
205
|
283 |
|
new Terminal('Nullable', 'T_NULL', true), |
|
206
|
283 |
|
new Terminal(26, 'T_BOOL_TRUE', true), |
|
207
|
283 |
|
new Terminal(27, 'T_BOOL_FALSE', true), |
|
208
|
283 |
|
new Alternation('Boolean', [26, 27], null), |
|
209
|
283 |
|
new Terminal(29, 'T_MULTILINE_STRING', true), |
|
210
|
283 |
|
new Terminal(30, 'T_STRING', true), |
|
211
|
283 |
|
new Alternation('String', [29, 30], null), |
|
212
|
283 |
|
new Terminal(32, 'T_NAME', true), |
|
213
|
283 |
|
new Concatenation(33, ['ValueKeyword'], null), |
|
214
|
283 |
|
new Alternation('Word', [32, 33], null), |
|
215
|
283 |
|
new Terminal(35, 'T_SCHEMA_QUERY', true), |
|
216
|
283 |
|
new Concatenation(36, [35], 'Name'), |
|
217
|
283 |
|
new Terminal(37, 'T_SCHEMA_MUTATION', true), |
|
218
|
283 |
|
new Concatenation(38, [37], 'Name'), |
|
219
|
283 |
|
new Terminal(39, 'T_SCHEMA_SUBSCRIPTION', true), |
|
220
|
283 |
|
new Concatenation(40, [39], 'Name'), |
|
221
|
283 |
|
new Concatenation(41, ['Word'], null), |
|
222
|
283 |
|
new Concatenation(42, [41], 'Name'), |
|
223
|
283 |
|
(new Alternation('Name', [36, 38, 40, 42], null))->setDefaultId('Name'), |
|
224
|
283 |
|
new Alternation(44, ['String', 'Word', 'Keyword'], null), |
|
225
|
283 |
|
new Concatenation('Key', [44], 'Name'), |
|
226
|
283 |
|
new Alternation(46, ['String', 'Number', 'Nullable', 'Keyword', 'Object', 'List', 'Word'], null), |
|
227
|
283 |
|
new Concatenation('Value', [46], 'Value'), |
|
228
|
283 |
|
new Concatenation('ValueDefinition', ['ValueDefinitionResolver'], null), |
|
229
|
283 |
|
new Terminal(49, 'T_NON_NULL', true), |
|
230
|
283 |
|
new Repetition(50, 0, 1, 49, null), |
|
231
|
283 |
|
new Concatenation(51, ['ValueListDefinition', 50], 'List'), |
|
232
|
283 |
|
new Terminal(52, 'T_NON_NULL', true), |
|
233
|
283 |
|
new Repetition(53, 0, 1, 52, null), |
|
234
|
283 |
|
new Concatenation(54, ['ValueScalarDefinition', 53], 'Type'), |
|
235
|
283 |
|
new Alternation('ValueDefinitionResolver', [51, 54], null), |
|
236
|
283 |
|
new Terminal(56, 'T_BRACKET_OPEN', false), |
|
237
|
283 |
|
new Terminal(57, 'T_NON_NULL', true), |
|
238
|
283 |
|
new Repetition(58, 0, 1, 57, null), |
|
239
|
283 |
|
new Concatenation(59, ['ValueScalarDefinition', 58], 'Type'), |
|
240
|
283 |
|
new Terminal(60, 'T_BRACKET_CLOSE', false), |
|
241
|
283 |
|
new Concatenation('ValueListDefinition', [56, 59, 60], null), |
|
242
|
283 |
|
new Concatenation(62, ['Word'], null), |
|
243
|
283 |
|
new Alternation('ValueScalarDefinition', ['Keyword', 62], null), |
|
244
|
283 |
|
new Terminal(64, 'T_BRACE_OPEN', false), |
|
245
|
283 |
|
new Repetition(65, 0, -1, 'ObjectPair', null), |
|
246
|
283 |
|
new Terminal(66, 'T_BRACE_CLOSE', false), |
|
247
|
283 |
|
new Concatenation('Object', [64, 65, 66], 'Object'), |
|
248
|
283 |
|
new Terminal(68, 'T_COLON', false), |
|
249
|
283 |
|
new Concatenation('ObjectPair', ['Key', 68, 'Value'], 'ObjectPair'), |
|
250
|
283 |
|
new Terminal(70, 'T_BRACKET_OPEN', false), |
|
251
|
283 |
|
new Repetition(71, 0, -1, 'Value', null), |
|
252
|
283 |
|
new Terminal(72, 'T_BRACKET_CLOSE', false), |
|
253
|
283 |
|
new Concatenation('List', [70, 71, 72], 'List'), |
|
254
|
283 |
|
new Terminal(74, 'T_MULTILINE_STRING', true), |
|
255
|
283 |
|
new Concatenation('Documentation', [74], 'Description'), |
|
256
|
283 |
|
new Repetition(76, 0, 1, 'Documentation', null), |
|
257
|
283 |
|
new Terminal(77, 'T_SCHEMA', true), |
|
258
|
283 |
|
new Repetition(78, 0, 1, 'Name', null), |
|
259
|
283 |
|
new Repetition(79, 0, -1, 'Directive', null), |
|
260
|
283 |
|
new Terminal(80, 'T_BRACE_OPEN', false), |
|
261
|
283 |
|
new Terminal(81, 'T_BRACE_CLOSE', false), |
|
262
|
283 |
|
(new Concatenation('SchemaDefinition', [76, 77, 78, 79, 80, 'SchemaDefinitionBody', 81], 'SchemaDefinition'))->setDefaultId('SchemaDefinition'), |
|
263
|
283 |
|
new Alternation(83, ['SchemaDefinitionQuery', 'SchemaDefinitionMutation', 'SchemaDefinitionSubscription'], null), |
|
264
|
283 |
|
new Repetition('SchemaDefinitionBody', 0, -1, 83, null), |
|
265
|
283 |
|
new Repetition(85, 0, 1, 'Documentation', null), |
|
266
|
283 |
|
new Terminal(86, 'T_SCHEMA_QUERY', false), |
|
267
|
283 |
|
new Terminal(87, 'T_COLON', false), |
|
268
|
283 |
|
new Concatenation('SchemaDefinitionQuery', [85, 86, 87, 'SchemaDefinitionFieldValue'], 'Query'), |
|
269
|
283 |
|
new Repetition(89, 0, 1, 'Documentation', null), |
|
270
|
283 |
|
new Terminal(90, 'T_SCHEMA_MUTATION', false), |
|
271
|
283 |
|
new Terminal(91, 'T_COLON', false), |
|
272
|
283 |
|
new Concatenation('SchemaDefinitionMutation', [89, 90, 91, 'SchemaDefinitionFieldValue'], 'Mutation'), |
|
273
|
283 |
|
new Repetition(93, 0, 1, 'Documentation', null), |
|
274
|
283 |
|
new Terminal(94, 'T_SCHEMA_SUBSCRIPTION', false), |
|
275
|
283 |
|
new Terminal(95, 'T_COLON', false), |
|
276
|
283 |
|
new Concatenation('SchemaDefinitionSubscription', [93, 94, 95, 'SchemaDefinitionFieldValue'], 'Subscription'), |
|
277
|
283 |
|
new Repetition(97, 0, -1, 'Directive', null), |
|
278
|
283 |
|
new Concatenation('SchemaDefinitionFieldValue', ['ValueDefinition', 97], null), |
|
279
|
283 |
|
new Repetition(99, 0, 1, 'Documentation', null), |
|
280
|
283 |
|
new Terminal(100, 'T_SCALAR', false), |
|
281
|
283 |
|
new Repetition(101, 0, -1, 'Directive', null), |
|
282
|
283 |
|
(new Concatenation('ScalarDefinition', [99, 100, 'Name', 101], 'ScalarDefinition'))->setDefaultId('ScalarDefinition'), |
|
283
|
283 |
|
new Repetition(103, 0, 1, 'Documentation', null), |
|
284
|
283 |
|
new Terminal(104, 'T_INPUT', false), |
|
285
|
283 |
|
new Repetition(105, 0, -1, 'Directive', null), |
|
286
|
283 |
|
new Terminal(106, 'T_BRACE_OPEN', false), |
|
287
|
283 |
|
new Repetition(107, 0, -1, 'InputDefinitionField', null), |
|
288
|
283 |
|
new Terminal(108, 'T_BRACE_CLOSE', false), |
|
289
|
283 |
|
(new Concatenation('InputDefinition', [103, 104, 'Name', 105, 106, 107, 108], 'InputDefinition'))->setDefaultId('InputDefinition'), |
|
290
|
283 |
|
new Repetition(110, 0, 1, 'Documentation', null), |
|
291
|
283 |
|
new Terminal(111, 'T_COLON', false), |
|
292
|
283 |
|
new Repetition(112, 0, 1, 'InputDefinitionDefaultValue', null), |
|
293
|
283 |
|
new Repetition(113, 0, -1, 'Directive', null), |
|
294
|
283 |
|
new Concatenation(114, ['Key', 111, 'ValueDefinition', 112, 113], null), |
|
295
|
283 |
|
new Concatenation('InputDefinitionField', [110, 114], 'Argument'), |
|
296
|
283 |
|
new Terminal(116, 'T_EQUAL', false), |
|
297
|
283 |
|
new Concatenation(117, ['Value'], null), |
|
298
|
283 |
|
new Concatenation('InputDefinitionDefaultValue', [116, 117], null), |
|
299
|
283 |
|
new Repetition(119, 0, 1, 'Documentation', null), |
|
300
|
283 |
|
new Terminal(120, 'T_EXTEND', false), |
|
301
|
283 |
|
new Concatenation(121, ['ObjectDefinition'], 'ExtendDefinition'), |
|
302
|
283 |
|
new Concatenation(122, ['InterfaceDefinition'], 'ExtendDefinition'), |
|
303
|
283 |
|
new Concatenation(123, ['EnumDefinition'], 'ExtendDefinition'), |
|
304
|
283 |
|
new Concatenation(124, ['UnionDefinition'], 'ExtendDefinition'), |
|
305
|
283 |
|
new Concatenation(125, ['SchemaDefinition'], 'ExtendDefinition'), |
|
306
|
283 |
|
new Concatenation(126, ['ScalarDefinition'], 'ExtendDefinition'), |
|
307
|
283 |
|
new Concatenation(127, ['InputDefinition'], 'ExtendDefinition'), |
|
308
|
283 |
|
new Concatenation(128, ['DirectiveDefinition'], 'ExtendDefinition'), |
|
309
|
283 |
|
new Alternation(129, [121, 122, 123, 124, 125, 126, 127, 128], null), |
|
310
|
283 |
|
(new Concatenation('ExtendDefinition', [119, 120, 129], null))->setDefaultId('ExtendDefinition'), |
|
311
|
283 |
|
new Repetition(131, 0, 1, 'Documentation', null), |
|
312
|
283 |
|
new Terminal(132, 'T_DIRECTIVE', false), |
|
313
|
283 |
|
new Terminal(133, 'T_DIRECTIVE_AT', false), |
|
314
|
283 |
|
new Repetition(134, 0, -1, 'DirectiveDefinitionArguments', null), |
|
315
|
283 |
|
new Terminal(135, 'T_ON', false), |
|
316
|
283 |
|
new Repetition(136, 1, -1, 'DirectiveDefinitionTargets', null), |
|
317
|
283 |
|
(new Concatenation('DirectiveDefinition', [131, 132, 133, 'Name', 134, 135, 136], 'DirectiveDefinition'))->setDefaultId('DirectiveDefinition'), |
|
318
|
283 |
|
new Terminal(138, 'T_PARENTHESIS_OPEN', false), |
|
319
|
283 |
|
new Repetition(139, 0, -1, 'DirectiveDefinitionArgument', null), |
|
320
|
283 |
|
new Terminal(140, 'T_PARENTHESIS_CLOSE', false), |
|
321
|
283 |
|
new Concatenation('DirectiveDefinitionArguments', [138, 139, 140], null), |
|
322
|
283 |
|
new Repetition(142, 0, 1, 'Documentation', null), |
|
323
|
283 |
|
new Terminal(143, 'T_COLON', false), |
|
324
|
283 |
|
new Repetition(144, 0, 1, 'DirectiveDefinitionDefaultValue', null), |
|
325
|
283 |
|
new Repetition(145, 0, -1, 'Directive', null), |
|
326
|
283 |
|
new Concatenation('DirectiveDefinitionArgument', [142, 'Key', 143, 'ValueDefinition', 144, 145], 'Argument'), |
|
327
|
283 |
|
new Terminal(147, 'T_OR', false), |
|
328
|
283 |
|
new Concatenation(148, [147, 'Key'], null), |
|
329
|
283 |
|
new Repetition(149, 0, -1, 148, null), |
|
330
|
283 |
|
new Concatenation('DirectiveDefinitionTargets', ['Key', 149], 'Target'), |
|
331
|
283 |
|
new Terminal(151, 'T_EQUAL', false), |
|
332
|
283 |
|
new Concatenation(152, ['Value'], null), |
|
333
|
283 |
|
new Concatenation('DirectiveDefinitionDefaultValue', [151, 152], null), |
|
334
|
283 |
|
new Repetition(154, 0, 1, 'Documentation', null), |
|
335
|
283 |
|
new Terminal(155, 'T_TYPE', false), |
|
336
|
283 |
|
new Repetition(156, 0, 1, 'ObjectDefinitionImplements', null), |
|
337
|
283 |
|
new Repetition(157, 0, -1, 'Directive', null), |
|
338
|
283 |
|
new Terminal(158, 'T_BRACE_OPEN', false), |
|
339
|
283 |
|
new Repetition(159, 0, -1, 'ObjectDefinitionField', null), |
|
340
|
283 |
|
new Terminal(160, 'T_BRACE_CLOSE', false), |
|
341
|
283 |
|
(new Concatenation('ObjectDefinition', [154, 155, 'Name', 156, 157, 158, 159, 160], 'ObjectDefinition'))->setDefaultId('ObjectDefinition'), |
|
342
|
283 |
|
new Terminal(162, 'T_TYPE_IMPLEMENTS', false), |
|
343
|
283 |
|
new Repetition(163, 0, -1, 'Key', null), |
|
344
|
283 |
|
new Terminal(164, 'T_AND', false), |
|
345
|
283 |
|
new Concatenation(165, [164, 'Key'], null), |
|
346
|
283 |
|
new Repetition(166, 0, 1, 165, null), |
|
347
|
283 |
|
new Concatenation('ObjectDefinitionImplements', [162, 163, 166], 'Implements'), |
|
348
|
283 |
|
new Repetition(168, 0, 1, 'Documentation', null), |
|
349
|
283 |
|
new Repetition(169, 0, 1, 'Arguments', null), |
|
350
|
283 |
|
new Terminal(170, 'T_COLON', false), |
|
351
|
283 |
|
new Concatenation(171, ['Key', 169, 170, 'ObjectDefinitionFieldValue'], null), |
|
352
|
283 |
|
new Concatenation('ObjectDefinitionField', [168, 171], 'Field'), |
|
353
|
283 |
|
new Repetition(173, 0, -1, 'Directive', null), |
|
354
|
283 |
|
new Concatenation('ObjectDefinitionFieldValue', ['ValueDefinition', 173], null), |
|
355
|
283 |
|
new Repetition(175, 0, 1, 'Documentation', null), |
|
356
|
283 |
|
new Terminal(176, 'T_INTERFACE', false), |
|
357
|
283 |
|
new Repetition(177, 0, -1, 'Directive', null), |
|
358
|
283 |
|
new Terminal(178, 'T_BRACE_OPEN', false), |
|
359
|
283 |
|
new Repetition(179, 0, -1, 'InterfaceDefinitionBody', null), |
|
360
|
283 |
|
new Terminal(180, 'T_BRACE_CLOSE', false), |
|
361
|
283 |
|
(new Concatenation('InterfaceDefinition', [175, 176, 'Name', 177, 178, 179, 180], 'InterfaceDefinition'))->setDefaultId('InterfaceDefinition'), |
|
362
|
283 |
|
new Terminal(182, 'T_COLON', false), |
|
363
|
283 |
|
new Repetition(183, 0, -1, 'Directive', null), |
|
364
|
283 |
|
new Concatenation(184, ['InterfaceDefinitionFieldKey', 182, 'ValueDefinition', 183], null), |
|
365
|
283 |
|
new Concatenation('InterfaceDefinitionBody', [184], 'Field'), |
|
366
|
283 |
|
new Repetition(186, 0, 1, 'Documentation', null), |
|
367
|
283 |
|
new Repetition(187, 0, 1, 'Arguments', null), |
|
368
|
283 |
|
new Concatenation('InterfaceDefinitionFieldKey', [186, 'Key', 187], null), |
|
369
|
283 |
|
new Repetition(189, 0, 1, 'Documentation', null), |
|
370
|
283 |
|
new Terminal(190, 'T_ENUM', false), |
|
371
|
283 |
|
new Repetition(191, 0, -1, 'Directive', null), |
|
372
|
283 |
|
new Terminal(192, 'T_BRACE_OPEN', false), |
|
373
|
283 |
|
new Repetition(193, 0, -1, 'EnumField', null), |
|
374
|
283 |
|
new Terminal(194, 'T_BRACE_CLOSE', false), |
|
375
|
283 |
|
(new Concatenation('EnumDefinition', [189, 190, 'Name', 191, 192, 193, 194], 'EnumDefinition'))->setDefaultId('EnumDefinition'), |
|
376
|
283 |
|
new Repetition(196, 0, 1, 'Documentation', null), |
|
377
|
283 |
|
new Repetition(197, 0, -1, 'Directive', null), |
|
378
|
283 |
|
new Concatenation(198, ['EnumValue', 197], null), |
|
379
|
283 |
|
new Concatenation('EnumField', [196, 198], 'Value'), |
|
380
|
283 |
|
new Terminal(200, 'T_NAME', true), |
|
381
|
283 |
|
new Alternation(201, [200, 'Keyword'], null), |
|
382
|
283 |
|
new Concatenation('EnumValue', [201], 'Name'), |
|
383
|
283 |
|
new Repetition(203, 0, 1, 'Documentation', null), |
|
384
|
283 |
|
new Terminal(204, 'T_UNION', false), |
|
385
|
283 |
|
new Repetition(205, 0, -1, 'Directive', null), |
|
386
|
283 |
|
new Terminal(206, 'T_EQUAL', false), |
|
387
|
283 |
|
new Concatenation(207, ['UnionBody'], null), |
|
388
|
283 |
|
(new Concatenation('UnionDefinition', [203, 204, 'Name', 205, 206, 207], 'UnionDefinition'))->setDefaultId('UnionDefinition'), |
|
389
|
283 |
|
new Terminal(209, 'T_OR', false), |
|
390
|
283 |
|
new Repetition(210, 0, 1, 209, null), |
|
391
|
283 |
|
new Repetition(211, 1, -1, 'UnionUnitesList', null), |
|
392
|
283 |
|
new Concatenation('UnionBody', [210, 211], 'Relations'), |
|
393
|
283 |
|
new Terminal(213, 'T_OR', false), |
|
394
|
283 |
|
new Concatenation(214, [213, 'Name'], null), |
|
395
|
283 |
|
new Repetition(215, 0, -1, 214, null), |
|
396
|
283 |
|
new Concatenation('UnionUnitesList', ['Name', 215], null), |
|
397
|
283 |
|
new Terminal(217, 'T_PARENTHESIS_OPEN', false), |
|
398
|
283 |
|
new Repetition(218, 0, -1, 'ArgumentPair', null), |
|
399
|
283 |
|
new Terminal(219, 'T_PARENTHESIS_CLOSE', false), |
|
400
|
283 |
|
new Concatenation('Arguments', [217, 218, 219], null), |
|
401
|
283 |
|
new Repetition(221, 0, 1, 'Documentation', null), |
|
402
|
283 |
|
new Terminal(222, 'T_COLON', false), |
|
403
|
283 |
|
new Repetition(223, 0, 1, 'ArgumentDefaultValue', null), |
|
404
|
283 |
|
new Repetition(224, 0, -1, 'Directive', null), |
|
405
|
283 |
|
new Concatenation('ArgumentPair', [221, 'Key', 222, 'ValueDefinition', 223, 224], 'Argument'), |
|
406
|
283 |
|
new Concatenation('ArgumentValue', ['ValueDefinition'], 'Type'), |
|
407
|
283 |
|
new Terminal(227, 'T_EQUAL', false), |
|
408
|
283 |
|
new Concatenation(228, ['Value'], null), |
|
409
|
283 |
|
new Concatenation('ArgumentDefaultValue', [227, 228], null), |
|
410
|
283 |
|
new Terminal(230, 'T_DIRECTIVE_AT', false), |
|
411
|
283 |
|
new Repetition(231, 0, 1, 'DirectiveArguments', null), |
|
412
|
283 |
|
(new Concatenation('Directive', [230, 'Name', 231], 'Directive'))->setDefaultId('Directive'), |
|
413
|
283 |
|
new Terminal(233, 'T_PARENTHESIS_OPEN', false), |
|
414
|
283 |
|
new Repetition(234, 0, -1, 'DirectiveArgumentPair', null), |
|
415
|
283 |
|
new Terminal(235, 'T_PARENTHESIS_CLOSE', false), |
|
416
|
283 |
|
new Concatenation('DirectiveArguments', [233, 234, 235], null), |
|
417
|
283 |
|
new Terminal(237, 'T_COLON', false), |
|
418
|
283 |
|
new Concatenation('DirectiveArgumentPair', ['Key', 237, 'Value'], 'Argument'), |
|
419
|
283 |
|
], static::PARSER_ROOT_RULE, static::PARSER_DELEGATES); |
|
420
|
|
|
} |
|
421
|
|
|
} |
|
422
|
|
|
|