packcr 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +73 -0
- data/lib/packcr/context.rb +1 -1
- data/lib/packcr/generated/context.rb +121 -78
- data/lib/packcr/generated/node/action_node.rb +2 -2
- data/lib/packcr/generated/node/alternate_node.rb +2 -2
- data/lib/packcr/generated/node/capture_node.rb +1 -1
- data/lib/packcr/generated/node/charclass_node.rb +9 -9
- data/lib/packcr/generated/node/eof_node.rb +1 -1
- data/lib/packcr/generated/node/error_node.rb +2 -2
- data/lib/packcr/generated/node/expand_node.rb +2 -2
- data/lib/packcr/generated/node/predicate_node.rb +2 -2
- data/lib/packcr/generated/node/quantity_node.rb +30 -31
- data/lib/packcr/generated/node/reference_node.rb +2 -2
- data/lib/packcr/generated/node/rule_node.rb +7 -7
- data/lib/packcr/generated/node/string_node.rb +4 -4
- data/lib/packcr/parser.rb +619 -613
- data/lib/packcr/templates/context/header.c.erb +3 -3
- data/lib/packcr/templates/context/source.c.erb +417 -403
- data/lib/packcr/templates/context/source.rb.erb +42 -25
- data/lib/packcr/templates/node/action.c.erb +2 -2
- data/lib/packcr/templates/node/alternate.c.erb +2 -2
- data/lib/packcr/templates/node/capture.c.erb +2 -2
- data/lib/packcr/templates/node/charclass.c.erb +4 -4
- data/lib/packcr/templates/node/charclass_any.c.erb +2 -2
- data/lib/packcr/templates/node/charclass_one.c.erb +4 -4
- data/lib/packcr/templates/node/charclass_utf8.c.erb +2 -2
- data/lib/packcr/templates/node/eof.c.erb +1 -1
- data/lib/packcr/templates/node/error.c.erb +4 -4
- data/lib/packcr/templates/node/expand.c.erb +2 -2
- data/lib/packcr/templates/node/predicate.c.erb +1 -1
- data/lib/packcr/templates/node/predicate_neg.c.erb +1 -1
- data/lib/packcr/templates/node/quantity_many.c.erb +9 -7
- data/lib/packcr/templates/node/quantity_one.c.erb +9 -7
- data/lib/packcr/templates/node/quantity_one.rb.erb +4 -4
- data/lib/packcr/templates/node/reference.c.erb +6 -6
- data/lib/packcr/templates/node/rule.c.erb +9 -9
- data/lib/packcr/templates/node/string_many.c.erb +2 -2
- data/lib/packcr/templates/node/string_one.c.erb +2 -2
- data/lib/packcr/util.rb +1 -1
- data/lib/packcr/version.rb +1 -1
- metadata +5 -3
data/lib/packcr/parser.rb
CHANGED
@@ -1,7 +1,46 @@
|
|
1
|
-
# A packrat parser generated by PackCR 0.0.
|
1
|
+
# A packrat parser generated by PackCR 0.0.8
|
2
2
|
|
3
3
|
class Packcr
|
4
4
|
class Parser
|
5
|
+
class Location
|
6
|
+
attr_reader :charnum, :linenum
|
7
|
+
|
8
|
+
def initialize(charnum = 0, linenum = 0)
|
9
|
+
@charnum = charnum
|
10
|
+
@linenum = linenum
|
11
|
+
end
|
12
|
+
|
13
|
+
def +(other)
|
14
|
+
if other.linenum.zero?
|
15
|
+
Location.new(@charnum + other.charnum, @linenum + other.linenum)
|
16
|
+
else
|
17
|
+
Location.new( other.charnum, @linenum + other.linenum)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def -(other)
|
22
|
+
raise "unexpected location #{inspect} - #{other.inspect}" unless other.linenum == linenum || other.charnum.zero?
|
23
|
+
|
24
|
+
Location.new(@charnum - other.charnum, @linenum - other.linenum)
|
25
|
+
end
|
26
|
+
|
27
|
+
def forward(buffer, cur, n)
|
28
|
+
Location.new(@charnum, @linenum).forward!(buffer, cur, n)
|
29
|
+
end
|
30
|
+
|
31
|
+
def forward!(buffer, cur, n)
|
32
|
+
buffer[cur, n].scan(/(.*)(\n)?/) do
|
33
|
+
if Regexp.last_match[2]
|
34
|
+
@linenum += 1
|
35
|
+
@charnum = 0
|
36
|
+
else
|
37
|
+
@charnum += Regexp.last_match[1].length
|
38
|
+
end
|
39
|
+
end
|
40
|
+
self
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
5
44
|
def initialize(ctx = nil, ifile = nil, debug: false)
|
6
45
|
@buffer = +""
|
7
46
|
|
@@ -69,811 +108,811 @@ class Packcr
|
|
69
108
|
nil while parse
|
70
109
|
end
|
71
110
|
|
72
|
-
def action_statement_0(
|
73
|
-
____ = (
|
74
|
-
__0 =
|
75
|
-
__0s = @buffer_start_position +
|
76
|
-
__0e = @buffer_start_position +
|
77
|
-
__0sl = @buffer_start_position_loc +
|
78
|
-
__0el = @buffer_start_position_loc +
|
111
|
+
def action_statement_0(__packcr_in, __packcr_vars, __packcr_index)
|
112
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
113
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
114
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
115
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
116
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
117
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
79
118
|
@ctx.error __0sl.linenum + 1, __0sl.charnum + 1, "Illegal syntax"
|
80
119
|
|
81
|
-
|
120
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
82
121
|
end
|
83
122
|
|
84
|
-
def action_supported_language_0(
|
85
|
-
____ = (
|
86
|
-
__0 =
|
87
|
-
__0s = @buffer_start_position +
|
88
|
-
__0e = @buffer_start_position +
|
89
|
-
__0sl = @buffer_start_position_loc +
|
90
|
-
__0el = @buffer_start_position_loc +
|
123
|
+
def action_supported_language_0(__packcr_in, __packcr_vars, __packcr_index)
|
124
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
125
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
126
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
127
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
128
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
129
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
91
130
|
@ctx.error __0sl.linenum + 1, __0sl.charnum + 1, "Not supported language: #{__0}"
|
92
131
|
|
93
|
-
|
132
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
94
133
|
end
|
95
134
|
|
96
|
-
def action_directive_include_0(
|
97
|
-
____ = (
|
98
|
-
blocks = (
|
99
|
-
__0 =
|
100
|
-
__0s = @buffer_start_position +
|
101
|
-
__0e = @buffer_start_position +
|
102
|
-
__0sl = @buffer_start_position_loc +
|
103
|
-
__0el = @buffer_start_position_loc +
|
135
|
+
def action_directive_include_0(__packcr_in, __packcr_vars, __packcr_index)
|
136
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
137
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
138
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
139
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
140
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
141
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
142
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
104
143
|
blocks.each { |b| @ctx.code(:esource) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
105
144
|
|
106
|
-
|
145
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
107
146
|
end
|
108
147
|
|
109
|
-
def action_directive_include_1(
|
110
|
-
____ = (
|
111
|
-
blocks = (
|
112
|
-
__0 =
|
113
|
-
__0s = @buffer_start_position +
|
114
|
-
__0e = @buffer_start_position +
|
115
|
-
__0sl = @buffer_start_position_loc +
|
116
|
-
__0el = @buffer_start_position_loc +
|
148
|
+
def action_directive_include_1(__packcr_in, __packcr_vars, __packcr_index)
|
149
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
150
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
151
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
152
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
153
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
154
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
155
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
117
156
|
blocks.each { |b| @ctx.code(:source) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
118
157
|
|
119
|
-
|
158
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
120
159
|
end
|
121
160
|
|
122
|
-
def action_directive_include_2(
|
123
|
-
____ = (
|
124
|
-
blocks = (
|
125
|
-
__0 =
|
126
|
-
__0s = @buffer_start_position +
|
127
|
-
__0e = @buffer_start_position +
|
128
|
-
__0sl = @buffer_start_position_loc +
|
129
|
-
__0el = @buffer_start_position_loc +
|
161
|
+
def action_directive_include_2(__packcr_in, __packcr_vars, __packcr_index)
|
162
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
163
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
164
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
165
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
166
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
167
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
168
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
130
169
|
blocks.each { |b| @ctx.code(:lheader) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
131
170
|
|
132
|
-
|
171
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
133
172
|
end
|
134
173
|
|
135
|
-
def action_directive_include_3(
|
136
|
-
____ = (
|
137
|
-
blocks = (
|
138
|
-
__0 =
|
139
|
-
__0s = @buffer_start_position +
|
140
|
-
__0e = @buffer_start_position +
|
141
|
-
__0sl = @buffer_start_position_loc +
|
142
|
-
__0el = @buffer_start_position_loc +
|
174
|
+
def action_directive_include_3(__packcr_in, __packcr_vars, __packcr_index)
|
175
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
176
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
177
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
178
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
179
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
180
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
181
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
143
182
|
blocks.each { |b| @ctx.code(:lsource) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
144
183
|
|
145
|
-
|
184
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
146
185
|
end
|
147
186
|
|
148
|
-
def action_directive_include_4(
|
149
|
-
____ = (
|
150
|
-
blocks = (
|
151
|
-
__0 =
|
152
|
-
__0s = @buffer_start_position +
|
153
|
-
__0e = @buffer_start_position +
|
154
|
-
__0sl = @buffer_start_position_loc +
|
155
|
-
__0el = @buffer_start_position_loc +
|
187
|
+
def action_directive_include_4(__packcr_in, __packcr_vars, __packcr_index)
|
188
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
189
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
190
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
191
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
192
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
193
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
194
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
156
195
|
blocks.each { |b| @ctx.code(:header) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
157
196
|
|
158
|
-
|
197
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
159
198
|
end
|
160
199
|
|
161
|
-
def action_directive_include_5(
|
162
|
-
____ = (
|
163
|
-
blocks = (
|
164
|
-
__0 =
|
165
|
-
__0s = @buffer_start_position +
|
166
|
-
__0e = @buffer_start_position +
|
167
|
-
__0sl = @buffer_start_position_loc +
|
168
|
-
__0el = @buffer_start_position_loc +
|
200
|
+
def action_directive_include_5(__packcr_in, __packcr_vars, __packcr_index)
|
201
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
202
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
203
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
204
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
205
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
206
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
207
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
169
208
|
blocks.each { |b| @ctx.code(:location) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
170
209
|
|
171
|
-
|
210
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
172
211
|
end
|
173
212
|
|
174
|
-
def action_directive_include_6(
|
175
|
-
____ = (
|
176
|
-
blocks = (
|
177
|
-
__0 =
|
178
|
-
__0s = @buffer_start_position +
|
179
|
-
__0e = @buffer_start_position +
|
180
|
-
__0sl = @buffer_start_position_loc +
|
181
|
-
__0el = @buffer_start_position_loc +
|
213
|
+
def action_directive_include_6(__packcr_in, __packcr_vars, __packcr_index)
|
214
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
215
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
216
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
217
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
218
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
219
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
220
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
182
221
|
blocks.each { |b| @ctx.code(:init) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
183
222
|
|
184
|
-
|
223
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
185
224
|
end
|
186
225
|
|
187
|
-
def action_directive_include_7(
|
188
|
-
____ = (
|
189
|
-
blocks = (
|
190
|
-
__0 =
|
191
|
-
__0s = @buffer_start_position +
|
192
|
-
__0e = @buffer_start_position +
|
193
|
-
__0sl = @buffer_start_position_loc +
|
194
|
-
__0el = @buffer_start_position_loc +
|
226
|
+
def action_directive_include_7(__packcr_in, __packcr_vars, __packcr_index)
|
227
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
228
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
229
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
230
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
231
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
232
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
233
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
195
234
|
blocks.each { |b| Packcr::BroadCast.new(@ctx.code(:eheader), @ctx.code(:esource)) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
196
235
|
|
197
|
-
|
236
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
198
237
|
end
|
199
238
|
|
200
|
-
def action_directive_include_8(
|
201
|
-
____ = (
|
202
|
-
blocks = (
|
203
|
-
__0 =
|
204
|
-
__0s = @buffer_start_position +
|
205
|
-
__0e = @buffer_start_position +
|
206
|
-
__0sl = @buffer_start_position_loc +
|
207
|
-
__0el = @buffer_start_position_loc +
|
239
|
+
def action_directive_include_8(__packcr_in, __packcr_vars, __packcr_index)
|
240
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
241
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
242
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
243
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
244
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
245
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
246
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
208
247
|
blocks.each { |b| Packcr::BroadCast.new(@ctx.code(:header), @ctx.code(:source)) << Packcr::CodeBlock.new(b, __0sl.linenum, __0sl.charnum) }
|
209
248
|
|
210
|
-
|
249
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
211
250
|
end
|
212
251
|
|
213
|
-
def action_directive_include_9(
|
214
|
-
____ = (
|
215
|
-
blocks = (
|
216
|
-
__0 =
|
217
|
-
__0s = @buffer_start_position +
|
218
|
-
__0e = @buffer_start_position +
|
219
|
-
__0sl = @buffer_start_position_loc +
|
220
|
-
__0el = @buffer_start_position_loc +
|
221
|
-
__1 =
|
222
|
-
__1s = @buffer_start_position +
|
223
|
-
__1e = @buffer_start_position +
|
224
|
-
__1sl = @buffer_start_position_loc +
|
225
|
-
__1el = @buffer_start_position_loc +
|
252
|
+
def action_directive_include_9(__packcr_in, __packcr_vars, __packcr_index)
|
253
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
254
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
255
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
256
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
257
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
258
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
259
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
260
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
261
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
262
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
263
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
264
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
226
265
|
blocks.each { @ctx.error __0sl.linenum + 1, __0sl.charnum + 1, "Invalid directive: #{__1}" }
|
227
266
|
|
228
|
-
|
267
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
229
268
|
end
|
230
269
|
|
231
|
-
def action_code_blocks_0(
|
232
|
-
____ = (
|
233
|
-
blocks = (
|
234
|
-
block = (
|
235
|
-
__0 =
|
236
|
-
__0s = @buffer_start_position +
|
237
|
-
__0e = @buffer_start_position +
|
238
|
-
__0sl = @buffer_start_position_loc +
|
239
|
-
__0el = @buffer_start_position_loc +
|
270
|
+
def action_code_blocks_0(__packcr_in, __packcr_vars, __packcr_index)
|
271
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
272
|
+
blocks = (__packcr_in.value_refs[0] ||= Value.new).value
|
273
|
+
block = (__packcr_in.value_refs[1] ||= Value.new).value
|
274
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
275
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
276
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
277
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
278
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
240
279
|
blocks.push(block) if block; ____ = blocks
|
241
280
|
|
242
|
-
|
281
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
243
282
|
end
|
244
283
|
|
245
|
-
def action_code_blocks_1(
|
246
|
-
____ = (
|
247
|
-
block = (
|
248
|
-
__0 =
|
249
|
-
__0s = @buffer_start_position +
|
250
|
-
__0e = @buffer_start_position +
|
251
|
-
__0sl = @buffer_start_position_loc +
|
252
|
-
__0el = @buffer_start_position_loc +
|
284
|
+
def action_code_blocks_1(__packcr_in, __packcr_vars, __packcr_index)
|
285
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
286
|
+
block = (__packcr_in.value_refs[1] ||= Value.new).value
|
287
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
288
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
289
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
290
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
291
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
253
292
|
____ = block ? [block] : []
|
254
293
|
|
255
|
-
|
294
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
256
295
|
end
|
257
296
|
|
258
|
-
def action_directive_string_0(
|
259
|
-
____ = (
|
260
|
-
strings = (
|
261
|
-
__0 =
|
262
|
-
__0s = @buffer_start_position +
|
263
|
-
__0e = @buffer_start_position +
|
264
|
-
__0sl = @buffer_start_position_loc +
|
265
|
-
__0el = @buffer_start_position_loc +
|
297
|
+
def action_directive_string_0(__packcr_in, __packcr_vars, __packcr_index)
|
298
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
299
|
+
strings = (__packcr_in.value_refs[0] ||= Value.new).value
|
300
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
301
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
302
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
303
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
304
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
266
305
|
strings.each { |str| @ctx.value_type = str }
|
267
306
|
|
268
|
-
|
307
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
269
308
|
end
|
270
309
|
|
271
|
-
def action_directive_string_1(
|
272
|
-
____ = (
|
273
|
-
strings = (
|
274
|
-
__0 =
|
275
|
-
__0s = @buffer_start_position +
|
276
|
-
__0e = @buffer_start_position +
|
277
|
-
__0sl = @buffer_start_position_loc +
|
278
|
-
__0el = @buffer_start_position_loc +
|
310
|
+
def action_directive_string_1(__packcr_in, __packcr_vars, __packcr_index)
|
311
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
312
|
+
strings = (__packcr_in.value_refs[0] ||= Value.new).value
|
313
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
314
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
315
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
316
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
317
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
279
318
|
strings.each { |str| @ctx.auxil_type = str }
|
280
319
|
|
281
|
-
|
320
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
282
321
|
end
|
283
322
|
|
284
|
-
def action_directive_string_2(
|
285
|
-
____ = (
|
286
|
-
strings = (
|
287
|
-
__0 =
|
288
|
-
__0s = @buffer_start_position +
|
289
|
-
__0e = @buffer_start_position +
|
290
|
-
__0sl = @buffer_start_position_loc +
|
291
|
-
__0el = @buffer_start_position_loc +
|
323
|
+
def action_directive_string_2(__packcr_in, __packcr_vars, __packcr_index)
|
324
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
325
|
+
strings = (__packcr_in.value_refs[0] ||= Value.new).value
|
326
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
327
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
328
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
329
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
330
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
292
331
|
strings.each { |str| @ctx.prefix = str }
|
293
332
|
|
294
|
-
|
333
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
295
334
|
end
|
296
335
|
|
297
|
-
def action_directive_string_3(
|
298
|
-
____ = (
|
299
|
-
str = (
|
300
|
-
__0 =
|
301
|
-
__0s = @buffer_start_position +
|
302
|
-
__0e = @buffer_start_position +
|
303
|
-
__0sl = @buffer_start_position_loc +
|
304
|
-
__0el = @buffer_start_position_loc +
|
305
|
-
__1 =
|
306
|
-
__1s = @buffer_start_position +
|
307
|
-
__1e = @buffer_start_position +
|
308
|
-
__1sl = @buffer_start_position_loc +
|
309
|
-
__1el = @buffer_start_position_loc +
|
336
|
+
def action_directive_string_3(__packcr_in, __packcr_vars, __packcr_index)
|
337
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
338
|
+
str = (__packcr_in.value_refs[1] ||= Value.new).value
|
339
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
340
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
341
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
342
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
343
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
344
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
345
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
346
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
347
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
348
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
310
349
|
@ctx.error __0sl.linenum + 1, __0sl.charnum + 1, "Invalid directive: #{__1}"
|
311
350
|
|
312
|
-
|
351
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
313
352
|
end
|
314
353
|
|
315
|
-
def action_directive_value_0(
|
316
|
-
____ = (
|
317
|
-
__0 =
|
318
|
-
__0s = @buffer_start_position +
|
319
|
-
__0e = @buffer_start_position +
|
320
|
-
__0sl = @buffer_start_position_loc +
|
321
|
-
__0el = @buffer_start_position_loc +
|
354
|
+
def action_directive_value_0(__packcr_in, __packcr_vars, __packcr_index)
|
355
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
356
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
357
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
358
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
359
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
360
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
322
361
|
@ctx.capture_in_code = true
|
323
362
|
|
324
|
-
|
363
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
325
364
|
end
|
326
365
|
|
327
|
-
def action_lang_strings_0(
|
328
|
-
____ = (
|
329
|
-
strings = (
|
330
|
-
string = (
|
331
|
-
__0 =
|
332
|
-
__0s = @buffer_start_position +
|
333
|
-
__0e = @buffer_start_position +
|
334
|
-
__0sl = @buffer_start_position_loc +
|
335
|
-
__0el = @buffer_start_position_loc +
|
366
|
+
def action_lang_strings_0(__packcr_in, __packcr_vars, __packcr_index)
|
367
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
368
|
+
strings = (__packcr_in.value_refs[0] ||= Value.new).value
|
369
|
+
string = (__packcr_in.value_refs[1] ||= Value.new).value
|
370
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
371
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
372
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
373
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
374
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
336
375
|
strings.push(string) if string; ____ = strings
|
337
376
|
|
338
|
-
|
377
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
339
378
|
end
|
340
379
|
|
341
|
-
def action_lang_strings_1(
|
342
|
-
____ = (
|
343
|
-
string = (
|
344
|
-
__0 =
|
345
|
-
__0s = @buffer_start_position +
|
346
|
-
__0e = @buffer_start_position +
|
347
|
-
__0sl = @buffer_start_position_loc +
|
348
|
-
__0el = @buffer_start_position_loc +
|
380
|
+
def action_lang_strings_1(__packcr_in, __packcr_vars, __packcr_index)
|
381
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
382
|
+
string = (__packcr_in.value_refs[1] ||= Value.new).value
|
383
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
384
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
385
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
386
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
387
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
349
388
|
____ = string ? [string] : []
|
350
389
|
|
351
|
-
|
390
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
352
391
|
end
|
353
392
|
|
354
|
-
def action_lang_string_0(
|
355
|
-
____ = (
|
356
|
-
string = (
|
357
|
-
__0 =
|
358
|
-
__0s = @buffer_start_position +
|
359
|
-
__0e = @buffer_start_position +
|
360
|
-
__0sl = @buffer_start_position_loc +
|
361
|
-
__0el = @buffer_start_position_loc +
|
393
|
+
def action_lang_string_0(__packcr_in, __packcr_vars, __packcr_index)
|
394
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
395
|
+
string = (__packcr_in.value_refs[0] ||= Value.new).value
|
396
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
397
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
398
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
399
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
400
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
362
401
|
____ = string
|
363
402
|
|
364
|
-
|
403
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
365
404
|
end
|
366
405
|
|
367
|
-
def action_lang_string_1(
|
368
|
-
____ = (
|
369
|
-
string = (
|
370
|
-
__0 =
|
371
|
-
__0s = @buffer_start_position +
|
372
|
-
__0e = @buffer_start_position +
|
373
|
-
__0sl = @buffer_start_position_loc +
|
374
|
-
__0el = @buffer_start_position_loc +
|
375
|
-
__1 =
|
376
|
-
__1s = @buffer_start_position +
|
377
|
-
__1e = @buffer_start_position +
|
378
|
-
__1sl = @buffer_start_position_loc +
|
379
|
-
__1el = @buffer_start_position_loc +
|
406
|
+
def action_lang_string_1(__packcr_in, __packcr_vars, __packcr_index)
|
407
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
408
|
+
string = (__packcr_in.value_refs[0] ||= Value.new).value
|
409
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
410
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
411
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
412
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
413
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
414
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
415
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
416
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
417
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
418
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
380
419
|
____ = @ctx.lang == __1.to_sym ? string : nil
|
381
420
|
|
382
|
-
|
421
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
383
422
|
end
|
384
423
|
|
385
|
-
def action_rule_0(
|
386
|
-
____ = (
|
387
|
-
name = (
|
388
|
-
expr = (
|
389
|
-
__0 =
|
390
|
-
__0s = @buffer_start_position +
|
391
|
-
__0e = @buffer_start_position +
|
392
|
-
__0sl = @buffer_start_position_loc +
|
393
|
-
__0el = @buffer_start_position_loc +
|
424
|
+
def action_rule_0(__packcr_in, __packcr_vars, __packcr_index)
|
425
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
426
|
+
name = (__packcr_in.value_refs[0] ||= Value.new).value
|
427
|
+
expr = (__packcr_in.value_refs[1] ||= Value.new).value
|
428
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
429
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
430
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
431
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
432
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
394
433
|
return unless expr
|
395
434
|
|
396
435
|
rule = Packcr::Node::RuleNode.new(expr, name, __0sl.linenum, __0sl.charnum)
|
397
436
|
@ctx.root.rules << rule
|
398
437
|
|
399
|
-
|
438
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
400
439
|
end
|
401
440
|
|
402
|
-
def action_expression_0(
|
403
|
-
____ = (
|
404
|
-
expr = (
|
405
|
-
seq = (
|
406
|
-
__0 =
|
407
|
-
__0s = @buffer_start_position +
|
408
|
-
__0e = @buffer_start_position +
|
409
|
-
__0sl = @buffer_start_position_loc +
|
410
|
-
__0el = @buffer_start_position_loc +
|
441
|
+
def action_expression_0(__packcr_in, __packcr_vars, __packcr_index)
|
442
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
443
|
+
expr = (__packcr_in.value_refs[0] ||= Value.new).value
|
444
|
+
seq = (__packcr_in.value_refs[1] ||= Value.new).value
|
445
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
446
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
447
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
448
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
449
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
411
450
|
____ = expr.alt(seq)
|
412
451
|
|
413
|
-
|
452
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
414
453
|
end
|
415
454
|
|
416
|
-
def action_expression_1(
|
417
|
-
____ = (
|
418
|
-
seq = (
|
419
|
-
__0 =
|
420
|
-
__0s = @buffer_start_position +
|
421
|
-
__0e = @buffer_start_position +
|
422
|
-
__0sl = @buffer_start_position_loc +
|
423
|
-
__0el = @buffer_start_position_loc +
|
455
|
+
def action_expression_1(__packcr_in, __packcr_vars, __packcr_index)
|
456
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
457
|
+
seq = (__packcr_in.value_refs[1] ||= Value.new).value
|
458
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
459
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
460
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
461
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
462
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
424
463
|
____ = seq
|
425
464
|
|
426
|
-
|
465
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
427
466
|
end
|
428
467
|
|
429
|
-
def action_sequence_0(
|
430
|
-
____ = (
|
431
|
-
seq = (
|
432
|
-
expr = (
|
433
|
-
__0 =
|
434
|
-
__0s = @buffer_start_position +
|
435
|
-
__0e = @buffer_start_position +
|
436
|
-
__0sl = @buffer_start_position_loc +
|
437
|
-
__0el = @buffer_start_position_loc +
|
468
|
+
def action_sequence_0(__packcr_in, __packcr_vars, __packcr_index)
|
469
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
470
|
+
seq = (__packcr_in.value_refs[0] ||= Value.new).value
|
471
|
+
expr = (__packcr_in.value_refs[1] ||= Value.new).value
|
472
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
473
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
474
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
475
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
476
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
438
477
|
____ = seq.seq(expr, cut: true)
|
439
478
|
|
440
|
-
|
479
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
441
480
|
end
|
442
481
|
|
443
|
-
def action_sequence_1(
|
444
|
-
____ = (
|
445
|
-
seq = (
|
446
|
-
code = (
|
447
|
-
__0 =
|
448
|
-
__0s = @buffer_start_position +
|
449
|
-
__0e = @buffer_start_position +
|
450
|
-
__0sl = @buffer_start_position_loc +
|
451
|
-
__0el = @buffer_start_position_loc +
|
482
|
+
def action_sequence_1(__packcr_in, __packcr_vars, __packcr_index)
|
483
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
484
|
+
seq = (__packcr_in.value_refs[0] ||= Value.new).value
|
485
|
+
code = (__packcr_in.value_refs[2] ||= Value.new).value
|
486
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
487
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
488
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
489
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
490
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
452
491
|
____ = code ? Packcr::Node::ErrorNode.new(seq, Packcr::CodeBlock.new(code, __0sl.linenum, __0sl.charnum)) : seq
|
453
492
|
|
454
|
-
|
493
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
455
494
|
end
|
456
495
|
|
457
|
-
def action_sequence_2(
|
458
|
-
____ = (
|
459
|
-
seq = (
|
460
|
-
expr = (
|
461
|
-
__0 =
|
462
|
-
__0s = @buffer_start_position +
|
463
|
-
__0e = @buffer_start_position +
|
464
|
-
__0sl = @buffer_start_position_loc +
|
465
|
-
__0el = @buffer_start_position_loc +
|
466
|
-
____ = seq
|
467
|
-
|
468
|
-
|
496
|
+
def action_sequence_2(__packcr_in, __packcr_vars, __packcr_index)
|
497
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
498
|
+
seq = (__packcr_in.value_refs[0] ||= Value.new).value
|
499
|
+
expr = (__packcr_in.value_refs[1] ||= Value.new).value
|
500
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
501
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
502
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
503
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
504
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
505
|
+
____ = seq&.seq(expr) || expr
|
506
|
+
|
507
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
469
508
|
end
|
470
509
|
|
471
|
-
def action_sequence_3(
|
472
|
-
____ = (
|
473
|
-
expr = (
|
474
|
-
__0 =
|
475
|
-
__0s = @buffer_start_position +
|
476
|
-
__0e = @buffer_start_position +
|
477
|
-
__0sl = @buffer_start_position_loc +
|
478
|
-
__0el = @buffer_start_position_loc +
|
510
|
+
def action_sequence_3(__packcr_in, __packcr_vars, __packcr_index)
|
511
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
512
|
+
expr = (__packcr_in.value_refs[1] ||= Value.new).value
|
513
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
514
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
515
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
516
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
517
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
479
518
|
____ = expr
|
480
519
|
|
481
|
-
|
520
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
482
521
|
end
|
483
522
|
|
484
|
-
def action_term_0(
|
485
|
-
____ = (
|
486
|
-
node = (
|
487
|
-
__0 =
|
488
|
-
__0s = @buffer_start_position +
|
489
|
-
__0e = @buffer_start_position +
|
490
|
-
__0sl = @buffer_start_position_loc +
|
491
|
-
__0el = @buffer_start_position_loc +
|
523
|
+
def action_term_0(__packcr_in, __packcr_vars, __packcr_index)
|
524
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
525
|
+
node = (__packcr_in.value_refs[0] ||= Value.new).value
|
526
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
527
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
528
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
529
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
530
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
492
531
|
____ = Packcr::Node::PredicateNode.new(node)
|
493
532
|
|
494
|
-
|
533
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
495
534
|
end
|
496
535
|
|
497
|
-
def action_term_1(
|
498
|
-
____ = (
|
499
|
-
node = (
|
500
|
-
__0 =
|
501
|
-
__0s = @buffer_start_position +
|
502
|
-
__0e = @buffer_start_position +
|
503
|
-
__0sl = @buffer_start_position_loc +
|
504
|
-
__0el = @buffer_start_position_loc +
|
536
|
+
def action_term_1(__packcr_in, __packcr_vars, __packcr_index)
|
537
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
538
|
+
node = (__packcr_in.value_refs[0] ||= Value.new).value
|
539
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
540
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
541
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
542
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
543
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
505
544
|
____ = Packcr::Node::PredicateNode.new(node, true)
|
506
545
|
|
507
|
-
|
546
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
508
547
|
end
|
509
548
|
|
510
|
-
def action_term_2(
|
511
|
-
____ = (
|
512
|
-
node = (
|
513
|
-
__0 =
|
514
|
-
__0s = @buffer_start_position +
|
515
|
-
__0e = @buffer_start_position +
|
516
|
-
__0sl = @buffer_start_position_loc +
|
517
|
-
__0el = @buffer_start_position_loc +
|
549
|
+
def action_term_2(__packcr_in, __packcr_vars, __packcr_index)
|
550
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
551
|
+
node = (__packcr_in.value_refs[0] ||= Value.new).value
|
552
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
553
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
554
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
555
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
556
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
518
557
|
____ = node
|
519
558
|
|
520
|
-
|
559
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
521
560
|
end
|
522
561
|
|
523
|
-
def action_quantity_0(
|
524
|
-
____ = (
|
525
|
-
node = (
|
526
|
-
__0 =
|
527
|
-
__0s = @buffer_start_position +
|
528
|
-
__0e = @buffer_start_position +
|
529
|
-
__0sl = @buffer_start_position_loc +
|
530
|
-
__0el = @buffer_start_position_loc +
|
562
|
+
def action_quantity_0(__packcr_in, __packcr_vars, __packcr_index)
|
563
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
564
|
+
node = (__packcr_in.value_refs[0] ||= Value.new).value
|
565
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
566
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
567
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
568
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
569
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
531
570
|
____ = Packcr::Node::QuantityNode.new(node, 0, -1)
|
532
571
|
|
533
|
-
|
572
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
534
573
|
end
|
535
574
|
|
536
|
-
def action_quantity_1(
|
537
|
-
____ = (
|
538
|
-
node = (
|
539
|
-
__0 =
|
540
|
-
__0s = @buffer_start_position +
|
541
|
-
__0e = @buffer_start_position +
|
542
|
-
__0sl = @buffer_start_position_loc +
|
543
|
-
__0el = @buffer_start_position_loc +
|
575
|
+
def action_quantity_1(__packcr_in, __packcr_vars, __packcr_index)
|
576
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
577
|
+
node = (__packcr_in.value_refs[0] ||= Value.new).value
|
578
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
579
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
580
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
581
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
582
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
544
583
|
____ = Packcr::Node::QuantityNode.new(node, 1, -1)
|
545
584
|
|
546
|
-
|
585
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
547
586
|
end
|
548
587
|
|
549
|
-
def action_quantity_2(
|
550
|
-
____ = (
|
551
|
-
node = (
|
552
|
-
__0 =
|
553
|
-
__0s = @buffer_start_position +
|
554
|
-
__0e = @buffer_start_position +
|
555
|
-
__0sl = @buffer_start_position_loc +
|
556
|
-
__0el = @buffer_start_position_loc +
|
588
|
+
def action_quantity_2(__packcr_in, __packcr_vars, __packcr_index)
|
589
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
590
|
+
node = (__packcr_in.value_refs[0] ||= Value.new).value
|
591
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
592
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
593
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
594
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
595
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
557
596
|
____ = Packcr::Node::QuantityNode.new(node, 0, 1)
|
558
597
|
|
559
|
-
|
598
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
560
599
|
end
|
561
600
|
|
562
|
-
def action_quantity_3(
|
563
|
-
____ = (
|
564
|
-
node = (
|
565
|
-
__0 =
|
566
|
-
__0s = @buffer_start_position +
|
567
|
-
__0e = @buffer_start_position +
|
568
|
-
__0sl = @buffer_start_position_loc +
|
569
|
-
__0el = @buffer_start_position_loc +
|
601
|
+
def action_quantity_3(__packcr_in, __packcr_vars, __packcr_index)
|
602
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
603
|
+
node = (__packcr_in.value_refs[0] ||= Value.new).value
|
604
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
605
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
606
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
607
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
608
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
570
609
|
____ = node
|
571
610
|
|
572
|
-
|
611
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
573
612
|
end
|
574
613
|
|
575
|
-
def action_primary_0(
|
576
|
-
____ = (
|
577
|
-
code = (
|
578
|
-
__0 =
|
579
|
-
__0s = @buffer_start_position +
|
580
|
-
__0e = @buffer_start_position +
|
581
|
-
__0sl = @buffer_start_position_loc +
|
582
|
-
__0el = @buffer_start_position_loc +
|
614
|
+
def action_primary_0(__packcr_in, __packcr_vars, __packcr_index)
|
615
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
616
|
+
code = (__packcr_in.value_refs[0] ||= Value.new).value
|
617
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
618
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
619
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
620
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
621
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
583
622
|
____ = code && Packcr::Node::ActionNode.new(Packcr::CodeBlock.new(code, __0sl.linenum, __0sl.charnum))
|
584
623
|
|
585
|
-
|
624
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
586
625
|
end
|
587
626
|
|
588
|
-
def action_primary_1(
|
589
|
-
____ = (
|
590
|
-
var_name = (
|
591
|
-
name = (
|
592
|
-
__0 =
|
593
|
-
__0s = @buffer_start_position +
|
594
|
-
__0e = @buffer_start_position +
|
595
|
-
__0sl = @buffer_start_position_loc +
|
596
|
-
__0el = @buffer_start_position_loc +
|
627
|
+
def action_primary_1(__packcr_in, __packcr_vars, __packcr_index)
|
628
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
629
|
+
var_name = (__packcr_in.value_refs[1] ||= Value.new).value
|
630
|
+
name = (__packcr_in.value_refs[2] ||= Value.new).value
|
631
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
632
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
633
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
634
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
635
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
597
636
|
____ = Packcr::Node::ReferenceNode.new(name, var_name, __0sl.linenum, __0sl.charnum)
|
598
637
|
|
599
|
-
|
638
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
600
639
|
end
|
601
640
|
|
602
|
-
def action_primary_2(
|
603
|
-
____ = (
|
604
|
-
name = (
|
605
|
-
__0 =
|
606
|
-
__0s = @buffer_start_position +
|
607
|
-
__0e = @buffer_start_position +
|
608
|
-
__0sl = @buffer_start_position_loc +
|
609
|
-
__0el = @buffer_start_position_loc +
|
641
|
+
def action_primary_2(__packcr_in, __packcr_vars, __packcr_index)
|
642
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
643
|
+
name = (__packcr_in.value_refs[2] ||= Value.new).value
|
644
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
645
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
646
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
647
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
648
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
610
649
|
ref = Packcr::Node::ReferenceNode.new(name, "_out", __0sl.linenum, __0sl.charnum)
|
611
650
|
code = @ctx.pass_value_code("_out")
|
612
651
|
act = Packcr::Node::ActionNode.new(Packcr::CodeBlock.new(code, __0sl.linenum, __0sl.charnum))
|
613
652
|
____ = ref.seq(act)
|
614
653
|
|
615
|
-
|
654
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
616
655
|
end
|
617
656
|
|
618
|
-
def action_primary_3(
|
619
|
-
____ = (
|
620
|
-
name = (
|
621
|
-
__0 =
|
622
|
-
__0s = @buffer_start_position +
|
623
|
-
__0e = @buffer_start_position +
|
624
|
-
__0sl = @buffer_start_position_loc +
|
625
|
-
__0el = @buffer_start_position_loc +
|
657
|
+
def action_primary_3(__packcr_in, __packcr_vars, __packcr_index)
|
658
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
659
|
+
name = (__packcr_in.value_refs[2] ||= Value.new).value
|
660
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
661
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
662
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
663
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
664
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
626
665
|
____ = Packcr::Node::ReferenceNode.new(name, nil, __0sl.linenum, __0sl.charnum)
|
627
666
|
|
628
|
-
|
667
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
629
668
|
end
|
630
669
|
|
631
|
-
def action_primary_4(
|
632
|
-
____ = (
|
633
|
-
expr = (
|
634
|
-
__0 =
|
635
|
-
__0s = @buffer_start_position +
|
636
|
-
__0e = @buffer_start_position +
|
637
|
-
__0sl = @buffer_start_position_loc +
|
638
|
-
__0el = @buffer_start_position_loc +
|
670
|
+
def action_primary_4(__packcr_in, __packcr_vars, __packcr_index)
|
671
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
672
|
+
expr = (__packcr_in.value_refs[3] ||= Value.new).value
|
673
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
674
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
675
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
676
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
677
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
639
678
|
____ = expr
|
640
679
|
|
641
|
-
|
680
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
642
681
|
end
|
643
682
|
|
644
|
-
def action_primary_5(
|
645
|
-
____ = (
|
646
|
-
expr = (
|
647
|
-
__0 =
|
648
|
-
__0s = @buffer_start_position +
|
649
|
-
__0e = @buffer_start_position +
|
650
|
-
__0sl = @buffer_start_position_loc +
|
651
|
-
__0el = @buffer_start_position_loc +
|
683
|
+
def action_primary_5(__packcr_in, __packcr_vars, __packcr_index)
|
684
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
685
|
+
expr = (__packcr_in.value_refs[3] ||= Value.new).value
|
686
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
687
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
688
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
689
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
690
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
652
691
|
____ = Packcr::Node::CaptureNode.new(expr)
|
653
692
|
|
654
|
-
|
693
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
655
694
|
end
|
656
695
|
|
657
|
-
def action_primary_6(
|
658
|
-
____ = (
|
659
|
-
__0 =
|
660
|
-
__0s = @buffer_start_position +
|
661
|
-
__0e = @buffer_start_position +
|
662
|
-
__0sl = @buffer_start_position_loc +
|
663
|
-
__0el = @buffer_start_position_loc +
|
664
|
-
__1 =
|
665
|
-
__1s = @buffer_start_position +
|
666
|
-
__1e = @buffer_start_position +
|
667
|
-
__1sl = @buffer_start_position_loc +
|
668
|
-
__1el = @buffer_start_position_loc +
|
696
|
+
def action_primary_6(__packcr_in, __packcr_vars, __packcr_index)
|
697
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
698
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
699
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
700
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
701
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
702
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
703
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
704
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
705
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
706
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
707
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
669
708
|
____ = Packcr::Node::ExpandNode.new(__1.to_i - 1, __0sl.linenum, __0sl.charnum)
|
670
709
|
|
671
|
-
|
710
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
672
711
|
end
|
673
712
|
|
674
|
-
def action_primary_7(
|
675
|
-
____ = (
|
676
|
-
__0 =
|
677
|
-
__0s = @buffer_start_position +
|
678
|
-
__0e = @buffer_start_position +
|
679
|
-
__0sl = @buffer_start_position_loc +
|
680
|
-
__0el = @buffer_start_position_loc +
|
713
|
+
def action_primary_7(__packcr_in, __packcr_vars, __packcr_index)
|
714
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
715
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
716
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
717
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
718
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
719
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
681
720
|
____ = Packcr::Node::CharclassNode.new
|
682
721
|
|
683
|
-
|
722
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
684
723
|
end
|
685
724
|
|
686
|
-
def action_primary_8(
|
687
|
-
____ = (
|
688
|
-
str = (
|
689
|
-
__0 =
|
690
|
-
__0s = @buffer_start_position +
|
691
|
-
__0e = @buffer_start_position +
|
692
|
-
__0sl = @buffer_start_position_loc +
|
693
|
-
__0el = @buffer_start_position_loc +
|
725
|
+
def action_primary_8(__packcr_in, __packcr_vars, __packcr_index)
|
726
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
727
|
+
str = (__packcr_in.value_refs[4] ||= Value.new).value
|
728
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
729
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
730
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
731
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
732
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
694
733
|
____ = Packcr::Node::CharclassNode.new(Packcr.unescape_string(str, true))
|
695
734
|
|
696
|
-
|
735
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
697
736
|
end
|
698
737
|
|
699
|
-
def action_primary_9(
|
700
|
-
____ = (
|
701
|
-
str = (
|
702
|
-
__0 =
|
703
|
-
__0s = @buffer_start_position +
|
704
|
-
__0e = @buffer_start_position +
|
705
|
-
__0sl = @buffer_start_position_loc +
|
706
|
-
__0el = @buffer_start_position_loc +
|
738
|
+
def action_primary_9(__packcr_in, __packcr_vars, __packcr_index)
|
739
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
740
|
+
str = (__packcr_in.value_refs[4] ||= Value.new).value
|
741
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
742
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
743
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
744
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
745
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
707
746
|
____ = Packcr::Node::StringNode.new(Packcr.unescape_string(str, false))
|
708
747
|
|
709
|
-
|
748
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
710
749
|
end
|
711
750
|
|
712
|
-
def action_primary_10(
|
713
|
-
____ = (
|
714
|
-
str = (
|
715
|
-
__0 =
|
716
|
-
__0s = @buffer_start_position +
|
717
|
-
__0e = @buffer_start_position +
|
718
|
-
__0sl = @buffer_start_position_loc +
|
719
|
-
__0el = @buffer_start_position_loc +
|
751
|
+
def action_primary_10(__packcr_in, __packcr_vars, __packcr_index)
|
752
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
753
|
+
str = (__packcr_in.value_refs[4] ||= Value.new).value
|
754
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
755
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
756
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
757
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
758
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
720
759
|
____ = Packcr::Node::StringNode.new(Packcr.unescape_string(str, false))
|
721
760
|
|
722
|
-
|
761
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
723
762
|
end
|
724
763
|
|
725
|
-
def action_character_class_0(
|
726
|
-
____ = (
|
727
|
-
__0 =
|
728
|
-
__0s = @buffer_start_position +
|
729
|
-
__0e = @buffer_start_position +
|
730
|
-
__0sl = @buffer_start_position_loc +
|
731
|
-
__0el = @buffer_start_position_loc +
|
732
|
-
__1 =
|
733
|
-
__1s = @buffer_start_position +
|
734
|
-
__1e = @buffer_start_position +
|
735
|
-
__1sl = @buffer_start_position_loc +
|
736
|
-
__1el = @buffer_start_position_loc +
|
764
|
+
def action_character_class_0(__packcr_in, __packcr_vars, __packcr_index)
|
765
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
766
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
767
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
768
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
769
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
770
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
771
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
772
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
773
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
774
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
775
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
737
776
|
____ = __1
|
738
777
|
|
739
|
-
|
778
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
740
779
|
end
|
741
780
|
|
742
|
-
def action_lang_code_block_0(
|
743
|
-
____ = (
|
744
|
-
code = (
|
745
|
-
__0 =
|
746
|
-
__0s = @buffer_start_position +
|
747
|
-
__0e = @buffer_start_position +
|
748
|
-
__0sl = @buffer_start_position_loc +
|
749
|
-
__0el = @buffer_start_position_loc +
|
781
|
+
def action_lang_code_block_0(__packcr_in, __packcr_vars, __packcr_index)
|
782
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
783
|
+
code = (__packcr_in.value_refs[0] ||= Value.new).value
|
784
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
785
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
786
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
787
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
788
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
750
789
|
____ = code
|
751
790
|
|
752
|
-
|
791
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
753
792
|
end
|
754
793
|
|
755
|
-
def action_lang_code_block_1(
|
756
|
-
____ = (
|
757
|
-
code = (
|
758
|
-
__0 =
|
759
|
-
__0s = @buffer_start_position +
|
760
|
-
__0e = @buffer_start_position +
|
761
|
-
__0sl = @buffer_start_position_loc +
|
762
|
-
__0el = @buffer_start_position_loc +
|
763
|
-
__1 =
|
764
|
-
__1s = @buffer_start_position +
|
765
|
-
__1e = @buffer_start_position +
|
766
|
-
__1sl = @buffer_start_position_loc +
|
767
|
-
__1el = @buffer_start_position_loc +
|
794
|
+
def action_lang_code_block_1(__packcr_in, __packcr_vars, __packcr_index)
|
795
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
796
|
+
code = (__packcr_in.value_refs[0] ||= Value.new).value
|
797
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
798
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
799
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
800
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
801
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
802
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
803
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
804
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
805
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
806
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
768
807
|
____ = @ctx.lang == __1.to_sym ? code : nil
|
769
808
|
|
770
|
-
|
809
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
771
810
|
end
|
772
811
|
|
773
|
-
def action_code_block_0(
|
774
|
-
____ = (
|
775
|
-
code = (
|
776
|
-
__0 =
|
777
|
-
__0s = @buffer_start_position +
|
778
|
-
__0e = @buffer_start_position +
|
779
|
-
__0sl = @buffer_start_position_loc +
|
780
|
-
__0el = @buffer_start_position_loc +
|
812
|
+
def action_code_block_0(__packcr_in, __packcr_vars, __packcr_index)
|
813
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
814
|
+
code = (__packcr_in.value_refs[0] ||= Value.new).value
|
815
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
816
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
817
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
818
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
819
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
781
820
|
____ = code
|
782
821
|
|
783
|
-
|
822
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
784
823
|
end
|
785
824
|
|
786
|
-
def action_code_block_1(
|
787
|
-
____ = (
|
788
|
-
code = (
|
789
|
-
__0 =
|
790
|
-
__0s = @buffer_start_position +
|
791
|
-
__0e = @buffer_start_position +
|
792
|
-
__0sl = @buffer_start_position_loc +
|
793
|
-
__0el = @buffer_start_position_loc +
|
825
|
+
def action_code_block_1(__packcr_in, __packcr_vars, __packcr_index)
|
826
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
827
|
+
code = (__packcr_in.value_refs[0] ||= Value.new).value
|
828
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
829
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
830
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
831
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
832
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
794
833
|
____ = code.gsub("$", @ctx.lang == :rb ? "__" : "_")
|
795
834
|
|
796
|
-
|
835
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
797
836
|
end
|
798
837
|
|
799
|
-
def action_plain_code_block_0(
|
800
|
-
____ = (
|
801
|
-
__0 =
|
802
|
-
__0s = @buffer_start_position +
|
803
|
-
__0e = @buffer_start_position +
|
804
|
-
__0sl = @buffer_start_position_loc +
|
805
|
-
__0el = @buffer_start_position_loc +
|
806
|
-
__1 =
|
807
|
-
__1s = @buffer_start_position +
|
808
|
-
__1e = @buffer_start_position +
|
809
|
-
__1sl = @buffer_start_position_loc +
|
810
|
-
__1el = @buffer_start_position_loc +
|
838
|
+
def action_plain_code_block_0(__packcr_in, __packcr_vars, __packcr_index)
|
839
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
840
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
841
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
842
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
843
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
844
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
845
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
846
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
847
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
848
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
849
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
811
850
|
____ = __1
|
812
851
|
|
813
|
-
|
852
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
814
853
|
end
|
815
854
|
|
816
|
-
def action_quotation_single_0(
|
817
|
-
____ = (
|
818
|
-
__0 =
|
819
|
-
__0s = @buffer_start_position +
|
820
|
-
__0e = @buffer_start_position +
|
821
|
-
__0sl = @buffer_start_position_loc +
|
822
|
-
__0el = @buffer_start_position_loc +
|
823
|
-
__1 =
|
824
|
-
__1s = @buffer_start_position +
|
825
|
-
__1e = @buffer_start_position +
|
826
|
-
__1sl = @buffer_start_position_loc +
|
827
|
-
__1el = @buffer_start_position_loc +
|
855
|
+
def action_quotation_single_0(__packcr_in, __packcr_vars, __packcr_index)
|
856
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
857
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
858
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
859
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
860
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
861
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
862
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
863
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
864
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
865
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
866
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
828
867
|
____ = __1
|
829
868
|
|
830
|
-
|
869
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
831
870
|
end
|
832
871
|
|
833
|
-
def action_quotation_double_0(
|
834
|
-
____ = (
|
835
|
-
__0 =
|
836
|
-
__0s = @buffer_start_position +
|
837
|
-
__0e = @buffer_start_position +
|
838
|
-
__0sl = @buffer_start_position_loc +
|
839
|
-
__0el = @buffer_start_position_loc +
|
840
|
-
__1 =
|
841
|
-
__1s = @buffer_start_position +
|
842
|
-
__1e = @buffer_start_position +
|
843
|
-
__1sl = @buffer_start_position_loc +
|
844
|
-
__1el = @buffer_start_position_loc +
|
872
|
+
def action_quotation_double_0(__packcr_in, __packcr_vars, __packcr_index)
|
873
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
874
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
875
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
876
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
877
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
878
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
879
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
880
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
881
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
882
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
883
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
845
884
|
____ = __1
|
846
885
|
|
847
|
-
|
886
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
848
887
|
end
|
849
888
|
|
850
|
-
def action_identifier_0(
|
851
|
-
____ = (
|
852
|
-
__0 =
|
853
|
-
__0s = @buffer_start_position +
|
854
|
-
__0e = @buffer_start_position +
|
855
|
-
__0sl = @buffer_start_position_loc +
|
856
|
-
__0el = @buffer_start_position_loc +
|
889
|
+
def action_identifier_0(__packcr_in, __packcr_vars, __packcr_index)
|
890
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
891
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
892
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
893
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
894
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
895
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
857
896
|
____ = __0
|
858
897
|
|
859
|
-
|
898
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
860
899
|
end
|
861
900
|
|
862
|
-
def action_footer_0(
|
863
|
-
____ = (
|
864
|
-
__0 =
|
865
|
-
__0s = @buffer_start_position +
|
866
|
-
__0e = @buffer_start_position +
|
867
|
-
__0sl = @buffer_start_position_loc +
|
868
|
-
__0el = @buffer_start_position_loc +
|
869
|
-
__1 =
|
870
|
-
__1s = @buffer_start_position +
|
871
|
-
__1e = @buffer_start_position +
|
872
|
-
__1sl = @buffer_start_position_loc +
|
873
|
-
__1el = @buffer_start_position_loc +
|
901
|
+
def action_footer_0(__packcr_in, __packcr_vars, __packcr_index)
|
902
|
+
____ = (__packcr_vars[__packcr_index] ||= Value.new).value if __packcr_vars
|
903
|
+
__0 = __packcr_in.capt0.capture_string(@buffer)
|
904
|
+
__0s = @buffer_start_position + __packcr_in.capt0.range_start
|
905
|
+
__0e = @buffer_start_position + __packcr_in.capt0.range_end
|
906
|
+
__0sl = @buffer_start_position_loc + __packcr_in.capt0.start_loc
|
907
|
+
__0el = @buffer_start_position_loc + __packcr_in.capt0.end_loc
|
908
|
+
__1 = __packcr_in.capts[0].capture_string(@buffer)
|
909
|
+
__1s = @buffer_start_position + __packcr_in.capts[0].range_start
|
910
|
+
__1e = @buffer_start_position + __packcr_in.capts[0].range_end
|
911
|
+
__1sl = @buffer_start_position_loc + __packcr_in.capts[0].start_loc
|
912
|
+
__1el = @buffer_start_position_loc + __packcr_in.capts[0].end_loc
|
874
913
|
@ctx.code(:lsource) << Packcr::CodeBlock.new(__1, __1sl.linenum, __1sl.charnum)
|
875
914
|
|
876
|
-
|
915
|
+
__packcr_vars[__packcr_index].value = ____ if __packcr_vars
|
877
916
|
end
|
878
917
|
|
879
918
|
def evaluate_rule_statement(offset, offset_loc, limits: nil)
|
@@ -4690,6 +4729,7 @@ class Packcr
|
|
4690
4729
|
memo.grow = false
|
4691
4730
|
answer = memo.answer
|
4692
4731
|
@position_offset = memo.offset
|
4732
|
+
@position_offset_loc = memo.offset_loc
|
4693
4733
|
end
|
4694
4734
|
answer
|
4695
4735
|
elsif memo.fail
|
@@ -4698,6 +4738,7 @@ class Packcr
|
|
4698
4738
|
nil
|
4699
4739
|
else
|
4700
4740
|
@position_offset = memo.offset
|
4741
|
+
@position_offset_loc = memo.offset_loc
|
4701
4742
|
memo.answer
|
4702
4743
|
end
|
4703
4744
|
end
|
@@ -4708,11 +4749,15 @@ class Packcr
|
|
4708
4749
|
answer = public_send(rule, offset, offset_loc, limits: limits)
|
4709
4750
|
memo = @memos[offset, rule]
|
4710
4751
|
if !answer || @position_offset <= memo.offset
|
4711
|
-
|
4712
|
-
|
4752
|
+
if memo
|
4753
|
+
answer = memo.answer
|
4754
|
+
@position_offset = memo.offset
|
4755
|
+
@position_offset_loc = memo.offset_loc
|
4756
|
+
end
|
4713
4757
|
else
|
4714
4758
|
memo.answer = answer
|
4715
4759
|
memo.offset = @position_offset
|
4760
|
+
memo.offset_loc = @position_offset_loc
|
4716
4761
|
end
|
4717
4762
|
else
|
4718
4763
|
answer = rule_answer(rule)
|
@@ -4733,45 +4778,6 @@ class Packcr
|
|
4733
4778
|
end
|
4734
4779
|
end
|
4735
4780
|
|
4736
|
-
class Location
|
4737
|
-
attr_reader :charnum, :linenum
|
4738
|
-
|
4739
|
-
def initialize(charnum = 0, linenum = 0)
|
4740
|
-
@charnum = charnum
|
4741
|
-
@linenum = linenum
|
4742
|
-
end
|
4743
|
-
|
4744
|
-
def +(other)
|
4745
|
-
if other.linenum.zero?
|
4746
|
-
Location.new(@charnum + other.charnum, @linenum + other.linenum)
|
4747
|
-
else
|
4748
|
-
Location.new( other.charnum, @linenum + other.linenum)
|
4749
|
-
end
|
4750
|
-
end
|
4751
|
-
|
4752
|
-
def -(other)
|
4753
|
-
raise "unexpected location #{inspect} - #{other.inspect}" unless other.linenum == linenum || other.charnum.zero?
|
4754
|
-
|
4755
|
-
Location.new(@charnum - other.charnum, @linenum - other.linenum)
|
4756
|
-
end
|
4757
|
-
|
4758
|
-
def forward(buffer, cur, n)
|
4759
|
-
Location.new(@charnum, @linenum).forward!(buffer, cur, n)
|
4760
|
-
end
|
4761
|
-
|
4762
|
-
def forward!(buffer, cur, n)
|
4763
|
-
buffer[cur, n].scan(/(.*)(\n)?/) do
|
4764
|
-
if Regexp.last_match[2]
|
4765
|
-
@linenum += 1
|
4766
|
-
@charnum = 0
|
4767
|
-
else
|
4768
|
-
@charnum += Regexp.last_match[1].length
|
4769
|
-
end
|
4770
|
-
end
|
4771
|
-
self
|
4772
|
-
end
|
4773
|
-
end
|
4774
|
-
|
4775
4781
|
class LrMemoTable
|
4776
4782
|
def initialize
|
4777
4783
|
@memos = {}
|