oga 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,6 @@ module Oga
13
13
  # @param [String] data The input to parse.
14
14
  #
15
15
  def initialize(data)
16
- @data = data
17
16
  @lexer = Lexer.new(data)
18
17
  end
19
18
 
@@ -22,10 +21,10 @@ module Oga
22
21
  #
23
22
  # @param [Symbol] type
24
23
  # @param [Array] children
25
- # @return [Oga::XPath::Node]
24
+ # @return [AST::Node]
26
25
  #
27
26
  def s(type, *children)
28
- return Node.new(type, children)
27
+ return AST::Node.new(type, children)
29
28
  end
30
29
 
31
30
  ##
@@ -48,7 +47,7 @@ module Oga
48
47
  # parser = Oga::XPath::Parser.new('//foo')
49
48
  # ast = parser.parse
50
49
  #
51
- # @return [Oga::XPath::Node]
50
+ # @return [AST::Node]
52
51
  #
53
52
  def parse
54
53
  ast = yyparse(self, :yield_next_token)
@@ -59,179 +58,192 @@ module Oga
59
58
  ##### State transition tables begin ###
60
59
 
61
60
  racc_action_table = [
62
- 20, 48, 20, 23, 22, 19, 18, 19, 18, 49,
63
- 20, 14, 21, 23, 22, 19, 18, 19, 18, 53,
64
- 20, 14, 21, 23, 22, 19, 18, 24, 20, 71,
65
- 73, 14, 21, 19, 18, -12, 40, 24, 20, -13,
66
- -14, 23, 22, 19, 18, 40, 40, 24, 20, 14,
67
- 21, 23, 22, 19, 18, 47, 77, 25, 20, 14,
68
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
69
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
70
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
71
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
72
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
73
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
74
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
75
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
76
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
77
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
78
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
79
- 21, 23, 22, 19, 18, 24, nil, nil, 20, 14,
80
- 21, 23, 22, 19, 18, 24, nil, nil, 26, 14,
81
- 21, 29, 30, 31, nil, 24, 76, nil, nil, nil,
82
- 39, 38, nil, nil, nil, 24, nil, 26, 27, 28,
83
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 39,
84
- 38, 75, nil, nil, nil, nil, 26, 27, 28, 29,
85
- 30, 31, 32, 33, 34, 35, 36, 37, 39, 38,
86
- 26, nil, nil, 29, 30, 31, 32, 33, 34, 35,
87
- 36, 37, 39, 38, 26, 27, nil, 29, 30, 31,
88
- 32, 33, 34, 35, 36, 37, 39, 38, 26, 27,
89
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
90
- 39, 38, 26, nil, nil, 29, 30, 31, nil, nil,
91
- 34, 35, 36, 37, 39, 38, 26, nil, nil, 29,
92
- 30, 31, 26, nil, nil, 29, 30, 31, 39, 38,
93
- 34, 35, 36, 37, 39, 38, 26, nil, nil, 29,
94
- 30, 31, 26, nil, nil, 29, 30, 31, 39, 38,
95
- nil, nil, nil, nil, 39, 38 ]
61
+ 23, 58, 23, 26, 25, 22, 21, 22, 21, 4,
62
+ 23, 17, 24, 26, 25, 22, 21, 22, 21, 4,
63
+ 23, 17, 24, 26, 25, 22, 21, 27, 53, 4,
64
+ 79, 17, 24, 77, 48, 23, 54, 27, -17, 23,
65
+ 22, 21, 26, 25, 22, 21, 73, 27, 4, 23,
66
+ 17, 24, 26, 25, 22, 21, -18, 46, 4, 23,
67
+ 17, 24, 26, 25, 22, 21, 27, 46, 4, 23,
68
+ 17, 24, 26, 25, 22, 21, 27, 48, 4, 23,
69
+ 17, 24, 26, 25, 22, 21, 27, 48, 4, 23,
70
+ 17, 24, 26, 25, 22, 21, 27, 83, 4, 23,
71
+ 17, 24, 26, 25, 22, 21, 27, 28, 4, 23,
72
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
73
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
74
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
75
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
76
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
77
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
78
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
79
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 23,
80
+ 17, 24, 26, 25, 22, 21, 27, nil, 4, 29,
81
+ 17, 24, 32, 33, 34, nil, 27, 82, nil, nil,
82
+ nil, 42, 41, nil, nil, nil, 27, nil, 29, 30,
83
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
84
+ 42, 41, 81, nil, nil, nil, nil, 29, 30, 31,
85
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 42,
86
+ 41, 29, 30, 31, 32, 33, 34, 35, 36, 37,
87
+ 38, 39, 40, 42, 41, 29, nil, nil, 32, 33,
88
+ 34, nil, nil, 37, 38, 39, 40, 42, 41, 29,
89
+ nil, nil, 32, 33, 34, 35, 36, 37, 38, 39,
90
+ 40, 42, 41, 29, 30, nil, 32, 33, 34, 35,
91
+ 36, 37, 38, 39, 40, 42, 41, 29, nil, nil,
92
+ 32, 33, 34, 29, nil, nil, 32, 33, 34, 42,
93
+ 41, 37, 38, 39, 40, 42, 41, 29, 30, 31,
94
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 42,
95
+ 41, 29, nil, nil, 32, 33, 34, 29, nil, nil,
96
+ 32, 33, 34, 42, 41, nil, nil, nil, nil, 42,
97
+ 41 ]
96
98
 
97
99
  racc_action_check = [
98
- 0, 19, 40, 0, 0, 0, 0, 40, 40, 19,
99
- 76, 0, 0, 76, 76, 76, 76, 20, 20, 25,
100
- 49, 76, 76, 49, 49, 49, 49, 0, 14, 48,
101
- 49, 49, 49, 14, 14, 3, 44, 76, 47, 5,
102
- 8, 47, 47, 47, 47, 68, 12, 49, 39, 47,
103
- 47, 39, 39, 39, 39, 16, 74, 1, 38, 39,
104
- 39, 38, 38, 38, 38, 47, nil, nil, 37, 38,
105
- 38, 37, 37, 37, 37, 39, nil, nil, 31, 37,
106
- 37, 31, 31, 31, 31, 38, nil, nil, 35, 31,
107
- 31, 35, 35, 35, 35, 37, nil, nil, 34, 35,
108
- 35, 34, 34, 34, 34, 31, nil, nil, 33, 34,
109
- 34, 33, 33, 33, 33, 35, nil, nil, 32, 33,
110
- 33, 32, 32, 32, 32, 34, nil, nil, 26, 32,
111
- 32, 26, 26, 26, 26, 33, nil, nil, 27, 26,
112
- 26, 27, 27, 27, 27, 32, nil, nil, 28, 27,
113
- 27, 28, 28, 28, 28, 26, nil, nil, 29, 28,
114
- 28, 29, 29, 29, 29, 27, nil, nil, 30, 29,
115
- 29, 30, 30, 30, 30, 28, nil, nil, 36, 30,
116
- 30, 36, 36, 36, 36, 29, nil, nil, 65, 36,
117
- 36, 65, 65, 65, nil, 30, 72, nil, nil, nil,
118
- 65, 65, nil, nil, nil, 36, nil, 72, 72, 72,
119
- 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
120
- 72, 70, nil, nil, nil, nil, 70, 70, 70, 70,
121
- 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
122
- 55, nil, nil, 55, 55, 55, 55, 55, 55, 55,
123
- 55, 55, 55, 55, 56, 56, nil, 56, 56, 56,
124
- 56, 56, 56, 56, 56, 56, 56, 56, 2, 2,
125
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
126
- 2, 2, 60, nil, nil, 60, 60, 60, nil, nil,
127
- 60, 60, 60, 60, 60, 60, 62, nil, nil, 62,
128
- 62, 62, 61, nil, nil, 61, 61, 61, 62, 62,
129
- 61, 61, 61, 61, 61, 61, 63, nil, nil, 63,
130
- 63, 63, 64, nil, nil, 64, 64, 64, 63, 63,
131
- nil, nil, nil, nil, 64, 64 ]
100
+ 0, 28, 48, 0, 0, 0, 0, 48, 48, 0,
101
+ 82, 0, 0, 82, 82, 82, 82, 23, 23, 82,
102
+ 54, 82, 82, 54, 54, 54, 54, 0, 22, 54,
103
+ 54, 54, 54, 53, 51, 17, 22, 82, 5, 4,
104
+ 17, 17, 4, 4, 4, 4, 43, 54, 4, 46,
105
+ 4, 4, 46, 46, 46, 46, 9, 13, 46, 42,
106
+ 46, 46, 42, 42, 42, 42, 4, 14, 42, 41,
107
+ 42, 42, 41, 41, 41, 41, 46, 75, 41, 40,
108
+ 41, 41, 40, 40, 40, 40, 42, 15, 40, 34,
109
+ 40, 40, 34, 34, 34, 34, 41, 80, 34, 38,
110
+ 34, 34, 38, 38, 38, 38, 40, 1, 38, 37,
111
+ 38, 38, 37, 37, 37, 37, 34, nil, 37, 36,
112
+ 37, 37, 36, 36, 36, 36, 38, nil, 36, 35,
113
+ 36, 36, 35, 35, 35, 35, 37, nil, 35, 29,
114
+ 35, 35, 29, 29, 29, 29, 36, nil, 29, 30,
115
+ 29, 29, 30, 30, 30, 30, 35, nil, 30, 31,
116
+ 30, 30, 31, 31, 31, 31, 29, nil, 31, 32,
117
+ 31, 31, 32, 32, 32, 32, 30, nil, 32, 33,
118
+ 32, 32, 33, 33, 33, 33, 31, nil, 33, 39,
119
+ 33, 33, 39, 39, 39, 39, 32, nil, 39, 70,
120
+ 39, 39, 70, 70, 70, nil, 33, 78, nil, nil,
121
+ nil, 70, 70, nil, nil, nil, 39, nil, 78, 78,
122
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
123
+ 78, 78, 74, nil, nil, nil, nil, 74, 74, 74,
124
+ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
125
+ 74, 2, 2, 2, 2, 2, 2, 2, 2, 2,
126
+ 2, 2, 2, 2, 2, 65, nil, nil, 65, 65,
127
+ 65, nil, nil, 65, 65, 65, 65, 65, 65, 60,
128
+ nil, nil, 60, 60, 60, 60, 60, 60, 60, 60,
129
+ 60, 60, 60, 61, 61, nil, 61, 61, 61, 61,
130
+ 61, 61, 61, 61, 61, 61, 61, 69, nil, nil,
131
+ 69, 69, 69, 66, nil, nil, 66, 66, 66, 69,
132
+ 69, 66, 66, 66, 66, 66, 66, 44, 44, 44,
133
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
134
+ 44, 67, nil, nil, 67, 67, 67, 68, nil, nil,
135
+ 68, 68, 68, 67, 67, nil, nil, nil, nil, 68,
136
+ 68 ]
132
137
 
133
138
  racc_action_pointer = [
134
- -2, 57, 253, 22, nil, 26, nil, nil, 27, nil,
135
- nil, nil, 33, nil, 26, nil, 46, nil, nil, -2,
136
- 10, nil, nil, nil, nil, 19, 126, 136, 146, 156,
137
- 166, 76, 116, 106, 96, 86, 176, 66, 56, 46,
138
- 0, nil, nil, nil, 23, nil, nil, 36, 22, 18,
139
- nil, nil, nil, nil, nil, 225, 239, nil, nil, nil,
140
- 267, 287, 281, 301, 307, 173, nil, nil, 32, nil,
141
- 211, nil, 192, nil, 44, nil, 8, nil, nil ]
139
+ -2, 107, 236, nil, 37, 25, nil, nil, nil, 43,
140
+ nil, nil, nil, 48, 58, 74, nil, 33, nil, nil,
141
+ nil, nil, 25, 10, nil, nil, nil, nil, 1, 137,
142
+ 147, 157, 167, 177, 87, 127, 117, 107, 97, 187,
143
+ 77, 67, 57, 34, 312, nil, 47, nil, 0, nil,
144
+ nil, 21, nil, 26, 18, nil, nil, nil, nil, nil,
145
+ 264, 278, nil, nil, nil, 250, 298, 326, 332, 292,
146
+ 184, nil, nil, nil, 222, 64, nil, nil, 203, nil,
147
+ 85, nil, 8, nil, nil ]
142
148
 
143
149
  racc_action_default = [
144
- -2, -55, -1, -3, -4, -5, -6, -7, -8, -9,
145
- -10, -11, -55, -17, -20, -21, -22, -24, -25, -26,
146
- -44, -51, -52, -53, -54, -55, -55, -55, -55, -55,
147
- -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
148
- -55, -12, -13, -14, -19, -18, -23, -55, -55, -55,
149
- -43, -45, -46, 79, -29, -30, -31, -32, -33, -34,
150
- -35, -36, -37, -38, -39, -40, -41, -42, -15, -16,
151
- -55, -27, -49, -47, -55, -28, -55, -48, -50 ]
150
+ -2, -58, -1, -3, -58, -5, -6, -7, -8, -9,
151
+ -10, -11, -12, -13, -15, -58, -21, -24, -25, -26,
152
+ -27, -28, -29, -47, -54, -55, -56, -57, -58, -58,
153
+ -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
154
+ -58, -58, -58, -3, -58, -14, -58, -16, -58, -17,
155
+ -18, -23, -22, -58, -58, -46, -48, -49, 85, -32,
156
+ -33, -34, -35, -36, -37, -38, -39, -40, -41, -42,
157
+ -43, -44, -45, -4, -58, -19, -20, -30, -52, -50,
158
+ -58, -31, -58, -51, -53 ]
152
159
 
153
160
  racc_goto_table = [
154
- 2, 51, 46, 50, 1, nil, nil, nil, nil, nil,
155
- nil, nil, nil, 74, nil, 42, 41, 43, 45, 44,
156
- nil, nil, nil, 52, nil, nil, 54, 55, 56, 57,
157
- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
158
- 78, 42, 41, 43, 69, 68, nil, 70 ]
161
+ 2, 45, 47, 43, 44, 56, 55, 1, nil, nil,
162
+ nil, nil, 52, 51, 50, nil, 49, nil, nil, nil,
163
+ 57, 80, nil, nil, nil, nil, nil, nil, nil, 59,
164
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
165
+ 70, 71, 72, 76, 75, 50, 74, 49, nil, 84 ]
159
166
 
160
167
  racc_goto_check = [
161
- 2, 14, 16, 18, 1, nil, nil, nil, nil, nil,
162
- nil, nil, nil, 19, nil, 5, 3, 8, 13, 12,
163
- nil, nil, nil, 8, nil, nil, 2, 2, 2, 2,
168
+ 2, 13, 13, 3, 2, 17, 20, 1, nil, nil,
169
+ nil, nil, 16, 15, 8, nil, 4, nil, nil, nil,
170
+ 8, 21, nil, nil, nil, nil, nil, nil, nil, 2,
164
171
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
165
- 19, 5, 3, 8, 13, 12, nil, 2 ]
172
+ 2, 2, 2, 16, 15, 8, 2, 4, nil, 21 ]
166
173
 
167
174
  racc_goto_pointer = [
168
- nil, 4, 0, 2, nil, 1, nil, nil, 3, nil,
169
- nil, nil, 5, 4, -19, nil, -14, nil, -17, -36 ]
175
+ nil, 7, 0, -1, -1, nil, nil, nil, -3, nil,
176
+ nil, nil, nil, -12, nil, -4, -5, -18, nil, nil,
177
+ -17, -33 ]
170
178
 
171
179
  racc_goto_default = [
172
- nil, nil, 72, 3, 4, 5, 6, 7, 8, 9,
173
- 10, 11, 12, 13, 15, 16, nil, 17, nil, nil ]
180
+ nil, nil, 78, 3, 5, 6, 7, 8, 9, 10,
181
+ 11, 12, 13, nil, 14, 15, 16, 18, 19, 20,
182
+ nil, nil ]
174
183
 
175
184
  racc_reduce_table = [
176
185
  0, 0, :racc_error,
177
186
  1, 31, :_reduce_1,
178
187
  0, 31, :_reduce_2,
179
188
  1, 32, :_reduce_none,
180
- 1, 32, :_reduce_none,
181
- 1, 32, :_reduce_none,
182
- 1, 32, :_reduce_none,
183
- 1, 32, :_reduce_none,
184
- 1, 32, :_reduce_none,
185
- 1, 32, :_reduce_none,
186
- 1, 32, :_reduce_none,
187
- 1, 32, :_reduce_none,
188
- 1, 42, :_reduce_none,
189
- 1, 42, :_reduce_none,
190
- 1, 42, :_reduce_none,
191
- 3, 43, :_reduce_15,
192
- 3, 43, :_reduce_16,
193
- 1, 39, :_reduce_17,
194
- 2, 40, :_reduce_18,
195
- 2, 40, :_reduce_19,
196
- 1, 40, :_reduce_20,
197
- 1, 33, :_reduce_21,
198
- 1, 44, :_reduce_22,
199
- 2, 44, :_reduce_23,
200
- 1, 44, :_reduce_24,
201
- 1, 47, :_reduce_25,
202
- 1, 45, :_reduce_26,
203
- 3, 45, :_reduce_27,
204
- 3, 46, :_reduce_28,
205
- 3, 34, :_reduce_29,
206
- 3, 34, :_reduce_30,
207
- 3, 34, :_reduce_31,
208
- 3, 34, :_reduce_32,
209
- 3, 34, :_reduce_33,
210
- 3, 34, :_reduce_34,
211
- 3, 34, :_reduce_35,
212
- 3, 34, :_reduce_36,
213
- 3, 34, :_reduce_37,
214
- 3, 34, :_reduce_38,
215
- 3, 34, :_reduce_39,
216
- 3, 34, :_reduce_40,
217
- 3, 34, :_reduce_41,
218
- 3, 34, :_reduce_42,
219
- 2, 35, :_reduce_43,
220
- 1, 35, :_reduce_44,
221
- 1, 48, :_reduce_none,
222
- 1, 48, :_reduce_none,
223
- 3, 38, :_reduce_47,
224
- 4, 38, :_reduce_48,
225
- 1, 49, :_reduce_49,
226
- 3, 49, :_reduce_50,
227
- 1, 36, :_reduce_51,
228
- 1, 37, :_reduce_52,
229
- 1, 37, :_reduce_53,
230
- 1, 41, :_reduce_54 ]
231
-
232
- racc_reduce_n = 55
233
-
234
- racc_shift_n = 79
189
+ 3, 32, :_reduce_4,
190
+ 1, 33, :_reduce_none,
191
+ 1, 33, :_reduce_none,
192
+ 1, 33, :_reduce_none,
193
+ 1, 33, :_reduce_none,
194
+ 1, 33, :_reduce_none,
195
+ 1, 33, :_reduce_none,
196
+ 1, 33, :_reduce_none,
197
+ 1, 33, :_reduce_none,
198
+ 1, 34, :_reduce_none,
199
+ 2, 34, :_reduce_14,
200
+ 1, 34, :_reduce_none,
201
+ 2, 34, :_reduce_16,
202
+ 1, 45, :_reduce_none,
203
+ 1, 45, :_reduce_none,
204
+ 3, 46, :_reduce_19,
205
+ 3, 46, :_reduce_20,
206
+ 1, 39, :_reduce_21,
207
+ 2, 40, :_reduce_22,
208
+ 2, 40, :_reduce_23,
209
+ 1, 40, :_reduce_24,
210
+ 1, 42, :_reduce_25,
211
+ 1, 47, :_reduce_26,
212
+ 1, 47, :_reduce_27,
213
+ 1, 49, :_reduce_28,
214
+ 1, 48, :_reduce_29,
215
+ 3, 48, :_reduce_30,
216
+ 3, 43, :_reduce_31,
217
+ 3, 35, :_reduce_32,
218
+ 3, 35, :_reduce_33,
219
+ 3, 35, :_reduce_34,
220
+ 3, 35, :_reduce_35,
221
+ 3, 35, :_reduce_36,
222
+ 3, 35, :_reduce_37,
223
+ 3, 35, :_reduce_38,
224
+ 3, 35, :_reduce_39,
225
+ 3, 35, :_reduce_40,
226
+ 3, 35, :_reduce_41,
227
+ 3, 35, :_reduce_42,
228
+ 3, 35, :_reduce_43,
229
+ 3, 35, :_reduce_44,
230
+ 3, 35, :_reduce_45,
231
+ 2, 44, :_reduce_46,
232
+ 1, 44, :_reduce_47,
233
+ 1, 50, :_reduce_none,
234
+ 1, 50, :_reduce_none,
235
+ 3, 38, :_reduce_50,
236
+ 4, 38, :_reduce_51,
237
+ 1, 51, :_reduce_52,
238
+ 3, 51, :_reduce_53,
239
+ 1, 36, :_reduce_54,
240
+ 1, 37, :_reduce_55,
241
+ 1, 37, :_reduce_56,
242
+ 1, 41, :_reduce_57 ]
243
+
244
+ racc_reduce_n = 58
245
+
246
+ racc_shift_n = 85
235
247
 
236
248
  racc_token_table = {
237
249
  false => 0,
@@ -319,20 +331,22 @@ Racc_token_to_s_table = [
319
331
  "$start",
320
332
  "xpath",
321
333
  "expression",
322
- "node_test_as_axis",
334
+ "expression_members",
335
+ "expression_with_predicate",
323
336
  "operator",
324
- "axis",
325
337
  "string",
326
338
  "number",
327
339
  "call",
328
340
  "path",
329
341
  "absolute_path",
330
342
  "variable",
343
+ "node_test_as_axis",
344
+ "predicate",
345
+ "axis",
331
346
  "path_member",
332
347
  "path_members",
333
348
  "node_test",
334
349
  "node_name",
335
- "predicate",
336
350
  "type_test",
337
351
  "axis_value",
338
352
  "call_args" ]
@@ -353,7 +367,9 @@ end
353
367
 
354
368
  # reduce 3 omitted
355
369
 
356
- # reduce 4 omitted
370
+ def _reduce_4(val, _values)
371
+ val[1]
372
+ end
357
373
 
358
374
  # reduce 5 omitted
359
375
 
@@ -373,161 +389,169 @@ end
373
389
 
374
390
  # reduce 13 omitted
375
391
 
376
- # reduce 14 omitted
392
+ def _reduce_14(val, _values)
393
+ s(:predicate, val[0], val[1])
394
+ end
395
+
396
+ # reduce 15 omitted
397
+
398
+ def _reduce_16(val, _values)
399
+ s(:predicate, val[0], val[1])
400
+ end
401
+
402
+ # reduce 17 omitted
377
403
 
378
- def _reduce_15(val, _values)
404
+ # reduce 18 omitted
405
+
406
+ def _reduce_19(val, _values)
379
407
  [val[0], val[2]]
380
408
  end
381
409
 
382
- def _reduce_16(val, _values)
410
+ def _reduce_20(val, _values)
383
411
  [val[0], *val[2]]
384
412
  end
385
413
 
386
- def _reduce_17(val, _values)
414
+ def _reduce_21(val, _values)
387
415
  s(:path, *val[0])
388
416
  end
389
417
 
390
- def _reduce_18(val, _values)
418
+ def _reduce_22(val, _values)
391
419
  s(:absolute_path, *val[1])
392
420
  end
393
421
 
394
- def _reduce_19(val, _values)
422
+ def _reduce_23(val, _values)
395
423
  s(:absolute_path, val[1])
396
424
  end
397
425
 
398
- def _reduce_20(val, _values)
426
+ def _reduce_24(val, _values)
399
427
  s(:absolute_path)
400
428
  end
401
429
 
402
- def _reduce_21(val, _values)
430
+ def _reduce_25(val, _values)
403
431
  s(:axis, 'child', val[0])
404
432
  end
405
433
 
406
- def _reduce_22(val, _values)
434
+ def _reduce_26(val, _values)
407
435
  s(:test, *val[0])
408
436
  end
409
437
 
410
- def _reduce_23(val, _values)
411
- s(:test, *val[0], val[1])
412
- end
413
-
414
- def _reduce_24(val, _values)
438
+ def _reduce_27(val, _values)
415
439
  val[0]
416
440
  end
417
441
 
418
- def _reduce_25(val, _values)
442
+ def _reduce_28(val, _values)
419
443
  s(:type_test, val[0])
420
444
  end
421
445
 
422
- def _reduce_26(val, _values)
446
+ def _reduce_29(val, _values)
423
447
  [nil, val[0]]
424
448
  end
425
449
 
426
- def _reduce_27(val, _values)
450
+ def _reduce_30(val, _values)
427
451
  [val[0], val[2]]
428
452
  end
429
453
 
430
- def _reduce_28(val, _values)
454
+ def _reduce_31(val, _values)
431
455
  val[1]
432
456
  end
433
457
 
434
- def _reduce_29(val, _values)
458
+ def _reduce_32(val, _values)
435
459
  s(:pipe, val[0], val[2])
436
460
  end
437
461
 
438
- def _reduce_30(val, _values)
462
+ def _reduce_33(val, _values)
439
463
  s(:and, val[0], val[2])
440
464
  end
441
465
 
442
- def _reduce_31(val, _values)
466
+ def _reduce_34(val, _values)
443
467
  s(:or, val[0], val[2])
444
468
  end
445
469
 
446
- def _reduce_32(val, _values)
470
+ def _reduce_35(val, _values)
447
471
  s(:add, val[0], val[2])
448
472
  end
449
473
 
450
- def _reduce_33(val, _values)
474
+ def _reduce_36(val, _values)
451
475
  s(:div, val[0], val[2])
452
476
  end
453
477
 
454
- def _reduce_34(val, _values)
478
+ def _reduce_37(val, _values)
455
479
  s(:mod, val[0], val[2])
456
480
  end
457
481
 
458
- def _reduce_35(val, _values)
482
+ def _reduce_38(val, _values)
459
483
  s(:eq, val[0], val[2])
460
484
  end
461
485
 
462
- def _reduce_36(val, _values)
486
+ def _reduce_39(val, _values)
463
487
  s(:neq, val[0], val[2])
464
488
  end
465
489
 
466
- def _reduce_37(val, _values)
490
+ def _reduce_40(val, _values)
467
491
  s(:lt, val[0], val[2])
468
492
  end
469
493
 
470
- def _reduce_38(val, _values)
494
+ def _reduce_41(val, _values)
471
495
  s(:gt, val[0], val[2])
472
496
  end
473
497
 
474
- def _reduce_39(val, _values)
498
+ def _reduce_42(val, _values)
475
499
  s(:lte, val[0], val[2])
476
500
  end
477
501
 
478
- def _reduce_40(val, _values)
502
+ def _reduce_43(val, _values)
479
503
  s(:gte, val[0], val[2])
480
504
  end
481
505
 
482
- def _reduce_41(val, _values)
506
+ def _reduce_44(val, _values)
483
507
  s(:mul, val[0], val[2])
484
508
  end
485
509
 
486
- def _reduce_42(val, _values)
510
+ def _reduce_45(val, _values)
487
511
  s(:sub, val[0], val[2])
488
512
  end
489
513
 
490
- def _reduce_43(val, _values)
514
+ def _reduce_46(val, _values)
491
515
  s(:axis, val[0], val[1])
492
516
  end
493
517
 
494
- def _reduce_44(val, _values)
518
+ def _reduce_47(val, _values)
495
519
  s(:axis, val[0])
496
520
  end
497
521
 
498
- # reduce 45 omitted
522
+ # reduce 48 omitted
499
523
 
500
- # reduce 46 omitted
524
+ # reduce 49 omitted
501
525
 
502
- def _reduce_47(val, _values)
526
+ def _reduce_50(val, _values)
503
527
  s(:call, val[0])
504
528
  end
505
529
 
506
- def _reduce_48(val, _values)
530
+ def _reduce_51(val, _values)
507
531
  s(:call, val[0], *val[2])
508
532
  end
509
533
 
510
- def _reduce_49(val, _values)
534
+ def _reduce_52(val, _values)
511
535
  val
512
536
  end
513
537
 
514
- def _reduce_50(val, _values)
538
+ def _reduce_53(val, _values)
515
539
  val[2].unshift(val[0])
516
540
  end
517
541
 
518
- def _reduce_51(val, _values)
542
+ def _reduce_54(val, _values)
519
543
  s(:string, val[0])
520
544
  end
521
545
 
522
- def _reduce_52(val, _values)
546
+ def _reduce_55(val, _values)
523
547
  s(:int, val[0])
524
548
  end
525
549
 
526
- def _reduce_53(val, _values)
550
+ def _reduce_56(val, _values)
527
551
  s(:float, val[0])
528
552
  end
529
553
 
530
- def _reduce_54(val, _values)
554
+ def _reduce_57(val, _values)
531
555
  s(:var, val[0])
532
556
  end
533
557