ebnf 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +81 -36
- data/VERSION +1 -1
- data/bin/ebnf +34 -18
- data/etc/abnf-core.ebnf +52 -0
- data/etc/abnf.abnf +121 -0
- data/etc/abnf.ebnf +124 -0
- data/etc/abnf.sxp +45 -0
- data/etc/ebnf.ebnf +19 -25
- data/etc/ebnf.html +251 -206
- data/etc/ebnf.ll1.rb +27 -103
- data/etc/ebnf.ll1.sxp +105 -102
- data/etc/ebnf.peg.rb +54 -62
- data/etc/ebnf.peg.sxp +53 -62
- data/etc/ebnf.sxp +22 -19
- data/etc/iso-ebnf.ebnf +140 -0
- data/etc/iso-ebnf.isoebnf +138 -0
- data/etc/iso-ebnf.sxp +65 -0
- data/etc/sparql.ebnf +4 -4
- data/etc/sparql.sxp +8 -7
- data/etc/turtle.ebnf +3 -3
- data/etc/turtle.sxp +22 -20
- data/lib/ebnf.rb +3 -0
- data/lib/ebnf/abnf.rb +301 -0
- data/lib/ebnf/abnf/core.rb +23 -0
- data/lib/ebnf/abnf/meta.rb +111 -0
- data/lib/ebnf/base.rb +87 -44
- data/lib/ebnf/ebnf/meta.rb +90 -0
- data/lib/ebnf/isoebnf.rb +229 -0
- data/lib/ebnf/isoebnf/meta.rb +75 -0
- data/lib/ebnf/ll1.rb +4 -7
- data/lib/ebnf/ll1/parser.rb +12 -4
- data/lib/ebnf/native.rb +320 -0
- data/lib/ebnf/parser.rb +285 -302
- data/lib/ebnf/peg.rb +1 -1
- data/lib/ebnf/peg/parser.rb +24 -5
- data/lib/ebnf/peg/rule.rb +77 -58
- data/lib/ebnf/rule.rb +352 -121
- data/lib/ebnf/terminals.rb +13 -10
- data/lib/ebnf/writer.rb +550 -78
- metadata +48 -6
data/etc/ebnf.ll1.rb
CHANGED
@@ -5,9 +5,7 @@ module Meta
|
|
5
5
|
BRANCH = {
|
6
6
|
:alt => {
|
7
7
|
"(" => [:seq, :_alt_1],
|
8
|
-
:ENUM => [:seq, :_alt_1],
|
9
8
|
:HEX => [:seq, :_alt_1],
|
10
|
-
:O_ENUM => [:seq, :_alt_1],
|
11
9
|
:O_RANGE => [:seq, :_alt_1],
|
12
10
|
:RANGE => [:seq, :_alt_1],
|
13
11
|
:STRING1 => [:seq, :_alt_1],
|
@@ -33,9 +31,7 @@ module Meta
|
|
33
31
|
},
|
34
32
|
:diff => {
|
35
33
|
"(" => [:postfix, :_diff_1],
|
36
|
-
:ENUM => [:postfix, :_diff_1],
|
37
34
|
:HEX => [:postfix, :_diff_1],
|
38
|
-
:O_ENUM => [:postfix, :_diff_1],
|
39
35
|
:O_RANGE => [:postfix, :_diff_1],
|
40
36
|
:RANGE => [:postfix, :_diff_1],
|
41
37
|
:STRING1 => [:postfix, :_diff_1],
|
@@ -48,10 +44,8 @@ module Meta
|
|
48
44
|
"-" => [:_diff_2],
|
49
45
|
"@pass" => [],
|
50
46
|
"@terminals" => [],
|
51
|
-
:ENUM => [],
|
52
47
|
:HEX => [],
|
53
48
|
:LHS => [],
|
54
|
-
:O_ENUM => [],
|
55
49
|
:O_RANGE => [],
|
56
50
|
:RANGE => [],
|
57
51
|
:STRING1 => [],
|
@@ -79,9 +73,7 @@ module Meta
|
|
79
73
|
},
|
80
74
|
:expression => {
|
81
75
|
"(" => [:alt],
|
82
|
-
:ENUM => [:alt],
|
83
76
|
:HEX => [:alt],
|
84
|
-
:O_ENUM => [:alt],
|
85
77
|
:O_RANGE => [:alt],
|
86
78
|
:RANGE => [:alt],
|
87
79
|
:STRING1 => [:alt],
|
@@ -93,9 +85,7 @@ module Meta
|
|
93
85
|
},
|
94
86
|
:postfix => {
|
95
87
|
"(" => [:primary, :_postfix_1],
|
96
|
-
:ENUM => [:primary, :_postfix_1],
|
97
88
|
:HEX => [:primary, :_postfix_1],
|
98
|
-
:O_ENUM => [:primary, :_postfix_1],
|
99
89
|
:O_RANGE => [:primary, :_postfix_1],
|
100
90
|
:RANGE => [:primary, :_postfix_1],
|
101
91
|
:STRING1 => [:primary, :_postfix_1],
|
@@ -108,10 +98,8 @@ module Meta
|
|
108
98
|
"-" => [],
|
109
99
|
"@pass" => [],
|
110
100
|
"@terminals" => [],
|
111
|
-
:ENUM => [],
|
112
101
|
:HEX => [],
|
113
102
|
:LHS => [],
|
114
|
-
:O_ENUM => [],
|
115
103
|
:O_RANGE => [],
|
116
104
|
:POSTFIX => [:POSTFIX],
|
117
105
|
:RANGE => [],
|
@@ -122,9 +110,7 @@ module Meta
|
|
122
110
|
},
|
123
111
|
:primary => {
|
124
112
|
"(" => [:_primary_1],
|
125
|
-
:ENUM => [:ENUM],
|
126
113
|
:HEX => [:HEX],
|
127
|
-
:O_ENUM => [:O_ENUM],
|
128
114
|
:O_RANGE => [:O_RANGE],
|
129
115
|
:RANGE => [:RANGE],
|
130
116
|
:STRING1 => [:STRING1],
|
@@ -139,9 +125,7 @@ module Meta
|
|
139
125
|
},
|
140
126
|
:seq => {
|
141
127
|
"(" => [:diff, :_seq_1],
|
142
|
-
:ENUM => [:diff, :_seq_1],
|
143
128
|
:HEX => [:diff, :_seq_1],
|
144
|
-
:O_ENUM => [:diff, :_seq_1],
|
145
129
|
:O_RANGE => [:diff, :_seq_1],
|
146
130
|
:RANGE => [:diff, :_seq_1],
|
147
131
|
:STRING1 => [:diff, :_seq_1],
|
@@ -153,10 +137,8 @@ module Meta
|
|
153
137
|
")" => [],
|
154
138
|
"@pass" => [],
|
155
139
|
"@terminals" => [],
|
156
|
-
:ENUM => [:_seq_2],
|
157
140
|
:HEX => [:_seq_2],
|
158
141
|
:LHS => [],
|
159
|
-
:O_ENUM => [:_seq_2],
|
160
142
|
:O_RANGE => [:_seq_2],
|
161
143
|
:RANGE => [:_seq_2],
|
162
144
|
:STRING1 => [:_seq_2],
|
@@ -166,9 +148,7 @@ module Meta
|
|
166
148
|
},
|
167
149
|
:_seq_2 => {
|
168
150
|
"(" => [:diff, :_seq_1],
|
169
|
-
:ENUM => [:diff, :_seq_1],
|
170
151
|
:HEX => [:diff, :_seq_1],
|
171
|
-
:O_ENUM => [:diff, :_seq_1],
|
172
152
|
:O_RANGE => [:diff, :_seq_1],
|
173
153
|
:RANGE => [:diff, :_seq_1],
|
174
154
|
:STRING1 => [:diff, :_seq_1],
|
@@ -182,10 +162,8 @@ module Meta
|
|
182
162
|
"-",
|
183
163
|
"@pass",
|
184
164
|
"@terminals",
|
185
|
-
:ENUM,
|
186
165
|
:HEX,
|
187
166
|
:LHS,
|
188
|
-
:O_ENUM,
|
189
167
|
:O_RANGE,
|
190
168
|
:POSTFIX,
|
191
169
|
:RANGE,
|
@@ -198,10 +176,8 @@ module Meta
|
|
198
176
|
:alt => [
|
199
177
|
:HEX,
|
200
178
|
:SYMBOL,
|
201
|
-
:ENUM,
|
202
|
-
:O_ENUM,
|
203
|
-
:RANGE,
|
204
179
|
:O_RANGE,
|
180
|
+
:RANGE,
|
205
181
|
:STRING1,
|
206
182
|
:STRING2,
|
207
183
|
"("],
|
@@ -221,10 +197,8 @@ module Meta
|
|
221
197
|
:_alt_6 => [
|
222
198
|
:HEX,
|
223
199
|
:SYMBOL,
|
224
|
-
:ENUM,
|
225
|
-
:O_ENUM,
|
226
|
-
:RANGE,
|
227
200
|
:O_RANGE,
|
201
|
+
:RANGE,
|
228
202
|
:STRING1,
|
229
203
|
:STRING2,
|
230
204
|
"("],
|
@@ -234,10 +208,8 @@ module Meta
|
|
234
208
|
:diff => [
|
235
209
|
:HEX,
|
236
210
|
:SYMBOL,
|
237
|
-
:ENUM,
|
238
|
-
:O_ENUM,
|
239
|
-
:RANGE,
|
240
211
|
:O_RANGE,
|
212
|
+
:RANGE,
|
241
213
|
:STRING1,
|
242
214
|
:STRING2,
|
243
215
|
"("],
|
@@ -252,10 +224,8 @@ module Meta
|
|
252
224
|
:_diff_4 => [
|
253
225
|
:HEX,
|
254
226
|
:SYMBOL,
|
255
|
-
:ENUM,
|
256
|
-
:O_ENUM,
|
257
|
-
:RANGE,
|
258
227
|
:O_RANGE,
|
228
|
+
:RANGE,
|
259
229
|
:STRING1,
|
260
230
|
:STRING2,
|
261
231
|
"("],
|
@@ -282,10 +252,8 @@ module Meta
|
|
282
252
|
:expression => [
|
283
253
|
:HEX,
|
284
254
|
:SYMBOL,
|
285
|
-
:ENUM,
|
286
|
-
:O_ENUM,
|
287
|
-
:RANGE,
|
288
255
|
:O_RANGE,
|
256
|
+
:RANGE,
|
289
257
|
:STRING1,
|
290
258
|
:STRING2,
|
291
259
|
"("],
|
@@ -294,20 +262,16 @@ module Meta
|
|
294
262
|
:_pass_1 => [
|
295
263
|
:HEX,
|
296
264
|
:SYMBOL,
|
297
|
-
:ENUM,
|
298
|
-
:O_ENUM,
|
299
|
-
:RANGE,
|
300
265
|
:O_RANGE,
|
266
|
+
:RANGE,
|
301
267
|
:STRING1,
|
302
268
|
:STRING2,
|
303
269
|
"("],
|
304
270
|
:postfix => [
|
305
271
|
:HEX,
|
306
272
|
:SYMBOL,
|
307
|
-
:ENUM,
|
308
|
-
:O_ENUM,
|
309
|
-
:RANGE,
|
310
273
|
:O_RANGE,
|
274
|
+
:RANGE,
|
311
275
|
:STRING1,
|
312
276
|
:STRING2,
|
313
277
|
"("],
|
@@ -320,10 +284,8 @@ module Meta
|
|
320
284
|
:primary => [
|
321
285
|
:HEX,
|
322
286
|
:SYMBOL,
|
323
|
-
:ENUM,
|
324
|
-
:O_ENUM,
|
325
|
-
:RANGE,
|
326
287
|
:O_RANGE,
|
288
|
+
:RANGE,
|
327
289
|
:STRING1,
|
328
290
|
:STRING2,
|
329
291
|
"("],
|
@@ -332,10 +294,8 @@ module Meta
|
|
332
294
|
:_primary_2 => [
|
333
295
|
:HEX,
|
334
296
|
:SYMBOL,
|
335
|
-
:ENUM,
|
336
|
-
:O_ENUM,
|
337
|
-
:RANGE,
|
338
297
|
:O_RANGE,
|
298
|
+
:RANGE,
|
339
299
|
:STRING1,
|
340
300
|
:STRING2,
|
341
301
|
"("],
|
@@ -346,20 +306,16 @@ module Meta
|
|
346
306
|
:_rule_1 => [
|
347
307
|
:HEX,
|
348
308
|
:SYMBOL,
|
349
|
-
:ENUM,
|
350
|
-
:O_ENUM,
|
351
|
-
:RANGE,
|
352
309
|
:O_RANGE,
|
310
|
+
:RANGE,
|
353
311
|
:STRING1,
|
354
312
|
:STRING2,
|
355
313
|
"("],
|
356
314
|
:seq => [
|
357
315
|
:HEX,
|
358
316
|
:SYMBOL,
|
359
|
-
:ENUM,
|
360
|
-
:O_ENUM,
|
361
|
-
:RANGE,
|
362
317
|
:O_RANGE,
|
318
|
+
:RANGE,
|
363
319
|
:STRING1,
|
364
320
|
:STRING2,
|
365
321
|
"("],
|
@@ -367,20 +323,16 @@ module Meta
|
|
367
323
|
:_eps,
|
368
324
|
:HEX,
|
369
325
|
:SYMBOL,
|
370
|
-
:ENUM,
|
371
|
-
:O_ENUM,
|
372
|
-
:RANGE,
|
373
326
|
:O_RANGE,
|
327
|
+
:RANGE,
|
374
328
|
:STRING1,
|
375
329
|
:STRING2,
|
376
330
|
"("],
|
377
331
|
:_seq_2 => [
|
378
332
|
:HEX,
|
379
333
|
:SYMBOL,
|
380
|
-
:ENUM,
|
381
|
-
:O_ENUM,
|
382
|
-
:RANGE,
|
383
334
|
:O_RANGE,
|
335
|
+
:RANGE,
|
384
336
|
:STRING1,
|
385
337
|
:STRING2,
|
386
338
|
"("],
|
@@ -388,10 +340,8 @@ module Meta
|
|
388
340
|
:_eps,
|
389
341
|
:HEX,
|
390
342
|
:SYMBOL,
|
391
|
-
:ENUM,
|
392
|
-
:O_ENUM,
|
393
|
-
:RANGE,
|
394
343
|
:O_RANGE,
|
344
|
+
:RANGE,
|
395
345
|
:STRING1,
|
396
346
|
:STRING2,
|
397
347
|
"("],
|
@@ -399,10 +349,8 @@ module Meta
|
|
399
349
|
:_eps,
|
400
350
|
:HEX,
|
401
351
|
:SYMBOL,
|
402
|
-
:ENUM,
|
403
|
-
:O_ENUM,
|
404
|
-
:RANGE,
|
405
352
|
:O_RANGE,
|
353
|
+
:RANGE,
|
406
354
|
:STRING1,
|
407
355
|
:STRING2,
|
408
356
|
"("],
|
@@ -463,10 +411,8 @@ module Meta
|
|
463
411
|
:_eof,
|
464
412
|
:HEX,
|
465
413
|
:SYMBOL,
|
466
|
-
:ENUM,
|
467
|
-
:O_ENUM,
|
468
|
-
:RANGE,
|
469
414
|
:O_RANGE,
|
415
|
+
:RANGE,
|
470
416
|
:STRING1,
|
471
417
|
:STRING2,
|
472
418
|
"@terminals",
|
@@ -479,10 +425,8 @@ module Meta
|
|
479
425
|
:_eof,
|
480
426
|
:HEX,
|
481
427
|
:SYMBOL,
|
482
|
-
:ENUM,
|
483
|
-
:O_ENUM,
|
484
|
-
:RANGE,
|
485
428
|
:O_RANGE,
|
429
|
+
:RANGE,
|
486
430
|
:STRING1,
|
487
431
|
:STRING2,
|
488
432
|
"@terminals",
|
@@ -495,10 +439,8 @@ module Meta
|
|
495
439
|
:_eof,
|
496
440
|
:HEX,
|
497
441
|
:SYMBOL,
|
498
|
-
:ENUM,
|
499
|
-
:O_ENUM,
|
500
|
-
:RANGE,
|
501
442
|
:O_RANGE,
|
443
|
+
:RANGE,
|
502
444
|
:STRING1,
|
503
445
|
:STRING2,
|
504
446
|
"@terminals",
|
@@ -511,10 +453,8 @@ module Meta
|
|
511
453
|
:_eof,
|
512
454
|
:HEX,
|
513
455
|
:SYMBOL,
|
514
|
-
:ENUM,
|
515
|
-
:O_ENUM,
|
516
|
-
:RANGE,
|
517
456
|
:O_RANGE,
|
457
|
+
:RANGE,
|
518
458
|
:STRING1,
|
519
459
|
:STRING2,
|
520
460
|
"@terminals",
|
@@ -527,10 +467,8 @@ module Meta
|
|
527
467
|
:_eof,
|
528
468
|
:HEX,
|
529
469
|
:SYMBOL,
|
530
|
-
:ENUM,
|
531
|
-
:O_ENUM,
|
532
|
-
:RANGE,
|
533
470
|
:O_RANGE,
|
471
|
+
:RANGE,
|
534
472
|
:STRING1,
|
535
473
|
:STRING2,
|
536
474
|
"@terminals",
|
@@ -571,10 +509,8 @@ module Meta
|
|
571
509
|
:_eof,
|
572
510
|
:HEX,
|
573
511
|
:SYMBOL,
|
574
|
-
:ENUM,
|
575
|
-
:O_ENUM,
|
576
|
-
:RANGE,
|
577
512
|
:O_RANGE,
|
513
|
+
:RANGE,
|
578
514
|
:STRING1,
|
579
515
|
:STRING2,
|
580
516
|
"@terminals",
|
@@ -588,10 +524,8 @@ module Meta
|
|
588
524
|
:_eof,
|
589
525
|
:HEX,
|
590
526
|
:SYMBOL,
|
591
|
-
:ENUM,
|
592
|
-
:O_ENUM,
|
593
|
-
:RANGE,
|
594
527
|
:O_RANGE,
|
528
|
+
:RANGE,
|
595
529
|
:STRING1,
|
596
530
|
:STRING2,
|
597
531
|
"@terminals",
|
@@ -605,10 +539,8 @@ module Meta
|
|
605
539
|
:_eof,
|
606
540
|
:HEX,
|
607
541
|
:SYMBOL,
|
608
|
-
:ENUM,
|
609
|
-
:O_ENUM,
|
610
|
-
:RANGE,
|
611
542
|
:O_RANGE,
|
543
|
+
:RANGE,
|
612
544
|
:STRING1,
|
613
545
|
:STRING2,
|
614
546
|
"@terminals",
|
@@ -623,10 +555,8 @@ module Meta
|
|
623
555
|
:_eof,
|
624
556
|
:HEX,
|
625
557
|
:SYMBOL,
|
626
|
-
:ENUM,
|
627
|
-
:O_ENUM,
|
628
|
-
:RANGE,
|
629
558
|
:O_RANGE,
|
559
|
+
:RANGE,
|
630
560
|
:STRING1,
|
631
561
|
:STRING2,
|
632
562
|
"@terminals",
|
@@ -641,10 +571,8 @@ module Meta
|
|
641
571
|
:_eof,
|
642
572
|
:HEX,
|
643
573
|
:SYMBOL,
|
644
|
-
:ENUM,
|
645
|
-
:O_ENUM,
|
646
|
-
:RANGE,
|
647
574
|
:O_RANGE,
|
575
|
+
:RANGE,
|
648
576
|
:STRING1,
|
649
577
|
:STRING2,
|
650
578
|
"@terminals",
|
@@ -659,10 +587,8 @@ module Meta
|
|
659
587
|
:_eof,
|
660
588
|
:HEX,
|
661
589
|
:SYMBOL,
|
662
|
-
:ENUM,
|
663
|
-
:O_ENUM,
|
664
|
-
:RANGE,
|
665
590
|
:O_RANGE,
|
591
|
+
:RANGE,
|
666
592
|
:STRING1,
|
667
593
|
:STRING2,
|
668
594
|
"@terminals",
|
@@ -677,10 +603,8 @@ module Meta
|
|
677
603
|
:_eof,
|
678
604
|
:HEX,
|
679
605
|
:SYMBOL,
|
680
|
-
:ENUM,
|
681
|
-
:O_ENUM,
|
682
|
-
:RANGE,
|
683
606
|
:O_RANGE,
|
607
|
+
:RANGE,
|
684
608
|
:STRING1,
|
685
609
|
:STRING2,
|
686
610
|
"@terminals",
|
data/etc/ebnf.ll1.sxp
CHANGED
@@ -1,37 +1,31 @@
|
|
1
1
|
(
|
2
2
|
(rule _empty "0" (first _eps) (seq))
|
3
|
-
(pass (seq PASS))
|
4
3
|
(rule ebnf "1"
|
5
4
|
(start #t)
|
6
5
|
(first "@pass" "@terminals" LHS _eps)
|
7
6
|
(follow _eof)
|
8
7
|
(cleanup star)
|
9
8
|
(alt _empty _ebnf_2))
|
10
|
-
(rule _ebnf_1 "1.1"
|
11
|
-
(first "@pass" "@terminals" LHS)
|
12
|
-
(follow "@pass" "@terminals" LHS _eof)
|
13
|
-
(alt declaration rule))
|
14
9
|
(rule _ebnf_2 "1.2"
|
15
10
|
(first "@pass" "@terminals" LHS)
|
16
11
|
(follow _eof)
|
17
12
|
(cleanup merge)
|
18
13
|
(seq _ebnf_1 ebnf))
|
19
|
-
(rule
|
14
|
+
(rule _ebnf_1 "1.1"
|
15
|
+
(first "@pass" "@terminals" LHS)
|
16
|
+
(follow "@pass" "@terminals" LHS _eof)
|
17
|
+
(alt declaration rule))
|
20
18
|
(rule declaration "2"
|
21
19
|
(first "@pass" "@terminals")
|
22
20
|
(follow "@pass" "@terminals" LHS _eof)
|
23
21
|
(alt "@terminals" pass))
|
24
22
|
(rule rule "3" (first LHS) (follow "@pass" "@terminals" LHS _eof) (seq LHS expression))
|
25
|
-
(rule _rule_1 "3.1"
|
26
|
-
(first "(" ENUM HEX O_ENUM O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
27
|
-
(follow "@pass" "@terminals" LHS _eof)
|
28
|
-
(seq expression))
|
29
23
|
(rule expression "4"
|
30
|
-
(first "("
|
24
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
31
25
|
(follow ")" "@pass" "@terminals" LHS _eof)
|
32
26
|
(seq alt))
|
33
27
|
(rule alt "5"
|
34
|
-
(first "("
|
28
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
35
29
|
(follow ")" "@pass" "@terminals" LHS _eof)
|
36
30
|
(seq seq _alt_1))
|
37
31
|
(rule _alt_1 "5.1"
|
@@ -39,141 +33,150 @@
|
|
39
33
|
(follow ")" "@pass" "@terminals" LHS _eof)
|
40
34
|
(cleanup star)
|
41
35
|
(alt _empty _alt_3))
|
42
|
-
(rule _alt_2 "5.2"
|
43
|
-
(first "|")
|
44
|
-
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
45
|
-
(seq "|" seq))
|
46
36
|
(rule _alt_3 "5.3"
|
47
37
|
(first "|")
|
48
38
|
(follow ")" "@pass" "@terminals" LHS _eof)
|
49
39
|
(cleanup merge)
|
50
40
|
(seq _alt_2 _alt_1))
|
51
|
-
(rule
|
52
|
-
(first
|
53
|
-
(follow ")" "@pass" "@terminals" LHS _eof)
|
54
|
-
(seq _alt_1))
|
55
|
-
(rule _alt_5 "5.5"
|
56
|
-
(first _eps "|")
|
57
|
-
(follow ")" "@pass" "@terminals" LHS _eof)
|
58
|
-
(seq _alt_1))
|
59
|
-
(rule _alt_6 "5.6"
|
60
|
-
(first "(" ENUM HEX O_ENUM O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
41
|
+
(rule _alt_2 "5.2"
|
42
|
+
(first "|")
|
61
43
|
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
62
|
-
(seq seq))
|
44
|
+
(seq "|" seq))
|
63
45
|
(rule seq "6"
|
64
|
-
(first "("
|
46
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
65
47
|
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
66
48
|
(cleanup plus)
|
67
49
|
(seq diff _seq_1))
|
68
50
|
(rule _seq_1 "6.1"
|
69
|
-
(first "("
|
51
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL _eps)
|
70
52
|
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
71
53
|
(cleanup star)
|
72
54
|
(alt _empty _seq_2))
|
73
55
|
(rule _seq_2 "6.2"
|
74
|
-
(first "("
|
56
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
75
57
|
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
76
58
|
(cleanup merge)
|
77
59
|
(seq diff _seq_1))
|
78
|
-
(rule _seq_3 "6.3"
|
79
|
-
(first "(" ENUM HEX O_ENUM O_RANGE RANGE STRING1 STRING2 SYMBOL _eps)
|
80
|
-
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
81
|
-
(seq _seq_1))
|
82
|
-
(rule _seq_4 "6.4"
|
83
|
-
(first "(" ENUM HEX O_ENUM O_RANGE RANGE STRING1 STRING2 SYMBOL _eps)
|
84
|
-
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
85
|
-
(seq _seq_1))
|
86
60
|
(rule diff "7"
|
87
|
-
(first "("
|
88
|
-
(follow "(" ")" "@pass" "@terminals"
|
89
|
-
|
61
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
62
|
+
(follow "(" ")" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1 STRING2
|
63
|
+
SYMBOL _eof "|" )
|
90
64
|
(seq postfix _diff_1))
|
91
65
|
(rule _diff_1 "7.1"
|
92
66
|
(first "-" _eps)
|
93
|
-
(follow "(" ")" "@pass" "@terminals"
|
94
|
-
|
67
|
+
(follow "(" ")" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1 STRING2
|
68
|
+
SYMBOL _eof "|" )
|
95
69
|
(cleanup opt)
|
96
70
|
(alt _empty _diff_2))
|
97
71
|
(rule _diff_2 "7.2"
|
98
72
|
(first "-")
|
99
|
-
(follow "(" ")" "@pass" "@terminals"
|
100
|
-
|
73
|
+
(follow "(" ")" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1 STRING2
|
74
|
+
SYMBOL _eof "|" )
|
101
75
|
(seq "-" postfix))
|
102
|
-
(rule _diff_3 "7.3"
|
103
|
-
(first "-" _eps)
|
104
|
-
(follow "(" ")" "@pass" "@terminals" ENUM HEX LHS O_ENUM O_RANGE RANGE
|
105
|
-
STRING1 STRING2 SYMBOL _eof "|" )
|
106
|
-
(seq _diff_1))
|
107
|
-
(rule _diff_4 "7.4"
|
108
|
-
(first "(" ENUM HEX O_ENUM O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
109
|
-
(follow "(" ")" "@pass" "@terminals" ENUM HEX LHS O_ENUM O_RANGE RANGE
|
110
|
-
STRING1 STRING2 SYMBOL _eof "|" )
|
111
|
-
(seq postfix))
|
112
76
|
(rule postfix "8"
|
113
|
-
(first "("
|
114
|
-
(follow "(" ")" "-" "@pass" "@terminals"
|
115
|
-
|
77
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
78
|
+
(follow "(" ")" "-" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1
|
79
|
+
STRING2 SYMBOL _eof "|" )
|
116
80
|
(seq primary _postfix_1))
|
117
81
|
(rule _postfix_1 "8.1"
|
118
82
|
(first POSTFIX _eps)
|
119
|
-
(follow "(" ")" "-" "@pass" "@terminals"
|
120
|
-
|
83
|
+
(follow "(" ")" "-" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1
|
84
|
+
STRING2 SYMBOL _eof "|" )
|
121
85
|
(cleanup opt)
|
122
86
|
(alt _empty POSTFIX))
|
123
|
-
(rule _postfix_2 "8.2"
|
124
|
-
(first POSTFIX _eps)
|
125
|
-
(follow "(" ")" "-" "@pass" "@terminals" ENUM HEX LHS O_ENUM O_RANGE RANGE
|
126
|
-
STRING1 STRING2 SYMBOL _eof "|" )
|
127
|
-
(seq _postfix_1))
|
128
87
|
(rule primary "9"
|
129
|
-
(first "("
|
130
|
-
(follow "(" ")" "-" "@pass" "@terminals"
|
131
|
-
|
132
|
-
(alt HEX SYMBOL
|
88
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
89
|
+
(follow "(" ")" "-" "@pass" "@terminals" HEX LHS O_RANGE POSTFIX RANGE
|
90
|
+
STRING1 STRING2 SYMBOL _eof "|" )
|
91
|
+
(alt HEX SYMBOL O_RANGE RANGE STRING1 STRING2 _primary_1))
|
133
92
|
(rule _primary_1 "9.1"
|
134
93
|
(first "(")
|
135
|
-
(follow "(" ")" "-" "@pass" "@terminals"
|
136
|
-
|
94
|
+
(follow "(" ")" "-" "@pass" "@terminals" HEX LHS O_RANGE POSTFIX RANGE
|
95
|
+
STRING1 STRING2 SYMBOL _eof "|" )
|
137
96
|
(seq "(" expression ")"))
|
138
|
-
(rule _primary_2 "9.2"
|
139
|
-
(first "(" ENUM HEX O_ENUM O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
140
|
-
(follow "(" ")" "-" "@pass" "@terminals" ENUM HEX LHS O_ENUM O_RANGE POSTFIX
|
141
|
-
RANGE STRING1 STRING2 SYMBOL _eof "|" )
|
142
|
-
(seq expression ")"))
|
143
|
-
(rule _primary_3 "9.3"
|
144
|
-
(first ")")
|
145
|
-
(follow "(" ")" "-" "@pass" "@terminals" ENUM HEX LHS O_ENUM O_RANGE POSTFIX
|
146
|
-
RANGE STRING1 STRING2 SYMBOL _eof "|" )
|
147
|
-
(seq ")"))
|
148
97
|
(rule pass "10"
|
149
98
|
(first "@pass")
|
150
99
|
(follow "@pass" "@terminals" LHS _eof)
|
151
100
|
(seq "@pass" expression))
|
152
|
-
(
|
153
|
-
|
154
|
-
(follow "@pass" "@terminals" LHS _eof)
|
155
|
-
(seq expression))
|
156
|
-
(terminal LHS "11" (seq (opt (seq "[" (plus SYMBOL) "]" (plus " "))) SYMBOL (star " ") "::="))
|
101
|
+
(terminals _terminals (seq))
|
102
|
+
(terminal LHS "11" (seq (opt (seq "[" SYMBOL "]" (plus " "))) SYMBOL (star " ") "::="))
|
157
103
|
(terminal SYMBOL "12" (plus (alt (range "a-z") (range "A-Z") (range "0-9") "_" ".")))
|
158
104
|
(terminal HEX "13" (seq "#x" (plus (alt (range "a-f") (range "A-F") (range "0-9")))))
|
159
|
-
(terminal
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
(terminal
|
165
|
-
|
105
|
+
(terminal RANGE "14"
|
106
|
+
(seq "["
|
107
|
+
(plus (alt (seq R_CHAR "-" R_CHAR) (seq HEX "-" HEX) R_CHAR HEX))
|
108
|
+
(opt "-")
|
109
|
+
(diff "]" LHS)) )
|
110
|
+
(terminal O_RANGE "15"
|
111
|
+
(seq "[^" (plus (alt (seq R_CHAR "-" R_CHAR) (seq HEX "-" HEX) R_CHAR HEX)) (opt "-") "]"))
|
112
|
+
(terminal STRING1 "16" (seq "\"" (star (diff CHAR "\"")) "\""))
|
113
|
+
(terminal STRING2 "17" (seq "'" (star (diff CHAR "'")) "'"))
|
114
|
+
(terminal CHAR "18"
|
166
115
|
(alt
|
167
116
|
(range "#x9#xA#xD")
|
168
117
|
(range "#x20-#xD7FF")
|
169
118
|
(range "#xE000-#xFFFD")
|
170
119
|
(range "#x10000-#x10FFFF")) )
|
171
|
-
(terminal R_CHAR "
|
172
|
-
(terminal POSTFIX "
|
173
|
-
(terminal PASS "
|
174
|
-
(
|
175
|
-
(
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
120
|
+
(terminal R_CHAR "19" (diff CHAR (alt "]" "-" HEX)))
|
121
|
+
(terminal POSTFIX "20" (range "?*+"))
|
122
|
+
(terminal PASS "21"
|
123
|
+
(alt
|
124
|
+
(range "#x9#xA#xD#x20")
|
125
|
+
(seq (alt (diff "#" "#x") "//") (star (range "^#xA#xD")))
|
126
|
+
(seq "/*" (star (alt (opt (seq "*" (range "^/"))) (range "^*"))) "*/")
|
127
|
+
(seq "(*" (star (alt (opt (seq "*" (range "^)"))) (range "^*"))) "*)")) )
|
128
|
+
(pass _pass (seq PASS))
|
129
|
+
(rule _ebnf_3 "1.3" (first "@pass" "@terminals" LHS _eps) (follow _eof) (seq ebnf))
|
130
|
+
(rule _rule_1 "3.1"
|
131
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
132
|
+
(follow "@pass" "@terminals" LHS _eof)
|
133
|
+
(seq expression))
|
134
|
+
(rule _alt_4 "5.4"
|
135
|
+
(first _eps "|")
|
136
|
+
(follow ")" "@pass" "@terminals" LHS _eof)
|
137
|
+
(seq _alt_1))
|
138
|
+
(rule _alt_5 "5.5"
|
139
|
+
(first _eps "|")
|
140
|
+
(follow ")" "@pass" "@terminals" LHS _eof)
|
141
|
+
(seq _alt_1))
|
142
|
+
(rule _alt_6 "5.6"
|
143
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
144
|
+
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
145
|
+
(seq seq))
|
146
|
+
(rule _seq_3 "6.3"
|
147
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL _eps)
|
148
|
+
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
149
|
+
(seq _seq_1))
|
150
|
+
(rule _seq_4 "6.4"
|
151
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL _eps)
|
152
|
+
(follow ")" "@pass" "@terminals" LHS _eof "|")
|
153
|
+
(seq _seq_1))
|
154
|
+
(rule _diff_3 "7.3"
|
155
|
+
(first "-" _eps)
|
156
|
+
(follow "(" ")" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1 STRING2
|
157
|
+
SYMBOL _eof "|" )
|
158
|
+
(seq _diff_1))
|
159
|
+
(rule _diff_4 "7.4"
|
160
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
161
|
+
(follow "(" ")" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1 STRING2
|
162
|
+
SYMBOL _eof "|" )
|
163
|
+
(seq postfix))
|
164
|
+
(rule _postfix_2 "8.2"
|
165
|
+
(first POSTFIX _eps)
|
166
|
+
(follow "(" ")" "-" "@pass" "@terminals" HEX LHS O_RANGE RANGE STRING1
|
167
|
+
STRING2 SYMBOL _eof "|" )
|
168
|
+
(seq _postfix_1))
|
169
|
+
(rule _primary_2 "9.2"
|
170
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
171
|
+
(follow "(" ")" "-" "@pass" "@terminals" HEX LHS O_RANGE POSTFIX RANGE
|
172
|
+
STRING1 STRING2 SYMBOL _eof "|" )
|
173
|
+
(seq expression ")"))
|
174
|
+
(rule _pass_1 "10.1"
|
175
|
+
(first "(" HEX O_RANGE RANGE STRING1 STRING2 SYMBOL)
|
176
|
+
(follow "@pass" "@terminals" LHS _eof)
|
177
|
+
(seq expression))
|
178
|
+
(rule _primary_3 "9.3"
|
179
|
+
(first ")")
|
180
|
+
(follow "(" ")" "-" "@pass" "@terminals" HEX LHS O_RANGE POSTFIX RANGE
|
181
|
+
STRING1 STRING2 SYMBOL _eof "|" )
|
182
|
+
(seq ")")) )
|