synvert-core 1.1.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/lib/synvert/core/array_ext.rb +9 -2
- data/lib/synvert/core/node_ext.rb +14 -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/compiler/string.rb +0 -11
- data/lib/synvert/core/node_query/lexer.rex +12 -1
- data/lib/synvert/core/node_query/lexer.rex.rb +28 -2
- data/lib/synvert/core/node_query/parser.racc.rb +219 -253
- data/lib/synvert/core/node_query/parser.y +9 -14
- data/lib/synvert/core/node_query.rb +7 -7
- data/lib/synvert/core/version.rb +1 -1
- data/spec/synvert/core/node_ext_spec.rb +32 -24
- data/spec/synvert/core/node_query/lexer_spec.rb +56 -4
- data/spec/synvert/core/node_query/parser_spec.rb +90 -25
- 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
|
-
nil,
|
41
|
-
59,
|
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
|
-
nil, nil, nil,
|
60
|
-
|
61
|
-
|
28
|
+
8, 17, 9, 13, 51, 14, 18, 8, 19, 20,
|
29
|
+
22, 51, 43, 24, 41, 26, 8, 27, 18, 43,
|
30
|
+
51, 61, 62, 66, 73, 75, 76, 77, 43, 78,
|
31
|
+
nil, nil, nil, 44, 45, 46, 47, 48, 49, 50,
|
32
|
+
44, 45, 46, 47, 48, 49, 50, nil, nil, 44,
|
33
|
+
45, 46, 47, 48, 49, 50, 8, nil, nil, nil,
|
34
|
+
51, nil, nil, 8, nil, nil, nil, 51, 43, nil,
|
35
|
+
8, nil, nil, nil, 51, 43, nil, nil, nil, nil,
|
36
|
+
nil, nil, 43, nil, nil, nil, nil, nil, nil, 44,
|
37
|
+
45, 46, 47, 48, 49, 50, 44, 45, 46, 47,
|
38
|
+
48, 49, 50, 44, 45, 46, 47, 48, 49, 50,
|
39
|
+
8, nil, nil, nil, 51, nil, nil, 8, nil, nil,
|
40
|
+
nil, 51, 43, nil, 8, nil, nil, nil, 51, 43,
|
41
|
+
nil, 59, nil, nil, nil, nil, 43, nil, nil, nil,
|
42
|
+
nil, nil, nil, 44, 45, 46, 47, 48, 49, 50,
|
43
|
+
44, 45, 46, 47, 48, 49, 50, 44, 45, 46,
|
44
|
+
47, 48, 49, 50, 8, nil, nil, nil, 51, nil,
|
45
|
+
nil, 8, nil, nil, nil, 51, 43, nil, 8, 63,
|
46
|
+
nil, nil, 51, 43, nil, nil, 67, nil, nil, nil,
|
47
|
+
43, nil, nil, 69, nil, nil, nil, 44, 45, 46,
|
48
|
+
47, 48, 49, 50, 44, 45, 46, 47, 48, 49,
|
49
|
+
50, 44, 45, 46, 47, 48, 49, 50, 8, nil,
|
50
|
+
nil, nil, 51, nil, nil, 8, nil, nil, nil, 51,
|
51
|
+
43, nil, 8, 71, nil, nil, nil, 43, 6, 2,
|
52
|
+
3, 4, nil, nil, nil, nil, nil, nil, nil, nil,
|
53
|
+
5, 44, 45, 46, 47, 48, 49, 50, 44, 45,
|
54
|
+
46, 47, 48, 49, 50, 8, nil, nil, nil, 8,
|
55
|
+
nil, 6, 2, 3, 4, 6, 2, 3, 4, nil,
|
56
|
+
nil, nil, 8, 5, nil, nil, 8, 5, 6, 2,
|
57
|
+
3, 4, 6, 2, 3, 4, nil, nil, nil, 8,
|
58
|
+
5, nil, nil, 8, 5, 6, 2, 3, 4, 6,
|
59
|
+
2, 3, 4, nil, nil, nil, nil, 5, nil, nil,
|
60
|
+
nil, 5, 35, 28, 30, 29, 32, 31, 34, 33,
|
61
|
+
38, 37, 36 ]
|
62
62
|
|
63
63
|
racc_action_check = [
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
nil,
|
77
|
-
|
78
|
-
nil, nil,
|
79
|
-
|
80
|
-
|
81
|
-
nil,
|
82
|
-
nil,
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
nil,
|
93
|
-
|
94
|
-
|
95
|
-
nil, nil, nil,
|
96
|
-
|
97
|
-
|
64
|
+
28, 8, 1, 5, 28, 6, 8, 29, 9, 13,
|
65
|
+
16, 29, 28, 18, 28, 21, 30, 23, 27, 29,
|
66
|
+
30, 37, 38, 43, 64, 66, 68, 70, 30, 72,
|
67
|
+
nil, nil, nil, 28, 28, 28, 28, 28, 28, 28,
|
68
|
+
29, 29, 29, 29, 29, 29, 29, nil, nil, 30,
|
69
|
+
30, 30, 30, 30, 30, 30, 31, nil, nil, nil,
|
70
|
+
31, nil, nil, 32, nil, nil, nil, 32, 31, nil,
|
71
|
+
33, nil, nil, nil, 33, 32, nil, nil, nil, nil,
|
72
|
+
nil, 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
|
+
nil, 35, 34, nil, 36, nil, nil, nil, 36, 35,
|
77
|
+
nil, 35, nil, nil, nil, 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, 41, nil, nil, nil, 41, nil,
|
81
|
+
nil, 59, nil, nil, nil, 59, 41, nil, 61, 41,
|
82
|
+
nil, nil, 61, 59, nil, nil, 59, nil, nil, nil,
|
83
|
+
61, nil, nil, 61, nil, nil, nil, 41, 41, 41,
|
84
|
+
41, 41, 41, 41, 59, 59, 59, 59, 59, 59,
|
85
|
+
59, 61, 61, 61, 61, 61, 61, 61, 62, nil,
|
86
|
+
nil, nil, 62, nil, nil, 65, nil, nil, nil, 65,
|
87
|
+
62, nil, 0, 62, nil, nil, nil, 65, 0, 0,
|
88
|
+
0, 0, nil, nil, nil, nil, nil, nil, nil, nil,
|
89
|
+
0, 62, 62, 62, 62, 62, 62, 62, 65, 65,
|
90
|
+
65, 65, 65, 65, 65, 2, nil, nil, nil, 3,
|
91
|
+
nil, 2, 2, 2, 2, 3, 3, 3, 3, nil,
|
92
|
+
nil, nil, 4, 2, nil, nil, 7, 3, 4, 4,
|
93
|
+
4, 4, 7, 7, 7, 7, nil, nil, nil, 14,
|
94
|
+
4, nil, nil, 20, 7, 14, 14, 14, 14, 20,
|
95
|
+
20, 20, 20, nil, nil, nil, nil, 14, nil, nil,
|
96
|
+
nil, 20, 24, 24, 24, 24, 24, 24, 24, 24,
|
97
|
+
24, 24, 24 ]
|
98
98
|
|
99
99
|
racc_action_pointer = [
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
nil,
|
106
|
-
nil,
|
107
|
-
|
108
|
-
nil, 54, nil, 55, nil, nil, 228, nil, nil, nil,
|
109
|
-
nil, nil ]
|
100
|
+
230, 2, 263, 267, 280, -2, -13, 284, -6, 8,
|
101
|
+
nil, nil, nil, -12, 297, nil, 3, nil, 9, nil,
|
102
|
+
301, -4, nil, 4, 300, nil, nil, 6, -2, 5,
|
103
|
+
14, 54, 61, 68, 108, 115, 122, 5, 6, nil,
|
104
|
+
nil, 162, nil, -11, nil, nil, nil, nil, nil, nil,
|
105
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 169,
|
106
|
+
nil, 176, 216, nil, 7, 223, 10, nil, 9, nil,
|
107
|
+
10, nil, 12, nil, nil, nil, nil, nil, nil ]
|
110
108
|
|
111
109
|
racc_action_default = [
|
112
|
-
-
|
113
|
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-31, -49, -32, -49, -12, -33, -49, -40, -34, -35,
|
121
|
-
-36, -37 ]
|
110
|
+
-43, -43, -43, -43, -43, -43, -43, -7, -11, -43,
|
111
|
+
-1, -2, -3, -43, -43, -6, -10, -9, -43, 79,
|
112
|
+
-43, -43, -8, -43, -43, -4, -5, -13, -43, -43,
|
113
|
+
-43, -43, -43, -43, -43, -43, -43, -43, -43, -12,
|
114
|
+
-14, -43, -33, -43, -35, -36, -37, -38, -39, -40,
|
115
|
+
-41, -42, -15, -16, -17, -18, -19, -20, -21, -43,
|
116
|
+
-22, -43, -43, -23, -43, -32, -43, -24, -43, -25,
|
117
|
+
-43, -26, -43, -27, -31, -34, -28, -29, -30 ]
|
122
118
|
|
123
119
|
racc_goto_table = [
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
nil, nil, nil,
|
129
|
-
|
130
|
-
48, 60, 61, 62, 63, 64, 65, 66, 68 ]
|
120
|
+
64, 23, 1, nil, 10, 11, 12, nil, nil, 15,
|
121
|
+
16, nil, nil, nil, nil, nil, 21, nil, 68, nil,
|
122
|
+
70, 72, 25, 7, 74, 7, 7, 7, nil, 39,
|
123
|
+
7, nil, nil, nil, nil, nil, nil, 7, nil, nil,
|
124
|
+
nil, nil, nil, 7, 40, 52, 53, 54, 55, 56,
|
125
|
+
57, 58, 60 ]
|
131
126
|
|
132
127
|
racc_goto_check = [
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
nil, nil, nil,
|
138
|
-
|
139
|
-
5, 5, 5, 5, 5, 5, 5, 5, 5 ]
|
128
|
+
6, 4, 1, nil, 1, 1, 1, nil, nil, 1,
|
129
|
+
3, nil, nil, nil, nil, nil, 1, nil, 6, nil,
|
130
|
+
6, 6, 1, 2, 6, 2, 2, 2, nil, 3,
|
131
|
+
2, nil, nil, nil, nil, nil, nil, 2, nil, nil,
|
132
|
+
nil, nil, nil, 2, 5, 5, 5, 5, 5, 5,
|
133
|
+
5, 5, 5 ]
|
140
134
|
|
141
135
|
racc_goto_pointer = [
|
142
|
-
nil,
|
136
|
+
nil, 2, 23, 2, -17, 16, -41 ]
|
143
137
|
|
144
138
|
racc_goto_default = [
|
145
|
-
nil, nil,
|
139
|
+
nil, nil, 42, nil, nil, 65, nil ]
|
146
140
|
|
147
141
|
racc_reduce_table = [
|
148
142
|
0, 0, :racc_error,
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
2,
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
2,
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
3,
|
168
|
-
3,
|
169
|
-
3,
|
170
|
-
3,
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
143
|
+
2, 43, :_reduce_1,
|
144
|
+
2, 43, :_reduce_2,
|
145
|
+
2, 43, :_reduce_3,
|
146
|
+
4, 43, :_reduce_4,
|
147
|
+
4, 43, :_reduce_5,
|
148
|
+
2, 43, :_reduce_6,
|
149
|
+
1, 43, :_reduce_7,
|
150
|
+
3, 44, :_reduce_8,
|
151
|
+
2, 44, :_reduce_9,
|
152
|
+
2, 44, :_reduce_10,
|
153
|
+
1, 44, :_reduce_11,
|
154
|
+
4, 45, :_reduce_12,
|
155
|
+
3, 45, :_reduce_13,
|
156
|
+
3, 46, :_reduce_14,
|
157
|
+
3, 46, :_reduce_15,
|
158
|
+
3, 46, :_reduce_16,
|
159
|
+
3, 46, :_reduce_17,
|
160
|
+
3, 46, :_reduce_18,
|
161
|
+
3, 46, :_reduce_19,
|
162
|
+
3, 46, :_reduce_20,
|
163
|
+
3, 46, :_reduce_21,
|
164
|
+
3, 46, :_reduce_22,
|
165
|
+
4, 46, :_reduce_23,
|
166
|
+
4, 46, :_reduce_24,
|
167
|
+
4, 46, :_reduce_25,
|
168
|
+
4, 46, :_reduce_26,
|
169
|
+
5, 46, :_reduce_27,
|
170
|
+
5, 46, :_reduce_28,
|
171
|
+
5, 46, :_reduce_29,
|
172
|
+
5, 46, :_reduce_30,
|
173
|
+
2, 48, :_reduce_31,
|
174
|
+
1, 48, :_reduce_32,
|
175
|
+
1, 47, :_reduce_none,
|
176
|
+
3, 47, :_reduce_34,
|
177
|
+
1, 47, :_reduce_35,
|
178
|
+
1, 47, :_reduce_36,
|
179
|
+
1, 47, :_reduce_37,
|
186
180
|
1, 47, :_reduce_38,
|
187
|
-
1,
|
188
|
-
|
189
|
-
1,
|
190
|
-
1,
|
191
|
-
1, 46, :_reduce_43,
|
192
|
-
1, 46, :_reduce_44,
|
193
|
-
1, 46, :_reduce_45,
|
194
|
-
1, 46, :_reduce_46,
|
195
|
-
1, 46, :_reduce_47,
|
196
|
-
1, 46, :_reduce_48 ]
|
181
|
+
1, 47, :_reduce_39,
|
182
|
+
1, 47, :_reduce_40,
|
183
|
+
1, 47, :_reduce_41,
|
184
|
+
1, 47, :_reduce_42 ]
|
197
185
|
|
198
|
-
racc_reduce_n =
|
186
|
+
racc_reduce_n = 43
|
199
187
|
|
200
|
-
racc_shift_n =
|
188
|
+
racc_shift_n = 79
|
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,168 @@ 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(node_type: val[0],
|
348
|
+
Compiler::Selector.new(node_type: val[0], attribute_list: 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])
|
363
353
|
end
|
364
354
|
|
365
355
|
def _reduce_12(val, _values)
|
366
|
-
Compiler::
|
356
|
+
Compiler::AttributeList.new(attribute: val[1], rest: val[3])
|
367
357
|
end
|
368
358
|
|
369
359
|
def _reduce_13(val, _values)
|
370
|
-
Compiler::
|
360
|
+
Compiler::AttributeList.new(attribute: val[1])
|
371
361
|
end
|
372
362
|
|
373
363
|
def _reduce_14(val, _values)
|
374
|
-
Compiler::
|
364
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :!=)
|
375
365
|
end
|
376
366
|
|
377
367
|
def _reduce_15(val, _values)
|
378
|
-
Compiler::
|
368
|
+
Compiler::Attribute.new(key: val[0], value: val[2], operator: :!~)
|
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: :includes)
|
407
397
|
end
|
408
398
|
|
409
399
|
def _reduce_23(val, _values)
|
410
|
-
Compiler::Attribute.new(key: val[0], value:
|
400
|
+
Compiler::Attribute.new(key: val[0], value: Compiler::Array.new, operator: :!=)
|
411
401
|
end
|
412
402
|
|
413
403
|
def _reduce_24(val, _values)
|
414
|
-
Compiler::Attribute.new(key: val[0], value:
|
404
|
+
Compiler::Attribute.new(key: val[0], value: Compiler::Array.new, operator: :==)
|
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: :not_in)
|
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: :in)
|
423
413
|
end
|
424
414
|
|
425
415
|
def _reduce_27(val, _values)
|
426
|
-
Compiler::Attribute.new(key: val[0], value: val[
|
416
|
+
Compiler::Attribute.new(key: val[0], value: val[3], operator: :!=)
|
427
417
|
end
|
428
418
|
|
429
419
|
def _reduce_28(val, _values)
|
430
|
-
Compiler::Attribute.new(key: val[0], value: val[
|
420
|
+
Compiler::Attribute.new(key: val[0], value: val[3], operator: :==)
|
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: :not_in)
|
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: :in)
|
439
429
|
end
|
440
430
|
|
441
431
|
def _reduce_31(val, _values)
|
442
|
-
Compiler::
|
432
|
+
Compiler::Array.new(value: val[0], rest: val[1])
|
443
433
|
end
|
444
434
|
|
445
435
|
def _reduce_32(val, _values)
|
446
|
-
Compiler::Attribute.new(key: val[0], value: Compiler::Array.new, operator: :in)
|
447
|
-
end
|
448
|
-
|
449
|
-
def _reduce_33(val, _values)
|
450
|
-
Compiler::Attribute.new(key: val[0], value: val[3], operator: :!=)
|
451
|
-
end
|
452
|
-
|
453
|
-
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
436
|
Compiler::Array.new(value: val[0])
|
471
437
|
end
|
472
438
|
|
473
|
-
# reduce
|
439
|
+
# reduce 33 omitted
|
474
440
|
|
475
|
-
def
|
441
|
+
def _reduce_34(val, _values)
|
476
442
|
Compiler::DynamicAttribute.new(value: val[1])
|
477
443
|
end
|
478
444
|
|
479
|
-
def
|
445
|
+
def _reduce_35(val, _values)
|
480
446
|
Compiler::Boolean.new(value: val[0])
|
481
447
|
end
|
482
448
|
|
483
|
-
def
|
449
|
+
def _reduce_36(val, _values)
|
484
450
|
Compiler::Float.new(value: val[0])
|
485
451
|
end
|
486
452
|
|
487
|
-
def
|
453
|
+
def _reduce_37(val, _values)
|
488
454
|
Compiler::Integer.new(value: val[0])
|
489
455
|
end
|
490
456
|
|
491
|
-
def
|
457
|
+
def _reduce_38(val, _values)
|
492
458
|
Compiler::Nil.new(value: val[0])
|
493
459
|
end
|
494
460
|
|
495
|
-
def
|
461
|
+
def _reduce_39(val, _values)
|
496
462
|
Compiler::Regexp.new(value: val[0])
|
497
463
|
end
|
498
464
|
|
499
|
-
def
|
465
|
+
def _reduce_40(val, _values)
|
500
466
|
Compiler::String.new(value: val[0])
|
501
467
|
end
|
502
468
|
|
503
|
-
def
|
469
|
+
def _reduce_41(val, _values)
|
504
470
|
Compiler::Symbol.new(value: val[0])
|
505
471
|
end
|
506
472
|
|
507
|
-
def
|
473
|
+
def _reduce_42(val, _values)
|
508
474
|
Compiler::Identifier.new(value: val[0])
|
509
475
|
end
|
510
476
|
|