hcl-checker 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 195128a0325ac3b7fa3add01a739dbe3ce0aeb5b3314edfc74d195caa3a0aa61
4
- data.tar.gz: ab84f84386083bdbb9aaea917716ea7e8462eaed2b89a2ab4f887fb4c3b2ee93
3
+ metadata.gz: cb47986f7941e27c8c23509a32796a30c309af1341c7aac468acac3c33efaa26
4
+ data.tar.gz: a90c767872e02d7f6b94d044a8750969d1c1ec5236c565be051a7a8cc7b1889d
5
5
  SHA512:
6
- metadata.gz: b53587ad90fa9ed3cf6c2fbfd5cad15f6b526e62e5c63298fbd963a1629d6283a0bac0ab7276674acba8a1d67e38bc2118fe8f9a0a11a5d362afef4957cc745a
7
- data.tar.gz: 4d908d23f548138a2e4e876709cda19321650203d13219f8ac8fe3748cd1427e628f9cb834f80bf684252a7d06d9a97d72663f3ac6c19699a0149593e3450a0d
6
+ metadata.gz: 9efd2312d2ff19fb9518259689491ac616923ab1df6a7eaa922d3d72e2b92a97583c3f56065c43d5bcd8660a2ec3f520df828480bfb209d1b04ab34d187e1ca8
7
+ data.tar.gz: c4446a6f7b85a90fd1eb4157d5c4dbe8522497309fbe53ac63b66b66b6612a88f354028ecc074f8c7dda45e6802a21be0aca02767d9f2f1277eed509178d8e02
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hcl-checker (1.4.0)
4
+ hcl-checker (1.5.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -47,21 +47,21 @@ You can validate the `hcl_string` contents with `valid?` method. This will
47
47
  return `true` if is a valid HCL or `false` if not.
48
48
 
49
49
  ```
50
- 2.3.2 :014 > HCL1::Checker.valid? hcl_string
50
+ 2.3.2 :014 > HCL::Checker.valid? hcl_string
51
51
  => true
52
52
  ```
53
53
 
54
54
  You can parse the `hcl_string` into a `Hash` with `parse` method.
55
55
 
56
56
  ```
57
- 2.3.2 :015 > HCL1::Checker.parse(hcl_string)
57
+ 2.3.2 :015 > HCL::Checker.parse(hcl_string)
58
58
  => {"provider"=>{"aws"=>{"region"=>"${var.aws_region}", "access_key"=>"${var.aws_access_key}", "secret_key"=>"${var.aws_secret_key}"}}, "resource"=>{"aws_vpc"=>{"default"=>{"cidr_block"=>"10.0.0.0/16", "enable_dns_hostnames"=>true, "tags"=>{"Name"=>"Event Store VPC"}}}}}
59
59
  ```
60
60
 
61
61
  If after a `parse` you got `false` you can check `last_error` with:
62
62
 
63
63
  ```
64
- 2.4.2 :063 > HCL1::Checker.last_error
64
+ 2.4.2 :063 > HCL::Checker.last_error
65
65
  => "Parse error at \"eec8b16c-ee89-4ea0-bdcc-d094300a42e8\" , (invalid token: ,)"
66
66
  ```
67
67
 
data/Rakefile CHANGED
@@ -16,4 +16,3 @@ task :build_grammar do
16
16
  `racc ./assets/parse.y -o ./lib/hcl/parser.rb`
17
17
  print "....done\n\n"
18
18
  end
19
-
@@ -2,7 +2,7 @@
2
2
  class HCLLexer
3
3
  option
4
4
  independent
5
-
5
+
6
6
  macro
7
7
  NEWLINE \n|\r
8
8
  BLANK \s+
@@ -20,6 +20,8 @@ macro
20
20
  RIGHTBRACE \}
21
21
  LEFTBRACKET \[
22
22
  RIGHTBRACKET \]
23
+ LEFTPARENTHESES \(
24
+ RIGHTPARENTHESES \)
23
25
  HEREDOCUMENT \<<\-?
24
26
 
25
27
  rule
@@ -36,17 +38,18 @@ rule
36
38
  {QUOTE} { [:STRING, consume_string(text)] }
37
39
  {HEREDOCUMENT} { [:STRING, consume_heredoc] }
38
40
  #-------------------------------------------------------------------------------
39
- {LEFTBRACE} { [:LEFTBRACE, text]}
40
- {RIGHTBRACE} { [:RIGHTBRACE, text]}
41
- {LEFTBRACKET} { [:LEFTBRACKET, text]}
42
- {RIGHTBRACKET} { [:RIGHTBRACKET, text]}
41
+ {LEFTBRACE} { [:LEFTBRACE, text]}
42
+ {RIGHTBRACE} { [:RIGHTBRACE, text]}
43
+ {LEFTBRACKET} { [:LEFTBRACKET, text]}
44
+ {RIGHTBRACKET} { [:RIGHTBRACKET, text]}
45
+ {LEFTPARENTHESES} { [:LEFTPARENTHESES, text]}
46
+ {RIGHTPARENTHESES} { [:RIGHTPARENTHESES, text]}
43
47
  #-------------------------------------------------------------------------------
44
48
  {COMMA} { [:COMMA, text]}
45
49
  {IDENTIFIER} { [:IDENTIFIER, text]}
46
50
  {EQUAL} { [:EQUAL, text]}
47
51
  {MINUS} { [:MINUS, text]}
48
52
 
49
-
50
53
  inner
51
54
 
52
55
  def lex(input)
@@ -12,6 +12,8 @@ token BOOL
12
12
  RIGHTBRACE
13
13
  LEFTBRACKET
14
14
  RIGHTBRACKET
15
+ LEFTPARENTHESES
16
+ RIGHTPARENTHESES
15
17
  PERIOD
16
18
  EPLUS
17
19
  EMINUS
@@ -24,7 +26,6 @@ rule
24
26
  | objectlist
25
27
  ;
26
28
 
27
-
28
29
  objectlist:
29
30
  objectitem COMMA
30
31
  { result = [val[0]] }
@@ -61,6 +62,10 @@ rule
61
62
  { result = val[0], val[2] }
62
63
  | objectkey EQUAL list
63
64
  { result = val[0], val[2] }
65
+ | objectkey EQUAL IDENTIFIER LEFTPARENTHESES IDENTIFIER RIGHTPARENTHESES
66
+ { result = val[0], "#{val[2]}(#{val[4]})" }
67
+ | objectkey EQUAL IDENTIFIER
68
+ { result = val[0], val[2] }
64
69
  | block
65
70
  { result = val[0] }
66
71
  ;
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  f.match(%r{^(test|spec|features)/})
18
18
  end
19
19
  spec.require_paths = ['lib']
20
+ spec.required_ruby_version = '>= 2.5.0'
20
21
 
21
22
  spec.add_development_dependency 'bundler', '~> 2.1.4'
22
23
  spec.add_development_dependency 'rake', '~> 12.3.3'
@@ -26,26 +27,10 @@ Gem::Specification.new do |spec|
26
27
  spec.add_development_dependency 'rexical', '>= 1.0.7'
27
28
 
28
29
  spec.post_install_message = %q{
29
- Hello, I am updating this Gem to support version 2.0 of the HCL.
30
-
31
- In the meantime, it is important that you know that there will be a
32
- compatibility break with the current version, for Gem to support both
33
- versions.
34
-
35
- Therefore, instead of using just HCL::Checker you must tell which
36
- version you are using, like this:
37
-
38
- HCL1::Checker
39
-
40
- Or
41
-
42
- HCL2::Checker
43
-
44
- At the moment both HCL::Checker and HCL1::Checker will work, but with
45
- the release of support for version 2 the HCL::Checker syntax will no
46
- longer work.
47
-
48
- So, update your code.
30
+ Hello, me again. After several contacts of users of this gem requesting that
31
+ the module name be kept only as HCL, instead of HCL1 and HCL2, I went back and
32
+ kept it. Sorry for those who eventually switched from HCL to HCL1. And thanks to
33
+ everyone who got in touch justifying why my change would be bad for all users.
49
34
 
50
35
  Thank you :)
51
36
  }
@@ -4,18 +4,24 @@ require_relative 'parser'
4
4
 
5
5
  module HCL
6
6
  module Checker
7
- def self.valid?(value)
8
- ret = HCLParser.new.parse(value)
9
- return true if ret.is_a? Hash
10
- false
11
- rescue
12
- false
13
- end
7
+ class << self
8
+ attr_accessor :last_error
9
+
10
+ def valid?(value)
11
+ ret = HCLParser.new.parse(value)
12
+ return true if ret.is_a? Hash
13
+ false
14
+ rescue Racc::ParseError => e
15
+ @last_error = e.message
16
+ false
17
+ end
14
18
 
15
- def self.parse(value)
16
- HCLParser.new.parse(value)
17
- rescue Racc::ParseError => e
18
- return e.message
19
+ def parse(value)
20
+ HCLParser.new.parse(value)
21
+ rescue Racc::ParseError => e
22
+ @last_error = e.message
23
+ return e.message
24
+ end
19
25
  end
20
26
  end
21
27
  end
@@ -1,5 +1,5 @@
1
1
  module HCL
2
2
  module Checker
3
- VERSION = '1.4.0'
3
+ VERSION = '1.5.0'
4
4
  end
5
5
  end
@@ -85,16 +85,22 @@ class HCLLexer
85
85
  action { [:STRING, consume_heredoc] }
86
86
 
87
87
  when (text = @ss.scan(/\{/))
88
- action { [:LEFTBRACE, text]}
88
+ action { [:LEFTBRACE, text]}
89
89
 
90
90
  when (text = @ss.scan(/\}/))
91
- action { [:RIGHTBRACE, text]}
91
+ action { [:RIGHTBRACE, text]}
92
92
 
93
93
  when (text = @ss.scan(/\[/))
94
- action { [:LEFTBRACKET, text]}
94
+ action { [:LEFTBRACKET, text]}
95
95
 
96
96
  when (text = @ss.scan(/\]/))
97
- action { [:RIGHTBRACKET, text]}
97
+ action { [:RIGHTBRACKET, text]}
98
+
99
+ when (text = @ss.scan(/\(/))
100
+ action { [:LEFTPARENTHESES, text]}
101
+
102
+ when (text = @ss.scan(/\)/))
103
+ action { [:RIGHTPARENTHESES, text]}
98
104
 
99
105
  when (text = @ss.scan(/\,/))
100
106
  action { [:COMMA, text]}
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.14
4
- # from Racc grammer file "".
3
+ # This file is automatically generated by Racc 1.5.0
4
+ # from Racc grammar file "".
5
5
  #
6
6
 
7
7
  require 'racc/parser.rb'
@@ -10,7 +10,7 @@ require_relative './lexer'
10
10
 
11
11
  class HCLParser < Racc::Parser
12
12
 
13
- module_eval(<<'...end parse.y/module_eval...', 'parse.y', 123)
13
+ module_eval(<<'...end parse.y/module_eval...', 'parse.y', 128)
14
14
  #//
15
15
  #// HCL is unclear on what one should do when duplicate
16
16
  #// keys are encountered.
@@ -69,87 +69,91 @@ module_eval(<<'...end parse.y/module_eval...', 'parse.y', 123)
69
69
  ##### State transition tables begin ###
70
70
 
71
71
  racc_action_table = [
72
- 22, 28, 27, 10, 28, 27, 5, 23, 6, 14,
73
- 35, 26, 14, 12, 26, 32, 28, 27, 40, 5,
74
- -10, 6, 35, 5, 14, 6, 26, 39, 30, 5,
75
- -11, 6, 13, 17, 38, 18, 19, 14, 20 ]
72
+ 22, 29, 28, 10, 12, 26, 43, 23, 5, 14,
73
+ 6, 27, 29, 28, 5, 42, 6, -10, 37, 31,
74
+ 14, -11, 27, 34, 29, 28, 5, 5, 6, 6,
75
+ 37, 40, 14, 17, 27, 18, 13, 14, 19, 20,
76
+ 32, 41, 44 ]
76
77
 
77
78
  racc_action_check = [
78
- 13, 13, 13, 1, 26, 26, 0, 13, 0, 13,
79
- 26, 13, 26, 4, 26, 26, 40, 40, 31, 3,
80
- 5, 3, 40, 14, 40, 14, 40, 31, 14, 29,
81
- 6, 29, 7, 9, 29, 9, 10, 9, 11 ]
79
+ 13, 13, 13, 1, 4, 13, 33, 13, 0, 13,
80
+ 0, 13, 27, 27, 14, 33, 14, 5, 27, 14,
81
+ 27, 6, 27, 27, 43, 43, 30, 3, 30, 3,
82
+ 43, 30, 43, 9, 43, 9, 7, 9, 10, 11,
83
+ 26, 32, 41 ]
82
84
 
83
85
  racc_action_pointer = [
84
- -1, 3, nil, 12, 8, 12, 22, 24, nil, 26,
85
- 36, 33, nil, -2, 16, nil, nil, nil, nil, nil,
86
- nil, nil, nil, nil, nil, nil, 1, nil, nil, 22,
87
- nil, 13, nil, nil, nil, nil, nil, nil, nil, nil,
88
- 13, nil ]
86
+ 1, 3, nil, 20, -1, 9, 13, 28, nil, 26,
87
+ 38, 34, nil, -2, 7, nil, nil, nil, nil, nil,
88
+ nil, nil, nil, nil, nil, nil, 25, 9, nil, nil,
89
+ 19, nil, 34, 1, nil, nil, nil, nil, nil, nil,
90
+ nil, 26, nil, 21, nil, nil ]
89
91
 
90
92
  racc_action_default = [
91
- -2, -33, -1, -3, -5, -20, -21, -33, -17, -33,
92
- -33, -7, -4, -33, -33, -18, -19, -20, -21, 42,
93
- -6, -12, -13, -14, -15, -16, -33, -31, -32, -33,
94
- -9, -33, -23, -24, -27, -28, -29, -30, -8, -22,
95
- -26, -25 ]
93
+ -2, -35, -1, -3, -5, -22, -23, -35, -19, -35,
94
+ -35, -7, -4, -35, -35, -20, -21, -22, -23, 46,
95
+ -6, -12, -13, -14, -15, -16, -18, -35, -33, -34,
96
+ -35, -9, -35, -35, -25, -26, -29, -30, -31, -32,
97
+ -8, -35, -24, -28, -17, -27 ]
96
98
 
97
99
  racc_goto_table = [
98
- 11, 3, 33, 15, 1, 2, 21, 24, 25, 16,
99
- 31, nil, nil, nil, nil, 29, 41, nil, nil, nil,
100
- nil, nil, nil, nil, nil, nil, 11 ]
100
+ 11, 35, 3, 15, 1, 2, 21, 24, 25, 16,
101
+ 33, nil, nil, nil, nil, nil, 30, 45, nil, nil,
102
+ nil, nil, nil, nil, nil, nil, nil, 11 ]
101
103
 
102
104
  racc_goto_check = [
103
- 4, 3, 12, 5, 1, 2, 7, 5, 8, 9,
104
- 11, nil, nil, nil, nil, 3, 12, nil, nil, nil,
105
- nil, nil, nil, nil, nil, nil, 4 ]
105
+ 4, 12, 3, 5, 1, 2, 7, 5, 8, 9,
106
+ 11, nil, nil, nil, nil, nil, 3, 12, nil, nil,
107
+ nil, nil, nil, nil, nil, nil, nil, 4 ]
106
108
 
107
109
  racc_goto_pointer = [
108
- nil, 4, 5, 1, -3, -6, nil, -7, -5, 0,
109
- nil, -16, -24 ]
110
+ nil, 4, 5, 2, -3, -6, nil, -7, -5, 0,
111
+ nil, -17, -26 ]
110
112
 
111
113
  racc_goto_default = [
112
- nil, nil, nil, nil, 4, 37, 7, 34, 36, 8,
114
+ nil, nil, nil, nil, 4, 39, 7, 36, 38, 8,
113
115
  9, nil, nil ]
114
116
 
115
117
  racc_reduce_table = [
116
118
  0, 0, :racc_error,
117
- 1, 19, :_reduce_1,
118
- 0, 20, :_reduce_2,
119
- 1, 20, :_reduce_none,
120
- 2, 21, :_reduce_4,
121
- 1, 21, :_reduce_5,
122
- 3, 21, :_reduce_6,
123
- 2, 21, :_reduce_7,
124
- 3, 23, :_reduce_8,
125
- 2, 23, :_reduce_9,
126
- 1, 24, :_reduce_10,
127
- 1, 24, :_reduce_11,
128
- 3, 22, :_reduce_12,
129
- 3, 22, :_reduce_13,
130
- 3, 22, :_reduce_14,
131
- 3, 22, :_reduce_15,
132
- 3, 22, :_reduce_16,
133
- 1, 22, :_reduce_17,
134
- 2, 27, :_reduce_18,
135
- 2, 27, :_reduce_19,
136
- 1, 28, :_reduce_20,
137
- 1, 28, :_reduce_21,
138
- 3, 26, :_reduce_22,
139
- 2, 26, :_reduce_23,
140
- 1, 29, :_reduce_24,
141
- 3, 29, :_reduce_25,
142
- 2, 29, :_reduce_26,
143
- 1, 30, :_reduce_27,
144
- 1, 30, :_reduce_28,
145
- 1, 30, :_reduce_29,
146
- 1, 30, :_reduce_30,
147
- 1, 25, :_reduce_31,
148
- 1, 25, :_reduce_32 ]
149
-
150
- racc_reduce_n = 33
151
-
152
- racc_shift_n = 42
119
+ 1, 21, :_reduce_1,
120
+ 0, 22, :_reduce_2,
121
+ 1, 22, :_reduce_none,
122
+ 2, 23, :_reduce_4,
123
+ 1, 23, :_reduce_5,
124
+ 3, 23, :_reduce_6,
125
+ 2, 23, :_reduce_7,
126
+ 3, 25, :_reduce_8,
127
+ 2, 25, :_reduce_9,
128
+ 1, 26, :_reduce_10,
129
+ 1, 26, :_reduce_11,
130
+ 3, 24, :_reduce_12,
131
+ 3, 24, :_reduce_13,
132
+ 3, 24, :_reduce_14,
133
+ 3, 24, :_reduce_15,
134
+ 3, 24, :_reduce_16,
135
+ 6, 24, :_reduce_17,
136
+ 3, 24, :_reduce_18,
137
+ 1, 24, :_reduce_19,
138
+ 2, 29, :_reduce_20,
139
+ 2, 29, :_reduce_21,
140
+ 1, 30, :_reduce_22,
141
+ 1, 30, :_reduce_23,
142
+ 3, 28, :_reduce_24,
143
+ 2, 28, :_reduce_25,
144
+ 1, 31, :_reduce_26,
145
+ 3, 31, :_reduce_27,
146
+ 2, 31, :_reduce_28,
147
+ 1, 32, :_reduce_29,
148
+ 1, 32, :_reduce_30,
149
+ 1, 32, :_reduce_31,
150
+ 1, 32, :_reduce_32,
151
+ 1, 27, :_reduce_33,
152
+ 1, 27, :_reduce_34 ]
153
+
154
+ racc_reduce_n = 35
155
+
156
+ racc_shift_n = 46
153
157
 
154
158
  racc_token_table = {
155
159
  false => 0,
@@ -167,11 +171,13 @@ racc_token_table = {
167
171
  :RIGHTBRACE => 12,
168
172
  :LEFTBRACKET => 13,
169
173
  :RIGHTBRACKET => 14,
170
- :PERIOD => 15,
171
- :EPLUS => 16,
172
- :EMINUS => 17 }
174
+ :LEFTPARENTHESES => 15,
175
+ :RIGHTPARENTHESES => 16,
176
+ :PERIOD => 17,
177
+ :EPLUS => 18,
178
+ :EMINUS => 19 }
173
179
 
174
- racc_nt_base = 18
180
+ racc_nt_base = 20
175
181
 
176
182
  racc_use_result_var = true
177
183
 
@@ -207,6 +213,8 @@ Racc_token_to_s_table = [
207
213
  "RIGHTBRACE",
208
214
  "LEFTBRACKET",
209
215
  "RIGHTBRACKET",
216
+ "LEFTPARENTHESES",
217
+ "RIGHTPARENTHESES",
210
218
  "PERIOD",
211
219
  "EPLUS",
212
220
  "EMINUS",
@@ -230,221 +238,235 @@ Racc_debug_parser = false
230
238
 
231
239
  # reduce 0 omitted
232
240
 
233
- module_eval(<<'.,.,', 'parse.y', 19)
241
+ module_eval(<<'.,.,', 'parse.y', 21)
234
242
  def _reduce_1(val, _values, result)
235
243
  @result = flatten_objectlist(val[0])
236
244
  result
237
245
  end
238
246
  .,.,
239
247
 
240
- module_eval(<<'.,.,', 'parse.y', 22)
248
+ module_eval(<<'.,.,', 'parse.y', 24)
241
249
  def _reduce_2(val, _values, result)
242
- result = val[0]
250
+ result = val[0]
243
251
  result
244
252
  end
245
253
  .,.,
246
254
 
247
255
  # reduce 3 omitted
248
256
 
249
- module_eval(<<'.,.,', 'parse.y', 29)
257
+ module_eval(<<'.,.,', 'parse.y', 30)
250
258
  def _reduce_4(val, _values, result)
251
- result = [val[0]]
259
+ result = [val[0]]
252
260
  result
253
261
  end
254
262
  .,.,
255
263
 
256
- module_eval(<<'.,.,', 'parse.y', 31)
264
+ module_eval(<<'.,.,', 'parse.y', 32)
257
265
  def _reduce_5(val, _values, result)
258
- result = [val[0]]
266
+ result = [val[0]]
259
267
  result
260
268
  end
261
269
  .,.,
262
270
 
263
- module_eval(<<'.,.,', 'parse.y', 33)
271
+ module_eval(<<'.,.,', 'parse.y', 34)
264
272
  def _reduce_6(val, _values, result)
265
- result = val[0] << val[1]
273
+ result = val[0] << val[1]
266
274
  result
267
275
  end
268
276
  .,.,
269
277
 
270
- module_eval(<<'.,.,', 'parse.y', 35)
278
+ module_eval(<<'.,.,', 'parse.y', 36)
271
279
  def _reduce_7(val, _values, result)
272
- result = val[0] << val[1]
280
+ result = val[0] << val[1]
273
281
  result
274
282
  end
275
283
  .,.,
276
284
 
277
- module_eval(<<'.,.,', 'parse.y', 40)
285
+ module_eval(<<'.,.,', 'parse.y', 41)
278
286
  def _reduce_8(val, _values, result)
279
- result = flatten_objectlist(val[1])
287
+ result = flatten_objectlist(val[1])
280
288
  result
281
289
  end
282
290
  .,.,
283
291
 
284
- module_eval(<<'.,.,', 'parse.y', 42)
292
+ module_eval(<<'.,.,', 'parse.y', 43)
285
293
  def _reduce_9(val, _values, result)
286
- return
294
+ return
287
295
  result
288
296
  end
289
297
  .,.,
290
298
 
291
- module_eval(<<'.,.,', 'parse.y', 47)
299
+ module_eval(<<'.,.,', 'parse.y', 48)
292
300
  def _reduce_10(val, _values, result)
293
- result = val[0]
301
+ result = val[0]
294
302
  result
295
303
  end
296
304
  .,.,
297
305
 
298
- module_eval(<<'.,.,', 'parse.y', 49)
306
+ module_eval(<<'.,.,', 'parse.y', 50)
299
307
  def _reduce_11(val, _values, result)
300
- result = val[0]
308
+ result = val[0]
301
309
  result
302
310
  end
303
311
  .,.,
304
312
 
305
- module_eval(<<'.,.,', 'parse.y', 54)
313
+ module_eval(<<'.,.,', 'parse.y', 55)
306
314
  def _reduce_12(val, _values, result)
307
- result = val[0], val[2]
315
+ result = val[0], val[2]
308
316
  result
309
317
  end
310
318
  .,.,
311
319
 
312
- module_eval(<<'.,.,', 'parse.y', 56)
320
+ module_eval(<<'.,.,', 'parse.y', 57)
313
321
  def _reduce_13(val, _values, result)
314
- result = val[0], val[2]
322
+ result = val[0], val[2]
315
323
  result
316
324
  end
317
325
  .,.,
318
326
 
319
- module_eval(<<'.,.,', 'parse.y', 58)
327
+ module_eval(<<'.,.,', 'parse.y', 59)
320
328
  def _reduce_14(val, _values, result)
321
- result = val[0], val[2]
329
+ result = val[0], val[2]
322
330
  result
323
331
  end
324
332
  .,.,
325
333
 
326
- module_eval(<<'.,.,', 'parse.y', 60)
334
+ module_eval(<<'.,.,', 'parse.y', 61)
327
335
  def _reduce_15(val, _values, result)
328
- result = val[0], val[2]
336
+ result = val[0], val[2]
329
337
  result
330
338
  end
331
339
  .,.,
332
340
 
333
- module_eval(<<'.,.,', 'parse.y', 62)
341
+ module_eval(<<'.,.,', 'parse.y', 63)
334
342
  def _reduce_16(val, _values, result)
335
- result = val[0], val[2]
343
+ result = val[0], val[2]
336
344
  result
337
345
  end
338
346
  .,.,
339
347
 
340
- module_eval(<<'.,.,', 'parse.y', 64)
348
+ module_eval(<<'.,.,', 'parse.y', 65)
341
349
  def _reduce_17(val, _values, result)
342
- result = val[0]
350
+ result = val[0], "#{val[2]}(#{val[4]})"
343
351
  result
344
352
  end
345
353
  .,.,
346
354
 
347
- module_eval(<<'.,.,', 'parse.y', 69)
355
+ module_eval(<<'.,.,', 'parse.y', 67)
348
356
  def _reduce_18(val, _values, result)
349
- result = val[0], val[1]
357
+ result = val[0], val[2]
350
358
  result
351
359
  end
352
360
  .,.,
353
361
 
354
- module_eval(<<'.,.,', 'parse.y', 71)
362
+ module_eval(<<'.,.,', 'parse.y', 69)
355
363
  def _reduce_19(val, _values, result)
356
- result = val[0], {val[1][0] => val[1][1]}
364
+ result = val[0]
357
365
  result
358
366
  end
359
367
  .,.,
360
368
 
361
- module_eval(<<'.,.,', 'parse.y', 76)
369
+ module_eval(<<'.,.,', 'parse.y', 74)
362
370
  def _reduce_20(val, _values, result)
363
- result = val[0]
371
+ result = val[0], val[1]
364
372
  result
365
373
  end
366
374
  .,.,
367
375
 
368
- module_eval(<<'.,.,', 'parse.y', 78)
376
+ module_eval(<<'.,.,', 'parse.y', 76)
369
377
  def _reduce_21(val, _values, result)
370
- result = val[0]
378
+ result = val[0], {val[1][0] => val[1][1]}
371
379
  result
372
380
  end
373
381
  .,.,
374
382
 
375
- module_eval(<<'.,.,', 'parse.y', 83)
383
+ module_eval(<<'.,.,', 'parse.y', 81)
376
384
  def _reduce_22(val, _values, result)
377
- result = val[1]
385
+ result = val[0]
378
386
  result
379
387
  end
380
388
  .,.,
381
389
 
382
- module_eval(<<'.,.,', 'parse.y', 85)
390
+ module_eval(<<'.,.,', 'parse.y', 83)
383
391
  def _reduce_23(val, _values, result)
384
- return
392
+ result = val[0]
385
393
  result
386
394
  end
387
395
  .,.,
388
396
 
389
- module_eval(<<'.,.,', 'parse.y', 90)
397
+ module_eval(<<'.,.,', 'parse.y', 88)
390
398
  def _reduce_24(val, _values, result)
391
- result = [val[0]]
399
+ result = val[1]
392
400
  result
393
401
  end
394
402
  .,.,
395
403
 
396
- module_eval(<<'.,.,', 'parse.y', 92)
404
+ module_eval(<<'.,.,', 'parse.y', 90)
397
405
  def _reduce_25(val, _values, result)
398
- result = val[0] << val[2]
406
+ return
399
407
  result
400
408
  end
401
409
  .,.,
402
410
 
403
- module_eval(<<'.,.,', 'parse.y', 94)
411
+ module_eval(<<'.,.,', 'parse.y', 95)
404
412
  def _reduce_26(val, _values, result)
405
- result = val[0]
413
+ result = [val[0]]
406
414
  result
407
415
  end
408
416
  .,.,
409
417
 
410
- module_eval(<<'.,.,', 'parse.y', 99)
418
+ module_eval(<<'.,.,', 'parse.y', 97)
411
419
  def _reduce_27(val, _values, result)
412
- result = val[0]
420
+ result = val[0] << val[2]
413
421
  result
414
422
  end
415
423
  .,.,
416
424
 
417
- module_eval(<<'.,.,', 'parse.y', 101)
425
+ module_eval(<<'.,.,', 'parse.y', 99)
418
426
  def _reduce_28(val, _values, result)
419
- result = val[0]
427
+ result = val[0]
420
428
  result
421
429
  end
422
430
  .,.,
423
431
 
424
- module_eval(<<'.,.,', 'parse.y', 103)
432
+ module_eval(<<'.,.,', 'parse.y', 104)
425
433
  def _reduce_29(val, _values, result)
426
- result = val[0]
434
+ result = val[0]
427
435
  result
428
436
  end
429
437
  .,.,
430
438
 
431
- module_eval(<<'.,.,', 'parse.y', 105)
439
+ module_eval(<<'.,.,', 'parse.y', 106)
432
440
  def _reduce_30(val, _values, result)
433
- result = val[0]
441
+ result = val[0]
434
442
  result
435
443
  end
436
444
  .,.,
437
445
 
438
- module_eval(<<'.,.,', 'parse.y', 110)
446
+ module_eval(<<'.,.,', 'parse.y', 108)
439
447
  def _reduce_31(val, _values, result)
440
- result = val[0]
448
+ result = val[0]
441
449
  result
442
450
  end
443
451
  .,.,
444
452
 
445
- module_eval(<<'.,.,', 'parse.y', 112)
453
+ module_eval(<<'.,.,', 'parse.y', 110)
446
454
  def _reduce_32(val, _values, result)
447
- result = val[0]
455
+ result = val[0]
456
+ result
457
+ end
458
+ .,.,
459
+
460
+ module_eval(<<'.,.,', 'parse.y', 115)
461
+ def _reduce_33(val, _values, result)
462
+ result = val[0]
463
+ result
464
+ end
465
+ .,.,
466
+
467
+ module_eval(<<'.,.,', 'parse.y', 117)
468
+ def _reduce_34(val, _values, result)
469
+ result = val[0]
448
470
  result
449
471
  end
450
472
  .,.,