oga 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,13 +5,13 @@ module Oga
5
5
  # {Oga::XML::NodeSet} and can be used to query surrounding and parent
6
6
  # nodes.
7
7
  #
8
- # @!attribute [rw] node_set
8
+ # @!attribute [r] node_set
9
9
  # @return [Oga::XML::NodeSet]
10
10
  #
11
11
  class Node
12
12
  include Traversal
13
13
 
14
- attr_accessor :node_set
14
+ attr_reader :node_set
15
15
 
16
16
  ##
17
17
  # @param [Hash] options
@@ -23,11 +23,19 @@ module Oga
23
23
  # the current node.
24
24
  #
25
25
  def initialize(options = {})
26
- @node_set = options[:node_set]
27
-
26
+ self.node_set = options[:node_set]
28
27
  self.children = options[:children] if options[:children]
29
28
  end
30
29
 
30
+ ##
31
+ # @param [Oga::XML::NodeSet] set
32
+ #
33
+ def node_set=(set)
34
+ @node_set = set
35
+ @root_node = nil
36
+ @html_p = nil
37
+ end
38
+
31
39
  ##
32
40
  # Returns the child nodes of the current node.
33
41
  #
@@ -120,17 +128,21 @@ module Oga
120
128
  # @return [Oga::XML::Document|Oga::XML::Node]
121
129
  #
122
130
  def root_node
123
- node = self
124
-
125
- loop do
126
- if !node.is_a?(Document) and node.node_set
127
- node = node.node_set.owner
128
- else
129
- break
131
+ unless @root_node
132
+ node = self
133
+
134
+ loop do
135
+ if !node.is_a?(Document) and node.node_set
136
+ node = node.node_set.owner
137
+ else
138
+ break
139
+ end
130
140
  end
141
+
142
+ @root_node = node
131
143
  end
132
144
 
133
- return node
145
+ return @root_node
134
146
  end
135
147
 
136
148
  ##
@@ -168,9 +180,13 @@ module Oga
168
180
  # @return [TrueClass|FalseClass]
169
181
  #
170
182
  def html?
171
- root = root_node
183
+ if @html_p.nil?
184
+ root = root_node
185
+
186
+ @html_p = root.is_a?(Document) && root.html?
187
+ end
172
188
 
173
- return root.is_a?(Document) && root.html?
189
+ return @html_p
174
190
  end
175
191
 
176
192
  ##
@@ -37,91 +37,102 @@ class Parser < LL::Driver
37
37
  :T_DOCTYPE_TYPE, # 7
38
38
  :T_DOCTYPE_NAME, # 8
39
39
  :T_DOCTYPE_INLINE, # 9
40
- :T_CDATA, # 10
41
- :T_COMMENT, # 11
42
- :T_ELEM_START, # 12
43
- :T_ELEM_NAME, # 13
44
- :T_ELEM_NS, # 14
45
- :T_ELEM_END, # 15
46
- :T_ATTR, # 16
47
- :T_ATTR_NS, # 17
48
- :T_XML_DECL_START, # 18
49
- :T_XML_DECL_END, # 19
50
- :T_PROC_INS_START, # 20
51
- :T_PROC_INS_NAME, # 21
52
- :T_PROC_INS_END, # 22
40
+ :T_COMMENT_START, # 10
41
+ :T_COMMENT_BODY, # 11
42
+ :T_COMMENT_END, # 12
43
+ :T_CDATA_START, # 13
44
+ :T_CDATA_BODY, # 14
45
+ :T_CDATA_END, # 15
46
+ :T_ELEM_START, # 16
47
+ :T_ELEM_NAME, # 17
48
+ :T_ELEM_NS, # 18
49
+ :T_ELEM_END, # 19
50
+ :T_ATTR, # 20
51
+ :T_ATTR_NS, # 21
52
+ :T_XML_DECL_START, # 22
53
+ :T_XML_DECL_END, # 23
54
+ :T_PROC_INS_START, # 24
55
+ :T_PROC_INS_NAME, # 25
56
+ :T_PROC_INS_BODY, # 26
57
+ :T_PROC_INS_END, # 27
53
58
  ].freeze
54
59
 
55
60
  CONFIG.rules = [
56
61
  [3, 0, 0, 1], # 0
57
- [3, 1, 4, 19, 6, 0], # 1
62
+ [3, 1, 4, 22, 6, 0], # 1
58
63
  [3, 2, 0, 3], # 2
59
64
  [3, 3, 0, 7], # 3
60
- [3, 4, 0, 8], # 4
61
- [3, 5, 0, 9], # 5
62
- [3, 6, 0, 16], # 6
63
- [3, 7, 0, 12], # 7
64
- [3, 8, 0, 15], # 8
65
+ [3, 4, 0, 9], # 4
66
+ [3, 5, 0, 11], # 5
67
+ [3, 6, 0, 19], # 6
68
+ [3, 7, 0, 15], # 7
69
+ [3, 8, 0, 18], # 8
65
70
  [3, 9, 0, 4, 1, 8, 1, 5], # 9
66
71
  [3, 10, 1, 6], # 10
67
72
  [3, 11, 0, 6, 1, 7], # 11
68
73
  [3, 12, 1, 6, 0, 5], # 12
69
- [3, 13, 5, 20, 6, 0], # 13
70
- [3, 14, 1, 6, 8, 21, 0, 17], # 14
74
+ [3, 13, 5, 23, 6, 0], # 13
75
+ [3, 14, 1, 6, 8, 24, 0, 20], # 14
71
76
  [3, 15, 1, 6], # 15
72
- [3, 16, 1, 10], # 16
73
- [3, 17, 1, 11], # 17
74
- [3, 18, 1, 22, 8, 22, 1, 21, 1, 20], # 18
75
- [3, 19, 1, 13], # 19
76
- [3, 20, 1, 13, 1, 14], # 20
77
- [3, 21, 0, 13, 0, 10, 1, 12], # 21
78
- [3, 22, 1, 15, 0, 1, 0, 11], # 22
79
- [3, 23, 4, 23, 6, 0], # 23
80
- [3, 24, 8, 24, 1, 16, 1, 17], # 24
81
- [3, 25, 8, 25, 1, 16], # 25
82
- [3, 26, 1, 19, 0, 13, 1, 18], # 26
83
- [3, 27, 1, 1], # 27
84
- [3, 28, 1, 3, 0, 18, 1, 3], # 28
85
- [3, 29, 1, 2, 0, 18, 1, 2], # 29
86
- [3, 30, 4, 26, 6, 0], # 30
87
- [3, 31, 0, 2], # 31
88
- [3, 32, 1, 9], # 32
89
- [3, 33, 0, 17], # 33
90
- [3, 34, 1, 1], # 34
91
- [3, 35, 0, 14], # 35
92
- [3, 36, 0, 17], # 36
93
- [3, 37, 0, 17], # 37
94
- [3, 38, 1, 4], # 38
77
+ [3, 16, 1, 15, 0, 8, 1, 13], # 16
78
+ [3, 17, 0, 8, 1, 14], # 17
79
+ [3, 18, 2, 0], # 18
80
+ [3, 19, 1, 12, 0, 10, 1, 10], # 19
81
+ [3, 20, 0, 10, 1, 11], # 20
82
+ [3, 21, 2, 0], # 21
83
+ [3, 22, 1, 27, 0, 12, 1, 25, 1, 24], # 22
84
+ [3, 23, 0, 12, 1, 26], # 23
85
+ [3, 24, 2, 0], # 24
86
+ [3, 25, 1, 17], # 25
87
+ [3, 26, 1, 17, 1, 18], # 26
88
+ [3, 27, 0, 16, 0, 13, 1, 16], # 27
89
+ [3, 28, 1, 19, 0, 1, 0, 14], # 28
90
+ [3, 29, 4, 25, 6, 0], # 29
91
+ [3, 30, 8, 26, 1, 20, 1, 21], # 30
92
+ [3, 31, 8, 27, 1, 20], # 31
93
+ [3, 32, 1, 23, 0, 16, 1, 22], # 32
94
+ [3, 33, 1, 1], # 33
95
+ [3, 34, 1, 3, 0, 21, 1, 3], # 34
96
+ [3, 35, 1, 2, 0, 21, 1, 2], # 35
97
+ [3, 36, 0, 21, 1, 4], # 36
98
+ [3, 37, 2, 0], # 37
99
+ [3, 38, 0, 2], # 38
100
+ [3, 39, 1, 9], # 39
101
+ [3, 40, 0, 20], # 40
102
+ [3, 41, 0, 17], # 41
103
+ [3, 42, 0, 20], # 42
104
+ [3, 43, 0, 20], # 43
95
105
  ].freeze
96
106
 
97
107
  CONFIG.table = [
98
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], # 0
99
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 1
100
- [-1, 6, -1, -1, -1, 2, -1, -1, -1, -1, 3, 4, 7, -1, -1, -1, -1, -1, 8, -1, 5, -1, -1], # 2
101
- [-1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 3
102
- [12, 12, 12, 12, 12, 12, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], # 4
103
- [13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13], # 5
104
- [-1, -1, 14, 14, -1, -1, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 6
105
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 7
106
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 8
107
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 18, -1, -1], # 9
108
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1], # 10
109
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 11
110
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 12
111
- [23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23], # 13
112
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 24, -1, -1, -1, -1, -1], # 14
113
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, -1, -1, -1, -1], # 15
114
- [-1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 16
115
- [-1, -1, 29, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 17
116
- [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30], # 18
117
- [-1, 31, -1, -1, -1, 31, -1, -1, -1, -1, 31, 31, 31, -1, -1, -1, -1, -1, 31, -1, 31, -1, -1], # 19
118
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 20
119
- [-1, -1, 33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 21
120
- [-1, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 22
121
- [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 35, 35, -1, -1, -1, -1, -1], # 23
122
- [-1, -1, 36, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 24
123
- [-1, -1, 37, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 25
124
- [-1, -1, -1, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 26
108
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], # 0
109
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # 1
110
+ [-1, 6, -1, -1, -1, 2, -1, -1, -1, -1, 4, -1, -1, 3, -1, -1, 7, -1, -1, -1, -1, -1, 8, -1, 5, -1, -1, -1], # 2
111
+ [-1, -1, -1, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 3
112
+ [12, 12, 12, 12, 12, 12, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], # 4
113
+ [13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13], # 5
114
+ [-1, -1, 14, 14, -1, -1, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 6
115
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 7
116
+ [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18], # 8
117
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 9
118
+ [21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21], # 10
119
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1], # 11
120
+ [24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 23, 24], # 12
121
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 13
122
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 14
123
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 15
124
+ [29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29], # 16
125
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 31, 30, -1, -1, -1, -1, -1, -1], # 17
126
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32, -1, -1, -1, -1, -1], # 18
127
+ [-1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 19
128
+ [-1, -1, 35, 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 20
129
+ [37, 37, 37, 37, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37], # 21
130
+ [-1, 38, -1, -1, -1, 38, -1, -1, -1, -1, 38, -1, -1, 38, -1, -1, 38, -1, -1, -1, -1, -1, 38, -1, 38, -1, -1, -1], # 22
131
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 23
132
+ [-1, -1, 40, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 24
133
+ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 41, 41, -1, -1, -1, -1, -1, -1], # 25
134
+ [-1, -1, 42, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 26
135
+ [-1, -1, 43, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], # 27
125
136
  ].freeze
126
137
 
127
138
  CONFIG.actions = [
@@ -141,29 +152,34 @@ class Parser < LL::Driver
141
152
  [:_rule_13, 1], # 13
142
153
  [:_rule_14, 3], # 14
143
154
  [:_rule_15, 1], # 15
144
- [:_rule_16, 1], # 16
145
- [:_rule_17, 1], # 17
146
- [:_rule_18, 4], # 18
147
- [:_rule_19, 1], # 19
155
+ [:_rule_16, 3], # 16
156
+ [:_rule_17, 2], # 17
157
+ [:_rule_18, 0], # 18
158
+ [:_rule_19, 3], # 19
148
159
  [:_rule_20, 2], # 20
149
- [:_rule_21, 3], # 21
150
- [:_rule_22, 3], # 22
151
- [:_rule_23, 1], # 23
152
- [:_rule_24, 3], # 24
153
- [:_rule_25, 2], # 25
154
- [:_rule_26, 3], # 26
155
- [:_rule_27, 1], # 27
160
+ [:_rule_21, 0], # 21
161
+ [:_rule_22, 4], # 22
162
+ [:_rule_23, 2], # 23
163
+ [:_rule_24, 0], # 24
164
+ [:_rule_25, 1], # 25
165
+ [:_rule_26, 2], # 26
166
+ [:_rule_27, 3], # 27
156
167
  [:_rule_28, 3], # 28
157
- [:_rule_29, 3], # 29
158
- [:_rule_30, 1], # 30
159
- [:_rule_31, 1], # 31
160
- [:_rule_32, 1], # 32
168
+ [:_rule_29, 1], # 29
169
+ [:_rule_30, 3], # 30
170
+ [:_rule_31, 2], # 31
171
+ [:_rule_32, 3], # 32
161
172
  [:_rule_33, 1], # 33
162
- [:_rule_34, 1], # 34
163
- [:_rule_35, 1], # 35
164
- [:_rule_36, 1], # 36
165
- [:_rule_37, 1], # 37
173
+ [:_rule_34, 3], # 34
174
+ [:_rule_35, 3], # 35
175
+ [:_rule_36, 2], # 36
176
+ [:_rule_37, 0], # 37
166
177
  [:_rule_38, 1], # 38
178
+ [:_rule_39, 1], # 39
179
+ [:_rule_40, 1], # 40
180
+ [:_rule_41, 1], # 41
181
+ [:_rule_42, 1], # 42
182
+ [:_rule_43, 1], # 43
167
183
  ].freeze
168
184
 
169
185
  ##
@@ -474,34 +490,58 @@ class Parser < LL::Driver
474
490
  end
475
491
 
476
492
  def _rule_16(val)
477
- on_cdata(val[0])
493
+ on_cdata(val[1])
478
494
  end
479
495
 
480
496
  def _rule_17(val)
481
- on_comment(val[0])
497
+ val[0] + val[1]
482
498
  end
483
499
 
484
500
  def _rule_18(val)
501
+ ''
502
+ end
503
+
504
+ def _rule_19(val)
505
+ on_comment(val[1])
506
+ end
507
+
508
+ def _rule_20(val)
509
+ val[0] + val[1]
510
+ end
511
+
512
+ def _rule_21(val)
513
+ ''
514
+ end
515
+
516
+ def _rule_22(val)
485
517
 
486
518
  on_proc_ins(val[1], val[2])
487
519
 
488
520
  end
489
521
 
490
- def _rule_19(val)
522
+ def _rule_23(val)
523
+ val[0] + val[1]
524
+ end
525
+
526
+ def _rule_24(val)
527
+ ''
528
+ end
529
+
530
+ def _rule_25(val)
491
531
  [nil, val[0]]
492
532
  end
493
533
 
494
- def _rule_20(val)
534
+ def _rule_26(val)
495
535
  val
496
536
  end
497
537
 
498
- def _rule_21(val)
538
+ def _rule_27(val)
499
539
 
500
540
  on_element(val[1][0], val[1][1], val[2])
501
541
 
502
542
  end
503
543
 
504
- def _rule_22(val)
544
+ def _rule_28(val)
505
545
 
506
546
  if val[0]
507
547
  on_element_children(val[0], val[1])
@@ -511,67 +551,63 @@ class Parser < LL::Driver
511
551
 
512
552
  end
513
553
 
514
- def _rule_23(val)
554
+ def _rule_29(val)
515
555
  on_attributes(val[0])
516
556
  end
517
557
 
518
- def _rule_24(val)
558
+ def _rule_30(val)
519
559
  on_attribute(val[1], val[0], val[2])
520
560
  end
521
561
 
522
- def _rule_25(val)
562
+ def _rule_31(val)
523
563
  on_attribute(val[0], nil, val[1])
524
564
  end
525
565
 
526
- def _rule_26(val)
566
+ def _rule_32(val)
527
567
  on_xml_decl(val[1])
528
568
  end
529
569
 
530
- def _rule_27(val)
570
+ def _rule_33(val)
531
571
  on_text(val[0])
532
572
  end
533
573
 
534
- def _rule_28(val)
574
+ def _rule_34(val)
535
575
  val[1]
536
576
  end
537
577
 
538
- def _rule_29(val)
578
+ def _rule_35(val)
539
579
  val[1]
540
580
  end
541
581
 
542
- def _rule_30(val)
543
- val[0].inject(:+) || ''
544
- end
545
-
546
- def _rule_31(val)
547
- val[0]
582
+ def _rule_36(val)
583
+ val[0] + val[1]
548
584
  end
549
585
 
550
- def _rule_32(val)
551
- val[0]
586
+ def _rule_37(val)
587
+ ''
552
588
  end
553
589
 
554
- def _rule_33(val)
590
+ def _rule_38(val)
555
591
  val[0]
556
592
  end
557
593
 
558
- def _rule_34(val)
594
+ def _rule_39(val)
559
595
  val[0]
560
596
  end
561
597
 
562
- def _rule_35(val)
598
+ def _rule_40(val)
563
599
  val[0]
564
600
  end
565
601
 
566
- def _rule_36(val)
602
+ def _rule_41(val)
567
603
  val[0]
568
604
  end
569
605
 
570
- def _rule_37(val)
606
+ def _rule_42(val)
571
607
  val[0]
572
608
  end
573
609
 
574
- def _rule_38(val)
610
+ def _rule_43(val)
575
611
  val[0]
576
612
  end
577
613
  end