1<?php 2 3/* 4 * Generated from D:/dokuwiki/lib/plugins/combo/grammar\PageSql.g4 by ANTLR 4.9.1 5 */ 6 7namespace ComboStrap\PageSqlParser { 8 use Antlr\Antlr4\Runtime\Atn\ATN; 9 use Antlr\Antlr4\Runtime\Atn\ATNDeserializer; 10 use Antlr\Antlr4\Runtime\Atn\ParserATNSimulator; 11 use Antlr\Antlr4\Runtime\Dfa\DFA; 12 use Antlr\Antlr4\Runtime\Error\Exceptions\FailedPredicateException; 13 use Antlr\Antlr4\Runtime\Error\Exceptions\NoViableAltException; 14 use Antlr\Antlr4\Runtime\PredictionContexts\PredictionContextCache; 15 use Antlr\Antlr4\Runtime\Error\Exceptions\RecognitionException; 16 use Antlr\Antlr4\Runtime\RuleContext; 17 use Antlr\Antlr4\Runtime\Token; 18 use Antlr\Antlr4\Runtime\TokenStream; 19 use Antlr\Antlr4\Runtime\Vocabulary; 20 use Antlr\Antlr4\Runtime\VocabularyImpl; 21 use Antlr\Antlr4\Runtime\RuntimeMetaData; 22 use Antlr\Antlr4\Runtime\Parser; 23 24 final class PageSqlParser extends Parser 25 { 26 public const SCOL = 1, DOT = 2, LPAREN = 3, RPAREN = 4, LSQUARE = 5, RSQUARE = 6, 27 LCURLY = 7, RCURLY = 8, COMMA = 9, BITWISEXOR = 10, DOLLAR = 11, 28 EQUAL = 12, STAR = 13, PLUS = 14, MINUS = 15, TILDE = 16, 29 PIPE2 = 17, DIV = 18, MOD = 19, LT2 = 20, GT2 = 21, AMP = 22, 30 PIPE = 23, QUESTION = 24, LESS_THAN = 25, LESS_THAN_OR_EQUAL = 26, 31 GREATER_THAN = 27, GREATER_THAN_OR_EQUAL = 28, EQ = 29, NOT_EQUAL = 30, 32 NOT_EQ2 = 31, AND = 32, AS = 33, ASC = 34, BETWEEN = 35, 33 BY = 36, DESC = 37, ESCAPE = 38, FALSE = 39, FROM = 40, GLOB = 41, 34 IN = 42, IS = 43, ISNULL = 44, LIKE = 45, LIMIT = 46, NOT = 47, 35 NOTNULL = 48, NOW = 49, NULL = 50, OR = 51, ORDER = 52, SELECT = 53, 36 TRUE = 54, WHERE = 55, RANDOM = 56, DATE = 57, DATETIME = 58, 37 PAGES = 59, BACKLINKS = 60, StringLiteral = 61, CharSetLiteral = 62, 38 IntegralLiteral = 63, Number = 64, NumberLiteral = 65, ByteLengthLiteral = 66, 39 SqlName = 67, SPACES = 68; 40 41 public const RULE_functionNames = 0, RULE_tableNames = 1, RULE_sqlNames = 2, 42 RULE_column = 3, RULE_pattern = 4, RULE_expression = 5, RULE_predicate = 6, 43 RULE_columns = 7, RULE_predicates = 8, RULE_tables = 9, RULE_limit = 10, 44 RULE_orderBys = 11, RULE_orderByDef = 12, RULE_pageSql = 13; 45 46 /** 47 * @var array<string> 48 */ 49 public const RULE_NAMES = [ 50 'functionNames', 'tableNames', 'sqlNames', 'column', 'pattern', 'expression', 51 'predicate', 'columns', 'predicates', 'tables', 'limit', 'orderBys', 52 'orderByDef', 'pageSql' 53 ]; 54 55 /** 56 * @var array<string|null> 57 */ 58 private const LITERAL_NAMES = [ 59 null, "';'", "'.'", "'('", "')'", "'['", "']'", "'{'", "'}'", "','", 60 "'^'", "'\$'", "'='", "'*'", "'+'", "'-'", "'~'", "'||'", "'/'", "'%'", 61 "'<<'", "'>>'", "'&'", "'|'", "'?'", "'<'", "'<='", "'>'", "'>='", 62 "'=='", "'!='", "'<>'" 63 ]; 64 65 /** 66 * @var array<string> 67 */ 68 private const SYMBOLIC_NAMES = [ 69 null, "SCOL", "DOT", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LCURLY", 70 "RCURLY", "COMMA", "BITWISEXOR", "DOLLAR", "EQUAL", "STAR", "PLUS", 71 "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", "GT2", "AMP", "PIPE", 72 "QUESTION", "LESS_THAN", "LESS_THAN_OR_EQUAL", "GREATER_THAN", "GREATER_THAN_OR_EQUAL", 73 "EQ", "NOT_EQUAL", "NOT_EQ2", "AND", "AS", "ASC", "BETWEEN", "BY", 74 "DESC", "ESCAPE", "FALSE", "FROM", "GLOB", "IN", "IS", "ISNULL", "LIKE", 75 "LIMIT", "NOT", "NOTNULL", "NOW", "NULL", "OR", "ORDER", "SELECT", 76 "TRUE", "WHERE", "RANDOM", "DATE", "DATETIME", "PAGES", "BACKLINKS", 77 "StringLiteral", "CharSetLiteral", "IntegralLiteral", "Number", "NumberLiteral", 78 "ByteLengthLiteral", "SqlName", "SPACES" 79 ]; 80 81 /** 82 * @var string 83 */ 84 private const SERIALIZED_ATN = 85 "\u{3}\u{608B}\u{A72A}\u{8133}\u{B9ED}\u{417C}\u{3BE7}\u{7786}\u{5964}" . 86 "\u{3}\u{46}\u{A7}\u{4}\u{2}\u{9}\u{2}\u{4}\u{3}\u{9}\u{3}\u{4}\u{4}" . 87 "\u{9}\u{4}\u{4}\u{5}\u{9}\u{5}\u{4}\u{6}\u{9}\u{6}\u{4}\u{7}\u{9}" . 88 "\u{7}\u{4}\u{8}\u{9}\u{8}\u{4}\u{9}\u{9}\u{9}\u{4}\u{A}\u{9}\u{A}" . 89 "\u{4}\u{B}\u{9}\u{B}\u{4}\u{C}\u{9}\u{C}\u{4}\u{D}\u{9}\u{D}\u{4}" . 90 "\u{E}\u{9}\u{E}\u{4}\u{F}\u{9}\u{F}\u{3}\u{2}\u{3}\u{2}\u{3}\u{3}" . 91 "\u{3}\u{3}\u{3}\u{4}\u{3}\u{4}\u{3}\u{5}\u{3}\u{5}\u{3}\u{5}\u{5}" . 92 "\u{5}\u{28}\u{A}\u{5}\u{3}\u{5}\u{3}\u{5}\u{3}\u{5}\u{5}\u{5}\u{2D}" . 93 "\u{A}\u{5}\u{5}\u{5}\u{2F}\u{A}\u{5}\u{3}\u{6}\u{3}\u{6}\u{3}\u{7}" . 94 "\u{3}\u{7}\u{3}\u{7}\u{3}\u{7}\u{5}\u{7}\u{37}\u{A}\u{7}\u{3}\u{7}" . 95 "\u{3}\u{7}\u{7}\u{7}\u{3B}\u{A}\u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}\u{2}\u{2}\u{2}\u{9B}\u{9C}\u{3}\u{2}\u{2}\u{2}" . 197 "\u{9C}\u{9E}\u{3}\u{2}\u{2}\u{2}\u{9D}\u{9F}\u{5}\u{12}\u{A}\u{2}" . 198 "\u{9E}\u{9D}\u{3}\u{2}\u{2}\u{2}\u{9E}\u{9F}\u{3}\u{2}\u{2}\u{2}\u{9F}" . 199 "\u{A1}\u{3}\u{2}\u{2}\u{2}\u{A0}\u{A2}\u{5}\u{18}\u{D}\u{2}\u{A1}" . 200 "\u{A0}\u{3}\u{2}\u{2}\u{2}\u{A1}\u{A2}\u{3}\u{2}\u{2}\u{2}\u{A2}\u{A4}" . 201 "\u{3}\u{2}\u{2}\u{2}\u{A3}\u{A5}\u{5}\u{16}\u{C}\u{2}\u{A4}\u{A3}" . 202 "\u{3}\u{2}\u{2}\u{2}\u{A4}\u{A5}\u{3}\u{2}\u{2}\u{2}\u{A5}\u{1D}\u{3}" . 203 "\u{2}\u{2}\u{2}\u{1A}\u{27}\u{2C}\u{2E}\u{36}\u{3C}\u{41}\u{47}\u{4D}" . 204 "\u{51}\u{54}\u{5C}\u{65}\u{68}\u{6B}\u{72}\u{7B}\u{8B}\u{90}\u{94}" . 205 "\u{98}\u{9B}\u{9E}\u{A1}\u{A4}"; 206 207 protected static $atn; 208 protected static $decisionToDFA; 209 protected static $sharedContextCache; 210 211 public function __construct(TokenStream $input) 212 { 213 parent::__construct($input); 214 215 self::initialize(); 216 217 $this->interp = new ParserATNSimulator($this, self::$atn, self::$decisionToDFA, self::$sharedContextCache); 218 } 219 220 private static function initialize() : void 221 { 222 if (self::$atn !== null) { 223 return; 224 } 225 226 RuntimeMetaData::checkVersion('4.9.1', RuntimeMetaData::VERSION); 227 228 $atn = (new ATNDeserializer())->deserialize(self::SERIALIZED_ATN); 229 230 $decisionToDFA = []; 231 for ($i = 0, $count = $atn->getNumberOfDecisions(); $i < $count; $i++) { 232 $decisionToDFA[] = new DFA($atn->getDecisionState($i), $i); 233 } 234 235 self::$atn = $atn; 236 self::$decisionToDFA = $decisionToDFA; 237 self::$sharedContextCache = new PredictionContextCache(); 238 } 239 240 public function getGrammarFileName() : string 241 { 242 return "PageSql.g4"; 243 } 244 245 public function getRuleNames() : array 246 { 247 return self::RULE_NAMES; 248 } 249 250 public function getSerializedATN() : string 251 { 252 return self::SERIALIZED_ATN; 253 } 254 255 public function getATN() : ATN 256 { 257 return self::$atn; 258 } 259 260 public function getVocabulary() : Vocabulary 261 { 262 static $vocabulary; 263 264 return $vocabulary = $vocabulary ?? new VocabularyImpl(self::LITERAL_NAMES, self::SYMBOLIC_NAMES); 265 } 266 267 /** 268 * @throws RecognitionException 269 */ 270 public function functionNames() : Context\FunctionNamesContext 271 { 272 $localContext = new Context\FunctionNamesContext($this->ctx, $this->getState()); 273 274 $this->enterRule($localContext, 0, self::RULE_functionNames); 275 276 try { 277 $this->enterOuterAlt($localContext, 1); 278 $this->setState(28); 279 280 $_la = $this->input->LA(1); 281 282 if (!($_la === self::DATE || $_la === self::DATETIME)) { 283 $this->errorHandler->recoverInline($this); 284 } else { 285 if ($this->input->LA(1) === Token::EOF) { 286 $this->matchedEOF = true; 287 } 288 289 $this->errorHandler->reportMatch($this); 290 $this->consume(); 291 } 292 } catch (RecognitionException $exception) { 293 $localContext->exception = $exception; 294 $this->errorHandler->reportError($this, $exception); 295 $this->errorHandler->recover($this, $exception); 296 } finally { 297 $this->exitRule(); 298 } 299 300 return $localContext; 301 } 302 303 /** 304 * @throws RecognitionException 305 */ 306 public function tableNames() : Context\TableNamesContext 307 { 308 $localContext = new Context\TableNamesContext($this->ctx, $this->getState()); 309 310 $this->enterRule($localContext, 2, self::RULE_tableNames); 311 312 try { 313 $this->enterOuterAlt($localContext, 1); 314 $this->setState(30); 315 316 $_la = $this->input->LA(1); 317 318 if (!($_la === self::PAGES || $_la === self::BACKLINKS)) { 319 $this->errorHandler->recoverInline($this); 320 } else { 321 if ($this->input->LA(1) === Token::EOF) { 322 $this->matchedEOF = true; 323 } 324 325 $this->errorHandler->reportMatch($this); 326 $this->consume(); 327 } 328 } catch (RecognitionException $exception) { 329 $localContext->exception = $exception; 330 $this->errorHandler->reportError($this, $exception); 331 $this->errorHandler->recover($this, $exception); 332 } finally { 333 $this->exitRule(); 334 } 335 336 return $localContext; 337 } 338 339 /** 340 * @throws RecognitionException 341 */ 342 public function sqlNames() : Context\SqlNamesContext 343 { 344 $localContext = new Context\SqlNamesContext($this->ctx, $this->getState()); 345 346 $this->enterRule($localContext, 4, self::RULE_sqlNames); 347 348 try { 349 $this->enterOuterAlt($localContext, 1); 350 $this->setState(32); 351 352 $_la = $this->input->LA(1); 353 354 if (!($_la === self::Number || $_la === self::SqlName)) { 355 $this->errorHandler->recoverInline($this); 356 } else { 357 if ($this->input->LA(1) === Token::EOF) { 358 $this->matchedEOF = true; 359 } 360 361 $this->errorHandler->reportMatch($this); 362 $this->consume(); 363 } 364 } catch (RecognitionException $exception) { 365 $localContext->exception = $exception; 366 $this->errorHandler->reportError($this, $exception); 367 $this->errorHandler->recover($this, $exception); 368 } finally { 369 $this->exitRule(); 370 } 371 372 return $localContext; 373 } 374 375 /** 376 * @throws RecognitionException 377 */ 378 public function column() : Context\ColumnContext 379 { 380 $localContext = new Context\ColumnContext($this->ctx, $this->getState()); 381 382 $this->enterRule($localContext, 6, self::RULE_column); 383 384 try { 385 $this->enterOuterAlt($localContext, 1); 386 $this->setState(34); 387 $this->sqlNames(); 388 $this->setState(37); 389 $this->errorHandler->sync($this); 390 $_la = $this->input->LA(1); 391 392 if ($_la === self::DOT) { 393 $this->setState(35); 394 $this->match(self::DOT); 395 $this->setState(36); 396 $this->sqlNames(); 397 } 398 $this->setState(44); 399 $this->errorHandler->sync($this); 400 $_la = $this->input->LA(1); 401 402 if ($_la === self::AS) { 403 $this->setState(39); 404 $this->match(self::AS); 405 $this->setState(42); 406 $this->errorHandler->sync($this); 407 408 switch ($this->input->LA(1)) { 409 case self::Number: 410 case self::SqlName: 411 $this->setState(40); 412 $this->sqlNames(); 413 break; 414 415 case self::StringLiteral: 416 $this->setState(41); 417 $this->match(self::StringLiteral); 418 break; 419 420 default: 421 throw new NoViableAltException($this); 422 } 423 } 424 } catch (RecognitionException $exception) { 425 $localContext->exception = $exception; 426 $this->errorHandler->reportError($this, $exception); 427 $this->errorHandler->recover($this, $exception); 428 } finally { 429 $this->exitRule(); 430 } 431 432 return $localContext; 433 } 434 435 /** 436 * @throws RecognitionException 437 */ 438 public function pattern() : Context\PatternContext 439 { 440 $localContext = new Context\PatternContext($this->ctx, $this->getState()); 441 442 $this->enterRule($localContext, 8, self::RULE_pattern); 443 444 try { 445 $this->enterOuterAlt($localContext, 1); 446 $this->setState(46); 447 448 $_la = $this->input->LA(1); 449 450 if (!($_la === self::StringLiteral || $_la === self::NumberLiteral)) { 451 $this->errorHandler->recoverInline($this); 452 } else { 453 if ($this->input->LA(1) === Token::EOF) { 454 $this->matchedEOF = true; 455 } 456 457 $this->errorHandler->reportMatch($this); 458 $this->consume(); 459 } 460 } catch (RecognitionException $exception) { 461 $localContext->exception = $exception; 462 $this->errorHandler->reportError($this, $exception); 463 $this->errorHandler->recover($this, $exception); 464 } finally { 465 $this->exitRule(); 466 } 467 468 return $localContext; 469 } 470 471 /** 472 * @throws RecognitionException 473 */ 474 public function expression() : Context\ExpressionContext 475 { 476 $localContext = new Context\ExpressionContext($this->ctx, $this->getState()); 477 478 $this->enterRule($localContext, 10, self::RULE_expression); 479 480 try { 481 $this->setState(63); 482 $this->errorHandler->sync($this); 483 484 switch ($this->input->LA(1)) { 485 case self::StringLiteral: 486 case self::Number: 487 case self::NumberLiteral: 488 case self::SqlName: 489 $this->enterOuterAlt($localContext, 1); 490 $this->setState(48); 491 492 $_la = $this->input->LA(1); 493 494 if (!((((($_la - 61)) & ~0x3f) === 0 && ((1 << ($_la - 61)) & ((1 << (self::StringLiteral - 61)) | (1 << (self::Number - 61)) | (1 << (self::NumberLiteral - 61)) | (1 << (self::SqlName - 61)))) !== 0))) { 495 $this->errorHandler->recoverInline($this); 496 } else { 497 if ($this->input->LA(1) === Token::EOF) { 498 $this->matchedEOF = true; 499 } 500 501 $this->errorHandler->reportMatch($this); 502 $this->consume(); 503 } 504 break; 505 506 case self::DATE: 507 case self::DATETIME: 508 $this->enterOuterAlt($localContext, 2); 509 $this->setState(49); 510 $this->functionNames(); 511 $this->setState(50); 512 $this->match(self::LPAREN); 513 $this->setState(52); 514 $this->errorHandler->sync($this); 515 $_la = $this->input->LA(1); 516 517 if ((((($_la - 57)) & ~0x3f) === 0 && ((1 << ($_la - 57)) & ((1 << (self::DATE - 57)) | (1 << (self::DATETIME - 57)) | (1 << (self::StringLiteral - 57)) | (1 << (self::Number - 57)) | (1 << (self::NumberLiteral - 57)) | (1 << (self::SqlName - 57)))) !== 0)) { 518 $this->setState(51); 519 $this->expression(); 520 } 521 $this->setState(58); 522 $this->errorHandler->sync($this); 523 524 $_la = $this->input->LA(1); 525 while ($_la === self::COMMA) { 526 $this->setState(54); 527 $this->match(self::COMMA); 528 $this->setState(55); 529 $this->expression(); 530 $this->setState(60); 531 $this->errorHandler->sync($this); 532 $_la = $this->input->LA(1); 533 } 534 $this->setState(61); 535 $this->match(self::RPAREN); 536 break; 537 538 default: 539 throw new NoViableAltException($this); 540 } 541 } catch (RecognitionException $exception) { 542 $localContext->exception = $exception; 543 $this->errorHandler->reportError($this, $exception); 544 $this->errorHandler->recover($this, $exception); 545 } finally { 546 $this->exitRule(); 547 } 548 549 return $localContext; 550 } 551 552 /** 553 * @throws RecognitionException 554 */ 555 public function predicate() : Context\PredicateContext 556 { 557 $localContext = new Context\PredicateContext($this->ctx, $this->getState()); 558 559 $this->enterRule($localContext, 12, self::RULE_predicate); 560 561 try { 562 $this->enterOuterAlt($localContext, 1); 563 $this->setState(65); 564 $this->sqlNames(); 565 $this->setState(105); 566 $this->errorHandler->sync($this); 567 568 switch ($this->getInterpreter()->adaptivePredict($this->input, 13, $this->ctx)) { 569 case 1: 570 $this->setState(66); 571 572 $_la = $this->input->LA(1); 573 574 if (!(((($_la) & ~0x3f) === 0 && ((1 << $_la) & ((1 << self::EQUAL) | (1 << self::LESS_THAN) | (1 << self::LESS_THAN_OR_EQUAL) | (1 << self::GREATER_THAN) | (1 << self::GREATER_THAN_OR_EQUAL) | (1 << self::NOT_EQUAL))) !== 0))) { 575 $this->errorHandler->recoverInline($this); 576 } else { 577 if ($this->input->LA(1) === Token::EOF) { 578 $this->matchedEOF = true; 579 } 580 581 $this->errorHandler->reportMatch($this); 582 $this->consume(); 583 } 584 $this->setState(67); 585 $this->expression(); 586 break; 587 588 case 2: 589 $this->setState(79); 590 $this->errorHandler->sync($this); 591 592 switch ($this->input->LA(1)) { 593 case self::LIKE: 594 case self::NOT: 595 $this->setState(69); 596 $this->errorHandler->sync($this); 597 $_la = $this->input->LA(1); 598 599 if ($_la === self::NOT) { 600 $this->setState(68); 601 $this->match(self::NOT); 602 } 603 604 $this->setState(71); 605 $this->match(self::LIKE); 606 $this->setState(72); 607 $this->pattern(); 608 $this->setState(75); 609 $this->errorHandler->sync($this); 610 $_la = $this->input->LA(1); 611 612 if ($_la === self::ESCAPE) { 613 $this->setState(73); 614 $this->match(self::ESCAPE); 615 $this->setState(74); 616 $this->match(self::StringLiteral); 617 } 618 break; 619 620 case self::GLOB: 621 $this->setState(77); 622 $this->match(self::GLOB); 623 $this->setState(78); 624 $this->pattern(); 625 break; 626 627 default: 628 throw new NoViableAltException($this); 629 } 630 break; 631 632 case 3: 633 $this->setState(82); 634 $this->errorHandler->sync($this); 635 $_la = $this->input->LA(1); 636 637 if ($_la === self::NOT) { 638 $this->setState(81); 639 $this->match(self::NOT); 640 } 641 $this->setState(84); 642 $this->match(self::BETWEEN); 643 $this->setState(85); 644 $this->expression(); 645 $this->setState(86); 646 $this->match(self::AND); 647 $this->setState(87); 648 $this->expression(); 649 break; 650 651 case 4: 652 $this->setState(90); 653 $this->errorHandler->sync($this); 654 $_la = $this->input->LA(1); 655 656 if ($_la === self::NOT) { 657 $this->setState(89); 658 $this->match(self::NOT); 659 } 660 $this->setState(92); 661 $this->match(self::IN); 662 $this->setState(93); 663 $this->match(self::LPAREN); 664 $this->setState(102); 665 $this->errorHandler->sync($this); 666 $_la = $this->input->LA(1); 667 668 if ((((($_la - 57)) & ~0x3f) === 0 && ((1 << ($_la - 57)) & ((1 << (self::DATE - 57)) | (1 << (self::DATETIME - 57)) | (1 << (self::StringLiteral - 57)) | (1 << (self::Number - 57)) | (1 << (self::NumberLiteral - 57)) | (1 << (self::SqlName - 57)))) !== 0)) { 669 $this->setState(94); 670 $this->expression(); 671 $this->setState(99); 672 $this->errorHandler->sync($this); 673 674 $_la = $this->input->LA(1); 675 while ($_la === self::COMMA) { 676 $this->setState(95); 677 $this->match(self::COMMA); 678 $this->setState(96); 679 $this->expression(); 680 $this->setState(101); 681 $this->errorHandler->sync($this); 682 $_la = $this->input->LA(1); 683 } 684 } 685 $this->setState(104); 686 $this->match(self::RPAREN); 687 break; 688 } 689 } catch (RecognitionException $exception) { 690 $localContext->exception = $exception; 691 $this->errorHandler->reportError($this, $exception); 692 $this->errorHandler->recover($this, $exception); 693 } finally { 694 $this->exitRule(); 695 } 696 697 return $localContext; 698 } 699 700 /** 701 * @throws RecognitionException 702 */ 703 public function columns() : Context\ColumnsContext 704 { 705 $localContext = new Context\ColumnsContext($this->ctx, $this->getState()); 706 707 $this->enterRule($localContext, 14, self::RULE_columns); 708 709 try { 710 $this->enterOuterAlt($localContext, 1); 711 $this->setState(107); 712 $this->column(); 713 $this->setState(112); 714 $this->errorHandler->sync($this); 715 716 $_la = $this->input->LA(1); 717 while ($_la === self::COMMA) { 718 $this->setState(108); 719 $this->match(self::COMMA); 720 $this->setState(109); 721 $this->column(); 722 $this->setState(114); 723 $this->errorHandler->sync($this); 724 $_la = $this->input->LA(1); 725 } 726 } catch (RecognitionException $exception) { 727 $localContext->exception = $exception; 728 $this->errorHandler->reportError($this, $exception); 729 $this->errorHandler->recover($this, $exception); 730 } finally { 731 $this->exitRule(); 732 } 733 734 return $localContext; 735 } 736 737 /** 738 * @throws RecognitionException 739 */ 740 public function predicates() : Context\PredicatesContext 741 { 742 $localContext = new Context\PredicatesContext($this->ctx, $this->getState()); 743 744 $this->enterRule($localContext, 16, self::RULE_predicates); 745 746 try { 747 $this->enterOuterAlt($localContext, 1); 748 $this->setState(115); 749 $this->match(self::WHERE); 750 $this->setState(116); 751 $this->predicate(); 752 $this->setState(121); 753 $this->errorHandler->sync($this); 754 755 $_la = $this->input->LA(1); 756 while ($_la === self::AND || $_la === self::OR) { 757 $this->setState(117); 758 759 $_la = $this->input->LA(1); 760 761 if (!($_la === self::AND || $_la === self::OR)) { 762 $this->errorHandler->recoverInline($this); 763 } else { 764 if ($this->input->LA(1) === Token::EOF) { 765 $this->matchedEOF = true; 766 } 767 768 $this->errorHandler->reportMatch($this); 769 $this->consume(); 770 } 771 $this->setState(118); 772 $this->predicate(); 773 $this->setState(123); 774 $this->errorHandler->sync($this); 775 $_la = $this->input->LA(1); 776 } 777 } catch (RecognitionException $exception) { 778 $localContext->exception = $exception; 779 $this->errorHandler->reportError($this, $exception); 780 $this->errorHandler->recover($this, $exception); 781 } finally { 782 $this->exitRule(); 783 } 784 785 return $localContext; 786 } 787 788 /** 789 * @throws RecognitionException 790 */ 791 public function tables() : Context\TablesContext 792 { 793 $localContext = new Context\TablesContext($this->ctx, $this->getState()); 794 795 $this->enterRule($localContext, 18, self::RULE_tables); 796 797 try { 798 $this->enterOuterAlt($localContext, 1); 799 $this->setState(124); 800 $this->match(self::FROM); 801 $this->setState(125); 802 $this->tableNames(); 803 } catch (RecognitionException $exception) { 804 $localContext->exception = $exception; 805 $this->errorHandler->reportError($this, $exception); 806 $this->errorHandler->recover($this, $exception); 807 } finally { 808 $this->exitRule(); 809 } 810 811 return $localContext; 812 } 813 814 /** 815 * @throws RecognitionException 816 */ 817 public function limit() : Context\LimitContext 818 { 819 $localContext = new Context\LimitContext($this->ctx, $this->getState()); 820 821 $this->enterRule($localContext, 20, self::RULE_limit); 822 823 try { 824 $this->enterOuterAlt($localContext, 1); 825 $this->setState(127); 826 $this->match(self::LIMIT); 827 $this->setState(128); 828 $this->match(self::Number); 829 } catch (RecognitionException $exception) { 830 $localContext->exception = $exception; 831 $this->errorHandler->reportError($this, $exception); 832 $this->errorHandler->recover($this, $exception); 833 } finally { 834 $this->exitRule(); 835 } 836 837 return $localContext; 838 } 839 840 /** 841 * @throws RecognitionException 842 */ 843 public function orderBys() : Context\OrderBysContext 844 { 845 $localContext = new Context\OrderBysContext($this->ctx, $this->getState()); 846 847 $this->enterRule($localContext, 22, self::RULE_orderBys); 848 849 try { 850 $this->enterOuterAlt($localContext, 1); 851 $this->setState(130); 852 $this->match(self::ORDER); 853 $this->setState(131); 854 $this->match(self::BY); 855 $this->setState(132); 856 $this->orderByDef(); 857 $this->setState(137); 858 $this->errorHandler->sync($this); 859 860 $_la = $this->input->LA(1); 861 while ($_la === self::COMMA) { 862 $this->setState(133); 863 $this->match(self::COMMA); 864 $this->setState(134); 865 $this->orderByDef(); 866 $this->setState(139); 867 $this->errorHandler->sync($this); 868 $_la = $this->input->LA(1); 869 } 870 } catch (RecognitionException $exception) { 871 $localContext->exception = $exception; 872 $this->errorHandler->reportError($this, $exception); 873 $this->errorHandler->recover($this, $exception); 874 } finally { 875 $this->exitRule(); 876 } 877 878 return $localContext; 879 } 880 881 /** 882 * @throws RecognitionException 883 */ 884 public function orderByDef() : Context\OrderByDefContext 885 { 886 $localContext = new Context\OrderByDefContext($this->ctx, $this->getState()); 887 888 $this->enterRule($localContext, 24, self::RULE_orderByDef); 889 890 try { 891 $this->enterOuterAlt($localContext, 1); 892 $this->setState(140); 893 $this->match(self::SqlName); 894 $this->setState(142); 895 $this->errorHandler->sync($this); 896 $_la = $this->input->LA(1); 897 898 if ($_la === self::ASC || $_la === self::DESC) { 899 $this->setState(141); 900 901 $_la = $this->input->LA(1); 902 903 if (!($_la === self::ASC || $_la === self::DESC)) { 904 $this->errorHandler->recoverInline($this); 905 } else { 906 if ($this->input->LA(1) === Token::EOF) { 907 $this->matchedEOF = true; 908 } 909 910 $this->errorHandler->reportMatch($this); 911 $this->consume(); 912 } 913 } 914 } catch (RecognitionException $exception) { 915 $localContext->exception = $exception; 916 $this->errorHandler->reportError($this, $exception); 917 $this->errorHandler->recover($this, $exception); 918 } finally { 919 $this->exitRule(); 920 } 921 922 return $localContext; 923 } 924 925 /** 926 * @throws RecognitionException 927 */ 928 public function pageSql() : Context\PageSqlContext 929 { 930 $localContext = new Context\PageSqlContext($this->ctx, $this->getState()); 931 932 $this->enterRule($localContext, 26, self::RULE_pageSql); 933 934 try { 935 $this->enterOuterAlt($localContext, 1); 936 $this->setState(144); 937 $this->match(self::SELECT); 938 $this->setState(146); 939 $this->errorHandler->sync($this); 940 $_la = $this->input->LA(1); 941 942 if ($_la === self::RANDOM) { 943 $this->setState(145); 944 $this->match(self::RANDOM); 945 } 946 $this->setState(150); 947 $this->errorHandler->sync($this); 948 949 switch ($this->input->LA(1)) { 950 case self::STAR: 951 $this->setState(148); 952 $this->match(self::STAR); 953 break; 954 955 case self::Number: 956 case self::SqlName: 957 $this->setState(149); 958 $this->columns(); 959 break; 960 961 case self::EOF: 962 case self::FROM: 963 case self::LIMIT: 964 case self::ORDER: 965 case self::WHERE: 966 break; 967 968 default: 969 break; 970 } 971 $this->setState(153); 972 $this->errorHandler->sync($this); 973 $_la = $this->input->LA(1); 974 975 if ($_la === self::FROM) { 976 $this->setState(152); 977 $this->tables(); 978 } 979 $this->setState(156); 980 $this->errorHandler->sync($this); 981 $_la = $this->input->LA(1); 982 983 if ($_la === self::WHERE) { 984 $this->setState(155); 985 $this->predicates(); 986 } 987 $this->setState(159); 988 $this->errorHandler->sync($this); 989 $_la = $this->input->LA(1); 990 991 if ($_la === self::ORDER) { 992 $this->setState(158); 993 $this->orderBys(); 994 } 995 $this->setState(162); 996 $this->errorHandler->sync($this); 997 $_la = $this->input->LA(1); 998 999 if ($_la === self::LIMIT) { 1000 $this->setState(161); 1001 $this->limit(); 1002 } 1003 } catch (RecognitionException $exception) { 1004 $localContext->exception = $exception; 1005 $this->errorHandler->reportError($this, $exception); 1006 $this->errorHandler->recover($this, $exception); 1007 } finally { 1008 $this->exitRule(); 1009 } 1010 1011 return $localContext; 1012 } 1013 } 1014} 1015 1016namespace ComboStrap\PageSqlParser\Context { 1017 use Antlr\Antlr4\Runtime\ParserRuleContext; 1018 use Antlr\Antlr4\Runtime\Token; 1019 use Antlr\Antlr4\Runtime\Tree\ParseTreeVisitor; 1020 use Antlr\Antlr4\Runtime\Tree\TerminalNode; 1021 use Antlr\Antlr4\Runtime\Tree\ParseTreeListener; 1022 use ComboStrap\PageSqlParser\PageSqlParser; 1023 use ComboStrap\PageSqlParser\PageSqlVisitor; 1024 use ComboStrap\PageSqlParser\PageSqlListener; 1025 1026 class FunctionNamesContext extends ParserRuleContext 1027 { 1028 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1029 { 1030 parent::__construct($parent, $invokingState); 1031 } 1032 1033 public function getRuleIndex() : int 1034 { 1035 return PageSqlParser::RULE_functionNames; 1036 } 1037 1038 public function DATE() : ?TerminalNode 1039 { 1040 return $this->getToken(PageSqlParser::DATE, 0); 1041 } 1042 1043 public function DATETIME() : ?TerminalNode 1044 { 1045 return $this->getToken(PageSqlParser::DATETIME, 0); 1046 } 1047 1048 public function enterRule(ParseTreeListener $listener) : void 1049 { 1050 if ($listener instanceof PageSqlListener) { 1051 $listener->enterFunctionNames($this); 1052 } 1053 } 1054 1055 public function exitRule(ParseTreeListener $listener) : void 1056 { 1057 if ($listener instanceof PageSqlListener) { 1058 $listener->exitFunctionNames($this); 1059 } 1060 } 1061 1062 public function accept(ParseTreeVisitor $visitor) 1063 { 1064 if ($visitor instanceof PageSqlVisitor) { 1065 return $visitor->visitFunctionNames($this); 1066 } 1067 1068 return $visitor->visitChildren($this); 1069 } 1070 } 1071 1072 class TableNamesContext extends ParserRuleContext 1073 { 1074 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1075 { 1076 parent::__construct($parent, $invokingState); 1077 } 1078 1079 public function getRuleIndex() : int 1080 { 1081 return PageSqlParser::RULE_tableNames; 1082 } 1083 1084 public function PAGES() : ?TerminalNode 1085 { 1086 return $this->getToken(PageSqlParser::PAGES, 0); 1087 } 1088 1089 public function BACKLINKS() : ?TerminalNode 1090 { 1091 return $this->getToken(PageSqlParser::BACKLINKS, 0); 1092 } 1093 1094 public function enterRule(ParseTreeListener $listener) : void 1095 { 1096 if ($listener instanceof PageSqlListener) { 1097 $listener->enterTableNames($this); 1098 } 1099 } 1100 1101 public function exitRule(ParseTreeListener $listener) : void 1102 { 1103 if ($listener instanceof PageSqlListener) { 1104 $listener->exitTableNames($this); 1105 } 1106 } 1107 1108 public function accept(ParseTreeVisitor $visitor) 1109 { 1110 if ($visitor instanceof PageSqlVisitor) { 1111 return $visitor->visitTableNames($this); 1112 } 1113 1114 return $visitor->visitChildren($this); 1115 } 1116 } 1117 1118 class SqlNamesContext extends ParserRuleContext 1119 { 1120 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1121 { 1122 parent::__construct($parent, $invokingState); 1123 } 1124 1125 public function getRuleIndex() : int 1126 { 1127 return PageSqlParser::RULE_sqlNames; 1128 } 1129 1130 public function SqlName() : ?TerminalNode 1131 { 1132 return $this->getToken(PageSqlParser::SqlName, 0); 1133 } 1134 1135 public function Number() : ?TerminalNode 1136 { 1137 return $this->getToken(PageSqlParser::Number, 0); 1138 } 1139 1140 public function enterRule(ParseTreeListener $listener) : void 1141 { 1142 if ($listener instanceof PageSqlListener) { 1143 $listener->enterSqlNames($this); 1144 } 1145 } 1146 1147 public function exitRule(ParseTreeListener $listener) : void 1148 { 1149 if ($listener instanceof PageSqlListener) { 1150 $listener->exitSqlNames($this); 1151 } 1152 } 1153 1154 public function accept(ParseTreeVisitor $visitor) 1155 { 1156 if ($visitor instanceof PageSqlVisitor) { 1157 return $visitor->visitSqlNames($this); 1158 } 1159 1160 return $visitor->visitChildren($this); 1161 } 1162 } 1163 1164 class ColumnContext extends ParserRuleContext 1165 { 1166 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1167 { 1168 parent::__construct($parent, $invokingState); 1169 } 1170 1171 public function getRuleIndex() : int 1172 { 1173 return PageSqlParser::RULE_column; 1174 } 1175 1176 /** 1177 * @return array<SqlNamesContext>|SqlNamesContext|null 1178 */ 1179 public function sqlNames(?int $index = null) 1180 { 1181 if ($index === null) { 1182 return $this->getTypedRuleContexts(SqlNamesContext::class); 1183 } 1184 1185 return $this->getTypedRuleContext(SqlNamesContext::class, $index); 1186 } 1187 1188 public function DOT() : ?TerminalNode 1189 { 1190 return $this->getToken(PageSqlParser::DOT, 0); 1191 } 1192 1193 public function AS() : ?TerminalNode 1194 { 1195 return $this->getToken(PageSqlParser::AS, 0); 1196 } 1197 1198 public function StringLiteral() : ?TerminalNode 1199 { 1200 return $this->getToken(PageSqlParser::StringLiteral, 0); 1201 } 1202 1203 public function enterRule(ParseTreeListener $listener) : void 1204 { 1205 if ($listener instanceof PageSqlListener) { 1206 $listener->enterColumn($this); 1207 } 1208 } 1209 1210 public function exitRule(ParseTreeListener $listener) : void 1211 { 1212 if ($listener instanceof PageSqlListener) { 1213 $listener->exitColumn($this); 1214 } 1215 } 1216 1217 public function accept(ParseTreeVisitor $visitor) 1218 { 1219 if ($visitor instanceof PageSqlVisitor) { 1220 return $visitor->visitColumn($this); 1221 } 1222 1223 return $visitor->visitChildren($this); 1224 } 1225 } 1226 1227 class PatternContext extends ParserRuleContext 1228 { 1229 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1230 { 1231 parent::__construct($parent, $invokingState); 1232 } 1233 1234 public function getRuleIndex() : int 1235 { 1236 return PageSqlParser::RULE_pattern; 1237 } 1238 1239 public function StringLiteral() : ?TerminalNode 1240 { 1241 return $this->getToken(PageSqlParser::StringLiteral, 0); 1242 } 1243 1244 public function NumberLiteral() : ?TerminalNode 1245 { 1246 return $this->getToken(PageSqlParser::NumberLiteral, 0); 1247 } 1248 1249 public function enterRule(ParseTreeListener $listener) : void 1250 { 1251 if ($listener instanceof PageSqlListener) { 1252 $listener->enterPattern($this); 1253 } 1254 } 1255 1256 public function exitRule(ParseTreeListener $listener) : void 1257 { 1258 if ($listener instanceof PageSqlListener) { 1259 $listener->exitPattern($this); 1260 } 1261 } 1262 1263 public function accept(ParseTreeVisitor $visitor) 1264 { 1265 if ($visitor instanceof PageSqlVisitor) { 1266 return $visitor->visitPattern($this); 1267 } 1268 1269 return $visitor->visitChildren($this); 1270 } 1271 } 1272 1273 class ExpressionContext extends ParserRuleContext 1274 { 1275 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1276 { 1277 parent::__construct($parent, $invokingState); 1278 } 1279 1280 public function getRuleIndex() : int 1281 { 1282 return PageSqlParser::RULE_expression; 1283 } 1284 1285 public function SqlName() : ?TerminalNode 1286 { 1287 return $this->getToken(PageSqlParser::SqlName, 0); 1288 } 1289 1290 public function StringLiteral() : ?TerminalNode 1291 { 1292 return $this->getToken(PageSqlParser::StringLiteral, 0); 1293 } 1294 1295 public function NumberLiteral() : ?TerminalNode 1296 { 1297 return $this->getToken(PageSqlParser::NumberLiteral, 0); 1298 } 1299 1300 public function Number() : ?TerminalNode 1301 { 1302 return $this->getToken(PageSqlParser::Number, 0); 1303 } 1304 1305 public function functionNames() : ?FunctionNamesContext 1306 { 1307 return $this->getTypedRuleContext(FunctionNamesContext::class, 0); 1308 } 1309 1310 public function LPAREN() : ?TerminalNode 1311 { 1312 return $this->getToken(PageSqlParser::LPAREN, 0); 1313 } 1314 1315 public function RPAREN() : ?TerminalNode 1316 { 1317 return $this->getToken(PageSqlParser::RPAREN, 0); 1318 } 1319 1320 /** 1321 * @return array<ExpressionContext>|ExpressionContext|null 1322 */ 1323 public function expression(?int $index = null) 1324 { 1325 if ($index === null) { 1326 return $this->getTypedRuleContexts(ExpressionContext::class); 1327 } 1328 1329 return $this->getTypedRuleContext(ExpressionContext::class, $index); 1330 } 1331 1332 /** 1333 * @return array<TerminalNode>|TerminalNode|null 1334 */ 1335 public function COMMA(?int $index = null) 1336 { 1337 if ($index === null) { 1338 return $this->getTokens(PageSqlParser::COMMA); 1339 } 1340 1341 return $this->getToken(PageSqlParser::COMMA, $index); 1342 } 1343 1344 public function enterRule(ParseTreeListener $listener) : void 1345 { 1346 if ($listener instanceof PageSqlListener) { 1347 $listener->enterExpression($this); 1348 } 1349 } 1350 1351 public function exitRule(ParseTreeListener $listener) : void 1352 { 1353 if ($listener instanceof PageSqlListener) { 1354 $listener->exitExpression($this); 1355 } 1356 } 1357 1358 public function accept(ParseTreeVisitor $visitor) 1359 { 1360 if ($visitor instanceof PageSqlVisitor) { 1361 return $visitor->visitExpression($this); 1362 } 1363 1364 return $visitor->visitChildren($this); 1365 } 1366 } 1367 1368 class PredicateContext extends ParserRuleContext 1369 { 1370 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1371 { 1372 parent::__construct($parent, $invokingState); 1373 } 1374 1375 public function getRuleIndex() : int 1376 { 1377 return PageSqlParser::RULE_predicate; 1378 } 1379 1380 public function sqlNames() : ?SqlNamesContext 1381 { 1382 return $this->getTypedRuleContext(SqlNamesContext::class, 0); 1383 } 1384 1385 /** 1386 * @return array<ExpressionContext>|ExpressionContext|null 1387 */ 1388 public function expression(?int $index = null) 1389 { 1390 if ($index === null) { 1391 return $this->getTypedRuleContexts(ExpressionContext::class); 1392 } 1393 1394 return $this->getTypedRuleContext(ExpressionContext::class, $index); 1395 } 1396 1397 public function BETWEEN() : ?TerminalNode 1398 { 1399 return $this->getToken(PageSqlParser::BETWEEN, 0); 1400 } 1401 1402 public function AND() : ?TerminalNode 1403 { 1404 return $this->getToken(PageSqlParser::AND, 0); 1405 } 1406 1407 public function IN() : ?TerminalNode 1408 { 1409 return $this->getToken(PageSqlParser::IN, 0); 1410 } 1411 1412 public function LPAREN() : ?TerminalNode 1413 { 1414 return $this->getToken(PageSqlParser::LPAREN, 0); 1415 } 1416 1417 public function RPAREN() : ?TerminalNode 1418 { 1419 return $this->getToken(PageSqlParser::RPAREN, 0); 1420 } 1421 1422 public function LESS_THAN() : ?TerminalNode 1423 { 1424 return $this->getToken(PageSqlParser::LESS_THAN, 0); 1425 } 1426 1427 public function LESS_THAN_OR_EQUAL() : ?TerminalNode 1428 { 1429 return $this->getToken(PageSqlParser::LESS_THAN_OR_EQUAL, 0); 1430 } 1431 1432 public function GREATER_THAN() : ?TerminalNode 1433 { 1434 return $this->getToken(PageSqlParser::GREATER_THAN, 0); 1435 } 1436 1437 public function GREATER_THAN_OR_EQUAL() : ?TerminalNode 1438 { 1439 return $this->getToken(PageSqlParser::GREATER_THAN_OR_EQUAL, 0); 1440 } 1441 1442 public function NOT_EQUAL() : ?TerminalNode 1443 { 1444 return $this->getToken(PageSqlParser::NOT_EQUAL, 0); 1445 } 1446 1447 public function EQUAL() : ?TerminalNode 1448 { 1449 return $this->getToken(PageSqlParser::EQUAL, 0); 1450 } 1451 1452 public function LIKE() : ?TerminalNode 1453 { 1454 return $this->getToken(PageSqlParser::LIKE, 0); 1455 } 1456 1457 public function pattern() : ?PatternContext 1458 { 1459 return $this->getTypedRuleContext(PatternContext::class, 0); 1460 } 1461 1462 public function GLOB() : ?TerminalNode 1463 { 1464 return $this->getToken(PageSqlParser::GLOB, 0); 1465 } 1466 1467 public function NOT() : ?TerminalNode 1468 { 1469 return $this->getToken(PageSqlParser::NOT, 0); 1470 } 1471 1472 public function ESCAPE() : ?TerminalNode 1473 { 1474 return $this->getToken(PageSqlParser::ESCAPE, 0); 1475 } 1476 1477 public function StringLiteral() : ?TerminalNode 1478 { 1479 return $this->getToken(PageSqlParser::StringLiteral, 0); 1480 } 1481 1482 /** 1483 * @return array<TerminalNode>|TerminalNode|null 1484 */ 1485 public function COMMA(?int $index = null) 1486 { 1487 if ($index === null) { 1488 return $this->getTokens(PageSqlParser::COMMA); 1489 } 1490 1491 return $this->getToken(PageSqlParser::COMMA, $index); 1492 } 1493 1494 public function enterRule(ParseTreeListener $listener) : void 1495 { 1496 if ($listener instanceof PageSqlListener) { 1497 $listener->enterPredicate($this); 1498 } 1499 } 1500 1501 public function exitRule(ParseTreeListener $listener) : void 1502 { 1503 if ($listener instanceof PageSqlListener) { 1504 $listener->exitPredicate($this); 1505 } 1506 } 1507 1508 public function accept(ParseTreeVisitor $visitor) 1509 { 1510 if ($visitor instanceof PageSqlVisitor) { 1511 return $visitor->visitPredicate($this); 1512 } 1513 1514 return $visitor->visitChildren($this); 1515 } 1516 } 1517 1518 class ColumnsContext extends ParserRuleContext 1519 { 1520 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1521 { 1522 parent::__construct($parent, $invokingState); 1523 } 1524 1525 public function getRuleIndex() : int 1526 { 1527 return PageSqlParser::RULE_columns; 1528 } 1529 1530 /** 1531 * @return array<ColumnContext>|ColumnContext|null 1532 */ 1533 public function column(?int $index = null) 1534 { 1535 if ($index === null) { 1536 return $this->getTypedRuleContexts(ColumnContext::class); 1537 } 1538 1539 return $this->getTypedRuleContext(ColumnContext::class, $index); 1540 } 1541 1542 /** 1543 * @return array<TerminalNode>|TerminalNode|null 1544 */ 1545 public function COMMA(?int $index = null) 1546 { 1547 if ($index === null) { 1548 return $this->getTokens(PageSqlParser::COMMA); 1549 } 1550 1551 return $this->getToken(PageSqlParser::COMMA, $index); 1552 } 1553 1554 public function enterRule(ParseTreeListener $listener) : void 1555 { 1556 if ($listener instanceof PageSqlListener) { 1557 $listener->enterColumns($this); 1558 } 1559 } 1560 1561 public function exitRule(ParseTreeListener $listener) : void 1562 { 1563 if ($listener instanceof PageSqlListener) { 1564 $listener->exitColumns($this); 1565 } 1566 } 1567 1568 public function accept(ParseTreeVisitor $visitor) 1569 { 1570 if ($visitor instanceof PageSqlVisitor) { 1571 return $visitor->visitColumns($this); 1572 } 1573 1574 return $visitor->visitChildren($this); 1575 } 1576 } 1577 1578 class PredicatesContext extends ParserRuleContext 1579 { 1580 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1581 { 1582 parent::__construct($parent, $invokingState); 1583 } 1584 1585 public function getRuleIndex() : int 1586 { 1587 return PageSqlParser::RULE_predicates; 1588 } 1589 1590 public function WHERE() : ?TerminalNode 1591 { 1592 return $this->getToken(PageSqlParser::WHERE, 0); 1593 } 1594 1595 /** 1596 * @return array<PredicateContext>|PredicateContext|null 1597 */ 1598 public function predicate(?int $index = null) 1599 { 1600 if ($index === null) { 1601 return $this->getTypedRuleContexts(PredicateContext::class); 1602 } 1603 1604 return $this->getTypedRuleContext(PredicateContext::class, $index); 1605 } 1606 1607 /** 1608 * @return array<TerminalNode>|TerminalNode|null 1609 */ 1610 public function AND(?int $index = null) 1611 { 1612 if ($index === null) { 1613 return $this->getTokens(PageSqlParser::AND); 1614 } 1615 1616 return $this->getToken(PageSqlParser::AND, $index); 1617 } 1618 1619 /** 1620 * @return array<TerminalNode>|TerminalNode|null 1621 */ 1622 public function OR(?int $index = null) 1623 { 1624 if ($index === null) { 1625 return $this->getTokens(PageSqlParser::OR); 1626 } 1627 1628 return $this->getToken(PageSqlParser::OR, $index); 1629 } 1630 1631 public function enterRule(ParseTreeListener $listener) : void 1632 { 1633 if ($listener instanceof PageSqlListener) { 1634 $listener->enterPredicates($this); 1635 } 1636 } 1637 1638 public function exitRule(ParseTreeListener $listener) : void 1639 { 1640 if ($listener instanceof PageSqlListener) { 1641 $listener->exitPredicates($this); 1642 } 1643 } 1644 1645 public function accept(ParseTreeVisitor $visitor) 1646 { 1647 if ($visitor instanceof PageSqlVisitor) { 1648 return $visitor->visitPredicates($this); 1649 } 1650 1651 return $visitor->visitChildren($this); 1652 } 1653 } 1654 1655 class TablesContext extends ParserRuleContext 1656 { 1657 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1658 { 1659 parent::__construct($parent, $invokingState); 1660 } 1661 1662 public function getRuleIndex() : int 1663 { 1664 return PageSqlParser::RULE_tables; 1665 } 1666 1667 public function FROM() : ?TerminalNode 1668 { 1669 return $this->getToken(PageSqlParser::FROM, 0); 1670 } 1671 1672 public function tableNames() : ?TableNamesContext 1673 { 1674 return $this->getTypedRuleContext(TableNamesContext::class, 0); 1675 } 1676 1677 public function enterRule(ParseTreeListener $listener) : void 1678 { 1679 if ($listener instanceof PageSqlListener) { 1680 $listener->enterTables($this); 1681 } 1682 } 1683 1684 public function exitRule(ParseTreeListener $listener) : void 1685 { 1686 if ($listener instanceof PageSqlListener) { 1687 $listener->exitTables($this); 1688 } 1689 } 1690 1691 public function accept(ParseTreeVisitor $visitor) 1692 { 1693 if ($visitor instanceof PageSqlVisitor) { 1694 return $visitor->visitTables($this); 1695 } 1696 1697 return $visitor->visitChildren($this); 1698 } 1699 } 1700 1701 class LimitContext extends ParserRuleContext 1702 { 1703 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1704 { 1705 parent::__construct($parent, $invokingState); 1706 } 1707 1708 public function getRuleIndex() : int 1709 { 1710 return PageSqlParser::RULE_limit; 1711 } 1712 1713 public function LIMIT() : ?TerminalNode 1714 { 1715 return $this->getToken(PageSqlParser::LIMIT, 0); 1716 } 1717 1718 public function Number() : ?TerminalNode 1719 { 1720 return $this->getToken(PageSqlParser::Number, 0); 1721 } 1722 1723 public function enterRule(ParseTreeListener $listener) : void 1724 { 1725 if ($listener instanceof PageSqlListener) { 1726 $listener->enterLimit($this); 1727 } 1728 } 1729 1730 public function exitRule(ParseTreeListener $listener) : void 1731 { 1732 if ($listener instanceof PageSqlListener) { 1733 $listener->exitLimit($this); 1734 } 1735 } 1736 1737 public function accept(ParseTreeVisitor $visitor) 1738 { 1739 if ($visitor instanceof PageSqlVisitor) { 1740 return $visitor->visitLimit($this); 1741 } 1742 1743 return $visitor->visitChildren($this); 1744 } 1745 } 1746 1747 class OrderBysContext extends ParserRuleContext 1748 { 1749 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1750 { 1751 parent::__construct($parent, $invokingState); 1752 } 1753 1754 public function getRuleIndex() : int 1755 { 1756 return PageSqlParser::RULE_orderBys; 1757 } 1758 1759 public function ORDER() : ?TerminalNode 1760 { 1761 return $this->getToken(PageSqlParser::ORDER, 0); 1762 } 1763 1764 public function BY() : ?TerminalNode 1765 { 1766 return $this->getToken(PageSqlParser::BY, 0); 1767 } 1768 1769 /** 1770 * @return array<OrderByDefContext>|OrderByDefContext|null 1771 */ 1772 public function orderByDef(?int $index = null) 1773 { 1774 if ($index === null) { 1775 return $this->getTypedRuleContexts(OrderByDefContext::class); 1776 } 1777 1778 return $this->getTypedRuleContext(OrderByDefContext::class, $index); 1779 } 1780 1781 /** 1782 * @return array<TerminalNode>|TerminalNode|null 1783 */ 1784 public function COMMA(?int $index = null) 1785 { 1786 if ($index === null) { 1787 return $this->getTokens(PageSqlParser::COMMA); 1788 } 1789 1790 return $this->getToken(PageSqlParser::COMMA, $index); 1791 } 1792 1793 public function enterRule(ParseTreeListener $listener) : void 1794 { 1795 if ($listener instanceof PageSqlListener) { 1796 $listener->enterOrderBys($this); 1797 } 1798 } 1799 1800 public function exitRule(ParseTreeListener $listener) : void 1801 { 1802 if ($listener instanceof PageSqlListener) { 1803 $listener->exitOrderBys($this); 1804 } 1805 } 1806 1807 public function accept(ParseTreeVisitor $visitor) 1808 { 1809 if ($visitor instanceof PageSqlVisitor) { 1810 return $visitor->visitOrderBys($this); 1811 } 1812 1813 return $visitor->visitChildren($this); 1814 } 1815 } 1816 1817 class OrderByDefContext extends ParserRuleContext 1818 { 1819 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1820 { 1821 parent::__construct($parent, $invokingState); 1822 } 1823 1824 public function getRuleIndex() : int 1825 { 1826 return PageSqlParser::RULE_orderByDef; 1827 } 1828 1829 public function SqlName() : ?TerminalNode 1830 { 1831 return $this->getToken(PageSqlParser::SqlName, 0); 1832 } 1833 1834 public function ASC() : ?TerminalNode 1835 { 1836 return $this->getToken(PageSqlParser::ASC, 0); 1837 } 1838 1839 public function DESC() : ?TerminalNode 1840 { 1841 return $this->getToken(PageSqlParser::DESC, 0); 1842 } 1843 1844 public function enterRule(ParseTreeListener $listener) : void 1845 { 1846 if ($listener instanceof PageSqlListener) { 1847 $listener->enterOrderByDef($this); 1848 } 1849 } 1850 1851 public function exitRule(ParseTreeListener $listener) : void 1852 { 1853 if ($listener instanceof PageSqlListener) { 1854 $listener->exitOrderByDef($this); 1855 } 1856 } 1857 1858 public function accept(ParseTreeVisitor $visitor) 1859 { 1860 if ($visitor instanceof PageSqlVisitor) { 1861 return $visitor->visitOrderByDef($this); 1862 } 1863 1864 return $visitor->visitChildren($this); 1865 } 1866 } 1867 1868 class PageSqlContext extends ParserRuleContext 1869 { 1870 public function __construct(?ParserRuleContext $parent, ?int $invokingState = null) 1871 { 1872 parent::__construct($parent, $invokingState); 1873 } 1874 1875 public function getRuleIndex() : int 1876 { 1877 return PageSqlParser::RULE_pageSql; 1878 } 1879 1880 public function SELECT() : ?TerminalNode 1881 { 1882 return $this->getToken(PageSqlParser::SELECT, 0); 1883 } 1884 1885 public function RANDOM() : ?TerminalNode 1886 { 1887 return $this->getToken(PageSqlParser::RANDOM, 0); 1888 } 1889 1890 public function STAR() : ?TerminalNode 1891 { 1892 return $this->getToken(PageSqlParser::STAR, 0); 1893 } 1894 1895 public function columns() : ?ColumnsContext 1896 { 1897 return $this->getTypedRuleContext(ColumnsContext::class, 0); 1898 } 1899 1900 public function tables() : ?TablesContext 1901 { 1902 return $this->getTypedRuleContext(TablesContext::class, 0); 1903 } 1904 1905 public function predicates() : ?PredicatesContext 1906 { 1907 return $this->getTypedRuleContext(PredicatesContext::class, 0); 1908 } 1909 1910 public function orderBys() : ?OrderBysContext 1911 { 1912 return $this->getTypedRuleContext(OrderBysContext::class, 0); 1913 } 1914 1915 public function limit() : ?LimitContext 1916 { 1917 return $this->getTypedRuleContext(LimitContext::class, 0); 1918 } 1919 1920 public function enterRule(ParseTreeListener $listener) : void 1921 { 1922 if ($listener instanceof PageSqlListener) { 1923 $listener->enterPageSql($this); 1924 } 1925 } 1926 1927 public function exitRule(ParseTreeListener $listener) : void 1928 { 1929 if ($listener instanceof PageSqlListener) { 1930 $listener->exitPageSql($this); 1931 } 1932 } 1933 1934 public function accept(ParseTreeVisitor $visitor) 1935 { 1936 if ($visitor instanceof PageSqlVisitor) { 1937 return $visitor->visitPageSql($this); 1938 } 1939 1940 return $visitor->visitChildren($this); 1941 } 1942 } 1943}