xtdb.antlr.Sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xtdb-core Show documentation
Show all versions of xtdb-core Show documentation
An open source document database with bitemporal graph queries
// Generated from xtdb/antlr/Sql.g4 by ANTLR 4.13.1
package xtdb.antlr;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
public class Sql extends Parser {
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
BLOCK_COMMENT=1, LINE_COMMENT=2, WHITESPACE=3, UNSIGNED_FLOAT=4, UNSIGNED_INTEGER=5,
CHARACTER_STRING=6, C_ESCAPES_STRING=7, BINARY_STRING=8, POSTGRES_PARAMETER_SPECIFICATION=9,
COMMA=10, DOT=11, SEMI=12, COLON=13, QUESTION=14, LPAREN=15, RPAREN=16,
LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, CONCAT=21, TILDE=22, AMPERSAND=23,
PLUS=24, MINUS=25, ASTERISK=26, SOLIDUS=27, BITWISE_OR=28, BITWISE_XOR=29,
BITWISE_SHIFT_LEFT=30, BITWISE_SHIFT_RIGHT=31, EQUAL=32, NOT_EQUAL=33,
LT_GT=34, LT=35, GT=36, LE=37, GE=38, PG_CAST=39, PG_REGEX_I=40, PG_NOT_REGEX=41,
PG_NOT_REGEX_I=42, ABS=43, ACOS=44, AGE=45, ALL=46, AND=47, ANY=48, ARRAY=49,
ARRAY_AGG=50, ARRAY_UPPER=51, ARROW_TABLE=52, AS=53, ASC=54, ASIN=55,
ASSERT=56, ASYMMETRIC=57, AT=58, ATAN=59, AVG=60, BASIS=61, BEGIN=62,
BEGIN_FRAME=63, BEGIN_PARTITION=64, BETWEEN=65, BIGINT=66, BOOLEAN=67,
BOOL_AND=68, BOOL_OR=69, BOTH=70, BY=71, CARDINALITY=72, CASE=73, CAST=74,
CEIL=75, CEILING=76, CENTURY=77, CHARACTERISTICS=78, CHARACTERS=79, CHARACTER_LENGTH=80,
CHAR_LENGTH=81, COALESCE=82, COMMIT=83, COMMITTED=84, CONTAINS=85, COS=86,
COSH=87, COUNT=88, CROSS=89, CUME_DIST=90, CURRENT=91, CURRENT_DATABASE=92,
CURRENT_DATE=93, CURRENT_ROW=94, CURRENT_SCHEMA=95, CURRENT_SCHEMAS=96,
CURRENT_TIME=97, CURRENT_TIMESTAMP=98, CURRENT_USER=99, DATE=100, DATE_BIN=101,
DATE_TRUNC=102, DAY=103, DEC=104, DECADE=105, DECIMAL=106, DEFAULT=107,
DELETE=108, DENSE_RANK=109, DESC=110, DISTINCT=111, DOUBLE=112, DURATION=113,
ELSE=114, END=115, END_FRAME=116, END_PARTITION=117, EQUALS=118, ERASE=119,
ESCAPE=120, EVERY=121, EXCEPT=122, EXCLUDE=123, EXISTS=124, EXP=125, EXTRACT=126,
FALSE=127, FETCH=128, FIRST=129, FIRST_VALUE=130, FLAG=131, FLOAT=132,
FLOOR=133, FOLLOWING=134, FOR=135, FRAME_ROW=136, FROM=137, FULL=138,
GENERATE_SERIES=139, GREATEST=140, GROUP=141, GROUPS=142, HAS_ANY_COLUMN_PRIVILEGE=143,
HAS_SCHEMA_PRIVILEGE=144, HAS_TABLE_PRIVILEGE=145, HAVING=146, HOUR=147,
IGNORE=148, IMMEDIATELY=149, IN=150, INNER=151, INSERT=152, INT=153, INTEGER=154,
INTERSECT=155, INTERVAL=156, INTO=157, IS=158, ISOLATION=159, JOIN=160,
LAG=161, LAST=162, LAST_VALUE=163, LATERAL=164, LATEST=165, LEAD=166,
LEADING=167, LEAST=168, LEFT=169, LENGTH=170, LEVEL=171, LIKE=172, LIKE_REGEX=173,
LIMIT=174, LN=175, LOCAL=176, LOCALTIME=177, LOCALTIMESTAMP=178, LOG=179,
LOG10=180, LOWER=181, LOWER_INF=182, MAX=183, MICROSECOND=184, MILLENNIUM=185,
MILLISECOND=186, MIN=187, MINUTE=188, MOD=189, MONTH=190, NANOSECOND=191,
NATURAL=192, NEST_MANY=193, NEST_ONE=194, NEXT=195, NO=196, NONE=197,
NOT=198, NOW=199, NTH_VALUE=200, NTILE=201, NULL=202, NULLIF=203, NULLS=204,
NUMERIC=205, OBJECT=206, OCTETS=207, OCTET_LENGTH=208, OF=209, OFFSET=210,
ON=211, ONLY=212, OR=213, ORDER=214, ORDINALITY=215, OTHERS=216, OUTER=217,
OVER=218, OVERLAPS=219, OVERLAY=220, PARTITION=221, PERCENT_RANK=222,
PERIOD=223, PG_EXPANDARRAY=224, PG_GET_EXPR=225, PG_GET_INDEXDEF=226,
PLACING=227, PORTION=228, POSITION=229, POWER=230, PRECEDES=231, PRECEDING=232,
PRECISION=233, QUARTER=234, RANGE=235, RANGE_BINS=236, RANK=237, READ=238,
REAL=239, RECORD=240, RECORDS=241, RECURSIVE=242, REGCLASS=243, REGPROC=244,
RENAME=245, REPEATABLE=246, REPLACE=247, RESPECT=248, RETURNING=249, RIGHT=250,
ROLE=251, ROLLBACK=252, ROW=253, ROWS=254, ROW_NUMBER=255, SECOND=256,
SELECT=257, SERIALIZABLE=258, SESSION=259, SET=260, SETTING=261, SHOW=262,
SIN=263, SINH=264, SMALLINT=265, SOME=266, SQRT=267, STANDARD_CONFORMING_STRINGS=268,
START=269, STDDEV_POP=270, STDDEV_SAMP=271, SUBMITTED=272, SUBSTRING=273,
SUCCEEDS=274, SUM=275, SYMMETRIC=276, SYSTEM_TIME=277, TAN=278, TANH=279,
TEXT=280, THEN=281, TIES=282, TIME=283, TIMESTAMP=284, TIMESTAMPTZ=285,
TIMEZONE=286, TIMEZONE_HOUR=287, TIMEZONE_MINUTE=288, TO=289, TRAILING=290,
TRANSACTION=291, TRIM=292, TRIM_ARRAY=293, TRUE=294, TSTZRANGE=295, UNBOUNDED=296,
UNCOMMITTED=297, UNION=298, UNKNOWN=299, UNNEST=300, UPDATE=301, UPPER=302,
UPPER_INF=303, USING=304, UUID=305, VALID_TIME=306, VALUES=307, VALUE_OF=308,
VARCHAR=309, VAR_POP=310, VAR_SAMP=311, VERSION=312, WEEK=313, WHEN=314,
WHERE=315, WINDOW=316, WITH=317, WITHOUT=318, WRITE=319, YEAR=320, ZONE=321,
DOLLAR_TAG=322, REGULAR_IDENTIFIER=323, DELIMITED_IDENTIFIER=324, DM_END_TAG=325,
DM_TEXT=326;
public static final int
RULE_directSqlStatement = 0, RULE_directlyExecutableStatement = 1, RULE_showVariable = 2,
RULE_settingQueryVariables = 3, RULE_settingQueryVariable = 4, RULE_intervalLiteral = 5,
RULE_dateTimeLiteral = 6, RULE_literal = 7, RULE_dollarStringText = 8,
RULE_characterString = 9, RULE_intervalQualifier = 10, RULE_startField = 11,
RULE_endField = 12, RULE_intervalFractionalSecondsPrecision = 13, RULE_nonSecondPrimaryDatetimeField = 14,
RULE_singleDatetimeField = 15, RULE_identifierChain = 16, RULE_identifier = 17,
RULE_schemaName = 18, RULE_tableName = 19, RULE_columnName = 20, RULE_correlationName = 21,
RULE_queryName = 22, RULE_fieldName = 23, RULE_windowName = 24, RULE_dataType = 25,
RULE_precision = 26, RULE_scale = 27, RULE_charLengthUnits = 28, RULE_withOrWithoutTimeZone = 29,
RULE_maximumCardinality = 30, RULE_fieldDefinition = 31, RULE_expr = 32,
RULE_numericExpr = 33, RULE_exprPrimary = 34, RULE_replaceTarget = 35,
RULE_replacement = 36, RULE_currentInstantFunction = 37, RULE_booleanValue = 38,
RULE_objectConstructor = 39, RULE_objectNameAndValue = 40, RULE_objectName = 41,
RULE_parameterSpecification = 42, RULE_columnReference = 43, RULE_generateSeries = 44,
RULE_seriesStart = 45, RULE_seriesEnd = 46, RULE_seriesStep = 47, RULE_windowFunctionType = 48,
RULE_rankFunctionType = 49, RULE_numberOfTiles = 50, RULE_leadOrLagExtent = 51,
RULE_offset = 52, RULE_defaultExpression = 53, RULE_nullTreatment = 54,
RULE_firstOrLastValue = 55, RULE_nthRow = 56, RULE_fromFirstOrLast = 57,
RULE_windowNameOrSpecification = 58, RULE_nestedWindowFunction = 59, RULE_rowMarker = 60,
RULE_rowMarkerExpression = 61, RULE_rowMarkerDelta = 62, RULE_rowMarkerOffset = 63,
RULE_valueOfDefaultValue = 64, RULE_simpleWhenClause = 65, RULE_searchedWhenClause = 66,
RULE_elseClause = 67, RULE_whenOperandList = 68, RULE_whenOperand = 69,
RULE_extractField = 70, RULE_primaryDatetimeField = 71, RULE_timeZoneField = 72,
RULE_extractSource = 73, RULE_trimSource = 74, RULE_trimSpecification = 75,
RULE_trimCharacter = 76, RULE_startPosition = 77, RULE_stringLength = 78,
RULE_dateTruncPrecision = 79, RULE_dateTruncSource = 80, RULE_dateTruncTimeZone = 81,
RULE_dateBinSource = 82, RULE_rangeBinsSource = 83, RULE_dateBinOrigin = 84,
RULE_arrayValueConstructor = 85, RULE_trigonometricFunctionName = 86,
RULE_generalLogarithmBase = 87, RULE_generalLogarithmArgument = 88, RULE_rowValueConstructor = 89,
RULE_rowValueList = 90, RULE_tableValueConstructor = 91, RULE_recordValueConstructor = 92,
RULE_recordsValueList = 93, RULE_recordsValueConstructor = 94, RULE_fromClause = 95,
RULE_tableReference = 96, RULE_withOrdinality = 97, RULE_tableAlias = 98,
RULE_tableProjection = 99, RULE_querySystemTimePeriodSpecification = 100,
RULE_queryValidTimePeriodSpecification = 101, RULE_tableTimePeriodSpecification = 102,
RULE_periodSpecificationExpr = 103, RULE_tableOrQueryName = 104, RULE_columnNameList = 105,
RULE_joinSpecification = 106, RULE_joinType = 107, RULE_outerJoinType = 108,
RULE_whereClause = 109, RULE_groupByClause = 110, RULE_groupingElement = 111,
RULE_havingClause = 112, RULE_windowClause = 113, RULE_windowDefinitionList = 114,
RULE_windowDefinition = 115, RULE_newWindowName = 116, RULE_windowSpecification = 117,
RULE_windowSpecificationDetails = 118, RULE_existingWindowName = 119,
RULE_windowPartitionClause = 120, RULE_windowPartitionColumnReferenceList = 121,
RULE_windowPartitionColumnReference = 122, RULE_windowOrderClause = 123,
RULE_windowFrameClause = 124, RULE_windowFrameUnits = 125, RULE_windowFrameExtent = 126,
RULE_windowFrameStart = 127, RULE_windowFramePreceding = 128, RULE_windowFrameBetween = 129,
RULE_windowFrameBound1 = 130, RULE_windowFrameBound2 = 131, RULE_windowFrameBound = 132,
RULE_windowFrameFollowing = 133, RULE_windowFrameExclusion = 134, RULE_selectClause = 135,
RULE_selectList = 136, RULE_selectListAsterisk = 137, RULE_selectSublist = 138,
RULE_qualifiedAsterisk = 139, RULE_renameClause = 140, RULE_renameColumn = 141,
RULE_qualifiedRenameClause = 142, RULE_qualifiedRenameColumn = 143, RULE_excludeClause = 144,
RULE_derivedColumn = 145, RULE_asClause = 146, RULE_queryExpression = 147,
RULE_queryExpressionNoWith = 148, RULE_withClause = 149, RULE_withListElement = 150,
RULE_queryExpressionBody = 151, RULE_queryTerm = 152, RULE_orderByClause = 153,
RULE_offsetAndLimit = 154, RULE_resultOffsetClause = 155, RULE_fetchFirstClause = 156,
RULE_offsetRowCount = 157, RULE_fetchFirstRowCount = 158, RULE_subquery = 159,
RULE_predicatePart2 = 160, RULE_quantifiedComparisonPredicatePart3 = 161,
RULE_compOp = 162, RULE_inPredicateValue = 163, RULE_likePattern = 164,
RULE_likeEscape = 165, RULE_xqueryPattern = 166, RULE_xqueryOptionFlag = 167,
RULE_postgresRegexOperator = 168, RULE_quantifier = 169, RULE_searchCondition = 170,
RULE_userString = 171, RULE_tableString = 172, RULE_schemaString = 173,
RULE_privilegeString = 174, RULE_aggregateFunction = 175, RULE_setFunctionType = 176,
RULE_setQuantifier = 177, RULE_sortSpecificationList = 178, RULE_sortSpecification = 179,
RULE_orderingSpecification = 180, RULE_nullOrdering = 181, RULE_returningStatement = 182,
RULE_deleteStatementSearched = 183, RULE_dmlStatementValidTimeExtents = 184,
RULE_eraseStatementSearched = 185, RULE_insertStatement = 186, RULE_insertColumnsAndSource = 187,
RULE_updateStatementSearched = 188, RULE_setClauseList = 189, RULE_setClause = 190,
RULE_setTarget = 191, RULE_updateSource = 192, RULE_sessionCharacteristic = 193,
RULE_sessionTxMode = 194, RULE_transactionCharacteristics = 195, RULE_transactionMode = 196,
RULE_levelOfIsolation = 197;
private static String[] makeRuleNames() {
return new String[] {
"directSqlStatement", "directlyExecutableStatement", "showVariable",
"settingQueryVariables", "settingQueryVariable", "intervalLiteral", "dateTimeLiteral",
"literal", "dollarStringText", "characterString", "intervalQualifier",
"startField", "endField", "intervalFractionalSecondsPrecision", "nonSecondPrimaryDatetimeField",
"singleDatetimeField", "identifierChain", "identifier", "schemaName",
"tableName", "columnName", "correlationName", "queryName", "fieldName",
"windowName", "dataType", "precision", "scale", "charLengthUnits", "withOrWithoutTimeZone",
"maximumCardinality", "fieldDefinition", "expr", "numericExpr", "exprPrimary",
"replaceTarget", "replacement", "currentInstantFunction", "booleanValue",
"objectConstructor", "objectNameAndValue", "objectName", "parameterSpecification",
"columnReference", "generateSeries", "seriesStart", "seriesEnd", "seriesStep",
"windowFunctionType", "rankFunctionType", "numberOfTiles", "leadOrLagExtent",
"offset", "defaultExpression", "nullTreatment", "firstOrLastValue", "nthRow",
"fromFirstOrLast", "windowNameOrSpecification", "nestedWindowFunction",
"rowMarker", "rowMarkerExpression", "rowMarkerDelta", "rowMarkerOffset",
"valueOfDefaultValue", "simpleWhenClause", "searchedWhenClause", "elseClause",
"whenOperandList", "whenOperand", "extractField", "primaryDatetimeField",
"timeZoneField", "extractSource", "trimSource", "trimSpecification",
"trimCharacter", "startPosition", "stringLength", "dateTruncPrecision",
"dateTruncSource", "dateTruncTimeZone", "dateBinSource", "rangeBinsSource",
"dateBinOrigin", "arrayValueConstructor", "trigonometricFunctionName",
"generalLogarithmBase", "generalLogarithmArgument", "rowValueConstructor",
"rowValueList", "tableValueConstructor", "recordValueConstructor", "recordsValueList",
"recordsValueConstructor", "fromClause", "tableReference", "withOrdinality",
"tableAlias", "tableProjection", "querySystemTimePeriodSpecification",
"queryValidTimePeriodSpecification", "tableTimePeriodSpecification",
"periodSpecificationExpr", "tableOrQueryName", "columnNameList", "joinSpecification",
"joinType", "outerJoinType", "whereClause", "groupByClause", "groupingElement",
"havingClause", "windowClause", "windowDefinitionList", "windowDefinition",
"newWindowName", "windowSpecification", "windowSpecificationDetails",
"existingWindowName", "windowPartitionClause", "windowPartitionColumnReferenceList",
"windowPartitionColumnReference", "windowOrderClause", "windowFrameClause",
"windowFrameUnits", "windowFrameExtent", "windowFrameStart", "windowFramePreceding",
"windowFrameBetween", "windowFrameBound1", "windowFrameBound2", "windowFrameBound",
"windowFrameFollowing", "windowFrameExclusion", "selectClause", "selectList",
"selectListAsterisk", "selectSublist", "qualifiedAsterisk", "renameClause",
"renameColumn", "qualifiedRenameClause", "qualifiedRenameColumn", "excludeClause",
"derivedColumn", "asClause", "queryExpression", "queryExpressionNoWith",
"withClause", "withListElement", "queryExpressionBody", "queryTerm",
"orderByClause", "offsetAndLimit", "resultOffsetClause", "fetchFirstClause",
"offsetRowCount", "fetchFirstRowCount", "subquery", "predicatePart2",
"quantifiedComparisonPredicatePart3", "compOp", "inPredicateValue", "likePattern",
"likeEscape", "xqueryPattern", "xqueryOptionFlag", "postgresRegexOperator",
"quantifier", "searchCondition", "userString", "tableString", "schemaString",
"privilegeString", "aggregateFunction", "setFunctionType", "setQuantifier",
"sortSpecificationList", "sortSpecification", "orderingSpecification",
"nullOrdering", "returningStatement", "deleteStatementSearched", "dmlStatementValidTimeExtents",
"eraseStatementSearched", "insertStatement", "insertColumnsAndSource",
"updateStatementSearched", "setClauseList", "setClause", "setTarget",
"updateSource", "sessionCharacteristic", "sessionTxMode", "transactionCharacteristics",
"transactionMode", "levelOfIsolation"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, null, null, null, null, null, null, null, null, null, "','", "'.'",
"';'", "':'", "'?'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'||'",
"'~'", "'&'", "'+'", "'-'", "'*'", "'/'", "'|'", "'#'", "'<<'", "'>>'",
"'='", "'!='", "'<>'", "'<'", "'>'", "'<='", "'>='", "'::'", "'~*'",
"'!~'", "'!~*'", "'ABS'", "'ACOS'", "'AGE'", "'ALL'", "'AND'", "'ANY'",
"'ARRAY'", "'ARRAY_AGG'", "'ARRAY_UPPER'", "'ARROW_TABLE'", "'AS'", "'ASC'",
"'ASIN'", "'ASSERT'", "'ASYMMETRIC'", "'AT'", "'ATAN'", "'AVG'", "'BASIS'",
"'BEGIN'", "'BEGIN_FRAME'", "'BEGIN_PARTITION'", "'BETWEEN'", "'BIGINT'",
"'BOOLEAN'", "'BOOL_AND'", "'BOOL_OR'", "'BOTH'", "'BY'", "'CARDINALITY'",
"'CASE'", "'CAST'", "'CEIL'", "'CEILING'", "'CENTURY'", "'CHARACTERISTICS'",
"'CHARACTERS'", "'CHARACTER_LENGTH'", "'CHAR_LENGTH'", "'COALESCE'",
"'COMMIT'", "'COMMITTED'", "'CONTAINS'", "'COS'", "'COSH'", "'COUNT'",
"'CROSS'", "'CUME_DIST'", "'CURRENT'", "'CURRENT_DATABASE'", "'CURRENT_DATE'",
"'CURRENT_ROW'", "'CURRENT_SCHEMA'", "'CURRENT_SCHEMAS'", "'CURRENT_TIME'",
"'CURRENT_TIMESTAMP'", "'CURRENT_USER'", "'DATE'", "'DATE_BIN'", "'DATE_TRUNC'",
"'DAY'", "'DEC'", "'DECADE'", "'DECIMAL'", "'DEFAULT'", "'DELETE'", "'DENSE_RANK'",
"'DESC'", "'DISTINCT'", "'DOUBLE'", "'DURATION'", "'ELSE'", "'END'",
"'END_FRAME'", "'END_PARTITION'", "'EQUALS'", "'ERASE'", "'ESCAPE'",
"'EVERY'", "'EXCEPT'", "'EXCLUDE'", "'EXISTS'", "'EXP'", "'EXTRACT'",
"'FALSE'", "'FETCH'", "'FIRST'", "'FIRST_VALUE'", "'FLAG'", "'FLOAT'",
"'FLOOR'", "'FOLLOWING'", "'FOR'", "'FRAME_ROW'", "'FROM'", "'FULL'",
"'GENERATE_SERIES'", "'GREATEST'", "'GROUP'", "'GROUPS'", "'HAS_ANY_COLUMN_PRIVILEGE'",
"'HAS_SCHEMA_PRIVILEGE'", "'HAS_TABLE_PRIVILEGE'", "'HAVING'", "'HOUR'",
"'IGNORE'", "'IMMEDIATELY'", "'IN'", "'INNER'", "'INSERT'", "'INT'",
"'INTEGER'", "'INTERSECT'", "'INTERVAL'", "'INTO'", "'IS'", "'ISOLATION'",
"'JOIN'", "'LAG'", "'LAST'", "'LAST_VALUE'", "'LATERAL'", "'LATEST'",
"'LEAD'", "'LEADING'", "'LEAST'", "'LEFT'", "'LENGTH'", "'LEVEL'", "'LIKE'",
"'LIKE_REGEX'", "'LIMIT'", "'LN'", "'LOCAL'", "'LOCALTIME'", "'LOCALTIMESTAMP'",
"'LOG'", "'LOG10'", "'LOWER'", "'LOWER_INF'", "'MAX'", "'MICROSECOND'",
"'MILLENNIUM'", "'MILLISECOND'", "'MIN'", "'MINUTE'", "'MOD'", "'MONTH'",
"'NANOSECOND'", "'NATURAL'", "'NEST_MANY'", "'NEST_ONE'", "'NEXT'", "'NO'",
"'NONE'", "'NOT'", "'NOW'", "'NTH_VALUE'", "'NTILE'", "'NULL'", "'NULLIF'",
"'NULLS'", "'NUMERIC'", "'OBJECT'", "'OCTETS'", "'OCTET_LENGTH'", "'OF'",
"'OFFSET'", "'ON'", "'ONLY'", "'OR'", "'ORDER'", "'ORDINALITY'", "'OTHERS'",
"'OUTER'", "'OVER'", "'OVERLAPS'", "'OVERLAY'", "'PARTITION'", "'PERCENT_RANK'",
"'PERIOD'", "'_PG_EXPANDARRAY'", "'PG_GET_EXPR'", "'PG_GET_INDEXDEF'",
"'PLACING'", "'PORTION'", "'POSITION'", "'POWER'", "'PRECEDES'", "'PRECEDING'",
"'PRECISION'", "'QUARTER'", "'RANGE'", "'RANGE_BINS'", "'RANK'", "'READ'",
"'REAL'", "'RECORD'", "'RECORDS'", "'RECURSIVE'", "'REGCLASS'", "'REGPROC'",
"'RENAME'", "'REPEATABLE'", "'REPLACE'", "'RESPECT'", "'RETURNING'",
"'RIGHT'", "'ROLE'", "'ROLLBACK'", "'ROW'", "'ROWS'", "'ROW_NUMBER'",
"'SECOND'", "'SELECT'", "'SERIALIZABLE'", "'SESSION'", "'SET'", "'SETTING'",
"'SHOW'", "'SIN'", "'SINH'", "'SMALLINT'", "'SOME'", "'SQRT'", "'STANDARD_CONFORMING_STRINGS'",
"'START'", "'STDDEV_POP'", "'STDDEV_SAMP'", "'SUBMITTED'", "'SUBSTRING'",
"'SUCCEEDS'", "'SUM'", "'SYMMETRIC'", "'SYSTEM_TIME'", "'TAN'", "'TANH'",
"'TEXT'", "'THEN'", "'TIES'", "'TIME'", "'TIMESTAMP'", "'TIMESTAMPTZ'",
"'TIMEZONE'", "'TIMEZONE_HOUR'", "'TIMEZONE_MINUTE'", "'TO'", "'TRAILING'",
"'TRANSACTION'", "'TRIM'", "'TRIM_ARRAY'", "'TRUE'", "'TSTZRANGE'", "'UNBOUNDED'",
"'UNCOMMITTED'", "'UNION'", "'UNKNOWN'", "'UNNEST'", "'UPDATE'", "'UPPER'",
"'UPPER_INF'", "'USING'", "'UUID'", "'VALID_TIME'", "'VALUES'", "'VALUE_OF'",
"'VARCHAR'", "'VAR_POP'", "'VAR_SAMP'", "'VERSION'", "'WEEK'", "'WHEN'",
"'WHERE'", "'WINDOW'", "'WITH'", "'WITHOUT'", "'WRITE'", "'YEAR'", "'ZONE'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "BLOCK_COMMENT", "LINE_COMMENT", "WHITESPACE", "UNSIGNED_FLOAT",
"UNSIGNED_INTEGER", "CHARACTER_STRING", "C_ESCAPES_STRING", "BINARY_STRING",
"POSTGRES_PARAMETER_SPECIFICATION", "COMMA", "DOT", "SEMI", "COLON",
"QUESTION", "LPAREN", "RPAREN", "LBRACK", "RBRACK", "LBRACE", "RBRACE",
"CONCAT", "TILDE", "AMPERSAND", "PLUS", "MINUS", "ASTERISK", "SOLIDUS",
"BITWISE_OR", "BITWISE_XOR", "BITWISE_SHIFT_LEFT", "BITWISE_SHIFT_RIGHT",
"EQUAL", "NOT_EQUAL", "LT_GT", "LT", "GT", "LE", "GE", "PG_CAST", "PG_REGEX_I",
"PG_NOT_REGEX", "PG_NOT_REGEX_I", "ABS", "ACOS", "AGE", "ALL", "AND",
"ANY", "ARRAY", "ARRAY_AGG", "ARRAY_UPPER", "ARROW_TABLE", "AS", "ASC",
"ASIN", "ASSERT", "ASYMMETRIC", "AT", "ATAN", "AVG", "BASIS", "BEGIN",
"BEGIN_FRAME", "BEGIN_PARTITION", "BETWEEN", "BIGINT", "BOOLEAN", "BOOL_AND",
"BOOL_OR", "BOTH", "BY", "CARDINALITY", "CASE", "CAST", "CEIL", "CEILING",
"CENTURY", "CHARACTERISTICS", "CHARACTERS", "CHARACTER_LENGTH", "CHAR_LENGTH",
"COALESCE", "COMMIT", "COMMITTED", "CONTAINS", "COS", "COSH", "COUNT",
"CROSS", "CUME_DIST", "CURRENT", "CURRENT_DATABASE", "CURRENT_DATE",
"CURRENT_ROW", "CURRENT_SCHEMA", "CURRENT_SCHEMAS", "CURRENT_TIME", "CURRENT_TIMESTAMP",
"CURRENT_USER", "DATE", "DATE_BIN", "DATE_TRUNC", "DAY", "DEC", "DECADE",
"DECIMAL", "DEFAULT", "DELETE", "DENSE_RANK", "DESC", "DISTINCT", "DOUBLE",
"DURATION", "ELSE", "END", "END_FRAME", "END_PARTITION", "EQUALS", "ERASE",
"ESCAPE", "EVERY", "EXCEPT", "EXCLUDE", "EXISTS", "EXP", "EXTRACT", "FALSE",
"FETCH", "FIRST", "FIRST_VALUE", "FLAG", "FLOAT", "FLOOR", "FOLLOWING",
"FOR", "FRAME_ROW", "FROM", "FULL", "GENERATE_SERIES", "GREATEST", "GROUP",
"GROUPS", "HAS_ANY_COLUMN_PRIVILEGE", "HAS_SCHEMA_PRIVILEGE", "HAS_TABLE_PRIVILEGE",
"HAVING", "HOUR", "IGNORE", "IMMEDIATELY", "IN", "INNER", "INSERT", "INT",
"INTEGER", "INTERSECT", "INTERVAL", "INTO", "IS", "ISOLATION", "JOIN",
"LAG", "LAST", "LAST_VALUE", "LATERAL", "LATEST", "LEAD", "LEADING",
"LEAST", "LEFT", "LENGTH", "LEVEL", "LIKE", "LIKE_REGEX", "LIMIT", "LN",
"LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOG", "LOG10", "LOWER", "LOWER_INF",
"MAX", "MICROSECOND", "MILLENNIUM", "MILLISECOND", "MIN", "MINUTE", "MOD",
"MONTH", "NANOSECOND", "NATURAL", "NEST_MANY", "NEST_ONE", "NEXT", "NO",
"NONE", "NOT", "NOW", "NTH_VALUE", "NTILE", "NULL", "NULLIF", "NULLS",
"NUMERIC", "OBJECT", "OCTETS", "OCTET_LENGTH", "OF", "OFFSET", "ON",
"ONLY", "OR", "ORDER", "ORDINALITY", "OTHERS", "OUTER", "OVER", "OVERLAPS",
"OVERLAY", "PARTITION", "PERCENT_RANK", "PERIOD", "PG_EXPANDARRAY", "PG_GET_EXPR",
"PG_GET_INDEXDEF", "PLACING", "PORTION", "POSITION", "POWER", "PRECEDES",
"PRECEDING", "PRECISION", "QUARTER", "RANGE", "RANGE_BINS", "RANK", "READ",
"REAL", "RECORD", "RECORDS", "RECURSIVE", "REGCLASS", "REGPROC", "RENAME",
"REPEATABLE", "REPLACE", "RESPECT", "RETURNING", "RIGHT", "ROLE", "ROLLBACK",
"ROW", "ROWS", "ROW_NUMBER", "SECOND", "SELECT", "SERIALIZABLE", "SESSION",
"SET", "SETTING", "SHOW", "SIN", "SINH", "SMALLINT", "SOME", "SQRT",
"STANDARD_CONFORMING_STRINGS", "START", "STDDEV_POP", "STDDEV_SAMP",
"SUBMITTED", "SUBSTRING", "SUCCEEDS", "SUM", "SYMMETRIC", "SYSTEM_TIME",
"TAN", "TANH", "TEXT", "THEN", "TIES", "TIME", "TIMESTAMP", "TIMESTAMPTZ",
"TIMEZONE", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TRAILING", "TRANSACTION",
"TRIM", "TRIM_ARRAY", "TRUE", "TSTZRANGE", "UNBOUNDED", "UNCOMMITTED",
"UNION", "UNKNOWN", "UNNEST", "UPDATE", "UPPER", "UPPER_INF", "USING",
"UUID", "VALID_TIME", "VALUES", "VALUE_OF", "VARCHAR", "VAR_POP", "VAR_SAMP",
"VERSION", "WEEK", "WHEN", "WHERE", "WINDOW", "WITH", "WITHOUT", "WRITE",
"YEAR", "ZONE", "DOLLAR_TAG", "REGULAR_IDENTIFIER", "DELIMITED_IDENTIFIER",
"DM_END_TAG", "DM_TEXT"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
@Override
public String getGrammarFileName() { return "Sql.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public Sql(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@SuppressWarnings("CheckReturnValue")
public static class DirectSqlStatementContext extends ParserRuleContext {
public DirectlyExecutableStatementContext directlyExecutableStatement() {
return getRuleContext(DirectlyExecutableStatementContext.class,0);
}
public TerminalNode EOF() { return getToken(Sql.EOF, 0); }
public TerminalNode SEMI() { return getToken(Sql.SEMI, 0); }
public DirectSqlStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_directSqlStatement; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDirectSqlStatement(this);
else return visitor.visitChildren(this);
}
}
public final DirectSqlStatementContext directSqlStatement() throws RecognitionException {
DirectSqlStatementContext _localctx = new DirectSqlStatementContext(_ctx, getState());
enterRule(_localctx, 0, RULE_directSqlStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(396);
directlyExecutableStatement();
setState(398);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==SEMI) {
{
setState(397);
match(SEMI);
}
}
setState(400);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DirectlyExecutableStatementContext extends ParserRuleContext {
public DirectlyExecutableStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_directlyExecutableStatement; }
public DirectlyExecutableStatementContext() { }
public void copyFrom(DirectlyExecutableStatementContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SetSessionVariableStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SET() { return getToken(Sql.SET, 0); }
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public LiteralContext literal() {
return getRuleContext(LiteralContext.class,0);
}
public TerminalNode TO() { return getToken(Sql.TO, 0); }
public TerminalNode EQUAL() { return getToken(Sql.EQUAL, 0); }
public SetSessionVariableStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSetSessionVariableStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SetTransactionStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SET() { return getToken(Sql.SET, 0); }
public TerminalNode TRANSACTION() { return getToken(Sql.TRANSACTION, 0); }
public TransactionCharacteristicsContext transactionCharacteristics() {
return getRuleContext(TransactionCharacteristicsContext.class,0);
}
public TerminalNode LOCAL() { return getToken(Sql.LOCAL, 0); }
public SetTransactionStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSetTransactionStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RollbackStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode ROLLBACK() { return getToken(Sql.ROLLBACK, 0); }
public RollbackStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitRollbackStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class QueryExprContext extends DirectlyExecutableStatementContext {
public QueryExpressionContext queryExpression() {
return getRuleContext(QueryExpressionContext.class,0);
}
public SettingQueryVariablesContext settingQueryVariables() {
return getRuleContext(SettingQueryVariablesContext.class,0);
}
public QueryExprContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitQueryExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class EraseStmtContext extends DirectlyExecutableStatementContext {
public EraseStatementSearchedContext eraseStatementSearched() {
return getRuleContext(EraseStatementSearchedContext.class,0);
}
public EraseStmtContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitEraseStmt(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ShowLatestSubmittedTransactionStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SHOW() { return getToken(Sql.SHOW, 0); }
public TerminalNode LATEST() { return getToken(Sql.LATEST, 0); }
public TerminalNode SUBMITTED() { return getToken(Sql.SUBMITTED, 0); }
public TerminalNode TRANSACTION() { return getToken(Sql.TRANSACTION, 0); }
public ShowLatestSubmittedTransactionStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitShowLatestSubmittedTransactionStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class InsertStmtContext extends DirectlyExecutableStatementContext {
public InsertStatementContext insertStatement() {
return getRuleContext(InsertStatementContext.class,0);
}
public InsertStmtContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitInsertStmt(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DeleteStmtContext extends DirectlyExecutableStatementContext {
public DeleteStatementSearchedContext deleteStatementSearched() {
return getRuleContext(DeleteStatementSearchedContext.class,0);
}
public DeleteStmtContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDeleteStmt(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ShowSessionVariableStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SHOW() { return getToken(Sql.SHOW, 0); }
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public ShowSessionVariableStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitShowSessionVariableStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SetRoleStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SET() { return getToken(Sql.SET, 0); }
public TerminalNode ROLE() { return getToken(Sql.ROLE, 0); }
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public TerminalNode NONE() { return getToken(Sql.NONE, 0); }
public SetRoleStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSetRoleStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SetSessionCharacteristicsStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SET() { return getToken(Sql.SET, 0); }
public TerminalNode SESSION() { return getToken(Sql.SESSION, 0); }
public TerminalNode CHARACTERISTICS() { return getToken(Sql.CHARACTERISTICS, 0); }
public TerminalNode AS() { return getToken(Sql.AS, 0); }
public List sessionCharacteristic() {
return getRuleContexts(SessionCharacteristicContext.class);
}
public SessionCharacteristicContext sessionCharacteristic(int i) {
return getRuleContext(SessionCharacteristicContext.class,i);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public SetSessionCharacteristicsStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSetSessionCharacteristicsStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SetTimeZoneStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SET() { return getToken(Sql.SET, 0); }
public TerminalNode TIME() { return getToken(Sql.TIME, 0); }
public TerminalNode ZONE() { return getToken(Sql.ZONE, 0); }
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public SetTimeZoneStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSetTimeZoneStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AssertStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode ASSERT() { return getToken(Sql.ASSERT, 0); }
public SearchConditionContext searchCondition() {
return getRuleContext(SearchConditionContext.class,0);
}
public AssertStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitAssertStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ShowVariableStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode SHOW() { return getToken(Sql.SHOW, 0); }
public ShowVariableContext showVariable() {
return getRuleContext(ShowVariableContext.class,0);
}
public ShowVariableStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitShowVariableStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CommitStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode COMMIT() { return getToken(Sql.COMMIT, 0); }
public CommitStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCommitStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class StartTransactionStatementContext extends DirectlyExecutableStatementContext {
public TerminalNode START() { return getToken(Sql.START, 0); }
public TerminalNode TRANSACTION() { return getToken(Sql.TRANSACTION, 0); }
public TerminalNode BEGIN() { return getToken(Sql.BEGIN, 0); }
public TransactionCharacteristicsContext transactionCharacteristics() {
return getRuleContext(TransactionCharacteristicsContext.class,0);
}
public StartTransactionStatementContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitStartTransactionStatement(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class UpdateStmtContext extends DirectlyExecutableStatementContext {
public UpdateStatementSearchedContext updateStatementSearched() {
return getRuleContext(UpdateStatementSearchedContext.class,0);
}
public UpdateStmtContext(DirectlyExecutableStatementContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitUpdateStmt(this);
else return visitor.visitChildren(this);
}
}
public final DirectlyExecutableStatementContext directlyExecutableStatement() throws RecognitionException {
DirectlyExecutableStatementContext _localctx = new DirectlyExecutableStatementContext(_ctx, getState());
enterRule(_localctx, 2, RULE_directlyExecutableStatement);
int _la;
try {
setState(463);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
_localctx = new QueryExprContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(403);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==SETTING) {
{
setState(402);
settingQueryVariables();
}
}
setState(405);
queryExpression();
}
break;
case 2:
_localctx = new InsertStmtContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(406);
insertStatement();
}
break;
case 3:
_localctx = new UpdateStmtContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(407);
updateStatementSearched();
}
break;
case 4:
_localctx = new DeleteStmtContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(408);
deleteStatementSearched();
}
break;
case 5:
_localctx = new EraseStmtContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(409);
eraseStatementSearched();
}
break;
case 6:
_localctx = new AssertStatementContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(410);
match(ASSERT);
setState(411);
searchCondition();
}
break;
case 7:
_localctx = new StartTransactionStatementContext(_localctx);
enterOuterAlt(_localctx, 7);
{
setState(415);
_errHandler.sync(this);
switch (_input.LA(1)) {
case START:
{
setState(412);
match(START);
setState(413);
match(TRANSACTION);
}
break;
case BEGIN:
{
setState(414);
match(BEGIN);
}
break;
default:
throw new NoViableAltException(this);
}
setState(418);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT || _la==ISOLATION || _la==READ) {
{
setState(417);
transactionCharacteristics();
}
}
}
break;
case 8:
_localctx = new SetTransactionStatementContext(_localctx);
enterOuterAlt(_localctx, 8);
{
setState(420);
match(SET);
setState(422);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LOCAL) {
{
setState(421);
match(LOCAL);
}
}
setState(424);
match(TRANSACTION);
setState(425);
transactionCharacteristics();
}
break;
case 9:
_localctx = new CommitStatementContext(_localctx);
enterOuterAlt(_localctx, 9);
{
setState(426);
match(COMMIT);
}
break;
case 10:
_localctx = new RollbackStatementContext(_localctx);
enterOuterAlt(_localctx, 10);
{
setState(427);
match(ROLLBACK);
}
break;
case 11:
_localctx = new SetSessionCharacteristicsStatementContext(_localctx);
enterOuterAlt(_localctx, 11);
{
setState(428);
match(SET);
setState(429);
match(SESSION);
setState(430);
match(CHARACTERISTICS);
setState(431);
match(AS);
setState(432);
sessionCharacteristic();
setState(437);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(433);
match(COMMA);
setState(434);
sessionCharacteristic();
}
}
setState(439);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
case 12:
_localctx = new SetRoleStatementContext(_localctx);
enterOuterAlt(_localctx, 12);
{
setState(440);
match(SET);
setState(441);
match(ROLE);
setState(444);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AGE:
case AVG:
case BASIS:
case BOOL_AND:
case BOOL_OR:
case CARDINALITY:
case COMMITTED:
case COUNT:
case DELETE:
case END:
case ERASE:
case EVERY:
case INSERT:
case LATEST:
case MAX:
case MIN:
case ROLE:
case SELECT:
case SETTING:
case START:
case STDDEV_POP:
case STDDEV_SAMP:
case SUBMITTED:
case SUM:
case SYSTEM_TIME:
case TIMEZONE:
case UNCOMMITTED:
case UPDATE:
case VALID_TIME:
case VAR_POP:
case VAR_SAMP:
case VERSION:
case REGULAR_IDENTIFIER:
case DELIMITED_IDENTIFIER:
{
setState(442);
identifier();
}
break;
case NONE:
{
setState(443);
match(NONE);
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
case 13:
_localctx = new SetTimeZoneStatementContext(_localctx);
enterOuterAlt(_localctx, 13);
{
setState(446);
match(SET);
setState(447);
match(TIME);
setState(448);
match(ZONE);
setState(449);
characterString();
}
break;
case 14:
_localctx = new SetSessionVariableStatementContext(_localctx);
enterOuterAlt(_localctx, 14);
{
setState(450);
match(SET);
setState(451);
identifier();
setState(452);
_la = _input.LA(1);
if ( !(_la==EQUAL || _la==TO) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(453);
literal();
}
break;
case 15:
_localctx = new ShowVariableStatementContext(_localctx);
enterOuterAlt(_localctx, 15);
{
setState(455);
match(SHOW);
setState(456);
showVariable();
}
break;
case 16:
_localctx = new ShowSessionVariableStatementContext(_localctx);
enterOuterAlt(_localctx, 16);
{
setState(457);
match(SHOW);
setState(458);
identifier();
}
break;
case 17:
_localctx = new ShowLatestSubmittedTransactionStatementContext(_localctx);
enterOuterAlt(_localctx, 17);
{
setState(459);
match(SHOW);
setState(460);
match(LATEST);
setState(461);
match(SUBMITTED);
setState(462);
match(TRANSACTION);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ShowVariableContext extends ParserRuleContext {
public ShowVariableContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_showVariable; }
public ShowVariableContext() { }
public void copyFrom(ShowVariableContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ShowTimeZoneContext extends ShowVariableContext {
public TerminalNode TIME() { return getToken(Sql.TIME, 0); }
public TerminalNode ZONE() { return getToken(Sql.ZONE, 0); }
public TerminalNode TIMEZONE() { return getToken(Sql.TIMEZONE, 0); }
public ShowTimeZoneContext(ShowVariableContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitShowTimeZone(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ShowStandardConformingStringsContext extends ShowVariableContext {
public TerminalNode STANDARD_CONFORMING_STRINGS() { return getToken(Sql.STANDARD_CONFORMING_STRINGS, 0); }
public ShowStandardConformingStringsContext(ShowVariableContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitShowStandardConformingStrings(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ShowTransactionIsolationLevelContext extends ShowVariableContext {
public TerminalNode TRANSACTION() { return getToken(Sql.TRANSACTION, 0); }
public TerminalNode ISOLATION() { return getToken(Sql.ISOLATION, 0); }
public TerminalNode LEVEL() { return getToken(Sql.LEVEL, 0); }
public ShowTransactionIsolationLevelContext(ShowVariableContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitShowTransactionIsolationLevel(this);
else return visitor.visitChildren(this);
}
}
public final ShowVariableContext showVariable() throws RecognitionException {
ShowVariableContext _localctx = new ShowVariableContext(_ctx, getState());
enterRule(_localctx, 4, RULE_showVariable);
try {
setState(474);
_errHandler.sync(this);
switch (_input.LA(1)) {
case TRANSACTION:
_localctx = new ShowTransactionIsolationLevelContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(465);
match(TRANSACTION);
setState(466);
match(ISOLATION);
setState(467);
match(LEVEL);
}
break;
case STANDARD_CONFORMING_STRINGS:
_localctx = new ShowStandardConformingStringsContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(468);
match(STANDARD_CONFORMING_STRINGS);
}
break;
case TIME:
case TIMEZONE:
_localctx = new ShowTimeZoneContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(472);
_errHandler.sync(this);
switch (_input.LA(1)) {
case TIME:
{
setState(469);
match(TIME);
setState(470);
match(ZONE);
}
break;
case TIMEZONE:
{
setState(471);
match(TIMEZONE);
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SettingQueryVariablesContext extends ParserRuleContext {
public TerminalNode SETTING() { return getToken(Sql.SETTING, 0); }
public List settingQueryVariable() {
return getRuleContexts(SettingQueryVariableContext.class);
}
public SettingQueryVariableContext settingQueryVariable(int i) {
return getRuleContext(SettingQueryVariableContext.class,i);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public SettingQueryVariablesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_settingQueryVariables; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSettingQueryVariables(this);
else return visitor.visitChildren(this);
}
}
public final SettingQueryVariablesContext settingQueryVariables() throws RecognitionException {
SettingQueryVariablesContext _localctx = new SettingQueryVariablesContext(_ctx, getState());
enterRule(_localctx, 6, RULE_settingQueryVariables);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(476);
match(SETTING);
setState(477);
settingQueryVariable();
setState(482);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(478);
match(COMMA);
setState(479);
settingQueryVariable();
}
}
setState(484);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SettingQueryVariableContext extends ParserRuleContext {
public SettingQueryVariableContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_settingQueryVariable; }
public SettingQueryVariableContext() { }
public void copyFrom(SettingQueryVariableContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SettingDefaultSystemTimeContext extends SettingQueryVariableContext {
public TerminalNode DEFAULT() { return getToken(Sql.DEFAULT, 0); }
public TerminalNode SYSTEM_TIME() { return getToken(Sql.SYSTEM_TIME, 0); }
public TableTimePeriodSpecificationContext tableTimePeriodSpecification() {
return getRuleContext(TableTimePeriodSpecificationContext.class,0);
}
public TerminalNode TO() { return getToken(Sql.TO, 0); }
public SettingDefaultSystemTimeContext(SettingQueryVariableContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSettingDefaultSystemTime(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SettingCurrentTimeContext extends SettingQueryVariableContext {
public LiteralContext currentTime;
public TerminalNode CURRENT_TIME() { return getToken(Sql.CURRENT_TIME, 0); }
public TerminalNode TO() { return getToken(Sql.TO, 0); }
public TerminalNode EQUAL() { return getToken(Sql.EQUAL, 0); }
public LiteralContext literal() {
return getRuleContext(LiteralContext.class,0);
}
public SettingCurrentTimeContext(SettingQueryVariableContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSettingCurrentTime(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SettingBasisContext extends SettingQueryVariableContext {
public LiteralContext basis;
public TerminalNode BASIS() { return getToken(Sql.BASIS, 0); }
public TerminalNode TO() { return getToken(Sql.TO, 0); }
public TerminalNode EQUAL() { return getToken(Sql.EQUAL, 0); }
public LiteralContext literal() {
return getRuleContext(LiteralContext.class,0);
}
public SettingBasisContext(SettingQueryVariableContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSettingBasis(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SettingDefaultValidTimeContext extends SettingQueryVariableContext {
public TerminalNode DEFAULT() { return getToken(Sql.DEFAULT, 0); }
public TerminalNode VALID_TIME() { return getToken(Sql.VALID_TIME, 0); }
public TableTimePeriodSpecificationContext tableTimePeriodSpecification() {
return getRuleContext(TableTimePeriodSpecificationContext.class,0);
}
public TerminalNode TO() { return getToken(Sql.TO, 0); }
public SettingDefaultValidTimeContext(SettingQueryVariableContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSettingDefaultValidTime(this);
else return visitor.visitChildren(this);
}
}
public final SettingQueryVariableContext settingQueryVariable() throws RecognitionException {
SettingQueryVariableContext _localctx = new SettingQueryVariableContext(_ctx, getState());
enterRule(_localctx, 8, RULE_settingQueryVariable);
int _la;
try {
setState(503);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
case 1:
_localctx = new SettingDefaultValidTimeContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(485);
match(DEFAULT);
setState(486);
match(VALID_TIME);
setState(488);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==TO) {
{
setState(487);
match(TO);
}
}
setState(490);
tableTimePeriodSpecification();
}
break;
case 2:
_localctx = new SettingDefaultSystemTimeContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(491);
match(DEFAULT);
setState(492);
match(SYSTEM_TIME);
setState(494);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==TO) {
{
setState(493);
match(TO);
}
}
setState(496);
tableTimePeriodSpecification();
}
break;
case 3:
_localctx = new SettingBasisContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(497);
match(BASIS);
setState(498);
_la = _input.LA(1);
if ( !(_la==EQUAL || _la==TO) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(499);
((SettingBasisContext)_localctx).basis = literal();
}
break;
case 4:
_localctx = new SettingCurrentTimeContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(500);
match(CURRENT_TIME);
setState(501);
_la = _input.LA(1);
if ( !(_la==EQUAL || _la==TO) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(502);
((SettingCurrentTimeContext)_localctx).currentTime = literal();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IntervalLiteralContext extends ParserRuleContext {
public TerminalNode INTERVAL() { return getToken(Sql.INTERVAL, 0); }
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public IntervalQualifierContext intervalQualifier() {
return getRuleContext(IntervalQualifierContext.class,0);
}
public TerminalNode PLUS() { return getToken(Sql.PLUS, 0); }
public TerminalNode MINUS() { return getToken(Sql.MINUS, 0); }
public IntervalLiteralContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_intervalLiteral; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIntervalLiteral(this);
else return visitor.visitChildren(this);
}
}
public final IntervalLiteralContext intervalLiteral() throws RecognitionException {
IntervalLiteralContext _localctx = new IntervalLiteralContext(_ctx, getState());
enterRule(_localctx, 10, RULE_intervalLiteral);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(505);
match(INTERVAL);
setState(507);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==PLUS || _la==MINUS) {
{
setState(506);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(509);
characterString();
setState(511);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
case 1:
{
setState(510);
intervalQualifier();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DateTimeLiteralContext extends ParserRuleContext {
public DateTimeLiteralContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dateTimeLiteral; }
public DateTimeLiteralContext() { }
public void copyFrom(DateTimeLiteralContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DateLiteralContext extends DateTimeLiteralContext {
public TerminalNode DATE() { return getToken(Sql.DATE, 0); }
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public DateLiteralContext(DateTimeLiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDateLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TimestampLiteralContext extends DateTimeLiteralContext {
public TerminalNode TIMESTAMP() { return getToken(Sql.TIMESTAMP, 0); }
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public WithOrWithoutTimeZoneContext withOrWithoutTimeZone() {
return getRuleContext(WithOrWithoutTimeZoneContext.class,0);
}
public TimestampLiteralContext(DateTimeLiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTimestampLiteral(this);
else return visitor.visitChildren(this);
}
}
public final DateTimeLiteralContext dateTimeLiteral() throws RecognitionException {
DateTimeLiteralContext _localctx = new DateTimeLiteralContext(_ctx, getState());
enterRule(_localctx, 12, RULE_dateTimeLiteral);
int _la;
try {
setState(520);
_errHandler.sync(this);
switch (_input.LA(1)) {
case DATE:
_localctx = new DateLiteralContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(513);
match(DATE);
setState(514);
characterString();
}
break;
case TIMESTAMP:
_localctx = new TimestampLiteralContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(515);
match(TIMESTAMP);
setState(517);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==WITH || _la==WITHOUT) {
{
setState(516);
withOrWithoutTimeZone();
}
}
setState(519);
characterString();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LiteralContext extends ParserRuleContext {
public LiteralContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_literal; }
public LiteralContext() { }
public void copyFrom(LiteralContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CharacterStringLiteralContext extends LiteralContext {
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public CharacterStringLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCharacterStringLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class IntervalLiteral0Context extends LiteralContext {
public IntervalLiteralContext intervalLiteral() {
return getRuleContext(IntervalLiteralContext.class,0);
}
public IntervalLiteral0Context(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIntervalLiteral0(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DateTimeLiteral0Context extends LiteralContext {
public DateTimeLiteralContext dateTimeLiteral() {
return getRuleContext(DateTimeLiteralContext.class,0);
}
public DateTimeLiteral0Context(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDateTimeLiteral0(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class BinaryStringLiteralContext extends LiteralContext {
public TerminalNode BINARY_STRING() { return getToken(Sql.BINARY_STRING, 0); }
public BinaryStringLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitBinaryStringLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class FloatLiteralContext extends LiteralContext {
public TerminalNode UNSIGNED_FLOAT() { return getToken(Sql.UNSIGNED_FLOAT, 0); }
public TerminalNode PLUS() { return getToken(Sql.PLUS, 0); }
public TerminalNode MINUS() { return getToken(Sql.MINUS, 0); }
public FloatLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitFloatLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class BooleanLiteralContext extends LiteralContext {
public TerminalNode TRUE() { return getToken(Sql.TRUE, 0); }
public TerminalNode FALSE() { return getToken(Sql.FALSE, 0); }
public BooleanLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitBooleanLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class UUIDLiteralContext extends LiteralContext {
public TerminalNode UUID() { return getToken(Sql.UUID, 0); }
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public UUIDLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitUUIDLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NullLiteralContext extends LiteralContext {
public TerminalNode NULL() { return getToken(Sql.NULL, 0); }
public NullLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNullLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class IntegerLiteralContext extends LiteralContext {
public TerminalNode UNSIGNED_INTEGER() { return getToken(Sql.UNSIGNED_INTEGER, 0); }
public TerminalNode PLUS() { return getToken(Sql.PLUS, 0); }
public TerminalNode MINUS() { return getToken(Sql.MINUS, 0); }
public IntegerLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIntegerLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TimeLiteralContext extends LiteralContext {
public TerminalNode TIME() { return getToken(Sql.TIME, 0); }
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public TimeLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTimeLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DurationLiteralContext extends LiteralContext {
public TerminalNode DURATION() { return getToken(Sql.DURATION, 0); }
public CharacterStringContext characterString() {
return getRuleContext(CharacterStringContext.class,0);
}
public DurationLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDurationLiteral(this);
else return visitor.visitChildren(this);
}
}
public final LiteralContext literal() throws RecognitionException {
LiteralContext _localctx = new LiteralContext(_ctx, getState());
enterRule(_localctx, 14, RULE_literal);
int _la;
try {
setState(542);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) {
case 1:
_localctx = new FloatLiteralContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(523);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==PLUS || _la==MINUS) {
{
setState(522);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(525);
match(UNSIGNED_FLOAT);
}
break;
case 2:
_localctx = new IntegerLiteralContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(527);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==PLUS || _la==MINUS) {
{
setState(526);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(529);
match(UNSIGNED_INTEGER);
}
break;
case 3:
_localctx = new CharacterStringLiteralContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(530);
characterString();
}
break;
case 4:
_localctx = new BinaryStringLiteralContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(531);
match(BINARY_STRING);
}
break;
case 5:
_localctx = new DateTimeLiteral0Context(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(532);
dateTimeLiteral();
}
break;
case 6:
_localctx = new TimeLiteralContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(533);
match(TIME);
setState(534);
characterString();
}
break;
case 7:
_localctx = new IntervalLiteral0Context(_localctx);
enterOuterAlt(_localctx, 7);
{
setState(535);
intervalLiteral();
}
break;
case 8:
_localctx = new DurationLiteralContext(_localctx);
enterOuterAlt(_localctx, 8);
{
setState(536);
match(DURATION);
setState(537);
characterString();
}
break;
case 9:
_localctx = new UUIDLiteralContext(_localctx);
enterOuterAlt(_localctx, 9);
{
setState(538);
match(UUID);
setState(539);
characterString();
}
break;
case 10:
_localctx = new BooleanLiteralContext(_localctx);
enterOuterAlt(_localctx, 10);
{
setState(540);
_la = _input.LA(1);
if ( !(_la==FALSE || _la==TRUE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case 11:
_localctx = new NullLiteralContext(_localctx);
enterOuterAlt(_localctx, 11);
{
setState(541);
match(NULL);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DollarStringTextContext extends ParserRuleContext {
public List DM_TEXT() { return getTokens(Sql.DM_TEXT); }
public TerminalNode DM_TEXT(int i) {
return getToken(Sql.DM_TEXT, i);
}
public DollarStringTextContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dollarStringText; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDollarStringText(this);
else return visitor.visitChildren(this);
}
}
public final DollarStringTextContext dollarStringText() throws RecognitionException {
DollarStringTextContext _localctx = new DollarStringTextContext(_ctx, getState());
enterRule(_localctx, 16, RULE_dollarStringText);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(545);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(544);
match(DM_TEXT);
}
}
setState(547);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==DM_TEXT );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CharacterStringContext extends ParserRuleContext {
public CharacterStringContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_characterString; }
public CharacterStringContext() { }
public void copyFrom(CharacterStringContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DollarStringContext extends CharacterStringContext {
public TerminalNode DOLLAR_TAG() { return getToken(Sql.DOLLAR_TAG, 0); }
public TerminalNode DM_END_TAG() { return getToken(Sql.DM_END_TAG, 0); }
public DollarStringTextContext dollarStringText() {
return getRuleContext(DollarStringTextContext.class,0);
}
public DollarStringContext(CharacterStringContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDollarString(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SqlStandardStringContext extends CharacterStringContext {
public TerminalNode CHARACTER_STRING() { return getToken(Sql.CHARACTER_STRING, 0); }
public SqlStandardStringContext(CharacterStringContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSqlStandardString(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CEscapesStringContext extends CharacterStringContext {
public TerminalNode C_ESCAPES_STRING() { return getToken(Sql.C_ESCAPES_STRING, 0); }
public CEscapesStringContext(CharacterStringContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCEscapesString(this);
else return visitor.visitChildren(this);
}
}
public final CharacterStringContext characterString() throws RecognitionException {
CharacterStringContext _localctx = new CharacterStringContext(_ctx, getState());
enterRule(_localctx, 18, RULE_characterString);
int _la;
try {
setState(556);
_errHandler.sync(this);
switch (_input.LA(1)) {
case CHARACTER_STRING:
_localctx = new SqlStandardStringContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(549);
match(CHARACTER_STRING);
}
break;
case C_ESCAPES_STRING:
_localctx = new CEscapesStringContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(550);
match(C_ESCAPES_STRING);
}
break;
case DOLLAR_TAG:
_localctx = new DollarStringContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(551);
match(DOLLAR_TAG);
setState(553);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==DM_TEXT) {
{
setState(552);
dollarStringText();
}
}
setState(555);
match(DM_END_TAG);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IntervalQualifierContext extends ParserRuleContext {
public StartFieldContext startField() {
return getRuleContext(StartFieldContext.class,0);
}
public TerminalNode TO() { return getToken(Sql.TO, 0); }
public EndFieldContext endField() {
return getRuleContext(EndFieldContext.class,0);
}
public SingleDatetimeFieldContext singleDatetimeField() {
return getRuleContext(SingleDatetimeFieldContext.class,0);
}
public IntervalQualifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_intervalQualifier; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIntervalQualifier(this);
else return visitor.visitChildren(this);
}
}
public final IntervalQualifierContext intervalQualifier() throws RecognitionException {
IntervalQualifierContext _localctx = new IntervalQualifierContext(_ctx, getState());
enterRule(_localctx, 20, RULE_intervalQualifier);
try {
setState(563);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(558);
startField();
setState(559);
match(TO);
setState(560);
endField();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(562);
singleDatetimeField();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class StartFieldContext extends ParserRuleContext {
public NonSecondPrimaryDatetimeFieldContext nonSecondPrimaryDatetimeField() {
return getRuleContext(NonSecondPrimaryDatetimeFieldContext.class,0);
}
public StartFieldContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_startField; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitStartField(this);
else return visitor.visitChildren(this);
}
}
public final StartFieldContext startField() throws RecognitionException {
StartFieldContext _localctx = new StartFieldContext(_ctx, getState());
enterRule(_localctx, 22, RULE_startField);
try {
enterOuterAlt(_localctx, 1);
{
setState(565);
nonSecondPrimaryDatetimeField();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EndFieldContext extends ParserRuleContext {
public SingleDatetimeFieldContext singleDatetimeField() {
return getRuleContext(SingleDatetimeFieldContext.class,0);
}
public EndFieldContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_endField; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitEndField(this);
else return visitor.visitChildren(this);
}
}
public final EndFieldContext endField() throws RecognitionException {
EndFieldContext _localctx = new EndFieldContext(_ctx, getState());
enterRule(_localctx, 24, RULE_endField);
try {
enterOuterAlt(_localctx, 1);
{
setState(567);
singleDatetimeField();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IntervalFractionalSecondsPrecisionContext extends ParserRuleContext {
public TerminalNode UNSIGNED_INTEGER() { return getToken(Sql.UNSIGNED_INTEGER, 0); }
public IntervalFractionalSecondsPrecisionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_intervalFractionalSecondsPrecision; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIntervalFractionalSecondsPrecision(this);
else return visitor.visitChildren(this);
}
}
public final IntervalFractionalSecondsPrecisionContext intervalFractionalSecondsPrecision() throws RecognitionException {
IntervalFractionalSecondsPrecisionContext _localctx = new IntervalFractionalSecondsPrecisionContext(_ctx, getState());
enterRule(_localctx, 26, RULE_intervalFractionalSecondsPrecision);
try {
enterOuterAlt(_localctx, 1);
{
setState(569);
match(UNSIGNED_INTEGER);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NonSecondPrimaryDatetimeFieldContext extends ParserRuleContext {
public TerminalNode YEAR() { return getToken(Sql.YEAR, 0); }
public TerminalNode MONTH() { return getToken(Sql.MONTH, 0); }
public TerminalNode DAY() { return getToken(Sql.DAY, 0); }
public TerminalNode HOUR() { return getToken(Sql.HOUR, 0); }
public TerminalNode MINUTE() { return getToken(Sql.MINUTE, 0); }
public NonSecondPrimaryDatetimeFieldContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_nonSecondPrimaryDatetimeField; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNonSecondPrimaryDatetimeField(this);
else return visitor.visitChildren(this);
}
}
public final NonSecondPrimaryDatetimeFieldContext nonSecondPrimaryDatetimeField() throws RecognitionException {
NonSecondPrimaryDatetimeFieldContext _localctx = new NonSecondPrimaryDatetimeFieldContext(_ctx, getState());
enterRule(_localctx, 28, RULE_nonSecondPrimaryDatetimeField);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(571);
_la = _input.LA(1);
if ( !(_la==DAY || _la==HOUR || _la==MINUTE || _la==MONTH || _la==YEAR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SingleDatetimeFieldContext extends ParserRuleContext {
public NonSecondPrimaryDatetimeFieldContext nonSecondPrimaryDatetimeField() {
return getRuleContext(NonSecondPrimaryDatetimeFieldContext.class,0);
}
public TerminalNode SECOND() { return getToken(Sql.SECOND, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public IntervalFractionalSecondsPrecisionContext intervalFractionalSecondsPrecision() {
return getRuleContext(IntervalFractionalSecondsPrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SingleDatetimeFieldContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singleDatetimeField; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSingleDatetimeField(this);
else return visitor.visitChildren(this);
}
}
public final SingleDatetimeFieldContext singleDatetimeField() throws RecognitionException {
SingleDatetimeFieldContext _localctx = new SingleDatetimeFieldContext(_ctx, getState());
enterRule(_localctx, 30, RULE_singleDatetimeField);
try {
setState(581);
_errHandler.sync(this);
switch (_input.LA(1)) {
case DAY:
case HOUR:
case MINUTE:
case MONTH:
case YEAR:
enterOuterAlt(_localctx, 1);
{
setState(573);
nonSecondPrimaryDatetimeField();
}
break;
case SECOND:
enterOuterAlt(_localctx, 2);
{
setState(574);
match(SECOND);
setState(579);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
case 1:
{
setState(575);
match(LPAREN);
setState(576);
intervalFractionalSecondsPrecision();
setState(577);
match(RPAREN);
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IdentifierChainContext extends ParserRuleContext {
public List identifier() {
return getRuleContexts(IdentifierContext.class);
}
public IdentifierContext identifier(int i) {
return getRuleContext(IdentifierContext.class,i);
}
public List DOT() { return getTokens(Sql.DOT); }
public TerminalNode DOT(int i) {
return getToken(Sql.DOT, i);
}
public IdentifierChainContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_identifierChain; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIdentifierChain(this);
else return visitor.visitChildren(this);
}
}
public final IdentifierChainContext identifierChain() throws RecognitionException {
IdentifierChainContext _localctx = new IdentifierChainContext(_ctx, getState());
enterRule(_localctx, 32, RULE_identifierChain);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(583);
identifier();
setState(588);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,27,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(584);
match(DOT);
setState(585);
identifier();
}
}
}
setState(590);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,27,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IdentifierContext extends ParserRuleContext {
public IdentifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_identifier; }
public IdentifierContext() { }
public void copyFrom(IdentifierContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DelimitedIdentifierContext extends IdentifierContext {
public TerminalNode DELIMITED_IDENTIFIER() { return getToken(Sql.DELIMITED_IDENTIFIER, 0); }
public DelimitedIdentifierContext(IdentifierContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDelimitedIdentifier(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RegularIdentifierContext extends IdentifierContext {
public TerminalNode REGULAR_IDENTIFIER() { return getToken(Sql.REGULAR_IDENTIFIER, 0); }
public TerminalNode START() { return getToken(Sql.START, 0); }
public TerminalNode END() { return getToken(Sql.END, 0); }
public TerminalNode AGE() { return getToken(Sql.AGE, 0); }
public TerminalNode COMMITTED() { return getToken(Sql.COMMITTED, 0); }
public TerminalNode UNCOMMITTED() { return getToken(Sql.UNCOMMITTED, 0); }
public TerminalNode TIMEZONE() { return getToken(Sql.TIMEZONE, 0); }
public TerminalNode VERSION() { return getToken(Sql.VERSION, 0); }
public TerminalNode LATEST() { return getToken(Sql.LATEST, 0); }
public TerminalNode SUBMITTED() { return getToken(Sql.SUBMITTED, 0); }
public TerminalNode SYSTEM_TIME() { return getToken(Sql.SYSTEM_TIME, 0); }
public TerminalNode VALID_TIME() { return getToken(Sql.VALID_TIME, 0); }
public TerminalNode SELECT() { return getToken(Sql.SELECT, 0); }
public TerminalNode INSERT() { return getToken(Sql.INSERT, 0); }
public TerminalNode UPDATE() { return getToken(Sql.UPDATE, 0); }
public TerminalNode DELETE() { return getToken(Sql.DELETE, 0); }
public TerminalNode ERASE() { return getToken(Sql.ERASE, 0); }
public TerminalNode SETTING() { return getToken(Sql.SETTING, 0); }
public TerminalNode BASIS() { return getToken(Sql.BASIS, 0); }
public TerminalNode CARDINALITY() { return getToken(Sql.CARDINALITY, 0); }
public TerminalNode ROLE() { return getToken(Sql.ROLE, 0); }
public SetFunctionTypeContext setFunctionType() {
return getRuleContext(SetFunctionTypeContext.class,0);
}
public RegularIdentifierContext(IdentifierContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitRegularIdentifier(this);
else return visitor.visitChildren(this);
}
}
public final IdentifierContext identifier() throws RecognitionException {
IdentifierContext _localctx = new IdentifierContext(_ctx, getState());
enterRule(_localctx, 34, RULE_identifier);
try {
setState(616);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AGE:
case AVG:
case BASIS:
case BOOL_AND:
case BOOL_OR:
case CARDINALITY:
case COMMITTED:
case COUNT:
case DELETE:
case END:
case ERASE:
case EVERY:
case INSERT:
case LATEST:
case MAX:
case MIN:
case ROLE:
case SELECT:
case SETTING:
case START:
case STDDEV_POP:
case STDDEV_SAMP:
case SUBMITTED:
case SUM:
case SYSTEM_TIME:
case TIMEZONE:
case UNCOMMITTED:
case UPDATE:
case VALID_TIME:
case VAR_POP:
case VAR_SAMP:
case VERSION:
case REGULAR_IDENTIFIER:
_localctx = new RegularIdentifierContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(613);
_errHandler.sync(this);
switch (_input.LA(1)) {
case REGULAR_IDENTIFIER:
{
setState(591);
match(REGULAR_IDENTIFIER);
}
break;
case START:
{
setState(592);
match(START);
}
break;
case END:
{
setState(593);
match(END);
}
break;
case AGE:
{
setState(594);
match(AGE);
}
break;
case COMMITTED:
{
setState(595);
match(COMMITTED);
}
break;
case UNCOMMITTED:
{
setState(596);
match(UNCOMMITTED);
}
break;
case TIMEZONE:
{
setState(597);
match(TIMEZONE);
}
break;
case VERSION:
{
setState(598);
match(VERSION);
}
break;
case LATEST:
{
setState(599);
match(LATEST);
}
break;
case SUBMITTED:
{
setState(600);
match(SUBMITTED);
}
break;
case SYSTEM_TIME:
{
setState(601);
match(SYSTEM_TIME);
}
break;
case VALID_TIME:
{
setState(602);
match(VALID_TIME);
}
break;
case SELECT:
{
setState(603);
match(SELECT);
}
break;
case INSERT:
{
setState(604);
match(INSERT);
}
break;
case UPDATE:
{
setState(605);
match(UPDATE);
}
break;
case DELETE:
{
setState(606);
match(DELETE);
}
break;
case ERASE:
{
setState(607);
match(ERASE);
}
break;
case SETTING:
{
setState(608);
match(SETTING);
}
break;
case BASIS:
{
setState(609);
match(BASIS);
}
break;
case CARDINALITY:
{
setState(610);
match(CARDINALITY);
}
break;
case ROLE:
{
setState(611);
match(ROLE);
}
break;
case AVG:
case BOOL_AND:
case BOOL_OR:
case COUNT:
case EVERY:
case MAX:
case MIN:
case STDDEV_POP:
case STDDEV_SAMP:
case SUM:
case VAR_POP:
case VAR_SAMP:
{
setState(612);
setFunctionType();
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
case DELIMITED_IDENTIFIER:
_localctx = new DelimitedIdentifierContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(615);
match(DELIMITED_IDENTIFIER);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SchemaNameContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public SchemaNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_schemaName; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSchemaName(this);
else return visitor.visitChildren(this);
}
}
public final SchemaNameContext schemaName() throws RecognitionException {
SchemaNameContext _localctx = new SchemaNameContext(_ctx, getState());
enterRule(_localctx, 36, RULE_schemaName);
try {
enterOuterAlt(_localctx, 1);
{
setState(618);
identifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TableNameContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public TableNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_tableName; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTableName(this);
else return visitor.visitChildren(this);
}
}
public final TableNameContext tableName() throws RecognitionException {
TableNameContext _localctx = new TableNameContext(_ctx, getState());
enterRule(_localctx, 38, RULE_tableName);
try {
enterOuterAlt(_localctx, 1);
{
setState(625);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
case 1:
{
setState(620);
identifier();
}
break;
case 2:
{
setState(621);
schemaName();
setState(622);
match(DOT);
setState(623);
identifier();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ColumnNameContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public ColumnNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_columnName; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitColumnName(this);
else return visitor.visitChildren(this);
}
}
public final ColumnNameContext columnName() throws RecognitionException {
ColumnNameContext _localctx = new ColumnNameContext(_ctx, getState());
enterRule(_localctx, 40, RULE_columnName);
try {
enterOuterAlt(_localctx, 1);
{
setState(627);
identifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CorrelationNameContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public CorrelationNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_correlationName; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCorrelationName(this);
else return visitor.visitChildren(this);
}
}
public final CorrelationNameContext correlationName() throws RecognitionException {
CorrelationNameContext _localctx = new CorrelationNameContext(_ctx, getState());
enterRule(_localctx, 42, RULE_correlationName);
try {
enterOuterAlt(_localctx, 1);
{
setState(629);
identifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class QueryNameContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public QueryNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_queryName; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitQueryName(this);
else return visitor.visitChildren(this);
}
}
public final QueryNameContext queryName() throws RecognitionException {
QueryNameContext _localctx = new QueryNameContext(_ctx, getState());
enterRule(_localctx, 44, RULE_queryName);
try {
enterOuterAlt(_localctx, 1);
{
setState(631);
identifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class FieldNameContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public FieldNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fieldName; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitFieldName(this);
else return visitor.visitChildren(this);
}
}
public final FieldNameContext fieldName() throws RecognitionException {
FieldNameContext _localctx = new FieldNameContext(_ctx, getState());
enterRule(_localctx, 46, RULE_fieldName);
try {
enterOuterAlt(_localctx, 1);
{
setState(633);
identifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class WindowNameContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public WindowNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_windowName; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitWindowName(this);
else return visitor.visitChildren(this);
}
}
public final WindowNameContext windowName() throws RecognitionException {
WindowNameContext _localctx = new WindowNameContext(_ctx, getState());
enterRule(_localctx, 48, RULE_windowName);
try {
enterOuterAlt(_localctx, 1);
{
setState(635);
identifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DataTypeContext extends ParserRuleContext {
public DataTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dataType; }
public DataTypeContext() { }
public void copyFrom(DataTypeContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DurationTypeContext extends DataTypeContext {
public TerminalNode DURATION() { return getToken(Sql.DURATION, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public DurationTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDurationType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CharacterStringTypeContext extends DataTypeContext {
public TerminalNode VARCHAR() { return getToken(Sql.VARCHAR, 0); }
public TerminalNode TEXT() { return getToken(Sql.TEXT, 0); }
public CharacterStringTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCharacterStringType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class IntervalTypeContext extends DataTypeContext {
public TerminalNode INTERVAL() { return getToken(Sql.INTERVAL, 0); }
public IntervalQualifierContext intervalQualifier() {
return getRuleContext(IntervalQualifierContext.class,0);
}
public IntervalTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIntervalType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class BooleanTypeContext extends DataTypeContext {
public TerminalNode BOOLEAN() { return getToken(Sql.BOOLEAN, 0); }
public BooleanTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitBooleanType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RegProcTypeContext extends DataTypeContext {
public TerminalNode REGPROC() { return getToken(Sql.REGPROC, 0); }
public RegProcTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitRegProcType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RowTypeContext extends DataTypeContext {
public TerminalNode ROW() { return getToken(Sql.ROW, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List fieldDefinition() {
return getRuleContexts(FieldDefinitionContext.class);
}
public FieldDefinitionContext fieldDefinition(int i) {
return getRuleContext(FieldDefinitionContext.class,i);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public RowTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitRowType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RealTypeContext extends DataTypeContext {
public TerminalNode REAL() { return getToken(Sql.REAL, 0); }
public RealTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitRealType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TimestampTzTypeContext extends DataTypeContext {
public TerminalNode TIMESTAMPTZ() { return getToken(Sql.TIMESTAMPTZ, 0); }
public TimestampTzTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTimestampTzType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class FloatTypeContext extends DataTypeContext {
public TerminalNode FLOAT() { return getToken(Sql.FLOAT, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public FloatTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitFloatType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TimeTypeContext extends DataTypeContext {
public TerminalNode TIME() { return getToken(Sql.TIME, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public WithOrWithoutTimeZoneContext withOrWithoutTimeZone() {
return getRuleContext(WithOrWithoutTimeZoneContext.class,0);
}
public TimeTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTimeType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class IntegerTypeContext extends DataTypeContext {
public TerminalNode SMALLINT() { return getToken(Sql.SMALLINT, 0); }
public TerminalNode INTEGER() { return getToken(Sql.INTEGER, 0); }
public TerminalNode INT() { return getToken(Sql.INT, 0); }
public TerminalNode BIGINT() { return getToken(Sql.BIGINT, 0); }
public IntegerTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIntegerType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ArrayTypeContext extends DataTypeContext {
public DataTypeContext dataType() {
return getRuleContext(DataTypeContext.class,0);
}
public TerminalNode ARRAY() { return getToken(Sql.ARRAY, 0); }
public TerminalNode LBRACK() { return getToken(Sql.LBRACK, 0); }
public MaximumCardinalityContext maximumCardinality() {
return getRuleContext(MaximumCardinalityContext.class,0);
}
public TerminalNode RBRACK() { return getToken(Sql.RBRACK, 0); }
public ArrayTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitArrayType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RegClassTypeContext extends DataTypeContext {
public TerminalNode REGCLASS() { return getToken(Sql.REGCLASS, 0); }
public RegClassTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitRegClassType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DoubleTypeContext extends DataTypeContext {
public TerminalNode DOUBLE() { return getToken(Sql.DOUBLE, 0); }
public TerminalNode PRECISION() { return getToken(Sql.PRECISION, 0); }
public DoubleTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDoubleType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DecimalTypeContext extends DataTypeContext {
public TerminalNode NUMERIC() { return getToken(Sql.NUMERIC, 0); }
public TerminalNode DECIMAL() { return getToken(Sql.DECIMAL, 0); }
public TerminalNode DEC() { return getToken(Sql.DEC, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public ScaleContext scale() {
return getRuleContext(ScaleContext.class,0);
}
public DecimalTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDecimalType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TimestampTypeContext extends DataTypeContext {
public TerminalNode TIMESTAMP() { return getToken(Sql.TIMESTAMP, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public WithOrWithoutTimeZoneContext withOrWithoutTimeZone() {
return getRuleContext(WithOrWithoutTimeZoneContext.class,0);
}
public TimestampTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTimestampType(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DateTypeContext extends DataTypeContext {
public TerminalNode DATE() { return getToken(Sql.DATE, 0); }
public DateTypeContext(DataTypeContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDateType(this);
else return visitor.visitChildren(this);
}
}
public final DataTypeContext dataType() throws RecognitionException {
return dataType(0);
}
private DataTypeContext dataType(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
DataTypeContext _localctx = new DataTypeContext(_ctx, _parentState);
DataTypeContext _prevctx = _localctx;
int _startState = 50;
enterRecursionRule(_localctx, 50, RULE_dataType, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(709);
_errHandler.sync(this);
switch (_input.LA(1)) {
case DEC:
case DECIMAL:
case NUMERIC:
{
_localctx = new DecimalTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(638);
_la = _input.LA(1);
if ( !(_la==DEC || _la==DECIMAL || _la==NUMERIC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(647);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) {
case 1:
{
setState(639);
match(LPAREN);
setState(640);
precision();
setState(643);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(641);
match(COMMA);
setState(642);
scale();
}
}
setState(645);
match(RPAREN);
}
break;
}
}
break;
case BIGINT:
case INT:
case INTEGER:
case SMALLINT:
{
_localctx = new IntegerTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(649);
_la = _input.LA(1);
if ( !(_la==BIGINT || _la==INT || _la==INTEGER || _la==SMALLINT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case FLOAT:
{
_localctx = new FloatTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(650);
match(FLOAT);
setState(655);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
case 1:
{
setState(651);
match(LPAREN);
setState(652);
precision();
setState(653);
match(RPAREN);
}
break;
}
}
break;
case REAL:
{
_localctx = new RealTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(657);
match(REAL);
}
break;
case DOUBLE:
{
_localctx = new DoubleTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(658);
match(DOUBLE);
setState(659);
match(PRECISION);
}
break;
case BOOLEAN:
{
_localctx = new BooleanTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(660);
match(BOOLEAN);
}
break;
case DATE:
{
_localctx = new DateTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(661);
match(DATE);
}
break;
case TIME:
{
_localctx = new TimeTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(662);
match(TIME);
setState(667);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) {
case 1:
{
setState(663);
match(LPAREN);
setState(664);
precision();
setState(665);
match(RPAREN);
}
break;
}
setState(670);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
case 1:
{
setState(669);
withOrWithoutTimeZone();
}
break;
}
}
break;
case TIMESTAMP:
{
_localctx = new TimestampTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(672);
match(TIMESTAMP);
setState(677);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
case 1:
{
setState(673);
match(LPAREN);
setState(674);
precision();
setState(675);
match(RPAREN);
}
break;
}
setState(680);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
case 1:
{
setState(679);
withOrWithoutTimeZone();
}
break;
}
}
break;
case TIMESTAMPTZ:
{
_localctx = new TimestampTzTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(682);
match(TIMESTAMPTZ);
}
break;
case INTERVAL:
{
_localctx = new IntervalTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(683);
match(INTERVAL);
setState(685);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
case 1:
{
setState(684);
intervalQualifier();
}
break;
}
}
break;
case TEXT:
case VARCHAR:
{
_localctx = new CharacterStringTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(687);
_la = _input.LA(1);
if ( !(_la==TEXT || _la==VARCHAR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case DURATION:
{
_localctx = new DurationTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(688);
match(DURATION);
setState(693);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
case 1:
{
setState(689);
match(LPAREN);
setState(690);
precision();
setState(691);
match(RPAREN);
}
break;
}
}
break;
case ROW:
{
_localctx = new RowTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(695);
match(ROW);
setState(696);
match(LPAREN);
setState(697);
fieldDefinition();
setState(702);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(698);
match(COMMA);
setState(699);
fieldDefinition();
}
}
setState(704);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(705);
match(RPAREN);
}
break;
case REGCLASS:
{
_localctx = new RegClassTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(707);
match(REGCLASS);
}
break;
case REGPROC:
{
_localctx = new RegProcTypeContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(708);
match(REGPROC);
}
break;
default:
throw new NoViableAltException(this);
}
_ctx.stop = _input.LT(-1);
setState(721);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,43,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new ArrayTypeContext(new DataTypeContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_dataType);
setState(711);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(712);
match(ARRAY);
setState(717);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
case 1:
{
setState(713);
match(LBRACK);
setState(714);
maximumCardinality();
setState(715);
match(RBRACK);
}
break;
}
}
}
}
setState(723);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,43,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PrecisionContext extends ParserRuleContext {
public TerminalNode UNSIGNED_INTEGER() { return getToken(Sql.UNSIGNED_INTEGER, 0); }
public PrecisionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_precision; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPrecision(this);
else return visitor.visitChildren(this);
}
}
public final PrecisionContext precision() throws RecognitionException {
PrecisionContext _localctx = new PrecisionContext(_ctx, getState());
enterRule(_localctx, 52, RULE_precision);
try {
enterOuterAlt(_localctx, 1);
{
setState(724);
match(UNSIGNED_INTEGER);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ScaleContext extends ParserRuleContext {
public TerminalNode UNSIGNED_INTEGER() { return getToken(Sql.UNSIGNED_INTEGER, 0); }
public ScaleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_scale; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitScale(this);
else return visitor.visitChildren(this);
}
}
public final ScaleContext scale() throws RecognitionException {
ScaleContext _localctx = new ScaleContext(_ctx, getState());
enterRule(_localctx, 54, RULE_scale);
try {
enterOuterAlt(_localctx, 1);
{
setState(726);
match(UNSIGNED_INTEGER);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CharLengthUnitsContext extends ParserRuleContext {
public TerminalNode CHARACTERS() { return getToken(Sql.CHARACTERS, 0); }
public TerminalNode OCTETS() { return getToken(Sql.OCTETS, 0); }
public CharLengthUnitsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_charLengthUnits; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCharLengthUnits(this);
else return visitor.visitChildren(this);
}
}
public final CharLengthUnitsContext charLengthUnits() throws RecognitionException {
CharLengthUnitsContext _localctx = new CharLengthUnitsContext(_ctx, getState());
enterRule(_localctx, 56, RULE_charLengthUnits);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(728);
_la = _input.LA(1);
if ( !(_la==CHARACTERS || _la==OCTETS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class WithOrWithoutTimeZoneContext extends ParserRuleContext {
public WithOrWithoutTimeZoneContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_withOrWithoutTimeZone; }
public WithOrWithoutTimeZoneContext() { }
public void copyFrom(WithOrWithoutTimeZoneContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class WithTimeZoneContext extends WithOrWithoutTimeZoneContext {
public TerminalNode WITH() { return getToken(Sql.WITH, 0); }
public TerminalNode TIME() { return getToken(Sql.TIME, 0); }
public TerminalNode ZONE() { return getToken(Sql.ZONE, 0); }
public WithTimeZoneContext(WithOrWithoutTimeZoneContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitWithTimeZone(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class WithoutTimeZoneContext extends WithOrWithoutTimeZoneContext {
public TerminalNode WITHOUT() { return getToken(Sql.WITHOUT, 0); }
public TerminalNode TIME() { return getToken(Sql.TIME, 0); }
public TerminalNode ZONE() { return getToken(Sql.ZONE, 0); }
public WithoutTimeZoneContext(WithOrWithoutTimeZoneContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitWithoutTimeZone(this);
else return visitor.visitChildren(this);
}
}
public final WithOrWithoutTimeZoneContext withOrWithoutTimeZone() throws RecognitionException {
WithOrWithoutTimeZoneContext _localctx = new WithOrWithoutTimeZoneContext(_ctx, getState());
enterRule(_localctx, 58, RULE_withOrWithoutTimeZone);
try {
setState(736);
_errHandler.sync(this);
switch (_input.LA(1)) {
case WITH:
_localctx = new WithTimeZoneContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(730);
match(WITH);
setState(731);
match(TIME);
setState(732);
match(ZONE);
}
break;
case WITHOUT:
_localctx = new WithoutTimeZoneContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(733);
match(WITHOUT);
setState(734);
match(TIME);
setState(735);
match(ZONE);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MaximumCardinalityContext extends ParserRuleContext {
public TerminalNode UNSIGNED_INTEGER() { return getToken(Sql.UNSIGNED_INTEGER, 0); }
public MaximumCardinalityContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_maximumCardinality; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitMaximumCardinality(this);
else return visitor.visitChildren(this);
}
}
public final MaximumCardinalityContext maximumCardinality() throws RecognitionException {
MaximumCardinalityContext _localctx = new MaximumCardinalityContext(_ctx, getState());
enterRule(_localctx, 60, RULE_maximumCardinality);
try {
enterOuterAlt(_localctx, 1);
{
setState(738);
match(UNSIGNED_INTEGER);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class FieldDefinitionContext extends ParserRuleContext {
public FieldNameContext fieldName() {
return getRuleContext(FieldNameContext.class,0);
}
public DataTypeContext dataType() {
return getRuleContext(DataTypeContext.class,0);
}
public FieldDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fieldDefinition; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitFieldDefinition(this);
else return visitor.visitChildren(this);
}
}
public final FieldDefinitionContext fieldDefinition() throws RecognitionException {
FieldDefinitionContext _localctx = new FieldDefinitionContext(_ctx, getState());
enterRule(_localctx, 62, RULE_fieldDefinition);
try {
enterOuterAlt(_localctx, 1);
{
setState(740);
fieldName();
setState(741);
dataType(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ExprContext extends ParserRuleContext {
public ExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expr; }
public ExprContext() { }
public void copyFrom(ExprContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AndExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode AND() { return getToken(Sql.AND, 0); }
public AndExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitAndExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PeriodContainsPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode CONTAINS() { return getToken(Sql.CONTAINS, 0); }
public PeriodContainsPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPeriodContainsPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PeriodImmediatelyPrecedesPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode IMMEDIATELY() { return getToken(Sql.IMMEDIATELY, 0); }
public TerminalNode PRECEDES() { return getToken(Sql.PRECEDES, 0); }
public PeriodImmediatelyPrecedesPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPeriodImmediatelyPrecedesPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class IsBooleanValueExprContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode IS() { return getToken(Sql.IS, 0); }
public BooleanValueContext booleanValue() {
return getRuleContext(BooleanValueContext.class,0);
}
public TerminalNode NOT() { return getToken(Sql.NOT, 0); }
public IsBooleanValueExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitIsBooleanValueExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class BetweenPredicateContext extends ExprContext {
public List numericExpr() {
return getRuleContexts(NumericExprContext.class);
}
public NumericExprContext numericExpr(int i) {
return getRuleContext(NumericExprContext.class,i);
}
public TerminalNode BETWEEN() { return getToken(Sql.BETWEEN, 0); }
public TerminalNode AND() { return getToken(Sql.AND, 0); }
public TerminalNode NOT() { return getToken(Sql.NOT, 0); }
public TerminalNode ASYMMETRIC() { return getToken(Sql.ASYMMETRIC, 0); }
public TerminalNode SYMMETRIC() { return getToken(Sql.SYMMETRIC, 0); }
public BetweenPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitBetweenPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PostgresRegexPredicateContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public PostgresRegexOperatorContext postgresRegexOperator() {
return getRuleContext(PostgresRegexOperatorContext.class,0);
}
public XqueryPatternContext xqueryPattern() {
return getRuleContext(XqueryPatternContext.class,0);
}
public PostgresRegexPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPostgresRegexPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class UnaryNotExprContext extends ExprContext {
public TerminalNode NOT() { return getToken(Sql.NOT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public UnaryNotExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitUnaryNotExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PeriodSucceedsPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode SUCCEEDS() { return getToken(Sql.SUCCEEDS, 0); }
public PeriodSucceedsPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPeriodSucceedsPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LikePredicateContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode LIKE() { return getToken(Sql.LIKE, 0); }
public LikePatternContext likePattern() {
return getRuleContext(LikePatternContext.class,0);
}
public TerminalNode NOT() { return getToken(Sql.NOT, 0); }
public TerminalNode ESCAPE() { return getToken(Sql.ESCAPE, 0); }
public LikeEscapeContext likeEscape() {
return getRuleContext(LikeEscapeContext.class,0);
}
public LikePredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLikePredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class InPredicateContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode IN() { return getToken(Sql.IN, 0); }
public InPredicateValueContext inPredicateValue() {
return getRuleContext(InPredicateValueContext.class,0);
}
public TerminalNode NOT() { return getToken(Sql.NOT, 0); }
public InPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitInPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PeriodPrecedesPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode PRECEDES() { return getToken(Sql.PRECEDES, 0); }
public PeriodPrecedesPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPeriodPrecedesPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ComparisonPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public CompOpContext compOp() {
return getRuleContext(CompOpContext.class,0);
}
public ComparisonPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitComparisonPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class OrExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode OR() { return getToken(Sql.OR, 0); }
public OrExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitOrExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PeriodImmediatelySucceedsPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode IMMEDIATELY() { return getToken(Sql.IMMEDIATELY, 0); }
public TerminalNode SUCCEEDS() { return getToken(Sql.SUCCEEDS, 0); }
public PeriodImmediatelySucceedsPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPeriodImmediatelySucceedsPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class QuantifiedComparisonPredicateContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public CompOpContext compOp() {
return getRuleContext(CompOpContext.class,0);
}
public QuantifierContext quantifier() {
return getRuleContext(QuantifierContext.class,0);
}
public QuantifiedComparisonPredicatePart3Context quantifiedComparisonPredicatePart3() {
return getRuleContext(QuantifiedComparisonPredicatePart3Context.class,0);
}
public QuantifiedComparisonPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitQuantifiedComparisonPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NullPredicateContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode IS() { return getToken(Sql.IS, 0); }
public TerminalNode NULL() { return getToken(Sql.NULL, 0); }
public TerminalNode NOT() { return getToken(Sql.NOT, 0); }
public NullPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNullPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NumericExpr0Context extends ExprContext {
public NumericExprContext numericExpr() {
return getRuleContext(NumericExprContext.class,0);
}
public NumericExpr0Context(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNumericExpr0(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PeriodEqualsPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode EQUALS() { return getToken(Sql.EQUALS, 0); }
public PeriodEqualsPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPeriodEqualsPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LikeRegexPredicateContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode LIKE_REGEX() { return getToken(Sql.LIKE_REGEX, 0); }
public XqueryPatternContext xqueryPattern() {
return getRuleContext(XqueryPatternContext.class,0);
}
public TerminalNode NOT() { return getToken(Sql.NOT, 0); }
public TerminalNode FLAG() { return getToken(Sql.FLAG, 0); }
public XqueryOptionFlagContext xqueryOptionFlag() {
return getRuleContext(XqueryOptionFlagContext.class,0);
}
public LikeRegexPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLikeRegexPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PeriodOverlapsPredicateContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode OVERLAPS() { return getToken(Sql.OVERLAPS, 0); }
public PeriodOverlapsPredicateContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPeriodOverlapsPredicate(this);
else return visitor.visitChildren(this);
}
}
public final ExprContext expr() throws RecognitionException {
return expr(0);
}
private ExprContext expr(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
ExprContext _localctx = new ExprContext(_ctx, _parentState);
ExprContext _prevctx = _localctx;
int _startState = 64;
enterRecursionRule(_localctx, 64, RULE_expr, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(759);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) {
case 1:
{
_localctx = new BetweenPredicateContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(744);
numericExpr(0);
setState(746);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NOT) {
{
setState(745);
match(NOT);
}
}
setState(748);
match(BETWEEN);
setState(750);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ASYMMETRIC || _la==SYMMETRIC) {
{
setState(749);
_la = _input.LA(1);
if ( !(_la==ASYMMETRIC || _la==SYMMETRIC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(752);
numericExpr(0);
setState(753);
match(AND);
setState(754);
numericExpr(0);
}
break;
case 2:
{
_localctx = new UnaryNotExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(756);
match(NOT);
setState(757);
expr(4);
}
break;
case 3:
{
_localctx = new NumericExpr0Context(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(758);
numericExpr(0);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(843);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,56,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(841);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,55,_ctx) ) {
case 1:
{
_localctx = new ComparisonPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(761);
if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)");
setState(762);
compOp();
setState(763);
expr(20);
}
break;
case 2:
{
_localctx = new PeriodOverlapsPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(765);
if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)");
setState(766);
match(OVERLAPS);
setState(767);
expr(13);
}
break;
case 3:
{
_localctx = new PeriodEqualsPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(768);
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
setState(769);
match(EQUALS);
setState(770);
expr(12);
}
break;
case 4:
{
_localctx = new PeriodContainsPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(771);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
setState(772);
match(CONTAINS);
setState(773);
expr(11);
}
break;
case 5:
{
_localctx = new PeriodPrecedesPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(774);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
setState(775);
match(PRECEDES);
setState(776);
expr(10);
}
break;
case 6:
{
_localctx = new PeriodSucceedsPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(777);
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
setState(778);
match(SUCCEEDS);
setState(779);
expr(9);
}
break;
case 7:
{
_localctx = new PeriodImmediatelyPrecedesPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(780);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(781);
match(IMMEDIATELY);
setState(782);
match(PRECEDES);
setState(783);
expr(8);
}
break;
case 8:
{
_localctx = new PeriodImmediatelySucceedsPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(784);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(785);
match(IMMEDIATELY);
setState(786);
match(SUCCEEDS);
setState(787);
expr(7);
}
break;
case 9:
{
_localctx = new AndExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(788);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(789);
match(AND);
setState(790);
expr(4);
}
break;
case 10:
{
_localctx = new OrExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(791);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(792);
match(OR);
setState(793);
expr(3);
}
break;
case 11:
{
_localctx = new IsBooleanValueExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(794);
if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)");
setState(795);
match(IS);
setState(797);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NOT) {
{
setState(796);
match(NOT);
}
}
setState(799);
booleanValue();
}
break;
case 12:
{
_localctx = new InPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(800);
if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)");
setState(802);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NOT) {
{
setState(801);
match(NOT);
}
}
setState(804);
match(IN);
setState(805);
inPredicateValue();
}
break;
case 13:
{
_localctx = new LikePredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(806);
if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)");
setState(808);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NOT) {
{
setState(807);
match(NOT);
}
}
setState(810);
match(LIKE);
setState(811);
likePattern();
setState(814);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) {
case 1:
{
setState(812);
match(ESCAPE);
setState(813);
likeEscape();
}
break;
}
}
break;
case 14:
{
_localctx = new LikeRegexPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(816);
if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)");
setState(818);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NOT) {
{
setState(817);
match(NOT);
}
}
setState(820);
match(LIKE_REGEX);
setState(821);
xqueryPattern();
setState(824);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) {
case 1:
{
setState(822);
match(FLAG);
setState(823);
xqueryOptionFlag();
}
break;
}
}
break;
case 15:
{
_localctx = new PostgresRegexPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(826);
if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)");
setState(827);
postgresRegexOperator();
setState(828);
xqueryPattern();
}
break;
case 16:
{
_localctx = new NullPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(830);
if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)");
setState(831);
match(IS);
setState(833);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NOT) {
{
setState(832);
match(NOT);
}
}
setState(835);
match(NULL);
}
break;
case 17:
{
_localctx = new QuantifiedComparisonPredicateContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(836);
if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
setState(837);
compOp();
setState(838);
quantifier();
setState(839);
quantifiedComparisonPredicatePart3();
}
break;
}
}
}
setState(845);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,56,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NumericExprContext extends ParserRuleContext {
public NumericExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_numericExpr; }
public NumericExprContext() { }
public void copyFrom(NumericExprContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NumericBitwiseAndExprContext extends NumericExprContext {
public List numericExpr() {
return getRuleContexts(NumericExprContext.class);
}
public NumericExprContext numericExpr(int i) {
return getRuleContext(NumericExprContext.class,i);
}
public TerminalNode AMPERSAND() { return getToken(Sql.AMPERSAND, 0); }
public NumericBitwiseAndExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNumericBitwiseAndExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NumericBitwiseNotExprContext extends NumericExprContext {
public TerminalNode TILDE() { return getToken(Sql.TILDE, 0); }
public NumericExprContext numericExpr() {
return getRuleContext(NumericExprContext.class,0);
}
public NumericBitwiseNotExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNumericBitwiseNotExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class UnaryPlusExprContext extends NumericExprContext {
public TerminalNode PLUS() { return getToken(Sql.PLUS, 0); }
public NumericExprContext numericExpr() {
return getRuleContext(NumericExprContext.class,0);
}
public UnaryPlusExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitUnaryPlusExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NumericTermExprContext extends NumericExprContext {
public List numericExpr() {
return getRuleContexts(NumericExprContext.class);
}
public NumericExprContext numericExpr(int i) {
return getRuleContext(NumericExprContext.class,i);
}
public TerminalNode PLUS() { return getToken(Sql.PLUS, 0); }
public TerminalNode MINUS() { return getToken(Sql.MINUS, 0); }
public NumericTermExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNumericTermExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NumericBitwiseOrExprContext extends NumericExprContext {
public List numericExpr() {
return getRuleContexts(NumericExprContext.class);
}
public NumericExprContext numericExpr(int i) {
return getRuleContext(NumericExprContext.class,i);
}
public TerminalNode BITWISE_OR() { return getToken(Sql.BITWISE_OR, 0); }
public TerminalNode BITWISE_XOR() { return getToken(Sql.BITWISE_XOR, 0); }
public NumericBitwiseOrExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNumericBitwiseOrExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NumericFactorExprContext extends NumericExprContext {
public List numericExpr() {
return getRuleContexts(NumericExprContext.class);
}
public NumericExprContext numericExpr(int i) {
return getRuleContext(NumericExprContext.class,i);
}
public TerminalNode SOLIDUS() { return getToken(Sql.SOLIDUS, 0); }
public TerminalNode ASTERISK() { return getToken(Sql.ASTERISK, 0); }
public NumericFactorExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNumericFactorExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NumericBitwiseShiftExprContext extends NumericExprContext {
public List numericExpr() {
return getRuleContexts(NumericExprContext.class);
}
public NumericExprContext numericExpr(int i) {
return getRuleContext(NumericExprContext.class,i);
}
public TerminalNode BITWISE_SHIFT_LEFT() { return getToken(Sql.BITWISE_SHIFT_LEFT, 0); }
public TerminalNode BITWISE_SHIFT_RIGHT() { return getToken(Sql.BITWISE_SHIFT_RIGHT, 0); }
public NumericBitwiseShiftExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNumericBitwiseShiftExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ExprPrimary1Context extends NumericExprContext {
public ExprPrimaryContext exprPrimary() {
return getRuleContext(ExprPrimaryContext.class,0);
}
public ExprPrimary1Context(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitExprPrimary1(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class UnaryMinusExprContext extends NumericExprContext {
public TerminalNode MINUS() { return getToken(Sql.MINUS, 0); }
public NumericExprContext numericExpr() {
return getRuleContext(NumericExprContext.class,0);
}
public UnaryMinusExprContext(NumericExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitUnaryMinusExpr(this);
else return visitor.visitChildren(this);
}
}
public final NumericExprContext numericExpr() throws RecognitionException {
return numericExpr(0);
}
private NumericExprContext numericExpr(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
NumericExprContext _localctx = new NumericExprContext(_ctx, _parentState);
NumericExprContext _prevctx = _localctx;
int _startState = 66;
enterRecursionRule(_localctx, 66, RULE_numericExpr, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(854);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) {
case 1:
{
_localctx = new UnaryPlusExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(847);
match(PLUS);
setState(848);
numericExpr(9);
}
break;
case 2:
{
_localctx = new UnaryMinusExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(849);
match(MINUS);
setState(850);
numericExpr(8);
}
break;
case 3:
{
_localctx = new NumericBitwiseNotExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(851);
match(TILDE);
setState(852);
numericExpr(5);
}
break;
case 4:
{
_localctx = new ExprPrimary1Context(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(853);
exprPrimary(0);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(873);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,59,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(871);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) {
case 1:
{
_localctx = new NumericFactorExprContext(new NumericExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_numericExpr);
setState(856);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(857);
_la = _input.LA(1);
if ( !(_la==ASTERISK || _la==SOLIDUS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(858);
numericExpr(8);
}
break;
case 2:
{
_localctx = new NumericTermExprContext(new NumericExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_numericExpr);
setState(859);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(860);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(861);
numericExpr(7);
}
break;
case 3:
{
_localctx = new NumericBitwiseAndExprContext(new NumericExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_numericExpr);
setState(862);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(863);
match(AMPERSAND);
setState(864);
numericExpr(5);
}
break;
case 4:
{
_localctx = new NumericBitwiseOrExprContext(new NumericExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_numericExpr);
setState(865);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(866);
_la = _input.LA(1);
if ( !(_la==BITWISE_OR || _la==BITWISE_XOR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(867);
numericExpr(4);
}
break;
case 5:
{
_localctx = new NumericBitwiseShiftExprContext(new NumericExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_numericExpr);
setState(868);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(869);
_la = _input.LA(1);
if ( !(_la==BITWISE_SHIFT_LEFT || _la==BITWISE_SHIFT_RIGHT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(870);
numericExpr(3);
}
break;
}
}
}
setState(875);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,59,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ExprPrimaryContext extends ParserRuleContext {
public ExprPrimaryContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exprPrimary; }
public ExprPrimaryContext() { }
public void copyFrom(ExprPrimaryContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LowerFunctionContext extends ExprPrimaryContext {
public TerminalNode LOWER() { return getToken(Sql.LOWER, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public LowerFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLowerFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class UpperInfFunctionContext extends ExprPrimaryContext {
public TerminalNode UPPER_INF() { return getToken(Sql.UPPER_INF, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public UpperInfFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitUpperInfFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AggregateFunctionExprContext extends ExprPrimaryContext {
public AggregateFunctionContext aggregateFunction() {
return getRuleContext(AggregateFunctionContext.class,0);
}
public AggregateFunctionExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitAggregateFunctionExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TrimArrayFunctionContext extends ExprPrimaryContext {
public TerminalNode TRIM_ARRAY() { return getToken(Sql.TRIM_ARRAY, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TrimArrayFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTrimArrayFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentSchemasFunctionContext extends ExprPrimaryContext {
public TerminalNode CURRENT_SCHEMAS() { return getToken(Sql.CURRENT_SCHEMAS, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public CurrentSchemasFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentSchemasFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentInstantFunction0Context extends ExprPrimaryContext {
public CurrentInstantFunctionContext currentInstantFunction() {
return getRuleContext(CurrentInstantFunctionContext.class,0);
}
public CurrentInstantFunction0Context(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentInstantFunction0(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PgExpandArrayFunctionContext extends ExprPrimaryContext {
public TerminalNode PG_EXPANDARRAY() { return getToken(Sql.PG_EXPANDARRAY, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public PgExpandArrayFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPgExpandArrayFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class OverlapsFunctionContext extends ExprPrimaryContext {
public TerminalNode OVERLAPS() { return getToken(Sql.OVERLAPS, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public OverlapsFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitOverlapsFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TsTzRangeConstructorContext extends ExprPrimaryContext {
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TerminalNode PERIOD() { return getToken(Sql.PERIOD, 0); }
public TerminalNode TSTZRANGE() { return getToken(Sql.TSTZRANGE, 0); }
public TsTzRangeConstructorContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTsTzRangeConstructor(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PositionFunctionContext extends ExprPrimaryContext {
public TerminalNode POSITION() { return getToken(Sql.POSITION, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode IN() { return getToken(Sql.IN, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TerminalNode USING() { return getToken(Sql.USING, 0); }
public CharLengthUnitsContext charLengthUnits() {
return getRuleContext(CharLengthUnitsContext.class,0);
}
public PositionFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPositionFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LeastFunctionContext extends ExprPrimaryContext {
public TerminalNode LEAST() { return getToken(Sql.LEAST, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public LeastFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLeastFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class FloorFunctionContext extends ExprPrimaryContext {
public TerminalNode FLOOR() { return getToken(Sql.FLOOR, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public FloorFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitFloorFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AgeFunctionContext extends ExprPrimaryContext {
public TerminalNode AGE() { return getToken(Sql.AGE, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public AgeFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitAgeFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CardinalityFunctionContext extends ExprPrimaryContext {
public TerminalNode CARDINALITY() { return getToken(Sql.CARDINALITY, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public CardinalityFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCardinalityFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ArrayAccessContext extends ExprPrimaryContext {
public ExprPrimaryContext exprPrimary() {
return getRuleContext(ExprPrimaryContext.class,0);
}
public TerminalNode LBRACK() { return getToken(Sql.LBRACK, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RBRACK() { return getToken(Sql.RBRACK, 0); }
public ArrayAccessContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitArrayAccess(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ObjectExprContext extends ExprPrimaryContext {
public ObjectConstructorContext objectConstructor() {
return getRuleContext(ObjectConstructorContext.class,0);
}
public ObjectExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitObjectExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PgGetExprFunctionContext extends ExprPrimaryContext {
public TerminalNode PG_GET_EXPR() { return getToken(Sql.PG_GET_EXPR, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public PgGetExprFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPgGetExprFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ExtractFunctionContext extends ExprPrimaryContext {
public TerminalNode EXTRACT() { return getToken(Sql.EXTRACT, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExtractFieldContext extractField() {
return getRuleContext(ExtractFieldContext.class,0);
}
public TerminalNode FROM() { return getToken(Sql.FROM, 0); }
public ExtractSourceContext extractSource() {
return getRuleContext(ExtractSourceContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public ExtractFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitExtractFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CastExprContext extends ExprPrimaryContext {
public TerminalNode CAST() { return getToken(Sql.CAST, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode AS() { return getToken(Sql.AS, 0); }
public DataTypeContext dataType() {
return getRuleContext(DataTypeContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public CastExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCastExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentSchemaFunctionContext extends ExprPrimaryContext {
public TerminalNode CURRENT_SCHEMA() { return getToken(Sql.CURRENT_SCHEMA, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public CurrentSchemaFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentSchemaFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NestOneSubqueryExprContext extends ExprPrimaryContext {
public TerminalNode NEST_ONE() { return getToken(Sql.NEST_ONE, 0); }
public SubqueryContext subquery() {
return getRuleContext(SubqueryContext.class,0);
}
public NestOneSubqueryExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNestOneSubqueryExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class UpperFunctionContext extends ExprPrimaryContext {
public TerminalNode UPPER() { return getToken(Sql.UPPER, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public UpperFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitUpperFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentTimeFunctionContext extends ExprPrimaryContext {
public TerminalNode CURRENT_TIME() { return getToken(Sql.CURRENT_TIME, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public CurrentTimeFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentTimeFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PostgresCastExprContext extends ExprPrimaryContext {
public ExprPrimaryContext exprPrimary() {
return getRuleContext(ExprPrimaryContext.class,0);
}
public TerminalNode PG_CAST() { return getToken(Sql.PG_CAST, 0); }
public DataTypeContext dataType() {
return getRuleContext(DataTypeContext.class,0);
}
public PostgresCastExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPostgresCastExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PgGetIndexdefFunctionContext extends ExprPrimaryContext {
public TerminalNode PG_GET_INDEXDEF() { return getToken(Sql.PG_GET_INDEXDEF, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public PgGetIndexdefFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPgGetIndexdefFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class HasTablePrivilegePredicateContext extends ExprPrimaryContext {
public TerminalNode HAS_TABLE_PRIVILEGE() { return getToken(Sql.HAS_TABLE_PRIVILEGE, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TableStringContext tableString() {
return getRuleContext(TableStringContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public PrivilegeStringContext privilegeString() {
return getRuleContext(PrivilegeStringContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public UserStringContext userString() {
return getRuleContext(UserStringContext.class,0);
}
public HasTablePrivilegePredicateContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitHasTablePrivilegePredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class OverlayFunctionContext extends ExprPrimaryContext {
public TerminalNode OVERLAY() { return getToken(Sql.OVERLAY, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode PLACING() { return getToken(Sql.PLACING, 0); }
public TerminalNode FROM() { return getToken(Sql.FROM, 0); }
public StartPositionContext startPosition() {
return getRuleContext(StartPositionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TerminalNode FOR() { return getToken(Sql.FOR, 0); }
public StringLengthContext stringLength() {
return getRuleContext(StringLengthContext.class,0);
}
public TerminalNode USING() { return getToken(Sql.USING, 0); }
public CharLengthUnitsContext charLengthUnits() {
return getRuleContext(CharLengthUnitsContext.class,0);
}
public OverlayFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitOverlayFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CharacterSubstringFunctionContext extends ExprPrimaryContext {
public TerminalNode SUBSTRING() { return getToken(Sql.SUBSTRING, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public StartPositionContext startPosition() {
return getRuleContext(StartPositionContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public TerminalNode FROM() { return getToken(Sql.FROM, 0); }
public StringLengthContext stringLength() {
return getRuleContext(StringLengthContext.class,0);
}
public TerminalNode USING() { return getToken(Sql.USING, 0); }
public CharLengthUnitsContext charLengthUnits() {
return getRuleContext(CharLengthUnitsContext.class,0);
}
public TerminalNode FOR() { return getToken(Sql.FOR, 0); }
public CharacterSubstringFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCharacterSubstringFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NullIfExprContext extends ExprPrimaryContext {
public TerminalNode NULLIF() { return getToken(Sql.NULLIF, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public NullIfExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNullIfExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class HasAnyColumnPrivilegePredicateContext extends ExprPrimaryContext {
public TerminalNode HAS_ANY_COLUMN_PRIVILEGE() { return getToken(Sql.HAS_ANY_COLUMN_PRIVILEGE, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TableStringContext tableString() {
return getRuleContext(TableStringContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public PrivilegeStringContext privilegeString() {
return getRuleContext(PrivilegeStringContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public UserStringContext userString() {
return getRuleContext(UserStringContext.class,0);
}
public HasAnyColumnPrivilegePredicateContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitHasAnyColumnPrivilegePredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ArrayExprContext extends ExprPrimaryContext {
public ArrayValueConstructorContext arrayValueConstructor() {
return getRuleContext(ArrayValueConstructorContext.class,0);
}
public ArrayExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitArrayExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LowerInfFunctionContext extends ExprPrimaryContext {
public TerminalNode LOWER_INF() { return getToken(Sql.LOWER_INF, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public LowerInfFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLowerInfFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TrimFunctionContext extends ExprPrimaryContext {
public TerminalNode TRIM() { return getToken(Sql.TRIM, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TrimSourceContext trimSource() {
return getRuleContext(TrimSourceContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TrimSpecificationContext trimSpecification() {
return getRuleContext(TrimSpecificationContext.class,0);
}
public TrimCharacterContext trimCharacter() {
return getRuleContext(TrimCharacterContext.class,0);
}
public TerminalNode FROM() { return getToken(Sql.FROM, 0); }
public TrimFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTrimFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PowerFunctionContext extends ExprPrimaryContext {
public TerminalNode POWER() { return getToken(Sql.POWER, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public PowerFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPowerFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DateBinFunctionContext extends ExprPrimaryContext {
public TerminalNode DATE_BIN() { return getToken(Sql.DATE_BIN, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public IntervalLiteralContext intervalLiteral() {
return getRuleContext(IntervalLiteralContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public DateBinSourceContext dateBinSource() {
return getRuleContext(DateBinSourceContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public DateBinOriginContext dateBinOrigin() {
return getRuleContext(DateBinOriginContext.class,0);
}
public DateBinFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDateBinFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CeilingFunctionContext extends ExprPrimaryContext {
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TerminalNode CEIL() { return getToken(Sql.CEIL, 0); }
public TerminalNode CEILING() { return getToken(Sql.CEILING, 0); }
public CeilingFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCeilingFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class GreatestFunctionContext extends ExprPrimaryContext {
public TerminalNode GREATEST() { return getToken(Sql.GREATEST, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public GreatestFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitGreatestFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LnFunctionContext extends ExprPrimaryContext {
public TerminalNode LN() { return getToken(Sql.LN, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public LnFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLnFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class Log10FunctionContext extends ExprPrimaryContext {
public TerminalNode LOG10() { return getToken(Sql.LOG10, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public Log10FunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLog10Function(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ColumnExprContext extends ExprPrimaryContext {
public ColumnReferenceContext columnReference() {
return getRuleContext(ColumnReferenceContext.class,0);
}
public ColumnExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitColumnExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ExistsPredicateContext extends ExprPrimaryContext {
public TerminalNode EXISTS() { return getToken(Sql.EXISTS, 0); }
public SubqueryContext subquery() {
return getRuleContext(SubqueryContext.class,0);
}
public ExistsPredicateContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitExistsPredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ReplaceFunctionContext extends ExprPrimaryContext {
public TerminalNode REPLACE() { return getToken(Sql.REPLACE, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public ReplaceTargetContext replaceTarget() {
return getRuleContext(ReplaceTargetContext.class,0);
}
public ReplacementContext replacement() {
return getRuleContext(ReplacementContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public ReplaceFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitReplaceFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NestedWindowFunctionExprContext extends ExprPrimaryContext {
public NestedWindowFunctionContext nestedWindowFunction() {
return getRuleContext(NestedWindowFunctionContext.class,0);
}
public NestedWindowFunctionExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNestedWindowFunctionExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentUserFunctionContext extends ExprPrimaryContext {
public TerminalNode CURRENT_USER() { return getToken(Sql.CURRENT_USER, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public CurrentUserFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentUserFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SqrtFunctionContext extends ExprPrimaryContext {
public TerminalNode SQRT() { return getToken(Sql.SQRT, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SqrtFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSqrtFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class TrigonometricFunctionContext extends ExprPrimaryContext {
public TrigonometricFunctionNameContext trigonometricFunctionName() {
return getRuleContext(TrigonometricFunctionNameContext.class,0);
}
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TrigonometricFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitTrigonometricFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LiteralExprContext extends ExprPrimaryContext {
public LiteralContext literal() {
return getRuleContext(LiteralContext.class,0);
}
public LiteralExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLiteralExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SimpleCaseExprContext extends ExprPrimaryContext {
public TerminalNode CASE() { return getToken(Sql.CASE, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode END() { return getToken(Sql.END, 0); }
public List simpleWhenClause() {
return getRuleContexts(SimpleWhenClauseContext.class);
}
public SimpleWhenClauseContext simpleWhenClause(int i) {
return getRuleContext(SimpleWhenClauseContext.class,i);
}
public ElseClauseContext elseClause() {
return getRuleContext(ElseClauseContext.class,0);
}
public SimpleCaseExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSimpleCaseExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AbsFunctionContext extends ExprPrimaryContext {
public TerminalNode ABS() { return getToken(Sql.ABS, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public AbsFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitAbsFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ModFunctionContext extends ExprPrimaryContext {
public TerminalNode MOD() { return getToken(Sql.MOD, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public ModFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitModFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PostgresVersionFunctionContext extends ExprPrimaryContext {
public TerminalNode VERSION() { return getToken(Sql.VERSION, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public PostgresVersionFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitPostgresVersionFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LengthFunctionContext extends ExprPrimaryContext {
public TerminalNode LENGTH() { return getToken(Sql.LENGTH, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public LengthFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLengthFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ExpFunctionContext extends ExprPrimaryContext {
public TerminalNode EXP() { return getToken(Sql.EXP, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public ExpFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitExpFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ParamExprContext extends ExprPrimaryContext {
public ParameterSpecificationContext parameterSpecification() {
return getRuleContext(ParameterSpecificationContext.class,0);
}
public ParamExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitParamExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ArrayUpperFunctionContext extends ExprPrimaryContext {
public TerminalNode ARRAY_UPPER() { return getToken(Sql.ARRAY_UPPER, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public ArrayUpperFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitArrayUpperFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CoalesceExprContext extends ExprPrimaryContext {
public TerminalNode COALESCE() { return getToken(Sql.COALESCE, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public CoalesceExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCoalesceExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class HasSchemaPrivilegePredicateContext extends ExprPrimaryContext {
public TerminalNode HAS_SCHEMA_PRIVILEGE() { return getToken(Sql.HAS_SCHEMA_PRIVILEGE, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public SchemaStringContext schemaString() {
return getRuleContext(SchemaStringContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public PrivilegeStringContext privilegeString() {
return getRuleContext(PrivilegeStringContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public UserStringContext userString() {
return getRuleContext(UserStringContext.class,0);
}
public HasSchemaPrivilegePredicateContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitHasSchemaPrivilegePredicate(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class DateTruncFunctionContext extends ExprPrimaryContext {
public TerminalNode DATE_TRUNC() { return getToken(Sql.DATE_TRUNC, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public DateTruncPrecisionContext dateTruncPrecision() {
return getRuleContext(DateTruncPrecisionContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public DateTruncSourceContext dateTruncSource() {
return getRuleContext(DateTruncSourceContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public DateTruncTimeZoneContext dateTruncTimeZone() {
return getRuleContext(DateTruncTimeZoneContext.class,0);
}
public DateTruncFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitDateTruncFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class SearchedCaseExprContext extends ExprPrimaryContext {
public TerminalNode CASE() { return getToken(Sql.CASE, 0); }
public TerminalNode END() { return getToken(Sql.END, 0); }
public List searchedWhenClause() {
return getRuleContexts(SearchedWhenClauseContext.class);
}
public SearchedWhenClauseContext searchedWhenClause(int i) {
return getRuleContext(SearchedWhenClauseContext.class,i);
}
public ElseClauseContext elseClause() {
return getRuleContext(ElseClauseContext.class,0);
}
public SearchedCaseExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitSearchedCaseExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentDatabaseFunctionContext extends ExprPrimaryContext {
public TerminalNode CURRENT_DATABASE() { return getToken(Sql.CURRENT_DATABASE, 0); }
public SchemaNameContext schemaName() {
return getRuleContext(SchemaNameContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public CurrentDatabaseFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentDatabaseFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LocalTimeFunctionContext extends ExprPrimaryContext {
public TerminalNode LOCALTIME() { return getToken(Sql.LOCALTIME, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public LocalTimeFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLocalTimeFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class WrappedExprContext extends ExprPrimaryContext {
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public WrappedExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitWrappedExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CharacterLengthFunctionContext extends ExprPrimaryContext {
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TerminalNode CHAR_LENGTH() { return getToken(Sql.CHAR_LENGTH, 0); }
public TerminalNode CHARACTER_LENGTH() { return getToken(Sql.CHARACTER_LENGTH, 0); }
public TerminalNode USING() { return getToken(Sql.USING, 0); }
public CharLengthUnitsContext charLengthUnits() {
return getRuleContext(CharLengthUnitsContext.class,0);
}
public CharacterLengthFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCharacterLengthFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ConcatExprContext extends ExprPrimaryContext {
public List exprPrimary() {
return getRuleContexts(ExprPrimaryContext.class);
}
public ExprPrimaryContext exprPrimary(int i) {
return getRuleContext(ExprPrimaryContext.class,i);
}
public TerminalNode CONCAT() { return getToken(Sql.CONCAT, 0); }
public ConcatExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitConcatExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RangeBinsFunctionContext extends ExprPrimaryContext {
public TerminalNode RANGE_BINS() { return getToken(Sql.RANGE_BINS, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public IntervalLiteralContext intervalLiteral() {
return getRuleContext(IntervalLiteralContext.class,0);
}
public List COMMA() { return getTokens(Sql.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(Sql.COMMA, i);
}
public RangeBinsSourceContext rangeBinsSource() {
return getRuleContext(RangeBinsSourceContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public DateBinOriginContext dateBinOrigin() {
return getRuleContext(DateBinOriginContext.class,0);
}
public RangeBinsFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitRangeBinsFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LogFunctionContext extends ExprPrimaryContext {
public TerminalNode LOG() { return getToken(Sql.LOG, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public GeneralLogarithmBaseContext generalLogarithmBase() {
return getRuleContext(GeneralLogarithmBaseContext.class,0);
}
public TerminalNode COMMA() { return getToken(Sql.COMMA, 0); }
public GeneralLogarithmArgumentContext generalLogarithmArgument() {
return getRuleContext(GeneralLogarithmArgumentContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public LogFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLogFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class GenerateSeriesFunctionContext extends ExprPrimaryContext {
public GenerateSeriesContext generateSeries() {
return getRuleContext(GenerateSeriesContext.class,0);
}
public GenerateSeriesFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitGenerateSeriesFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class FieldAccessContext extends ExprPrimaryContext {
public ExprPrimaryContext exprPrimary() {
return getRuleContext(ExprPrimaryContext.class,0);
}
public TerminalNode DOT() { return getToken(Sql.DOT, 0); }
public FieldNameContext fieldName() {
return getRuleContext(FieldNameContext.class,0);
}
public FieldAccessContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitFieldAccess(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class NestManySubqueryExprContext extends ExprPrimaryContext {
public TerminalNode NEST_MANY() { return getToken(Sql.NEST_MANY, 0); }
public SubqueryContext subquery() {
return getRuleContext(SubqueryContext.class,0);
}
public NestManySubqueryExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitNestManySubqueryExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class OctetLengthFunctionContext extends ExprPrimaryContext {
public TerminalNode OCTET_LENGTH() { return getToken(Sql.OCTET_LENGTH, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public OctetLengthFunctionContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitOctetLengthFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class WindowFunctionExprContext extends ExprPrimaryContext {
public WindowFunctionTypeContext windowFunctionType() {
return getRuleContext(WindowFunctionTypeContext.class,0);
}
public TerminalNode OVER() { return getToken(Sql.OVER, 0); }
public WindowNameOrSpecificationContext windowNameOrSpecification() {
return getRuleContext(WindowNameOrSpecificationContext.class,0);
}
public WindowFunctionExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitWindowFunctionExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ScalarSubqueryExprContext extends ExprPrimaryContext {
public SubqueryContext subquery() {
return getRuleContext(SubqueryContext.class,0);
}
public ScalarSubqueryExprContext(ExprPrimaryContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitScalarSubqueryExpr(this);
else return visitor.visitChildren(this);
}
}
public final ExprPrimaryContext exprPrimary() throws RecognitionException {
return exprPrimary(0);
}
private ExprPrimaryContext exprPrimary(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
ExprPrimaryContext _localctx = new ExprPrimaryContext(_ctx, _parentState);
ExprPrimaryContext _prevctx = _localctx;
int _startState = 68;
enterRecursionRule(_localctx, 68, RULE_exprPrimary, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1392);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,106,_ctx) ) {
case 1:
{
_localctx = new WrappedExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(877);
match(LPAREN);
setState(878);
expr(0);
setState(879);
match(RPAREN);
}
break;
case 2:
{
_localctx = new LiteralExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(881);
literal();
}
break;
case 3:
{
_localctx = new ParamExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(882);
parameterSpecification();
}
break;
case 4:
{
_localctx = new ColumnExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(883);
columnReference();
}
break;
case 5:
{
_localctx = new AggregateFunctionExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(884);
aggregateFunction();
}
break;
case 6:
{
_localctx = new WindowFunctionExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(885);
windowFunctionType();
setState(886);
match(OVER);
setState(887);
windowNameOrSpecification();
}
break;
case 7:
{
_localctx = new NestedWindowFunctionExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(889);
nestedWindowFunction();
}
break;
case 8:
{
_localctx = new ScalarSubqueryExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(890);
subquery();
}
break;
case 9:
{
_localctx = new NestOneSubqueryExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(891);
match(NEST_ONE);
setState(892);
subquery();
}
break;
case 10:
{
_localctx = new NestManySubqueryExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(893);
match(NEST_MANY);
setState(894);
subquery();
}
break;
case 11:
{
_localctx = new SimpleCaseExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(895);
match(CASE);
setState(896);
expr(0);
setState(898);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(897);
simpleWhenClause();
}
}
setState(900);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==WHEN );
setState(903);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(902);
elseClause();
}
}
setState(905);
match(END);
}
break;
case 12:
{
_localctx = new SearchedCaseExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(907);
match(CASE);
setState(909);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(908);
searchedWhenClause();
}
}
setState(911);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==WHEN );
setState(914);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(913);
elseClause();
}
}
setState(916);
match(END);
}
break;
case 13:
{
_localctx = new NullIfExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(918);
match(NULLIF);
setState(919);
match(LPAREN);
setState(920);
expr(0);
setState(921);
match(COMMA);
setState(922);
expr(0);
setState(923);
match(RPAREN);
}
break;
case 14:
{
_localctx = new CoalesceExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(925);
match(COALESCE);
setState(926);
match(LPAREN);
setState(927);
expr(0);
setState(932);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(928);
match(COMMA);
setState(929);
expr(0);
}
}
setState(934);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(935);
match(RPAREN);
}
break;
case 15:
{
_localctx = new CastExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(937);
match(CAST);
setState(938);
match(LPAREN);
setState(939);
expr(0);
setState(940);
match(AS);
setState(941);
dataType(0);
setState(942);
match(RPAREN);
}
break;
case 16:
{
_localctx = new ArrayExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(944);
arrayValueConstructor();
}
break;
case 17:
{
_localctx = new ObjectExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(945);
objectConstructor();
}
break;
case 18:
{
_localctx = new GenerateSeriesFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(946);
generateSeries();
}
break;
case 19:
{
_localctx = new ExistsPredicateContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(947);
match(EXISTS);
setState(948);
subquery();
}
break;
case 20:
{
_localctx = new HasAnyColumnPrivilegePredicateContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(952);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(949);
schemaName();
setState(950);
match(DOT);
}
}
setState(954);
match(HAS_ANY_COLUMN_PRIVILEGE);
setState(955);
match(LPAREN);
setState(959);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,66,_ctx) ) {
case 1:
{
setState(956);
userString();
setState(957);
match(COMMA);
}
break;
}
setState(961);
tableString();
setState(962);
match(COMMA);
setState(963);
privilegeString();
setState(964);
match(RPAREN);
}
break;
case 21:
{
_localctx = new HasTablePrivilegePredicateContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(969);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(966);
schemaName();
setState(967);
match(DOT);
}
}
setState(971);
match(HAS_TABLE_PRIVILEGE);
setState(972);
match(LPAREN);
setState(976);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) {
case 1:
{
setState(973);
userString();
setState(974);
match(COMMA);
}
break;
}
setState(978);
tableString();
setState(979);
match(COMMA);
setState(980);
privilegeString();
setState(981);
match(RPAREN);
}
break;
case 22:
{
_localctx = new HasSchemaPrivilegePredicateContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(986);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(983);
schemaName();
setState(984);
match(DOT);
}
}
setState(988);
match(HAS_SCHEMA_PRIVILEGE);
setState(989);
match(LPAREN);
setState(993);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,70,_ctx) ) {
case 1:
{
setState(990);
userString();
setState(991);
match(COMMA);
}
break;
}
setState(995);
schemaString();
setState(996);
match(COMMA);
setState(997);
privilegeString();
setState(998);
match(RPAREN);
}
break;
case 23:
{
_localctx = new PostgresVersionFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1003);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) {
case 1:
{
setState(1000);
schemaName();
setState(1001);
match(DOT);
}
break;
}
setState(1005);
match(VERSION);
setState(1006);
match(LPAREN);
setState(1007);
match(RPAREN);
}
break;
case 24:
{
_localctx = new PositionFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1008);
match(POSITION);
setState(1009);
match(LPAREN);
setState(1010);
expr(0);
setState(1011);
match(IN);
setState(1012);
expr(0);
setState(1015);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==USING) {
{
setState(1013);
match(USING);
setState(1014);
charLengthUnits();
}
}
setState(1017);
match(RPAREN);
}
break;
case 25:
{
_localctx = new ExtractFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1019);
match(EXTRACT);
setState(1020);
match(LPAREN);
setState(1021);
extractField();
setState(1022);
match(FROM);
setState(1023);
extractSource();
setState(1024);
match(RPAREN);
}
break;
case 26:
{
_localctx = new CharacterLengthFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1026);
_la = _input.LA(1);
if ( !(_la==CHARACTER_LENGTH || _la==CHAR_LENGTH) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1027);
match(LPAREN);
setState(1028);
expr(0);
setState(1031);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==USING) {
{
setState(1029);
match(USING);
setState(1030);
charLengthUnits();
}
}
setState(1033);
match(RPAREN);
}
break;
case 27:
{
_localctx = new OctetLengthFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1035);
match(OCTET_LENGTH);
setState(1036);
match(LPAREN);
setState(1037);
expr(0);
setState(1038);
match(RPAREN);
}
break;
case 28:
{
_localctx = new LengthFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1040);
match(LENGTH);
setState(1041);
match(LPAREN);
setState(1042);
expr(0);
setState(1043);
match(RPAREN);
}
break;
case 29:
{
_localctx = new CardinalityFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1045);
match(CARDINALITY);
setState(1046);
match(LPAREN);
setState(1047);
expr(0);
setState(1048);
match(RPAREN);
}
break;
case 30:
{
_localctx = new ArrayUpperFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1050);
match(ARRAY_UPPER);
setState(1051);
match(LPAREN);
setState(1052);
expr(0);
setState(1053);
match(COMMA);
setState(1054);
expr(0);
setState(1055);
match(RPAREN);
}
break;
case 31:
{
_localctx = new AbsFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1057);
match(ABS);
setState(1058);
match(LPAREN);
setState(1059);
expr(0);
setState(1060);
match(RPAREN);
}
break;
case 32:
{
_localctx = new ModFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1062);
match(MOD);
setState(1063);
match(LPAREN);
setState(1064);
expr(0);
setState(1065);
match(COMMA);
setState(1066);
expr(0);
setState(1067);
match(RPAREN);
}
break;
case 33:
{
_localctx = new TrigonometricFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1069);
trigonometricFunctionName();
setState(1070);
match(LPAREN);
setState(1071);
expr(0);
setState(1072);
match(RPAREN);
}
break;
case 34:
{
_localctx = new LogFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1074);
match(LOG);
setState(1075);
match(LPAREN);
setState(1076);
generalLogarithmBase();
setState(1077);
match(COMMA);
setState(1078);
generalLogarithmArgument();
setState(1079);
match(RPAREN);
}
break;
case 35:
{
_localctx = new Log10FunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1081);
match(LOG10);
setState(1082);
match(LPAREN);
setState(1083);
expr(0);
setState(1084);
match(RPAREN);
}
break;
case 36:
{
_localctx = new LnFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1086);
match(LN);
setState(1087);
match(LPAREN);
setState(1088);
expr(0);
setState(1089);
match(RPAREN);
}
break;
case 37:
{
_localctx = new ExpFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1091);
match(EXP);
setState(1092);
match(LPAREN);
setState(1093);
expr(0);
setState(1094);
match(RPAREN);
}
break;
case 38:
{
_localctx = new PowerFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1096);
match(POWER);
setState(1097);
match(LPAREN);
setState(1098);
expr(0);
setState(1099);
match(COMMA);
setState(1100);
expr(0);
setState(1101);
match(RPAREN);
}
break;
case 39:
{
_localctx = new SqrtFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1103);
match(SQRT);
setState(1104);
match(LPAREN);
setState(1105);
expr(0);
setState(1106);
match(RPAREN);
}
break;
case 40:
{
_localctx = new FloorFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1108);
match(FLOOR);
setState(1109);
match(LPAREN);
setState(1110);
expr(0);
setState(1111);
match(RPAREN);
}
break;
case 41:
{
_localctx = new CeilingFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1113);
_la = _input.LA(1);
if ( !(_la==CEIL || _la==CEILING) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1114);
match(LPAREN);
setState(1115);
expr(0);
setState(1116);
match(RPAREN);
}
break;
case 42:
{
_localctx = new LeastFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1118);
match(LEAST);
setState(1119);
match(LPAREN);
setState(1120);
expr(0);
setState(1125);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(1121);
match(COMMA);
setState(1122);
expr(0);
}
}
setState(1127);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1128);
match(RPAREN);
}
break;
case 43:
{
_localctx = new GreatestFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1130);
match(GREATEST);
setState(1131);
match(LPAREN);
setState(1132);
expr(0);
setState(1137);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(1133);
match(COMMA);
setState(1134);
expr(0);
}
}
setState(1139);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1140);
match(RPAREN);
}
break;
case 44:
{
_localctx = new CharacterSubstringFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1142);
match(SUBSTRING);
setState(1143);
match(LPAREN);
setState(1144);
expr(0);
setState(1165);
_errHandler.sync(this);
switch (_input.LA(1)) {
case UNSIGNED_FLOAT:
case UNSIGNED_INTEGER:
case CHARACTER_STRING:
case C_ESCAPES_STRING:
case BINARY_STRING:
case POSTGRES_PARAMETER_SPECIFICATION:
case QUESTION:
case LPAREN:
case LBRACK:
case LBRACE:
case TILDE:
case PLUS:
case MINUS:
case ABS:
case ACOS:
case AGE:
case ARRAY:
case ARRAY_AGG:
case ARRAY_UPPER:
case ASIN:
case ATAN:
case AVG:
case BASIS:
case BOOL_AND:
case BOOL_OR:
case CARDINALITY:
case CASE:
case CAST:
case CEIL:
case CEILING:
case CHARACTER_LENGTH:
case CHAR_LENGTH:
case COALESCE:
case COMMITTED:
case COS:
case COSH:
case COUNT:
case CUME_DIST:
case CURRENT_DATABASE:
case CURRENT_DATE:
case CURRENT_SCHEMA:
case CURRENT_SCHEMAS:
case CURRENT_TIME:
case CURRENT_TIMESTAMP:
case CURRENT_USER:
case DATE:
case DATE_BIN:
case DATE_TRUNC:
case DELETE:
case DENSE_RANK:
case DURATION:
case END:
case ERASE:
case EVERY:
case EXISTS:
case EXP:
case EXTRACT:
case FALSE:
case FIRST_VALUE:
case FLOOR:
case FROM:
case GENERATE_SERIES:
case GREATEST:
case HAS_ANY_COLUMN_PRIVILEGE:
case HAS_SCHEMA_PRIVILEGE:
case HAS_TABLE_PRIVILEGE:
case INSERT:
case INTERVAL:
case LAG:
case LAST_VALUE:
case LATEST:
case LEAD:
case LEAST:
case LENGTH:
case LN:
case LOCALTIME:
case LOCALTIMESTAMP:
case LOG:
case LOG10:
case LOWER:
case LOWER_INF:
case MAX:
case MIN:
case MOD:
case NEST_MANY:
case NEST_ONE:
case NOT:
case NOW:
case NTH_VALUE:
case NTILE:
case NULL:
case NULLIF:
case OBJECT:
case OCTET_LENGTH:
case OVERLAPS:
case OVERLAY:
case PERCENT_RANK:
case PERIOD:
case PG_EXPANDARRAY:
case PG_GET_EXPR:
case PG_GET_INDEXDEF:
case POSITION:
case POWER:
case RANGE_BINS:
case RANK:
case RECORD:
case REPLACE:
case ROLE:
case ROW_NUMBER:
case SELECT:
case SETTING:
case SIN:
case SINH:
case SQRT:
case START:
case STDDEV_POP:
case STDDEV_SAMP:
case SUBMITTED:
case SUBSTRING:
case SUM:
case SYSTEM_TIME:
case TAN:
case TANH:
case TIME:
case TIMESTAMP:
case TIMEZONE:
case TRIM:
case TRIM_ARRAY:
case TRUE:
case TSTZRANGE:
case UNCOMMITTED:
case UPDATE:
case UPPER:
case UPPER_INF:
case UUID:
case VALID_TIME:
case VALUE_OF:
case VAR_POP:
case VAR_SAMP:
case VERSION:
case DOLLAR_TAG:
case REGULAR_IDENTIFIER:
case DELIMITED_IDENTIFIER:
{
setState(1146);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==FROM) {
{
setState(1145);
match(FROM);
}
}
setState(1148);
startPosition();
setState(1153);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4075256285523264496L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 5703988182742036979L) != 0) || ((((_la - 133)) & ~0x3f) == 0 && ((1L << (_la - 133)) & 3551075298076794053L) != 0) || ((((_la - 198)) & ~0x3f) == 0 && ((1L << (_la - 198)) & -8493220717618264769L) != 0) || ((((_la - 263)) & ~0x3f) == 0 && ((1L << (_la - 263)) & 4036260756444010451L) != 0)) {
{
setState(1150);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==FOR) {
{
setState(1149);
match(FOR);
}
}
setState(1152);
stringLength();
}
}
setState(1157);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==USING) {
{
setState(1155);
match(USING);
setState(1156);
charLengthUnits();
}
}
}
break;
case COMMA:
{
setState(1159);
match(COMMA);
setState(1160);
startPosition();
setState(1163);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1161);
match(COMMA);
setState(1162);
stringLength();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1167);
match(RPAREN);
}
break;
case 45:
{
_localctx = new UpperFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1169);
match(UPPER);
setState(1170);
match(LPAREN);
setState(1171);
expr(0);
setState(1172);
match(RPAREN);
}
break;
case 46:
{
_localctx = new LowerFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1174);
match(LOWER);
setState(1175);
match(LPAREN);
setState(1176);
expr(0);
setState(1177);
match(RPAREN);
}
break;
case 47:
{
_localctx = new TrimFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1179);
match(TRIM);
setState(1180);
match(LPAREN);
setState(1182);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==BOTH || _la==LEADING || _la==TRAILING) {
{
setState(1181);
trimSpecification();
}
}
setState(1185);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) {
case 1:
{
setState(1184);
trimCharacter();
}
break;
}
setState(1188);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==FROM) {
{
setState(1187);
match(FROM);
}
}
setState(1190);
trimSource();
setState(1191);
match(RPAREN);
}
break;
case 48:
{
_localctx = new OverlayFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1193);
match(OVERLAY);
setState(1194);
match(LPAREN);
setState(1195);
expr(0);
setState(1196);
match(PLACING);
setState(1197);
expr(0);
setState(1198);
match(FROM);
setState(1199);
startPosition();
setState(1202);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==FOR) {
{
setState(1200);
match(FOR);
setState(1201);
stringLength();
}
}
setState(1206);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==USING) {
{
setState(1204);
match(USING);
setState(1205);
charLengthUnits();
}
}
setState(1208);
match(RPAREN);
}
break;
case 49:
{
_localctx = new ReplaceFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1210);
match(REPLACE);
setState(1211);
match(LPAREN);
setState(1212);
expr(0);
setState(1213);
match(COMMA);
setState(1214);
replaceTarget();
setState(1215);
match(COMMA);
setState(1216);
replacement();
setState(1217);
match(RPAREN);
}
break;
case 50:
{
_localctx = new CurrentUserFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1222);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(1219);
schemaName();
setState(1220);
match(DOT);
}
}
setState(1224);
match(CURRENT_USER);
}
break;
case 51:
{
_localctx = new CurrentSchemaFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1228);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(1225);
schemaName();
setState(1226);
match(DOT);
}
}
setState(1230);
match(CURRENT_SCHEMA);
setState(1233);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,89,_ctx) ) {
case 1:
{
setState(1231);
match(LPAREN);
setState(1232);
match(RPAREN);
}
break;
}
}
break;
case 52:
{
_localctx = new CurrentSchemasFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1238);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(1235);
schemaName();
setState(1236);
match(DOT);
}
}
setState(1240);
match(CURRENT_SCHEMAS);
setState(1241);
match(LPAREN);
setState(1242);
expr(0);
setState(1243);
match(RPAREN);
}
break;
case 53:
{
_localctx = new CurrentDatabaseFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1248);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(1245);
schemaName();
setState(1246);
match(DOT);
}
}
setState(1250);
match(CURRENT_DATABASE);
setState(1253);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,92,_ctx) ) {
case 1:
{
setState(1251);
match(LPAREN);
setState(1252);
match(RPAREN);
}
break;
}
}
break;
case 54:
{
_localctx = new PgGetExprFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1258);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(1255);
schemaName();
setState(1256);
match(DOT);
}
}
setState(1260);
match(PG_GET_EXPR);
setState(1271);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) {
case 1:
{
setState(1261);
match(LPAREN);
setState(1262);
expr(0);
setState(1263);
match(COMMA);
setState(1264);
expr(0);
setState(1267);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1265);
match(COMMA);
setState(1266);
expr(0);
}
}
setState(1269);
match(RPAREN);
}
break;
}
}
break;
case 55:
{
_localctx = new PgExpandArrayFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1276);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(1273);
schemaName();
setState(1274);
match(DOT);
}
}
setState(1278);
match(PG_EXPANDARRAY);
setState(1283);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) {
case 1:
{
setState(1279);
match(LPAREN);
setState(1280);
expr(0);
setState(1281);
match(RPAREN);
}
break;
}
}
break;
case 56:
{
_localctx = new PgGetIndexdefFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1288);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3458799698192629760L) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & 11400836069523475L) != 0) || ((((_la - 152)) & ~0x3f) == 0 && ((1L << (_la - 152)) & 36507230209L) != 0) || ((((_la - 251)) & ~0x3f) == 0 && ((1L << (_la - 251)) & 4072450366241506369L) != 0) || _la==REGULAR_IDENTIFIER || _la==DELIMITED_IDENTIFIER) {
{
setState(1285);
schemaName();
setState(1286);
match(DOT);
}
}
setState(1290);
match(PG_GET_INDEXDEF);
setState(1291);
match(LPAREN);
setState(1292);
expr(0);
setState(1298);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1293);
match(COMMA);
setState(1294);
expr(0);
setState(1295);
match(COMMA);
setState(1296);
expr(0);
}
}
setState(1300);
match(RPAREN);
}
break;
case 57:
{
_localctx = new CurrentInstantFunction0Context(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1302);
currentInstantFunction();
}
break;
case 58:
{
_localctx = new CurrentTimeFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1303);
match(CURRENT_TIME);
setState(1308);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) {
case 1:
{
setState(1304);
match(LPAREN);
setState(1305);
precision();
setState(1306);
match(RPAREN);
}
break;
}
}
break;
case 59:
{
_localctx = new LocalTimeFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1310);
match(LOCALTIME);
setState(1315);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) {
case 1:
{
setState(1311);
match(LPAREN);
setState(1312);
precision();
setState(1313);
match(RPAREN);
}
break;
}
}
break;
case 60:
{
_localctx = new DateTruncFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1317);
match(DATE_TRUNC);
setState(1318);
match(LPAREN);
setState(1319);
dateTruncPrecision();
setState(1320);
match(COMMA);
setState(1321);
dateTruncSource();
setState(1324);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1322);
match(COMMA);
setState(1323);
dateTruncTimeZone();
}
}
setState(1326);
match(RPAREN);
}
break;
case 61:
{
_localctx = new DateBinFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1328);
match(DATE_BIN);
setState(1329);
match(LPAREN);
setState(1330);
intervalLiteral();
setState(1331);
match(COMMA);
setState(1332);
dateBinSource();
setState(1335);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1333);
match(COMMA);
setState(1334);
dateBinOrigin();
}
}
setState(1337);
match(RPAREN);
}
break;
case 62:
{
_localctx = new RangeBinsFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1339);
match(RANGE_BINS);
setState(1340);
match(LPAREN);
setState(1341);
intervalLiteral();
setState(1342);
match(COMMA);
setState(1343);
rangeBinsSource();
setState(1346);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1344);
match(COMMA);
setState(1345);
dateBinOrigin();
}
}
setState(1348);
match(RPAREN);
}
break;
case 63:
{
_localctx = new OverlapsFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1350);
match(OVERLAPS);
setState(1351);
match(LPAREN);
setState(1352);
expr(0);
setState(1355);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1353);
match(COMMA);
setState(1354);
expr(0);
}
}
setState(1357);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==COMMA );
setState(1359);
match(RPAREN);
}
break;
case 64:
{
_localctx = new TsTzRangeConstructorContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1361);
_la = _input.LA(1);
if ( !(_la==PERIOD || _la==TSTZRANGE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1362);
match(LPAREN);
setState(1363);
expr(0);
setState(1364);
match(COMMA);
setState(1365);
expr(0);
setState(1366);
match(RPAREN);
}
break;
case 65:
{
_localctx = new UpperInfFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1368);
match(UPPER_INF);
setState(1369);
match(LPAREN);
setState(1370);
expr(0);
setState(1371);
match(RPAREN);
}
break;
case 66:
{
_localctx = new LowerInfFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1373);
match(LOWER_INF);
setState(1374);
match(LPAREN);
setState(1375);
expr(0);
setState(1376);
match(RPAREN);
}
break;
case 67:
{
_localctx = new AgeFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1378);
match(AGE);
setState(1379);
match(LPAREN);
setState(1380);
expr(0);
setState(1381);
match(COMMA);
setState(1382);
expr(0);
setState(1383);
match(RPAREN);
}
break;
case 68:
{
_localctx = new TrimArrayFunctionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1385);
match(TRIM_ARRAY);
setState(1386);
match(LPAREN);
setState(1387);
expr(0);
setState(1388);
match(COMMA);
setState(1389);
expr(0);
setState(1390);
match(RPAREN);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(1410);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,108,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(1408);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) {
case 1:
{
_localctx = new ConcatExprContext(new ExprPrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_exprPrimary);
setState(1394);
if (!(precpred(_ctx, 67))) throw new FailedPredicateException(this, "precpred(_ctx, 67)");
setState(1395);
match(CONCAT);
setState(1396);
exprPrimary(68);
}
break;
case 2:
{
_localctx = new FieldAccessContext(new ExprPrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_exprPrimary);
setState(1397);
if (!(precpred(_ctx, 70))) throw new FailedPredicateException(this, "precpred(_ctx, 70)");
setState(1398);
match(DOT);
setState(1399);
fieldName();
}
break;
case 3:
{
_localctx = new ArrayAccessContext(new ExprPrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_exprPrimary);
setState(1400);
if (!(precpred(_ctx, 69))) throw new FailedPredicateException(this, "precpred(_ctx, 69)");
setState(1401);
match(LBRACK);
setState(1402);
expr(0);
setState(1403);
match(RBRACK);
}
break;
case 4:
{
_localctx = new PostgresCastExprContext(new ExprPrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_exprPrimary);
setState(1405);
if (!(precpred(_ctx, 68))) throw new FailedPredicateException(this, "precpred(_ctx, 68)");
setState(1406);
match(PG_CAST);
setState(1407);
dataType(0);
}
break;
}
}
}
setState(1412);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,108,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ReplaceTargetContext extends ParserRuleContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public ReplaceTargetContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_replaceTarget; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitReplaceTarget(this);
else return visitor.visitChildren(this);
}
}
public final ReplaceTargetContext replaceTarget() throws RecognitionException {
ReplaceTargetContext _localctx = new ReplaceTargetContext(_ctx, getState());
enterRule(_localctx, 70, RULE_replaceTarget);
try {
enterOuterAlt(_localctx, 1);
{
setState(1413);
expr(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ReplacementContext extends ParserRuleContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public ReplacementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_replacement; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitReplacement(this);
else return visitor.visitChildren(this);
}
}
public final ReplacementContext replacement() throws RecognitionException {
ReplacementContext _localctx = new ReplacementContext(_ctx, getState());
enterRule(_localctx, 72, RULE_replacement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1415);
expr(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentInstantFunctionContext extends ParserRuleContext {
public CurrentInstantFunctionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_currentInstantFunction; }
public CurrentInstantFunctionContext() { }
public void copyFrom(CurrentInstantFunctionContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentTimestampFunctionContext extends CurrentInstantFunctionContext {
public TerminalNode CURRENT_TIMESTAMP() { return getToken(Sql.CURRENT_TIMESTAMP, 0); }
public TerminalNode NOW() { return getToken(Sql.NOW, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public CurrentTimestampFunctionContext(CurrentInstantFunctionContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentTimestampFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LocalTimestampFunctionContext extends CurrentInstantFunctionContext {
public TerminalNode LOCALTIMESTAMP() { return getToken(Sql.LOCALTIMESTAMP, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public PrecisionContext precision() {
return getRuleContext(PrecisionContext.class,0);
}
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public LocalTimestampFunctionContext(CurrentInstantFunctionContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitLocalTimestampFunction(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class CurrentDateFunctionContext extends CurrentInstantFunctionContext {
public TerminalNode CURRENT_DATE() { return getToken(Sql.CURRENT_DATE, 0); }
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public CurrentDateFunctionContext(CurrentInstantFunctionContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitCurrentDateFunction(this);
else return visitor.visitChildren(this);
}
}
public final CurrentInstantFunctionContext currentInstantFunction() throws RecognitionException {
CurrentInstantFunctionContext _localctx = new CurrentInstantFunctionContext(_ctx, getState());
enterRule(_localctx, 74, RULE_currentInstantFunction);
int _la;
try {
setState(1436);
_errHandler.sync(this);
switch (_input.LA(1)) {
case CURRENT_DATE:
_localctx = new CurrentDateFunctionContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(1417);
match(CURRENT_DATE);
setState(1420);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,109,_ctx) ) {
case 1:
{
setState(1418);
match(LPAREN);
setState(1419);
match(RPAREN);
}
break;
}
}
break;
case CURRENT_TIMESTAMP:
case NOW:
_localctx = new CurrentTimestampFunctionContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(1422);
_la = _input.LA(1);
if ( !(_la==CURRENT_TIMESTAMP || _la==NOW) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1427);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,110,_ctx) ) {
case 1:
{
setState(1423);
match(LPAREN);
setState(1424);
precision();
setState(1425);
match(RPAREN);
}
break;
}
}
break;
case LOCALTIMESTAMP:
_localctx = new LocalTimestampFunctionContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(1429);
match(LOCALTIMESTAMP);
setState(1434);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,111,_ctx) ) {
case 1:
{
setState(1430);
match(LPAREN);
setState(1431);
precision();
setState(1432);
match(RPAREN);
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BooleanValueContext extends ParserRuleContext {
public TerminalNode TRUE() { return getToken(Sql.TRUE, 0); }
public TerminalNode FALSE() { return getToken(Sql.FALSE, 0); }
public TerminalNode UNKNOWN() { return getToken(Sql.UNKNOWN, 0); }
public BooleanValueContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_booleanValue; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SqlVisitor ) return ((SqlVisitor extends T>)visitor).visitBooleanValue(this);
else return visitor.visitChildren(this);
}
}
public final BooleanValueContext booleanValue() throws RecognitionException {
BooleanValueContext _localctx = new BooleanValueContext(_ctx, getState());
enterRule(_localctx, 76, RULE_booleanValue);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1438);
_la = _input.LA(1);
if ( !(_la==FALSE || _la==TRUE || _la==UNKNOWN) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ObjectConstructorContext extends ParserRuleContext {
public TerminalNode LPAREN() { return getToken(Sql.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(Sql.RPAREN, 0); }
public TerminalNode RECORD() { return getToken(Sql.RECORD, 0); }
public TerminalNode OBJECT() { return getToken(Sql.OBJECT, 0); }
public List objectNameAndValue() {
return getRuleContexts(ObjectNameAndValueContext.class);
}
public ObjectNameAndValueContext objectNameAndValue(int i) {
return getRuleContext(ObjectNameAndValueContext.class,i);
}
public List