0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
posthog/hogql_parser/HogQLParser.cpp
Marius Andra 9ff42460b9
feat(hogql): placeholder expressions (attempt 2) (#25216)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-26 12:33:37 +02:00

12105 lines
377 KiB
C++

// Generated from HogQLParser.g4 by ANTLR 4.13.2
#include "HogQLParserVisitor.h"
#include "HogQLParser.h"
using namespace antlrcpp;
using namespace antlr4;
namespace {
struct HogQLParserStaticData final {
HogQLParserStaticData(std::vector<std::string> ruleNames,
std::vector<std::string> literalNames,
std::vector<std::string> symbolicNames)
: ruleNames(std::move(ruleNames)), literalNames(std::move(literalNames)),
symbolicNames(std::move(symbolicNames)),
vocabulary(this->literalNames, this->symbolicNames) {}
HogQLParserStaticData(const HogQLParserStaticData&) = delete;
HogQLParserStaticData(HogQLParserStaticData&&) = delete;
HogQLParserStaticData& operator=(const HogQLParserStaticData&) = delete;
HogQLParserStaticData& operator=(HogQLParserStaticData&&) = delete;
std::vector<antlr4::dfa::DFA> decisionToDFA;
antlr4::atn::PredictionContextCache sharedContextCache;
const std::vector<std::string> ruleNames;
const std::vector<std::string> literalNames;
const std::vector<std::string> symbolicNames;
const antlr4::dfa::Vocabulary vocabulary;
antlr4::atn::SerializedATNView serializedATN;
std::unique_ptr<antlr4::atn::ATN> atn;
};
::antlr4::internal::OnceFlag hogqlparserParserOnceFlag;
#if ANTLR4_USE_THREAD_LOCAL_CACHE
static thread_local
#endif
std::unique_ptr<HogQLParserStaticData> hogqlparserParserStaticData = nullptr;
void hogqlparserParserInitialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
if (hogqlparserParserStaticData != nullptr) {
return;
}
#else
assert(hogqlparserParserStaticData == nullptr);
#endif
auto staticData = std::make_unique<HogQLParserStaticData>(
std::vector<std::string>{
"program", "declaration", "expression", "varDecl", "identifierList",
"statement", "returnStmt", "throwStmt", "catchBlock", "tryCatchStmt",
"ifStmt", "whileStmt", "forStmt", "forInStmt", "funcStmt", "varAssignment",
"exprStmt", "emptyStmt", "block", "kvPair", "kvPairList", "select",
"selectUnionStmt", "selectStmtWithParens", "selectStmt", "withClause",
"topClause", "fromClause", "arrayJoinClause", "windowClause", "prewhereClause",
"whereClause", "groupByClause", "havingClause", "orderByClause", "projectionOrderByClause",
"limitAndOffsetClause", "offsetOnlyClause", "settingsClause", "joinExpr",
"joinOp", "joinOpCross", "joinConstraintClause", "sampleClause", "orderExprList",
"orderExpr", "ratioExpr", "settingExprList", "settingExpr", "windowExpr",
"winPartitionByClause", "winOrderByClause", "winFrameClause", "winFrameExtend",
"winFrameBound", "expr", "columnTypeExpr", "columnExprList", "columnExpr",
"columnLambdaExpr", "hogqlxTagElement", "hogqlxTagAttribute", "withExprList",
"withExpr", "columnIdentifier", "nestedIdentifier", "tableExpr", "tableFunctionExpr",
"tableIdentifier", "tableArgList", "databaseIdentifier", "floatingLiteral",
"numberLiteral", "literal", "interval", "keyword", "keywordForAlias",
"alias", "identifier", "enumValue", "placeholder", "string", "templateString",
"stringContents", "fullTemplateString", "stringContentsFull"
},
std::vector<std::string>{
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "'->'", "'*'", "'`'", "'\\'",
"':'", "','", "'||'", "'-'", "'$'", "'.'", "'=='", "'='", "'>='",
"'>'", "'#'", "'~*'", "'=~*'", "'{'", "'['", "'('", "'<='", "'<'",
"", "'!~*'", "'!~'", "'\\u003F.'", "'\\u003F\\u003F'", "'%'", "'+'",
"'\\u003F'", "'\"'", "'f''", "'F''", "'''", "'~'", "'=~'", "'}'",
"']'", "')'", "';'", "'/'", "'_'"
},
std::vector<std::string>{
"", "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", "ASOF",
"BETWEEN", "BOTH", "BY", "CASE", "CAST", "CATCH", "COHORT", "COLLATE",
"CROSS", "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT",
"ELSE", "END", "EXTRACT", "FINAL", "FINALLY", "FIRST", "FN", "FOLLOWING",
"FOR", "FROM", "FULL", "FUN", "GROUP", "HAVING", "HOUR", "ID", "IF",
"ILIKE", "IN", "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST",
"LEADING", "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", "NAN_SQL",
"NOT", "NULL_SQL", "NULLS", "OFFSET", "ON", "OR", "ORDER", "OUTER",
"OVER", "PARTITION", "PRECEDING", "PREWHERE", "QUARTER", "RANGE",
"RETURN", "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT",
"SEMI", "SETTINGS", "SUBSTRING", "THEN", "THROW", "TIES", "TIMESTAMP",
"TO", "TOP", "TOTALS", "TRAILING", "TRIM", "TRUNCATE", "TRY", "UNBOUNDED",
"UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH",
"YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL",
"DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW",
"ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", "CONCAT",
"DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT",
"HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN",
"LT_EQ", "LT", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY",
"NULLISH", "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE",
"QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE",
"RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE",
"MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT",
"STRING_ESCAPE_TRIGGER", "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER"
}
);
static const int32_t serializedATNSegment[] = {
4,1,160,1303,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,
2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,
7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,
7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,
7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,
7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,
7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,
7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,
7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,
7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,
7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,
7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,
7,84,2,85,7,85,1,0,5,0,174,8,0,10,0,12,0,177,9,0,1,0,1,0,1,1,1,1,3,1,
183,8,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,3,3,192,8,3,1,4,1,4,1,4,5,4,197,8,
4,10,4,12,4,200,9,4,1,4,3,4,203,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,
5,1,5,1,5,1,5,3,5,217,8,5,1,6,1,6,3,6,221,8,6,1,6,3,6,224,8,6,1,7,1,7,
3,7,228,8,7,1,7,3,7,231,8,7,1,8,1,8,1,8,1,8,1,8,3,8,238,8,8,1,8,1,8,3,
8,242,8,8,1,8,1,8,1,9,1,9,1,9,5,9,249,8,9,10,9,12,9,252,9,9,1,9,1,9,3,
9,256,8,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,265,8,10,1,11,1,11,
1,11,1,11,1,11,1,11,3,11,273,8,11,1,12,1,12,1,12,1,12,1,12,3,12,280,8,
12,1,12,1,12,3,12,284,8,12,1,12,1,12,1,12,1,12,3,12,290,8,12,1,12,1,12,
1,12,3,12,295,8,12,1,13,1,13,1,13,1,13,1,13,1,13,3,13,303,8,13,1,13,1,
13,1,13,1,13,1,13,3,13,310,8,13,1,14,1,14,1,14,1,14,3,14,316,8,14,1,14,
1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,3,16,328,8,16,1,17,1,17,
1,18,1,18,5,18,334,8,18,10,18,12,18,337,9,18,1,18,1,18,1,19,1,19,1,19,
1,19,1,20,1,20,1,20,5,20,348,8,20,10,20,12,20,351,9,20,1,20,3,20,354,
8,20,1,21,1,21,1,21,3,21,359,8,21,1,21,1,21,1,22,1,22,1,22,1,22,5,22,
367,8,22,10,22,12,22,370,9,22,1,23,1,23,1,23,1,23,1,23,1,23,3,23,378,
8,23,1,24,3,24,381,8,24,1,24,1,24,3,24,385,8,24,1,24,3,24,388,8,24,1,
24,1,24,3,24,392,8,24,1,24,3,24,395,8,24,1,24,3,24,398,8,24,1,24,3,24,
401,8,24,1,24,3,24,404,8,24,1,24,1,24,3,24,408,8,24,1,24,1,24,3,24,412,
8,24,1,24,3,24,415,8,24,1,24,3,24,418,8,24,1,24,3,24,421,8,24,1,24,1,
24,3,24,425,8,24,1,24,3,24,428,8,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,
3,26,437,8,26,1,27,1,27,1,27,1,28,3,28,443,8,28,1,28,1,28,1,28,1,28,1,
29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29,462,
8,29,10,29,12,29,465,9,29,1,30,1,30,1,30,1,31,1,31,1,31,1,32,1,32,1,32,
1,32,1,32,1,32,1,32,1,32,3,32,481,8,32,1,33,1,33,1,33,1,34,1,34,1,34,
1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,3,36,498,8,36,1,36,1,36,
1,36,1,36,3,36,504,8,36,1,36,1,36,1,36,1,36,3,36,510,8,36,1,36,1,36,1,
36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,521,8,36,3,36,523,8,36,1,37,1,37,
1,37,1,38,1,38,1,38,1,39,1,39,1,39,3,39,534,8,39,1,39,3,39,537,8,39,1,
39,1,39,1,39,1,39,3,39,543,8,39,1,39,1,39,1,39,1,39,1,39,1,39,3,39,551,
8,39,1,39,1,39,1,39,1,39,5,39,557,8,39,10,39,12,39,560,9,39,1,40,3,40,
563,8,40,1,40,1,40,1,40,3,40,568,8,40,1,40,3,40,571,8,40,1,40,3,40,574,
8,40,1,40,1,40,3,40,578,8,40,1,40,1,40,3,40,582,8,40,1,40,3,40,585,8,
40,3,40,587,8,40,1,40,3,40,590,8,40,1,40,1,40,3,40,594,8,40,1,40,1,40,
3,40,598,8,40,1,40,3,40,601,8,40,3,40,603,8,40,3,40,605,8,40,1,41,1,41,
1,41,3,41,610,8,41,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,
621,8,42,1,43,1,43,1,43,1,43,3,43,627,8,43,1,44,1,44,1,44,5,44,632,8,
44,10,44,12,44,635,9,44,1,45,1,45,3,45,639,8,45,1,45,1,45,3,45,643,8,
45,1,45,1,45,3,45,647,8,45,1,46,1,46,1,46,1,46,3,46,653,8,46,3,46,655,
8,46,1,47,1,47,1,47,5,47,660,8,47,10,47,12,47,663,9,47,1,48,1,48,1,48,
1,48,1,49,3,49,670,8,49,1,49,3,49,673,8,49,1,49,3,49,676,8,49,1,50,1,
50,1,50,1,50,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,
53,1,53,3,53,695,8,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,
54,1,54,1,54,3,54,709,8,54,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,
56,1,56,1,56,1,56,5,56,723,8,56,10,56,12,56,726,9,56,1,56,3,56,729,8,
56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,5,56,738,8,56,10,56,12,56,741,9,
56,1,56,3,56,744,8,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,5,56,753,8,56,
10,56,12,56,756,9,56,1,56,3,56,759,8,56,1,56,1,56,1,56,1,56,1,56,3,56,
766,8,56,1,56,1,56,3,56,770,8,56,1,57,1,57,1,57,5,57,775,8,57,10,57,12,
57,778,9,57,1,57,3,57,781,8,57,1,58,1,58,1,58,3,58,786,8,58,1,58,1,58,
1,58,1,58,1,58,4,58,793,8,58,11,58,12,58,794,1,58,1,58,3,58,799,8,58,
1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,823,8,58,1,58,1,58,1,58,
1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,840,
8,58,1,58,1,58,1,58,1,58,3,58,846,8,58,1,58,3,58,849,8,58,1,58,3,58,852,
8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,862,8,58,1,58,1,58,
1,58,1,58,3,58,868,8,58,1,58,3,58,871,8,58,1,58,3,58,874,8,58,1,58,1,
58,1,58,1,58,1,58,1,58,3,58,882,8,58,1,58,3,58,885,8,58,1,58,1,58,3,58,
889,8,58,1,58,3,58,892,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,
58,1,58,1,58,1,58,3,58,906,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,
58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,923,8,58,1,58,1,58,1,58,3,
58,928,8,58,1,58,1,58,1,58,3,58,933,8,58,1,58,1,58,1,58,1,58,3,58,939,
8,58,1,58,1,58,1,58,1,58,1,58,3,58,946,8,58,1,58,1,58,1,58,1,58,1,58,
1,58,1,58,1,58,1,58,1,58,3,58,958,8,58,1,58,1,58,3,58,962,8,58,1,58,3,
58,965,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,974,8,58,1,58,1,58,
1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,988,8,58,1,58,
1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,
1004,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
1,58,3,58,1033,8,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,1041,8,58,5,58,
1043,8,58,10,58,12,58,1046,9,58,1,59,1,59,1,59,1,59,5,59,1052,8,59,10,
59,12,59,1055,9,59,1,59,3,59,1058,8,59,1,59,1,59,1,59,1,59,1,59,5,59,
1065,8,59,10,59,12,59,1068,9,59,1,59,3,59,1071,8,59,1,59,1,59,3,59,1075,
8,59,1,59,1,59,1,59,3,59,1080,8,59,1,60,1,60,1,60,5,60,1085,8,60,10,60,
12,60,1088,9,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,1096,8,60,10,60,12,
60,1099,9,60,1,60,1,60,1,60,1,60,1,60,1,60,3,60,1107,8,60,1,60,1,60,1,
60,1,60,1,60,3,60,1114,8,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,
61,1,61,1,61,3,61,1127,8,61,1,62,1,62,1,62,5,62,1132,8,62,10,62,12,62,
1135,9,62,1,62,3,62,1138,8,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,
1,63,1,63,3,63,1150,8,63,1,64,1,64,1,64,1,64,3,64,1156,8,64,1,64,3,64,
1159,8,64,1,65,1,65,1,65,5,65,1164,8,65,10,65,12,65,1167,9,65,1,66,1,
66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,3,66,1178,8,66,1,66,1,66,1,66,1,
66,3,66,1184,8,66,5,66,1186,8,66,10,66,12,66,1189,9,66,1,67,1,67,1,67,
3,67,1194,8,67,1,67,1,67,1,68,1,68,1,68,3,68,1201,8,68,1,68,1,68,1,69,
1,69,1,69,5,69,1208,8,69,10,69,12,69,1211,9,69,1,69,3,69,1214,8,69,1,
70,1,70,1,71,1,71,1,71,1,71,1,71,1,71,3,71,1224,8,71,3,71,1226,8,71,1,
72,3,72,1229,8,72,1,72,1,72,1,72,1,72,1,72,1,72,3,72,1237,8,72,1,73,1,
73,1,73,3,73,1242,8,73,1,74,1,74,1,75,1,75,1,76,1,76,1,77,1,77,3,77,1252,
8,77,1,78,1,78,1,78,3,78,1257,8,78,1,79,1,79,1,79,1,79,1,80,1,80,1,80,
1,80,1,81,1,81,3,81,1269,8,81,1,82,1,82,5,82,1273,8,82,10,82,12,82,1276,
9,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83,3,83,1285,8,83,1,84,1,84,5,84,
1289,8,84,10,84,12,84,1292,9,84,1,84,1,84,1,85,1,85,1,85,1,85,1,85,3,
85,1301,8,85,1,85,0,3,78,116,132,86,0,2,4,6,8,10,12,14,16,18,20,22,24,
26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,
72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,
114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,
150,152,154,156,158,160,162,164,166,168,170,0,17,2,0,31,31,36,36,2,0,
18,18,75,75,2,0,45,45,52,52,3,0,1,1,4,4,8,8,4,0,1,1,3,4,8,8,81,81,2,0,
52,52,74,74,2,0,1,1,4,4,2,0,7,7,22,23,2,0,30,30,50,50,2,0,72,72,77,77,
3,0,10,10,51,51,91,91,2,0,42,42,54,54,1,0,108,109,2,0,119,119,140,140,
7,0,21,21,39,39,56,57,71,71,79,79,98,98,104,104,17,0,1,13,15,20,22,28,
30,30,32,35,37,38,40,43,45,52,54,55,59,59,61,70,72,78,80,84,86,93,95,
97,99,100,102,103,4,0,20,20,30,30,40,40,49,49,1475,0,175,1,0,0,0,2,182,
1,0,0,0,4,184,1,0,0,0,6,186,1,0,0,0,8,193,1,0,0,0,10,216,1,0,0,0,12,218,
1,0,0,0,14,225,1,0,0,0,16,232,1,0,0,0,18,245,1,0,0,0,20,257,1,0,0,0,22,
266,1,0,0,0,24,274,1,0,0,0,26,296,1,0,0,0,28,311,1,0,0,0,30,320,1,0,0,
0,32,325,1,0,0,0,34,329,1,0,0,0,36,331,1,0,0,0,38,340,1,0,0,0,40,344,
1,0,0,0,42,358,1,0,0,0,44,362,1,0,0,0,46,377,1,0,0,0,48,380,1,0,0,0,50,
429,1,0,0,0,52,432,1,0,0,0,54,438,1,0,0,0,56,442,1,0,0,0,58,448,1,0,0,
0,60,466,1,0,0,0,62,469,1,0,0,0,64,472,1,0,0,0,66,482,1,0,0,0,68,485,
1,0,0,0,70,489,1,0,0,0,72,522,1,0,0,0,74,524,1,0,0,0,76,527,1,0,0,0,78,
542,1,0,0,0,80,604,1,0,0,0,82,609,1,0,0,0,84,620,1,0,0,0,86,622,1,0,0,
0,88,628,1,0,0,0,90,636,1,0,0,0,92,654,1,0,0,0,94,656,1,0,0,0,96,664,
1,0,0,0,98,669,1,0,0,0,100,677,1,0,0,0,102,681,1,0,0,0,104,685,1,0,0,
0,106,694,1,0,0,0,108,708,1,0,0,0,110,710,1,0,0,0,112,769,1,0,0,0,114,
771,1,0,0,0,116,932,1,0,0,0,118,1074,1,0,0,0,120,1113,1,0,0,0,122,1126,
1,0,0,0,124,1128,1,0,0,0,126,1149,1,0,0,0,128,1158,1,0,0,0,130,1160,1,
0,0,0,132,1177,1,0,0,0,134,1190,1,0,0,0,136,1200,1,0,0,0,138,1204,1,0,
0,0,140,1215,1,0,0,0,142,1225,1,0,0,0,144,1228,1,0,0,0,146,1241,1,0,0,
0,148,1243,1,0,0,0,150,1245,1,0,0,0,152,1247,1,0,0,0,154,1251,1,0,0,0,
156,1256,1,0,0,0,158,1258,1,0,0,0,160,1262,1,0,0,0,162,1268,1,0,0,0,164,
1270,1,0,0,0,166,1284,1,0,0,0,168,1286,1,0,0,0,170,1300,1,0,0,0,172,174,
3,2,1,0,173,172,1,0,0,0,174,177,1,0,0,0,175,173,1,0,0,0,175,176,1,0,0,
0,176,178,1,0,0,0,177,175,1,0,0,0,178,179,5,0,0,1,179,1,1,0,0,0,180,183,
3,6,3,0,181,183,3,10,5,0,182,180,1,0,0,0,182,181,1,0,0,0,183,3,1,0,0,
0,184,185,3,116,58,0,185,5,1,0,0,0,186,187,5,53,0,0,187,191,3,156,78,
0,188,189,5,116,0,0,189,190,5,123,0,0,190,192,3,4,2,0,191,188,1,0,0,0,
191,192,1,0,0,0,192,7,1,0,0,0,193,198,3,156,78,0,194,195,5,117,0,0,195,
197,3,156,78,0,196,194,1,0,0,0,197,200,1,0,0,0,198,196,1,0,0,0,198,199,
1,0,0,0,199,202,1,0,0,0,200,198,1,0,0,0,201,203,5,117,0,0,202,201,1,0,
0,0,202,203,1,0,0,0,203,9,1,0,0,0,204,217,3,12,6,0,205,217,3,14,7,0,206,
217,3,18,9,0,207,217,3,20,10,0,208,217,3,22,11,0,209,217,3,26,13,0,210,
217,3,24,12,0,211,217,3,28,14,0,212,217,3,30,15,0,213,217,3,36,18,0,214,
217,3,32,16,0,215,217,3,34,17,0,216,204,1,0,0,0,216,205,1,0,0,0,216,206,
1,0,0,0,216,207,1,0,0,0,216,208,1,0,0,0,216,209,1,0,0,0,216,210,1,0,0,
0,216,211,1,0,0,0,216,212,1,0,0,0,216,213,1,0,0,0,216,214,1,0,0,0,216,
215,1,0,0,0,217,11,1,0,0,0,218,220,5,73,0,0,219,221,3,4,2,0,220,219,1,
0,0,0,220,221,1,0,0,0,221,223,1,0,0,0,222,224,5,151,0,0,223,222,1,0,0,
0,223,224,1,0,0,0,224,13,1,0,0,0,225,227,5,85,0,0,226,228,3,4,2,0,227,
226,1,0,0,0,227,228,1,0,0,0,228,230,1,0,0,0,229,231,5,151,0,0,230,229,
1,0,0,0,230,231,1,0,0,0,231,15,1,0,0,0,232,241,5,14,0,0,233,234,5,131,
0,0,234,237,3,156,78,0,235,236,5,116,0,0,236,238,3,156,78,0,237,235,1,
0,0,0,237,238,1,0,0,0,238,239,1,0,0,0,239,240,5,150,0,0,240,242,1,0,0,
0,241,233,1,0,0,0,241,242,1,0,0,0,242,243,1,0,0,0,243,244,3,36,18,0,244,
17,1,0,0,0,245,246,5,94,0,0,246,250,3,36,18,0,247,249,3,16,8,0,248,247,
1,0,0,0,249,252,1,0,0,0,250,248,1,0,0,0,250,251,1,0,0,0,251,255,1,0,0,
0,252,250,1,0,0,0,253,254,5,29,0,0,254,256,3,36,18,0,255,253,1,0,0,0,
255,256,1,0,0,0,256,19,1,0,0,0,257,258,5,41,0,0,258,259,5,131,0,0,259,
260,3,4,2,0,260,261,5,150,0,0,261,264,3,10,5,0,262,263,5,25,0,0,263,265,
3,10,5,0,264,262,1,0,0,0,264,265,1,0,0,0,265,21,1,0,0,0,266,267,5,101,
0,0,267,268,5,131,0,0,268,269,3,4,2,0,269,270,5,150,0,0,270,272,3,10,
5,0,271,273,5,151,0,0,272,271,1,0,0,0,272,273,1,0,0,0,273,23,1,0,0,0,
274,275,5,33,0,0,275,279,5,131,0,0,276,280,3,6,3,0,277,280,3,30,15,0,
278,280,3,4,2,0,279,276,1,0,0,0,279,277,1,0,0,0,279,278,1,0,0,0,279,280,
1,0,0,0,280,281,1,0,0,0,281,283,5,151,0,0,282,284,3,4,2,0,283,282,1,0,
0,0,283,284,1,0,0,0,284,285,1,0,0,0,285,289,5,151,0,0,286,290,3,6,3,0,
287,290,3,30,15,0,288,290,3,4,2,0,289,286,1,0,0,0,289,287,1,0,0,0,289,
288,1,0,0,0,289,290,1,0,0,0,290,291,1,0,0,0,291,292,5,150,0,0,292,294,
3,10,5,0,293,295,5,151,0,0,294,293,1,0,0,0,294,295,1,0,0,0,295,25,1,0,
0,0,296,297,5,33,0,0,297,298,5,131,0,0,298,299,5,53,0,0,299,302,3,156,
78,0,300,301,5,117,0,0,301,303,3,156,78,0,302,300,1,0,0,0,302,303,1,0,
0,0,303,304,1,0,0,0,304,305,5,43,0,0,305,306,3,4,2,0,306,307,5,150,0,
0,307,309,3,10,5,0,308,310,5,151,0,0,309,308,1,0,0,0,309,310,1,0,0,0,
310,27,1,0,0,0,311,312,7,0,0,0,312,313,3,156,78,0,313,315,5,131,0,0,314,
316,3,8,4,0,315,314,1,0,0,0,315,316,1,0,0,0,316,317,1,0,0,0,317,318,5,
150,0,0,318,319,3,36,18,0,319,29,1,0,0,0,320,321,3,4,2,0,321,322,5,116,
0,0,322,323,5,123,0,0,323,324,3,4,2,0,324,31,1,0,0,0,325,327,3,4,2,0,
326,328,5,151,0,0,327,326,1,0,0,0,327,328,1,0,0,0,328,33,1,0,0,0,329,
330,5,151,0,0,330,35,1,0,0,0,331,335,5,129,0,0,332,334,3,2,1,0,333,332,
1,0,0,0,334,337,1,0,0,0,335,333,1,0,0,0,335,336,1,0,0,0,336,338,1,0,0,
0,337,335,1,0,0,0,338,339,5,148,0,0,339,37,1,0,0,0,340,341,3,4,2,0,341,
342,5,116,0,0,342,343,3,4,2,0,343,39,1,0,0,0,344,349,3,38,19,0,345,346,
5,117,0,0,346,348,3,38,19,0,347,345,1,0,0,0,348,351,1,0,0,0,349,347,1,
0,0,0,349,350,1,0,0,0,350,353,1,0,0,0,351,349,1,0,0,0,352,354,5,117,0,
0,353,352,1,0,0,0,353,354,1,0,0,0,354,41,1,0,0,0,355,359,3,44,22,0,356,
359,3,48,24,0,357,359,3,120,60,0,358,355,1,0,0,0,358,356,1,0,0,0,358,
357,1,0,0,0,359,360,1,0,0,0,360,361,5,0,0,1,361,43,1,0,0,0,362,368,3,
46,23,0,363,364,5,96,0,0,364,365,5,1,0,0,365,367,3,46,23,0,366,363,1,
0,0,0,367,370,1,0,0,0,368,366,1,0,0,0,368,369,1,0,0,0,369,45,1,0,0,0,
370,368,1,0,0,0,371,378,3,48,24,0,372,373,5,131,0,0,373,374,3,44,22,0,
374,375,5,150,0,0,375,378,1,0,0,0,376,378,3,160,80,0,377,371,1,0,0,0,
377,372,1,0,0,0,377,376,1,0,0,0,378,47,1,0,0,0,379,381,3,50,25,0,380,
379,1,0,0,0,380,381,1,0,0,0,381,382,1,0,0,0,382,384,5,80,0,0,383,385,
5,24,0,0,384,383,1,0,0,0,384,385,1,0,0,0,385,387,1,0,0,0,386,388,3,52,
26,0,387,386,1,0,0,0,387,388,1,0,0,0,388,389,1,0,0,0,389,391,3,114,57,
0,390,392,3,54,27,0,391,390,1,0,0,0,391,392,1,0,0,0,392,394,1,0,0,0,393,
395,3,56,28,0,394,393,1,0,0,0,394,395,1,0,0,0,395,397,1,0,0,0,396,398,
3,60,30,0,397,396,1,0,0,0,397,398,1,0,0,0,398,400,1,0,0,0,399,401,3,62,
31,0,400,399,1,0,0,0,400,401,1,0,0,0,401,403,1,0,0,0,402,404,3,64,32,
0,403,402,1,0,0,0,403,404,1,0,0,0,404,407,1,0,0,0,405,406,5,103,0,0,406,
408,7,1,0,0,407,405,1,0,0,0,407,408,1,0,0,0,408,411,1,0,0,0,409,410,5,
103,0,0,410,412,5,90,0,0,411,409,1,0,0,0,411,412,1,0,0,0,412,414,1,0,
0,0,413,415,3,66,33,0,414,413,1,0,0,0,414,415,1,0,0,0,415,417,1,0,0,0,
416,418,3,58,29,0,417,416,1,0,0,0,417,418,1,0,0,0,418,420,1,0,0,0,419,
421,3,68,34,0,420,419,1,0,0,0,420,421,1,0,0,0,421,424,1,0,0,0,422,425,
3,72,36,0,423,425,3,74,37,0,424,422,1,0,0,0,424,423,1,0,0,0,424,425,1,
0,0,0,425,427,1,0,0,0,426,428,3,76,38,0,427,426,1,0,0,0,427,428,1,0,0,
0,428,49,1,0,0,0,429,430,5,103,0,0,430,431,3,124,62,0,431,51,1,0,0,0,
432,433,5,89,0,0,433,436,5,109,0,0,434,435,5,103,0,0,435,437,5,86,0,0,
436,434,1,0,0,0,436,437,1,0,0,0,437,53,1,0,0,0,438,439,5,34,0,0,439,440,
3,78,39,0,440,55,1,0,0,0,441,443,7,2,0,0,442,441,1,0,0,0,442,443,1,0,
0,0,443,444,1,0,0,0,444,445,5,5,0,0,445,446,5,48,0,0,446,447,3,114,57,
0,447,57,1,0,0,0,448,449,5,102,0,0,449,450,3,156,78,0,450,451,5,6,0,0,
451,452,5,131,0,0,452,453,3,98,49,0,453,463,5,150,0,0,454,455,5,117,0,
0,455,456,3,156,78,0,456,457,5,6,0,0,457,458,5,131,0,0,458,459,3,98,49,
0,459,460,5,150,0,0,460,462,1,0,0,0,461,454,1,0,0,0,462,465,1,0,0,0,463,
461,1,0,0,0,463,464,1,0,0,0,464,59,1,0,0,0,465,463,1,0,0,0,466,467,5,
70,0,0,467,468,3,116,58,0,468,61,1,0,0,0,469,470,5,100,0,0,470,471,3,
116,58,0,471,63,1,0,0,0,472,473,5,37,0,0,473,480,5,11,0,0,474,475,7,1,
0,0,475,476,5,131,0,0,476,477,3,114,57,0,477,478,5,150,0,0,478,481,1,
0,0,0,479,481,3,114,57,0,480,474,1,0,0,0,480,479,1,0,0,0,481,65,1,0,0,
0,482,483,5,38,0,0,483,484,3,116,58,0,484,67,1,0,0,0,485,486,5,65,0,0,
486,487,5,11,0,0,487,488,3,88,44,0,488,69,1,0,0,0,489,490,5,65,0,0,490,
491,5,11,0,0,491,492,3,114,57,0,492,71,1,0,0,0,493,494,5,55,0,0,494,497,
3,116,58,0,495,496,5,117,0,0,496,498,3,116,58,0,497,495,1,0,0,0,497,498,
1,0,0,0,498,503,1,0,0,0,499,500,5,103,0,0,500,504,5,86,0,0,501,502,5,
11,0,0,502,504,3,114,57,0,503,499,1,0,0,0,503,501,1,0,0,0,503,504,1,0,
0,0,504,523,1,0,0,0,505,506,5,55,0,0,506,509,3,116,58,0,507,508,5,103,
0,0,508,510,5,86,0,0,509,507,1,0,0,0,509,510,1,0,0,0,510,511,1,0,0,0,
511,512,5,62,0,0,512,513,3,116,58,0,513,523,1,0,0,0,514,515,5,55,0,0,
515,516,3,116,58,0,516,517,5,62,0,0,517,520,3,116,58,0,518,519,5,11,0,
0,519,521,3,114,57,0,520,518,1,0,0,0,520,521,1,0,0,0,521,523,1,0,0,0,
522,493,1,0,0,0,522,505,1,0,0,0,522,514,1,0,0,0,523,73,1,0,0,0,524,525,
5,62,0,0,525,526,3,116,58,0,526,75,1,0,0,0,527,528,5,82,0,0,528,529,3,
94,47,0,529,77,1,0,0,0,530,531,6,39,-1,0,531,533,3,132,66,0,532,534,5,
28,0,0,533,532,1,0,0,0,533,534,1,0,0,0,534,536,1,0,0,0,535,537,3,86,43,
0,536,535,1,0,0,0,536,537,1,0,0,0,537,543,1,0,0,0,538,539,5,131,0,0,539,
540,3,78,39,0,540,541,5,150,0,0,541,543,1,0,0,0,542,530,1,0,0,0,542,538,
1,0,0,0,543,558,1,0,0,0,544,545,10,3,0,0,545,546,3,82,41,0,546,547,3,
78,39,4,547,557,1,0,0,0,548,550,10,4,0,0,549,551,3,80,40,0,550,549,1,
0,0,0,550,551,1,0,0,0,551,552,1,0,0,0,552,553,5,48,0,0,553,554,3,78,39,
0,554,555,3,84,42,0,555,557,1,0,0,0,556,544,1,0,0,0,556,548,1,0,0,0,557,
560,1,0,0,0,558,556,1,0,0,0,558,559,1,0,0,0,559,79,1,0,0,0,560,558,1,
0,0,0,561,563,7,3,0,0,562,561,1,0,0,0,562,563,1,0,0,0,563,564,1,0,0,0,
564,571,5,45,0,0,565,567,5,45,0,0,566,568,7,3,0,0,567,566,1,0,0,0,567,
568,1,0,0,0,568,571,1,0,0,0,569,571,7,3,0,0,570,562,1,0,0,0,570,565,1,
0,0,0,570,569,1,0,0,0,571,605,1,0,0,0,572,574,7,4,0,0,573,572,1,0,0,0,
573,574,1,0,0,0,574,575,1,0,0,0,575,577,7,5,0,0,576,578,5,66,0,0,577,
576,1,0,0,0,577,578,1,0,0,0,578,587,1,0,0,0,579,581,7,5,0,0,580,582,5,
66,0,0,581,580,1,0,0,0,581,582,1,0,0,0,582,584,1,0,0,0,583,585,7,4,0,
0,584,583,1,0,0,0,584,585,1,0,0,0,585,587,1,0,0,0,586,573,1,0,0,0,586,
579,1,0,0,0,587,605,1,0,0,0,588,590,7,6,0,0,589,588,1,0,0,0,589,590,1,
0,0,0,590,591,1,0,0,0,591,593,5,35,0,0,592,594,5,66,0,0,593,592,1,0,0,
0,593,594,1,0,0,0,594,603,1,0,0,0,595,597,5,35,0,0,596,598,5,66,0,0,597,
596,1,0,0,0,597,598,1,0,0,0,598,600,1,0,0,0,599,601,7,6,0,0,600,599,1,
0,0,0,600,601,1,0,0,0,601,603,1,0,0,0,602,589,1,0,0,0,602,595,1,0,0,0,
603,605,1,0,0,0,604,570,1,0,0,0,604,586,1,0,0,0,604,602,1,0,0,0,605,81,
1,0,0,0,606,607,5,17,0,0,607,610,5,48,0,0,608,610,5,117,0,0,609,606,1,
0,0,0,609,608,1,0,0,0,610,83,1,0,0,0,611,612,5,63,0,0,612,621,3,114,57,
0,613,614,5,97,0,0,614,615,5,131,0,0,615,616,3,114,57,0,616,617,5,150,
0,0,617,621,1,0,0,0,618,619,5,97,0,0,619,621,3,114,57,0,620,611,1,0,0,
0,620,613,1,0,0,0,620,618,1,0,0,0,621,85,1,0,0,0,622,623,5,78,0,0,623,
626,3,92,46,0,624,625,5,62,0,0,625,627,3,92,46,0,626,624,1,0,0,0,626,
627,1,0,0,0,627,87,1,0,0,0,628,633,3,90,45,0,629,630,5,117,0,0,630,632,
3,90,45,0,631,629,1,0,0,0,632,635,1,0,0,0,633,631,1,0,0,0,633,634,1,0,
0,0,634,89,1,0,0,0,635,633,1,0,0,0,636,638,3,116,58,0,637,639,7,7,0,0,
638,637,1,0,0,0,638,639,1,0,0,0,639,642,1,0,0,0,640,641,5,61,0,0,641,
643,7,8,0,0,642,640,1,0,0,0,642,643,1,0,0,0,643,646,1,0,0,0,644,645,5,
16,0,0,645,647,5,111,0,0,646,644,1,0,0,0,646,647,1,0,0,0,647,91,1,0,0,
0,648,655,3,160,80,0,649,652,3,144,72,0,650,651,5,152,0,0,651,653,3,144,
72,0,652,650,1,0,0,0,652,653,1,0,0,0,653,655,1,0,0,0,654,648,1,0,0,0,
654,649,1,0,0,0,655,93,1,0,0,0,656,661,3,96,48,0,657,658,5,117,0,0,658,
660,3,96,48,0,659,657,1,0,0,0,660,663,1,0,0,0,661,659,1,0,0,0,661,662,
1,0,0,0,662,95,1,0,0,0,663,661,1,0,0,0,664,665,3,156,78,0,665,666,5,123,
0,0,666,667,3,146,73,0,667,97,1,0,0,0,668,670,3,100,50,0,669,668,1,0,
0,0,669,670,1,0,0,0,670,672,1,0,0,0,671,673,3,102,51,0,672,671,1,0,0,
0,672,673,1,0,0,0,673,675,1,0,0,0,674,676,3,104,52,0,675,674,1,0,0,0,
675,676,1,0,0,0,676,99,1,0,0,0,677,678,5,68,0,0,678,679,5,11,0,0,679,
680,3,114,57,0,680,101,1,0,0,0,681,682,5,65,0,0,682,683,5,11,0,0,683,
684,3,88,44,0,684,103,1,0,0,0,685,686,7,9,0,0,686,687,3,106,53,0,687,
105,1,0,0,0,688,695,3,108,54,0,689,690,5,9,0,0,690,691,3,108,54,0,691,
692,5,2,0,0,692,693,3,108,54,0,693,695,1,0,0,0,694,688,1,0,0,0,694,689,
1,0,0,0,695,107,1,0,0,0,696,697,5,19,0,0,697,709,5,76,0,0,698,699,5,95,
0,0,699,709,5,69,0,0,700,701,5,95,0,0,701,709,5,32,0,0,702,703,3,144,
72,0,703,704,5,69,0,0,704,709,1,0,0,0,705,706,3,144,72,0,706,707,5,32,
0,0,707,709,1,0,0,0,708,696,1,0,0,0,708,698,1,0,0,0,708,700,1,0,0,0,708,
702,1,0,0,0,708,705,1,0,0,0,709,109,1,0,0,0,710,711,3,116,58,0,711,712,
5,0,0,1,712,111,1,0,0,0,713,770,3,156,78,0,714,715,3,156,78,0,715,716,
5,131,0,0,716,717,3,156,78,0,717,724,3,112,56,0,718,719,5,117,0,0,719,
720,3,156,78,0,720,721,3,112,56,0,721,723,1,0,0,0,722,718,1,0,0,0,723,
726,1,0,0,0,724,722,1,0,0,0,724,725,1,0,0,0,725,728,1,0,0,0,726,724,1,
0,0,0,727,729,5,117,0,0,728,727,1,0,0,0,728,729,1,0,0,0,729,730,1,0,0,
0,730,731,5,150,0,0,731,770,1,0,0,0,732,733,3,156,78,0,733,734,5,131,
0,0,734,739,3,158,79,0,735,736,5,117,0,0,736,738,3,158,79,0,737,735,1,
0,0,0,738,741,1,0,0,0,739,737,1,0,0,0,739,740,1,0,0,0,740,743,1,0,0,0,
741,739,1,0,0,0,742,744,5,117,0,0,743,742,1,0,0,0,743,744,1,0,0,0,744,
745,1,0,0,0,745,746,5,150,0,0,746,770,1,0,0,0,747,748,3,156,78,0,748,
749,5,131,0,0,749,754,3,112,56,0,750,751,5,117,0,0,751,753,3,112,56,0,
752,750,1,0,0,0,753,756,1,0,0,0,754,752,1,0,0,0,754,755,1,0,0,0,755,758,
1,0,0,0,756,754,1,0,0,0,757,759,5,117,0,0,758,757,1,0,0,0,758,759,1,0,
0,0,759,760,1,0,0,0,760,761,5,150,0,0,761,770,1,0,0,0,762,763,3,156,78,
0,763,765,5,131,0,0,764,766,3,114,57,0,765,764,1,0,0,0,765,766,1,0,0,
0,766,767,1,0,0,0,767,768,5,150,0,0,768,770,1,0,0,0,769,713,1,0,0,0,769,
714,1,0,0,0,769,732,1,0,0,0,769,747,1,0,0,0,769,762,1,0,0,0,770,113,1,
0,0,0,771,776,3,116,58,0,772,773,5,117,0,0,773,775,3,116,58,0,774,772,
1,0,0,0,775,778,1,0,0,0,776,774,1,0,0,0,776,777,1,0,0,0,777,780,1,0,0,
0,778,776,1,0,0,0,779,781,5,117,0,0,780,779,1,0,0,0,780,781,1,0,0,0,781,
115,1,0,0,0,782,783,6,58,-1,0,783,785,5,12,0,0,784,786,3,116,58,0,785,
784,1,0,0,0,785,786,1,0,0,0,786,792,1,0,0,0,787,788,5,99,0,0,788,789,
3,116,58,0,789,790,5,84,0,0,790,791,3,116,58,0,791,793,1,0,0,0,792,787,
1,0,0,0,793,794,1,0,0,0,794,792,1,0,0,0,794,795,1,0,0,0,795,798,1,0,0,
0,796,797,5,25,0,0,797,799,3,116,58,0,798,796,1,0,0,0,798,799,1,0,0,0,
799,800,1,0,0,0,800,801,5,26,0,0,801,933,1,0,0,0,802,803,5,13,0,0,803,
804,5,131,0,0,804,805,3,116,58,0,805,806,5,6,0,0,806,807,3,112,56,0,807,
808,5,150,0,0,808,933,1,0,0,0,809,810,5,20,0,0,810,933,5,111,0,0,811,
812,5,46,0,0,812,813,3,116,58,0,813,814,3,148,74,0,814,933,1,0,0,0,815,
816,5,83,0,0,816,817,5,131,0,0,817,818,3,116,58,0,818,819,5,34,0,0,819,
822,3,116,58,0,820,821,5,33,0,0,821,823,3,116,58,0,822,820,1,0,0,0,822,
823,1,0,0,0,823,824,1,0,0,0,824,825,5,150,0,0,825,933,1,0,0,0,826,827,
5,87,0,0,827,933,5,111,0,0,828,829,5,92,0,0,829,830,5,131,0,0,830,831,
7,10,0,0,831,832,3,162,81,0,832,833,5,34,0,0,833,834,3,116,58,0,834,835,
5,150,0,0,835,933,1,0,0,0,836,837,3,156,78,0,837,839,5,131,0,0,838,840,
3,114,57,0,839,838,1,0,0,0,839,840,1,0,0,0,840,841,1,0,0,0,841,842,5,
150,0,0,842,851,1,0,0,0,843,845,5,131,0,0,844,846,5,24,0,0,845,844,1,
0,0,0,845,846,1,0,0,0,846,848,1,0,0,0,847,849,3,114,57,0,848,847,1,0,
0,0,848,849,1,0,0,0,849,850,1,0,0,0,850,852,5,150,0,0,851,843,1,0,0,0,
851,852,1,0,0,0,852,853,1,0,0,0,853,854,5,67,0,0,854,855,5,131,0,0,855,
856,3,98,49,0,856,857,5,150,0,0,857,933,1,0,0,0,858,859,3,156,78,0,859,
861,5,131,0,0,860,862,3,114,57,0,861,860,1,0,0,0,861,862,1,0,0,0,862,
863,1,0,0,0,863,864,5,150,0,0,864,873,1,0,0,0,865,867,5,131,0,0,866,868,
5,24,0,0,867,866,1,0,0,0,867,868,1,0,0,0,868,870,1,0,0,0,869,871,3,114,
57,0,870,869,1,0,0,0,870,871,1,0,0,0,871,872,1,0,0,0,872,874,5,150,0,
0,873,865,1,0,0,0,873,874,1,0,0,0,874,875,1,0,0,0,875,876,5,67,0,0,876,
877,3,156,78,0,877,933,1,0,0,0,878,884,3,156,78,0,879,881,5,131,0,0,880,
882,3,114,57,0,881,880,1,0,0,0,881,882,1,0,0,0,882,883,1,0,0,0,883,885,
5,150,0,0,884,879,1,0,0,0,884,885,1,0,0,0,885,886,1,0,0,0,886,888,5,131,
0,0,887,889,5,24,0,0,888,887,1,0,0,0,888,889,1,0,0,0,889,891,1,0,0,0,
890,892,3,114,57,0,891,890,1,0,0,0,891,892,1,0,0,0,892,893,1,0,0,0,893,
894,5,150,0,0,894,933,1,0,0,0,895,933,3,120,60,0,896,933,3,164,82,0,897,
933,3,146,73,0,898,899,5,119,0,0,899,933,3,116,58,20,900,901,5,59,0,0,
901,933,3,116,58,14,902,903,3,136,68,0,903,904,5,121,0,0,904,906,1,0,
0,0,905,902,1,0,0,0,905,906,1,0,0,0,906,907,1,0,0,0,907,933,5,113,0,0,
908,909,5,131,0,0,909,910,3,44,22,0,910,911,5,150,0,0,911,933,1,0,0,0,
912,913,5,131,0,0,913,914,3,116,58,0,914,915,5,150,0,0,915,933,1,0,0,
0,916,917,5,131,0,0,917,918,3,114,57,0,918,919,5,150,0,0,919,933,1,0,
0,0,920,922,5,130,0,0,921,923,3,114,57,0,922,921,1,0,0,0,922,923,1,0,
0,0,923,924,1,0,0,0,924,933,5,149,0,0,925,927,5,129,0,0,926,928,3,40,
20,0,927,926,1,0,0,0,927,928,1,0,0,0,928,929,1,0,0,0,929,933,5,148,0,
0,930,933,3,118,59,0,931,933,3,128,64,0,932,782,1,0,0,0,932,802,1,0,0,
0,932,809,1,0,0,0,932,811,1,0,0,0,932,815,1,0,0,0,932,826,1,0,0,0,932,
828,1,0,0,0,932,836,1,0,0,0,932,858,1,0,0,0,932,878,1,0,0,0,932,895,1,
0,0,0,932,896,1,0,0,0,932,897,1,0,0,0,932,898,1,0,0,0,932,900,1,0,0,0,
932,905,1,0,0,0,932,908,1,0,0,0,932,912,1,0,0,0,932,916,1,0,0,0,932,920,
1,0,0,0,932,925,1,0,0,0,932,930,1,0,0,0,932,931,1,0,0,0,933,1044,1,0,
0,0,934,938,10,19,0,0,935,939,5,113,0,0,936,939,5,152,0,0,937,939,5,139,
0,0,938,935,1,0,0,0,938,936,1,0,0,0,938,937,1,0,0,0,939,940,1,0,0,0,940,
1043,3,116,58,20,941,945,10,18,0,0,942,946,5,140,0,0,943,946,5,119,0,
0,944,946,5,118,0,0,945,942,1,0,0,0,945,943,1,0,0,0,945,944,1,0,0,0,946,
947,1,0,0,0,947,1043,3,116,58,19,948,973,10,17,0,0,949,974,5,122,0,0,
950,974,5,123,0,0,951,974,5,134,0,0,952,974,5,132,0,0,953,974,5,133,0,
0,954,974,5,124,0,0,955,974,5,125,0,0,956,958,5,59,0,0,957,956,1,0,0,
0,957,958,1,0,0,0,958,959,1,0,0,0,959,961,5,43,0,0,960,962,5,15,0,0,961,
960,1,0,0,0,961,962,1,0,0,0,962,974,1,0,0,0,963,965,5,59,0,0,964,963,
1,0,0,0,964,965,1,0,0,0,965,966,1,0,0,0,966,974,7,11,0,0,967,974,5,146,
0,0,968,974,5,147,0,0,969,974,5,136,0,0,970,974,5,127,0,0,971,974,5,128,
0,0,972,974,5,135,0,0,973,949,1,0,0,0,973,950,1,0,0,0,973,951,1,0,0,0,
973,952,1,0,0,0,973,953,1,0,0,0,973,954,1,0,0,0,973,955,1,0,0,0,973,957,
1,0,0,0,973,964,1,0,0,0,973,967,1,0,0,0,973,968,1,0,0,0,973,969,1,0,0,
0,973,970,1,0,0,0,973,971,1,0,0,0,973,972,1,0,0,0,974,975,1,0,0,0,975,
1043,3,116,58,18,976,977,10,15,0,0,977,978,5,138,0,0,978,1043,3,116,58,
16,979,980,10,13,0,0,980,981,5,2,0,0,981,1043,3,116,58,14,982,983,10,
12,0,0,983,984,5,64,0,0,984,1043,3,116,58,13,985,987,10,11,0,0,986,988,
5,59,0,0,987,986,1,0,0,0,987,988,1,0,0,0,988,989,1,0,0,0,989,990,5,9,
0,0,990,991,3,116,58,0,991,992,5,2,0,0,992,993,3,116,58,12,993,1043,1,
0,0,0,994,995,10,10,0,0,995,996,5,141,0,0,996,997,3,116,58,0,997,998,
5,116,0,0,998,999,3,116,58,10,999,1043,1,0,0,0,1000,1001,10,30,0,0,1001,
1003,5,131,0,0,1002,1004,3,114,57,0,1003,1002,1,0,0,0,1003,1004,1,0,0,
0,1004,1005,1,0,0,0,1005,1043,5,150,0,0,1006,1007,10,26,0,0,1007,1008,
5,130,0,0,1008,1009,3,116,58,0,1009,1010,5,149,0,0,1010,1043,1,0,0,0,
1011,1012,10,25,0,0,1012,1013,5,121,0,0,1013,1043,5,109,0,0,1014,1015,
10,24,0,0,1015,1016,5,121,0,0,1016,1043,3,156,78,0,1017,1018,10,23,0,
0,1018,1019,5,137,0,0,1019,1020,5,130,0,0,1020,1021,3,116,58,0,1021,1022,
5,149,0,0,1022,1043,1,0,0,0,1023,1024,10,22,0,0,1024,1025,5,137,0,0,1025,
1043,5,109,0,0,1026,1027,10,21,0,0,1027,1028,5,137,0,0,1028,1043,3,156,
78,0,1029,1030,10,16,0,0,1030,1032,5,47,0,0,1031,1033,5,59,0,0,1032,1031,
1,0,0,0,1032,1033,1,0,0,0,1033,1034,1,0,0,0,1034,1043,5,60,0,0,1035,1040,
10,9,0,0,1036,1037,5,6,0,0,1037,1041,3,156,78,0,1038,1039,5,6,0,0,1039,
1041,5,111,0,0,1040,1036,1,0,0,0,1040,1038,1,0,0,0,1041,1043,1,0,0,0,
1042,934,1,0,0,0,1042,941,1,0,0,0,1042,948,1,0,0,0,1042,976,1,0,0,0,1042,
979,1,0,0,0,1042,982,1,0,0,0,1042,985,1,0,0,0,1042,994,1,0,0,0,1042,1000,
1,0,0,0,1042,1006,1,0,0,0,1042,1011,1,0,0,0,1042,1014,1,0,0,0,1042,1017,
1,0,0,0,1042,1023,1,0,0,0,1042,1026,1,0,0,0,1042,1029,1,0,0,0,1042,1035,
1,0,0,0,1043,1046,1,0,0,0,1044,1042,1,0,0,0,1044,1045,1,0,0,0,1045,117,
1,0,0,0,1046,1044,1,0,0,0,1047,1048,5,131,0,0,1048,1053,3,156,78,0,1049,
1050,5,117,0,0,1050,1052,3,156,78,0,1051,1049,1,0,0,0,1052,1055,1,0,0,
0,1053,1051,1,0,0,0,1053,1054,1,0,0,0,1054,1057,1,0,0,0,1055,1053,1,0,
0,0,1056,1058,5,117,0,0,1057,1056,1,0,0,0,1057,1058,1,0,0,0,1058,1059,
1,0,0,0,1059,1060,5,150,0,0,1060,1075,1,0,0,0,1061,1066,3,156,78,0,1062,
1063,5,117,0,0,1063,1065,3,156,78,0,1064,1062,1,0,0,0,1065,1068,1,0,0,
0,1066,1064,1,0,0,0,1066,1067,1,0,0,0,1067,1070,1,0,0,0,1068,1066,1,0,
0,0,1069,1071,5,117,0,0,1070,1069,1,0,0,0,1070,1071,1,0,0,0,1071,1075,
1,0,0,0,1072,1073,5,131,0,0,1073,1075,5,150,0,0,1074,1047,1,0,0,0,1074,
1061,1,0,0,0,1074,1072,1,0,0,0,1075,1076,1,0,0,0,1076,1079,5,112,0,0,
1077,1080,3,116,58,0,1078,1080,3,36,18,0,1079,1077,1,0,0,0,1079,1078,
1,0,0,0,1080,119,1,0,0,0,1081,1082,5,133,0,0,1082,1086,3,156,78,0,1083,
1085,3,122,61,0,1084,1083,1,0,0,0,1085,1088,1,0,0,0,1086,1084,1,0,0,0,
1086,1087,1,0,0,0,1087,1089,1,0,0,0,1088,1086,1,0,0,0,1089,1090,5,152,
0,0,1090,1091,5,125,0,0,1091,1114,1,0,0,0,1092,1093,5,133,0,0,1093,1097,
3,156,78,0,1094,1096,3,122,61,0,1095,1094,1,0,0,0,1096,1099,1,0,0,0,1097,
1095,1,0,0,0,1097,1098,1,0,0,0,1098,1100,1,0,0,0,1099,1097,1,0,0,0,1100,
1106,5,125,0,0,1101,1107,3,120,60,0,1102,1103,5,129,0,0,1103,1104,3,116,
58,0,1104,1105,5,148,0,0,1105,1107,1,0,0,0,1106,1101,1,0,0,0,1106,1102,
1,0,0,0,1106,1107,1,0,0,0,1107,1108,1,0,0,0,1108,1109,5,133,0,0,1109,
1110,5,152,0,0,1110,1111,3,156,78,0,1111,1112,5,125,0,0,1112,1114,1,0,
0,0,1113,1081,1,0,0,0,1113,1092,1,0,0,0,1114,121,1,0,0,0,1115,1116,3,
156,78,0,1116,1117,5,123,0,0,1117,1118,3,162,81,0,1118,1127,1,0,0,0,1119,
1120,3,156,78,0,1120,1121,5,123,0,0,1121,1122,5,129,0,0,1122,1123,3,116,
58,0,1123,1124,5,148,0,0,1124,1127,1,0,0,0,1125,1127,3,156,78,0,1126,
1115,1,0,0,0,1126,1119,1,0,0,0,1126,1125,1,0,0,0,1127,123,1,0,0,0,1128,
1133,3,126,63,0,1129,1130,5,117,0,0,1130,1132,3,126,63,0,1131,1129,1,
0,0,0,1132,1135,1,0,0,0,1133,1131,1,0,0,0,1133,1134,1,0,0,0,1134,1137,
1,0,0,0,1135,1133,1,0,0,0,1136,1138,5,117,0,0,1137,1136,1,0,0,0,1137,
1138,1,0,0,0,1138,125,1,0,0,0,1139,1140,3,156,78,0,1140,1141,5,6,0,0,
1141,1142,5,131,0,0,1142,1143,3,44,22,0,1143,1144,5,150,0,0,1144,1150,
1,0,0,0,1145,1146,3,116,58,0,1146,1147,5,6,0,0,1147,1148,3,156,78,0,1148,
1150,1,0,0,0,1149,1139,1,0,0,0,1149,1145,1,0,0,0,1150,127,1,0,0,0,1151,
1159,3,160,80,0,1152,1153,3,136,68,0,1153,1154,5,121,0,0,1154,1156,1,
0,0,0,1155,1152,1,0,0,0,1155,1156,1,0,0,0,1156,1157,1,0,0,0,1157,1159,
3,130,65,0,1158,1151,1,0,0,0,1158,1155,1,0,0,0,1159,129,1,0,0,0,1160,
1165,3,156,78,0,1161,1162,5,121,0,0,1162,1164,3,156,78,0,1163,1161,1,
0,0,0,1164,1167,1,0,0,0,1165,1163,1,0,0,0,1165,1166,1,0,0,0,1166,131,
1,0,0,0,1167,1165,1,0,0,0,1168,1169,6,66,-1,0,1169,1178,3,136,68,0,1170,
1178,3,134,67,0,1171,1172,5,131,0,0,1172,1173,3,44,22,0,1173,1174,5,150,
0,0,1174,1178,1,0,0,0,1175,1178,3,120,60,0,1176,1178,3,160,80,0,1177,
1168,1,0,0,0,1177,1170,1,0,0,0,1177,1171,1,0,0,0,1177,1175,1,0,0,0,1177,
1176,1,0,0,0,1178,1187,1,0,0,0,1179,1183,10,3,0,0,1180,1184,3,154,77,
0,1181,1182,5,6,0,0,1182,1184,3,156,78,0,1183,1180,1,0,0,0,1183,1181,
1,0,0,0,1184,1186,1,0,0,0,1185,1179,1,0,0,0,1186,1189,1,0,0,0,1187,1185,
1,0,0,0,1187,1188,1,0,0,0,1188,133,1,0,0,0,1189,1187,1,0,0,0,1190,1191,
3,156,78,0,1191,1193,5,131,0,0,1192,1194,3,138,69,0,1193,1192,1,0,0,0,
1193,1194,1,0,0,0,1194,1195,1,0,0,0,1195,1196,5,150,0,0,1196,135,1,0,
0,0,1197,1198,3,140,70,0,1198,1199,5,121,0,0,1199,1201,1,0,0,0,1200,1197,
1,0,0,0,1200,1201,1,0,0,0,1201,1202,1,0,0,0,1202,1203,3,156,78,0,1203,
137,1,0,0,0,1204,1209,3,116,58,0,1205,1206,5,117,0,0,1206,1208,3,116,
58,0,1207,1205,1,0,0,0,1208,1211,1,0,0,0,1209,1207,1,0,0,0,1209,1210,
1,0,0,0,1210,1213,1,0,0,0,1211,1209,1,0,0,0,1212,1214,5,117,0,0,1213,
1212,1,0,0,0,1213,1214,1,0,0,0,1214,139,1,0,0,0,1215,1216,3,156,78,0,
1216,141,1,0,0,0,1217,1226,5,107,0,0,1218,1219,5,121,0,0,1219,1226,7,
12,0,0,1220,1221,5,109,0,0,1221,1223,5,121,0,0,1222,1224,7,12,0,0,1223,
1222,1,0,0,0,1223,1224,1,0,0,0,1224,1226,1,0,0,0,1225,1217,1,0,0,0,1225,
1218,1,0,0,0,1225,1220,1,0,0,0,1226,143,1,0,0,0,1227,1229,7,13,0,0,1228,
1227,1,0,0,0,1228,1229,1,0,0,0,1229,1236,1,0,0,0,1230,1237,3,142,71,0,
1231,1237,5,108,0,0,1232,1237,5,109,0,0,1233,1237,5,110,0,0,1234,1237,
5,44,0,0,1235,1237,5,58,0,0,1236,1230,1,0,0,0,1236,1231,1,0,0,0,1236,
1232,1,0,0,0,1236,1233,1,0,0,0,1236,1234,1,0,0,0,1236,1235,1,0,0,0,1237,
145,1,0,0,0,1238,1242,3,144,72,0,1239,1242,5,111,0,0,1240,1242,5,60,0,
0,1241,1238,1,0,0,0,1241,1239,1,0,0,0,1241,1240,1,0,0,0,1242,147,1,0,
0,0,1243,1244,7,14,0,0,1244,149,1,0,0,0,1245,1246,7,15,0,0,1246,151,1,
0,0,0,1247,1248,7,16,0,0,1248,153,1,0,0,0,1249,1252,5,106,0,0,1250,1252,
3,152,76,0,1251,1249,1,0,0,0,1251,1250,1,0,0,0,1252,155,1,0,0,0,1253,
1257,5,106,0,0,1254,1257,3,148,74,0,1255,1257,3,150,75,0,1256,1253,1,
0,0,0,1256,1254,1,0,0,0,1256,1255,1,0,0,0,1257,157,1,0,0,0,1258,1259,
3,162,81,0,1259,1260,5,123,0,0,1260,1261,3,144,72,0,1261,159,1,0,0,0,
1262,1263,5,129,0,0,1263,1264,3,116,58,0,1264,1265,5,148,0,0,1265,161,
1,0,0,0,1266,1269,5,111,0,0,1267,1269,3,164,82,0,1268,1266,1,0,0,0,1268,
1267,1,0,0,0,1269,163,1,0,0,0,1270,1274,5,143,0,0,1271,1273,3,166,83,
0,1272,1271,1,0,0,0,1273,1276,1,0,0,0,1274,1272,1,0,0,0,1274,1275,1,0,
0,0,1275,1277,1,0,0,0,1276,1274,1,0,0,0,1277,1278,5,145,0,0,1278,165,
1,0,0,0,1279,1280,5,158,0,0,1280,1281,3,116,58,0,1281,1282,5,148,0,0,
1282,1285,1,0,0,0,1283,1285,5,157,0,0,1284,1279,1,0,0,0,1284,1283,1,0,
0,0,1285,167,1,0,0,0,1286,1290,5,144,0,0,1287,1289,3,170,85,0,1288,1287,
1,0,0,0,1289,1292,1,0,0,0,1290,1288,1,0,0,0,1290,1291,1,0,0,0,1291,1293,
1,0,0,0,1292,1290,1,0,0,0,1293,1294,5,0,0,1,1294,169,1,0,0,0,1295,1296,
5,160,0,0,1296,1297,3,116,58,0,1297,1298,5,148,0,0,1298,1301,1,0,0,0,
1299,1301,5,159,0,0,1300,1295,1,0,0,0,1300,1299,1,0,0,0,1301,171,1,0,
0,0,167,175,182,191,198,202,216,220,223,227,230,237,241,250,255,264,272,
279,283,289,294,302,309,315,327,335,349,353,358,368,377,380,384,387,391,
394,397,400,403,407,411,414,417,420,424,427,436,442,463,480,497,503,509,
520,522,533,536,542,550,556,558,562,567,570,573,577,581,584,586,589,593,
597,600,602,604,609,620,626,633,638,642,646,652,654,661,669,672,675,694,
708,724,728,739,743,754,758,765,769,776,780,785,794,798,822,839,845,848,
851,861,867,870,873,881,884,888,891,905,922,927,932,938,945,957,961,964,
973,987,1003,1032,1040,1042,1044,1053,1057,1066,1070,1074,1079,1086,1097,
1106,1113,1126,1133,1137,1149,1155,1158,1165,1177,1183,1187,1193,1200,
1209,1213,1223,1225,1228,1236,1241,1251,1256,1268,1274,1284,1290,1300
};
staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));
antlr4::atn::ATNDeserializer deserializer;
staticData->atn = deserializer.deserialize(staticData->serializedATN);
const size_t count = staticData->atn->getNumberOfDecisions();
staticData->decisionToDFA.reserve(count);
for (size_t i = 0; i < count; i++) {
staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i);
}
hogqlparserParserStaticData = std::move(staticData);
}
}
HogQLParser::HogQLParser(TokenStream *input) : HogQLParser(input, antlr4::atn::ParserATNSimulatorOptions()) {}
HogQLParser::HogQLParser(TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options) : Parser(input) {
HogQLParser::initialize();
_interpreter = new atn::ParserATNSimulator(this, *hogqlparserParserStaticData->atn, hogqlparserParserStaticData->decisionToDFA, hogqlparserParserStaticData->sharedContextCache, options);
}
HogQLParser::~HogQLParser() {
delete _interpreter;
}
const atn::ATN& HogQLParser::getATN() const {
return *hogqlparserParserStaticData->atn;
}
std::string HogQLParser::getGrammarFileName() const {
return "HogQLParser.g4";
}
const std::vector<std::string>& HogQLParser::getRuleNames() const {
return hogqlparserParserStaticData->ruleNames;
}
const dfa::Vocabulary& HogQLParser::getVocabulary() const {
return hogqlparserParserStaticData->vocabulary;
}
antlr4::atn::SerializedATNView HogQLParser::getSerializedATN() const {
return hogqlparserParserStaticData->serializedATN;
}
//----------------- ProgramContext ------------------------------------------------------------------
HogQLParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ProgramContext::EOF() {
return getToken(HogQLParser::EOF, 0);
}
std::vector<HogQLParser::DeclarationContext *> HogQLParser::ProgramContext::declaration() {
return getRuleContexts<HogQLParser::DeclarationContext>();
}
HogQLParser::DeclarationContext* HogQLParser::ProgramContext::declaration(size_t i) {
return getRuleContext<HogQLParser::DeclarationContext>(i);
}
size_t HogQLParser::ProgramContext::getRuleIndex() const {
return HogQLParser::RuleProgram;
}
std::any HogQLParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitProgram(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ProgramContext* HogQLParser::program() {
ProgramContext *_localctx = _tracker.createInstance<ProgramContext>(_ctx, getState());
enterRule(_localctx, 0, HogQLParser::RuleProgram);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(175);
_errHandler->sync(this);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -536887298) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986211001696255) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 4212759) != 0)) {
setState(172);
declaration();
setState(177);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(178);
match(HogQLParser::EOF);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DeclarationContext ------------------------------------------------------------------
HogQLParser::DeclarationContext::DeclarationContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::VarDeclContext* HogQLParser::DeclarationContext::varDecl() {
return getRuleContext<HogQLParser::VarDeclContext>(0);
}
HogQLParser::StatementContext* HogQLParser::DeclarationContext::statement() {
return getRuleContext<HogQLParser::StatementContext>(0);
}
size_t HogQLParser::DeclarationContext::getRuleIndex() const {
return HogQLParser::RuleDeclaration;
}
std::any HogQLParser::DeclarationContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitDeclaration(this);
else
return visitor->visitChildren(this);
}
HogQLParser::DeclarationContext* HogQLParser::declaration() {
DeclarationContext *_localctx = _tracker.createInstance<DeclarationContext>(_ctx, getState());
enterRule(_localctx, 2, HogQLParser::RuleDeclaration);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(182);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::LET: {
enterOuterAlt(_localctx, 1);
setState(180);
varDecl();
break;
}
case HogQLParser::ALL:
case HogQLParser::AND:
case HogQLParser::ANTI:
case HogQLParser::ANY:
case HogQLParser::ARRAY:
case HogQLParser::AS:
case HogQLParser::ASCENDING:
case HogQLParser::ASOF:
case HogQLParser::BETWEEN:
case HogQLParser::BOTH:
case HogQLParser::BY:
case HogQLParser::CASE:
case HogQLParser::CAST:
case HogQLParser::COHORT:
case HogQLParser::COLLATE:
case HogQLParser::CROSS:
case HogQLParser::CUBE:
case HogQLParser::CURRENT:
case HogQLParser::DATE:
case HogQLParser::DAY:
case HogQLParser::DESC:
case HogQLParser::DESCENDING:
case HogQLParser::DISTINCT:
case HogQLParser::ELSE:
case HogQLParser::END:
case HogQLParser::EXTRACT:
case HogQLParser::FINAL:
case HogQLParser::FIRST:
case HogQLParser::FN:
case HogQLParser::FOLLOWING:
case HogQLParser::FOR:
case HogQLParser::FROM:
case HogQLParser::FULL:
case HogQLParser::FUN:
case HogQLParser::GROUP:
case HogQLParser::HAVING:
case HogQLParser::HOUR:
case HogQLParser::ID:
case HogQLParser::IF:
case HogQLParser::ILIKE:
case HogQLParser::IN:
case HogQLParser::INF:
case HogQLParser::INNER:
case HogQLParser::INTERVAL:
case HogQLParser::IS:
case HogQLParser::JOIN:
case HogQLParser::KEY:
case HogQLParser::LAST:
case HogQLParser::LEADING:
case HogQLParser::LEFT:
case HogQLParser::LIKE:
case HogQLParser::LIMIT:
case HogQLParser::MINUTE:
case HogQLParser::MONTH:
case HogQLParser::NAN_SQL:
case HogQLParser::NOT:
case HogQLParser::NULL_SQL:
case HogQLParser::NULLS:
case HogQLParser::OFFSET:
case HogQLParser::ON:
case HogQLParser::OR:
case HogQLParser::ORDER:
case HogQLParser::OUTER:
case HogQLParser::OVER:
case HogQLParser::PARTITION:
case HogQLParser::PRECEDING:
case HogQLParser::PREWHERE:
case HogQLParser::QUARTER:
case HogQLParser::RANGE:
case HogQLParser::RETURN:
case HogQLParser::RIGHT:
case HogQLParser::ROLLUP:
case HogQLParser::ROW:
case HogQLParser::ROWS:
case HogQLParser::SAMPLE:
case HogQLParser::SECOND:
case HogQLParser::SELECT:
case HogQLParser::SEMI:
case HogQLParser::SETTINGS:
case HogQLParser::SUBSTRING:
case HogQLParser::THEN:
case HogQLParser::THROW:
case HogQLParser::TIES:
case HogQLParser::TIMESTAMP:
case HogQLParser::TO:
case HogQLParser::TOP:
case HogQLParser::TOTALS:
case HogQLParser::TRAILING:
case HogQLParser::TRIM:
case HogQLParser::TRUNCATE:
case HogQLParser::TRY:
case HogQLParser::UNBOUNDED:
case HogQLParser::UNION:
case HogQLParser::USING:
case HogQLParser::WEEK:
case HogQLParser::WHEN:
case HogQLParser::WHERE:
case HogQLParser::WHILE:
case HogQLParser::WINDOW:
case HogQLParser::WITH:
case HogQLParser::YEAR:
case HogQLParser::IDENTIFIER:
case HogQLParser::FLOATING_LITERAL:
case HogQLParser::OCTAL_LITERAL:
case HogQLParser::DECIMAL_LITERAL:
case HogQLParser::HEXADECIMAL_LITERAL:
case HogQLParser::STRING_LITERAL:
case HogQLParser::ASTERISK:
case HogQLParser::DASH:
case HogQLParser::DOT:
case HogQLParser::LBRACE:
case HogQLParser::LBRACKET:
case HogQLParser::LPAREN:
case HogQLParser::LT:
case HogQLParser::PLUS:
case HogQLParser::QUOTE_SINGLE_TEMPLATE:
case HogQLParser::SEMICOLON: {
enterOuterAlt(_localctx, 2);
setState(181);
statement();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExpressionContext ------------------------------------------------------------------
HogQLParser::ExpressionContext::ExpressionContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::ColumnExprContext* HogQLParser::ExpressionContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
size_t HogQLParser::ExpressionContext::getRuleIndex() const {
return HogQLParser::RuleExpression;
}
std::any HogQLParser::ExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitExpression(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ExpressionContext* HogQLParser::expression() {
ExpressionContext *_localctx = _tracker.createInstance<ExpressionContext>(_ctx, getState());
enterRule(_localctx, 4, HogQLParser::RuleExpression);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(184);
columnExpr(0);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- VarDeclContext ------------------------------------------------------------------
HogQLParser::VarDeclContext::VarDeclContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::VarDeclContext::LET() {
return getToken(HogQLParser::LET, 0);
}
HogQLParser::IdentifierContext* HogQLParser::VarDeclContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::VarDeclContext::COLON() {
return getToken(HogQLParser::COLON, 0);
}
tree::TerminalNode* HogQLParser::VarDeclContext::EQ_SINGLE() {
return getToken(HogQLParser::EQ_SINGLE, 0);
}
HogQLParser::ExpressionContext* HogQLParser::VarDeclContext::expression() {
return getRuleContext<HogQLParser::ExpressionContext>(0);
}
size_t HogQLParser::VarDeclContext::getRuleIndex() const {
return HogQLParser::RuleVarDecl;
}
std::any HogQLParser::VarDeclContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitVarDecl(this);
else
return visitor->visitChildren(this);
}
HogQLParser::VarDeclContext* HogQLParser::varDecl() {
VarDeclContext *_localctx = _tracker.createInstance<VarDeclContext>(_ctx, getState());
enterRule(_localctx, 6, HogQLParser::RuleVarDecl);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(186);
match(HogQLParser::LET);
setState(187);
identifier();
setState(191);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COLON) {
setState(188);
match(HogQLParser::COLON);
setState(189);
match(HogQLParser::EQ_SINGLE);
setState(190);
expression();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IdentifierListContext ------------------------------------------------------------------
HogQLParser::IdentifierListContext::IdentifierListContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::IdentifierContext *> HogQLParser::IdentifierListContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::IdentifierListContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::IdentifierListContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::IdentifierListContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::IdentifierListContext::getRuleIndex() const {
return HogQLParser::RuleIdentifierList;
}
std::any HogQLParser::IdentifierListContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitIdentifierList(this);
else
return visitor->visitChildren(this);
}
HogQLParser::IdentifierListContext* HogQLParser::identifierList() {
IdentifierListContext *_localctx = _tracker.createInstance<IdentifierListContext>(_ctx, getState());
enterRule(_localctx, 8, HogQLParser::RuleIdentifierList);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(193);
identifier();
setState(198);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 3, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(194);
match(HogQLParser::COMMA);
setState(195);
identifier();
}
setState(200);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 3, _ctx);
}
setState(202);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(201);
match(HogQLParser::COMMA);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- StatementContext ------------------------------------------------------------------
HogQLParser::StatementContext::StatementContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::ReturnStmtContext* HogQLParser::StatementContext::returnStmt() {
return getRuleContext<HogQLParser::ReturnStmtContext>(0);
}
HogQLParser::ThrowStmtContext* HogQLParser::StatementContext::throwStmt() {
return getRuleContext<HogQLParser::ThrowStmtContext>(0);
}
HogQLParser::TryCatchStmtContext* HogQLParser::StatementContext::tryCatchStmt() {
return getRuleContext<HogQLParser::TryCatchStmtContext>(0);
}
HogQLParser::IfStmtContext* HogQLParser::StatementContext::ifStmt() {
return getRuleContext<HogQLParser::IfStmtContext>(0);
}
HogQLParser::WhileStmtContext* HogQLParser::StatementContext::whileStmt() {
return getRuleContext<HogQLParser::WhileStmtContext>(0);
}
HogQLParser::ForInStmtContext* HogQLParser::StatementContext::forInStmt() {
return getRuleContext<HogQLParser::ForInStmtContext>(0);
}
HogQLParser::ForStmtContext* HogQLParser::StatementContext::forStmt() {
return getRuleContext<HogQLParser::ForStmtContext>(0);
}
HogQLParser::FuncStmtContext* HogQLParser::StatementContext::funcStmt() {
return getRuleContext<HogQLParser::FuncStmtContext>(0);
}
HogQLParser::VarAssignmentContext* HogQLParser::StatementContext::varAssignment() {
return getRuleContext<HogQLParser::VarAssignmentContext>(0);
}
HogQLParser::BlockContext* HogQLParser::StatementContext::block() {
return getRuleContext<HogQLParser::BlockContext>(0);
}
HogQLParser::ExprStmtContext* HogQLParser::StatementContext::exprStmt() {
return getRuleContext<HogQLParser::ExprStmtContext>(0);
}
HogQLParser::EmptyStmtContext* HogQLParser::StatementContext::emptyStmt() {
return getRuleContext<HogQLParser::EmptyStmtContext>(0);
}
size_t HogQLParser::StatementContext::getRuleIndex() const {
return HogQLParser::RuleStatement;
}
std::any HogQLParser::StatementContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitStatement(this);
else
return visitor->visitChildren(this);
}
HogQLParser::StatementContext* HogQLParser::statement() {
StatementContext *_localctx = _tracker.createInstance<StatementContext>(_ctx, getState());
enterRule(_localctx, 10, HogQLParser::RuleStatement);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(216);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 5, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(204);
returnStmt();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(205);
throwStmt();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(206);
tryCatchStmt();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(207);
ifStmt();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(208);
whileStmt();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(209);
forInStmt();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(210);
forStmt();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(211);
funcStmt();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(212);
varAssignment();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(213);
block();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(214);
exprStmt();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(215);
emptyStmt();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnStmtContext ------------------------------------------------------------------
HogQLParser::ReturnStmtContext::ReturnStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ReturnStmtContext::RETURN() {
return getToken(HogQLParser::RETURN, 0);
}
HogQLParser::ExpressionContext* HogQLParser::ReturnStmtContext::expression() {
return getRuleContext<HogQLParser::ExpressionContext>(0);
}
tree::TerminalNode* HogQLParser::ReturnStmtContext::SEMICOLON() {
return getToken(HogQLParser::SEMICOLON, 0);
}
size_t HogQLParser::ReturnStmtContext::getRuleIndex() const {
return HogQLParser::RuleReturnStmt;
}
std::any HogQLParser::ReturnStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitReturnStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ReturnStmtContext* HogQLParser::returnStmt() {
ReturnStmtContext *_localctx = _tracker.createInstance<ReturnStmtContext>(_ctx, getState());
enterRule(_localctx, 12, HogQLParser::RuleReturnStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(218);
match(HogQLParser::RETURN);
setState(220);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 6, _ctx)) {
case 1: {
setState(219);
expression();
break;
}
default:
break;
}
setState(223);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 7, _ctx)) {
case 1: {
setState(222);
match(HogQLParser::SEMICOLON);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ThrowStmtContext ------------------------------------------------------------------
HogQLParser::ThrowStmtContext::ThrowStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ThrowStmtContext::THROW() {
return getToken(HogQLParser::THROW, 0);
}
HogQLParser::ExpressionContext* HogQLParser::ThrowStmtContext::expression() {
return getRuleContext<HogQLParser::ExpressionContext>(0);
}
tree::TerminalNode* HogQLParser::ThrowStmtContext::SEMICOLON() {
return getToken(HogQLParser::SEMICOLON, 0);
}
size_t HogQLParser::ThrowStmtContext::getRuleIndex() const {
return HogQLParser::RuleThrowStmt;
}
std::any HogQLParser::ThrowStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitThrowStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ThrowStmtContext* HogQLParser::throwStmt() {
ThrowStmtContext *_localctx = _tracker.createInstance<ThrowStmtContext>(_ctx, getState());
enterRule(_localctx, 14, HogQLParser::RuleThrowStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(225);
match(HogQLParser::THROW);
setState(227);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx)) {
case 1: {
setState(226);
expression();
break;
}
default:
break;
}
setState(230);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 9, _ctx)) {
case 1: {
setState(229);
match(HogQLParser::SEMICOLON);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CatchBlockContext ------------------------------------------------------------------
HogQLParser::CatchBlockContext::CatchBlockContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::CatchBlockContext::CATCH() {
return getToken(HogQLParser::CATCH, 0);
}
HogQLParser::BlockContext* HogQLParser::CatchBlockContext::block() {
return getRuleContext<HogQLParser::BlockContext>(0);
}
tree::TerminalNode* HogQLParser::CatchBlockContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
tree::TerminalNode* HogQLParser::CatchBlockContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
std::vector<HogQLParser::IdentifierContext *> HogQLParser::CatchBlockContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::CatchBlockContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
tree::TerminalNode* HogQLParser::CatchBlockContext::COLON() {
return getToken(HogQLParser::COLON, 0);
}
size_t HogQLParser::CatchBlockContext::getRuleIndex() const {
return HogQLParser::RuleCatchBlock;
}
std::any HogQLParser::CatchBlockContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitCatchBlock(this);
else
return visitor->visitChildren(this);
}
HogQLParser::CatchBlockContext* HogQLParser::catchBlock() {
CatchBlockContext *_localctx = _tracker.createInstance<CatchBlockContext>(_ctx, getState());
enterRule(_localctx, 16, HogQLParser::RuleCatchBlock);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(232);
match(HogQLParser::CATCH);
setState(241);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::LPAREN) {
setState(233);
match(HogQLParser::LPAREN);
setState(234);
antlrcpp::downCast<CatchBlockContext *>(_localctx)->catchVar = identifier();
setState(237);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COLON) {
setState(235);
match(HogQLParser::COLON);
setState(236);
antlrcpp::downCast<CatchBlockContext *>(_localctx)->catchType = identifier();
}
setState(239);
match(HogQLParser::RPAREN);
}
setState(243);
antlrcpp::downCast<CatchBlockContext *>(_localctx)->catchStmt = block();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TryCatchStmtContext ------------------------------------------------------------------
HogQLParser::TryCatchStmtContext::TryCatchStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::TryCatchStmtContext::TRY() {
return getToken(HogQLParser::TRY, 0);
}
std::vector<HogQLParser::BlockContext *> HogQLParser::TryCatchStmtContext::block() {
return getRuleContexts<HogQLParser::BlockContext>();
}
HogQLParser::BlockContext* HogQLParser::TryCatchStmtContext::block(size_t i) {
return getRuleContext<HogQLParser::BlockContext>(i);
}
std::vector<HogQLParser::CatchBlockContext *> HogQLParser::TryCatchStmtContext::catchBlock() {
return getRuleContexts<HogQLParser::CatchBlockContext>();
}
HogQLParser::CatchBlockContext* HogQLParser::TryCatchStmtContext::catchBlock(size_t i) {
return getRuleContext<HogQLParser::CatchBlockContext>(i);
}
tree::TerminalNode* HogQLParser::TryCatchStmtContext::FINALLY() {
return getToken(HogQLParser::FINALLY, 0);
}
size_t HogQLParser::TryCatchStmtContext::getRuleIndex() const {
return HogQLParser::RuleTryCatchStmt;
}
std::any HogQLParser::TryCatchStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTryCatchStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::TryCatchStmtContext* HogQLParser::tryCatchStmt() {
TryCatchStmtContext *_localctx = _tracker.createInstance<TryCatchStmtContext>(_ctx, getState());
enterRule(_localctx, 18, HogQLParser::RuleTryCatchStmt);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(245);
match(HogQLParser::TRY);
setState(246);
antlrcpp::downCast<TryCatchStmtContext *>(_localctx)->tryStmt = block();
setState(250);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::CATCH) {
setState(247);
catchBlock();
setState(252);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(255);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::FINALLY) {
setState(253);
match(HogQLParser::FINALLY);
setState(254);
antlrcpp::downCast<TryCatchStmtContext *>(_localctx)->finallyStmt = block();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IfStmtContext ------------------------------------------------------------------
HogQLParser::IfStmtContext::IfStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::IfStmtContext::IF() {
return getToken(HogQLParser::IF, 0);
}
tree::TerminalNode* HogQLParser::IfStmtContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::ExpressionContext* HogQLParser::IfStmtContext::expression() {
return getRuleContext<HogQLParser::ExpressionContext>(0);
}
tree::TerminalNode* HogQLParser::IfStmtContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
std::vector<HogQLParser::StatementContext *> HogQLParser::IfStmtContext::statement() {
return getRuleContexts<HogQLParser::StatementContext>();
}
HogQLParser::StatementContext* HogQLParser::IfStmtContext::statement(size_t i) {
return getRuleContext<HogQLParser::StatementContext>(i);
}
tree::TerminalNode* HogQLParser::IfStmtContext::ELSE() {
return getToken(HogQLParser::ELSE, 0);
}
size_t HogQLParser::IfStmtContext::getRuleIndex() const {
return HogQLParser::RuleIfStmt;
}
std::any HogQLParser::IfStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitIfStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::IfStmtContext* HogQLParser::ifStmt() {
IfStmtContext *_localctx = _tracker.createInstance<IfStmtContext>(_ctx, getState());
enterRule(_localctx, 20, HogQLParser::RuleIfStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(257);
match(HogQLParser::IF);
setState(258);
match(HogQLParser::LPAREN);
setState(259);
expression();
setState(260);
match(HogQLParser::RPAREN);
setState(261);
statement();
setState(264);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 14, _ctx)) {
case 1: {
setState(262);
match(HogQLParser::ELSE);
setState(263);
statement();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WhileStmtContext ------------------------------------------------------------------
HogQLParser::WhileStmtContext::WhileStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::WhileStmtContext::WHILE() {
return getToken(HogQLParser::WHILE, 0);
}
tree::TerminalNode* HogQLParser::WhileStmtContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::ExpressionContext* HogQLParser::WhileStmtContext::expression() {
return getRuleContext<HogQLParser::ExpressionContext>(0);
}
tree::TerminalNode* HogQLParser::WhileStmtContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::StatementContext* HogQLParser::WhileStmtContext::statement() {
return getRuleContext<HogQLParser::StatementContext>(0);
}
tree::TerminalNode* HogQLParser::WhileStmtContext::SEMICOLON() {
return getToken(HogQLParser::SEMICOLON, 0);
}
size_t HogQLParser::WhileStmtContext::getRuleIndex() const {
return HogQLParser::RuleWhileStmt;
}
std::any HogQLParser::WhileStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWhileStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WhileStmtContext* HogQLParser::whileStmt() {
WhileStmtContext *_localctx = _tracker.createInstance<WhileStmtContext>(_ctx, getState());
enterRule(_localctx, 22, HogQLParser::RuleWhileStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(266);
match(HogQLParser::WHILE);
setState(267);
match(HogQLParser::LPAREN);
setState(268);
expression();
setState(269);
match(HogQLParser::RPAREN);
setState(270);
statement();
setState(272);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 15, _ctx)) {
case 1: {
setState(271);
match(HogQLParser::SEMICOLON);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ForStmtContext ------------------------------------------------------------------
HogQLParser::ForStmtContext::ForStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ForStmtContext::FOR() {
return getToken(HogQLParser::FOR, 0);
}
tree::TerminalNode* HogQLParser::ForStmtContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::ForStmtContext::SEMICOLON() {
return getTokens(HogQLParser::SEMICOLON);
}
tree::TerminalNode* HogQLParser::ForStmtContext::SEMICOLON(size_t i) {
return getToken(HogQLParser::SEMICOLON, i);
}
tree::TerminalNode* HogQLParser::ForStmtContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::StatementContext* HogQLParser::ForStmtContext::statement() {
return getRuleContext<HogQLParser::StatementContext>(0);
}
std::vector<HogQLParser::VarDeclContext *> HogQLParser::ForStmtContext::varDecl() {
return getRuleContexts<HogQLParser::VarDeclContext>();
}
HogQLParser::VarDeclContext* HogQLParser::ForStmtContext::varDecl(size_t i) {
return getRuleContext<HogQLParser::VarDeclContext>(i);
}
std::vector<HogQLParser::VarAssignmentContext *> HogQLParser::ForStmtContext::varAssignment() {
return getRuleContexts<HogQLParser::VarAssignmentContext>();
}
HogQLParser::VarAssignmentContext* HogQLParser::ForStmtContext::varAssignment(size_t i) {
return getRuleContext<HogQLParser::VarAssignmentContext>(i);
}
std::vector<HogQLParser::ExpressionContext *> HogQLParser::ForStmtContext::expression() {
return getRuleContexts<HogQLParser::ExpressionContext>();
}
HogQLParser::ExpressionContext* HogQLParser::ForStmtContext::expression(size_t i) {
return getRuleContext<HogQLParser::ExpressionContext>(i);
}
size_t HogQLParser::ForStmtContext::getRuleIndex() const {
return HogQLParser::RuleForStmt;
}
std::any HogQLParser::ForStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitForStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ForStmtContext* HogQLParser::forStmt() {
ForStmtContext *_localctx = _tracker.createInstance<ForStmtContext>(_ctx, getState());
enterRule(_localctx, 24, HogQLParser::RuleForStmt);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(274);
match(HogQLParser::FOR);
setState(275);
match(HogQLParser::LPAREN);
setState(279);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 16, _ctx)) {
case 1: {
setState(276);
antlrcpp::downCast<ForStmtContext *>(_localctx)->initializerVarDeclr = varDecl();
break;
}
case 2: {
setState(277);
antlrcpp::downCast<ForStmtContext *>(_localctx)->initializerVarAssignment = varAssignment();
break;
}
case 3: {
setState(278);
antlrcpp::downCast<ForStmtContext *>(_localctx)->initializerExpression = expression();
break;
}
default:
break;
}
setState(281);
match(HogQLParser::SEMICOLON);
setState(283);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(282);
antlrcpp::downCast<ForStmtContext *>(_localctx)->condition = expression();
}
setState(285);
match(HogQLParser::SEMICOLON);
setState(289);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 18, _ctx)) {
case 1: {
setState(286);
antlrcpp::downCast<ForStmtContext *>(_localctx)->incrementVarDeclr = varDecl();
break;
}
case 2: {
setState(287);
antlrcpp::downCast<ForStmtContext *>(_localctx)->incrementVarAssignment = varAssignment();
break;
}
case 3: {
setState(288);
antlrcpp::downCast<ForStmtContext *>(_localctx)->incrementExpression = expression();
break;
}
default:
break;
}
setState(291);
match(HogQLParser::RPAREN);
setState(292);
statement();
setState(294);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 19, _ctx)) {
case 1: {
setState(293);
match(HogQLParser::SEMICOLON);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ForInStmtContext ------------------------------------------------------------------
HogQLParser::ForInStmtContext::ForInStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ForInStmtContext::FOR() {
return getToken(HogQLParser::FOR, 0);
}
tree::TerminalNode* HogQLParser::ForInStmtContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
tree::TerminalNode* HogQLParser::ForInStmtContext::LET() {
return getToken(HogQLParser::LET, 0);
}
std::vector<HogQLParser::IdentifierContext *> HogQLParser::ForInStmtContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::ForInStmtContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
tree::TerminalNode* HogQLParser::ForInStmtContext::IN() {
return getToken(HogQLParser::IN, 0);
}
HogQLParser::ExpressionContext* HogQLParser::ForInStmtContext::expression() {
return getRuleContext<HogQLParser::ExpressionContext>(0);
}
tree::TerminalNode* HogQLParser::ForInStmtContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::StatementContext* HogQLParser::ForInStmtContext::statement() {
return getRuleContext<HogQLParser::StatementContext>(0);
}
tree::TerminalNode* HogQLParser::ForInStmtContext::COMMA() {
return getToken(HogQLParser::COMMA, 0);
}
tree::TerminalNode* HogQLParser::ForInStmtContext::SEMICOLON() {
return getToken(HogQLParser::SEMICOLON, 0);
}
size_t HogQLParser::ForInStmtContext::getRuleIndex() const {
return HogQLParser::RuleForInStmt;
}
std::any HogQLParser::ForInStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitForInStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ForInStmtContext* HogQLParser::forInStmt() {
ForInStmtContext *_localctx = _tracker.createInstance<ForInStmtContext>(_ctx, getState());
enterRule(_localctx, 26, HogQLParser::RuleForInStmt);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(296);
match(HogQLParser::FOR);
setState(297);
match(HogQLParser::LPAREN);
setState(298);
match(HogQLParser::LET);
setState(299);
identifier();
setState(302);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(300);
match(HogQLParser::COMMA);
setState(301);
identifier();
}
setState(304);
match(HogQLParser::IN);
setState(305);
expression();
setState(306);
match(HogQLParser::RPAREN);
setState(307);
statement();
setState(309);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 21, _ctx)) {
case 1: {
setState(308);
match(HogQLParser::SEMICOLON);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- FuncStmtContext ------------------------------------------------------------------
HogQLParser::FuncStmtContext::FuncStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::IdentifierContext* HogQLParser::FuncStmtContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::FuncStmtContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
tree::TerminalNode* HogQLParser::FuncStmtContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::BlockContext* HogQLParser::FuncStmtContext::block() {
return getRuleContext<HogQLParser::BlockContext>(0);
}
tree::TerminalNode* HogQLParser::FuncStmtContext::FN() {
return getToken(HogQLParser::FN, 0);
}
tree::TerminalNode* HogQLParser::FuncStmtContext::FUN() {
return getToken(HogQLParser::FUN, 0);
}
HogQLParser::IdentifierListContext* HogQLParser::FuncStmtContext::identifierList() {
return getRuleContext<HogQLParser::IdentifierListContext>(0);
}
size_t HogQLParser::FuncStmtContext::getRuleIndex() const {
return HogQLParser::RuleFuncStmt;
}
std::any HogQLParser::FuncStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitFuncStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::FuncStmtContext* HogQLParser::funcStmt() {
FuncStmtContext *_localctx = _tracker.createInstance<FuncStmtContext>(_ctx, getState());
enterRule(_localctx, 28, HogQLParser::RuleFuncStmt);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(311);
_la = _input->LA(1);
if (!(_la == HogQLParser::FN
|| _la == HogQLParser::FUN)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(312);
identifier();
setState(313);
match(HogQLParser::LPAREN);
setState(315);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -1450176743603191810) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 6458554974207) != 0)) {
setState(314);
identifierList();
}
setState(317);
match(HogQLParser::RPAREN);
setState(318);
block();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- VarAssignmentContext ------------------------------------------------------------------
HogQLParser::VarAssignmentContext::VarAssignmentContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::ExpressionContext *> HogQLParser::VarAssignmentContext::expression() {
return getRuleContexts<HogQLParser::ExpressionContext>();
}
HogQLParser::ExpressionContext* HogQLParser::VarAssignmentContext::expression(size_t i) {
return getRuleContext<HogQLParser::ExpressionContext>(i);
}
tree::TerminalNode* HogQLParser::VarAssignmentContext::COLON() {
return getToken(HogQLParser::COLON, 0);
}
tree::TerminalNode* HogQLParser::VarAssignmentContext::EQ_SINGLE() {
return getToken(HogQLParser::EQ_SINGLE, 0);
}
size_t HogQLParser::VarAssignmentContext::getRuleIndex() const {
return HogQLParser::RuleVarAssignment;
}
std::any HogQLParser::VarAssignmentContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitVarAssignment(this);
else
return visitor->visitChildren(this);
}
HogQLParser::VarAssignmentContext* HogQLParser::varAssignment() {
VarAssignmentContext *_localctx = _tracker.createInstance<VarAssignmentContext>(_ctx, getState());
enterRule(_localctx, 30, HogQLParser::RuleVarAssignment);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(320);
expression();
setState(321);
match(HogQLParser::COLON);
setState(322);
match(HogQLParser::EQ_SINGLE);
setState(323);
expression();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExprStmtContext ------------------------------------------------------------------
HogQLParser::ExprStmtContext::ExprStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::ExpressionContext* HogQLParser::ExprStmtContext::expression() {
return getRuleContext<HogQLParser::ExpressionContext>(0);
}
tree::TerminalNode* HogQLParser::ExprStmtContext::SEMICOLON() {
return getToken(HogQLParser::SEMICOLON, 0);
}
size_t HogQLParser::ExprStmtContext::getRuleIndex() const {
return HogQLParser::RuleExprStmt;
}
std::any HogQLParser::ExprStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitExprStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ExprStmtContext* HogQLParser::exprStmt() {
ExprStmtContext *_localctx = _tracker.createInstance<ExprStmtContext>(_ctx, getState());
enterRule(_localctx, 32, HogQLParser::RuleExprStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(325);
expression();
setState(327);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 23, _ctx)) {
case 1: {
setState(326);
match(HogQLParser::SEMICOLON);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- EmptyStmtContext ------------------------------------------------------------------
HogQLParser::EmptyStmtContext::EmptyStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::EmptyStmtContext::SEMICOLON() {
return getToken(HogQLParser::SEMICOLON, 0);
}
size_t HogQLParser::EmptyStmtContext::getRuleIndex() const {
return HogQLParser::RuleEmptyStmt;
}
std::any HogQLParser::EmptyStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitEmptyStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::EmptyStmtContext* HogQLParser::emptyStmt() {
EmptyStmtContext *_localctx = _tracker.createInstance<EmptyStmtContext>(_ctx, getState());
enterRule(_localctx, 34, HogQLParser::RuleEmptyStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(329);
match(HogQLParser::SEMICOLON);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BlockContext ------------------------------------------------------------------
HogQLParser::BlockContext::BlockContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::BlockContext::LBRACE() {
return getToken(HogQLParser::LBRACE, 0);
}
tree::TerminalNode* HogQLParser::BlockContext::RBRACE() {
return getToken(HogQLParser::RBRACE, 0);
}
std::vector<HogQLParser::DeclarationContext *> HogQLParser::BlockContext::declaration() {
return getRuleContexts<HogQLParser::DeclarationContext>();
}
HogQLParser::DeclarationContext* HogQLParser::BlockContext::declaration(size_t i) {
return getRuleContext<HogQLParser::DeclarationContext>(i);
}
size_t HogQLParser::BlockContext::getRuleIndex() const {
return HogQLParser::RuleBlock;
}
std::any HogQLParser::BlockContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitBlock(this);
else
return visitor->visitChildren(this);
}
HogQLParser::BlockContext* HogQLParser::block() {
BlockContext *_localctx = _tracker.createInstance<BlockContext>(_ctx, getState());
enterRule(_localctx, 36, HogQLParser::RuleBlock);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(331);
match(HogQLParser::LBRACE);
setState(335);
_errHandler->sync(this);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -536887298) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986211001696255) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 4212759) != 0)) {
setState(332);
declaration();
setState(337);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(338);
match(HogQLParser::RBRACE);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- KvPairContext ------------------------------------------------------------------
HogQLParser::KvPairContext::KvPairContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::ExpressionContext *> HogQLParser::KvPairContext::expression() {
return getRuleContexts<HogQLParser::ExpressionContext>();
}
HogQLParser::ExpressionContext* HogQLParser::KvPairContext::expression(size_t i) {
return getRuleContext<HogQLParser::ExpressionContext>(i);
}
tree::TerminalNode* HogQLParser::KvPairContext::COLON() {
return getToken(HogQLParser::COLON, 0);
}
size_t HogQLParser::KvPairContext::getRuleIndex() const {
return HogQLParser::RuleKvPair;
}
std::any HogQLParser::KvPairContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitKvPair(this);
else
return visitor->visitChildren(this);
}
HogQLParser::KvPairContext* HogQLParser::kvPair() {
KvPairContext *_localctx = _tracker.createInstance<KvPairContext>(_ctx, getState());
enterRule(_localctx, 38, HogQLParser::RuleKvPair);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(340);
expression();
setState(341);
match(HogQLParser::COLON);
setState(342);
expression();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- KvPairListContext ------------------------------------------------------------------
HogQLParser::KvPairListContext::KvPairListContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::KvPairContext *> HogQLParser::KvPairListContext::kvPair() {
return getRuleContexts<HogQLParser::KvPairContext>();
}
HogQLParser::KvPairContext* HogQLParser::KvPairListContext::kvPair(size_t i) {
return getRuleContext<HogQLParser::KvPairContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::KvPairListContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::KvPairListContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::KvPairListContext::getRuleIndex() const {
return HogQLParser::RuleKvPairList;
}
std::any HogQLParser::KvPairListContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitKvPairList(this);
else
return visitor->visitChildren(this);
}
HogQLParser::KvPairListContext* HogQLParser::kvPairList() {
KvPairListContext *_localctx = _tracker.createInstance<KvPairListContext>(_ctx, getState());
enterRule(_localctx, 40, HogQLParser::RuleKvPairList);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(344);
kvPair();
setState(349);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 25, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(345);
match(HogQLParser::COMMA);
setState(346);
kvPair();
}
setState(351);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 25, _ctx);
}
setState(353);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(352);
match(HogQLParser::COMMA);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SelectContext ------------------------------------------------------------------
HogQLParser::SelectContext::SelectContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::SelectContext::EOF() {
return getToken(HogQLParser::EOF, 0);
}
HogQLParser::SelectUnionStmtContext* HogQLParser::SelectContext::selectUnionStmt() {
return getRuleContext<HogQLParser::SelectUnionStmtContext>(0);
}
HogQLParser::SelectStmtContext* HogQLParser::SelectContext::selectStmt() {
return getRuleContext<HogQLParser::SelectStmtContext>(0);
}
HogQLParser::HogqlxTagElementContext* HogQLParser::SelectContext::hogqlxTagElement() {
return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}
size_t HogQLParser::SelectContext::getRuleIndex() const {
return HogQLParser::RuleSelect;
}
std::any HogQLParser::SelectContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSelect(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SelectContext* HogQLParser::select() {
SelectContext *_localctx = _tracker.createInstance<SelectContext>(_ctx, getState());
enterRule(_localctx, 42, HogQLParser::RuleSelect);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(358);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 27, _ctx)) {
case 1: {
setState(355);
selectUnionStmt();
break;
}
case 2: {
setState(356);
selectStmt();
break;
}
case 3: {
setState(357);
hogqlxTagElement();
break;
}
default:
break;
}
setState(360);
match(HogQLParser::EOF);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SelectUnionStmtContext ------------------------------------------------------------------
HogQLParser::SelectUnionStmtContext::SelectUnionStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::SelectStmtWithParensContext *> HogQLParser::SelectUnionStmtContext::selectStmtWithParens() {
return getRuleContexts<HogQLParser::SelectStmtWithParensContext>();
}
HogQLParser::SelectStmtWithParensContext* HogQLParser::SelectUnionStmtContext::selectStmtWithParens(size_t i) {
return getRuleContext<HogQLParser::SelectStmtWithParensContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::SelectUnionStmtContext::UNION() {
return getTokens(HogQLParser::UNION);
}
tree::TerminalNode* HogQLParser::SelectUnionStmtContext::UNION(size_t i) {
return getToken(HogQLParser::UNION, i);
}
std::vector<tree::TerminalNode *> HogQLParser::SelectUnionStmtContext::ALL() {
return getTokens(HogQLParser::ALL);
}
tree::TerminalNode* HogQLParser::SelectUnionStmtContext::ALL(size_t i) {
return getToken(HogQLParser::ALL, i);
}
size_t HogQLParser::SelectUnionStmtContext::getRuleIndex() const {
return HogQLParser::RuleSelectUnionStmt;
}
std::any HogQLParser::SelectUnionStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSelectUnionStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SelectUnionStmtContext* HogQLParser::selectUnionStmt() {
SelectUnionStmtContext *_localctx = _tracker.createInstance<SelectUnionStmtContext>(_ctx, getState());
enterRule(_localctx, 44, HogQLParser::RuleSelectUnionStmt);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(362);
selectStmtWithParens();
setState(368);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::UNION) {
setState(363);
match(HogQLParser::UNION);
setState(364);
match(HogQLParser::ALL);
setState(365);
selectStmtWithParens();
setState(370);
_errHandler->sync(this);
_la = _input->LA(1);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SelectStmtWithParensContext ------------------------------------------------------------------
HogQLParser::SelectStmtWithParensContext::SelectStmtWithParensContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::SelectStmtContext* HogQLParser::SelectStmtWithParensContext::selectStmt() {
return getRuleContext<HogQLParser::SelectStmtContext>(0);
}
tree::TerminalNode* HogQLParser::SelectStmtWithParensContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::SelectUnionStmtContext* HogQLParser::SelectStmtWithParensContext::selectUnionStmt() {
return getRuleContext<HogQLParser::SelectUnionStmtContext>(0);
}
tree::TerminalNode* HogQLParser::SelectStmtWithParensContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::PlaceholderContext* HogQLParser::SelectStmtWithParensContext::placeholder() {
return getRuleContext<HogQLParser::PlaceholderContext>(0);
}
size_t HogQLParser::SelectStmtWithParensContext::getRuleIndex() const {
return HogQLParser::RuleSelectStmtWithParens;
}
std::any HogQLParser::SelectStmtWithParensContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSelectStmtWithParens(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SelectStmtWithParensContext* HogQLParser::selectStmtWithParens() {
SelectStmtWithParensContext *_localctx = _tracker.createInstance<SelectStmtWithParensContext>(_ctx, getState());
enterRule(_localctx, 46, HogQLParser::RuleSelectStmtWithParens);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(377);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::SELECT:
case HogQLParser::WITH: {
enterOuterAlt(_localctx, 1);
setState(371);
selectStmt();
break;
}
case HogQLParser::LPAREN: {
enterOuterAlt(_localctx, 2);
setState(372);
match(HogQLParser::LPAREN);
setState(373);
selectUnionStmt();
setState(374);
match(HogQLParser::RPAREN);
break;
}
case HogQLParser::LBRACE: {
enterOuterAlt(_localctx, 3);
setState(376);
placeholder();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SelectStmtContext ------------------------------------------------------------------
HogQLParser::SelectStmtContext::SelectStmtContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::SelectStmtContext::SELECT() {
return getToken(HogQLParser::SELECT, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::SelectStmtContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
tree::TerminalNode* HogQLParser::SelectStmtContext::DISTINCT() {
return getToken(HogQLParser::DISTINCT, 0);
}
HogQLParser::TopClauseContext* HogQLParser::SelectStmtContext::topClause() {
return getRuleContext<HogQLParser::TopClauseContext>(0);
}
HogQLParser::ArrayJoinClauseContext* HogQLParser::SelectStmtContext::arrayJoinClause() {
return getRuleContext<HogQLParser::ArrayJoinClauseContext>(0);
}
HogQLParser::PrewhereClauseContext* HogQLParser::SelectStmtContext::prewhereClause() {
return getRuleContext<HogQLParser::PrewhereClauseContext>(0);
}
HogQLParser::GroupByClauseContext* HogQLParser::SelectStmtContext::groupByClause() {
return getRuleContext<HogQLParser::GroupByClauseContext>(0);
}
std::vector<tree::TerminalNode *> HogQLParser::SelectStmtContext::WITH() {
return getTokens(HogQLParser::WITH);
}
tree::TerminalNode* HogQLParser::SelectStmtContext::WITH(size_t i) {
return getToken(HogQLParser::WITH, i);
}
tree::TerminalNode* HogQLParser::SelectStmtContext::TOTALS() {
return getToken(HogQLParser::TOTALS, 0);
}
HogQLParser::HavingClauseContext* HogQLParser::SelectStmtContext::havingClause() {
return getRuleContext<HogQLParser::HavingClauseContext>(0);
}
HogQLParser::WindowClauseContext* HogQLParser::SelectStmtContext::windowClause() {
return getRuleContext<HogQLParser::WindowClauseContext>(0);
}
HogQLParser::OrderByClauseContext* HogQLParser::SelectStmtContext::orderByClause() {
return getRuleContext<HogQLParser::OrderByClauseContext>(0);
}
HogQLParser::LimitAndOffsetClauseContext* HogQLParser::SelectStmtContext::limitAndOffsetClause() {
return getRuleContext<HogQLParser::LimitAndOffsetClauseContext>(0);
}
HogQLParser::OffsetOnlyClauseContext* HogQLParser::SelectStmtContext::offsetOnlyClause() {
return getRuleContext<HogQLParser::OffsetOnlyClauseContext>(0);
}
HogQLParser::SettingsClauseContext* HogQLParser::SelectStmtContext::settingsClause() {
return getRuleContext<HogQLParser::SettingsClauseContext>(0);
}
HogQLParser::WithClauseContext* HogQLParser::SelectStmtContext::withClause() {
return getRuleContext<HogQLParser::WithClauseContext>(0);
}
HogQLParser::FromClauseContext* HogQLParser::SelectStmtContext::fromClause() {
return getRuleContext<HogQLParser::FromClauseContext>(0);
}
HogQLParser::WhereClauseContext* HogQLParser::SelectStmtContext::whereClause() {
return getRuleContext<HogQLParser::WhereClauseContext>(0);
}
tree::TerminalNode* HogQLParser::SelectStmtContext::CUBE() {
return getToken(HogQLParser::CUBE, 0);
}
tree::TerminalNode* HogQLParser::SelectStmtContext::ROLLUP() {
return getToken(HogQLParser::ROLLUP, 0);
}
size_t HogQLParser::SelectStmtContext::getRuleIndex() const {
return HogQLParser::RuleSelectStmt;
}
std::any HogQLParser::SelectStmtContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSelectStmt(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
SelectStmtContext *_localctx = _tracker.createInstance<SelectStmtContext>(_ctx, getState());
enterRule(_localctx, 48, HogQLParser::RuleSelectStmt);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(380);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WITH) {
setState(379);
antlrcpp::downCast<SelectStmtContext *>(_localctx)->with = withClause();
}
setState(382);
match(HogQLParser::SELECT);
setState(384);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 31, _ctx)) {
case 1: {
setState(383);
match(HogQLParser::DISTINCT);
break;
}
default:
break;
}
setState(387);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 32, _ctx)) {
case 1: {
setState(386);
topClause();
break;
}
default:
break;
}
setState(389);
antlrcpp::downCast<SelectStmtContext *>(_localctx)->columns = columnExprList();
setState(391);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::FROM) {
setState(390);
antlrcpp::downCast<SelectStmtContext *>(_localctx)->from = fromClause();
}
setState(394);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 4538783999459360) != 0)) {
setState(393);
arrayJoinClause();
}
setState(397);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::PREWHERE) {
setState(396);
prewhereClause();
}
setState(400);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WHERE) {
setState(399);
antlrcpp::downCast<SelectStmtContext *>(_localctx)->where = whereClause();
}
setState(403);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::GROUP) {
setState(402);
groupByClause();
}
setState(407);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 38, _ctx)) {
case 1: {
setState(405);
match(HogQLParser::WITH);
setState(406);
_la = _input->LA(1);
if (!(_la == HogQLParser::CUBE
|| _la == HogQLParser::ROLLUP)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
default:
break;
}
setState(411);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WITH) {
setState(409);
match(HogQLParser::WITH);
setState(410);
match(HogQLParser::TOTALS);
}
setState(414);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::HAVING) {
setState(413);
havingClause();
}
setState(417);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WINDOW) {
setState(416);
windowClause();
}
setState(420);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ORDER) {
setState(419);
orderByClause();
}
setState(424);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::LIMIT: {
setState(422);
limitAndOffsetClause();
break;
}
case HogQLParser::OFFSET: {
setState(423);
offsetOnlyClause();
break;
}
case HogQLParser::EOF:
case HogQLParser::SETTINGS:
case HogQLParser::UNION:
case HogQLParser::RPAREN: {
break;
}
default:
break;
}
setState(427);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::SETTINGS) {
setState(426);
settingsClause();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WithClauseContext ------------------------------------------------------------------
HogQLParser::WithClauseContext::WithClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::WithClauseContext::WITH() {
return getToken(HogQLParser::WITH, 0);
}
HogQLParser::WithExprListContext* HogQLParser::WithClauseContext::withExprList() {
return getRuleContext<HogQLParser::WithExprListContext>(0);
}
size_t HogQLParser::WithClauseContext::getRuleIndex() const {
return HogQLParser::RuleWithClause;
}
std::any HogQLParser::WithClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWithClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WithClauseContext* HogQLParser::withClause() {
WithClauseContext *_localctx = _tracker.createInstance<WithClauseContext>(_ctx, getState());
enterRule(_localctx, 50, HogQLParser::RuleWithClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(429);
match(HogQLParser::WITH);
setState(430);
withExprList();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TopClauseContext ------------------------------------------------------------------
HogQLParser::TopClauseContext::TopClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::TopClauseContext::TOP() {
return getToken(HogQLParser::TOP, 0);
}
tree::TerminalNode* HogQLParser::TopClauseContext::DECIMAL_LITERAL() {
return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}
tree::TerminalNode* HogQLParser::TopClauseContext::WITH() {
return getToken(HogQLParser::WITH, 0);
}
tree::TerminalNode* HogQLParser::TopClauseContext::TIES() {
return getToken(HogQLParser::TIES, 0);
}
size_t HogQLParser::TopClauseContext::getRuleIndex() const {
return HogQLParser::RuleTopClause;
}
std::any HogQLParser::TopClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTopClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::TopClauseContext* HogQLParser::topClause() {
TopClauseContext *_localctx = _tracker.createInstance<TopClauseContext>(_ctx, getState());
enterRule(_localctx, 52, HogQLParser::RuleTopClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(432);
match(HogQLParser::TOP);
setState(433);
match(HogQLParser::DECIMAL_LITERAL);
setState(436);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 45, _ctx)) {
case 1: {
setState(434);
match(HogQLParser::WITH);
setState(435);
match(HogQLParser::TIES);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- FromClauseContext ------------------------------------------------------------------
HogQLParser::FromClauseContext::FromClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::FromClauseContext::FROM() {
return getToken(HogQLParser::FROM, 0);
}
HogQLParser::JoinExprContext* HogQLParser::FromClauseContext::joinExpr() {
return getRuleContext<HogQLParser::JoinExprContext>(0);
}
size_t HogQLParser::FromClauseContext::getRuleIndex() const {
return HogQLParser::RuleFromClause;
}
std::any HogQLParser::FromClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitFromClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::FromClauseContext* HogQLParser::fromClause() {
FromClauseContext *_localctx = _tracker.createInstance<FromClauseContext>(_ctx, getState());
enterRule(_localctx, 54, HogQLParser::RuleFromClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(438);
match(HogQLParser::FROM);
setState(439);
joinExpr(0);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ArrayJoinClauseContext ------------------------------------------------------------------
HogQLParser::ArrayJoinClauseContext::ArrayJoinClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::ARRAY() {
return getToken(HogQLParser::ARRAY, 0);
}
tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::JOIN() {
return getToken(HogQLParser::JOIN, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::ArrayJoinClauseContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::LEFT() {
return getToken(HogQLParser::LEFT, 0);
}
tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::INNER() {
return getToken(HogQLParser::INNER, 0);
}
size_t HogQLParser::ArrayJoinClauseContext::getRuleIndex() const {
return HogQLParser::RuleArrayJoinClause;
}
std::any HogQLParser::ArrayJoinClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitArrayJoinClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() {
ArrayJoinClauseContext *_localctx = _tracker.createInstance<ArrayJoinClauseContext>(_ctx, getState());
enterRule(_localctx, 56, HogQLParser::RuleArrayJoinClause);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(442);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::INNER
|| _la == HogQLParser::LEFT) {
setState(441);
_la = _input->LA(1);
if (!(_la == HogQLParser::INNER
|| _la == HogQLParser::LEFT)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
setState(444);
match(HogQLParser::ARRAY);
setState(445);
match(HogQLParser::JOIN);
setState(446);
columnExprList();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WindowClauseContext ------------------------------------------------------------------
HogQLParser::WindowClauseContext::WindowClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::WindowClauseContext::WINDOW() {
return getToken(HogQLParser::WINDOW, 0);
}
std::vector<HogQLParser::IdentifierContext *> HogQLParser::WindowClauseContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::WindowClauseContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::AS() {
return getTokens(HogQLParser::AS);
}
tree::TerminalNode* HogQLParser::WindowClauseContext::AS(size_t i) {
return getToken(HogQLParser::AS, i);
}
std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::LPAREN() {
return getTokens(HogQLParser::LPAREN);
}
tree::TerminalNode* HogQLParser::WindowClauseContext::LPAREN(size_t i) {
return getToken(HogQLParser::LPAREN, i);
}
std::vector<HogQLParser::WindowExprContext *> HogQLParser::WindowClauseContext::windowExpr() {
return getRuleContexts<HogQLParser::WindowExprContext>();
}
HogQLParser::WindowExprContext* HogQLParser::WindowClauseContext::windowExpr(size_t i) {
return getRuleContext<HogQLParser::WindowExprContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::RPAREN() {
return getTokens(HogQLParser::RPAREN);
}
tree::TerminalNode* HogQLParser::WindowClauseContext::RPAREN(size_t i) {
return getToken(HogQLParser::RPAREN, i);
}
std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::WindowClauseContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::WindowClauseContext::getRuleIndex() const {
return HogQLParser::RuleWindowClause;
}
std::any HogQLParser::WindowClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWindowClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WindowClauseContext* HogQLParser::windowClause() {
WindowClauseContext *_localctx = _tracker.createInstance<WindowClauseContext>(_ctx, getState());
enterRule(_localctx, 58, HogQLParser::RuleWindowClause);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(448);
match(HogQLParser::WINDOW);
setState(449);
identifier();
setState(450);
match(HogQLParser::AS);
setState(451);
match(HogQLParser::LPAREN);
setState(452);
windowExpr();
setState(453);
match(HogQLParser::RPAREN);
setState(463);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::COMMA) {
setState(454);
match(HogQLParser::COMMA);
setState(455);
identifier();
setState(456);
match(HogQLParser::AS);
setState(457);
match(HogQLParser::LPAREN);
setState(458);
windowExpr();
setState(459);
match(HogQLParser::RPAREN);
setState(465);
_errHandler->sync(this);
_la = _input->LA(1);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PrewhereClauseContext ------------------------------------------------------------------
HogQLParser::PrewhereClauseContext::PrewhereClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::PrewhereClauseContext::PREWHERE() {
return getToken(HogQLParser::PREWHERE, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::PrewhereClauseContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
size_t HogQLParser::PrewhereClauseContext::getRuleIndex() const {
return HogQLParser::RulePrewhereClause;
}
std::any HogQLParser::PrewhereClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitPrewhereClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::PrewhereClauseContext* HogQLParser::prewhereClause() {
PrewhereClauseContext *_localctx = _tracker.createInstance<PrewhereClauseContext>(_ctx, getState());
enterRule(_localctx, 60, HogQLParser::RulePrewhereClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(466);
match(HogQLParser::PREWHERE);
setState(467);
columnExpr(0);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WhereClauseContext ------------------------------------------------------------------
HogQLParser::WhereClauseContext::WhereClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::WhereClauseContext::WHERE() {
return getToken(HogQLParser::WHERE, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::WhereClauseContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
size_t HogQLParser::WhereClauseContext::getRuleIndex() const {
return HogQLParser::RuleWhereClause;
}
std::any HogQLParser::WhereClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWhereClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WhereClauseContext* HogQLParser::whereClause() {
WhereClauseContext *_localctx = _tracker.createInstance<WhereClauseContext>(_ctx, getState());
enterRule(_localctx, 62, HogQLParser::RuleWhereClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(469);
match(HogQLParser::WHERE);
setState(470);
columnExpr(0);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- GroupByClauseContext ------------------------------------------------------------------
HogQLParser::GroupByClauseContext::GroupByClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::GroupByClauseContext::GROUP() {
return getToken(HogQLParser::GROUP, 0);
}
tree::TerminalNode* HogQLParser::GroupByClauseContext::BY() {
return getToken(HogQLParser::BY, 0);
}
tree::TerminalNode* HogQLParser::GroupByClauseContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::GroupByClauseContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
tree::TerminalNode* HogQLParser::GroupByClauseContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
tree::TerminalNode* HogQLParser::GroupByClauseContext::CUBE() {
return getToken(HogQLParser::CUBE, 0);
}
tree::TerminalNode* HogQLParser::GroupByClauseContext::ROLLUP() {
return getToken(HogQLParser::ROLLUP, 0);
}
size_t HogQLParser::GroupByClauseContext::getRuleIndex() const {
return HogQLParser::RuleGroupByClause;
}
std::any HogQLParser::GroupByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitGroupByClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() {
GroupByClauseContext *_localctx = _tracker.createInstance<GroupByClauseContext>(_ctx, getState());
enterRule(_localctx, 64, HogQLParser::RuleGroupByClause);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(472);
match(HogQLParser::GROUP);
setState(473);
match(HogQLParser::BY);
setState(480);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 48, _ctx)) {
case 1: {
setState(474);
_la = _input->LA(1);
if (!(_la == HogQLParser::CUBE
|| _la == HogQLParser::ROLLUP)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(475);
match(HogQLParser::LPAREN);
setState(476);
columnExprList();
setState(477);
match(HogQLParser::RPAREN);
break;
}
case 2: {
setState(479);
columnExprList();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HavingClauseContext ------------------------------------------------------------------
HogQLParser::HavingClauseContext::HavingClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::HavingClauseContext::HAVING() {
return getToken(HogQLParser::HAVING, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::HavingClauseContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
size_t HogQLParser::HavingClauseContext::getRuleIndex() const {
return HogQLParser::RuleHavingClause;
}
std::any HogQLParser::HavingClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitHavingClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::HavingClauseContext* HogQLParser::havingClause() {
HavingClauseContext *_localctx = _tracker.createInstance<HavingClauseContext>(_ctx, getState());
enterRule(_localctx, 66, HogQLParser::RuleHavingClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(482);
match(HogQLParser::HAVING);
setState(483);
columnExpr(0);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrderByClauseContext ------------------------------------------------------------------
HogQLParser::OrderByClauseContext::OrderByClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::OrderByClauseContext::ORDER() {
return getToken(HogQLParser::ORDER, 0);
}
tree::TerminalNode* HogQLParser::OrderByClauseContext::BY() {
return getToken(HogQLParser::BY, 0);
}
HogQLParser::OrderExprListContext* HogQLParser::OrderByClauseContext::orderExprList() {
return getRuleContext<HogQLParser::OrderExprListContext>(0);
}
size_t HogQLParser::OrderByClauseContext::getRuleIndex() const {
return HogQLParser::RuleOrderByClause;
}
std::any HogQLParser::OrderByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitOrderByClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::OrderByClauseContext* HogQLParser::orderByClause() {
OrderByClauseContext *_localctx = _tracker.createInstance<OrderByClauseContext>(_ctx, getState());
enterRule(_localctx, 68, HogQLParser::RuleOrderByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(485);
match(HogQLParser::ORDER);
setState(486);
match(HogQLParser::BY);
setState(487);
orderExprList();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ProjectionOrderByClauseContext ------------------------------------------------------------------
HogQLParser::ProjectionOrderByClauseContext::ProjectionOrderByClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ProjectionOrderByClauseContext::ORDER() {
return getToken(HogQLParser::ORDER, 0);
}
tree::TerminalNode* HogQLParser::ProjectionOrderByClauseContext::BY() {
return getToken(HogQLParser::BY, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::ProjectionOrderByClauseContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
size_t HogQLParser::ProjectionOrderByClauseContext::getRuleIndex() const {
return HogQLParser::RuleProjectionOrderByClause;
}
std::any HogQLParser::ProjectionOrderByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitProjectionOrderByClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ProjectionOrderByClauseContext* HogQLParser::projectionOrderByClause() {
ProjectionOrderByClauseContext *_localctx = _tracker.createInstance<ProjectionOrderByClauseContext>(_ctx, getState());
enterRule(_localctx, 70, HogQLParser::RuleProjectionOrderByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(489);
match(HogQLParser::ORDER);
setState(490);
match(HogQLParser::BY);
setState(491);
columnExprList();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LimitAndOffsetClauseContext ------------------------------------------------------------------
HogQLParser::LimitAndOffsetClauseContext::LimitAndOffsetClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::LIMIT() {
return getToken(HogQLParser::LIMIT, 0);
}
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::LimitAndOffsetClauseContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::LimitAndOffsetClauseContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::COMMA() {
return getToken(HogQLParser::COMMA, 0);
}
tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::BY() {
return getToken(HogQLParser::BY, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::LimitAndOffsetClauseContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::WITH() {
return getToken(HogQLParser::WITH, 0);
}
tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::TIES() {
return getToken(HogQLParser::TIES, 0);
}
tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::OFFSET() {
return getToken(HogQLParser::OFFSET, 0);
}
size_t HogQLParser::LimitAndOffsetClauseContext::getRuleIndex() const {
return HogQLParser::RuleLimitAndOffsetClause;
}
std::any HogQLParser::LimitAndOffsetClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitLimitAndOffsetClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() {
LimitAndOffsetClauseContext *_localctx = _tracker.createInstance<LimitAndOffsetClauseContext>(_ctx, getState());
enterRule(_localctx, 72, HogQLParser::RuleLimitAndOffsetClause);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(522);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 53, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(493);
match(HogQLParser::LIMIT);
setState(494);
columnExpr(0);
setState(497);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(495);
match(HogQLParser::COMMA);
setState(496);
columnExpr(0);
}
setState(503);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::WITH: {
setState(499);
match(HogQLParser::WITH);
setState(500);
match(HogQLParser::TIES);
break;
}
case HogQLParser::BY: {
setState(501);
match(HogQLParser::BY);
setState(502);
columnExprList();
break;
}
case HogQLParser::EOF:
case HogQLParser::SETTINGS:
case HogQLParser::UNION:
case HogQLParser::RPAREN: {
break;
}
default:
break;
}
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(505);
match(HogQLParser::LIMIT);
setState(506);
columnExpr(0);
setState(509);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WITH) {
setState(507);
match(HogQLParser::WITH);
setState(508);
match(HogQLParser::TIES);
}
setState(511);
match(HogQLParser::OFFSET);
setState(512);
columnExpr(0);
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(514);
match(HogQLParser::LIMIT);
setState(515);
columnExpr(0);
setState(516);
match(HogQLParser::OFFSET);
setState(517);
columnExpr(0);
setState(520);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::BY) {
setState(518);
match(HogQLParser::BY);
setState(519);
columnExprList();
}
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OffsetOnlyClauseContext ------------------------------------------------------------------
HogQLParser::OffsetOnlyClauseContext::OffsetOnlyClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::OffsetOnlyClauseContext::OFFSET() {
return getToken(HogQLParser::OFFSET, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::OffsetOnlyClauseContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
size_t HogQLParser::OffsetOnlyClauseContext::getRuleIndex() const {
return HogQLParser::RuleOffsetOnlyClause;
}
std::any HogQLParser::OffsetOnlyClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitOffsetOnlyClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::OffsetOnlyClauseContext* HogQLParser::offsetOnlyClause() {
OffsetOnlyClauseContext *_localctx = _tracker.createInstance<OffsetOnlyClauseContext>(_ctx, getState());
enterRule(_localctx, 74, HogQLParser::RuleOffsetOnlyClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(524);
match(HogQLParser::OFFSET);
setState(525);
columnExpr(0);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SettingsClauseContext ------------------------------------------------------------------
HogQLParser::SettingsClauseContext::SettingsClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::SettingsClauseContext::SETTINGS() {
return getToken(HogQLParser::SETTINGS, 0);
}
HogQLParser::SettingExprListContext* HogQLParser::SettingsClauseContext::settingExprList() {
return getRuleContext<HogQLParser::SettingExprListContext>(0);
}
size_t HogQLParser::SettingsClauseContext::getRuleIndex() const {
return HogQLParser::RuleSettingsClause;
}
std::any HogQLParser::SettingsClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSettingsClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SettingsClauseContext* HogQLParser::settingsClause() {
SettingsClauseContext *_localctx = _tracker.createInstance<SettingsClauseContext>(_ctx, getState());
enterRule(_localctx, 76, HogQLParser::RuleSettingsClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(527);
match(HogQLParser::SETTINGS);
setState(528);
settingExprList();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JoinExprContext ------------------------------------------------------------------
HogQLParser::JoinExprContext::JoinExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::JoinExprContext::getRuleIndex() const {
return HogQLParser::RuleJoinExpr;
}
void HogQLParser::JoinExprContext::copyFrom(JoinExprContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- JoinExprOpContext ------------------------------------------------------------------
std::vector<HogQLParser::JoinExprContext *> HogQLParser::JoinExprOpContext::joinExpr() {
return getRuleContexts<HogQLParser::JoinExprContext>();
}
HogQLParser::JoinExprContext* HogQLParser::JoinExprOpContext::joinExpr(size_t i) {
return getRuleContext<HogQLParser::JoinExprContext>(i);
}
tree::TerminalNode* HogQLParser::JoinExprOpContext::JOIN() {
return getToken(HogQLParser::JOIN, 0);
}
HogQLParser::JoinConstraintClauseContext* HogQLParser::JoinExprOpContext::joinConstraintClause() {
return getRuleContext<HogQLParser::JoinConstraintClauseContext>(0);
}
HogQLParser::JoinOpContext* HogQLParser::JoinExprOpContext::joinOp() {
return getRuleContext<HogQLParser::JoinOpContext>(0);
}
HogQLParser::JoinExprOpContext::JoinExprOpContext(JoinExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::JoinExprOpContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinExprOp(this);
else
return visitor->visitChildren(this);
}
//----------------- JoinExprTableContext ------------------------------------------------------------------
HogQLParser::TableExprContext* HogQLParser::JoinExprTableContext::tableExpr() {
return getRuleContext<HogQLParser::TableExprContext>(0);
}
tree::TerminalNode* HogQLParser::JoinExprTableContext::FINAL() {
return getToken(HogQLParser::FINAL, 0);
}
HogQLParser::SampleClauseContext* HogQLParser::JoinExprTableContext::sampleClause() {
return getRuleContext<HogQLParser::SampleClauseContext>(0);
}
HogQLParser::JoinExprTableContext::JoinExprTableContext(JoinExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::JoinExprTableContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinExprTable(this);
else
return visitor->visitChildren(this);
}
//----------------- JoinExprParensContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::JoinExprParensContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::JoinExprContext* HogQLParser::JoinExprParensContext::joinExpr() {
return getRuleContext<HogQLParser::JoinExprContext>(0);
}
tree::TerminalNode* HogQLParser::JoinExprParensContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::JoinExprParensContext::JoinExprParensContext(JoinExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::JoinExprParensContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinExprParens(this);
else
return visitor->visitChildren(this);
}
//----------------- JoinExprCrossOpContext ------------------------------------------------------------------
std::vector<HogQLParser::JoinExprContext *> HogQLParser::JoinExprCrossOpContext::joinExpr() {
return getRuleContexts<HogQLParser::JoinExprContext>();
}
HogQLParser::JoinExprContext* HogQLParser::JoinExprCrossOpContext::joinExpr(size_t i) {
return getRuleContext<HogQLParser::JoinExprContext>(i);
}
HogQLParser::JoinOpCrossContext* HogQLParser::JoinExprCrossOpContext::joinOpCross() {
return getRuleContext<HogQLParser::JoinOpCrossContext>(0);
}
HogQLParser::JoinExprCrossOpContext::JoinExprCrossOpContext(JoinExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::JoinExprCrossOpContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinExprCrossOp(this);
else
return visitor->visitChildren(this);
}
HogQLParser::JoinExprContext* HogQLParser::joinExpr() {
return joinExpr(0);
}
HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
ParserRuleContext *parentContext = _ctx;
size_t parentState = getState();
HogQLParser::JoinExprContext *_localctx = _tracker.createInstance<JoinExprContext>(_ctx, parentState);
HogQLParser::JoinExprContext *previousContext = _localctx;
(void)previousContext; // Silence compiler, in case the context is not used by generated code.
size_t startState = 78;
enterRecursionRule(_localctx, 78, HogQLParser::RuleJoinExpr, precedence);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
unrollRecursionContexts(parentContext);
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(542);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 56, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<JoinExprTableContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(531);
tableExpr(0);
setState(533);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 54, _ctx)) {
case 1: {
setState(532);
match(HogQLParser::FINAL);
break;
}
default:
break;
}
setState(536);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 55, _ctx)) {
case 1: {
setState(535);
sampleClause();
break;
}
default:
break;
}
break;
}
case 2: {
_localctx = _tracker.createInstance<JoinExprParensContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(538);
match(HogQLParser::LPAREN);
setState(539);
joinExpr(0);
setState(540);
match(HogQLParser::RPAREN);
break;
}
default:
break;
}
_ctx->stop = _input->LT(-1);
setState(558);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 59, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
if (!_parseListeners.empty())
triggerExitRuleEvent();
previousContext = _localctx;
setState(556);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 58, _ctx)) {
case 1: {
auto newContext = _tracker.createInstance<JoinExprCrossOpContext>(_tracker.createInstance<JoinExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleJoinExpr);
setState(544);
if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)");
setState(545);
joinOpCross();
setState(546);
joinExpr(4);
break;
}
case 2: {
auto newContext = _tracker.createInstance<JoinExprOpContext>(_tracker.createInstance<JoinExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleJoinExpr);
setState(548);
if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)");
setState(550);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 4538818359197978) != 0) || _la == HogQLParser::RIGHT
|| _la == HogQLParser::SEMI) {
setState(549);
joinOp();
}
setState(552);
match(HogQLParser::JOIN);
setState(553);
joinExpr(0);
setState(554);
joinConstraintClause();
break;
}
default:
break;
}
}
setState(560);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 59, _ctx);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JoinOpContext ------------------------------------------------------------------
HogQLParser::JoinOpContext::JoinOpContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::JoinOpContext::getRuleIndex() const {
return HogQLParser::RuleJoinOp;
}
void HogQLParser::JoinOpContext::copyFrom(JoinOpContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- JoinOpFullContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::JoinOpFullContext::FULL() {
return getToken(HogQLParser::FULL, 0);
}
tree::TerminalNode* HogQLParser::JoinOpFullContext::OUTER() {
return getToken(HogQLParser::OUTER, 0);
}
tree::TerminalNode* HogQLParser::JoinOpFullContext::ALL() {
return getToken(HogQLParser::ALL, 0);
}
tree::TerminalNode* HogQLParser::JoinOpFullContext::ANY() {
return getToken(HogQLParser::ANY, 0);
}
HogQLParser::JoinOpFullContext::JoinOpFullContext(JoinOpContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::JoinOpFullContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinOpFull(this);
else
return visitor->visitChildren(this);
}
//----------------- JoinOpInnerContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::JoinOpInnerContext::INNER() {
return getToken(HogQLParser::INNER, 0);
}
tree::TerminalNode* HogQLParser::JoinOpInnerContext::ALL() {
return getToken(HogQLParser::ALL, 0);
}
tree::TerminalNode* HogQLParser::JoinOpInnerContext::ANY() {
return getToken(HogQLParser::ANY, 0);
}
tree::TerminalNode* HogQLParser::JoinOpInnerContext::ASOF() {
return getToken(HogQLParser::ASOF, 0);
}
HogQLParser::JoinOpInnerContext::JoinOpInnerContext(JoinOpContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::JoinOpInnerContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinOpInner(this);
else
return visitor->visitChildren(this);
}
//----------------- JoinOpLeftRightContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::LEFT() {
return getToken(HogQLParser::LEFT, 0);
}
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::RIGHT() {
return getToken(HogQLParser::RIGHT, 0);
}
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::OUTER() {
return getToken(HogQLParser::OUTER, 0);
}
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::SEMI() {
return getToken(HogQLParser::SEMI, 0);
}
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ALL() {
return getToken(HogQLParser::ALL, 0);
}
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ANTI() {
return getToken(HogQLParser::ANTI, 0);
}
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ANY() {
return getToken(HogQLParser::ANY, 0);
}
tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ASOF() {
return getToken(HogQLParser::ASOF, 0);
}
HogQLParser::JoinOpLeftRightContext::JoinOpLeftRightContext(JoinOpContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::JoinOpLeftRightContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinOpLeftRight(this);
else
return visitor->visitChildren(this);
}
HogQLParser::JoinOpContext* HogQLParser::joinOp() {
JoinOpContext *_localctx = _tracker.createInstance<JoinOpContext>(_ctx, getState());
enterRule(_localctx, 80, HogQLParser::RuleJoinOp);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(604);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 73, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<HogQLParser::JoinOpInnerContext>(_localctx);
enterOuterAlt(_localctx, 1);
setState(570);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 62, _ctx)) {
case 1: {
setState(562);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0)) {
setState(561);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
setState(564);
match(HogQLParser::INNER);
break;
}
case 2: {
setState(565);
match(HogQLParser::INNER);
setState(567);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0)) {
setState(566);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
break;
}
case 3: {
setState(569);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
default:
break;
}
break;
}
case 2: {
_localctx = _tracker.createInstance<HogQLParser::JoinOpLeftRightContext>(_localctx);
enterOuterAlt(_localctx, 2);
setState(586);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 67, _ctx)) {
case 1: {
setState(573);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) {
setState(572);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
setState(575);
_la = _input->LA(1);
if (!(_la == HogQLParser::LEFT
|| _la == HogQLParser::RIGHT)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(577);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
setState(576);
match(HogQLParser::OUTER);
}
break;
}
case 2: {
setState(579);
_la = _input->LA(1);
if (!(_la == HogQLParser::LEFT
|| _la == HogQLParser::RIGHT)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(581);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
setState(580);
match(HogQLParser::OUTER);
}
setState(584);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) {
setState(583);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
break;
}
default:
break;
}
break;
}
case 3: {
_localctx = _tracker.createInstance<HogQLParser::JoinOpFullContext>(_localctx);
enterOuterAlt(_localctx, 3);
setState(602);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 72, _ctx)) {
case 1: {
setState(589);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ALL
|| _la == HogQLParser::ANY) {
setState(588);
_la = _input->LA(1);
if (!(_la == HogQLParser::ALL
|| _la == HogQLParser::ANY)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
setState(591);
match(HogQLParser::FULL);
setState(593);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
setState(592);
match(HogQLParser::OUTER);
}
break;
}
case 2: {
setState(595);
match(HogQLParser::FULL);
setState(597);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
setState(596);
match(HogQLParser::OUTER);
}
setState(600);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ALL
|| _la == HogQLParser::ANY) {
setState(599);
_la = _input->LA(1);
if (!(_la == HogQLParser::ALL
|| _la == HogQLParser::ANY)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
break;
}
default:
break;
}
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JoinOpCrossContext ------------------------------------------------------------------
HogQLParser::JoinOpCrossContext::JoinOpCrossContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::JoinOpCrossContext::CROSS() {
return getToken(HogQLParser::CROSS, 0);
}
tree::TerminalNode* HogQLParser::JoinOpCrossContext::JOIN() {
return getToken(HogQLParser::JOIN, 0);
}
tree::TerminalNode* HogQLParser::JoinOpCrossContext::COMMA() {
return getToken(HogQLParser::COMMA, 0);
}
size_t HogQLParser::JoinOpCrossContext::getRuleIndex() const {
return HogQLParser::RuleJoinOpCross;
}
std::any HogQLParser::JoinOpCrossContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinOpCross(this);
else
return visitor->visitChildren(this);
}
HogQLParser::JoinOpCrossContext* HogQLParser::joinOpCross() {
JoinOpCrossContext *_localctx = _tracker.createInstance<JoinOpCrossContext>(_ctx, getState());
enterRule(_localctx, 82, HogQLParser::RuleJoinOpCross);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(609);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::CROSS: {
enterOuterAlt(_localctx, 1);
setState(606);
match(HogQLParser::CROSS);
setState(607);
match(HogQLParser::JOIN);
break;
}
case HogQLParser::COMMA: {
enterOuterAlt(_localctx, 2);
setState(608);
match(HogQLParser::COMMA);
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JoinConstraintClauseContext ------------------------------------------------------------------
HogQLParser::JoinConstraintClauseContext::JoinConstraintClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::ON() {
return getToken(HogQLParser::ON, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::JoinConstraintClauseContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::USING() {
return getToken(HogQLParser::USING, 0);
}
tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
size_t HogQLParser::JoinConstraintClauseContext::getRuleIndex() const {
return HogQLParser::RuleJoinConstraintClause;
}
std::any HogQLParser::JoinConstraintClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitJoinConstraintClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::JoinConstraintClauseContext* HogQLParser::joinConstraintClause() {
JoinConstraintClauseContext *_localctx = _tracker.createInstance<JoinConstraintClauseContext>(_ctx, getState());
enterRule(_localctx, 84, HogQLParser::RuleJoinConstraintClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(620);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 75, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(611);
match(HogQLParser::ON);
setState(612);
columnExprList();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(613);
match(HogQLParser::USING);
setState(614);
match(HogQLParser::LPAREN);
setState(615);
columnExprList();
setState(616);
match(HogQLParser::RPAREN);
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(618);
match(HogQLParser::USING);
setState(619);
columnExprList();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SampleClauseContext ------------------------------------------------------------------
HogQLParser::SampleClauseContext::SampleClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::SampleClauseContext::SAMPLE() {
return getToken(HogQLParser::SAMPLE, 0);
}
std::vector<HogQLParser::RatioExprContext *> HogQLParser::SampleClauseContext::ratioExpr() {
return getRuleContexts<HogQLParser::RatioExprContext>();
}
HogQLParser::RatioExprContext* HogQLParser::SampleClauseContext::ratioExpr(size_t i) {
return getRuleContext<HogQLParser::RatioExprContext>(i);
}
tree::TerminalNode* HogQLParser::SampleClauseContext::OFFSET() {
return getToken(HogQLParser::OFFSET, 0);
}
size_t HogQLParser::SampleClauseContext::getRuleIndex() const {
return HogQLParser::RuleSampleClause;
}
std::any HogQLParser::SampleClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSampleClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SampleClauseContext* HogQLParser::sampleClause() {
SampleClauseContext *_localctx = _tracker.createInstance<SampleClauseContext>(_ctx, getState());
enterRule(_localctx, 86, HogQLParser::RuleSampleClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(622);
match(HogQLParser::SAMPLE);
setState(623);
ratioExpr();
setState(626);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 76, _ctx)) {
case 1: {
setState(624);
match(HogQLParser::OFFSET);
setState(625);
ratioExpr();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrderExprListContext ------------------------------------------------------------------
HogQLParser::OrderExprListContext::OrderExprListContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::OrderExprContext *> HogQLParser::OrderExprListContext::orderExpr() {
return getRuleContexts<HogQLParser::OrderExprContext>();
}
HogQLParser::OrderExprContext* HogQLParser::OrderExprListContext::orderExpr(size_t i) {
return getRuleContext<HogQLParser::OrderExprContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::OrderExprListContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::OrderExprListContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::OrderExprListContext::getRuleIndex() const {
return HogQLParser::RuleOrderExprList;
}
std::any HogQLParser::OrderExprListContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitOrderExprList(this);
else
return visitor->visitChildren(this);
}
HogQLParser::OrderExprListContext* HogQLParser::orderExprList() {
OrderExprListContext *_localctx = _tracker.createInstance<OrderExprListContext>(_ctx, getState());
enterRule(_localctx, 88, HogQLParser::RuleOrderExprList);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(628);
orderExpr();
setState(633);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::COMMA) {
setState(629);
match(HogQLParser::COMMA);
setState(630);
orderExpr();
setState(635);
_errHandler->sync(this);
_la = _input->LA(1);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrderExprContext ------------------------------------------------------------------
HogQLParser::OrderExprContext::OrderExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::ColumnExprContext* HogQLParser::OrderExprContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::NULLS() {
return getToken(HogQLParser::NULLS, 0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::COLLATE() {
return getToken(HogQLParser::COLLATE, 0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::STRING_LITERAL() {
return getToken(HogQLParser::STRING_LITERAL, 0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::ASCENDING() {
return getToken(HogQLParser::ASCENDING, 0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::DESCENDING() {
return getToken(HogQLParser::DESCENDING, 0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::DESC() {
return getToken(HogQLParser::DESC, 0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::FIRST() {
return getToken(HogQLParser::FIRST, 0);
}
tree::TerminalNode* HogQLParser::OrderExprContext::LAST() {
return getToken(HogQLParser::LAST, 0);
}
size_t HogQLParser::OrderExprContext::getRuleIndex() const {
return HogQLParser::RuleOrderExpr;
}
std::any HogQLParser::OrderExprContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitOrderExpr(this);
else
return visitor->visitChildren(this);
}
HogQLParser::OrderExprContext* HogQLParser::orderExpr() {
OrderExprContext *_localctx = _tracker.createInstance<OrderExprContext>(_ctx, getState());
enterRule(_localctx, 90, HogQLParser::RuleOrderExpr);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(636);
columnExpr(0);
setState(638);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 12583040) != 0)) {
setState(637);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 12583040) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
setState(642);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NULLS) {
setState(640);
match(HogQLParser::NULLS);
setState(641);
_la = _input->LA(1);
if (!(_la == HogQLParser::FIRST
|| _la == HogQLParser::LAST)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
setState(646);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COLLATE) {
setState(644);
match(HogQLParser::COLLATE);
setState(645);
match(HogQLParser::STRING_LITERAL);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RatioExprContext ------------------------------------------------------------------
HogQLParser::RatioExprContext::RatioExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::PlaceholderContext* HogQLParser::RatioExprContext::placeholder() {
return getRuleContext<HogQLParser::PlaceholderContext>(0);
}
std::vector<HogQLParser::NumberLiteralContext *> HogQLParser::RatioExprContext::numberLiteral() {
return getRuleContexts<HogQLParser::NumberLiteralContext>();
}
HogQLParser::NumberLiteralContext* HogQLParser::RatioExprContext::numberLiteral(size_t i) {
return getRuleContext<HogQLParser::NumberLiteralContext>(i);
}
tree::TerminalNode* HogQLParser::RatioExprContext::SLASH() {
return getToken(HogQLParser::SLASH, 0);
}
size_t HogQLParser::RatioExprContext::getRuleIndex() const {
return HogQLParser::RuleRatioExpr;
}
std::any HogQLParser::RatioExprContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitRatioExpr(this);
else
return visitor->visitChildren(this);
}
HogQLParser::RatioExprContext* HogQLParser::ratioExpr() {
RatioExprContext *_localctx = _tracker.createInstance<RatioExprContext>(_ctx, getState());
enterRule(_localctx, 92, HogQLParser::RuleRatioExpr);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(654);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::LBRACE: {
enterOuterAlt(_localctx, 1);
setState(648);
placeholder();
break;
}
case HogQLParser::INF:
case HogQLParser::NAN_SQL:
case HogQLParser::FLOATING_LITERAL:
case HogQLParser::OCTAL_LITERAL:
case HogQLParser::DECIMAL_LITERAL:
case HogQLParser::HEXADECIMAL_LITERAL:
case HogQLParser::DASH:
case HogQLParser::DOT:
case HogQLParser::PLUS: {
enterOuterAlt(_localctx, 2);
setState(649);
numberLiteral();
setState(652);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 81, _ctx)) {
case 1: {
setState(650);
match(HogQLParser::SLASH);
setState(651);
numberLiteral();
break;
}
default:
break;
}
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SettingExprListContext ------------------------------------------------------------------
HogQLParser::SettingExprListContext::SettingExprListContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::SettingExprContext *> HogQLParser::SettingExprListContext::settingExpr() {
return getRuleContexts<HogQLParser::SettingExprContext>();
}
HogQLParser::SettingExprContext* HogQLParser::SettingExprListContext::settingExpr(size_t i) {
return getRuleContext<HogQLParser::SettingExprContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::SettingExprListContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::SettingExprListContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::SettingExprListContext::getRuleIndex() const {
return HogQLParser::RuleSettingExprList;
}
std::any HogQLParser::SettingExprListContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSettingExprList(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SettingExprListContext* HogQLParser::settingExprList() {
SettingExprListContext *_localctx = _tracker.createInstance<SettingExprListContext>(_ctx, getState());
enterRule(_localctx, 94, HogQLParser::RuleSettingExprList);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(656);
settingExpr();
setState(661);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::COMMA) {
setState(657);
match(HogQLParser::COMMA);
setState(658);
settingExpr();
setState(663);
_errHandler->sync(this);
_la = _input->LA(1);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SettingExprContext ------------------------------------------------------------------
HogQLParser::SettingExprContext::SettingExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::IdentifierContext* HogQLParser::SettingExprContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::SettingExprContext::EQ_SINGLE() {
return getToken(HogQLParser::EQ_SINGLE, 0);
}
HogQLParser::LiteralContext* HogQLParser::SettingExprContext::literal() {
return getRuleContext<HogQLParser::LiteralContext>(0);
}
size_t HogQLParser::SettingExprContext::getRuleIndex() const {
return HogQLParser::RuleSettingExpr;
}
std::any HogQLParser::SettingExprContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitSettingExpr(this);
else
return visitor->visitChildren(this);
}
HogQLParser::SettingExprContext* HogQLParser::settingExpr() {
SettingExprContext *_localctx = _tracker.createInstance<SettingExprContext>(_ctx, getState());
enterRule(_localctx, 96, HogQLParser::RuleSettingExpr);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(664);
identifier();
setState(665);
match(HogQLParser::EQ_SINGLE);
setState(666);
literal();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WindowExprContext ------------------------------------------------------------------
HogQLParser::WindowExprContext::WindowExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::WinPartitionByClauseContext* HogQLParser::WindowExprContext::winPartitionByClause() {
return getRuleContext<HogQLParser::WinPartitionByClauseContext>(0);
}
HogQLParser::WinOrderByClauseContext* HogQLParser::WindowExprContext::winOrderByClause() {
return getRuleContext<HogQLParser::WinOrderByClauseContext>(0);
}
HogQLParser::WinFrameClauseContext* HogQLParser::WindowExprContext::winFrameClause() {
return getRuleContext<HogQLParser::WinFrameClauseContext>(0);
}
size_t HogQLParser::WindowExprContext::getRuleIndex() const {
return HogQLParser::RuleWindowExpr;
}
std::any HogQLParser::WindowExprContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWindowExpr(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WindowExprContext* HogQLParser::windowExpr() {
WindowExprContext *_localctx = _tracker.createInstance<WindowExprContext>(_ctx, getState());
enterRule(_localctx, 98, HogQLParser::RuleWindowExpr);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(669);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::PARTITION) {
setState(668);
winPartitionByClause();
}
setState(672);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ORDER) {
setState(671);
winOrderByClause();
}
setState(675);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::RANGE
|| _la == HogQLParser::ROWS) {
setState(674);
winFrameClause();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WinPartitionByClauseContext ------------------------------------------------------------------
HogQLParser::WinPartitionByClauseContext::WinPartitionByClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::WinPartitionByClauseContext::PARTITION() {
return getToken(HogQLParser::PARTITION, 0);
}
tree::TerminalNode* HogQLParser::WinPartitionByClauseContext::BY() {
return getToken(HogQLParser::BY, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::WinPartitionByClauseContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
size_t HogQLParser::WinPartitionByClauseContext::getRuleIndex() const {
return HogQLParser::RuleWinPartitionByClause;
}
std::any HogQLParser::WinPartitionByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWinPartitionByClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WinPartitionByClauseContext* HogQLParser::winPartitionByClause() {
WinPartitionByClauseContext *_localctx = _tracker.createInstance<WinPartitionByClauseContext>(_ctx, getState());
enterRule(_localctx, 100, HogQLParser::RuleWinPartitionByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(677);
match(HogQLParser::PARTITION);
setState(678);
match(HogQLParser::BY);
setState(679);
columnExprList();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WinOrderByClauseContext ------------------------------------------------------------------
HogQLParser::WinOrderByClauseContext::WinOrderByClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::WinOrderByClauseContext::ORDER() {
return getToken(HogQLParser::ORDER, 0);
}
tree::TerminalNode* HogQLParser::WinOrderByClauseContext::BY() {
return getToken(HogQLParser::BY, 0);
}
HogQLParser::OrderExprListContext* HogQLParser::WinOrderByClauseContext::orderExprList() {
return getRuleContext<HogQLParser::OrderExprListContext>(0);
}
size_t HogQLParser::WinOrderByClauseContext::getRuleIndex() const {
return HogQLParser::RuleWinOrderByClause;
}
std::any HogQLParser::WinOrderByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWinOrderByClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WinOrderByClauseContext* HogQLParser::winOrderByClause() {
WinOrderByClauseContext *_localctx = _tracker.createInstance<WinOrderByClauseContext>(_ctx, getState());
enterRule(_localctx, 102, HogQLParser::RuleWinOrderByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(681);
match(HogQLParser::ORDER);
setState(682);
match(HogQLParser::BY);
setState(683);
orderExprList();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WinFrameClauseContext ------------------------------------------------------------------
HogQLParser::WinFrameClauseContext::WinFrameClauseContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::WinFrameExtendContext* HogQLParser::WinFrameClauseContext::winFrameExtend() {
return getRuleContext<HogQLParser::WinFrameExtendContext>(0);
}
tree::TerminalNode* HogQLParser::WinFrameClauseContext::ROWS() {
return getToken(HogQLParser::ROWS, 0);
}
tree::TerminalNode* HogQLParser::WinFrameClauseContext::RANGE() {
return getToken(HogQLParser::RANGE, 0);
}
size_t HogQLParser::WinFrameClauseContext::getRuleIndex() const {
return HogQLParser::RuleWinFrameClause;
}
std::any HogQLParser::WinFrameClauseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWinFrameClause(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() {
WinFrameClauseContext *_localctx = _tracker.createInstance<WinFrameClauseContext>(_ctx, getState());
enterRule(_localctx, 104, HogQLParser::RuleWinFrameClause);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(685);
_la = _input->LA(1);
if (!(_la == HogQLParser::RANGE
|| _la == HogQLParser::ROWS)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(686);
winFrameExtend();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WinFrameExtendContext ------------------------------------------------------------------
HogQLParser::WinFrameExtendContext::WinFrameExtendContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::WinFrameExtendContext::getRuleIndex() const {
return HogQLParser::RuleWinFrameExtend;
}
void HogQLParser::WinFrameExtendContext::copyFrom(WinFrameExtendContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- FrameStartContext ------------------------------------------------------------------
HogQLParser::WinFrameBoundContext* HogQLParser::FrameStartContext::winFrameBound() {
return getRuleContext<HogQLParser::WinFrameBoundContext>(0);
}
HogQLParser::FrameStartContext::FrameStartContext(WinFrameExtendContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::FrameStartContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitFrameStart(this);
else
return visitor->visitChildren(this);
}
//----------------- FrameBetweenContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::FrameBetweenContext::BETWEEN() {
return getToken(HogQLParser::BETWEEN, 0);
}
std::vector<HogQLParser::WinFrameBoundContext *> HogQLParser::FrameBetweenContext::winFrameBound() {
return getRuleContexts<HogQLParser::WinFrameBoundContext>();
}
HogQLParser::WinFrameBoundContext* HogQLParser::FrameBetweenContext::winFrameBound(size_t i) {
return getRuleContext<HogQLParser::WinFrameBoundContext>(i);
}
tree::TerminalNode* HogQLParser::FrameBetweenContext::AND() {
return getToken(HogQLParser::AND, 0);
}
HogQLParser::FrameBetweenContext::FrameBetweenContext(WinFrameExtendContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::FrameBetweenContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitFrameBetween(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() {
WinFrameExtendContext *_localctx = _tracker.createInstance<WinFrameExtendContext>(_ctx, getState());
enterRule(_localctx, 106, HogQLParser::RuleWinFrameExtend);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(694);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::CURRENT:
case HogQLParser::INF:
case HogQLParser::NAN_SQL:
case HogQLParser::UNBOUNDED:
case HogQLParser::FLOATING_LITERAL:
case HogQLParser::OCTAL_LITERAL:
case HogQLParser::DECIMAL_LITERAL:
case HogQLParser::HEXADECIMAL_LITERAL:
case HogQLParser::DASH:
case HogQLParser::DOT:
case HogQLParser::PLUS: {
_localctx = _tracker.createInstance<HogQLParser::FrameStartContext>(_localctx);
enterOuterAlt(_localctx, 1);
setState(688);
winFrameBound();
break;
}
case HogQLParser::BETWEEN: {
_localctx = _tracker.createInstance<HogQLParser::FrameBetweenContext>(_localctx);
enterOuterAlt(_localctx, 2);
setState(689);
match(HogQLParser::BETWEEN);
setState(690);
winFrameBound();
setState(691);
match(HogQLParser::AND);
setState(692);
winFrameBound();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WinFrameBoundContext ------------------------------------------------------------------
HogQLParser::WinFrameBoundContext::WinFrameBoundContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::WinFrameBoundContext::CURRENT() {
return getToken(HogQLParser::CURRENT, 0);
}
tree::TerminalNode* HogQLParser::WinFrameBoundContext::ROW() {
return getToken(HogQLParser::ROW, 0);
}
tree::TerminalNode* HogQLParser::WinFrameBoundContext::UNBOUNDED() {
return getToken(HogQLParser::UNBOUNDED, 0);
}
tree::TerminalNode* HogQLParser::WinFrameBoundContext::PRECEDING() {
return getToken(HogQLParser::PRECEDING, 0);
}
tree::TerminalNode* HogQLParser::WinFrameBoundContext::FOLLOWING() {
return getToken(HogQLParser::FOLLOWING, 0);
}
HogQLParser::NumberLiteralContext* HogQLParser::WinFrameBoundContext::numberLiteral() {
return getRuleContext<HogQLParser::NumberLiteralContext>(0);
}
size_t HogQLParser::WinFrameBoundContext::getRuleIndex() const {
return HogQLParser::RuleWinFrameBound;
}
std::any HogQLParser::WinFrameBoundContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWinFrameBound(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WinFrameBoundContext* HogQLParser::winFrameBound() {
WinFrameBoundContext *_localctx = _tracker.createInstance<WinFrameBoundContext>(_ctx, getState());
enterRule(_localctx, 108, HogQLParser::RuleWinFrameBound);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(708);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 88, _ctx)) {
case 1: {
setState(696);
match(HogQLParser::CURRENT);
setState(697);
match(HogQLParser::ROW);
break;
}
case 2: {
setState(698);
match(HogQLParser::UNBOUNDED);
setState(699);
match(HogQLParser::PRECEDING);
break;
}
case 3: {
setState(700);
match(HogQLParser::UNBOUNDED);
setState(701);
match(HogQLParser::FOLLOWING);
break;
}
case 4: {
setState(702);
numberLiteral();
setState(703);
match(HogQLParser::PRECEDING);
break;
}
case 5: {
setState(705);
numberLiteral();
setState(706);
match(HogQLParser::FOLLOWING);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExprContext ------------------------------------------------------------------
HogQLParser::ExprContext::ExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::ColumnExprContext* HogQLParser::ExprContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ExprContext::EOF() {
return getToken(HogQLParser::EOF, 0);
}
size_t HogQLParser::ExprContext::getRuleIndex() const {
return HogQLParser::RuleExpr;
}
std::any HogQLParser::ExprContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitExpr(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ExprContext* HogQLParser::expr() {
ExprContext *_localctx = _tracker.createInstance<ExprContext>(_ctx, getState());
enterRule(_localctx, 110, HogQLParser::RuleExpr);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(710);
columnExpr(0);
setState(711);
match(HogQLParser::EOF);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ColumnTypeExprContext ------------------------------------------------------------------
HogQLParser::ColumnTypeExprContext::ColumnTypeExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::ColumnTypeExprContext::getRuleIndex() const {
return HogQLParser::RuleColumnTypeExpr;
}
void HogQLParser::ColumnTypeExprContext::copyFrom(ColumnTypeExprContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- ColumnTypeExprNestedContext ------------------------------------------------------------------
std::vector<HogQLParser::IdentifierContext *> HogQLParser::ColumnTypeExprNestedContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprNestedContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprNestedContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
std::vector<HogQLParser::ColumnTypeExprContext *> HogQLParser::ColumnTypeExprNestedContext::columnTypeExpr() {
return getRuleContexts<HogQLParser::ColumnTypeExprContext>();
}
HogQLParser::ColumnTypeExprContext* HogQLParser::ColumnTypeExprNestedContext::columnTypeExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnTypeExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprNestedContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnTypeExprNestedContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprNestedContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
HogQLParser::ColumnTypeExprNestedContext::ColumnTypeExprNestedContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnTypeExprNestedContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnTypeExprNested(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprParamContext ------------------------------------------------------------------
HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprParamContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprParamContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprParamContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::ColumnTypeExprParamContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
HogQLParser::ColumnTypeExprParamContext::ColumnTypeExprParamContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnTypeExprParamContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnTypeExprParam(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprSimpleContext ------------------------------------------------------------------
HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprSimpleContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
HogQLParser::ColumnTypeExprSimpleContext::ColumnTypeExprSimpleContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnTypeExprSimpleContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnTypeExprSimple(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprComplexContext ------------------------------------------------------------------
HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprComplexContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprComplexContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
std::vector<HogQLParser::ColumnTypeExprContext *> HogQLParser::ColumnTypeExprComplexContext::columnTypeExpr() {
return getRuleContexts<HogQLParser::ColumnTypeExprContext>();
}
HogQLParser::ColumnTypeExprContext* HogQLParser::ColumnTypeExprComplexContext::columnTypeExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnTypeExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprComplexContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnTypeExprComplexContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprComplexContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
HogQLParser::ColumnTypeExprComplexContext::ColumnTypeExprComplexContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnTypeExprComplexContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnTypeExprComplex(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprEnumContext ------------------------------------------------------------------
HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprEnumContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprEnumContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
std::vector<HogQLParser::EnumValueContext *> HogQLParser::ColumnTypeExprEnumContext::enumValue() {
return getRuleContexts<HogQLParser::EnumValueContext>();
}
HogQLParser::EnumValueContext* HogQLParser::ColumnTypeExprEnumContext::enumValue(size_t i) {
return getRuleContext<HogQLParser::EnumValueContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprEnumContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnTypeExprEnumContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::ColumnTypeExprEnumContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
HogQLParser::ColumnTypeExprEnumContext::ColumnTypeExprEnumContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnTypeExprEnumContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnTypeExprEnum(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
ColumnTypeExprContext *_localctx = _tracker.createInstance<ColumnTypeExprContext>(_ctx, getState());
enterRule(_localctx, 112, HogQLParser::RuleColumnTypeExpr);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
setState(769);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 96, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprSimpleContext>(_localctx);
enterOuterAlt(_localctx, 1);
setState(713);
identifier();
break;
}
case 2: {
_localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprNestedContext>(_localctx);
enterOuterAlt(_localctx, 2);
setState(714);
identifier();
setState(715);
match(HogQLParser::LPAREN);
setState(716);
identifier();
setState(717);
columnTypeExpr();
setState(724);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 89, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(718);
match(HogQLParser::COMMA);
setState(719);
identifier();
setState(720);
columnTypeExpr();
}
setState(726);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 89, _ctx);
}
setState(728);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(727);
match(HogQLParser::COMMA);
}
setState(730);
match(HogQLParser::RPAREN);
break;
}
case 3: {
_localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprEnumContext>(_localctx);
enterOuterAlt(_localctx, 3);
setState(732);
identifier();
setState(733);
match(HogQLParser::LPAREN);
setState(734);
enumValue();
setState(739);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 91, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(735);
match(HogQLParser::COMMA);
setState(736);
enumValue();
}
setState(741);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 91, _ctx);
}
setState(743);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(742);
match(HogQLParser::COMMA);
}
setState(745);
match(HogQLParser::RPAREN);
break;
}
case 4: {
_localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprComplexContext>(_localctx);
enterOuterAlt(_localctx, 4);
setState(747);
identifier();
setState(748);
match(HogQLParser::LPAREN);
setState(749);
columnTypeExpr();
setState(754);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 93, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(750);
match(HogQLParser::COMMA);
setState(751);
columnTypeExpr();
}
setState(756);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 93, _ctx);
}
setState(758);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(757);
match(HogQLParser::COMMA);
}
setState(760);
match(HogQLParser::RPAREN);
break;
}
case 5: {
_localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprParamContext>(_localctx);
enterOuterAlt(_localctx, 5);
setState(762);
identifier();
setState(763);
match(HogQLParser::LPAREN);
setState(765);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(764);
columnExprList();
}
setState(767);
match(HogQLParser::RPAREN);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ColumnExprListContext ------------------------------------------------------------------
HogQLParser::ColumnExprListContext::ColumnExprListContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprListContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprListContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprListContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::ColumnExprListContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::ColumnExprListContext::getRuleIndex() const {
return HogQLParser::RuleColumnExprList;
}
std::any HogQLParser::ColumnExprListContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprList(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ColumnExprListContext* HogQLParser::columnExprList() {
ColumnExprListContext *_localctx = _tracker.createInstance<ColumnExprListContext>(_ctx, getState());
enterRule(_localctx, 114, HogQLParser::RuleColumnExprList);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(771);
columnExpr(0);
setState(776);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 97, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(772);
match(HogQLParser::COMMA);
setState(773);
columnExpr(0);
}
setState(778);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 97, _ctx);
}
setState(780);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 98, _ctx)) {
case 1: {
setState(779);
match(HogQLParser::COMMA);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ColumnExprContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext::ColumnExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::ColumnExprContext::getRuleIndex() const {
return HogQLParser::RuleColumnExpr;
}
void HogQLParser::ColumnExprContext::copyFrom(ColumnExprContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- ColumnExprTernaryOpContext ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprTernaryOpContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprTernaryOpContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprTernaryOpContext::QUERY() {
return getToken(HogQLParser::QUERY, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprTernaryOpContext::COLON() {
return getToken(HogQLParser::COLON, 0);
}
HogQLParser::ColumnExprTernaryOpContext::ColumnExprTernaryOpContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprTernaryOpContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprTernaryOp(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprAliasContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprAliasContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprAliasContext::AS() {
return getToken(HogQLParser::AS, 0);
}
HogQLParser::IdentifierContext* HogQLParser::ColumnExprAliasContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprAliasContext::STRING_LITERAL() {
return getToken(HogQLParser::STRING_LITERAL, 0);
}
HogQLParser::ColumnExprAliasContext::ColumnExprAliasContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprAliasContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprAlias(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprNegateContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprNegateContext::DASH() {
return getToken(HogQLParser::DASH, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNegateContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
HogQLParser::ColumnExprNegateContext::ColumnExprNegateContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprNegateContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprNegate(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprDictContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprDictContext::LBRACE() {
return getToken(HogQLParser::LBRACE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprDictContext::RBRACE() {
return getToken(HogQLParser::RBRACE, 0);
}
HogQLParser::KvPairListContext* HogQLParser::ColumnExprDictContext::kvPairList() {
return getRuleContext<HogQLParser::KvPairListContext>(0);
}
HogQLParser::ColumnExprDictContext::ColumnExprDictContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprDictContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprDict(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprSubqueryContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprSubqueryContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::SelectUnionStmtContext* HogQLParser::ColumnExprSubqueryContext::selectUnionStmt() {
return getRuleContext<HogQLParser::SelectUnionStmtContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprSubqueryContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::ColumnExprSubqueryContext::ColumnExprSubqueryContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprSubqueryContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprSubquery(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprLiteralContext ------------------------------------------------------------------
HogQLParser::LiteralContext* HogQLParser::ColumnExprLiteralContext::literal() {
return getRuleContext<HogQLParser::LiteralContext>(0);
}
HogQLParser::ColumnExprLiteralContext::ColumnExprLiteralContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprLiteral(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprArrayContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprArrayContext::LBRACKET() {
return getToken(HogQLParser::LBRACKET, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprArrayContext::RBRACKET() {
return getToken(HogQLParser::RBRACKET, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprArrayContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
HogQLParser::ColumnExprArrayContext::ColumnExprArrayContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprArrayContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprArray(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprSubstringContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::SUBSTRING() {
return getToken(HogQLParser::SUBSTRING, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprSubstringContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprSubstringContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::FROM() {
return getToken(HogQLParser::FROM, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::FOR() {
return getToken(HogQLParser::FOR, 0);
}
HogQLParser::ColumnExprSubstringContext::ColumnExprSubstringContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprSubstringContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprSubstring(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprCastContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprCastContext::CAST() {
return getToken(HogQLParser::CAST, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprCastContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprCastContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprCastContext::AS() {
return getToken(HogQLParser::AS, 0);
}
HogQLParser::ColumnTypeExprContext* HogQLParser::ColumnExprCastContext::columnTypeExpr() {
return getRuleContext<HogQLParser::ColumnTypeExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprCastContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::ColumnExprCastContext::ColumnExprCastContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprCastContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprCast(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprOrContext ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprOrContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprOrContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprOrContext::OR() {
return getToken(HogQLParser::OR, 0);
}
HogQLParser::ColumnExprOrContext::ColumnExprOrContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprOrContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprOr(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprNullTupleAccessContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullTupleAccessContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprNullTupleAccessContext::NULL_PROPERTY() {
return getToken(HogQLParser::NULL_PROPERTY, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprNullTupleAccessContext::DECIMAL_LITERAL() {
return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}
HogQLParser::ColumnExprNullTupleAccessContext::ColumnExprNullTupleAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprNullTupleAccessContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprNullTupleAccess(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprPrecedence1Context ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprPrecedence1Context::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPrecedence1Context::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence1Context::ASTERISK() {
return getToken(HogQLParser::ASTERISK, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence1Context::SLASH() {
return getToken(HogQLParser::SLASH, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence1Context::PERCENT() {
return getToken(HogQLParser::PERCENT, 0);
}
HogQLParser::ColumnExprPrecedence1Context::ColumnExprPrecedence1Context(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprPrecedence1Context::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprPrecedence1(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprPrecedence2Context ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprPrecedence2Context::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPrecedence2Context::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence2Context::PLUS() {
return getToken(HogQLParser::PLUS, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence2Context::DASH() {
return getToken(HogQLParser::DASH, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence2Context::CONCAT() {
return getToken(HogQLParser::CONCAT, 0);
}
HogQLParser::ColumnExprPrecedence2Context::ColumnExprPrecedence2Context(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprPrecedence2Context::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprPrecedence2(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprPrecedence3Context ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprPrecedence3Context::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPrecedence3Context::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::IN() {
return getToken(HogQLParser::IN, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::EQ_DOUBLE() {
return getToken(HogQLParser::EQ_DOUBLE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::EQ_SINGLE() {
return getToken(HogQLParser::EQ_SINGLE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT_EQ() {
return getToken(HogQLParser::NOT_EQ, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::LT_EQ() {
return getToken(HogQLParser::LT_EQ, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::LT() {
return getToken(HogQLParser::LT, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::GT_EQ() {
return getToken(HogQLParser::GT_EQ, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::GT() {
return getToken(HogQLParser::GT, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::LIKE() {
return getToken(HogQLParser::LIKE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::ILIKE() {
return getToken(HogQLParser::ILIKE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::REGEX_SINGLE() {
return getToken(HogQLParser::REGEX_SINGLE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::REGEX_DOUBLE() {
return getToken(HogQLParser::REGEX_DOUBLE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT_REGEX() {
return getToken(HogQLParser::NOT_REGEX, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::IREGEX_SINGLE() {
return getToken(HogQLParser::IREGEX_SINGLE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::IREGEX_DOUBLE() {
return getToken(HogQLParser::IREGEX_DOUBLE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT_IREGEX() {
return getToken(HogQLParser::NOT_IREGEX, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::COHORT() {
return getToken(HogQLParser::COHORT, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT() {
return getToken(HogQLParser::NOT, 0);
}
HogQLParser::ColumnExprPrecedence3Context::ColumnExprPrecedence3Context(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprPrecedence3Context::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprPrecedence3(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprIntervalContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprIntervalContext::INTERVAL() {
return getToken(HogQLParser::INTERVAL, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprIntervalContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
HogQLParser::IntervalContext* HogQLParser::ColumnExprIntervalContext::interval() {
return getRuleContext<HogQLParser::IntervalContext>(0);
}
HogQLParser::ColumnExprIntervalContext::ColumnExprIntervalContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprIntervalContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprInterval(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprIsNullContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprIsNullContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprIsNullContext::IS() {
return getToken(HogQLParser::IS, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprIsNullContext::NULL_SQL() {
return getToken(HogQLParser::NULL_SQL, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprIsNullContext::NOT() {
return getToken(HogQLParser::NOT, 0);
}
HogQLParser::ColumnExprIsNullContext::ColumnExprIsNullContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprIsNullContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprIsNull(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprWinFunctionTargetContext ------------------------------------------------------------------
std::vector<HogQLParser::IdentifierContext *> HogQLParser::ColumnExprWinFunctionTargetContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::ColumnExprWinFunctionTargetContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::OVER() {
return getToken(HogQLParser::OVER, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionTargetContext::LPAREN() {
return getTokens(HogQLParser::LPAREN);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::LPAREN(size_t i) {
return getToken(HogQLParser::LPAREN, i);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionTargetContext::RPAREN() {
return getTokens(HogQLParser::RPAREN);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::RPAREN(size_t i) {
return getToken(HogQLParser::RPAREN, i);
}
std::vector<HogQLParser::ColumnExprListContext *> HogQLParser::ColumnExprWinFunctionTargetContext::columnExprList() {
return getRuleContexts<HogQLParser::ColumnExprListContext>();
}
HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprWinFunctionTargetContext::columnExprList(size_t i) {
return getRuleContext<HogQLParser::ColumnExprListContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::DISTINCT() {
return getToken(HogQLParser::DISTINCT, 0);
}
HogQLParser::ColumnExprWinFunctionTargetContext::ColumnExprWinFunctionTargetContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprWinFunctionTargetContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprWinFunctionTarget(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprNullPropertyAccessContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullPropertyAccessContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprNullPropertyAccessContext::NULL_PROPERTY() {
return getToken(HogQLParser::NULL_PROPERTY, 0);
}
HogQLParser::IdentifierContext* HogQLParser::ColumnExprNullPropertyAccessContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
HogQLParser::ColumnExprNullPropertyAccessContext::ColumnExprNullPropertyAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprNullPropertyAccessContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprNullPropertyAccess(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprTrimContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprTrimContext::TRIM() {
return getToken(HogQLParser::TRIM, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprTrimContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::StringContext* HogQLParser::ColumnExprTrimContext::string() {
return getRuleContext<HogQLParser::StringContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprTrimContext::FROM() {
return getToken(HogQLParser::FROM, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprTrimContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprTrimContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprTrimContext::BOTH() {
return getToken(HogQLParser::BOTH, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprTrimContext::LEADING() {
return getToken(HogQLParser::LEADING, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprTrimContext::TRAILING() {
return getToken(HogQLParser::TRAILING, 0);
}
HogQLParser::ColumnExprTrimContext::ColumnExprTrimContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprTrimContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprTrim(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprTagElementContext ------------------------------------------------------------------
HogQLParser::HogqlxTagElementContext* HogQLParser::ColumnExprTagElementContext::hogqlxTagElement() {
return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}
HogQLParser::ColumnExprTagElementContext::ColumnExprTagElementContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprTagElementContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprTagElement(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprTemplateStringContext ------------------------------------------------------------------
HogQLParser::TemplateStringContext* HogQLParser::ColumnExprTemplateStringContext::templateString() {
return getRuleContext<HogQLParser::TemplateStringContext>(0);
}
HogQLParser::ColumnExprTemplateStringContext::ColumnExprTemplateStringContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprTemplateStringContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprTemplateString(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprTupleContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprTupleContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprTupleContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprTupleContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::ColumnExprTupleContext::ColumnExprTupleContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprTupleContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprTuple(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprCallContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprCallContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprCallContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprCallContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprCallContext::columnExprList() {
return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}
HogQLParser::ColumnExprCallContext::ColumnExprCallContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprCallContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprCall(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprArrayAccessContext ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprArrayAccessContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprArrayAccessContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprArrayAccessContext::LBRACKET() {
return getToken(HogQLParser::LBRACKET, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprArrayAccessContext::RBRACKET() {
return getToken(HogQLParser::RBRACKET, 0);
}
HogQLParser::ColumnExprArrayAccessContext::ColumnExprArrayAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprArrayAccessContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprArrayAccess(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprBetweenContext ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprBetweenContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprBetweenContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprBetweenContext::BETWEEN() {
return getToken(HogQLParser::BETWEEN, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprBetweenContext::AND() {
return getToken(HogQLParser::AND, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprBetweenContext::NOT() {
return getToken(HogQLParser::NOT, 0);
}
HogQLParser::ColumnExprBetweenContext::ColumnExprBetweenContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprBetweenContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprBetween(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprPropertyAccessContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPropertyAccessContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprPropertyAccessContext::DOT() {
return getToken(HogQLParser::DOT, 0);
}
HogQLParser::IdentifierContext* HogQLParser::ColumnExprPropertyAccessContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
HogQLParser::ColumnExprPropertyAccessContext::ColumnExprPropertyAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprPropertyAccessContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprPropertyAccess(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprParensContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprParensContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprParensContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprParensContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::ColumnExprParensContext::ColumnExprParensContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprParensContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprParens(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprNullArrayAccessContext ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprNullArrayAccessContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullArrayAccessContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprNullArrayAccessContext::NULL_PROPERTY() {
return getToken(HogQLParser::NULL_PROPERTY, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprNullArrayAccessContext::LBRACKET() {
return getToken(HogQLParser::LBRACKET, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprNullArrayAccessContext::RBRACKET() {
return getToken(HogQLParser::RBRACKET, 0);
}
HogQLParser::ColumnExprNullArrayAccessContext::ColumnExprNullArrayAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprNullArrayAccessContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprNullArrayAccess(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprTimestampContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprTimestampContext::TIMESTAMP() {
return getToken(HogQLParser::TIMESTAMP, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprTimestampContext::STRING_LITERAL() {
return getToken(HogQLParser::STRING_LITERAL, 0);
}
HogQLParser::ColumnExprTimestampContext::ColumnExprTimestampContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprTimestampContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprTimestamp(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprNullishContext ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprNullishContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullishContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprNullishContext::NULLISH() {
return getToken(HogQLParser::NULLISH, 0);
}
HogQLParser::ColumnExprNullishContext::ColumnExprNullishContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprNullishContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprNullish(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprAndContext ------------------------------------------------------------------
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprAndContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprAndContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprAndContext::AND() {
return getToken(HogQLParser::AND, 0);
}
HogQLParser::ColumnExprAndContext::ColumnExprAndContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprAndContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprAnd(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprTupleAccessContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprTupleAccessContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprTupleAccessContext::DOT() {
return getToken(HogQLParser::DOT, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprTupleAccessContext::DECIMAL_LITERAL() {
return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}
HogQLParser::ColumnExprTupleAccessContext::ColumnExprTupleAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprTupleAccessContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprTupleAccess(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprCaseContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprCaseContext::CASE() {
return getToken(HogQLParser::CASE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprCaseContext::END() {
return getToken(HogQLParser::END, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprCaseContext::WHEN() {
return getTokens(HogQLParser::WHEN);
}
tree::TerminalNode* HogQLParser::ColumnExprCaseContext::WHEN(size_t i) {
return getToken(HogQLParser::WHEN, i);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprCaseContext::THEN() {
return getTokens(HogQLParser::THEN);
}
tree::TerminalNode* HogQLParser::ColumnExprCaseContext::THEN(size_t i) {
return getToken(HogQLParser::THEN, i);
}
tree::TerminalNode* HogQLParser::ColumnExprCaseContext::ELSE() {
return getToken(HogQLParser::ELSE, 0);
}
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprCaseContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprCaseContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
HogQLParser::ColumnExprCaseContext::ColumnExprCaseContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprCaseContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprCase(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprDateContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprDateContext::DATE() {
return getToken(HogQLParser::DATE, 0);
}
tree::TerminalNode* HogQLParser::ColumnExprDateContext::STRING_LITERAL() {
return getToken(HogQLParser::STRING_LITERAL, 0);
}
HogQLParser::ColumnExprDateContext::ColumnExprDateContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprDateContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprDate(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprNotContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprNotContext::NOT() {
return getToken(HogQLParser::NOT, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNotContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
HogQLParser::ColumnExprNotContext::ColumnExprNotContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprNotContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprNot(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprWinFunctionContext ------------------------------------------------------------------
HogQLParser::IdentifierContext* HogQLParser::ColumnExprWinFunctionContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::OVER() {
return getToken(HogQLParser::OVER, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionContext::LPAREN() {
return getTokens(HogQLParser::LPAREN);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::LPAREN(size_t i) {
return getToken(HogQLParser::LPAREN, i);
}
HogQLParser::WindowExprContext* HogQLParser::ColumnExprWinFunctionContext::windowExpr() {
return getRuleContext<HogQLParser::WindowExprContext>(0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionContext::RPAREN() {
return getTokens(HogQLParser::RPAREN);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::RPAREN(size_t i) {
return getToken(HogQLParser::RPAREN, i);
}
std::vector<HogQLParser::ColumnExprListContext *> HogQLParser::ColumnExprWinFunctionContext::columnExprList() {
return getRuleContexts<HogQLParser::ColumnExprListContext>();
}
HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprWinFunctionContext::columnExprList(size_t i) {
return getRuleContext<HogQLParser::ColumnExprListContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::DISTINCT() {
return getToken(HogQLParser::DISTINCT, 0);
}
HogQLParser::ColumnExprWinFunctionContext::ColumnExprWinFunctionContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprWinFunctionContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprWinFunction(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprLambdaContext ------------------------------------------------------------------
HogQLParser::ColumnLambdaExprContext* HogQLParser::ColumnExprLambdaContext::columnLambdaExpr() {
return getRuleContext<HogQLParser::ColumnLambdaExprContext>(0);
}
HogQLParser::ColumnExprLambdaContext::ColumnExprLambdaContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprLambdaContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprLambda(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprIdentifierContext ------------------------------------------------------------------
HogQLParser::ColumnIdentifierContext* HogQLParser::ColumnExprIdentifierContext::columnIdentifier() {
return getRuleContext<HogQLParser::ColumnIdentifierContext>(0);
}
HogQLParser::ColumnExprIdentifierContext::ColumnExprIdentifierContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprIdentifier(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprFunctionContext ------------------------------------------------------------------
HogQLParser::IdentifierContext* HogQLParser::ColumnExprFunctionContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprFunctionContext::LPAREN() {
return getTokens(HogQLParser::LPAREN);
}
tree::TerminalNode* HogQLParser::ColumnExprFunctionContext::LPAREN(size_t i) {
return getToken(HogQLParser::LPAREN, i);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnExprFunctionContext::RPAREN() {
return getTokens(HogQLParser::RPAREN);
}
tree::TerminalNode* HogQLParser::ColumnExprFunctionContext::RPAREN(size_t i) {
return getToken(HogQLParser::RPAREN, i);
}
tree::TerminalNode* HogQLParser::ColumnExprFunctionContext::DISTINCT() {
return getToken(HogQLParser::DISTINCT, 0);
}
std::vector<HogQLParser::ColumnExprListContext *> HogQLParser::ColumnExprFunctionContext::columnExprList() {
return getRuleContexts<HogQLParser::ColumnExprListContext>();
}
HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprFunctionContext::columnExprList(size_t i) {
return getRuleContext<HogQLParser::ColumnExprListContext>(i);
}
HogQLParser::ColumnExprFunctionContext::ColumnExprFunctionContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprFunctionContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprFunction(this);
else
return visitor->visitChildren(this);
}
//----------------- ColumnExprAsteriskContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::ColumnExprAsteriskContext::ASTERISK() {
return getToken(HogQLParser::ASTERISK, 0);
}
HogQLParser::TableIdentifierContext* HogQLParser::ColumnExprAsteriskContext::tableIdentifier() {
return getRuleContext<HogQLParser::TableIdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnExprAsteriskContext::DOT() {
return getToken(HogQLParser::DOT, 0);
}
HogQLParser::ColumnExprAsteriskContext::ColumnExprAsteriskContext(ColumnExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::ColumnExprAsteriskContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnExprAsterisk(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ColumnExprContext* HogQLParser::columnExpr() {
return columnExpr(0);
}
HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
ParserRuleContext *parentContext = _ctx;
size_t parentState = getState();
HogQLParser::ColumnExprContext *_localctx = _tracker.createInstance<ColumnExprContext>(_ctx, parentState);
HogQLParser::ColumnExprContext *previousContext = _localctx;
(void)previousContext; // Silence compiler, in case the context is not used by generated code.
size_t startState = 116;
enterRecursionRule(_localctx, 116, HogQLParser::RuleColumnExpr, precedence);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
unrollRecursionContexts(parentContext);
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(932);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 118, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<ColumnExprCaseContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(783);
match(HogQLParser::CASE);
setState(785);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 99, _ctx)) {
case 1: {
setState(784);
antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->caseExpr = columnExpr(0);
break;
}
default:
break;
}
setState(792);
_errHandler->sync(this);
_la = _input->LA(1);
do {
setState(787);
match(HogQLParser::WHEN);
setState(788);
antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->whenExpr = columnExpr(0);
setState(789);
match(HogQLParser::THEN);
setState(790);
antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->thenExpr = columnExpr(0);
setState(794);
_errHandler->sync(this);
_la = _input->LA(1);
} while (_la == HogQLParser::WHEN);
setState(798);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ELSE) {
setState(796);
match(HogQLParser::ELSE);
setState(797);
antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->elseExpr = columnExpr(0);
}
setState(800);
match(HogQLParser::END);
break;
}
case 2: {
_localctx = _tracker.createInstance<ColumnExprCastContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(802);
match(HogQLParser::CAST);
setState(803);
match(HogQLParser::LPAREN);
setState(804);
columnExpr(0);
setState(805);
match(HogQLParser::AS);
setState(806);
columnTypeExpr();
setState(807);
match(HogQLParser::RPAREN);
break;
}
case 3: {
_localctx = _tracker.createInstance<ColumnExprDateContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(809);
match(HogQLParser::DATE);
setState(810);
match(HogQLParser::STRING_LITERAL);
break;
}
case 4: {
_localctx = _tracker.createInstance<ColumnExprIntervalContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(811);
match(HogQLParser::INTERVAL);
setState(812);
columnExpr(0);
setState(813);
interval();
break;
}
case 5: {
_localctx = _tracker.createInstance<ColumnExprSubstringContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(815);
match(HogQLParser::SUBSTRING);
setState(816);
match(HogQLParser::LPAREN);
setState(817);
columnExpr(0);
setState(818);
match(HogQLParser::FROM);
setState(819);
columnExpr(0);
setState(822);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::FOR) {
setState(820);
match(HogQLParser::FOR);
setState(821);
columnExpr(0);
}
setState(824);
match(HogQLParser::RPAREN);
break;
}
case 6: {
_localctx = _tracker.createInstance<ColumnExprTimestampContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(826);
match(HogQLParser::TIMESTAMP);
setState(827);
match(HogQLParser::STRING_LITERAL);
break;
}
case 7: {
_localctx = _tracker.createInstance<ColumnExprTrimContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(828);
match(HogQLParser::TRIM);
setState(829);
match(HogQLParser::LPAREN);
setState(830);
_la = _input->LA(1);
if (!(_la == HogQLParser::BOTH
|| _la == HogQLParser::LEADING || _la == HogQLParser::TRAILING)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(831);
string();
setState(832);
match(HogQLParser::FROM);
setState(833);
columnExpr(0);
setState(834);
match(HogQLParser::RPAREN);
break;
}
case 8: {
_localctx = _tracker.createInstance<ColumnExprWinFunctionContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(836);
identifier();
setState(837);
match(HogQLParser::LPAREN);
setState(839);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(838);
antlrcpp::downCast<ColumnExprWinFunctionContext *>(_localctx)->columnExprs = columnExprList();
}
setState(841);
match(HogQLParser::RPAREN);
setState(851);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::LPAREN) {
setState(843);
match(HogQLParser::LPAREN);
setState(845);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 104, _ctx)) {
case 1: {
setState(844);
match(HogQLParser::DISTINCT);
break;
}
default:
break;
}
setState(848);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(847);
antlrcpp::downCast<ColumnExprWinFunctionContext *>(_localctx)->columnArgList = columnExprList();
}
setState(850);
match(HogQLParser::RPAREN);
}
setState(853);
match(HogQLParser::OVER);
setState(854);
match(HogQLParser::LPAREN);
setState(855);
windowExpr();
setState(856);
match(HogQLParser::RPAREN);
break;
}
case 9: {
_localctx = _tracker.createInstance<ColumnExprWinFunctionTargetContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(858);
identifier();
setState(859);
match(HogQLParser::LPAREN);
setState(861);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(860);
antlrcpp::downCast<ColumnExprWinFunctionTargetContext *>(_localctx)->columnExprs = columnExprList();
}
setState(863);
match(HogQLParser::RPAREN);
setState(873);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::LPAREN) {
setState(865);
match(HogQLParser::LPAREN);
setState(867);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 108, _ctx)) {
case 1: {
setState(866);
match(HogQLParser::DISTINCT);
break;
}
default:
break;
}
setState(870);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(869);
antlrcpp::downCast<ColumnExprWinFunctionTargetContext *>(_localctx)->columnArgList = columnExprList();
}
setState(872);
match(HogQLParser::RPAREN);
}
setState(875);
match(HogQLParser::OVER);
setState(876);
identifier();
break;
}
case 10: {
_localctx = _tracker.createInstance<ColumnExprFunctionContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(878);
identifier();
setState(884);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 112, _ctx)) {
case 1: {
setState(879);
match(HogQLParser::LPAREN);
setState(881);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(880);
antlrcpp::downCast<ColumnExprFunctionContext *>(_localctx)->columnExprs = columnExprList();
}
setState(883);
match(HogQLParser::RPAREN);
break;
}
default:
break;
}
setState(886);
match(HogQLParser::LPAREN);
setState(888);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 113, _ctx)) {
case 1: {
setState(887);
match(HogQLParser::DISTINCT);
break;
}
default:
break;
}
setState(891);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(890);
antlrcpp::downCast<ColumnExprFunctionContext *>(_localctx)->columnArgList = columnExprList();
}
setState(893);
match(HogQLParser::RPAREN);
break;
}
case 11: {
_localctx = _tracker.createInstance<ColumnExprTagElementContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(895);
hogqlxTagElement();
break;
}
case 12: {
_localctx = _tracker.createInstance<ColumnExprTemplateStringContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(896);
templateString();
break;
}
case 13: {
_localctx = _tracker.createInstance<ColumnExprLiteralContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(897);
literal();
break;
}
case 14: {
_localctx = _tracker.createInstance<ColumnExprNegateContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(898);
match(HogQLParser::DASH);
setState(899);
columnExpr(20);
break;
}
case 15: {
_localctx = _tracker.createInstance<ColumnExprNotContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(900);
match(HogQLParser::NOT);
setState(901);
columnExpr(14);
break;
}
case 16: {
_localctx = _tracker.createInstance<ColumnExprAsteriskContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(905);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -1450176743603191810) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 6458554974207) != 0)) {
setState(902);
tableIdentifier();
setState(903);
match(HogQLParser::DOT);
}
setState(907);
match(HogQLParser::ASTERISK);
break;
}
case 17: {
_localctx = _tracker.createInstance<ColumnExprSubqueryContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(908);
match(HogQLParser::LPAREN);
setState(909);
selectUnionStmt();
setState(910);
match(HogQLParser::RPAREN);
break;
}
case 18: {
_localctx = _tracker.createInstance<ColumnExprParensContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(912);
match(HogQLParser::LPAREN);
setState(913);
columnExpr(0);
setState(914);
match(HogQLParser::RPAREN);
break;
}
case 19: {
_localctx = _tracker.createInstance<ColumnExprTupleContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(916);
match(HogQLParser::LPAREN);
setState(917);
columnExprList();
setState(918);
match(HogQLParser::RPAREN);
break;
}
case 20: {
_localctx = _tracker.createInstance<ColumnExprArrayContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(920);
match(HogQLParser::LBRACKET);
setState(922);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(921);
columnExprList();
}
setState(924);
match(HogQLParser::RBRACKET);
break;
}
case 21: {
_localctx = _tracker.createInstance<ColumnExprDictContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(925);
match(HogQLParser::LBRACE);
setState(927);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(926);
kvPairList();
}
setState(929);
match(HogQLParser::RBRACE);
break;
}
case 22: {
_localctx = _tracker.createInstance<ColumnExprLambdaContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(930);
columnLambdaExpr();
break;
}
case 23: {
_localctx = _tracker.createInstance<ColumnExprIdentifierContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(931);
columnIdentifier();
break;
}
default:
break;
}
_ctx->stop = _input->LT(-1);
setState(1044);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 130, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
if (!_parseListeners.empty())
triggerExitRuleEvent();
previousContext = _localctx;
setState(1042);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 129, _ctx)) {
case 1: {
auto newContext = _tracker.createInstance<ColumnExprPrecedence1Context>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
newContext->left = previousContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(934);
if (!(precpred(_ctx, 19))) throw FailedPredicateException(this, "precpred(_ctx, 19)");
setState(938);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::ASTERISK: {
setState(935);
antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->operator_ = match(HogQLParser::ASTERISK);
break;
}
case HogQLParser::SLASH: {
setState(936);
antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->operator_ = match(HogQLParser::SLASH);
break;
}
case HogQLParser::PERCENT: {
setState(937);
antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->operator_ = match(HogQLParser::PERCENT);
break;
}
default:
throw NoViableAltException(this);
}
setState(940);
antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->right = columnExpr(20);
break;
}
case 2: {
auto newContext = _tracker.createInstance<ColumnExprPrecedence2Context>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
newContext->left = previousContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(941);
if (!(precpred(_ctx, 18))) throw FailedPredicateException(this, "precpred(_ctx, 18)");
setState(945);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::PLUS: {
setState(942);
antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->operator_ = match(HogQLParser::PLUS);
break;
}
case HogQLParser::DASH: {
setState(943);
antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->operator_ = match(HogQLParser::DASH);
break;
}
case HogQLParser::CONCAT: {
setState(944);
antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->operator_ = match(HogQLParser::CONCAT);
break;
}
default:
throw NoViableAltException(this);
}
setState(947);
antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->right = columnExpr(19);
break;
}
case 3: {
auto newContext = _tracker.createInstance<ColumnExprPrecedence3Context>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
newContext->left = previousContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(948);
if (!(precpred(_ctx, 17))) throw FailedPredicateException(this, "precpred(_ctx, 17)");
setState(973);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 124, _ctx)) {
case 1: {
setState(949);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::EQ_DOUBLE);
break;
}
case 2: {
setState(950);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::EQ_SINGLE);
break;
}
case 3: {
setState(951);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT_EQ);
break;
}
case 4: {
setState(952);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::LT_EQ);
break;
}
case 5: {
setState(953);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::LT);
break;
}
case 6: {
setState(954);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::GT_EQ);
break;
}
case 7: {
setState(955);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::GT);
break;
}
case 8: {
setState(957);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NOT) {
setState(956);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT);
}
setState(959);
match(HogQLParser::IN);
setState(961);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 122, _ctx)) {
case 1: {
setState(960);
match(HogQLParser::COHORT);
break;
}
default:
break;
}
break;
}
case 9: {
setState(964);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NOT) {
setState(963);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT);
}
setState(966);
_la = _input->LA(1);
if (!(_la == HogQLParser::ILIKE
|| _la == HogQLParser::LIKE)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case 10: {
setState(967);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::REGEX_SINGLE);
break;
}
case 11: {
setState(968);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::REGEX_DOUBLE);
break;
}
case 12: {
setState(969);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT_REGEX);
break;
}
case 13: {
setState(970);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::IREGEX_SINGLE);
break;
}
case 14: {
setState(971);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::IREGEX_DOUBLE);
break;
}
case 15: {
setState(972);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT_IREGEX);
break;
}
default:
break;
}
setState(975);
antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->right = columnExpr(18);
break;
}
case 4: {
auto newContext = _tracker.createInstance<ColumnExprNullishContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(976);
if (!(precpred(_ctx, 15))) throw FailedPredicateException(this, "precpred(_ctx, 15)");
setState(977);
match(HogQLParser::NULLISH);
setState(978);
columnExpr(16);
break;
}
case 5: {
auto newContext = _tracker.createInstance<ColumnExprAndContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(979);
if (!(precpred(_ctx, 13))) throw FailedPredicateException(this, "precpred(_ctx, 13)");
setState(980);
match(HogQLParser::AND);
setState(981);
columnExpr(14);
break;
}
case 6: {
auto newContext = _tracker.createInstance<ColumnExprOrContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(982);
if (!(precpred(_ctx, 12))) throw FailedPredicateException(this, "precpred(_ctx, 12)");
setState(983);
match(HogQLParser::OR);
setState(984);
columnExpr(13);
break;
}
case 7: {
auto newContext = _tracker.createInstance<ColumnExprBetweenContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(985);
if (!(precpred(_ctx, 11))) throw FailedPredicateException(this, "precpred(_ctx, 11)");
setState(987);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NOT) {
setState(986);
match(HogQLParser::NOT);
}
setState(989);
match(HogQLParser::BETWEEN);
setState(990);
columnExpr(0);
setState(991);
match(HogQLParser::AND);
setState(992);
columnExpr(12);
break;
}
case 8: {
auto newContext = _tracker.createInstance<ColumnExprTernaryOpContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(994);
if (!(precpred(_ctx, 10))) throw FailedPredicateException(this, "precpred(_ctx, 10)");
setState(995);
match(HogQLParser::QUERY);
setState(996);
columnExpr(0);
setState(997);
match(HogQLParser::COLON);
setState(998);
columnExpr(10);
break;
}
case 9: {
auto newContext = _tracker.createInstance<ColumnExprCallContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1000);
if (!(precpred(_ctx, 30))) throw FailedPredicateException(this, "precpred(_ctx, 30)");
setState(1001);
match(HogQLParser::LPAREN);
setState(1003);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(1002);
columnExprList();
}
setState(1005);
match(HogQLParser::RPAREN);
break;
}
case 10: {
auto newContext = _tracker.createInstance<ColumnExprArrayAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1006);
if (!(precpred(_ctx, 26))) throw FailedPredicateException(this, "precpred(_ctx, 26)");
setState(1007);
match(HogQLParser::LBRACKET);
setState(1008);
columnExpr(0);
setState(1009);
match(HogQLParser::RBRACKET);
break;
}
case 11: {
auto newContext = _tracker.createInstance<ColumnExprTupleAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1011);
if (!(precpred(_ctx, 25))) throw FailedPredicateException(this, "precpred(_ctx, 25)");
setState(1012);
match(HogQLParser::DOT);
setState(1013);
match(HogQLParser::DECIMAL_LITERAL);
break;
}
case 12: {
auto newContext = _tracker.createInstance<ColumnExprPropertyAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1014);
if (!(precpred(_ctx, 24))) throw FailedPredicateException(this, "precpred(_ctx, 24)");
setState(1015);
match(HogQLParser::DOT);
setState(1016);
identifier();
break;
}
case 13: {
auto newContext = _tracker.createInstance<ColumnExprNullArrayAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1017);
if (!(precpred(_ctx, 23))) throw FailedPredicateException(this, "precpred(_ctx, 23)");
setState(1018);
match(HogQLParser::NULL_PROPERTY);
setState(1019);
match(HogQLParser::LBRACKET);
setState(1020);
columnExpr(0);
setState(1021);
match(HogQLParser::RBRACKET);
break;
}
case 14: {
auto newContext = _tracker.createInstance<ColumnExprNullTupleAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1023);
if (!(precpred(_ctx, 22))) throw FailedPredicateException(this, "precpred(_ctx, 22)");
setState(1024);
match(HogQLParser::NULL_PROPERTY);
setState(1025);
match(HogQLParser::DECIMAL_LITERAL);
break;
}
case 15: {
auto newContext = _tracker.createInstance<ColumnExprNullPropertyAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1026);
if (!(precpred(_ctx, 21))) throw FailedPredicateException(this, "precpred(_ctx, 21)");
setState(1027);
match(HogQLParser::NULL_PROPERTY);
setState(1028);
identifier();
break;
}
case 16: {
auto newContext = _tracker.createInstance<ColumnExprIsNullContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1029);
if (!(precpred(_ctx, 16))) throw FailedPredicateException(this, "precpred(_ctx, 16)");
setState(1030);
match(HogQLParser::IS);
setState(1032);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NOT) {
setState(1031);
match(HogQLParser::NOT);
}
setState(1034);
match(HogQLParser::NULL_SQL);
break;
}
case 17: {
auto newContext = _tracker.createInstance<ColumnExprAliasContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
setState(1035);
if (!(precpred(_ctx, 9))) throw FailedPredicateException(this, "precpred(_ctx, 9)");
setState(1040);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 128, _ctx)) {
case 1: {
setState(1036);
match(HogQLParser::AS);
setState(1037);
identifier();
break;
}
case 2: {
setState(1038);
match(HogQLParser::AS);
setState(1039);
match(HogQLParser::STRING_LITERAL);
break;
}
default:
break;
}
break;
}
default:
break;
}
}
setState(1046);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 130, _ctx);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ColumnLambdaExprContext ------------------------------------------------------------------
HogQLParser::ColumnLambdaExprContext::ColumnLambdaExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::ARROW() {
return getToken(HogQLParser::ARROW, 0);
}
tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
std::vector<HogQLParser::IdentifierContext *> HogQLParser::ColumnLambdaExprContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::ColumnLambdaExprContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::ColumnLambdaExprContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
HogQLParser::BlockContext* HogQLParser::ColumnLambdaExprContext::block() {
return getRuleContext<HogQLParser::BlockContext>(0);
}
std::vector<tree::TerminalNode *> HogQLParser::ColumnLambdaExprContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::ColumnLambdaExprContext::getRuleIndex() const {
return HogQLParser::RuleColumnLambdaExpr;
}
std::any HogQLParser::ColumnLambdaExprContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnLambdaExpr(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ColumnLambdaExprContext* HogQLParser::columnLambdaExpr() {
ColumnLambdaExprContext *_localctx = _tracker.createInstance<ColumnLambdaExprContext>(_ctx, getState());
enterRule(_localctx, 118, HogQLParser::RuleColumnLambdaExpr);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(1074);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 135, _ctx)) {
case 1: {
setState(1047);
match(HogQLParser::LPAREN);
setState(1048);
identifier();
setState(1053);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 131, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(1049);
match(HogQLParser::COMMA);
setState(1050);
identifier();
}
setState(1055);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 131, _ctx);
}
setState(1057);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(1056);
match(HogQLParser::COMMA);
}
setState(1059);
match(HogQLParser::RPAREN);
break;
}
case 2: {
setState(1061);
identifier();
setState(1066);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 133, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(1062);
match(HogQLParser::COMMA);
setState(1063);
identifier();
}
setState(1068);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 133, _ctx);
}
setState(1070);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(1069);
match(HogQLParser::COMMA);
}
break;
}
case 3: {
setState(1072);
match(HogQLParser::LPAREN);
setState(1073);
match(HogQLParser::RPAREN);
break;
}
default:
break;
}
setState(1076);
match(HogQLParser::ARROW);
setState(1079);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 136, _ctx)) {
case 1: {
setState(1077);
columnExpr(0);
break;
}
case 2: {
setState(1078);
block();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HogqlxTagElementContext ------------------------------------------------------------------
HogQLParser::HogqlxTagElementContext::HogqlxTagElementContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::HogqlxTagElementContext::getRuleIndex() const {
return HogQLParser::RuleHogqlxTagElement;
}
void HogQLParser::HogqlxTagElementContext::copyFrom(HogqlxTagElementContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- HogqlxTagElementClosedContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::HogqlxTagElementClosedContext::LT() {
return getToken(HogQLParser::LT, 0);
}
HogQLParser::IdentifierContext* HogQLParser::HogqlxTagElementClosedContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::HogqlxTagElementClosedContext::SLASH() {
return getToken(HogQLParser::SLASH, 0);
}
tree::TerminalNode* HogQLParser::HogqlxTagElementClosedContext::GT() {
return getToken(HogQLParser::GT, 0);
}
std::vector<HogQLParser::HogqlxTagAttributeContext *> HogQLParser::HogqlxTagElementClosedContext::hogqlxTagAttribute() {
return getRuleContexts<HogQLParser::HogqlxTagAttributeContext>();
}
HogQLParser::HogqlxTagAttributeContext* HogQLParser::HogqlxTagElementClosedContext::hogqlxTagAttribute(size_t i) {
return getRuleContext<HogQLParser::HogqlxTagAttributeContext>(i);
}
HogQLParser::HogqlxTagElementClosedContext::HogqlxTagElementClosedContext(HogqlxTagElementContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::HogqlxTagElementClosedContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitHogqlxTagElementClosed(this);
else
return visitor->visitChildren(this);
}
//----------------- HogqlxTagElementNestedContext ------------------------------------------------------------------
std::vector<tree::TerminalNode *> HogQLParser::HogqlxTagElementNestedContext::LT() {
return getTokens(HogQLParser::LT);
}
tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::LT(size_t i) {
return getToken(HogQLParser::LT, i);
}
std::vector<HogQLParser::IdentifierContext *> HogQLParser::HogqlxTagElementNestedContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::HogqlxTagElementNestedContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::HogqlxTagElementNestedContext::GT() {
return getTokens(HogQLParser::GT);
}
tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::GT(size_t i) {
return getToken(HogQLParser::GT, i);
}
tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::SLASH() {
return getToken(HogQLParser::SLASH, 0);
}
std::vector<HogQLParser::HogqlxTagAttributeContext *> HogQLParser::HogqlxTagElementNestedContext::hogqlxTagAttribute() {
return getRuleContexts<HogQLParser::HogqlxTagAttributeContext>();
}
HogQLParser::HogqlxTagAttributeContext* HogQLParser::HogqlxTagElementNestedContext::hogqlxTagAttribute(size_t i) {
return getRuleContext<HogQLParser::HogqlxTagAttributeContext>(i);
}
HogQLParser::HogqlxTagElementContext* HogQLParser::HogqlxTagElementNestedContext::hogqlxTagElement() {
return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}
tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::LBRACE() {
return getToken(HogQLParser::LBRACE, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::HogqlxTagElementNestedContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::RBRACE() {
return getToken(HogQLParser::RBRACE, 0);
}
HogQLParser::HogqlxTagElementNestedContext::HogqlxTagElementNestedContext(HogqlxTagElementContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::HogqlxTagElementNestedContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitHogqlxTagElementNested(this);
else
return visitor->visitChildren(this);
}
HogQLParser::HogqlxTagElementContext* HogQLParser::hogqlxTagElement() {
HogqlxTagElementContext *_localctx = _tracker.createInstance<HogqlxTagElementContext>(_ctx, getState());
enterRule(_localctx, 120, HogQLParser::RuleHogqlxTagElement);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1113);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 140, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<HogQLParser::HogqlxTagElementClosedContext>(_localctx);
enterOuterAlt(_localctx, 1);
setState(1081);
match(HogQLParser::LT);
setState(1082);
identifier();
setState(1086);
_errHandler->sync(this);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -1450176743603191810) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 6458554974207) != 0)) {
setState(1083);
hogqlxTagAttribute();
setState(1088);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(1089);
match(HogQLParser::SLASH);
setState(1090);
match(HogQLParser::GT);
break;
}
case 2: {
_localctx = _tracker.createInstance<HogQLParser::HogqlxTagElementNestedContext>(_localctx);
enterOuterAlt(_localctx, 2);
setState(1092);
match(HogQLParser::LT);
setState(1093);
identifier();
setState(1097);
_errHandler->sync(this);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -1450176743603191810) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 6458554974207) != 0)) {
setState(1094);
hogqlxTagAttribute();
setState(1099);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(1100);
match(HogQLParser::GT);
setState(1106);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 139, _ctx)) {
case 1: {
setState(1101);
hogqlxTagElement();
break;
}
case 2: {
setState(1102);
match(HogQLParser::LBRACE);
setState(1103);
columnExpr(0);
setState(1104);
match(HogQLParser::RBRACE);
break;
}
default:
break;
}
setState(1108);
match(HogQLParser::LT);
setState(1109);
match(HogQLParser::SLASH);
setState(1110);
identifier();
setState(1111);
match(HogQLParser::GT);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HogqlxTagAttributeContext ------------------------------------------------------------------
HogQLParser::HogqlxTagAttributeContext::HogqlxTagAttributeContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::IdentifierContext* HogQLParser::HogqlxTagAttributeContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::HogqlxTagAttributeContext::EQ_SINGLE() {
return getToken(HogQLParser::EQ_SINGLE, 0);
}
HogQLParser::StringContext* HogQLParser::HogqlxTagAttributeContext::string() {
return getRuleContext<HogQLParser::StringContext>(0);
}
tree::TerminalNode* HogQLParser::HogqlxTagAttributeContext::LBRACE() {
return getToken(HogQLParser::LBRACE, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::HogqlxTagAttributeContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::HogqlxTagAttributeContext::RBRACE() {
return getToken(HogQLParser::RBRACE, 0);
}
size_t HogQLParser::HogqlxTagAttributeContext::getRuleIndex() const {
return HogQLParser::RuleHogqlxTagAttribute;
}
std::any HogQLParser::HogqlxTagAttributeContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitHogqlxTagAttribute(this);
else
return visitor->visitChildren(this);
}
HogQLParser::HogqlxTagAttributeContext* HogQLParser::hogqlxTagAttribute() {
HogqlxTagAttributeContext *_localctx = _tracker.createInstance<HogqlxTagAttributeContext>(_ctx, getState());
enterRule(_localctx, 122, HogQLParser::RuleHogqlxTagAttribute);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1126);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 141, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1115);
identifier();
setState(1116);
match(HogQLParser::EQ_SINGLE);
setState(1117);
string();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1119);
identifier();
setState(1120);
match(HogQLParser::EQ_SINGLE);
setState(1121);
match(HogQLParser::LBRACE);
setState(1122);
columnExpr(0);
setState(1123);
match(HogQLParser::RBRACE);
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(1125);
identifier();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WithExprListContext ------------------------------------------------------------------
HogQLParser::WithExprListContext::WithExprListContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::WithExprContext *> HogQLParser::WithExprListContext::withExpr() {
return getRuleContexts<HogQLParser::WithExprContext>();
}
HogQLParser::WithExprContext* HogQLParser::WithExprListContext::withExpr(size_t i) {
return getRuleContext<HogQLParser::WithExprContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::WithExprListContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::WithExprListContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::WithExprListContext::getRuleIndex() const {
return HogQLParser::RuleWithExprList;
}
std::any HogQLParser::WithExprListContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWithExprList(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WithExprListContext* HogQLParser::withExprList() {
WithExprListContext *_localctx = _tracker.createInstance<WithExprListContext>(_ctx, getState());
enterRule(_localctx, 124, HogQLParser::RuleWithExprList);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(1128);
withExpr();
setState(1133);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 142, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(1129);
match(HogQLParser::COMMA);
setState(1130);
withExpr();
}
setState(1135);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 142, _ctx);
}
setState(1137);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(1136);
match(HogQLParser::COMMA);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WithExprContext ------------------------------------------------------------------
HogQLParser::WithExprContext::WithExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::WithExprContext::getRuleIndex() const {
return HogQLParser::RuleWithExpr;
}
void HogQLParser::WithExprContext::copyFrom(WithExprContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- WithExprColumnContext ------------------------------------------------------------------
HogQLParser::ColumnExprContext* HogQLParser::WithExprColumnContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::WithExprColumnContext::AS() {
return getToken(HogQLParser::AS, 0);
}
HogQLParser::IdentifierContext* HogQLParser::WithExprColumnContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
HogQLParser::WithExprColumnContext::WithExprColumnContext(WithExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::WithExprColumnContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWithExprColumn(this);
else
return visitor->visitChildren(this);
}
//----------------- WithExprSubqueryContext ------------------------------------------------------------------
HogQLParser::IdentifierContext* HogQLParser::WithExprSubqueryContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::WithExprSubqueryContext::AS() {
return getToken(HogQLParser::AS, 0);
}
tree::TerminalNode* HogQLParser::WithExprSubqueryContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::SelectUnionStmtContext* HogQLParser::WithExprSubqueryContext::selectUnionStmt() {
return getRuleContext<HogQLParser::SelectUnionStmtContext>(0);
}
tree::TerminalNode* HogQLParser::WithExprSubqueryContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::WithExprSubqueryContext::WithExprSubqueryContext(WithExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::WithExprSubqueryContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitWithExprSubquery(this);
else
return visitor->visitChildren(this);
}
HogQLParser::WithExprContext* HogQLParser::withExpr() {
WithExprContext *_localctx = _tracker.createInstance<WithExprContext>(_ctx, getState());
enterRule(_localctx, 126, HogQLParser::RuleWithExpr);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1149);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 144, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<HogQLParser::WithExprSubqueryContext>(_localctx);
enterOuterAlt(_localctx, 1);
setState(1139);
identifier();
setState(1140);
match(HogQLParser::AS);
setState(1141);
match(HogQLParser::LPAREN);
setState(1142);
selectUnionStmt();
setState(1143);
match(HogQLParser::RPAREN);
break;
}
case 2: {
_localctx = _tracker.createInstance<HogQLParser::WithExprColumnContext>(_localctx);
enterOuterAlt(_localctx, 2);
setState(1145);
columnExpr(0);
setState(1146);
match(HogQLParser::AS);
setState(1147);
identifier();
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ColumnIdentifierContext ------------------------------------------------------------------
HogQLParser::ColumnIdentifierContext::ColumnIdentifierContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::PlaceholderContext* HogQLParser::ColumnIdentifierContext::placeholder() {
return getRuleContext<HogQLParser::PlaceholderContext>(0);
}
HogQLParser::NestedIdentifierContext* HogQLParser::ColumnIdentifierContext::nestedIdentifier() {
return getRuleContext<HogQLParser::NestedIdentifierContext>(0);
}
HogQLParser::TableIdentifierContext* HogQLParser::ColumnIdentifierContext::tableIdentifier() {
return getRuleContext<HogQLParser::TableIdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::ColumnIdentifierContext::DOT() {
return getToken(HogQLParser::DOT, 0);
}
size_t HogQLParser::ColumnIdentifierContext::getRuleIndex() const {
return HogQLParser::RuleColumnIdentifier;
}
std::any HogQLParser::ColumnIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitColumnIdentifier(this);
else
return visitor->visitChildren(this);
}
HogQLParser::ColumnIdentifierContext* HogQLParser::columnIdentifier() {
ColumnIdentifierContext *_localctx = _tracker.createInstance<ColumnIdentifierContext>(_ctx, getState());
enterRule(_localctx, 128, HogQLParser::RuleColumnIdentifier);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1158);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::LBRACE: {
enterOuterAlt(_localctx, 1);
setState(1151);
placeholder();
break;
}
case HogQLParser::ALL:
case HogQLParser::AND:
case HogQLParser::ANTI:
case HogQLParser::ANY:
case HogQLParser::ARRAY:
case HogQLParser::AS:
case HogQLParser::ASCENDING:
case HogQLParser::ASOF:
case HogQLParser::BETWEEN:
case HogQLParser::BOTH:
case HogQLParser::BY:
case HogQLParser::CASE:
case HogQLParser::CAST:
case HogQLParser::COHORT:
case HogQLParser::COLLATE:
case HogQLParser::CROSS:
case HogQLParser::CUBE:
case HogQLParser::CURRENT:
case HogQLParser::DATE:
case HogQLParser::DAY:
case HogQLParser::DESC:
case HogQLParser::DESCENDING:
case HogQLParser::DISTINCT:
case HogQLParser::ELSE:
case HogQLParser::END:
case HogQLParser::EXTRACT:
case HogQLParser::FINAL:
case HogQLParser::FIRST:
case HogQLParser::FOLLOWING:
case HogQLParser::FOR:
case HogQLParser::FROM:
case HogQLParser::FULL:
case HogQLParser::GROUP:
case HogQLParser::HAVING:
case HogQLParser::HOUR:
case HogQLParser::ID:
case HogQLParser::IF:
case HogQLParser::ILIKE:
case HogQLParser::IN:
case HogQLParser::INNER:
case HogQLParser::INTERVAL:
case HogQLParser::IS:
case HogQLParser::JOIN:
case HogQLParser::KEY:
case HogQLParser::LAST:
case HogQLParser::LEADING:
case HogQLParser::LEFT:
case HogQLParser::LIKE:
case HogQLParser::LIMIT:
case HogQLParser::MINUTE:
case HogQLParser::MONTH:
case HogQLParser::NOT:
case HogQLParser::NULLS:
case HogQLParser::OFFSET:
case HogQLParser::ON:
case HogQLParser::OR:
case HogQLParser::ORDER:
case HogQLParser::OUTER:
case HogQLParser::OVER:
case HogQLParser::PARTITION:
case HogQLParser::PRECEDING:
case HogQLParser::PREWHERE:
case HogQLParser::QUARTER:
case HogQLParser::RANGE:
case HogQLParser::RETURN:
case HogQLParser::RIGHT:
case HogQLParser::ROLLUP:
case HogQLParser::ROW:
case HogQLParser::ROWS:
case HogQLParser::SAMPLE:
case HogQLParser::SECOND:
case HogQLParser::SELECT:
case HogQLParser::SEMI:
case HogQLParser::SETTINGS:
case HogQLParser::SUBSTRING:
case HogQLParser::THEN:
case HogQLParser::TIES:
case HogQLParser::TIMESTAMP:
case HogQLParser::TO:
case HogQLParser::TOP:
case HogQLParser::TOTALS:
case HogQLParser::TRAILING:
case HogQLParser::TRIM:
case HogQLParser::TRUNCATE:
case HogQLParser::UNBOUNDED:
case HogQLParser::UNION:
case HogQLParser::USING:
case HogQLParser::WEEK:
case HogQLParser::WHEN:
case HogQLParser::WHERE:
case HogQLParser::WINDOW:
case HogQLParser::WITH:
case HogQLParser::YEAR:
case HogQLParser::IDENTIFIER: {
enterOuterAlt(_localctx, 2);
setState(1155);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 145, _ctx)) {
case 1: {
setState(1152);
tableIdentifier();
setState(1153);
match(HogQLParser::DOT);
break;
}
default:
break;
}
setState(1157);
nestedIdentifier();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- NestedIdentifierContext ------------------------------------------------------------------
HogQLParser::NestedIdentifierContext::NestedIdentifierContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::IdentifierContext *> HogQLParser::NestedIdentifierContext::identifier() {
return getRuleContexts<HogQLParser::IdentifierContext>();
}
HogQLParser::IdentifierContext* HogQLParser::NestedIdentifierContext::identifier(size_t i) {
return getRuleContext<HogQLParser::IdentifierContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::NestedIdentifierContext::DOT() {
return getTokens(HogQLParser::DOT);
}
tree::TerminalNode* HogQLParser::NestedIdentifierContext::DOT(size_t i) {
return getToken(HogQLParser::DOT, i);
}
size_t HogQLParser::NestedIdentifierContext::getRuleIndex() const {
return HogQLParser::RuleNestedIdentifier;
}
std::any HogQLParser::NestedIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitNestedIdentifier(this);
else
return visitor->visitChildren(this);
}
HogQLParser::NestedIdentifierContext* HogQLParser::nestedIdentifier() {
NestedIdentifierContext *_localctx = _tracker.createInstance<NestedIdentifierContext>(_ctx, getState());
enterRule(_localctx, 130, HogQLParser::RuleNestedIdentifier);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(1160);
identifier();
setState(1165);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 147, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(1161);
match(HogQLParser::DOT);
setState(1162);
identifier();
}
setState(1167);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 147, _ctx);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TableExprContext ------------------------------------------------------------------
HogQLParser::TableExprContext::TableExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t HogQLParser::TableExprContext::getRuleIndex() const {
return HogQLParser::RuleTableExpr;
}
void HogQLParser::TableExprContext::copyFrom(TableExprContext *ctx) {
ParserRuleContext::copyFrom(ctx);
}
//----------------- TableExprTagContext ------------------------------------------------------------------
HogQLParser::HogqlxTagElementContext* HogQLParser::TableExprTagContext::hogqlxTagElement() {
return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}
HogQLParser::TableExprTagContext::TableExprTagContext(TableExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::TableExprTagContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableExprTag(this);
else
return visitor->visitChildren(this);
}
//----------------- TableExprIdentifierContext ------------------------------------------------------------------
HogQLParser::TableIdentifierContext* HogQLParser::TableExprIdentifierContext::tableIdentifier() {
return getRuleContext<HogQLParser::TableIdentifierContext>(0);
}
HogQLParser::TableExprIdentifierContext::TableExprIdentifierContext(TableExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::TableExprIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableExprIdentifier(this);
else
return visitor->visitChildren(this);
}
//----------------- TableExprPlaceholderContext ------------------------------------------------------------------
HogQLParser::PlaceholderContext* HogQLParser::TableExprPlaceholderContext::placeholder() {
return getRuleContext<HogQLParser::PlaceholderContext>(0);
}
HogQLParser::TableExprPlaceholderContext::TableExprPlaceholderContext(TableExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::TableExprPlaceholderContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableExprPlaceholder(this);
else
return visitor->visitChildren(this);
}
//----------------- TableExprSubqueryContext ------------------------------------------------------------------
tree::TerminalNode* HogQLParser::TableExprSubqueryContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
HogQLParser::SelectUnionStmtContext* HogQLParser::TableExprSubqueryContext::selectUnionStmt() {
return getRuleContext<HogQLParser::SelectUnionStmtContext>(0);
}
tree::TerminalNode* HogQLParser::TableExprSubqueryContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::TableExprSubqueryContext::TableExprSubqueryContext(TableExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::TableExprSubqueryContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableExprSubquery(this);
else
return visitor->visitChildren(this);
}
//----------------- TableExprAliasContext ------------------------------------------------------------------
HogQLParser::TableExprContext* HogQLParser::TableExprAliasContext::tableExpr() {
return getRuleContext<HogQLParser::TableExprContext>(0);
}
HogQLParser::AliasContext* HogQLParser::TableExprAliasContext::alias() {
return getRuleContext<HogQLParser::AliasContext>(0);
}
tree::TerminalNode* HogQLParser::TableExprAliasContext::AS() {
return getToken(HogQLParser::AS, 0);
}
HogQLParser::IdentifierContext* HogQLParser::TableExprAliasContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
HogQLParser::TableExprAliasContext::TableExprAliasContext(TableExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::TableExprAliasContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableExprAlias(this);
else
return visitor->visitChildren(this);
}
//----------------- TableExprFunctionContext ------------------------------------------------------------------
HogQLParser::TableFunctionExprContext* HogQLParser::TableExprFunctionContext::tableFunctionExpr() {
return getRuleContext<HogQLParser::TableFunctionExprContext>(0);
}
HogQLParser::TableExprFunctionContext::TableExprFunctionContext(TableExprContext *ctx) { copyFrom(ctx); }
std::any HogQLParser::TableExprFunctionContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableExprFunction(this);
else
return visitor->visitChildren(this);
}
HogQLParser::TableExprContext* HogQLParser::tableExpr() {
return tableExpr(0);
}
HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) {
ParserRuleContext *parentContext = _ctx;
size_t parentState = getState();
HogQLParser::TableExprContext *_localctx = _tracker.createInstance<TableExprContext>(_ctx, parentState);
HogQLParser::TableExprContext *previousContext = _localctx;
(void)previousContext; // Silence compiler, in case the context is not used by generated code.
size_t startState = 132;
enterRecursionRule(_localctx, 132, HogQLParser::RuleTableExpr, precedence);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
unrollRecursionContexts(parentContext);
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(1177);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 148, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<TableExprIdentifierContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(1169);
tableIdentifier();
break;
}
case 2: {
_localctx = _tracker.createInstance<TableExprFunctionContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(1170);
tableFunctionExpr();
break;
}
case 3: {
_localctx = _tracker.createInstance<TableExprSubqueryContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(1171);
match(HogQLParser::LPAREN);
setState(1172);
selectUnionStmt();
setState(1173);
match(HogQLParser::RPAREN);
break;
}
case 4: {
_localctx = _tracker.createInstance<TableExprTagContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(1175);
hogqlxTagElement();
break;
}
case 5: {
_localctx = _tracker.createInstance<TableExprPlaceholderContext>(_localctx);
_ctx = _localctx;
previousContext = _localctx;
setState(1176);
placeholder();
break;
}
default:
break;
}
_ctx->stop = _input->LT(-1);
setState(1187);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 150, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
if (!_parseListeners.empty())
triggerExitRuleEvent();
previousContext = _localctx;
auto newContext = _tracker.createInstance<TableExprAliasContext>(_tracker.createInstance<TableExprContext>(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleTableExpr);
setState(1179);
if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)");
setState(1183);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::DATE:
case HogQLParser::FIRST:
case HogQLParser::ID:
case HogQLParser::KEY:
case HogQLParser::IDENTIFIER: {
setState(1180);
alias();
break;
}
case HogQLParser::AS: {
setState(1181);
match(HogQLParser::AS);
setState(1182);
identifier();
break;
}
default:
throw NoViableAltException(this);
}
}
setState(1189);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 150, _ctx);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TableFunctionExprContext ------------------------------------------------------------------
HogQLParser::TableFunctionExprContext::TableFunctionExprContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::IdentifierContext* HogQLParser::TableFunctionExprContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::TableFunctionExprContext::LPAREN() {
return getToken(HogQLParser::LPAREN, 0);
}
tree::TerminalNode* HogQLParser::TableFunctionExprContext::RPAREN() {
return getToken(HogQLParser::RPAREN, 0);
}
HogQLParser::TableArgListContext* HogQLParser::TableFunctionExprContext::tableArgList() {
return getRuleContext<HogQLParser::TableArgListContext>(0);
}
size_t HogQLParser::TableFunctionExprContext::getRuleIndex() const {
return HogQLParser::RuleTableFunctionExpr;
}
std::any HogQLParser::TableFunctionExprContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableFunctionExpr(this);
else
return visitor->visitChildren(this);
}
HogQLParser::TableFunctionExprContext* HogQLParser::tableFunctionExpr() {
TableFunctionExprContext *_localctx = _tracker.createInstance<TableFunctionExprContext>(_ctx, getState());
enterRule(_localctx, 134, HogQLParser::RuleTableFunctionExpr);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1190);
identifier();
setState(1191);
match(HogQLParser::LPAREN);
setState(1193);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -9007270658588674) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 180986072486903807) != 0) || ((((_la - 129) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 129)) & 18455) != 0)) {
setState(1192);
tableArgList();
}
setState(1195);
match(HogQLParser::RPAREN);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TableIdentifierContext ------------------------------------------------------------------
HogQLParser::TableIdentifierContext::TableIdentifierContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::IdentifierContext* HogQLParser::TableIdentifierContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
HogQLParser::DatabaseIdentifierContext* HogQLParser::TableIdentifierContext::databaseIdentifier() {
return getRuleContext<HogQLParser::DatabaseIdentifierContext>(0);
}
tree::TerminalNode* HogQLParser::TableIdentifierContext::DOT() {
return getToken(HogQLParser::DOT, 0);
}
size_t HogQLParser::TableIdentifierContext::getRuleIndex() const {
return HogQLParser::RuleTableIdentifier;
}
std::any HogQLParser::TableIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableIdentifier(this);
else
return visitor->visitChildren(this);
}
HogQLParser::TableIdentifierContext* HogQLParser::tableIdentifier() {
TableIdentifierContext *_localctx = _tracker.createInstance<TableIdentifierContext>(_ctx, getState());
enterRule(_localctx, 136, HogQLParser::RuleTableIdentifier);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1200);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 152, _ctx)) {
case 1: {
setState(1197);
databaseIdentifier();
setState(1198);
match(HogQLParser::DOT);
break;
}
default:
break;
}
setState(1202);
identifier();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TableArgListContext ------------------------------------------------------------------
HogQLParser::TableArgListContext::TableArgListContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<HogQLParser::ColumnExprContext *> HogQLParser::TableArgListContext::columnExpr() {
return getRuleContexts<HogQLParser::ColumnExprContext>();
}
HogQLParser::ColumnExprContext* HogQLParser::TableArgListContext::columnExpr(size_t i) {
return getRuleContext<HogQLParser::ColumnExprContext>(i);
}
std::vector<tree::TerminalNode *> HogQLParser::TableArgListContext::COMMA() {
return getTokens(HogQLParser::COMMA);
}
tree::TerminalNode* HogQLParser::TableArgListContext::COMMA(size_t i) {
return getToken(HogQLParser::COMMA, i);
}
size_t HogQLParser::TableArgListContext::getRuleIndex() const {
return HogQLParser::RuleTableArgList;
}
std::any HogQLParser::TableArgListContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTableArgList(this);
else
return visitor->visitChildren(this);
}
HogQLParser::TableArgListContext* HogQLParser::tableArgList() {
TableArgListContext *_localctx = _tracker.createInstance<TableArgListContext>(_ctx, getState());
enterRule(_localctx, 138, HogQLParser::RuleTableArgList);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(1204);
columnExpr(0);
setState(1209);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 153, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(1205);
match(HogQLParser::COMMA);
setState(1206);
columnExpr(0);
}
setState(1211);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 153, _ctx);
}
setState(1213);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
setState(1212);
match(HogQLParser::COMMA);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DatabaseIdentifierContext ------------------------------------------------------------------
HogQLParser::DatabaseIdentifierContext::DatabaseIdentifierContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::IdentifierContext* HogQLParser::DatabaseIdentifierContext::identifier() {
return getRuleContext<HogQLParser::IdentifierContext>(0);
}
size_t HogQLParser::DatabaseIdentifierContext::getRuleIndex() const {
return HogQLParser::RuleDatabaseIdentifier;
}
std::any HogQLParser::DatabaseIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitDatabaseIdentifier(this);
else
return visitor->visitChildren(this);
}
HogQLParser::DatabaseIdentifierContext* HogQLParser::databaseIdentifier() {
DatabaseIdentifierContext *_localctx = _tracker.createInstance<DatabaseIdentifierContext>(_ctx, getState());
enterRule(_localctx, 140, HogQLParser::RuleDatabaseIdentifier);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1215);
identifier();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- FloatingLiteralContext ------------------------------------------------------------------
HogQLParser::FloatingLiteralContext::FloatingLiteralContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::FloatingLiteralContext::FLOATING_LITERAL() {
return getToken(HogQLParser::FLOATING_LITERAL, 0);
}
tree::TerminalNode* HogQLParser::FloatingLiteralContext::DOT() {
return getToken(HogQLParser::DOT, 0);
}
std::vector<tree::TerminalNode *> HogQLParser::FloatingLiteralContext::DECIMAL_LITERAL() {
return getTokens(HogQLParser::DECIMAL_LITERAL);
}
tree::TerminalNode* HogQLParser::FloatingLiteralContext::DECIMAL_LITERAL(size_t i) {
return getToken(HogQLParser::DECIMAL_LITERAL, i);
}
tree::TerminalNode* HogQLParser::FloatingLiteralContext::OCTAL_LITERAL() {
return getToken(HogQLParser::OCTAL_LITERAL, 0);
}
size_t HogQLParser::FloatingLiteralContext::getRuleIndex() const {
return HogQLParser::RuleFloatingLiteral;
}
std::any HogQLParser::FloatingLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitFloatingLiteral(this);
else
return visitor->visitChildren(this);
}
HogQLParser::FloatingLiteralContext* HogQLParser::floatingLiteral() {
FloatingLiteralContext *_localctx = _tracker.createInstance<FloatingLiteralContext>(_ctx, getState());
enterRule(_localctx, 142, HogQLParser::RuleFloatingLiteral);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1225);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::FLOATING_LITERAL: {
enterOuterAlt(_localctx, 1);
setState(1217);
match(HogQLParser::FLOATING_LITERAL);
break;
}
case HogQLParser::DOT: {
enterOuterAlt(_localctx, 2);
setState(1218);
match(HogQLParser::DOT);
setState(1219);
_la = _input->LA(1);
if (!(_la == HogQLParser::OCTAL_LITERAL
|| _la == HogQLParser::DECIMAL_LITERAL)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case HogQLParser::DECIMAL_LITERAL: {
enterOuterAlt(_localctx, 3);
setState(1220);
match(HogQLParser::DECIMAL_LITERAL);
setState(1221);
match(HogQLParser::DOT);
setState(1223);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 155, _ctx)) {
case 1: {
setState(1222);
_la = _input->LA(1);
if (!(_la == HogQLParser::OCTAL_LITERAL
|| _la == HogQLParser::DECIMAL_LITERAL)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
default:
break;
}
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- NumberLiteralContext ------------------------------------------------------------------
HogQLParser::NumberLiteralContext::NumberLiteralContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::FloatingLiteralContext* HogQLParser::NumberLiteralContext::floatingLiteral() {
return getRuleContext<HogQLParser::FloatingLiteralContext>(0);
}
tree::TerminalNode* HogQLParser::NumberLiteralContext::OCTAL_LITERAL() {
return getToken(HogQLParser::OCTAL_LITERAL, 0);
}
tree::TerminalNode* HogQLParser::NumberLiteralContext::DECIMAL_LITERAL() {
return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}
tree::TerminalNode* HogQLParser::NumberLiteralContext::HEXADECIMAL_LITERAL() {
return getToken(HogQLParser::HEXADECIMAL_LITERAL, 0);
}
tree::TerminalNode* HogQLParser::NumberLiteralContext::INF() {
return getToken(HogQLParser::INF, 0);
}
tree::TerminalNode* HogQLParser::NumberLiteralContext::NAN_SQL() {
return getToken(HogQLParser::NAN_SQL, 0);
}
tree::TerminalNode* HogQLParser::NumberLiteralContext::PLUS() {
return getToken(HogQLParser::PLUS, 0);
}
tree::TerminalNode* HogQLParser::NumberLiteralContext::DASH() {
return getToken(HogQLParser::DASH, 0);
}
size_t HogQLParser::NumberLiteralContext::getRuleIndex() const {
return HogQLParser::RuleNumberLiteral;
}
std::any HogQLParser::NumberLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitNumberLiteral(this);
else
return visitor->visitChildren(this);
}
HogQLParser::NumberLiteralContext* HogQLParser::numberLiteral() {
NumberLiteralContext *_localctx = _tracker.createInstance<NumberLiteralContext>(_ctx, getState());
enterRule(_localctx, 144, HogQLParser::RuleNumberLiteral);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1228);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::DASH
|| _la == HogQLParser::PLUS) {
setState(1227);
_la = _input->LA(1);
if (!(_la == HogQLParser::DASH
|| _la == HogQLParser::PLUS)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
setState(1236);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 158, _ctx)) {
case 1: {
setState(1230);
floatingLiteral();
break;
}
case 2: {
setState(1231);
match(HogQLParser::OCTAL_LITERAL);
break;
}
case 3: {
setState(1232);
match(HogQLParser::DECIMAL_LITERAL);
break;
}
case 4: {
setState(1233);
match(HogQLParser::HEXADECIMAL_LITERAL);
break;
}
case 5: {
setState(1234);
match(HogQLParser::INF);
break;
}
case 6: {
setState(1235);
match(HogQLParser::NAN_SQL);
break;
}
default:
break;
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LiteralContext ------------------------------------------------------------------
HogQLParser::LiteralContext::LiteralContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::NumberLiteralContext* HogQLParser::LiteralContext::numberLiteral() {
return getRuleContext<HogQLParser::NumberLiteralContext>(0);
}
tree::TerminalNode* HogQLParser::LiteralContext::STRING_LITERAL() {
return getToken(HogQLParser::STRING_LITERAL, 0);
}
tree::TerminalNode* HogQLParser::LiteralContext::NULL_SQL() {
return getToken(HogQLParser::NULL_SQL, 0);
}
size_t HogQLParser::LiteralContext::getRuleIndex() const {
return HogQLParser::RuleLiteral;
}
std::any HogQLParser::LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitLiteral(this);
else
return visitor->visitChildren(this);
}
HogQLParser::LiteralContext* HogQLParser::literal() {
LiteralContext *_localctx = _tracker.createInstance<LiteralContext>(_ctx, getState());
enterRule(_localctx, 146, HogQLParser::RuleLiteral);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1241);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::INF:
case HogQLParser::NAN_SQL:
case HogQLParser::FLOATING_LITERAL:
case HogQLParser::OCTAL_LITERAL:
case HogQLParser::DECIMAL_LITERAL:
case HogQLParser::HEXADECIMAL_LITERAL:
case HogQLParser::DASH:
case HogQLParser::DOT:
case HogQLParser::PLUS: {
enterOuterAlt(_localctx, 1);
setState(1238);
numberLiteral();
break;
}
case HogQLParser::STRING_LITERAL: {
enterOuterAlt(_localctx, 2);
setState(1239);
match(HogQLParser::STRING_LITERAL);
break;
}
case HogQLParser::NULL_SQL: {
enterOuterAlt(_localctx, 3);
setState(1240);
match(HogQLParser::NULL_SQL);
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IntervalContext ------------------------------------------------------------------
HogQLParser::IntervalContext::IntervalContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::IntervalContext::SECOND() {
return getToken(HogQLParser::SECOND, 0);
}
tree::TerminalNode* HogQLParser::IntervalContext::MINUTE() {
return getToken(HogQLParser::MINUTE, 0);
}
tree::TerminalNode* HogQLParser::IntervalContext::HOUR() {
return getToken(HogQLParser::HOUR, 0);
}
tree::TerminalNode* HogQLParser::IntervalContext::DAY() {
return getToken(HogQLParser::DAY, 0);
}
tree::TerminalNode* HogQLParser::IntervalContext::WEEK() {
return getToken(HogQLParser::WEEK, 0);
}
tree::TerminalNode* HogQLParser::IntervalContext::MONTH() {
return getToken(HogQLParser::MONTH, 0);
}
tree::TerminalNode* HogQLParser::IntervalContext::QUARTER() {
return getToken(HogQLParser::QUARTER, 0);
}
tree::TerminalNode* HogQLParser::IntervalContext::YEAR() {
return getToken(HogQLParser::YEAR, 0);
}
size_t HogQLParser::IntervalContext::getRuleIndex() const {
return HogQLParser::RuleInterval;
}
std::any HogQLParser::IntervalContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitInterval(this);
else
return visitor->visitChildren(this);
}
HogQLParser::IntervalContext* HogQLParser::interval() {
IntervalContext *_localctx = _tracker.createInstance<IntervalContext>(_ctx, getState());
enterRule(_localctx, 148, HogQLParser::RuleInterval);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1243);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 216173331871694848) != 0) || ((((_la - 71) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 71)) & 8724152577) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- KeywordContext ------------------------------------------------------------------
HogQLParser::KeywordContext::KeywordContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::KeywordContext::ALL() {
return getToken(HogQLParser::ALL, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::AND() {
return getToken(HogQLParser::AND, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ANTI() {
return getToken(HogQLParser::ANTI, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ANY() {
return getToken(HogQLParser::ANY, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ARRAY() {
return getToken(HogQLParser::ARRAY, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::AS() {
return getToken(HogQLParser::AS, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ASCENDING() {
return getToken(HogQLParser::ASCENDING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ASOF() {
return getToken(HogQLParser::ASOF, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::BETWEEN() {
return getToken(HogQLParser::BETWEEN, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::BOTH() {
return getToken(HogQLParser::BOTH, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::BY() {
return getToken(HogQLParser::BY, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::CASE() {
return getToken(HogQLParser::CASE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::CAST() {
return getToken(HogQLParser::CAST, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::COHORT() {
return getToken(HogQLParser::COHORT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::COLLATE() {
return getToken(HogQLParser::COLLATE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::CROSS() {
return getToken(HogQLParser::CROSS, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::CUBE() {
return getToken(HogQLParser::CUBE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::CURRENT() {
return getToken(HogQLParser::CURRENT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::DATE() {
return getToken(HogQLParser::DATE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::DESC() {
return getToken(HogQLParser::DESC, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::DESCENDING() {
return getToken(HogQLParser::DESCENDING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::DISTINCT() {
return getToken(HogQLParser::DISTINCT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ELSE() {
return getToken(HogQLParser::ELSE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::END() {
return getToken(HogQLParser::END, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::EXTRACT() {
return getToken(HogQLParser::EXTRACT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::FINAL() {
return getToken(HogQLParser::FINAL, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::FIRST() {
return getToken(HogQLParser::FIRST, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::FOR() {
return getToken(HogQLParser::FOR, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::FOLLOWING() {
return getToken(HogQLParser::FOLLOWING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::FROM() {
return getToken(HogQLParser::FROM, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::FULL() {
return getToken(HogQLParser::FULL, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::GROUP() {
return getToken(HogQLParser::GROUP, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::HAVING() {
return getToken(HogQLParser::HAVING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ID() {
return getToken(HogQLParser::ID, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::IS() {
return getToken(HogQLParser::IS, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::IF() {
return getToken(HogQLParser::IF, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ILIKE() {
return getToken(HogQLParser::ILIKE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::IN() {
return getToken(HogQLParser::IN, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::INNER() {
return getToken(HogQLParser::INNER, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::INTERVAL() {
return getToken(HogQLParser::INTERVAL, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::JOIN() {
return getToken(HogQLParser::JOIN, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::KEY() {
return getToken(HogQLParser::KEY, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::LAST() {
return getToken(HogQLParser::LAST, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::LEADING() {
return getToken(HogQLParser::LEADING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::LEFT() {
return getToken(HogQLParser::LEFT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::LIKE() {
return getToken(HogQLParser::LIKE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::LIMIT() {
return getToken(HogQLParser::LIMIT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::NOT() {
return getToken(HogQLParser::NOT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::NULLS() {
return getToken(HogQLParser::NULLS, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::OFFSET() {
return getToken(HogQLParser::OFFSET, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ON() {
return getToken(HogQLParser::ON, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::OR() {
return getToken(HogQLParser::OR, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ORDER() {
return getToken(HogQLParser::ORDER, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::OUTER() {
return getToken(HogQLParser::OUTER, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::OVER() {
return getToken(HogQLParser::OVER, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::PARTITION() {
return getToken(HogQLParser::PARTITION, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::PRECEDING() {
return getToken(HogQLParser::PRECEDING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::PREWHERE() {
return getToken(HogQLParser::PREWHERE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::RANGE() {
return getToken(HogQLParser::RANGE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::RETURN() {
return getToken(HogQLParser::RETURN, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::RIGHT() {
return getToken(HogQLParser::RIGHT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ROLLUP() {
return getToken(HogQLParser::ROLLUP, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ROW() {
return getToken(HogQLParser::ROW, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::ROWS() {
return getToken(HogQLParser::ROWS, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::SAMPLE() {
return getToken(HogQLParser::SAMPLE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::SELECT() {
return getToken(HogQLParser::SELECT, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::SEMI() {
return getToken(HogQLParser::SEMI, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::SETTINGS() {
return getToken(HogQLParser::SETTINGS, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::SUBSTRING() {
return getToken(HogQLParser::SUBSTRING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::THEN() {
return getToken(HogQLParser::THEN, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TIES() {
return getToken(HogQLParser::TIES, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TIMESTAMP() {
return getToken(HogQLParser::TIMESTAMP, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TOTALS() {
return getToken(HogQLParser::TOTALS, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TRAILING() {
return getToken(HogQLParser::TRAILING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TRIM() {
return getToken(HogQLParser::TRIM, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TRUNCATE() {
return getToken(HogQLParser::TRUNCATE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TO() {
return getToken(HogQLParser::TO, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::TOP() {
return getToken(HogQLParser::TOP, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::UNBOUNDED() {
return getToken(HogQLParser::UNBOUNDED, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::UNION() {
return getToken(HogQLParser::UNION, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::USING() {
return getToken(HogQLParser::USING, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::WHEN() {
return getToken(HogQLParser::WHEN, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::WHERE() {
return getToken(HogQLParser::WHERE, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::WINDOW() {
return getToken(HogQLParser::WINDOW, 0);
}
tree::TerminalNode* HogQLParser::KeywordContext::WITH() {
return getToken(HogQLParser::WITH, 0);
}
size_t HogQLParser::KeywordContext::getRuleIndex() const {
return HogQLParser::RuleKeyword;
}
std::any HogQLParser::KeywordContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitKeyword(this);
else
return visitor->visitChildren(this);
}
HogQLParser::KeywordContext* HogQLParser::keyword() {
KeywordContext *_localctx = _tracker.createInstance<KeywordContext>(_ctx, getState());
enterRule(_localctx, 150, HogQLParser::RuleKeyword);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1245);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -1666350075474886658) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 943816933247) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- KeywordForAliasContext ------------------------------------------------------------------
HogQLParser::KeywordForAliasContext::KeywordForAliasContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::KeywordForAliasContext::DATE() {
return getToken(HogQLParser::DATE, 0);
}
tree::TerminalNode* HogQLParser::KeywordForAliasContext::FIRST() {
return getToken(HogQLParser::FIRST, 0);
}
tree::TerminalNode* HogQLParser::KeywordForAliasContext::ID() {
return getToken(HogQLParser::ID, 0);
}
tree::TerminalNode* HogQLParser::KeywordForAliasContext::KEY() {
return getToken(HogQLParser::KEY, 0);
}
size_t HogQLParser::KeywordForAliasContext::getRuleIndex() const {
return HogQLParser::RuleKeywordForAlias;
}
std::any HogQLParser::KeywordForAliasContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitKeywordForAlias(this);
else
return visitor->visitChildren(this);
}
HogQLParser::KeywordForAliasContext* HogQLParser::keywordForAlias() {
KeywordForAliasContext *_localctx = _tracker.createInstance<KeywordForAliasContext>(_ctx, getState());
enterRule(_localctx, 152, HogQLParser::RuleKeywordForAlias);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1247);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 564050539839488) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AliasContext ------------------------------------------------------------------
HogQLParser::AliasContext::AliasContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::AliasContext::IDENTIFIER() {
return getToken(HogQLParser::IDENTIFIER, 0);
}
HogQLParser::KeywordForAliasContext* HogQLParser::AliasContext::keywordForAlias() {
return getRuleContext<HogQLParser::KeywordForAliasContext>(0);
}
size_t HogQLParser::AliasContext::getRuleIndex() const {
return HogQLParser::RuleAlias;
}
std::any HogQLParser::AliasContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitAlias(this);
else
return visitor->visitChildren(this);
}
HogQLParser::AliasContext* HogQLParser::alias() {
AliasContext *_localctx = _tracker.createInstance<AliasContext>(_ctx, getState());
enterRule(_localctx, 154, HogQLParser::RuleAlias);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1251);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::IDENTIFIER: {
enterOuterAlt(_localctx, 1);
setState(1249);
match(HogQLParser::IDENTIFIER);
break;
}
case HogQLParser::DATE:
case HogQLParser::FIRST:
case HogQLParser::ID:
case HogQLParser::KEY: {
enterOuterAlt(_localctx, 2);
setState(1250);
keywordForAlias();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IdentifierContext ------------------------------------------------------------------
HogQLParser::IdentifierContext::IdentifierContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::IdentifierContext::IDENTIFIER() {
return getToken(HogQLParser::IDENTIFIER, 0);
}
HogQLParser::IntervalContext* HogQLParser::IdentifierContext::interval() {
return getRuleContext<HogQLParser::IntervalContext>(0);
}
HogQLParser::KeywordContext* HogQLParser::IdentifierContext::keyword() {
return getRuleContext<HogQLParser::KeywordContext>(0);
}
size_t HogQLParser::IdentifierContext::getRuleIndex() const {
return HogQLParser::RuleIdentifier;
}
std::any HogQLParser::IdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitIdentifier(this);
else
return visitor->visitChildren(this);
}
HogQLParser::IdentifierContext* HogQLParser::identifier() {
IdentifierContext *_localctx = _tracker.createInstance<IdentifierContext>(_ctx, getState());
enterRule(_localctx, 156, HogQLParser::RuleIdentifier);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1256);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::IDENTIFIER: {
enterOuterAlt(_localctx, 1);
setState(1253);
match(HogQLParser::IDENTIFIER);
break;
}
case HogQLParser::DAY:
case HogQLParser::HOUR:
case HogQLParser::MINUTE:
case HogQLParser::MONTH:
case HogQLParser::QUARTER:
case HogQLParser::SECOND:
case HogQLParser::WEEK:
case HogQLParser::YEAR: {
enterOuterAlt(_localctx, 2);
setState(1254);
interval();
break;
}
case HogQLParser::ALL:
case HogQLParser::AND:
case HogQLParser::ANTI:
case HogQLParser::ANY:
case HogQLParser::ARRAY:
case HogQLParser::AS:
case HogQLParser::ASCENDING:
case HogQLParser::ASOF:
case HogQLParser::BETWEEN:
case HogQLParser::BOTH:
case HogQLParser::BY:
case HogQLParser::CASE:
case HogQLParser::CAST:
case HogQLParser::COHORT:
case HogQLParser::COLLATE:
case HogQLParser::CROSS:
case HogQLParser::CUBE:
case HogQLParser::CURRENT:
case HogQLParser::DATE:
case HogQLParser::DESC:
case HogQLParser::DESCENDING:
case HogQLParser::DISTINCT:
case HogQLParser::ELSE:
case HogQLParser::END:
case HogQLParser::EXTRACT:
case HogQLParser::FINAL:
case HogQLParser::FIRST:
case HogQLParser::FOLLOWING:
case HogQLParser::FOR:
case HogQLParser::FROM:
case HogQLParser::FULL:
case HogQLParser::GROUP:
case HogQLParser::HAVING:
case HogQLParser::ID:
case HogQLParser::IF:
case HogQLParser::ILIKE:
case HogQLParser::IN:
case HogQLParser::INNER:
case HogQLParser::INTERVAL:
case HogQLParser::IS:
case HogQLParser::JOIN:
case HogQLParser::KEY:
case HogQLParser::LAST:
case HogQLParser::LEADING:
case HogQLParser::LEFT:
case HogQLParser::LIKE:
case HogQLParser::LIMIT:
case HogQLParser::NOT:
case HogQLParser::NULLS:
case HogQLParser::OFFSET:
case HogQLParser::ON:
case HogQLParser::OR:
case HogQLParser::ORDER:
case HogQLParser::OUTER:
case HogQLParser::OVER:
case HogQLParser::PARTITION:
case HogQLParser::PRECEDING:
case HogQLParser::PREWHERE:
case HogQLParser::RANGE:
case HogQLParser::RETURN:
case HogQLParser::RIGHT:
case HogQLParser::ROLLUP:
case HogQLParser::ROW:
case HogQLParser::ROWS:
case HogQLParser::SAMPLE:
case HogQLParser::SELECT:
case HogQLParser::SEMI:
case HogQLParser::SETTINGS:
case HogQLParser::SUBSTRING:
case HogQLParser::THEN:
case HogQLParser::TIES:
case HogQLParser::TIMESTAMP:
case HogQLParser::TO:
case HogQLParser::TOP:
case HogQLParser::TOTALS:
case HogQLParser::TRAILING:
case HogQLParser::TRIM:
case HogQLParser::TRUNCATE:
case HogQLParser::UNBOUNDED:
case HogQLParser::UNION:
case HogQLParser::USING:
case HogQLParser::WHEN:
case HogQLParser::WHERE:
case HogQLParser::WINDOW:
case HogQLParser::WITH: {
enterOuterAlt(_localctx, 3);
setState(1255);
keyword();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- EnumValueContext ------------------------------------------------------------------
HogQLParser::EnumValueContext::EnumValueContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
HogQLParser::StringContext* HogQLParser::EnumValueContext::string() {
return getRuleContext<HogQLParser::StringContext>(0);
}
tree::TerminalNode* HogQLParser::EnumValueContext::EQ_SINGLE() {
return getToken(HogQLParser::EQ_SINGLE, 0);
}
HogQLParser::NumberLiteralContext* HogQLParser::EnumValueContext::numberLiteral() {
return getRuleContext<HogQLParser::NumberLiteralContext>(0);
}
size_t HogQLParser::EnumValueContext::getRuleIndex() const {
return HogQLParser::RuleEnumValue;
}
std::any HogQLParser::EnumValueContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitEnumValue(this);
else
return visitor->visitChildren(this);
}
HogQLParser::EnumValueContext* HogQLParser::enumValue() {
EnumValueContext *_localctx = _tracker.createInstance<EnumValueContext>(_ctx, getState());
enterRule(_localctx, 158, HogQLParser::RuleEnumValue);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1258);
string();
setState(1259);
match(HogQLParser::EQ_SINGLE);
setState(1260);
numberLiteral();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PlaceholderContext ------------------------------------------------------------------
HogQLParser::PlaceholderContext::PlaceholderContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::PlaceholderContext::LBRACE() {
return getToken(HogQLParser::LBRACE, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::PlaceholderContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::PlaceholderContext::RBRACE() {
return getToken(HogQLParser::RBRACE, 0);
}
size_t HogQLParser::PlaceholderContext::getRuleIndex() const {
return HogQLParser::RulePlaceholder;
}
std::any HogQLParser::PlaceholderContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitPlaceholder(this);
else
return visitor->visitChildren(this);
}
HogQLParser::PlaceholderContext* HogQLParser::placeholder() {
PlaceholderContext *_localctx = _tracker.createInstance<PlaceholderContext>(_ctx, getState());
enterRule(_localctx, 160, HogQLParser::RulePlaceholder);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1262);
match(HogQLParser::LBRACE);
setState(1263);
columnExpr(0);
setState(1264);
match(HogQLParser::RBRACE);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- StringContext ------------------------------------------------------------------
HogQLParser::StringContext::StringContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::StringContext::STRING_LITERAL() {
return getToken(HogQLParser::STRING_LITERAL, 0);
}
HogQLParser::TemplateStringContext* HogQLParser::StringContext::templateString() {
return getRuleContext<HogQLParser::TemplateStringContext>(0);
}
size_t HogQLParser::StringContext::getRuleIndex() const {
return HogQLParser::RuleString;
}
std::any HogQLParser::StringContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitString(this);
else
return visitor->visitChildren(this);
}
HogQLParser::StringContext* HogQLParser::string() {
StringContext *_localctx = _tracker.createInstance<StringContext>(_ctx, getState());
enterRule(_localctx, 162, HogQLParser::RuleString);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1268);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::STRING_LITERAL: {
enterOuterAlt(_localctx, 1);
setState(1266);
match(HogQLParser::STRING_LITERAL);
break;
}
case HogQLParser::QUOTE_SINGLE_TEMPLATE: {
enterOuterAlt(_localctx, 2);
setState(1267);
templateString();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TemplateStringContext ------------------------------------------------------------------
HogQLParser::TemplateStringContext::TemplateStringContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::TemplateStringContext::QUOTE_SINGLE_TEMPLATE() {
return getToken(HogQLParser::QUOTE_SINGLE_TEMPLATE, 0);
}
tree::TerminalNode* HogQLParser::TemplateStringContext::QUOTE_SINGLE() {
return getToken(HogQLParser::QUOTE_SINGLE, 0);
}
std::vector<HogQLParser::StringContentsContext *> HogQLParser::TemplateStringContext::stringContents() {
return getRuleContexts<HogQLParser::StringContentsContext>();
}
HogQLParser::StringContentsContext* HogQLParser::TemplateStringContext::stringContents(size_t i) {
return getRuleContext<HogQLParser::StringContentsContext>(i);
}
size_t HogQLParser::TemplateStringContext::getRuleIndex() const {
return HogQLParser::RuleTemplateString;
}
std::any HogQLParser::TemplateStringContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitTemplateString(this);
else
return visitor->visitChildren(this);
}
HogQLParser::TemplateStringContext* HogQLParser::templateString() {
TemplateStringContext *_localctx = _tracker.createInstance<TemplateStringContext>(_ctx, getState());
enterRule(_localctx, 164, HogQLParser::RuleTemplateString);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1270);
match(HogQLParser::QUOTE_SINGLE_TEMPLATE);
setState(1274);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::STRING_TEXT
|| _la == HogQLParser::STRING_ESCAPE_TRIGGER) {
setState(1271);
stringContents();
setState(1276);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(1277);
match(HogQLParser::QUOTE_SINGLE);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- StringContentsContext ------------------------------------------------------------------
HogQLParser::StringContentsContext::StringContentsContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::StringContentsContext::STRING_ESCAPE_TRIGGER() {
return getToken(HogQLParser::STRING_ESCAPE_TRIGGER, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::StringContentsContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::StringContentsContext::RBRACE() {
return getToken(HogQLParser::RBRACE, 0);
}
tree::TerminalNode* HogQLParser::StringContentsContext::STRING_TEXT() {
return getToken(HogQLParser::STRING_TEXT, 0);
}
size_t HogQLParser::StringContentsContext::getRuleIndex() const {
return HogQLParser::RuleStringContents;
}
std::any HogQLParser::StringContentsContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitStringContents(this);
else
return visitor->visitChildren(this);
}
HogQLParser::StringContentsContext* HogQLParser::stringContents() {
StringContentsContext *_localctx = _tracker.createInstance<StringContentsContext>(_ctx, getState());
enterRule(_localctx, 166, HogQLParser::RuleStringContents);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1284);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::STRING_ESCAPE_TRIGGER: {
enterOuterAlt(_localctx, 1);
setState(1279);
match(HogQLParser::STRING_ESCAPE_TRIGGER);
setState(1280);
columnExpr(0);
setState(1281);
match(HogQLParser::RBRACE);
break;
}
case HogQLParser::STRING_TEXT: {
enterOuterAlt(_localctx, 2);
setState(1283);
match(HogQLParser::STRING_TEXT);
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- FullTemplateStringContext ------------------------------------------------------------------
HogQLParser::FullTemplateStringContext::FullTemplateStringContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::FullTemplateStringContext::QUOTE_SINGLE_TEMPLATE_FULL() {
return getToken(HogQLParser::QUOTE_SINGLE_TEMPLATE_FULL, 0);
}
tree::TerminalNode* HogQLParser::FullTemplateStringContext::EOF() {
return getToken(HogQLParser::EOF, 0);
}
std::vector<HogQLParser::StringContentsFullContext *> HogQLParser::FullTemplateStringContext::stringContentsFull() {
return getRuleContexts<HogQLParser::StringContentsFullContext>();
}
HogQLParser::StringContentsFullContext* HogQLParser::FullTemplateStringContext::stringContentsFull(size_t i) {
return getRuleContext<HogQLParser::StringContentsFullContext>(i);
}
size_t HogQLParser::FullTemplateStringContext::getRuleIndex() const {
return HogQLParser::RuleFullTemplateString;
}
std::any HogQLParser::FullTemplateStringContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitFullTemplateString(this);
else
return visitor->visitChildren(this);
}
HogQLParser::FullTemplateStringContext* HogQLParser::fullTemplateString() {
FullTemplateStringContext *_localctx = _tracker.createInstance<FullTemplateStringContext>(_ctx, getState());
enterRule(_localctx, 168, HogQLParser::RuleFullTemplateString);
size_t _la = 0;
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1286);
match(HogQLParser::QUOTE_SINGLE_TEMPLATE_FULL);
setState(1290);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::FULL_STRING_TEXT
|| _la == HogQLParser::FULL_STRING_ESCAPE_TRIGGER) {
setState(1287);
stringContentsFull();
setState(1292);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(1293);
match(HogQLParser::EOF);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- StringContentsFullContext ------------------------------------------------------------------
HogQLParser::StringContentsFullContext::StringContentsFullContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* HogQLParser::StringContentsFullContext::FULL_STRING_ESCAPE_TRIGGER() {
return getToken(HogQLParser::FULL_STRING_ESCAPE_TRIGGER, 0);
}
HogQLParser::ColumnExprContext* HogQLParser::StringContentsFullContext::columnExpr() {
return getRuleContext<HogQLParser::ColumnExprContext>(0);
}
tree::TerminalNode* HogQLParser::StringContentsFullContext::RBRACE() {
return getToken(HogQLParser::RBRACE, 0);
}
tree::TerminalNode* HogQLParser::StringContentsFullContext::FULL_STRING_TEXT() {
return getToken(HogQLParser::FULL_STRING_TEXT, 0);
}
size_t HogQLParser::StringContentsFullContext::getRuleIndex() const {
return HogQLParser::RuleStringContentsFull;
}
std::any HogQLParser::StringContentsFullContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
return parserVisitor->visitStringContentsFull(this);
else
return visitor->visitChildren(this);
}
HogQLParser::StringContentsFullContext* HogQLParser::stringContentsFull() {
StringContentsFullContext *_localctx = _tracker.createInstance<StringContentsFullContext>(_ctx, getState());
enterRule(_localctx, 170, HogQLParser::RuleStringContentsFull);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
#else
auto onExit = finally([=] {
#endif
exitRule();
});
try {
setState(1300);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::FULL_STRING_ESCAPE_TRIGGER: {
enterOuterAlt(_localctx, 1);
setState(1295);
match(HogQLParser::FULL_STRING_ESCAPE_TRIGGER);
setState(1296);
columnExpr(0);
setState(1297);
match(HogQLParser::RBRACE);
break;
}
case HogQLParser::FULL_STRING_TEXT: {
enterOuterAlt(_localctx, 2);
setState(1299);
match(HogQLParser::FULL_STRING_TEXT);
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
bool HogQLParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) {
switch (ruleIndex) {
case 39: return joinExprSempred(antlrcpp::downCast<JoinExprContext *>(context), predicateIndex);
case 58: return columnExprSempred(antlrcpp::downCast<ColumnExprContext *>(context), predicateIndex);
case 66: return tableExprSempred(antlrcpp::downCast<TableExprContext *>(context), predicateIndex);
default:
break;
}
return true;
}
bool HogQLParser::joinExprSempred(JoinExprContext *_localctx, size_t predicateIndex) {
switch (predicateIndex) {
case 0: return precpred(_ctx, 3);
case 1: return precpred(_ctx, 4);
default:
break;
}
return true;
}
bool HogQLParser::columnExprSempred(ColumnExprContext *_localctx, size_t predicateIndex) {
switch (predicateIndex) {
case 2: return precpred(_ctx, 19);
case 3: return precpred(_ctx, 18);
case 4: return precpred(_ctx, 17);
case 5: return precpred(_ctx, 15);
case 6: return precpred(_ctx, 13);
case 7: return precpred(_ctx, 12);
case 8: return precpred(_ctx, 11);
case 9: return precpred(_ctx, 10);
case 10: return precpred(_ctx, 30);
case 11: return precpred(_ctx, 26);
case 12: return precpred(_ctx, 25);
case 13: return precpred(_ctx, 24);
case 14: return precpred(_ctx, 23);
case 15: return precpred(_ctx, 22);
case 16: return precpred(_ctx, 21);
case 17: return precpred(_ctx, 16);
case 18: return precpred(_ctx, 9);
default:
break;
}
return true;
}
bool HogQLParser::tableExprSempred(TableExprContext *_localctx, size_t predicateIndex) {
switch (predicateIndex) {
case 19: return precpred(_ctx, 3);
default:
break;
}
return true;
}
void HogQLParser::initialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
hogqlparserParserInitialize();
#else
::antlr4::internal::call_once(hogqlparserParserOnceFlag, hogqlparserParserInitialize);
#endif
}