ebnf 1.1.2 → 2.1.1

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