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