ebnf 1.2.0 → 2.0.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 +160 -185
- data/UNLICENSE +1 -1
- data/VERSION +1 -1
- data/bin/ebnf +6 -3
- data/etc/doap.ttl +13 -12
- data/etc/ebnf.ebnf +13 -19
- data/etc/ebnf.html +205 -239
- data/etc/{ebnf.rb → ebnf.ll1.rb} +3 -4
- data/etc/ebnf.ll1.sxp +179 -183
- data/etc/ebnf.peg.rb +98 -0
- data/etc/ebnf.peg.sxp +93 -0
- data/etc/ebnf.sxp +37 -41
- data/etc/sparql.html +1603 -1751
- data/etc/sparql.ll1.sxp +7372 -7372
- data/etc/sparql.peg.rb +532 -0
- data/etc/sparql.peg.sxp +597 -0
- data/etc/sparql.sxp +362 -362
- data/etc/turtle.html +465 -517
- data/etc/{turtle.rb → turtle.ll1.rb} +3 -4
- data/etc/turtle.ll1.sxp +425 -425
- data/etc/turtle.peg.rb +182 -0
- data/etc/turtle.peg.sxp +199 -0
- data/etc/turtle.sxp +101 -101
- data/lib/ebnf.rb +3 -1
- data/lib/ebnf/base.rb +30 -29
- data/lib/ebnf/bnf.rb +1 -26
- data/lib/ebnf/ll1.rb +132 -1
- data/lib/ebnf/ll1/lexer.rb +20 -22
- data/lib/ebnf/ll1/parser.rb +86 -61
- data/lib/ebnf/ll1/scanner.rb +83 -50
- data/lib/ebnf/peg.rb +39 -0
- data/lib/ebnf/peg/parser.rb +535 -0
- data/lib/ebnf/peg/rule.rb +222 -0
- data/lib/ebnf/rule.rb +118 -55
- data/lib/ebnf/terminals.rb +18 -0
- data/lib/ebnf/writer.rb +3 -2
- metadata +29 -6
- data/etc/sparql.rb +0 -45773
data/etc/{ebnf.rb → ebnf.ll1.rb}
RENAMED
@@ -1,8 +1,7 @@
|
|
1
|
-
# This file is automatically generated by
|
2
|
-
#
|
3
|
-
module
|
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],
|
data/etc/ebnf.ll1.sxp
CHANGED
@@ -1,183 +1,179 @@
|
|
1
|
-
(
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
(
|
178
|
-
|
179
|
-
|
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
|
+
(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) "]" (plus " "))) SYMBOL (star " ") "::="))
|
157
|
+
(terminal SYMBOL "12" (plus (alt (range "a-z") (range "A-Z") (range "0-9") "_" ".")))
|
158
|
+
(terminal HEX "13" (seq "#x" (plus (alt (range "a-f") (range "A-F") (range "0-9")))))
|
159
|
+
(terminal ENUM "14" (diff (alt (seq "[" (plus R_CHAR)) (seq (plus HEX) "]")) LHS))
|
160
|
+
(terminal O_ENUM "15" (alt (seq "[^" (plus R_CHAR)) (seq (plus HEX) "]")))
|
161
|
+
(terminal RANGE "16" (alt (seq "[" (seq R_CHAR "-" R_CHAR)) (seq (diff HEX HEX) "]")))
|
162
|
+
(terminal O_RANGE "17" (alt (seq "[^" (seq R_CHAR "-" R_CHAR)) (seq (diff HEX HEX) "]")))
|
163
|
+
(terminal STRING1 "18" (seq "\"" (star (diff CHAR "\"")) "\""))
|
164
|
+
(terminal STRING2 "19" (seq "'" (star (diff CHAR "'")) "'"))
|
165
|
+
(terminal CHAR "20"
|
166
|
+
(alt
|
167
|
+
(range "#x9#xA#xD")
|
168
|
+
(range "#x20-#xD7FF")
|
169
|
+
(range "#xE000-#xFFFD")
|
170
|
+
(range "#x10000-#x10FFFF")) )
|
171
|
+
(terminal R_CHAR "21" (diff CHAR "]"))
|
172
|
+
(terminal POSTFIX "22" (range "?*+"))
|
173
|
+
(terminal PASS "23"
|
174
|
+
(plus
|
175
|
+
(alt
|
176
|
+
(range "#x00-#x20")
|
177
|
+
(seq (alt (diff "#" "#x") "//") (star (range "^#x0A#x0Dx")))
|
178
|
+
(seq "/*" (star (alt (opt (seq "*" (range "^/"))) (range "^*"))) "*/")
|
179
|
+
(seq "(*" (star (alt (opt (seq "*" (range "^)"))) (range "^*"))) "*)")) )) )
|
data/etc/ebnf.peg.rb
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
# This file is automatically generated by ebnf version 2.0.0
|
2
|
+
# Derived from etc/ebnf.ebnf
|
3
|
+
module Meta
|
4
|
+
RULES = [
|
5
|
+
EBNF::Rule.new(:ebnf, "1", [:star, :_ebnf_1]).extend(EBNF::PEG::Rule),
|
6
|
+
EBNF::Rule.new(:_ebnf_1, "1.1", [:alt, :declaration, :rule]).extend(EBNF::PEG::Rule),
|
7
|
+
EBNF::Rule.new(:declaration, "2", [:alt, "@terminals", :pass]).extend(EBNF::PEG::Rule),
|
8
|
+
EBNF::Rule.new(:rule, "3", [:seq, :LHS, :expression]).extend(EBNF::PEG::Rule),
|
9
|
+
EBNF::Rule.new(:expression, "4", [:seq, :alt]).extend(EBNF::PEG::Rule),
|
10
|
+
EBNF::Rule.new(:alt, "5", [:seq, :seq, :_alt_1]).extend(EBNF::PEG::Rule),
|
11
|
+
EBNF::Rule.new(:_alt_1, "5.1", [:star, :_alt_2]).extend(EBNF::PEG::Rule),
|
12
|
+
EBNF::Rule.new(:_alt_2, "5.2", [:seq, "|", :seq]).extend(EBNF::PEG::Rule),
|
13
|
+
EBNF::Rule.new(:seq, "6", [:plus, :diff]).extend(EBNF::PEG::Rule),
|
14
|
+
EBNF::Rule.new(:diff, "7", [:seq, :postfix, :_diff_1]).extend(EBNF::PEG::Rule),
|
15
|
+
EBNF::Rule.new(:_diff_1, "7.1", [:opt, :_diff_2]).extend(EBNF::PEG::Rule),
|
16
|
+
EBNF::Rule.new(:_diff_2, "7.2", [:seq, "-", :postfix]).extend(EBNF::PEG::Rule),
|
17
|
+
EBNF::Rule.new(:postfix, "8", [:seq, :primary, :_postfix_1]).extend(EBNF::PEG::Rule),
|
18
|
+
EBNF::Rule.new(:_postfix_1, "8.1", [:opt, :POSTFIX]).extend(EBNF::PEG::Rule),
|
19
|
+
EBNF::Rule.new(:primary, "9", [:alt, :HEX, :SYMBOL, :ENUM, :O_ENUM, :RANGE, :O_RANGE, :STRING1, :STRING2, :_primary_1]).extend(EBNF::PEG::Rule),
|
20
|
+
EBNF::Rule.new(:_primary_1, "9.1", [:seq, "(", :expression, ")"]).extend(EBNF::PEG::Rule),
|
21
|
+
EBNF::Rule.new(:pass, "10", [:seq, "@pass", :expression]).extend(EBNF::PEG::Rule),
|
22
|
+
EBNF::Rule.new(:LHS, "11", [:seq, :_LHS_1, :SYMBOL, :_LHS_2, "::="], kind: :terminal).extend(EBNF::PEG::Rule),
|
23
|
+
EBNF::Rule.new(:_LHS_1, "11.1", [:opt, :_LHS_3], kind: :terminal).extend(EBNF::PEG::Rule),
|
24
|
+
EBNF::Rule.new(:_LHS_3, "11.3", [:seq, "[", :_LHS_4, "]", :_LHS_5], kind: :terminal).extend(EBNF::PEG::Rule),
|
25
|
+
EBNF::Rule.new(:_LHS_4, "11.4", [:plus, :SYMBOL], kind: :terminal).extend(EBNF::PEG::Rule),
|
26
|
+
EBNF::Rule.new(:_LHS_5, "11.5", [:plus, " "], kind: :terminal).extend(EBNF::PEG::Rule),
|
27
|
+
EBNF::Rule.new(:_LHS_2, "11.2", [:star, " "], kind: :terminal).extend(EBNF::PEG::Rule),
|
28
|
+
EBNF::Rule.new(:SYMBOL, "12", [:plus, :_SYMBOL_1], kind: :terminal).extend(EBNF::PEG::Rule),
|
29
|
+
EBNF::Rule.new(:_SYMBOL_1, "12.1", [:alt, :_SYMBOL_2, :_SYMBOL_3, :_SYMBOL_4, "_", "."], kind: :terminal).extend(EBNF::PEG::Rule),
|
30
|
+
EBNF::Rule.new(:_SYMBOL_2, "12.2", [:range, "a-z"], kind: :terminal).extend(EBNF::PEG::Rule),
|
31
|
+
EBNF::Rule.new(:_SYMBOL_3, "12.3", [:range, "A-Z"], kind: :terminal).extend(EBNF::PEG::Rule),
|
32
|
+
EBNF::Rule.new(:_SYMBOL_4, "12.4", [:range, "0-9"], kind: :terminal).extend(EBNF::PEG::Rule),
|
33
|
+
EBNF::Rule.new(:HEX, "13", [:seq, "#x", :_HEX_1], kind: :terminal).extend(EBNF::PEG::Rule),
|
34
|
+
EBNF::Rule.new(:_HEX_1, "13.1", [:plus, :_HEX_2], kind: :terminal).extend(EBNF::PEG::Rule),
|
35
|
+
EBNF::Rule.new(:_HEX_2, "13.2", [:alt, :_HEX_3, :_HEX_4, :_HEX_5], kind: :terminal).extend(EBNF::PEG::Rule),
|
36
|
+
EBNF::Rule.new(:_HEX_3, "13.3", [:range, "a-f"], kind: :terminal).extend(EBNF::PEG::Rule),
|
37
|
+
EBNF::Rule.new(:_HEX_4, "13.4", [:range, "A-F"], kind: :terminal).extend(EBNF::PEG::Rule),
|
38
|
+
EBNF::Rule.new(:_HEX_5, "13.5", [:range, "0-9"], kind: :terminal).extend(EBNF::PEG::Rule),
|
39
|
+
EBNF::Rule.new(:ENUM, "14", [:diff, :_ENUM_1, :LHS], kind: :terminal).extend(EBNF::PEG::Rule),
|
40
|
+
EBNF::Rule.new(:_ENUM_1, "14.1", [:alt, :_ENUM_2, :_ENUM_3], kind: :terminal).extend(EBNF::PEG::Rule),
|
41
|
+
EBNF::Rule.new(:_ENUM_2, "14.2", [:seq, "[", :_ENUM_4], kind: :terminal).extend(EBNF::PEG::Rule),
|
42
|
+
EBNF::Rule.new(:_ENUM_4, "14.4", [:plus, :R_CHAR], kind: :terminal).extend(EBNF::PEG::Rule),
|
43
|
+
EBNF::Rule.new(:_ENUM_3, "14.3", [:seq, :_ENUM_5, "]"], kind: :terminal).extend(EBNF::PEG::Rule),
|
44
|
+
EBNF::Rule.new(:_ENUM_5, "14.5", [:plus, :HEX], kind: :terminal).extend(EBNF::PEG::Rule),
|
45
|
+
EBNF::Rule.new(:O_ENUM, "15", [:alt, :_O_ENUM_1, :_O_ENUM_2], kind: :terminal).extend(EBNF::PEG::Rule),
|
46
|
+
EBNF::Rule.new(:_O_ENUM_1, "15.1", [:seq, "[^", :_O_ENUM_3], kind: :terminal).extend(EBNF::PEG::Rule),
|
47
|
+
EBNF::Rule.new(:_O_ENUM_3, "15.3", [:plus, :R_CHAR], kind: :terminal).extend(EBNF::PEG::Rule),
|
48
|
+
EBNF::Rule.new(:_O_ENUM_2, "15.2", [:seq, :_O_ENUM_4, "]"], kind: :terminal).extend(EBNF::PEG::Rule),
|
49
|
+
EBNF::Rule.new(:_O_ENUM_4, "15.4", [:plus, :HEX], kind: :terminal).extend(EBNF::PEG::Rule),
|
50
|
+
EBNF::Rule.new(:RANGE, "16", [:alt, :_RANGE_1, :_RANGE_2], kind: :terminal).extend(EBNF::PEG::Rule),
|
51
|
+
EBNF::Rule.new(:_RANGE_1, "16.1", [:seq, "[", :_RANGE_3], kind: :terminal).extend(EBNF::PEG::Rule),
|
52
|
+
EBNF::Rule.new(:_RANGE_3, "16.3", [:seq, :R_CHAR, "-", :R_CHAR], kind: :terminal).extend(EBNF::PEG::Rule),
|
53
|
+
EBNF::Rule.new(:_RANGE_2, "16.2", [:seq, :_RANGE_4, "]"], kind: :terminal).extend(EBNF::PEG::Rule),
|
54
|
+
EBNF::Rule.new(:_RANGE_4, "16.4", [:diff, :HEX, :HEX], kind: :terminal).extend(EBNF::PEG::Rule),
|
55
|
+
EBNF::Rule.new(:O_RANGE, "17", [:alt, :_O_RANGE_1, :_O_RANGE_2], kind: :terminal).extend(EBNF::PEG::Rule),
|
56
|
+
EBNF::Rule.new(:_O_RANGE_1, "17.1", [:seq, "[^", :_O_RANGE_3], kind: :terminal).extend(EBNF::PEG::Rule),
|
57
|
+
EBNF::Rule.new(:_O_RANGE_3, "17.3", [:seq, :R_CHAR, "-", :R_CHAR], kind: :terminal).extend(EBNF::PEG::Rule),
|
58
|
+
EBNF::Rule.new(:_O_RANGE_2, "17.2", [:seq, :_O_RANGE_4, "]"], kind: :terminal).extend(EBNF::PEG::Rule),
|
59
|
+
EBNF::Rule.new(:_O_RANGE_4, "17.4", [:diff, :HEX, :HEX], kind: :terminal).extend(EBNF::PEG::Rule),
|
60
|
+
EBNF::Rule.new(:STRING1, "18", [:seq, "\"", :_STRING1_1, "\""], kind: :terminal).extend(EBNF::PEG::Rule),
|
61
|
+
EBNF::Rule.new(:_STRING1_1, "18.1", [:star, :_STRING1_2], kind: :terminal).extend(EBNF::PEG::Rule),
|
62
|
+
EBNF::Rule.new(:_STRING1_2, "18.2", [:diff, :CHAR, "\""], kind: :terminal).extend(EBNF::PEG::Rule),
|
63
|
+
EBNF::Rule.new(:STRING2, "19", [:seq, "'", :_STRING2_1, "'"], kind: :terminal).extend(EBNF::PEG::Rule),
|
64
|
+
EBNF::Rule.new(:_STRING2_1, "19.1", [:star, :_STRING2_2], kind: :terminal).extend(EBNF::PEG::Rule),
|
65
|
+
EBNF::Rule.new(:_STRING2_2, "19.2", [:diff, :CHAR, "'"], kind: :terminal).extend(EBNF::PEG::Rule),
|
66
|
+
EBNF::Rule.new(:CHAR, "20", [:alt, :_CHAR_1, :_CHAR_2, :_CHAR_3, :_CHAR_4], kind: :terminal).extend(EBNF::PEG::Rule),
|
67
|
+
EBNF::Rule.new(:_CHAR_1, "20.1", [:range, "#x9#xA#xD"], kind: :terminal).extend(EBNF::PEG::Rule),
|
68
|
+
EBNF::Rule.new(:_CHAR_2, "20.2", [:range, "#x20-#xD7FF"], kind: :terminal).extend(EBNF::PEG::Rule),
|
69
|
+
EBNF::Rule.new(:_CHAR_3, "20.3", [:range, "#xE000-#xFFFD"], kind: :terminal).extend(EBNF::PEG::Rule),
|
70
|
+
EBNF::Rule.new(:_CHAR_4, "20.4", [:range, "#x10000-#x10FFFF"], kind: :terminal).extend(EBNF::PEG::Rule),
|
71
|
+
EBNF::Rule.new(:R_CHAR, "21", [:diff, :CHAR, "]"], kind: :terminal).extend(EBNF::PEG::Rule),
|
72
|
+
EBNF::Rule.new(:POSTFIX, "22", [:range, "?*+"], kind: :terminal).extend(EBNF::PEG::Rule),
|
73
|
+
EBNF::Rule.new(:PASS, "23", [:plus, :_PASS_1], kind: :terminal).extend(EBNF::PEG::Rule),
|
74
|
+
EBNF::Rule.new(:_PASS_1, "23.1", [:alt, :_PASS_2, :_PASS_3, :_PASS_4, :_PASS_5], kind: :terminal).extend(EBNF::PEG::Rule),
|
75
|
+
EBNF::Rule.new(:_PASS_2, "23.2", [:range, "#x00-#x20"], kind: :terminal).extend(EBNF::PEG::Rule),
|
76
|
+
EBNF::Rule.new(:_PASS_3, "23.3", [:seq, :_PASS_6, :_PASS_7], kind: :terminal).extend(EBNF::PEG::Rule),
|
77
|
+
EBNF::Rule.new(:_PASS_6, "23.6", [:alt, :_PASS_8, "//"], kind: :terminal).extend(EBNF::PEG::Rule),
|
78
|
+
EBNF::Rule.new(:_PASS_8, "23.8", [:diff, "#", "#x"], kind: :terminal).extend(EBNF::PEG::Rule),
|
79
|
+
EBNF::Rule.new(:_PASS_7, "23.7", [:star, :_PASS_9], kind: :terminal).extend(EBNF::PEG::Rule),
|
80
|
+
EBNF::Rule.new(:_PASS_9, "23.9", [:range, "^#x0A#x0Dx"], kind: :terminal).extend(EBNF::PEG::Rule),
|
81
|
+
EBNF::Rule.new(:_PASS_4, "23.4", [:seq, "/*", :_PASS_10, "*/"], kind: :terminal).extend(EBNF::PEG::Rule),
|
82
|
+
EBNF::Rule.new(:_PASS_10, "23.10", [:star, :_PASS_11], kind: :terminal).extend(EBNF::PEG::Rule),
|
83
|
+
EBNF::Rule.new(:_PASS_11, "23.11", [:alt, :_PASS_12, :_PASS_13], kind: :terminal).extend(EBNF::PEG::Rule),
|
84
|
+
EBNF::Rule.new(:_PASS_12, "23.12", [:opt, :_PASS_14], kind: :terminal).extend(EBNF::PEG::Rule),
|
85
|
+
EBNF::Rule.new(:_PASS_14, "23.14", [:seq, "*", :_PASS_15], kind: :terminal).extend(EBNF::PEG::Rule),
|
86
|
+
EBNF::Rule.new(:_PASS_15, "23.15", [:range, "^/"], kind: :terminal).extend(EBNF::PEG::Rule),
|
87
|
+
EBNF::Rule.new(:_PASS_13, "23.13", [:range, "^*"], kind: :terminal).extend(EBNF::PEG::Rule),
|
88
|
+
EBNF::Rule.new(:_PASS_5, "23.5", [:seq, "(*", :_PASS_16, "*)"], kind: :terminal).extend(EBNF::PEG::Rule),
|
89
|
+
EBNF::Rule.new(:_PASS_16, "23.16", [:star, :_PASS_17], kind: :terminal).extend(EBNF::PEG::Rule),
|
90
|
+
EBNF::Rule.new(:_PASS_17, "23.17", [:alt, :_PASS_18, :_PASS_19], kind: :terminal).extend(EBNF::PEG::Rule),
|
91
|
+
EBNF::Rule.new(:_PASS_18, "23.18", [:opt, :_PASS_20], kind: :terminal).extend(EBNF::PEG::Rule),
|
92
|
+
EBNF::Rule.new(:_PASS_20, "23.20", [:seq, "*", :_PASS_21], kind: :terminal).extend(EBNF::PEG::Rule),
|
93
|
+
EBNF::Rule.new(:_PASS_21, "23.21", [:range, "^)"], kind: :terminal).extend(EBNF::PEG::Rule),
|
94
|
+
EBNF::Rule.new(:_PASS_19, "23.19", [:range, "^*"], kind: :terminal).extend(EBNF::PEG::Rule),
|
95
|
+
EBNF::Rule.new(nil, nil, [:seq, :PASS], kind: :pass).extend(EBNF::PEG::Rule),
|
96
|
+
]
|
97
|
+
end
|
98
|
+
|