ebnf 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,7 @@
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],
@@ -1,183 +1,179 @@
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
+ (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 "^*"))) "*)")) )) )
@@ -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
+