line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#################################################################### |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# This file was generated using Parse::Yapp version 1.21. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Don't edit this file, use source file instead. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# ANY CHANGE MADE HERE WILL BE LOST ! |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
#################################################################### |
10
|
|
|
|
|
|
|
package OPTIMADE::Filter::Parser; |
11
|
5
|
|
|
5
|
|
108023
|
use vars qw ( @ISA ); |
|
5
|
|
|
|
|
17
|
|
|
5
|
|
|
|
|
227
|
|
12
|
5
|
|
|
5
|
|
29
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
199
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
@ISA= qw ( Parse::Yapp::Driver ); |
15
|
5
|
|
|
5
|
|
2873
|
use Parse::Yapp::Driver; |
|
5
|
|
|
|
|
11269
|
|
|
5
|
|
|
|
|
1652
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#line 3 "lib/OPTIMADE/Filter/Parser.yp" |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use warnings; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use Scalar::Util qw(blessed); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
use OPTIMADE::Filter::AndOr; |
25
|
|
|
|
|
|
|
use OPTIMADE::Filter::Comparison; |
26
|
|
|
|
|
|
|
use OPTIMADE::Filter::Known; |
27
|
|
|
|
|
|
|
use OPTIMADE::Filter::ListComparison; |
28
|
|
|
|
|
|
|
use OPTIMADE::Filter::Negation; |
29
|
|
|
|
|
|
|
use OPTIMADE::Filter::Property; |
30
|
|
|
|
|
|
|
use OPTIMADE::Filter::Zip; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
our $allow_LIKE_operator = 0; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new { |
37
|
|
|
|
|
|
|
my($class)=shift; |
38
|
|
|
|
|
|
|
ref($class) |
39
|
|
|
|
|
|
|
and $class=ref($class); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my($self)=$class->SUPER::new( yyversion => '1.21', |
42
|
|
|
|
|
|
|
yystates => |
43
|
|
|
|
|
|
|
[ |
44
|
|
|
|
|
|
|
{#State 0 |
45
|
|
|
|
|
|
|
ACTIONS => { |
46
|
|
|
|
|
|
|
'number' => 13, |
47
|
|
|
|
|
|
|
'NOT' => 5, |
48
|
|
|
|
|
|
|
'identifier' => 15, |
49
|
|
|
|
|
|
|
"(" => 3, |
50
|
|
|
|
|
|
|
'string' => 10 |
51
|
|
|
|
|
|
|
}, |
52
|
|
|
|
|
|
|
GOTOS => { |
53
|
|
|
|
|
|
|
'property' => 4, |
54
|
|
|
|
|
|
|
'expression_phrase' => 6, |
55
|
|
|
|
|
|
|
'filter' => 1, |
56
|
|
|
|
|
|
|
'property_first_comparison' => 2, |
57
|
|
|
|
|
|
|
'expression_clause' => 11, |
58
|
|
|
|
|
|
|
'constant' => 12, |
59
|
|
|
|
|
|
|
'openingbrace' => 14, |
60
|
|
|
|
|
|
|
'expression' => 7, |
61
|
|
|
|
|
|
|
'constant_first_comparison' => 8, |
62
|
|
|
|
|
|
|
'comparison' => 9 |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
}, |
65
|
|
|
|
|
|
|
{#State 1 |
66
|
|
|
|
|
|
|
ACTIONS => { |
67
|
|
|
|
|
|
|
'' => 16 |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
}, |
70
|
|
|
|
|
|
|
{#State 2 |
71
|
|
|
|
|
|
|
DEFAULT => -27 |
72
|
|
|
|
|
|
|
}, |
73
|
|
|
|
|
|
|
{#State 3 |
74
|
|
|
|
|
|
|
DEFAULT => -59 |
75
|
|
|
|
|
|
|
}, |
76
|
|
|
|
|
|
|
{#State 4 |
77
|
|
|
|
|
|
|
ACTIONS => { |
78
|
|
|
|
|
|
|
'IS' => 36, |
79
|
|
|
|
|
|
|
"." => 24, |
80
|
|
|
|
|
|
|
'STARTS' => 38, |
81
|
|
|
|
|
|
|
'ENDS' => 22, |
82
|
|
|
|
|
|
|
'LENGTH' => 39, |
83
|
|
|
|
|
|
|
">" => 29, |
84
|
|
|
|
|
|
|
"=" => 31, |
85
|
|
|
|
|
|
|
'CONTAINS' => 27, |
86
|
|
|
|
|
|
|
'LIKE' => 25, |
87
|
|
|
|
|
|
|
"<" => 28, |
88
|
|
|
|
|
|
|
"!" => 20, |
89
|
|
|
|
|
|
|
":" => 33, |
90
|
|
|
|
|
|
|
'HAS' => 19 |
91
|
|
|
|
|
|
|
}, |
92
|
|
|
|
|
|
|
GOTOS => { |
93
|
|
|
|
|
|
|
'value_op_rhs' => 26, |
94
|
|
|
|
|
|
|
'length_op_rhs' => 17, |
95
|
|
|
|
|
|
|
'colon' => 30, |
96
|
|
|
|
|
|
|
'known_op_rhs' => 18, |
97
|
|
|
|
|
|
|
'set_zip_op_rhs' => 32, |
98
|
|
|
|
|
|
|
'operator' => 21, |
99
|
|
|
|
|
|
|
'set_op_rhs' => 34, |
100
|
|
|
|
|
|
|
'property_zip_addon' => 23, |
101
|
|
|
|
|
|
|
'dot' => 35, |
102
|
|
|
|
|
|
|
'fuzzy_string_op_rhs' => 37 |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
}, |
105
|
|
|
|
|
|
|
{#State 5 |
106
|
|
|
|
|
|
|
ACTIONS => { |
107
|
|
|
|
|
|
|
'string' => 10, |
108
|
|
|
|
|
|
|
"(" => 3, |
109
|
|
|
|
|
|
|
'identifier' => 15, |
110
|
|
|
|
|
|
|
'number' => 13 |
111
|
|
|
|
|
|
|
}, |
112
|
|
|
|
|
|
|
GOTOS => { |
113
|
|
|
|
|
|
|
'property' => 4, |
114
|
|
|
|
|
|
|
'openingbrace' => 41, |
115
|
|
|
|
|
|
|
'constant' => 12, |
116
|
|
|
|
|
|
|
'property_first_comparison' => 2, |
117
|
|
|
|
|
|
|
'constant_first_comparison' => 8, |
118
|
|
|
|
|
|
|
'comparison' => 40 |
119
|
|
|
|
|
|
|
} |
120
|
|
|
|
|
|
|
}, |
121
|
|
|
|
|
|
|
{#State 6 |
122
|
|
|
|
|
|
|
ACTIONS => { |
123
|
|
|
|
|
|
|
'AND' => 42 |
124
|
|
|
|
|
|
|
}, |
125
|
|
|
|
|
|
|
DEFAULT => -20 |
126
|
|
|
|
|
|
|
}, |
127
|
|
|
|
|
|
|
{#State 7 |
128
|
|
|
|
|
|
|
DEFAULT => -1 |
129
|
|
|
|
|
|
|
}, |
130
|
|
|
|
|
|
|
{#State 8 |
131
|
|
|
|
|
|
|
DEFAULT => -26 |
132
|
|
|
|
|
|
|
}, |
133
|
|
|
|
|
|
|
{#State 9 |
134
|
|
|
|
|
|
|
DEFAULT => -22 |
135
|
|
|
|
|
|
|
}, |
136
|
|
|
|
|
|
|
{#State 10 |
137
|
|
|
|
|
|
|
DEFAULT => -2 |
138
|
|
|
|
|
|
|
}, |
139
|
|
|
|
|
|
|
{#State 11 |
140
|
|
|
|
|
|
|
ACTIONS => { |
141
|
|
|
|
|
|
|
'OR' => 43 |
142
|
|
|
|
|
|
|
}, |
143
|
|
|
|
|
|
|
DEFAULT => -18 |
144
|
|
|
|
|
|
|
}, |
145
|
|
|
|
|
|
|
{#State 12 |
146
|
|
|
|
|
|
|
ACTIONS => { |
147
|
|
|
|
|
|
|
"!" => 20, |
148
|
|
|
|
|
|
|
"<" => 28, |
149
|
|
|
|
|
|
|
">" => 29, |
150
|
|
|
|
|
|
|
"=" => 31 |
151
|
|
|
|
|
|
|
}, |
152
|
|
|
|
|
|
|
GOTOS => { |
153
|
|
|
|
|
|
|
'value_op_rhs' => 44, |
154
|
|
|
|
|
|
|
'operator' => 21 |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
}, |
157
|
|
|
|
|
|
|
{#State 13 |
158
|
|
|
|
|
|
|
DEFAULT => -3 |
159
|
|
|
|
|
|
|
}, |
160
|
|
|
|
|
|
|
{#State 14 |
161
|
|
|
|
|
|
|
ACTIONS => { |
162
|
|
|
|
|
|
|
'string' => 10, |
163
|
|
|
|
|
|
|
"(" => 3, |
164
|
|
|
|
|
|
|
'identifier' => 15, |
165
|
|
|
|
|
|
|
'NOT' => 5, |
166
|
|
|
|
|
|
|
'number' => 13 |
167
|
|
|
|
|
|
|
}, |
168
|
|
|
|
|
|
|
GOTOS => { |
169
|
|
|
|
|
|
|
'expression' => 45, |
170
|
|
|
|
|
|
|
'constant_first_comparison' => 8, |
171
|
|
|
|
|
|
|
'comparison' => 9, |
172
|
|
|
|
|
|
|
'openingbrace' => 14, |
173
|
|
|
|
|
|
|
'expression_clause' => 11, |
174
|
|
|
|
|
|
|
'constant' => 12, |
175
|
|
|
|
|
|
|
'property_first_comparison' => 2, |
176
|
|
|
|
|
|
|
'property' => 4, |
177
|
|
|
|
|
|
|
'expression_phrase' => 6 |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
}, |
180
|
|
|
|
|
|
|
{#State 15 |
181
|
|
|
|
|
|
|
DEFAULT => -57 |
182
|
|
|
|
|
|
|
}, |
183
|
|
|
|
|
|
|
{#State 16 |
184
|
|
|
|
|
|
|
DEFAULT => 0 |
185
|
|
|
|
|
|
|
}, |
186
|
|
|
|
|
|
|
{#State 17 |
187
|
|
|
|
|
|
|
DEFAULT => -34 |
188
|
|
|
|
|
|
|
}, |
189
|
|
|
|
|
|
|
{#State 18 |
190
|
|
|
|
|
|
|
DEFAULT => -30 |
191
|
|
|
|
|
|
|
}, |
192
|
|
|
|
|
|
|
{#State 19 |
193
|
|
|
|
|
|
|
ACTIONS => { |
194
|
|
|
|
|
|
|
'ANY' => 49, |
195
|
|
|
|
|
|
|
'ALL' => 50, |
196
|
|
|
|
|
|
|
"!" => 20, |
197
|
|
|
|
|
|
|
'number' => 46, |
198
|
|
|
|
|
|
|
"<" => 28, |
199
|
|
|
|
|
|
|
'ONLY' => 47, |
200
|
|
|
|
|
|
|
'identifier' => 15, |
201
|
|
|
|
|
|
|
"=" => 31, |
202
|
|
|
|
|
|
|
'string' => 52, |
203
|
|
|
|
|
|
|
">" => 29 |
204
|
|
|
|
|
|
|
}, |
205
|
|
|
|
|
|
|
GOTOS => { |
206
|
|
|
|
|
|
|
'operator' => 48, |
207
|
|
|
|
|
|
|
'property' => 53, |
208
|
|
|
|
|
|
|
'value' => 51 |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
}, |
211
|
|
|
|
|
|
|
{#State 20 |
212
|
|
|
|
|
|
|
ACTIONS => { |
213
|
|
|
|
|
|
|
"=" => 54 |
214
|
|
|
|
|
|
|
} |
215
|
|
|
|
|
|
|
}, |
216
|
|
|
|
|
|
|
{#State 21 |
217
|
|
|
|
|
|
|
ACTIONS => { |
218
|
|
|
|
|
|
|
'string' => 52, |
219
|
|
|
|
|
|
|
'identifier' => 15, |
220
|
|
|
|
|
|
|
'number' => 46 |
221
|
|
|
|
|
|
|
}, |
222
|
|
|
|
|
|
|
GOTOS => { |
223
|
|
|
|
|
|
|
'property' => 53, |
224
|
|
|
|
|
|
|
'value' => 55 |
225
|
|
|
|
|
|
|
} |
226
|
|
|
|
|
|
|
}, |
227
|
|
|
|
|
|
|
{#State 22 |
228
|
|
|
|
|
|
|
ACTIONS => { |
229
|
|
|
|
|
|
|
'string' => 52, |
230
|
|
|
|
|
|
|
'WITH' => 57, |
231
|
|
|
|
|
|
|
'identifier' => 15, |
232
|
|
|
|
|
|
|
'number' => 46 |
233
|
|
|
|
|
|
|
}, |
234
|
|
|
|
|
|
|
GOTOS => { |
235
|
|
|
|
|
|
|
'value' => 56, |
236
|
|
|
|
|
|
|
'property' => 53 |
237
|
|
|
|
|
|
|
} |
238
|
|
|
|
|
|
|
}, |
239
|
|
|
|
|
|
|
{#State 23 |
240
|
|
|
|
|
|
|
ACTIONS => { |
241
|
|
|
|
|
|
|
":" => 33, |
242
|
|
|
|
|
|
|
'HAS' => 59 |
243
|
|
|
|
|
|
|
}, |
244
|
|
|
|
|
|
|
GOTOS => { |
245
|
|
|
|
|
|
|
'colon' => 58 |
246
|
|
|
|
|
|
|
} |
247
|
|
|
|
|
|
|
}, |
248
|
|
|
|
|
|
|
{#State 24 |
249
|
|
|
|
|
|
|
DEFAULT => -61 |
250
|
|
|
|
|
|
|
}, |
251
|
|
|
|
|
|
|
{#State 25 |
252
|
|
|
|
|
|
|
ACTIONS => { |
253
|
|
|
|
|
|
|
'number' => 46, |
254
|
|
|
|
|
|
|
'identifier' => 15, |
255
|
|
|
|
|
|
|
'string' => 52 |
256
|
|
|
|
|
|
|
}, |
257
|
|
|
|
|
|
|
GOTOS => { |
258
|
|
|
|
|
|
|
'value' => 60, |
259
|
|
|
|
|
|
|
'property' => 53 |
260
|
|
|
|
|
|
|
} |
261
|
|
|
|
|
|
|
}, |
262
|
|
|
|
|
|
|
{#State 26 |
263
|
|
|
|
|
|
|
DEFAULT => -29 |
264
|
|
|
|
|
|
|
}, |
265
|
|
|
|
|
|
|
{#State 27 |
266
|
|
|
|
|
|
|
ACTIONS => { |
267
|
|
|
|
|
|
|
'number' => 46, |
268
|
|
|
|
|
|
|
'identifier' => 15, |
269
|
|
|
|
|
|
|
'string' => 52 |
270
|
|
|
|
|
|
|
}, |
271
|
|
|
|
|
|
|
GOTOS => { |
272
|
|
|
|
|
|
|
'value' => 61, |
273
|
|
|
|
|
|
|
'property' => 53 |
274
|
|
|
|
|
|
|
} |
275
|
|
|
|
|
|
|
}, |
276
|
|
|
|
|
|
|
{#State 28 |
277
|
|
|
|
|
|
|
ACTIONS => { |
278
|
|
|
|
|
|
|
"=" => 62 |
279
|
|
|
|
|
|
|
}, |
280
|
|
|
|
|
|
|
DEFAULT => -64 |
281
|
|
|
|
|
|
|
}, |
282
|
|
|
|
|
|
|
{#State 29 |
283
|
|
|
|
|
|
|
ACTIONS => { |
284
|
|
|
|
|
|
|
"=" => 63 |
285
|
|
|
|
|
|
|
}, |
286
|
|
|
|
|
|
|
DEFAULT => -66 |
287
|
|
|
|
|
|
|
}, |
288
|
|
|
|
|
|
|
{#State 30 |
289
|
|
|
|
|
|
|
ACTIONS => { |
290
|
|
|
|
|
|
|
'identifier' => 15 |
291
|
|
|
|
|
|
|
}, |
292
|
|
|
|
|
|
|
GOTOS => { |
293
|
|
|
|
|
|
|
'property' => 64 |
294
|
|
|
|
|
|
|
} |
295
|
|
|
|
|
|
|
}, |
296
|
|
|
|
|
|
|
{#State 31 |
297
|
|
|
|
|
|
|
DEFAULT => -68 |
298
|
|
|
|
|
|
|
}, |
299
|
|
|
|
|
|
|
{#State 32 |
300
|
|
|
|
|
|
|
DEFAULT => -33 |
301
|
|
|
|
|
|
|
}, |
302
|
|
|
|
|
|
|
{#State 33 |
303
|
|
|
|
|
|
|
DEFAULT => -63 |
304
|
|
|
|
|
|
|
}, |
305
|
|
|
|
|
|
|
{#State 34 |
306
|
|
|
|
|
|
|
DEFAULT => -32 |
307
|
|
|
|
|
|
|
}, |
308
|
|
|
|
|
|
|
{#State 35 |
309
|
|
|
|
|
|
|
ACTIONS => { |
310
|
|
|
|
|
|
|
'identifier' => 65 |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
}, |
313
|
|
|
|
|
|
|
{#State 36 |
314
|
|
|
|
|
|
|
ACTIONS => { |
315
|
|
|
|
|
|
|
'KNOWN' => 66, |
316
|
|
|
|
|
|
|
'UNKNOWN' => 67 |
317
|
|
|
|
|
|
|
} |
318
|
|
|
|
|
|
|
}, |
319
|
|
|
|
|
|
|
{#State 37 |
320
|
|
|
|
|
|
|
DEFAULT => -31 |
321
|
|
|
|
|
|
|
}, |
322
|
|
|
|
|
|
|
{#State 38 |
323
|
|
|
|
|
|
|
ACTIONS => { |
324
|
|
|
|
|
|
|
'identifier' => 15, |
325
|
|
|
|
|
|
|
'number' => 46, |
326
|
|
|
|
|
|
|
'WITH' => 69, |
327
|
|
|
|
|
|
|
'string' => 52 |
328
|
|
|
|
|
|
|
}, |
329
|
|
|
|
|
|
|
GOTOS => { |
330
|
|
|
|
|
|
|
'value' => 68, |
331
|
|
|
|
|
|
|
'property' => 53 |
332
|
|
|
|
|
|
|
} |
333
|
|
|
|
|
|
|
}, |
334
|
|
|
|
|
|
|
{#State 39 |
335
|
|
|
|
|
|
|
ACTIONS => { |
336
|
|
|
|
|
|
|
"!" => 20, |
337
|
|
|
|
|
|
|
'string' => 52, |
338
|
|
|
|
|
|
|
"=" => 31, |
339
|
|
|
|
|
|
|
">" => 29, |
340
|
|
|
|
|
|
|
"<" => 28, |
341
|
|
|
|
|
|
|
'number' => 46, |
342
|
|
|
|
|
|
|
'identifier' => 15 |
343
|
|
|
|
|
|
|
}, |
344
|
|
|
|
|
|
|
GOTOS => { |
345
|
|
|
|
|
|
|
'operator' => 71, |
346
|
|
|
|
|
|
|
'value' => 70, |
347
|
|
|
|
|
|
|
'property' => 53 |
348
|
|
|
|
|
|
|
} |
349
|
|
|
|
|
|
|
}, |
350
|
|
|
|
|
|
|
{#State 40 |
351
|
|
|
|
|
|
|
DEFAULT => -24 |
352
|
|
|
|
|
|
|
}, |
353
|
|
|
|
|
|
|
{#State 41 |
354
|
|
|
|
|
|
|
ACTIONS => { |
355
|
|
|
|
|
|
|
'NOT' => 5, |
356
|
|
|
|
|
|
|
'number' => 13, |
357
|
|
|
|
|
|
|
'identifier' => 15, |
358
|
|
|
|
|
|
|
"(" => 3, |
359
|
|
|
|
|
|
|
'string' => 10 |
360
|
|
|
|
|
|
|
}, |
361
|
|
|
|
|
|
|
GOTOS => { |
362
|
|
|
|
|
|
|
'property' => 4, |
363
|
|
|
|
|
|
|
'expression_phrase' => 6, |
364
|
|
|
|
|
|
|
'property_first_comparison' => 2, |
365
|
|
|
|
|
|
|
'openingbrace' => 14, |
366
|
|
|
|
|
|
|
'expression_clause' => 11, |
367
|
|
|
|
|
|
|
'constant' => 12, |
368
|
|
|
|
|
|
|
'constant_first_comparison' => 8, |
369
|
|
|
|
|
|
|
'expression' => 72, |
370
|
|
|
|
|
|
|
'comparison' => 9 |
371
|
|
|
|
|
|
|
} |
372
|
|
|
|
|
|
|
}, |
373
|
|
|
|
|
|
|
{#State 42 |
374
|
|
|
|
|
|
|
ACTIONS => { |
375
|
|
|
|
|
|
|
"(" => 3, |
376
|
|
|
|
|
|
|
'string' => 10, |
377
|
|
|
|
|
|
|
'NOT' => 5, |
378
|
|
|
|
|
|
|
'number' => 13, |
379
|
|
|
|
|
|
|
'identifier' => 15 |
380
|
|
|
|
|
|
|
}, |
381
|
|
|
|
|
|
|
GOTOS => { |
382
|
|
|
|
|
|
|
'property_first_comparison' => 2, |
383
|
|
|
|
|
|
|
'property' => 4, |
384
|
|
|
|
|
|
|
'expression_phrase' => 6, |
385
|
|
|
|
|
|
|
'constant_first_comparison' => 8, |
386
|
|
|
|
|
|
|
'comparison' => 9, |
387
|
|
|
|
|
|
|
'openingbrace' => 14, |
388
|
|
|
|
|
|
|
'expression_clause' => 73, |
389
|
|
|
|
|
|
|
'constant' => 12 |
390
|
|
|
|
|
|
|
} |
391
|
|
|
|
|
|
|
}, |
392
|
|
|
|
|
|
|
{#State 43 |
393
|
|
|
|
|
|
|
ACTIONS => { |
394
|
|
|
|
|
|
|
'number' => 13, |
395
|
|
|
|
|
|
|
'NOT' => 5, |
396
|
|
|
|
|
|
|
'identifier' => 15, |
397
|
|
|
|
|
|
|
"(" => 3, |
398
|
|
|
|
|
|
|
'string' => 10 |
399
|
|
|
|
|
|
|
}, |
400
|
|
|
|
|
|
|
GOTOS => { |
401
|
|
|
|
|
|
|
'property' => 4, |
402
|
|
|
|
|
|
|
'expression_phrase' => 6, |
403
|
|
|
|
|
|
|
'property_first_comparison' => 2, |
404
|
|
|
|
|
|
|
'openingbrace' => 14, |
405
|
|
|
|
|
|
|
'expression_clause' => 11, |
406
|
|
|
|
|
|
|
'constant' => 12, |
407
|
|
|
|
|
|
|
'constant_first_comparison' => 8, |
408
|
|
|
|
|
|
|
'expression' => 74, |
409
|
|
|
|
|
|
|
'comparison' => 9 |
410
|
|
|
|
|
|
|
} |
411
|
|
|
|
|
|
|
}, |
412
|
|
|
|
|
|
|
{#State 44 |
413
|
|
|
|
|
|
|
DEFAULT => -28 |
414
|
|
|
|
|
|
|
}, |
415
|
|
|
|
|
|
|
{#State 45 |
416
|
|
|
|
|
|
|
ACTIONS => { |
417
|
|
|
|
|
|
|
")" => 76 |
418
|
|
|
|
|
|
|
}, |
419
|
|
|
|
|
|
|
GOTOS => { |
420
|
|
|
|
|
|
|
'closingbrace' => 75 |
421
|
|
|
|
|
|
|
} |
422
|
|
|
|
|
|
|
}, |
423
|
|
|
|
|
|
|
{#State 46 |
424
|
|
|
|
|
|
|
DEFAULT => -5 |
425
|
|
|
|
|
|
|
}, |
426
|
|
|
|
|
|
|
{#State 47 |
427
|
|
|
|
|
|
|
ACTIONS => { |
428
|
|
|
|
|
|
|
">" => 29, |
429
|
|
|
|
|
|
|
'string' => 52, |
430
|
|
|
|
|
|
|
"=" => 31, |
431
|
|
|
|
|
|
|
'identifier' => 15, |
432
|
|
|
|
|
|
|
"<" => 28, |
433
|
|
|
|
|
|
|
'number' => 46, |
434
|
|
|
|
|
|
|
"!" => 20 |
435
|
|
|
|
|
|
|
}, |
436
|
|
|
|
|
|
|
GOTOS => { |
437
|
|
|
|
|
|
|
'operator' => 78, |
438
|
|
|
|
|
|
|
'value_list' => 79, |
439
|
|
|
|
|
|
|
'value' => 77, |
440
|
|
|
|
|
|
|
'property' => 53 |
441
|
|
|
|
|
|
|
} |
442
|
|
|
|
|
|
|
}, |
443
|
|
|
|
|
|
|
{#State 48 |
444
|
|
|
|
|
|
|
ACTIONS => { |
445
|
|
|
|
|
|
|
'string' => 52, |
446
|
|
|
|
|
|
|
'number' => 46, |
447
|
|
|
|
|
|
|
'identifier' => 15 |
448
|
|
|
|
|
|
|
}, |
449
|
|
|
|
|
|
|
GOTOS => { |
450
|
|
|
|
|
|
|
'property' => 53, |
451
|
|
|
|
|
|
|
'value' => 80 |
452
|
|
|
|
|
|
|
} |
453
|
|
|
|
|
|
|
}, |
454
|
|
|
|
|
|
|
{#State 49 |
455
|
|
|
|
|
|
|
ACTIONS => { |
456
|
|
|
|
|
|
|
"!" => 20, |
457
|
|
|
|
|
|
|
">" => 29, |
458
|
|
|
|
|
|
|
"=" => 31, |
459
|
|
|
|
|
|
|
'string' => 52, |
460
|
|
|
|
|
|
|
'identifier' => 15, |
461
|
|
|
|
|
|
|
'number' => 46, |
462
|
|
|
|
|
|
|
"<" => 28 |
463
|
|
|
|
|
|
|
}, |
464
|
|
|
|
|
|
|
GOTOS => { |
465
|
|
|
|
|
|
|
'operator' => 78, |
466
|
|
|
|
|
|
|
'value_list' => 81, |
467
|
|
|
|
|
|
|
'property' => 53, |
468
|
|
|
|
|
|
|
'value' => 77 |
469
|
|
|
|
|
|
|
} |
470
|
|
|
|
|
|
|
}, |
471
|
|
|
|
|
|
|
{#State 50 |
472
|
|
|
|
|
|
|
ACTIONS => { |
473
|
|
|
|
|
|
|
"!" => 20, |
474
|
|
|
|
|
|
|
'identifier' => 15, |
475
|
|
|
|
|
|
|
'number' => 46, |
476
|
|
|
|
|
|
|
"<" => 28, |
477
|
|
|
|
|
|
|
">" => 29, |
478
|
|
|
|
|
|
|
"=" => 31, |
479
|
|
|
|
|
|
|
'string' => 52 |
480
|
|
|
|
|
|
|
}, |
481
|
|
|
|
|
|
|
GOTOS => { |
482
|
|
|
|
|
|
|
'property' => 53, |
483
|
|
|
|
|
|
|
'value' => 77, |
484
|
|
|
|
|
|
|
'value_list' => 82, |
485
|
|
|
|
|
|
|
'operator' => 78 |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
}, |
488
|
|
|
|
|
|
|
{#State 51 |
489
|
|
|
|
|
|
|
DEFAULT => -44 |
490
|
|
|
|
|
|
|
}, |
491
|
|
|
|
|
|
|
{#State 52 |
492
|
|
|
|
|
|
|
DEFAULT => -4 |
493
|
|
|
|
|
|
|
}, |
494
|
|
|
|
|
|
|
{#State 53 |
495
|
|
|
|
|
|
|
ACTIONS => { |
496
|
|
|
|
|
|
|
"." => 24 |
497
|
|
|
|
|
|
|
}, |
498
|
|
|
|
|
|
|
DEFAULT => -6, |
499
|
|
|
|
|
|
|
GOTOS => { |
500
|
|
|
|
|
|
|
'dot' => 35 |
501
|
|
|
|
|
|
|
} |
502
|
|
|
|
|
|
|
}, |
503
|
|
|
|
|
|
|
{#State 54 |
504
|
|
|
|
|
|
|
DEFAULT => -69 |
505
|
|
|
|
|
|
|
}, |
506
|
|
|
|
|
|
|
{#State 55 |
507
|
|
|
|
|
|
|
DEFAULT => -35 |
508
|
|
|
|
|
|
|
}, |
509
|
|
|
|
|
|
|
{#State 56 |
510
|
|
|
|
|
|
|
DEFAULT => -41 |
511
|
|
|
|
|
|
|
}, |
512
|
|
|
|
|
|
|
{#State 57 |
513
|
|
|
|
|
|
|
ACTIONS => { |
514
|
|
|
|
|
|
|
'number' => 46, |
515
|
|
|
|
|
|
|
'identifier' => 15, |
516
|
|
|
|
|
|
|
'string' => 52 |
517
|
|
|
|
|
|
|
}, |
518
|
|
|
|
|
|
|
GOTOS => { |
519
|
|
|
|
|
|
|
'value' => 83, |
520
|
|
|
|
|
|
|
'property' => 53 |
521
|
|
|
|
|
|
|
} |
522
|
|
|
|
|
|
|
}, |
523
|
|
|
|
|
|
|
{#State 58 |
524
|
|
|
|
|
|
|
ACTIONS => { |
525
|
|
|
|
|
|
|
'identifier' => 15 |
526
|
|
|
|
|
|
|
}, |
527
|
|
|
|
|
|
|
GOTOS => { |
528
|
|
|
|
|
|
|
'property' => 84 |
529
|
|
|
|
|
|
|
} |
530
|
|
|
|
|
|
|
}, |
531
|
|
|
|
|
|
|
{#State 59 |
532
|
|
|
|
|
|
|
ACTIONS => { |
533
|
|
|
|
|
|
|
"!" => 20, |
534
|
|
|
|
|
|
|
'ALL' => 87, |
535
|
|
|
|
|
|
|
'ANY' => 86, |
536
|
|
|
|
|
|
|
"=" => 31, |
537
|
|
|
|
|
|
|
'string' => 52, |
538
|
|
|
|
|
|
|
">" => 29, |
539
|
|
|
|
|
|
|
'ONLY' => 89, |
540
|
|
|
|
|
|
|
"<" => 28, |
541
|
|
|
|
|
|
|
'number' => 46, |
542
|
|
|
|
|
|
|
'identifier' => 15 |
543
|
|
|
|
|
|
|
}, |
544
|
|
|
|
|
|
|
GOTOS => { |
545
|
|
|
|
|
|
|
'value' => 90, |
546
|
|
|
|
|
|
|
'property' => 53, |
547
|
|
|
|
|
|
|
'operator' => 85, |
548
|
|
|
|
|
|
|
'value_zip' => 88 |
549
|
|
|
|
|
|
|
} |
550
|
|
|
|
|
|
|
}, |
551
|
|
|
|
|
|
|
{#State 60 |
552
|
|
|
|
|
|
|
DEFAULT => -43 |
553
|
|
|
|
|
|
|
}, |
554
|
|
|
|
|
|
|
{#State 61 |
555
|
|
|
|
|
|
|
DEFAULT => -38 |
556
|
|
|
|
|
|
|
}, |
557
|
|
|
|
|
|
|
{#State 62 |
558
|
|
|
|
|
|
|
DEFAULT => -65 |
559
|
|
|
|
|
|
|
}, |
560
|
|
|
|
|
|
|
{#State 63 |
561
|
|
|
|
|
|
|
DEFAULT => -67 |
562
|
|
|
|
|
|
|
}, |
563
|
|
|
|
|
|
|
{#State 64 |
564
|
|
|
|
|
|
|
ACTIONS => { |
565
|
|
|
|
|
|
|
"." => 24 |
566
|
|
|
|
|
|
|
}, |
567
|
|
|
|
|
|
|
DEFAULT => -53, |
568
|
|
|
|
|
|
|
GOTOS => { |
569
|
|
|
|
|
|
|
'dot' => 35 |
570
|
|
|
|
|
|
|
} |
571
|
|
|
|
|
|
|
}, |
572
|
|
|
|
|
|
|
{#State 65 |
573
|
|
|
|
|
|
|
DEFAULT => -58 |
574
|
|
|
|
|
|
|
}, |
575
|
|
|
|
|
|
|
{#State 66 |
576
|
|
|
|
|
|
|
DEFAULT => -36 |
577
|
|
|
|
|
|
|
}, |
578
|
|
|
|
|
|
|
{#State 67 |
579
|
|
|
|
|
|
|
DEFAULT => -37 |
580
|
|
|
|
|
|
|
}, |
581
|
|
|
|
|
|
|
{#State 68 |
582
|
|
|
|
|
|
|
DEFAULT => -39 |
583
|
|
|
|
|
|
|
}, |
584
|
|
|
|
|
|
|
{#State 69 |
585
|
|
|
|
|
|
|
ACTIONS => { |
586
|
|
|
|
|
|
|
'string' => 52, |
587
|
|
|
|
|
|
|
'identifier' => 15, |
588
|
|
|
|
|
|
|
'number' => 46 |
589
|
|
|
|
|
|
|
}, |
590
|
|
|
|
|
|
|
GOTOS => { |
591
|
|
|
|
|
|
|
'value' => 91, |
592
|
|
|
|
|
|
|
'property' => 53 |
593
|
|
|
|
|
|
|
} |
594
|
|
|
|
|
|
|
}, |
595
|
|
|
|
|
|
|
{#State 70 |
596
|
|
|
|
|
|
|
DEFAULT => -55 |
597
|
|
|
|
|
|
|
}, |
598
|
|
|
|
|
|
|
{#State 71 |
599
|
|
|
|
|
|
|
ACTIONS => { |
600
|
|
|
|
|
|
|
'string' => 52, |
601
|
|
|
|
|
|
|
'identifier' => 15, |
602
|
|
|
|
|
|
|
'number' => 46 |
603
|
|
|
|
|
|
|
}, |
604
|
|
|
|
|
|
|
GOTOS => { |
605
|
|
|
|
|
|
|
'value' => 92, |
606
|
|
|
|
|
|
|
'property' => 53 |
607
|
|
|
|
|
|
|
} |
608
|
|
|
|
|
|
|
}, |
609
|
|
|
|
|
|
|
{#State 72 |
610
|
|
|
|
|
|
|
ACTIONS => { |
611
|
|
|
|
|
|
|
")" => 76 |
612
|
|
|
|
|
|
|
}, |
613
|
|
|
|
|
|
|
GOTOS => { |
614
|
|
|
|
|
|
|
'closingbrace' => 93 |
615
|
|
|
|
|
|
|
} |
616
|
|
|
|
|
|
|
}, |
617
|
|
|
|
|
|
|
{#State 73 |
618
|
|
|
|
|
|
|
DEFAULT => -21 |
619
|
|
|
|
|
|
|
}, |
620
|
|
|
|
|
|
|
{#State 74 |
621
|
|
|
|
|
|
|
DEFAULT => -19 |
622
|
|
|
|
|
|
|
}, |
623
|
|
|
|
|
|
|
{#State 75 |
624
|
|
|
|
|
|
|
DEFAULT => -23 |
625
|
|
|
|
|
|
|
}, |
626
|
|
|
|
|
|
|
{#State 76 |
627
|
|
|
|
|
|
|
DEFAULT => -60 |
628
|
|
|
|
|
|
|
}, |
629
|
|
|
|
|
|
|
{#State 77 |
630
|
|
|
|
|
|
|
DEFAULT => -7 |
631
|
|
|
|
|
|
|
}, |
632
|
|
|
|
|
|
|
{#State 78 |
633
|
|
|
|
|
|
|
ACTIONS => { |
634
|
|
|
|
|
|
|
'string' => 52, |
635
|
|
|
|
|
|
|
'number' => 46, |
636
|
|
|
|
|
|
|
'identifier' => 15 |
637
|
|
|
|
|
|
|
}, |
638
|
|
|
|
|
|
|
GOTOS => { |
639
|
|
|
|
|
|
|
'value' => 94, |
640
|
|
|
|
|
|
|
'property' => 53 |
641
|
|
|
|
|
|
|
} |
642
|
|
|
|
|
|
|
}, |
643
|
|
|
|
|
|
|
{#State 79 |
644
|
|
|
|
|
|
|
ACTIONS => { |
645
|
|
|
|
|
|
|
"," => 95 |
646
|
|
|
|
|
|
|
}, |
647
|
|
|
|
|
|
|
DEFAULT => -48, |
648
|
|
|
|
|
|
|
GOTOS => { |
649
|
|
|
|
|
|
|
'comma' => 96 |
650
|
|
|
|
|
|
|
} |
651
|
|
|
|
|
|
|
}, |
652
|
|
|
|
|
|
|
{#State 80 |
653
|
|
|
|
|
|
|
DEFAULT => -45 |
654
|
|
|
|
|
|
|
}, |
655
|
|
|
|
|
|
|
{#State 81 |
656
|
|
|
|
|
|
|
ACTIONS => { |
657
|
|
|
|
|
|
|
"," => 95 |
658
|
|
|
|
|
|
|
}, |
659
|
|
|
|
|
|
|
DEFAULT => -47, |
660
|
|
|
|
|
|
|
GOTOS => { |
661
|
|
|
|
|
|
|
'comma' => 96 |
662
|
|
|
|
|
|
|
} |
663
|
|
|
|
|
|
|
}, |
664
|
|
|
|
|
|
|
{#State 82 |
665
|
|
|
|
|
|
|
ACTIONS => { |
666
|
|
|
|
|
|
|
"," => 95 |
667
|
|
|
|
|
|
|
}, |
668
|
|
|
|
|
|
|
DEFAULT => -46, |
669
|
|
|
|
|
|
|
GOTOS => { |
670
|
|
|
|
|
|
|
'comma' => 96 |
671
|
|
|
|
|
|
|
} |
672
|
|
|
|
|
|
|
}, |
673
|
|
|
|
|
|
|
{#State 83 |
674
|
|
|
|
|
|
|
DEFAULT => -42 |
675
|
|
|
|
|
|
|
}, |
676
|
|
|
|
|
|
|
{#State 84 |
677
|
|
|
|
|
|
|
ACTIONS => { |
678
|
|
|
|
|
|
|
"." => 24 |
679
|
|
|
|
|
|
|
}, |
680
|
|
|
|
|
|
|
DEFAULT => -54, |
681
|
|
|
|
|
|
|
GOTOS => { |
682
|
|
|
|
|
|
|
'dot' => 35 |
683
|
|
|
|
|
|
|
} |
684
|
|
|
|
|
|
|
}, |
685
|
|
|
|
|
|
|
{#State 85 |
686
|
|
|
|
|
|
|
ACTIONS => { |
687
|
|
|
|
|
|
|
'identifier' => 15, |
688
|
|
|
|
|
|
|
'number' => 46, |
689
|
|
|
|
|
|
|
'string' => 52 |
690
|
|
|
|
|
|
|
}, |
691
|
|
|
|
|
|
|
GOTOS => { |
692
|
|
|
|
|
|
|
'value' => 97, |
693
|
|
|
|
|
|
|
'property' => 53 |
694
|
|
|
|
|
|
|
} |
695
|
|
|
|
|
|
|
}, |
696
|
|
|
|
|
|
|
{#State 86 |
697
|
|
|
|
|
|
|
ACTIONS => { |
698
|
|
|
|
|
|
|
"!" => 20, |
699
|
|
|
|
|
|
|
'number' => 46, |
700
|
|
|
|
|
|
|
"<" => 28, |
701
|
|
|
|
|
|
|
'identifier' => 15, |
702
|
|
|
|
|
|
|
"=" => 31, |
703
|
|
|
|
|
|
|
'string' => 52, |
704
|
|
|
|
|
|
|
">" => 29 |
705
|
|
|
|
|
|
|
}, |
706
|
|
|
|
|
|
|
GOTOS => { |
707
|
|
|
|
|
|
|
'operator' => 85, |
708
|
|
|
|
|
|
|
'value_zip_list' => 99, |
709
|
|
|
|
|
|
|
'value_zip' => 98, |
710
|
|
|
|
|
|
|
'property' => 53, |
711
|
|
|
|
|
|
|
'value' => 90 |
712
|
|
|
|
|
|
|
} |
713
|
|
|
|
|
|
|
}, |
714
|
|
|
|
|
|
|
{#State 87 |
715
|
|
|
|
|
|
|
ACTIONS => { |
716
|
|
|
|
|
|
|
"!" => 20, |
717
|
|
|
|
|
|
|
"<" => 28, |
718
|
|
|
|
|
|
|
'number' => 46, |
719
|
|
|
|
|
|
|
'identifier' => 15, |
720
|
|
|
|
|
|
|
'string' => 52, |
721
|
|
|
|
|
|
|
"=" => 31, |
722
|
|
|
|
|
|
|
">" => 29 |
723
|
|
|
|
|
|
|
}, |
724
|
|
|
|
|
|
|
GOTOS => { |
725
|
|
|
|
|
|
|
'property' => 53, |
726
|
|
|
|
|
|
|
'value' => 90, |
727
|
|
|
|
|
|
|
'value_zip_list' => 100, |
728
|
|
|
|
|
|
|
'operator' => 85, |
729
|
|
|
|
|
|
|
'value_zip' => 98 |
730
|
|
|
|
|
|
|
} |
731
|
|
|
|
|
|
|
}, |
732
|
|
|
|
|
|
|
{#State 88 |
733
|
|
|
|
|
|
|
ACTIONS => { |
734
|
|
|
|
|
|
|
":" => 33 |
735
|
|
|
|
|
|
|
}, |
736
|
|
|
|
|
|
|
DEFAULT => -49, |
737
|
|
|
|
|
|
|
GOTOS => { |
738
|
|
|
|
|
|
|
'value_zip_part' => 101, |
739
|
|
|
|
|
|
|
'colon' => 102 |
740
|
|
|
|
|
|
|
} |
741
|
|
|
|
|
|
|
}, |
742
|
|
|
|
|
|
|
{#State 89 |
743
|
|
|
|
|
|
|
ACTIONS => { |
744
|
|
|
|
|
|
|
"!" => 20, |
745
|
|
|
|
|
|
|
"=" => 31, |
746
|
|
|
|
|
|
|
'string' => 52, |
747
|
|
|
|
|
|
|
">" => 29, |
748
|
|
|
|
|
|
|
'number' => 46, |
749
|
|
|
|
|
|
|
"<" => 28, |
750
|
|
|
|
|
|
|
'identifier' => 15 |
751
|
|
|
|
|
|
|
}, |
752
|
|
|
|
|
|
|
GOTOS => { |
753
|
|
|
|
|
|
|
'property' => 53, |
754
|
|
|
|
|
|
|
'value' => 90, |
755
|
|
|
|
|
|
|
'value_zip' => 98, |
756
|
|
|
|
|
|
|
'value_zip_list' => 103, |
757
|
|
|
|
|
|
|
'operator' => 85 |
758
|
|
|
|
|
|
|
} |
759
|
|
|
|
|
|
|
}, |
760
|
|
|
|
|
|
|
{#State 90 |
761
|
|
|
|
|
|
|
ACTIONS => { |
762
|
|
|
|
|
|
|
":" => 33 |
763
|
|
|
|
|
|
|
}, |
764
|
|
|
|
|
|
|
GOTOS => { |
765
|
|
|
|
|
|
|
'colon' => 102, |
766
|
|
|
|
|
|
|
'value_zip_part' => 104 |
767
|
|
|
|
|
|
|
} |
768
|
|
|
|
|
|
|
}, |
769
|
|
|
|
|
|
|
{#State 91 |
770
|
|
|
|
|
|
|
DEFAULT => -40 |
771
|
|
|
|
|
|
|
}, |
772
|
|
|
|
|
|
|
{#State 92 |
773
|
|
|
|
|
|
|
DEFAULT => -56 |
774
|
|
|
|
|
|
|
}, |
775
|
|
|
|
|
|
|
{#State 93 |
776
|
|
|
|
|
|
|
DEFAULT => -25 |
777
|
|
|
|
|
|
|
}, |
778
|
|
|
|
|
|
|
{#State 94 |
779
|
|
|
|
|
|
|
DEFAULT => -8 |
780
|
|
|
|
|
|
|
}, |
781
|
|
|
|
|
|
|
{#State 95 |
782
|
|
|
|
|
|
|
DEFAULT => -62 |
783
|
|
|
|
|
|
|
}, |
784
|
|
|
|
|
|
|
{#State 96 |
785
|
|
|
|
|
|
|
ACTIONS => { |
786
|
|
|
|
|
|
|
"=" => 31, |
787
|
|
|
|
|
|
|
'string' => 52, |
788
|
|
|
|
|
|
|
">" => 29, |
789
|
|
|
|
|
|
|
"<" => 28, |
790
|
|
|
|
|
|
|
'number' => 46, |
791
|
|
|
|
|
|
|
'identifier' => 15, |
792
|
|
|
|
|
|
|
"!" => 20 |
793
|
|
|
|
|
|
|
}, |
794
|
|
|
|
|
|
|
GOTOS => { |
795
|
|
|
|
|
|
|
'operator' => 105, |
796
|
|
|
|
|
|
|
'value' => 106, |
797
|
|
|
|
|
|
|
'property' => 53 |
798
|
|
|
|
|
|
|
} |
799
|
|
|
|
|
|
|
}, |
800
|
|
|
|
|
|
|
{#State 97 |
801
|
|
|
|
|
|
|
ACTIONS => { |
802
|
|
|
|
|
|
|
":" => 33 |
803
|
|
|
|
|
|
|
}, |
804
|
|
|
|
|
|
|
GOTOS => { |
805
|
|
|
|
|
|
|
'colon' => 102, |
806
|
|
|
|
|
|
|
'value_zip_part' => 107 |
807
|
|
|
|
|
|
|
} |
808
|
|
|
|
|
|
|
}, |
809
|
|
|
|
|
|
|
{#State 98 |
810
|
|
|
|
|
|
|
ACTIONS => { |
811
|
|
|
|
|
|
|
":" => 33 |
812
|
|
|
|
|
|
|
}, |
813
|
|
|
|
|
|
|
DEFAULT => -16, |
814
|
|
|
|
|
|
|
GOTOS => { |
815
|
|
|
|
|
|
|
'value_zip_part' => 101, |
816
|
|
|
|
|
|
|
'colon' => 102 |
817
|
|
|
|
|
|
|
} |
818
|
|
|
|
|
|
|
}, |
819
|
|
|
|
|
|
|
{#State 99 |
820
|
|
|
|
|
|
|
ACTIONS => { |
821
|
|
|
|
|
|
|
"," => 95 |
822
|
|
|
|
|
|
|
}, |
823
|
|
|
|
|
|
|
DEFAULT => -52, |
824
|
|
|
|
|
|
|
GOTOS => { |
825
|
|
|
|
|
|
|
'comma' => 108 |
826
|
|
|
|
|
|
|
} |
827
|
|
|
|
|
|
|
}, |
828
|
|
|
|
|
|
|
{#State 100 |
829
|
|
|
|
|
|
|
ACTIONS => { |
830
|
|
|
|
|
|
|
"," => 95 |
831
|
|
|
|
|
|
|
}, |
832
|
|
|
|
|
|
|
DEFAULT => -51, |
833
|
|
|
|
|
|
|
GOTOS => { |
834
|
|
|
|
|
|
|
'comma' => 108 |
835
|
|
|
|
|
|
|
} |
836
|
|
|
|
|
|
|
}, |
837
|
|
|
|
|
|
|
{#State 101 |
838
|
|
|
|
|
|
|
DEFAULT => -13 |
839
|
|
|
|
|
|
|
}, |
840
|
|
|
|
|
|
|
{#State 102 |
841
|
|
|
|
|
|
|
ACTIONS => { |
842
|
|
|
|
|
|
|
"!" => 20, |
843
|
|
|
|
|
|
|
'identifier' => 15, |
844
|
|
|
|
|
|
|
"<" => 28, |
845
|
|
|
|
|
|
|
'number' => 46, |
846
|
|
|
|
|
|
|
">" => 29, |
847
|
|
|
|
|
|
|
'string' => 52, |
848
|
|
|
|
|
|
|
"=" => 31 |
849
|
|
|
|
|
|
|
}, |
850
|
|
|
|
|
|
|
GOTOS => { |
851
|
|
|
|
|
|
|
'operator' => 110, |
852
|
|
|
|
|
|
|
'value' => 109, |
853
|
|
|
|
|
|
|
'property' => 53 |
854
|
|
|
|
|
|
|
} |
855
|
|
|
|
|
|
|
}, |
856
|
|
|
|
|
|
|
{#State 103 |
857
|
|
|
|
|
|
|
ACTIONS => { |
858
|
|
|
|
|
|
|
"," => 95 |
859
|
|
|
|
|
|
|
}, |
860
|
|
|
|
|
|
|
DEFAULT => -50, |
861
|
|
|
|
|
|
|
GOTOS => { |
862
|
|
|
|
|
|
|
'comma' => 108 |
863
|
|
|
|
|
|
|
} |
864
|
|
|
|
|
|
|
}, |
865
|
|
|
|
|
|
|
{#State 104 |
866
|
|
|
|
|
|
|
DEFAULT => -11 |
867
|
|
|
|
|
|
|
}, |
868
|
|
|
|
|
|
|
{#State 105 |
869
|
|
|
|
|
|
|
ACTIONS => { |
870
|
|
|
|
|
|
|
'identifier' => 15, |
871
|
|
|
|
|
|
|
'number' => 46, |
872
|
|
|
|
|
|
|
'string' => 52 |
873
|
|
|
|
|
|
|
}, |
874
|
|
|
|
|
|
|
GOTOS => { |
875
|
|
|
|
|
|
|
'value' => 111, |
876
|
|
|
|
|
|
|
'property' => 53 |
877
|
|
|
|
|
|
|
} |
878
|
|
|
|
|
|
|
}, |
879
|
|
|
|
|
|
|
{#State 106 |
880
|
|
|
|
|
|
|
DEFAULT => -9 |
881
|
|
|
|
|
|
|
}, |
882
|
|
|
|
|
|
|
{#State 107 |
883
|
|
|
|
|
|
|
DEFAULT => -12 |
884
|
|
|
|
|
|
|
}, |
885
|
|
|
|
|
|
|
{#State 108 |
886
|
|
|
|
|
|
|
ACTIONS => { |
887
|
|
|
|
|
|
|
"!" => 20, |
888
|
|
|
|
|
|
|
'identifier' => 15, |
889
|
|
|
|
|
|
|
'number' => 46, |
890
|
|
|
|
|
|
|
"<" => 28, |
891
|
|
|
|
|
|
|
">" => 29, |
892
|
|
|
|
|
|
|
'string' => 52, |
893
|
|
|
|
|
|
|
"=" => 31 |
894
|
|
|
|
|
|
|
}, |
895
|
|
|
|
|
|
|
GOTOS => { |
896
|
|
|
|
|
|
|
'property' => 53, |
897
|
|
|
|
|
|
|
'value' => 90, |
898
|
|
|
|
|
|
|
'value_zip' => 112, |
899
|
|
|
|
|
|
|
'operator' => 85 |
900
|
|
|
|
|
|
|
} |
901
|
|
|
|
|
|
|
}, |
902
|
|
|
|
|
|
|
{#State 109 |
903
|
|
|
|
|
|
|
DEFAULT => -14 |
904
|
|
|
|
|
|
|
}, |
905
|
|
|
|
|
|
|
{#State 110 |
906
|
|
|
|
|
|
|
ACTIONS => { |
907
|
|
|
|
|
|
|
'identifier' => 15, |
908
|
|
|
|
|
|
|
'number' => 46, |
909
|
|
|
|
|
|
|
'string' => 52 |
910
|
|
|
|
|
|
|
}, |
911
|
|
|
|
|
|
|
GOTOS => { |
912
|
|
|
|
|
|
|
'property' => 53, |
913
|
|
|
|
|
|
|
'value' => 113 |
914
|
|
|
|
|
|
|
} |
915
|
|
|
|
|
|
|
}, |
916
|
|
|
|
|
|
|
{#State 111 |
917
|
|
|
|
|
|
|
DEFAULT => -10 |
918
|
|
|
|
|
|
|
}, |
919
|
|
|
|
|
|
|
{#State 112 |
920
|
|
|
|
|
|
|
ACTIONS => { |
921
|
|
|
|
|
|
|
":" => 33 |
922
|
|
|
|
|
|
|
}, |
923
|
|
|
|
|
|
|
DEFAULT => -17, |
924
|
|
|
|
|
|
|
GOTOS => { |
925
|
|
|
|
|
|
|
'colon' => 102, |
926
|
|
|
|
|
|
|
'value_zip_part' => 101 |
927
|
|
|
|
|
|
|
} |
928
|
|
|
|
|
|
|
}, |
929
|
|
|
|
|
|
|
{#State 113 |
930
|
|
|
|
|
|
|
DEFAULT => -15 |
931
|
|
|
|
|
|
|
} |
932
|
|
|
|
|
|
|
], |
933
|
|
|
|
|
|
|
yyrules => |
934
|
|
|
|
|
|
|
[ |
935
|
|
|
|
|
|
|
[#Rule 0 |
936
|
|
|
|
|
|
|
'$start', 2, undef |
937
|
|
|
|
|
|
|
], |
938
|
|
|
|
|
|
|
[#Rule 1 |
939
|
|
|
|
|
|
|
'filter', 1, undef |
940
|
|
|
|
|
|
|
], |
941
|
|
|
|
|
|
|
[#Rule 2 |
942
|
|
|
|
|
|
|
'constant', 1, undef |
943
|
|
|
|
|
|
|
], |
944
|
|
|
|
|
|
|
[#Rule 3 |
945
|
|
|
|
|
|
|
'constant', 1, undef |
946
|
|
|
|
|
|
|
], |
947
|
|
|
|
|
|
|
[#Rule 4 |
948
|
|
|
|
|
|
|
'value', 1, undef |
949
|
|
|
|
|
|
|
], |
950
|
|
|
|
|
|
|
[#Rule 5 |
951
|
|
|
|
|
|
|
'value', 1, undef |
952
|
|
|
|
|
|
|
], |
953
|
|
|
|
|
|
|
[#Rule 6 |
954
|
|
|
|
|
|
|
'value', 1, undef |
955
|
|
|
|
|
|
|
], |
956
|
|
|
|
|
|
|
[#Rule 7 |
957
|
|
|
|
|
|
|
'value_list', 1, |
958
|
|
|
|
|
|
|
sub |
959
|
|
|
|
|
|
|
#line 36 "lib/OPTIMADE/Filter/Parser.yp" |
960
|
|
|
|
|
|
|
{ |
961
|
|
|
|
|
|
|
return [ [ '=', $_[1] ] ]; |
962
|
|
|
|
|
|
|
} |
963
|
|
|
|
|
|
|
], |
964
|
|
|
|
|
|
|
[#Rule 8 |
965
|
|
|
|
|
|
|
'value_list', 2, |
966
|
|
|
|
|
|
|
sub |
967
|
|
|
|
|
|
|
#line 40 "lib/OPTIMADE/Filter/Parser.yp" |
968
|
|
|
|
|
|
|
{ |
969
|
|
|
|
|
|
|
return [ [ @_[1..$#_] ] ]; |
970
|
|
|
|
|
|
|
} |
971
|
|
|
|
|
|
|
], |
972
|
|
|
|
|
|
|
[#Rule 9 |
973
|
|
|
|
|
|
|
'value_list', 3, |
974
|
|
|
|
|
|
|
sub |
975
|
|
|
|
|
|
|
#line 44 "lib/OPTIMADE/Filter/Parser.yp" |
976
|
|
|
|
|
|
|
{ |
977
|
|
|
|
|
|
|
push @{$_[1]}, [ '=', $_[3] ]; |
978
|
|
|
|
|
|
|
return $_[1]; |
979
|
|
|
|
|
|
|
} |
980
|
|
|
|
|
|
|
], |
981
|
|
|
|
|
|
|
[#Rule 10 |
982
|
|
|
|
|
|
|
'value_list', 4, |
983
|
|
|
|
|
|
|
sub |
984
|
|
|
|
|
|
|
#line 49 "lib/OPTIMADE/Filter/Parser.yp" |
985
|
|
|
|
|
|
|
{ |
986
|
|
|
|
|
|
|
push @{$_[1]}, [ $_[3], $_[4] ]; |
987
|
|
|
|
|
|
|
return $_[1]; |
988
|
|
|
|
|
|
|
} |
989
|
|
|
|
|
|
|
], |
990
|
|
|
|
|
|
|
[#Rule 11 |
991
|
|
|
|
|
|
|
'value_zip', 2, |
992
|
|
|
|
|
|
|
sub |
993
|
|
|
|
|
|
|
#line 56 "lib/OPTIMADE/Filter/Parser.yp" |
994
|
|
|
|
|
|
|
{ |
995
|
|
|
|
|
|
|
return [ [ '=', $_[1] ], $_[2] ]; |
996
|
|
|
|
|
|
|
} |
997
|
|
|
|
|
|
|
], |
998
|
|
|
|
|
|
|
[#Rule 12 |
999
|
|
|
|
|
|
|
'value_zip', 3, |
1000
|
|
|
|
|
|
|
sub |
1001
|
|
|
|
|
|
|
#line 60 "lib/OPTIMADE/Filter/Parser.yp" |
1002
|
|
|
|
|
|
|
{ |
1003
|
|
|
|
|
|
|
return [ [ $_[1], $_[2] ], $_[3] ]; |
1004
|
|
|
|
|
|
|
} |
1005
|
|
|
|
|
|
|
], |
1006
|
|
|
|
|
|
|
[#Rule 13 |
1007
|
|
|
|
|
|
|
'value_zip', 2, |
1008
|
|
|
|
|
|
|
sub |
1009
|
|
|
|
|
|
|
#line 64 "lib/OPTIMADE/Filter/Parser.yp" |
1010
|
|
|
|
|
|
|
{ |
1011
|
|
|
|
|
|
|
push @{$_[1]}, $_[2]; |
1012
|
|
|
|
|
|
|
return $_[1]; |
1013
|
|
|
|
|
|
|
} |
1014
|
|
|
|
|
|
|
], |
1015
|
|
|
|
|
|
|
[#Rule 14 |
1016
|
|
|
|
|
|
|
'value_zip_part', 2, |
1017
|
|
|
|
|
|
|
sub |
1018
|
|
|
|
|
|
|
#line 71 "lib/OPTIMADE/Filter/Parser.yp" |
1019
|
|
|
|
|
|
|
{ |
1020
|
|
|
|
|
|
|
return [ '=', $_[2] ]; |
1021
|
|
|
|
|
|
|
} |
1022
|
|
|
|
|
|
|
], |
1023
|
|
|
|
|
|
|
[#Rule 15 |
1024
|
|
|
|
|
|
|
'value_zip_part', 3, |
1025
|
|
|
|
|
|
|
sub |
1026
|
|
|
|
|
|
|
#line 75 "lib/OPTIMADE/Filter/Parser.yp" |
1027
|
|
|
|
|
|
|
{ |
1028
|
|
|
|
|
|
|
return [ $_[2], $_[3] ]; |
1029
|
|
|
|
|
|
|
} |
1030
|
|
|
|
|
|
|
], |
1031
|
|
|
|
|
|
|
[#Rule 16 |
1032
|
|
|
|
|
|
|
'value_zip_list', 1, |
1033
|
|
|
|
|
|
|
sub |
1034
|
|
|
|
|
|
|
#line 81 "lib/OPTIMADE/Filter/Parser.yp" |
1035
|
|
|
|
|
|
|
{ |
1036
|
|
|
|
|
|
|
return [ $_[1] ]; |
1037
|
|
|
|
|
|
|
} |
1038
|
|
|
|
|
|
|
], |
1039
|
|
|
|
|
|
|
[#Rule 17 |
1040
|
|
|
|
|
|
|
'value_zip_list', 3, |
1041
|
|
|
|
|
|
|
sub |
1042
|
|
|
|
|
|
|
#line 85 "lib/OPTIMADE/Filter/Parser.yp" |
1043
|
|
|
|
|
|
|
{ |
1044
|
|
|
|
|
|
|
push @{$_[1]}, $_[3]; |
1045
|
|
|
|
|
|
|
return $_[1]; |
1046
|
|
|
|
|
|
|
} |
1047
|
|
|
|
|
|
|
], |
1048
|
|
|
|
|
|
|
[#Rule 18 |
1049
|
|
|
|
|
|
|
'expression', 1, undef |
1050
|
|
|
|
|
|
|
], |
1051
|
|
|
|
|
|
|
[#Rule 19 |
1052
|
|
|
|
|
|
|
'expression', 3, |
1053
|
|
|
|
|
|
|
sub |
1054
|
|
|
|
|
|
|
#line 95 "lib/OPTIMADE/Filter/Parser.yp" |
1055
|
|
|
|
|
|
|
{ |
1056
|
|
|
|
|
|
|
return OPTIMADE::Filter::AndOr->new( @_[1..$#_] ); |
1057
|
|
|
|
|
|
|
} |
1058
|
|
|
|
|
|
|
], |
1059
|
|
|
|
|
|
|
[#Rule 20 |
1060
|
|
|
|
|
|
|
'expression_clause', 1, undef |
1061
|
|
|
|
|
|
|
], |
1062
|
|
|
|
|
|
|
[#Rule 21 |
1063
|
|
|
|
|
|
|
'expression_clause', 3, |
1064
|
|
|
|
|
|
|
sub |
1065
|
|
|
|
|
|
|
#line 102 "lib/OPTIMADE/Filter/Parser.yp" |
1066
|
|
|
|
|
|
|
{ |
1067
|
|
|
|
|
|
|
return OPTIMADE::Filter::AndOr->new( @_[1..$#_] ); |
1068
|
|
|
|
|
|
|
} |
1069
|
|
|
|
|
|
|
], |
1070
|
|
|
|
|
|
|
[#Rule 22 |
1071
|
|
|
|
|
|
|
'expression_phrase', 1, undef |
1072
|
|
|
|
|
|
|
], |
1073
|
|
|
|
|
|
|
[#Rule 23 |
1074
|
|
|
|
|
|
|
'expression_phrase', 3, |
1075
|
|
|
|
|
|
|
sub |
1076
|
|
|
|
|
|
|
#line 109 "lib/OPTIMADE/Filter/Parser.yp" |
1077
|
|
|
|
|
|
|
{ |
1078
|
|
|
|
|
|
|
return $_[2]; |
1079
|
|
|
|
|
|
|
} |
1080
|
|
|
|
|
|
|
], |
1081
|
|
|
|
|
|
|
[#Rule 24 |
1082
|
|
|
|
|
|
|
'expression_phrase', 2, |
1083
|
|
|
|
|
|
|
sub |
1084
|
|
|
|
|
|
|
#line 113 "lib/OPTIMADE/Filter/Parser.yp" |
1085
|
|
|
|
|
|
|
{ |
1086
|
|
|
|
|
|
|
return OPTIMADE::Filter::Negation->new( $_[2] ); |
1087
|
|
|
|
|
|
|
} |
1088
|
|
|
|
|
|
|
], |
1089
|
|
|
|
|
|
|
[#Rule 25 |
1090
|
|
|
|
|
|
|
'expression_phrase', 4, |
1091
|
|
|
|
|
|
|
sub |
1092
|
|
|
|
|
|
|
#line 117 "lib/OPTIMADE/Filter/Parser.yp" |
1093
|
|
|
|
|
|
|
{ |
1094
|
|
|
|
|
|
|
return OPTIMADE::Filter::Negation->new( $_[3] ); |
1095
|
|
|
|
|
|
|
} |
1096
|
|
|
|
|
|
|
], |
1097
|
|
|
|
|
|
|
[#Rule 26 |
1098
|
|
|
|
|
|
|
'comparison', 1, undef |
1099
|
|
|
|
|
|
|
], |
1100
|
|
|
|
|
|
|
[#Rule 27 |
1101
|
|
|
|
|
|
|
'comparison', 1, undef |
1102
|
|
|
|
|
|
|
], |
1103
|
|
|
|
|
|
|
[#Rule 28 |
1104
|
|
|
|
|
|
|
'constant_first_comparison', 2, |
1105
|
|
|
|
|
|
|
sub |
1106
|
|
|
|
|
|
|
#line 125 "lib/OPTIMADE/Filter/Parser.yp" |
1107
|
|
|
|
|
|
|
{ |
1108
|
|
|
|
|
|
|
$_[2]->unshift_operand( $_[1] ); |
1109
|
|
|
|
|
|
|
return $_[2]; |
1110
|
|
|
|
|
|
|
} |
1111
|
|
|
|
|
|
|
], |
1112
|
|
|
|
|
|
|
[#Rule 29 |
1113
|
|
|
|
|
|
|
'property_first_comparison', 2, |
1114
|
|
|
|
|
|
|
sub |
1115
|
|
|
|
|
|
|
#line 132 "lib/OPTIMADE/Filter/Parser.yp" |
1116
|
|
|
|
|
|
|
{ |
1117
|
|
|
|
|
|
|
$_[2]->unshift_operand( $_[1] ); |
1118
|
|
|
|
|
|
|
return $_[2]; |
1119
|
|
|
|
|
|
|
} |
1120
|
|
|
|
|
|
|
], |
1121
|
|
|
|
|
|
|
[#Rule 30 |
1122
|
|
|
|
|
|
|
'property_first_comparison', 2, |
1123
|
|
|
|
|
|
|
sub |
1124
|
|
|
|
|
|
|
#line 137 "lib/OPTIMADE/Filter/Parser.yp" |
1125
|
|
|
|
|
|
|
{ |
1126
|
|
|
|
|
|
|
$_[2]->property( $_[1] ); |
1127
|
|
|
|
|
|
|
return $_[2]; |
1128
|
|
|
|
|
|
|
} |
1129
|
|
|
|
|
|
|
], |
1130
|
|
|
|
|
|
|
[#Rule 31 |
1131
|
|
|
|
|
|
|
'property_first_comparison', 2, |
1132
|
|
|
|
|
|
|
sub |
1133
|
|
|
|
|
|
|
#line 142 "lib/OPTIMADE/Filter/Parser.yp" |
1134
|
|
|
|
|
|
|
{ |
1135
|
|
|
|
|
|
|
$_[2]->unshift_operand( $_[1] ); |
1136
|
|
|
|
|
|
|
return $_[2]; |
1137
|
|
|
|
|
|
|
} |
1138
|
|
|
|
|
|
|
], |
1139
|
|
|
|
|
|
|
[#Rule 32 |
1140
|
|
|
|
|
|
|
'property_first_comparison', 2, |
1141
|
|
|
|
|
|
|
sub |
1142
|
|
|
|
|
|
|
#line 147 "lib/OPTIMADE/Filter/Parser.yp" |
1143
|
|
|
|
|
|
|
{ |
1144
|
|
|
|
|
|
|
$_[2]->property( $_[1] ); |
1145
|
|
|
|
|
|
|
return $_[2]; |
1146
|
|
|
|
|
|
|
} |
1147
|
|
|
|
|
|
|
], |
1148
|
|
|
|
|
|
|
[#Rule 33 |
1149
|
|
|
|
|
|
|
'property_first_comparison', 2, |
1150
|
|
|
|
|
|
|
sub |
1151
|
|
|
|
|
|
|
#line 152 "lib/OPTIMADE/Filter/Parser.yp" |
1152
|
|
|
|
|
|
|
{ |
1153
|
|
|
|
|
|
|
$_[2]->unshift_property( $_[1] ); |
1154
|
|
|
|
|
|
|
return $_[2]; |
1155
|
|
|
|
|
|
|
} |
1156
|
|
|
|
|
|
|
], |
1157
|
|
|
|
|
|
|
[#Rule 34 |
1158
|
|
|
|
|
|
|
'property_first_comparison', 2, |
1159
|
|
|
|
|
|
|
sub |
1160
|
|
|
|
|
|
|
#line 157 "lib/OPTIMADE/Filter/Parser.yp" |
1161
|
|
|
|
|
|
|
{ |
1162
|
|
|
|
|
|
|
$_[2]->property( $_[1] ); |
1163
|
|
|
|
|
|
|
return $_[2]; |
1164
|
|
|
|
|
|
|
} |
1165
|
|
|
|
|
|
|
], |
1166
|
|
|
|
|
|
|
[#Rule 35 |
1167
|
|
|
|
|
|
|
'value_op_rhs', 2, |
1168
|
|
|
|
|
|
|
sub |
1169
|
|
|
|
|
|
|
#line 164 "lib/OPTIMADE/Filter/Parser.yp" |
1170
|
|
|
|
|
|
|
{ |
1171
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::Comparison->new( $_[1] ); |
1172
|
|
|
|
|
|
|
$cmp->push_operand( $_[2] ); |
1173
|
|
|
|
|
|
|
return $cmp; |
1174
|
|
|
|
|
|
|
} |
1175
|
|
|
|
|
|
|
], |
1176
|
|
|
|
|
|
|
[#Rule 36 |
1177
|
|
|
|
|
|
|
'known_op_rhs', 2, |
1178
|
|
|
|
|
|
|
sub |
1179
|
|
|
|
|
|
|
#line 172 "lib/OPTIMADE/Filter/Parser.yp" |
1180
|
|
|
|
|
|
|
{ |
1181
|
|
|
|
|
|
|
return OPTIMADE::Filter::Known->new( 1 ); |
1182
|
|
|
|
|
|
|
} |
1183
|
|
|
|
|
|
|
], |
1184
|
|
|
|
|
|
|
[#Rule 37 |
1185
|
|
|
|
|
|
|
'known_op_rhs', 2, |
1186
|
|
|
|
|
|
|
sub |
1187
|
|
|
|
|
|
|
#line 176 "lib/OPTIMADE/Filter/Parser.yp" |
1188
|
|
|
|
|
|
|
{ |
1189
|
|
|
|
|
|
|
return OPTIMADE::Filter::Known->new( 0 ); |
1190
|
|
|
|
|
|
|
} |
1191
|
|
|
|
|
|
|
], |
1192
|
|
|
|
|
|
|
[#Rule 38 |
1193
|
|
|
|
|
|
|
'fuzzy_string_op_rhs', 2, |
1194
|
|
|
|
|
|
|
sub |
1195
|
|
|
|
|
|
|
#line 182 "lib/OPTIMADE/Filter/Parser.yp" |
1196
|
|
|
|
|
|
|
{ |
1197
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::Comparison->new( $_[1] ); |
1198
|
|
|
|
|
|
|
$cmp->push_operand( $_[2] ); |
1199
|
|
|
|
|
|
|
return $cmp; |
1200
|
|
|
|
|
|
|
} |
1201
|
|
|
|
|
|
|
], |
1202
|
|
|
|
|
|
|
[#Rule 39 |
1203
|
|
|
|
|
|
|
'fuzzy_string_op_rhs', 2, |
1204
|
|
|
|
|
|
|
sub |
1205
|
|
|
|
|
|
|
#line 188 "lib/OPTIMADE/Filter/Parser.yp" |
1206
|
|
|
|
|
|
|
{ |
1207
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::Comparison->new( $_[1] ); |
1208
|
|
|
|
|
|
|
$cmp->push_operand( $_[2] ); |
1209
|
|
|
|
|
|
|
return $cmp; |
1210
|
|
|
|
|
|
|
} |
1211
|
|
|
|
|
|
|
], |
1212
|
|
|
|
|
|
|
[#Rule 40 |
1213
|
|
|
|
|
|
|
'fuzzy_string_op_rhs', 3, |
1214
|
|
|
|
|
|
|
sub |
1215
|
|
|
|
|
|
|
#line 194 "lib/OPTIMADE/Filter/Parser.yp" |
1216
|
|
|
|
|
|
|
{ |
1217
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::Comparison->new( "$_[1] $_[2]" ); |
1218
|
|
|
|
|
|
|
$cmp->push_operand( $_[3] ); |
1219
|
|
|
|
|
|
|
return $cmp; |
1220
|
|
|
|
|
|
|
} |
1221
|
|
|
|
|
|
|
], |
1222
|
|
|
|
|
|
|
[#Rule 41 |
1223
|
|
|
|
|
|
|
'fuzzy_string_op_rhs', 2, |
1224
|
|
|
|
|
|
|
sub |
1225
|
|
|
|
|
|
|
#line 200 "lib/OPTIMADE/Filter/Parser.yp" |
1226
|
|
|
|
|
|
|
{ |
1227
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::Comparison->new( $_[1] ); |
1228
|
|
|
|
|
|
|
$cmp->push_operand( $_[2] ); |
1229
|
|
|
|
|
|
|
return $cmp; |
1230
|
|
|
|
|
|
|
} |
1231
|
|
|
|
|
|
|
], |
1232
|
|
|
|
|
|
|
[#Rule 42 |
1233
|
|
|
|
|
|
|
'fuzzy_string_op_rhs', 3, |
1234
|
|
|
|
|
|
|
sub |
1235
|
|
|
|
|
|
|
#line 206 "lib/OPTIMADE/Filter/Parser.yp" |
1236
|
|
|
|
|
|
|
{ |
1237
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::Comparison->new( "$_[1] $_[2]" ); |
1238
|
|
|
|
|
|
|
$cmp->push_operand( $_[3] ); |
1239
|
|
|
|
|
|
|
return $cmp; |
1240
|
|
|
|
|
|
|
} |
1241
|
|
|
|
|
|
|
], |
1242
|
|
|
|
|
|
|
[#Rule 43 |
1243
|
|
|
|
|
|
|
'fuzzy_string_op_rhs', 2, |
1244
|
|
|
|
|
|
|
sub |
1245
|
|
|
|
|
|
|
#line 212 "lib/OPTIMADE/Filter/Parser.yp" |
1246
|
|
|
|
|
|
|
{ |
1247
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::Comparison->new( $_[1] ); |
1248
|
|
|
|
|
|
|
$cmp->push_operand( $_[2] ); |
1249
|
|
|
|
|
|
|
return $cmp; |
1250
|
|
|
|
|
|
|
} |
1251
|
|
|
|
|
|
|
], |
1252
|
|
|
|
|
|
|
[#Rule 44 |
1253
|
|
|
|
|
|
|
'set_op_rhs', 2, |
1254
|
|
|
|
|
|
|
sub |
1255
|
|
|
|
|
|
|
#line 220 "lib/OPTIMADE/Filter/Parser.yp" |
1256
|
|
|
|
|
|
|
{ |
1257
|
|
|
|
|
|
|
my $lc = OPTIMADE::Filter::ListComparison->new( $_[1] ); |
1258
|
|
|
|
|
|
|
$lc->values( [ [ '=', $_[2] ] ] ); |
1259
|
|
|
|
|
|
|
return $lc; |
1260
|
|
|
|
|
|
|
} |
1261
|
|
|
|
|
|
|
], |
1262
|
|
|
|
|
|
|
[#Rule 45 |
1263
|
|
|
|
|
|
|
'set_op_rhs', 3, |
1264
|
|
|
|
|
|
|
sub |
1265
|
|
|
|
|
|
|
#line 226 "lib/OPTIMADE/Filter/Parser.yp" |
1266
|
|
|
|
|
|
|
{ |
1267
|
|
|
|
|
|
|
my $lc = OPTIMADE::Filter::ListComparison->new( $_[1] ); |
1268
|
|
|
|
|
|
|
$lc->values( [ [ $_[2], $_[3] ] ] ); |
1269
|
|
|
|
|
|
|
return $lc; |
1270
|
|
|
|
|
|
|
} |
1271
|
|
|
|
|
|
|
], |
1272
|
|
|
|
|
|
|
[#Rule 46 |
1273
|
|
|
|
|
|
|
'set_op_rhs', 3, |
1274
|
|
|
|
|
|
|
sub |
1275
|
|
|
|
|
|
|
#line 232 "lib/OPTIMADE/Filter/Parser.yp" |
1276
|
|
|
|
|
|
|
{ |
1277
|
|
|
|
|
|
|
my $lc = OPTIMADE::Filter::ListComparison->new( "$_[1] $_[2]" ); |
1278
|
|
|
|
|
|
|
$lc->values( $_[3] ); |
1279
|
|
|
|
|
|
|
return $lc; |
1280
|
|
|
|
|
|
|
} |
1281
|
|
|
|
|
|
|
], |
1282
|
|
|
|
|
|
|
[#Rule 47 |
1283
|
|
|
|
|
|
|
'set_op_rhs', 3, |
1284
|
|
|
|
|
|
|
sub |
1285
|
|
|
|
|
|
|
#line 238 "lib/OPTIMADE/Filter/Parser.yp" |
1286
|
|
|
|
|
|
|
{ |
1287
|
|
|
|
|
|
|
my $lc = OPTIMADE::Filter::ListComparison->new( "$_[1] $_[2]" ); |
1288
|
|
|
|
|
|
|
$lc->values( $_[3] ); |
1289
|
|
|
|
|
|
|
return $lc; |
1290
|
|
|
|
|
|
|
} |
1291
|
|
|
|
|
|
|
], |
1292
|
|
|
|
|
|
|
[#Rule 48 |
1293
|
|
|
|
|
|
|
'set_op_rhs', 3, |
1294
|
|
|
|
|
|
|
sub |
1295
|
|
|
|
|
|
|
#line 244 "lib/OPTIMADE/Filter/Parser.yp" |
1296
|
|
|
|
|
|
|
{ |
1297
|
|
|
|
|
|
|
my $lc = OPTIMADE::Filter::ListComparison->new( "$_[1] $_[2]" ); |
1298
|
|
|
|
|
|
|
$lc->values( $_[3] ); |
1299
|
|
|
|
|
|
|
return $lc; |
1300
|
|
|
|
|
|
|
} |
1301
|
|
|
|
|
|
|
], |
1302
|
|
|
|
|
|
|
[#Rule 49 |
1303
|
|
|
|
|
|
|
'set_zip_op_rhs', 3, |
1304
|
|
|
|
|
|
|
sub |
1305
|
|
|
|
|
|
|
#line 252 "lib/OPTIMADE/Filter/Parser.yp" |
1306
|
|
|
|
|
|
|
{ |
1307
|
|
|
|
|
|
|
$_[1]->operator( $_[2] ); |
1308
|
|
|
|
|
|
|
$_[1]->values( [ $_[3] ] ); |
1309
|
|
|
|
|
|
|
return $_[1]; |
1310
|
|
|
|
|
|
|
} |
1311
|
|
|
|
|
|
|
], |
1312
|
|
|
|
|
|
|
[#Rule 50 |
1313
|
|
|
|
|
|
|
'set_zip_op_rhs', 4, |
1314
|
|
|
|
|
|
|
sub |
1315
|
|
|
|
|
|
|
#line 258 "lib/OPTIMADE/Filter/Parser.yp" |
1316
|
|
|
|
|
|
|
{ |
1317
|
|
|
|
|
|
|
$_[1]->operator( "$_[2] $_[3]" ); |
1318
|
|
|
|
|
|
|
$_[1]->values( $_[4] ); |
1319
|
|
|
|
|
|
|
return $_[1]; |
1320
|
|
|
|
|
|
|
} |
1321
|
|
|
|
|
|
|
], |
1322
|
|
|
|
|
|
|
[#Rule 51 |
1323
|
|
|
|
|
|
|
'set_zip_op_rhs', 4, |
1324
|
|
|
|
|
|
|
sub |
1325
|
|
|
|
|
|
|
#line 264 "lib/OPTIMADE/Filter/Parser.yp" |
1326
|
|
|
|
|
|
|
{ |
1327
|
|
|
|
|
|
|
$_[1]->operator( "$_[2] $_[3]" ); |
1328
|
|
|
|
|
|
|
$_[1]->values( $_[4] ); |
1329
|
|
|
|
|
|
|
return $_[1]; |
1330
|
|
|
|
|
|
|
} |
1331
|
|
|
|
|
|
|
], |
1332
|
|
|
|
|
|
|
[#Rule 52 |
1333
|
|
|
|
|
|
|
'set_zip_op_rhs', 4, |
1334
|
|
|
|
|
|
|
sub |
1335
|
|
|
|
|
|
|
#line 270 "lib/OPTIMADE/Filter/Parser.yp" |
1336
|
|
|
|
|
|
|
{ |
1337
|
|
|
|
|
|
|
$_[1]->operator( "$_[2] $_[3]" ); |
1338
|
|
|
|
|
|
|
$_[1]->values( $_[4] ); |
1339
|
|
|
|
|
|
|
return $_[1]; |
1340
|
|
|
|
|
|
|
} |
1341
|
|
|
|
|
|
|
], |
1342
|
|
|
|
|
|
|
[#Rule 53 |
1343
|
|
|
|
|
|
|
'property_zip_addon', 2, |
1344
|
|
|
|
|
|
|
sub |
1345
|
|
|
|
|
|
|
#line 278 "lib/OPTIMADE/Filter/Parser.yp" |
1346
|
|
|
|
|
|
|
{ |
1347
|
|
|
|
|
|
|
my $zip = OPTIMADE::Filter::Zip->new; |
1348
|
|
|
|
|
|
|
$zip->push_property( $_[2] ); |
1349
|
|
|
|
|
|
|
return $zip; |
1350
|
|
|
|
|
|
|
} |
1351
|
|
|
|
|
|
|
], |
1352
|
|
|
|
|
|
|
[#Rule 54 |
1353
|
|
|
|
|
|
|
'property_zip_addon', 3, |
1354
|
|
|
|
|
|
|
sub |
1355
|
|
|
|
|
|
|
#line 284 "lib/OPTIMADE/Filter/Parser.yp" |
1356
|
|
|
|
|
|
|
{ |
1357
|
|
|
|
|
|
|
$_[1]->push_property( $_[3] ); |
1358
|
|
|
|
|
|
|
return $_[1]; |
1359
|
|
|
|
|
|
|
} |
1360
|
|
|
|
|
|
|
], |
1361
|
|
|
|
|
|
|
[#Rule 55 |
1362
|
|
|
|
|
|
|
'length_op_rhs', 2, |
1363
|
|
|
|
|
|
|
sub |
1364
|
|
|
|
|
|
|
#line 291 "lib/OPTIMADE/Filter/Parser.yp" |
1365
|
|
|
|
|
|
|
{ |
1366
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::ListComparison->new( $_[1] ); |
1367
|
|
|
|
|
|
|
$cmp->values( [ [ '=', $_[2] ] ] ); |
1368
|
|
|
|
|
|
|
return $cmp; |
1369
|
|
|
|
|
|
|
} |
1370
|
|
|
|
|
|
|
], |
1371
|
|
|
|
|
|
|
[#Rule 56 |
1372
|
|
|
|
|
|
|
'length_op_rhs', 3, |
1373
|
|
|
|
|
|
|
sub |
1374
|
|
|
|
|
|
|
#line 297 "lib/OPTIMADE/Filter/Parser.yp" |
1375
|
|
|
|
|
|
|
{ |
1376
|
|
|
|
|
|
|
my $cmp = OPTIMADE::Filter::ListComparison->new( $_[1] ); |
1377
|
|
|
|
|
|
|
$cmp->values( [ [ $_[2], $_[3] ] ] ); |
1378
|
|
|
|
|
|
|
return $cmp; |
1379
|
|
|
|
|
|
|
} |
1380
|
|
|
|
|
|
|
], |
1381
|
|
|
|
|
|
|
[#Rule 57 |
1382
|
|
|
|
|
|
|
'property', 1, |
1383
|
|
|
|
|
|
|
sub |
1384
|
|
|
|
|
|
|
#line 307 "lib/OPTIMADE/Filter/Parser.yp" |
1385
|
|
|
|
|
|
|
{ |
1386
|
|
|
|
|
|
|
return OPTIMADE::Filter::Property->new( $_[1] ); |
1387
|
|
|
|
|
|
|
} |
1388
|
|
|
|
|
|
|
], |
1389
|
|
|
|
|
|
|
[#Rule 58 |
1390
|
|
|
|
|
|
|
'property', 3, |
1391
|
|
|
|
|
|
|
sub |
1392
|
|
|
|
|
|
|
#line 311 "lib/OPTIMADE/Filter/Parser.yp" |
1393
|
|
|
|
|
|
|
{ |
1394
|
|
|
|
|
|
|
push @{$_[1]}, $_[3]; |
1395
|
|
|
|
|
|
|
return $_[1]; |
1396
|
|
|
|
|
|
|
} |
1397
|
|
|
|
|
|
|
], |
1398
|
|
|
|
|
|
|
[#Rule 59 |
1399
|
|
|
|
|
|
|
'openingbrace', 1, undef |
1400
|
|
|
|
|
|
|
], |
1401
|
|
|
|
|
|
|
[#Rule 60 |
1402
|
|
|
|
|
|
|
'closingbrace', 1, undef |
1403
|
|
|
|
|
|
|
], |
1404
|
|
|
|
|
|
|
[#Rule 61 |
1405
|
|
|
|
|
|
|
'dot', 1, undef |
1406
|
|
|
|
|
|
|
], |
1407
|
|
|
|
|
|
|
[#Rule 62 |
1408
|
|
|
|
|
|
|
'comma', 1, undef |
1409
|
|
|
|
|
|
|
], |
1410
|
|
|
|
|
|
|
[#Rule 63 |
1411
|
|
|
|
|
|
|
'colon', 1, undef |
1412
|
|
|
|
|
|
|
], |
1413
|
|
|
|
|
|
|
[#Rule 64 |
1414
|
|
|
|
|
|
|
'operator', 1, undef |
1415
|
|
|
|
|
|
|
], |
1416
|
|
|
|
|
|
|
[#Rule 65 |
1417
|
|
|
|
|
|
|
'operator', 2, |
1418
|
|
|
|
|
|
|
sub |
1419
|
|
|
|
|
|
|
#line 333 "lib/OPTIMADE/Filter/Parser.yp" |
1420
|
|
|
|
|
|
|
{ |
1421
|
|
|
|
|
|
|
return join( '', @_[1..$#_] ); |
1422
|
|
|
|
|
|
|
} |
1423
|
|
|
|
|
|
|
], |
1424
|
|
|
|
|
|
|
[#Rule 66 |
1425
|
|
|
|
|
|
|
'operator', 1, undef |
1426
|
|
|
|
|
|
|
], |
1427
|
|
|
|
|
|
|
[#Rule 67 |
1428
|
|
|
|
|
|
|
'operator', 2, |
1429
|
|
|
|
|
|
|
sub |
1430
|
|
|
|
|
|
|
#line 338 "lib/OPTIMADE/Filter/Parser.yp" |
1431
|
|
|
|
|
|
|
{ |
1432
|
|
|
|
|
|
|
return join( '', @_[1..$#_] ); |
1433
|
|
|
|
|
|
|
} |
1434
|
|
|
|
|
|
|
], |
1435
|
|
|
|
|
|
|
[#Rule 68 |
1436
|
|
|
|
|
|
|
'operator', 1, undef |
1437
|
|
|
|
|
|
|
], |
1438
|
|
|
|
|
|
|
[#Rule 69 |
1439
|
|
|
|
|
|
|
'operator', 2, |
1440
|
|
|
|
|
|
|
sub |
1441
|
|
|
|
|
|
|
#line 343 "lib/OPTIMADE/Filter/Parser.yp" |
1442
|
|
|
|
|
|
|
{ |
1443
|
|
|
|
|
|
|
return join( '', @_[1..$#_] ); |
1444
|
|
|
|
|
|
|
} |
1445
|
|
|
|
|
|
|
] |
1446
|
|
|
|
|
|
|
], |
1447
|
|
|
|
|
|
|
@_); |
1448
|
|
|
|
|
|
|
bless($self,$class); |
1449
|
|
|
|
|
|
|
} |
1450
|
|
|
|
|
|
|
|
1451
|
|
|
|
|
|
|
#line 348 "lib/OPTIMADE/Filter/Parser.yp" |
1452
|
|
|
|
|
|
|
|
1453
|
|
|
|
|
|
|
|
1454
|
|
|
|
|
|
|
# Footer section |
1455
|
|
|
|
|
|
|
|
1456
|
|
|
|
|
|
|
sub _Error |
1457
|
|
|
|
|
|
|
{ |
1458
|
|
|
|
|
|
|
my( $self ) = @_; |
1459
|
|
|
|
|
|
|
close $self->{USER}{FILEIN} if $self->{USER}{FILEIN}; |
1460
|
|
|
|
|
|
|
my $msg = "$0: syntax error at line $self->{USER}{LINENO}, " . |
1461
|
|
|
|
|
|
|
"position $self->{USER}{CHARNO}"; |
1462
|
|
|
|
|
|
|
if( $self->YYData->{INPUT} ) { |
1463
|
|
|
|
|
|
|
$self->YYData->{INPUT} =~ s/\n$//; |
1464
|
|
|
|
|
|
|
die "$msg: '" . $self->YYData->{INPUT} . "'.\n"; |
1465
|
|
|
|
|
|
|
} else { |
1466
|
|
|
|
|
|
|
die "$msg.\n"; |
1467
|
|
|
|
|
|
|
} |
1468
|
|
|
|
|
|
|
} |
1469
|
|
|
|
|
|
|
|
1470
|
|
|
|
|
|
|
sub _Lexer |
1471
|
|
|
|
|
|
|
{ |
1472
|
|
|
|
|
|
|
my( $self ) = @_; |
1473
|
|
|
|
|
|
|
|
1474
|
|
|
|
|
|
|
# If the line is empty and the input is originating from the file, |
1475
|
|
|
|
|
|
|
# another line is read. |
1476
|
|
|
|
|
|
|
if( !$self->YYData->{INPUT} && $self->{USER}{FILEIN} ) { |
1477
|
|
|
|
|
|
|
my $filein = $self->{USER}{FILEIN}; |
1478
|
|
|
|
|
|
|
$self->YYData->{INPUT} = <$filein>; |
1479
|
|
|
|
|
|
|
$self->{USER}{LINENO} = -1 unless exists $self->{USER}{LINENO}; |
1480
|
|
|
|
|
|
|
$self->{USER}{LINENO}++; |
1481
|
|
|
|
|
|
|
$self->{USER}{CHARNO} = 0; |
1482
|
|
|
|
|
|
|
} |
1483
|
|
|
|
|
|
|
|
1484
|
|
|
|
|
|
|
$self->YYData->{INPUT} =~ s/^(\s+)//; |
1485
|
|
|
|
|
|
|
$self->{USER}{CHARNO} += length( $1 ) if defined $1; |
1486
|
|
|
|
|
|
|
|
1487
|
|
|
|
|
|
|
# Escaped double quote or backslash are detected here and returned |
1488
|
|
|
|
|
|
|
# as is to the caller in order to be detected as syntax errors. |
1489
|
|
|
|
|
|
|
if( $self->YYData->{INPUT} =~ s/^(\\"|\\\\)// ) { |
1490
|
|
|
|
|
|
|
$self->{USER}{CHARNO} += length( $1 ); |
1491
|
|
|
|
|
|
|
return( $1, $1 ); |
1492
|
|
|
|
|
|
|
} |
1493
|
|
|
|
|
|
|
|
1494
|
|
|
|
|
|
|
# Handling strings |
1495
|
|
|
|
|
|
|
if( $self->YYData->{INPUT} =~ s/^"// ) { |
1496
|
|
|
|
|
|
|
$self->{USER}{CHARNO} ++; |
1497
|
|
|
|
|
|
|
my $string = ''; |
1498
|
|
|
|
|
|
|
while( 1 ) { |
1499
|
|
|
|
|
|
|
if( $self->YYData->{INPUT} =~ |
1500
|
|
|
|
|
|
|
s/^([A-Za-z_0-9 \t!#\$\%&\'\(\)\*\+,\-\.\/\:;<=>\?@\[\]\^`\{\|\}\~\P{ASCII}]+)// ) { |
1501
|
|
|
|
|
|
|
$self->{USER}{CHARNO} += length( $1 ); |
1502
|
|
|
|
|
|
|
$string .= $1; |
1503
|
|
|
|
|
|
|
} elsif( $self->YYData->{INPUT} =~ s/^\\([\\"])// ) { |
1504
|
|
|
|
|
|
|
$self->{USER}{CHARNO} ++; |
1505
|
|
|
|
|
|
|
$string .= $1; |
1506
|
|
|
|
|
|
|
next; |
1507
|
|
|
|
|
|
|
} elsif( $self->YYData->{INPUT} =~ s/^"// ) { |
1508
|
|
|
|
|
|
|
$self->{USER}{CHARNO} ++; |
1509
|
|
|
|
|
|
|
return( 'string', $string ); |
1510
|
|
|
|
|
|
|
} else { |
1511
|
|
|
|
|
|
|
return( undef, undef ); |
1512
|
|
|
|
|
|
|
} |
1513
|
|
|
|
|
|
|
} |
1514
|
|
|
|
|
|
|
} |
1515
|
|
|
|
|
|
|
|
1516
|
|
|
|
|
|
|
# Handling identifiers |
1517
|
|
|
|
|
|
|
if( $self->YYData->{INPUT} =~ s/^([a-z_][a-z0-9_]*)// ) { |
1518
|
|
|
|
|
|
|
$self->{USER}{CHARNO} += length( $1 ); |
1519
|
|
|
|
|
|
|
return( 'identifier', $1 ); |
1520
|
|
|
|
|
|
|
} |
1521
|
|
|
|
|
|
|
|
1522
|
|
|
|
|
|
|
# Handling boolean relations |
1523
|
|
|
|
|
|
|
if( $self->YYData->{INPUT} =~ s/^(AND|NOT|OR| |
1524
|
|
|
|
|
|
|
IS|UNKNOWN|KNOWN| |
1525
|
|
|
|
|
|
|
CONTAINS|STARTS|ENDS|WITH| |
1526
|
|
|
|
|
|
|
LENGTH|HAS|ALL|ONLY|ANY)//x ) { |
1527
|
|
|
|
|
|
|
$self->{USER}{CHARNO} += length( $1 ); |
1528
|
|
|
|
|
|
|
return( $1, $1 ); |
1529
|
|
|
|
|
|
|
} |
1530
|
|
|
|
|
|
|
|
1531
|
|
|
|
|
|
|
# Handling LIKE operator if allowed |
1532
|
|
|
|
|
|
|
if( $allow_LIKE_operator && $self->YYData->{INPUT} =~ s/^(LIKE)// ) { |
1533
|
|
|
|
|
|
|
$self->{USER}{CHARNO} += length( $1 ); |
1534
|
|
|
|
|
|
|
return( $1, $1 ); |
1535
|
|
|
|
|
|
|
} |
1536
|
|
|
|
|
|
|
|
1537
|
|
|
|
|
|
|
# Handling numbers |
1538
|
|
|
|
|
|
|
if( $self->YYData->{INPUT} =~ s/^([+-]? |
1539
|
|
|
|
|
|
|
(\d+\.?\d*|\.\d+) |
1540
|
|
|
|
|
|
|
([eE][+-]?\d+)?)//x ) { |
1541
|
|
|
|
|
|
|
$self->{USER}{CHARNO} += length( $1 ); |
1542
|
|
|
|
|
|
|
return( 'number', $1 ); |
1543
|
|
|
|
|
|
|
} |
1544
|
|
|
|
|
|
|
|
1545
|
|
|
|
|
|
|
my $char = substr( $self->YYData->{INPUT}, 0, 1 ); |
1546
|
|
|
|
|
|
|
if( $char ne '' ) { |
1547
|
|
|
|
|
|
|
$self->YYData->{INPUT} = substr( $self->YYData->{INPUT}, 1 ); |
1548
|
|
|
|
|
|
|
} |
1549
|
|
|
|
|
|
|
$self->{USER}{CHARNO}++; |
1550
|
|
|
|
|
|
|
return( $char, $char ); |
1551
|
|
|
|
|
|
|
} |
1552
|
|
|
|
|
|
|
|
1553
|
|
|
|
|
|
|
sub Run |
1554
|
|
|
|
|
|
|
{ |
1555
|
|
|
|
|
|
|
my( $self, $filename ) = @_; |
1556
|
|
|
|
|
|
|
open $self->{USER}{FILEIN}, $filename; |
1557
|
|
|
|
|
|
|
my $result = $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error ); |
1558
|
|
|
|
|
|
|
close $self->{USER}{FILEIN}; |
1559
|
|
|
|
|
|
|
return $result; |
1560
|
|
|
|
|
|
|
} |
1561
|
|
|
|
|
|
|
|
1562
|
|
|
|
|
|
|
sub parse_string |
1563
|
|
|
|
|
|
|
{ |
1564
|
|
|
|
|
|
|
my( $self, $string ) = @_; |
1565
|
|
|
|
|
|
|
$self->YYData->{INPUT} = $string; |
1566
|
|
|
|
|
|
|
$self->{USER}{LINENO} = 0; |
1567
|
|
|
|
|
|
|
$self->{USER}{CHARNO} = 0; |
1568
|
|
|
|
|
|
|
return $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error ); |
1569
|
|
|
|
|
|
|
} |
1570
|
|
|
|
|
|
|
|
1571
|
|
|
|
|
|
|
sub modify |
1572
|
|
|
|
|
|
|
{ |
1573
|
|
|
|
|
|
|
my $node = shift; |
1574
|
|
|
|
|
|
|
my $code = shift; |
1575
|
|
|
|
|
|
|
|
1576
|
|
|
|
|
|
|
if( blessed $node && $node->can( 'modify' ) ) { |
1577
|
|
|
|
|
|
|
return $node->modify( $code, @_ ); |
1578
|
|
|
|
|
|
|
} elsif( ref $node eq 'ARRAY' ) { |
1579
|
|
|
|
|
|
|
return [ map { modify( $_, $code, @_ ) } @$node ]; |
1580
|
|
|
|
|
|
|
} else { |
1581
|
|
|
|
|
|
|
return $code->( $node, @_ ); |
1582
|
|
|
|
|
|
|
} |
1583
|
|
|
|
|
|
|
} |
1584
|
|
|
|
|
|
|
|
1585
|
|
|
|
|
|
|
1; |
1586
|
|
|
|
|
|
|
|
1587
|
|
|
|
|
|
|
1; |