synvert-core 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/synvert/core/array_ext.rb +9 -2
- data/lib/synvert/core/node_query/compiler/array.rb +1 -1
- data/lib/synvert/core/node_query/compiler/expression.rb +69 -31
- data/lib/synvert/core/node_query/compiler/selector.rb +17 -14
- data/lib/synvert/core/node_query/lexer.rex +8 -1
- data/lib/synvert/core/node_query/lexer.rex.rb +20 -2
- data/lib/synvert/core/node_query/parser.racc.rb +221 -247
- data/lib/synvert/core/node_query/parser.y +9 -12
- data/lib/synvert/core/version.rb +1 -1
- data/spec/synvert/core/node_query/lexer_spec.rb +30 -4
- data/spec/synvert/core/node_query/parser_spec.rb +54 -19
- metadata +2 -2
@@ -25,179 +25,167 @@ module Synvert
|
|
25
25
|
##### State transition tables begin ###
|
26
26
|
|
27
27
|
racc_action_table = [
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
nil, nil,
|
43
|
-
|
44
|
-
|
45
|
-
nil, nil, nil,
|
46
|
-
nil,
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
nil,
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
28
|
+
8, 19, 11, 15, 53, 16, 10, 8, 20, 22,
|
29
|
+
10, 53, 45, 23, 43, 24, 8, 10, 26, 45,
|
30
|
+
53, 27, 40, 10, 63, 64, 10, 68, 45, 75,
|
31
|
+
77, 78, 79, 46, 47, 48, 49, 50, 51, 52,
|
32
|
+
46, 47, 48, 49, 50, 51, 52, 80, nil, 46,
|
33
|
+
47, 48, 49, 50, 51, 52, 8, nil, nil, nil,
|
34
|
+
53, nil, nil, 8, nil, nil, 10, 53, 45, nil,
|
35
|
+
8, nil, nil, 10, 53, 45, nil, nil, nil, nil,
|
36
|
+
10, nil, 45, nil, nil, nil, nil, nil, nil, 46,
|
37
|
+
47, 48, 49, 50, 51, 52, 46, 47, 48, 49,
|
38
|
+
50, 51, 52, 46, 47, 48, 49, 50, 51, 52,
|
39
|
+
8, nil, nil, nil, 53, nil, nil, 8, nil, nil,
|
40
|
+
10, 53, 45, nil, 8, nil, nil, 10, 53, 45,
|
41
|
+
nil, 61, nil, nil, 10, nil, 45, nil, nil, nil,
|
42
|
+
nil, nil, nil, 46, 47, 48, 49, 50, 51, 52,
|
43
|
+
46, 47, 48, 49, 50, 51, 52, 46, 47, 48,
|
44
|
+
49, 50, 51, 52, 8, nil, nil, nil, 53, nil,
|
45
|
+
nil, 8, nil, nil, 10, 53, 45, nil, 8, 65,
|
46
|
+
nil, 10, 53, 45, nil, nil, 69, nil, 10, nil,
|
47
|
+
45, nil, nil, 71, nil, nil, nil, 46, 47, 48,
|
48
|
+
49, 50, 51, 52, 46, 47, 48, 49, 50, 51,
|
49
|
+
52, 46, 47, 48, 49, 50, 51, 52, 8, nil,
|
50
|
+
nil, nil, 53, nil, nil, 8, nil, nil, 10, 53,
|
51
|
+
45, nil, 8, 73, nil, 10, nil, 45, 6, 2,
|
52
|
+
3, 4, 10, nil, nil, nil, nil, nil, nil, nil,
|
53
|
+
5, 46, 47, 48, 49, 50, 51, 52, 46, 47,
|
54
|
+
48, 49, 50, 51, 52, 8, nil, nil, nil, nil,
|
55
|
+
8, 6, 2, 3, 4, 10, 6, 2, 3, 4,
|
56
|
+
10, nil, nil, 5, 8, nil, nil, nil, 5, 8,
|
57
|
+
6, 2, 3, 4, 10, 6, 2, 3, 4, 10,
|
58
|
+
nil, nil, 5, 8, nil, nil, nil, 5, 8, 6,
|
59
|
+
2, 3, 4, 10, 6, 2, 3, 4, 10, nil,
|
60
|
+
nil, 5, nil, nil, nil, nil, 5, 35, 28, 30,
|
61
|
+
29, 32, 31, 34, 33, 38, 37, 36 ]
|
62
62
|
|
63
63
|
racc_action_check = [
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
nil, nil,
|
79
|
-
|
80
|
-
|
81
|
-
nil,
|
82
|
-
nil,
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
nil,
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
64
|
+
28, 8, 1, 5, 28, 6, 8, 29, 9, 10,
|
65
|
+
28, 29, 28, 11, 28, 15, 30, 29, 18, 29,
|
66
|
+
30, 21, 25, 27, 37, 38, 30, 45, 30, 66,
|
67
|
+
68, 70, 72, 28, 28, 28, 28, 28, 28, 28,
|
68
|
+
29, 29, 29, 29, 29, 29, 29, 74, nil, 30,
|
69
|
+
30, 30, 30, 30, 30, 30, 31, nil, nil, nil,
|
70
|
+
31, nil, nil, 32, nil, nil, 31, 32, 31, nil,
|
71
|
+
33, nil, nil, 32, 33, 32, nil, nil, nil, nil,
|
72
|
+
33, nil, 33, nil, nil, nil, nil, nil, nil, 31,
|
73
|
+
31, 31, 31, 31, 31, 31, 32, 32, 32, 32,
|
74
|
+
32, 32, 32, 33, 33, 33, 33, 33, 33, 33,
|
75
|
+
34, nil, nil, nil, 34, nil, nil, 35, nil, nil,
|
76
|
+
34, 35, 34, nil, 36, nil, nil, 35, 36, 35,
|
77
|
+
nil, 35, nil, nil, 36, nil, 36, nil, nil, nil,
|
78
|
+
nil, nil, nil, 34, 34, 34, 34, 34, 34, 34,
|
79
|
+
35, 35, 35, 35, 35, 35, 35, 36, 36, 36,
|
80
|
+
36, 36, 36, 36, 43, nil, nil, nil, 43, nil,
|
81
|
+
nil, 61, nil, nil, 43, 61, 43, nil, 63, 43,
|
82
|
+
nil, 61, 63, 61, nil, nil, 61, nil, 63, nil,
|
83
|
+
63, nil, nil, 63, nil, nil, nil, 43, 43, 43,
|
84
|
+
43, 43, 43, 43, 61, 61, 61, 61, 61, 61,
|
85
|
+
61, 63, 63, 63, 63, 63, 63, 63, 64, nil,
|
86
|
+
nil, nil, 64, nil, nil, 67, nil, nil, 64, 67,
|
87
|
+
64, nil, 0, 64, nil, 67, nil, 67, 0, 0,
|
88
|
+
0, 0, 0, nil, nil, nil, nil, nil, nil, nil,
|
89
|
+
0, 64, 64, 64, 64, 64, 64, 64, 67, 67,
|
90
|
+
67, 67, 67, 67, 67, 2, nil, nil, nil, nil,
|
91
|
+
3, 2, 2, 2, 2, 2, 3, 3, 3, 3,
|
92
|
+
3, nil, nil, 2, 4, nil, nil, nil, 3, 7,
|
93
|
+
4, 4, 4, 4, 4, 7, 7, 7, 7, 7,
|
94
|
+
nil, nil, 4, 16, nil, nil, nil, 7, 24, 16,
|
95
|
+
16, 16, 16, 16, 24, 24, 24, 24, 24, nil,
|
96
|
+
nil, 16, nil, nil, nil, nil, 24, 22, 22, 22,
|
97
|
+
22, 22, 22, 22, 22, 22, 22, 22 ]
|
98
98
|
|
99
99
|
racc_action_pointer = [
|
100
|
-
|
101
|
-
|
102
|
-
nil,
|
103
|
-
|
104
|
-
|
105
|
-
nil,
|
106
|
-
nil,
|
107
|
-
|
108
|
-
nil
|
109
|
-
nil, nil ]
|
100
|
+
230, 2, 263, 268, 282, -2, -13, 287, -6, 1,
|
101
|
+
5, 13, nil, nil, nil, -6, 301, nil, 11, nil,
|
102
|
+
nil, 8, 305, nil, 306, 3, nil, 11, -2, 5,
|
103
|
+
14, 54, 61, 68, 108, 115, 122, 8, 9, nil,
|
104
|
+
nil, nil, nil, 162, nil, -7, nil, nil, nil, nil,
|
105
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
106
|
+
nil, 169, nil, 176, 216, nil, 12, 223, 15, nil,
|
107
|
+
14, nil, 15, nil, 30, nil, nil, nil, nil, nil,
|
108
|
+
nil ]
|
110
109
|
|
111
110
|
racc_action_default = [
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-36, -37 ]
|
111
|
+
-45, -45, -45, -45, -45, -45, -45, -7, -12, -13,
|
112
|
+
-45, -45, -1, -2, -3, -45, -45, -6, -11, -9,
|
113
|
+
-10, -45, -45, 81, -45, -45, -8, -15, -45, -45,
|
114
|
+
-45, -45, -45, -45, -45, -45, -45, -45, -45, -4,
|
115
|
+
-5, -14, -16, -45, -35, -45, -37, -38, -39, -40,
|
116
|
+
-41, -42, -43, -44, -17, -18, -19, -20, -21, -22,
|
117
|
+
-23, -45, -24, -45, -45, -25, -45, -34, -45, -26,
|
118
|
+
-45, -27, -45, -28, -45, -29, -33, -36, -30, -31,
|
119
|
+
-32 ]
|
122
120
|
|
123
121
|
racc_goto_table = [
|
124
|
-
1,
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
nil, nil, nil, nil, 71, 2, 2, nil, nil, nil,
|
129
|
-
nil, 91, nil, nil, nil, nil, nil, nil, nil, 2,
|
130
|
-
48, 60, 61, 62, 63, 64, 65, 66, 68 ]
|
122
|
+
1, 18, 12, 13, 14, 66, 7, 17, 7, 7,
|
123
|
+
7, 21, nil, 7, nil, nil, 25, nil, nil, nil,
|
124
|
+
41, nil, 7, 70, 39, 72, 74, nil, nil, 76,
|
125
|
+
7, 42, 54, 55, 56, 57, 58, 59, 60, 62 ]
|
131
126
|
|
132
127
|
racc_goto_check = [
|
133
|
-
1,
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
nil, nil, nil, nil, 1, 2, 2, nil, nil, nil,
|
138
|
-
nil, 6, nil, nil, nil, nil, nil, nil, nil, 2,
|
139
|
-
5, 5, 5, 5, 5, 5, 5, 5, 5 ]
|
128
|
+
1, 3, 1, 1, 1, 6, 2, 1, 2, 2,
|
129
|
+
2, 4, nil, 2, nil, nil, 1, nil, nil, nil,
|
130
|
+
3, nil, 2, 6, 1, 6, 6, nil, nil, 6,
|
131
|
+
2, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
|
140
132
|
|
141
133
|
racc_goto_pointer = [
|
142
|
-
nil, 0,
|
134
|
+
nil, 0, 6, -7, 1, 3, -38 ]
|
143
135
|
|
144
136
|
racc_goto_default = [
|
145
|
-
nil, nil,
|
137
|
+
nil, nil, 44, 9, nil, 67, nil ]
|
146
138
|
|
147
139
|
racc_reduce_table = [
|
148
140
|
0, 0, :racc_error,
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
2,
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
2,
|
159
|
-
2,
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
3,
|
168
|
-
3,
|
169
|
-
3,
|
170
|
-
3,
|
171
|
-
3,
|
172
|
-
3,
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
141
|
+
2, 43, :_reduce_1,
|
142
|
+
2, 43, :_reduce_2,
|
143
|
+
2, 43, :_reduce_3,
|
144
|
+
4, 43, :_reduce_4,
|
145
|
+
4, 43, :_reduce_5,
|
146
|
+
2, 43, :_reduce_6,
|
147
|
+
1, 43, :_reduce_7,
|
148
|
+
3, 44, :_reduce_8,
|
149
|
+
2, 44, :_reduce_9,
|
150
|
+
2, 44, :_reduce_10,
|
151
|
+
2, 44, :_reduce_11,
|
152
|
+
1, 44, :_reduce_12,
|
153
|
+
1, 44, :_reduce_13,
|
154
|
+
4, 45, :_reduce_14,
|
155
|
+
3, 45, :_reduce_15,
|
156
|
+
3, 46, :_reduce_16,
|
157
|
+
3, 46, :_reduce_17,
|
158
|
+
3, 46, :_reduce_18,
|
159
|
+
3, 46, :_reduce_19,
|
160
|
+
3, 46, :_reduce_20,
|
161
|
+
3, 46, :_reduce_21,
|
162
|
+
3, 46, :_reduce_22,
|
163
|
+
3, 46, :_reduce_23,
|
164
|
+
3, 46, :_reduce_24,
|
165
|
+
4, 46, :_reduce_25,
|
166
|
+
4, 46, :_reduce_26,
|
167
|
+
4, 46, :_reduce_27,
|
168
|
+
4, 46, :_reduce_28,
|
169
|
+
5, 46, :_reduce_29,
|
170
|
+
5, 46, :_reduce_30,
|
171
|
+
5, 46, :_reduce_31,
|
172
|
+
5, 46, :_reduce_32,
|
173
|
+
2, 48, :_reduce_33,
|
174
|
+
1, 48, :_reduce_34,
|
175
|
+
1, 47, :_reduce_none,
|
176
|
+
3, 47, :_reduce_36,
|
177
|
+
1, 47, :_reduce_37,
|
186
178
|
1, 47, :_reduce_38,
|
187
|
-
1,
|
188
|
-
|
189
|
-
1,
|
190
|
-
1,
|
191
|
-
1,
|
192
|
-
1,
|
193
|
-
1, 46, :_reduce_45,
|
194
|
-
1, 46, :_reduce_46,
|
195
|
-
1, 46, :_reduce_47,
|
196
|
-
1, 46, :_reduce_48 ]
|
179
|
+
1, 47, :_reduce_39,
|
180
|
+
1, 47, :_reduce_40,
|
181
|
+
1, 47, :_reduce_41,
|
182
|
+
1, 47, :_reduce_42,
|
183
|
+
1, 47, :_reduce_43,
|
184
|
+
1, 47, :_reduce_44 ]
|
197
185
|
|
198
|
-
racc_reduce_n =
|
186
|
+
racc_reduce_n = 45
|
199
187
|
|
200
|
-
racc_shift_n =
|
188
|
+
racc_shift_n = 81
|
201
189
|
|
202
190
|
racc_token_table = {
|
203
191
|
false => 0,
|
@@ -209,40 +197,41 @@ racc_token_table = {
|
|
209
197
|
:tIDENTIFIER_VALUE => 6,
|
210
198
|
:tINDEX => 7,
|
211
199
|
:tPSEUDO_CLASS => 8,
|
212
|
-
:
|
213
|
-
:
|
214
|
-
:
|
215
|
-
:
|
216
|
-
:
|
217
|
-
:
|
218
|
-
:
|
219
|
-
:
|
220
|
-
:
|
221
|
-
:
|
222
|
-
:
|
223
|
-
:
|
224
|
-
:
|
225
|
-
:
|
226
|
-
:
|
227
|
-
:
|
228
|
-
:
|
229
|
-
:
|
230
|
-
:
|
231
|
-
:
|
232
|
-
:
|
233
|
-
:
|
234
|
-
:
|
235
|
-
:
|
236
|
-
:
|
237
|
-
:
|
238
|
-
:
|
239
|
-
:
|
240
|
-
:
|
241
|
-
:
|
242
|
-
:
|
243
|
-
:
|
244
|
-
|
245
|
-
|
200
|
+
:tCHILD => 9,
|
201
|
+
:tSUBSEQUENT_SIBLING => 10,
|
202
|
+
:tNEXT_SIBLING => 11,
|
203
|
+
:tOPEN_ATTRIBUTE => 12,
|
204
|
+
:tCLOSE_ATTRIBUTE => 13,
|
205
|
+
:tOPEN_DYNAMIC_ATTRIBUTE => 14,
|
206
|
+
:tCLOSE_DYNAMIC_ATTRIBUTE => 15,
|
207
|
+
:tOPEN_ARRAY => 16,
|
208
|
+
:tCLOSE_ARRAY => 17,
|
209
|
+
:tOPEN_SELECTOR => 18,
|
210
|
+
:tCLOSE_SELECTOR => 19,
|
211
|
+
:tOPEN_GOTO_SCOPE => 20,
|
212
|
+
:tCLOSE_GOTO_SCOPE => 21,
|
213
|
+
:tEQUAL => 22,
|
214
|
+
:tNOT_EQUAL => 23,
|
215
|
+
:tMATCH => 24,
|
216
|
+
:tNOT_MATCH => 25,
|
217
|
+
:tGREATER_THAN => 26,
|
218
|
+
:tGREATER_THAN_OR_EQUAL => 27,
|
219
|
+
:tLESS_THAN => 28,
|
220
|
+
:tLESS_THAN_OR_EQUAL => 29,
|
221
|
+
:tIN => 30,
|
222
|
+
:tNOT_IN => 31,
|
223
|
+
:tINCLUDES => 32,
|
224
|
+
:tARRAY_VALUE => 33,
|
225
|
+
:tDYNAMIC_ATTRIBUTE => 34,
|
226
|
+
:tBOOLEAN => 35,
|
227
|
+
:tFLOAT => 36,
|
228
|
+
:tINTEGER => 37,
|
229
|
+
:tNIL => 38,
|
230
|
+
:tREGEXP => 39,
|
231
|
+
:tSTRING => 40,
|
232
|
+
:tSYMBOL => 41 }
|
233
|
+
|
234
|
+
racc_nt_base = 42
|
246
235
|
|
247
236
|
racc_use_result_var = false
|
248
237
|
|
@@ -272,7 +261,6 @@ Racc_token_to_s_table = [
|
|
272
261
|
"tIDENTIFIER_VALUE",
|
273
262
|
"tINDEX",
|
274
263
|
"tPSEUDO_CLASS",
|
275
|
-
"tCOMMA",
|
276
264
|
"tCHILD",
|
277
265
|
"tSUBSEQUENT_SIBLING",
|
278
266
|
"tNEXT_SIBLING",
|
@@ -284,6 +272,8 @@ Racc_token_to_s_table = [
|
|
284
272
|
"tCLOSE_ARRAY",
|
285
273
|
"tOPEN_SELECTOR",
|
286
274
|
"tCLOSE_SELECTOR",
|
275
|
+
"tOPEN_GOTO_SCOPE",
|
276
|
+
"tCLOSE_GOTO_SCOPE",
|
287
277
|
"tEQUAL",
|
288
278
|
"tNOT_EQUAL",
|
289
279
|
"tMATCH",
|
@@ -319,192 +309,176 @@ Racc_debug_parser = false
|
|
319
309
|
# reduce 0 omitted
|
320
310
|
|
321
311
|
def _reduce_1(val, _values)
|
322
|
-
Compiler::Expression.new(
|
312
|
+
Compiler::Expression.new(rest: val[1], relationship: :child)
|
323
313
|
end
|
324
314
|
|
325
315
|
def _reduce_2(val, _values)
|
326
|
-
Compiler::Expression.new(
|
316
|
+
Compiler::Expression.new(rest: val[1], relationship: :subsequent_sibling)
|
327
317
|
end
|
328
318
|
|
329
319
|
def _reduce_3(val, _values)
|
330
|
-
Compiler::Expression.new(
|
320
|
+
Compiler::Expression.new(rest: val[1], relationship: :next_sibling)
|
331
321
|
end
|
332
322
|
|
333
323
|
def _reduce_4(val, _values)
|
334
|
-
Compiler::Expression.new(
|
324
|
+
Compiler::Expression.new(goto_scope: val[1], rest: val[3])
|
335
325
|
end
|
336
326
|
|
337
327
|
def _reduce_5(val, _values)
|
338
|
-
Compiler::Expression.new(
|
328
|
+
Compiler::Expression.new(relationship: val[0].to_sym, rest: val[2])
|
339
329
|
end
|
340
330
|
|
341
331
|
def _reduce_6(val, _values)
|
342
|
-
Compiler::Expression.new(
|
332
|
+
Compiler::Expression.new(selector: val[0], rest: val[1])
|
343
333
|
end
|
344
334
|
|
345
335
|
def _reduce_7(val, _values)
|
346
|
-
Compiler::Expression.new(
|
336
|
+
Compiler::Expression.new(selector: val[0])
|
347
337
|
end
|
348
338
|
|
349
339
|
def _reduce_8(val, _values)
|
350
|
-
Compiler::
|
340
|
+
Compiler::Selector.new(node_type: val[0], attribute_list: val[1], index: val[2])
|
351
341
|
end
|
352
342
|
|
353
343
|
def _reduce_9(val, _values)
|
354
|
-
Compiler::Selector.new(node_type: val[0],
|
344
|
+
Compiler::Selector.new(node_type: val[0], index: val[1])
|
355
345
|
end
|
356
346
|
|
357
347
|
def _reduce_10(val, _values)
|
358
|
-
Compiler::Selector.new(
|
348
|
+
Compiler::Selector.new(attribute_list: val[0], index: val[1])
|
359
349
|
end
|
360
350
|
|
361
351
|
def _reduce_11(val, _values)
|
362
|
-
Compiler::Selector.new(
|
352
|
+
Compiler::Selector.new(node_type: val[0], attribute_list: val[1])
|
363
353
|
end
|
364
354
|
|
365
355
|
def _reduce_12(val, _values)
|
366
|
-
Compiler::Selector.new(node_type: val[0]
|
356
|
+
Compiler::Selector.new(node_type: val[0])
|
367
357
|
end
|
368
358
|
|
369
359
|
def _reduce_13(val, _values)
|
370
|
-
Compiler::Selector.new(
|
360
|
+
Compiler::Selector.new(attribute_list: val[0])
|
371
361
|
end
|
372
362
|
|
373
363
|
def _reduce_14(val, _values)
|
374
|
-
Compiler::
|
364
|
+
Compiler::AttributeList.new(attribute: val[1], rest: val[3])
|
375
365
|
end
|
376
366
|
|
377
367
|
def _reduce_15(val, _values)
|
378
|
-
Compiler::
|
368
|
+
Compiler::AttributeList.new(attribute: val[1])
|
379
369
|
end
|
380
370
|
|
381
371
|
def _reduce_16(val, _values)
|
382
|
-
Compiler::
|
372
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :!=)
|
383
373
|
end
|
384
374
|
|
385
375
|
def _reduce_17(val, _values)
|
386
|
-
Compiler::
|
376
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :!~)
|
387
377
|
end
|
388
378
|
|
389
379
|
def _reduce_18(val, _values)
|
390
|
-
Compiler::
|
380
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :=~)
|
391
381
|
end
|
392
382
|
|
393
383
|
def _reduce_19(val, _values)
|
394
|
-
Compiler::
|
384
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :>=)
|
395
385
|
end
|
396
386
|
|
397
387
|
def _reduce_20(val, _values)
|
398
|
-
Compiler::Attribute.new(key: val[0], value: val[2], operator:
|
388
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :>)
|
399
389
|
end
|
400
390
|
|
401
391
|
def _reduce_21(val, _values)
|
402
|
-
Compiler::Attribute.new(key: val[0], value: val[2], operator:
|
392
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :<=)
|
403
393
|
end
|
404
394
|
|
405
395
|
def _reduce_22(val, _values)
|
406
|
-
Compiler::Attribute.new(key: val[0], value: val[2], operator:
|
396
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :<)
|
407
397
|
end
|
408
398
|
|
409
399
|
def _reduce_23(val, _values)
|
410
|
-
Compiler::Attribute.new(key: val[0], value: val[2], operator:
|
400
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :==)
|
411
401
|
end
|
412
402
|
|
413
403
|
def _reduce_24(val, _values)
|
414
|
-
Compiler::Attribute.new(key: val[0], value: val[2], operator:
|
404
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :includes)
|
415
405
|
end
|
416
406
|
|
417
407
|
def _reduce_25(val, _values)
|
418
|
-
Compiler::Attribute.new(key: val[0], value:
|
408
|
+
Compiler::Attribute.new(key: val[0], value: Compiler::Array.new, operator: :!=)
|
419
409
|
end
|
420
410
|
|
421
411
|
def _reduce_26(val, _values)
|
422
|
-
Compiler::Attribute.new(key: val[0], value:
|
412
|
+
Compiler::Attribute.new(key: val[0], value: Compiler::Array.new, operator: :==)
|
423
413
|
end
|
424
414
|
|
425
415
|
def _reduce_27(val, _values)
|
426
|
-
Compiler::Attribute.new(key: val[0], value:
|
416
|
+
Compiler::Attribute.new(key: val[0], value: Compiler::Array.new, operator: :not_in)
|
427
417
|
end
|
428
418
|
|
429
419
|
def _reduce_28(val, _values)
|
430
|
-
Compiler::Attribute.new(key: val[0], value:
|
420
|
+
Compiler::Attribute.new(key: val[0], value: Compiler::Array.new, operator: :in)
|
431
421
|
end
|
432
422
|
|
433
423
|
def _reduce_29(val, _values)
|
434
|
-
Compiler::Attribute.new(key: val[0], value:
|
424
|
+
Compiler::Attribute.new(key: val[0], value: val[3], operator: :!=)
|
435
425
|
end
|
436
426
|
|
437
427
|
def _reduce_30(val, _values)
|
438
|
-
Compiler::Attribute.new(key: val[0], value:
|
428
|
+
Compiler::Attribute.new(key: val[0], value: val[3], operator: :==)
|
439
429
|
end
|
440
430
|
|
441
431
|
def _reduce_31(val, _values)
|
442
|
-
Compiler::Attribute.new(key: val[0], value:
|
432
|
+
Compiler::Attribute.new(key: val[0], value: val[3], operator: :not_in)
|
443
433
|
end
|
444
434
|
|
445
435
|
def _reduce_32(val, _values)
|
446
|
-
Compiler::Attribute.new(key: val[0], value:
|
436
|
+
Compiler::Attribute.new(key: val[0], value: val[3], operator: :in)
|
447
437
|
end
|
448
438
|
|
449
439
|
def _reduce_33(val, _values)
|
450
|
-
Compiler::
|
440
|
+
Compiler::Array.new(value: val[0], rest: val[1])
|
451
441
|
end
|
452
442
|
|
453
443
|
def _reduce_34(val, _values)
|
454
|
-
Compiler::Attribute.new(key: val[0], value: val[3], operator: :==)
|
455
|
-
end
|
456
|
-
|
457
|
-
def _reduce_35(val, _values)
|
458
|
-
Compiler::Attribute.new(key: val[0], value: val[3], operator: :not_in)
|
459
|
-
end
|
460
|
-
|
461
|
-
def _reduce_36(val, _values)
|
462
|
-
Compiler::Attribute.new(key: val[0], value: val[3], operator: :in)
|
463
|
-
end
|
464
|
-
|
465
|
-
def _reduce_37(val, _values)
|
466
|
-
Compiler::Array.new(value: val[0], rest: val[2])
|
467
|
-
end
|
468
|
-
|
469
|
-
def _reduce_38(val, _values)
|
470
444
|
Compiler::Array.new(value: val[0])
|
471
445
|
end
|
472
446
|
|
473
|
-
# reduce
|
447
|
+
# reduce 35 omitted
|
474
448
|
|
475
|
-
def
|
449
|
+
def _reduce_36(val, _values)
|
476
450
|
Compiler::DynamicAttribute.new(value: val[1])
|
477
451
|
end
|
478
452
|
|
479
|
-
def
|
453
|
+
def _reduce_37(val, _values)
|
480
454
|
Compiler::Boolean.new(value: val[0])
|
481
455
|
end
|
482
456
|
|
483
|
-
def
|
457
|
+
def _reduce_38(val, _values)
|
484
458
|
Compiler::Float.new(value: val[0])
|
485
459
|
end
|
486
460
|
|
487
|
-
def
|
461
|
+
def _reduce_39(val, _values)
|
488
462
|
Compiler::Integer.new(value: val[0])
|
489
463
|
end
|
490
464
|
|
491
|
-
def
|
465
|
+
def _reduce_40(val, _values)
|
492
466
|
Compiler::Nil.new(value: val[0])
|
493
467
|
end
|
494
468
|
|
495
|
-
def
|
469
|
+
def _reduce_41(val, _values)
|
496
470
|
Compiler::Regexp.new(value: val[0])
|
497
471
|
end
|
498
472
|
|
499
|
-
def
|
473
|
+
def _reduce_42(val, _values)
|
500
474
|
Compiler::String.new(value: val[0])
|
501
475
|
end
|
502
476
|
|
503
|
-
def
|
477
|
+
def _reduce_43(val, _values)
|
504
478
|
Compiler::Symbol.new(value: val[0])
|
505
479
|
end
|
506
480
|
|
507
|
-
def
|
481
|
+
def _reduce_44(val, _values)
|
508
482
|
Compiler::Identifier.new(value: val[0])
|
509
483
|
end
|
510
484
|
|