puffy 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +21 -1
- data/Gemfile +13 -0
- data/Rakefile +2 -0
- data/lib/puffy/formatters/iptables.rb +10 -2
- data/lib/puffy/parser.tab.rb +340 -326
- data/lib/puffy/version.rb +1 -1
- data/puffy.gemspec +0 -13
- metadata +3 -171
data/lib/puffy/parser.tab.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
4
|
-
# from Racc grammar file "".
|
3
|
+
# This file is automatically generated by Racc 1.7.3
|
4
|
+
# from Racc grammar file "parser.y".
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'racc/parser.rb'
|
@@ -14,7 +14,7 @@ require 'strscan'
|
|
14
14
|
module Puffy
|
15
15
|
class Parser < Racc::Parser
|
16
16
|
|
17
|
-
module_eval(<<'...end parser.y/module_eval...', 'parser.y',
|
17
|
+
module_eval(<<'...end parser.y/module_eval...', 'parser.y', 166)
|
18
18
|
|
19
19
|
attr_accessor :yydebug
|
20
20
|
attr_reader :policy, :filename
|
@@ -77,7 +77,7 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 165)
|
|
77
77
|
when s.scan(/do\b/) then emit(:DO, s.matched)
|
78
78
|
when s.scan(/end\b/) then emit(:END, s.matched)
|
79
79
|
|
80
|
-
when s.scan(/\$\
|
80
|
+
when s.scan(/\$\w[\w-]*/) then emit(:VARIABLE, s.matched[1..-1], s.matched_size)
|
81
81
|
|
82
82
|
when s.scan(/pass\b/) then emit(:PASS, s.matched)
|
83
83
|
when s.scan(/block\b/) then emit(:BLOCK, s.matched)
|
@@ -103,7 +103,7 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 165)
|
|
103
103
|
when s.scan(/[[:xdigit:]]*:[:[:xdigit:]]+(\/\d+)?/) && ip = ipaddress?(s) then emit(:ADDRESS, ip, s.matched_size)
|
104
104
|
|
105
105
|
when s.scan(/\d+/) then emit(:INTEGER, s.matched.to_i, s.matched_size)
|
106
|
-
when s.scan(/\w[\w-]
|
106
|
+
when s.scan(/\w[\w-]*/) then emit(:IDENTIFIER, s.matched)
|
107
107
|
|
108
108
|
when s.scan(/=/) then emit('=', s.matched)
|
109
109
|
when s.scan(/:/) then emit(':', s.matched)
|
@@ -227,134 +227,138 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 165)
|
|
227
227
|
##### State transition tables begin ###
|
228
228
|
|
229
229
|
racc_action_table = [
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
26,
|
245
|
-
25, 26,
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
153,
|
230
|
+
134, 134, 131, 134, 134, 6, 155, 156, 167, 75,
|
231
|
+
162, 17, 160, 7, 8, 34, 110, 18, 9, 115,
|
232
|
+
116, 111, 110, 10, 35, 115, 116, 111, 110, 77,
|
233
|
+
78, 115, 116, 111, 21, 17, 133, 133, 22, 133,
|
234
|
+
133, 18, 169, 170, 107, 112, 120, 121, 113, 114,
|
235
|
+
107, 112, 17, 15, 113, 114, 107, 112, 18, 6,
|
236
|
+
113, 114, 6, 27, 39, 77, 78, 7, 8, 6,
|
237
|
+
7, 8, 9, 40, 24, 9, 6, 7, 8, 68,
|
238
|
+
25, 26, 9, 50, 7, 8, 77, 78, 67, 9,
|
239
|
+
48, 49, 51, 52, 50, 25, 26, 115, 116, 70,
|
240
|
+
39, 48, 49, 51, 52, 50, 25, 26, 69, 40,
|
241
|
+
9, 63, 48, 49, 51, 52, 50, 25, 26, 136,
|
242
|
+
137, 9, 79, 48, 49, 51, 52, 50, 25, 26,
|
243
|
+
141, 142, 115, 116, 48, 49, 51, 52, 50, 25,
|
244
|
+
26, 30, 31, 32, 97, 48, 49, 51, 52, 50,
|
245
|
+
25, 26, 30, 31, 32, 100, 48, 49, 51, 52,
|
246
|
+
50, 25, 26, 90, 91, 92, 101, 48, 49, 51,
|
247
|
+
52, 50, 25, 26, 90, 91, 92, 102, 48, 49,
|
248
|
+
51, 52, 50, 25, 26, 90, 91, 92, 103, 48,
|
249
|
+
49, 51, 52, 50, 25, 26, 90, 91, 92, 104,
|
250
|
+
48, 49, 51, 52, 50, 25, 26, 77, 78, 115,
|
251
|
+
116, 48, 49, 51, 52, 50, 25, 26, 169, 170,
|
252
|
+
105, 119, 48, 49, 51, 52, 19, 25, 26, 123,
|
253
|
+
21, 17, 55, 56, 22, 21, 21, 18, 28, 22,
|
254
|
+
22, 30, 31, 32, 60, 61, 30, 31, 32, 162,
|
255
|
+
114, 114, 171, 172, 114, 129, 130, 138, 144, 145,
|
256
|
+
148, 150, 114, 153, 154, 158, 162, 175, 176, 162,
|
257
|
+
178, 179 ]
|
257
258
|
|
258
259
|
racc_action_check = [
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
8,
|
283
|
-
|
284
|
-
|
285
|
-
144,
|
260
|
+
114, 131, 114, 146, 156, 0, 146, 146, 164, 53,
|
261
|
+
150, 7, 150, 0, 0, 16, 90, 7, 0, 90,
|
262
|
+
90, 90, 91, 1, 16, 91, 91, 91, 123, 53,
|
263
|
+
53, 123, 123, 123, 19, 50, 114, 131, 19, 146,
|
264
|
+
156, 50, 164, 164, 90, 90, 98, 98, 90, 90,
|
265
|
+
91, 91, 51, 6, 91, 91, 123, 123, 51, 2,
|
266
|
+
123, 123, 3, 10, 20, 98, 98, 2, 2, 4,
|
267
|
+
3, 3, 2, 20, 9, 3, 5, 4, 4, 48,
|
268
|
+
9, 9, 4, 34, 5, 5, 75, 75, 48, 5,
|
269
|
+
34, 34, 34, 34, 35, 34, 34, 110, 110, 49,
|
270
|
+
55, 35, 35, 35, 35, 39, 35, 35, 49, 55,
|
271
|
+
39, 44, 39, 39, 39, 39, 40, 39, 39, 118,
|
272
|
+
118, 40, 54, 40, 40, 40, 40, 45, 40, 40,
|
273
|
+
126, 126, 126, 126, 45, 45, 45, 45, 46, 45,
|
274
|
+
45, 28, 28, 28, 74, 46, 46, 46, 46, 47,
|
275
|
+
46, 46, 61, 61, 61, 82, 47, 47, 47, 47,
|
276
|
+
58, 47, 47, 71, 71, 71, 83, 58, 58, 58,
|
277
|
+
58, 59, 58, 58, 72, 72, 72, 85, 59, 59,
|
278
|
+
59, 59, 67, 59, 59, 73, 73, 73, 86, 67,
|
279
|
+
67, 67, 67, 68, 67, 67, 149, 149, 149, 87,
|
280
|
+
68, 68, 68, 68, 69, 68, 68, 121, 121, 142,
|
281
|
+
142, 69, 69, 69, 69, 70, 69, 69, 167, 167,
|
282
|
+
88, 96, 70, 70, 70, 70, 8, 70, 70, 106,
|
283
|
+
8, 52, 36, 36, 8, 36, 56, 52, 15, 36,
|
284
|
+
56, 15, 15, 15, 42, 42, 42, 42, 42, 165,
|
285
|
+
107, 108, 165, 165, 111, 112, 113, 119, 129, 130,
|
286
|
+
133, 135, 141, 144, 145, 148, 160, 169, 170, 172,
|
287
|
+
175, 178 ]
|
286
288
|
|
287
289
|
racc_action_pointer = [
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
nil, nil, nil,
|
292
|
-
nil,
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
nil,
|
297
|
-
|
298
|
-
nil, nil, nil, nil, nil,
|
299
|
-
|
300
|
-
|
301
|
-
-1, nil,
|
302
|
-
|
303
|
-
nil, nil, nil, nil, nil, 2, nil, nil, nil,
|
304
|
-
nil, nil, nil, 2,
|
305
|
-
nil,
|
290
|
+
3, 23, 57, 60, 67, 74, 50, 9, 222, 58,
|
291
|
+
63, nil, nil, nil, nil, 234, 11, nil, nil, 26,
|
292
|
+
60, nil, nil, nil, nil, nil, nil, nil, 134, nil,
|
293
|
+
nil, nil, nil, nil, 73, 84, 227, nil, nil, 95,
|
294
|
+
106, nil, 239, nil, 106, 117, 128, 139, 75, 95,
|
295
|
+
33, 50, 229, 5, 108, 96, 228, nil, 150, 161,
|
296
|
+
nil, 145, nil, nil, nil, nil, nil, 172, 183, 194,
|
297
|
+
205, 134, 145, 156, 128, 62, nil, nil, nil, nil,
|
298
|
+
nil, nil, 150, 152, nil, 163, 183, 185, 215, nil,
|
299
|
+
12, 18, nil, nil, nil, nil, 200, nil, 41, nil,
|
300
|
+
nil, nil, nil, nil, nil, nil, 199, 213, 214, nil,
|
301
|
+
90, 217, 221, 222, -2, nil, nil, nil, 93, 249,
|
302
|
+
nil, 183, nil, 24, nil, nil, 125, nil, nil, 250,
|
303
|
+
251, -1, nil, 221, nil, 233, nil, nil, nil, nil,
|
304
|
+
nil, 225, 202, nil, 228, 229, 1, nil, 227, 167,
|
305
|
+
8, nil, nil, nil, nil, nil, 2, nil, nil, nil,
|
306
|
+
264, nil, nil, nil, 2, 247, nil, 178, nil, 260,
|
307
|
+
261, nil, 267, nil, nil, 233, nil, nil, 233, nil ]
|
306
308
|
|
307
309
|
racc_action_default = [
|
308
|
-
-5,
|
309
|
-
|
310
|
-
|
311
|
-
-11, -12, -13, -
|
312
|
-
-
|
313
|
-
|
314
|
-
|
315
|
-
-
|
316
|
-
-
|
317
|
-
-
|
318
|
-
-24, -
|
319
|
-
|
320
|
-
-
|
321
|
-
|
322
|
-
-
|
323
|
-
|
324
|
-
|
325
|
-
|
310
|
+
-5, -100, -5, -5, -5, -5, -100, -100, -100, -100,
|
311
|
+
-100, -1, -2, -3, -4, -100, -100, -15, -16, -100,
|
312
|
+
-100, -22, -23, -33, -34, -47, -48, 180, -100, -7,
|
313
|
+
-11, -12, -13, -14, -32, -32, -100, -21, -18, -32,
|
314
|
+
-32, -26, -100, -10, -100, -32, -32, -32, -100, -100,
|
315
|
+
-100, -100, -100, -49, -100, -100, -100, -20, -32, -32,
|
316
|
+
-6, -100, -9, -27, -29, -30, -31, -32, -32, -32,
|
317
|
+
-32, -72, -72, -72, -44, -100, -51, -55, -56, -28,
|
318
|
+
-17, -19, -100, -100, -8, -100, -100, -100, -100, -39,
|
319
|
+
-82, -82, -70, -71, -40, -41, -45, -43, -100, -54,
|
320
|
+
-24, -25, -35, -36, -37, -38, -68, -82, -82, -75,
|
321
|
+
-100, -82, -100, -100, -100, -89, -90, -69, -57, -100,
|
322
|
+
-50, -100, -53, -82, -73, -74, -100, -93, -77, -100,
|
323
|
+
-100, -100, -81, -86, -87, -60, -58, -59, -46, -52,
|
324
|
+
-67, -82, -100, -92, -100, -100, -100, -85, -100, -100,
|
325
|
+
-100, -76, -91, -78, -79, -80, -100, -84, -88, -96,
|
326
|
+
-100, -62, -66, -83, -42, -100, -65, -100, -95, -100,
|
327
|
+
-100, -61, -100, -64, -94, -98, -99, -63, -100, -97 ]
|
326
328
|
|
327
329
|
racc_goto_table = [
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
330
|
+
76, 20, 132, 16, 29, 38, 161, 124, 125, 106,
|
331
|
+
117, 128, 37, 58, 59, 168, 166, 43, 174, 147,
|
332
|
+
127, 173, 99, 89, 94, 95, 42, 33, 177, 57,
|
333
|
+
36, 62, 23, 74, 157, 96, 143, 118, 135, 149,
|
334
|
+
80, 151, 140, 159, 163, 122, 71, 72, 73, 81,
|
335
|
+
84, 54, 152, 164, 98, 1, 54, 11, 12, 13,
|
336
|
+
14, 64, 65, 66, 165, 126, 146, nil, 139, nil,
|
337
|
+
nil, nil, nil, nil, 82, 83, nil, nil, nil, nil,
|
338
|
+
nil, nil, nil, 85, 86, 87, 88 ]
|
336
339
|
|
337
340
|
racc_goto_check = [
|
338
|
-
27, 12, 35,
|
339
|
-
|
340
|
-
|
341
|
-
7,
|
342
|
-
|
343
|
-
|
344
|
-
1,
|
345
|
-
|
341
|
+
27, 12, 35, 8, 7, 11, 29, 31, 31, 30,
|
342
|
+
30, 31, 12, 4, 4, 36, 29, 7, 36, 35,
|
343
|
+
32, 29, 27, 18, 18, 18, 6, 9, 29, 12,
|
344
|
+
10, 7, 17, 19, 35, 20, 32, 21, 22, 23,
|
345
|
+
11, 31, 30, 24, 35, 27, 8, 8, 8, 12,
|
346
|
+
7, 13, 32, 25, 26, 1, 13, 1, 1, 1,
|
347
|
+
1, 13, 13, 13, 28, 33, 34, nil, 27, nil,
|
348
|
+
nil, nil, nil, nil, 13, 13, nil, nil, nil, nil,
|
349
|
+
nil, nil, nil, 13, 13, 13, 13 ]
|
346
350
|
|
347
351
|
racc_goto_pointer = [
|
348
|
-
nil,
|
349
|
-
|
350
|
-
-
|
351
|
-
-
|
352
|
+
nil, 55, nil, nil, -26, nil, -2, -11, -4, 11,
|
353
|
+
11, -15, -7, 16, nil, nil, nil, 23, -48, -20,
|
354
|
+
-39, -59, -80, -96, -106, -106, -21, -53, -96, -144,
|
355
|
+
-81, -100, -90, -45, -65, -112, -149 ]
|
352
356
|
|
353
357
|
racc_goto_default = [
|
354
|
-
nil, nil, 2, 3, 4, 5, nil, nil, nil,
|
355
|
-
nil, nil, nil,
|
356
|
-
nil, nil, nil, nil,
|
357
|
-
nil,
|
358
|
+
nil, nil, 2, 3, 4, 5, nil, nil, nil, 41,
|
359
|
+
nil, nil, nil, 44, 45, 46, 47, 53, nil, nil,
|
360
|
+
nil, nil, nil, nil, 93, nil, nil, nil, nil, nil,
|
361
|
+
nil, 109, 108, nil, nil, nil, nil ]
|
358
362
|
|
359
363
|
racc_reduce_table = [
|
360
364
|
0, 0, :racc_error,
|
@@ -370,96 +374,97 @@ racc_reduce_table = [
|
|
370
374
|
1, 48, :_reduce_10,
|
371
375
|
1, 49, :_reduce_11,
|
372
376
|
1, 49, :_reduce_12,
|
373
|
-
|
374
|
-
|
377
|
+
1, 49, :_reduce_13,
|
378
|
+
3, 47, :_reduce_14,
|
375
379
|
1, 50, :_reduce_15,
|
376
|
-
|
377
|
-
|
378
|
-
3,
|
379
|
-
|
380
|
-
|
381
|
-
1,
|
380
|
+
1, 50, :_reduce_16,
|
381
|
+
5, 45, :_reduce_17,
|
382
|
+
3, 45, :_reduce_18,
|
383
|
+
3, 52, :_reduce_19,
|
384
|
+
2, 52, :_reduce_20,
|
385
|
+
1, 52, :_reduce_21,
|
382
386
|
1, 54, :_reduce_22,
|
383
|
-
|
387
|
+
1, 54, :_reduce_23,
|
384
388
|
4, 53, :_reduce_24,
|
385
|
-
|
386
|
-
|
389
|
+
4, 53, :_reduce_25,
|
390
|
+
1, 53, :_reduce_26,
|
387
391
|
3, 51, :_reduce_27,
|
388
|
-
|
392
|
+
3, 51, :_reduce_28,
|
389
393
|
2, 55, :_reduce_29,
|
390
394
|
2, 55, :_reduce_30,
|
391
|
-
|
392
|
-
|
395
|
+
2, 55, :_reduce_31,
|
396
|
+
0, 55, :_reduce_32,
|
393
397
|
2, 46, :_reduce_33,
|
394
|
-
|
398
|
+
2, 46, :_reduce_34,
|
395
399
|
4, 57, :_reduce_35,
|
396
|
-
4,
|
400
|
+
4, 57, :_reduce_36,
|
397
401
|
4, 58, :_reduce_37,
|
398
|
-
|
402
|
+
4, 58, :_reduce_38,
|
399
403
|
3, 56, :_reduce_39,
|
400
404
|
3, 56, :_reduce_40,
|
401
|
-
|
405
|
+
3, 56, :_reduce_41,
|
406
|
+
8, 56, :_reduce_42,
|
402
407
|
1, 62, :_reduce_none,
|
403
408
|
0, 62, :_reduce_none,
|
404
409
|
0, 63, :_reduce_none,
|
405
|
-
2, 63, :
|
406
|
-
1, 59, :_reduce_46,
|
410
|
+
2, 63, :_reduce_46,
|
407
411
|
1, 59, :_reduce_47,
|
412
|
+
1, 59, :_reduce_48,
|
408
413
|
0, 61, :_reduce_none,
|
409
|
-
3, 61, :
|
410
|
-
1, 61, :
|
411
|
-
3, 68, :
|
412
|
-
2, 68, :
|
413
|
-
1, 68, :
|
414
|
-
1, 69, :_reduce_54,
|
414
|
+
3, 61, :_reduce_50,
|
415
|
+
1, 61, :_reduce_51,
|
416
|
+
3, 68, :_reduce_52,
|
417
|
+
2, 68, :_reduce_53,
|
418
|
+
1, 68, :_reduce_54,
|
415
419
|
1, 69, :_reduce_55,
|
420
|
+
1, 69, :_reduce_56,
|
416
421
|
0, 64, :_reduce_none,
|
417
|
-
1, 64, :_reduce_57,
|
418
422
|
1, 64, :_reduce_58,
|
423
|
+
1, 64, :_reduce_59,
|
419
424
|
0, 65, :_reduce_none,
|
420
|
-
4, 65, :
|
421
|
-
2, 65, :
|
422
|
-
3, 70, :
|
423
|
-
2, 70, :
|
424
|
-
1, 70, :
|
425
|
-
1, 71, :
|
426
|
-
4, 66, :
|
427
|
-
2, 66, :_reduce_67,
|
425
|
+
4, 65, :_reduce_61,
|
426
|
+
2, 65, :_reduce_62,
|
427
|
+
3, 70, :_reduce_63,
|
428
|
+
2, 70, :_reduce_64,
|
429
|
+
1, 70, :_reduce_65,
|
430
|
+
1, 71, :_reduce_66,
|
431
|
+
4, 66, :_reduce_67,
|
428
432
|
2, 66, :_reduce_68,
|
429
|
-
|
433
|
+
2, 66, :_reduce_69,
|
434
|
+
1, 66, :_reduce_70,
|
430
435
|
1, 60, :_reduce_none,
|
431
|
-
0, 60, :
|
432
|
-
2, 72, :_reduce_72,
|
436
|
+
0, 60, :_reduce_72,
|
433
437
|
2, 72, :_reduce_73,
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
+
2, 72, :_reduce_74,
|
439
|
+
1, 72, :_reduce_75,
|
440
|
+
4, 72, :_reduce_76,
|
441
|
+
2, 72, :_reduce_77,
|
438
442
|
4, 72, :_reduce_78,
|
439
|
-
4,
|
440
|
-
|
443
|
+
4, 72, :_reduce_79,
|
444
|
+
4, 73, :_reduce_80,
|
445
|
+
2, 73, :_reduce_81,
|
441
446
|
0, 73, :_reduce_none,
|
442
|
-
3, 76, :
|
443
|
-
2, 76, :
|
444
|
-
1, 76, :
|
445
|
-
1, 77, :_reduce_85,
|
447
|
+
3, 76, :_reduce_83,
|
448
|
+
2, 76, :_reduce_84,
|
449
|
+
1, 76, :_reduce_85,
|
446
450
|
1, 77, :_reduce_86,
|
447
|
-
|
448
|
-
|
451
|
+
1, 77, :_reduce_87,
|
452
|
+
3, 77, :_reduce_88,
|
449
453
|
1, 74, :_reduce_89,
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
2, 78, :_reduce_98
|
454
|
+
1, 74, :_reduce_90,
|
455
|
+
3, 75, :_reduce_91,
|
456
|
+
2, 75, :_reduce_92,
|
457
|
+
1, 75, :_reduce_93,
|
458
|
+
3, 67, :_reduce_94,
|
459
|
+
2, 67, :_reduce_95,
|
460
|
+
0, 67, :_reduce_96,
|
461
|
+
4, 78, :_reduce_97,
|
462
|
+
2, 78, :_reduce_98,
|
463
|
+
2, 78, :_reduce_99 ]
|
459
464
|
|
460
|
-
racc_reduce_n =
|
465
|
+
racc_reduce_n = 100
|
461
466
|
|
462
|
-
racc_shift_n =
|
467
|
+
racc_shift_n = 180
|
463
468
|
|
464
469
|
racc_token_table = {
|
465
470
|
false => 0,
|
@@ -471,30 +476,30 @@ racc_token_table = {
|
|
471
476
|
"," => 6,
|
472
477
|
:ADDRESS => 7,
|
473
478
|
:STRING => 8,
|
474
|
-
:
|
475
|
-
:
|
476
|
-
:
|
477
|
-
:
|
478
|
-
:
|
479
|
-
:
|
480
|
-
:
|
481
|
-
:
|
482
|
-
:
|
483
|
-
:
|
484
|
-
:
|
485
|
-
:
|
486
|
-
:
|
487
|
-
:
|
488
|
-
:
|
489
|
-
:
|
490
|
-
:
|
491
|
-
:
|
492
|
-
:
|
493
|
-
:
|
494
|
-
:
|
495
|
-
:
|
496
|
-
:
|
497
|
-
:
|
479
|
+
:VARIABLE => 9,
|
480
|
+
:SERVICE => 10,
|
481
|
+
:NODE => 11,
|
482
|
+
:REGEX => 12,
|
483
|
+
:DO => 13,
|
484
|
+
:END => 14,
|
485
|
+
:POLICY => 15,
|
486
|
+
:LOG => 16,
|
487
|
+
:IPV4 => 17,
|
488
|
+
:IPV6 => 18,
|
489
|
+
:CLIENT => 19,
|
490
|
+
:SERVER => 20,
|
491
|
+
:ON => 21,
|
492
|
+
:BLOCK => 22,
|
493
|
+
:PASS => 23,
|
494
|
+
:IN => 24,
|
495
|
+
:OUT => 25,
|
496
|
+
:INET => 26,
|
497
|
+
:INET6 => 27,
|
498
|
+
:PROTO => 28,
|
499
|
+
:FROM => 29,
|
500
|
+
:TO => 30,
|
501
|
+
:ALL => 31,
|
502
|
+
:ANY => 32,
|
498
503
|
:SRV => 33,
|
499
504
|
"(" => 34,
|
500
505
|
")" => 35,
|
@@ -524,6 +529,7 @@ Racc_arg = [
|
|
524
529
|
racc_shift_n,
|
525
530
|
racc_reduce_n,
|
526
531
|
racc_use_result_var ]
|
532
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
527
533
|
|
528
534
|
Racc_token_to_s_table = [
|
529
535
|
"$end",
|
@@ -535,6 +541,7 @@ Racc_token_to_s_table = [
|
|
535
541
|
"\",\"",
|
536
542
|
"ADDRESS",
|
537
543
|
"STRING",
|
544
|
+
"VARIABLE",
|
538
545
|
"SERVICE",
|
539
546
|
"NODE",
|
540
547
|
"REGEX",
|
@@ -558,7 +565,6 @@ Racc_token_to_s_table = [
|
|
558
565
|
"TO",
|
559
566
|
"ALL",
|
560
567
|
"ANY",
|
561
|
-
"VARIABLE",
|
562
568
|
"SRV",
|
563
569
|
"\"(\"",
|
564
570
|
"\")\"",
|
@@ -605,6 +611,7 @@ Racc_token_to_s_table = [
|
|
605
611
|
"port_list",
|
606
612
|
"port",
|
607
613
|
"filteropt" ]
|
614
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
608
615
|
|
609
616
|
Racc_debug_parser = false
|
610
617
|
|
@@ -629,7 +636,7 @@ module_eval(<<'.,.,', 'parser.y', 4)
|
|
629
636
|
|
630
637
|
module_eval(<<'.,.,', 'parser.y', 8)
|
631
638
|
def _reduce_6(val, _values, result)
|
632
|
-
@variables[val[0][:value]] = val[3].freeze
|
639
|
+
@variables[val[0][:value]] = val[3].flatten.freeze
|
633
640
|
result
|
634
641
|
end
|
635
642
|
.,.,
|
@@ -676,16 +683,16 @@ module_eval(<<'.,.,', 'parser.y', 16)
|
|
676
683
|
end
|
677
684
|
.,.,
|
678
685
|
|
679
|
-
module_eval(<<'.,.,', 'parser.y',
|
686
|
+
module_eval(<<'.,.,', 'parser.y', 17)
|
680
687
|
def _reduce_13(val, _values, result)
|
681
|
-
|
688
|
+
result = @variables.fetch(val[0][:value])
|
682
689
|
result
|
683
690
|
end
|
684
691
|
.,.,
|
685
692
|
|
686
|
-
module_eval(<<'.,.,', 'parser.y',
|
693
|
+
module_eval(<<'.,.,', 'parser.y', 19)
|
687
694
|
def _reduce_14(val, _values, result)
|
688
|
-
|
695
|
+
@services[val[1]] = val[2]
|
689
696
|
result
|
690
697
|
end
|
691
698
|
.,.,
|
@@ -697,44 +704,44 @@ module_eval(<<'.,.,', 'parser.y', 21)
|
|
697
704
|
end
|
698
705
|
.,.,
|
699
706
|
|
700
|
-
module_eval(<<'.,.,', 'parser.y',
|
707
|
+
module_eval(<<'.,.,', 'parser.y', 22)
|
701
708
|
def _reduce_16(val, _values, result)
|
702
|
-
|
709
|
+
result = val[0][:value]
|
703
710
|
result
|
704
711
|
end
|
705
712
|
.,.,
|
706
713
|
|
707
714
|
module_eval(<<'.,.,', 'parser.y', 24)
|
708
715
|
def _reduce_17(val, _values, result)
|
709
|
-
@nodes[
|
716
|
+
val[2].each { |name| @nodes[name] = val[4]; @saved_policies[name] = @policy }
|
710
717
|
result
|
711
718
|
end
|
712
719
|
.,.,
|
713
720
|
|
714
|
-
module_eval(<<'.,.,', 'parser.y',
|
721
|
+
module_eval(<<'.,.,', 'parser.y', 25)
|
715
722
|
def _reduce_18(val, _values, result)
|
716
|
-
|
723
|
+
@nodes[val[1]] = val[2]; @saved_policies[val[1]] = @policy
|
717
724
|
result
|
718
725
|
end
|
719
726
|
.,.,
|
720
727
|
|
721
728
|
module_eval(<<'.,.,', 'parser.y', 27)
|
722
729
|
def _reduce_19(val, _values, result)
|
723
|
-
result = val[0] + [val[
|
730
|
+
result = val[0] + [val[2]]
|
724
731
|
result
|
725
732
|
end
|
726
733
|
.,.,
|
727
734
|
|
728
735
|
module_eval(<<'.,.,', 'parser.y', 28)
|
729
736
|
def _reduce_20(val, _values, result)
|
730
|
-
result =
|
737
|
+
result = val[0] + [val[1]]
|
731
738
|
result
|
732
739
|
end
|
733
740
|
.,.,
|
734
741
|
|
735
|
-
module_eval(<<'.,.,', 'parser.y',
|
742
|
+
module_eval(<<'.,.,', 'parser.y', 29)
|
736
743
|
def _reduce_21(val, _values, result)
|
737
|
-
result = val[0]
|
744
|
+
result = [val[0]]
|
738
745
|
result
|
739
746
|
end
|
740
747
|
.,.,
|
@@ -746,9 +753,9 @@ module_eval(<<'.,.,', 'parser.y', 31)
|
|
746
753
|
end
|
747
754
|
.,.,
|
748
755
|
|
749
|
-
module_eval(<<'.,.,', 'parser.y',
|
756
|
+
module_eval(<<'.,.,', 'parser.y', 32)
|
750
757
|
def _reduce_23(val, _values, result)
|
751
|
-
|
758
|
+
result = val[0][:value]
|
752
759
|
result
|
753
760
|
end
|
754
761
|
.,.,
|
@@ -762,14 +769,14 @@ module_eval(<<'.,.,', 'parser.y', 34)
|
|
762
769
|
|
763
770
|
module_eval(<<'.,.,', 'parser.y', 35)
|
764
771
|
def _reduce_25(val, _values, result)
|
765
|
-
@policy =
|
772
|
+
@policy = val[1]; result = val[2]
|
766
773
|
result
|
767
774
|
end
|
768
775
|
.,.,
|
769
776
|
|
770
|
-
module_eval(<<'.,.,', 'parser.y',
|
777
|
+
module_eval(<<'.,.,', 'parser.y', 36)
|
771
778
|
def _reduce_26(val, _values, result)
|
772
|
-
result = val[
|
779
|
+
@policy = nil; result = val[0]
|
773
780
|
result
|
774
781
|
end
|
775
782
|
.,.,
|
@@ -781,9 +788,9 @@ module_eval(<<'.,.,', 'parser.y', 38)
|
|
781
788
|
end
|
782
789
|
.,.,
|
783
790
|
|
784
|
-
module_eval(<<'.,.,', 'parser.y',
|
791
|
+
module_eval(<<'.,.,', 'parser.y', 39)
|
785
792
|
def _reduce_28(val, _values, result)
|
786
|
-
result = val[
|
793
|
+
result = val[1].freeze
|
787
794
|
result
|
788
795
|
end
|
789
796
|
.,.,
|
@@ -804,28 +811,28 @@ module_eval(<<'.,.,', 'parser.y', 42)
|
|
804
811
|
|
805
812
|
module_eval(<<'.,.,', 'parser.y', 43)
|
806
813
|
def _reduce_31(val, _values, result)
|
807
|
-
result = []
|
814
|
+
result = val[0] + val[1]
|
808
815
|
result
|
809
816
|
end
|
810
817
|
.,.,
|
811
818
|
|
812
|
-
module_eval(<<'.,.,', 'parser.y',
|
819
|
+
module_eval(<<'.,.,', 'parser.y', 44)
|
813
820
|
def _reduce_32(val, _values, result)
|
814
|
-
result =
|
821
|
+
result = []
|
815
822
|
result
|
816
823
|
end
|
817
824
|
.,.,
|
818
825
|
|
819
826
|
module_eval(<<'.,.,', 'parser.y', 46)
|
820
827
|
def _reduce_33(val, _values, result)
|
821
|
-
result =
|
828
|
+
result = val[1][:action]
|
822
829
|
result
|
823
830
|
end
|
824
831
|
.,.,
|
825
832
|
|
826
|
-
module_eval(<<'.,.,', 'parser.y',
|
833
|
+
module_eval(<<'.,.,', 'parser.y', 47)
|
827
834
|
def _reduce_34(val, _values, result)
|
828
|
-
result =
|
835
|
+
result = 'log'
|
829
836
|
result
|
830
837
|
end
|
831
838
|
.,.,
|
@@ -837,9 +844,9 @@ module_eval(<<'.,.,', 'parser.y', 49)
|
|
837
844
|
end
|
838
845
|
.,.,
|
839
846
|
|
840
|
-
module_eval(<<'.,.,', 'parser.y',
|
847
|
+
module_eval(<<'.,.,', 'parser.y', 50)
|
841
848
|
def _reduce_36(val, _values, result)
|
842
|
-
result = val[2].reject { |x| x[:af] == :
|
849
|
+
result = val[2].reject { |x| x[:af] == :inet6 }.map { |x| x[:af] = :inet ; x }
|
843
850
|
result
|
844
851
|
end
|
845
852
|
.,.,
|
@@ -851,8 +858,15 @@ module_eval(<<'.,.,', 'parser.y', 52)
|
|
851
858
|
end
|
852
859
|
.,.,
|
853
860
|
|
854
|
-
module_eval(<<'.,.,', 'parser.y',
|
861
|
+
module_eval(<<'.,.,', 'parser.y', 53)
|
855
862
|
def _reduce_38(val, _values, result)
|
863
|
+
result = val[2].reject { |x| x[:af] == :inet }.map { |x| x[:af] = :inet6 ; x }
|
864
|
+
result
|
865
|
+
end
|
866
|
+
.,.,
|
867
|
+
|
868
|
+
module_eval(<<'.,.,', 'parser.y', 56)
|
869
|
+
def _reduce_39(val, _values, result)
|
856
870
|
begin
|
857
871
|
result = constraint_service_to_hosts(val[1], val[2])
|
858
872
|
rescue KeyError
|
@@ -863,8 +877,8 @@ module_eval(<<'.,.,', 'parser.y', 55)
|
|
863
877
|
end
|
864
878
|
.,.,
|
865
879
|
|
866
|
-
module_eval(<<'.,.,', 'parser.y',
|
867
|
-
def
|
880
|
+
module_eval(<<'.,.,', 'parser.y', 63)
|
881
|
+
def _reduce_40(val, _values, result)
|
868
882
|
begin
|
869
883
|
raise "service #{val[1]} cannot be used as client" if @services.fetch(val[1]).map { |x| x[:dir] }.compact.any?
|
870
884
|
result = constraint_service_to_hosts(val[1], val[2]).map { |item| item.merge(dir: :out) }
|
@@ -876,8 +890,8 @@ module_eval(<<'.,.,', 'parser.y', 62)
|
|
876
890
|
end
|
877
891
|
.,.,
|
878
892
|
|
879
|
-
module_eval(<<'.,.,', 'parser.y',
|
880
|
-
def
|
893
|
+
module_eval(<<'.,.,', 'parser.y', 71)
|
894
|
+
def _reduce_41(val, _values, result)
|
881
895
|
begin
|
882
896
|
raise "service #{val[1]} cannot be used as server" if @services.fetch(val[1]).map { |x| x[:dir] }.compact.any?
|
883
897
|
result = constraint_service_to_hosts(val[1], val[2]).map { |item| item.merge(dir: :in) }
|
@@ -889,277 +903,270 @@ module_eval(<<'.,.,', 'parser.y', 70)
|
|
889
903
|
end
|
890
904
|
.,.,
|
891
905
|
|
892
|
-
module_eval(<<'.,.,', 'parser.y',
|
893
|
-
def
|
906
|
+
module_eval(<<'.,.,', 'parser.y', 78)
|
907
|
+
def _reduce_42(val, _values, result)
|
894
908
|
result = [val.compact.inject(:merge)]
|
895
909
|
result
|
896
910
|
end
|
897
911
|
.,.,
|
898
912
|
|
899
|
-
# reduce 42 omitted
|
900
|
-
|
901
913
|
# reduce 43 omitted
|
902
914
|
|
903
915
|
# reduce 44 omitted
|
904
916
|
|
905
|
-
|
906
|
-
def _reduce_45(val, _values, result)
|
907
|
-
result = { on: val[1][:value] }
|
908
|
-
result
|
909
|
-
end
|
910
|
-
.,.,
|
917
|
+
# reduce 45 omitted
|
911
918
|
|
912
|
-
module_eval(<<'.,.,', 'parser.y',
|
919
|
+
module_eval(<<'.,.,', 'parser.y', 84)
|
913
920
|
def _reduce_46(val, _values, result)
|
914
|
-
result = {
|
921
|
+
result = { on: val[1][:value] }
|
915
922
|
result
|
916
923
|
end
|
917
924
|
.,.,
|
918
925
|
|
919
926
|
module_eval(<<'.,.,', 'parser.y', 86)
|
920
927
|
def _reduce_47(val, _values, result)
|
921
|
-
result = { action: :
|
928
|
+
result = { action: :block }
|
922
929
|
result
|
923
930
|
end
|
924
931
|
.,.,
|
925
932
|
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
def _reduce_49(val, _values, result)
|
930
|
-
result = { dir: val[1] }
|
933
|
+
module_eval(<<'.,.,', 'parser.y', 87)
|
934
|
+
def _reduce_48(val, _values, result)
|
935
|
+
result = { action: :pass }
|
931
936
|
result
|
932
937
|
end
|
933
938
|
.,.,
|
934
939
|
|
940
|
+
# reduce 49 omitted
|
941
|
+
|
935
942
|
module_eval(<<'.,.,', 'parser.y', 90)
|
936
943
|
def _reduce_50(val, _values, result)
|
937
|
-
result = { dir: val[
|
944
|
+
result = { dir: val[1] }
|
938
945
|
result
|
939
946
|
end
|
940
947
|
.,.,
|
941
948
|
|
942
|
-
module_eval(<<'.,.,', 'parser.y',
|
949
|
+
module_eval(<<'.,.,', 'parser.y', 91)
|
943
950
|
def _reduce_51(val, _values, result)
|
944
|
-
result = val[0]
|
951
|
+
result = { dir: val[0] }
|
945
952
|
result
|
946
953
|
end
|
947
954
|
.,.,
|
948
955
|
|
949
956
|
module_eval(<<'.,.,', 'parser.y', 93)
|
950
957
|
def _reduce_52(val, _values, result)
|
951
|
-
result = val[0] + [val[
|
958
|
+
result = val[0] + [val[2]]
|
952
959
|
result
|
953
960
|
end
|
954
961
|
.,.,
|
955
962
|
|
956
963
|
module_eval(<<'.,.,', 'parser.y', 94)
|
957
964
|
def _reduce_53(val, _values, result)
|
958
|
-
result =
|
965
|
+
result = val[0] + [val[1]]
|
959
966
|
result
|
960
967
|
end
|
961
968
|
.,.,
|
962
969
|
|
963
|
-
module_eval(<<'.,.,', 'parser.y',
|
970
|
+
module_eval(<<'.,.,', 'parser.y', 95)
|
964
971
|
def _reduce_54(val, _values, result)
|
965
|
-
result =
|
972
|
+
result = [val[0]]
|
966
973
|
result
|
967
974
|
end
|
968
975
|
.,.,
|
969
976
|
|
970
977
|
module_eval(<<'.,.,', 'parser.y', 97)
|
971
978
|
def _reduce_55(val, _values, result)
|
972
|
-
result = :
|
979
|
+
result = :in
|
973
980
|
result
|
974
981
|
end
|
975
982
|
.,.,
|
976
983
|
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
def _reduce_57(val, _values, result)
|
981
|
-
result = { af: :inet }
|
984
|
+
module_eval(<<'.,.,', 'parser.y', 98)
|
985
|
+
def _reduce_56(val, _values, result)
|
986
|
+
result = :out
|
982
987
|
result
|
983
988
|
end
|
984
989
|
.,.,
|
985
990
|
|
991
|
+
# reduce 57 omitted
|
992
|
+
|
986
993
|
module_eval(<<'.,.,', 'parser.y', 101)
|
987
994
|
def _reduce_58(val, _values, result)
|
988
|
-
result = { af: :
|
995
|
+
result = { af: :inet }
|
989
996
|
result
|
990
997
|
end
|
991
998
|
.,.,
|
992
999
|
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
def _reduce_60(val, _values, result)
|
997
|
-
result = { proto: val[2] }
|
1000
|
+
module_eval(<<'.,.,', 'parser.y', 102)
|
1001
|
+
def _reduce_59(val, _values, result)
|
1002
|
+
result = { af: :inet6 }
|
998
1003
|
result
|
999
1004
|
end
|
1000
1005
|
.,.,
|
1001
1006
|
|
1007
|
+
# reduce 60 omitted
|
1008
|
+
|
1002
1009
|
module_eval(<<'.,.,', 'parser.y', 105)
|
1003
1010
|
def _reduce_61(val, _values, result)
|
1004
|
-
result = { proto: val[
|
1011
|
+
result = { proto: val[2] }
|
1005
1012
|
result
|
1006
1013
|
end
|
1007
1014
|
.,.,
|
1008
1015
|
|
1009
|
-
module_eval(<<'.,.,', 'parser.y',
|
1016
|
+
module_eval(<<'.,.,', 'parser.y', 106)
|
1010
1017
|
def _reduce_62(val, _values, result)
|
1011
|
-
result =
|
1018
|
+
result = { proto: val[1] }
|
1012
1019
|
result
|
1013
1020
|
end
|
1014
1021
|
.,.,
|
1015
1022
|
|
1016
1023
|
module_eval(<<'.,.,', 'parser.y', 108)
|
1017
1024
|
def _reduce_63(val, _values, result)
|
1018
|
-
result = val[0] + [val[
|
1025
|
+
result = val[0] + [val[2]]
|
1019
1026
|
result
|
1020
1027
|
end
|
1021
1028
|
.,.,
|
1022
1029
|
|
1023
1030
|
module_eval(<<'.,.,', 'parser.y', 109)
|
1024
1031
|
def _reduce_64(val, _values, result)
|
1025
|
-
result =
|
1032
|
+
result = val[0] + [val[1]]
|
1026
1033
|
result
|
1027
1034
|
end
|
1028
1035
|
.,.,
|
1029
1036
|
|
1030
|
-
module_eval(<<'.,.,', 'parser.y',
|
1037
|
+
module_eval(<<'.,.,', 'parser.y', 110)
|
1031
1038
|
def _reduce_65(val, _values, result)
|
1032
|
-
result = val[0]
|
1039
|
+
result = [val[0]]
|
1033
1040
|
result
|
1034
1041
|
end
|
1035
1042
|
.,.,
|
1036
1043
|
|
1037
|
-
module_eval(<<'.,.,', 'parser.y',
|
1044
|
+
module_eval(<<'.,.,', 'parser.y', 112)
|
1038
1045
|
def _reduce_66(val, _values, result)
|
1039
|
-
result =
|
1046
|
+
result = val[0][:value].to_sym
|
1040
1047
|
result
|
1041
1048
|
end
|
1042
1049
|
.,.,
|
1043
1050
|
|
1044
1051
|
module_eval(<<'.,.,', 'parser.y', 114)
|
1045
1052
|
def _reduce_67(val, _values, result)
|
1046
|
-
result = { from: val[1] }
|
1053
|
+
result = { from: val[1], to: val[3] }
|
1047
1054
|
result
|
1048
1055
|
end
|
1049
1056
|
.,.,
|
1050
1057
|
|
1051
1058
|
module_eval(<<'.,.,', 'parser.y', 115)
|
1052
1059
|
def _reduce_68(val, _values, result)
|
1053
|
-
result = {
|
1060
|
+
result = { from: val[1] }
|
1054
1061
|
result
|
1055
1062
|
end
|
1056
1063
|
.,.,
|
1057
1064
|
|
1058
1065
|
module_eval(<<'.,.,', 'parser.y', 116)
|
1059
1066
|
def _reduce_69(val, _values, result)
|
1060
|
-
result = {}
|
1067
|
+
result = { to: val[1] }
|
1061
1068
|
result
|
1062
1069
|
end
|
1063
1070
|
.,.,
|
1064
1071
|
|
1065
|
-
|
1066
|
-
|
1067
|
-
module_eval(<<'.,.,', 'parser.y', 119)
|
1068
|
-
def _reduce_71(val, _values, result)
|
1072
|
+
module_eval(<<'.,.,', 'parser.y', 117)
|
1073
|
+
def _reduce_70(val, _values, result)
|
1069
1074
|
result = {}
|
1070
1075
|
result
|
1071
1076
|
end
|
1072
1077
|
.,.,
|
1073
1078
|
|
1074
|
-
|
1079
|
+
# reduce 71 omitted
|
1080
|
+
|
1081
|
+
module_eval(<<'.,.,', 'parser.y', 120)
|
1075
1082
|
def _reduce_72(val, _values, result)
|
1076
|
-
result =
|
1083
|
+
result = {}
|
1077
1084
|
result
|
1078
1085
|
end
|
1079
1086
|
.,.,
|
1080
1087
|
|
1081
1088
|
module_eval(<<'.,.,', 'parser.y', 122)
|
1082
1089
|
def _reduce_73(val, _values, result)
|
1083
|
-
result = [{ host:
|
1090
|
+
result = [{ host: nil, port: val[1] }]
|
1084
1091
|
result
|
1085
1092
|
end
|
1086
1093
|
.,.,
|
1087
1094
|
|
1088
1095
|
module_eval(<<'.,.,', 'parser.y', 123)
|
1089
1096
|
def _reduce_74(val, _values, result)
|
1090
|
-
result = [{ host:
|
1097
|
+
result = [{ host: val[0], port: val[1] }]
|
1091
1098
|
result
|
1092
1099
|
end
|
1093
1100
|
.,.,
|
1094
1101
|
|
1095
1102
|
module_eval(<<'.,.,', 'parser.y', 124)
|
1096
1103
|
def _reduce_75(val, _values, result)
|
1097
|
-
result = [{ host:
|
1104
|
+
result = [{ host: nil, port: val[0] }]
|
1098
1105
|
result
|
1099
1106
|
end
|
1100
1107
|
.,.,
|
1101
1108
|
|
1102
1109
|
module_eval(<<'.,.,', 'parser.y', 125)
|
1103
1110
|
def _reduce_76(val, _values, result)
|
1104
|
-
result = [{ host:
|
1111
|
+
result = [{ host: val[1], port: val[3] }]
|
1105
1112
|
result
|
1106
1113
|
end
|
1107
1114
|
.,.,
|
1108
1115
|
|
1109
1116
|
module_eval(<<'.,.,', 'parser.y', 126)
|
1110
1117
|
def _reduce_77(val, _values, result)
|
1111
|
-
result =
|
1118
|
+
result = [{ host: @variables.fetch(val[0][:value]), port: val[1] }]
|
1112
1119
|
result
|
1113
1120
|
end
|
1114
1121
|
.,.,
|
1115
1122
|
|
1116
1123
|
module_eval(<<'.,.,', 'parser.y', 127)
|
1117
1124
|
def _reduce_78(val, _values, result)
|
1118
|
-
result = Resolver.instance.
|
1125
|
+
result = Resolver.instance.resolv_srv(val[2][:value])
|
1119
1126
|
result
|
1120
1127
|
end
|
1121
1128
|
.,.,
|
1122
1129
|
|
1123
|
-
module_eval(<<'.,.,', 'parser.y',
|
1130
|
+
module_eval(<<'.,.,', 'parser.y', 128)
|
1124
1131
|
def _reduce_79(val, _values, result)
|
1125
|
-
result = val[2]
|
1132
|
+
result = Resolver.instance.resolv_apt_mirror(val[2][:value])
|
1126
1133
|
result
|
1127
1134
|
end
|
1128
1135
|
.,.,
|
1129
1136
|
|
1130
1137
|
module_eval(<<'.,.,', 'parser.y', 130)
|
1131
1138
|
def _reduce_80(val, _values, result)
|
1132
|
-
result = val[
|
1139
|
+
result = val[2]
|
1133
1140
|
result
|
1134
1141
|
end
|
1135
1142
|
.,.,
|
1136
1143
|
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
def _reduce_82(val, _values, result)
|
1141
|
-
result = val[0] + [val[2]]
|
1144
|
+
module_eval(<<'.,.,', 'parser.y', 131)
|
1145
|
+
def _reduce_81(val, _values, result)
|
1146
|
+
result = val[1]
|
1142
1147
|
result
|
1143
1148
|
end
|
1144
1149
|
.,.,
|
1145
1150
|
|
1151
|
+
# reduce 82 omitted
|
1152
|
+
|
1146
1153
|
module_eval(<<'.,.,', 'parser.y', 134)
|
1147
1154
|
def _reduce_83(val, _values, result)
|
1148
|
-
result = val[0] + [val[
|
1155
|
+
result = val[0] + [val[2]]
|
1149
1156
|
result
|
1150
1157
|
end
|
1151
1158
|
.,.,
|
1152
1159
|
|
1153
1160
|
module_eval(<<'.,.,', 'parser.y', 135)
|
1154
1161
|
def _reduce_84(val, _values, result)
|
1155
|
-
result =
|
1162
|
+
result = val[0] + [val[1]]
|
1156
1163
|
result
|
1157
1164
|
end
|
1158
1165
|
.,.,
|
1159
1166
|
|
1160
|
-
module_eval(<<'.,.,', 'parser.y',
|
1167
|
+
module_eval(<<'.,.,', 'parser.y', 136)
|
1161
1168
|
def _reduce_85(val, _values, result)
|
1162
|
-
result = val[0]
|
1169
|
+
result = [val[0]]
|
1163
1170
|
result
|
1164
1171
|
end
|
1165
1172
|
.,.,
|
@@ -1173,14 +1180,14 @@ module_eval(<<'.,.,', 'parser.y', 138)
|
|
1173
1180
|
|
1174
1181
|
module_eval(<<'.,.,', 'parser.y', 139)
|
1175
1182
|
def _reduce_87(val, _values, result)
|
1176
|
-
result =
|
1183
|
+
result = val[0][:value]
|
1177
1184
|
result
|
1178
1185
|
end
|
1179
1186
|
.,.,
|
1180
1187
|
|
1181
|
-
module_eval(<<'.,.,', 'parser.y',
|
1188
|
+
module_eval(<<'.,.,', 'parser.y', 140)
|
1182
1189
|
def _reduce_88(val, _values, result)
|
1183
|
-
result = val[0][:value]
|
1190
|
+
result = Range.new(val[0][:value], val[2][:value])
|
1184
1191
|
result
|
1185
1192
|
end
|
1186
1193
|
.,.,
|
@@ -1192,64 +1199,71 @@ module_eval(<<'.,.,', 'parser.y', 142)
|
|
1192
1199
|
end
|
1193
1200
|
.,.,
|
1194
1201
|
|
1195
|
-
module_eval(<<'.,.,', 'parser.y',
|
1202
|
+
module_eval(<<'.,.,', 'parser.y', 143)
|
1196
1203
|
def _reduce_90(val, _values, result)
|
1197
|
-
result = val[0]
|
1204
|
+
result = val[0][:value]
|
1198
1205
|
result
|
1199
1206
|
end
|
1200
1207
|
.,.,
|
1201
1208
|
|
1202
1209
|
module_eval(<<'.,.,', 'parser.y', 145)
|
1203
1210
|
def _reduce_91(val, _values, result)
|
1204
|
-
result = val[0] + [val[
|
1211
|
+
result = val[0] + [val[2]]
|
1205
1212
|
result
|
1206
1213
|
end
|
1207
1214
|
.,.,
|
1208
1215
|
|
1209
1216
|
module_eval(<<'.,.,', 'parser.y', 146)
|
1210
1217
|
def _reduce_92(val, _values, result)
|
1211
|
-
result =
|
1218
|
+
result = val[0] + [val[1]]
|
1212
1219
|
result
|
1213
1220
|
end
|
1214
1221
|
.,.,
|
1215
1222
|
|
1216
|
-
module_eval(<<'.,.,', 'parser.y',
|
1223
|
+
module_eval(<<'.,.,', 'parser.y', 147)
|
1217
1224
|
def _reduce_93(val, _values, result)
|
1218
|
-
result = val[0]
|
1225
|
+
result = [val[0]]
|
1219
1226
|
result
|
1220
1227
|
end
|
1221
1228
|
.,.,
|
1222
1229
|
|
1223
1230
|
module_eval(<<'.,.,', 'parser.y', 149)
|
1224
1231
|
def _reduce_94(val, _values, result)
|
1225
|
-
result = val[0].merge(val[
|
1232
|
+
result = val[0].merge(val[2])
|
1226
1233
|
result
|
1227
1234
|
end
|
1228
1235
|
.,.,
|
1229
1236
|
|
1230
1237
|
module_eval(<<'.,.,', 'parser.y', 150)
|
1231
1238
|
def _reduce_95(val, _values, result)
|
1232
|
-
result =
|
1239
|
+
result = val[0].merge(val[1])
|
1233
1240
|
result
|
1234
1241
|
end
|
1235
1242
|
.,.,
|
1236
1243
|
|
1237
|
-
module_eval(<<'.,.,', 'parser.y',
|
1244
|
+
module_eval(<<'.,.,', 'parser.y', 151)
|
1238
1245
|
def _reduce_96(val, _values, result)
|
1239
|
-
result = {
|
1246
|
+
result = {}
|
1240
1247
|
result
|
1241
1248
|
end
|
1242
1249
|
.,.,
|
1243
1250
|
|
1244
1251
|
module_eval(<<'.,.,', 'parser.y', 153)
|
1245
1252
|
def _reduce_97(val, _values, result)
|
1246
|
-
result = { rdr_to: [{ host: val[1][:value], port:
|
1253
|
+
result = { rdr_to: [{ host: val[1][:value], port: val[3][:value] }] }
|
1247
1254
|
result
|
1248
1255
|
end
|
1249
1256
|
.,.,
|
1250
1257
|
|
1251
1258
|
module_eval(<<'.,.,', 'parser.y', 154)
|
1252
1259
|
def _reduce_98(val, _values, result)
|
1260
|
+
result = { rdr_to: [{ host: val[1][:value], port: nil }] }
|
1261
|
+
result
|
1262
|
+
end
|
1263
|
+
.,.,
|
1264
|
+
|
1265
|
+
module_eval(<<'.,.,', 'parser.y', 155)
|
1266
|
+
def _reduce_99(val, _values, result)
|
1253
1267
|
result = { nat_to: val[1][:value] }
|
1254
1268
|
result
|
1255
1269
|
end
|