ebnf 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -6
- data/VERSION +1 -1
- data/etc/ebnf.ll1 +122 -268
- data/etc/ebnf.rb +899 -0
- data/etc/turtle.ll1 +61 -733
- data/etc/turtle.rb +56 -559
- data/lib/ebnf/base.rb +2 -2
- data/lib/ebnf/ll1.rb +126 -104
- data/lib/ebnf/ll1/lexer.rb +98 -40
- data/lib/ebnf/ll1/parser.rb +146 -56
- data/lib/ebnf/rule.rb +7 -1
- metadata +23 -3
data/etc/ebnf.rb
ADDED
@@ -0,0 +1,899 @@
|
|
1
|
+
# This file is automatically generated by bin/ebnf
|
2
|
+
# BRANCH derived from etc/ebnf.ebnf
|
3
|
+
module Branch
|
4
|
+
START = :ebnf
|
5
|
+
|
6
|
+
BRANCH = {
|
7
|
+
:_alt_1 => {
|
8
|
+
"(" => [],
|
9
|
+
")" => [],
|
10
|
+
"@pass" => [],
|
11
|
+
"@terminals" => [],
|
12
|
+
"[" => [],
|
13
|
+
"|" => [:_alt_3],
|
14
|
+
:ENUM => [],
|
15
|
+
:HEX => [],
|
16
|
+
:O_ENUM => [],
|
17
|
+
:O_RANGE => [],
|
18
|
+
:RANGE => [],
|
19
|
+
:STRING1 => [],
|
20
|
+
:STRING2 => [],
|
21
|
+
:_empty => [],
|
22
|
+
},
|
23
|
+
:_alt_2 => {
|
24
|
+
"(" => [],
|
25
|
+
"|" => ["|", :seq],
|
26
|
+
:ENUM => [],
|
27
|
+
:HEX => [],
|
28
|
+
:O_ENUM => [],
|
29
|
+
:O_RANGE => [],
|
30
|
+
:RANGE => [],
|
31
|
+
:STRING1 => [],
|
32
|
+
:STRING2 => [],
|
33
|
+
},
|
34
|
+
:_alt_3 => {
|
35
|
+
"(" => [],
|
36
|
+
")" => [],
|
37
|
+
"@pass" => [],
|
38
|
+
"@terminals" => [],
|
39
|
+
"[" => [],
|
40
|
+
"|" => [:_alt_2, :_alt_1],
|
41
|
+
:ENUM => [],
|
42
|
+
:HEX => [],
|
43
|
+
:O_ENUM => [],
|
44
|
+
:O_RANGE => [],
|
45
|
+
:RANGE => [],
|
46
|
+
:STRING1 => [],
|
47
|
+
:STRING2 => [],
|
48
|
+
},
|
49
|
+
:_diff_1 => {
|
50
|
+
"(" => [],
|
51
|
+
"-" => [:_diff_3],
|
52
|
+
:ENUM => [],
|
53
|
+
:HEX => [],
|
54
|
+
:O_ENUM => [],
|
55
|
+
:O_RANGE => [],
|
56
|
+
:RANGE => [],
|
57
|
+
:STRING1 => [],
|
58
|
+
:STRING2 => [],
|
59
|
+
:_empty => [],
|
60
|
+
},
|
61
|
+
:_diff_2 => {
|
62
|
+
"(" => [],
|
63
|
+
"-" => ["-", :postfix],
|
64
|
+
:ENUM => [],
|
65
|
+
:HEX => [],
|
66
|
+
:O_ENUM => [],
|
67
|
+
:O_RANGE => [],
|
68
|
+
:RANGE => [],
|
69
|
+
:STRING1 => [],
|
70
|
+
:STRING2 => [],
|
71
|
+
},
|
72
|
+
:_diff_3 => {
|
73
|
+
"(" => [],
|
74
|
+
"-" => [:_diff_2, :_diff_1],
|
75
|
+
:ENUM => [],
|
76
|
+
:HEX => [],
|
77
|
+
:O_ENUM => [],
|
78
|
+
:O_RANGE => [],
|
79
|
+
:RANGE => [],
|
80
|
+
:STRING1 => [],
|
81
|
+
:STRING2 => [],
|
82
|
+
},
|
83
|
+
:_ebnf_1 => {
|
84
|
+
"(" => [:declaration],
|
85
|
+
"@pass" => [:declaration],
|
86
|
+
"@terminals" => [:declaration],
|
87
|
+
"[" => [:rule],
|
88
|
+
:ENUM => [:declaration],
|
89
|
+
:HEX => [:declaration],
|
90
|
+
:O_ENUM => [:declaration],
|
91
|
+
:O_RANGE => [:declaration],
|
92
|
+
:RANGE => [:declaration],
|
93
|
+
:STRING1 => [:declaration],
|
94
|
+
:STRING2 => [:declaration],
|
95
|
+
},
|
96
|
+
:_ebnf_2 => {
|
97
|
+
"(" => [:_ebnf_1, :ebnf],
|
98
|
+
"@pass" => [:_ebnf_1, :ebnf],
|
99
|
+
"@terminals" => [:_ebnf_1, :ebnf],
|
100
|
+
"[" => [:_ebnf_1, :ebnf],
|
101
|
+
:ENUM => [:_ebnf_1, :ebnf],
|
102
|
+
:HEX => [:_ebnf_1, :ebnf],
|
103
|
+
:O_ENUM => [:_ebnf_1, :ebnf],
|
104
|
+
:O_RANGE => [:_ebnf_1, :ebnf],
|
105
|
+
:RANGE => [:_ebnf_1, :ebnf],
|
106
|
+
:STRING1 => [:_ebnf_1, :ebnf],
|
107
|
+
:STRING2 => [:_ebnf_1, :ebnf],
|
108
|
+
:_eof => [],
|
109
|
+
},
|
110
|
+
:_postfix_1 => {
|
111
|
+
"(" => [],
|
112
|
+
"-" => [],
|
113
|
+
:ENUM => [],
|
114
|
+
:HEX => [],
|
115
|
+
:O_ENUM => [],
|
116
|
+
:O_RANGE => [],
|
117
|
+
:RANGE => [],
|
118
|
+
:STRING1 => [],
|
119
|
+
:STRING2 => [],
|
120
|
+
:_empty => [],
|
121
|
+
:_postfix_2 => [:_postfix_2],
|
122
|
+
},
|
123
|
+
:_primary_1 => {
|
124
|
+
"(" => ["(", :expression, ")"],
|
125
|
+
:ENUM => [],
|
126
|
+
:HEX => [],
|
127
|
+
:O_ENUM => [],
|
128
|
+
:O_RANGE => [],
|
129
|
+
:RANGE => [],
|
130
|
+
:STRING1 => [],
|
131
|
+
:STRING2 => [],
|
132
|
+
:_postfix_2 => [],
|
133
|
+
},
|
134
|
+
:_seq_1 => {
|
135
|
+
"(" => [:_seq_2],
|
136
|
+
")" => [],
|
137
|
+
"-" => [],
|
138
|
+
"@pass" => [],
|
139
|
+
"@terminals" => [],
|
140
|
+
"[" => [],
|
141
|
+
"|" => [],
|
142
|
+
:ENUM => [:_seq_2],
|
143
|
+
:HEX => [:_seq_2],
|
144
|
+
:O_ENUM => [:_seq_2],
|
145
|
+
:O_RANGE => [:_seq_2],
|
146
|
+
:RANGE => [:_seq_2],
|
147
|
+
:STRING1 => [:_seq_2],
|
148
|
+
:STRING2 => [:_seq_2],
|
149
|
+
:_empty => [],
|
150
|
+
:_eof => [],
|
151
|
+
},
|
152
|
+
:_seq_2 => {
|
153
|
+
"(" => [:diff, :_seq_1],
|
154
|
+
")" => [],
|
155
|
+
"-" => [],
|
156
|
+
"@pass" => [],
|
157
|
+
"@terminals" => [],
|
158
|
+
"[" => [],
|
159
|
+
"|" => [],
|
160
|
+
:ENUM => [:diff, :_seq_1],
|
161
|
+
:HEX => [:diff, :_seq_1],
|
162
|
+
:O_ENUM => [:diff, :_seq_1],
|
163
|
+
:O_RANGE => [:diff, :_seq_1],
|
164
|
+
:RANGE => [:diff, :_seq_1],
|
165
|
+
:STRING1 => [:diff, :_seq_1],
|
166
|
+
:STRING2 => [:diff, :_seq_1],
|
167
|
+
:_eof => [],
|
168
|
+
},
|
169
|
+
:alt => {
|
170
|
+
"(" => [:seq, :_alt_1],
|
171
|
+
")" => [],
|
172
|
+
"@pass" => [],
|
173
|
+
"@terminals" => [],
|
174
|
+
"[" => [],
|
175
|
+
:ENUM => [:seq, :_alt_1],
|
176
|
+
:HEX => [:seq, :_alt_1],
|
177
|
+
:O_ENUM => [:seq, :_alt_1],
|
178
|
+
:O_RANGE => [:seq, :_alt_1],
|
179
|
+
:RANGE => [:seq, :_alt_1],
|
180
|
+
:STRING1 => [:seq, :_alt_1],
|
181
|
+
:STRING2 => [:seq, :_alt_1],
|
182
|
+
},
|
183
|
+
:declaration => {
|
184
|
+
"(" => [],
|
185
|
+
"@pass" => ["@pass"],
|
186
|
+
"@terminals" => ["@terminals"],
|
187
|
+
"[" => [],
|
188
|
+
:ENUM => [],
|
189
|
+
:HEX => [],
|
190
|
+
:O_ENUM => [],
|
191
|
+
:O_RANGE => [],
|
192
|
+
:RANGE => [],
|
193
|
+
:STRING1 => [],
|
194
|
+
:STRING2 => [],
|
195
|
+
},
|
196
|
+
:diff => {
|
197
|
+
"(" => [:postfix, :_diff_1],
|
198
|
+
:ENUM => [:postfix, :_diff_1],
|
199
|
+
:HEX => [:postfix, :_diff_1],
|
200
|
+
:O_ENUM => [:postfix, :_diff_1],
|
201
|
+
:O_RANGE => [:postfix, :_diff_1],
|
202
|
+
:RANGE => [:postfix, :_diff_1],
|
203
|
+
:STRING1 => [:postfix, :_diff_1],
|
204
|
+
:STRING2 => [:postfix, :_diff_1],
|
205
|
+
},
|
206
|
+
:ebnf => {
|
207
|
+
"(" => [:_ebnf_2],
|
208
|
+
"@pass" => [:_ebnf_2],
|
209
|
+
"@terminals" => [:_ebnf_2],
|
210
|
+
"[" => [:_ebnf_2],
|
211
|
+
:ENUM => [:_ebnf_2],
|
212
|
+
:HEX => [:_ebnf_2],
|
213
|
+
:O_ENUM => [:_ebnf_2],
|
214
|
+
:O_RANGE => [:_ebnf_2],
|
215
|
+
:RANGE => [:_ebnf_2],
|
216
|
+
:STRING1 => [:_ebnf_2],
|
217
|
+
:STRING2 => [:_ebnf_2],
|
218
|
+
:_empty => [],
|
219
|
+
:_eof => [],
|
220
|
+
},
|
221
|
+
:expression => {
|
222
|
+
"(" => [:alt],
|
223
|
+
")" => [],
|
224
|
+
"@pass" => [],
|
225
|
+
"@terminals" => [],
|
226
|
+
"[" => [],
|
227
|
+
:ENUM => [:alt],
|
228
|
+
:HEX => [:alt],
|
229
|
+
:O_ENUM => [:alt],
|
230
|
+
:O_RANGE => [:alt],
|
231
|
+
:RANGE => [:alt],
|
232
|
+
:STRING1 => [:alt],
|
233
|
+
:STRING2 => [:alt],
|
234
|
+
},
|
235
|
+
:lhs => {
|
236
|
+
"::=" => [],
|
237
|
+
"[" => ["[", :SYMBOL, "]", :SYMBOL],
|
238
|
+
},
|
239
|
+
:postfix => {
|
240
|
+
"(" => [:primary, :_postfix_1],
|
241
|
+
"-" => [],
|
242
|
+
:ENUM => [:primary, :_postfix_1],
|
243
|
+
:HEX => [:primary, :_postfix_1],
|
244
|
+
:O_ENUM => [:primary, :_postfix_1],
|
245
|
+
:O_RANGE => [:primary, :_postfix_1],
|
246
|
+
:RANGE => [:primary, :_postfix_1],
|
247
|
+
:STRING1 => [:primary, :_postfix_1],
|
248
|
+
:STRING2 => [:primary, :_postfix_1],
|
249
|
+
},
|
250
|
+
:primary => {
|
251
|
+
"(" => [:_primary_1],
|
252
|
+
:ENUM => [:ENUM],
|
253
|
+
:HEX => [:HEX],
|
254
|
+
:O_ENUM => [:O_ENUM],
|
255
|
+
:O_RANGE => [:O_RANGE],
|
256
|
+
:RANGE => [:RANGE],
|
257
|
+
:STRING1 => [:STRING1],
|
258
|
+
:STRING2 => [:STRING2],
|
259
|
+
:_postfix_2 => [],
|
260
|
+
},
|
261
|
+
:rule => {
|
262
|
+
"(" => [],
|
263
|
+
"@pass" => [],
|
264
|
+
"@terminals" => [],
|
265
|
+
"[" => [:lhs, "::=", :expression],
|
266
|
+
:ENUM => [],
|
267
|
+
:HEX => [],
|
268
|
+
:O_ENUM => [],
|
269
|
+
:O_RANGE => [],
|
270
|
+
:RANGE => [],
|
271
|
+
:STRING1 => [],
|
272
|
+
:STRING2 => [],
|
273
|
+
},
|
274
|
+
:seq => {
|
275
|
+
"(" => [:diff, :_seq_1],
|
276
|
+
")" => [],
|
277
|
+
"-" => [],
|
278
|
+
"@pass" => [],
|
279
|
+
"@terminals" => [],
|
280
|
+
"[" => [],
|
281
|
+
"|" => [],
|
282
|
+
:ENUM => [:diff, :_seq_1],
|
283
|
+
:HEX => [:diff, :_seq_1],
|
284
|
+
:O_ENUM => [:diff, :_seq_1],
|
285
|
+
:O_RANGE => [:diff, :_seq_1],
|
286
|
+
:RANGE => [:diff, :_seq_1],
|
287
|
+
:STRING1 => [:diff, :_seq_1],
|
288
|
+
:STRING2 => [:diff, :_seq_1],
|
289
|
+
:_eof => [],
|
290
|
+
},
|
291
|
+
}.freeze
|
292
|
+
TERMINALS = [
|
293
|
+
"(",
|
294
|
+
")",
|
295
|
+
"-",
|
296
|
+
"::=",
|
297
|
+
"@pass",
|
298
|
+
"@terminals",
|
299
|
+
"[",
|
300
|
+
"]",
|
301
|
+
"|",
|
302
|
+
:ENUM,
|
303
|
+
:HEX,
|
304
|
+
:O_ENUM,
|
305
|
+
:O_RANGE,
|
306
|
+
:RANGE,
|
307
|
+
:STRING1,
|
308
|
+
:STRING2,
|
309
|
+
:SYMBOL,
|
310
|
+
:_postfix_2
|
311
|
+
].freeze
|
312
|
+
FIRST = {
|
313
|
+
:_alt_1 => [
|
314
|
+
"|",
|
315
|
+
:HEX,
|
316
|
+
:RANGE,
|
317
|
+
:ENUM,
|
318
|
+
:O_RANGE,
|
319
|
+
:O_ENUM,
|
320
|
+
:STRING1,
|
321
|
+
:STRING2,
|
322
|
+
"("],
|
323
|
+
:_alt_2 => [
|
324
|
+
"|"],
|
325
|
+
:_alt_3 => [
|
326
|
+
"|"],
|
327
|
+
:_alt_4 => [
|
328
|
+
"|",
|
329
|
+
:HEX,
|
330
|
+
:RANGE,
|
331
|
+
:ENUM,
|
332
|
+
:O_RANGE,
|
333
|
+
:O_ENUM,
|
334
|
+
:STRING1,
|
335
|
+
:STRING2,
|
336
|
+
"("],
|
337
|
+
:_alt_5 => [
|
338
|
+
"|",
|
339
|
+
:HEX,
|
340
|
+
:RANGE,
|
341
|
+
:ENUM,
|
342
|
+
:O_RANGE,
|
343
|
+
:O_ENUM,
|
344
|
+
:STRING1,
|
345
|
+
:STRING2,
|
346
|
+
"("],
|
347
|
+
:_alt_6 => [
|
348
|
+
:HEX,
|
349
|
+
:RANGE,
|
350
|
+
:ENUM,
|
351
|
+
:O_RANGE,
|
352
|
+
:O_ENUM,
|
353
|
+
:STRING1,
|
354
|
+
:STRING2,
|
355
|
+
"("],
|
356
|
+
:_diff_1 => [
|
357
|
+
"-",
|
358
|
+
:HEX,
|
359
|
+
:RANGE,
|
360
|
+
:ENUM,
|
361
|
+
:O_RANGE,
|
362
|
+
:O_ENUM,
|
363
|
+
:STRING1,
|
364
|
+
:STRING2,
|
365
|
+
"("],
|
366
|
+
:_diff_2 => [
|
367
|
+
"-"],
|
368
|
+
:_diff_3 => [
|
369
|
+
"-"],
|
370
|
+
:_diff_4 => [
|
371
|
+
"-",
|
372
|
+
:HEX,
|
373
|
+
:RANGE,
|
374
|
+
:ENUM,
|
375
|
+
:O_RANGE,
|
376
|
+
:O_ENUM,
|
377
|
+
:STRING1,
|
378
|
+
:STRING2,
|
379
|
+
"("],
|
380
|
+
:_diff_5 => [
|
381
|
+
"-",
|
382
|
+
:HEX,
|
383
|
+
:RANGE,
|
384
|
+
:ENUM,
|
385
|
+
:O_RANGE,
|
386
|
+
:O_ENUM,
|
387
|
+
:STRING1,
|
388
|
+
:STRING2,
|
389
|
+
"("],
|
390
|
+
:_diff_6 => [
|
391
|
+
:HEX,
|
392
|
+
:RANGE,
|
393
|
+
:ENUM,
|
394
|
+
:O_RANGE,
|
395
|
+
:O_ENUM,
|
396
|
+
:STRING1,
|
397
|
+
:STRING2,
|
398
|
+
"("],
|
399
|
+
:_ebnf_1 => [
|
400
|
+
"@terminals",
|
401
|
+
"@pass",
|
402
|
+
"[",
|
403
|
+
:HEX,
|
404
|
+
:RANGE,
|
405
|
+
:ENUM,
|
406
|
+
:O_RANGE,
|
407
|
+
:O_ENUM,
|
408
|
+
:STRING1,
|
409
|
+
:STRING2,
|
410
|
+
"("],
|
411
|
+
:_ebnf_2 => [
|
412
|
+
"@terminals",
|
413
|
+
"@pass",
|
414
|
+
"[",
|
415
|
+
:HEX,
|
416
|
+
:RANGE,
|
417
|
+
:ENUM,
|
418
|
+
:O_RANGE,
|
419
|
+
:O_ENUM,
|
420
|
+
:STRING1,
|
421
|
+
:STRING2,
|
422
|
+
"("],
|
423
|
+
:_ebnf_3 => [
|
424
|
+
"@terminals",
|
425
|
+
"@pass",
|
426
|
+
"[",
|
427
|
+
:HEX,
|
428
|
+
:RANGE,
|
429
|
+
:ENUM,
|
430
|
+
:O_RANGE,
|
431
|
+
:O_ENUM,
|
432
|
+
:STRING1,
|
433
|
+
:STRING2,
|
434
|
+
"("],
|
435
|
+
:_empty => [
|
436
|
+
],
|
437
|
+
:_lhs_1 => [
|
438
|
+
:SYMBOL],
|
439
|
+
:_lhs_2 => [
|
440
|
+
"]"],
|
441
|
+
:_lhs_3 => [
|
442
|
+
:SYMBOL],
|
443
|
+
:_postfix_1 => [
|
444
|
+
:_postfix_2,
|
445
|
+
:HEX,
|
446
|
+
:RANGE,
|
447
|
+
:ENUM,
|
448
|
+
:O_RANGE,
|
449
|
+
:O_ENUM,
|
450
|
+
:STRING1,
|
451
|
+
:STRING2,
|
452
|
+
"("],
|
453
|
+
:_postfix_3 => [
|
454
|
+
:_postfix_2,
|
455
|
+
:HEX,
|
456
|
+
:RANGE,
|
457
|
+
:ENUM,
|
458
|
+
:O_RANGE,
|
459
|
+
:O_ENUM,
|
460
|
+
:STRING1,
|
461
|
+
:STRING2,
|
462
|
+
"("],
|
463
|
+
:_primary_1 => [
|
464
|
+
"("],
|
465
|
+
:_primary_2 => [
|
466
|
+
:HEX,
|
467
|
+
:RANGE,
|
468
|
+
:ENUM,
|
469
|
+
:O_RANGE,
|
470
|
+
:O_ENUM,
|
471
|
+
:STRING1,
|
472
|
+
:STRING2,
|
473
|
+
"("],
|
474
|
+
:_primary_3 => [
|
475
|
+
")"],
|
476
|
+
:_rule_1 => [
|
477
|
+
"::="],
|
478
|
+
:_rule_2 => [
|
479
|
+
:HEX,
|
480
|
+
:RANGE,
|
481
|
+
:ENUM,
|
482
|
+
:O_RANGE,
|
483
|
+
:O_ENUM,
|
484
|
+
:STRING1,
|
485
|
+
:STRING2,
|
486
|
+
"("],
|
487
|
+
:_seq_1 => [
|
488
|
+
:HEX,
|
489
|
+
:RANGE,
|
490
|
+
:ENUM,
|
491
|
+
:O_RANGE,
|
492
|
+
:O_ENUM,
|
493
|
+
:STRING1,
|
494
|
+
:STRING2,
|
495
|
+
"("],
|
496
|
+
:_seq_2 => [
|
497
|
+
:HEX,
|
498
|
+
:RANGE,
|
499
|
+
:ENUM,
|
500
|
+
:O_RANGE,
|
501
|
+
:O_ENUM,
|
502
|
+
:STRING1,
|
503
|
+
:STRING2,
|
504
|
+
"("],
|
505
|
+
:_seq_3 => [
|
506
|
+
:HEX,
|
507
|
+
:RANGE,
|
508
|
+
:ENUM,
|
509
|
+
:O_RANGE,
|
510
|
+
:O_ENUM,
|
511
|
+
:STRING1,
|
512
|
+
:STRING2,
|
513
|
+
"("],
|
514
|
+
:_seq_4 => [
|
515
|
+
:HEX,
|
516
|
+
:RANGE,
|
517
|
+
:ENUM,
|
518
|
+
:O_RANGE,
|
519
|
+
:O_ENUM,
|
520
|
+
:STRING1,
|
521
|
+
:STRING2,
|
522
|
+
"("],
|
523
|
+
:alt => [
|
524
|
+
:HEX,
|
525
|
+
:RANGE,
|
526
|
+
:ENUM,
|
527
|
+
:O_RANGE,
|
528
|
+
:O_ENUM,
|
529
|
+
:STRING1,
|
530
|
+
:STRING2,
|
531
|
+
"("],
|
532
|
+
:declaration => [
|
533
|
+
"@terminals",
|
534
|
+
"@pass",
|
535
|
+
:HEX,
|
536
|
+
:RANGE,
|
537
|
+
:ENUM,
|
538
|
+
:O_RANGE,
|
539
|
+
:O_ENUM,
|
540
|
+
:STRING1,
|
541
|
+
:STRING2,
|
542
|
+
"("],
|
543
|
+
:diff => [
|
544
|
+
:HEX,
|
545
|
+
:RANGE,
|
546
|
+
:ENUM,
|
547
|
+
:O_RANGE,
|
548
|
+
:O_ENUM,
|
549
|
+
:STRING1,
|
550
|
+
:STRING2,
|
551
|
+
"("],
|
552
|
+
:ebnf => [
|
553
|
+
"@terminals",
|
554
|
+
"@pass",
|
555
|
+
"[",
|
556
|
+
:HEX,
|
557
|
+
:RANGE,
|
558
|
+
:ENUM,
|
559
|
+
:O_RANGE,
|
560
|
+
:O_ENUM,
|
561
|
+
:STRING1,
|
562
|
+
:STRING2,
|
563
|
+
"("],
|
564
|
+
:expression => [
|
565
|
+
:HEX,
|
566
|
+
:RANGE,
|
567
|
+
:ENUM,
|
568
|
+
:O_RANGE,
|
569
|
+
:O_ENUM,
|
570
|
+
:STRING1,
|
571
|
+
:STRING2,
|
572
|
+
"("],
|
573
|
+
:lhs => [
|
574
|
+
"["],
|
575
|
+
:postfix => [
|
576
|
+
:HEX,
|
577
|
+
:RANGE,
|
578
|
+
:ENUM,
|
579
|
+
:O_RANGE,
|
580
|
+
:O_ENUM,
|
581
|
+
:STRING1,
|
582
|
+
:STRING2,
|
583
|
+
"("],
|
584
|
+
:primary => [
|
585
|
+
:HEX,
|
586
|
+
:RANGE,
|
587
|
+
:ENUM,
|
588
|
+
:O_RANGE,
|
589
|
+
:O_ENUM,
|
590
|
+
:STRING1,
|
591
|
+
:STRING2,
|
592
|
+
"("],
|
593
|
+
:rule => [
|
594
|
+
"["],
|
595
|
+
:seq => [
|
596
|
+
:HEX,
|
597
|
+
:RANGE,
|
598
|
+
:ENUM,
|
599
|
+
:O_RANGE,
|
600
|
+
:O_ENUM,
|
601
|
+
:STRING1,
|
602
|
+
:STRING2,
|
603
|
+
"("],
|
604
|
+
}.freeze
|
605
|
+
FOLLOW = {
|
606
|
+
:_alt_1 => [
|
607
|
+
"|",
|
608
|
+
:HEX,
|
609
|
+
:RANGE,
|
610
|
+
:ENUM,
|
611
|
+
:O_RANGE,
|
612
|
+
:O_ENUM,
|
613
|
+
:STRING1,
|
614
|
+
:STRING2,
|
615
|
+
"("],
|
616
|
+
:_alt_2 => [
|
617
|
+
"|"],
|
618
|
+
:_alt_3 => [
|
619
|
+
"|"],
|
620
|
+
:_alt_4 => [
|
621
|
+
"|",
|
622
|
+
:HEX,
|
623
|
+
:RANGE,
|
624
|
+
:ENUM,
|
625
|
+
:O_RANGE,
|
626
|
+
:O_ENUM,
|
627
|
+
:STRING1,
|
628
|
+
:STRING2,
|
629
|
+
"("],
|
630
|
+
:_alt_5 => [
|
631
|
+
"|",
|
632
|
+
:HEX,
|
633
|
+
:RANGE,
|
634
|
+
:ENUM,
|
635
|
+
:O_RANGE,
|
636
|
+
:O_ENUM,
|
637
|
+
:STRING1,
|
638
|
+
:STRING2,
|
639
|
+
"("],
|
640
|
+
:_alt_6 => [
|
641
|
+
:HEX,
|
642
|
+
:RANGE,
|
643
|
+
:ENUM,
|
644
|
+
:O_RANGE,
|
645
|
+
:O_ENUM,
|
646
|
+
:STRING1,
|
647
|
+
:STRING2,
|
648
|
+
"("],
|
649
|
+
:_diff_1 => [
|
650
|
+
"-",
|
651
|
+
:HEX,
|
652
|
+
:RANGE,
|
653
|
+
:ENUM,
|
654
|
+
:O_RANGE,
|
655
|
+
:O_ENUM,
|
656
|
+
:STRING1,
|
657
|
+
:STRING2,
|
658
|
+
"("],
|
659
|
+
:_diff_2 => [
|
660
|
+
"-"],
|
661
|
+
:_diff_3 => [
|
662
|
+
"-"],
|
663
|
+
:_diff_4 => [
|
664
|
+
"-",
|
665
|
+
:HEX,
|
666
|
+
:RANGE,
|
667
|
+
:ENUM,
|
668
|
+
:O_RANGE,
|
669
|
+
:O_ENUM,
|
670
|
+
:STRING1,
|
671
|
+
:STRING2,
|
672
|
+
"("],
|
673
|
+
:_diff_5 => [
|
674
|
+
"-",
|
675
|
+
:HEX,
|
676
|
+
:RANGE,
|
677
|
+
:ENUM,
|
678
|
+
:O_RANGE,
|
679
|
+
:O_ENUM,
|
680
|
+
:STRING1,
|
681
|
+
:STRING2,
|
682
|
+
"("],
|
683
|
+
:_diff_6 => [
|
684
|
+
:HEX,
|
685
|
+
:RANGE,
|
686
|
+
:ENUM,
|
687
|
+
:O_RANGE,
|
688
|
+
:O_ENUM,
|
689
|
+
:STRING1,
|
690
|
+
:STRING2,
|
691
|
+
"("],
|
692
|
+
:_ebnf_1 => [
|
693
|
+
"@terminals",
|
694
|
+
"@pass",
|
695
|
+
"[",
|
696
|
+
:HEX,
|
697
|
+
:RANGE,
|
698
|
+
:ENUM,
|
699
|
+
:O_RANGE,
|
700
|
+
:O_ENUM,
|
701
|
+
:STRING1,
|
702
|
+
:STRING2,
|
703
|
+
"("],
|
704
|
+
:_ebnf_2 => [
|
705
|
+
"@terminals",
|
706
|
+
"@pass",
|
707
|
+
"[",
|
708
|
+
:HEX,
|
709
|
+
:RANGE,
|
710
|
+
:ENUM,
|
711
|
+
:O_RANGE,
|
712
|
+
:O_ENUM,
|
713
|
+
:STRING1,
|
714
|
+
:STRING2,
|
715
|
+
"("],
|
716
|
+
:_ebnf_3 => [
|
717
|
+
"@terminals",
|
718
|
+
"@pass",
|
719
|
+
"[",
|
720
|
+
:HEX,
|
721
|
+
:RANGE,
|
722
|
+
:ENUM,
|
723
|
+
:O_RANGE,
|
724
|
+
:O_ENUM,
|
725
|
+
:STRING1,
|
726
|
+
:STRING2,
|
727
|
+
"("],
|
728
|
+
:_empty => [
|
729
|
+
],
|
730
|
+
:_lhs_1 => [
|
731
|
+
:SYMBOL],
|
732
|
+
:_lhs_2 => [
|
733
|
+
"]"],
|
734
|
+
:_lhs_3 => [
|
735
|
+
:SYMBOL],
|
736
|
+
:_postfix_1 => [
|
737
|
+
:_postfix_2,
|
738
|
+
:HEX,
|
739
|
+
:RANGE,
|
740
|
+
:ENUM,
|
741
|
+
:O_RANGE,
|
742
|
+
:O_ENUM,
|
743
|
+
:STRING1,
|
744
|
+
:STRING2,
|
745
|
+
"("],
|
746
|
+
:_postfix_3 => [
|
747
|
+
:_postfix_2,
|
748
|
+
:HEX,
|
749
|
+
:RANGE,
|
750
|
+
:ENUM,
|
751
|
+
:O_RANGE,
|
752
|
+
:O_ENUM,
|
753
|
+
:STRING1,
|
754
|
+
:STRING2,
|
755
|
+
"("],
|
756
|
+
:_primary_1 => [
|
757
|
+
"("],
|
758
|
+
:_primary_2 => [
|
759
|
+
:HEX,
|
760
|
+
:RANGE,
|
761
|
+
:ENUM,
|
762
|
+
:O_RANGE,
|
763
|
+
:O_ENUM,
|
764
|
+
:STRING1,
|
765
|
+
:STRING2,
|
766
|
+
"("],
|
767
|
+
:_primary_3 => [
|
768
|
+
")"],
|
769
|
+
:_rule_1 => [
|
770
|
+
"::="],
|
771
|
+
:_rule_2 => [
|
772
|
+
:HEX,
|
773
|
+
:RANGE,
|
774
|
+
:ENUM,
|
775
|
+
:O_RANGE,
|
776
|
+
:O_ENUM,
|
777
|
+
:STRING1,
|
778
|
+
:STRING2,
|
779
|
+
"("],
|
780
|
+
:_seq_1 => [
|
781
|
+
:HEX,
|
782
|
+
:RANGE,
|
783
|
+
:ENUM,
|
784
|
+
:O_RANGE,
|
785
|
+
:O_ENUM,
|
786
|
+
:STRING1,
|
787
|
+
:STRING2,
|
788
|
+
"("],
|
789
|
+
:_seq_2 => [
|
790
|
+
:HEX,
|
791
|
+
:RANGE,
|
792
|
+
:ENUM,
|
793
|
+
:O_RANGE,
|
794
|
+
:O_ENUM,
|
795
|
+
:STRING1,
|
796
|
+
:STRING2,
|
797
|
+
"("],
|
798
|
+
:_seq_3 => [
|
799
|
+
:HEX,
|
800
|
+
:RANGE,
|
801
|
+
:ENUM,
|
802
|
+
:O_RANGE,
|
803
|
+
:O_ENUM,
|
804
|
+
:STRING1,
|
805
|
+
:STRING2,
|
806
|
+
"("],
|
807
|
+
:_seq_4 => [
|
808
|
+
:HEX,
|
809
|
+
:RANGE,
|
810
|
+
:ENUM,
|
811
|
+
:O_RANGE,
|
812
|
+
:O_ENUM,
|
813
|
+
:STRING1,
|
814
|
+
:STRING2,
|
815
|
+
"("],
|
816
|
+
:alt => [
|
817
|
+
:HEX,
|
818
|
+
:RANGE,
|
819
|
+
:ENUM,
|
820
|
+
:O_RANGE,
|
821
|
+
:O_ENUM,
|
822
|
+
:STRING1,
|
823
|
+
:STRING2,
|
824
|
+
"("],
|
825
|
+
:declaration => [
|
826
|
+
"@terminals",
|
827
|
+
"@pass",
|
828
|
+
:HEX,
|
829
|
+
:RANGE,
|
830
|
+
:ENUM,
|
831
|
+
:O_RANGE,
|
832
|
+
:O_ENUM,
|
833
|
+
:STRING1,
|
834
|
+
:STRING2,
|
835
|
+
"("],
|
836
|
+
:diff => [
|
837
|
+
:HEX,
|
838
|
+
:RANGE,
|
839
|
+
:ENUM,
|
840
|
+
:O_RANGE,
|
841
|
+
:O_ENUM,
|
842
|
+
:STRING1,
|
843
|
+
:STRING2,
|
844
|
+
"("],
|
845
|
+
:ebnf => [
|
846
|
+
"@terminals",
|
847
|
+
"@pass",
|
848
|
+
"[",
|
849
|
+
:HEX,
|
850
|
+
:RANGE,
|
851
|
+
:ENUM,
|
852
|
+
:O_RANGE,
|
853
|
+
:O_ENUM,
|
854
|
+
:STRING1,
|
855
|
+
:STRING2,
|
856
|
+
"("],
|
857
|
+
:expression => [
|
858
|
+
:HEX,
|
859
|
+
:RANGE,
|
860
|
+
:ENUM,
|
861
|
+
:O_RANGE,
|
862
|
+
:O_ENUM,
|
863
|
+
:STRING1,
|
864
|
+
:STRING2,
|
865
|
+
"("],
|
866
|
+
:lhs => [
|
867
|
+
"["],
|
868
|
+
:postfix => [
|
869
|
+
:HEX,
|
870
|
+
:RANGE,
|
871
|
+
:ENUM,
|
872
|
+
:O_RANGE,
|
873
|
+
:O_ENUM,
|
874
|
+
:STRING1,
|
875
|
+
:STRING2,
|
876
|
+
"("],
|
877
|
+
:primary => [
|
878
|
+
:HEX,
|
879
|
+
:RANGE,
|
880
|
+
:ENUM,
|
881
|
+
:O_RANGE,
|
882
|
+
:O_ENUM,
|
883
|
+
:STRING1,
|
884
|
+
:STRING2,
|
885
|
+
"("],
|
886
|
+
:rule => [
|
887
|
+
"["],
|
888
|
+
:seq => [
|
889
|
+
:HEX,
|
890
|
+
:RANGE,
|
891
|
+
:ENUM,
|
892
|
+
:O_RANGE,
|
893
|
+
:O_ENUM,
|
894
|
+
:STRING1,
|
895
|
+
:STRING2,
|
896
|
+
"("],
|
897
|
+
}.freeze
|
898
|
+
end
|
899
|
+
|