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