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
|
|
103418
|
use vars qw ( @ISA ); |
|
5
|
|
|
|
|
19
|
|
|
5
|
|
|
|
|
229
|
|
12
|
5
|
|
|
5
|
|
29
|
use strict; |
|
5
|
|
|
|
|
19
|
|
|
5
|
|
|
|
|
160
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
@ISA= qw ( Parse::Yapp::Driver ); |
15
|
5
|
|
|
5
|
|
2623
|
use Parse::Yapp::Driver; |
|
5
|
|
|
|
|
11001
|
|
|
5
|
|
|
|
|
1623
|
|
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
|
|
|
|
|
|
|
'identifier' => 3, |
47
|
|
|
|
|
|
|
'string' => 1, |
48
|
|
|
|
|
|
|
'number' => 5, |
49
|
|
|
|
|
|
|
"(" => 11, |
50
|
|
|
|
|
|
|
'NOT' => 15 |
51
|
|
|
|
|
|
|
}, |
52
|
|
|
|
|
|
|
GOTOS => { |
53
|
|
|
|
|
|
|
'property_first_comparison' => 4, |
54
|
|
|
|
|
|
|
'openingbrace' => 2, |
55
|
|
|
|
|
|
|
'constant_first_comparison' => 13, |
56
|
|
|
|
|
|
|
'filter' => 12, |
57
|
|
|
|
|
|
|
'expression_clause' => 14, |
58
|
|
|
|
|
|
|
'constant' => 7, |
59
|
|
|
|
|
|
|
'property' => 6, |
60
|
|
|
|
|
|
|
'comparison' => 8, |
61
|
|
|
|
|
|
|
'expression_phrase' => 9, |
62
|
|
|
|
|
|
|
'expression' => 10 |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
}, |
65
|
|
|
|
|
|
|
{#State 1 |
66
|
|
|
|
|
|
|
DEFAULT => -2 |
67
|
|
|
|
|
|
|
}, |
68
|
|
|
|
|
|
|
{#State 2 |
69
|
|
|
|
|
|
|
ACTIONS => { |
70
|
|
|
|
|
|
|
'identifier' => 3, |
71
|
|
|
|
|
|
|
'number' => 5, |
72
|
|
|
|
|
|
|
'string' => 1, |
73
|
|
|
|
|
|
|
'NOT' => 15, |
74
|
|
|
|
|
|
|
"(" => 11 |
75
|
|
|
|
|
|
|
}, |
76
|
|
|
|
|
|
|
GOTOS => { |
77
|
|
|
|
|
|
|
'expression_clause' => 14, |
78
|
|
|
|
|
|
|
'constant_first_comparison' => 13, |
79
|
|
|
|
|
|
|
'property' => 6, |
80
|
|
|
|
|
|
|
'constant' => 7, |
81
|
|
|
|
|
|
|
'expression' => 16, |
82
|
|
|
|
|
|
|
'comparison' => 8, |
83
|
|
|
|
|
|
|
'expression_phrase' => 9, |
84
|
|
|
|
|
|
|
'property_first_comparison' => 4, |
85
|
|
|
|
|
|
|
'openingbrace' => 2 |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
}, |
88
|
|
|
|
|
|
|
{#State 3 |
89
|
|
|
|
|
|
|
DEFAULT => -57 |
90
|
|
|
|
|
|
|
}, |
91
|
|
|
|
|
|
|
{#State 4 |
92
|
|
|
|
|
|
|
DEFAULT => -27 |
93
|
|
|
|
|
|
|
}, |
94
|
|
|
|
|
|
|
{#State 5 |
95
|
|
|
|
|
|
|
DEFAULT => -3 |
96
|
|
|
|
|
|
|
}, |
97
|
|
|
|
|
|
|
{#State 6 |
98
|
|
|
|
|
|
|
ACTIONS => { |
99
|
|
|
|
|
|
|
'ENDS' => 19, |
100
|
|
|
|
|
|
|
">" => 29, |
101
|
|
|
|
|
|
|
"=" => 20, |
102
|
|
|
|
|
|
|
"<" => 21, |
103
|
|
|
|
|
|
|
"!" => 17, |
104
|
|
|
|
|
|
|
'HAS' => 35, |
105
|
|
|
|
|
|
|
'CONTAINS' => 24, |
106
|
|
|
|
|
|
|
"." => 37, |
107
|
|
|
|
|
|
|
'LENGTH' => 26, |
108
|
|
|
|
|
|
|
":" => 39, |
109
|
|
|
|
|
|
|
'STARTS' => 27, |
110
|
|
|
|
|
|
|
'LIKE' => 34, |
111
|
|
|
|
|
|
|
'IS' => 23 |
112
|
|
|
|
|
|
|
}, |
113
|
|
|
|
|
|
|
GOTOS => { |
114
|
|
|
|
|
|
|
'fuzzy_string_op_rhs' => 31, |
115
|
|
|
|
|
|
|
'dot' => 30, |
116
|
|
|
|
|
|
|
'set_op_rhs' => 22, |
117
|
|
|
|
|
|
|
'colon' => 33, |
118
|
|
|
|
|
|
|
'known_op_rhs' => 32, |
119
|
|
|
|
|
|
|
'operator' => 28, |
120
|
|
|
|
|
|
|
'length_op_rhs' => 18, |
121
|
|
|
|
|
|
|
'set_zip_op_rhs' => 25, |
122
|
|
|
|
|
|
|
'value_op_rhs' => 36, |
123
|
|
|
|
|
|
|
'property_zip_addon' => 38 |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
}, |
126
|
|
|
|
|
|
|
{#State 7 |
127
|
|
|
|
|
|
|
ACTIONS => { |
128
|
|
|
|
|
|
|
"=" => 20, |
129
|
|
|
|
|
|
|
">" => 29, |
130
|
|
|
|
|
|
|
"<" => 21, |
131
|
|
|
|
|
|
|
"!" => 17 |
132
|
|
|
|
|
|
|
}, |
133
|
|
|
|
|
|
|
GOTOS => { |
134
|
|
|
|
|
|
|
'value_op_rhs' => 40, |
135
|
|
|
|
|
|
|
'operator' => 28 |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
}, |
138
|
|
|
|
|
|
|
{#State 8 |
139
|
|
|
|
|
|
|
DEFAULT => -22 |
140
|
|
|
|
|
|
|
}, |
141
|
|
|
|
|
|
|
{#State 9 |
142
|
|
|
|
|
|
|
ACTIONS => { |
143
|
|
|
|
|
|
|
'AND' => 41 |
144
|
|
|
|
|
|
|
}, |
145
|
|
|
|
|
|
|
DEFAULT => -20 |
146
|
|
|
|
|
|
|
}, |
147
|
|
|
|
|
|
|
{#State 10 |
148
|
|
|
|
|
|
|
DEFAULT => -1 |
149
|
|
|
|
|
|
|
}, |
150
|
|
|
|
|
|
|
{#State 11 |
151
|
|
|
|
|
|
|
DEFAULT => -59 |
152
|
|
|
|
|
|
|
}, |
153
|
|
|
|
|
|
|
{#State 12 |
154
|
|
|
|
|
|
|
ACTIONS => { |
155
|
|
|
|
|
|
|
'' => 42 |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
}, |
158
|
|
|
|
|
|
|
{#State 13 |
159
|
|
|
|
|
|
|
DEFAULT => -26 |
160
|
|
|
|
|
|
|
}, |
161
|
|
|
|
|
|
|
{#State 14 |
162
|
|
|
|
|
|
|
ACTIONS => { |
163
|
|
|
|
|
|
|
'OR' => 43 |
164
|
|
|
|
|
|
|
}, |
165
|
|
|
|
|
|
|
DEFAULT => -18 |
166
|
|
|
|
|
|
|
}, |
167
|
|
|
|
|
|
|
{#State 15 |
168
|
|
|
|
|
|
|
ACTIONS => { |
169
|
|
|
|
|
|
|
"(" => 11, |
170
|
|
|
|
|
|
|
'identifier' => 3, |
171
|
|
|
|
|
|
|
'string' => 1, |
172
|
|
|
|
|
|
|
'number' => 5 |
173
|
|
|
|
|
|
|
}, |
174
|
|
|
|
|
|
|
GOTOS => { |
175
|
|
|
|
|
|
|
'constant_first_comparison' => 13, |
176
|
|
|
|
|
|
|
'property_first_comparison' => 4, |
177
|
|
|
|
|
|
|
'constant' => 7, |
178
|
|
|
|
|
|
|
'property' => 6, |
179
|
|
|
|
|
|
|
'openingbrace' => 44, |
180
|
|
|
|
|
|
|
'comparison' => 45 |
181
|
|
|
|
|
|
|
} |
182
|
|
|
|
|
|
|
}, |
183
|
|
|
|
|
|
|
{#State 16 |
184
|
|
|
|
|
|
|
ACTIONS => { |
185
|
|
|
|
|
|
|
")" => 47 |
186
|
|
|
|
|
|
|
}, |
187
|
|
|
|
|
|
|
GOTOS => { |
188
|
|
|
|
|
|
|
'closingbrace' => 46 |
189
|
|
|
|
|
|
|
} |
190
|
|
|
|
|
|
|
}, |
191
|
|
|
|
|
|
|
{#State 17 |
192
|
|
|
|
|
|
|
ACTIONS => { |
193
|
|
|
|
|
|
|
"=" => 48 |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
}, |
196
|
|
|
|
|
|
|
{#State 18 |
197
|
|
|
|
|
|
|
DEFAULT => -34 |
198
|
|
|
|
|
|
|
}, |
199
|
|
|
|
|
|
|
{#State 19 |
200
|
|
|
|
|
|
|
ACTIONS => { |
201
|
|
|
|
|
|
|
'WITH' => 51, |
202
|
|
|
|
|
|
|
'string' => 53, |
203
|
|
|
|
|
|
|
'number' => 50, |
204
|
|
|
|
|
|
|
'identifier' => 3 |
205
|
|
|
|
|
|
|
}, |
206
|
|
|
|
|
|
|
GOTOS => { |
207
|
|
|
|
|
|
|
'value' => 52, |
208
|
|
|
|
|
|
|
'property' => 49 |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
}, |
211
|
|
|
|
|
|
|
{#State 20 |
212
|
|
|
|
|
|
|
DEFAULT => -68 |
213
|
|
|
|
|
|
|
}, |
214
|
|
|
|
|
|
|
{#State 21 |
215
|
|
|
|
|
|
|
ACTIONS => { |
216
|
|
|
|
|
|
|
"=" => 54 |
217
|
|
|
|
|
|
|
}, |
218
|
|
|
|
|
|
|
DEFAULT => -64 |
219
|
|
|
|
|
|
|
}, |
220
|
|
|
|
|
|
|
{#State 22 |
221
|
|
|
|
|
|
|
DEFAULT => -32 |
222
|
|
|
|
|
|
|
}, |
223
|
|
|
|
|
|
|
{#State 23 |
224
|
|
|
|
|
|
|
ACTIONS => { |
225
|
|
|
|
|
|
|
'KNOWN' => 55, |
226
|
|
|
|
|
|
|
'UNKNOWN' => 56 |
227
|
|
|
|
|
|
|
} |
228
|
|
|
|
|
|
|
}, |
229
|
|
|
|
|
|
|
{#State 24 |
230
|
|
|
|
|
|
|
ACTIONS => { |
231
|
|
|
|
|
|
|
'identifier' => 3, |
232
|
|
|
|
|
|
|
'string' => 53, |
233
|
|
|
|
|
|
|
'number' => 50 |
234
|
|
|
|
|
|
|
}, |
235
|
|
|
|
|
|
|
GOTOS => { |
236
|
|
|
|
|
|
|
'property' => 49, |
237
|
|
|
|
|
|
|
'value' => 57 |
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
}, |
240
|
|
|
|
|
|
|
{#State 25 |
241
|
|
|
|
|
|
|
DEFAULT => -33 |
242
|
|
|
|
|
|
|
}, |
243
|
|
|
|
|
|
|
{#State 26 |
244
|
|
|
|
|
|
|
ACTIONS => { |
245
|
|
|
|
|
|
|
"=" => 20, |
246
|
|
|
|
|
|
|
">" => 29, |
247
|
|
|
|
|
|
|
"<" => 21, |
248
|
|
|
|
|
|
|
'identifier' => 3, |
249
|
|
|
|
|
|
|
"!" => 17, |
250
|
|
|
|
|
|
|
'number' => 50, |
251
|
|
|
|
|
|
|
'string' => 53 |
252
|
|
|
|
|
|
|
}, |
253
|
|
|
|
|
|
|
GOTOS => { |
254
|
|
|
|
|
|
|
'value' => 59, |
255
|
|
|
|
|
|
|
'property' => 49, |
256
|
|
|
|
|
|
|
'operator' => 58 |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
}, |
259
|
|
|
|
|
|
|
{#State 27 |
260
|
|
|
|
|
|
|
ACTIONS => { |
261
|
|
|
|
|
|
|
'string' => 53, |
262
|
|
|
|
|
|
|
'number' => 50, |
263
|
|
|
|
|
|
|
'identifier' => 3, |
264
|
|
|
|
|
|
|
'WITH' => 60 |
265
|
|
|
|
|
|
|
}, |
266
|
|
|
|
|
|
|
GOTOS => { |
267
|
|
|
|
|
|
|
'property' => 49, |
268
|
|
|
|
|
|
|
'value' => 61 |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
}, |
271
|
|
|
|
|
|
|
{#State 28 |
272
|
|
|
|
|
|
|
ACTIONS => { |
273
|
|
|
|
|
|
|
'identifier' => 3, |
274
|
|
|
|
|
|
|
'string' => 53, |
275
|
|
|
|
|
|
|
'number' => 50 |
276
|
|
|
|
|
|
|
}, |
277
|
|
|
|
|
|
|
GOTOS => { |
278
|
|
|
|
|
|
|
'value' => 62, |
279
|
|
|
|
|
|
|
'property' => 49 |
280
|
|
|
|
|
|
|
} |
281
|
|
|
|
|
|
|
}, |
282
|
|
|
|
|
|
|
{#State 29 |
283
|
|
|
|
|
|
|
ACTIONS => { |
284
|
|
|
|
|
|
|
"=" => 63 |
285
|
|
|
|
|
|
|
}, |
286
|
|
|
|
|
|
|
DEFAULT => -66 |
287
|
|
|
|
|
|
|
}, |
288
|
|
|
|
|
|
|
{#State 30 |
289
|
|
|
|
|
|
|
ACTIONS => { |
290
|
|
|
|
|
|
|
'identifier' => 64 |
291
|
|
|
|
|
|
|
} |
292
|
|
|
|
|
|
|
}, |
293
|
|
|
|
|
|
|
{#State 31 |
294
|
|
|
|
|
|
|
DEFAULT => -31 |
295
|
|
|
|
|
|
|
}, |
296
|
|
|
|
|
|
|
{#State 32 |
297
|
|
|
|
|
|
|
DEFAULT => -30 |
298
|
|
|
|
|
|
|
}, |
299
|
|
|
|
|
|
|
{#State 33 |
300
|
|
|
|
|
|
|
ACTIONS => { |
301
|
|
|
|
|
|
|
'identifier' => 3 |
302
|
|
|
|
|
|
|
}, |
303
|
|
|
|
|
|
|
GOTOS => { |
304
|
|
|
|
|
|
|
'property' => 65 |
305
|
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
}, |
307
|
|
|
|
|
|
|
{#State 34 |
308
|
|
|
|
|
|
|
ACTIONS => { |
309
|
|
|
|
|
|
|
'number' => 50, |
310
|
|
|
|
|
|
|
'string' => 53, |
311
|
|
|
|
|
|
|
'identifier' => 3 |
312
|
|
|
|
|
|
|
}, |
313
|
|
|
|
|
|
|
GOTOS => { |
314
|
|
|
|
|
|
|
'property' => 49, |
315
|
|
|
|
|
|
|
'value' => 66 |
316
|
|
|
|
|
|
|
} |
317
|
|
|
|
|
|
|
}, |
318
|
|
|
|
|
|
|
{#State 35 |
319
|
|
|
|
|
|
|
ACTIONS => { |
320
|
|
|
|
|
|
|
"!" => 17, |
321
|
|
|
|
|
|
|
'identifier' => 3, |
322
|
|
|
|
|
|
|
'ALL' => 71, |
323
|
|
|
|
|
|
|
'string' => 53, |
324
|
|
|
|
|
|
|
">" => 29, |
325
|
|
|
|
|
|
|
'ANY' => 69, |
326
|
|
|
|
|
|
|
"=" => 20, |
327
|
|
|
|
|
|
|
"<" => 21, |
328
|
|
|
|
|
|
|
'number' => 50, |
329
|
|
|
|
|
|
|
'ONLY' => 70 |
330
|
|
|
|
|
|
|
}, |
331
|
|
|
|
|
|
|
GOTOS => { |
332
|
|
|
|
|
|
|
'property' => 49, |
333
|
|
|
|
|
|
|
'operator' => 67, |
334
|
|
|
|
|
|
|
'value' => 68 |
335
|
|
|
|
|
|
|
} |
336
|
|
|
|
|
|
|
}, |
337
|
|
|
|
|
|
|
{#State 36 |
338
|
|
|
|
|
|
|
DEFAULT => -29 |
339
|
|
|
|
|
|
|
}, |
340
|
|
|
|
|
|
|
{#State 37 |
341
|
|
|
|
|
|
|
DEFAULT => -61 |
342
|
|
|
|
|
|
|
}, |
343
|
|
|
|
|
|
|
{#State 38 |
344
|
|
|
|
|
|
|
ACTIONS => { |
345
|
|
|
|
|
|
|
":" => 39, |
346
|
|
|
|
|
|
|
'HAS' => 73 |
347
|
|
|
|
|
|
|
}, |
348
|
|
|
|
|
|
|
GOTOS => { |
349
|
|
|
|
|
|
|
'colon' => 72 |
350
|
|
|
|
|
|
|
} |
351
|
|
|
|
|
|
|
}, |
352
|
|
|
|
|
|
|
{#State 39 |
353
|
|
|
|
|
|
|
DEFAULT => -63 |
354
|
|
|
|
|
|
|
}, |
355
|
|
|
|
|
|
|
{#State 40 |
356
|
|
|
|
|
|
|
DEFAULT => -28 |
357
|
|
|
|
|
|
|
}, |
358
|
|
|
|
|
|
|
{#State 41 |
359
|
|
|
|
|
|
|
ACTIONS => { |
360
|
|
|
|
|
|
|
'identifier' => 3, |
361
|
|
|
|
|
|
|
'string' => 1, |
362
|
|
|
|
|
|
|
'number' => 5, |
363
|
|
|
|
|
|
|
"(" => 11, |
364
|
|
|
|
|
|
|
'NOT' => 15 |
365
|
|
|
|
|
|
|
}, |
366
|
|
|
|
|
|
|
GOTOS => { |
367
|
|
|
|
|
|
|
'property_first_comparison' => 4, |
368
|
|
|
|
|
|
|
'openingbrace' => 2, |
369
|
|
|
|
|
|
|
'expression_clause' => 74, |
370
|
|
|
|
|
|
|
'constant_first_comparison' => 13, |
371
|
|
|
|
|
|
|
'expression_phrase' => 9, |
372
|
|
|
|
|
|
|
'comparison' => 8, |
373
|
|
|
|
|
|
|
'property' => 6, |
374
|
|
|
|
|
|
|
'constant' => 7 |
375
|
|
|
|
|
|
|
} |
376
|
|
|
|
|
|
|
}, |
377
|
|
|
|
|
|
|
{#State 42 |
378
|
|
|
|
|
|
|
DEFAULT => 0 |
379
|
|
|
|
|
|
|
}, |
380
|
|
|
|
|
|
|
{#State 43 |
381
|
|
|
|
|
|
|
ACTIONS => { |
382
|
|
|
|
|
|
|
"(" => 11, |
383
|
|
|
|
|
|
|
'NOT' => 15, |
384
|
|
|
|
|
|
|
'string' => 1, |
385
|
|
|
|
|
|
|
'number' => 5, |
386
|
|
|
|
|
|
|
'identifier' => 3 |
387
|
|
|
|
|
|
|
}, |
388
|
|
|
|
|
|
|
GOTOS => { |
389
|
|
|
|
|
|
|
'expression_clause' => 14, |
390
|
|
|
|
|
|
|
'constant_first_comparison' => 13, |
391
|
|
|
|
|
|
|
'expression' => 75, |
392
|
|
|
|
|
|
|
'expression_phrase' => 9, |
393
|
|
|
|
|
|
|
'comparison' => 8, |
394
|
|
|
|
|
|
|
'constant' => 7, |
395
|
|
|
|
|
|
|
'property' => 6, |
396
|
|
|
|
|
|
|
'property_first_comparison' => 4, |
397
|
|
|
|
|
|
|
'openingbrace' => 2 |
398
|
|
|
|
|
|
|
} |
399
|
|
|
|
|
|
|
}, |
400
|
|
|
|
|
|
|
{#State 44 |
401
|
|
|
|
|
|
|
ACTIONS => { |
402
|
|
|
|
|
|
|
'string' => 1, |
403
|
|
|
|
|
|
|
'number' => 5, |
404
|
|
|
|
|
|
|
'identifier' => 3, |
405
|
|
|
|
|
|
|
"(" => 11, |
406
|
|
|
|
|
|
|
'NOT' => 15 |
407
|
|
|
|
|
|
|
}, |
408
|
|
|
|
|
|
|
GOTOS => { |
409
|
|
|
|
|
|
|
'expression_phrase' => 9, |
410
|
|
|
|
|
|
|
'comparison' => 8, |
411
|
|
|
|
|
|
|
'expression' => 76, |
412
|
|
|
|
|
|
|
'property' => 6, |
413
|
|
|
|
|
|
|
'constant' => 7, |
414
|
|
|
|
|
|
|
'constant_first_comparison' => 13, |
415
|
|
|
|
|
|
|
'expression_clause' => 14, |
416
|
|
|
|
|
|
|
'openingbrace' => 2, |
417
|
|
|
|
|
|
|
'property_first_comparison' => 4 |
418
|
|
|
|
|
|
|
} |
419
|
|
|
|
|
|
|
}, |
420
|
|
|
|
|
|
|
{#State 45 |
421
|
|
|
|
|
|
|
DEFAULT => -24 |
422
|
|
|
|
|
|
|
}, |
423
|
|
|
|
|
|
|
{#State 46 |
424
|
|
|
|
|
|
|
DEFAULT => -23 |
425
|
|
|
|
|
|
|
}, |
426
|
|
|
|
|
|
|
{#State 47 |
427
|
|
|
|
|
|
|
DEFAULT => -60 |
428
|
|
|
|
|
|
|
}, |
429
|
|
|
|
|
|
|
{#State 48 |
430
|
|
|
|
|
|
|
DEFAULT => -69 |
431
|
|
|
|
|
|
|
}, |
432
|
|
|
|
|
|
|
{#State 49 |
433
|
|
|
|
|
|
|
ACTIONS => { |
434
|
|
|
|
|
|
|
"." => 37 |
435
|
|
|
|
|
|
|
}, |
436
|
|
|
|
|
|
|
DEFAULT => -6, |
437
|
|
|
|
|
|
|
GOTOS => { |
438
|
|
|
|
|
|
|
'dot' => 30 |
439
|
|
|
|
|
|
|
} |
440
|
|
|
|
|
|
|
}, |
441
|
|
|
|
|
|
|
{#State 50 |
442
|
|
|
|
|
|
|
DEFAULT => -5 |
443
|
|
|
|
|
|
|
}, |
444
|
|
|
|
|
|
|
{#State 51 |
445
|
|
|
|
|
|
|
ACTIONS => { |
446
|
|
|
|
|
|
|
'string' => 53, |
447
|
|
|
|
|
|
|
'number' => 50, |
448
|
|
|
|
|
|
|
'identifier' => 3 |
449
|
|
|
|
|
|
|
}, |
450
|
|
|
|
|
|
|
GOTOS => { |
451
|
|
|
|
|
|
|
'property' => 49, |
452
|
|
|
|
|
|
|
'value' => 77 |
453
|
|
|
|
|
|
|
} |
454
|
|
|
|
|
|
|
}, |
455
|
|
|
|
|
|
|
{#State 52 |
456
|
|
|
|
|
|
|
DEFAULT => -41 |
457
|
|
|
|
|
|
|
}, |
458
|
|
|
|
|
|
|
{#State 53 |
459
|
|
|
|
|
|
|
DEFAULT => -4 |
460
|
|
|
|
|
|
|
}, |
461
|
|
|
|
|
|
|
{#State 54 |
462
|
|
|
|
|
|
|
DEFAULT => -65 |
463
|
|
|
|
|
|
|
}, |
464
|
|
|
|
|
|
|
{#State 55 |
465
|
|
|
|
|
|
|
DEFAULT => -36 |
466
|
|
|
|
|
|
|
}, |
467
|
|
|
|
|
|
|
{#State 56 |
468
|
|
|
|
|
|
|
DEFAULT => -37 |
469
|
|
|
|
|
|
|
}, |
470
|
|
|
|
|
|
|
{#State 57 |
471
|
|
|
|
|
|
|
DEFAULT => -38 |
472
|
|
|
|
|
|
|
}, |
473
|
|
|
|
|
|
|
{#State 58 |
474
|
|
|
|
|
|
|
ACTIONS => { |
475
|
|
|
|
|
|
|
'identifier' => 3, |
476
|
|
|
|
|
|
|
'number' => 50, |
477
|
|
|
|
|
|
|
'string' => 53 |
478
|
|
|
|
|
|
|
}, |
479
|
|
|
|
|
|
|
GOTOS => { |
480
|
|
|
|
|
|
|
'property' => 49, |
481
|
|
|
|
|
|
|
'value' => 78 |
482
|
|
|
|
|
|
|
} |
483
|
|
|
|
|
|
|
}, |
484
|
|
|
|
|
|
|
{#State 59 |
485
|
|
|
|
|
|
|
DEFAULT => -55 |
486
|
|
|
|
|
|
|
}, |
487
|
|
|
|
|
|
|
{#State 60 |
488
|
|
|
|
|
|
|
ACTIONS => { |
489
|
|
|
|
|
|
|
'identifier' => 3, |
490
|
|
|
|
|
|
|
'number' => 50, |
491
|
|
|
|
|
|
|
'string' => 53 |
492
|
|
|
|
|
|
|
}, |
493
|
|
|
|
|
|
|
GOTOS => { |
494
|
|
|
|
|
|
|
'property' => 49, |
495
|
|
|
|
|
|
|
'value' => 79 |
496
|
|
|
|
|
|
|
} |
497
|
|
|
|
|
|
|
}, |
498
|
|
|
|
|
|
|
{#State 61 |
499
|
|
|
|
|
|
|
DEFAULT => -39 |
500
|
|
|
|
|
|
|
}, |
501
|
|
|
|
|
|
|
{#State 62 |
502
|
|
|
|
|
|
|
DEFAULT => -35 |
503
|
|
|
|
|
|
|
}, |
504
|
|
|
|
|
|
|
{#State 63 |
505
|
|
|
|
|
|
|
DEFAULT => -67 |
506
|
|
|
|
|
|
|
}, |
507
|
|
|
|
|
|
|
{#State 64 |
508
|
|
|
|
|
|
|
DEFAULT => -58 |
509
|
|
|
|
|
|
|
}, |
510
|
|
|
|
|
|
|
{#State 65 |
511
|
|
|
|
|
|
|
ACTIONS => { |
512
|
|
|
|
|
|
|
"." => 37 |
513
|
|
|
|
|
|
|
}, |
514
|
|
|
|
|
|
|
DEFAULT => -53, |
515
|
|
|
|
|
|
|
GOTOS => { |
516
|
|
|
|
|
|
|
'dot' => 30 |
517
|
|
|
|
|
|
|
} |
518
|
|
|
|
|
|
|
}, |
519
|
|
|
|
|
|
|
{#State 66 |
520
|
|
|
|
|
|
|
DEFAULT => -43 |
521
|
|
|
|
|
|
|
}, |
522
|
|
|
|
|
|
|
{#State 67 |
523
|
|
|
|
|
|
|
ACTIONS => { |
524
|
|
|
|
|
|
|
'identifier' => 3, |
525
|
|
|
|
|
|
|
'number' => 50, |
526
|
|
|
|
|
|
|
'string' => 53 |
527
|
|
|
|
|
|
|
}, |
528
|
|
|
|
|
|
|
GOTOS => { |
529
|
|
|
|
|
|
|
'value' => 80, |
530
|
|
|
|
|
|
|
'property' => 49 |
531
|
|
|
|
|
|
|
} |
532
|
|
|
|
|
|
|
}, |
533
|
|
|
|
|
|
|
{#State 68 |
534
|
|
|
|
|
|
|
DEFAULT => -44 |
535
|
|
|
|
|
|
|
}, |
536
|
|
|
|
|
|
|
{#State 69 |
537
|
|
|
|
|
|
|
ACTIONS => { |
538
|
|
|
|
|
|
|
"=" => 20, |
539
|
|
|
|
|
|
|
">" => 29, |
540
|
|
|
|
|
|
|
"<" => 21, |
541
|
|
|
|
|
|
|
'identifier' => 3, |
542
|
|
|
|
|
|
|
"!" => 17, |
543
|
|
|
|
|
|
|
'number' => 50, |
544
|
|
|
|
|
|
|
'string' => 53 |
545
|
|
|
|
|
|
|
}, |
546
|
|
|
|
|
|
|
GOTOS => { |
547
|
|
|
|
|
|
|
'value' => 81, |
548
|
|
|
|
|
|
|
'value_list' => 83, |
549
|
|
|
|
|
|
|
'operator' => 82, |
550
|
|
|
|
|
|
|
'property' => 49 |
551
|
|
|
|
|
|
|
} |
552
|
|
|
|
|
|
|
}, |
553
|
|
|
|
|
|
|
{#State 70 |
554
|
|
|
|
|
|
|
ACTIONS => { |
555
|
|
|
|
|
|
|
'number' => 50, |
556
|
|
|
|
|
|
|
'string' => 53, |
557
|
|
|
|
|
|
|
"!" => 17, |
558
|
|
|
|
|
|
|
'identifier' => 3, |
559
|
|
|
|
|
|
|
"<" => 21, |
560
|
|
|
|
|
|
|
"=" => 20, |
561
|
|
|
|
|
|
|
">" => 29 |
562
|
|
|
|
|
|
|
}, |
563
|
|
|
|
|
|
|
GOTOS => { |
564
|
|
|
|
|
|
|
'value_list' => 84, |
565
|
|
|
|
|
|
|
'property' => 49, |
566
|
|
|
|
|
|
|
'operator' => 82, |
567
|
|
|
|
|
|
|
'value' => 81 |
568
|
|
|
|
|
|
|
} |
569
|
|
|
|
|
|
|
}, |
570
|
|
|
|
|
|
|
{#State 71 |
571
|
|
|
|
|
|
|
ACTIONS => { |
572
|
|
|
|
|
|
|
"<" => 21, |
573
|
|
|
|
|
|
|
">" => 29, |
574
|
|
|
|
|
|
|
"=" => 20, |
575
|
|
|
|
|
|
|
'string' => 53, |
576
|
|
|
|
|
|
|
'number' => 50, |
577
|
|
|
|
|
|
|
'identifier' => 3, |
578
|
|
|
|
|
|
|
"!" => 17 |
579
|
|
|
|
|
|
|
}, |
580
|
|
|
|
|
|
|
GOTOS => { |
581
|
|
|
|
|
|
|
'value' => 81, |
582
|
|
|
|
|
|
|
'value_list' => 85, |
583
|
|
|
|
|
|
|
'operator' => 82, |
584
|
|
|
|
|
|
|
'property' => 49 |
585
|
|
|
|
|
|
|
} |
586
|
|
|
|
|
|
|
}, |
587
|
|
|
|
|
|
|
{#State 72 |
588
|
|
|
|
|
|
|
ACTIONS => { |
589
|
|
|
|
|
|
|
'identifier' => 3 |
590
|
|
|
|
|
|
|
}, |
591
|
|
|
|
|
|
|
GOTOS => { |
592
|
|
|
|
|
|
|
'property' => 86 |
593
|
|
|
|
|
|
|
} |
594
|
|
|
|
|
|
|
}, |
595
|
|
|
|
|
|
|
{#State 73 |
596
|
|
|
|
|
|
|
ACTIONS => { |
597
|
|
|
|
|
|
|
'ALL' => 87, |
598
|
|
|
|
|
|
|
'identifier' => 3, |
599
|
|
|
|
|
|
|
"!" => 17, |
600
|
|
|
|
|
|
|
'string' => 53, |
601
|
|
|
|
|
|
|
">" => 29, |
602
|
|
|
|
|
|
|
'ANY' => 89, |
603
|
|
|
|
|
|
|
"=" => 20, |
604
|
|
|
|
|
|
|
"<" => 21, |
605
|
|
|
|
|
|
|
'number' => 50, |
606
|
|
|
|
|
|
|
'ONLY' => 88 |
607
|
|
|
|
|
|
|
}, |
608
|
|
|
|
|
|
|
GOTOS => { |
609
|
|
|
|
|
|
|
'value' => 91, |
610
|
|
|
|
|
|
|
'value_zip' => 90, |
611
|
|
|
|
|
|
|
'property' => 49, |
612
|
|
|
|
|
|
|
'operator' => 92 |
613
|
|
|
|
|
|
|
} |
614
|
|
|
|
|
|
|
}, |
615
|
|
|
|
|
|
|
{#State 74 |
616
|
|
|
|
|
|
|
DEFAULT => -21 |
617
|
|
|
|
|
|
|
}, |
618
|
|
|
|
|
|
|
{#State 75 |
619
|
|
|
|
|
|
|
DEFAULT => -19 |
620
|
|
|
|
|
|
|
}, |
621
|
|
|
|
|
|
|
{#State 76 |
622
|
|
|
|
|
|
|
ACTIONS => { |
623
|
|
|
|
|
|
|
")" => 47 |
624
|
|
|
|
|
|
|
}, |
625
|
|
|
|
|
|
|
GOTOS => { |
626
|
|
|
|
|
|
|
'closingbrace' => 93 |
627
|
|
|
|
|
|
|
} |
628
|
|
|
|
|
|
|
}, |
629
|
|
|
|
|
|
|
{#State 77 |
630
|
|
|
|
|
|
|
DEFAULT => -42 |
631
|
|
|
|
|
|
|
}, |
632
|
|
|
|
|
|
|
{#State 78 |
633
|
|
|
|
|
|
|
DEFAULT => -56 |
634
|
|
|
|
|
|
|
}, |
635
|
|
|
|
|
|
|
{#State 79 |
636
|
|
|
|
|
|
|
DEFAULT => -40 |
637
|
|
|
|
|
|
|
}, |
638
|
|
|
|
|
|
|
{#State 80 |
639
|
|
|
|
|
|
|
DEFAULT => -45 |
640
|
|
|
|
|
|
|
}, |
641
|
|
|
|
|
|
|
{#State 81 |
642
|
|
|
|
|
|
|
DEFAULT => -7 |
643
|
|
|
|
|
|
|
}, |
644
|
|
|
|
|
|
|
{#State 82 |
645
|
|
|
|
|
|
|
ACTIONS => { |
646
|
|
|
|
|
|
|
'identifier' => 3, |
647
|
|
|
|
|
|
|
'string' => 53, |
648
|
|
|
|
|
|
|
'number' => 50 |
649
|
|
|
|
|
|
|
}, |
650
|
|
|
|
|
|
|
GOTOS => { |
651
|
|
|
|
|
|
|
'property' => 49, |
652
|
|
|
|
|
|
|
'value' => 94 |
653
|
|
|
|
|
|
|
} |
654
|
|
|
|
|
|
|
}, |
655
|
|
|
|
|
|
|
{#State 83 |
656
|
|
|
|
|
|
|
ACTIONS => { |
657
|
|
|
|
|
|
|
"," => 95 |
658
|
|
|
|
|
|
|
}, |
659
|
|
|
|
|
|
|
DEFAULT => -47, |
660
|
|
|
|
|
|
|
GOTOS => { |
661
|
|
|
|
|
|
|
'comma' => 96 |
662
|
|
|
|
|
|
|
} |
663
|
|
|
|
|
|
|
}, |
664
|
|
|
|
|
|
|
{#State 84 |
665
|
|
|
|
|
|
|
ACTIONS => { |
666
|
|
|
|
|
|
|
"," => 95 |
667
|
|
|
|
|
|
|
}, |
668
|
|
|
|
|
|
|
DEFAULT => -48, |
669
|
|
|
|
|
|
|
GOTOS => { |
670
|
|
|
|
|
|
|
'comma' => 96 |
671
|
|
|
|
|
|
|
} |
672
|
|
|
|
|
|
|
}, |
673
|
|
|
|
|
|
|
{#State 85 |
674
|
|
|
|
|
|
|
ACTIONS => { |
675
|
|
|
|
|
|
|
"," => 95 |
676
|
|
|
|
|
|
|
}, |
677
|
|
|
|
|
|
|
DEFAULT => -46, |
678
|
|
|
|
|
|
|
GOTOS => { |
679
|
|
|
|
|
|
|
'comma' => 96 |
680
|
|
|
|
|
|
|
} |
681
|
|
|
|
|
|
|
}, |
682
|
|
|
|
|
|
|
{#State 86 |
683
|
|
|
|
|
|
|
ACTIONS => { |
684
|
|
|
|
|
|
|
"." => 37 |
685
|
|
|
|
|
|
|
}, |
686
|
|
|
|
|
|
|
DEFAULT => -54, |
687
|
|
|
|
|
|
|
GOTOS => { |
688
|
|
|
|
|
|
|
'dot' => 30 |
689
|
|
|
|
|
|
|
} |
690
|
|
|
|
|
|
|
}, |
691
|
|
|
|
|
|
|
{#State 87 |
692
|
|
|
|
|
|
|
ACTIONS => { |
693
|
|
|
|
|
|
|
'number' => 50, |
694
|
|
|
|
|
|
|
'string' => 53, |
695
|
|
|
|
|
|
|
"!" => 17, |
696
|
|
|
|
|
|
|
'identifier' => 3, |
697
|
|
|
|
|
|
|
"<" => 21, |
698
|
|
|
|
|
|
|
"=" => 20, |
699
|
|
|
|
|
|
|
">" => 29 |
700
|
|
|
|
|
|
|
}, |
701
|
|
|
|
|
|
|
GOTOS => { |
702
|
|
|
|
|
|
|
'value_zip' => 98, |
703
|
|
|
|
|
|
|
'value' => 91, |
704
|
|
|
|
|
|
|
'property' => 49, |
705
|
|
|
|
|
|
|
'operator' => 92, |
706
|
|
|
|
|
|
|
'value_zip_list' => 97 |
707
|
|
|
|
|
|
|
} |
708
|
|
|
|
|
|
|
}, |
709
|
|
|
|
|
|
|
{#State 88 |
710
|
|
|
|
|
|
|
ACTIONS => { |
711
|
|
|
|
|
|
|
'string' => 53, |
712
|
|
|
|
|
|
|
'number' => 50, |
713
|
|
|
|
|
|
|
'identifier' => 3, |
714
|
|
|
|
|
|
|
"!" => 17, |
715
|
|
|
|
|
|
|
"<" => 21, |
716
|
|
|
|
|
|
|
">" => 29, |
717
|
|
|
|
|
|
|
"=" => 20 |
718
|
|
|
|
|
|
|
}, |
719
|
|
|
|
|
|
|
GOTOS => { |
720
|
|
|
|
|
|
|
'value_zip' => 98, |
721
|
|
|
|
|
|
|
'value' => 91, |
722
|
|
|
|
|
|
|
'value_zip_list' => 99, |
723
|
|
|
|
|
|
|
'property' => 49, |
724
|
|
|
|
|
|
|
'operator' => 92 |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
}, |
727
|
|
|
|
|
|
|
{#State 89 |
728
|
|
|
|
|
|
|
ACTIONS => { |
729
|
|
|
|
|
|
|
'identifier' => 3, |
730
|
|
|
|
|
|
|
"!" => 17, |
731
|
|
|
|
|
|
|
'number' => 50, |
732
|
|
|
|
|
|
|
'string' => 53, |
733
|
|
|
|
|
|
|
"=" => 20, |
734
|
|
|
|
|
|
|
">" => 29, |
735
|
|
|
|
|
|
|
"<" => 21 |
736
|
|
|
|
|
|
|
}, |
737
|
|
|
|
|
|
|
GOTOS => { |
738
|
|
|
|
|
|
|
'value_zip_list' => 100, |
739
|
|
|
|
|
|
|
'operator' => 92, |
740
|
|
|
|
|
|
|
'property' => 49, |
741
|
|
|
|
|
|
|
'value_zip' => 98, |
742
|
|
|
|
|
|
|
'value' => 91 |
743
|
|
|
|
|
|
|
} |
744
|
|
|
|
|
|
|
}, |
745
|
|
|
|
|
|
|
{#State 90 |
746
|
|
|
|
|
|
|
ACTIONS => { |
747
|
|
|
|
|
|
|
":" => 39 |
748
|
|
|
|
|
|
|
}, |
749
|
|
|
|
|
|
|
DEFAULT => -49, |
750
|
|
|
|
|
|
|
GOTOS => { |
751
|
|
|
|
|
|
|
'colon' => 102, |
752
|
|
|
|
|
|
|
'value_zip_part' => 101 |
753
|
|
|
|
|
|
|
} |
754
|
|
|
|
|
|
|
}, |
755
|
|
|
|
|
|
|
{#State 91 |
756
|
|
|
|
|
|
|
ACTIONS => { |
757
|
|
|
|
|
|
|
":" => 39 |
758
|
|
|
|
|
|
|
}, |
759
|
|
|
|
|
|
|
GOTOS => { |
760
|
|
|
|
|
|
|
'colon' => 102, |
761
|
|
|
|
|
|
|
'value_zip_part' => 103 |
762
|
|
|
|
|
|
|
} |
763
|
|
|
|
|
|
|
}, |
764
|
|
|
|
|
|
|
{#State 92 |
765
|
|
|
|
|
|
|
ACTIONS => { |
766
|
|
|
|
|
|
|
'identifier' => 3, |
767
|
|
|
|
|
|
|
'number' => 50, |
768
|
|
|
|
|
|
|
'string' => 53 |
769
|
|
|
|
|
|
|
}, |
770
|
|
|
|
|
|
|
GOTOS => { |
771
|
|
|
|
|
|
|
'value' => 104, |
772
|
|
|
|
|
|
|
'property' => 49 |
773
|
|
|
|
|
|
|
} |
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
|
|
|
|
|
|
|
">" => 29, |
787
|
|
|
|
|
|
|
"=" => 20, |
788
|
|
|
|
|
|
|
"<" => 21, |
789
|
|
|
|
|
|
|
"!" => 17, |
790
|
|
|
|
|
|
|
'identifier' => 3, |
791
|
|
|
|
|
|
|
'string' => 53, |
792
|
|
|
|
|
|
|
'number' => 50 |
793
|
|
|
|
|
|
|
}, |
794
|
|
|
|
|
|
|
GOTOS => { |
795
|
|
|
|
|
|
|
'value' => 105, |
796
|
|
|
|
|
|
|
'operator' => 106, |
797
|
|
|
|
|
|
|
'property' => 49 |
798
|
|
|
|
|
|
|
} |
799
|
|
|
|
|
|
|
}, |
800
|
|
|
|
|
|
|
{#State 97 |
801
|
|
|
|
|
|
|
ACTIONS => { |
802
|
|
|
|
|
|
|
"," => 95 |
803
|
|
|
|
|
|
|
}, |
804
|
|
|
|
|
|
|
DEFAULT => -51, |
805
|
|
|
|
|
|
|
GOTOS => { |
806
|
|
|
|
|
|
|
'comma' => 107 |
807
|
|
|
|
|
|
|
} |
808
|
|
|
|
|
|
|
}, |
809
|
|
|
|
|
|
|
{#State 98 |
810
|
|
|
|
|
|
|
ACTIONS => { |
811
|
|
|
|
|
|
|
":" => 39 |
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 => -50, |
824
|
|
|
|
|
|
|
GOTOS => { |
825
|
|
|
|
|
|
|
'comma' => 107 |
826
|
|
|
|
|
|
|
} |
827
|
|
|
|
|
|
|
}, |
828
|
|
|
|
|
|
|
{#State 100 |
829
|
|
|
|
|
|
|
ACTIONS => { |
830
|
|
|
|
|
|
|
"," => 95 |
831
|
|
|
|
|
|
|
}, |
832
|
|
|
|
|
|
|
DEFAULT => -52, |
833
|
|
|
|
|
|
|
GOTOS => { |
834
|
|
|
|
|
|
|
'comma' => 107 |
835
|
|
|
|
|
|
|
} |
836
|
|
|
|
|
|
|
}, |
837
|
|
|
|
|
|
|
{#State 101 |
838
|
|
|
|
|
|
|
DEFAULT => -13 |
839
|
|
|
|
|
|
|
}, |
840
|
|
|
|
|
|
|
{#State 102 |
841
|
|
|
|
|
|
|
ACTIONS => { |
842
|
|
|
|
|
|
|
"=" => 20, |
843
|
|
|
|
|
|
|
">" => 29, |
844
|
|
|
|
|
|
|
"<" => 21, |
845
|
|
|
|
|
|
|
'identifier' => 3, |
846
|
|
|
|
|
|
|
"!" => 17, |
847
|
|
|
|
|
|
|
'number' => 50, |
848
|
|
|
|
|
|
|
'string' => 53 |
849
|
|
|
|
|
|
|
}, |
850
|
|
|
|
|
|
|
GOTOS => { |
851
|
|
|
|
|
|
|
'property' => 49, |
852
|
|
|
|
|
|
|
'operator' => 108, |
853
|
|
|
|
|
|
|
'value' => 109 |
854
|
|
|
|
|
|
|
} |
855
|
|
|
|
|
|
|
}, |
856
|
|
|
|
|
|
|
{#State 103 |
857
|
|
|
|
|
|
|
DEFAULT => -11 |
858
|
|
|
|
|
|
|
}, |
859
|
|
|
|
|
|
|
{#State 104 |
860
|
|
|
|
|
|
|
ACTIONS => { |
861
|
|
|
|
|
|
|
":" => 39 |
862
|
|
|
|
|
|
|
}, |
863
|
|
|
|
|
|
|
GOTOS => { |
864
|
|
|
|
|
|
|
'colon' => 102, |
865
|
|
|
|
|
|
|
'value_zip_part' => 110 |
866
|
|
|
|
|
|
|
} |
867
|
|
|
|
|
|
|
}, |
868
|
|
|
|
|
|
|
{#State 105 |
869
|
|
|
|
|
|
|
DEFAULT => -9 |
870
|
|
|
|
|
|
|
}, |
871
|
|
|
|
|
|
|
{#State 106 |
872
|
|
|
|
|
|
|
ACTIONS => { |
873
|
|
|
|
|
|
|
'number' => 50, |
874
|
|
|
|
|
|
|
'string' => 53, |
875
|
|
|
|
|
|
|
'identifier' => 3 |
876
|
|
|
|
|
|
|
}, |
877
|
|
|
|
|
|
|
GOTOS => { |
878
|
|
|
|
|
|
|
'property' => 49, |
879
|
|
|
|
|
|
|
'value' => 111 |
880
|
|
|
|
|
|
|
} |
881
|
|
|
|
|
|
|
}, |
882
|
|
|
|
|
|
|
{#State 107 |
883
|
|
|
|
|
|
|
ACTIONS => { |
884
|
|
|
|
|
|
|
'string' => 53, |
885
|
|
|
|
|
|
|
'number' => 50, |
886
|
|
|
|
|
|
|
"!" => 17, |
887
|
|
|
|
|
|
|
'identifier' => 3, |
888
|
|
|
|
|
|
|
"<" => 21, |
889
|
|
|
|
|
|
|
">" => 29, |
890
|
|
|
|
|
|
|
"=" => 20 |
891
|
|
|
|
|
|
|
}, |
892
|
|
|
|
|
|
|
GOTOS => { |
893
|
|
|
|
|
|
|
'value_zip' => 112, |
894
|
|
|
|
|
|
|
'value' => 91, |
895
|
|
|
|
|
|
|
'operator' => 92, |
896
|
|
|
|
|
|
|
'property' => 49 |
897
|
|
|
|
|
|
|
} |
898
|
|
|
|
|
|
|
}, |
899
|
|
|
|
|
|
|
{#State 108 |
900
|
|
|
|
|
|
|
ACTIONS => { |
901
|
|
|
|
|
|
|
'identifier' => 3, |
902
|
|
|
|
|
|
|
'number' => 50, |
903
|
|
|
|
|
|
|
'string' => 53 |
904
|
|
|
|
|
|
|
}, |
905
|
|
|
|
|
|
|
GOTOS => { |
906
|
|
|
|
|
|
|
'value' => 113, |
907
|
|
|
|
|
|
|
'property' => 49 |
908
|
|
|
|
|
|
|
} |
909
|
|
|
|
|
|
|
}, |
910
|
|
|
|
|
|
|
{#State 109 |
911
|
|
|
|
|
|
|
DEFAULT => -14 |
912
|
|
|
|
|
|
|
}, |
913
|
|
|
|
|
|
|
{#State 110 |
914
|
|
|
|
|
|
|
DEFAULT => -12 |
915
|
|
|
|
|
|
|
}, |
916
|
|
|
|
|
|
|
{#State 111 |
917
|
|
|
|
|
|
|
DEFAULT => -10 |
918
|
|
|
|
|
|
|
}, |
919
|
|
|
|
|
|
|
{#State 112 |
920
|
|
|
|
|
|
|
ACTIONS => { |
921
|
|
|
|
|
|
|
":" => 39 |
922
|
|
|
|
|
|
|
}, |
923
|
|
|
|
|
|
|
DEFAULT => -17, |
924
|
|
|
|
|
|
|
GOTOS => { |
925
|
|
|
|
|
|
|
'value_zip_part' => 101, |
926
|
|
|
|
|
|
|
'colon' => 102 |
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; |