From 489e1ac065d2465c4ee5ccdccfee46774b286f86 Mon Sep 17 00:00:00 2001 From: h3n4l Date: Mon, 3 Nov 2025 17:22:31 +0800 Subject: [PATCH] feat: add Trino parser to monorepo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add ANTLR4-based Trino SQL parser (formerly PrestoSQL) from trino-parser repository into the parser monorepo. Changes: - Add trino/ directory with grammar files (TrinoLexer.g4, TrinoParser.g4) - Add Makefile with build and test targets following the pattern of other parsers - Include 94 SQL test examples covering comprehensive Trino SQL features - Update package name and import paths to github.com/bytebase/parser/trino - Add trino to CI workflow to run tests automatically - All 94 test cases passing Test coverage includes: - DDL statements (CREATE, ALTER, DROP for tables, views, schemas, roles, materialized views) - DML statements (SELECT, INSERT, UPDATE, DELETE, MERGE) - Query features (CTEs, window functions, aggregations, joins, subqueries) - Transaction control (START TRANSACTION, COMMIT, ROLLBACK) - Session management (SET SESSION, RESET SESSION, SET ROLE) - Security (GRANT, REVOKE, DENY) - Administrative commands (SHOW, DESCRIBE, ANALYZE, EXPLAIN) - Trino-specific features (table functions, refresh materialized view, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/tests.yml | 2 +- trino/Makefile | 7 + trino/README.md | 9 + trino/TrinoLexer.g4 | 398 + trino/TrinoParser.g4 | 1132 + trino/examples/aggregation_filter.sql | 1 + trino/examples/aggregation_with_order_by.sql | 1 + trino/examples/all_columns.sql | 5 + ...alter_table_alter_column_set_data_type.sql | 3 + .../alter_table_set_authorization.sql | 3 + .../examples/alter_view_set_authorization.sql | 3 + trino/examples/analyze.sql | 4 + trino/examples/at_time_zone.sql | 1 + trino/examples/call.sql | 2 + trino/examples/comment_column.sql | 6 + trino/examples/comment_table.sql | 3 + trino/examples/comment_view.sql | 3 + trino/examples/commit.sql | 2 + trino/examples/create_materialized_view.sql | 6 + trino/examples/create_role.sql | 10 + trino/examples/create_schema.sql | 4 + trino/examples/create_table.sql | 2 + trino/examples/create_table_as_select.sql | 19 + trino/examples/create_view.sql | 11 + trino/examples/deallocate_prepare.sql | 1 + trino/examples/delete.sql | 3 + trino/examples/deny.sql | 4 + trino/examples/describe_input.sql | 1 + trino/examples/describe_output.sql | 1 + trino/examples/double_in_query.sql | 1 + trino/examples/drop_column.sql | 5 + trino/examples/drop_materialized_view.sql | 6 + trino/examples/drop_role.sql | 5 + trino/examples/drop_schema.sql | 5 + trino/examples/drop_table.sql | 8 + trino/examples/drop_view.sql | 6 + trino/examples/execute.sql | 1 + trino/examples/execute_with_using.sql | 1 + trino/examples/exists.sql | 4 + trino/examples/explain.sql | 3 + trino/examples/explain_analyze.sql | 2 + trino/examples/grant.sql | 6 + trino/examples/grant_roles.sql | 8 + trino/examples/implicit_join.sql | 1 + trino/examples/inline_routine.sql | 5 + trino/examples/insert_into.sql | 2 + trino/examples/intersect.sql | 1 + trino/examples/join_precedence.sql | 2 + trino/examples/lateral.sql | 3 + trino/examples/merge.sql | 1 + trino/examples/non_reserved.sql | 3 + trino/examples/prepare.sql | 1 + trino/examples/prepare_with_parameters.sql | 8 + trino/examples/refresh_materialized_view.sql | 2 + trino/examples/rename_column.sql | 4 + trino/examples/rename_materialized_view.sql | 2 + trino/examples/rename_schema.sql | 3 + trino/examples/rename_table.sql | 2 + trino/examples/rename_view.sql | 1 + trino/examples/reserved_word_identifier.sql | 3 + trino/examples/reset_session.sql | 3 + trino/examples/revoke.sql | 6 + trino/examples/revoke_roles.sql | 7 + trino/examples/rollback.sql | 2 + trino/examples/select_with_fetch.sql | 6 + trino/examples/select_with_group_by.sql | 7 + trino/examples/select_with_limit.sql | 3 + trino/examples/select_with_offset.sql | 4 + trino/examples/select_with_order_by.sql | 1 + trino/examples/select_with_row_type.sql | 3 + trino/examples/session_identifiers.sql | 2 + .../set_materialized_view_properties.sql | 1 + trino/examples/set_path.sql | 2 + trino/examples/set_role.sql | 5 + trino/examples/set_session.sql | 4 + trino/examples/set_table_properties.sql | 6 + trino/examples/show_catalogs.sql | 3 + trino/examples/show_columns.sql | 5 + trino/examples/show_functions.sql | 3 + trino/examples/show_grants.sql | 3 + trino/examples/show_role_grants.sql | 2 + trino/examples/show_roles.sql | 6 + trino/examples/show_schemas.sql | 4 + trino/examples/show_session.sql | 3 + trino/examples/show_stats.sql | 1 + trino/examples/show_stats_for_query.sql | 3 + trino/examples/show_tables.sql | 4 + trino/examples/start_transaction.sql | 10 + .../examples/substring_built_in_function.sql | 2 + .../substring_registered_function.sql | 2 + trino/examples/table_execute.sql | 3 + trino/examples/truncate_table.sql | 3 + trino/examples/union.sql | 1 + trino/examples/unnest.sql | 3 + trino/examples/update.sql | 1 + trino/examples/values.sql | 2 + trino/examples/whereless_update.sql | 1 + trino/examples/window_clause.sql | 1 + trino/examples/with.sql | 2 + trino/parser_test.go | 124 + trino/trino_lexer.go | 1982 + trino/trino_parser.go | 59634 ++++++++++++++++ trino/trinoparser_base_listener.go | 2025 + trino/trinoparser_base_visitor.go | 1332 + trino/trinoparser_listener.go | 1995 + trino/trinoparser_visitor.go | 1002 + 106 files changed, 69975 insertions(+), 1 deletion(-) create mode 100644 trino/Makefile create mode 100644 trino/README.md create mode 100644 trino/TrinoLexer.g4 create mode 100644 trino/TrinoParser.g4 create mode 100644 trino/examples/aggregation_filter.sql create mode 100644 trino/examples/aggregation_with_order_by.sql create mode 100644 trino/examples/all_columns.sql create mode 100644 trino/examples/alter_table_alter_column_set_data_type.sql create mode 100644 trino/examples/alter_table_set_authorization.sql create mode 100644 trino/examples/alter_view_set_authorization.sql create mode 100644 trino/examples/analyze.sql create mode 100644 trino/examples/at_time_zone.sql create mode 100644 trino/examples/call.sql create mode 100644 trino/examples/comment_column.sql create mode 100644 trino/examples/comment_table.sql create mode 100644 trino/examples/comment_view.sql create mode 100644 trino/examples/commit.sql create mode 100644 trino/examples/create_materialized_view.sql create mode 100644 trino/examples/create_role.sql create mode 100644 trino/examples/create_schema.sql create mode 100644 trino/examples/create_table.sql create mode 100644 trino/examples/create_table_as_select.sql create mode 100644 trino/examples/create_view.sql create mode 100644 trino/examples/deallocate_prepare.sql create mode 100644 trino/examples/delete.sql create mode 100644 trino/examples/deny.sql create mode 100644 trino/examples/describe_input.sql create mode 100644 trino/examples/describe_output.sql create mode 100644 trino/examples/double_in_query.sql create mode 100644 trino/examples/drop_column.sql create mode 100644 trino/examples/drop_materialized_view.sql create mode 100644 trino/examples/drop_role.sql create mode 100644 trino/examples/drop_schema.sql create mode 100644 trino/examples/drop_table.sql create mode 100644 trino/examples/drop_view.sql create mode 100644 trino/examples/execute.sql create mode 100644 trino/examples/execute_with_using.sql create mode 100644 trino/examples/exists.sql create mode 100644 trino/examples/explain.sql create mode 100644 trino/examples/explain_analyze.sql create mode 100644 trino/examples/grant.sql create mode 100644 trino/examples/grant_roles.sql create mode 100644 trino/examples/implicit_join.sql create mode 100644 trino/examples/inline_routine.sql create mode 100644 trino/examples/insert_into.sql create mode 100644 trino/examples/intersect.sql create mode 100644 trino/examples/join_precedence.sql create mode 100644 trino/examples/lateral.sql create mode 100644 trino/examples/merge.sql create mode 100644 trino/examples/non_reserved.sql create mode 100644 trino/examples/prepare.sql create mode 100644 trino/examples/prepare_with_parameters.sql create mode 100644 trino/examples/refresh_materialized_view.sql create mode 100644 trino/examples/rename_column.sql create mode 100644 trino/examples/rename_materialized_view.sql create mode 100644 trino/examples/rename_schema.sql create mode 100644 trino/examples/rename_table.sql create mode 100644 trino/examples/rename_view.sql create mode 100644 trino/examples/reserved_word_identifier.sql create mode 100644 trino/examples/reset_session.sql create mode 100644 trino/examples/revoke.sql create mode 100644 trino/examples/revoke_roles.sql create mode 100644 trino/examples/rollback.sql create mode 100644 trino/examples/select_with_fetch.sql create mode 100644 trino/examples/select_with_group_by.sql create mode 100644 trino/examples/select_with_limit.sql create mode 100644 trino/examples/select_with_offset.sql create mode 100644 trino/examples/select_with_order_by.sql create mode 100644 trino/examples/select_with_row_type.sql create mode 100644 trino/examples/session_identifiers.sql create mode 100644 trino/examples/set_materialized_view_properties.sql create mode 100644 trino/examples/set_path.sql create mode 100644 trino/examples/set_role.sql create mode 100644 trino/examples/set_session.sql create mode 100644 trino/examples/set_table_properties.sql create mode 100644 trino/examples/show_catalogs.sql create mode 100644 trino/examples/show_columns.sql create mode 100644 trino/examples/show_functions.sql create mode 100644 trino/examples/show_grants.sql create mode 100644 trino/examples/show_role_grants.sql create mode 100644 trino/examples/show_roles.sql create mode 100644 trino/examples/show_schemas.sql create mode 100644 trino/examples/show_session.sql create mode 100644 trino/examples/show_stats.sql create mode 100644 trino/examples/show_stats_for_query.sql create mode 100644 trino/examples/show_tables.sql create mode 100644 trino/examples/start_transaction.sql create mode 100644 trino/examples/substring_built_in_function.sql create mode 100644 trino/examples/substring_registered_function.sql create mode 100644 trino/examples/table_execute.sql create mode 100644 trino/examples/truncate_table.sql create mode 100644 trino/examples/union.sql create mode 100644 trino/examples/unnest.sql create mode 100644 trino/examples/update.sql create mode 100644 trino/examples/values.sql create mode 100644 trino/examples/whereless_update.sql create mode 100644 trino/examples/window_clause.sql create mode 100644 trino/examples/with.sql create mode 100644 trino/parser_test.go create mode 100644 trino/trino_lexer.go create mode 100644 trino/trino_parser.go create mode 100644 trino/trinoparser_base_listener.go create mode 100644 trino/trinoparser_base_visitor.go create mode 100644 trino/trinoparser_listener.go create mode 100644 trino/trinoparser_visitor.go diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7a1c922..fddcca8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: id: set-matrix run: | # List of all available parsers - ALL_PARSERS="redshift postgresql cql snowflake tsql doris" + ALL_PARSERS="redshift postgresql cql snowflake tsql doris trino" # Add more parsers here as they are added to the repository # ALL_PARSERS="redshift mysql postgresql" diff --git a/trino/Makefile b/trino/Makefile new file mode 100644 index 0000000..e97d3fd --- /dev/null +++ b/trino/Makefile @@ -0,0 +1,7 @@ +all: build test + +build: + antlr -Dlanguage=Go -package trino -visitor -o . TrinoLexer.g4 TrinoParser.g4 + +test: + go test -v -run TestTrinoParser diff --git a/trino/README.md b/trino/README.md new file mode 100644 index 0000000..cd53010 --- /dev/null +++ b/trino/README.md @@ -0,0 +1,9 @@ +# Trino grammar for ANTLR4 + +An ANTLR4 grammar for Trino, formerly known as PrestoSQL. +This grammar is based on the actively maintained [Trino repository](https://github.com/trinodb/trino). + +The lexer and parser are referenced from the [offical base antlr file](https://github.com/trinodb/trino/blob/master/core/trino-parser/src/main/antlr4/io/trino/sql/parser/SqlBase.g4). +Changes are made to accommodate various language targets as the official one is being developed for Java only. + +The examples are extracted from the [offical test file](https://github.com/trinodb/trino/blob/master/core/trino-parser/src/test/java/io/trino/sql/parser/TestSqlParser.java). diff --git a/trino/TrinoLexer.g4 b/trino/TrinoLexer.g4 new file mode 100644 index 0000000..f9e70f1 --- /dev/null +++ b/trino/TrinoLexer.g4 @@ -0,0 +1,398 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// $antlr-format alignTrailingComments true, columnLimit 150, maxEmptyLinesToKeep 1, reflowComments false, useTab false +// $antlr-format allowShortRulesOnASingleLine true, allowShortBlocksOnASingleLine true, minEmptyLines 0, alignSemicolons ownLine +// $antlr-format alignColons trailing, singleLineOverrulesHangingColon true, alignLexerCommands true, alignLabels true, alignTrailers true + +lexer grammar TrinoLexer; + +options { + caseInsensitive = true; +} + +ABSENT_ : 'ABSENT'; +ADD_ : 'ADD'; +ADMIN_ : 'ADMIN'; +AFTER_ : 'AFTER'; +ALL_ : 'ALL'; +ALTER_ : 'ALTER'; +ANALYZE_ : 'ANALYZE'; +AND_ : 'AND'; +ANY_ : 'ANY'; +ARRAY_ : 'ARRAY'; +AS_ : 'AS'; +ASC_ : 'ASC'; +AT_ : 'AT'; +AUTHORIZATION_ : 'AUTHORIZATION'; +BEGIN_ : 'BEGIN'; +BERNOULLI_ : 'BERNOULLI'; +BETWEEN_ : 'BETWEEN'; +BOTH_ : 'BOTH'; +BY_ : 'BY'; +CALL_ : 'CALL'; +CALLED_ : 'CALLED'; +CASCADE_ : 'CASCADE'; +CASE_ : 'CASE'; +CAST_ : 'CAST'; +CATALOG_ : 'CATALOG'; +CATALOGS_ : 'CATALOGS'; +COLUMN_ : 'COLUMN'; +COLUMNS_ : 'COLUMNS'; +COMMENT_ : 'COMMENT'; +COMMIT_ : 'COMMIT'; +COMMITTED_ : 'COMMITTED'; +CONDITIONAL_ : 'CONDITIONAL'; +CONSTRAINT_ : 'CONSTRAINT'; +COUNT_ : 'COUNT'; +COPARTITION_ : 'COPARTITION'; +CREATE_ : 'CREATE'; +CROSS_ : 'CROSS'; +CUBE_ : 'CUBE'; +CURRENT_ : 'CURRENT'; +CURRENT_CATALOG_ : 'CURRENT_CATALOG'; +CURRENT_DATE_ : 'CURRENT_DATE'; +CURRENT_PATH_ : 'CURRENT_PATH'; +CURRENT_ROLE_ : 'CURRENT_ROLE'; +CURRENT_SCHEMA_ : 'CURRENT_SCHEMA'; +CURRENT_TIME_ : 'CURRENT_TIME'; +CURRENT_TIMESTAMP_ : 'CURRENT_TIMESTAMP'; +CURRENT_USER_ : 'CURRENT_USER'; +DATA_ : 'DATA'; +DATE_ : 'DATE'; +DAY_ : 'DAY'; +DEALLOCATE_ : 'DEALLOCATE'; +DECLARE_ : 'DECLARE'; +DEFAULT_ : 'DEFAULT'; +DEFINE_ : 'DEFINE'; +DEFINER_ : 'DEFINER'; +DELETE_ : 'DELETE'; +DENY_ : 'DENY'; +DESC_ : 'DESC'; +DESCRIBE_ : 'DESCRIBE'; +DESCRIPTOR_ : 'DESCRIPTOR'; +DETERMINISTIC_ : 'DETERMINISTIC'; +DISTINCT_ : 'DISTINCT'; +DISTRIBUTED_ : 'DISTRIBUTED'; +DO_ : 'DO'; +DOUBLE_ : 'DOUBLE'; +DROP_ : 'DROP'; +ELSE_ : 'ELSE'; +EMPTY_ : 'EMPTY'; +ELSEIF_ : 'ELSEIF'; +ENCODING_ : 'ENCODING'; +END_ : 'END'; +ERROR_ : 'ERROR'; +ESCAPE_ : 'ESCAPE'; +EXCEPT_ : 'EXCEPT'; +EXCLUDING_ : 'EXCLUDING'; +EXECUTE_ : 'EXECUTE'; +EXISTS_ : 'EXISTS'; +EXPLAIN_ : 'EXPLAIN'; +EXTRACT_ : 'EXTRACT'; +FALSE_ : 'FALSE'; +FETCH_ : 'FETCH'; +FILTER_ : 'FILTER'; +FINAL_ : 'FINAL'; +FIRST_ : 'FIRST'; +FOLLOWING_ : 'FOLLOWING'; +FOR_ : 'FOR'; +FORMAT_ : 'FORMAT'; +FROM_ : 'FROM'; +FULL_ : 'FULL'; +FUNCTION_ : 'FUNCTION'; +FUNCTIONS_ : 'FUNCTIONS'; +GRACE_ : 'GRACE'; +GRANT_ : 'GRANT'; +GRANTED_ : 'GRANTED'; +GRANTS_ : 'GRANTS'; +GRAPHVIZ_ : 'GRAPHVIZ'; +GROUP_ : 'GROUP'; +GROUPING_ : 'GROUPING'; +GROUPS_ : 'GROUPS'; +HAVING_ : 'HAVING'; +HOUR_ : 'HOUR'; +IF_ : 'IF'; +IGNORE_ : 'IGNORE'; +IMMEDIATE_ : 'IMMEDIATE'; +IN_ : 'IN'; +INCLUDING_ : 'INCLUDING'; +INITIAL_ : 'INITIAL'; +INNER_ : 'INNER'; +INPUT_ : 'INPUT'; +INSERT_ : 'INSERT'; +INTERSECT_ : 'INTERSECT'; +INTERVAL_ : 'INTERVAL'; +INTO_ : 'INTO'; +INVOKER_ : 'INVOKER'; +IO_ : 'IO'; +IS_ : 'IS'; +ISOLATION_ : 'ISOLATION'; +ITERATE_ : 'ITERATE'; +JOIN_ : 'JOIN'; +JSON_ : 'JSON'; +JSON_ARRAY_ : 'JSON_ARRAY'; +JSON_EXISTS_ : 'JSON_EXISTS'; +JSON_OBJECT_ : 'JSON_OBJECT'; +JSON_QUERY_ : 'JSON_QUERY'; +JSON_TABLE_ : 'JSON_TABLE'; +JSON_VALUE_ : 'JSON_VALUE'; +KEEP_ : 'KEEP'; +KEY_ : 'KEY'; +KEYS_ : 'KEYS'; +LANGUAGE_ : 'LANGUAGE'; +LAST_ : 'LAST'; +LATERAL_ : 'LATERAL'; +LEADING_ : 'LEADING'; +LEAVE_ : 'LEAVE'; +LEFT_ : 'LEFT'; +LEVEL_ : 'LEVEL'; +LIKE_ : 'LIKE'; +LIMIT_ : 'LIMIT'; +LISTAGG_ : 'LISTAGG'; +LOCAL_ : 'LOCAL'; +LOCALTIME_ : 'LOCALTIME'; +LOCALTIMESTAMP_ : 'LOCALTIMESTAMP'; +LOGICAL_ : 'LOGICAL'; +LOOP_ : 'LOOP'; +MAP_ : 'MAP'; +MATCH_ : 'MATCH'; +MATCHED_ : 'MATCHED'; +MATCHES_ : 'MATCHES'; +MATCH_RECOGNIZE_ : 'MATCH_RECOGNIZE'; +MATERIALIZED_ : 'MATERIALIZED'; +MEASURES_ : 'MEASURES'; +MERGE_ : 'MERGE'; +MINUTE_ : 'MINUTE'; +MONTH_ : 'MONTH'; +NATURAL_ : 'NATURAL'; +NESTED_ : 'NESTED'; +NEXT_ : 'NEXT'; +NFC_ : 'NFC'; +NFD_ : 'NFD'; +NFKC_ : 'NFKC'; +NFKD_ : 'NFKD'; +NO_ : 'NO'; +NONE_ : 'NONE'; +NORMALIZE_ : 'NORMALIZE'; +NOT_ : 'NOT'; +NULL_ : 'NULL'; +NULLIF_ : 'NULLIF'; +NULLS_ : 'NULLS'; +OBJECT_ : 'OBJECT'; +OF_ : 'OF'; +OFFSET_ : 'OFFSET'; +OMIT_ : 'OMIT'; +ON_ : 'ON'; +ONE_ : 'ONE'; +ONLY_ : 'ONLY'; +OPTION_ : 'OPTION'; +OR_ : 'OR'; +ORDER_ : 'ORDER'; +ORDINALITY_ : 'ORDINALITY'; +OUTER_ : 'OUTER'; +OUTPUT_ : 'OUTPUT'; +OVER_ : 'OVER'; +OVERFLOW_ : 'OVERFLOW'; +PARTITION_ : 'PARTITION'; +PARTITIONS_ : 'PARTITIONS'; +PASSING_ : 'PASSING'; +PAST_ : 'PAST'; +PATH_ : 'PATH'; +PATTERN_ : 'PATTERN'; +PER_ : 'PER'; +PERIOD_ : 'PERIOD'; +PERMUTE_ : 'PERMUTE'; +PLAN_ : 'PLAN'; +POSITION_ : 'POSITION'; +PRECEDING_ : 'PRECEDING'; +PRECISION_ : 'PRECISION'; +PREPARE_ : 'PREPARE'; +PRIVILEGES_ : 'PRIVILEGES'; +PROPERTIES_ : 'PROPERTIES'; +PRUNE_ : 'PRUNE'; +QUOTES_ : 'QUOTES'; +RANGE_ : 'RANGE'; +READ_ : 'READ'; +RECURSIVE_ : 'RECURSIVE'; +REFRESH_ : 'REFRESH'; +RENAME_ : 'RENAME'; +REPEAT_ : 'REPEAT'; +REPEATABLE_ : 'REPEATABLE'; +REPLACE_ : 'REPLACE'; +RESET_ : 'RESET'; +RESPECT_ : 'RESPECT'; +RESTRICT_ : 'RESTRICT'; +RETURN_ : 'RETURN'; +RETURNING_ : 'RETURNING'; +RETURNS_ : 'RETURNS'; +REVOKE_ : 'REVOKE'; +RIGHT_ : 'RIGHT'; +ROLE_ : 'ROLE'; +ROLES_ : 'ROLES'; +ROLLBACK_ : 'ROLLBACK'; +ROLLUP_ : 'ROLLUP'; +ROW_ : 'ROW'; +ROWS_ : 'ROWS'; +RUNNING_ : 'RUNNING'; +SCALAR_ : 'SCALAR'; +SCHEMA_ : 'SCHEMA'; +SCHEMAS_ : 'SCHEMAS'; +SECOND_ : 'SECOND'; +SECURITY_ : 'SECURITY'; +SEEK_ : 'SEEK'; +SELECT_ : 'SELECT'; +SERIALIZABLE_ : 'SERIALIZABLE'; +SESSION_ : 'SESSION'; +SET_ : 'SET'; +SETS_ : 'SETS'; +SHOW_ : 'SHOW'; +// Missing SKIP in official g4 +SKIP_ : 'SKIP'; +SOME_ : 'SOME'; +START_ : 'START'; +STATS_ : 'STATS'; +SUBSET_ : 'SUBSET'; +SUBSTRING_ : 'SUBSTRING'; +SYSTEM_ : 'SYSTEM'; +TABLE_ : 'TABLE'; +TABLES_ : 'TABLES'; +TABLESAMPLE_ : 'TABLESAMPLE'; +TEXT_ : 'TEXT'; +TEXT_STRING_ : 'STRING'; +THEN_ : 'THEN'; +TIES_ : 'TIES'; +TIME_ : 'TIME'; +TIMESTAMP_ : 'TIMESTAMP'; +TO_ : 'TO'; +TRAILING_ : 'TRAILING'; +TRANSACTION_ : 'TRANSACTION'; +TRIM_ : 'TRIM'; +TRUE_ : 'TRUE'; +TRUNCATE_ : 'TRUNCATE'; +TRY_CAST_ : 'TRY_CAST'; +TYPE_ : 'TYPE'; +UESCAPE_ : 'UESCAPE'; +UNBOUNDED_ : 'UNBOUNDED'; +UNCOMMITTED_ : 'UNCOMMITTED'; +UNCONDITIONAL_ : 'UNCONDITIONAL'; +UNION_ : 'UNION'; +UNIQUE_ : 'UNIQUE'; +UNKNOWN_ : 'UNKNOWN'; +UNMATCHED_ : 'UNMATCHED'; +UNNEST_ : 'UNNEST'; +UNTIL_ : 'UNTIL'; +UPDATE_ : 'UPDATE'; +USE_ : 'USE'; +USER_ : 'USER'; +USING_ : 'USING'; +UTF16_ : 'UTF16'; +UTF32_ : 'UTF32'; +UTF8_ : 'UTF8'; +VALIDATE_ : 'VALIDATE'; +VALUE_ : 'VALUE'; +VALUES_ : 'VALUES'; +VERBOSE_ : 'VERBOSE'; +VERSION_ : 'VERSION'; +VIEW_ : 'VIEW'; +WHEN_ : 'WHEN'; +WHERE_ : 'WHERE'; +WHILE_ : 'WHILE'; +WINDOW_ : 'WINDOW'; +WITH_ : 'WITH'; +WITHIN_ : 'WITHIN'; +WITHOUT_ : 'WITHOUT'; +WORK_ : 'WORK'; +WRAPPER_ : 'WRAPPER'; +WRITE_ : 'WRITE'; +YEAR_ : 'YEAR'; +ZONE_ : 'ZONE'; + +EQ_ : '='; +NEQ_ : '<>' | '!='; +LT_ : '<'; +LTE_ : '<='; +GT_ : '>'; +GTE_ : '>='; + +PLUS_ : '+'; +MINUS_ : '-'; +ASTERISK_ : '*'; +SLASH_ : '/'; +PERCENT_ : '%'; +CONCAT_ : '||'; +QUESTION_MARK_ : '?'; +SEMICOLON_ : ';'; + +// Punctuations not provided by official g4 file +DOT_ : '.'; +COLON_ : '_:'; +COMMA_ : ','; + +LPAREN_ : '('; +RPAREN_ : ')'; +LSQUARE_ : '['; +RSQUARE_ : ']'; +LCURLY_ : '{'; +RCURLY_ : '}'; +LCURLYHYPHEN_ : '{-'; +RCURLYHYPHEN_ : '-}'; + +LARROW_ : '<-'; +RARROW_ : '->'; +RDOUBLEARROW_ : '=>'; + +VBAR_ : '|'; +DOLLAR_ : '$'; +CARET_ : '^'; + +STRING_: '\'' ( ~'\'' | '\'\'')* '\''; + +UNICODE_STRING_: 'U&\'' ( ~'\'' | '\'\'')* '\''; + +// Note_: we allow any character inside the binary literal and validate +// its a correct literal when the AST is being constructed. This +// allows us to provide more meaningful error messages to the user +BINARY_LITERAL_: 'X\'' ~'\''* '\''; + +INTEGER_VALUE_: DIGIT_+; + +DECIMAL_VALUE_: DIGIT_+ '.' DIGIT_* | '.' DIGIT_+; + +DOUBLE_VALUE_: DIGIT_+ ('.' DIGIT_*)? EXPONENT_ | '.' DIGIT_+ EXPONENT_; + +IDENTIFIER_: (LETTER_ | '_') (LETTER_ | DIGIT_ | '_')*; + +DIGIT_IDENTIFIER_: DIGIT_ (LETTER_ | DIGIT_ | '_')+; + +QUOTED_IDENTIFIER_: '"' ( ~'"' | '""')* '"'; + +BACKQUOTED_IDENTIFIER_: '`' ( ~'`' | '``')* '`'; + +fragment EXPONENT_: 'E' [+-]? DIGIT_+; + +fragment DIGIT_: [0-9]; + +fragment LETTER_: [A-Z]; + +SIMPLE_COMMENT_: '--' ~[\r\n]* '\r'? '\n'? -> channel(HIDDEN); + +BRACKETED_COMMENT_: '/*' .*? '*/' -> channel(HIDDEN); + +WS_: [ \r\n\t]+ -> channel(HIDDEN); + +// Catch-all for anything we can't recognize. +// We use this to be able to ignore and recover all the text +// when splitting statements with DelimiterLexer +UNRECOGNIZED_: .; \ No newline at end of file diff --git a/trino/TrinoParser.g4 b/trino/TrinoParser.g4 new file mode 100644 index 0000000..d1fe0bb --- /dev/null +++ b/trino/TrinoParser.g4 @@ -0,0 +1,1132 @@ +/* + * Licensed under the Apache License, Version 2.0_ (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS_ IS" BASIS, + * WITHOUT_ WARRANTIES_ OR_ CONDITIONS_ OF_ ANY_ KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// $antlr-format alignTrailingComments true, columnLimit 150, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments false, useTab false +// $antlr-format allowShortRulesOnASingleLine false, allowShortBlocksOnASingleLine true, alignSemicolons hanging, alignColons hanging + +parser grammar TrinoParser; + +options { + tokenVocab = TrinoLexer; +} + +// Modified entrypoint +parse + : statements* EOF + ; + +statements + : singleStatement + | standaloneExpression + | standalonePathSpecification + | standaloneType + | standaloneRowPattern SEMICOLON_? + | standaloneFunctionSpecification + ; + +singleStatement + : statement SEMICOLON_ + ; + +standaloneExpression + : expression SEMICOLON_ + ; + +standalonePathSpecification + : pathSpecification SEMICOLON_ + ; + +standaloneType + : type SEMICOLON_ + ; + +standaloneRowPattern + : rowPattern SEMICOLON_ + ; + +standaloneFunctionSpecification + : functionSpecification SEMICOLON_ + ; + +statement + : rootQuery # statementDefault + | USE_ schema = identifier # use + | USE_ catalog = identifier DOT_ schema = identifier # use + | CREATE_ CATALOG_ (IF_ NOT_ EXISTS_)? catalog = identifier USING_ connectorName = identifier ( + COMMENT_ string_ + )? (AUTHORIZATION_ principal)? (WITH_ properties)? # createCatalog + | DROP_ CATALOG_ (IF_ EXISTS_)? catalog = identifier (CASCADE_ | RESTRICT_)? # dropCatalog + | CREATE_ SCHEMA_ (IF_ NOT_ EXISTS_)? qualifiedName (AUTHORIZATION_ principal)? ( + WITH_ properties + )? # createSchema + | DROP_ SCHEMA_ (IF_ EXISTS_)? qualifiedName (CASCADE_ | RESTRICT_)? # dropSchema + | ALTER_ SCHEMA_ qualifiedName RENAME_ TO_ identifier # renameSchema + | ALTER_ SCHEMA_ qualifiedName SET_ AUTHORIZATION_ principal # setSchemaAuthorization + | CREATE_ (OR_ REPLACE_)? TABLE_ (IF_ NOT_ EXISTS_)? qualifiedName columnAliases? ( + COMMENT_ string_ + )? (WITH_ properties)? AS_ (rootQuery | LPAREN_ rootQuery RPAREN_) (WITH_ (NO_)? DATA_)? # createTableAsSelect + | CREATE_ (OR_ REPLACE_)? TABLE_ (IF_ NOT_ EXISTS_)? qualifiedName LPAREN_ tableElement ( + COMMA_ tableElement + )* RPAREN_ (COMMENT_ string_)? (WITH_ properties)? # createTable + | DROP_ TABLE_ (IF_ EXISTS_)? qualifiedName # dropTable + | INSERT_ INTO_ qualifiedName columnAliases? rootQuery # insertInto + | DELETE_ FROM_ qualifiedName (WHERE_ booleanExpression)? # delete + | TRUNCATE_ TABLE_ qualifiedName # truncateTable + | COMMENT_ ON_ TABLE_ qualifiedName IS_ (string_ | NULL_) # commentTable + | COMMENT_ ON_ VIEW_ qualifiedName IS_ (string_ | NULL_) # commentView + | COMMENT_ ON_ COLUMN_ qualifiedName IS_ (string_ | NULL_) # commentColumn + | ALTER_ TABLE_ (IF_ EXISTS_)? from = qualifiedName RENAME_ TO_ to = qualifiedName # renameTable + | ALTER_ TABLE_ (IF_ EXISTS_)? tableName = qualifiedName ADD_ COLUMN_ (IF_ NOT_ EXISTS_)? column = columnDefinition # addColumn + | ALTER_ TABLE_ (IF_ EXISTS_)? tableName = qualifiedName RENAME_ COLUMN_ (IF_ EXISTS_)? from = qualifiedName TO_ to = identifier # renameColumn + | ALTER_ TABLE_ (IF_ EXISTS_)? tableName = qualifiedName DROP_ COLUMN_ (IF_ EXISTS_)? column = qualifiedName # dropColumn + | ALTER_ TABLE_ (IF_ EXISTS_)? tableName = qualifiedName ALTER_ COLUMN_ columnName = qualifiedName SET_ DATA_ TYPE_ type # setColumnType + | ALTER_ TABLE_ tableName = qualifiedName SET_ AUTHORIZATION_ principal # setTableAuthorization + | ALTER_ TABLE_ tableName = qualifiedName SET_ PROPERTIES_ propertyAssignments # setTableProperties + | ALTER_ TABLE_ tableName = qualifiedName EXECUTE_ procedureName = identifier ( + LPAREN_ (callArgument (COMMA_ callArgument)*)? RPAREN_ + )? (WHERE_ where = booleanExpression)? # tableExecute + | ANALYZE_ qualifiedName (WITH_ properties)? # analyze + | CREATE_ (OR_ REPLACE_)? MATERIALIZED_ VIEW_ (IF_ NOT_ EXISTS_)? qualifiedName ( + GRACE_ PERIOD_ interval + )? (COMMENT_ string_)? (WITH_ properties)? AS_ rootQuery # createMaterializedView + | CREATE_ (OR_ REPLACE_)? VIEW_ qualifiedName (COMMENT_ string_)? ( + SECURITY_ (DEFINER_ | INVOKER_) + )? AS_ rootQuery # createView + | REFRESH_ MATERIALIZED_ VIEW_ qualifiedName # refreshMaterializedView + | DROP_ MATERIALIZED_ VIEW_ (IF_ EXISTS_)? qualifiedName # dropMaterializedView + | ALTER_ MATERIALIZED_ VIEW_ (IF_ EXISTS_)? from = qualifiedName RENAME_ TO_ to = qualifiedName # renameMaterializedView + | ALTER_ MATERIALIZED_ VIEW_ qualifiedName SET_ PROPERTIES_ propertyAssignments # setMaterializedViewProperties + | DROP_ VIEW_ (IF_ EXISTS_)? qualifiedName # dropView + | ALTER_ VIEW_ from = qualifiedName RENAME_ TO_ to = qualifiedName # renameView + | ALTER_ VIEW_ from = qualifiedName SET_ AUTHORIZATION_ principal # setViewAuthorization + | CALL_ qualifiedName LPAREN_ (callArgument (COMMA_ callArgument)*)? RPAREN_ # call + | CREATE_ (OR_ REPLACE_)? functionSpecification # createFunction + | DROP_ FUNCTION_ (IF_ EXISTS_)? functionDeclaration # dropFunction + | CREATE_ ROLE_ name = identifier (WITH_ ADMIN_ grantor)? (IN_ catalog = identifier)? # createRole + | DROP_ ROLE_ name = identifier (IN_ catalog = identifier)? # dropRole + | GRANT_ roles TO_ principal (COMMA_ principal)* (WITH_ ADMIN_ OPTION_)? (GRANTED_ BY_ grantor)? ( + IN_ catalog = identifier + )? # grantRoles + | REVOKE_ (ADMIN_ OPTION_ FOR_)? roles FROM_ principal (COMMA_ principal)* ( + GRANTED_ BY_ grantor + )? (IN_ catalog = identifier)? # revokeRoles + | SET_ ROLE_ (ALL_ | NONE_ | role = identifier) (IN_ catalog = identifier)? # setRole + | GRANT_ (privilege (COMMA_ privilege)* | ALL_ PRIVILEGES_) ON_ (SCHEMA_ | TABLE_)? qualifiedName TO_ grantee = principal ( + WITH_ GRANT_ OPTION_ + )? # grant + | DENY_ (privilege (COMMA_ privilege)* | ALL_ PRIVILEGES_) ON_ (SCHEMA_ | TABLE_)? qualifiedName TO_ grantee = principal # deny + | REVOKE_ (GRANT_ OPTION_ FOR_)? (privilege (COMMA_ privilege)* | ALL_ PRIVILEGES_) ON_ ( + SCHEMA_ + | TABLE_ + )? qualifiedName FROM_ grantee = principal # revoke + | SHOW_ GRANTS_ (ON_ TABLE_? qualifiedName)? # showGrants + | EXPLAIN_ (LPAREN_ explainOption (COMMA_ explainOption)* RPAREN_)? statement # explain + | EXPLAIN_ ANALYZE_ VERBOSE_? statement # explainAnalyze + | SHOW_ CREATE_ TABLE_ qualifiedName # showCreateTable + | SHOW_ CREATE_ SCHEMA_ qualifiedName # showCreateSchema + | SHOW_ CREATE_ VIEW_ qualifiedName # showCreateView + | SHOW_ CREATE_ MATERIALIZED_ VIEW_ qualifiedName # showCreateMaterializedView + | SHOW_ TABLES_ ((FROM_ | IN_) qualifiedName)? ( + LIKE_ pattern = string_ (ESCAPE_ escape = string_)? + )? # showTables + | SHOW_ SCHEMAS_ ((FROM_ | IN_) identifier)? ( + LIKE_ pattern = string_ (ESCAPE_ escape = string_)? + )? # showSchemas + | SHOW_ CATALOGS_ (LIKE_ pattern = string_ (ESCAPE_ escape = string_)?)? # showCatalogs + | SHOW_ COLUMNS_ (FROM_ | IN_) qualifiedName? ( + LIKE_ pattern = string_ (ESCAPE_ escape = string_)? + )? # showColumns + | SHOW_ STATS_ FOR_ qualifiedName # showStats + | SHOW_ STATS_ FOR_ LPAREN_ rootQuery RPAREN_ # showStatsForQuery + | SHOW_ CURRENT_? ROLES_ ((FROM_ | IN_) identifier)? # showRoles + | SHOW_ ROLE_ GRANTS_ ((FROM_ | IN_) identifier)? # showRoleGrants + | DESCRIBE_ qualifiedName # showColumns + | DESC_ qualifiedName # showColumns + | SHOW_ FUNCTIONS_ ((FROM_ | IN_) qualifiedName)? ( + LIKE_ pattern = string_ (ESCAPE_ escape = string_)? + )? # showFunctions + | SHOW_ SESSION_ (LIKE_ pattern = string_ (ESCAPE_ escape = string_)?)? # showSession + | SET_ SESSION_ AUTHORIZATION_ authorizationUser # setSessionAuthorization + | RESET_ SESSION_ AUTHORIZATION_ # resetSessionAuthorization + | SET_ SESSION_ qualifiedName EQ_ expression # setSession + | RESET_ SESSION_ qualifiedName # resetSession + | START_ TRANSACTION_ (transactionMode (COMMA_ transactionMode)*)? # startTransaction + | COMMIT_ WORK_? # commit + | ROLLBACK_ WORK_? # rollback + | PREPARE_ identifier FROM_ statement # prepare + | DEALLOCATE_ PREPARE_ identifier # deallocate + | EXECUTE_ identifier (USING_ expression (COMMA_ expression)*)? # execute + | EXECUTE_ IMMEDIATE_ string_ (USING_ expression (COMMA_ expression)*)? # executeImmediate + | DESCRIBE_ INPUT_ identifier # describeInput + | DESCRIBE_ OUTPUT_ identifier # describeOutput + | SET_ PATH_ pathSpecification # setPath + | SET_ TIME_ ZONE_ (LOCAL_ | expression) # setTimeZone + | UPDATE_ qualifiedName SET_ updateAssignment (COMMA_ updateAssignment)* ( + WHERE_ where = booleanExpression + )? # update + | MERGE_ INTO_ qualifiedName (AS_? identifier)? USING_ relation ON_ expression mergeCase+ # merge + ; + +rootQuery + : withFunction? query + ; + +withFunction + : WITH_ functionSpecification (COMMA_ functionSpecification)* + ; + +query + : with? queryNoWith + ; + +with + : WITH_ RECURSIVE_? namedQuery (COMMA_ namedQuery)* + ; + +tableElement + : columnDefinition + | likeClause + ; + +columnDefinition + : identifier type (NOT_ NULL_)? (COMMENT_ string_)? (WITH_ properties)? + ; + +likeClause + : LIKE_ qualifiedName (optionType = (INCLUDING_ | EXCLUDING_) PROPERTIES_)? + ; + +properties + : LPAREN_ propertyAssignments RPAREN_ + ; + +propertyAssignments + : property (COMMA_ property)* + ; + +property + : identifier EQ_ propertyValue + ; + +propertyValue + : DEFAULT_ # defaultPropertyValue + | expression # nonDefaultPropertyValue + ; + +queryNoWith + : queryTerm (ORDER_ BY_ sortItem (COMMA_ sortItem)*)? ( + OFFSET_ offset = rowCount (ROW_ | ROWS_)? + )? ( + LIMIT_ limit = limitRowCount + | FETCH_ (FIRST_ | NEXT_) (fetchFirst = rowCount)? (ROW_ | ROWS_) (ONLY_ | WITH_ TIES_) + )? + ; + +limitRowCount + : ALL_ + | rowCount + ; + +rowCount + : INTEGER_VALUE_ + | QUESTION_MARK_ + ; + +queryTerm + : queryPrimary # queryTermDefault + | left = queryTerm operator = INTERSECT_ setQuantifier? right = queryTerm # setOperation + | left = queryTerm operator = (UNION_ | EXCEPT_) setQuantifier? right = queryTerm # setOperation + ; + +queryPrimary + : querySpecification # queryPrimaryDefault + | TABLE_ qualifiedName # table + | VALUES_ expression (COMMA_ expression)* # inlineTable + | LPAREN_ queryNoWith RPAREN_ # subquery + ; + +sortItem + : expression ordering = (ASC_ | DESC_)? (NULLS_ nullOrdering = (FIRST_ | LAST_))? + ; + +querySpecification + : SELECT_ setQuantifier? selectItem (COMMA_ selectItem)* (FROM_ relation (COMMA_ relation)*)? ( + WHERE_ where = booleanExpression + )? (GROUP_ BY_ groupBy)? (HAVING_ having = booleanExpression)? ( + WINDOW_ windowDefinition (COMMA_ windowDefinition)* + )? + ; + +groupBy + : setQuantifier? groupingElement (COMMA_ groupingElement)* + ; + +groupingElement + : groupingSet # singleGroupingSet + | ROLLUP_ LPAREN_ (expression (COMMA_ expression)*)? RPAREN_ # rollup + | CUBE_ LPAREN_ (expression (COMMA_ expression)*)? RPAREN_ # cube + | GROUPING_ SETS_ LPAREN_ groupingSet (COMMA_ groupingSet)* RPAREN_ # multipleGroupingSets + ; + +groupingSet + : LPAREN_ (expression (COMMA_ expression)*)? RPAREN_ + | expression + ; + +windowDefinition + : name = identifier AS_ LPAREN_ windowSpecification RPAREN_ + ; + +windowSpecification + : (existingWindowName = identifier)? ( + PARTITION_ BY_ partition += expression (COMMA_ partition += expression)* + )? (ORDER_ BY_ sortItem (COMMA_ sortItem)*)? windowFrame? + ; + +namedQuery + : name = identifier (columnAliases)? AS_ LPAREN_ query RPAREN_ + ; + +setQuantifier + : DISTINCT_ + | ALL_ + ; + +selectItem + : expression as_column_alias? # selectSingle + | primaryExpression DOT_ ASTERISK_ (AS_ columnAliases)? # selectAll + | ASTERISK_ # selectAll + ; + +as_column_alias + : AS_? column_alias + ; + +column_alias + : identifier + ; + +relation + : left = relation ( + CROSS_ JOIN_ right = sampledRelation + | joinType JOIN_ rightRelation = relation joinCriteria + | NATURAL_ joinType JOIN_ right = sampledRelation + ) # joinRelation + | sampledRelation # relationDefault + ; + +joinType + : INNER_? + | (LEFT_ | RIGHT_ | FULL_) OUTER_? + ; + +joinCriteria + : ON_ booleanExpression + | USING_ LPAREN_ identifier (COMMA_ identifier)* RPAREN_ + ; + +sampledRelation + : patternRecognition (TABLESAMPLE_ sampleType LPAREN_ percentage = expression RPAREN_)? + ; + +sampleType + : BERNOULLI_ + | SYSTEM_ + ; + +trimsSpecification + : LEADING_ + | TRAILING_ + | BOTH_ + ; + +listAggOverflowBehavior + : ERROR_ + | TRUNCATE_ string_? listaggCountIndication + ; + +listaggCountIndication + : (WITH_ | WITHOUT_) COUNT_ + ; + +patternRecognition + : aliasedRelation ( + MATCH_RECOGNIZE_ LPAREN_ ( + PARTITION_ BY_ partition += expression (COMMA_ partition += expression)* + )? (ORDER_ BY_ sortItem (COMMA_ sortItem)*)? ( + MEASURES_ measureDefinition (COMMA_ measureDefinition)* + )? rowsPerMatch? (AFTER_ MATCH_ skipTo)? (INITIAL_ | SEEK_)? PATTERN_ LPAREN_ rowPattern RPAREN_ ( + SUBSET_ subsetDefinition (COMMA_ subsetDefinition)* + )? DEFINE_ variableDefinition (COMMA_ variableDefinition)* RPAREN_ ( + AS_? identifier columnAliases? + )? + )? + ; + +measureDefinition + : expression AS_ identifier + ; + +rowsPerMatch + : ONE_ ROW_ PER_ MATCH_ + | ALL_ ROWS_ PER_ MATCH_ emptyMatchHandling? + ; + +emptyMatchHandling + : SHOW_ EMPTY_ MATCHES_ + | OMIT_ EMPTY_ MATCHES_ + | WITH_ UNMATCHED_ ROWS_ + ; + +skipTo + : SKIP_ (TO_ (NEXT_ ROW_ | (FIRST_ | LAST_)? identifier) | PAST_ LAST_ ROW_) + ; + +subsetDefinition + : name = identifier EQ_ LPAREN_ union += identifier (COMMA_ union += identifier)* RPAREN_ + ; + +variableDefinition + : identifier AS_ expression + ; + +aliasedRelation + : relationPrimary (AS_? identifier columnAliases?)? + ; + +columnAliases + : LPAREN_ identifier (COMMA_ identifier)* RPAREN_ + ; + +relationPrimary + : qualifiedName queryPeriod? # tableName + | LPAREN_ query RPAREN_ # subqueryRelation + | UNNEST_ LPAREN_ expression (COMMA_ expression)* RPAREN_ (WITH_ ORDINALITY_)? # unnest + | LATERAL_ LPAREN_ query RPAREN_ # lateral + | TABLE_ LPAREN_ tableFunctionCall RPAREN_ # tableFunctionInvocation + | LPAREN_ relation RPAREN_ # parenthesizedRelation + ; + +tableFunctionCall + : qualifiedName LPAREN_ (tableFunctionArgument (COMMA_ tableFunctionArgument)*)? ( + COPARTITION_ copartitionTables (COMMA_ copartitionTables)* + )? RPAREN_ + ; + +tableFunctionArgument + : (identifier RDOUBLEARROW_)? ( + tableArgument + | descriptorArgument + | expression + ) // descriptor before expression to avoid parsing descriptor as a function call + ; + +tableArgument + : tableArgumentRelation ( + PARTITION_ BY_ (LPAREN_ (expression (COMMA_ expression)*)? RPAREN_ | expression) + )? (PRUNE_ WHEN_ EMPTY_ | KEEP_ WHEN_ EMPTY_)? ( + ORDER_ BY_ (LPAREN_ sortItem (COMMA_ sortItem)* RPAREN_ | sortItem) + )? + ; + +tableArgumentRelation + : TABLE_ LPAREN_ qualifiedName RPAREN_ (AS_? identifier columnAliases?)? # tableArgumentTable + | TABLE_ LPAREN_ query RPAREN_ (AS_? identifier columnAliases?)? # tableArgumentQuery + ; + +descriptorArgument + : DESCRIPTOR_ LPAREN_ descriptorField (COMMA_ descriptorField)* RPAREN_ + | CAST_ LPAREN_ NULL_ AS_ DESCRIPTOR_ RPAREN_ + ; + +descriptorField + : identifier type? + ; + +copartitionTables + : LPAREN_ qualifiedName COMMA_ qualifiedName (COMMA_ qualifiedName)* RPAREN_ + ; + +expression + : booleanExpression + ; + +booleanExpression + : valueExpression predicate_? # predicated + | NOT_ booleanExpression # logicalNot + | booleanExpression AND_ booleanExpression # and + | booleanExpression OR_ booleanExpression # or + ; + +// workaround for https://github.com/antlr/antlr4/issues/780 +predicate_ + : comparisonOperator right = valueExpression # comparison + | comparisonOperator comparisonQuantifier LPAREN_ query RPAREN_ # quantifiedComparison + | NOT_? BETWEEN_ lower = valueExpression AND_ upper = valueExpression # between + | NOT_? IN_ LPAREN_ expression (COMMA_ expression)* RPAREN_ # inList + | NOT_? IN_ LPAREN_ query RPAREN_ # inSubquery + | NOT_? LIKE_ pattern = valueExpression (ESCAPE_ escape = valueExpression)? # like + | IS_ NOT_? NULL_ # nullPredicate + | IS_ NOT_? DISTINCT_ FROM_ right = valueExpression # distinctFrom + ; + +valueExpression + : primaryExpression # valueExpressionDefault + | valueExpression AT_ timeZoneSpecifier # atTimeZone + | operator = (MINUS_ | PLUS_) valueExpression # arithmeticUnary + | left = valueExpression operator = (ASTERISK_ | SLASH_ | PERCENT_) right = valueExpression # arithmeticBinary + | left = valueExpression operator = (PLUS_ | MINUS_) right = valueExpression # arithmeticBinary + | left = valueExpression CONCAT_ right = valueExpression # concatenation + ; + +primaryExpression + : NULL_ # nullLiteral + | interval # intervalLiteral + | identifier string_ # typeConstructor + | DOUBLE_ PRECISION_ string_ # typeConstructor + | number # numericLiteral + | booleanValue # booleanLiteral + | string_ # stringLiteral + | BINARY_LITERAL_ # binaryLiteral + | QUESTION_MARK_ # parameter + | POSITION_ LPAREN_ valueExpression IN_ valueExpression RPAREN_ # position + | LPAREN_ expression (COMMA_ expression)+ RPAREN_ # rowConstructor + | ROW_ LPAREN_ expression (COMMA_ expression)* RPAREN_ # rowConstructor + | name = LISTAGG_ LPAREN_ setQuantifier? expression (COMMA_ string_)? ( + ON_ OVERFLOW_ listAggOverflowBehavior + )? RPAREN_ (WITHIN_ GROUP_ LPAREN_ ORDER_ BY_ sortItem (COMMA_ sortItem)* RPAREN_) filter? # listagg + | processingMode? qualifiedName LPAREN_ (label = identifier DOT_)? ASTERISK_ RPAREN_ filter? over? # functionCall + | processingMode? qualifiedName LPAREN_ (setQuantifier? expression (COMMA_ expression)*)? ( + ORDER_ BY_ sortItem (COMMA_ sortItem)* + )? RPAREN_ filter? (nullTreatment? over)? # functionCall + | identifier over # measure + | identifier RARROW_ expression # lambda + | LPAREN_ (identifier (COMMA_ identifier)*)? RPAREN_ RARROW_ expression # lambda + | LPAREN_ query RPAREN_ # subqueryExpression + // This is an extension to ANSI_ SQL, which considers EXISTS_ to be a + | EXISTS_ LPAREN_ query RPAREN_ # exists + | CASE_ operand = expression whenClause+ (ELSE_ elseExpression = expression)? END_ # simpleCase + | CASE_ whenClause+ (ELSE_ elseExpression = expression)? END_ # searchedCase + | CAST_ LPAREN_ expression AS_ type RPAREN_ # cast + | TRY_CAST_ LPAREN_ expression AS_ type RPAREN_ # cast + | ARRAY_ LSQUARE_ (expression (COMMA_ expression)*)? RSQUARE_ # arrayConstructor + | value = primaryExpression LSQUARE_ index = valueExpression RSQUARE_ # subscript + | identifier # columnReference + | base_ = primaryExpression DOT_ fieldName = identifier # dereference + | name = CURRENT_DATE_ # specialDateTimeFunction + | name = CURRENT_TIME_ (LPAREN_ precision = INTEGER_VALUE_ RPAREN_)? # specialDateTimeFunction + | name = CURRENT_TIMESTAMP_ (LPAREN_ precision = INTEGER_VALUE_ RPAREN_)? # specialDateTimeFunction + | name = LOCALTIME_ (LPAREN_ precision = INTEGER_VALUE_ RPAREN_)? # specialDateTimeFunction + | name = LOCALTIMESTAMP_ (LPAREN_ precision = INTEGER_VALUE_ RPAREN_)? # specialDateTimeFunction + | name = CURRENT_USER_ # currentUser + | name = CURRENT_CATALOG_ # currentCatalog + | name = CURRENT_SCHEMA_ # currentSchema + | name = CURRENT_PATH_ # currentPath + | TRIM_ LPAREN_ (trimsSpecification? trimChar = valueExpression? FROM_)? trimSource = valueExpression RPAREN_ # trim + | TRIM_ LPAREN_ trimSource = valueExpression COMMA_ trimChar = valueExpression RPAREN_ # trim + | SUBSTRING_ LPAREN_ valueExpression FROM_ valueExpression (FOR_ valueExpression)? RPAREN_ # substring + | NORMALIZE_ LPAREN_ valueExpression (COMMA_ normalForm)? RPAREN_ # normalize + | EXTRACT_ LPAREN_ identifier FROM_ valueExpression RPAREN_ # extract + | LPAREN_ expression RPAREN_ # parenthesizedExpression + | GROUPING_ LPAREN_ (qualifiedName (COMMA_ qualifiedName)*)? RPAREN_ # groupingOperation + | JSON_EXISTS_ LPAREN_ jsonPathInvocation (jsonExistsErrorBehavior ON_ ERROR_)? RPAREN_ # jsonExists + | JSON_VALUE_ LPAREN_ jsonPathInvocation (RETURNING_ type)? ( + emptyBehavior = jsonValueBehavior ON_ EMPTY_ + )? (errorBehavior = jsonValueBehavior ON_ ERROR_)? RPAREN_ # jsonValue + | JSON_QUERY_ LPAREN_ jsonPathInvocation (RETURNING_ type (FORMAT_ jsonRepresentation)?)? ( + jsonQueryWrapperBehavior WRAPPER_ + )? ((KEEP_ | OMIT_) QUOTES_ (ON_ SCALAR_ TEXT_STRING_)?)? ( + emptyBehavior = jsonQueryBehavior ON_ EMPTY_ + )? (errorBehavior = jsonQueryBehavior ON_ ERROR_)? RPAREN_ # jsonQuery + | JSON_OBJECT_ LPAREN_ ( + jsonObjectMember (COMMA_ jsonObjectMember)* (NULL_ ON_ NULL_ | ABSENT_ ON_ NULL_)? ( + WITH_ UNIQUE_ KEYS_? + | WITHOUT_ UNIQUE_ KEYS_? + )? + )? (RETURNING_ type (FORMAT_ jsonRepresentation)?)? RPAREN_ # jsonObject + | JSON_ARRAY_ LPAREN_ ( + jsonValueExpression (COMMA_ jsonValueExpression)* (NULL_ ON_ NULL_ | ABSENT_ ON_ NULL_)? + )? (RETURNING_ type (FORMAT_ jsonRepresentation)?)? RPAREN_ # jsonArray + ; + +jsonPathInvocation + : jsonValueExpression COMMA_ path = string_ (PASSING_ jsonArgument (COMMA_ jsonArgument)*)? + ; + +jsonValueExpression + : expression (FORMAT_ jsonRepresentation)? + ; + +jsonRepresentation + : JSON_ (ENCODING_ (UTF8_ | UTF16_ | UTF32_))? // TODO_ add implementation-defined JSON_ representation option + ; + +jsonArgument + : jsonValueExpression AS_ identifier + ; + +jsonExistsErrorBehavior + : TRUE_ + | FALSE_ + | UNKNOWN_ + | ERROR_ + ; + +jsonValueBehavior + : ERROR_ + | NULL_ + | DEFAULT_ expression + ; + +jsonQueryWrapperBehavior + : WITHOUT_ ARRAY_? + | WITH_ (CONDITIONAL_ | UNCONDITIONAL_)? ARRAY_? + ; + +jsonQueryBehavior + : ERROR_ + | NULL_ + | EMPTY_ (ARRAY_ | OBJECT_) + ; + +jsonObjectMember + : KEY_? expression VALUE_ jsonValueExpression + | expression COLON_ jsonValueExpression + ; + +processingMode + : RUNNING_ + | FINAL_ + ; + +nullTreatment + : IGNORE_ NULLS_ + | RESPECT_ NULLS_ + ; + +// renamed from "string" to avoid golang name conflict +string_ + : STRING_ # basicStringLiteral + | UNICODE_STRING_ (UESCAPE_ STRING_)? # unicodeStringLiteral + ; + +timeZoneSpecifier + : TIME_ ZONE_ interval # timeZoneInterval + | TIME_ ZONE_ string_ # timeZoneString + ; + +comparisonOperator + : EQ_ + | NEQ_ + | LT_ + | LTE_ + | GT_ + | GTE_ + ; + +comparisonQuantifier + : ALL_ + | SOME_ + | ANY_ + ; + +booleanValue + : TRUE_ + | FALSE_ + ; + +interval + : INTERVAL_ sign = (PLUS_ | MINUS_)? string_ from = intervalField (TO_ to = intervalField)? + ; + +intervalField + : YEAR_ + | MONTH_ + | DAY_ + | HOUR_ + | MINUTE_ + | SECOND_ + ; + +normalForm + : NFD_ + | NFC_ + | NFKD_ + | NFKC_ + ; + +type + : ROW_ LPAREN_ rowField (COMMA_ rowField)* RPAREN_ # rowType + | INTERVAL_ from = intervalField (TO_ to = intervalField)? # intervalType + | base_ = TIMESTAMP_ (LPAREN_ precision = typeParameter RPAREN_)? (WITHOUT_ TIME_ ZONE_)? # dateTimeType + | base_ = TIMESTAMP_ (LPAREN_ precision = typeParameter RPAREN_)? WITH_ TIME_ ZONE_ # dateTimeType + | base_ = TIME_ (LPAREN_ precision = typeParameter RPAREN_)? (WITHOUT_ TIME_ ZONE_)? # dateTimeType + | base_ = TIME_ (LPAREN_ precision = typeParameter RPAREN_)? WITH_ TIME_ ZONE_ # dateTimeType + | DOUBLE_ PRECISION_ # doublePrecisionType + | ARRAY_ LT_ type GT_ # legacyArrayType + | MAP_ LT_ keyType = type COMMA_ valueType = type GT_ # legacyMapType + | type ARRAY_ (LSQUARE_ INTEGER_VALUE_ RSQUARE_)? # arrayType + | identifier (LPAREN_ typeParameter (COMMA_ typeParameter)* RPAREN_)? # genericType + ; + +rowField + : type + | identifier type + ; + +typeParameter + : INTEGER_VALUE_ + | type + ; + +whenClause + : WHEN_ condition = expression THEN_ result = expression + ; + +filter + : FILTER_ LPAREN_ WHERE_ booleanExpression RPAREN_ + ; + +mergeCase + : WHEN_ MATCHED_ (AND_ condition = expression)? THEN_ UPDATE_ SET_ targets += identifier EQ_ values += expression ( + COMMA_ targets += identifier EQ_ values += expression + )* # mergeUpdate + | WHEN_ MATCHED_ (AND_ condition = expression)? THEN_ DELETE_ # mergeDelete + | WHEN_ NOT_ MATCHED_ (AND_ condition = expression)? THEN_ INSERT_ ( + LPAREN_ targets += identifier (COMMA_ targets += identifier)* RPAREN_ + )? VALUES_ LPAREN_ values += expression (COMMA_ values += expression)* RPAREN_ # mergeInsert + ; + +over + : OVER_ (windowName = identifier | LPAREN_ windowSpecification RPAREN_) + ; + +windowFrame + : (MEASURES_ measureDefinition (COMMA_ measureDefinition)*)? frameExtent (AFTER_ MATCH_ skipTo)? ( + INITIAL_ + | SEEK_ + )? (PATTERN_ LPAREN_ rowPattern RPAREN_)? (SUBSET_ subsetDefinition (COMMA_ subsetDefinition)*)? ( + DEFINE_ variableDefinition (COMMA_ variableDefinition)* + )? + ; + +// renamed start and stop to avoid Dart name conflict +frameExtent + : frameType = RANGE_ start_ = frameBound + | frameType = ROWS_ start_ = frameBound + | frameType = GROUPS_ start_ = frameBound + | frameType = RANGE_ BETWEEN_ start_ = frameBound AND_ end_ = frameBound + | frameType = ROWS_ BETWEEN_ start_ = frameBound AND_ end_ = frameBound + | frameType = GROUPS_ BETWEEN_ start_ = frameBound AND_ end_ = frameBound + ; + +frameBound + : UNBOUNDED_ boundType = PRECEDING_ # unboundedFrame + | UNBOUNDED_ boundType = FOLLOWING_ # unboundedFrame + | CURRENT_ ROW_ # currentRowBound + | expression boundType = (PRECEDING_ | FOLLOWING_) # boundedFrame + ; + +rowPattern + : patternPrimary patternQuantifier? # quantifiedPrimary + | rowPattern rowPattern # patternConcatenation + | rowPattern VBAR_ rowPattern # patternAlternation + ; + +patternPrimary + : identifier # patternVariable + | LPAREN_ RPAREN_ # emptyPattern + | PERMUTE_ LPAREN_ rowPattern (COMMA_ rowPattern)* RPAREN_ # patternPermutation + | LPAREN_ rowPattern RPAREN_ # groupedPattern + | CARET_ # partitionStartAnchor + | DOLLAR_ # partitionEndAnchor + | LCURLYHYPHEN_ rowPattern RCURLYHYPHEN_ # excludedPattern + ; + +patternQuantifier + : ASTERISK_ (reluctant = QUESTION_MARK_)? # zeroOrMoreQuantifier + | PLUS_ (reluctant = QUESTION_MARK_)? # oneOrMoreQuantifier + | QUESTION_MARK_ (reluctant = QUESTION_MARK_)? # zeroOrOneQuantifier + | LCURLY_ exactly = INTEGER_VALUE_ RCURLY_ (reluctant = QUESTION_MARK_)? # rangeQuantifier + | LCURLY_ (atLeast = INTEGER_VALUE_)? COMMA_ (atMost = INTEGER_VALUE_)? RCURLY_ ( + reluctant = QUESTION_MARK_ + )? # rangeQuantifier + ; + +updateAssignment + : identifier EQ_ expression + ; + +explainOption + : FORMAT_ value = (TEXT_ | GRAPHVIZ_ | JSON_) # explainFormat + | TYPE_ value = (LOGICAL_ | DISTRIBUTED_ | VALIDATE_ | IO_) # explainType + ; + +transactionMode + : ISOLATION_ LEVEL_ levelOfIsolation # isolationLevel + | READ_ accessMode = (ONLY_ | WRITE_) # transactionAccessMode + ; + +levelOfIsolation + : READ_ UNCOMMITTED_ # readUncommitted + | READ_ COMMITTED_ # readCommitted + | REPEATABLE_ READ_ # repeatableRead + | SERIALIZABLE_ # serializable + ; + +callArgument + : expression # positionalArgument + | identifier RDOUBLEARROW_ expression # namedArgument + ; + +pathElement + : identifier DOT_ identifier # qualifiedArgument + | identifier # unqualifiedArgument + ; + +pathSpecification + : pathElement (COMMA_ pathElement)* + ; + +functionSpecification + : FUNCTION_ functionDeclaration returnsClause routineCharacteristic* controlStatement + ; + +functionDeclaration + : qualifiedName LPAREN_ (parameterDeclaration (COMMA_ parameterDeclaration)*)? RPAREN_ + ; + +parameterDeclaration + : identifier? type + ; + +returnsClause + : RETURNS_ type + ; + +routineCharacteristic + : LANGUAGE_ identifier # languageCharacteristic + | NOT_? DETERMINISTIC_ # deterministicCharacteristic + | RETURNS_ NULL_ ON_ NULL_ INPUT_ # returnsNullOnNullInputCharacteristic + | CALLED_ ON_ NULL_ INPUT_ # calledOnNullInputCharacteristic + | SECURITY_ (DEFINER_ | INVOKER_) # securityCharacteristic + | COMMENT_ string_ # commentCharacteristic + ; + +controlStatement + : RETURN_ valueExpression # returnStatement + | SET_ identifier EQ_ expression # assignmentStatement + | CASE_ expression caseStatementWhenClause+ elseClause? END_ CASE_ # simpleCaseStatement + | CASE_ caseStatementWhenClause+ elseClause? END_ CASE_ # searchedCaseStatement + | IF_ expression THEN_ sqlStatementList elseIfClause* elseClause? END_ IF_ # ifStatement + | ITERATE_ identifier # iterateStatement + | LEAVE_ identifier # leaveStatement + | BEGIN_ (variableDeclaration SEMICOLON_)* sqlStatementList? END_ # compoundStatement + | (label = identifier COLON_)? LOOP_ sqlStatementList END_ LOOP_ # loopStatement + | (label = identifier COLON_)? WHILE_ expression DO_ sqlStatementList END_ WHILE_ # whileStatement + | (label = identifier COLON_)? REPEAT_ sqlStatementList UNTIL_ expression END_ REPEAT_ # repeatStatement + ; + +caseStatementWhenClause + : WHEN_ expression THEN_ sqlStatementList + ; + +elseIfClause + : ELSEIF_ expression THEN_ sqlStatementList + ; + +elseClause + : ELSE_ sqlStatementList + ; + +variableDeclaration + : DECLARE_ identifier (COMMA_ identifier)* type (DEFAULT_ valueExpression)? + ; + +sqlStatementList + : (controlStatement SEMICOLON_)+ + ; + +privilege + : CREATE_ + | SELECT_ + | DELETE_ + | INSERT_ + | UPDATE_ + ; + +qualifiedName + : identifier (DOT_ identifier)* + ; + +queryPeriod + : FOR_ rangeType AS_ OF_ end = valueExpression + ; + +rangeType + : TIMESTAMP_ + | VERSION_ + ; + +grantor + : principal # specifiedPrincipal + | CURRENT_USER_ # currentUserGrantor + | CURRENT_ROLE_ # currentRoleGrantor + ; + +principal + : identifier # unspecifiedPrincipal + | USER_ identifier # userPrincipal + | ROLE_ identifier # rolePrincipal + ; + +roles + : identifier (COMMA_ identifier)* + ; + +identifier + : IDENTIFIER_ # unquotedIdentifier + | QUOTED_IDENTIFIER_ # quotedIdentifier + | nonReserved # unquotedIdentifier + | BACKQUOTED_IDENTIFIER_ # backQuotedIdentifier + | DIGIT_IDENTIFIER_ # digitIdentifier + ; + +number + : MINUS_? DECIMAL_VALUE_ # decimalLiteral + | MINUS_? DOUBLE_VALUE_ # doubleLiteral + | MINUS_? INTEGER_VALUE_ # integerLiteral + ; + +authorizationUser + : identifier # identifierUser + | string_ # stringUser + ; + +nonReserved + // IMPORTANT: this rule must only contain tokens. Nested rules are not supported. See SqlParser.exitNonReserved + : ABSENT_ + | ADD_ + | ADMIN_ + | AFTER_ + | ALL_ + | ANALYZE_ + | ANY_ + | ARRAY_ + | ASC_ + | AT_ + | AUTHORIZATION_ + | BEGIN_ + | BERNOULLI_ + | BOTH_ + | CALL_ + | CALLED_ + | CASCADE_ + | CATALOG_ + | CATALOGS_ + | COLUMN_ + | COLUMNS_ + | COMMENT_ + | COMMIT_ + | COMMITTED_ + | CONDITIONAL_ + | COPARTITION_ + | COUNT_ + | CURRENT_ + | DATA_ + | DATE_ + | DAY_ + | DECLARE_ + | DEFAULT_ + | DEFINE_ + | DEFINER_ + | DENY_ + | DESC_ + | DESCRIPTOR_ + | DETERMINISTIC_ + | DISTRIBUTED_ + | DO_ + | DOUBLE_ + | ELSEIF_ + | EMPTY_ + | ENCODING_ + | ERROR_ + | EXCLUDING_ + | EXPLAIN_ + | FETCH_ + | FILTER_ + | FINAL_ + | FIRST_ + | FOLLOWING_ + | FORMAT_ + | FUNCTION_ + | FUNCTIONS_ + | GRACE_ + | GRANT_ + | GRANTED_ + | GRANTS_ + | GRAPHVIZ_ + | GROUPS_ + | HOUR_ + | IF_ + | IGNORE_ + | IMMEDIATE_ + | INCLUDING_ + | INITIAL_ + | INPUT_ + | INTERVAL_ + | INVOKER_ + | IO_ + | ITERATE_ + | ISOLATION_ + | JSON_ + | KEEP_ + | KEY_ + | KEYS_ + | LANGUAGE_ + | LAST_ + | LATERAL_ + | LEADING_ + | LEAVE_ + | LEVEL_ + | LIMIT_ + | LOCAL_ + | LOGICAL_ + | LOOP_ + | MAP_ + | MATCH_ + | MATCHED_ + | MATCHES_ + | MATCH_RECOGNIZE_ + | MATERIALIZED_ + | MEASURES_ + | MERGE_ + | MINUTE_ + | MONTH_ + | NESTED_ + | NEXT_ + | NFC_ + | NFD_ + | NFKC_ + | NFKD_ + | NO_ + | NONE_ + | NULLIF_ + | NULLS_ + | OBJECT_ + | OF_ + | OFFSET_ + | OMIT_ + | ONE_ + | ONLY_ + | OPTION_ + | ORDINALITY_ + | OUTPUT_ + | OVER_ + | OVERFLOW_ + | PARTITION_ + | PARTITIONS_ + | PASSING_ + | PAST_ + | PATH_ + | PATTERN_ + | PER_ + | PERIOD_ + | PERMUTE_ + | PLAN_ + | POSITION_ + | PRECEDING_ + | PRECISION_ + | PRIVILEGES_ + | PROPERTIES_ + | PRUNE_ + | QUOTES_ + | RANGE_ + | READ_ + | REFRESH_ + | RENAME_ + | REPEAT_ + | REPEATABLE_ + | REPLACE_ + | RESET_ + | RESPECT_ + | RESTRICT_ + | RETURN_ + | RETURNING_ + | RETURNS_ + | REVOKE_ + | ROLE_ + | ROLES_ + | ROLLBACK_ + | ROW_ + | ROWS_ + | RUNNING_ + | SCALAR_ + | SCHEMA_ + | SCHEMAS_ + | SECOND_ + | SECURITY_ + | SEEK_ + | SERIALIZABLE_ + | SESSION_ + | SET_ + | SETS_ + | SHOW_ + | SOME_ + | START_ + | STATS_ + | SUBSET_ + | SUBSTRING_ + | SYSTEM_ + | TABLES_ + | TABLESAMPLE_ + | TEXT_ + | TEXT_STRING_ + | TIES_ + | TIME_ + | TIMESTAMP_ + | TO_ + | TRAILING_ + | TRANSACTION_ + | TRUNCATE_ + | TRY_CAST_ + | TYPE_ + | UNBOUNDED_ + | UNCOMMITTED_ + | UNCONDITIONAL_ + | UNIQUE_ + | UNKNOWN_ + | UNMATCHED_ + | UNTIL_ + | UPDATE_ + | USE_ + | USER_ + | UTF16_ + | UTF32_ + | UTF8_ + | VALIDATE_ + | VALUE_ + | VERBOSE_ + | VERSION_ + | VIEW_ + | WHILE_ + | WINDOW_ + | WITHIN_ + | WITHOUT_ + | WORK_ + | WRAPPER_ + | WRITE_ + | YEAR_ + | ZONE_ + ; diff --git a/trino/examples/aggregation_filter.sql b/trino/examples/aggregation_filter.sql new file mode 100644 index 0000000..43b8b6d --- /dev/null +++ b/trino/examples/aggregation_filter.sql @@ -0,0 +1 @@ +SELECT SUM(x) FILTER (WHERE x > 4); diff --git a/trino/examples/aggregation_with_order_by.sql b/trino/examples/aggregation_with_order_by.sql new file mode 100644 index 0000000..6ce6987 --- /dev/null +++ b/trino/examples/aggregation_with_order_by.sql @@ -0,0 +1 @@ +SELECT array_agg(x ORDER BY t.y) FROM t; diff --git a/trino/examples/all_columns.sql b/trino/examples/all_columns.sql new file mode 100644 index 0000000..393f1a0 --- /dev/null +++ b/trino/examples/all_columns.sql @@ -0,0 +1,5 @@ +SELECT * FROM t; +SELECT r.* FROM t; +SELECT ROW (1, 'a', true).*; +SELECT ROW (1, 'a', true).* AS (f1, f2, f3); +SELECT a.id AS hello FROM t; diff --git a/trino/examples/alter_table_alter_column_set_data_type.sql b/trino/examples/alter_table_alter_column_set_data_type.sql new file mode 100644 index 0000000..a62d782 --- /dev/null +++ b/trino/examples/alter_table_alter_column_set_data_type.sql @@ -0,0 +1,3 @@ +ALTER TABLE foo.bar.baz +ALTER COLUMN col1 +SET DATA TYPE bigint; diff --git a/trino/examples/alter_table_set_authorization.sql b/trino/examples/alter_table_set_authorization.sql new file mode 100644 index 0000000..68c1599 --- /dev/null +++ b/trino/examples/alter_table_set_authorization.sql @@ -0,0 +1,3 @@ +ALTER TABLE foo.bar.baz SET AUTHORIZATION qux; +ALTER TABLE foo.bar.baz SET AUTHORIZATION USER qux; +ALTER TABLE foo.bar.baz SET AUTHORIZATION ROLE qux; diff --git a/trino/examples/alter_view_set_authorization.sql b/trino/examples/alter_view_set_authorization.sql new file mode 100644 index 0000000..c0170a6 --- /dev/null +++ b/trino/examples/alter_view_set_authorization.sql @@ -0,0 +1,3 @@ +ALTER VIEW foo.bar.baz SET AUTHORIZATION qux; +ALTER VIEW foo.bar.baz SET AUTHORIZATION USER qux; +ALTER VIEW foo.bar.baz SET AUTHORIZATION ROLE qux; diff --git a/trino/examples/analyze.sql b/trino/examples/analyze.sql new file mode 100644 index 0000000..bcf2926 --- /dev/null +++ b/trino/examples/analyze.sql @@ -0,0 +1,4 @@ +ANALYZE foo; +ANALYZE foo WITH ( "string" = 'bar', "long" = 42, computed = concat('ban', 'ana'), a = ARRAY[ 'v1', 'v2' ] ); +EXPLAIN ANALYZE foo; +EXPLAIN ANALYZE ANALYZE foo; diff --git a/trino/examples/at_time_zone.sql b/trino/examples/at_time_zone.sql new file mode 100644 index 0000000..4096ee8 --- /dev/null +++ b/trino/examples/at_time_zone.sql @@ -0,0 +1 @@ +SELECT timestamp '2012-10-31 01:00 UTC' AT TIME ZONE 'America/Los_Angeles'; diff --git a/trino/examples/call.sql b/trino/examples/call.sql new file mode 100644 index 0000000..740d462 --- /dev/null +++ b/trino/examples/call.sql @@ -0,0 +1,2 @@ +CALL foo(); +CALL foo(123, a => 1, b => 'go', 456); diff --git a/trino/examples/comment_column.sql b/trino/examples/comment_column.sql new file mode 100644 index 0000000..32e379e --- /dev/null +++ b/trino/examples/comment_column.sql @@ -0,0 +1,6 @@ +COMMENT ON COLUMN a.b IS 'test'; +COMMENT ON COLUMN a.b IS ''; +COMMENT ON COLUMN a.b IS NULL; +COMMENT ON COLUMN a IS 'test'; +COMMENT ON COLUMN a.b.c IS 'test'; +COMMENT ON COLUMN a.b.c.d IS 'test'; diff --git a/trino/examples/comment_table.sql b/trino/examples/comment_table.sql new file mode 100644 index 0000000..15ef50a --- /dev/null +++ b/trino/examples/comment_table.sql @@ -0,0 +1,3 @@ +COMMENT ON TABLE a IS 'test'; +COMMENT ON TABLE a IS ''; +COMMENT ON TABLE a IS NULL; diff --git a/trino/examples/comment_view.sql b/trino/examples/comment_view.sql new file mode 100644 index 0000000..c5c11c1 --- /dev/null +++ b/trino/examples/comment_view.sql @@ -0,0 +1,3 @@ +COMMENT ON VIEW a IS 'test'; +COMMENT ON VIEW a IS ''; +COMMENT ON VIEW a IS NULL; diff --git a/trino/examples/commit.sql b/trino/examples/commit.sql new file mode 100644 index 0000000..cbd3241 --- /dev/null +++ b/trino/examples/commit.sql @@ -0,0 +1,2 @@ +COMMIT; +COMMIT WORK; diff --git a/trino/examples/create_materialized_view.sql b/trino/examples/create_materialized_view.sql new file mode 100644 index 0000000..74eb864 --- /dev/null +++ b/trino/examples/create_materialized_view.sql @@ -0,0 +1,6 @@ +CREATE MATERIALIZED VIEW a AS SELECT * FROM t; +CREATE OR REPLACE MATERIALIZED VIEW catalog.schema.matview COMMENT 'A simple materialized view' AS SELECT * FROM catalog2.schema2.tab; +CREATE OR REPLACE MATERIALIZED VIEW catalog.schema.matview COMMENT 'A simple materialized view' AS SELECT * FROM catalog2.schema2.tab; +CREATE OR REPLACE MATERIALIZED VIEW catalog.schema.matview COMMENT 'A simple materialized view'WITH (partitioned_by = ARRAY ['dateint']) AS SELECT * FROM catalog2.schema2.tab; +CREATE OR REPLACE MATERIALIZED VIEW catalog.schema.matview COMMENT 'A partitioned materialized view' WITH (partitioned_by = ARRAY ['dateint']) AS WITH a (t, u) AS (SELECT * FROM x), b AS (SELECT * FROM a) TABLE b; +CREATE MATERIALIZED VIEW a GRACE PERIOD INTERVAL '2' DAY AS SELECT * FROM t; diff --git a/trino/examples/create_role.sql b/trino/examples/create_role.sql new file mode 100644 index 0000000..a26bbe2 --- /dev/null +++ b/trino/examples/create_role.sql @@ -0,0 +1,10 @@ +CREATE ROLE role; +CREATE ROLE role1 WITH ADMIN admin; +CREATE ROLE "role" WITH ADMIN "admin"; +CREATE ROLE "ro le" WITH ADMIN "ad min"; +CREATE ROLE "!@#$%^&*'" WITH ADMIN "ад""мін"; +CREATE ROLE role2 WITH ADMIN USER admin1; +CREATE ROLE role2 WITH ADMIN ROLE role1; +CREATE ROLE role2 WITH ADMIN CURRENT_USER; +CREATE ROLE role2 WITH ADMIN CURRENT_ROLE; +CREATE ROLE role IN my_catalog; diff --git a/trino/examples/create_schema.sql b/trino/examples/create_schema.sql new file mode 100644 index 0000000..d0639f4 --- /dev/null +++ b/trino/examples/create_schema.sql @@ -0,0 +1,4 @@ +CREATE SCHEMA test; +CREATE SCHEMA IF NOT EXISTS test; +CREATE SCHEMA test WITH (a = 'apple', b = 123); +CREATE SCHEMA "some name that contains space"; diff --git a/trino/examples/create_table.sql b/trino/examples/create_table.sql new file mode 100644 index 0000000..191dc6b --- /dev/null +++ b/trino/examples/create_table.sql @@ -0,0 +1,2 @@ +CREATE TABLE IF NOT EXISTS bar (LIKE like_table); +CREATE TABLE IF NOT EXISTS bar (LIKE like_table INCLUDING PROPERTIES); diff --git a/trino/examples/create_table_as_select.sql b/trino/examples/create_table_as_select.sql new file mode 100644 index 0000000..4903270 --- /dev/null +++ b/trino/examples/create_table_as_select.sql @@ -0,0 +1,19 @@ +CREATE TABLE foo AS SELECT * FROM t; +CREATE TABLE foo(x) AS SELECT a FROM t; +CREATE TABLE foo(x,y) AS SELECT a,b FROM t; +CREATE TABLE IF NOT EXISTS foo AS SELECT * FROM t; +CREATE TABLE IF NOT EXISTS foo(x) AS SELECT a FROM t; +CREATE TABLE IF NOT EXISTS foo(x,y) AS SELECT a,b FROM t; +CREATE TABLE foo AS SELECT * FROM t WITH NO DATA; +CREATE TABLE foo(x) AS SELECT a FROM t WITH NO DATA; +CREATE TABLE foo(x,y) AS SELECT a,b FROM t WITH NO DATA; +CREATE TABLE foo WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT * FROM t; +CREATE TABLE foo(x) WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT a FROM t; +CREATE TABLE foo(x,y) WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT a,b FROM t; +CREATE TABLE foo WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT * FROM t WITH NO DATA; +CREATE TABLE foo(x) WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT a FROM t WITH NO DATA; +CREATE TABLE foo(x,y) WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT a,b FROM t WITH NO DATA; +CREATE TABLE foo COMMENT 'test'WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT * FROM t WITH NO DATA; +CREATE TABLE foo(x) COMMENT 'test'WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT a FROM t WITH NO DATA; +CREATE TABLE foo(x,y) COMMENT 'test'WITH ( string = 'bar', long = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT a,b FROM t WITH NO DATA; +CREATE TABLE foo(x,y) COMMENT 'test'WITH ( "string" = 'bar', "long" = 42, computed = 'ban' || 'ana', a = ARRAY[ 'v1', 'v2' ] ) AS SELECT a,b FROM t WITH NO DATA; diff --git a/trino/examples/create_view.sql b/trino/examples/create_view.sql new file mode 100644 index 0000000..d0be3bf --- /dev/null +++ b/trino/examples/create_view.sql @@ -0,0 +1,11 @@ +CREATE VIEW a AS SELECT * FROM t; +CREATE OR REPLACE VIEW a AS SELECT * FROM t; +CREATE VIEW a SECURITY DEFINER AS SELECT * FROM t; +CREATE VIEW a SECURITY INVOKER AS SELECT * FROM t; +CREATE VIEW a COMMENT 'comment' SECURITY DEFINER AS SELECT * FROM t; +CREATE VIEW a COMMENT '' SECURITY INVOKER AS SELECT * FROM t; +CREATE VIEW a COMMENT 'comment' AS SELECT * FROM t; +CREATE VIEW a COMMENT '' AS SELECT * FROM t; +CREATE VIEW bar.foo AS SELECT * FROM t; +CREATE VIEW "awesome view" AS SELECT * FROM t; +CREATE VIEW "awesome schema"."awesome view" AS SELECT * FROM t; diff --git a/trino/examples/deallocate_prepare.sql b/trino/examples/deallocate_prepare.sql new file mode 100644 index 0000000..77b75ad --- /dev/null +++ b/trino/examples/deallocate_prepare.sql @@ -0,0 +1 @@ +DEALLOCATE PREPARE myquery; diff --git a/trino/examples/delete.sql b/trino/examples/delete.sql new file mode 100644 index 0000000..3f51069 --- /dev/null +++ b/trino/examples/delete.sql @@ -0,0 +1,3 @@ +DELETE FROM t; +DELETE FROM "awesome table"; +DELETE FROM t WHERE a = b; diff --git a/trino/examples/deny.sql b/trino/examples/deny.sql new file mode 100644 index 0000000..c905f7d --- /dev/null +++ b/trino/examples/deny.sql @@ -0,0 +1,4 @@ +DENY INSERT, DELETE ON t TO u; +DENY UPDATE ON t TO u; +DENY ALL PRIVILEGES ON TABLE t TO USER u; +DENY SELECT ON SCHEMA s TO USER u; diff --git a/trino/examples/describe_input.sql b/trino/examples/describe_input.sql new file mode 100644 index 0000000..4b0fae1 --- /dev/null +++ b/trino/examples/describe_input.sql @@ -0,0 +1 @@ +DESCRIBE INPUT myquery; diff --git a/trino/examples/describe_output.sql b/trino/examples/describe_output.sql new file mode 100644 index 0000000..98e0a80 --- /dev/null +++ b/trino/examples/describe_output.sql @@ -0,0 +1 @@ +DESCRIBE OUTPUT myquery; diff --git a/trino/examples/double_in_query.sql b/trino/examples/double_in_query.sql new file mode 100644 index 0000000..053a5be --- /dev/null +++ b/trino/examples/double_in_query.sql @@ -0,0 +1 @@ +SELECT 123.456E7 FROM DUAL; diff --git a/trino/examples/drop_column.sql b/trino/examples/drop_column.sql new file mode 100644 index 0000000..56fdb04 --- /dev/null +++ b/trino/examples/drop_column.sql @@ -0,0 +1,5 @@ +ALTER TABLE foo.t DROP COLUMN c; +ALTER TABLE "t x" DROP COLUMN "c d"; +ALTER TABLE IF EXISTS foo.t DROP COLUMN c; +ALTER TABLE foo.t DROP COLUMN IF EXISTS c; +ALTER TABLE IF EXISTS foo.t DROP COLUMN IF EXISTS c; diff --git a/trino/examples/drop_materialized_view.sql b/trino/examples/drop_materialized_view.sql new file mode 100644 index 0000000..d8a2db8 --- /dev/null +++ b/trino/examples/drop_materialized_view.sql @@ -0,0 +1,6 @@ +DROP MATERIALIZED VIEW a; +DROP MATERIALIZED VIEW a.b; +DROP MATERIALIZED VIEW a.b.c; +DROP MATERIALIZED VIEW IF EXISTS a; +DROP MATERIALIZED VIEW IF EXISTS a.b; +DROP MATERIALIZED VIEW IF EXISTS a.b.c; diff --git a/trino/examples/drop_role.sql b/trino/examples/drop_role.sql new file mode 100644 index 0000000..7f902e2 --- /dev/null +++ b/trino/examples/drop_role.sql @@ -0,0 +1,5 @@ +DROP ROLE role; +DROP ROLE "role"; +DROP ROLE "ro le"; +DROP ROLE "!@#$%^&*'ад""мін"; +DROP ROLE role IN my_catalog; diff --git a/trino/examples/drop_schema.sql b/trino/examples/drop_schema.sql new file mode 100644 index 0000000..95455bf --- /dev/null +++ b/trino/examples/drop_schema.sql @@ -0,0 +1,5 @@ +DROP SCHEMA test; +DROP SCHEMA test CASCADE; +DROP SCHEMA IF EXISTS test; +DROP SCHEMA IF EXISTS test RESTRICT; +DROP SCHEMA "some schema that contains space"; diff --git a/trino/examples/drop_table.sql b/trino/examples/drop_table.sql new file mode 100644 index 0000000..1d7ae21 --- /dev/null +++ b/trino/examples/drop_table.sql @@ -0,0 +1,8 @@ +DROP TABLE a; +DROP TABLE a.b; +DROP TABLE a.b.c; +DROP TABLE a."b/y".c; +DROP TABLE IF EXISTS a; +DROP TABLE IF EXISTS a.b; +DROP TABLE IF EXISTS a.b.c; +DROP TABLE IF EXISTS a."b/y".c; diff --git a/trino/examples/drop_view.sql b/trino/examples/drop_view.sql new file mode 100644 index 0000000..030e080 --- /dev/null +++ b/trino/examples/drop_view.sql @@ -0,0 +1,6 @@ +DROP VIEW a; +DROP VIEW a.b; +DROP VIEW a.b.c; +DROP VIEW IF EXISTS a; +DROP VIEW IF EXISTS a.b; +DROP VIEW IF EXISTS a.b.c; diff --git a/trino/examples/execute.sql b/trino/examples/execute.sql new file mode 100644 index 0000000..34f14f6 --- /dev/null +++ b/trino/examples/execute.sql @@ -0,0 +1 @@ +EXECUTE myquery; diff --git a/trino/examples/execute_with_using.sql b/trino/examples/execute_with_using.sql new file mode 100644 index 0000000..eecaa7e --- /dev/null +++ b/trino/examples/execute_with_using.sql @@ -0,0 +1 @@ +EXECUTE myquery USING 1, 'abc', ARRAY ['hello']; diff --git a/trino/examples/exists.sql b/trino/examples/exists.sql new file mode 100644 index 0000000..328a6a2 --- /dev/null +++ b/trino/examples/exists.sql @@ -0,0 +1,4 @@ +SELECT EXISTS(SELECT 1); +SELECT EXISTS(SELECT 1) = EXISTS(SELECT 2); +SELECT NOT EXISTS(SELECT 1) = EXISTS(SELECT 2); +SELECT (NOT EXISTS(SELECT 1)) = EXISTS(SELECT 2); diff --git a/trino/examples/explain.sql b/trino/examples/explain.sql new file mode 100644 index 0000000..233f48a --- /dev/null +++ b/trino/examples/explain.sql @@ -0,0 +1,3 @@ +EXPLAIN SELECT * FROM t; +EXPLAIN (TYPE LOGICAL) SELECT * FROM t; +EXPLAIN (TYPE LOGICAL, FORMAT TEXT) SELECT * FROM t; diff --git a/trino/examples/explain_analyze.sql b/trino/examples/explain_analyze.sql new file mode 100644 index 0000000..8f810cb --- /dev/null +++ b/trino/examples/explain_analyze.sql @@ -0,0 +1,2 @@ +EXPLAIN ANALYZE SELECT * FROM t; +EXPLAIN ANALYZE VERBOSE SELECT * FROM t; diff --git a/trino/examples/grant.sql b/trino/examples/grant.sql new file mode 100644 index 0000000..cdb7556 --- /dev/null +++ b/trino/examples/grant.sql @@ -0,0 +1,6 @@ +GRANT INSERT, DELETE ON t TO u; +GRANT UPDATE ON t TO u; +GRANT SELECT ON t TO ROLE PUBLIC WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON TABLE t TO USER u; +GRANT DELETE ON "t" TO ROLE "public" WITH GRANT OPTION; +GRANT SELECT ON SCHEMA s TO USER u; diff --git a/trino/examples/grant_roles.sql b/trino/examples/grant_roles.sql new file mode 100644 index 0000000..3bb895b --- /dev/null +++ b/trino/examples/grant_roles.sql @@ -0,0 +1,8 @@ +GRANT role1 TO user1; +GRANT role1, role2, role3 TO user1, USER user2, ROLE role4 WITH ADMIN OPTION; +GRANT role1 TO user1 WITH ADMIN OPTION GRANTED BY admin; +GRANT role1 TO USER user1 WITH ADMIN OPTION GRANTED BY USER admin; +GRANT role1 TO ROLE role2 WITH ADMIN OPTION GRANTED BY ROLE admin; +GRANT role1 TO ROLE role2 GRANTED BY ROLE admin; +GRANT "role1" TO ROLE "role2" GRANTED BY ROLE "admin"; +GRANT role1 TO user1 IN my_catalog; diff --git a/trino/examples/implicit_join.sql b/trino/examples/implicit_join.sql new file mode 100644 index 0000000..15b1923 --- /dev/null +++ b/trino/examples/implicit_join.sql @@ -0,0 +1 @@ +SELECT * FROM a, b; diff --git a/trino/examples/inline_routine.sql b/trino/examples/inline_routine.sql new file mode 100644 index 0000000..1eb6db5 --- /dev/null +++ b/trino/examples/inline_routine.sql @@ -0,0 +1,5 @@ +WITH + FUNCTION abc(x integer) + RETURNS integer + RETURN x * 2 +SELECT abc(21); \ No newline at end of file diff --git a/trino/examples/insert_into.sql b/trino/examples/insert_into.sql new file mode 100644 index 0000000..589ce71 --- /dev/null +++ b/trino/examples/insert_into.sql @@ -0,0 +1,2 @@ +INSERT INTO a."b/c".d SELECT * FROM t; +INSERT INTO a."b/c".d (c1, c2) SELECT * FROM t; diff --git a/trino/examples/intersect.sql b/trino/examples/intersect.sql new file mode 100644 index 0000000..c744b31 --- /dev/null +++ b/trino/examples/intersect.sql @@ -0,0 +1 @@ +SELECT 123 INTERSECT DISTINCT SELECT 123 INTERSECT ALL SELECT 123; diff --git a/trino/examples/join_precedence.sql b/trino/examples/join_precedence.sql new file mode 100644 index 0000000..17f32ce --- /dev/null +++ b/trino/examples/join_precedence.sql @@ -0,0 +1,2 @@ +SELECT * FROM a CROSS JOIN b LEFT JOIN c ON true; +SELECT * FROM a CROSS JOIN b NATURAL JOIN c CROSS JOIN d NATURAL JOIN e; diff --git a/trino/examples/lateral.sql b/trino/examples/lateral.sql new file mode 100644 index 0000000..99f1e69 --- /dev/null +++ b/trino/examples/lateral.sql @@ -0,0 +1,3 @@ +SELECT * FROM t, LATERAL (VALUES 1) a(x); +SELECT * FROM t CROSS JOIN LATERAL (VALUES 1) ; +SELECT * FROM t FULL JOIN LATERAL (VALUES 1) ON true; diff --git a/trino/examples/merge.sql b/trino/examples/merge.sql new file mode 100644 index 0000000..b4bbf60 --- /dev/null +++ b/trino/examples/merge.sql @@ -0,0 +1 @@ +MERGE INTO inventory AS i USING changes AS c ON i.part = c.part WHEN MATCHED AND c.action = 'mod' THEN UPDATE SET qty = qty + c.qty , ts = CURRENT_TIMESTAMP WHEN MATCHED AND c.action = 'del' THEN DELETE WHEN NOT MATCHED AND c.action = 'new' THEN INSERT (part, qty) VALUES (c.part, c.qty); diff --git a/trino/examples/non_reserved.sql b/trino/examples/non_reserved.sql new file mode 100644 index 0000000..d0d23a9 --- /dev/null +++ b/trino/examples/non_reserved.sql @@ -0,0 +1,3 @@ +SELECT zone FROM t; +SELECT INCLUDING, EXCLUDING, PROPERTIES FROM t; +SELECT ALL, SOME, ANY FROM t; diff --git a/trino/examples/prepare.sql b/trino/examples/prepare.sql new file mode 100644 index 0000000..912c5fe --- /dev/null +++ b/trino/examples/prepare.sql @@ -0,0 +1 @@ +PREPARE myquery FROM select * from foo; diff --git a/trino/examples/prepare_with_parameters.sql b/trino/examples/prepare_with_parameters.sql new file mode 100644 index 0000000..4b42f79 --- /dev/null +++ b/trino/examples/prepare_with_parameters.sql @@ -0,0 +1,8 @@ +PREPARE myquery FROM SELECT ?, ? FROM foo; +PREPARE myquery FROM SELECT * FROM foo LIMIT ?; +PREPARE myquery FROM SELECT ?, ? FROM foo LIMIT ?; +PREPARE myquery FROM SELECT ? FROM foo FETCH FIRST ? ROWS ONLY; +PREPARE myquery FROM SELECT ?, ? FROM foo FETCH NEXT ? ROWS WITH TIES; +PREPARE myquery FROM SELECT ?, ? FROM foo OFFSET ? ROWS; +PREPARE myquery FROM SELECT ? FROM foo OFFSET ? ROWS LIMIT ?; +PREPARE myquery FROM SELECT ? FROM foo OFFSET ? ROWS FETCH FIRST ? ROWS WITH TIES; diff --git a/trino/examples/refresh_materialized_view.sql b/trino/examples/refresh_materialized_view.sql new file mode 100644 index 0000000..903b3fd --- /dev/null +++ b/trino/examples/refresh_materialized_view.sql @@ -0,0 +1,2 @@ +REFRESH MATERIALIZED VIEW test; +REFRESH MATERIALIZED VIEW "some name that contains space"; diff --git a/trino/examples/rename_column.sql b/trino/examples/rename_column.sql new file mode 100644 index 0000000..34799ee --- /dev/null +++ b/trino/examples/rename_column.sql @@ -0,0 +1,4 @@ +ALTER TABLE foo.t RENAME COLUMN a TO b; +ALTER TABLE IF EXISTS foo.t RENAME COLUMN a TO b; +ALTER TABLE foo.t RENAME COLUMN IF EXISTS a TO b; +ALTER TABLE IF EXISTS foo.t RENAME COLUMN IF EXISTS a TO b; diff --git a/trino/examples/rename_materialized_view.sql b/trino/examples/rename_materialized_view.sql new file mode 100644 index 0000000..ab467e6 --- /dev/null +++ b/trino/examples/rename_materialized_view.sql @@ -0,0 +1,2 @@ +ALTER MATERIALIZED VIEW a RENAME TO b; +ALTER MATERIALIZED VIEW IF EXISTS a RENAME TO b; diff --git a/trino/examples/rename_schema.sql b/trino/examples/rename_schema.sql new file mode 100644 index 0000000..3474aa0 --- /dev/null +++ b/trino/examples/rename_schema.sql @@ -0,0 +1,3 @@ +ALTER SCHEMA foo RENAME TO bar; +ALTER SCHEMA foo.bar RENAME TO baz; +ALTER SCHEMA "awesome schema"."awesome table" RENAME TO "even more awesome table"; diff --git a/trino/examples/rename_table.sql b/trino/examples/rename_table.sql new file mode 100644 index 0000000..55a47ad --- /dev/null +++ b/trino/examples/rename_table.sql @@ -0,0 +1,2 @@ +ALTER TABLE a RENAME TO b; +ALTER TABLE IF EXISTS a RENAME TO b; diff --git a/trino/examples/rename_view.sql b/trino/examples/rename_view.sql new file mode 100644 index 0000000..087ed88 --- /dev/null +++ b/trino/examples/rename_view.sql @@ -0,0 +1 @@ +ALTER VIEW a RENAME TO b; diff --git a/trino/examples/reserved_word_identifier.sql b/trino/examples/reserved_word_identifier.sql new file mode 100644 index 0000000..743871f --- /dev/null +++ b/trino/examples/reserved_word_identifier.sql @@ -0,0 +1,3 @@ +SELECT id FROM public.orders; +SELECT id FROM "public"."order"; +SELECT id FROM "public"."order""2"; diff --git a/trino/examples/reset_session.sql b/trino/examples/reset_session.sql new file mode 100644 index 0000000..08ea7f2 --- /dev/null +++ b/trino/examples/reset_session.sql @@ -0,0 +1,3 @@ +RESET SESSION foo.bar; +RESET SESSION foo; +RESET SESSION AUTHORIZATION; diff --git a/trino/examples/revoke.sql b/trino/examples/revoke.sql new file mode 100644 index 0000000..7036b44 --- /dev/null +++ b/trino/examples/revoke.sql @@ -0,0 +1,6 @@ +REVOKE INSERT, DELETE ON t FROM u; +REVOKE UPDATE ON t FROM u; +REVOKE GRANT OPTION FOR SELECT ON t FROM ROLE PUBLIC; +REVOKE ALL PRIVILEGES ON TABLE t FROM USER u; +REVOKE DELETE ON TABLE "t" FROM "u"; +REVOKE SELECT ON SCHEMA s FROM USER u; diff --git a/trino/examples/revoke_roles.sql b/trino/examples/revoke_roles.sql new file mode 100644 index 0000000..f15ca8e --- /dev/null +++ b/trino/examples/revoke_roles.sql @@ -0,0 +1,7 @@ +REVOKE role1 FROM user1; +REVOKE ADMIN OPTION FOR role1, role2, role3 FROM user1, USER user2, ROLE role4; +REVOKE ADMIN OPTION FOR role1 FROM user1 GRANTED BY admin; +REVOKE ADMIN OPTION FOR role1 FROM USER user1 GRANTED BY USER admin; +REVOKE role1 FROM ROLE role2 GRANTED BY ROLE admin; +REVOKE "role1" FROM ROLE "role2" GRANTED BY ROLE "admin"; +REVOKE role1 FROM user1 IN my_catalog; diff --git a/trino/examples/rollback.sql b/trino/examples/rollback.sql new file mode 100644 index 0000000..b5337f5 --- /dev/null +++ b/trino/examples/rollback.sql @@ -0,0 +1,2 @@ +ROLLBACK; +ROLLBACK WORK; diff --git a/trino/examples/select_with_fetch.sql b/trino/examples/select_with_fetch.sql new file mode 100644 index 0000000..7e622f9 --- /dev/null +++ b/trino/examples/select_with_fetch.sql @@ -0,0 +1,6 @@ +SELECT * FROM table1 FETCH FIRST 2 ROWS ONLY; +SELECT * FROM table1 FETCH NEXT ROW ONLY; +SELECT * FROM (VALUES (1, '1'), (2, '2')) FETCH FIRST ROW ONLY; +SELECT * FROM (VALUES (1, '1'), (2, '2')) FETCH FIRST ROW WITH TIES; +SELECT * FROM table1 FETCH FIRST 2 ROWS WITH TIES; +SELECT * FROM table1 FETCH NEXT ROW WITH TIES; diff --git a/trino/examples/select_with_group_by.sql b/trino/examples/select_with_group_by.sql new file mode 100644 index 0000000..530c2a1 --- /dev/null +++ b/trino/examples/select_with_group_by.sql @@ -0,0 +1,7 @@ +SELECT * FROM table1 GROUP BY a; +SELECT * FROM table1 GROUP BY a, b; +SELECT * FROM table1 GROUP BY (); +SELECT * FROM table1 GROUP BY GROUPING SETS (a); +SELECT a, b, GROUPING(a, b) FROM table1 GROUP BY GROUPING SETS ((a), (b)); +SELECT * FROM table1 GROUP BY ALL GROUPING SETS ((a, b), (a), ()), CUBE (c), ROLLUP (d); +SELECT * FROM table1 GROUP BY DISTINCT GROUPING SETS ((a, b), (a), ()), CUBE (c), ROLLUP (d); diff --git a/trino/examples/select_with_limit.sql b/trino/examples/select_with_limit.sql new file mode 100644 index 0000000..7720d0c --- /dev/null +++ b/trino/examples/select_with_limit.sql @@ -0,0 +1,3 @@ +SELECT * FROM table1 LIMIT 2; +SELECT * FROM table1 LIMIT ALL; +SELECT * FROM (VALUES (1, '1'), (2, '2')) LIMIT ALL; diff --git a/trino/examples/select_with_offset.sql b/trino/examples/select_with_offset.sql new file mode 100644 index 0000000..9823f96 --- /dev/null +++ b/trino/examples/select_with_offset.sql @@ -0,0 +1,4 @@ +SELECT * FROM table1 OFFSET 2 ROWS; +SELECT * FROM table1 OFFSET 2; +SELECT * FROM (VALUES (1, '1'), (2, '2')) OFFSET 2 ROWS; +SELECT * FROM (VALUES (1, '1'), (2, '2')) OFFSET 2; diff --git a/trino/examples/select_with_order_by.sql b/trino/examples/select_with_order_by.sql new file mode 100644 index 0000000..dd669a3 --- /dev/null +++ b/trino/examples/select_with_order_by.sql @@ -0,0 +1 @@ +SELECT * FROM table1 ORDER BY a; diff --git a/trino/examples/select_with_row_type.sql b/trino/examples/select_with_row_type.sql new file mode 100644 index 0000000..069a5f4 --- /dev/null +++ b/trino/examples/select_with_row_type.sql @@ -0,0 +1,3 @@ +SELECT col1.f1, col2, col3.f1.f2.f3 FROM table1; +SELECT col1.f1[0], col2, col3[2].f2.f3, col4[4] FROM table1; +SELECT CAST(ROW(11, 12) AS ROW(COL0 INTEGER, COL1 INTEGER)).col0; diff --git a/trino/examples/session_identifiers.sql b/trino/examples/session_identifiers.sql new file mode 100644 index 0000000..952e5b7 --- /dev/null +++ b/trino/examples/session_identifiers.sql @@ -0,0 +1,2 @@ +SET SESSION "foo-bar".baz = 'x'; +RESET SESSION "foo-bar".baz; diff --git a/trino/examples/set_materialized_view_properties.sql b/trino/examples/set_materialized_view_properties.sql new file mode 100644 index 0000000..ccc9789 --- /dev/null +++ b/trino/examples/set_materialized_view_properties.sql @@ -0,0 +1 @@ +lead(x, 1) ignore nulls over(); diff --git a/trino/examples/set_path.sql b/trino/examples/set_path.sql new file mode 100644 index 0000000..83e78fb --- /dev/null +++ b/trino/examples/set_path.sql @@ -0,0 +1,2 @@ +SET PATH iLikeToEat.apples, andBananas; +SET PATH "schemas,with"."grammar.in", "their!names"; diff --git a/trino/examples/set_role.sql b/trino/examples/set_role.sql new file mode 100644 index 0000000..b898674 --- /dev/null +++ b/trino/examples/set_role.sql @@ -0,0 +1,5 @@ +SET ROLE ALL; +SET ROLE NONE; +SET ROLE role; +SET ROLE "role"; +SET ROLE role IN my_catalog; diff --git a/trino/examples/set_session.sql b/trino/examples/set_session.sql new file mode 100644 index 0000000..159d4b9 --- /dev/null +++ b/trino/examples/set_session.sql @@ -0,0 +1,4 @@ +SET SESSION foo = 'bar'; +SET SESSION foo.bar = 'baz'; +SET SESSION foo.bar.boo = 'baz'; +SET SESSION foo.bar = 'ban' || 'ana'; diff --git a/trino/examples/set_table_properties.sql b/trino/examples/set_table_properties.sql new file mode 100644 index 0000000..258d4a7 --- /dev/null +++ b/trino/examples/set_table_properties.sql @@ -0,0 +1,6 @@ +ALTER TABLE a SET PROPERTIES foo='bar'; +ALTER TABLE a SET PROPERTIES foo=true; +ALTER TABLE a SET PROPERTIES foo=123; +ALTER TABLE a SET PROPERTIES foo=123, bar=456; +ALTER TABLE a SET PROPERTIES " s p a c e "='bar'; +ALTER TABLE a SET PROPERTIES foo=123, bar=DEFAULT; diff --git a/trino/examples/show_catalogs.sql b/trino/examples/show_catalogs.sql new file mode 100644 index 0000000..5d10be3 --- /dev/null +++ b/trino/examples/show_catalogs.sql @@ -0,0 +1,3 @@ +SHOW CATALOGS; +SHOW CATALOGS LIKE '%'; +SHOW CATALOGS LIKE '%$_%' ESCAPE '$'; diff --git a/trino/examples/show_columns.sql b/trino/examples/show_columns.sql new file mode 100644 index 0000000..aa3f4a1 --- /dev/null +++ b/trino/examples/show_columns.sql @@ -0,0 +1,5 @@ +SHOW COLUMNS FROM a; +SHOW COLUMNS FROM a.b; +SHOW COLUMNS FROM "awesome table"; +SHOW COLUMNS FROM "awesome schema"."awesome table"; +SHOW COLUMNS FROM a.b LIKE '%$_%' ESCAPE '$'; diff --git a/trino/examples/show_functions.sql b/trino/examples/show_functions.sql new file mode 100644 index 0000000..56d2515 --- /dev/null +++ b/trino/examples/show_functions.sql @@ -0,0 +1,3 @@ +SHOW FUNCTIONS; +SHOW FUNCTIONS LIKE '%'; +SHOW FUNCTIONS LIKE '%' ESCAPE '$'; diff --git a/trino/examples/show_grants.sql b/trino/examples/show_grants.sql new file mode 100644 index 0000000..a79ccab --- /dev/null +++ b/trino/examples/show_grants.sql @@ -0,0 +1,3 @@ +SHOW GRANTS ON TABLE t; +SHOW GRANTS ON t; +SHOW GRANTS; diff --git a/trino/examples/show_role_grants.sql b/trino/examples/show_role_grants.sql new file mode 100644 index 0000000..78f29ac --- /dev/null +++ b/trino/examples/show_role_grants.sql @@ -0,0 +1,2 @@ +SHOW ROLE GRANTS; +SHOW ROLE GRANTS FROM catalog; diff --git a/trino/examples/show_roles.sql b/trino/examples/show_roles.sql new file mode 100644 index 0000000..41a9b09 --- /dev/null +++ b/trino/examples/show_roles.sql @@ -0,0 +1,6 @@ +SHOW ROLES; +SHOW ROLES FROM foo; +SHOW ROLES IN foo; +SHOW CURRENT ROLES; +SHOW CURRENT ROLES FROM foo; +SHOW CURRENT ROLES IN foo; diff --git a/trino/examples/show_schemas.sql b/trino/examples/show_schemas.sql new file mode 100644 index 0000000..d3abf0b --- /dev/null +++ b/trino/examples/show_schemas.sql @@ -0,0 +1,4 @@ +SHOW SCHEMAS; +SHOW SCHEMAS FROM foo; +SHOW SCHEMAS IN foo LIKE '%'; +SHOW SCHEMAS IN foo LIKE '%$_%' ESCAPE '$'; diff --git a/trino/examples/show_session.sql b/trino/examples/show_session.sql new file mode 100644 index 0000000..f24f628 --- /dev/null +++ b/trino/examples/show_session.sql @@ -0,0 +1,3 @@ +SHOW SESSION; +SHOW SESSION LIKE '%'; +SHOW SESSION LIKE '%' ESCAPE '$'; diff --git a/trino/examples/show_stats.sql b/trino/examples/show_stats.sql new file mode 100644 index 0000000..4c3cc1a --- /dev/null +++ b/trino/examples/show_stats.sql @@ -0,0 +1 @@ +SHOW STATS FOR a; diff --git a/trino/examples/show_stats_for_query.sql b/trino/examples/show_stats_for_query.sql new file mode 100644 index 0000000..33004e4 --- /dev/null +++ b/trino/examples/show_stats_for_query.sql @@ -0,0 +1,3 @@ +SHOW STATS FOR (SELECT * FROM a); +SHOW STATS FOR (SELECT * FROM a WHERE field > 0); +SHOW STATS FOR (SELECT * FROM a WHERE field > 0 or field < 0); diff --git a/trino/examples/show_tables.sql b/trino/examples/show_tables.sql new file mode 100644 index 0000000..ba0fef2 --- /dev/null +++ b/trino/examples/show_tables.sql @@ -0,0 +1,4 @@ +SHOW TABLES; +SHOW TABLES FROM a; +SHOW TABLES FROM "awesome schema"; +SHOW TABLES IN a LIKE '%$_%' ESCAPE '$'; diff --git a/trino/examples/start_transaction.sql b/trino/examples/start_transaction.sql new file mode 100644 index 0000000..42c61f7 --- /dev/null +++ b/trino/examples/start_transaction.sql @@ -0,0 +1,10 @@ +START TRANSACTION; +START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +START TRANSACTION ISOLATION LEVEL READ COMMITTED; +START TRANSACTION ISOLATION LEVEL REPEATABLE READ; +START TRANSACTION ISOLATION LEVEL SERIALIZABLE; +START TRANSACTION READ ONLY; +START TRANSACTION READ WRITE; +START TRANSACTION ISOLATION LEVEL READ COMMITTED, READ ONLY; +START TRANSACTION READ ONLY, ISOLATION LEVEL READ COMMITTED; +START TRANSACTION READ WRITE, ISOLATION LEVEL SERIALIZABLE; diff --git a/trino/examples/substring_built_in_function.sql b/trino/examples/substring_built_in_function.sql new file mode 100644 index 0000000..448b439 --- /dev/null +++ b/trino/examples/substring_built_in_function.sql @@ -0,0 +1,2 @@ +SELECT substring('string' FROM 2); +SELECT substring('string' FROM 2 FOR 3); diff --git a/trino/examples/substring_registered_function.sql b/trino/examples/substring_registered_function.sql new file mode 100644 index 0000000..c9eaeb3 --- /dev/null +++ b/trino/examples/substring_registered_function.sql @@ -0,0 +1,2 @@ +SELECT substring('string', 2); +SELECT substring('string', 2, 3); diff --git a/trino/examples/table_execute.sql b/trino/examples/table_execute.sql new file mode 100644 index 0000000..6bb4c89 --- /dev/null +++ b/trino/examples/table_execute.sql @@ -0,0 +1,3 @@ +ALTER TABLE foo EXECUTE bar; +ALTER TABLE foo EXECUTE bar(bah => 1, wuh => 'clap') WHERE age > 17; +ALTER TABLE foo EXECUTE bar(1, 'clap') WHERE age > 17; diff --git a/trino/examples/truncate_table.sql b/trino/examples/truncate_table.sql new file mode 100644 index 0000000..ca27e40 --- /dev/null +++ b/trino/examples/truncate_table.sql @@ -0,0 +1,3 @@ +TRUNCATE TABLE a; +TRUNCATE TABLE a.b; +TRUNCATE TABLE a.b.c; diff --git a/trino/examples/union.sql b/trino/examples/union.sql new file mode 100644 index 0000000..2d26663 --- /dev/null +++ b/trino/examples/union.sql @@ -0,0 +1 @@ +SELECT 123 UNION DISTINCT SELECT 123 UNION ALL SELECT 123; diff --git a/trino/examples/unnest.sql b/trino/examples/unnest.sql new file mode 100644 index 0000000..58af8ce --- /dev/null +++ b/trino/examples/unnest.sql @@ -0,0 +1,3 @@ +SELECT * FROM t CROSS JOIN UNNEST(a); +SELECT * FROM t CROSS JOIN UNNEST(a, b) WITH ORDINALITY; +SELECT * FROM t FULL JOIN UNNEST(a) AS tmp (c) ON true; diff --git a/trino/examples/update.sql b/trino/examples/update.sql new file mode 100644 index 0000000..dc32bfd --- /dev/null +++ b/trino/examples/update.sql @@ -0,0 +1 @@ +UPDATE foo_tablen SET bar = 23, baz = 3.1415E0, bletch = 'barf' WHERE (nothing = 'fun'); diff --git a/trino/examples/values.sql b/trino/examples/values.sql new file mode 100644 index 0000000..8618d5c --- /dev/null +++ b/trino/examples/values.sql @@ -0,0 +1,2 @@ +VALUES ('a', 1, 2.2e0), ('b', 2, 3.3e0); +SELECT * FROM (VALUES ('a', 1, 2.2e0), ('b', 2, 3.3e0)); diff --git a/trino/examples/whereless_update.sql b/trino/examples/whereless_update.sql new file mode 100644 index 0000000..9dbbeee --- /dev/null +++ b/trino/examples/whereless_update.sql @@ -0,0 +1 @@ +UPDATE foo_tablen SET bar = 23; diff --git a/trino/examples/window_clause.sql b/trino/examples/window_clause.sql new file mode 100644 index 0000000..9fb8dc9 --- /dev/null +++ b/trino/examples/window_clause.sql @@ -0,0 +1 @@ +SELECT * FROM T WINDOW someWindow AS (PARTITION BY a), otherWindow AS (someWindow ORDER BY b); diff --git a/trino/examples/with.sql b/trino/examples/with.sql new file mode 100644 index 0000000..4549361 --- /dev/null +++ b/trino/examples/with.sql @@ -0,0 +1,2 @@ +WITH a (t, u) AS (SELECT * FROM x), b AS (SELECT * FROM y) TABLE z; +WITH RECURSIVE a AS (SELECT * FROM x) TABLE y; diff --git a/trino/parser_test.go b/trino/parser_test.go new file mode 100644 index 0000000..966ed65 --- /dev/null +++ b/trino/parser_test.go @@ -0,0 +1,124 @@ +package trino_test + +import ( + "os" + "path" + "sort" + "strings" + "testing" + + "github.com/antlr4-go/antlr/v4" + trino "github.com/bytebase/parser/trino" + "github.com/stretchr/testify/require" +) + +type CustomErrorListener struct { + errors int +} + +func NewCustomErrorListener() *CustomErrorListener { + return new(CustomErrorListener) +} + +func (l *CustomErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException) { + l.errors += 1 + antlr.ConsoleErrorListenerINSTANCE.SyntaxError(recognizer, offendingSymbol, line, column, msg, e) +} + +func (l *CustomErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs *antlr.ATNConfigSet) { + antlr.ConsoleErrorListenerINSTANCE.ReportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) +} + +func (l *CustomErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs *antlr.ATNConfigSet) { + antlr.ConsoleErrorListenerINSTANCE.ReportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) +} + +func (l *CustomErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs *antlr.ATNConfigSet) { + antlr.ConsoleErrorListenerINSTANCE.ReportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) +} + +func TestTrinoParser(t *testing.T) { + testFilePaths := scanSQLFileInDirRecursive(t, "examples") + sort.StringSlice(testFilePaths).Sort() + + for _, fp := range testFilePaths { + t.Run(fp, func(t *testing.T) { + t.Parallel() + + input, err := antlr.NewFileStream(fp) + require.NoError(t, err) + + lexer := trino.NewTrinoLexer(input) + + stream := antlr.NewCommonTokenStream(lexer, 0) + p := trino.NewTrinoParser(stream) + + lexerErrors := &CustomErrorListener{} + lexer.RemoveErrorListeners() + lexer.AddErrorListener(lexerErrors) + + parserErrors := &CustomErrorListener{} + p.RemoveErrorListeners() + p.AddErrorListener(parserErrors) + + p.BuildParseTrees = true + + _ = p.Parse() + + require.Equal(t, 0, lexerErrors.errors, "file: %s", fp) + require.Equal(t, 0, parserErrors.errors, "file: %s", fp) + }) + } +} + +func TestBenchmarkTrinoParser(t *testing.T) { + testFilePaths := scanSQLFileInDirRecursive(t, "examples") + sort.StringSlice(testFilePaths).Sort() + + for _, fp := range testFilePaths { + t.Run(fp, func(t *testing.T) { + data, err := os.ReadFile(fp) + require.NoError(t, err) + + sql := string(data) + + input := antlr.NewInputStream(sql) + + lexer := trino.NewTrinoLexer(input) + stream := antlr.NewCommonTokenStream(lexer, 0) + p := trino.NewTrinoParser(stream) + + lexerErrors := &CustomErrorListener{} + lexer.RemoveErrorListeners() + lexer.AddErrorListener(lexerErrors) + + parserErrors := &CustomErrorListener{} + p.RemoveErrorListeners() + p.AddErrorListener(parserErrors) + + p.BuildParseTrees = false + _ = p.Parse() + + require.Equal(t, 0, lexerErrors.errors) + require.Equal(t, 0, parserErrors.errors) + }) + } +} + +func scanSQLFileInDirRecursive(t *testing.T, dir string) []string { + var fps []string + + files, err := os.ReadDir(dir) + require.NoError(t, err) + + for _, file := range files { + if file.IsDir() { + rfps := scanSQLFileInDirRecursive(t, path.Join(dir, file.Name())) + fps = append(fps, rfps...) + } else if strings.HasSuffix(strings.ToLower(file.Name()), ".sql") { + fps = append(fps, path.Join(dir, file.Name())) + } + } + + return fps +} \ No newline at end of file diff --git a/trino/trino_lexer.go b/trino/trino_lexer.go new file mode 100644 index 0000000..426f1c3 --- /dev/null +++ b/trino/trino_lexer.go @@ -0,0 +1,1982 @@ +// Code generated from TrinoLexer.g4 by ANTLR 4.13.2. DO NOT EDIT. + +package trino + +import ( + "fmt" + "github.com/antlr4-go/antlr/v4" + "sync" + "unicode" +) + +// Suppress unused import error +var _ = fmt.Printf +var _ = sync.Once{} +var _ = unicode.IsLetter + +type TrinoLexer struct { + *antlr.BaseLexer + channelNames []string + modeNames []string + // TODO: EOF string +} + +var TrinoLexerLexerStaticData struct { + once sync.Once + serializedATN []int32 + ChannelNames []string + ModeNames []string + LiteralNames []string + SymbolicNames []string + RuleNames []string + PredictionContextCache *antlr.PredictionContextCache + atn *antlr.ATN + decisionToDFA []*antlr.DFA +} + +func trinolexerLexerInit() { + staticData := &TrinoLexerLexerStaticData + staticData.ChannelNames = []string{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", + } + staticData.ModeNames = []string{ + "DEFAULT_MODE", + } + staticData.LiteralNames = []string{ + "", "'ABSENT'", "'ADD'", "'ADMIN'", "'AFTER'", "'ALL'", "'ALTER'", "'ANALYZE'", + "'AND'", "'ANY'", "'ARRAY'", "'AS'", "'ASC'", "'AT'", "'AUTHORIZATION'", + "'BEGIN'", "'BERNOULLI'", "'BETWEEN'", "'BOTH'", "'BY'", "'CALL'", "'CALLED'", + "'CASCADE'", "'CASE'", "'CAST'", "'CATALOG'", "'CATALOGS'", "'COLUMN'", + "'COLUMNS'", "'COMMENT'", "'COMMIT'", "'COMMITTED'", "'CONDITIONAL'", + "'CONSTRAINT'", "'COUNT'", "'COPARTITION'", "'CREATE'", "'CROSS'", "'CUBE'", + "'CURRENT'", "'CURRENT_CATALOG'", "'CURRENT_DATE'", "'CURRENT_PATH'", + "'CURRENT_ROLE'", "'CURRENT_SCHEMA'", "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", + "'CURRENT_USER'", "'DATA'", "'DATE'", "'DAY'", "'DEALLOCATE'", "'DECLARE'", + "'DEFAULT'", "'DEFINE'", "'DEFINER'", "'DELETE'", "'DENY'", "'DESC'", + "'DESCRIBE'", "'DESCRIPTOR'", "'DETERMINISTIC'", "'DISTINCT'", "'DISTRIBUTED'", + "'DO'", "'DOUBLE'", "'DROP'", "'ELSE'", "'EMPTY'", "'ELSEIF'", "'ENCODING'", + "'END'", "'ERROR'", "'ESCAPE'", "'EXCEPT'", "'EXCLUDING'", "'EXECUTE'", + "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", "'FALSE'", "'FETCH'", "'FILTER'", + "'FINAL'", "'FIRST'", "'FOLLOWING'", "'FOR'", "'FORMAT'", "'FROM'", + "'FULL'", "'FUNCTION'", "'FUNCTIONS'", "'GRACE'", "'GRANT'", "'GRANTED'", + "'GRANTS'", "'GRAPHVIZ'", "'GROUP'", "'GROUPING'", "'GROUPS'", "'HAVING'", + "'HOUR'", "'IF'", "'IGNORE'", "'IMMEDIATE'", "'IN'", "'INCLUDING'", + "'INITIAL'", "'INNER'", "'INPUT'", "'INSERT'", "'INTERSECT'", "'INTERVAL'", + "'INTO'", "'INVOKER'", "'IO'", "'IS'", "'ISOLATION'", "'ITERATE'", "'JOIN'", + "'JSON'", "'JSON_ARRAY'", "'JSON_EXISTS'", "'JSON_OBJECT'", "'JSON_QUERY'", + "'JSON_TABLE'", "'JSON_VALUE'", "'KEEP'", "'KEY'", "'KEYS'", "'LANGUAGE'", + "'LAST'", "'LATERAL'", "'LEADING'", "'LEAVE'", "'LEFT'", "'LEVEL'", + "'LIKE'", "'LIMIT'", "'LISTAGG'", "'LOCAL'", "'LOCALTIME'", "'LOCALTIMESTAMP'", + "'LOGICAL'", "'LOOP'", "'MAP'", "'MATCH'", "'MATCHED'", "'MATCHES'", + "'MATCH_RECOGNIZE'", "'MATERIALIZED'", "'MEASURES'", "'MERGE'", "'MINUTE'", + "'MONTH'", "'NATURAL'", "'NESTED'", "'NEXT'", "'NFC'", "'NFD'", "'NFKC'", + "'NFKD'", "'NO'", "'NONE'", "'NORMALIZE'", "'NOT'", "'NULL'", "'NULLIF'", + "'NULLS'", "'OBJECT'", "'OF'", "'OFFSET'", "'OMIT'", "'ON'", "'ONE'", + "'ONLY'", "'OPTION'", "'OR'", "'ORDER'", "'ORDINALITY'", "'OUTER'", + "'OUTPUT'", "'OVER'", "'OVERFLOW'", "'PARTITION'", "'PARTITIONS'", "'PASSING'", + "'PAST'", "'PATH'", "'PATTERN'", "'PER'", "'PERIOD'", "'PERMUTE'", "'PLAN'", + "'POSITION'", "'PRECEDING'", "'PRECISION'", "'PREPARE'", "'PRIVILEGES'", + "'PROPERTIES'", "'PRUNE'", "'QUOTES'", "'RANGE'", "'READ'", "'RECURSIVE'", + "'REFRESH'", "'RENAME'", "'REPEAT'", "'REPEATABLE'", "'REPLACE'", "'RESET'", + "'RESPECT'", "'RESTRICT'", "'RETURN'", "'RETURNING'", "'RETURNS'", "'REVOKE'", + "'RIGHT'", "'ROLE'", "'ROLES'", "'ROLLBACK'", "'ROLLUP'", "'ROW'", "'ROWS'", + "'RUNNING'", "'SCALAR'", "'SCHEMA'", "'SCHEMAS'", "'SECOND'", "'SECURITY'", + "'SEEK'", "'SELECT'", "'SERIALIZABLE'", "'SESSION'", "'SET'", "'SETS'", + "'SHOW'", "'SKIP'", "'SOME'", "'START'", "'STATS'", "'SUBSET'", "'SUBSTRING'", + "'SYSTEM'", "'TABLE'", "'TABLES'", "'TABLESAMPLE'", "'TEXT'", "'STRING'", + "'THEN'", "'TIES'", "'TIME'", "'TIMESTAMP'", "'TO'", "'TRAILING'", "'TRANSACTION'", + "'TRIM'", "'TRUE'", "'TRUNCATE'", "'TRY_CAST'", "'TYPE'", "'UESCAPE'", + "'UNBOUNDED'", "'UNCOMMITTED'", "'UNCONDITIONAL'", "'UNION'", "'UNIQUE'", + "'UNKNOWN'", "'UNMATCHED'", "'UNNEST'", "'UNTIL'", "'UPDATE'", "'USE'", + "'USER'", "'USING'", "'UTF16'", "'UTF32'", "'UTF8'", "'VALIDATE'", "'VALUE'", + "'VALUES'", "'VERBOSE'", "'VERSION'", "'VIEW'", "'WHEN'", "'WHERE'", + "'WHILE'", "'WINDOW'", "'WITH'", "'WITHIN'", "'WITHOUT'", "'WORK'", + "'WRAPPER'", "'WRITE'", "'YEAR'", "'ZONE'", "'='", "", "'<'", "'<='", + "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", "'%'", "'||'", "'?'", "';'", + "'.'", "'_:'", "','", "'('", "')'", "'['", "']'", "'{'", "'}'", "'{-'", + "'-}'", "'<-'", "'->'", "'=>'", "'|'", "'$'", "'^'", + } + staticData.SymbolicNames = []string{ + "", "ABSENT_", "ADD_", "ADMIN_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", + "AND_", "ANY_", "ARRAY_", "AS_", "ASC_", "AT_", "AUTHORIZATION_", "BEGIN_", + "BERNOULLI_", "BETWEEN_", "BOTH_", "BY_", "CALL_", "CALLED_", "CASCADE_", + "CASE_", "CAST_", "CATALOG_", "CATALOGS_", "COLUMN_", "COLUMNS_", "COMMENT_", + "COMMIT_", "COMMITTED_", "CONDITIONAL_", "CONSTRAINT_", "COUNT_", "COPARTITION_", + "CREATE_", "CROSS_", "CUBE_", "CURRENT_", "CURRENT_CATALOG_", "CURRENT_DATE_", + "CURRENT_PATH_", "CURRENT_ROLE_", "CURRENT_SCHEMA_", "CURRENT_TIME_", + "CURRENT_TIMESTAMP_", "CURRENT_USER_", "DATA_", "DATE_", "DAY_", "DEALLOCATE_", + "DECLARE_", "DEFAULT_", "DEFINE_", "DEFINER_", "DELETE_", "DENY_", "DESC_", + "DESCRIBE_", "DESCRIPTOR_", "DETERMINISTIC_", "DISTINCT_", "DISTRIBUTED_", + "DO_", "DOUBLE_", "DROP_", "ELSE_", "EMPTY_", "ELSEIF_", "ENCODING_", + "END_", "ERROR_", "ESCAPE_", "EXCEPT_", "EXCLUDING_", "EXECUTE_", "EXISTS_", + "EXPLAIN_", "EXTRACT_", "FALSE_", "FETCH_", "FILTER_", "FINAL_", "FIRST_", + "FOLLOWING_", "FOR_", "FORMAT_", "FROM_", "FULL_", "FUNCTION_", "FUNCTIONS_", + "GRACE_", "GRANT_", "GRANTED_", "GRANTS_", "GRAPHVIZ_", "GROUP_", "GROUPING_", + "GROUPS_", "HAVING_", "HOUR_", "IF_", "IGNORE_", "IMMEDIATE_", "IN_", + "INCLUDING_", "INITIAL_", "INNER_", "INPUT_", "INSERT_", "INTERSECT_", + "INTERVAL_", "INTO_", "INVOKER_", "IO_", "IS_", "ISOLATION_", "ITERATE_", + "JOIN_", "JSON_", "JSON_ARRAY_", "JSON_EXISTS_", "JSON_OBJECT_", "JSON_QUERY_", + "JSON_TABLE_", "JSON_VALUE_", "KEEP_", "KEY_", "KEYS_", "LANGUAGE_", + "LAST_", "LATERAL_", "LEADING_", "LEAVE_", "LEFT_", "LEVEL_", "LIKE_", + "LIMIT_", "LISTAGG_", "LOCAL_", "LOCALTIME_", "LOCALTIMESTAMP_", "LOGICAL_", + "LOOP_", "MAP_", "MATCH_", "MATCHED_", "MATCHES_", "MATCH_RECOGNIZE_", + "MATERIALIZED_", "MEASURES_", "MERGE_", "MINUTE_", "MONTH_", "NATURAL_", + "NESTED_", "NEXT_", "NFC_", "NFD_", "NFKC_", "NFKD_", "NO_", "NONE_", + "NORMALIZE_", "NOT_", "NULL_", "NULLIF_", "NULLS_", "OBJECT_", "OF_", + "OFFSET_", "OMIT_", "ON_", "ONE_", "ONLY_", "OPTION_", "OR_", "ORDER_", + "ORDINALITY_", "OUTER_", "OUTPUT_", "OVER_", "OVERFLOW_", "PARTITION_", + "PARTITIONS_", "PASSING_", "PAST_", "PATH_", "PATTERN_", "PER_", "PERIOD_", + "PERMUTE_", "PLAN_", "POSITION_", "PRECEDING_", "PRECISION_", "PREPARE_", + "PRIVILEGES_", "PROPERTIES_", "PRUNE_", "QUOTES_", "RANGE_", "READ_", + "RECURSIVE_", "REFRESH_", "RENAME_", "REPEAT_", "REPEATABLE_", "REPLACE_", + "RESET_", "RESPECT_", "RESTRICT_", "RETURN_", "RETURNING_", "RETURNS_", + "REVOKE_", "RIGHT_", "ROLE_", "ROLES_", "ROLLBACK_", "ROLLUP_", "ROW_", + "ROWS_", "RUNNING_", "SCALAR_", "SCHEMA_", "SCHEMAS_", "SECOND_", "SECURITY_", + "SEEK_", "SELECT_", "SERIALIZABLE_", "SESSION_", "SET_", "SETS_", "SHOW_", + "SKIP_", "SOME_", "START_", "STATS_", "SUBSET_", "SUBSTRING_", "SYSTEM_", + "TABLE_", "TABLES_", "TABLESAMPLE_", "TEXT_", "TEXT_STRING_", "THEN_", + "TIES_", "TIME_", "TIMESTAMP_", "TO_", "TRAILING_", "TRANSACTION_", + "TRIM_", "TRUE_", "TRUNCATE_", "TRY_CAST_", "TYPE_", "UESCAPE_", "UNBOUNDED_", + "UNCOMMITTED_", "UNCONDITIONAL_", "UNION_", "UNIQUE_", "UNKNOWN_", "UNMATCHED_", + "UNNEST_", "UNTIL_", "UPDATE_", "USE_", "USER_", "USING_", "UTF16_", + "UTF32_", "UTF8_", "VALIDATE_", "VALUE_", "VALUES_", "VERBOSE_", "VERSION_", + "VIEW_", "WHEN_", "WHERE_", "WHILE_", "WINDOW_", "WITH_", "WITHIN_", + "WITHOUT_", "WORK_", "WRAPPER_", "WRITE_", "YEAR_", "ZONE_", "EQ_", + "NEQ_", "LT_", "LTE_", "GT_", "GTE_", "PLUS_", "MINUS_", "ASTERISK_", + "SLASH_", "PERCENT_", "CONCAT_", "QUESTION_MARK_", "SEMICOLON_", "DOT_", + "COLON_", "COMMA_", "LPAREN_", "RPAREN_", "LSQUARE_", "RSQUARE_", "LCURLY_", + "RCURLY_", "LCURLYHYPHEN_", "RCURLYHYPHEN_", "LARROW_", "RARROW_", "RDOUBLEARROW_", + "VBAR_", "DOLLAR_", "CARET_", "STRING_", "UNICODE_STRING_", "BINARY_LITERAL_", + "INTEGER_VALUE_", "DECIMAL_VALUE_", "DOUBLE_VALUE_", "IDENTIFIER_", + "DIGIT_IDENTIFIER_", "QUOTED_IDENTIFIER_", "BACKQUOTED_IDENTIFIER_", + "SIMPLE_COMMENT_", "BRACKETED_COMMENT_", "WS_", "UNRECOGNIZED_", + } + staticData.RuleNames = []string{ + "ABSENT_", "ADD_", "ADMIN_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", + "AND_", "ANY_", "ARRAY_", "AS_", "ASC_", "AT_", "AUTHORIZATION_", "BEGIN_", + "BERNOULLI_", "BETWEEN_", "BOTH_", "BY_", "CALL_", "CALLED_", "CASCADE_", + "CASE_", "CAST_", "CATALOG_", "CATALOGS_", "COLUMN_", "COLUMNS_", "COMMENT_", + "COMMIT_", "COMMITTED_", "CONDITIONAL_", "CONSTRAINT_", "COUNT_", "COPARTITION_", + "CREATE_", "CROSS_", "CUBE_", "CURRENT_", "CURRENT_CATALOG_", "CURRENT_DATE_", + "CURRENT_PATH_", "CURRENT_ROLE_", "CURRENT_SCHEMA_", "CURRENT_TIME_", + "CURRENT_TIMESTAMP_", "CURRENT_USER_", "DATA_", "DATE_", "DAY_", "DEALLOCATE_", + "DECLARE_", "DEFAULT_", "DEFINE_", "DEFINER_", "DELETE_", "DENY_", "DESC_", + "DESCRIBE_", "DESCRIPTOR_", "DETERMINISTIC_", "DISTINCT_", "DISTRIBUTED_", + "DO_", "DOUBLE_", "DROP_", "ELSE_", "EMPTY_", "ELSEIF_", "ENCODING_", + "END_", "ERROR_", "ESCAPE_", "EXCEPT_", "EXCLUDING_", "EXECUTE_", "EXISTS_", + "EXPLAIN_", "EXTRACT_", "FALSE_", "FETCH_", "FILTER_", "FINAL_", "FIRST_", + "FOLLOWING_", "FOR_", "FORMAT_", "FROM_", "FULL_", "FUNCTION_", "FUNCTIONS_", + "GRACE_", "GRANT_", "GRANTED_", "GRANTS_", "GRAPHVIZ_", "GROUP_", "GROUPING_", + "GROUPS_", "HAVING_", "HOUR_", "IF_", "IGNORE_", "IMMEDIATE_", "IN_", + "INCLUDING_", "INITIAL_", "INNER_", "INPUT_", "INSERT_", "INTERSECT_", + "INTERVAL_", "INTO_", "INVOKER_", "IO_", "IS_", "ISOLATION_", "ITERATE_", + "JOIN_", "JSON_", "JSON_ARRAY_", "JSON_EXISTS_", "JSON_OBJECT_", "JSON_QUERY_", + "JSON_TABLE_", "JSON_VALUE_", "KEEP_", "KEY_", "KEYS_", "LANGUAGE_", + "LAST_", "LATERAL_", "LEADING_", "LEAVE_", "LEFT_", "LEVEL_", "LIKE_", + "LIMIT_", "LISTAGG_", "LOCAL_", "LOCALTIME_", "LOCALTIMESTAMP_", "LOGICAL_", + "LOOP_", "MAP_", "MATCH_", "MATCHED_", "MATCHES_", "MATCH_RECOGNIZE_", + "MATERIALIZED_", "MEASURES_", "MERGE_", "MINUTE_", "MONTH_", "NATURAL_", + "NESTED_", "NEXT_", "NFC_", "NFD_", "NFKC_", "NFKD_", "NO_", "NONE_", + "NORMALIZE_", "NOT_", "NULL_", "NULLIF_", "NULLS_", "OBJECT_", "OF_", + "OFFSET_", "OMIT_", "ON_", "ONE_", "ONLY_", "OPTION_", "OR_", "ORDER_", + "ORDINALITY_", "OUTER_", "OUTPUT_", "OVER_", "OVERFLOW_", "PARTITION_", + "PARTITIONS_", "PASSING_", "PAST_", "PATH_", "PATTERN_", "PER_", "PERIOD_", + "PERMUTE_", "PLAN_", "POSITION_", "PRECEDING_", "PRECISION_", "PREPARE_", + "PRIVILEGES_", "PROPERTIES_", "PRUNE_", "QUOTES_", "RANGE_", "READ_", + "RECURSIVE_", "REFRESH_", "RENAME_", "REPEAT_", "REPEATABLE_", "REPLACE_", + "RESET_", "RESPECT_", "RESTRICT_", "RETURN_", "RETURNING_", "RETURNS_", + "REVOKE_", "RIGHT_", "ROLE_", "ROLES_", "ROLLBACK_", "ROLLUP_", "ROW_", + "ROWS_", "RUNNING_", "SCALAR_", "SCHEMA_", "SCHEMAS_", "SECOND_", "SECURITY_", + "SEEK_", "SELECT_", "SERIALIZABLE_", "SESSION_", "SET_", "SETS_", "SHOW_", + "SKIP_", "SOME_", "START_", "STATS_", "SUBSET_", "SUBSTRING_", "SYSTEM_", + "TABLE_", "TABLES_", "TABLESAMPLE_", "TEXT_", "TEXT_STRING_", "THEN_", + "TIES_", "TIME_", "TIMESTAMP_", "TO_", "TRAILING_", "TRANSACTION_", + "TRIM_", "TRUE_", "TRUNCATE_", "TRY_CAST_", "TYPE_", "UESCAPE_", "UNBOUNDED_", + "UNCOMMITTED_", "UNCONDITIONAL_", "UNION_", "UNIQUE_", "UNKNOWN_", "UNMATCHED_", + "UNNEST_", "UNTIL_", "UPDATE_", "USE_", "USER_", "USING_", "UTF16_", + "UTF32_", "UTF8_", "VALIDATE_", "VALUE_", "VALUES_", "VERBOSE_", "VERSION_", + "VIEW_", "WHEN_", "WHERE_", "WHILE_", "WINDOW_", "WITH_", "WITHIN_", + "WITHOUT_", "WORK_", "WRAPPER_", "WRITE_", "YEAR_", "ZONE_", "EQ_", + "NEQ_", "LT_", "LTE_", "GT_", "GTE_", "PLUS_", "MINUS_", "ASTERISK_", + "SLASH_", "PERCENT_", "CONCAT_", "QUESTION_MARK_", "SEMICOLON_", "DOT_", + "COLON_", "COMMA_", "LPAREN_", "RPAREN_", "LSQUARE_", "RSQUARE_", "LCURLY_", + "RCURLY_", "LCURLYHYPHEN_", "RCURLYHYPHEN_", "LARROW_", "RARROW_", "RDOUBLEARROW_", + "VBAR_", "DOLLAR_", "CARET_", "STRING_", "UNICODE_STRING_", "BINARY_LITERAL_", + "INTEGER_VALUE_", "DECIMAL_VALUE_", "DOUBLE_VALUE_", "IDENTIFIER_", + "DIGIT_IDENTIFIER_", "QUOTED_IDENTIFIER_", "BACKQUOTED_IDENTIFIER_", + "EXPONENT_", "DIGIT_", "LETTER_", "SIMPLE_COMMENT_", "BRACKETED_COMMENT_", + "WS_", "UNRECOGNIZED_", + } + staticData.PredictionContextCache = antlr.NewPredictionContextCache() + staticData.serializedATN = []int32{ + 4, 0, 340, 3079, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, + 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, + 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, + 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, + 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, + 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, + 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, + 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, + 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, + 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, + 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, + 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, + 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, + 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, + 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, + 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, + 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, + 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, + 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, + 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, + 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, + 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, + 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, + 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, + 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, + 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, + 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, + 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, + 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, + 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, + 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, + 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, + 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, + 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, + 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, + 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, + 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, + 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, + 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, + 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, + 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, + 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, + 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, + 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, + 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, + 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, + 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 2, 225, + 7, 225, 2, 226, 7, 226, 2, 227, 7, 227, 2, 228, 7, 228, 2, 229, 7, 229, + 2, 230, 7, 230, 2, 231, 7, 231, 2, 232, 7, 232, 2, 233, 7, 233, 2, 234, + 7, 234, 2, 235, 7, 235, 2, 236, 7, 236, 2, 237, 7, 237, 2, 238, 7, 238, + 2, 239, 7, 239, 2, 240, 7, 240, 2, 241, 7, 241, 2, 242, 7, 242, 2, 243, + 7, 243, 2, 244, 7, 244, 2, 245, 7, 245, 2, 246, 7, 246, 2, 247, 7, 247, + 2, 248, 7, 248, 2, 249, 7, 249, 2, 250, 7, 250, 2, 251, 7, 251, 2, 252, + 7, 252, 2, 253, 7, 253, 2, 254, 7, 254, 2, 255, 7, 255, 2, 256, 7, 256, + 2, 257, 7, 257, 2, 258, 7, 258, 2, 259, 7, 259, 2, 260, 7, 260, 2, 261, + 7, 261, 2, 262, 7, 262, 2, 263, 7, 263, 2, 264, 7, 264, 2, 265, 7, 265, + 2, 266, 7, 266, 2, 267, 7, 267, 2, 268, 7, 268, 2, 269, 7, 269, 2, 270, + 7, 270, 2, 271, 7, 271, 2, 272, 7, 272, 2, 273, 7, 273, 2, 274, 7, 274, + 2, 275, 7, 275, 2, 276, 7, 276, 2, 277, 7, 277, 2, 278, 7, 278, 2, 279, + 7, 279, 2, 280, 7, 280, 2, 281, 7, 281, 2, 282, 7, 282, 2, 283, 7, 283, + 2, 284, 7, 284, 2, 285, 7, 285, 2, 286, 7, 286, 2, 287, 7, 287, 2, 288, + 7, 288, 2, 289, 7, 289, 2, 290, 7, 290, 2, 291, 7, 291, 2, 292, 7, 292, + 2, 293, 7, 293, 2, 294, 7, 294, 2, 295, 7, 295, 2, 296, 7, 296, 2, 297, + 7, 297, 2, 298, 7, 298, 2, 299, 7, 299, 2, 300, 7, 300, 2, 301, 7, 301, + 2, 302, 7, 302, 2, 303, 7, 303, 2, 304, 7, 304, 2, 305, 7, 305, 2, 306, + 7, 306, 2, 307, 7, 307, 2, 308, 7, 308, 2, 309, 7, 309, 2, 310, 7, 310, + 2, 311, 7, 311, 2, 312, 7, 312, 2, 313, 7, 313, 2, 314, 7, 314, 2, 315, + 7, 315, 2, 316, 7, 316, 2, 317, 7, 317, 2, 318, 7, 318, 2, 319, 7, 319, + 2, 320, 7, 320, 2, 321, 7, 321, 2, 322, 7, 322, 2, 323, 7, 323, 2, 324, + 7, 324, 2, 325, 7, 325, 2, 326, 7, 326, 2, 327, 7, 327, 2, 328, 7, 328, + 2, 329, 7, 329, 2, 330, 7, 330, 2, 331, 7, 331, 2, 332, 7, 332, 2, 333, + 7, 333, 2, 334, 7, 334, 2, 335, 7, 335, 2, 336, 7, 336, 2, 337, 7, 337, + 2, 338, 7, 338, 2, 339, 7, 339, 2, 340, 7, 340, 2, 341, 7, 341, 2, 342, + 7, 342, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, + 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, + 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, + 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, + 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, + 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, + 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, + 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, + 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, + 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, + 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, + 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, + 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, + 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, + 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, + 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, + 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, + 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, + 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, + 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, + 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, + 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, + 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, + 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, + 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, + 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, + 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, + 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, + 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, + 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, + 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, + 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, + 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, + 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, + 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, + 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, + 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, + 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, + 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, + 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, + 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, + 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, + 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, + 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, + 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, + 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, + 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, + 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, + 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, + 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, + 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, + 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, + 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, + 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, + 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, + 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, + 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, + 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, + 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, + 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, + 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, + 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, + 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, + 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, + 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, + 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, + 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, + 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, + 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, + 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, + 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, + 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, + 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, + 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, + 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, + 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, + 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, + 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, + 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, + 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, + 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, + 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, + 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, + 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, + 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, + 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, + 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, + 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, + 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, + 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, + 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, + 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, + 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, + 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, + 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, + 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, + 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, + 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, + 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, + 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, + 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, + 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, + 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, + 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, + 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, + 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, + 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, + 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, + 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, + 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, + 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, + 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, + 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, + 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, + 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, + 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, + 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, + 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, + 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, + 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, + 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, + 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, + 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, + 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, + 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, + 1, 171, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, + 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, + 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, + 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, + 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, + 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, + 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, + 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, + 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, + 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, + 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, + 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, + 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, + 1, 189, 1, 190, 1, 190, 1, 190, 1, 190, 1, 190, 1, 190, 1, 190, 1, 191, + 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 192, 1, 192, + 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 193, 1, 193, 1, 193, + 1, 193, 1, 193, 1, 193, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, + 1, 194, 1, 194, 1, 194, 1, 194, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, + 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 196, 1, 196, 1, 196, 1, 196, + 1, 196, 1, 196, 1, 196, 1, 196, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, + 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 198, 1, 198, 1, 198, + 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 199, + 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 1, 200, 1, 200, 1, 200, 1, 200, + 1, 200, 1, 200, 1, 200, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, + 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 203, 1, 203, 1, 203, 1, 203, + 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 204, 1, 204, 1, 204, + 1, 204, 1, 204, 1, 204, 1, 204, 1, 204, 1, 205, 1, 205, 1, 205, 1, 205, + 1, 205, 1, 205, 1, 205, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, + 1, 206, 1, 207, 1, 207, 1, 207, 1, 207, 1, 207, 1, 207, 1, 207, 1, 207, + 1, 207, 1, 207, 1, 207, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, + 1, 208, 1, 208, 1, 209, 1, 209, 1, 209, 1, 209, 1, 209, 1, 209, 1, 210, + 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 211, 1, 211, + 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 212, 1, 212, + 1, 212, 1, 212, 1, 212, 1, 212, 1, 212, 1, 213, 1, 213, 1, 213, 1, 213, + 1, 213, 1, 213, 1, 213, 1, 213, 1, 213, 1, 213, 1, 214, 1, 214, 1, 214, + 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 215, 1, 215, 1, 215, 1, 215, + 1, 215, 1, 215, 1, 215, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, + 1, 217, 1, 217, 1, 217, 1, 217, 1, 217, 1, 218, 1, 218, 1, 218, 1, 218, + 1, 218, 1, 218, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, + 1, 219, 1, 219, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, 1, 220, + 1, 221, 1, 221, 1, 221, 1, 221, 1, 222, 1, 222, 1, 222, 1, 222, 1, 222, + 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 224, + 1, 224, 1, 224, 1, 224, 1, 224, 1, 224, 1, 224, 1, 225, 1, 225, 1, 225, + 1, 225, 1, 225, 1, 225, 1, 225, 1, 226, 1, 226, 1, 226, 1, 226, 1, 226, + 1, 226, 1, 226, 1, 226, 1, 227, 1, 227, 1, 227, 1, 227, 1, 227, 1, 227, + 1, 227, 1, 228, 1, 228, 1, 228, 1, 228, 1, 228, 1, 228, 1, 228, 1, 228, + 1, 228, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 230, 1, 230, 1, 230, + 1, 230, 1, 230, 1, 230, 1, 230, 1, 231, 1, 231, 1, 231, 1, 231, 1, 231, + 1, 231, 1, 231, 1, 231, 1, 231, 1, 231, 1, 231, 1, 231, 1, 231, 1, 232, + 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 233, 1, 233, + 1, 233, 1, 233, 1, 234, 1, 234, 1, 234, 1, 234, 1, 234, 1, 235, 1, 235, + 1, 235, 1, 235, 1, 235, 1, 236, 1, 236, 1, 236, 1, 236, 1, 236, 1, 237, + 1, 237, 1, 237, 1, 237, 1, 237, 1, 238, 1, 238, 1, 238, 1, 238, 1, 238, + 1, 238, 1, 239, 1, 239, 1, 239, 1, 239, 1, 239, 1, 239, 1, 240, 1, 240, + 1, 240, 1, 240, 1, 240, 1, 240, 1, 240, 1, 241, 1, 241, 1, 241, 1, 241, + 1, 241, 1, 241, 1, 241, 1, 241, 1, 241, 1, 241, 1, 242, 1, 242, 1, 242, + 1, 242, 1, 242, 1, 242, 1, 242, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, + 1, 243, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 245, + 1, 245, 1, 245, 1, 245, 1, 245, 1, 245, 1, 245, 1, 245, 1, 245, 1, 245, + 1, 245, 1, 245, 1, 246, 1, 246, 1, 246, 1, 246, 1, 246, 1, 247, 1, 247, + 1, 247, 1, 247, 1, 247, 1, 247, 1, 247, 1, 248, 1, 248, 1, 248, 1, 248, + 1, 248, 1, 249, 1, 249, 1, 249, 1, 249, 1, 249, 1, 250, 1, 250, 1, 250, + 1, 250, 1, 250, 1, 251, 1, 251, 1, 251, 1, 251, 1, 251, 1, 251, 1, 251, + 1, 251, 1, 251, 1, 251, 1, 252, 1, 252, 1, 252, 1, 253, 1, 253, 1, 253, + 1, 253, 1, 253, 1, 253, 1, 253, 1, 253, 1, 253, 1, 254, 1, 254, 1, 254, + 1, 254, 1, 254, 1, 254, 1, 254, 1, 254, 1, 254, 1, 254, 1, 254, 1, 254, + 1, 255, 1, 255, 1, 255, 1, 255, 1, 255, 1, 256, 1, 256, 1, 256, 1, 256, + 1, 256, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, + 1, 257, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, + 1, 258, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 260, 1, 260, 1, 260, + 1, 260, 1, 260, 1, 260, 1, 260, 1, 260, 1, 261, 1, 261, 1, 261, 1, 261, + 1, 261, 1, 261, 1, 261, 1, 261, 1, 261, 1, 261, 1, 262, 1, 262, 1, 262, + 1, 262, 1, 262, 1, 262, 1, 262, 1, 262, 1, 262, 1, 262, 1, 262, 1, 262, + 1, 263, 1, 263, 1, 263, 1, 263, 1, 263, 1, 263, 1, 263, 1, 263, 1, 263, + 1, 263, 1, 263, 1, 263, 1, 263, 1, 263, 1, 264, 1, 264, 1, 264, 1, 264, + 1, 264, 1, 264, 1, 265, 1, 265, 1, 265, 1, 265, 1, 265, 1, 265, 1, 265, + 1, 266, 1, 266, 1, 266, 1, 266, 1, 266, 1, 266, 1, 266, 1, 266, 1, 267, + 1, 267, 1, 267, 1, 267, 1, 267, 1, 267, 1, 267, 1, 267, 1, 267, 1, 267, + 1, 268, 1, 268, 1, 268, 1, 268, 1, 268, 1, 268, 1, 268, 1, 269, 1, 269, + 1, 269, 1, 269, 1, 269, 1, 269, 1, 270, 1, 270, 1, 270, 1, 270, 1, 270, + 1, 270, 1, 270, 1, 271, 1, 271, 1, 271, 1, 271, 1, 272, 1, 272, 1, 272, + 1, 272, 1, 272, 1, 273, 1, 273, 1, 273, 1, 273, 1, 273, 1, 273, 1, 274, + 1, 274, 1, 274, 1, 274, 1, 274, 1, 274, 1, 275, 1, 275, 1, 275, 1, 275, + 1, 275, 1, 275, 1, 276, 1, 276, 1, 276, 1, 276, 1, 276, 1, 277, 1, 277, + 1, 277, 1, 277, 1, 277, 1, 277, 1, 277, 1, 277, 1, 277, 1, 278, 1, 278, + 1, 278, 1, 278, 1, 278, 1, 278, 1, 279, 1, 279, 1, 279, 1, 279, 1, 279, + 1, 279, 1, 279, 1, 280, 1, 280, 1, 280, 1, 280, 1, 280, 1, 280, 1, 280, + 1, 280, 1, 281, 1, 281, 1, 281, 1, 281, 1, 281, 1, 281, 1, 281, 1, 281, + 1, 282, 1, 282, 1, 282, 1, 282, 1, 282, 1, 283, 1, 283, 1, 283, 1, 283, + 1, 283, 1, 284, 1, 284, 1, 284, 1, 284, 1, 284, 1, 284, 1, 285, 1, 285, + 1, 285, 1, 285, 1, 285, 1, 285, 1, 286, 1, 286, 1, 286, 1, 286, 1, 286, + 1, 286, 1, 286, 1, 287, 1, 287, 1, 287, 1, 287, 1, 287, 1, 288, 1, 288, + 1, 288, 1, 288, 1, 288, 1, 288, 1, 288, 1, 289, 1, 289, 1, 289, 1, 289, + 1, 289, 1, 289, 1, 289, 1, 289, 1, 290, 1, 290, 1, 290, 1, 290, 1, 290, + 1, 291, 1, 291, 1, 291, 1, 291, 1, 291, 1, 291, 1, 291, 1, 291, 1, 292, + 1, 292, 1, 292, 1, 292, 1, 292, 1, 292, 1, 293, 1, 293, 1, 293, 1, 293, + 1, 293, 1, 294, 1, 294, 1, 294, 1, 294, 1, 294, 1, 295, 1, 295, 1, 296, + 1, 296, 1, 296, 1, 296, 3, 296, 2829, 8, 296, 1, 297, 1, 297, 1, 298, 1, + 298, 1, 298, 1, 299, 1, 299, 1, 300, 1, 300, 1, 300, 1, 301, 1, 301, 1, + 302, 1, 302, 1, 303, 1, 303, 1, 304, 1, 304, 1, 305, 1, 305, 1, 306, 1, + 306, 1, 306, 1, 307, 1, 307, 1, 308, 1, 308, 1, 309, 1, 309, 1, 310, 1, + 310, 1, 310, 1, 311, 1, 311, 1, 312, 1, 312, 1, 313, 1, 313, 1, 314, 1, + 314, 1, 315, 1, 315, 1, 316, 1, 316, 1, 317, 1, 317, 1, 318, 1, 318, 1, + 318, 1, 319, 1, 319, 1, 319, 1, 320, 1, 320, 1, 320, 1, 321, 1, 321, 1, + 321, 1, 322, 1, 322, 1, 322, 1, 323, 1, 323, 1, 324, 1, 324, 1, 325, 1, + 325, 1, 326, 1, 326, 1, 326, 1, 326, 5, 326, 2902, 8, 326, 10, 326, 12, + 326, 2905, 9, 326, 1, 326, 1, 326, 1, 327, 1, 327, 1, 327, 1, 327, 1, 327, + 1, 327, 1, 327, 5, 327, 2916, 8, 327, 10, 327, 12, 327, 2919, 9, 327, 1, + 327, 1, 327, 1, 328, 1, 328, 1, 328, 1, 328, 5, 328, 2927, 8, 328, 10, + 328, 12, 328, 2930, 9, 328, 1, 328, 1, 328, 1, 329, 4, 329, 2935, 8, 329, + 11, 329, 12, 329, 2936, 1, 330, 4, 330, 2940, 8, 330, 11, 330, 12, 330, + 2941, 1, 330, 1, 330, 5, 330, 2946, 8, 330, 10, 330, 12, 330, 2949, 9, + 330, 1, 330, 1, 330, 4, 330, 2953, 8, 330, 11, 330, 12, 330, 2954, 3, 330, + 2957, 8, 330, 1, 331, 4, 331, 2960, 8, 331, 11, 331, 12, 331, 2961, 1, + 331, 1, 331, 5, 331, 2966, 8, 331, 10, 331, 12, 331, 2969, 9, 331, 3, 331, + 2971, 8, 331, 1, 331, 1, 331, 1, 331, 1, 331, 4, 331, 2977, 8, 331, 11, + 331, 12, 331, 2978, 1, 331, 1, 331, 3, 331, 2983, 8, 331, 1, 332, 1, 332, + 3, 332, 2987, 8, 332, 1, 332, 1, 332, 1, 332, 5, 332, 2992, 8, 332, 10, + 332, 12, 332, 2995, 9, 332, 1, 333, 1, 333, 1, 333, 1, 333, 4, 333, 3001, + 8, 333, 11, 333, 12, 333, 3002, 1, 334, 1, 334, 1, 334, 1, 334, 5, 334, + 3009, 8, 334, 10, 334, 12, 334, 3012, 9, 334, 1, 334, 1, 334, 1, 335, 1, + 335, 1, 335, 1, 335, 5, 335, 3020, 8, 335, 10, 335, 12, 335, 3023, 9, 335, + 1, 335, 1, 335, 1, 336, 1, 336, 3, 336, 3029, 8, 336, 1, 336, 4, 336, 3032, + 8, 336, 11, 336, 12, 336, 3033, 1, 337, 1, 337, 1, 338, 1, 338, 1, 339, + 1, 339, 1, 339, 1, 339, 5, 339, 3044, 8, 339, 10, 339, 12, 339, 3047, 9, + 339, 1, 339, 3, 339, 3050, 8, 339, 1, 339, 3, 339, 3053, 8, 339, 1, 339, + 1, 339, 1, 340, 1, 340, 1, 340, 1, 340, 5, 340, 3061, 8, 340, 10, 340, + 12, 340, 3064, 9, 340, 1, 340, 1, 340, 1, 340, 1, 340, 1, 340, 1, 341, + 4, 341, 3072, 8, 341, 11, 341, 12, 341, 3073, 1, 341, 1, 341, 1, 342, 1, + 342, 1, 3062, 0, 343, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, + 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, + 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, + 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, + 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, + 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, + 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, + 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, + 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, + 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, + 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, + 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, + 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, + 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, + 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, + 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, + 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, + 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, + 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, + 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, + 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, + 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, + 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, 183, + 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, 381, + 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 196, 393, 197, 395, 198, + 397, 199, 399, 200, 401, 201, 403, 202, 405, 203, 407, 204, 409, 205, 411, + 206, 413, 207, 415, 208, 417, 209, 419, 210, 421, 211, 423, 212, 425, 213, + 427, 214, 429, 215, 431, 216, 433, 217, 435, 218, 437, 219, 439, 220, 441, + 221, 443, 222, 445, 223, 447, 224, 449, 225, 451, 226, 453, 227, 455, 228, + 457, 229, 459, 230, 461, 231, 463, 232, 465, 233, 467, 234, 469, 235, 471, + 236, 473, 237, 475, 238, 477, 239, 479, 240, 481, 241, 483, 242, 485, 243, + 487, 244, 489, 245, 491, 246, 493, 247, 495, 248, 497, 249, 499, 250, 501, + 251, 503, 252, 505, 253, 507, 254, 509, 255, 511, 256, 513, 257, 515, 258, + 517, 259, 519, 260, 521, 261, 523, 262, 525, 263, 527, 264, 529, 265, 531, + 266, 533, 267, 535, 268, 537, 269, 539, 270, 541, 271, 543, 272, 545, 273, + 547, 274, 549, 275, 551, 276, 553, 277, 555, 278, 557, 279, 559, 280, 561, + 281, 563, 282, 565, 283, 567, 284, 569, 285, 571, 286, 573, 287, 575, 288, + 577, 289, 579, 290, 581, 291, 583, 292, 585, 293, 587, 294, 589, 295, 591, + 296, 593, 297, 595, 298, 597, 299, 599, 300, 601, 301, 603, 302, 605, 303, + 607, 304, 609, 305, 611, 306, 613, 307, 615, 308, 617, 309, 619, 310, 621, + 311, 623, 312, 625, 313, 627, 314, 629, 315, 631, 316, 633, 317, 635, 318, + 637, 319, 639, 320, 641, 321, 643, 322, 645, 323, 647, 324, 649, 325, 651, + 326, 653, 327, 655, 328, 657, 329, 659, 330, 661, 331, 663, 332, 665, 333, + 667, 334, 669, 335, 671, 336, 673, 0, 675, 0, 677, 0, 679, 337, 681, 338, + 683, 339, 685, 340, 1, 0, 34, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, + 2, 0, 83, 83, 115, 115, 2, 0, 69, 69, 101, 101, 2, 0, 78, 78, 110, 110, + 2, 0, 84, 84, 116, 116, 2, 0, 68, 68, 100, 100, 2, 0, 77, 77, 109, 109, + 2, 0, 73, 73, 105, 105, 2, 0, 70, 70, 102, 102, 2, 0, 82, 82, 114, 114, + 2, 0, 76, 76, 108, 108, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, + 2, 0, 67, 67, 99, 99, 2, 0, 85, 85, 117, 117, 2, 0, 72, 72, 104, 104, 2, + 0, 79, 79, 111, 111, 2, 0, 71, 71, 103, 103, 2, 0, 87, 87, 119, 119, 2, + 0, 80, 80, 112, 112, 2, 0, 88, 88, 120, 120, 2, 0, 86, 86, 118, 118, 2, + 0, 75, 75, 107, 107, 2, 0, 74, 74, 106, 106, 2, 0, 81, 81, 113, 113, 1, + 0, 39, 39, 1, 0, 34, 34, 1, 0, 96, 96, 2, 0, 43, 43, 45, 45, 1, 0, 48, + 57, 2, 0, 65, 90, 97, 122, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, + 32, 3109, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, + 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, + 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, + 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, + 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, + 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, + 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, + 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, + 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, + 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, + 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, + 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, + 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, + 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, + 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, + 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, + 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, + 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, + 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, + 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, + 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, + 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, + 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, + 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, + 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, + 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, + 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, + 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, + 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, + 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, + 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, + 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, + 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, + 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, + 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, + 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, + 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, + 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, + 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, + 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, + 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, + 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, + 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, + 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, + 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, + 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, + 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, + 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, + 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, + 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, + 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, + 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, + 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, + 0, 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 0, + 395, 1, 0, 0, 0, 0, 397, 1, 0, 0, 0, 0, 399, 1, 0, 0, 0, 0, 401, 1, 0, + 0, 0, 0, 403, 1, 0, 0, 0, 0, 405, 1, 0, 0, 0, 0, 407, 1, 0, 0, 0, 0, 409, + 1, 0, 0, 0, 0, 411, 1, 0, 0, 0, 0, 413, 1, 0, 0, 0, 0, 415, 1, 0, 0, 0, + 0, 417, 1, 0, 0, 0, 0, 419, 1, 0, 0, 0, 0, 421, 1, 0, 0, 0, 0, 423, 1, + 0, 0, 0, 0, 425, 1, 0, 0, 0, 0, 427, 1, 0, 0, 0, 0, 429, 1, 0, 0, 0, 0, + 431, 1, 0, 0, 0, 0, 433, 1, 0, 0, 0, 0, 435, 1, 0, 0, 0, 0, 437, 1, 0, + 0, 0, 0, 439, 1, 0, 0, 0, 0, 441, 1, 0, 0, 0, 0, 443, 1, 0, 0, 0, 0, 445, + 1, 0, 0, 0, 0, 447, 1, 0, 0, 0, 0, 449, 1, 0, 0, 0, 0, 451, 1, 0, 0, 0, + 0, 453, 1, 0, 0, 0, 0, 455, 1, 0, 0, 0, 0, 457, 1, 0, 0, 0, 0, 459, 1, + 0, 0, 0, 0, 461, 1, 0, 0, 0, 0, 463, 1, 0, 0, 0, 0, 465, 1, 0, 0, 0, 0, + 467, 1, 0, 0, 0, 0, 469, 1, 0, 0, 0, 0, 471, 1, 0, 0, 0, 0, 473, 1, 0, + 0, 0, 0, 475, 1, 0, 0, 0, 0, 477, 1, 0, 0, 0, 0, 479, 1, 0, 0, 0, 0, 481, + 1, 0, 0, 0, 0, 483, 1, 0, 0, 0, 0, 485, 1, 0, 0, 0, 0, 487, 1, 0, 0, 0, + 0, 489, 1, 0, 0, 0, 0, 491, 1, 0, 0, 0, 0, 493, 1, 0, 0, 0, 0, 495, 1, + 0, 0, 0, 0, 497, 1, 0, 0, 0, 0, 499, 1, 0, 0, 0, 0, 501, 1, 0, 0, 0, 0, + 503, 1, 0, 0, 0, 0, 505, 1, 0, 0, 0, 0, 507, 1, 0, 0, 0, 0, 509, 1, 0, + 0, 0, 0, 511, 1, 0, 0, 0, 0, 513, 1, 0, 0, 0, 0, 515, 1, 0, 0, 0, 0, 517, + 1, 0, 0, 0, 0, 519, 1, 0, 0, 0, 0, 521, 1, 0, 0, 0, 0, 523, 1, 0, 0, 0, + 0, 525, 1, 0, 0, 0, 0, 527, 1, 0, 0, 0, 0, 529, 1, 0, 0, 0, 0, 531, 1, + 0, 0, 0, 0, 533, 1, 0, 0, 0, 0, 535, 1, 0, 0, 0, 0, 537, 1, 0, 0, 0, 0, + 539, 1, 0, 0, 0, 0, 541, 1, 0, 0, 0, 0, 543, 1, 0, 0, 0, 0, 545, 1, 0, + 0, 0, 0, 547, 1, 0, 0, 0, 0, 549, 1, 0, 0, 0, 0, 551, 1, 0, 0, 0, 0, 553, + 1, 0, 0, 0, 0, 555, 1, 0, 0, 0, 0, 557, 1, 0, 0, 0, 0, 559, 1, 0, 0, 0, + 0, 561, 1, 0, 0, 0, 0, 563, 1, 0, 0, 0, 0, 565, 1, 0, 0, 0, 0, 567, 1, + 0, 0, 0, 0, 569, 1, 0, 0, 0, 0, 571, 1, 0, 0, 0, 0, 573, 1, 0, 0, 0, 0, + 575, 1, 0, 0, 0, 0, 577, 1, 0, 0, 0, 0, 579, 1, 0, 0, 0, 0, 581, 1, 0, + 0, 0, 0, 583, 1, 0, 0, 0, 0, 585, 1, 0, 0, 0, 0, 587, 1, 0, 0, 0, 0, 589, + 1, 0, 0, 0, 0, 591, 1, 0, 0, 0, 0, 593, 1, 0, 0, 0, 0, 595, 1, 0, 0, 0, + 0, 597, 1, 0, 0, 0, 0, 599, 1, 0, 0, 0, 0, 601, 1, 0, 0, 0, 0, 603, 1, + 0, 0, 0, 0, 605, 1, 0, 0, 0, 0, 607, 1, 0, 0, 0, 0, 609, 1, 0, 0, 0, 0, + 611, 1, 0, 0, 0, 0, 613, 1, 0, 0, 0, 0, 615, 1, 0, 0, 0, 0, 617, 1, 0, + 0, 0, 0, 619, 1, 0, 0, 0, 0, 621, 1, 0, 0, 0, 0, 623, 1, 0, 0, 0, 0, 625, + 1, 0, 0, 0, 0, 627, 1, 0, 0, 0, 0, 629, 1, 0, 0, 0, 0, 631, 1, 0, 0, 0, + 0, 633, 1, 0, 0, 0, 0, 635, 1, 0, 0, 0, 0, 637, 1, 0, 0, 0, 0, 639, 1, + 0, 0, 0, 0, 641, 1, 0, 0, 0, 0, 643, 1, 0, 0, 0, 0, 645, 1, 0, 0, 0, 0, + 647, 1, 0, 0, 0, 0, 649, 1, 0, 0, 0, 0, 651, 1, 0, 0, 0, 0, 653, 1, 0, + 0, 0, 0, 655, 1, 0, 0, 0, 0, 657, 1, 0, 0, 0, 0, 659, 1, 0, 0, 0, 0, 661, + 1, 0, 0, 0, 0, 663, 1, 0, 0, 0, 0, 665, 1, 0, 0, 0, 0, 667, 1, 0, 0, 0, + 0, 669, 1, 0, 0, 0, 0, 671, 1, 0, 0, 0, 0, 679, 1, 0, 0, 0, 0, 681, 1, + 0, 0, 0, 0, 683, 1, 0, 0, 0, 0, 685, 1, 0, 0, 0, 1, 687, 1, 0, 0, 0, 3, + 694, 1, 0, 0, 0, 5, 698, 1, 0, 0, 0, 7, 704, 1, 0, 0, 0, 9, 710, 1, 0, + 0, 0, 11, 714, 1, 0, 0, 0, 13, 720, 1, 0, 0, 0, 15, 728, 1, 0, 0, 0, 17, + 732, 1, 0, 0, 0, 19, 736, 1, 0, 0, 0, 21, 742, 1, 0, 0, 0, 23, 745, 1, + 0, 0, 0, 25, 749, 1, 0, 0, 0, 27, 752, 1, 0, 0, 0, 29, 766, 1, 0, 0, 0, + 31, 772, 1, 0, 0, 0, 33, 782, 1, 0, 0, 0, 35, 790, 1, 0, 0, 0, 37, 795, + 1, 0, 0, 0, 39, 798, 1, 0, 0, 0, 41, 803, 1, 0, 0, 0, 43, 810, 1, 0, 0, + 0, 45, 818, 1, 0, 0, 0, 47, 823, 1, 0, 0, 0, 49, 828, 1, 0, 0, 0, 51, 836, + 1, 0, 0, 0, 53, 845, 1, 0, 0, 0, 55, 852, 1, 0, 0, 0, 57, 860, 1, 0, 0, + 0, 59, 868, 1, 0, 0, 0, 61, 875, 1, 0, 0, 0, 63, 885, 1, 0, 0, 0, 65, 897, + 1, 0, 0, 0, 67, 908, 1, 0, 0, 0, 69, 914, 1, 0, 0, 0, 71, 926, 1, 0, 0, + 0, 73, 933, 1, 0, 0, 0, 75, 939, 1, 0, 0, 0, 77, 944, 1, 0, 0, 0, 79, 952, + 1, 0, 0, 0, 81, 968, 1, 0, 0, 0, 83, 981, 1, 0, 0, 0, 85, 994, 1, 0, 0, + 0, 87, 1007, 1, 0, 0, 0, 89, 1022, 1, 0, 0, 0, 91, 1035, 1, 0, 0, 0, 93, + 1053, 1, 0, 0, 0, 95, 1066, 1, 0, 0, 0, 97, 1071, 1, 0, 0, 0, 99, 1076, + 1, 0, 0, 0, 101, 1080, 1, 0, 0, 0, 103, 1091, 1, 0, 0, 0, 105, 1099, 1, + 0, 0, 0, 107, 1107, 1, 0, 0, 0, 109, 1114, 1, 0, 0, 0, 111, 1122, 1, 0, + 0, 0, 113, 1129, 1, 0, 0, 0, 115, 1134, 1, 0, 0, 0, 117, 1139, 1, 0, 0, + 0, 119, 1148, 1, 0, 0, 0, 121, 1159, 1, 0, 0, 0, 123, 1173, 1, 0, 0, 0, + 125, 1182, 1, 0, 0, 0, 127, 1194, 1, 0, 0, 0, 129, 1197, 1, 0, 0, 0, 131, + 1204, 1, 0, 0, 0, 133, 1209, 1, 0, 0, 0, 135, 1214, 1, 0, 0, 0, 137, 1220, + 1, 0, 0, 0, 139, 1227, 1, 0, 0, 0, 141, 1236, 1, 0, 0, 0, 143, 1240, 1, + 0, 0, 0, 145, 1246, 1, 0, 0, 0, 147, 1253, 1, 0, 0, 0, 149, 1260, 1, 0, + 0, 0, 151, 1270, 1, 0, 0, 0, 153, 1278, 1, 0, 0, 0, 155, 1285, 1, 0, 0, + 0, 157, 1293, 1, 0, 0, 0, 159, 1301, 1, 0, 0, 0, 161, 1307, 1, 0, 0, 0, + 163, 1313, 1, 0, 0, 0, 165, 1320, 1, 0, 0, 0, 167, 1326, 1, 0, 0, 0, 169, + 1332, 1, 0, 0, 0, 171, 1342, 1, 0, 0, 0, 173, 1346, 1, 0, 0, 0, 175, 1353, + 1, 0, 0, 0, 177, 1358, 1, 0, 0, 0, 179, 1363, 1, 0, 0, 0, 181, 1372, 1, + 0, 0, 0, 183, 1382, 1, 0, 0, 0, 185, 1388, 1, 0, 0, 0, 187, 1394, 1, 0, + 0, 0, 189, 1402, 1, 0, 0, 0, 191, 1409, 1, 0, 0, 0, 193, 1418, 1, 0, 0, + 0, 195, 1424, 1, 0, 0, 0, 197, 1433, 1, 0, 0, 0, 199, 1440, 1, 0, 0, 0, + 201, 1447, 1, 0, 0, 0, 203, 1452, 1, 0, 0, 0, 205, 1455, 1, 0, 0, 0, 207, + 1462, 1, 0, 0, 0, 209, 1472, 1, 0, 0, 0, 211, 1475, 1, 0, 0, 0, 213, 1485, + 1, 0, 0, 0, 215, 1493, 1, 0, 0, 0, 217, 1499, 1, 0, 0, 0, 219, 1505, 1, + 0, 0, 0, 221, 1512, 1, 0, 0, 0, 223, 1522, 1, 0, 0, 0, 225, 1531, 1, 0, + 0, 0, 227, 1536, 1, 0, 0, 0, 229, 1544, 1, 0, 0, 0, 231, 1547, 1, 0, 0, + 0, 233, 1550, 1, 0, 0, 0, 235, 1560, 1, 0, 0, 0, 237, 1568, 1, 0, 0, 0, + 239, 1573, 1, 0, 0, 0, 241, 1578, 1, 0, 0, 0, 243, 1589, 1, 0, 0, 0, 245, + 1601, 1, 0, 0, 0, 247, 1613, 1, 0, 0, 0, 249, 1624, 1, 0, 0, 0, 251, 1635, + 1, 0, 0, 0, 253, 1646, 1, 0, 0, 0, 255, 1651, 1, 0, 0, 0, 257, 1655, 1, + 0, 0, 0, 259, 1660, 1, 0, 0, 0, 261, 1669, 1, 0, 0, 0, 263, 1674, 1, 0, + 0, 0, 265, 1682, 1, 0, 0, 0, 267, 1690, 1, 0, 0, 0, 269, 1696, 1, 0, 0, + 0, 271, 1701, 1, 0, 0, 0, 273, 1707, 1, 0, 0, 0, 275, 1712, 1, 0, 0, 0, + 277, 1718, 1, 0, 0, 0, 279, 1726, 1, 0, 0, 0, 281, 1732, 1, 0, 0, 0, 283, + 1742, 1, 0, 0, 0, 285, 1757, 1, 0, 0, 0, 287, 1765, 1, 0, 0, 0, 289, 1770, + 1, 0, 0, 0, 291, 1774, 1, 0, 0, 0, 293, 1780, 1, 0, 0, 0, 295, 1788, 1, + 0, 0, 0, 297, 1796, 1, 0, 0, 0, 299, 1812, 1, 0, 0, 0, 301, 1825, 1, 0, + 0, 0, 303, 1834, 1, 0, 0, 0, 305, 1840, 1, 0, 0, 0, 307, 1847, 1, 0, 0, + 0, 309, 1853, 1, 0, 0, 0, 311, 1861, 1, 0, 0, 0, 313, 1868, 1, 0, 0, 0, + 315, 1873, 1, 0, 0, 0, 317, 1877, 1, 0, 0, 0, 319, 1881, 1, 0, 0, 0, 321, + 1886, 1, 0, 0, 0, 323, 1891, 1, 0, 0, 0, 325, 1894, 1, 0, 0, 0, 327, 1899, + 1, 0, 0, 0, 329, 1909, 1, 0, 0, 0, 331, 1913, 1, 0, 0, 0, 333, 1918, 1, + 0, 0, 0, 335, 1925, 1, 0, 0, 0, 337, 1931, 1, 0, 0, 0, 339, 1938, 1, 0, + 0, 0, 341, 1941, 1, 0, 0, 0, 343, 1948, 1, 0, 0, 0, 345, 1953, 1, 0, 0, + 0, 347, 1956, 1, 0, 0, 0, 349, 1960, 1, 0, 0, 0, 351, 1965, 1, 0, 0, 0, + 353, 1972, 1, 0, 0, 0, 355, 1975, 1, 0, 0, 0, 357, 1981, 1, 0, 0, 0, 359, + 1992, 1, 0, 0, 0, 361, 1998, 1, 0, 0, 0, 363, 2005, 1, 0, 0, 0, 365, 2010, + 1, 0, 0, 0, 367, 2019, 1, 0, 0, 0, 369, 2029, 1, 0, 0, 0, 371, 2040, 1, + 0, 0, 0, 373, 2048, 1, 0, 0, 0, 375, 2053, 1, 0, 0, 0, 377, 2058, 1, 0, + 0, 0, 379, 2066, 1, 0, 0, 0, 381, 2070, 1, 0, 0, 0, 383, 2077, 1, 0, 0, + 0, 385, 2085, 1, 0, 0, 0, 387, 2090, 1, 0, 0, 0, 389, 2099, 1, 0, 0, 0, + 391, 2109, 1, 0, 0, 0, 393, 2119, 1, 0, 0, 0, 395, 2127, 1, 0, 0, 0, 397, + 2138, 1, 0, 0, 0, 399, 2149, 1, 0, 0, 0, 401, 2155, 1, 0, 0, 0, 403, 2162, + 1, 0, 0, 0, 405, 2168, 1, 0, 0, 0, 407, 2173, 1, 0, 0, 0, 409, 2183, 1, + 0, 0, 0, 411, 2191, 1, 0, 0, 0, 413, 2198, 1, 0, 0, 0, 415, 2205, 1, 0, + 0, 0, 417, 2216, 1, 0, 0, 0, 419, 2224, 1, 0, 0, 0, 421, 2230, 1, 0, 0, + 0, 423, 2238, 1, 0, 0, 0, 425, 2247, 1, 0, 0, 0, 427, 2254, 1, 0, 0, 0, + 429, 2264, 1, 0, 0, 0, 431, 2272, 1, 0, 0, 0, 433, 2279, 1, 0, 0, 0, 435, + 2285, 1, 0, 0, 0, 437, 2290, 1, 0, 0, 0, 439, 2296, 1, 0, 0, 0, 441, 2305, + 1, 0, 0, 0, 443, 2312, 1, 0, 0, 0, 445, 2316, 1, 0, 0, 0, 447, 2321, 1, + 0, 0, 0, 449, 2329, 1, 0, 0, 0, 451, 2336, 1, 0, 0, 0, 453, 2343, 1, 0, + 0, 0, 455, 2351, 1, 0, 0, 0, 457, 2358, 1, 0, 0, 0, 459, 2367, 1, 0, 0, + 0, 461, 2372, 1, 0, 0, 0, 463, 2379, 1, 0, 0, 0, 465, 2392, 1, 0, 0, 0, + 467, 2400, 1, 0, 0, 0, 469, 2404, 1, 0, 0, 0, 471, 2409, 1, 0, 0, 0, 473, + 2414, 1, 0, 0, 0, 475, 2419, 1, 0, 0, 0, 477, 2424, 1, 0, 0, 0, 479, 2430, + 1, 0, 0, 0, 481, 2436, 1, 0, 0, 0, 483, 2443, 1, 0, 0, 0, 485, 2453, 1, + 0, 0, 0, 487, 2460, 1, 0, 0, 0, 489, 2466, 1, 0, 0, 0, 491, 2473, 1, 0, + 0, 0, 493, 2485, 1, 0, 0, 0, 495, 2490, 1, 0, 0, 0, 497, 2497, 1, 0, 0, + 0, 499, 2502, 1, 0, 0, 0, 501, 2507, 1, 0, 0, 0, 503, 2512, 1, 0, 0, 0, + 505, 2522, 1, 0, 0, 0, 507, 2525, 1, 0, 0, 0, 509, 2534, 1, 0, 0, 0, 511, + 2546, 1, 0, 0, 0, 513, 2551, 1, 0, 0, 0, 515, 2556, 1, 0, 0, 0, 517, 2565, + 1, 0, 0, 0, 519, 2574, 1, 0, 0, 0, 521, 2579, 1, 0, 0, 0, 523, 2587, 1, + 0, 0, 0, 525, 2597, 1, 0, 0, 0, 527, 2609, 1, 0, 0, 0, 529, 2623, 1, 0, + 0, 0, 531, 2629, 1, 0, 0, 0, 533, 2636, 1, 0, 0, 0, 535, 2644, 1, 0, 0, + 0, 537, 2654, 1, 0, 0, 0, 539, 2661, 1, 0, 0, 0, 541, 2667, 1, 0, 0, 0, + 543, 2674, 1, 0, 0, 0, 545, 2678, 1, 0, 0, 0, 547, 2683, 1, 0, 0, 0, 549, + 2689, 1, 0, 0, 0, 551, 2695, 1, 0, 0, 0, 553, 2701, 1, 0, 0, 0, 555, 2706, + 1, 0, 0, 0, 557, 2715, 1, 0, 0, 0, 559, 2721, 1, 0, 0, 0, 561, 2728, 1, + 0, 0, 0, 563, 2736, 1, 0, 0, 0, 565, 2744, 1, 0, 0, 0, 567, 2749, 1, 0, + 0, 0, 569, 2754, 1, 0, 0, 0, 571, 2760, 1, 0, 0, 0, 573, 2766, 1, 0, 0, + 0, 575, 2773, 1, 0, 0, 0, 577, 2778, 1, 0, 0, 0, 579, 2785, 1, 0, 0, 0, + 581, 2793, 1, 0, 0, 0, 583, 2798, 1, 0, 0, 0, 585, 2806, 1, 0, 0, 0, 587, + 2812, 1, 0, 0, 0, 589, 2817, 1, 0, 0, 0, 591, 2822, 1, 0, 0, 0, 593, 2828, + 1, 0, 0, 0, 595, 2830, 1, 0, 0, 0, 597, 2832, 1, 0, 0, 0, 599, 2835, 1, + 0, 0, 0, 601, 2837, 1, 0, 0, 0, 603, 2840, 1, 0, 0, 0, 605, 2842, 1, 0, + 0, 0, 607, 2844, 1, 0, 0, 0, 609, 2846, 1, 0, 0, 0, 611, 2848, 1, 0, 0, + 0, 613, 2850, 1, 0, 0, 0, 615, 2853, 1, 0, 0, 0, 617, 2855, 1, 0, 0, 0, + 619, 2857, 1, 0, 0, 0, 621, 2859, 1, 0, 0, 0, 623, 2862, 1, 0, 0, 0, 625, + 2864, 1, 0, 0, 0, 627, 2866, 1, 0, 0, 0, 629, 2868, 1, 0, 0, 0, 631, 2870, + 1, 0, 0, 0, 633, 2872, 1, 0, 0, 0, 635, 2874, 1, 0, 0, 0, 637, 2876, 1, + 0, 0, 0, 639, 2879, 1, 0, 0, 0, 641, 2882, 1, 0, 0, 0, 643, 2885, 1, 0, + 0, 0, 645, 2888, 1, 0, 0, 0, 647, 2891, 1, 0, 0, 0, 649, 2893, 1, 0, 0, + 0, 651, 2895, 1, 0, 0, 0, 653, 2897, 1, 0, 0, 0, 655, 2908, 1, 0, 0, 0, + 657, 2922, 1, 0, 0, 0, 659, 2934, 1, 0, 0, 0, 661, 2956, 1, 0, 0, 0, 663, + 2982, 1, 0, 0, 0, 665, 2986, 1, 0, 0, 0, 667, 2996, 1, 0, 0, 0, 669, 3004, + 1, 0, 0, 0, 671, 3015, 1, 0, 0, 0, 673, 3026, 1, 0, 0, 0, 675, 3035, 1, + 0, 0, 0, 677, 3037, 1, 0, 0, 0, 679, 3039, 1, 0, 0, 0, 681, 3056, 1, 0, + 0, 0, 683, 3071, 1, 0, 0, 0, 685, 3077, 1, 0, 0, 0, 687, 688, 7, 0, 0, + 0, 688, 689, 7, 1, 0, 0, 689, 690, 7, 2, 0, 0, 690, 691, 7, 3, 0, 0, 691, + 692, 7, 4, 0, 0, 692, 693, 7, 5, 0, 0, 693, 2, 1, 0, 0, 0, 694, 695, 7, + 0, 0, 0, 695, 696, 7, 6, 0, 0, 696, 697, 7, 6, 0, 0, 697, 4, 1, 0, 0, 0, + 698, 699, 7, 0, 0, 0, 699, 700, 7, 6, 0, 0, 700, 701, 7, 7, 0, 0, 701, + 702, 7, 8, 0, 0, 702, 703, 7, 4, 0, 0, 703, 6, 1, 0, 0, 0, 704, 705, 7, + 0, 0, 0, 705, 706, 7, 9, 0, 0, 706, 707, 7, 5, 0, 0, 707, 708, 7, 3, 0, + 0, 708, 709, 7, 10, 0, 0, 709, 8, 1, 0, 0, 0, 710, 711, 7, 0, 0, 0, 711, + 712, 7, 11, 0, 0, 712, 713, 7, 11, 0, 0, 713, 10, 1, 0, 0, 0, 714, 715, + 7, 0, 0, 0, 715, 716, 7, 11, 0, 0, 716, 717, 7, 5, 0, 0, 717, 718, 7, 3, + 0, 0, 718, 719, 7, 10, 0, 0, 719, 12, 1, 0, 0, 0, 720, 721, 7, 0, 0, 0, + 721, 722, 7, 4, 0, 0, 722, 723, 7, 0, 0, 0, 723, 724, 7, 11, 0, 0, 724, + 725, 7, 12, 0, 0, 725, 726, 7, 13, 0, 0, 726, 727, 7, 3, 0, 0, 727, 14, + 1, 0, 0, 0, 728, 729, 7, 0, 0, 0, 729, 730, 7, 4, 0, 0, 730, 731, 7, 6, + 0, 0, 731, 16, 1, 0, 0, 0, 732, 733, 7, 0, 0, 0, 733, 734, 7, 4, 0, 0, + 734, 735, 7, 12, 0, 0, 735, 18, 1, 0, 0, 0, 736, 737, 7, 0, 0, 0, 737, + 738, 7, 10, 0, 0, 738, 739, 7, 10, 0, 0, 739, 740, 7, 0, 0, 0, 740, 741, + 7, 12, 0, 0, 741, 20, 1, 0, 0, 0, 742, 743, 7, 0, 0, 0, 743, 744, 7, 2, + 0, 0, 744, 22, 1, 0, 0, 0, 745, 746, 7, 0, 0, 0, 746, 747, 7, 2, 0, 0, + 747, 748, 7, 14, 0, 0, 748, 24, 1, 0, 0, 0, 749, 750, 7, 0, 0, 0, 750, + 751, 7, 5, 0, 0, 751, 26, 1, 0, 0, 0, 752, 753, 7, 0, 0, 0, 753, 754, 7, + 15, 0, 0, 754, 755, 7, 5, 0, 0, 755, 756, 7, 16, 0, 0, 756, 757, 7, 17, + 0, 0, 757, 758, 7, 10, 0, 0, 758, 759, 7, 8, 0, 0, 759, 760, 7, 13, 0, + 0, 760, 761, 7, 0, 0, 0, 761, 762, 7, 5, 0, 0, 762, 763, 7, 8, 0, 0, 763, + 764, 7, 17, 0, 0, 764, 765, 7, 4, 0, 0, 765, 28, 1, 0, 0, 0, 766, 767, + 7, 1, 0, 0, 767, 768, 7, 3, 0, 0, 768, 769, 7, 18, 0, 0, 769, 770, 7, 8, + 0, 0, 770, 771, 7, 4, 0, 0, 771, 30, 1, 0, 0, 0, 772, 773, 7, 1, 0, 0, + 773, 774, 7, 3, 0, 0, 774, 775, 7, 10, 0, 0, 775, 776, 7, 4, 0, 0, 776, + 777, 7, 17, 0, 0, 777, 778, 7, 15, 0, 0, 778, 779, 7, 11, 0, 0, 779, 780, + 7, 11, 0, 0, 780, 781, 7, 8, 0, 0, 781, 32, 1, 0, 0, 0, 782, 783, 7, 1, + 0, 0, 783, 784, 7, 3, 0, 0, 784, 785, 7, 5, 0, 0, 785, 786, 7, 19, 0, 0, + 786, 787, 7, 3, 0, 0, 787, 788, 7, 3, 0, 0, 788, 789, 7, 4, 0, 0, 789, + 34, 1, 0, 0, 0, 790, 791, 7, 1, 0, 0, 791, 792, 7, 17, 0, 0, 792, 793, + 7, 5, 0, 0, 793, 794, 7, 16, 0, 0, 794, 36, 1, 0, 0, 0, 795, 796, 7, 1, + 0, 0, 796, 797, 7, 12, 0, 0, 797, 38, 1, 0, 0, 0, 798, 799, 7, 14, 0, 0, + 799, 800, 7, 0, 0, 0, 800, 801, 7, 11, 0, 0, 801, 802, 7, 11, 0, 0, 802, + 40, 1, 0, 0, 0, 803, 804, 7, 14, 0, 0, 804, 805, 7, 0, 0, 0, 805, 806, + 7, 11, 0, 0, 806, 807, 7, 11, 0, 0, 807, 808, 7, 3, 0, 0, 808, 809, 7, + 6, 0, 0, 809, 42, 1, 0, 0, 0, 810, 811, 7, 14, 0, 0, 811, 812, 7, 0, 0, + 0, 812, 813, 7, 2, 0, 0, 813, 814, 7, 14, 0, 0, 814, 815, 7, 0, 0, 0, 815, + 816, 7, 6, 0, 0, 816, 817, 7, 3, 0, 0, 817, 44, 1, 0, 0, 0, 818, 819, 7, + 14, 0, 0, 819, 820, 7, 0, 0, 0, 820, 821, 7, 2, 0, 0, 821, 822, 7, 3, 0, + 0, 822, 46, 1, 0, 0, 0, 823, 824, 7, 14, 0, 0, 824, 825, 7, 0, 0, 0, 825, + 826, 7, 2, 0, 0, 826, 827, 7, 5, 0, 0, 827, 48, 1, 0, 0, 0, 828, 829, 7, + 14, 0, 0, 829, 830, 7, 0, 0, 0, 830, 831, 7, 5, 0, 0, 831, 832, 7, 0, 0, + 0, 832, 833, 7, 11, 0, 0, 833, 834, 7, 17, 0, 0, 834, 835, 7, 18, 0, 0, + 835, 50, 1, 0, 0, 0, 836, 837, 7, 14, 0, 0, 837, 838, 7, 0, 0, 0, 838, + 839, 7, 5, 0, 0, 839, 840, 7, 0, 0, 0, 840, 841, 7, 11, 0, 0, 841, 842, + 7, 17, 0, 0, 842, 843, 7, 18, 0, 0, 843, 844, 7, 2, 0, 0, 844, 52, 1, 0, + 0, 0, 845, 846, 7, 14, 0, 0, 846, 847, 7, 17, 0, 0, 847, 848, 7, 11, 0, + 0, 848, 849, 7, 15, 0, 0, 849, 850, 7, 7, 0, 0, 850, 851, 7, 4, 0, 0, 851, + 54, 1, 0, 0, 0, 852, 853, 7, 14, 0, 0, 853, 854, 7, 17, 0, 0, 854, 855, + 7, 11, 0, 0, 855, 856, 7, 15, 0, 0, 856, 857, 7, 7, 0, 0, 857, 858, 7, + 4, 0, 0, 858, 859, 7, 2, 0, 0, 859, 56, 1, 0, 0, 0, 860, 861, 7, 14, 0, + 0, 861, 862, 7, 17, 0, 0, 862, 863, 7, 7, 0, 0, 863, 864, 7, 7, 0, 0, 864, + 865, 7, 3, 0, 0, 865, 866, 7, 4, 0, 0, 866, 867, 7, 5, 0, 0, 867, 58, 1, + 0, 0, 0, 868, 869, 7, 14, 0, 0, 869, 870, 7, 17, 0, 0, 870, 871, 7, 7, + 0, 0, 871, 872, 7, 7, 0, 0, 872, 873, 7, 8, 0, 0, 873, 874, 7, 5, 0, 0, + 874, 60, 1, 0, 0, 0, 875, 876, 7, 14, 0, 0, 876, 877, 7, 17, 0, 0, 877, + 878, 7, 7, 0, 0, 878, 879, 7, 7, 0, 0, 879, 880, 7, 8, 0, 0, 880, 881, + 7, 5, 0, 0, 881, 882, 7, 5, 0, 0, 882, 883, 7, 3, 0, 0, 883, 884, 7, 6, + 0, 0, 884, 62, 1, 0, 0, 0, 885, 886, 7, 14, 0, 0, 886, 887, 7, 17, 0, 0, + 887, 888, 7, 4, 0, 0, 888, 889, 7, 6, 0, 0, 889, 890, 7, 8, 0, 0, 890, + 891, 7, 5, 0, 0, 891, 892, 7, 8, 0, 0, 892, 893, 7, 17, 0, 0, 893, 894, + 7, 4, 0, 0, 894, 895, 7, 0, 0, 0, 895, 896, 7, 11, 0, 0, 896, 64, 1, 0, + 0, 0, 897, 898, 7, 14, 0, 0, 898, 899, 7, 17, 0, 0, 899, 900, 7, 4, 0, + 0, 900, 901, 7, 2, 0, 0, 901, 902, 7, 5, 0, 0, 902, 903, 7, 10, 0, 0, 903, + 904, 7, 0, 0, 0, 904, 905, 7, 8, 0, 0, 905, 906, 7, 4, 0, 0, 906, 907, + 7, 5, 0, 0, 907, 66, 1, 0, 0, 0, 908, 909, 7, 14, 0, 0, 909, 910, 7, 17, + 0, 0, 910, 911, 7, 15, 0, 0, 911, 912, 7, 4, 0, 0, 912, 913, 7, 5, 0, 0, + 913, 68, 1, 0, 0, 0, 914, 915, 7, 14, 0, 0, 915, 916, 7, 17, 0, 0, 916, + 917, 7, 20, 0, 0, 917, 918, 7, 0, 0, 0, 918, 919, 7, 10, 0, 0, 919, 920, + 7, 5, 0, 0, 920, 921, 7, 8, 0, 0, 921, 922, 7, 5, 0, 0, 922, 923, 7, 8, + 0, 0, 923, 924, 7, 17, 0, 0, 924, 925, 7, 4, 0, 0, 925, 70, 1, 0, 0, 0, + 926, 927, 7, 14, 0, 0, 927, 928, 7, 10, 0, 0, 928, 929, 7, 3, 0, 0, 929, + 930, 7, 0, 0, 0, 930, 931, 7, 5, 0, 0, 931, 932, 7, 3, 0, 0, 932, 72, 1, + 0, 0, 0, 933, 934, 7, 14, 0, 0, 934, 935, 7, 10, 0, 0, 935, 936, 7, 17, + 0, 0, 936, 937, 7, 2, 0, 0, 937, 938, 7, 2, 0, 0, 938, 74, 1, 0, 0, 0, + 939, 940, 7, 14, 0, 0, 940, 941, 7, 15, 0, 0, 941, 942, 7, 1, 0, 0, 942, + 943, 7, 3, 0, 0, 943, 76, 1, 0, 0, 0, 944, 945, 7, 14, 0, 0, 945, 946, + 7, 15, 0, 0, 946, 947, 7, 10, 0, 0, 947, 948, 7, 10, 0, 0, 948, 949, 7, + 3, 0, 0, 949, 950, 7, 4, 0, 0, 950, 951, 7, 5, 0, 0, 951, 78, 1, 0, 0, + 0, 952, 953, 7, 14, 0, 0, 953, 954, 7, 15, 0, 0, 954, 955, 7, 10, 0, 0, + 955, 956, 7, 10, 0, 0, 956, 957, 7, 3, 0, 0, 957, 958, 7, 4, 0, 0, 958, + 959, 7, 5, 0, 0, 959, 960, 5, 95, 0, 0, 960, 961, 7, 14, 0, 0, 961, 962, + 7, 0, 0, 0, 962, 963, 7, 5, 0, 0, 963, 964, 7, 0, 0, 0, 964, 965, 7, 11, + 0, 0, 965, 966, 7, 17, 0, 0, 966, 967, 7, 18, 0, 0, 967, 80, 1, 0, 0, 0, + 968, 969, 7, 14, 0, 0, 969, 970, 7, 15, 0, 0, 970, 971, 7, 10, 0, 0, 971, + 972, 7, 10, 0, 0, 972, 973, 7, 3, 0, 0, 973, 974, 7, 4, 0, 0, 974, 975, + 7, 5, 0, 0, 975, 976, 5, 95, 0, 0, 976, 977, 7, 6, 0, 0, 977, 978, 7, 0, + 0, 0, 978, 979, 7, 5, 0, 0, 979, 980, 7, 3, 0, 0, 980, 82, 1, 0, 0, 0, + 981, 982, 7, 14, 0, 0, 982, 983, 7, 15, 0, 0, 983, 984, 7, 10, 0, 0, 984, + 985, 7, 10, 0, 0, 985, 986, 7, 3, 0, 0, 986, 987, 7, 4, 0, 0, 987, 988, + 7, 5, 0, 0, 988, 989, 5, 95, 0, 0, 989, 990, 7, 20, 0, 0, 990, 991, 7, + 0, 0, 0, 991, 992, 7, 5, 0, 0, 992, 993, 7, 16, 0, 0, 993, 84, 1, 0, 0, + 0, 994, 995, 7, 14, 0, 0, 995, 996, 7, 15, 0, 0, 996, 997, 7, 10, 0, 0, + 997, 998, 7, 10, 0, 0, 998, 999, 7, 3, 0, 0, 999, 1000, 7, 4, 0, 0, 1000, + 1001, 7, 5, 0, 0, 1001, 1002, 5, 95, 0, 0, 1002, 1003, 7, 10, 0, 0, 1003, + 1004, 7, 17, 0, 0, 1004, 1005, 7, 11, 0, 0, 1005, 1006, 7, 3, 0, 0, 1006, + 86, 1, 0, 0, 0, 1007, 1008, 7, 14, 0, 0, 1008, 1009, 7, 15, 0, 0, 1009, + 1010, 7, 10, 0, 0, 1010, 1011, 7, 10, 0, 0, 1011, 1012, 7, 3, 0, 0, 1012, + 1013, 7, 4, 0, 0, 1013, 1014, 7, 5, 0, 0, 1014, 1015, 5, 95, 0, 0, 1015, + 1016, 7, 2, 0, 0, 1016, 1017, 7, 14, 0, 0, 1017, 1018, 7, 16, 0, 0, 1018, + 1019, 7, 3, 0, 0, 1019, 1020, 7, 7, 0, 0, 1020, 1021, 7, 0, 0, 0, 1021, + 88, 1, 0, 0, 0, 1022, 1023, 7, 14, 0, 0, 1023, 1024, 7, 15, 0, 0, 1024, + 1025, 7, 10, 0, 0, 1025, 1026, 7, 10, 0, 0, 1026, 1027, 7, 3, 0, 0, 1027, + 1028, 7, 4, 0, 0, 1028, 1029, 7, 5, 0, 0, 1029, 1030, 5, 95, 0, 0, 1030, + 1031, 7, 5, 0, 0, 1031, 1032, 7, 8, 0, 0, 1032, 1033, 7, 7, 0, 0, 1033, + 1034, 7, 3, 0, 0, 1034, 90, 1, 0, 0, 0, 1035, 1036, 7, 14, 0, 0, 1036, + 1037, 7, 15, 0, 0, 1037, 1038, 7, 10, 0, 0, 1038, 1039, 7, 10, 0, 0, 1039, + 1040, 7, 3, 0, 0, 1040, 1041, 7, 4, 0, 0, 1041, 1042, 7, 5, 0, 0, 1042, + 1043, 5, 95, 0, 0, 1043, 1044, 7, 5, 0, 0, 1044, 1045, 7, 8, 0, 0, 1045, + 1046, 7, 7, 0, 0, 1046, 1047, 7, 3, 0, 0, 1047, 1048, 7, 2, 0, 0, 1048, + 1049, 7, 5, 0, 0, 1049, 1050, 7, 0, 0, 0, 1050, 1051, 7, 7, 0, 0, 1051, + 1052, 7, 20, 0, 0, 1052, 92, 1, 0, 0, 0, 1053, 1054, 7, 14, 0, 0, 1054, + 1055, 7, 15, 0, 0, 1055, 1056, 7, 10, 0, 0, 1056, 1057, 7, 10, 0, 0, 1057, + 1058, 7, 3, 0, 0, 1058, 1059, 7, 4, 0, 0, 1059, 1060, 7, 5, 0, 0, 1060, + 1061, 5, 95, 0, 0, 1061, 1062, 7, 15, 0, 0, 1062, 1063, 7, 2, 0, 0, 1063, + 1064, 7, 3, 0, 0, 1064, 1065, 7, 10, 0, 0, 1065, 94, 1, 0, 0, 0, 1066, + 1067, 7, 6, 0, 0, 1067, 1068, 7, 0, 0, 0, 1068, 1069, 7, 5, 0, 0, 1069, + 1070, 7, 0, 0, 0, 1070, 96, 1, 0, 0, 0, 1071, 1072, 7, 6, 0, 0, 1072, 1073, + 7, 0, 0, 0, 1073, 1074, 7, 5, 0, 0, 1074, 1075, 7, 3, 0, 0, 1075, 98, 1, + 0, 0, 0, 1076, 1077, 7, 6, 0, 0, 1077, 1078, 7, 0, 0, 0, 1078, 1079, 7, + 12, 0, 0, 1079, 100, 1, 0, 0, 0, 1080, 1081, 7, 6, 0, 0, 1081, 1082, 7, + 3, 0, 0, 1082, 1083, 7, 0, 0, 0, 1083, 1084, 7, 11, 0, 0, 1084, 1085, 7, + 11, 0, 0, 1085, 1086, 7, 17, 0, 0, 1086, 1087, 7, 14, 0, 0, 1087, 1088, + 7, 0, 0, 0, 1088, 1089, 7, 5, 0, 0, 1089, 1090, 7, 3, 0, 0, 1090, 102, + 1, 0, 0, 0, 1091, 1092, 7, 6, 0, 0, 1092, 1093, 7, 3, 0, 0, 1093, 1094, + 7, 14, 0, 0, 1094, 1095, 7, 11, 0, 0, 1095, 1096, 7, 0, 0, 0, 1096, 1097, + 7, 10, 0, 0, 1097, 1098, 7, 3, 0, 0, 1098, 104, 1, 0, 0, 0, 1099, 1100, + 7, 6, 0, 0, 1100, 1101, 7, 3, 0, 0, 1101, 1102, 7, 9, 0, 0, 1102, 1103, + 7, 0, 0, 0, 1103, 1104, 7, 15, 0, 0, 1104, 1105, 7, 11, 0, 0, 1105, 1106, + 7, 5, 0, 0, 1106, 106, 1, 0, 0, 0, 1107, 1108, 7, 6, 0, 0, 1108, 1109, + 7, 3, 0, 0, 1109, 1110, 7, 9, 0, 0, 1110, 1111, 7, 8, 0, 0, 1111, 1112, + 7, 4, 0, 0, 1112, 1113, 7, 3, 0, 0, 1113, 108, 1, 0, 0, 0, 1114, 1115, + 7, 6, 0, 0, 1115, 1116, 7, 3, 0, 0, 1116, 1117, 7, 9, 0, 0, 1117, 1118, + 7, 8, 0, 0, 1118, 1119, 7, 4, 0, 0, 1119, 1120, 7, 3, 0, 0, 1120, 1121, + 7, 10, 0, 0, 1121, 110, 1, 0, 0, 0, 1122, 1123, 7, 6, 0, 0, 1123, 1124, + 7, 3, 0, 0, 1124, 1125, 7, 11, 0, 0, 1125, 1126, 7, 3, 0, 0, 1126, 1127, + 7, 5, 0, 0, 1127, 1128, 7, 3, 0, 0, 1128, 112, 1, 0, 0, 0, 1129, 1130, + 7, 6, 0, 0, 1130, 1131, 7, 3, 0, 0, 1131, 1132, 7, 4, 0, 0, 1132, 1133, + 7, 12, 0, 0, 1133, 114, 1, 0, 0, 0, 1134, 1135, 7, 6, 0, 0, 1135, 1136, + 7, 3, 0, 0, 1136, 1137, 7, 2, 0, 0, 1137, 1138, 7, 14, 0, 0, 1138, 116, + 1, 0, 0, 0, 1139, 1140, 7, 6, 0, 0, 1140, 1141, 7, 3, 0, 0, 1141, 1142, + 7, 2, 0, 0, 1142, 1143, 7, 14, 0, 0, 1143, 1144, 7, 10, 0, 0, 1144, 1145, + 7, 8, 0, 0, 1145, 1146, 7, 1, 0, 0, 1146, 1147, 7, 3, 0, 0, 1147, 118, + 1, 0, 0, 0, 1148, 1149, 7, 6, 0, 0, 1149, 1150, 7, 3, 0, 0, 1150, 1151, + 7, 2, 0, 0, 1151, 1152, 7, 14, 0, 0, 1152, 1153, 7, 10, 0, 0, 1153, 1154, + 7, 8, 0, 0, 1154, 1155, 7, 20, 0, 0, 1155, 1156, 7, 5, 0, 0, 1156, 1157, + 7, 17, 0, 0, 1157, 1158, 7, 10, 0, 0, 1158, 120, 1, 0, 0, 0, 1159, 1160, + 7, 6, 0, 0, 1160, 1161, 7, 3, 0, 0, 1161, 1162, 7, 5, 0, 0, 1162, 1163, + 7, 3, 0, 0, 1163, 1164, 7, 10, 0, 0, 1164, 1165, 7, 7, 0, 0, 1165, 1166, + 7, 8, 0, 0, 1166, 1167, 7, 4, 0, 0, 1167, 1168, 7, 8, 0, 0, 1168, 1169, + 7, 2, 0, 0, 1169, 1170, 7, 5, 0, 0, 1170, 1171, 7, 8, 0, 0, 1171, 1172, + 7, 14, 0, 0, 1172, 122, 1, 0, 0, 0, 1173, 1174, 7, 6, 0, 0, 1174, 1175, + 7, 8, 0, 0, 1175, 1176, 7, 2, 0, 0, 1176, 1177, 7, 5, 0, 0, 1177, 1178, + 7, 8, 0, 0, 1178, 1179, 7, 4, 0, 0, 1179, 1180, 7, 14, 0, 0, 1180, 1181, + 7, 5, 0, 0, 1181, 124, 1, 0, 0, 0, 1182, 1183, 7, 6, 0, 0, 1183, 1184, + 7, 8, 0, 0, 1184, 1185, 7, 2, 0, 0, 1185, 1186, 7, 5, 0, 0, 1186, 1187, + 7, 10, 0, 0, 1187, 1188, 7, 8, 0, 0, 1188, 1189, 7, 1, 0, 0, 1189, 1190, + 7, 15, 0, 0, 1190, 1191, 7, 5, 0, 0, 1191, 1192, 7, 3, 0, 0, 1192, 1193, + 7, 6, 0, 0, 1193, 126, 1, 0, 0, 0, 1194, 1195, 7, 6, 0, 0, 1195, 1196, + 7, 17, 0, 0, 1196, 128, 1, 0, 0, 0, 1197, 1198, 7, 6, 0, 0, 1198, 1199, + 7, 17, 0, 0, 1199, 1200, 7, 15, 0, 0, 1200, 1201, 7, 1, 0, 0, 1201, 1202, + 7, 11, 0, 0, 1202, 1203, 7, 3, 0, 0, 1203, 130, 1, 0, 0, 0, 1204, 1205, + 7, 6, 0, 0, 1205, 1206, 7, 10, 0, 0, 1206, 1207, 7, 17, 0, 0, 1207, 1208, + 7, 20, 0, 0, 1208, 132, 1, 0, 0, 0, 1209, 1210, 7, 3, 0, 0, 1210, 1211, + 7, 11, 0, 0, 1211, 1212, 7, 2, 0, 0, 1212, 1213, 7, 3, 0, 0, 1213, 134, + 1, 0, 0, 0, 1214, 1215, 7, 3, 0, 0, 1215, 1216, 7, 7, 0, 0, 1216, 1217, + 7, 20, 0, 0, 1217, 1218, 7, 5, 0, 0, 1218, 1219, 7, 12, 0, 0, 1219, 136, + 1, 0, 0, 0, 1220, 1221, 7, 3, 0, 0, 1221, 1222, 7, 11, 0, 0, 1222, 1223, + 7, 2, 0, 0, 1223, 1224, 7, 3, 0, 0, 1224, 1225, 7, 8, 0, 0, 1225, 1226, + 7, 9, 0, 0, 1226, 138, 1, 0, 0, 0, 1227, 1228, 7, 3, 0, 0, 1228, 1229, + 7, 4, 0, 0, 1229, 1230, 7, 14, 0, 0, 1230, 1231, 7, 17, 0, 0, 1231, 1232, + 7, 6, 0, 0, 1232, 1233, 7, 8, 0, 0, 1233, 1234, 7, 4, 0, 0, 1234, 1235, + 7, 18, 0, 0, 1235, 140, 1, 0, 0, 0, 1236, 1237, 7, 3, 0, 0, 1237, 1238, + 7, 4, 0, 0, 1238, 1239, 7, 6, 0, 0, 1239, 142, 1, 0, 0, 0, 1240, 1241, + 7, 3, 0, 0, 1241, 1242, 7, 10, 0, 0, 1242, 1243, 7, 10, 0, 0, 1243, 1244, + 7, 17, 0, 0, 1244, 1245, 7, 10, 0, 0, 1245, 144, 1, 0, 0, 0, 1246, 1247, + 7, 3, 0, 0, 1247, 1248, 7, 2, 0, 0, 1248, 1249, 7, 14, 0, 0, 1249, 1250, + 7, 0, 0, 0, 1250, 1251, 7, 20, 0, 0, 1251, 1252, 7, 3, 0, 0, 1252, 146, + 1, 0, 0, 0, 1253, 1254, 7, 3, 0, 0, 1254, 1255, 7, 21, 0, 0, 1255, 1256, + 7, 14, 0, 0, 1256, 1257, 7, 3, 0, 0, 1257, 1258, 7, 20, 0, 0, 1258, 1259, + 7, 5, 0, 0, 1259, 148, 1, 0, 0, 0, 1260, 1261, 7, 3, 0, 0, 1261, 1262, + 7, 21, 0, 0, 1262, 1263, 7, 14, 0, 0, 1263, 1264, 7, 11, 0, 0, 1264, 1265, + 7, 15, 0, 0, 1265, 1266, 7, 6, 0, 0, 1266, 1267, 7, 8, 0, 0, 1267, 1268, + 7, 4, 0, 0, 1268, 1269, 7, 18, 0, 0, 1269, 150, 1, 0, 0, 0, 1270, 1271, + 7, 3, 0, 0, 1271, 1272, 7, 21, 0, 0, 1272, 1273, 7, 3, 0, 0, 1273, 1274, + 7, 14, 0, 0, 1274, 1275, 7, 15, 0, 0, 1275, 1276, 7, 5, 0, 0, 1276, 1277, + 7, 3, 0, 0, 1277, 152, 1, 0, 0, 0, 1278, 1279, 7, 3, 0, 0, 1279, 1280, + 7, 21, 0, 0, 1280, 1281, 7, 8, 0, 0, 1281, 1282, 7, 2, 0, 0, 1282, 1283, + 7, 5, 0, 0, 1283, 1284, 7, 2, 0, 0, 1284, 154, 1, 0, 0, 0, 1285, 1286, + 7, 3, 0, 0, 1286, 1287, 7, 21, 0, 0, 1287, 1288, 7, 20, 0, 0, 1288, 1289, + 7, 11, 0, 0, 1289, 1290, 7, 0, 0, 0, 1290, 1291, 7, 8, 0, 0, 1291, 1292, + 7, 4, 0, 0, 1292, 156, 1, 0, 0, 0, 1293, 1294, 7, 3, 0, 0, 1294, 1295, + 7, 21, 0, 0, 1295, 1296, 7, 5, 0, 0, 1296, 1297, 7, 10, 0, 0, 1297, 1298, + 7, 0, 0, 0, 1298, 1299, 7, 14, 0, 0, 1299, 1300, 7, 5, 0, 0, 1300, 158, + 1, 0, 0, 0, 1301, 1302, 7, 9, 0, 0, 1302, 1303, 7, 0, 0, 0, 1303, 1304, + 7, 11, 0, 0, 1304, 1305, 7, 2, 0, 0, 1305, 1306, 7, 3, 0, 0, 1306, 160, + 1, 0, 0, 0, 1307, 1308, 7, 9, 0, 0, 1308, 1309, 7, 3, 0, 0, 1309, 1310, + 7, 5, 0, 0, 1310, 1311, 7, 14, 0, 0, 1311, 1312, 7, 16, 0, 0, 1312, 162, + 1, 0, 0, 0, 1313, 1314, 7, 9, 0, 0, 1314, 1315, 7, 8, 0, 0, 1315, 1316, + 7, 11, 0, 0, 1316, 1317, 7, 5, 0, 0, 1317, 1318, 7, 3, 0, 0, 1318, 1319, + 7, 10, 0, 0, 1319, 164, 1, 0, 0, 0, 1320, 1321, 7, 9, 0, 0, 1321, 1322, + 7, 8, 0, 0, 1322, 1323, 7, 4, 0, 0, 1323, 1324, 7, 0, 0, 0, 1324, 1325, + 7, 11, 0, 0, 1325, 166, 1, 0, 0, 0, 1326, 1327, 7, 9, 0, 0, 1327, 1328, + 7, 8, 0, 0, 1328, 1329, 7, 10, 0, 0, 1329, 1330, 7, 2, 0, 0, 1330, 1331, + 7, 5, 0, 0, 1331, 168, 1, 0, 0, 0, 1332, 1333, 7, 9, 0, 0, 1333, 1334, + 7, 17, 0, 0, 1334, 1335, 7, 11, 0, 0, 1335, 1336, 7, 11, 0, 0, 1336, 1337, + 7, 17, 0, 0, 1337, 1338, 7, 19, 0, 0, 1338, 1339, 7, 8, 0, 0, 1339, 1340, + 7, 4, 0, 0, 1340, 1341, 7, 18, 0, 0, 1341, 170, 1, 0, 0, 0, 1342, 1343, + 7, 9, 0, 0, 1343, 1344, 7, 17, 0, 0, 1344, 1345, 7, 10, 0, 0, 1345, 172, + 1, 0, 0, 0, 1346, 1347, 7, 9, 0, 0, 1347, 1348, 7, 17, 0, 0, 1348, 1349, + 7, 10, 0, 0, 1349, 1350, 7, 7, 0, 0, 1350, 1351, 7, 0, 0, 0, 1351, 1352, + 7, 5, 0, 0, 1352, 174, 1, 0, 0, 0, 1353, 1354, 7, 9, 0, 0, 1354, 1355, + 7, 10, 0, 0, 1355, 1356, 7, 17, 0, 0, 1356, 1357, 7, 7, 0, 0, 1357, 176, + 1, 0, 0, 0, 1358, 1359, 7, 9, 0, 0, 1359, 1360, 7, 15, 0, 0, 1360, 1361, + 7, 11, 0, 0, 1361, 1362, 7, 11, 0, 0, 1362, 178, 1, 0, 0, 0, 1363, 1364, + 7, 9, 0, 0, 1364, 1365, 7, 15, 0, 0, 1365, 1366, 7, 4, 0, 0, 1366, 1367, + 7, 14, 0, 0, 1367, 1368, 7, 5, 0, 0, 1368, 1369, 7, 8, 0, 0, 1369, 1370, + 7, 17, 0, 0, 1370, 1371, 7, 4, 0, 0, 1371, 180, 1, 0, 0, 0, 1372, 1373, + 7, 9, 0, 0, 1373, 1374, 7, 15, 0, 0, 1374, 1375, 7, 4, 0, 0, 1375, 1376, + 7, 14, 0, 0, 1376, 1377, 7, 5, 0, 0, 1377, 1378, 7, 8, 0, 0, 1378, 1379, + 7, 17, 0, 0, 1379, 1380, 7, 4, 0, 0, 1380, 1381, 7, 2, 0, 0, 1381, 182, + 1, 0, 0, 0, 1382, 1383, 7, 18, 0, 0, 1383, 1384, 7, 10, 0, 0, 1384, 1385, + 7, 0, 0, 0, 1385, 1386, 7, 14, 0, 0, 1386, 1387, 7, 3, 0, 0, 1387, 184, + 1, 0, 0, 0, 1388, 1389, 7, 18, 0, 0, 1389, 1390, 7, 10, 0, 0, 1390, 1391, + 7, 0, 0, 0, 1391, 1392, 7, 4, 0, 0, 1392, 1393, 7, 5, 0, 0, 1393, 186, + 1, 0, 0, 0, 1394, 1395, 7, 18, 0, 0, 1395, 1396, 7, 10, 0, 0, 1396, 1397, + 7, 0, 0, 0, 1397, 1398, 7, 4, 0, 0, 1398, 1399, 7, 5, 0, 0, 1399, 1400, + 7, 3, 0, 0, 1400, 1401, 7, 6, 0, 0, 1401, 188, 1, 0, 0, 0, 1402, 1403, + 7, 18, 0, 0, 1403, 1404, 7, 10, 0, 0, 1404, 1405, 7, 0, 0, 0, 1405, 1406, + 7, 4, 0, 0, 1406, 1407, 7, 5, 0, 0, 1407, 1408, 7, 2, 0, 0, 1408, 190, + 1, 0, 0, 0, 1409, 1410, 7, 18, 0, 0, 1410, 1411, 7, 10, 0, 0, 1411, 1412, + 7, 0, 0, 0, 1412, 1413, 7, 20, 0, 0, 1413, 1414, 7, 16, 0, 0, 1414, 1415, + 7, 22, 0, 0, 1415, 1416, 7, 8, 0, 0, 1416, 1417, 7, 13, 0, 0, 1417, 192, + 1, 0, 0, 0, 1418, 1419, 7, 18, 0, 0, 1419, 1420, 7, 10, 0, 0, 1420, 1421, + 7, 17, 0, 0, 1421, 1422, 7, 15, 0, 0, 1422, 1423, 7, 20, 0, 0, 1423, 194, + 1, 0, 0, 0, 1424, 1425, 7, 18, 0, 0, 1425, 1426, 7, 10, 0, 0, 1426, 1427, + 7, 17, 0, 0, 1427, 1428, 7, 15, 0, 0, 1428, 1429, 7, 20, 0, 0, 1429, 1430, + 7, 8, 0, 0, 1430, 1431, 7, 4, 0, 0, 1431, 1432, 7, 18, 0, 0, 1432, 196, + 1, 0, 0, 0, 1433, 1434, 7, 18, 0, 0, 1434, 1435, 7, 10, 0, 0, 1435, 1436, + 7, 17, 0, 0, 1436, 1437, 7, 15, 0, 0, 1437, 1438, 7, 20, 0, 0, 1438, 1439, + 7, 2, 0, 0, 1439, 198, 1, 0, 0, 0, 1440, 1441, 7, 16, 0, 0, 1441, 1442, + 7, 0, 0, 0, 1442, 1443, 7, 22, 0, 0, 1443, 1444, 7, 8, 0, 0, 1444, 1445, + 7, 4, 0, 0, 1445, 1446, 7, 18, 0, 0, 1446, 200, 1, 0, 0, 0, 1447, 1448, + 7, 16, 0, 0, 1448, 1449, 7, 17, 0, 0, 1449, 1450, 7, 15, 0, 0, 1450, 1451, + 7, 10, 0, 0, 1451, 202, 1, 0, 0, 0, 1452, 1453, 7, 8, 0, 0, 1453, 1454, + 7, 9, 0, 0, 1454, 204, 1, 0, 0, 0, 1455, 1456, 7, 8, 0, 0, 1456, 1457, + 7, 18, 0, 0, 1457, 1458, 7, 4, 0, 0, 1458, 1459, 7, 17, 0, 0, 1459, 1460, + 7, 10, 0, 0, 1460, 1461, 7, 3, 0, 0, 1461, 206, 1, 0, 0, 0, 1462, 1463, + 7, 8, 0, 0, 1463, 1464, 7, 7, 0, 0, 1464, 1465, 7, 7, 0, 0, 1465, 1466, + 7, 3, 0, 0, 1466, 1467, 7, 6, 0, 0, 1467, 1468, 7, 8, 0, 0, 1468, 1469, + 7, 0, 0, 0, 1469, 1470, 7, 5, 0, 0, 1470, 1471, 7, 3, 0, 0, 1471, 208, + 1, 0, 0, 0, 1472, 1473, 7, 8, 0, 0, 1473, 1474, 7, 4, 0, 0, 1474, 210, + 1, 0, 0, 0, 1475, 1476, 7, 8, 0, 0, 1476, 1477, 7, 4, 0, 0, 1477, 1478, + 7, 14, 0, 0, 1478, 1479, 7, 11, 0, 0, 1479, 1480, 7, 15, 0, 0, 1480, 1481, + 7, 6, 0, 0, 1481, 1482, 7, 8, 0, 0, 1482, 1483, 7, 4, 0, 0, 1483, 1484, + 7, 18, 0, 0, 1484, 212, 1, 0, 0, 0, 1485, 1486, 7, 8, 0, 0, 1486, 1487, + 7, 4, 0, 0, 1487, 1488, 7, 8, 0, 0, 1488, 1489, 7, 5, 0, 0, 1489, 1490, + 7, 8, 0, 0, 1490, 1491, 7, 0, 0, 0, 1491, 1492, 7, 11, 0, 0, 1492, 214, + 1, 0, 0, 0, 1493, 1494, 7, 8, 0, 0, 1494, 1495, 7, 4, 0, 0, 1495, 1496, + 7, 4, 0, 0, 1496, 1497, 7, 3, 0, 0, 1497, 1498, 7, 10, 0, 0, 1498, 216, + 1, 0, 0, 0, 1499, 1500, 7, 8, 0, 0, 1500, 1501, 7, 4, 0, 0, 1501, 1502, + 7, 20, 0, 0, 1502, 1503, 7, 15, 0, 0, 1503, 1504, 7, 5, 0, 0, 1504, 218, + 1, 0, 0, 0, 1505, 1506, 7, 8, 0, 0, 1506, 1507, 7, 4, 0, 0, 1507, 1508, + 7, 2, 0, 0, 1508, 1509, 7, 3, 0, 0, 1509, 1510, 7, 10, 0, 0, 1510, 1511, + 7, 5, 0, 0, 1511, 220, 1, 0, 0, 0, 1512, 1513, 7, 8, 0, 0, 1513, 1514, + 7, 4, 0, 0, 1514, 1515, 7, 5, 0, 0, 1515, 1516, 7, 3, 0, 0, 1516, 1517, + 7, 10, 0, 0, 1517, 1518, 7, 2, 0, 0, 1518, 1519, 7, 3, 0, 0, 1519, 1520, + 7, 14, 0, 0, 1520, 1521, 7, 5, 0, 0, 1521, 222, 1, 0, 0, 0, 1522, 1523, + 7, 8, 0, 0, 1523, 1524, 7, 4, 0, 0, 1524, 1525, 7, 5, 0, 0, 1525, 1526, + 7, 3, 0, 0, 1526, 1527, 7, 10, 0, 0, 1527, 1528, 7, 22, 0, 0, 1528, 1529, + 7, 0, 0, 0, 1529, 1530, 7, 11, 0, 0, 1530, 224, 1, 0, 0, 0, 1531, 1532, + 7, 8, 0, 0, 1532, 1533, 7, 4, 0, 0, 1533, 1534, 7, 5, 0, 0, 1534, 1535, + 7, 17, 0, 0, 1535, 226, 1, 0, 0, 0, 1536, 1537, 7, 8, 0, 0, 1537, 1538, + 7, 4, 0, 0, 1538, 1539, 7, 22, 0, 0, 1539, 1540, 7, 17, 0, 0, 1540, 1541, + 7, 23, 0, 0, 1541, 1542, 7, 3, 0, 0, 1542, 1543, 7, 10, 0, 0, 1543, 228, + 1, 0, 0, 0, 1544, 1545, 7, 8, 0, 0, 1545, 1546, 7, 17, 0, 0, 1546, 230, + 1, 0, 0, 0, 1547, 1548, 7, 8, 0, 0, 1548, 1549, 7, 2, 0, 0, 1549, 232, + 1, 0, 0, 0, 1550, 1551, 7, 8, 0, 0, 1551, 1552, 7, 2, 0, 0, 1552, 1553, + 7, 17, 0, 0, 1553, 1554, 7, 11, 0, 0, 1554, 1555, 7, 0, 0, 0, 1555, 1556, + 7, 5, 0, 0, 1556, 1557, 7, 8, 0, 0, 1557, 1558, 7, 17, 0, 0, 1558, 1559, + 7, 4, 0, 0, 1559, 234, 1, 0, 0, 0, 1560, 1561, 7, 8, 0, 0, 1561, 1562, + 7, 5, 0, 0, 1562, 1563, 7, 3, 0, 0, 1563, 1564, 7, 10, 0, 0, 1564, 1565, + 7, 0, 0, 0, 1565, 1566, 7, 5, 0, 0, 1566, 1567, 7, 3, 0, 0, 1567, 236, + 1, 0, 0, 0, 1568, 1569, 7, 24, 0, 0, 1569, 1570, 7, 17, 0, 0, 1570, 1571, + 7, 8, 0, 0, 1571, 1572, 7, 4, 0, 0, 1572, 238, 1, 0, 0, 0, 1573, 1574, + 7, 24, 0, 0, 1574, 1575, 7, 2, 0, 0, 1575, 1576, 7, 17, 0, 0, 1576, 1577, + 7, 4, 0, 0, 1577, 240, 1, 0, 0, 0, 1578, 1579, 7, 24, 0, 0, 1579, 1580, + 7, 2, 0, 0, 1580, 1581, 7, 17, 0, 0, 1581, 1582, 7, 4, 0, 0, 1582, 1583, + 5, 95, 0, 0, 1583, 1584, 7, 0, 0, 0, 1584, 1585, 7, 10, 0, 0, 1585, 1586, + 7, 10, 0, 0, 1586, 1587, 7, 0, 0, 0, 1587, 1588, 7, 12, 0, 0, 1588, 242, + 1, 0, 0, 0, 1589, 1590, 7, 24, 0, 0, 1590, 1591, 7, 2, 0, 0, 1591, 1592, + 7, 17, 0, 0, 1592, 1593, 7, 4, 0, 0, 1593, 1594, 5, 95, 0, 0, 1594, 1595, + 7, 3, 0, 0, 1595, 1596, 7, 21, 0, 0, 1596, 1597, 7, 8, 0, 0, 1597, 1598, + 7, 2, 0, 0, 1598, 1599, 7, 5, 0, 0, 1599, 1600, 7, 2, 0, 0, 1600, 244, + 1, 0, 0, 0, 1601, 1602, 7, 24, 0, 0, 1602, 1603, 7, 2, 0, 0, 1603, 1604, + 7, 17, 0, 0, 1604, 1605, 7, 4, 0, 0, 1605, 1606, 5, 95, 0, 0, 1606, 1607, + 7, 17, 0, 0, 1607, 1608, 7, 1, 0, 0, 1608, 1609, 7, 24, 0, 0, 1609, 1610, + 7, 3, 0, 0, 1610, 1611, 7, 14, 0, 0, 1611, 1612, 7, 5, 0, 0, 1612, 246, + 1, 0, 0, 0, 1613, 1614, 7, 24, 0, 0, 1614, 1615, 7, 2, 0, 0, 1615, 1616, + 7, 17, 0, 0, 1616, 1617, 7, 4, 0, 0, 1617, 1618, 5, 95, 0, 0, 1618, 1619, + 7, 25, 0, 0, 1619, 1620, 7, 15, 0, 0, 1620, 1621, 7, 3, 0, 0, 1621, 1622, + 7, 10, 0, 0, 1622, 1623, 7, 12, 0, 0, 1623, 248, 1, 0, 0, 0, 1624, 1625, + 7, 24, 0, 0, 1625, 1626, 7, 2, 0, 0, 1626, 1627, 7, 17, 0, 0, 1627, 1628, + 7, 4, 0, 0, 1628, 1629, 5, 95, 0, 0, 1629, 1630, 7, 5, 0, 0, 1630, 1631, + 7, 0, 0, 0, 1631, 1632, 7, 1, 0, 0, 1632, 1633, 7, 11, 0, 0, 1633, 1634, + 7, 3, 0, 0, 1634, 250, 1, 0, 0, 0, 1635, 1636, 7, 24, 0, 0, 1636, 1637, + 7, 2, 0, 0, 1637, 1638, 7, 17, 0, 0, 1638, 1639, 7, 4, 0, 0, 1639, 1640, + 5, 95, 0, 0, 1640, 1641, 7, 22, 0, 0, 1641, 1642, 7, 0, 0, 0, 1642, 1643, + 7, 11, 0, 0, 1643, 1644, 7, 15, 0, 0, 1644, 1645, 7, 3, 0, 0, 1645, 252, + 1, 0, 0, 0, 1646, 1647, 7, 23, 0, 0, 1647, 1648, 7, 3, 0, 0, 1648, 1649, + 7, 3, 0, 0, 1649, 1650, 7, 20, 0, 0, 1650, 254, 1, 0, 0, 0, 1651, 1652, + 7, 23, 0, 0, 1652, 1653, 7, 3, 0, 0, 1653, 1654, 7, 12, 0, 0, 1654, 256, + 1, 0, 0, 0, 1655, 1656, 7, 23, 0, 0, 1656, 1657, 7, 3, 0, 0, 1657, 1658, + 7, 12, 0, 0, 1658, 1659, 7, 2, 0, 0, 1659, 258, 1, 0, 0, 0, 1660, 1661, + 7, 11, 0, 0, 1661, 1662, 7, 0, 0, 0, 1662, 1663, 7, 4, 0, 0, 1663, 1664, + 7, 18, 0, 0, 1664, 1665, 7, 15, 0, 0, 1665, 1666, 7, 0, 0, 0, 1666, 1667, + 7, 18, 0, 0, 1667, 1668, 7, 3, 0, 0, 1668, 260, 1, 0, 0, 0, 1669, 1670, + 7, 11, 0, 0, 1670, 1671, 7, 0, 0, 0, 1671, 1672, 7, 2, 0, 0, 1672, 1673, + 7, 5, 0, 0, 1673, 262, 1, 0, 0, 0, 1674, 1675, 7, 11, 0, 0, 1675, 1676, + 7, 0, 0, 0, 1676, 1677, 7, 5, 0, 0, 1677, 1678, 7, 3, 0, 0, 1678, 1679, + 7, 10, 0, 0, 1679, 1680, 7, 0, 0, 0, 1680, 1681, 7, 11, 0, 0, 1681, 264, + 1, 0, 0, 0, 1682, 1683, 7, 11, 0, 0, 1683, 1684, 7, 3, 0, 0, 1684, 1685, + 7, 0, 0, 0, 1685, 1686, 7, 6, 0, 0, 1686, 1687, 7, 8, 0, 0, 1687, 1688, + 7, 4, 0, 0, 1688, 1689, 7, 18, 0, 0, 1689, 266, 1, 0, 0, 0, 1690, 1691, + 7, 11, 0, 0, 1691, 1692, 7, 3, 0, 0, 1692, 1693, 7, 0, 0, 0, 1693, 1694, + 7, 22, 0, 0, 1694, 1695, 7, 3, 0, 0, 1695, 268, 1, 0, 0, 0, 1696, 1697, + 7, 11, 0, 0, 1697, 1698, 7, 3, 0, 0, 1698, 1699, 7, 9, 0, 0, 1699, 1700, + 7, 5, 0, 0, 1700, 270, 1, 0, 0, 0, 1701, 1702, 7, 11, 0, 0, 1702, 1703, + 7, 3, 0, 0, 1703, 1704, 7, 22, 0, 0, 1704, 1705, 7, 3, 0, 0, 1705, 1706, + 7, 11, 0, 0, 1706, 272, 1, 0, 0, 0, 1707, 1708, 7, 11, 0, 0, 1708, 1709, + 7, 8, 0, 0, 1709, 1710, 7, 23, 0, 0, 1710, 1711, 7, 3, 0, 0, 1711, 274, + 1, 0, 0, 0, 1712, 1713, 7, 11, 0, 0, 1713, 1714, 7, 8, 0, 0, 1714, 1715, + 7, 7, 0, 0, 1715, 1716, 7, 8, 0, 0, 1716, 1717, 7, 5, 0, 0, 1717, 276, + 1, 0, 0, 0, 1718, 1719, 7, 11, 0, 0, 1719, 1720, 7, 8, 0, 0, 1720, 1721, + 7, 2, 0, 0, 1721, 1722, 7, 5, 0, 0, 1722, 1723, 7, 0, 0, 0, 1723, 1724, + 7, 18, 0, 0, 1724, 1725, 7, 18, 0, 0, 1725, 278, 1, 0, 0, 0, 1726, 1727, + 7, 11, 0, 0, 1727, 1728, 7, 17, 0, 0, 1728, 1729, 7, 14, 0, 0, 1729, 1730, + 7, 0, 0, 0, 1730, 1731, 7, 11, 0, 0, 1731, 280, 1, 0, 0, 0, 1732, 1733, + 7, 11, 0, 0, 1733, 1734, 7, 17, 0, 0, 1734, 1735, 7, 14, 0, 0, 1735, 1736, + 7, 0, 0, 0, 1736, 1737, 7, 11, 0, 0, 1737, 1738, 7, 5, 0, 0, 1738, 1739, + 7, 8, 0, 0, 1739, 1740, 7, 7, 0, 0, 1740, 1741, 7, 3, 0, 0, 1741, 282, + 1, 0, 0, 0, 1742, 1743, 7, 11, 0, 0, 1743, 1744, 7, 17, 0, 0, 1744, 1745, + 7, 14, 0, 0, 1745, 1746, 7, 0, 0, 0, 1746, 1747, 7, 11, 0, 0, 1747, 1748, + 7, 5, 0, 0, 1748, 1749, 7, 8, 0, 0, 1749, 1750, 7, 7, 0, 0, 1750, 1751, + 7, 3, 0, 0, 1751, 1752, 7, 2, 0, 0, 1752, 1753, 7, 5, 0, 0, 1753, 1754, + 7, 0, 0, 0, 1754, 1755, 7, 7, 0, 0, 1755, 1756, 7, 20, 0, 0, 1756, 284, + 1, 0, 0, 0, 1757, 1758, 7, 11, 0, 0, 1758, 1759, 7, 17, 0, 0, 1759, 1760, + 7, 18, 0, 0, 1760, 1761, 7, 8, 0, 0, 1761, 1762, 7, 14, 0, 0, 1762, 1763, + 7, 0, 0, 0, 1763, 1764, 7, 11, 0, 0, 1764, 286, 1, 0, 0, 0, 1765, 1766, + 7, 11, 0, 0, 1766, 1767, 7, 17, 0, 0, 1767, 1768, 7, 17, 0, 0, 1768, 1769, + 7, 20, 0, 0, 1769, 288, 1, 0, 0, 0, 1770, 1771, 7, 7, 0, 0, 1771, 1772, + 7, 0, 0, 0, 1772, 1773, 7, 20, 0, 0, 1773, 290, 1, 0, 0, 0, 1774, 1775, + 7, 7, 0, 0, 1775, 1776, 7, 0, 0, 0, 1776, 1777, 7, 5, 0, 0, 1777, 1778, + 7, 14, 0, 0, 1778, 1779, 7, 16, 0, 0, 1779, 292, 1, 0, 0, 0, 1780, 1781, + 7, 7, 0, 0, 1781, 1782, 7, 0, 0, 0, 1782, 1783, 7, 5, 0, 0, 1783, 1784, + 7, 14, 0, 0, 1784, 1785, 7, 16, 0, 0, 1785, 1786, 7, 3, 0, 0, 1786, 1787, + 7, 6, 0, 0, 1787, 294, 1, 0, 0, 0, 1788, 1789, 7, 7, 0, 0, 1789, 1790, + 7, 0, 0, 0, 1790, 1791, 7, 5, 0, 0, 1791, 1792, 7, 14, 0, 0, 1792, 1793, + 7, 16, 0, 0, 1793, 1794, 7, 3, 0, 0, 1794, 1795, 7, 2, 0, 0, 1795, 296, + 1, 0, 0, 0, 1796, 1797, 7, 7, 0, 0, 1797, 1798, 7, 0, 0, 0, 1798, 1799, + 7, 5, 0, 0, 1799, 1800, 7, 14, 0, 0, 1800, 1801, 7, 16, 0, 0, 1801, 1802, + 5, 95, 0, 0, 1802, 1803, 7, 10, 0, 0, 1803, 1804, 7, 3, 0, 0, 1804, 1805, + 7, 14, 0, 0, 1805, 1806, 7, 17, 0, 0, 1806, 1807, 7, 18, 0, 0, 1807, 1808, + 7, 4, 0, 0, 1808, 1809, 7, 8, 0, 0, 1809, 1810, 7, 13, 0, 0, 1810, 1811, + 7, 3, 0, 0, 1811, 298, 1, 0, 0, 0, 1812, 1813, 7, 7, 0, 0, 1813, 1814, + 7, 0, 0, 0, 1814, 1815, 7, 5, 0, 0, 1815, 1816, 7, 3, 0, 0, 1816, 1817, + 7, 10, 0, 0, 1817, 1818, 7, 8, 0, 0, 1818, 1819, 7, 0, 0, 0, 1819, 1820, + 7, 11, 0, 0, 1820, 1821, 7, 8, 0, 0, 1821, 1822, 7, 13, 0, 0, 1822, 1823, + 7, 3, 0, 0, 1823, 1824, 7, 6, 0, 0, 1824, 300, 1, 0, 0, 0, 1825, 1826, + 7, 7, 0, 0, 1826, 1827, 7, 3, 0, 0, 1827, 1828, 7, 0, 0, 0, 1828, 1829, + 7, 2, 0, 0, 1829, 1830, 7, 15, 0, 0, 1830, 1831, 7, 10, 0, 0, 1831, 1832, + 7, 3, 0, 0, 1832, 1833, 7, 2, 0, 0, 1833, 302, 1, 0, 0, 0, 1834, 1835, + 7, 7, 0, 0, 1835, 1836, 7, 3, 0, 0, 1836, 1837, 7, 10, 0, 0, 1837, 1838, + 7, 18, 0, 0, 1838, 1839, 7, 3, 0, 0, 1839, 304, 1, 0, 0, 0, 1840, 1841, + 7, 7, 0, 0, 1841, 1842, 7, 8, 0, 0, 1842, 1843, 7, 4, 0, 0, 1843, 1844, + 7, 15, 0, 0, 1844, 1845, 7, 5, 0, 0, 1845, 1846, 7, 3, 0, 0, 1846, 306, + 1, 0, 0, 0, 1847, 1848, 7, 7, 0, 0, 1848, 1849, 7, 17, 0, 0, 1849, 1850, + 7, 4, 0, 0, 1850, 1851, 7, 5, 0, 0, 1851, 1852, 7, 16, 0, 0, 1852, 308, + 1, 0, 0, 0, 1853, 1854, 7, 4, 0, 0, 1854, 1855, 7, 0, 0, 0, 1855, 1856, + 7, 5, 0, 0, 1856, 1857, 7, 15, 0, 0, 1857, 1858, 7, 10, 0, 0, 1858, 1859, + 7, 0, 0, 0, 1859, 1860, 7, 11, 0, 0, 1860, 310, 1, 0, 0, 0, 1861, 1862, + 7, 4, 0, 0, 1862, 1863, 7, 3, 0, 0, 1863, 1864, 7, 2, 0, 0, 1864, 1865, + 7, 5, 0, 0, 1865, 1866, 7, 3, 0, 0, 1866, 1867, 7, 6, 0, 0, 1867, 312, + 1, 0, 0, 0, 1868, 1869, 7, 4, 0, 0, 1869, 1870, 7, 3, 0, 0, 1870, 1871, + 7, 21, 0, 0, 1871, 1872, 7, 5, 0, 0, 1872, 314, 1, 0, 0, 0, 1873, 1874, + 7, 4, 0, 0, 1874, 1875, 7, 9, 0, 0, 1875, 1876, 7, 14, 0, 0, 1876, 316, + 1, 0, 0, 0, 1877, 1878, 7, 4, 0, 0, 1878, 1879, 7, 9, 0, 0, 1879, 1880, + 7, 6, 0, 0, 1880, 318, 1, 0, 0, 0, 1881, 1882, 7, 4, 0, 0, 1882, 1883, + 7, 9, 0, 0, 1883, 1884, 7, 23, 0, 0, 1884, 1885, 7, 14, 0, 0, 1885, 320, + 1, 0, 0, 0, 1886, 1887, 7, 4, 0, 0, 1887, 1888, 7, 9, 0, 0, 1888, 1889, + 7, 23, 0, 0, 1889, 1890, 7, 6, 0, 0, 1890, 322, 1, 0, 0, 0, 1891, 1892, + 7, 4, 0, 0, 1892, 1893, 7, 17, 0, 0, 1893, 324, 1, 0, 0, 0, 1894, 1895, + 7, 4, 0, 0, 1895, 1896, 7, 17, 0, 0, 1896, 1897, 7, 4, 0, 0, 1897, 1898, + 7, 3, 0, 0, 1898, 326, 1, 0, 0, 0, 1899, 1900, 7, 4, 0, 0, 1900, 1901, + 7, 17, 0, 0, 1901, 1902, 7, 10, 0, 0, 1902, 1903, 7, 7, 0, 0, 1903, 1904, + 7, 0, 0, 0, 1904, 1905, 7, 11, 0, 0, 1905, 1906, 7, 8, 0, 0, 1906, 1907, + 7, 13, 0, 0, 1907, 1908, 7, 3, 0, 0, 1908, 328, 1, 0, 0, 0, 1909, 1910, + 7, 4, 0, 0, 1910, 1911, 7, 17, 0, 0, 1911, 1912, 7, 5, 0, 0, 1912, 330, + 1, 0, 0, 0, 1913, 1914, 7, 4, 0, 0, 1914, 1915, 7, 15, 0, 0, 1915, 1916, + 7, 11, 0, 0, 1916, 1917, 7, 11, 0, 0, 1917, 332, 1, 0, 0, 0, 1918, 1919, + 7, 4, 0, 0, 1919, 1920, 7, 15, 0, 0, 1920, 1921, 7, 11, 0, 0, 1921, 1922, + 7, 11, 0, 0, 1922, 1923, 7, 8, 0, 0, 1923, 1924, 7, 9, 0, 0, 1924, 334, + 1, 0, 0, 0, 1925, 1926, 7, 4, 0, 0, 1926, 1927, 7, 15, 0, 0, 1927, 1928, + 7, 11, 0, 0, 1928, 1929, 7, 11, 0, 0, 1929, 1930, 7, 2, 0, 0, 1930, 336, + 1, 0, 0, 0, 1931, 1932, 7, 17, 0, 0, 1932, 1933, 7, 1, 0, 0, 1933, 1934, + 7, 24, 0, 0, 1934, 1935, 7, 3, 0, 0, 1935, 1936, 7, 14, 0, 0, 1936, 1937, + 7, 5, 0, 0, 1937, 338, 1, 0, 0, 0, 1938, 1939, 7, 17, 0, 0, 1939, 1940, + 7, 9, 0, 0, 1940, 340, 1, 0, 0, 0, 1941, 1942, 7, 17, 0, 0, 1942, 1943, + 7, 9, 0, 0, 1943, 1944, 7, 9, 0, 0, 1944, 1945, 7, 2, 0, 0, 1945, 1946, + 7, 3, 0, 0, 1946, 1947, 7, 5, 0, 0, 1947, 342, 1, 0, 0, 0, 1948, 1949, + 7, 17, 0, 0, 1949, 1950, 7, 7, 0, 0, 1950, 1951, 7, 8, 0, 0, 1951, 1952, + 7, 5, 0, 0, 1952, 344, 1, 0, 0, 0, 1953, 1954, 7, 17, 0, 0, 1954, 1955, + 7, 4, 0, 0, 1955, 346, 1, 0, 0, 0, 1956, 1957, 7, 17, 0, 0, 1957, 1958, + 7, 4, 0, 0, 1958, 1959, 7, 3, 0, 0, 1959, 348, 1, 0, 0, 0, 1960, 1961, + 7, 17, 0, 0, 1961, 1962, 7, 4, 0, 0, 1962, 1963, 7, 11, 0, 0, 1963, 1964, + 7, 12, 0, 0, 1964, 350, 1, 0, 0, 0, 1965, 1966, 7, 17, 0, 0, 1966, 1967, + 7, 20, 0, 0, 1967, 1968, 7, 5, 0, 0, 1968, 1969, 7, 8, 0, 0, 1969, 1970, + 7, 17, 0, 0, 1970, 1971, 7, 4, 0, 0, 1971, 352, 1, 0, 0, 0, 1972, 1973, + 7, 17, 0, 0, 1973, 1974, 7, 10, 0, 0, 1974, 354, 1, 0, 0, 0, 1975, 1976, + 7, 17, 0, 0, 1976, 1977, 7, 10, 0, 0, 1977, 1978, 7, 6, 0, 0, 1978, 1979, + 7, 3, 0, 0, 1979, 1980, 7, 10, 0, 0, 1980, 356, 1, 0, 0, 0, 1981, 1982, + 7, 17, 0, 0, 1982, 1983, 7, 10, 0, 0, 1983, 1984, 7, 6, 0, 0, 1984, 1985, + 7, 8, 0, 0, 1985, 1986, 7, 4, 0, 0, 1986, 1987, 7, 0, 0, 0, 1987, 1988, + 7, 11, 0, 0, 1988, 1989, 7, 8, 0, 0, 1989, 1990, 7, 5, 0, 0, 1990, 1991, + 7, 12, 0, 0, 1991, 358, 1, 0, 0, 0, 1992, 1993, 7, 17, 0, 0, 1993, 1994, + 7, 15, 0, 0, 1994, 1995, 7, 5, 0, 0, 1995, 1996, 7, 3, 0, 0, 1996, 1997, + 7, 10, 0, 0, 1997, 360, 1, 0, 0, 0, 1998, 1999, 7, 17, 0, 0, 1999, 2000, + 7, 15, 0, 0, 2000, 2001, 7, 5, 0, 0, 2001, 2002, 7, 20, 0, 0, 2002, 2003, + 7, 15, 0, 0, 2003, 2004, 7, 5, 0, 0, 2004, 362, 1, 0, 0, 0, 2005, 2006, + 7, 17, 0, 0, 2006, 2007, 7, 22, 0, 0, 2007, 2008, 7, 3, 0, 0, 2008, 2009, + 7, 10, 0, 0, 2009, 364, 1, 0, 0, 0, 2010, 2011, 7, 17, 0, 0, 2011, 2012, + 7, 22, 0, 0, 2012, 2013, 7, 3, 0, 0, 2013, 2014, 7, 10, 0, 0, 2014, 2015, + 7, 9, 0, 0, 2015, 2016, 7, 11, 0, 0, 2016, 2017, 7, 17, 0, 0, 2017, 2018, + 7, 19, 0, 0, 2018, 366, 1, 0, 0, 0, 2019, 2020, 7, 20, 0, 0, 2020, 2021, + 7, 0, 0, 0, 2021, 2022, 7, 10, 0, 0, 2022, 2023, 7, 5, 0, 0, 2023, 2024, + 7, 8, 0, 0, 2024, 2025, 7, 5, 0, 0, 2025, 2026, 7, 8, 0, 0, 2026, 2027, + 7, 17, 0, 0, 2027, 2028, 7, 4, 0, 0, 2028, 368, 1, 0, 0, 0, 2029, 2030, + 7, 20, 0, 0, 2030, 2031, 7, 0, 0, 0, 2031, 2032, 7, 10, 0, 0, 2032, 2033, + 7, 5, 0, 0, 2033, 2034, 7, 8, 0, 0, 2034, 2035, 7, 5, 0, 0, 2035, 2036, + 7, 8, 0, 0, 2036, 2037, 7, 17, 0, 0, 2037, 2038, 7, 4, 0, 0, 2038, 2039, + 7, 2, 0, 0, 2039, 370, 1, 0, 0, 0, 2040, 2041, 7, 20, 0, 0, 2041, 2042, + 7, 0, 0, 0, 2042, 2043, 7, 2, 0, 0, 2043, 2044, 7, 2, 0, 0, 2044, 2045, + 7, 8, 0, 0, 2045, 2046, 7, 4, 0, 0, 2046, 2047, 7, 18, 0, 0, 2047, 372, + 1, 0, 0, 0, 2048, 2049, 7, 20, 0, 0, 2049, 2050, 7, 0, 0, 0, 2050, 2051, + 7, 2, 0, 0, 2051, 2052, 7, 5, 0, 0, 2052, 374, 1, 0, 0, 0, 2053, 2054, + 7, 20, 0, 0, 2054, 2055, 7, 0, 0, 0, 2055, 2056, 7, 5, 0, 0, 2056, 2057, + 7, 16, 0, 0, 2057, 376, 1, 0, 0, 0, 2058, 2059, 7, 20, 0, 0, 2059, 2060, + 7, 0, 0, 0, 2060, 2061, 7, 5, 0, 0, 2061, 2062, 7, 5, 0, 0, 2062, 2063, + 7, 3, 0, 0, 2063, 2064, 7, 10, 0, 0, 2064, 2065, 7, 4, 0, 0, 2065, 378, + 1, 0, 0, 0, 2066, 2067, 7, 20, 0, 0, 2067, 2068, 7, 3, 0, 0, 2068, 2069, + 7, 10, 0, 0, 2069, 380, 1, 0, 0, 0, 2070, 2071, 7, 20, 0, 0, 2071, 2072, + 7, 3, 0, 0, 2072, 2073, 7, 10, 0, 0, 2073, 2074, 7, 8, 0, 0, 2074, 2075, + 7, 17, 0, 0, 2075, 2076, 7, 6, 0, 0, 2076, 382, 1, 0, 0, 0, 2077, 2078, + 7, 20, 0, 0, 2078, 2079, 7, 3, 0, 0, 2079, 2080, 7, 10, 0, 0, 2080, 2081, + 7, 7, 0, 0, 2081, 2082, 7, 15, 0, 0, 2082, 2083, 7, 5, 0, 0, 2083, 2084, + 7, 3, 0, 0, 2084, 384, 1, 0, 0, 0, 2085, 2086, 7, 20, 0, 0, 2086, 2087, + 7, 11, 0, 0, 2087, 2088, 7, 0, 0, 0, 2088, 2089, 7, 4, 0, 0, 2089, 386, + 1, 0, 0, 0, 2090, 2091, 7, 20, 0, 0, 2091, 2092, 7, 17, 0, 0, 2092, 2093, + 7, 2, 0, 0, 2093, 2094, 7, 8, 0, 0, 2094, 2095, 7, 5, 0, 0, 2095, 2096, + 7, 8, 0, 0, 2096, 2097, 7, 17, 0, 0, 2097, 2098, 7, 4, 0, 0, 2098, 388, + 1, 0, 0, 0, 2099, 2100, 7, 20, 0, 0, 2100, 2101, 7, 10, 0, 0, 2101, 2102, + 7, 3, 0, 0, 2102, 2103, 7, 14, 0, 0, 2103, 2104, 7, 3, 0, 0, 2104, 2105, + 7, 6, 0, 0, 2105, 2106, 7, 8, 0, 0, 2106, 2107, 7, 4, 0, 0, 2107, 2108, + 7, 18, 0, 0, 2108, 390, 1, 0, 0, 0, 2109, 2110, 7, 20, 0, 0, 2110, 2111, + 7, 10, 0, 0, 2111, 2112, 7, 3, 0, 0, 2112, 2113, 7, 14, 0, 0, 2113, 2114, + 7, 8, 0, 0, 2114, 2115, 7, 2, 0, 0, 2115, 2116, 7, 8, 0, 0, 2116, 2117, + 7, 17, 0, 0, 2117, 2118, 7, 4, 0, 0, 2118, 392, 1, 0, 0, 0, 2119, 2120, + 7, 20, 0, 0, 2120, 2121, 7, 10, 0, 0, 2121, 2122, 7, 3, 0, 0, 2122, 2123, + 7, 20, 0, 0, 2123, 2124, 7, 0, 0, 0, 2124, 2125, 7, 10, 0, 0, 2125, 2126, + 7, 3, 0, 0, 2126, 394, 1, 0, 0, 0, 2127, 2128, 7, 20, 0, 0, 2128, 2129, + 7, 10, 0, 0, 2129, 2130, 7, 8, 0, 0, 2130, 2131, 7, 22, 0, 0, 2131, 2132, + 7, 8, 0, 0, 2132, 2133, 7, 11, 0, 0, 2133, 2134, 7, 3, 0, 0, 2134, 2135, + 7, 18, 0, 0, 2135, 2136, 7, 3, 0, 0, 2136, 2137, 7, 2, 0, 0, 2137, 396, + 1, 0, 0, 0, 2138, 2139, 7, 20, 0, 0, 2139, 2140, 7, 10, 0, 0, 2140, 2141, + 7, 17, 0, 0, 2141, 2142, 7, 20, 0, 0, 2142, 2143, 7, 3, 0, 0, 2143, 2144, + 7, 10, 0, 0, 2144, 2145, 7, 5, 0, 0, 2145, 2146, 7, 8, 0, 0, 2146, 2147, + 7, 3, 0, 0, 2147, 2148, 7, 2, 0, 0, 2148, 398, 1, 0, 0, 0, 2149, 2150, + 7, 20, 0, 0, 2150, 2151, 7, 10, 0, 0, 2151, 2152, 7, 15, 0, 0, 2152, 2153, + 7, 4, 0, 0, 2153, 2154, 7, 3, 0, 0, 2154, 400, 1, 0, 0, 0, 2155, 2156, + 7, 25, 0, 0, 2156, 2157, 7, 15, 0, 0, 2157, 2158, 7, 17, 0, 0, 2158, 2159, + 7, 5, 0, 0, 2159, 2160, 7, 3, 0, 0, 2160, 2161, 7, 2, 0, 0, 2161, 402, + 1, 0, 0, 0, 2162, 2163, 7, 10, 0, 0, 2163, 2164, 7, 0, 0, 0, 2164, 2165, + 7, 4, 0, 0, 2165, 2166, 7, 18, 0, 0, 2166, 2167, 7, 3, 0, 0, 2167, 404, + 1, 0, 0, 0, 2168, 2169, 7, 10, 0, 0, 2169, 2170, 7, 3, 0, 0, 2170, 2171, + 7, 0, 0, 0, 2171, 2172, 7, 6, 0, 0, 2172, 406, 1, 0, 0, 0, 2173, 2174, + 7, 10, 0, 0, 2174, 2175, 7, 3, 0, 0, 2175, 2176, 7, 14, 0, 0, 2176, 2177, + 7, 15, 0, 0, 2177, 2178, 7, 10, 0, 0, 2178, 2179, 7, 2, 0, 0, 2179, 2180, + 7, 8, 0, 0, 2180, 2181, 7, 22, 0, 0, 2181, 2182, 7, 3, 0, 0, 2182, 408, + 1, 0, 0, 0, 2183, 2184, 7, 10, 0, 0, 2184, 2185, 7, 3, 0, 0, 2185, 2186, + 7, 9, 0, 0, 2186, 2187, 7, 10, 0, 0, 2187, 2188, 7, 3, 0, 0, 2188, 2189, + 7, 2, 0, 0, 2189, 2190, 7, 16, 0, 0, 2190, 410, 1, 0, 0, 0, 2191, 2192, + 7, 10, 0, 0, 2192, 2193, 7, 3, 0, 0, 2193, 2194, 7, 4, 0, 0, 2194, 2195, + 7, 0, 0, 0, 2195, 2196, 7, 7, 0, 0, 2196, 2197, 7, 3, 0, 0, 2197, 412, + 1, 0, 0, 0, 2198, 2199, 7, 10, 0, 0, 2199, 2200, 7, 3, 0, 0, 2200, 2201, + 7, 20, 0, 0, 2201, 2202, 7, 3, 0, 0, 2202, 2203, 7, 0, 0, 0, 2203, 2204, + 7, 5, 0, 0, 2204, 414, 1, 0, 0, 0, 2205, 2206, 7, 10, 0, 0, 2206, 2207, + 7, 3, 0, 0, 2207, 2208, 7, 20, 0, 0, 2208, 2209, 7, 3, 0, 0, 2209, 2210, + 7, 0, 0, 0, 2210, 2211, 7, 5, 0, 0, 2211, 2212, 7, 0, 0, 0, 2212, 2213, + 7, 1, 0, 0, 2213, 2214, 7, 11, 0, 0, 2214, 2215, 7, 3, 0, 0, 2215, 416, + 1, 0, 0, 0, 2216, 2217, 7, 10, 0, 0, 2217, 2218, 7, 3, 0, 0, 2218, 2219, + 7, 20, 0, 0, 2219, 2220, 7, 11, 0, 0, 2220, 2221, 7, 0, 0, 0, 2221, 2222, + 7, 14, 0, 0, 2222, 2223, 7, 3, 0, 0, 2223, 418, 1, 0, 0, 0, 2224, 2225, + 7, 10, 0, 0, 2225, 2226, 7, 3, 0, 0, 2226, 2227, 7, 2, 0, 0, 2227, 2228, + 7, 3, 0, 0, 2228, 2229, 7, 5, 0, 0, 2229, 420, 1, 0, 0, 0, 2230, 2231, + 7, 10, 0, 0, 2231, 2232, 7, 3, 0, 0, 2232, 2233, 7, 2, 0, 0, 2233, 2234, + 7, 20, 0, 0, 2234, 2235, 7, 3, 0, 0, 2235, 2236, 7, 14, 0, 0, 2236, 2237, + 7, 5, 0, 0, 2237, 422, 1, 0, 0, 0, 2238, 2239, 7, 10, 0, 0, 2239, 2240, + 7, 3, 0, 0, 2240, 2241, 7, 2, 0, 0, 2241, 2242, 7, 5, 0, 0, 2242, 2243, + 7, 10, 0, 0, 2243, 2244, 7, 8, 0, 0, 2244, 2245, 7, 14, 0, 0, 2245, 2246, + 7, 5, 0, 0, 2246, 424, 1, 0, 0, 0, 2247, 2248, 7, 10, 0, 0, 2248, 2249, + 7, 3, 0, 0, 2249, 2250, 7, 5, 0, 0, 2250, 2251, 7, 15, 0, 0, 2251, 2252, + 7, 10, 0, 0, 2252, 2253, 7, 4, 0, 0, 2253, 426, 1, 0, 0, 0, 2254, 2255, + 7, 10, 0, 0, 2255, 2256, 7, 3, 0, 0, 2256, 2257, 7, 5, 0, 0, 2257, 2258, + 7, 15, 0, 0, 2258, 2259, 7, 10, 0, 0, 2259, 2260, 7, 4, 0, 0, 2260, 2261, + 7, 8, 0, 0, 2261, 2262, 7, 4, 0, 0, 2262, 2263, 7, 18, 0, 0, 2263, 428, + 1, 0, 0, 0, 2264, 2265, 7, 10, 0, 0, 2265, 2266, 7, 3, 0, 0, 2266, 2267, + 7, 5, 0, 0, 2267, 2268, 7, 15, 0, 0, 2268, 2269, 7, 10, 0, 0, 2269, 2270, + 7, 4, 0, 0, 2270, 2271, 7, 2, 0, 0, 2271, 430, 1, 0, 0, 0, 2272, 2273, + 7, 10, 0, 0, 2273, 2274, 7, 3, 0, 0, 2274, 2275, 7, 22, 0, 0, 2275, 2276, + 7, 17, 0, 0, 2276, 2277, 7, 23, 0, 0, 2277, 2278, 7, 3, 0, 0, 2278, 432, + 1, 0, 0, 0, 2279, 2280, 7, 10, 0, 0, 2280, 2281, 7, 8, 0, 0, 2281, 2282, + 7, 18, 0, 0, 2282, 2283, 7, 16, 0, 0, 2283, 2284, 7, 5, 0, 0, 2284, 434, + 1, 0, 0, 0, 2285, 2286, 7, 10, 0, 0, 2286, 2287, 7, 17, 0, 0, 2287, 2288, + 7, 11, 0, 0, 2288, 2289, 7, 3, 0, 0, 2289, 436, 1, 0, 0, 0, 2290, 2291, + 7, 10, 0, 0, 2291, 2292, 7, 17, 0, 0, 2292, 2293, 7, 11, 0, 0, 2293, 2294, + 7, 3, 0, 0, 2294, 2295, 7, 2, 0, 0, 2295, 438, 1, 0, 0, 0, 2296, 2297, + 7, 10, 0, 0, 2297, 2298, 7, 17, 0, 0, 2298, 2299, 7, 11, 0, 0, 2299, 2300, + 7, 11, 0, 0, 2300, 2301, 7, 1, 0, 0, 2301, 2302, 7, 0, 0, 0, 2302, 2303, + 7, 14, 0, 0, 2303, 2304, 7, 23, 0, 0, 2304, 440, 1, 0, 0, 0, 2305, 2306, + 7, 10, 0, 0, 2306, 2307, 7, 17, 0, 0, 2307, 2308, 7, 11, 0, 0, 2308, 2309, + 7, 11, 0, 0, 2309, 2310, 7, 15, 0, 0, 2310, 2311, 7, 20, 0, 0, 2311, 442, + 1, 0, 0, 0, 2312, 2313, 7, 10, 0, 0, 2313, 2314, 7, 17, 0, 0, 2314, 2315, + 7, 19, 0, 0, 2315, 444, 1, 0, 0, 0, 2316, 2317, 7, 10, 0, 0, 2317, 2318, + 7, 17, 0, 0, 2318, 2319, 7, 19, 0, 0, 2319, 2320, 7, 2, 0, 0, 2320, 446, + 1, 0, 0, 0, 2321, 2322, 7, 10, 0, 0, 2322, 2323, 7, 15, 0, 0, 2323, 2324, + 7, 4, 0, 0, 2324, 2325, 7, 4, 0, 0, 2325, 2326, 7, 8, 0, 0, 2326, 2327, + 7, 4, 0, 0, 2327, 2328, 7, 18, 0, 0, 2328, 448, 1, 0, 0, 0, 2329, 2330, + 7, 2, 0, 0, 2330, 2331, 7, 14, 0, 0, 2331, 2332, 7, 0, 0, 0, 2332, 2333, + 7, 11, 0, 0, 2333, 2334, 7, 0, 0, 0, 2334, 2335, 7, 10, 0, 0, 2335, 450, + 1, 0, 0, 0, 2336, 2337, 7, 2, 0, 0, 2337, 2338, 7, 14, 0, 0, 2338, 2339, + 7, 16, 0, 0, 2339, 2340, 7, 3, 0, 0, 2340, 2341, 7, 7, 0, 0, 2341, 2342, + 7, 0, 0, 0, 2342, 452, 1, 0, 0, 0, 2343, 2344, 7, 2, 0, 0, 2344, 2345, + 7, 14, 0, 0, 2345, 2346, 7, 16, 0, 0, 2346, 2347, 7, 3, 0, 0, 2347, 2348, + 7, 7, 0, 0, 2348, 2349, 7, 0, 0, 0, 2349, 2350, 7, 2, 0, 0, 2350, 454, + 1, 0, 0, 0, 2351, 2352, 7, 2, 0, 0, 2352, 2353, 7, 3, 0, 0, 2353, 2354, + 7, 14, 0, 0, 2354, 2355, 7, 17, 0, 0, 2355, 2356, 7, 4, 0, 0, 2356, 2357, + 7, 6, 0, 0, 2357, 456, 1, 0, 0, 0, 2358, 2359, 7, 2, 0, 0, 2359, 2360, + 7, 3, 0, 0, 2360, 2361, 7, 14, 0, 0, 2361, 2362, 7, 15, 0, 0, 2362, 2363, + 7, 10, 0, 0, 2363, 2364, 7, 8, 0, 0, 2364, 2365, 7, 5, 0, 0, 2365, 2366, + 7, 12, 0, 0, 2366, 458, 1, 0, 0, 0, 2367, 2368, 7, 2, 0, 0, 2368, 2369, + 7, 3, 0, 0, 2369, 2370, 7, 3, 0, 0, 2370, 2371, 7, 23, 0, 0, 2371, 460, + 1, 0, 0, 0, 2372, 2373, 7, 2, 0, 0, 2373, 2374, 7, 3, 0, 0, 2374, 2375, + 7, 11, 0, 0, 2375, 2376, 7, 3, 0, 0, 2376, 2377, 7, 14, 0, 0, 2377, 2378, + 7, 5, 0, 0, 2378, 462, 1, 0, 0, 0, 2379, 2380, 7, 2, 0, 0, 2380, 2381, + 7, 3, 0, 0, 2381, 2382, 7, 10, 0, 0, 2382, 2383, 7, 8, 0, 0, 2383, 2384, + 7, 0, 0, 0, 2384, 2385, 7, 11, 0, 0, 2385, 2386, 7, 8, 0, 0, 2386, 2387, + 7, 13, 0, 0, 2387, 2388, 7, 0, 0, 0, 2388, 2389, 7, 1, 0, 0, 2389, 2390, + 7, 11, 0, 0, 2390, 2391, 7, 3, 0, 0, 2391, 464, 1, 0, 0, 0, 2392, 2393, + 7, 2, 0, 0, 2393, 2394, 7, 3, 0, 0, 2394, 2395, 7, 2, 0, 0, 2395, 2396, + 7, 2, 0, 0, 2396, 2397, 7, 8, 0, 0, 2397, 2398, 7, 17, 0, 0, 2398, 2399, + 7, 4, 0, 0, 2399, 466, 1, 0, 0, 0, 2400, 2401, 7, 2, 0, 0, 2401, 2402, + 7, 3, 0, 0, 2402, 2403, 7, 5, 0, 0, 2403, 468, 1, 0, 0, 0, 2404, 2405, + 7, 2, 0, 0, 2405, 2406, 7, 3, 0, 0, 2406, 2407, 7, 5, 0, 0, 2407, 2408, + 7, 2, 0, 0, 2408, 470, 1, 0, 0, 0, 2409, 2410, 7, 2, 0, 0, 2410, 2411, + 7, 16, 0, 0, 2411, 2412, 7, 17, 0, 0, 2412, 2413, 7, 19, 0, 0, 2413, 472, + 1, 0, 0, 0, 2414, 2415, 7, 2, 0, 0, 2415, 2416, 7, 23, 0, 0, 2416, 2417, + 7, 8, 0, 0, 2417, 2418, 7, 20, 0, 0, 2418, 474, 1, 0, 0, 0, 2419, 2420, + 7, 2, 0, 0, 2420, 2421, 7, 17, 0, 0, 2421, 2422, 7, 7, 0, 0, 2422, 2423, + 7, 3, 0, 0, 2423, 476, 1, 0, 0, 0, 2424, 2425, 7, 2, 0, 0, 2425, 2426, + 7, 5, 0, 0, 2426, 2427, 7, 0, 0, 0, 2427, 2428, 7, 10, 0, 0, 2428, 2429, + 7, 5, 0, 0, 2429, 478, 1, 0, 0, 0, 2430, 2431, 7, 2, 0, 0, 2431, 2432, + 7, 5, 0, 0, 2432, 2433, 7, 0, 0, 0, 2433, 2434, 7, 5, 0, 0, 2434, 2435, + 7, 2, 0, 0, 2435, 480, 1, 0, 0, 0, 2436, 2437, 7, 2, 0, 0, 2437, 2438, + 7, 15, 0, 0, 2438, 2439, 7, 1, 0, 0, 2439, 2440, 7, 2, 0, 0, 2440, 2441, + 7, 3, 0, 0, 2441, 2442, 7, 5, 0, 0, 2442, 482, 1, 0, 0, 0, 2443, 2444, + 7, 2, 0, 0, 2444, 2445, 7, 15, 0, 0, 2445, 2446, 7, 1, 0, 0, 2446, 2447, + 7, 2, 0, 0, 2447, 2448, 7, 5, 0, 0, 2448, 2449, 7, 10, 0, 0, 2449, 2450, + 7, 8, 0, 0, 2450, 2451, 7, 4, 0, 0, 2451, 2452, 7, 18, 0, 0, 2452, 484, + 1, 0, 0, 0, 2453, 2454, 7, 2, 0, 0, 2454, 2455, 7, 12, 0, 0, 2455, 2456, + 7, 2, 0, 0, 2456, 2457, 7, 5, 0, 0, 2457, 2458, 7, 3, 0, 0, 2458, 2459, + 7, 7, 0, 0, 2459, 486, 1, 0, 0, 0, 2460, 2461, 7, 5, 0, 0, 2461, 2462, + 7, 0, 0, 0, 2462, 2463, 7, 1, 0, 0, 2463, 2464, 7, 11, 0, 0, 2464, 2465, + 7, 3, 0, 0, 2465, 488, 1, 0, 0, 0, 2466, 2467, 7, 5, 0, 0, 2467, 2468, + 7, 0, 0, 0, 2468, 2469, 7, 1, 0, 0, 2469, 2470, 7, 11, 0, 0, 2470, 2471, + 7, 3, 0, 0, 2471, 2472, 7, 2, 0, 0, 2472, 490, 1, 0, 0, 0, 2473, 2474, + 7, 5, 0, 0, 2474, 2475, 7, 0, 0, 0, 2475, 2476, 7, 1, 0, 0, 2476, 2477, + 7, 11, 0, 0, 2477, 2478, 7, 3, 0, 0, 2478, 2479, 7, 2, 0, 0, 2479, 2480, + 7, 0, 0, 0, 2480, 2481, 7, 7, 0, 0, 2481, 2482, 7, 20, 0, 0, 2482, 2483, + 7, 11, 0, 0, 2483, 2484, 7, 3, 0, 0, 2484, 492, 1, 0, 0, 0, 2485, 2486, + 7, 5, 0, 0, 2486, 2487, 7, 3, 0, 0, 2487, 2488, 7, 21, 0, 0, 2488, 2489, + 7, 5, 0, 0, 2489, 494, 1, 0, 0, 0, 2490, 2491, 7, 2, 0, 0, 2491, 2492, + 7, 5, 0, 0, 2492, 2493, 7, 10, 0, 0, 2493, 2494, 7, 8, 0, 0, 2494, 2495, + 7, 4, 0, 0, 2495, 2496, 7, 18, 0, 0, 2496, 496, 1, 0, 0, 0, 2497, 2498, + 7, 5, 0, 0, 2498, 2499, 7, 16, 0, 0, 2499, 2500, 7, 3, 0, 0, 2500, 2501, + 7, 4, 0, 0, 2501, 498, 1, 0, 0, 0, 2502, 2503, 7, 5, 0, 0, 2503, 2504, + 7, 8, 0, 0, 2504, 2505, 7, 3, 0, 0, 2505, 2506, 7, 2, 0, 0, 2506, 500, + 1, 0, 0, 0, 2507, 2508, 7, 5, 0, 0, 2508, 2509, 7, 8, 0, 0, 2509, 2510, + 7, 7, 0, 0, 2510, 2511, 7, 3, 0, 0, 2511, 502, 1, 0, 0, 0, 2512, 2513, + 7, 5, 0, 0, 2513, 2514, 7, 8, 0, 0, 2514, 2515, 7, 7, 0, 0, 2515, 2516, + 7, 3, 0, 0, 2516, 2517, 7, 2, 0, 0, 2517, 2518, 7, 5, 0, 0, 2518, 2519, + 7, 0, 0, 0, 2519, 2520, 7, 7, 0, 0, 2520, 2521, 7, 20, 0, 0, 2521, 504, + 1, 0, 0, 0, 2522, 2523, 7, 5, 0, 0, 2523, 2524, 7, 17, 0, 0, 2524, 506, + 1, 0, 0, 0, 2525, 2526, 7, 5, 0, 0, 2526, 2527, 7, 10, 0, 0, 2527, 2528, + 7, 0, 0, 0, 2528, 2529, 7, 8, 0, 0, 2529, 2530, 7, 11, 0, 0, 2530, 2531, + 7, 8, 0, 0, 2531, 2532, 7, 4, 0, 0, 2532, 2533, 7, 18, 0, 0, 2533, 508, + 1, 0, 0, 0, 2534, 2535, 7, 5, 0, 0, 2535, 2536, 7, 10, 0, 0, 2536, 2537, + 7, 0, 0, 0, 2537, 2538, 7, 4, 0, 0, 2538, 2539, 7, 2, 0, 0, 2539, 2540, + 7, 0, 0, 0, 2540, 2541, 7, 14, 0, 0, 2541, 2542, 7, 5, 0, 0, 2542, 2543, + 7, 8, 0, 0, 2543, 2544, 7, 17, 0, 0, 2544, 2545, 7, 4, 0, 0, 2545, 510, + 1, 0, 0, 0, 2546, 2547, 7, 5, 0, 0, 2547, 2548, 7, 10, 0, 0, 2548, 2549, + 7, 8, 0, 0, 2549, 2550, 7, 7, 0, 0, 2550, 512, 1, 0, 0, 0, 2551, 2552, + 7, 5, 0, 0, 2552, 2553, 7, 10, 0, 0, 2553, 2554, 7, 15, 0, 0, 2554, 2555, + 7, 3, 0, 0, 2555, 514, 1, 0, 0, 0, 2556, 2557, 7, 5, 0, 0, 2557, 2558, + 7, 10, 0, 0, 2558, 2559, 7, 15, 0, 0, 2559, 2560, 7, 4, 0, 0, 2560, 2561, + 7, 14, 0, 0, 2561, 2562, 7, 0, 0, 0, 2562, 2563, 7, 5, 0, 0, 2563, 2564, + 7, 3, 0, 0, 2564, 516, 1, 0, 0, 0, 2565, 2566, 7, 5, 0, 0, 2566, 2567, + 7, 10, 0, 0, 2567, 2568, 7, 12, 0, 0, 2568, 2569, 5, 95, 0, 0, 2569, 2570, + 7, 14, 0, 0, 2570, 2571, 7, 0, 0, 0, 2571, 2572, 7, 2, 0, 0, 2572, 2573, + 7, 5, 0, 0, 2573, 518, 1, 0, 0, 0, 2574, 2575, 7, 5, 0, 0, 2575, 2576, + 7, 12, 0, 0, 2576, 2577, 7, 20, 0, 0, 2577, 2578, 7, 3, 0, 0, 2578, 520, + 1, 0, 0, 0, 2579, 2580, 7, 15, 0, 0, 2580, 2581, 7, 3, 0, 0, 2581, 2582, + 7, 2, 0, 0, 2582, 2583, 7, 14, 0, 0, 2583, 2584, 7, 0, 0, 0, 2584, 2585, + 7, 20, 0, 0, 2585, 2586, 7, 3, 0, 0, 2586, 522, 1, 0, 0, 0, 2587, 2588, + 7, 15, 0, 0, 2588, 2589, 7, 4, 0, 0, 2589, 2590, 7, 1, 0, 0, 2590, 2591, + 7, 17, 0, 0, 2591, 2592, 7, 15, 0, 0, 2592, 2593, 7, 4, 0, 0, 2593, 2594, + 7, 6, 0, 0, 2594, 2595, 7, 3, 0, 0, 2595, 2596, 7, 6, 0, 0, 2596, 524, + 1, 0, 0, 0, 2597, 2598, 7, 15, 0, 0, 2598, 2599, 7, 4, 0, 0, 2599, 2600, + 7, 14, 0, 0, 2600, 2601, 7, 17, 0, 0, 2601, 2602, 7, 7, 0, 0, 2602, 2603, + 7, 7, 0, 0, 2603, 2604, 7, 8, 0, 0, 2604, 2605, 7, 5, 0, 0, 2605, 2606, + 7, 5, 0, 0, 2606, 2607, 7, 3, 0, 0, 2607, 2608, 7, 6, 0, 0, 2608, 526, + 1, 0, 0, 0, 2609, 2610, 7, 15, 0, 0, 2610, 2611, 7, 4, 0, 0, 2611, 2612, + 7, 14, 0, 0, 2612, 2613, 7, 17, 0, 0, 2613, 2614, 7, 4, 0, 0, 2614, 2615, + 7, 6, 0, 0, 2615, 2616, 7, 8, 0, 0, 2616, 2617, 7, 5, 0, 0, 2617, 2618, + 7, 8, 0, 0, 2618, 2619, 7, 17, 0, 0, 2619, 2620, 7, 4, 0, 0, 2620, 2621, + 7, 0, 0, 0, 2621, 2622, 7, 11, 0, 0, 2622, 528, 1, 0, 0, 0, 2623, 2624, + 7, 15, 0, 0, 2624, 2625, 7, 4, 0, 0, 2625, 2626, 7, 8, 0, 0, 2626, 2627, + 7, 17, 0, 0, 2627, 2628, 7, 4, 0, 0, 2628, 530, 1, 0, 0, 0, 2629, 2630, + 7, 15, 0, 0, 2630, 2631, 7, 4, 0, 0, 2631, 2632, 7, 8, 0, 0, 2632, 2633, + 7, 25, 0, 0, 2633, 2634, 7, 15, 0, 0, 2634, 2635, 7, 3, 0, 0, 2635, 532, + 1, 0, 0, 0, 2636, 2637, 7, 15, 0, 0, 2637, 2638, 7, 4, 0, 0, 2638, 2639, + 7, 23, 0, 0, 2639, 2640, 7, 4, 0, 0, 2640, 2641, 7, 17, 0, 0, 2641, 2642, + 7, 19, 0, 0, 2642, 2643, 7, 4, 0, 0, 2643, 534, 1, 0, 0, 0, 2644, 2645, + 7, 15, 0, 0, 2645, 2646, 7, 4, 0, 0, 2646, 2647, 7, 7, 0, 0, 2647, 2648, + 7, 0, 0, 0, 2648, 2649, 7, 5, 0, 0, 2649, 2650, 7, 14, 0, 0, 2650, 2651, + 7, 16, 0, 0, 2651, 2652, 7, 3, 0, 0, 2652, 2653, 7, 6, 0, 0, 2653, 536, + 1, 0, 0, 0, 2654, 2655, 7, 15, 0, 0, 2655, 2656, 7, 4, 0, 0, 2656, 2657, + 7, 4, 0, 0, 2657, 2658, 7, 3, 0, 0, 2658, 2659, 7, 2, 0, 0, 2659, 2660, + 7, 5, 0, 0, 2660, 538, 1, 0, 0, 0, 2661, 2662, 7, 15, 0, 0, 2662, 2663, + 7, 4, 0, 0, 2663, 2664, 7, 5, 0, 0, 2664, 2665, 7, 8, 0, 0, 2665, 2666, + 7, 11, 0, 0, 2666, 540, 1, 0, 0, 0, 2667, 2668, 7, 15, 0, 0, 2668, 2669, + 7, 20, 0, 0, 2669, 2670, 7, 6, 0, 0, 2670, 2671, 7, 0, 0, 0, 2671, 2672, + 7, 5, 0, 0, 2672, 2673, 7, 3, 0, 0, 2673, 542, 1, 0, 0, 0, 2674, 2675, + 7, 15, 0, 0, 2675, 2676, 7, 2, 0, 0, 2676, 2677, 7, 3, 0, 0, 2677, 544, + 1, 0, 0, 0, 2678, 2679, 7, 15, 0, 0, 2679, 2680, 7, 2, 0, 0, 2680, 2681, + 7, 3, 0, 0, 2681, 2682, 7, 10, 0, 0, 2682, 546, 1, 0, 0, 0, 2683, 2684, + 7, 15, 0, 0, 2684, 2685, 7, 2, 0, 0, 2685, 2686, 7, 8, 0, 0, 2686, 2687, + 7, 4, 0, 0, 2687, 2688, 7, 18, 0, 0, 2688, 548, 1, 0, 0, 0, 2689, 2690, + 7, 15, 0, 0, 2690, 2691, 7, 5, 0, 0, 2691, 2692, 7, 9, 0, 0, 2692, 2693, + 5, 49, 0, 0, 2693, 2694, 5, 54, 0, 0, 2694, 550, 1, 0, 0, 0, 2695, 2696, + 7, 15, 0, 0, 2696, 2697, 7, 5, 0, 0, 2697, 2698, 7, 9, 0, 0, 2698, 2699, + 5, 51, 0, 0, 2699, 2700, 5, 50, 0, 0, 2700, 552, 1, 0, 0, 0, 2701, 2702, + 7, 15, 0, 0, 2702, 2703, 7, 5, 0, 0, 2703, 2704, 7, 9, 0, 0, 2704, 2705, + 5, 56, 0, 0, 2705, 554, 1, 0, 0, 0, 2706, 2707, 7, 22, 0, 0, 2707, 2708, + 7, 0, 0, 0, 2708, 2709, 7, 11, 0, 0, 2709, 2710, 7, 8, 0, 0, 2710, 2711, + 7, 6, 0, 0, 2711, 2712, 7, 0, 0, 0, 2712, 2713, 7, 5, 0, 0, 2713, 2714, + 7, 3, 0, 0, 2714, 556, 1, 0, 0, 0, 2715, 2716, 7, 22, 0, 0, 2716, 2717, + 7, 0, 0, 0, 2717, 2718, 7, 11, 0, 0, 2718, 2719, 7, 15, 0, 0, 2719, 2720, + 7, 3, 0, 0, 2720, 558, 1, 0, 0, 0, 2721, 2722, 7, 22, 0, 0, 2722, 2723, + 7, 0, 0, 0, 2723, 2724, 7, 11, 0, 0, 2724, 2725, 7, 15, 0, 0, 2725, 2726, + 7, 3, 0, 0, 2726, 2727, 7, 2, 0, 0, 2727, 560, 1, 0, 0, 0, 2728, 2729, + 7, 22, 0, 0, 2729, 2730, 7, 3, 0, 0, 2730, 2731, 7, 10, 0, 0, 2731, 2732, + 7, 1, 0, 0, 2732, 2733, 7, 17, 0, 0, 2733, 2734, 7, 2, 0, 0, 2734, 2735, + 7, 3, 0, 0, 2735, 562, 1, 0, 0, 0, 2736, 2737, 7, 22, 0, 0, 2737, 2738, + 7, 3, 0, 0, 2738, 2739, 7, 10, 0, 0, 2739, 2740, 7, 2, 0, 0, 2740, 2741, + 7, 8, 0, 0, 2741, 2742, 7, 17, 0, 0, 2742, 2743, 7, 4, 0, 0, 2743, 564, + 1, 0, 0, 0, 2744, 2745, 7, 22, 0, 0, 2745, 2746, 7, 8, 0, 0, 2746, 2747, + 7, 3, 0, 0, 2747, 2748, 7, 19, 0, 0, 2748, 566, 1, 0, 0, 0, 2749, 2750, + 7, 19, 0, 0, 2750, 2751, 7, 16, 0, 0, 2751, 2752, 7, 3, 0, 0, 2752, 2753, + 7, 4, 0, 0, 2753, 568, 1, 0, 0, 0, 2754, 2755, 7, 19, 0, 0, 2755, 2756, + 7, 16, 0, 0, 2756, 2757, 7, 3, 0, 0, 2757, 2758, 7, 10, 0, 0, 2758, 2759, + 7, 3, 0, 0, 2759, 570, 1, 0, 0, 0, 2760, 2761, 7, 19, 0, 0, 2761, 2762, + 7, 16, 0, 0, 2762, 2763, 7, 8, 0, 0, 2763, 2764, 7, 11, 0, 0, 2764, 2765, + 7, 3, 0, 0, 2765, 572, 1, 0, 0, 0, 2766, 2767, 7, 19, 0, 0, 2767, 2768, + 7, 8, 0, 0, 2768, 2769, 7, 4, 0, 0, 2769, 2770, 7, 6, 0, 0, 2770, 2771, + 7, 17, 0, 0, 2771, 2772, 7, 19, 0, 0, 2772, 574, 1, 0, 0, 0, 2773, 2774, + 7, 19, 0, 0, 2774, 2775, 7, 8, 0, 0, 2775, 2776, 7, 5, 0, 0, 2776, 2777, + 7, 16, 0, 0, 2777, 576, 1, 0, 0, 0, 2778, 2779, 7, 19, 0, 0, 2779, 2780, + 7, 8, 0, 0, 2780, 2781, 7, 5, 0, 0, 2781, 2782, 7, 16, 0, 0, 2782, 2783, + 7, 8, 0, 0, 2783, 2784, 7, 4, 0, 0, 2784, 578, 1, 0, 0, 0, 2785, 2786, + 7, 19, 0, 0, 2786, 2787, 7, 8, 0, 0, 2787, 2788, 7, 5, 0, 0, 2788, 2789, + 7, 16, 0, 0, 2789, 2790, 7, 17, 0, 0, 2790, 2791, 7, 15, 0, 0, 2791, 2792, + 7, 5, 0, 0, 2792, 580, 1, 0, 0, 0, 2793, 2794, 7, 19, 0, 0, 2794, 2795, + 7, 17, 0, 0, 2795, 2796, 7, 10, 0, 0, 2796, 2797, 7, 23, 0, 0, 2797, 582, + 1, 0, 0, 0, 2798, 2799, 7, 19, 0, 0, 2799, 2800, 7, 10, 0, 0, 2800, 2801, + 7, 0, 0, 0, 2801, 2802, 7, 20, 0, 0, 2802, 2803, 7, 20, 0, 0, 2803, 2804, + 7, 3, 0, 0, 2804, 2805, 7, 10, 0, 0, 2805, 584, 1, 0, 0, 0, 2806, 2807, + 7, 19, 0, 0, 2807, 2808, 7, 10, 0, 0, 2808, 2809, 7, 8, 0, 0, 2809, 2810, + 7, 5, 0, 0, 2810, 2811, 7, 3, 0, 0, 2811, 586, 1, 0, 0, 0, 2812, 2813, + 7, 12, 0, 0, 2813, 2814, 7, 3, 0, 0, 2814, 2815, 7, 0, 0, 0, 2815, 2816, + 7, 10, 0, 0, 2816, 588, 1, 0, 0, 0, 2817, 2818, 7, 13, 0, 0, 2818, 2819, + 7, 17, 0, 0, 2819, 2820, 7, 4, 0, 0, 2820, 2821, 7, 3, 0, 0, 2821, 590, + 1, 0, 0, 0, 2822, 2823, 5, 61, 0, 0, 2823, 592, 1, 0, 0, 0, 2824, 2825, + 5, 60, 0, 0, 2825, 2829, 5, 62, 0, 0, 2826, 2827, 5, 33, 0, 0, 2827, 2829, + 5, 61, 0, 0, 2828, 2824, 1, 0, 0, 0, 2828, 2826, 1, 0, 0, 0, 2829, 594, + 1, 0, 0, 0, 2830, 2831, 5, 60, 0, 0, 2831, 596, 1, 0, 0, 0, 2832, 2833, + 5, 60, 0, 0, 2833, 2834, 5, 61, 0, 0, 2834, 598, 1, 0, 0, 0, 2835, 2836, + 5, 62, 0, 0, 2836, 600, 1, 0, 0, 0, 2837, 2838, 5, 62, 0, 0, 2838, 2839, + 5, 61, 0, 0, 2839, 602, 1, 0, 0, 0, 2840, 2841, 5, 43, 0, 0, 2841, 604, + 1, 0, 0, 0, 2842, 2843, 5, 45, 0, 0, 2843, 606, 1, 0, 0, 0, 2844, 2845, + 5, 42, 0, 0, 2845, 608, 1, 0, 0, 0, 2846, 2847, 5, 47, 0, 0, 2847, 610, + 1, 0, 0, 0, 2848, 2849, 5, 37, 0, 0, 2849, 612, 1, 0, 0, 0, 2850, 2851, + 5, 124, 0, 0, 2851, 2852, 5, 124, 0, 0, 2852, 614, 1, 0, 0, 0, 2853, 2854, + 5, 63, 0, 0, 2854, 616, 1, 0, 0, 0, 2855, 2856, 5, 59, 0, 0, 2856, 618, + 1, 0, 0, 0, 2857, 2858, 5, 46, 0, 0, 2858, 620, 1, 0, 0, 0, 2859, 2860, + 5, 95, 0, 0, 2860, 2861, 5, 58, 0, 0, 2861, 622, 1, 0, 0, 0, 2862, 2863, + 5, 44, 0, 0, 2863, 624, 1, 0, 0, 0, 2864, 2865, 5, 40, 0, 0, 2865, 626, + 1, 0, 0, 0, 2866, 2867, 5, 41, 0, 0, 2867, 628, 1, 0, 0, 0, 2868, 2869, + 5, 91, 0, 0, 2869, 630, 1, 0, 0, 0, 2870, 2871, 5, 93, 0, 0, 2871, 632, + 1, 0, 0, 0, 2872, 2873, 5, 123, 0, 0, 2873, 634, 1, 0, 0, 0, 2874, 2875, + 5, 125, 0, 0, 2875, 636, 1, 0, 0, 0, 2876, 2877, 5, 123, 0, 0, 2877, 2878, + 5, 45, 0, 0, 2878, 638, 1, 0, 0, 0, 2879, 2880, 5, 45, 0, 0, 2880, 2881, + 5, 125, 0, 0, 2881, 640, 1, 0, 0, 0, 2882, 2883, 5, 60, 0, 0, 2883, 2884, + 5, 45, 0, 0, 2884, 642, 1, 0, 0, 0, 2885, 2886, 5, 45, 0, 0, 2886, 2887, + 5, 62, 0, 0, 2887, 644, 1, 0, 0, 0, 2888, 2889, 5, 61, 0, 0, 2889, 2890, + 5, 62, 0, 0, 2890, 646, 1, 0, 0, 0, 2891, 2892, 5, 124, 0, 0, 2892, 648, + 1, 0, 0, 0, 2893, 2894, 5, 36, 0, 0, 2894, 650, 1, 0, 0, 0, 2895, 2896, + 5, 94, 0, 0, 2896, 652, 1, 0, 0, 0, 2897, 2903, 5, 39, 0, 0, 2898, 2902, + 8, 26, 0, 0, 2899, 2900, 5, 39, 0, 0, 2900, 2902, 5, 39, 0, 0, 2901, 2898, + 1, 0, 0, 0, 2901, 2899, 1, 0, 0, 0, 2902, 2905, 1, 0, 0, 0, 2903, 2901, + 1, 0, 0, 0, 2903, 2904, 1, 0, 0, 0, 2904, 2906, 1, 0, 0, 0, 2905, 2903, + 1, 0, 0, 0, 2906, 2907, 5, 39, 0, 0, 2907, 654, 1, 0, 0, 0, 2908, 2909, + 7, 15, 0, 0, 2909, 2910, 5, 38, 0, 0, 2910, 2911, 5, 39, 0, 0, 2911, 2917, + 1, 0, 0, 0, 2912, 2916, 8, 26, 0, 0, 2913, 2914, 5, 39, 0, 0, 2914, 2916, + 5, 39, 0, 0, 2915, 2912, 1, 0, 0, 0, 2915, 2913, 1, 0, 0, 0, 2916, 2919, + 1, 0, 0, 0, 2917, 2915, 1, 0, 0, 0, 2917, 2918, 1, 0, 0, 0, 2918, 2920, + 1, 0, 0, 0, 2919, 2917, 1, 0, 0, 0, 2920, 2921, 5, 39, 0, 0, 2921, 656, + 1, 0, 0, 0, 2922, 2923, 7, 21, 0, 0, 2923, 2924, 5, 39, 0, 0, 2924, 2928, + 1, 0, 0, 0, 2925, 2927, 8, 26, 0, 0, 2926, 2925, 1, 0, 0, 0, 2927, 2930, + 1, 0, 0, 0, 2928, 2926, 1, 0, 0, 0, 2928, 2929, 1, 0, 0, 0, 2929, 2931, + 1, 0, 0, 0, 2930, 2928, 1, 0, 0, 0, 2931, 2932, 5, 39, 0, 0, 2932, 658, + 1, 0, 0, 0, 2933, 2935, 3, 675, 337, 0, 2934, 2933, 1, 0, 0, 0, 2935, 2936, + 1, 0, 0, 0, 2936, 2934, 1, 0, 0, 0, 2936, 2937, 1, 0, 0, 0, 2937, 660, + 1, 0, 0, 0, 2938, 2940, 3, 675, 337, 0, 2939, 2938, 1, 0, 0, 0, 2940, 2941, + 1, 0, 0, 0, 2941, 2939, 1, 0, 0, 0, 2941, 2942, 1, 0, 0, 0, 2942, 2943, + 1, 0, 0, 0, 2943, 2947, 5, 46, 0, 0, 2944, 2946, 3, 675, 337, 0, 2945, + 2944, 1, 0, 0, 0, 2946, 2949, 1, 0, 0, 0, 2947, 2945, 1, 0, 0, 0, 2947, + 2948, 1, 0, 0, 0, 2948, 2957, 1, 0, 0, 0, 2949, 2947, 1, 0, 0, 0, 2950, + 2952, 5, 46, 0, 0, 2951, 2953, 3, 675, 337, 0, 2952, 2951, 1, 0, 0, 0, + 2953, 2954, 1, 0, 0, 0, 2954, 2952, 1, 0, 0, 0, 2954, 2955, 1, 0, 0, 0, + 2955, 2957, 1, 0, 0, 0, 2956, 2939, 1, 0, 0, 0, 2956, 2950, 1, 0, 0, 0, + 2957, 662, 1, 0, 0, 0, 2958, 2960, 3, 675, 337, 0, 2959, 2958, 1, 0, 0, + 0, 2960, 2961, 1, 0, 0, 0, 2961, 2959, 1, 0, 0, 0, 2961, 2962, 1, 0, 0, + 0, 2962, 2970, 1, 0, 0, 0, 2963, 2967, 5, 46, 0, 0, 2964, 2966, 3, 675, + 337, 0, 2965, 2964, 1, 0, 0, 0, 2966, 2969, 1, 0, 0, 0, 2967, 2965, 1, + 0, 0, 0, 2967, 2968, 1, 0, 0, 0, 2968, 2971, 1, 0, 0, 0, 2969, 2967, 1, + 0, 0, 0, 2970, 2963, 1, 0, 0, 0, 2970, 2971, 1, 0, 0, 0, 2971, 2972, 1, + 0, 0, 0, 2972, 2973, 3, 673, 336, 0, 2973, 2983, 1, 0, 0, 0, 2974, 2976, + 5, 46, 0, 0, 2975, 2977, 3, 675, 337, 0, 2976, 2975, 1, 0, 0, 0, 2977, + 2978, 1, 0, 0, 0, 2978, 2976, 1, 0, 0, 0, 2978, 2979, 1, 0, 0, 0, 2979, + 2980, 1, 0, 0, 0, 2980, 2981, 3, 673, 336, 0, 2981, 2983, 1, 0, 0, 0, 2982, + 2959, 1, 0, 0, 0, 2982, 2974, 1, 0, 0, 0, 2983, 664, 1, 0, 0, 0, 2984, + 2987, 3, 677, 338, 0, 2985, 2987, 5, 95, 0, 0, 2986, 2984, 1, 0, 0, 0, + 2986, 2985, 1, 0, 0, 0, 2987, 2993, 1, 0, 0, 0, 2988, 2992, 3, 677, 338, + 0, 2989, 2992, 3, 675, 337, 0, 2990, 2992, 5, 95, 0, 0, 2991, 2988, 1, + 0, 0, 0, 2991, 2989, 1, 0, 0, 0, 2991, 2990, 1, 0, 0, 0, 2992, 2995, 1, + 0, 0, 0, 2993, 2991, 1, 0, 0, 0, 2993, 2994, 1, 0, 0, 0, 2994, 666, 1, + 0, 0, 0, 2995, 2993, 1, 0, 0, 0, 2996, 3000, 3, 675, 337, 0, 2997, 3001, + 3, 677, 338, 0, 2998, 3001, 3, 675, 337, 0, 2999, 3001, 5, 95, 0, 0, 3000, + 2997, 1, 0, 0, 0, 3000, 2998, 1, 0, 0, 0, 3000, 2999, 1, 0, 0, 0, 3001, + 3002, 1, 0, 0, 0, 3002, 3000, 1, 0, 0, 0, 3002, 3003, 1, 0, 0, 0, 3003, + 668, 1, 0, 0, 0, 3004, 3010, 5, 34, 0, 0, 3005, 3009, 8, 27, 0, 0, 3006, + 3007, 5, 34, 0, 0, 3007, 3009, 5, 34, 0, 0, 3008, 3005, 1, 0, 0, 0, 3008, + 3006, 1, 0, 0, 0, 3009, 3012, 1, 0, 0, 0, 3010, 3008, 1, 0, 0, 0, 3010, + 3011, 1, 0, 0, 0, 3011, 3013, 1, 0, 0, 0, 3012, 3010, 1, 0, 0, 0, 3013, + 3014, 5, 34, 0, 0, 3014, 670, 1, 0, 0, 0, 3015, 3021, 5, 96, 0, 0, 3016, + 3020, 8, 28, 0, 0, 3017, 3018, 5, 96, 0, 0, 3018, 3020, 5, 96, 0, 0, 3019, + 3016, 1, 0, 0, 0, 3019, 3017, 1, 0, 0, 0, 3020, 3023, 1, 0, 0, 0, 3021, + 3019, 1, 0, 0, 0, 3021, 3022, 1, 0, 0, 0, 3022, 3024, 1, 0, 0, 0, 3023, + 3021, 1, 0, 0, 0, 3024, 3025, 5, 96, 0, 0, 3025, 672, 1, 0, 0, 0, 3026, + 3028, 7, 3, 0, 0, 3027, 3029, 7, 29, 0, 0, 3028, 3027, 1, 0, 0, 0, 3028, + 3029, 1, 0, 0, 0, 3029, 3031, 1, 0, 0, 0, 3030, 3032, 3, 675, 337, 0, 3031, + 3030, 1, 0, 0, 0, 3032, 3033, 1, 0, 0, 0, 3033, 3031, 1, 0, 0, 0, 3033, + 3034, 1, 0, 0, 0, 3034, 674, 1, 0, 0, 0, 3035, 3036, 7, 30, 0, 0, 3036, + 676, 1, 0, 0, 0, 3037, 3038, 7, 31, 0, 0, 3038, 678, 1, 0, 0, 0, 3039, + 3040, 5, 45, 0, 0, 3040, 3041, 5, 45, 0, 0, 3041, 3045, 1, 0, 0, 0, 3042, + 3044, 8, 32, 0, 0, 3043, 3042, 1, 0, 0, 0, 3044, 3047, 1, 0, 0, 0, 3045, + 3043, 1, 0, 0, 0, 3045, 3046, 1, 0, 0, 0, 3046, 3049, 1, 0, 0, 0, 3047, + 3045, 1, 0, 0, 0, 3048, 3050, 5, 13, 0, 0, 3049, 3048, 1, 0, 0, 0, 3049, + 3050, 1, 0, 0, 0, 3050, 3052, 1, 0, 0, 0, 3051, 3053, 5, 10, 0, 0, 3052, + 3051, 1, 0, 0, 0, 3052, 3053, 1, 0, 0, 0, 3053, 3054, 1, 0, 0, 0, 3054, + 3055, 6, 339, 0, 0, 3055, 680, 1, 0, 0, 0, 3056, 3057, 5, 47, 0, 0, 3057, + 3058, 5, 42, 0, 0, 3058, 3062, 1, 0, 0, 0, 3059, 3061, 9, 0, 0, 0, 3060, + 3059, 1, 0, 0, 0, 3061, 3064, 1, 0, 0, 0, 3062, 3063, 1, 0, 0, 0, 3062, + 3060, 1, 0, 0, 0, 3063, 3065, 1, 0, 0, 0, 3064, 3062, 1, 0, 0, 0, 3065, + 3066, 5, 42, 0, 0, 3066, 3067, 5, 47, 0, 0, 3067, 3068, 1, 0, 0, 0, 3068, + 3069, 6, 340, 0, 0, 3069, 682, 1, 0, 0, 0, 3070, 3072, 7, 33, 0, 0, 3071, + 3070, 1, 0, 0, 0, 3072, 3073, 1, 0, 0, 0, 3073, 3071, 1, 0, 0, 0, 3073, + 3074, 1, 0, 0, 0, 3074, 3075, 1, 0, 0, 0, 3075, 3076, 6, 341, 0, 0, 3076, + 684, 1, 0, 0, 0, 3077, 3078, 9, 0, 0, 0, 3078, 686, 1, 0, 0, 0, 33, 0, + 2828, 2901, 2903, 2915, 2917, 2928, 2936, 2941, 2947, 2954, 2956, 2961, + 2967, 2970, 2978, 2982, 2986, 2991, 2993, 3000, 3002, 3008, 3010, 3019, + 3021, 3028, 3033, 3045, 3049, 3052, 3062, 3073, 1, 0, 1, 0, + } + deserializer := antlr.NewATNDeserializer(nil) + staticData.atn = deserializer.Deserialize(staticData.serializedATN) + atn := staticData.atn + staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) + decisionToDFA := staticData.decisionToDFA + for index, state := range atn.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(state, index) + } +} + +// TrinoLexerInit initializes any static state used to implement TrinoLexer. By default the +// static state used to implement the lexer is lazily initialized during the first call to +// NewTrinoLexer(). You can call this function if you wish to initialize the static state ahead +// of time. +func TrinoLexerInit() { + staticData := &TrinoLexerLexerStaticData + staticData.once.Do(trinolexerLexerInit) +} + +// NewTrinoLexer produces a new lexer instance for the optional input antlr.CharStream. +func NewTrinoLexer(input antlr.CharStream) *TrinoLexer { + TrinoLexerInit() + l := new(TrinoLexer) + l.BaseLexer = antlr.NewBaseLexer(input) + staticData := &TrinoLexerLexerStaticData + l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) + l.channelNames = staticData.ChannelNames + l.modeNames = staticData.ModeNames + l.RuleNames = staticData.RuleNames + l.LiteralNames = staticData.LiteralNames + l.SymbolicNames = staticData.SymbolicNames + l.GrammarFileName = "TrinoLexer.g4" + // TODO: l.EOF = antlr.TokenEOF + + return l +} + +// TrinoLexer tokens. +const ( + TrinoLexerABSENT_ = 1 + TrinoLexerADD_ = 2 + TrinoLexerADMIN_ = 3 + TrinoLexerAFTER_ = 4 + TrinoLexerALL_ = 5 + TrinoLexerALTER_ = 6 + TrinoLexerANALYZE_ = 7 + TrinoLexerAND_ = 8 + TrinoLexerANY_ = 9 + TrinoLexerARRAY_ = 10 + TrinoLexerAS_ = 11 + TrinoLexerASC_ = 12 + TrinoLexerAT_ = 13 + TrinoLexerAUTHORIZATION_ = 14 + TrinoLexerBEGIN_ = 15 + TrinoLexerBERNOULLI_ = 16 + TrinoLexerBETWEEN_ = 17 + TrinoLexerBOTH_ = 18 + TrinoLexerBY_ = 19 + TrinoLexerCALL_ = 20 + TrinoLexerCALLED_ = 21 + TrinoLexerCASCADE_ = 22 + TrinoLexerCASE_ = 23 + TrinoLexerCAST_ = 24 + TrinoLexerCATALOG_ = 25 + TrinoLexerCATALOGS_ = 26 + TrinoLexerCOLUMN_ = 27 + TrinoLexerCOLUMNS_ = 28 + TrinoLexerCOMMENT_ = 29 + TrinoLexerCOMMIT_ = 30 + TrinoLexerCOMMITTED_ = 31 + TrinoLexerCONDITIONAL_ = 32 + TrinoLexerCONSTRAINT_ = 33 + TrinoLexerCOUNT_ = 34 + TrinoLexerCOPARTITION_ = 35 + TrinoLexerCREATE_ = 36 + TrinoLexerCROSS_ = 37 + TrinoLexerCUBE_ = 38 + TrinoLexerCURRENT_ = 39 + TrinoLexerCURRENT_CATALOG_ = 40 + TrinoLexerCURRENT_DATE_ = 41 + TrinoLexerCURRENT_PATH_ = 42 + TrinoLexerCURRENT_ROLE_ = 43 + TrinoLexerCURRENT_SCHEMA_ = 44 + TrinoLexerCURRENT_TIME_ = 45 + TrinoLexerCURRENT_TIMESTAMP_ = 46 + TrinoLexerCURRENT_USER_ = 47 + TrinoLexerDATA_ = 48 + TrinoLexerDATE_ = 49 + TrinoLexerDAY_ = 50 + TrinoLexerDEALLOCATE_ = 51 + TrinoLexerDECLARE_ = 52 + TrinoLexerDEFAULT_ = 53 + TrinoLexerDEFINE_ = 54 + TrinoLexerDEFINER_ = 55 + TrinoLexerDELETE_ = 56 + TrinoLexerDENY_ = 57 + TrinoLexerDESC_ = 58 + TrinoLexerDESCRIBE_ = 59 + TrinoLexerDESCRIPTOR_ = 60 + TrinoLexerDETERMINISTIC_ = 61 + TrinoLexerDISTINCT_ = 62 + TrinoLexerDISTRIBUTED_ = 63 + TrinoLexerDO_ = 64 + TrinoLexerDOUBLE_ = 65 + TrinoLexerDROP_ = 66 + TrinoLexerELSE_ = 67 + TrinoLexerEMPTY_ = 68 + TrinoLexerELSEIF_ = 69 + TrinoLexerENCODING_ = 70 + TrinoLexerEND_ = 71 + TrinoLexerERROR_ = 72 + TrinoLexerESCAPE_ = 73 + TrinoLexerEXCEPT_ = 74 + TrinoLexerEXCLUDING_ = 75 + TrinoLexerEXECUTE_ = 76 + TrinoLexerEXISTS_ = 77 + TrinoLexerEXPLAIN_ = 78 + TrinoLexerEXTRACT_ = 79 + TrinoLexerFALSE_ = 80 + TrinoLexerFETCH_ = 81 + TrinoLexerFILTER_ = 82 + TrinoLexerFINAL_ = 83 + TrinoLexerFIRST_ = 84 + TrinoLexerFOLLOWING_ = 85 + TrinoLexerFOR_ = 86 + TrinoLexerFORMAT_ = 87 + TrinoLexerFROM_ = 88 + TrinoLexerFULL_ = 89 + TrinoLexerFUNCTION_ = 90 + TrinoLexerFUNCTIONS_ = 91 + TrinoLexerGRACE_ = 92 + TrinoLexerGRANT_ = 93 + TrinoLexerGRANTED_ = 94 + TrinoLexerGRANTS_ = 95 + TrinoLexerGRAPHVIZ_ = 96 + TrinoLexerGROUP_ = 97 + TrinoLexerGROUPING_ = 98 + TrinoLexerGROUPS_ = 99 + TrinoLexerHAVING_ = 100 + TrinoLexerHOUR_ = 101 + TrinoLexerIF_ = 102 + TrinoLexerIGNORE_ = 103 + TrinoLexerIMMEDIATE_ = 104 + TrinoLexerIN_ = 105 + TrinoLexerINCLUDING_ = 106 + TrinoLexerINITIAL_ = 107 + TrinoLexerINNER_ = 108 + TrinoLexerINPUT_ = 109 + TrinoLexerINSERT_ = 110 + TrinoLexerINTERSECT_ = 111 + TrinoLexerINTERVAL_ = 112 + TrinoLexerINTO_ = 113 + TrinoLexerINVOKER_ = 114 + TrinoLexerIO_ = 115 + TrinoLexerIS_ = 116 + TrinoLexerISOLATION_ = 117 + TrinoLexerITERATE_ = 118 + TrinoLexerJOIN_ = 119 + TrinoLexerJSON_ = 120 + TrinoLexerJSON_ARRAY_ = 121 + TrinoLexerJSON_EXISTS_ = 122 + TrinoLexerJSON_OBJECT_ = 123 + TrinoLexerJSON_QUERY_ = 124 + TrinoLexerJSON_TABLE_ = 125 + TrinoLexerJSON_VALUE_ = 126 + TrinoLexerKEEP_ = 127 + TrinoLexerKEY_ = 128 + TrinoLexerKEYS_ = 129 + TrinoLexerLANGUAGE_ = 130 + TrinoLexerLAST_ = 131 + TrinoLexerLATERAL_ = 132 + TrinoLexerLEADING_ = 133 + TrinoLexerLEAVE_ = 134 + TrinoLexerLEFT_ = 135 + TrinoLexerLEVEL_ = 136 + TrinoLexerLIKE_ = 137 + TrinoLexerLIMIT_ = 138 + TrinoLexerLISTAGG_ = 139 + TrinoLexerLOCAL_ = 140 + TrinoLexerLOCALTIME_ = 141 + TrinoLexerLOCALTIMESTAMP_ = 142 + TrinoLexerLOGICAL_ = 143 + TrinoLexerLOOP_ = 144 + TrinoLexerMAP_ = 145 + TrinoLexerMATCH_ = 146 + TrinoLexerMATCHED_ = 147 + TrinoLexerMATCHES_ = 148 + TrinoLexerMATCH_RECOGNIZE_ = 149 + TrinoLexerMATERIALIZED_ = 150 + TrinoLexerMEASURES_ = 151 + TrinoLexerMERGE_ = 152 + TrinoLexerMINUTE_ = 153 + TrinoLexerMONTH_ = 154 + TrinoLexerNATURAL_ = 155 + TrinoLexerNESTED_ = 156 + TrinoLexerNEXT_ = 157 + TrinoLexerNFC_ = 158 + TrinoLexerNFD_ = 159 + TrinoLexerNFKC_ = 160 + TrinoLexerNFKD_ = 161 + TrinoLexerNO_ = 162 + TrinoLexerNONE_ = 163 + TrinoLexerNORMALIZE_ = 164 + TrinoLexerNOT_ = 165 + TrinoLexerNULL_ = 166 + TrinoLexerNULLIF_ = 167 + TrinoLexerNULLS_ = 168 + TrinoLexerOBJECT_ = 169 + TrinoLexerOF_ = 170 + TrinoLexerOFFSET_ = 171 + TrinoLexerOMIT_ = 172 + TrinoLexerON_ = 173 + TrinoLexerONE_ = 174 + TrinoLexerONLY_ = 175 + TrinoLexerOPTION_ = 176 + TrinoLexerOR_ = 177 + TrinoLexerORDER_ = 178 + TrinoLexerORDINALITY_ = 179 + TrinoLexerOUTER_ = 180 + TrinoLexerOUTPUT_ = 181 + TrinoLexerOVER_ = 182 + TrinoLexerOVERFLOW_ = 183 + TrinoLexerPARTITION_ = 184 + TrinoLexerPARTITIONS_ = 185 + TrinoLexerPASSING_ = 186 + TrinoLexerPAST_ = 187 + TrinoLexerPATH_ = 188 + TrinoLexerPATTERN_ = 189 + TrinoLexerPER_ = 190 + TrinoLexerPERIOD_ = 191 + TrinoLexerPERMUTE_ = 192 + TrinoLexerPLAN_ = 193 + TrinoLexerPOSITION_ = 194 + TrinoLexerPRECEDING_ = 195 + TrinoLexerPRECISION_ = 196 + TrinoLexerPREPARE_ = 197 + TrinoLexerPRIVILEGES_ = 198 + TrinoLexerPROPERTIES_ = 199 + TrinoLexerPRUNE_ = 200 + TrinoLexerQUOTES_ = 201 + TrinoLexerRANGE_ = 202 + TrinoLexerREAD_ = 203 + TrinoLexerRECURSIVE_ = 204 + TrinoLexerREFRESH_ = 205 + TrinoLexerRENAME_ = 206 + TrinoLexerREPEAT_ = 207 + TrinoLexerREPEATABLE_ = 208 + TrinoLexerREPLACE_ = 209 + TrinoLexerRESET_ = 210 + TrinoLexerRESPECT_ = 211 + TrinoLexerRESTRICT_ = 212 + TrinoLexerRETURN_ = 213 + TrinoLexerRETURNING_ = 214 + TrinoLexerRETURNS_ = 215 + TrinoLexerREVOKE_ = 216 + TrinoLexerRIGHT_ = 217 + TrinoLexerROLE_ = 218 + TrinoLexerROLES_ = 219 + TrinoLexerROLLBACK_ = 220 + TrinoLexerROLLUP_ = 221 + TrinoLexerROW_ = 222 + TrinoLexerROWS_ = 223 + TrinoLexerRUNNING_ = 224 + TrinoLexerSCALAR_ = 225 + TrinoLexerSCHEMA_ = 226 + TrinoLexerSCHEMAS_ = 227 + TrinoLexerSECOND_ = 228 + TrinoLexerSECURITY_ = 229 + TrinoLexerSEEK_ = 230 + TrinoLexerSELECT_ = 231 + TrinoLexerSERIALIZABLE_ = 232 + TrinoLexerSESSION_ = 233 + TrinoLexerSET_ = 234 + TrinoLexerSETS_ = 235 + TrinoLexerSHOW_ = 236 + TrinoLexerSKIP_ = 237 + TrinoLexerSOME_ = 238 + TrinoLexerSTART_ = 239 + TrinoLexerSTATS_ = 240 + TrinoLexerSUBSET_ = 241 + TrinoLexerSUBSTRING_ = 242 + TrinoLexerSYSTEM_ = 243 + TrinoLexerTABLE_ = 244 + TrinoLexerTABLES_ = 245 + TrinoLexerTABLESAMPLE_ = 246 + TrinoLexerTEXT_ = 247 + TrinoLexerTEXT_STRING_ = 248 + TrinoLexerTHEN_ = 249 + TrinoLexerTIES_ = 250 + TrinoLexerTIME_ = 251 + TrinoLexerTIMESTAMP_ = 252 + TrinoLexerTO_ = 253 + TrinoLexerTRAILING_ = 254 + TrinoLexerTRANSACTION_ = 255 + TrinoLexerTRIM_ = 256 + TrinoLexerTRUE_ = 257 + TrinoLexerTRUNCATE_ = 258 + TrinoLexerTRY_CAST_ = 259 + TrinoLexerTYPE_ = 260 + TrinoLexerUESCAPE_ = 261 + TrinoLexerUNBOUNDED_ = 262 + TrinoLexerUNCOMMITTED_ = 263 + TrinoLexerUNCONDITIONAL_ = 264 + TrinoLexerUNION_ = 265 + TrinoLexerUNIQUE_ = 266 + TrinoLexerUNKNOWN_ = 267 + TrinoLexerUNMATCHED_ = 268 + TrinoLexerUNNEST_ = 269 + TrinoLexerUNTIL_ = 270 + TrinoLexerUPDATE_ = 271 + TrinoLexerUSE_ = 272 + TrinoLexerUSER_ = 273 + TrinoLexerUSING_ = 274 + TrinoLexerUTF16_ = 275 + TrinoLexerUTF32_ = 276 + TrinoLexerUTF8_ = 277 + TrinoLexerVALIDATE_ = 278 + TrinoLexerVALUE_ = 279 + TrinoLexerVALUES_ = 280 + TrinoLexerVERBOSE_ = 281 + TrinoLexerVERSION_ = 282 + TrinoLexerVIEW_ = 283 + TrinoLexerWHEN_ = 284 + TrinoLexerWHERE_ = 285 + TrinoLexerWHILE_ = 286 + TrinoLexerWINDOW_ = 287 + TrinoLexerWITH_ = 288 + TrinoLexerWITHIN_ = 289 + TrinoLexerWITHOUT_ = 290 + TrinoLexerWORK_ = 291 + TrinoLexerWRAPPER_ = 292 + TrinoLexerWRITE_ = 293 + TrinoLexerYEAR_ = 294 + TrinoLexerZONE_ = 295 + TrinoLexerEQ_ = 296 + TrinoLexerNEQ_ = 297 + TrinoLexerLT_ = 298 + TrinoLexerLTE_ = 299 + TrinoLexerGT_ = 300 + TrinoLexerGTE_ = 301 + TrinoLexerPLUS_ = 302 + TrinoLexerMINUS_ = 303 + TrinoLexerASTERISK_ = 304 + TrinoLexerSLASH_ = 305 + TrinoLexerPERCENT_ = 306 + TrinoLexerCONCAT_ = 307 + TrinoLexerQUESTION_MARK_ = 308 + TrinoLexerSEMICOLON_ = 309 + TrinoLexerDOT_ = 310 + TrinoLexerCOLON_ = 311 + TrinoLexerCOMMA_ = 312 + TrinoLexerLPAREN_ = 313 + TrinoLexerRPAREN_ = 314 + TrinoLexerLSQUARE_ = 315 + TrinoLexerRSQUARE_ = 316 + TrinoLexerLCURLY_ = 317 + TrinoLexerRCURLY_ = 318 + TrinoLexerLCURLYHYPHEN_ = 319 + TrinoLexerRCURLYHYPHEN_ = 320 + TrinoLexerLARROW_ = 321 + TrinoLexerRARROW_ = 322 + TrinoLexerRDOUBLEARROW_ = 323 + TrinoLexerVBAR_ = 324 + TrinoLexerDOLLAR_ = 325 + TrinoLexerCARET_ = 326 + TrinoLexerSTRING_ = 327 + TrinoLexerUNICODE_STRING_ = 328 + TrinoLexerBINARY_LITERAL_ = 329 + TrinoLexerINTEGER_VALUE_ = 330 + TrinoLexerDECIMAL_VALUE_ = 331 + TrinoLexerDOUBLE_VALUE_ = 332 + TrinoLexerIDENTIFIER_ = 333 + TrinoLexerDIGIT_IDENTIFIER_ = 334 + TrinoLexerQUOTED_IDENTIFIER_ = 335 + TrinoLexerBACKQUOTED_IDENTIFIER_ = 336 + TrinoLexerSIMPLE_COMMENT_ = 337 + TrinoLexerBRACKETED_COMMENT_ = 338 + TrinoLexerWS_ = 339 + TrinoLexerUNRECOGNIZED_ = 340 +) diff --git a/trino/trino_parser.go b/trino/trino_parser.go new file mode 100644 index 0000000..e944f75 --- /dev/null +++ b/trino/trino_parser.go @@ -0,0 +1,59634 @@ +// Code generated from TrinoParser.g4 by ANTLR 4.13.2. DO NOT EDIT. + +package trino // TrinoParser +import ( + "fmt" + "strconv" + "sync" + + "github.com/antlr4-go/antlr/v4" +) + +// Suppress unused import errors +var _ = fmt.Printf +var _ = strconv.Itoa +var _ = sync.Once{} + +type TrinoParser struct { + *antlr.BaseParser +} + +var TrinoParserParserStaticData struct { + once sync.Once + serializedATN []int32 + LiteralNames []string + SymbolicNames []string + RuleNames []string + PredictionContextCache *antlr.PredictionContextCache + atn *antlr.ATN + decisionToDFA []*antlr.DFA +} + +func trinoparserParserInit() { + staticData := &TrinoParserParserStaticData + staticData.LiteralNames = []string{ + "", "'ABSENT'", "'ADD'", "'ADMIN'", "'AFTER'", "'ALL'", "'ALTER'", "'ANALYZE'", + "'AND'", "'ANY'", "'ARRAY'", "'AS'", "'ASC'", "'AT'", "'AUTHORIZATION'", + "'BEGIN'", "'BERNOULLI'", "'BETWEEN'", "'BOTH'", "'BY'", "'CALL'", "'CALLED'", + "'CASCADE'", "'CASE'", "'CAST'", "'CATALOG'", "'CATALOGS'", "'COLUMN'", + "'COLUMNS'", "'COMMENT'", "'COMMIT'", "'COMMITTED'", "'CONDITIONAL'", + "'CONSTRAINT'", "'COUNT'", "'COPARTITION'", "'CREATE'", "'CROSS'", "'CUBE'", + "'CURRENT'", "'CURRENT_CATALOG'", "'CURRENT_DATE'", "'CURRENT_PATH'", + "'CURRENT_ROLE'", "'CURRENT_SCHEMA'", "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", + "'CURRENT_USER'", "'DATA'", "'DATE'", "'DAY'", "'DEALLOCATE'", "'DECLARE'", + "'DEFAULT'", "'DEFINE'", "'DEFINER'", "'DELETE'", "'DENY'", "'DESC'", + "'DESCRIBE'", "'DESCRIPTOR'", "'DETERMINISTIC'", "'DISTINCT'", "'DISTRIBUTED'", + "'DO'", "'DOUBLE'", "'DROP'", "'ELSE'", "'EMPTY'", "'ELSEIF'", "'ENCODING'", + "'END'", "'ERROR'", "'ESCAPE'", "'EXCEPT'", "'EXCLUDING'", "'EXECUTE'", + "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", "'FALSE'", "'FETCH'", "'FILTER'", + "'FINAL'", "'FIRST'", "'FOLLOWING'", "'FOR'", "'FORMAT'", "'FROM'", + "'FULL'", "'FUNCTION'", "'FUNCTIONS'", "'GRACE'", "'GRANT'", "'GRANTED'", + "'GRANTS'", "'GRAPHVIZ'", "'GROUP'", "'GROUPING'", "'GROUPS'", "'HAVING'", + "'HOUR'", "'IF'", "'IGNORE'", "'IMMEDIATE'", "'IN'", "'INCLUDING'", + "'INITIAL'", "'INNER'", "'INPUT'", "'INSERT'", "'INTERSECT'", "'INTERVAL'", + "'INTO'", "'INVOKER'", "'IO'", "'IS'", "'ISOLATION'", "'ITERATE'", "'JOIN'", + "'JSON'", "'JSON_ARRAY'", "'JSON_EXISTS'", "'JSON_OBJECT'", "'JSON_QUERY'", + "'JSON_TABLE'", "'JSON_VALUE'", "'KEEP'", "'KEY'", "'KEYS'", "'LANGUAGE'", + "'LAST'", "'LATERAL'", "'LEADING'", "'LEAVE'", "'LEFT'", "'LEVEL'", + "'LIKE'", "'LIMIT'", "'LISTAGG'", "'LOCAL'", "'LOCALTIME'", "'LOCALTIMESTAMP'", + "'LOGICAL'", "'LOOP'", "'MAP'", "'MATCH'", "'MATCHED'", "'MATCHES'", + "'MATCH_RECOGNIZE'", "'MATERIALIZED'", "'MEASURES'", "'MERGE'", "'MINUTE'", + "'MONTH'", "'NATURAL'", "'NESTED'", "'NEXT'", "'NFC'", "'NFD'", "'NFKC'", + "'NFKD'", "'NO'", "'NONE'", "'NORMALIZE'", "'NOT'", "'NULL'", "'NULLIF'", + "'NULLS'", "'OBJECT'", "'OF'", "'OFFSET'", "'OMIT'", "'ON'", "'ONE'", + "'ONLY'", "'OPTION'", "'OR'", "'ORDER'", "'ORDINALITY'", "'OUTER'", + "'OUTPUT'", "'OVER'", "'OVERFLOW'", "'PARTITION'", "'PARTITIONS'", "'PASSING'", + "'PAST'", "'PATH'", "'PATTERN'", "'PER'", "'PERIOD'", "'PERMUTE'", "'PLAN'", + "'POSITION'", "'PRECEDING'", "'PRECISION'", "'PREPARE'", "'PRIVILEGES'", + "'PROPERTIES'", "'PRUNE'", "'QUOTES'", "'RANGE'", "'READ'", "'RECURSIVE'", + "'REFRESH'", "'RENAME'", "'REPEAT'", "'REPEATABLE'", "'REPLACE'", "'RESET'", + "'RESPECT'", "'RESTRICT'", "'RETURN'", "'RETURNING'", "'RETURNS'", "'REVOKE'", + "'RIGHT'", "'ROLE'", "'ROLES'", "'ROLLBACK'", "'ROLLUP'", "'ROW'", "'ROWS'", + "'RUNNING'", "'SCALAR'", "'SCHEMA'", "'SCHEMAS'", "'SECOND'", "'SECURITY'", + "'SEEK'", "'SELECT'", "'SERIALIZABLE'", "'SESSION'", "'SET'", "'SETS'", + "'SHOW'", "'SKIP'", "'SOME'", "'START'", "'STATS'", "'SUBSET'", "'SUBSTRING'", + "'SYSTEM'", "'TABLE'", "'TABLES'", "'TABLESAMPLE'", "'TEXT'", "'STRING'", + "'THEN'", "'TIES'", "'TIME'", "'TIMESTAMP'", "'TO'", "'TRAILING'", "'TRANSACTION'", + "'TRIM'", "'TRUE'", "'TRUNCATE'", "'TRY_CAST'", "'TYPE'", "'UESCAPE'", + "'UNBOUNDED'", "'UNCOMMITTED'", "'UNCONDITIONAL'", "'UNION'", "'UNIQUE'", + "'UNKNOWN'", "'UNMATCHED'", "'UNNEST'", "'UNTIL'", "'UPDATE'", "'USE'", + "'USER'", "'USING'", "'UTF16'", "'UTF32'", "'UTF8'", "'VALIDATE'", "'VALUE'", + "'VALUES'", "'VERBOSE'", "'VERSION'", "'VIEW'", "'WHEN'", "'WHERE'", + "'WHILE'", "'WINDOW'", "'WITH'", "'WITHIN'", "'WITHOUT'", "'WORK'", + "'WRAPPER'", "'WRITE'", "'YEAR'", "'ZONE'", "'='", "", "'<'", "'<='", + "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", "'%'", "'||'", "'?'", "';'", + "'.'", "'_:'", "','", "'('", "')'", "'['", "']'", "'{'", "'}'", "'{-'", + "'-}'", "'<-'", "'->'", "'=>'", "'|'", "'$'", "'^'", + } + staticData.SymbolicNames = []string{ + "", "ABSENT_", "ADD_", "ADMIN_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", + "AND_", "ANY_", "ARRAY_", "AS_", "ASC_", "AT_", "AUTHORIZATION_", "BEGIN_", + "BERNOULLI_", "BETWEEN_", "BOTH_", "BY_", "CALL_", "CALLED_", "CASCADE_", + "CASE_", "CAST_", "CATALOG_", "CATALOGS_", "COLUMN_", "COLUMNS_", "COMMENT_", + "COMMIT_", "COMMITTED_", "CONDITIONAL_", "CONSTRAINT_", "COUNT_", "COPARTITION_", + "CREATE_", "CROSS_", "CUBE_", "CURRENT_", "CURRENT_CATALOG_", "CURRENT_DATE_", + "CURRENT_PATH_", "CURRENT_ROLE_", "CURRENT_SCHEMA_", "CURRENT_TIME_", + "CURRENT_TIMESTAMP_", "CURRENT_USER_", "DATA_", "DATE_", "DAY_", "DEALLOCATE_", + "DECLARE_", "DEFAULT_", "DEFINE_", "DEFINER_", "DELETE_", "DENY_", "DESC_", + "DESCRIBE_", "DESCRIPTOR_", "DETERMINISTIC_", "DISTINCT_", "DISTRIBUTED_", + "DO_", "DOUBLE_", "DROP_", "ELSE_", "EMPTY_", "ELSEIF_", "ENCODING_", + "END_", "ERROR_", "ESCAPE_", "EXCEPT_", "EXCLUDING_", "EXECUTE_", "EXISTS_", + "EXPLAIN_", "EXTRACT_", "FALSE_", "FETCH_", "FILTER_", "FINAL_", "FIRST_", + "FOLLOWING_", "FOR_", "FORMAT_", "FROM_", "FULL_", "FUNCTION_", "FUNCTIONS_", + "GRACE_", "GRANT_", "GRANTED_", "GRANTS_", "GRAPHVIZ_", "GROUP_", "GROUPING_", + "GROUPS_", "HAVING_", "HOUR_", "IF_", "IGNORE_", "IMMEDIATE_", "IN_", + "INCLUDING_", "INITIAL_", "INNER_", "INPUT_", "INSERT_", "INTERSECT_", + "INTERVAL_", "INTO_", "INVOKER_", "IO_", "IS_", "ISOLATION_", "ITERATE_", + "JOIN_", "JSON_", "JSON_ARRAY_", "JSON_EXISTS_", "JSON_OBJECT_", "JSON_QUERY_", + "JSON_TABLE_", "JSON_VALUE_", "KEEP_", "KEY_", "KEYS_", "LANGUAGE_", + "LAST_", "LATERAL_", "LEADING_", "LEAVE_", "LEFT_", "LEVEL_", "LIKE_", + "LIMIT_", "LISTAGG_", "LOCAL_", "LOCALTIME_", "LOCALTIMESTAMP_", "LOGICAL_", + "LOOP_", "MAP_", "MATCH_", "MATCHED_", "MATCHES_", "MATCH_RECOGNIZE_", + "MATERIALIZED_", "MEASURES_", "MERGE_", "MINUTE_", "MONTH_", "NATURAL_", + "NESTED_", "NEXT_", "NFC_", "NFD_", "NFKC_", "NFKD_", "NO_", "NONE_", + "NORMALIZE_", "NOT_", "NULL_", "NULLIF_", "NULLS_", "OBJECT_", "OF_", + "OFFSET_", "OMIT_", "ON_", "ONE_", "ONLY_", "OPTION_", "OR_", "ORDER_", + "ORDINALITY_", "OUTER_", "OUTPUT_", "OVER_", "OVERFLOW_", "PARTITION_", + "PARTITIONS_", "PASSING_", "PAST_", "PATH_", "PATTERN_", "PER_", "PERIOD_", + "PERMUTE_", "PLAN_", "POSITION_", "PRECEDING_", "PRECISION_", "PREPARE_", + "PRIVILEGES_", "PROPERTIES_", "PRUNE_", "QUOTES_", "RANGE_", "READ_", + "RECURSIVE_", "REFRESH_", "RENAME_", "REPEAT_", "REPEATABLE_", "REPLACE_", + "RESET_", "RESPECT_", "RESTRICT_", "RETURN_", "RETURNING_", "RETURNS_", + "REVOKE_", "RIGHT_", "ROLE_", "ROLES_", "ROLLBACK_", "ROLLUP_", "ROW_", + "ROWS_", "RUNNING_", "SCALAR_", "SCHEMA_", "SCHEMAS_", "SECOND_", "SECURITY_", + "SEEK_", "SELECT_", "SERIALIZABLE_", "SESSION_", "SET_", "SETS_", "SHOW_", + "SKIP_", "SOME_", "START_", "STATS_", "SUBSET_", "SUBSTRING_", "SYSTEM_", + "TABLE_", "TABLES_", "TABLESAMPLE_", "TEXT_", "TEXT_STRING_", "THEN_", + "TIES_", "TIME_", "TIMESTAMP_", "TO_", "TRAILING_", "TRANSACTION_", + "TRIM_", "TRUE_", "TRUNCATE_", "TRY_CAST_", "TYPE_", "UESCAPE_", "UNBOUNDED_", + "UNCOMMITTED_", "UNCONDITIONAL_", "UNION_", "UNIQUE_", "UNKNOWN_", "UNMATCHED_", + "UNNEST_", "UNTIL_", "UPDATE_", "USE_", "USER_", "USING_", "UTF16_", + "UTF32_", "UTF8_", "VALIDATE_", "VALUE_", "VALUES_", "VERBOSE_", "VERSION_", + "VIEW_", "WHEN_", "WHERE_", "WHILE_", "WINDOW_", "WITH_", "WITHIN_", + "WITHOUT_", "WORK_", "WRAPPER_", "WRITE_", "YEAR_", "ZONE_", "EQ_", + "NEQ_", "LT_", "LTE_", "GT_", "GTE_", "PLUS_", "MINUS_", "ASTERISK_", + "SLASH_", "PERCENT_", "CONCAT_", "QUESTION_MARK_", "SEMICOLON_", "DOT_", + "COLON_", "COMMA_", "LPAREN_", "RPAREN_", "LSQUARE_", "RSQUARE_", "LCURLY_", + "RCURLY_", "LCURLYHYPHEN_", "RCURLYHYPHEN_", "LARROW_", "RARROW_", "RDOUBLEARROW_", + "VBAR_", "DOLLAR_", "CARET_", "STRING_", "UNICODE_STRING_", "BINARY_LITERAL_", + "INTEGER_VALUE_", "DECIMAL_VALUE_", "DOUBLE_VALUE_", "IDENTIFIER_", + "DIGIT_IDENTIFIER_", "QUOTED_IDENTIFIER_", "BACKQUOTED_IDENTIFIER_", + "SIMPLE_COMMENT_", "BRACKETED_COMMENT_", "WS_", "UNRECOGNIZED_", + } + staticData.RuleNames = []string{ + "parse", "statements", "singleStatement", "standaloneExpression", "standalonePathSpecification", + "standaloneType", "standaloneRowPattern", "standaloneFunctionSpecification", + "statement", "rootQuery", "withFunction", "query", "with", "tableElement", + "columnDefinition", "likeClause", "properties", "propertyAssignments", + "property", "propertyValue", "queryNoWith", "limitRowCount", "rowCount", + "queryTerm", "queryPrimary", "sortItem", "querySpecification", "groupBy", + "groupingElement", "groupingSet", "windowDefinition", "windowSpecification", + "namedQuery", "setQuantifier", "selectItem", "as_column_alias", "column_alias", + "relation", "joinType", "joinCriteria", "sampledRelation", "sampleType", + "trimsSpecification", "listAggOverflowBehavior", "listaggCountIndication", + "patternRecognition", "measureDefinition", "rowsPerMatch", "emptyMatchHandling", + "skipTo", "subsetDefinition", "variableDefinition", "aliasedRelation", + "columnAliases", "relationPrimary", "tableFunctionCall", "tableFunctionArgument", + "tableArgument", "tableArgumentRelation", "descriptorArgument", "descriptorField", + "copartitionTables", "expression", "booleanExpression", "predicate_", + "valueExpression", "primaryExpression", "jsonPathInvocation", "jsonValueExpression", + "jsonRepresentation", "jsonArgument", "jsonExistsErrorBehavior", "jsonValueBehavior", + "jsonQueryWrapperBehavior", "jsonQueryBehavior", "jsonObjectMember", + "processingMode", "nullTreatment", "string_", "timeZoneSpecifier", "comparisonOperator", + "comparisonQuantifier", "booleanValue", "interval", "intervalField", + "normalForm", "type", "rowField", "typeParameter", "whenClause", "filter", + "mergeCase", "over", "windowFrame", "frameExtent", "frameBound", "rowPattern", + "patternPrimary", "patternQuantifier", "updateAssignment", "explainOption", + "transactionMode", "levelOfIsolation", "callArgument", "pathElement", + "pathSpecification", "functionSpecification", "functionDeclaration", + "parameterDeclaration", "returnsClause", "routineCharacteristic", "controlStatement", + "caseStatementWhenClause", "elseIfClause", "elseClause", "variableDeclaration", + "sqlStatementList", "privilege", "qualifiedName", "queryPeriod", "rangeType", + "grantor", "principal", "roles", "identifier", "number", "authorizationUser", + "nonReserved", + } + staticData.PredictionContextCache = antlr.NewPredictionContextCache() + staticData.serializedATN = []int32{ + 4, 1, 340, 3286, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, + 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, + 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, + 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, + 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, + 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, + 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, + 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, + 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, + 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, + 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, + 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, + 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, + 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, + 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, + 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, + 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, + 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, + 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, + 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, + 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, + 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, + 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, + 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, + 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, + 126, 2, 127, 7, 127, 1, 0, 5, 0, 258, 8, 0, 10, 0, 12, 0, 261, 9, 0, 1, + 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 271, 8, 1, 1, 1, 3, + 1, 274, 8, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, + 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 307, 8, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 314, 8, 8, 1, 8, 1, 8, 3, 8, 318, + 8, 8, 1, 8, 1, 8, 3, 8, 322, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 328, 8, + 8, 1, 8, 1, 8, 3, 8, 332, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 339, + 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 344, 8, 8, 1, 8, 1, 8, 3, 8, 348, 8, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 3, 8, 354, 8, 8, 1, 8, 1, 8, 3, 8, 358, 8, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 377, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, + 383, 8, 8, 1, 8, 1, 8, 3, 8, 387, 8, 8, 1, 8, 1, 8, 3, 8, 391, 8, 8, 1, + 8, 1, 8, 3, 8, 395, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 403, + 8, 8, 1, 8, 1, 8, 3, 8, 407, 8, 8, 1, 8, 3, 8, 410, 8, 8, 1, 8, 1, 8, 1, + 8, 3, 8, 415, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 421, 8, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 5, 8, 428, 8, 8, 10, 8, 12, 8, 431, 9, 8, 1, 8, 1, 8, + 1, 8, 3, 8, 436, 8, 8, 1, 8, 1, 8, 3, 8, 440, 8, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 3, 8, 446, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 453, 8, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 462, 8, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 474, 8, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 483, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 3, 8, 492, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 498, 8, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 509, 8, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 517, 8, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 3, 8, 525, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, + 8, 532, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 542, + 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 549, 8, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 3, 8, 557, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 5, 8, 591, 8, 8, 10, 8, 12, 8, 594, 9, 8, 3, 8, 596, 8, 8, + 1, 8, 3, 8, 599, 8, 8, 1, 8, 1, 8, 3, 8, 603, 8, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 3, 8, 609, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 614, 8, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 3, 8, 621, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 627, 8, 8, 1, + 8, 1, 8, 3, 8, 631, 8, 8, 1, 8, 1, 8, 3, 8, 635, 8, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 3, 8, 643, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 649, 8, + 8, 1, 8, 1, 8, 3, 8, 653, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 667, 8, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 3, 8, 675, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 694, + 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 717, + 8, 8, 10, 8, 12, 8, 720, 9, 8, 3, 8, 722, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 3, 8, 729, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 736, 8, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 745, 8, 8, 1, 8, 1, 8, 3, + 8, 749, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 756, 8, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 764, 8, 8, 10, 8, 12, 8, 767, 9, 8, 1, 8, + 1, 8, 1, 8, 3, 8, 772, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 777, 8, 8, 1, 8, 1, + 8, 3, 8, 781, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 787, 8, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 5, 8, 794, 8, 8, 10, 8, 12, 8, 797, 9, 8, 1, 8, 1, 8, + 1, 8, 3, 8, 802, 8, 8, 1, 8, 1, 8, 3, 8, 806, 8, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 3, 8, 813, 8, 8, 1, 8, 1, 8, 3, 8, 817, 8, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 5, 8, 823, 8, 8, 10, 8, 12, 8, 826, 9, 8, 1, 8, 1, 8, 3, 8, 830, + 8, 8, 1, 8, 1, 8, 3, 8, 834, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 3, 8, 842, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 848, 8, 8, 10, 8, 12, 8, + 851, 9, 8, 1, 8, 1, 8, 3, 8, 855, 8, 8, 1, 8, 1, 8, 3, 8, 859, 8, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 869, 8, 8, 1, 8, 1, + 8, 1, 8, 5, 8, 874, 8, 8, 10, 8, 12, 8, 877, 9, 8, 1, 8, 1, 8, 3, 8, 881, + 8, 8, 1, 8, 1, 8, 3, 8, 885, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 3, 8, 895, 8, 8, 1, 8, 3, 8, 898, 8, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 5, 8, 905, 8, 8, 10, 8, 12, 8, 908, 9, 8, 1, 8, 1, 8, 3, 8, 912, + 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 918, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 942, 8, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 3, 8, 948, 8, 8, 3, 8, 950, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 956, + 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 962, 8, 8, 3, 8, 964, 8, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 972, 8, 8, 3, 8, 974, 8, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 3, 8, 980, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 986, 8, 8, 3, + 8, 988, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 3, 8, 1003, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 1008, 8, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 1015, 8, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 1025, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, + 8, 1031, 8, 8, 3, 8, 1033, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, + 8, 1041, 8, 8, 3, 8, 1043, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 8, 1, 8, 5, 8, 1066, 8, 8, 10, 8, 12, 8, 1069, 9, 8, 3, 8, 1071, + 8, 8, 1, 8, 1, 8, 3, 8, 1075, 8, 8, 1, 8, 1, 8, 3, 8, 1079, 8, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 5, 8, 1095, 8, 8, 10, 8, 12, 8, 1098, 9, 8, 3, 8, 1100, 8, 8, 1, + 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 1109, 8, 8, 10, 8, 12, 8, + 1112, 9, 8, 3, 8, 1114, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 1130, 8, 8, 1, 8, 1, 8, + 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 1138, 8, 8, 10, 8, 12, 8, 1141, 9, 8, 1, + 8, 1, 8, 3, 8, 1145, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 1151, 8, 8, 1, + 8, 3, 8, 1154, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 4, 8, 1161, 8, 8, 11, + 8, 12, 8, 1162, 3, 8, 1165, 8, 8, 1, 9, 3, 9, 1168, 8, 9, 1, 9, 1, 9, 1, + 10, 1, 10, 1, 10, 1, 10, 5, 10, 1176, 8, 10, 10, 10, 12, 10, 1179, 9, 10, + 1, 11, 3, 11, 1182, 8, 11, 1, 11, 1, 11, 1, 12, 1, 12, 3, 12, 1188, 8, + 12, 1, 12, 1, 12, 1, 12, 5, 12, 1193, 8, 12, 10, 12, 12, 12, 1196, 9, 12, + 1, 13, 1, 13, 3, 13, 1200, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 1206, + 8, 14, 1, 14, 1, 14, 3, 14, 1210, 8, 14, 1, 14, 1, 14, 3, 14, 1214, 8, + 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 1220, 8, 15, 1, 16, 1, 16, 1, 16, + 1, 16, 1, 17, 1, 17, 1, 17, 5, 17, 1229, 8, 17, 10, 17, 12, 17, 1232, 9, + 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 1240, 8, 19, 1, 20, + 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 1248, 8, 20, 10, 20, 12, 20, + 1251, 9, 20, 3, 20, 1253, 8, 20, 1, 20, 1, 20, 1, 20, 3, 20, 1258, 8, 20, + 3, 20, 1260, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 1267, 8, + 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 1273, 8, 20, 3, 20, 1275, 8, 20, + 1, 21, 1, 21, 3, 21, 1279, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, + 23, 1, 23, 1, 23, 3, 23, 1289, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, + 1295, 8, 23, 1, 23, 5, 23, 1298, 8, 23, 10, 23, 12, 23, 1301, 9, 23, 1, + 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 1310, 8, 24, 10, 24, + 12, 24, 1313, 9, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 1319, 8, 24, 1, + 25, 1, 25, 3, 25, 1323, 8, 25, 1, 25, 1, 25, 3, 25, 1327, 8, 25, 1, 26, + 1, 26, 3, 26, 1331, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 1336, 8, 26, 10, + 26, 12, 26, 1339, 9, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 1345, 8, 26, + 10, 26, 12, 26, 1348, 9, 26, 3, 26, 1350, 8, 26, 1, 26, 1, 26, 3, 26, 1354, + 8, 26, 1, 26, 1, 26, 1, 26, 3, 26, 1359, 8, 26, 1, 26, 1, 26, 3, 26, 1363, + 8, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 1369, 8, 26, 10, 26, 12, 26, + 1372, 9, 26, 3, 26, 1374, 8, 26, 1, 27, 3, 27, 1377, 8, 27, 1, 27, 1, 27, + 1, 27, 5, 27, 1382, 8, 27, 10, 27, 12, 27, 1385, 9, 27, 1, 28, 1, 28, 1, + 28, 1, 28, 1, 28, 1, 28, 5, 28, 1393, 8, 28, 10, 28, 12, 28, 1396, 9, 28, + 3, 28, 1398, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 1406, + 8, 28, 10, 28, 12, 28, 1409, 9, 28, 3, 28, 1411, 8, 28, 1, 28, 1, 28, 1, + 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 1420, 8, 28, 10, 28, 12, 28, 1423, + 9, 28, 1, 28, 1, 28, 3, 28, 1427, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 5, + 29, 1433, 8, 29, 10, 29, 12, 29, 1436, 9, 29, 3, 29, 1438, 8, 29, 1, 29, + 1, 29, 3, 29, 1442, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, + 31, 3, 31, 1451, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 5, 31, 1458, + 8, 31, 10, 31, 12, 31, 1461, 9, 31, 3, 31, 1463, 8, 31, 1, 31, 1, 31, 1, + 31, 1, 31, 1, 31, 5, 31, 1470, 8, 31, 10, 31, 12, 31, 1473, 9, 31, 3, 31, + 1475, 8, 31, 1, 31, 3, 31, 1478, 8, 31, 1, 32, 1, 32, 3, 32, 1482, 8, 32, + 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 3, 34, 1493, + 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1500, 8, 34, 1, 34, 3, + 34, 1503, 8, 34, 1, 35, 3, 35, 1506, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, + 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, + 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1529, 8, 37, 5, 37, + 1531, 8, 37, 10, 37, 12, 37, 1534, 9, 37, 1, 38, 3, 38, 1537, 8, 38, 1, + 38, 1, 38, 3, 38, 1541, 8, 38, 3, 38, 1543, 8, 38, 1, 39, 1, 39, 1, 39, + 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 1552, 8, 39, 10, 39, 12, 39, 1555, 9, + 39, 1, 39, 1, 39, 3, 39, 1559, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, + 1, 40, 1, 40, 3, 40, 1568, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, + 43, 1, 43, 3, 43, 1577, 8, 43, 1, 43, 3, 43, 1580, 8, 43, 1, 44, 1, 44, + 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 1593, + 8, 45, 10, 45, 12, 45, 1596, 9, 45, 3, 45, 1598, 8, 45, 1, 45, 1, 45, 1, + 45, 1, 45, 1, 45, 5, 45, 1605, 8, 45, 10, 45, 12, 45, 1608, 9, 45, 3, 45, + 1610, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 1616, 8, 45, 10, 45, 12, + 45, 1619, 9, 45, 3, 45, 1621, 8, 45, 1, 45, 3, 45, 1624, 8, 45, 1, 45, + 1, 45, 1, 45, 3, 45, 1629, 8, 45, 1, 45, 3, 45, 1632, 8, 45, 1, 45, 1, + 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 1642, 8, 45, 10, 45, + 12, 45, 1645, 9, 45, 3, 45, 1647, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, + 45, 1653, 8, 45, 10, 45, 12, 45, 1656, 9, 45, 1, 45, 1, 45, 3, 45, 1660, + 8, 45, 1, 45, 1, 45, 3, 45, 1664, 8, 45, 3, 45, 1666, 8, 45, 3, 45, 1668, + 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, + 47, 1, 47, 1, 47, 1, 47, 3, 47, 1683, 8, 47, 3, 47, 1685, 8, 47, 1, 48, + 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1696, 8, + 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1703, 8, 49, 1, 49, 3, 49, + 1706, 8, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1711, 8, 49, 1, 50, 1, 50, 1, + 50, 1, 50, 1, 50, 1, 50, 5, 50, 1719, 8, 50, 10, 50, 12, 50, 1722, 9, 50, + 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 3, 52, 1732, 8, + 52, 1, 52, 1, 52, 3, 52, 1736, 8, 52, 3, 52, 1738, 8, 52, 1, 53, 1, 53, + 1, 53, 1, 53, 5, 53, 1744, 8, 53, 10, 53, 12, 53, 1747, 9, 53, 1, 53, 1, + 53, 1, 54, 1, 54, 3, 54, 1753, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, + 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1764, 8, 54, 10, 54, 12, 54, 1767, 9, + 54, 1, 54, 1, 54, 1, 54, 3, 54, 1772, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, + 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 3, + 54, 1788, 8, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 5, 55, 1795, 8, 55, + 10, 55, 12, 55, 1798, 9, 55, 3, 55, 1800, 8, 55, 1, 55, 1, 55, 1, 55, 1, + 55, 5, 55, 1806, 8, 55, 10, 55, 12, 55, 1809, 9, 55, 3, 55, 1811, 8, 55, + 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 3, 56, 1818, 8, 56, 1, 56, 1, 56, 1, + 56, 3, 56, 1823, 8, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, + 5, 57, 1832, 8, 57, 10, 57, 12, 57, 1835, 9, 57, 3, 57, 1837, 8, 57, 1, + 57, 1, 57, 3, 57, 1841, 8, 57, 3, 57, 1843, 8, 57, 1, 57, 1, 57, 1, 57, + 1, 57, 1, 57, 1, 57, 3, 57, 1851, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, + 57, 1, 57, 5, 57, 1859, 8, 57, 10, 57, 12, 57, 1862, 9, 57, 1, 57, 1, 57, + 1, 57, 3, 57, 1867, 8, 57, 3, 57, 1869, 8, 57, 1, 58, 1, 58, 1, 58, 1, + 58, 1, 58, 3, 58, 1876, 8, 58, 1, 58, 1, 58, 3, 58, 1880, 8, 58, 3, 58, + 1882, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 1889, 8, 58, 1, + 58, 1, 58, 3, 58, 1893, 8, 58, 3, 58, 1895, 8, 58, 3, 58, 1897, 8, 58, + 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1904, 8, 59, 10, 59, 12, 59, + 1907, 9, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, + 59, 1917, 8, 59, 1, 60, 1, 60, 3, 60, 1921, 8, 60, 1, 61, 1, 61, 1, 61, + 1, 61, 1, 61, 1, 61, 5, 61, 1929, 8, 61, 10, 61, 12, 61, 1932, 9, 61, 1, + 61, 1, 61, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 3, 63, 1941, 8, 63, 1, 63, + 1, 63, 3, 63, 1945, 8, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, + 63, 1953, 8, 63, 10, 63, 12, 63, 1956, 9, 63, 1, 64, 1, 64, 1, 64, 1, 64, + 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 1968, 8, 64, 1, 64, 1, + 64, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 1976, 8, 64, 1, 64, 1, 64, 1, 64, + 1, 64, 1, 64, 5, 64, 1983, 8, 64, 10, 64, 12, 64, 1986, 9, 64, 1, 64, 1, + 64, 1, 64, 3, 64, 1991, 8, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, + 3, 64, 1999, 8, 64, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 2005, 8, 64, 1, + 64, 1, 64, 3, 64, 2009, 8, 64, 1, 64, 1, 64, 1, 64, 3, 64, 2014, 8, 64, + 1, 64, 1, 64, 1, 64, 3, 64, 2019, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 3, + 65, 2025, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, + 1, 65, 1, 65, 1, 65, 1, 65, 5, 65, 2039, 8, 65, 10, 65, 12, 65, 2042, 9, + 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 1, 66, 4, 66, 2069, 8, 66, 11, 66, 12, 66, 2070, + 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 5, 66, 2080, 8, 66, 10, + 66, 12, 66, 2083, 9, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2090, + 8, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2095, 8, 66, 1, 66, 1, 66, 1, 66, 3, + 66, 2100, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 5, 66, 2111, 8, 66, 10, 66, 12, 66, 2114, 9, 66, 1, 66, 1, 66, 1, + 66, 3, 66, 2119, 8, 66, 1, 66, 3, 66, 2122, 8, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 1, 66, 3, 66, 2129, 8, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2134, 8, + 66, 1, 66, 3, 66, 2137, 8, 66, 1, 66, 3, 66, 2140, 8, 66, 1, 66, 1, 66, + 1, 66, 3, 66, 2145, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 2150, 8, 66, 10, + 66, 12, 66, 2153, 9, 66, 3, 66, 2155, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 5, 66, 2162, 8, 66, 10, 66, 12, 66, 2165, 9, 66, 3, 66, 2167, 8, + 66, 1, 66, 1, 66, 3, 66, 2171, 8, 66, 1, 66, 3, 66, 2174, 8, 66, 1, 66, + 3, 66, 2177, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 5, 66, 2190, 8, 66, 10, 66, 12, 66, 2193, 9, 66, + 3, 66, 2195, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 4, 66, 2212, 8, 66, + 11, 66, 12, 66, 2213, 1, 66, 1, 66, 3, 66, 2218, 8, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 4, 66, 2224, 8, 66, 11, 66, 12, 66, 2225, 1, 66, 1, 66, 3, 66, + 2230, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 1, 66, 5, 66, 2253, 8, 66, 10, 66, 12, 66, 2256, 9, 66, 3, 66, 2258, + 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2267, 8, + 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2273, 8, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 3, 66, 2279, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2285, 8, + 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2294, 8, 66, + 1, 66, 3, 66, 2297, 8, 66, 1, 66, 3, 66, 2300, 8, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2319, 8, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 3, 66, 2328, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 5, 66, 2348, 8, 66, 10, 66, 12, 66, 2351, 9, 66, + 3, 66, 2353, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 3, 66, 2363, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 3, 66, 2372, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2378, 8, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 3, 66, 2384, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2395, 8, 66, 3, 66, 2397, 8, + 66, 1, 66, 1, 66, 1, 66, 3, 66, 2402, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, + 1, 66, 3, 66, 2409, 8, 66, 3, 66, 2411, 8, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 3, 66, 2417, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2423, 8, 66, + 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 5, 66, 2432, 8, 66, 10, + 66, 12, 66, 2435, 9, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, + 2443, 8, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2448, 8, 66, 1, 66, 1, 66, 1, + 66, 3, 66, 2453, 8, 66, 3, 66, 2455, 8, 66, 3, 66, 2457, 8, 66, 1, 66, + 1, 66, 1, 66, 1, 66, 3, 66, 2463, 8, 66, 3, 66, 2465, 8, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 1, 66, 5, 66, 2473, 8, 66, 10, 66, 12, 66, 2476, + 9, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2484, 8, 66, 3, + 66, 2486, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2492, 8, 66, 3, 66, + 2494, 8, 66, 1, 66, 3, 66, 2497, 8, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, + 66, 1, 66, 1, 66, 1, 66, 5, 66, 2507, 8, 66, 10, 66, 12, 66, 2510, 9, 66, + 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 5, 67, 2519, 8, 67, 10, + 67, 12, 67, 2522, 9, 67, 3, 67, 2524, 8, 67, 1, 68, 1, 68, 1, 68, 3, 68, + 2529, 8, 68, 1, 69, 1, 69, 1, 69, 3, 69, 2534, 8, 69, 1, 70, 1, 70, 1, + 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 2546, 8, 72, + 1, 73, 1, 73, 3, 73, 2550, 8, 73, 1, 73, 1, 73, 3, 73, 2554, 8, 73, 1, + 73, 3, 73, 2557, 8, 73, 3, 73, 2559, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, + 3, 74, 2565, 8, 74, 1, 75, 3, 75, 2568, 8, 75, 1, 75, 1, 75, 1, 75, 1, + 75, 1, 75, 1, 75, 1, 75, 1, 75, 3, 75, 2578, 8, 75, 1, 76, 1, 76, 1, 77, + 1, 77, 1, 77, 1, 77, 3, 77, 2586, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 3, + 78, 2592, 8, 78, 3, 78, 2594, 8, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, + 1, 79, 3, 79, 2602, 8, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, + 83, 1, 83, 3, 83, 2612, 8, 83, 1, 83, 1, 83, 1, 83, 1, 83, 3, 83, 2618, + 8, 83, 1, 84, 1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, + 86, 5, 86, 2630, 8, 86, 10, 86, 12, 86, 2633, 9, 86, 1, 86, 1, 86, 1, 86, + 1, 86, 1, 86, 1, 86, 3, 86, 2641, 8, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, + 86, 3, 86, 2648, 8, 86, 1, 86, 1, 86, 1, 86, 3, 86, 2653, 8, 86, 1, 86, + 1, 86, 1, 86, 1, 86, 1, 86, 3, 86, 2660, 8, 86, 1, 86, 1, 86, 1, 86, 1, + 86, 1, 86, 1, 86, 1, 86, 1, 86, 3, 86, 2670, 8, 86, 1, 86, 1, 86, 1, 86, + 3, 86, 2675, 8, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 3, 86, 2682, 8, + 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, + 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, + 86, 1, 86, 5, 86, 2706, 8, 86, 10, 86, 12, 86, 2709, 9, 86, 1, 86, 1, 86, + 3, 86, 2713, 8, 86, 3, 86, 2715, 8, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, + 86, 3, 86, 2722, 8, 86, 5, 86, 2724, 8, 86, 10, 86, 12, 86, 2727, 9, 86, + 1, 87, 1, 87, 1, 87, 1, 87, 3, 87, 2733, 8, 87, 1, 88, 1, 88, 3, 88, 2737, + 8, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, + 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 3, 91, 2754, 8, 91, 1, 91, 1, 91, + 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 5, 91, 2767, + 8, 91, 10, 91, 12, 91, 2770, 9, 91, 1, 91, 1, 91, 1, 91, 1, 91, 3, 91, + 2776, 8, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 3, 91, 2785, + 8, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 5, 91, 2793, 8, 91, 10, + 91, 12, 91, 2796, 9, 91, 1, 91, 1, 91, 3, 91, 2800, 8, 91, 1, 91, 1, 91, + 1, 91, 1, 91, 1, 91, 5, 91, 2807, 8, 91, 10, 91, 12, 91, 2810, 9, 91, 1, + 91, 1, 91, 3, 91, 2814, 8, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, + 3, 92, 2822, 8, 92, 1, 93, 1, 93, 1, 93, 1, 93, 5, 93, 2828, 8, 93, 10, + 93, 12, 93, 2831, 9, 93, 3, 93, 2833, 8, 93, 1, 93, 1, 93, 1, 93, 1, 93, + 3, 93, 2839, 8, 93, 1, 93, 3, 93, 2842, 8, 93, 1, 93, 1, 93, 1, 93, 1, + 93, 1, 93, 3, 93, 2849, 8, 93, 1, 93, 1, 93, 1, 93, 1, 93, 5, 93, 2855, + 8, 93, 10, 93, 12, 93, 2858, 9, 93, 3, 93, 2860, 8, 93, 1, 93, 1, 93, 1, + 93, 1, 93, 5, 93, 2866, 8, 93, 10, 93, 12, 93, 2869, 9, 93, 3, 93, 2871, + 8, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, + 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, + 1, 94, 1, 94, 1, 94, 1, 94, 3, 94, 2897, 8, 94, 1, 95, 1, 95, 1, 95, 1, + 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 3, 95, 2908, 8, 95, 1, 96, 1, 96, + 1, 96, 3, 96, 2913, 8, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 5, 96, 2920, + 8, 96, 10, 96, 12, 96, 2923, 9, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, + 1, 97, 1, 97, 1, 97, 5, 97, 2933, 8, 97, 10, 97, 12, 97, 2936, 9, 97, 1, + 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, + 1, 97, 3, 97, 2950, 8, 97, 1, 98, 1, 98, 3, 98, 2954, 8, 98, 1, 98, 1, + 98, 3, 98, 2958, 8, 98, 1, 98, 1, 98, 3, 98, 2962, 8, 98, 1, 98, 1, 98, + 1, 98, 1, 98, 3, 98, 2968, 8, 98, 1, 98, 1, 98, 3, 98, 2972, 8, 98, 1, + 98, 1, 98, 3, 98, 2976, 8, 98, 1, 98, 1, 98, 3, 98, 2980, 8, 98, 3, 98, + 2982, 8, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, + 3, 100, 2992, 8, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 3, 101, 2999, + 8, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 3, 102, + 3008, 8, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 3, 103, 3015, 8, + 103, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 3, 104, 3022, 8, 104, 1, 105, + 1, 105, 1, 105, 5, 105, 3027, 8, 105, 10, 105, 12, 105, 3030, 9, 105, 1, + 106, 1, 106, 1, 106, 1, 106, 5, 106, 3036, 8, 106, 10, 106, 12, 106, 3039, + 9, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 5, 107, + 3048, 8, 107, 10, 107, 12, 107, 3051, 9, 107, 3, 107, 3053, 8, 107, 1, + 107, 1, 107, 1, 108, 3, 108, 3058, 8, 108, 1, 108, 1, 108, 1, 109, 1, 109, + 1, 109, 1, 110, 1, 110, 1, 110, 3, 110, 3068, 8, 110, 1, 110, 1, 110, 1, + 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, + 110, 1, 110, 1, 110, 3, 110, 3084, 8, 110, 1, 111, 1, 111, 1, 111, 1, 111, + 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 4, 111, 3096, 8, 111, 11, + 111, 12, 111, 3097, 1, 111, 3, 111, 3101, 8, 111, 1, 111, 1, 111, 1, 111, + 1, 111, 1, 111, 4, 111, 3108, 8, 111, 11, 111, 12, 111, 3109, 1, 111, 3, + 111, 3113, 8, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, + 1, 111, 5, 111, 3123, 8, 111, 10, 111, 12, 111, 3126, 9, 111, 1, 111, 3, + 111, 3129, 8, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, + 1, 111, 1, 111, 1, 111, 1, 111, 5, 111, 3142, 8, 111, 10, 111, 12, 111, + 3145, 9, 111, 1, 111, 3, 111, 3148, 8, 111, 1, 111, 1, 111, 1, 111, 1, + 111, 3, 111, 3154, 8, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, + 1, 111, 1, 111, 3, 111, 3164, 8, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, + 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 3, 111, 3176, 8, 111, 1, 111, + 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 3, 111, 3185, 8, 111, 1, + 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, + 113, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 5, 115, 3204, + 8, 115, 10, 115, 12, 115, 3207, 9, 115, 1, 115, 1, 115, 1, 115, 3, 115, + 3212, 8, 115, 1, 116, 1, 116, 1, 116, 4, 116, 3217, 8, 116, 11, 116, 12, + 116, 3218, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 5, 118, 3226, 8, 118, + 10, 118, 12, 118, 3229, 9, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, + 1, 119, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 3, 121, 3242, 8, 121, 1, + 122, 1, 122, 1, 122, 1, 122, 1, 122, 3, 122, 3249, 8, 122, 1, 123, 1, 123, + 1, 123, 5, 123, 3254, 8, 123, 10, 123, 12, 123, 3257, 9, 123, 1, 124, 1, + 124, 1, 124, 1, 124, 1, 124, 3, 124, 3264, 8, 124, 1, 125, 3, 125, 3267, + 8, 125, 1, 125, 1, 125, 3, 125, 3271, 8, 125, 1, 125, 1, 125, 3, 125, 3275, + 8, 125, 1, 125, 3, 125, 3278, 8, 125, 1, 126, 1, 126, 3, 126, 3282, 8, + 126, 1, 127, 1, 127, 1, 127, 0, 7, 46, 74, 126, 130, 132, 172, 192, 128, + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, + 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, + 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, + 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, + 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, + 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, + 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, + 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 0, + 37, 2, 0, 22, 22, 212, 212, 2, 0, 55, 55, 114, 114, 2, 0, 226, 226, 244, + 244, 2, 0, 88, 88, 105, 105, 2, 0, 75, 75, 106, 106, 1, 0, 222, 223, 2, + 0, 84, 84, 157, 157, 2, 0, 308, 308, 330, 330, 2, 0, 74, 74, 265, 265, + 2, 0, 12, 12, 58, 58, 2, 0, 84, 84, 131, 131, 2, 0, 5, 5, 62, 62, 3, 0, + 89, 89, 135, 135, 217, 217, 2, 0, 16, 16, 243, 243, 3, 0, 18, 18, 133, + 133, 254, 254, 2, 0, 288, 288, 290, 290, 2, 0, 107, 107, 230, 230, 1, 0, + 302, 303, 1, 0, 304, 306, 2, 0, 127, 127, 172, 172, 1, 0, 275, 277, 4, + 0, 72, 72, 80, 80, 257, 257, 267, 267, 2, 0, 32, 32, 264, 264, 2, 0, 10, + 10, 169, 169, 2, 0, 83, 83, 224, 224, 1, 0, 296, 301, 3, 0, 5, 5, 9, 9, + 238, 238, 2, 0, 80, 80, 257, 257, 5, 0, 50, 50, 101, 101, 153, 154, 228, + 228, 294, 294, 1, 0, 158, 161, 2, 0, 85, 85, 195, 195, 3, 0, 96, 96, 120, + 120, 247, 247, 4, 0, 63, 63, 115, 115, 143, 143, 278, 278, 2, 0, 175, 175, + 293, 293, 5, 0, 36, 36, 56, 56, 110, 110, 231, 231, 271, 271, 2, 0, 252, + 252, 282, 282, 55, 0, 1, 5, 7, 7, 9, 10, 12, 16, 18, 18, 20, 22, 25, 32, + 34, 35, 39, 39, 48, 50, 52, 55, 57, 58, 60, 61, 63, 65, 68, 70, 72, 72, + 75, 75, 78, 78, 81, 85, 87, 87, 90, 96, 99, 99, 101, 104, 106, 107, 109, + 109, 112, 112, 114, 115, 117, 118, 120, 120, 127, 134, 136, 136, 138, 138, + 140, 140, 143, 154, 156, 163, 167, 172, 174, 176, 179, 179, 181, 196, 198, + 203, 205, 216, 218, 220, 222, 230, 232, 236, 238, 243, 245, 248, 250, 255, + 258, 260, 262, 264, 266, 268, 270, 273, 275, 279, 281, 283, 286, 287, 289, + 295, 3793, 0, 259, 1, 0, 0, 0, 2, 273, 1, 0, 0, 0, 4, 275, 1, 0, 0, 0, + 6, 278, 1, 0, 0, 0, 8, 281, 1, 0, 0, 0, 10, 284, 1, 0, 0, 0, 12, 287, 1, + 0, 0, 0, 14, 290, 1, 0, 0, 0, 16, 1164, 1, 0, 0, 0, 18, 1167, 1, 0, 0, + 0, 20, 1171, 1, 0, 0, 0, 22, 1181, 1, 0, 0, 0, 24, 1185, 1, 0, 0, 0, 26, + 1199, 1, 0, 0, 0, 28, 1201, 1, 0, 0, 0, 30, 1215, 1, 0, 0, 0, 32, 1221, + 1, 0, 0, 0, 34, 1225, 1, 0, 0, 0, 36, 1233, 1, 0, 0, 0, 38, 1239, 1, 0, + 0, 0, 40, 1241, 1, 0, 0, 0, 42, 1278, 1, 0, 0, 0, 44, 1280, 1, 0, 0, 0, + 46, 1282, 1, 0, 0, 0, 48, 1318, 1, 0, 0, 0, 50, 1320, 1, 0, 0, 0, 52, 1328, + 1, 0, 0, 0, 54, 1376, 1, 0, 0, 0, 56, 1426, 1, 0, 0, 0, 58, 1441, 1, 0, + 0, 0, 60, 1443, 1, 0, 0, 0, 62, 1450, 1, 0, 0, 0, 64, 1479, 1, 0, 0, 0, + 66, 1488, 1, 0, 0, 0, 68, 1502, 1, 0, 0, 0, 70, 1505, 1, 0, 0, 0, 72, 1509, + 1, 0, 0, 0, 74, 1511, 1, 0, 0, 0, 76, 1542, 1, 0, 0, 0, 78, 1558, 1, 0, + 0, 0, 80, 1560, 1, 0, 0, 0, 82, 1569, 1, 0, 0, 0, 84, 1571, 1, 0, 0, 0, + 86, 1579, 1, 0, 0, 0, 88, 1581, 1, 0, 0, 0, 90, 1584, 1, 0, 0, 0, 92, 1669, + 1, 0, 0, 0, 94, 1684, 1, 0, 0, 0, 96, 1695, 1, 0, 0, 0, 98, 1697, 1, 0, + 0, 0, 100, 1712, 1, 0, 0, 0, 102, 1725, 1, 0, 0, 0, 104, 1729, 1, 0, 0, + 0, 106, 1739, 1, 0, 0, 0, 108, 1787, 1, 0, 0, 0, 110, 1789, 1, 0, 0, 0, + 112, 1817, 1, 0, 0, 0, 114, 1824, 1, 0, 0, 0, 116, 1896, 1, 0, 0, 0, 118, + 1916, 1, 0, 0, 0, 120, 1918, 1, 0, 0, 0, 122, 1922, 1, 0, 0, 0, 124, 1935, + 1, 0, 0, 0, 126, 1944, 1, 0, 0, 0, 128, 2018, 1, 0, 0, 0, 130, 2024, 1, + 0, 0, 0, 132, 2496, 1, 0, 0, 0, 134, 2511, 1, 0, 0, 0, 136, 2525, 1, 0, + 0, 0, 138, 2530, 1, 0, 0, 0, 140, 2535, 1, 0, 0, 0, 142, 2539, 1, 0, 0, + 0, 144, 2545, 1, 0, 0, 0, 146, 2558, 1, 0, 0, 0, 148, 2564, 1, 0, 0, 0, + 150, 2577, 1, 0, 0, 0, 152, 2579, 1, 0, 0, 0, 154, 2585, 1, 0, 0, 0, 156, + 2593, 1, 0, 0, 0, 158, 2601, 1, 0, 0, 0, 160, 2603, 1, 0, 0, 0, 162, 2605, + 1, 0, 0, 0, 164, 2607, 1, 0, 0, 0, 166, 2609, 1, 0, 0, 0, 168, 2619, 1, + 0, 0, 0, 170, 2621, 1, 0, 0, 0, 172, 2714, 1, 0, 0, 0, 174, 2732, 1, 0, + 0, 0, 176, 2736, 1, 0, 0, 0, 178, 2738, 1, 0, 0, 0, 180, 2743, 1, 0, 0, + 0, 182, 2813, 1, 0, 0, 0, 184, 2815, 1, 0, 0, 0, 186, 2832, 1, 0, 0, 0, + 188, 2896, 1, 0, 0, 0, 190, 2907, 1, 0, 0, 0, 192, 2909, 1, 0, 0, 0, 194, + 2949, 1, 0, 0, 0, 196, 2981, 1, 0, 0, 0, 198, 2983, 1, 0, 0, 0, 200, 2991, + 1, 0, 0, 0, 202, 2998, 1, 0, 0, 0, 204, 3007, 1, 0, 0, 0, 206, 3014, 1, + 0, 0, 0, 208, 3021, 1, 0, 0, 0, 210, 3023, 1, 0, 0, 0, 212, 3031, 1, 0, + 0, 0, 214, 3042, 1, 0, 0, 0, 216, 3057, 1, 0, 0, 0, 218, 3061, 1, 0, 0, + 0, 220, 3083, 1, 0, 0, 0, 222, 3184, 1, 0, 0, 0, 224, 3186, 1, 0, 0, 0, + 226, 3191, 1, 0, 0, 0, 228, 3196, 1, 0, 0, 0, 230, 3199, 1, 0, 0, 0, 232, + 3216, 1, 0, 0, 0, 234, 3220, 1, 0, 0, 0, 236, 3222, 1, 0, 0, 0, 238, 3230, + 1, 0, 0, 0, 240, 3236, 1, 0, 0, 0, 242, 3241, 1, 0, 0, 0, 244, 3248, 1, + 0, 0, 0, 246, 3250, 1, 0, 0, 0, 248, 3263, 1, 0, 0, 0, 250, 3277, 1, 0, + 0, 0, 252, 3281, 1, 0, 0, 0, 254, 3283, 1, 0, 0, 0, 256, 258, 3, 2, 1, + 0, 257, 256, 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 259, + 260, 1, 0, 0, 0, 260, 262, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 262, 263, + 5, 0, 0, 1, 263, 1, 1, 0, 0, 0, 264, 274, 3, 4, 2, 0, 265, 274, 3, 6, 3, + 0, 266, 274, 3, 8, 4, 0, 267, 274, 3, 10, 5, 0, 268, 270, 3, 12, 6, 0, + 269, 271, 5, 309, 0, 0, 270, 269, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, + 274, 1, 0, 0, 0, 272, 274, 3, 14, 7, 0, 273, 264, 1, 0, 0, 0, 273, 265, + 1, 0, 0, 0, 273, 266, 1, 0, 0, 0, 273, 267, 1, 0, 0, 0, 273, 268, 1, 0, + 0, 0, 273, 272, 1, 0, 0, 0, 274, 3, 1, 0, 0, 0, 275, 276, 3, 16, 8, 0, + 276, 277, 5, 309, 0, 0, 277, 5, 1, 0, 0, 0, 278, 279, 3, 124, 62, 0, 279, + 280, 5, 309, 0, 0, 280, 7, 1, 0, 0, 0, 281, 282, 3, 210, 105, 0, 282, 283, + 5, 309, 0, 0, 283, 9, 1, 0, 0, 0, 284, 285, 3, 172, 86, 0, 285, 286, 5, + 309, 0, 0, 286, 11, 1, 0, 0, 0, 287, 288, 3, 192, 96, 0, 288, 289, 5, 309, + 0, 0, 289, 13, 1, 0, 0, 0, 290, 291, 3, 212, 106, 0, 291, 292, 5, 309, + 0, 0, 292, 15, 1, 0, 0, 0, 293, 1165, 3, 18, 9, 0, 294, 295, 5, 272, 0, + 0, 295, 1165, 3, 248, 124, 0, 296, 297, 5, 272, 0, 0, 297, 298, 3, 248, + 124, 0, 298, 299, 5, 310, 0, 0, 299, 300, 3, 248, 124, 0, 300, 1165, 1, + 0, 0, 0, 301, 302, 5, 36, 0, 0, 302, 306, 5, 25, 0, 0, 303, 304, 5, 102, + 0, 0, 304, 305, 5, 165, 0, 0, 305, 307, 5, 77, 0, 0, 306, 303, 1, 0, 0, + 0, 306, 307, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 3, 248, 124, 0, + 309, 310, 5, 274, 0, 0, 310, 313, 3, 248, 124, 0, 311, 312, 5, 29, 0, 0, + 312, 314, 3, 156, 78, 0, 313, 311, 1, 0, 0, 0, 313, 314, 1, 0, 0, 0, 314, + 317, 1, 0, 0, 0, 315, 316, 5, 14, 0, 0, 316, 318, 3, 244, 122, 0, 317, + 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 321, 1, 0, 0, 0, 319, 320, + 5, 288, 0, 0, 320, 322, 3, 32, 16, 0, 321, 319, 1, 0, 0, 0, 321, 322, 1, + 0, 0, 0, 322, 1165, 1, 0, 0, 0, 323, 324, 5, 66, 0, 0, 324, 327, 5, 25, + 0, 0, 325, 326, 5, 102, 0, 0, 326, 328, 5, 77, 0, 0, 327, 325, 1, 0, 0, + 0, 327, 328, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 331, 3, 248, 124, 0, + 330, 332, 7, 0, 0, 0, 331, 330, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, + 1165, 1, 0, 0, 0, 333, 334, 5, 36, 0, 0, 334, 338, 5, 226, 0, 0, 335, 336, + 5, 102, 0, 0, 336, 337, 5, 165, 0, 0, 337, 339, 5, 77, 0, 0, 338, 335, + 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 343, 3, 236, + 118, 0, 341, 342, 5, 14, 0, 0, 342, 344, 3, 244, 122, 0, 343, 341, 1, 0, + 0, 0, 343, 344, 1, 0, 0, 0, 344, 347, 1, 0, 0, 0, 345, 346, 5, 288, 0, + 0, 346, 348, 3, 32, 16, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, + 348, 1165, 1, 0, 0, 0, 349, 350, 5, 66, 0, 0, 350, 353, 5, 226, 0, 0, 351, + 352, 5, 102, 0, 0, 352, 354, 5, 77, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, + 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 3, 236, 118, 0, 356, 358, 7, + 0, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 1165, 1, 0, 0, + 0, 359, 360, 5, 6, 0, 0, 360, 361, 5, 226, 0, 0, 361, 362, 3, 236, 118, + 0, 362, 363, 5, 206, 0, 0, 363, 364, 5, 253, 0, 0, 364, 365, 3, 248, 124, + 0, 365, 1165, 1, 0, 0, 0, 366, 367, 5, 6, 0, 0, 367, 368, 5, 226, 0, 0, + 368, 369, 3, 236, 118, 0, 369, 370, 5, 234, 0, 0, 370, 371, 5, 14, 0, 0, + 371, 372, 3, 244, 122, 0, 372, 1165, 1, 0, 0, 0, 373, 376, 5, 36, 0, 0, + 374, 375, 5, 177, 0, 0, 375, 377, 5, 209, 0, 0, 376, 374, 1, 0, 0, 0, 376, + 377, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 382, 5, 244, 0, 0, 379, 380, + 5, 102, 0, 0, 380, 381, 5, 165, 0, 0, 381, 383, 5, 77, 0, 0, 382, 379, + 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 386, 3, 236, + 118, 0, 385, 387, 3, 106, 53, 0, 386, 385, 1, 0, 0, 0, 386, 387, 1, 0, + 0, 0, 387, 390, 1, 0, 0, 0, 388, 389, 5, 29, 0, 0, 389, 391, 3, 156, 78, + 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 394, 1, 0, 0, 0, 392, + 393, 5, 288, 0, 0, 393, 395, 3, 32, 16, 0, 394, 392, 1, 0, 0, 0, 394, 395, + 1, 0, 0, 0, 395, 396, 1, 0, 0, 0, 396, 402, 5, 11, 0, 0, 397, 403, 3, 18, + 9, 0, 398, 399, 5, 313, 0, 0, 399, 400, 3, 18, 9, 0, 400, 401, 5, 314, + 0, 0, 401, 403, 1, 0, 0, 0, 402, 397, 1, 0, 0, 0, 402, 398, 1, 0, 0, 0, + 403, 409, 1, 0, 0, 0, 404, 406, 5, 288, 0, 0, 405, 407, 5, 162, 0, 0, 406, + 405, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 410, + 5, 48, 0, 0, 409, 404, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 1165, 1, + 0, 0, 0, 411, 414, 5, 36, 0, 0, 412, 413, 5, 177, 0, 0, 413, 415, 5, 209, + 0, 0, 414, 412, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 416, 1, 0, 0, 0, + 416, 420, 5, 244, 0, 0, 417, 418, 5, 102, 0, 0, 418, 419, 5, 165, 0, 0, + 419, 421, 5, 77, 0, 0, 420, 417, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, + 422, 1, 0, 0, 0, 422, 423, 3, 236, 118, 0, 423, 424, 5, 313, 0, 0, 424, + 429, 3, 26, 13, 0, 425, 426, 5, 312, 0, 0, 426, 428, 3, 26, 13, 0, 427, + 425, 1, 0, 0, 0, 428, 431, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, + 1, 0, 0, 0, 430, 432, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 435, 5, 314, + 0, 0, 433, 434, 5, 29, 0, 0, 434, 436, 3, 156, 78, 0, 435, 433, 1, 0, 0, + 0, 435, 436, 1, 0, 0, 0, 436, 439, 1, 0, 0, 0, 437, 438, 5, 288, 0, 0, + 438, 440, 3, 32, 16, 0, 439, 437, 1, 0, 0, 0, 439, 440, 1, 0, 0, 0, 440, + 1165, 1, 0, 0, 0, 441, 442, 5, 66, 0, 0, 442, 445, 5, 244, 0, 0, 443, 444, + 5, 102, 0, 0, 444, 446, 5, 77, 0, 0, 445, 443, 1, 0, 0, 0, 445, 446, 1, + 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 1165, 3, 236, 118, 0, 448, 449, 5, + 110, 0, 0, 449, 450, 5, 113, 0, 0, 450, 452, 3, 236, 118, 0, 451, 453, + 3, 106, 53, 0, 452, 451, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 454, 1, + 0, 0, 0, 454, 455, 3, 18, 9, 0, 455, 1165, 1, 0, 0, 0, 456, 457, 5, 56, + 0, 0, 457, 458, 5, 88, 0, 0, 458, 461, 3, 236, 118, 0, 459, 460, 5, 285, + 0, 0, 460, 462, 3, 126, 63, 0, 461, 459, 1, 0, 0, 0, 461, 462, 1, 0, 0, + 0, 462, 1165, 1, 0, 0, 0, 463, 464, 5, 258, 0, 0, 464, 465, 5, 244, 0, + 0, 465, 1165, 3, 236, 118, 0, 466, 467, 5, 29, 0, 0, 467, 468, 5, 173, + 0, 0, 468, 469, 5, 244, 0, 0, 469, 470, 3, 236, 118, 0, 470, 473, 5, 116, + 0, 0, 471, 474, 3, 156, 78, 0, 472, 474, 5, 166, 0, 0, 473, 471, 1, 0, + 0, 0, 473, 472, 1, 0, 0, 0, 474, 1165, 1, 0, 0, 0, 475, 476, 5, 29, 0, + 0, 476, 477, 5, 173, 0, 0, 477, 478, 5, 283, 0, 0, 478, 479, 3, 236, 118, + 0, 479, 482, 5, 116, 0, 0, 480, 483, 3, 156, 78, 0, 481, 483, 5, 166, 0, + 0, 482, 480, 1, 0, 0, 0, 482, 481, 1, 0, 0, 0, 483, 1165, 1, 0, 0, 0, 484, + 485, 5, 29, 0, 0, 485, 486, 5, 173, 0, 0, 486, 487, 5, 27, 0, 0, 487, 488, + 3, 236, 118, 0, 488, 491, 5, 116, 0, 0, 489, 492, 3, 156, 78, 0, 490, 492, + 5, 166, 0, 0, 491, 489, 1, 0, 0, 0, 491, 490, 1, 0, 0, 0, 492, 1165, 1, + 0, 0, 0, 493, 494, 5, 6, 0, 0, 494, 497, 5, 244, 0, 0, 495, 496, 5, 102, + 0, 0, 496, 498, 5, 77, 0, 0, 497, 495, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, + 498, 499, 1, 0, 0, 0, 499, 500, 3, 236, 118, 0, 500, 501, 5, 206, 0, 0, + 501, 502, 5, 253, 0, 0, 502, 503, 3, 236, 118, 0, 503, 1165, 1, 0, 0, 0, + 504, 505, 5, 6, 0, 0, 505, 508, 5, 244, 0, 0, 506, 507, 5, 102, 0, 0, 507, + 509, 5, 77, 0, 0, 508, 506, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 510, + 1, 0, 0, 0, 510, 511, 3, 236, 118, 0, 511, 512, 5, 2, 0, 0, 512, 516, 5, + 27, 0, 0, 513, 514, 5, 102, 0, 0, 514, 515, 5, 165, 0, 0, 515, 517, 5, + 77, 0, 0, 516, 513, 1, 0, 0, 0, 516, 517, 1, 0, 0, 0, 517, 518, 1, 0, 0, + 0, 518, 519, 3, 28, 14, 0, 519, 1165, 1, 0, 0, 0, 520, 521, 5, 6, 0, 0, + 521, 524, 5, 244, 0, 0, 522, 523, 5, 102, 0, 0, 523, 525, 5, 77, 0, 0, + 524, 522, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 526, 1, 0, 0, 0, 526, + 527, 3, 236, 118, 0, 527, 528, 5, 206, 0, 0, 528, 531, 5, 27, 0, 0, 529, + 530, 5, 102, 0, 0, 530, 532, 5, 77, 0, 0, 531, 529, 1, 0, 0, 0, 531, 532, + 1, 0, 0, 0, 532, 533, 1, 0, 0, 0, 533, 534, 3, 236, 118, 0, 534, 535, 5, + 253, 0, 0, 535, 536, 3, 248, 124, 0, 536, 1165, 1, 0, 0, 0, 537, 538, 5, + 6, 0, 0, 538, 541, 5, 244, 0, 0, 539, 540, 5, 102, 0, 0, 540, 542, 5, 77, + 0, 0, 541, 539, 1, 0, 0, 0, 541, 542, 1, 0, 0, 0, 542, 543, 1, 0, 0, 0, + 543, 544, 3, 236, 118, 0, 544, 545, 5, 66, 0, 0, 545, 548, 5, 27, 0, 0, + 546, 547, 5, 102, 0, 0, 547, 549, 5, 77, 0, 0, 548, 546, 1, 0, 0, 0, 548, + 549, 1, 0, 0, 0, 549, 550, 1, 0, 0, 0, 550, 551, 3, 236, 118, 0, 551, 1165, + 1, 0, 0, 0, 552, 553, 5, 6, 0, 0, 553, 556, 5, 244, 0, 0, 554, 555, 5, + 102, 0, 0, 555, 557, 5, 77, 0, 0, 556, 554, 1, 0, 0, 0, 556, 557, 1, 0, + 0, 0, 557, 558, 1, 0, 0, 0, 558, 559, 3, 236, 118, 0, 559, 560, 5, 6, 0, + 0, 560, 561, 5, 27, 0, 0, 561, 562, 3, 236, 118, 0, 562, 563, 5, 234, 0, + 0, 563, 564, 5, 48, 0, 0, 564, 565, 5, 260, 0, 0, 565, 566, 3, 172, 86, + 0, 566, 1165, 1, 0, 0, 0, 567, 568, 5, 6, 0, 0, 568, 569, 5, 244, 0, 0, + 569, 570, 3, 236, 118, 0, 570, 571, 5, 234, 0, 0, 571, 572, 5, 14, 0, 0, + 572, 573, 3, 244, 122, 0, 573, 1165, 1, 0, 0, 0, 574, 575, 5, 6, 0, 0, + 575, 576, 5, 244, 0, 0, 576, 577, 3, 236, 118, 0, 577, 578, 5, 234, 0, + 0, 578, 579, 5, 199, 0, 0, 579, 580, 3, 34, 17, 0, 580, 1165, 1, 0, 0, + 0, 581, 582, 5, 6, 0, 0, 582, 583, 5, 244, 0, 0, 583, 584, 3, 236, 118, + 0, 584, 585, 5, 76, 0, 0, 585, 598, 3, 248, 124, 0, 586, 595, 5, 313, 0, + 0, 587, 592, 3, 206, 103, 0, 588, 589, 5, 312, 0, 0, 589, 591, 3, 206, + 103, 0, 590, 588, 1, 0, 0, 0, 591, 594, 1, 0, 0, 0, 592, 590, 1, 0, 0, + 0, 592, 593, 1, 0, 0, 0, 593, 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, 595, + 587, 1, 0, 0, 0, 595, 596, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 599, + 5, 314, 0, 0, 598, 586, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, 602, 1, + 0, 0, 0, 600, 601, 5, 285, 0, 0, 601, 603, 3, 126, 63, 0, 602, 600, 1, + 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 1165, 1, 0, 0, 0, 604, 605, 5, 7, 0, + 0, 605, 608, 3, 236, 118, 0, 606, 607, 5, 288, 0, 0, 607, 609, 3, 32, 16, + 0, 608, 606, 1, 0, 0, 0, 608, 609, 1, 0, 0, 0, 609, 1165, 1, 0, 0, 0, 610, + 613, 5, 36, 0, 0, 611, 612, 5, 177, 0, 0, 612, 614, 5, 209, 0, 0, 613, + 611, 1, 0, 0, 0, 613, 614, 1, 0, 0, 0, 614, 615, 1, 0, 0, 0, 615, 616, + 5, 150, 0, 0, 616, 620, 5, 283, 0, 0, 617, 618, 5, 102, 0, 0, 618, 619, + 5, 165, 0, 0, 619, 621, 5, 77, 0, 0, 620, 617, 1, 0, 0, 0, 620, 621, 1, + 0, 0, 0, 621, 622, 1, 0, 0, 0, 622, 626, 3, 236, 118, 0, 623, 624, 5, 92, + 0, 0, 624, 625, 5, 191, 0, 0, 625, 627, 3, 166, 83, 0, 626, 623, 1, 0, + 0, 0, 626, 627, 1, 0, 0, 0, 627, 630, 1, 0, 0, 0, 628, 629, 5, 29, 0, 0, + 629, 631, 3, 156, 78, 0, 630, 628, 1, 0, 0, 0, 630, 631, 1, 0, 0, 0, 631, + 634, 1, 0, 0, 0, 632, 633, 5, 288, 0, 0, 633, 635, 3, 32, 16, 0, 634, 632, + 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 5, 11, + 0, 0, 637, 638, 3, 18, 9, 0, 638, 1165, 1, 0, 0, 0, 639, 642, 5, 36, 0, + 0, 640, 641, 5, 177, 0, 0, 641, 643, 5, 209, 0, 0, 642, 640, 1, 0, 0, 0, + 642, 643, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 645, 5, 283, 0, 0, 645, + 648, 3, 236, 118, 0, 646, 647, 5, 29, 0, 0, 647, 649, 3, 156, 78, 0, 648, + 646, 1, 0, 0, 0, 648, 649, 1, 0, 0, 0, 649, 652, 1, 0, 0, 0, 650, 651, + 5, 229, 0, 0, 651, 653, 7, 1, 0, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, + 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 655, 5, 11, 0, 0, 655, 656, 3, 18, + 9, 0, 656, 1165, 1, 0, 0, 0, 657, 658, 5, 205, 0, 0, 658, 659, 5, 150, + 0, 0, 659, 660, 5, 283, 0, 0, 660, 1165, 3, 236, 118, 0, 661, 662, 5, 66, + 0, 0, 662, 663, 5, 150, 0, 0, 663, 666, 5, 283, 0, 0, 664, 665, 5, 102, + 0, 0, 665, 667, 5, 77, 0, 0, 666, 664, 1, 0, 0, 0, 666, 667, 1, 0, 0, 0, + 667, 668, 1, 0, 0, 0, 668, 1165, 3, 236, 118, 0, 669, 670, 5, 6, 0, 0, + 670, 671, 5, 150, 0, 0, 671, 674, 5, 283, 0, 0, 672, 673, 5, 102, 0, 0, + 673, 675, 5, 77, 0, 0, 674, 672, 1, 0, 0, 0, 674, 675, 1, 0, 0, 0, 675, + 676, 1, 0, 0, 0, 676, 677, 3, 236, 118, 0, 677, 678, 5, 206, 0, 0, 678, + 679, 5, 253, 0, 0, 679, 680, 3, 236, 118, 0, 680, 1165, 1, 0, 0, 0, 681, + 682, 5, 6, 0, 0, 682, 683, 5, 150, 0, 0, 683, 684, 5, 283, 0, 0, 684, 685, + 3, 236, 118, 0, 685, 686, 5, 234, 0, 0, 686, 687, 5, 199, 0, 0, 687, 688, + 3, 34, 17, 0, 688, 1165, 1, 0, 0, 0, 689, 690, 5, 66, 0, 0, 690, 693, 5, + 283, 0, 0, 691, 692, 5, 102, 0, 0, 692, 694, 5, 77, 0, 0, 693, 691, 1, + 0, 0, 0, 693, 694, 1, 0, 0, 0, 694, 695, 1, 0, 0, 0, 695, 1165, 3, 236, + 118, 0, 696, 697, 5, 6, 0, 0, 697, 698, 5, 283, 0, 0, 698, 699, 3, 236, + 118, 0, 699, 700, 5, 206, 0, 0, 700, 701, 5, 253, 0, 0, 701, 702, 3, 236, + 118, 0, 702, 1165, 1, 0, 0, 0, 703, 704, 5, 6, 0, 0, 704, 705, 5, 283, + 0, 0, 705, 706, 3, 236, 118, 0, 706, 707, 5, 234, 0, 0, 707, 708, 5, 14, + 0, 0, 708, 709, 3, 244, 122, 0, 709, 1165, 1, 0, 0, 0, 710, 711, 5, 20, + 0, 0, 711, 712, 3, 236, 118, 0, 712, 721, 5, 313, 0, 0, 713, 718, 3, 206, + 103, 0, 714, 715, 5, 312, 0, 0, 715, 717, 3, 206, 103, 0, 716, 714, 1, + 0, 0, 0, 717, 720, 1, 0, 0, 0, 718, 716, 1, 0, 0, 0, 718, 719, 1, 0, 0, + 0, 719, 722, 1, 0, 0, 0, 720, 718, 1, 0, 0, 0, 721, 713, 1, 0, 0, 0, 721, + 722, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 724, 5, 314, 0, 0, 724, 1165, + 1, 0, 0, 0, 725, 728, 5, 36, 0, 0, 726, 727, 5, 177, 0, 0, 727, 729, 5, + 209, 0, 0, 728, 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 730, 1, 0, + 0, 0, 730, 1165, 3, 212, 106, 0, 731, 732, 5, 66, 0, 0, 732, 735, 5, 90, + 0, 0, 733, 734, 5, 102, 0, 0, 734, 736, 5, 77, 0, 0, 735, 733, 1, 0, 0, + 0, 735, 736, 1, 0, 0, 0, 736, 737, 1, 0, 0, 0, 737, 1165, 3, 214, 107, + 0, 738, 739, 5, 36, 0, 0, 739, 740, 5, 218, 0, 0, 740, 744, 3, 248, 124, + 0, 741, 742, 5, 288, 0, 0, 742, 743, 5, 3, 0, 0, 743, 745, 3, 242, 121, + 0, 744, 741, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 748, 1, 0, 0, 0, 746, + 747, 5, 105, 0, 0, 747, 749, 3, 248, 124, 0, 748, 746, 1, 0, 0, 0, 748, + 749, 1, 0, 0, 0, 749, 1165, 1, 0, 0, 0, 750, 751, 5, 66, 0, 0, 751, 752, + 5, 218, 0, 0, 752, 755, 3, 248, 124, 0, 753, 754, 5, 105, 0, 0, 754, 756, + 3, 248, 124, 0, 755, 753, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 1165, + 1, 0, 0, 0, 757, 758, 5, 93, 0, 0, 758, 759, 3, 246, 123, 0, 759, 760, + 5, 253, 0, 0, 760, 765, 3, 244, 122, 0, 761, 762, 5, 312, 0, 0, 762, 764, + 3, 244, 122, 0, 763, 761, 1, 0, 0, 0, 764, 767, 1, 0, 0, 0, 765, 763, 1, + 0, 0, 0, 765, 766, 1, 0, 0, 0, 766, 771, 1, 0, 0, 0, 767, 765, 1, 0, 0, + 0, 768, 769, 5, 288, 0, 0, 769, 770, 5, 3, 0, 0, 770, 772, 5, 176, 0, 0, + 771, 768, 1, 0, 0, 0, 771, 772, 1, 0, 0, 0, 772, 776, 1, 0, 0, 0, 773, + 774, 5, 94, 0, 0, 774, 775, 5, 19, 0, 0, 775, 777, 3, 242, 121, 0, 776, + 773, 1, 0, 0, 0, 776, 777, 1, 0, 0, 0, 777, 780, 1, 0, 0, 0, 778, 779, + 5, 105, 0, 0, 779, 781, 3, 248, 124, 0, 780, 778, 1, 0, 0, 0, 780, 781, + 1, 0, 0, 0, 781, 1165, 1, 0, 0, 0, 782, 786, 5, 216, 0, 0, 783, 784, 5, + 3, 0, 0, 784, 785, 5, 176, 0, 0, 785, 787, 5, 86, 0, 0, 786, 783, 1, 0, + 0, 0, 786, 787, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 789, 3, 246, 123, + 0, 789, 790, 5, 88, 0, 0, 790, 795, 3, 244, 122, 0, 791, 792, 5, 312, 0, + 0, 792, 794, 3, 244, 122, 0, 793, 791, 1, 0, 0, 0, 794, 797, 1, 0, 0, 0, + 795, 793, 1, 0, 0, 0, 795, 796, 1, 0, 0, 0, 796, 801, 1, 0, 0, 0, 797, + 795, 1, 0, 0, 0, 798, 799, 5, 94, 0, 0, 799, 800, 5, 19, 0, 0, 800, 802, + 3, 242, 121, 0, 801, 798, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 805, 1, + 0, 0, 0, 803, 804, 5, 105, 0, 0, 804, 806, 3, 248, 124, 0, 805, 803, 1, + 0, 0, 0, 805, 806, 1, 0, 0, 0, 806, 1165, 1, 0, 0, 0, 807, 808, 5, 234, + 0, 0, 808, 812, 5, 218, 0, 0, 809, 813, 5, 5, 0, 0, 810, 813, 5, 163, 0, + 0, 811, 813, 3, 248, 124, 0, 812, 809, 1, 0, 0, 0, 812, 810, 1, 0, 0, 0, + 812, 811, 1, 0, 0, 0, 813, 816, 1, 0, 0, 0, 814, 815, 5, 105, 0, 0, 815, + 817, 3, 248, 124, 0, 816, 814, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 1165, + 1, 0, 0, 0, 818, 829, 5, 93, 0, 0, 819, 824, 3, 234, 117, 0, 820, 821, + 5, 312, 0, 0, 821, 823, 3, 234, 117, 0, 822, 820, 1, 0, 0, 0, 823, 826, + 1, 0, 0, 0, 824, 822, 1, 0, 0, 0, 824, 825, 1, 0, 0, 0, 825, 830, 1, 0, + 0, 0, 826, 824, 1, 0, 0, 0, 827, 828, 5, 5, 0, 0, 828, 830, 5, 198, 0, + 0, 829, 819, 1, 0, 0, 0, 829, 827, 1, 0, 0, 0, 830, 831, 1, 0, 0, 0, 831, + 833, 5, 173, 0, 0, 832, 834, 7, 2, 0, 0, 833, 832, 1, 0, 0, 0, 833, 834, + 1, 0, 0, 0, 834, 835, 1, 0, 0, 0, 835, 836, 3, 236, 118, 0, 836, 837, 5, + 253, 0, 0, 837, 841, 3, 244, 122, 0, 838, 839, 5, 288, 0, 0, 839, 840, + 5, 93, 0, 0, 840, 842, 5, 176, 0, 0, 841, 838, 1, 0, 0, 0, 841, 842, 1, + 0, 0, 0, 842, 1165, 1, 0, 0, 0, 843, 854, 5, 57, 0, 0, 844, 849, 3, 234, + 117, 0, 845, 846, 5, 312, 0, 0, 846, 848, 3, 234, 117, 0, 847, 845, 1, + 0, 0, 0, 848, 851, 1, 0, 0, 0, 849, 847, 1, 0, 0, 0, 849, 850, 1, 0, 0, + 0, 850, 855, 1, 0, 0, 0, 851, 849, 1, 0, 0, 0, 852, 853, 5, 5, 0, 0, 853, + 855, 5, 198, 0, 0, 854, 844, 1, 0, 0, 0, 854, 852, 1, 0, 0, 0, 855, 856, + 1, 0, 0, 0, 856, 858, 5, 173, 0, 0, 857, 859, 7, 2, 0, 0, 858, 857, 1, + 0, 0, 0, 858, 859, 1, 0, 0, 0, 859, 860, 1, 0, 0, 0, 860, 861, 3, 236, + 118, 0, 861, 862, 5, 253, 0, 0, 862, 863, 3, 244, 122, 0, 863, 1165, 1, + 0, 0, 0, 864, 868, 5, 216, 0, 0, 865, 866, 5, 93, 0, 0, 866, 867, 5, 176, + 0, 0, 867, 869, 5, 86, 0, 0, 868, 865, 1, 0, 0, 0, 868, 869, 1, 0, 0, 0, + 869, 880, 1, 0, 0, 0, 870, 875, 3, 234, 117, 0, 871, 872, 5, 312, 0, 0, + 872, 874, 3, 234, 117, 0, 873, 871, 1, 0, 0, 0, 874, 877, 1, 0, 0, 0, 875, + 873, 1, 0, 0, 0, 875, 876, 1, 0, 0, 0, 876, 881, 1, 0, 0, 0, 877, 875, + 1, 0, 0, 0, 878, 879, 5, 5, 0, 0, 879, 881, 5, 198, 0, 0, 880, 870, 1, + 0, 0, 0, 880, 878, 1, 0, 0, 0, 881, 882, 1, 0, 0, 0, 882, 884, 5, 173, + 0, 0, 883, 885, 7, 2, 0, 0, 884, 883, 1, 0, 0, 0, 884, 885, 1, 0, 0, 0, + 885, 886, 1, 0, 0, 0, 886, 887, 3, 236, 118, 0, 887, 888, 5, 88, 0, 0, + 888, 889, 3, 244, 122, 0, 889, 1165, 1, 0, 0, 0, 890, 891, 5, 236, 0, 0, + 891, 897, 5, 95, 0, 0, 892, 894, 5, 173, 0, 0, 893, 895, 5, 244, 0, 0, + 894, 893, 1, 0, 0, 0, 894, 895, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, + 898, 3, 236, 118, 0, 897, 892, 1, 0, 0, 0, 897, 898, 1, 0, 0, 0, 898, 1165, + 1, 0, 0, 0, 899, 911, 5, 78, 0, 0, 900, 901, 5, 313, 0, 0, 901, 906, 3, + 200, 100, 0, 902, 903, 5, 312, 0, 0, 903, 905, 3, 200, 100, 0, 904, 902, + 1, 0, 0, 0, 905, 908, 1, 0, 0, 0, 906, 904, 1, 0, 0, 0, 906, 907, 1, 0, + 0, 0, 907, 909, 1, 0, 0, 0, 908, 906, 1, 0, 0, 0, 909, 910, 5, 314, 0, + 0, 910, 912, 1, 0, 0, 0, 911, 900, 1, 0, 0, 0, 911, 912, 1, 0, 0, 0, 912, + 913, 1, 0, 0, 0, 913, 1165, 3, 16, 8, 0, 914, 915, 5, 78, 0, 0, 915, 917, + 5, 7, 0, 0, 916, 918, 5, 281, 0, 0, 917, 916, 1, 0, 0, 0, 917, 918, 1, + 0, 0, 0, 918, 919, 1, 0, 0, 0, 919, 1165, 3, 16, 8, 0, 920, 921, 5, 236, + 0, 0, 921, 922, 5, 36, 0, 0, 922, 923, 5, 244, 0, 0, 923, 1165, 3, 236, + 118, 0, 924, 925, 5, 236, 0, 0, 925, 926, 5, 36, 0, 0, 926, 927, 5, 226, + 0, 0, 927, 1165, 3, 236, 118, 0, 928, 929, 5, 236, 0, 0, 929, 930, 5, 36, + 0, 0, 930, 931, 5, 283, 0, 0, 931, 1165, 3, 236, 118, 0, 932, 933, 5, 236, + 0, 0, 933, 934, 5, 36, 0, 0, 934, 935, 5, 150, 0, 0, 935, 936, 5, 283, + 0, 0, 936, 1165, 3, 236, 118, 0, 937, 938, 5, 236, 0, 0, 938, 941, 5, 245, + 0, 0, 939, 940, 7, 3, 0, 0, 940, 942, 3, 236, 118, 0, 941, 939, 1, 0, 0, + 0, 941, 942, 1, 0, 0, 0, 942, 949, 1, 0, 0, 0, 943, 944, 5, 137, 0, 0, + 944, 947, 3, 156, 78, 0, 945, 946, 5, 73, 0, 0, 946, 948, 3, 156, 78, 0, + 947, 945, 1, 0, 0, 0, 947, 948, 1, 0, 0, 0, 948, 950, 1, 0, 0, 0, 949, + 943, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 1165, 1, 0, 0, 0, 951, 952, + 5, 236, 0, 0, 952, 955, 5, 227, 0, 0, 953, 954, 7, 3, 0, 0, 954, 956, 3, + 248, 124, 0, 955, 953, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 956, 963, 1, 0, + 0, 0, 957, 958, 5, 137, 0, 0, 958, 961, 3, 156, 78, 0, 959, 960, 5, 73, + 0, 0, 960, 962, 3, 156, 78, 0, 961, 959, 1, 0, 0, 0, 961, 962, 1, 0, 0, + 0, 962, 964, 1, 0, 0, 0, 963, 957, 1, 0, 0, 0, 963, 964, 1, 0, 0, 0, 964, + 1165, 1, 0, 0, 0, 965, 966, 5, 236, 0, 0, 966, 973, 5, 26, 0, 0, 967, 968, + 5, 137, 0, 0, 968, 971, 3, 156, 78, 0, 969, 970, 5, 73, 0, 0, 970, 972, + 3, 156, 78, 0, 971, 969, 1, 0, 0, 0, 971, 972, 1, 0, 0, 0, 972, 974, 1, + 0, 0, 0, 973, 967, 1, 0, 0, 0, 973, 974, 1, 0, 0, 0, 974, 1165, 1, 0, 0, + 0, 975, 976, 5, 236, 0, 0, 976, 977, 5, 28, 0, 0, 977, 979, 7, 3, 0, 0, + 978, 980, 3, 236, 118, 0, 979, 978, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, + 987, 1, 0, 0, 0, 981, 982, 5, 137, 0, 0, 982, 985, 3, 156, 78, 0, 983, + 984, 5, 73, 0, 0, 984, 986, 3, 156, 78, 0, 985, 983, 1, 0, 0, 0, 985, 986, + 1, 0, 0, 0, 986, 988, 1, 0, 0, 0, 987, 981, 1, 0, 0, 0, 987, 988, 1, 0, + 0, 0, 988, 1165, 1, 0, 0, 0, 989, 990, 5, 236, 0, 0, 990, 991, 5, 240, + 0, 0, 991, 992, 5, 86, 0, 0, 992, 1165, 3, 236, 118, 0, 993, 994, 5, 236, + 0, 0, 994, 995, 5, 240, 0, 0, 995, 996, 5, 86, 0, 0, 996, 997, 5, 313, + 0, 0, 997, 998, 3, 18, 9, 0, 998, 999, 5, 314, 0, 0, 999, 1165, 1, 0, 0, + 0, 1000, 1002, 5, 236, 0, 0, 1001, 1003, 5, 39, 0, 0, 1002, 1001, 1, 0, + 0, 0, 1002, 1003, 1, 0, 0, 0, 1003, 1004, 1, 0, 0, 0, 1004, 1007, 5, 219, + 0, 0, 1005, 1006, 7, 3, 0, 0, 1006, 1008, 3, 248, 124, 0, 1007, 1005, 1, + 0, 0, 0, 1007, 1008, 1, 0, 0, 0, 1008, 1165, 1, 0, 0, 0, 1009, 1010, 5, + 236, 0, 0, 1010, 1011, 5, 218, 0, 0, 1011, 1014, 5, 95, 0, 0, 1012, 1013, + 7, 3, 0, 0, 1013, 1015, 3, 248, 124, 0, 1014, 1012, 1, 0, 0, 0, 1014, 1015, + 1, 0, 0, 0, 1015, 1165, 1, 0, 0, 0, 1016, 1017, 5, 59, 0, 0, 1017, 1165, + 3, 236, 118, 0, 1018, 1019, 5, 58, 0, 0, 1019, 1165, 3, 236, 118, 0, 1020, + 1021, 5, 236, 0, 0, 1021, 1024, 5, 91, 0, 0, 1022, 1023, 7, 3, 0, 0, 1023, + 1025, 3, 236, 118, 0, 1024, 1022, 1, 0, 0, 0, 1024, 1025, 1, 0, 0, 0, 1025, + 1032, 1, 0, 0, 0, 1026, 1027, 5, 137, 0, 0, 1027, 1030, 3, 156, 78, 0, + 1028, 1029, 5, 73, 0, 0, 1029, 1031, 3, 156, 78, 0, 1030, 1028, 1, 0, 0, + 0, 1030, 1031, 1, 0, 0, 0, 1031, 1033, 1, 0, 0, 0, 1032, 1026, 1, 0, 0, + 0, 1032, 1033, 1, 0, 0, 0, 1033, 1165, 1, 0, 0, 0, 1034, 1035, 5, 236, + 0, 0, 1035, 1042, 5, 233, 0, 0, 1036, 1037, 5, 137, 0, 0, 1037, 1040, 3, + 156, 78, 0, 1038, 1039, 5, 73, 0, 0, 1039, 1041, 3, 156, 78, 0, 1040, 1038, + 1, 0, 0, 0, 1040, 1041, 1, 0, 0, 0, 1041, 1043, 1, 0, 0, 0, 1042, 1036, + 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1165, 1, 0, 0, 0, 1044, 1045, + 5, 234, 0, 0, 1045, 1046, 5, 233, 0, 0, 1046, 1047, 5, 14, 0, 0, 1047, + 1165, 3, 252, 126, 0, 1048, 1049, 5, 210, 0, 0, 1049, 1050, 5, 233, 0, + 0, 1050, 1165, 5, 14, 0, 0, 1051, 1052, 5, 234, 0, 0, 1052, 1053, 5, 233, + 0, 0, 1053, 1054, 3, 236, 118, 0, 1054, 1055, 5, 296, 0, 0, 1055, 1056, + 3, 124, 62, 0, 1056, 1165, 1, 0, 0, 0, 1057, 1058, 5, 210, 0, 0, 1058, + 1059, 5, 233, 0, 0, 1059, 1165, 3, 236, 118, 0, 1060, 1061, 5, 239, 0, + 0, 1061, 1070, 5, 255, 0, 0, 1062, 1067, 3, 202, 101, 0, 1063, 1064, 5, + 312, 0, 0, 1064, 1066, 3, 202, 101, 0, 1065, 1063, 1, 0, 0, 0, 1066, 1069, + 1, 0, 0, 0, 1067, 1065, 1, 0, 0, 0, 1067, 1068, 1, 0, 0, 0, 1068, 1071, + 1, 0, 0, 0, 1069, 1067, 1, 0, 0, 0, 1070, 1062, 1, 0, 0, 0, 1070, 1071, + 1, 0, 0, 0, 1071, 1165, 1, 0, 0, 0, 1072, 1074, 5, 30, 0, 0, 1073, 1075, + 5, 291, 0, 0, 1074, 1073, 1, 0, 0, 0, 1074, 1075, 1, 0, 0, 0, 1075, 1165, + 1, 0, 0, 0, 1076, 1078, 5, 220, 0, 0, 1077, 1079, 5, 291, 0, 0, 1078, 1077, + 1, 0, 0, 0, 1078, 1079, 1, 0, 0, 0, 1079, 1165, 1, 0, 0, 0, 1080, 1081, + 5, 197, 0, 0, 1081, 1082, 3, 248, 124, 0, 1082, 1083, 5, 88, 0, 0, 1083, + 1084, 3, 16, 8, 0, 1084, 1165, 1, 0, 0, 0, 1085, 1086, 5, 51, 0, 0, 1086, + 1087, 5, 197, 0, 0, 1087, 1165, 3, 248, 124, 0, 1088, 1089, 5, 76, 0, 0, + 1089, 1099, 3, 248, 124, 0, 1090, 1091, 5, 274, 0, 0, 1091, 1096, 3, 124, + 62, 0, 1092, 1093, 5, 312, 0, 0, 1093, 1095, 3, 124, 62, 0, 1094, 1092, + 1, 0, 0, 0, 1095, 1098, 1, 0, 0, 0, 1096, 1094, 1, 0, 0, 0, 1096, 1097, + 1, 0, 0, 0, 1097, 1100, 1, 0, 0, 0, 1098, 1096, 1, 0, 0, 0, 1099, 1090, + 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, 1165, 1, 0, 0, 0, 1101, 1102, + 5, 76, 0, 0, 1102, 1103, 5, 104, 0, 0, 1103, 1113, 3, 156, 78, 0, 1104, + 1105, 5, 274, 0, 0, 1105, 1110, 3, 124, 62, 0, 1106, 1107, 5, 312, 0, 0, + 1107, 1109, 3, 124, 62, 0, 1108, 1106, 1, 0, 0, 0, 1109, 1112, 1, 0, 0, + 0, 1110, 1108, 1, 0, 0, 0, 1110, 1111, 1, 0, 0, 0, 1111, 1114, 1, 0, 0, + 0, 1112, 1110, 1, 0, 0, 0, 1113, 1104, 1, 0, 0, 0, 1113, 1114, 1, 0, 0, + 0, 1114, 1165, 1, 0, 0, 0, 1115, 1116, 5, 59, 0, 0, 1116, 1117, 5, 109, + 0, 0, 1117, 1165, 3, 248, 124, 0, 1118, 1119, 5, 59, 0, 0, 1119, 1120, + 5, 181, 0, 0, 1120, 1165, 3, 248, 124, 0, 1121, 1122, 5, 234, 0, 0, 1122, + 1123, 5, 188, 0, 0, 1123, 1165, 3, 210, 105, 0, 1124, 1125, 5, 234, 0, + 0, 1125, 1126, 5, 251, 0, 0, 1126, 1129, 5, 295, 0, 0, 1127, 1130, 5, 140, + 0, 0, 1128, 1130, 3, 124, 62, 0, 1129, 1127, 1, 0, 0, 0, 1129, 1128, 1, + 0, 0, 0, 1130, 1165, 1, 0, 0, 0, 1131, 1132, 5, 271, 0, 0, 1132, 1133, + 3, 236, 118, 0, 1133, 1134, 5, 234, 0, 0, 1134, 1139, 3, 198, 99, 0, 1135, + 1136, 5, 312, 0, 0, 1136, 1138, 3, 198, 99, 0, 1137, 1135, 1, 0, 0, 0, + 1138, 1141, 1, 0, 0, 0, 1139, 1137, 1, 0, 0, 0, 1139, 1140, 1, 0, 0, 0, + 1140, 1144, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1142, 1143, 5, 285, 0, + 0, 1143, 1145, 3, 126, 63, 0, 1144, 1142, 1, 0, 0, 0, 1144, 1145, 1, 0, + 0, 0, 1145, 1165, 1, 0, 0, 0, 1146, 1147, 5, 152, 0, 0, 1147, 1148, 5, + 113, 0, 0, 1148, 1153, 3, 236, 118, 0, 1149, 1151, 5, 11, 0, 0, 1150, 1149, + 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1152, 1, 0, 0, 0, 1152, 1154, + 3, 248, 124, 0, 1153, 1150, 1, 0, 0, 0, 1153, 1154, 1, 0, 0, 0, 1154, 1155, + 1, 0, 0, 0, 1155, 1156, 5, 274, 0, 0, 1156, 1157, 3, 74, 37, 0, 1157, 1158, + 5, 173, 0, 0, 1158, 1160, 3, 124, 62, 0, 1159, 1161, 3, 182, 91, 0, 1160, + 1159, 1, 0, 0, 0, 1161, 1162, 1, 0, 0, 0, 1162, 1160, 1, 0, 0, 0, 1162, + 1163, 1, 0, 0, 0, 1163, 1165, 1, 0, 0, 0, 1164, 293, 1, 0, 0, 0, 1164, + 294, 1, 0, 0, 0, 1164, 296, 1, 0, 0, 0, 1164, 301, 1, 0, 0, 0, 1164, 323, + 1, 0, 0, 0, 1164, 333, 1, 0, 0, 0, 1164, 349, 1, 0, 0, 0, 1164, 359, 1, + 0, 0, 0, 1164, 366, 1, 0, 0, 0, 1164, 373, 1, 0, 0, 0, 1164, 411, 1, 0, + 0, 0, 1164, 441, 1, 0, 0, 0, 1164, 448, 1, 0, 0, 0, 1164, 456, 1, 0, 0, + 0, 1164, 463, 1, 0, 0, 0, 1164, 466, 1, 0, 0, 0, 1164, 475, 1, 0, 0, 0, + 1164, 484, 1, 0, 0, 0, 1164, 493, 1, 0, 0, 0, 1164, 504, 1, 0, 0, 0, 1164, + 520, 1, 0, 0, 0, 1164, 537, 1, 0, 0, 0, 1164, 552, 1, 0, 0, 0, 1164, 567, + 1, 0, 0, 0, 1164, 574, 1, 0, 0, 0, 1164, 581, 1, 0, 0, 0, 1164, 604, 1, + 0, 0, 0, 1164, 610, 1, 0, 0, 0, 1164, 639, 1, 0, 0, 0, 1164, 657, 1, 0, + 0, 0, 1164, 661, 1, 0, 0, 0, 1164, 669, 1, 0, 0, 0, 1164, 681, 1, 0, 0, + 0, 1164, 689, 1, 0, 0, 0, 1164, 696, 1, 0, 0, 0, 1164, 703, 1, 0, 0, 0, + 1164, 710, 1, 0, 0, 0, 1164, 725, 1, 0, 0, 0, 1164, 731, 1, 0, 0, 0, 1164, + 738, 1, 0, 0, 0, 1164, 750, 1, 0, 0, 0, 1164, 757, 1, 0, 0, 0, 1164, 782, + 1, 0, 0, 0, 1164, 807, 1, 0, 0, 0, 1164, 818, 1, 0, 0, 0, 1164, 843, 1, + 0, 0, 0, 1164, 864, 1, 0, 0, 0, 1164, 890, 1, 0, 0, 0, 1164, 899, 1, 0, + 0, 0, 1164, 914, 1, 0, 0, 0, 1164, 920, 1, 0, 0, 0, 1164, 924, 1, 0, 0, + 0, 1164, 928, 1, 0, 0, 0, 1164, 932, 1, 0, 0, 0, 1164, 937, 1, 0, 0, 0, + 1164, 951, 1, 0, 0, 0, 1164, 965, 1, 0, 0, 0, 1164, 975, 1, 0, 0, 0, 1164, + 989, 1, 0, 0, 0, 1164, 993, 1, 0, 0, 0, 1164, 1000, 1, 0, 0, 0, 1164, 1009, + 1, 0, 0, 0, 1164, 1016, 1, 0, 0, 0, 1164, 1018, 1, 0, 0, 0, 1164, 1020, + 1, 0, 0, 0, 1164, 1034, 1, 0, 0, 0, 1164, 1044, 1, 0, 0, 0, 1164, 1048, + 1, 0, 0, 0, 1164, 1051, 1, 0, 0, 0, 1164, 1057, 1, 0, 0, 0, 1164, 1060, + 1, 0, 0, 0, 1164, 1072, 1, 0, 0, 0, 1164, 1076, 1, 0, 0, 0, 1164, 1080, + 1, 0, 0, 0, 1164, 1085, 1, 0, 0, 0, 1164, 1088, 1, 0, 0, 0, 1164, 1101, + 1, 0, 0, 0, 1164, 1115, 1, 0, 0, 0, 1164, 1118, 1, 0, 0, 0, 1164, 1121, + 1, 0, 0, 0, 1164, 1124, 1, 0, 0, 0, 1164, 1131, 1, 0, 0, 0, 1164, 1146, + 1, 0, 0, 0, 1165, 17, 1, 0, 0, 0, 1166, 1168, 3, 20, 10, 0, 1167, 1166, + 1, 0, 0, 0, 1167, 1168, 1, 0, 0, 0, 1168, 1169, 1, 0, 0, 0, 1169, 1170, + 3, 22, 11, 0, 1170, 19, 1, 0, 0, 0, 1171, 1172, 5, 288, 0, 0, 1172, 1177, + 3, 212, 106, 0, 1173, 1174, 5, 312, 0, 0, 1174, 1176, 3, 212, 106, 0, 1175, + 1173, 1, 0, 0, 0, 1176, 1179, 1, 0, 0, 0, 1177, 1175, 1, 0, 0, 0, 1177, + 1178, 1, 0, 0, 0, 1178, 21, 1, 0, 0, 0, 1179, 1177, 1, 0, 0, 0, 1180, 1182, + 3, 24, 12, 0, 1181, 1180, 1, 0, 0, 0, 1181, 1182, 1, 0, 0, 0, 1182, 1183, + 1, 0, 0, 0, 1183, 1184, 3, 40, 20, 0, 1184, 23, 1, 0, 0, 0, 1185, 1187, + 5, 288, 0, 0, 1186, 1188, 5, 204, 0, 0, 1187, 1186, 1, 0, 0, 0, 1187, 1188, + 1, 0, 0, 0, 1188, 1189, 1, 0, 0, 0, 1189, 1194, 3, 64, 32, 0, 1190, 1191, + 5, 312, 0, 0, 1191, 1193, 3, 64, 32, 0, 1192, 1190, 1, 0, 0, 0, 1193, 1196, + 1, 0, 0, 0, 1194, 1192, 1, 0, 0, 0, 1194, 1195, 1, 0, 0, 0, 1195, 25, 1, + 0, 0, 0, 1196, 1194, 1, 0, 0, 0, 1197, 1200, 3, 28, 14, 0, 1198, 1200, + 3, 30, 15, 0, 1199, 1197, 1, 0, 0, 0, 1199, 1198, 1, 0, 0, 0, 1200, 27, + 1, 0, 0, 0, 1201, 1202, 3, 248, 124, 0, 1202, 1205, 3, 172, 86, 0, 1203, + 1204, 5, 165, 0, 0, 1204, 1206, 5, 166, 0, 0, 1205, 1203, 1, 0, 0, 0, 1205, + 1206, 1, 0, 0, 0, 1206, 1209, 1, 0, 0, 0, 1207, 1208, 5, 29, 0, 0, 1208, + 1210, 3, 156, 78, 0, 1209, 1207, 1, 0, 0, 0, 1209, 1210, 1, 0, 0, 0, 1210, + 1213, 1, 0, 0, 0, 1211, 1212, 5, 288, 0, 0, 1212, 1214, 3, 32, 16, 0, 1213, + 1211, 1, 0, 0, 0, 1213, 1214, 1, 0, 0, 0, 1214, 29, 1, 0, 0, 0, 1215, 1216, + 5, 137, 0, 0, 1216, 1219, 3, 236, 118, 0, 1217, 1218, 7, 4, 0, 0, 1218, + 1220, 5, 199, 0, 0, 1219, 1217, 1, 0, 0, 0, 1219, 1220, 1, 0, 0, 0, 1220, + 31, 1, 0, 0, 0, 1221, 1222, 5, 313, 0, 0, 1222, 1223, 3, 34, 17, 0, 1223, + 1224, 5, 314, 0, 0, 1224, 33, 1, 0, 0, 0, 1225, 1230, 3, 36, 18, 0, 1226, + 1227, 5, 312, 0, 0, 1227, 1229, 3, 36, 18, 0, 1228, 1226, 1, 0, 0, 0, 1229, + 1232, 1, 0, 0, 0, 1230, 1228, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, + 35, 1, 0, 0, 0, 1232, 1230, 1, 0, 0, 0, 1233, 1234, 3, 248, 124, 0, 1234, + 1235, 5, 296, 0, 0, 1235, 1236, 3, 38, 19, 0, 1236, 37, 1, 0, 0, 0, 1237, + 1240, 5, 53, 0, 0, 1238, 1240, 3, 124, 62, 0, 1239, 1237, 1, 0, 0, 0, 1239, + 1238, 1, 0, 0, 0, 1240, 39, 1, 0, 0, 0, 1241, 1252, 3, 46, 23, 0, 1242, + 1243, 5, 178, 0, 0, 1243, 1244, 5, 19, 0, 0, 1244, 1249, 3, 50, 25, 0, + 1245, 1246, 5, 312, 0, 0, 1246, 1248, 3, 50, 25, 0, 1247, 1245, 1, 0, 0, + 0, 1248, 1251, 1, 0, 0, 0, 1249, 1247, 1, 0, 0, 0, 1249, 1250, 1, 0, 0, + 0, 1250, 1253, 1, 0, 0, 0, 1251, 1249, 1, 0, 0, 0, 1252, 1242, 1, 0, 0, + 0, 1252, 1253, 1, 0, 0, 0, 1253, 1259, 1, 0, 0, 0, 1254, 1255, 5, 171, + 0, 0, 1255, 1257, 3, 44, 22, 0, 1256, 1258, 7, 5, 0, 0, 1257, 1256, 1, + 0, 0, 0, 1257, 1258, 1, 0, 0, 0, 1258, 1260, 1, 0, 0, 0, 1259, 1254, 1, + 0, 0, 0, 1259, 1260, 1, 0, 0, 0, 1260, 1274, 1, 0, 0, 0, 1261, 1262, 5, + 138, 0, 0, 1262, 1275, 3, 42, 21, 0, 1263, 1264, 5, 81, 0, 0, 1264, 1266, + 7, 6, 0, 0, 1265, 1267, 3, 44, 22, 0, 1266, 1265, 1, 0, 0, 0, 1266, 1267, + 1, 0, 0, 0, 1267, 1268, 1, 0, 0, 0, 1268, 1272, 7, 5, 0, 0, 1269, 1273, + 5, 175, 0, 0, 1270, 1271, 5, 288, 0, 0, 1271, 1273, 5, 250, 0, 0, 1272, + 1269, 1, 0, 0, 0, 1272, 1270, 1, 0, 0, 0, 1273, 1275, 1, 0, 0, 0, 1274, + 1261, 1, 0, 0, 0, 1274, 1263, 1, 0, 0, 0, 1274, 1275, 1, 0, 0, 0, 1275, + 41, 1, 0, 0, 0, 1276, 1279, 5, 5, 0, 0, 1277, 1279, 3, 44, 22, 0, 1278, + 1276, 1, 0, 0, 0, 1278, 1277, 1, 0, 0, 0, 1279, 43, 1, 0, 0, 0, 1280, 1281, + 7, 7, 0, 0, 1281, 45, 1, 0, 0, 0, 1282, 1283, 6, 23, -1, 0, 1283, 1284, + 3, 48, 24, 0, 1284, 1299, 1, 0, 0, 0, 1285, 1286, 10, 2, 0, 0, 1286, 1288, + 5, 111, 0, 0, 1287, 1289, 3, 66, 33, 0, 1288, 1287, 1, 0, 0, 0, 1288, 1289, + 1, 0, 0, 0, 1289, 1290, 1, 0, 0, 0, 1290, 1298, 3, 46, 23, 3, 1291, 1292, + 10, 1, 0, 0, 1292, 1294, 7, 8, 0, 0, 1293, 1295, 3, 66, 33, 0, 1294, 1293, + 1, 0, 0, 0, 1294, 1295, 1, 0, 0, 0, 1295, 1296, 1, 0, 0, 0, 1296, 1298, + 3, 46, 23, 2, 1297, 1285, 1, 0, 0, 0, 1297, 1291, 1, 0, 0, 0, 1298, 1301, + 1, 0, 0, 0, 1299, 1297, 1, 0, 0, 0, 1299, 1300, 1, 0, 0, 0, 1300, 47, 1, + 0, 0, 0, 1301, 1299, 1, 0, 0, 0, 1302, 1319, 3, 52, 26, 0, 1303, 1304, + 5, 244, 0, 0, 1304, 1319, 3, 236, 118, 0, 1305, 1306, 5, 280, 0, 0, 1306, + 1311, 3, 124, 62, 0, 1307, 1308, 5, 312, 0, 0, 1308, 1310, 3, 124, 62, + 0, 1309, 1307, 1, 0, 0, 0, 1310, 1313, 1, 0, 0, 0, 1311, 1309, 1, 0, 0, + 0, 1311, 1312, 1, 0, 0, 0, 1312, 1319, 1, 0, 0, 0, 1313, 1311, 1, 0, 0, + 0, 1314, 1315, 5, 313, 0, 0, 1315, 1316, 3, 40, 20, 0, 1316, 1317, 5, 314, + 0, 0, 1317, 1319, 1, 0, 0, 0, 1318, 1302, 1, 0, 0, 0, 1318, 1303, 1, 0, + 0, 0, 1318, 1305, 1, 0, 0, 0, 1318, 1314, 1, 0, 0, 0, 1319, 49, 1, 0, 0, + 0, 1320, 1322, 3, 124, 62, 0, 1321, 1323, 7, 9, 0, 0, 1322, 1321, 1, 0, + 0, 0, 1322, 1323, 1, 0, 0, 0, 1323, 1326, 1, 0, 0, 0, 1324, 1325, 5, 168, + 0, 0, 1325, 1327, 7, 10, 0, 0, 1326, 1324, 1, 0, 0, 0, 1326, 1327, 1, 0, + 0, 0, 1327, 51, 1, 0, 0, 0, 1328, 1330, 5, 231, 0, 0, 1329, 1331, 3, 66, + 33, 0, 1330, 1329, 1, 0, 0, 0, 1330, 1331, 1, 0, 0, 0, 1331, 1332, 1, 0, + 0, 0, 1332, 1337, 3, 68, 34, 0, 1333, 1334, 5, 312, 0, 0, 1334, 1336, 3, + 68, 34, 0, 1335, 1333, 1, 0, 0, 0, 1336, 1339, 1, 0, 0, 0, 1337, 1335, + 1, 0, 0, 0, 1337, 1338, 1, 0, 0, 0, 1338, 1349, 1, 0, 0, 0, 1339, 1337, + 1, 0, 0, 0, 1340, 1341, 5, 88, 0, 0, 1341, 1346, 3, 74, 37, 0, 1342, 1343, + 5, 312, 0, 0, 1343, 1345, 3, 74, 37, 0, 1344, 1342, 1, 0, 0, 0, 1345, 1348, + 1, 0, 0, 0, 1346, 1344, 1, 0, 0, 0, 1346, 1347, 1, 0, 0, 0, 1347, 1350, + 1, 0, 0, 0, 1348, 1346, 1, 0, 0, 0, 1349, 1340, 1, 0, 0, 0, 1349, 1350, + 1, 0, 0, 0, 1350, 1353, 1, 0, 0, 0, 1351, 1352, 5, 285, 0, 0, 1352, 1354, + 3, 126, 63, 0, 1353, 1351, 1, 0, 0, 0, 1353, 1354, 1, 0, 0, 0, 1354, 1358, + 1, 0, 0, 0, 1355, 1356, 5, 97, 0, 0, 1356, 1357, 5, 19, 0, 0, 1357, 1359, + 3, 54, 27, 0, 1358, 1355, 1, 0, 0, 0, 1358, 1359, 1, 0, 0, 0, 1359, 1362, + 1, 0, 0, 0, 1360, 1361, 5, 100, 0, 0, 1361, 1363, 3, 126, 63, 0, 1362, + 1360, 1, 0, 0, 0, 1362, 1363, 1, 0, 0, 0, 1363, 1373, 1, 0, 0, 0, 1364, + 1365, 5, 287, 0, 0, 1365, 1370, 3, 60, 30, 0, 1366, 1367, 5, 312, 0, 0, + 1367, 1369, 3, 60, 30, 0, 1368, 1366, 1, 0, 0, 0, 1369, 1372, 1, 0, 0, + 0, 1370, 1368, 1, 0, 0, 0, 1370, 1371, 1, 0, 0, 0, 1371, 1374, 1, 0, 0, + 0, 1372, 1370, 1, 0, 0, 0, 1373, 1364, 1, 0, 0, 0, 1373, 1374, 1, 0, 0, + 0, 1374, 53, 1, 0, 0, 0, 1375, 1377, 3, 66, 33, 0, 1376, 1375, 1, 0, 0, + 0, 1376, 1377, 1, 0, 0, 0, 1377, 1378, 1, 0, 0, 0, 1378, 1383, 3, 56, 28, + 0, 1379, 1380, 5, 312, 0, 0, 1380, 1382, 3, 56, 28, 0, 1381, 1379, 1, 0, + 0, 0, 1382, 1385, 1, 0, 0, 0, 1383, 1381, 1, 0, 0, 0, 1383, 1384, 1, 0, + 0, 0, 1384, 55, 1, 0, 0, 0, 1385, 1383, 1, 0, 0, 0, 1386, 1427, 3, 58, + 29, 0, 1387, 1388, 5, 221, 0, 0, 1388, 1397, 5, 313, 0, 0, 1389, 1394, + 3, 124, 62, 0, 1390, 1391, 5, 312, 0, 0, 1391, 1393, 3, 124, 62, 0, 1392, + 1390, 1, 0, 0, 0, 1393, 1396, 1, 0, 0, 0, 1394, 1392, 1, 0, 0, 0, 1394, + 1395, 1, 0, 0, 0, 1395, 1398, 1, 0, 0, 0, 1396, 1394, 1, 0, 0, 0, 1397, + 1389, 1, 0, 0, 0, 1397, 1398, 1, 0, 0, 0, 1398, 1399, 1, 0, 0, 0, 1399, + 1427, 5, 314, 0, 0, 1400, 1401, 5, 38, 0, 0, 1401, 1410, 5, 313, 0, 0, + 1402, 1407, 3, 124, 62, 0, 1403, 1404, 5, 312, 0, 0, 1404, 1406, 3, 124, + 62, 0, 1405, 1403, 1, 0, 0, 0, 1406, 1409, 1, 0, 0, 0, 1407, 1405, 1, 0, + 0, 0, 1407, 1408, 1, 0, 0, 0, 1408, 1411, 1, 0, 0, 0, 1409, 1407, 1, 0, + 0, 0, 1410, 1402, 1, 0, 0, 0, 1410, 1411, 1, 0, 0, 0, 1411, 1412, 1, 0, + 0, 0, 1412, 1427, 5, 314, 0, 0, 1413, 1414, 5, 98, 0, 0, 1414, 1415, 5, + 235, 0, 0, 1415, 1416, 5, 313, 0, 0, 1416, 1421, 3, 58, 29, 0, 1417, 1418, + 5, 312, 0, 0, 1418, 1420, 3, 58, 29, 0, 1419, 1417, 1, 0, 0, 0, 1420, 1423, + 1, 0, 0, 0, 1421, 1419, 1, 0, 0, 0, 1421, 1422, 1, 0, 0, 0, 1422, 1424, + 1, 0, 0, 0, 1423, 1421, 1, 0, 0, 0, 1424, 1425, 5, 314, 0, 0, 1425, 1427, + 1, 0, 0, 0, 1426, 1386, 1, 0, 0, 0, 1426, 1387, 1, 0, 0, 0, 1426, 1400, + 1, 0, 0, 0, 1426, 1413, 1, 0, 0, 0, 1427, 57, 1, 0, 0, 0, 1428, 1437, 5, + 313, 0, 0, 1429, 1434, 3, 124, 62, 0, 1430, 1431, 5, 312, 0, 0, 1431, 1433, + 3, 124, 62, 0, 1432, 1430, 1, 0, 0, 0, 1433, 1436, 1, 0, 0, 0, 1434, 1432, + 1, 0, 0, 0, 1434, 1435, 1, 0, 0, 0, 1435, 1438, 1, 0, 0, 0, 1436, 1434, + 1, 0, 0, 0, 1437, 1429, 1, 0, 0, 0, 1437, 1438, 1, 0, 0, 0, 1438, 1439, + 1, 0, 0, 0, 1439, 1442, 5, 314, 0, 0, 1440, 1442, 3, 124, 62, 0, 1441, + 1428, 1, 0, 0, 0, 1441, 1440, 1, 0, 0, 0, 1442, 59, 1, 0, 0, 0, 1443, 1444, + 3, 248, 124, 0, 1444, 1445, 5, 11, 0, 0, 1445, 1446, 5, 313, 0, 0, 1446, + 1447, 3, 62, 31, 0, 1447, 1448, 5, 314, 0, 0, 1448, 61, 1, 0, 0, 0, 1449, + 1451, 3, 248, 124, 0, 1450, 1449, 1, 0, 0, 0, 1450, 1451, 1, 0, 0, 0, 1451, + 1462, 1, 0, 0, 0, 1452, 1453, 5, 184, 0, 0, 1453, 1454, 5, 19, 0, 0, 1454, + 1459, 3, 124, 62, 0, 1455, 1456, 5, 312, 0, 0, 1456, 1458, 3, 124, 62, + 0, 1457, 1455, 1, 0, 0, 0, 1458, 1461, 1, 0, 0, 0, 1459, 1457, 1, 0, 0, + 0, 1459, 1460, 1, 0, 0, 0, 1460, 1463, 1, 0, 0, 0, 1461, 1459, 1, 0, 0, + 0, 1462, 1452, 1, 0, 0, 0, 1462, 1463, 1, 0, 0, 0, 1463, 1474, 1, 0, 0, + 0, 1464, 1465, 5, 178, 0, 0, 1465, 1466, 5, 19, 0, 0, 1466, 1471, 3, 50, + 25, 0, 1467, 1468, 5, 312, 0, 0, 1468, 1470, 3, 50, 25, 0, 1469, 1467, + 1, 0, 0, 0, 1470, 1473, 1, 0, 0, 0, 1471, 1469, 1, 0, 0, 0, 1471, 1472, + 1, 0, 0, 0, 1472, 1475, 1, 0, 0, 0, 1473, 1471, 1, 0, 0, 0, 1474, 1464, + 1, 0, 0, 0, 1474, 1475, 1, 0, 0, 0, 1475, 1477, 1, 0, 0, 0, 1476, 1478, + 3, 186, 93, 0, 1477, 1476, 1, 0, 0, 0, 1477, 1478, 1, 0, 0, 0, 1478, 63, + 1, 0, 0, 0, 1479, 1481, 3, 248, 124, 0, 1480, 1482, 3, 106, 53, 0, 1481, + 1480, 1, 0, 0, 0, 1481, 1482, 1, 0, 0, 0, 1482, 1483, 1, 0, 0, 0, 1483, + 1484, 5, 11, 0, 0, 1484, 1485, 5, 313, 0, 0, 1485, 1486, 3, 22, 11, 0, + 1486, 1487, 5, 314, 0, 0, 1487, 65, 1, 0, 0, 0, 1488, 1489, 7, 11, 0, 0, + 1489, 67, 1, 0, 0, 0, 1490, 1492, 3, 124, 62, 0, 1491, 1493, 3, 70, 35, + 0, 1492, 1491, 1, 0, 0, 0, 1492, 1493, 1, 0, 0, 0, 1493, 1503, 1, 0, 0, + 0, 1494, 1495, 3, 132, 66, 0, 1495, 1496, 5, 310, 0, 0, 1496, 1499, 5, + 304, 0, 0, 1497, 1498, 5, 11, 0, 0, 1498, 1500, 3, 106, 53, 0, 1499, 1497, + 1, 0, 0, 0, 1499, 1500, 1, 0, 0, 0, 1500, 1503, 1, 0, 0, 0, 1501, 1503, + 5, 304, 0, 0, 1502, 1490, 1, 0, 0, 0, 1502, 1494, 1, 0, 0, 0, 1502, 1501, + 1, 0, 0, 0, 1503, 69, 1, 0, 0, 0, 1504, 1506, 5, 11, 0, 0, 1505, 1504, + 1, 0, 0, 0, 1505, 1506, 1, 0, 0, 0, 1506, 1507, 1, 0, 0, 0, 1507, 1508, + 3, 72, 36, 0, 1508, 71, 1, 0, 0, 0, 1509, 1510, 3, 248, 124, 0, 1510, 73, + 1, 0, 0, 0, 1511, 1512, 6, 37, -1, 0, 1512, 1513, 3, 80, 40, 0, 1513, 1532, + 1, 0, 0, 0, 1514, 1528, 10, 2, 0, 0, 1515, 1516, 5, 37, 0, 0, 1516, 1517, + 5, 119, 0, 0, 1517, 1529, 3, 80, 40, 0, 1518, 1519, 3, 76, 38, 0, 1519, + 1520, 5, 119, 0, 0, 1520, 1521, 3, 74, 37, 0, 1521, 1522, 3, 78, 39, 0, + 1522, 1529, 1, 0, 0, 0, 1523, 1524, 5, 155, 0, 0, 1524, 1525, 3, 76, 38, + 0, 1525, 1526, 5, 119, 0, 0, 1526, 1527, 3, 80, 40, 0, 1527, 1529, 1, 0, + 0, 0, 1528, 1515, 1, 0, 0, 0, 1528, 1518, 1, 0, 0, 0, 1528, 1523, 1, 0, + 0, 0, 1529, 1531, 1, 0, 0, 0, 1530, 1514, 1, 0, 0, 0, 1531, 1534, 1, 0, + 0, 0, 1532, 1530, 1, 0, 0, 0, 1532, 1533, 1, 0, 0, 0, 1533, 75, 1, 0, 0, + 0, 1534, 1532, 1, 0, 0, 0, 1535, 1537, 5, 108, 0, 0, 1536, 1535, 1, 0, + 0, 0, 1536, 1537, 1, 0, 0, 0, 1537, 1543, 1, 0, 0, 0, 1538, 1540, 7, 12, + 0, 0, 1539, 1541, 5, 180, 0, 0, 1540, 1539, 1, 0, 0, 0, 1540, 1541, 1, + 0, 0, 0, 1541, 1543, 1, 0, 0, 0, 1542, 1536, 1, 0, 0, 0, 1542, 1538, 1, + 0, 0, 0, 1543, 77, 1, 0, 0, 0, 1544, 1545, 5, 173, 0, 0, 1545, 1559, 3, + 126, 63, 0, 1546, 1547, 5, 274, 0, 0, 1547, 1548, 5, 313, 0, 0, 1548, 1553, + 3, 248, 124, 0, 1549, 1550, 5, 312, 0, 0, 1550, 1552, 3, 248, 124, 0, 1551, + 1549, 1, 0, 0, 0, 1552, 1555, 1, 0, 0, 0, 1553, 1551, 1, 0, 0, 0, 1553, + 1554, 1, 0, 0, 0, 1554, 1556, 1, 0, 0, 0, 1555, 1553, 1, 0, 0, 0, 1556, + 1557, 5, 314, 0, 0, 1557, 1559, 1, 0, 0, 0, 1558, 1544, 1, 0, 0, 0, 1558, + 1546, 1, 0, 0, 0, 1559, 79, 1, 0, 0, 0, 1560, 1567, 3, 90, 45, 0, 1561, + 1562, 5, 246, 0, 0, 1562, 1563, 3, 82, 41, 0, 1563, 1564, 5, 313, 0, 0, + 1564, 1565, 3, 124, 62, 0, 1565, 1566, 5, 314, 0, 0, 1566, 1568, 1, 0, + 0, 0, 1567, 1561, 1, 0, 0, 0, 1567, 1568, 1, 0, 0, 0, 1568, 81, 1, 0, 0, + 0, 1569, 1570, 7, 13, 0, 0, 1570, 83, 1, 0, 0, 0, 1571, 1572, 7, 14, 0, + 0, 1572, 85, 1, 0, 0, 0, 1573, 1580, 5, 72, 0, 0, 1574, 1576, 5, 258, 0, + 0, 1575, 1577, 3, 156, 78, 0, 1576, 1575, 1, 0, 0, 0, 1576, 1577, 1, 0, + 0, 0, 1577, 1578, 1, 0, 0, 0, 1578, 1580, 3, 88, 44, 0, 1579, 1573, 1, + 0, 0, 0, 1579, 1574, 1, 0, 0, 0, 1580, 87, 1, 0, 0, 0, 1581, 1582, 7, 15, + 0, 0, 1582, 1583, 5, 34, 0, 0, 1583, 89, 1, 0, 0, 0, 1584, 1667, 3, 104, + 52, 0, 1585, 1586, 5, 149, 0, 0, 1586, 1597, 5, 313, 0, 0, 1587, 1588, + 5, 184, 0, 0, 1588, 1589, 5, 19, 0, 0, 1589, 1594, 3, 124, 62, 0, 1590, + 1591, 5, 312, 0, 0, 1591, 1593, 3, 124, 62, 0, 1592, 1590, 1, 0, 0, 0, + 1593, 1596, 1, 0, 0, 0, 1594, 1592, 1, 0, 0, 0, 1594, 1595, 1, 0, 0, 0, + 1595, 1598, 1, 0, 0, 0, 1596, 1594, 1, 0, 0, 0, 1597, 1587, 1, 0, 0, 0, + 1597, 1598, 1, 0, 0, 0, 1598, 1609, 1, 0, 0, 0, 1599, 1600, 5, 178, 0, + 0, 1600, 1601, 5, 19, 0, 0, 1601, 1606, 3, 50, 25, 0, 1602, 1603, 5, 312, + 0, 0, 1603, 1605, 3, 50, 25, 0, 1604, 1602, 1, 0, 0, 0, 1605, 1608, 1, + 0, 0, 0, 1606, 1604, 1, 0, 0, 0, 1606, 1607, 1, 0, 0, 0, 1607, 1610, 1, + 0, 0, 0, 1608, 1606, 1, 0, 0, 0, 1609, 1599, 1, 0, 0, 0, 1609, 1610, 1, + 0, 0, 0, 1610, 1620, 1, 0, 0, 0, 1611, 1612, 5, 151, 0, 0, 1612, 1617, + 3, 92, 46, 0, 1613, 1614, 5, 312, 0, 0, 1614, 1616, 3, 92, 46, 0, 1615, + 1613, 1, 0, 0, 0, 1616, 1619, 1, 0, 0, 0, 1617, 1615, 1, 0, 0, 0, 1617, + 1618, 1, 0, 0, 0, 1618, 1621, 1, 0, 0, 0, 1619, 1617, 1, 0, 0, 0, 1620, + 1611, 1, 0, 0, 0, 1620, 1621, 1, 0, 0, 0, 1621, 1623, 1, 0, 0, 0, 1622, + 1624, 3, 94, 47, 0, 1623, 1622, 1, 0, 0, 0, 1623, 1624, 1, 0, 0, 0, 1624, + 1628, 1, 0, 0, 0, 1625, 1626, 5, 4, 0, 0, 1626, 1627, 5, 146, 0, 0, 1627, + 1629, 3, 98, 49, 0, 1628, 1625, 1, 0, 0, 0, 1628, 1629, 1, 0, 0, 0, 1629, + 1631, 1, 0, 0, 0, 1630, 1632, 7, 16, 0, 0, 1631, 1630, 1, 0, 0, 0, 1631, + 1632, 1, 0, 0, 0, 1632, 1633, 1, 0, 0, 0, 1633, 1634, 5, 189, 0, 0, 1634, + 1635, 5, 313, 0, 0, 1635, 1636, 3, 192, 96, 0, 1636, 1646, 5, 314, 0, 0, + 1637, 1638, 5, 241, 0, 0, 1638, 1643, 3, 100, 50, 0, 1639, 1640, 5, 312, + 0, 0, 1640, 1642, 3, 100, 50, 0, 1641, 1639, 1, 0, 0, 0, 1642, 1645, 1, + 0, 0, 0, 1643, 1641, 1, 0, 0, 0, 1643, 1644, 1, 0, 0, 0, 1644, 1647, 1, + 0, 0, 0, 1645, 1643, 1, 0, 0, 0, 1646, 1637, 1, 0, 0, 0, 1646, 1647, 1, + 0, 0, 0, 1647, 1648, 1, 0, 0, 0, 1648, 1649, 5, 54, 0, 0, 1649, 1654, 3, + 102, 51, 0, 1650, 1651, 5, 312, 0, 0, 1651, 1653, 3, 102, 51, 0, 1652, + 1650, 1, 0, 0, 0, 1653, 1656, 1, 0, 0, 0, 1654, 1652, 1, 0, 0, 0, 1654, + 1655, 1, 0, 0, 0, 1655, 1657, 1, 0, 0, 0, 1656, 1654, 1, 0, 0, 0, 1657, + 1665, 5, 314, 0, 0, 1658, 1660, 5, 11, 0, 0, 1659, 1658, 1, 0, 0, 0, 1659, + 1660, 1, 0, 0, 0, 1660, 1661, 1, 0, 0, 0, 1661, 1663, 3, 248, 124, 0, 1662, + 1664, 3, 106, 53, 0, 1663, 1662, 1, 0, 0, 0, 1663, 1664, 1, 0, 0, 0, 1664, + 1666, 1, 0, 0, 0, 1665, 1659, 1, 0, 0, 0, 1665, 1666, 1, 0, 0, 0, 1666, + 1668, 1, 0, 0, 0, 1667, 1585, 1, 0, 0, 0, 1667, 1668, 1, 0, 0, 0, 1668, + 91, 1, 0, 0, 0, 1669, 1670, 3, 124, 62, 0, 1670, 1671, 5, 11, 0, 0, 1671, + 1672, 3, 248, 124, 0, 1672, 93, 1, 0, 0, 0, 1673, 1674, 5, 174, 0, 0, 1674, + 1675, 5, 222, 0, 0, 1675, 1676, 5, 190, 0, 0, 1676, 1685, 5, 146, 0, 0, + 1677, 1678, 5, 5, 0, 0, 1678, 1679, 5, 223, 0, 0, 1679, 1680, 5, 190, 0, + 0, 1680, 1682, 5, 146, 0, 0, 1681, 1683, 3, 96, 48, 0, 1682, 1681, 1, 0, + 0, 0, 1682, 1683, 1, 0, 0, 0, 1683, 1685, 1, 0, 0, 0, 1684, 1673, 1, 0, + 0, 0, 1684, 1677, 1, 0, 0, 0, 1685, 95, 1, 0, 0, 0, 1686, 1687, 5, 236, + 0, 0, 1687, 1688, 5, 68, 0, 0, 1688, 1696, 5, 148, 0, 0, 1689, 1690, 5, + 172, 0, 0, 1690, 1691, 5, 68, 0, 0, 1691, 1696, 5, 148, 0, 0, 1692, 1693, + 5, 288, 0, 0, 1693, 1694, 5, 268, 0, 0, 1694, 1696, 5, 223, 0, 0, 1695, + 1686, 1, 0, 0, 0, 1695, 1689, 1, 0, 0, 0, 1695, 1692, 1, 0, 0, 0, 1696, + 97, 1, 0, 0, 0, 1697, 1710, 5, 237, 0, 0, 1698, 1705, 5, 253, 0, 0, 1699, + 1700, 5, 157, 0, 0, 1700, 1706, 5, 222, 0, 0, 1701, 1703, 7, 10, 0, 0, + 1702, 1701, 1, 0, 0, 0, 1702, 1703, 1, 0, 0, 0, 1703, 1704, 1, 0, 0, 0, + 1704, 1706, 3, 248, 124, 0, 1705, 1699, 1, 0, 0, 0, 1705, 1702, 1, 0, 0, + 0, 1706, 1711, 1, 0, 0, 0, 1707, 1708, 5, 187, 0, 0, 1708, 1709, 5, 131, + 0, 0, 1709, 1711, 5, 222, 0, 0, 1710, 1698, 1, 0, 0, 0, 1710, 1707, 1, + 0, 0, 0, 1711, 99, 1, 0, 0, 0, 1712, 1713, 3, 248, 124, 0, 1713, 1714, + 5, 296, 0, 0, 1714, 1715, 5, 313, 0, 0, 1715, 1720, 3, 248, 124, 0, 1716, + 1717, 5, 312, 0, 0, 1717, 1719, 3, 248, 124, 0, 1718, 1716, 1, 0, 0, 0, + 1719, 1722, 1, 0, 0, 0, 1720, 1718, 1, 0, 0, 0, 1720, 1721, 1, 0, 0, 0, + 1721, 1723, 1, 0, 0, 0, 1722, 1720, 1, 0, 0, 0, 1723, 1724, 5, 314, 0, + 0, 1724, 101, 1, 0, 0, 0, 1725, 1726, 3, 248, 124, 0, 1726, 1727, 5, 11, + 0, 0, 1727, 1728, 3, 124, 62, 0, 1728, 103, 1, 0, 0, 0, 1729, 1737, 3, + 108, 54, 0, 1730, 1732, 5, 11, 0, 0, 1731, 1730, 1, 0, 0, 0, 1731, 1732, + 1, 0, 0, 0, 1732, 1733, 1, 0, 0, 0, 1733, 1735, 3, 248, 124, 0, 1734, 1736, + 3, 106, 53, 0, 1735, 1734, 1, 0, 0, 0, 1735, 1736, 1, 0, 0, 0, 1736, 1738, + 1, 0, 0, 0, 1737, 1731, 1, 0, 0, 0, 1737, 1738, 1, 0, 0, 0, 1738, 105, + 1, 0, 0, 0, 1739, 1740, 5, 313, 0, 0, 1740, 1745, 3, 248, 124, 0, 1741, + 1742, 5, 312, 0, 0, 1742, 1744, 3, 248, 124, 0, 1743, 1741, 1, 0, 0, 0, + 1744, 1747, 1, 0, 0, 0, 1745, 1743, 1, 0, 0, 0, 1745, 1746, 1, 0, 0, 0, + 1746, 1748, 1, 0, 0, 0, 1747, 1745, 1, 0, 0, 0, 1748, 1749, 5, 314, 0, + 0, 1749, 107, 1, 0, 0, 0, 1750, 1752, 3, 236, 118, 0, 1751, 1753, 3, 238, + 119, 0, 1752, 1751, 1, 0, 0, 0, 1752, 1753, 1, 0, 0, 0, 1753, 1788, 1, + 0, 0, 0, 1754, 1755, 5, 313, 0, 0, 1755, 1756, 3, 22, 11, 0, 1756, 1757, + 5, 314, 0, 0, 1757, 1788, 1, 0, 0, 0, 1758, 1759, 5, 269, 0, 0, 1759, 1760, + 5, 313, 0, 0, 1760, 1765, 3, 124, 62, 0, 1761, 1762, 5, 312, 0, 0, 1762, + 1764, 3, 124, 62, 0, 1763, 1761, 1, 0, 0, 0, 1764, 1767, 1, 0, 0, 0, 1765, + 1763, 1, 0, 0, 0, 1765, 1766, 1, 0, 0, 0, 1766, 1768, 1, 0, 0, 0, 1767, + 1765, 1, 0, 0, 0, 1768, 1771, 5, 314, 0, 0, 1769, 1770, 5, 288, 0, 0, 1770, + 1772, 5, 179, 0, 0, 1771, 1769, 1, 0, 0, 0, 1771, 1772, 1, 0, 0, 0, 1772, + 1788, 1, 0, 0, 0, 1773, 1774, 5, 132, 0, 0, 1774, 1775, 5, 313, 0, 0, 1775, + 1776, 3, 22, 11, 0, 1776, 1777, 5, 314, 0, 0, 1777, 1788, 1, 0, 0, 0, 1778, + 1779, 5, 244, 0, 0, 1779, 1780, 5, 313, 0, 0, 1780, 1781, 3, 110, 55, 0, + 1781, 1782, 5, 314, 0, 0, 1782, 1788, 1, 0, 0, 0, 1783, 1784, 5, 313, 0, + 0, 1784, 1785, 3, 74, 37, 0, 1785, 1786, 5, 314, 0, 0, 1786, 1788, 1, 0, + 0, 0, 1787, 1750, 1, 0, 0, 0, 1787, 1754, 1, 0, 0, 0, 1787, 1758, 1, 0, + 0, 0, 1787, 1773, 1, 0, 0, 0, 1787, 1778, 1, 0, 0, 0, 1787, 1783, 1, 0, + 0, 0, 1788, 109, 1, 0, 0, 0, 1789, 1790, 3, 236, 118, 0, 1790, 1799, 5, + 313, 0, 0, 1791, 1796, 3, 112, 56, 0, 1792, 1793, 5, 312, 0, 0, 1793, 1795, + 3, 112, 56, 0, 1794, 1792, 1, 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1794, + 1, 0, 0, 0, 1796, 1797, 1, 0, 0, 0, 1797, 1800, 1, 0, 0, 0, 1798, 1796, + 1, 0, 0, 0, 1799, 1791, 1, 0, 0, 0, 1799, 1800, 1, 0, 0, 0, 1800, 1810, + 1, 0, 0, 0, 1801, 1802, 5, 35, 0, 0, 1802, 1807, 3, 122, 61, 0, 1803, 1804, + 5, 312, 0, 0, 1804, 1806, 3, 122, 61, 0, 1805, 1803, 1, 0, 0, 0, 1806, + 1809, 1, 0, 0, 0, 1807, 1805, 1, 0, 0, 0, 1807, 1808, 1, 0, 0, 0, 1808, + 1811, 1, 0, 0, 0, 1809, 1807, 1, 0, 0, 0, 1810, 1801, 1, 0, 0, 0, 1810, + 1811, 1, 0, 0, 0, 1811, 1812, 1, 0, 0, 0, 1812, 1813, 5, 314, 0, 0, 1813, + 111, 1, 0, 0, 0, 1814, 1815, 3, 248, 124, 0, 1815, 1816, 5, 323, 0, 0, + 1816, 1818, 1, 0, 0, 0, 1817, 1814, 1, 0, 0, 0, 1817, 1818, 1, 0, 0, 0, + 1818, 1822, 1, 0, 0, 0, 1819, 1823, 3, 114, 57, 0, 1820, 1823, 3, 118, + 59, 0, 1821, 1823, 3, 124, 62, 0, 1822, 1819, 1, 0, 0, 0, 1822, 1820, 1, + 0, 0, 0, 1822, 1821, 1, 0, 0, 0, 1823, 113, 1, 0, 0, 0, 1824, 1842, 3, + 116, 58, 0, 1825, 1826, 5, 184, 0, 0, 1826, 1840, 5, 19, 0, 0, 1827, 1836, + 5, 313, 0, 0, 1828, 1833, 3, 124, 62, 0, 1829, 1830, 5, 312, 0, 0, 1830, + 1832, 3, 124, 62, 0, 1831, 1829, 1, 0, 0, 0, 1832, 1835, 1, 0, 0, 0, 1833, + 1831, 1, 0, 0, 0, 1833, 1834, 1, 0, 0, 0, 1834, 1837, 1, 0, 0, 0, 1835, + 1833, 1, 0, 0, 0, 1836, 1828, 1, 0, 0, 0, 1836, 1837, 1, 0, 0, 0, 1837, + 1838, 1, 0, 0, 0, 1838, 1841, 5, 314, 0, 0, 1839, 1841, 3, 124, 62, 0, + 1840, 1827, 1, 0, 0, 0, 1840, 1839, 1, 0, 0, 0, 1841, 1843, 1, 0, 0, 0, + 1842, 1825, 1, 0, 0, 0, 1842, 1843, 1, 0, 0, 0, 1843, 1850, 1, 0, 0, 0, + 1844, 1845, 5, 200, 0, 0, 1845, 1846, 5, 284, 0, 0, 1846, 1851, 5, 68, + 0, 0, 1847, 1848, 5, 127, 0, 0, 1848, 1849, 5, 284, 0, 0, 1849, 1851, 5, + 68, 0, 0, 1850, 1844, 1, 0, 0, 0, 1850, 1847, 1, 0, 0, 0, 1850, 1851, 1, + 0, 0, 0, 1851, 1868, 1, 0, 0, 0, 1852, 1853, 5, 178, 0, 0, 1853, 1866, + 5, 19, 0, 0, 1854, 1855, 5, 313, 0, 0, 1855, 1860, 3, 50, 25, 0, 1856, + 1857, 5, 312, 0, 0, 1857, 1859, 3, 50, 25, 0, 1858, 1856, 1, 0, 0, 0, 1859, + 1862, 1, 0, 0, 0, 1860, 1858, 1, 0, 0, 0, 1860, 1861, 1, 0, 0, 0, 1861, + 1863, 1, 0, 0, 0, 1862, 1860, 1, 0, 0, 0, 1863, 1864, 5, 314, 0, 0, 1864, + 1867, 1, 0, 0, 0, 1865, 1867, 3, 50, 25, 0, 1866, 1854, 1, 0, 0, 0, 1866, + 1865, 1, 0, 0, 0, 1867, 1869, 1, 0, 0, 0, 1868, 1852, 1, 0, 0, 0, 1868, + 1869, 1, 0, 0, 0, 1869, 115, 1, 0, 0, 0, 1870, 1871, 5, 244, 0, 0, 1871, + 1872, 5, 313, 0, 0, 1872, 1873, 3, 236, 118, 0, 1873, 1881, 5, 314, 0, + 0, 1874, 1876, 5, 11, 0, 0, 1875, 1874, 1, 0, 0, 0, 1875, 1876, 1, 0, 0, + 0, 1876, 1877, 1, 0, 0, 0, 1877, 1879, 3, 248, 124, 0, 1878, 1880, 3, 106, + 53, 0, 1879, 1878, 1, 0, 0, 0, 1879, 1880, 1, 0, 0, 0, 1880, 1882, 1, 0, + 0, 0, 1881, 1875, 1, 0, 0, 0, 1881, 1882, 1, 0, 0, 0, 1882, 1897, 1, 0, + 0, 0, 1883, 1884, 5, 244, 0, 0, 1884, 1885, 5, 313, 0, 0, 1885, 1886, 3, + 22, 11, 0, 1886, 1894, 5, 314, 0, 0, 1887, 1889, 5, 11, 0, 0, 1888, 1887, + 1, 0, 0, 0, 1888, 1889, 1, 0, 0, 0, 1889, 1890, 1, 0, 0, 0, 1890, 1892, + 3, 248, 124, 0, 1891, 1893, 3, 106, 53, 0, 1892, 1891, 1, 0, 0, 0, 1892, + 1893, 1, 0, 0, 0, 1893, 1895, 1, 0, 0, 0, 1894, 1888, 1, 0, 0, 0, 1894, + 1895, 1, 0, 0, 0, 1895, 1897, 1, 0, 0, 0, 1896, 1870, 1, 0, 0, 0, 1896, + 1883, 1, 0, 0, 0, 1897, 117, 1, 0, 0, 0, 1898, 1899, 5, 60, 0, 0, 1899, + 1900, 5, 313, 0, 0, 1900, 1905, 3, 120, 60, 0, 1901, 1902, 5, 312, 0, 0, + 1902, 1904, 3, 120, 60, 0, 1903, 1901, 1, 0, 0, 0, 1904, 1907, 1, 0, 0, + 0, 1905, 1903, 1, 0, 0, 0, 1905, 1906, 1, 0, 0, 0, 1906, 1908, 1, 0, 0, + 0, 1907, 1905, 1, 0, 0, 0, 1908, 1909, 5, 314, 0, 0, 1909, 1917, 1, 0, + 0, 0, 1910, 1911, 5, 24, 0, 0, 1911, 1912, 5, 313, 0, 0, 1912, 1913, 5, + 166, 0, 0, 1913, 1914, 5, 11, 0, 0, 1914, 1915, 5, 60, 0, 0, 1915, 1917, + 5, 314, 0, 0, 1916, 1898, 1, 0, 0, 0, 1916, 1910, 1, 0, 0, 0, 1917, 119, + 1, 0, 0, 0, 1918, 1920, 3, 248, 124, 0, 1919, 1921, 3, 172, 86, 0, 1920, + 1919, 1, 0, 0, 0, 1920, 1921, 1, 0, 0, 0, 1921, 121, 1, 0, 0, 0, 1922, + 1923, 5, 313, 0, 0, 1923, 1924, 3, 236, 118, 0, 1924, 1925, 5, 312, 0, + 0, 1925, 1930, 3, 236, 118, 0, 1926, 1927, 5, 312, 0, 0, 1927, 1929, 3, + 236, 118, 0, 1928, 1926, 1, 0, 0, 0, 1929, 1932, 1, 0, 0, 0, 1930, 1928, + 1, 0, 0, 0, 1930, 1931, 1, 0, 0, 0, 1931, 1933, 1, 0, 0, 0, 1932, 1930, + 1, 0, 0, 0, 1933, 1934, 5, 314, 0, 0, 1934, 123, 1, 0, 0, 0, 1935, 1936, + 3, 126, 63, 0, 1936, 125, 1, 0, 0, 0, 1937, 1938, 6, 63, -1, 0, 1938, 1940, + 3, 130, 65, 0, 1939, 1941, 3, 128, 64, 0, 1940, 1939, 1, 0, 0, 0, 1940, + 1941, 1, 0, 0, 0, 1941, 1945, 1, 0, 0, 0, 1942, 1943, 5, 165, 0, 0, 1943, + 1945, 3, 126, 63, 3, 1944, 1937, 1, 0, 0, 0, 1944, 1942, 1, 0, 0, 0, 1945, + 1954, 1, 0, 0, 0, 1946, 1947, 10, 2, 0, 0, 1947, 1948, 5, 8, 0, 0, 1948, + 1953, 3, 126, 63, 3, 1949, 1950, 10, 1, 0, 0, 1950, 1951, 5, 177, 0, 0, + 1951, 1953, 3, 126, 63, 2, 1952, 1946, 1, 0, 0, 0, 1952, 1949, 1, 0, 0, + 0, 1953, 1956, 1, 0, 0, 0, 1954, 1952, 1, 0, 0, 0, 1954, 1955, 1, 0, 0, + 0, 1955, 127, 1, 0, 0, 0, 1956, 1954, 1, 0, 0, 0, 1957, 1958, 3, 160, 80, + 0, 1958, 1959, 3, 130, 65, 0, 1959, 2019, 1, 0, 0, 0, 1960, 1961, 3, 160, + 80, 0, 1961, 1962, 3, 162, 81, 0, 1962, 1963, 5, 313, 0, 0, 1963, 1964, + 3, 22, 11, 0, 1964, 1965, 5, 314, 0, 0, 1965, 2019, 1, 0, 0, 0, 1966, 1968, + 5, 165, 0, 0, 1967, 1966, 1, 0, 0, 0, 1967, 1968, 1, 0, 0, 0, 1968, 1969, + 1, 0, 0, 0, 1969, 1970, 5, 17, 0, 0, 1970, 1971, 3, 130, 65, 0, 1971, 1972, + 5, 8, 0, 0, 1972, 1973, 3, 130, 65, 0, 1973, 2019, 1, 0, 0, 0, 1974, 1976, + 5, 165, 0, 0, 1975, 1974, 1, 0, 0, 0, 1975, 1976, 1, 0, 0, 0, 1976, 1977, + 1, 0, 0, 0, 1977, 1978, 5, 105, 0, 0, 1978, 1979, 5, 313, 0, 0, 1979, 1984, + 3, 124, 62, 0, 1980, 1981, 5, 312, 0, 0, 1981, 1983, 3, 124, 62, 0, 1982, + 1980, 1, 0, 0, 0, 1983, 1986, 1, 0, 0, 0, 1984, 1982, 1, 0, 0, 0, 1984, + 1985, 1, 0, 0, 0, 1985, 1987, 1, 0, 0, 0, 1986, 1984, 1, 0, 0, 0, 1987, + 1988, 5, 314, 0, 0, 1988, 2019, 1, 0, 0, 0, 1989, 1991, 5, 165, 0, 0, 1990, + 1989, 1, 0, 0, 0, 1990, 1991, 1, 0, 0, 0, 1991, 1992, 1, 0, 0, 0, 1992, + 1993, 5, 105, 0, 0, 1993, 1994, 5, 313, 0, 0, 1994, 1995, 3, 22, 11, 0, + 1995, 1996, 5, 314, 0, 0, 1996, 2019, 1, 0, 0, 0, 1997, 1999, 5, 165, 0, + 0, 1998, 1997, 1, 0, 0, 0, 1998, 1999, 1, 0, 0, 0, 1999, 2000, 1, 0, 0, + 0, 2000, 2001, 5, 137, 0, 0, 2001, 2004, 3, 130, 65, 0, 2002, 2003, 5, + 73, 0, 0, 2003, 2005, 3, 130, 65, 0, 2004, 2002, 1, 0, 0, 0, 2004, 2005, + 1, 0, 0, 0, 2005, 2019, 1, 0, 0, 0, 2006, 2008, 5, 116, 0, 0, 2007, 2009, + 5, 165, 0, 0, 2008, 2007, 1, 0, 0, 0, 2008, 2009, 1, 0, 0, 0, 2009, 2010, + 1, 0, 0, 0, 2010, 2019, 5, 166, 0, 0, 2011, 2013, 5, 116, 0, 0, 2012, 2014, + 5, 165, 0, 0, 2013, 2012, 1, 0, 0, 0, 2013, 2014, 1, 0, 0, 0, 2014, 2015, + 1, 0, 0, 0, 2015, 2016, 5, 62, 0, 0, 2016, 2017, 5, 88, 0, 0, 2017, 2019, + 3, 130, 65, 0, 2018, 1957, 1, 0, 0, 0, 2018, 1960, 1, 0, 0, 0, 2018, 1967, + 1, 0, 0, 0, 2018, 1975, 1, 0, 0, 0, 2018, 1990, 1, 0, 0, 0, 2018, 1998, + 1, 0, 0, 0, 2018, 2006, 1, 0, 0, 0, 2018, 2011, 1, 0, 0, 0, 2019, 129, + 1, 0, 0, 0, 2020, 2021, 6, 65, -1, 0, 2021, 2025, 3, 132, 66, 0, 2022, + 2023, 7, 17, 0, 0, 2023, 2025, 3, 130, 65, 4, 2024, 2020, 1, 0, 0, 0, 2024, + 2022, 1, 0, 0, 0, 2025, 2040, 1, 0, 0, 0, 2026, 2027, 10, 3, 0, 0, 2027, + 2028, 7, 18, 0, 0, 2028, 2039, 3, 130, 65, 4, 2029, 2030, 10, 2, 0, 0, + 2030, 2031, 7, 17, 0, 0, 2031, 2039, 3, 130, 65, 3, 2032, 2033, 10, 1, + 0, 0, 2033, 2034, 5, 307, 0, 0, 2034, 2039, 3, 130, 65, 2, 2035, 2036, + 10, 5, 0, 0, 2036, 2037, 5, 13, 0, 0, 2037, 2039, 3, 158, 79, 0, 2038, + 2026, 1, 0, 0, 0, 2038, 2029, 1, 0, 0, 0, 2038, 2032, 1, 0, 0, 0, 2038, + 2035, 1, 0, 0, 0, 2039, 2042, 1, 0, 0, 0, 2040, 2038, 1, 0, 0, 0, 2040, + 2041, 1, 0, 0, 0, 2041, 131, 1, 0, 0, 0, 2042, 2040, 1, 0, 0, 0, 2043, + 2044, 6, 66, -1, 0, 2044, 2497, 5, 166, 0, 0, 2045, 2497, 3, 166, 83, 0, + 2046, 2047, 3, 248, 124, 0, 2047, 2048, 3, 156, 78, 0, 2048, 2497, 1, 0, + 0, 0, 2049, 2050, 5, 65, 0, 0, 2050, 2051, 5, 196, 0, 0, 2051, 2497, 3, + 156, 78, 0, 2052, 2497, 3, 250, 125, 0, 2053, 2497, 3, 164, 82, 0, 2054, + 2497, 3, 156, 78, 0, 2055, 2497, 5, 329, 0, 0, 2056, 2497, 5, 308, 0, 0, + 2057, 2058, 5, 194, 0, 0, 2058, 2059, 5, 313, 0, 0, 2059, 2060, 3, 130, + 65, 0, 2060, 2061, 5, 105, 0, 0, 2061, 2062, 3, 130, 65, 0, 2062, 2063, + 5, 314, 0, 0, 2063, 2497, 1, 0, 0, 0, 2064, 2065, 5, 313, 0, 0, 2065, 2068, + 3, 124, 62, 0, 2066, 2067, 5, 312, 0, 0, 2067, 2069, 3, 124, 62, 0, 2068, + 2066, 1, 0, 0, 0, 2069, 2070, 1, 0, 0, 0, 2070, 2068, 1, 0, 0, 0, 2070, + 2071, 1, 0, 0, 0, 2071, 2072, 1, 0, 0, 0, 2072, 2073, 5, 314, 0, 0, 2073, + 2497, 1, 0, 0, 0, 2074, 2075, 5, 222, 0, 0, 2075, 2076, 5, 313, 0, 0, 2076, + 2081, 3, 124, 62, 0, 2077, 2078, 5, 312, 0, 0, 2078, 2080, 3, 124, 62, + 0, 2079, 2077, 1, 0, 0, 0, 2080, 2083, 1, 0, 0, 0, 2081, 2079, 1, 0, 0, + 0, 2081, 2082, 1, 0, 0, 0, 2082, 2084, 1, 0, 0, 0, 2083, 2081, 1, 0, 0, + 0, 2084, 2085, 5, 314, 0, 0, 2085, 2497, 1, 0, 0, 0, 2086, 2087, 5, 139, + 0, 0, 2087, 2089, 5, 313, 0, 0, 2088, 2090, 3, 66, 33, 0, 2089, 2088, 1, + 0, 0, 0, 2089, 2090, 1, 0, 0, 0, 2090, 2091, 1, 0, 0, 0, 2091, 2094, 3, + 124, 62, 0, 2092, 2093, 5, 312, 0, 0, 2093, 2095, 3, 156, 78, 0, 2094, + 2092, 1, 0, 0, 0, 2094, 2095, 1, 0, 0, 0, 2095, 2099, 1, 0, 0, 0, 2096, + 2097, 5, 173, 0, 0, 2097, 2098, 5, 183, 0, 0, 2098, 2100, 3, 86, 43, 0, + 2099, 2096, 1, 0, 0, 0, 2099, 2100, 1, 0, 0, 0, 2100, 2101, 1, 0, 0, 0, + 2101, 2102, 5, 314, 0, 0, 2102, 2103, 5, 289, 0, 0, 2103, 2104, 5, 97, + 0, 0, 2104, 2105, 5, 313, 0, 0, 2105, 2106, 5, 178, 0, 0, 2106, 2107, 5, + 19, 0, 0, 2107, 2112, 3, 50, 25, 0, 2108, 2109, 5, 312, 0, 0, 2109, 2111, + 3, 50, 25, 0, 2110, 2108, 1, 0, 0, 0, 2111, 2114, 1, 0, 0, 0, 2112, 2110, + 1, 0, 0, 0, 2112, 2113, 1, 0, 0, 0, 2113, 2115, 1, 0, 0, 0, 2114, 2112, + 1, 0, 0, 0, 2115, 2116, 5, 314, 0, 0, 2116, 2118, 1, 0, 0, 0, 2117, 2119, + 3, 180, 90, 0, 2118, 2117, 1, 0, 0, 0, 2118, 2119, 1, 0, 0, 0, 2119, 2497, + 1, 0, 0, 0, 2120, 2122, 3, 152, 76, 0, 2121, 2120, 1, 0, 0, 0, 2121, 2122, + 1, 0, 0, 0, 2122, 2123, 1, 0, 0, 0, 2123, 2124, 3, 236, 118, 0, 2124, 2128, + 5, 313, 0, 0, 2125, 2126, 3, 248, 124, 0, 2126, 2127, 5, 310, 0, 0, 2127, + 2129, 1, 0, 0, 0, 2128, 2125, 1, 0, 0, 0, 2128, 2129, 1, 0, 0, 0, 2129, + 2130, 1, 0, 0, 0, 2130, 2131, 5, 304, 0, 0, 2131, 2133, 5, 314, 0, 0, 2132, + 2134, 3, 180, 90, 0, 2133, 2132, 1, 0, 0, 0, 2133, 2134, 1, 0, 0, 0, 2134, + 2136, 1, 0, 0, 0, 2135, 2137, 3, 184, 92, 0, 2136, 2135, 1, 0, 0, 0, 2136, + 2137, 1, 0, 0, 0, 2137, 2497, 1, 0, 0, 0, 2138, 2140, 3, 152, 76, 0, 2139, + 2138, 1, 0, 0, 0, 2139, 2140, 1, 0, 0, 0, 2140, 2141, 1, 0, 0, 0, 2141, + 2142, 3, 236, 118, 0, 2142, 2154, 5, 313, 0, 0, 2143, 2145, 3, 66, 33, + 0, 2144, 2143, 1, 0, 0, 0, 2144, 2145, 1, 0, 0, 0, 2145, 2146, 1, 0, 0, + 0, 2146, 2151, 3, 124, 62, 0, 2147, 2148, 5, 312, 0, 0, 2148, 2150, 3, + 124, 62, 0, 2149, 2147, 1, 0, 0, 0, 2150, 2153, 1, 0, 0, 0, 2151, 2149, + 1, 0, 0, 0, 2151, 2152, 1, 0, 0, 0, 2152, 2155, 1, 0, 0, 0, 2153, 2151, + 1, 0, 0, 0, 2154, 2144, 1, 0, 0, 0, 2154, 2155, 1, 0, 0, 0, 2155, 2166, + 1, 0, 0, 0, 2156, 2157, 5, 178, 0, 0, 2157, 2158, 5, 19, 0, 0, 2158, 2163, + 3, 50, 25, 0, 2159, 2160, 5, 312, 0, 0, 2160, 2162, 3, 50, 25, 0, 2161, + 2159, 1, 0, 0, 0, 2162, 2165, 1, 0, 0, 0, 2163, 2161, 1, 0, 0, 0, 2163, + 2164, 1, 0, 0, 0, 2164, 2167, 1, 0, 0, 0, 2165, 2163, 1, 0, 0, 0, 2166, + 2156, 1, 0, 0, 0, 2166, 2167, 1, 0, 0, 0, 2167, 2168, 1, 0, 0, 0, 2168, + 2170, 5, 314, 0, 0, 2169, 2171, 3, 180, 90, 0, 2170, 2169, 1, 0, 0, 0, + 2170, 2171, 1, 0, 0, 0, 2171, 2176, 1, 0, 0, 0, 2172, 2174, 3, 154, 77, + 0, 2173, 2172, 1, 0, 0, 0, 2173, 2174, 1, 0, 0, 0, 2174, 2175, 1, 0, 0, + 0, 2175, 2177, 3, 184, 92, 0, 2176, 2173, 1, 0, 0, 0, 2176, 2177, 1, 0, + 0, 0, 2177, 2497, 1, 0, 0, 0, 2178, 2179, 3, 248, 124, 0, 2179, 2180, 3, + 184, 92, 0, 2180, 2497, 1, 0, 0, 0, 2181, 2182, 3, 248, 124, 0, 2182, 2183, + 5, 322, 0, 0, 2183, 2184, 3, 124, 62, 0, 2184, 2497, 1, 0, 0, 0, 2185, + 2194, 5, 313, 0, 0, 2186, 2191, 3, 248, 124, 0, 2187, 2188, 5, 312, 0, + 0, 2188, 2190, 3, 248, 124, 0, 2189, 2187, 1, 0, 0, 0, 2190, 2193, 1, 0, + 0, 0, 2191, 2189, 1, 0, 0, 0, 2191, 2192, 1, 0, 0, 0, 2192, 2195, 1, 0, + 0, 0, 2193, 2191, 1, 0, 0, 0, 2194, 2186, 1, 0, 0, 0, 2194, 2195, 1, 0, + 0, 0, 2195, 2196, 1, 0, 0, 0, 2196, 2197, 5, 314, 0, 0, 2197, 2198, 5, + 322, 0, 0, 2198, 2497, 3, 124, 62, 0, 2199, 2200, 5, 313, 0, 0, 2200, 2201, + 3, 22, 11, 0, 2201, 2202, 5, 314, 0, 0, 2202, 2497, 1, 0, 0, 0, 2203, 2204, + 5, 77, 0, 0, 2204, 2205, 5, 313, 0, 0, 2205, 2206, 3, 22, 11, 0, 2206, + 2207, 5, 314, 0, 0, 2207, 2497, 1, 0, 0, 0, 2208, 2209, 5, 23, 0, 0, 2209, + 2211, 3, 124, 62, 0, 2210, 2212, 3, 178, 89, 0, 2211, 2210, 1, 0, 0, 0, + 2212, 2213, 1, 0, 0, 0, 2213, 2211, 1, 0, 0, 0, 2213, 2214, 1, 0, 0, 0, + 2214, 2217, 1, 0, 0, 0, 2215, 2216, 5, 67, 0, 0, 2216, 2218, 3, 124, 62, + 0, 2217, 2215, 1, 0, 0, 0, 2217, 2218, 1, 0, 0, 0, 2218, 2219, 1, 0, 0, + 0, 2219, 2220, 5, 71, 0, 0, 2220, 2497, 1, 0, 0, 0, 2221, 2223, 5, 23, + 0, 0, 2222, 2224, 3, 178, 89, 0, 2223, 2222, 1, 0, 0, 0, 2224, 2225, 1, + 0, 0, 0, 2225, 2223, 1, 0, 0, 0, 2225, 2226, 1, 0, 0, 0, 2226, 2229, 1, + 0, 0, 0, 2227, 2228, 5, 67, 0, 0, 2228, 2230, 3, 124, 62, 0, 2229, 2227, + 1, 0, 0, 0, 2229, 2230, 1, 0, 0, 0, 2230, 2231, 1, 0, 0, 0, 2231, 2232, + 5, 71, 0, 0, 2232, 2497, 1, 0, 0, 0, 2233, 2234, 5, 24, 0, 0, 2234, 2235, + 5, 313, 0, 0, 2235, 2236, 3, 124, 62, 0, 2236, 2237, 5, 11, 0, 0, 2237, + 2238, 3, 172, 86, 0, 2238, 2239, 5, 314, 0, 0, 2239, 2497, 1, 0, 0, 0, + 2240, 2241, 5, 259, 0, 0, 2241, 2242, 5, 313, 0, 0, 2242, 2243, 3, 124, + 62, 0, 2243, 2244, 5, 11, 0, 0, 2244, 2245, 3, 172, 86, 0, 2245, 2246, + 5, 314, 0, 0, 2246, 2497, 1, 0, 0, 0, 2247, 2248, 5, 10, 0, 0, 2248, 2257, + 5, 315, 0, 0, 2249, 2254, 3, 124, 62, 0, 2250, 2251, 5, 312, 0, 0, 2251, + 2253, 3, 124, 62, 0, 2252, 2250, 1, 0, 0, 0, 2253, 2256, 1, 0, 0, 0, 2254, + 2252, 1, 0, 0, 0, 2254, 2255, 1, 0, 0, 0, 2255, 2258, 1, 0, 0, 0, 2256, + 2254, 1, 0, 0, 0, 2257, 2249, 1, 0, 0, 0, 2257, 2258, 1, 0, 0, 0, 2258, + 2259, 1, 0, 0, 0, 2259, 2497, 5, 316, 0, 0, 2260, 2497, 3, 248, 124, 0, + 2261, 2497, 5, 41, 0, 0, 2262, 2266, 5, 45, 0, 0, 2263, 2264, 5, 313, 0, + 0, 2264, 2265, 5, 330, 0, 0, 2265, 2267, 5, 314, 0, 0, 2266, 2263, 1, 0, + 0, 0, 2266, 2267, 1, 0, 0, 0, 2267, 2497, 1, 0, 0, 0, 2268, 2272, 5, 46, + 0, 0, 2269, 2270, 5, 313, 0, 0, 2270, 2271, 5, 330, 0, 0, 2271, 2273, 5, + 314, 0, 0, 2272, 2269, 1, 0, 0, 0, 2272, 2273, 1, 0, 0, 0, 2273, 2497, + 1, 0, 0, 0, 2274, 2278, 5, 141, 0, 0, 2275, 2276, 5, 313, 0, 0, 2276, 2277, + 5, 330, 0, 0, 2277, 2279, 5, 314, 0, 0, 2278, 2275, 1, 0, 0, 0, 2278, 2279, + 1, 0, 0, 0, 2279, 2497, 1, 0, 0, 0, 2280, 2284, 5, 142, 0, 0, 2281, 2282, + 5, 313, 0, 0, 2282, 2283, 5, 330, 0, 0, 2283, 2285, 5, 314, 0, 0, 2284, + 2281, 1, 0, 0, 0, 2284, 2285, 1, 0, 0, 0, 2285, 2497, 1, 0, 0, 0, 2286, + 2497, 5, 47, 0, 0, 2287, 2497, 5, 40, 0, 0, 2288, 2497, 5, 44, 0, 0, 2289, + 2497, 5, 42, 0, 0, 2290, 2291, 5, 256, 0, 0, 2291, 2299, 5, 313, 0, 0, + 2292, 2294, 3, 84, 42, 0, 2293, 2292, 1, 0, 0, 0, 2293, 2294, 1, 0, 0, + 0, 2294, 2296, 1, 0, 0, 0, 2295, 2297, 3, 130, 65, 0, 2296, 2295, 1, 0, + 0, 0, 2296, 2297, 1, 0, 0, 0, 2297, 2298, 1, 0, 0, 0, 2298, 2300, 5, 88, + 0, 0, 2299, 2293, 1, 0, 0, 0, 2299, 2300, 1, 0, 0, 0, 2300, 2301, 1, 0, + 0, 0, 2301, 2302, 3, 130, 65, 0, 2302, 2303, 5, 314, 0, 0, 2303, 2497, + 1, 0, 0, 0, 2304, 2305, 5, 256, 0, 0, 2305, 2306, 5, 313, 0, 0, 2306, 2307, + 3, 130, 65, 0, 2307, 2308, 5, 312, 0, 0, 2308, 2309, 3, 130, 65, 0, 2309, + 2310, 5, 314, 0, 0, 2310, 2497, 1, 0, 0, 0, 2311, 2312, 5, 242, 0, 0, 2312, + 2313, 5, 313, 0, 0, 2313, 2314, 3, 130, 65, 0, 2314, 2315, 5, 88, 0, 0, + 2315, 2318, 3, 130, 65, 0, 2316, 2317, 5, 86, 0, 0, 2317, 2319, 3, 130, + 65, 0, 2318, 2316, 1, 0, 0, 0, 2318, 2319, 1, 0, 0, 0, 2319, 2320, 1, 0, + 0, 0, 2320, 2321, 5, 314, 0, 0, 2321, 2497, 1, 0, 0, 0, 2322, 2323, 5, + 164, 0, 0, 2323, 2324, 5, 313, 0, 0, 2324, 2327, 3, 130, 65, 0, 2325, 2326, + 5, 312, 0, 0, 2326, 2328, 3, 170, 85, 0, 2327, 2325, 1, 0, 0, 0, 2327, + 2328, 1, 0, 0, 0, 2328, 2329, 1, 0, 0, 0, 2329, 2330, 5, 314, 0, 0, 2330, + 2497, 1, 0, 0, 0, 2331, 2332, 5, 79, 0, 0, 2332, 2333, 5, 313, 0, 0, 2333, + 2334, 3, 248, 124, 0, 2334, 2335, 5, 88, 0, 0, 2335, 2336, 3, 130, 65, + 0, 2336, 2337, 5, 314, 0, 0, 2337, 2497, 1, 0, 0, 0, 2338, 2339, 5, 313, + 0, 0, 2339, 2340, 3, 124, 62, 0, 2340, 2341, 5, 314, 0, 0, 2341, 2497, + 1, 0, 0, 0, 2342, 2343, 5, 98, 0, 0, 2343, 2352, 5, 313, 0, 0, 2344, 2349, + 3, 236, 118, 0, 2345, 2346, 5, 312, 0, 0, 2346, 2348, 3, 236, 118, 0, 2347, + 2345, 1, 0, 0, 0, 2348, 2351, 1, 0, 0, 0, 2349, 2347, 1, 0, 0, 0, 2349, + 2350, 1, 0, 0, 0, 2350, 2353, 1, 0, 0, 0, 2351, 2349, 1, 0, 0, 0, 2352, + 2344, 1, 0, 0, 0, 2352, 2353, 1, 0, 0, 0, 2353, 2354, 1, 0, 0, 0, 2354, + 2497, 5, 314, 0, 0, 2355, 2356, 5, 122, 0, 0, 2356, 2357, 5, 313, 0, 0, + 2357, 2362, 3, 134, 67, 0, 2358, 2359, 3, 142, 71, 0, 2359, 2360, 5, 173, + 0, 0, 2360, 2361, 5, 72, 0, 0, 2361, 2363, 1, 0, 0, 0, 2362, 2358, 1, 0, + 0, 0, 2362, 2363, 1, 0, 0, 0, 2363, 2364, 1, 0, 0, 0, 2364, 2365, 5, 314, + 0, 0, 2365, 2497, 1, 0, 0, 0, 2366, 2367, 5, 126, 0, 0, 2367, 2368, 5, + 313, 0, 0, 2368, 2371, 3, 134, 67, 0, 2369, 2370, 5, 214, 0, 0, 2370, 2372, + 3, 172, 86, 0, 2371, 2369, 1, 0, 0, 0, 2371, 2372, 1, 0, 0, 0, 2372, 2377, + 1, 0, 0, 0, 2373, 2374, 3, 144, 72, 0, 2374, 2375, 5, 173, 0, 0, 2375, + 2376, 5, 68, 0, 0, 2376, 2378, 1, 0, 0, 0, 2377, 2373, 1, 0, 0, 0, 2377, + 2378, 1, 0, 0, 0, 2378, 2383, 1, 0, 0, 0, 2379, 2380, 3, 144, 72, 0, 2380, + 2381, 5, 173, 0, 0, 2381, 2382, 5, 72, 0, 0, 2382, 2384, 1, 0, 0, 0, 2383, + 2379, 1, 0, 0, 0, 2383, 2384, 1, 0, 0, 0, 2384, 2385, 1, 0, 0, 0, 2385, + 2386, 5, 314, 0, 0, 2386, 2497, 1, 0, 0, 0, 2387, 2388, 5, 124, 0, 0, 2388, + 2389, 5, 313, 0, 0, 2389, 2396, 3, 134, 67, 0, 2390, 2391, 5, 214, 0, 0, + 2391, 2394, 3, 172, 86, 0, 2392, 2393, 5, 87, 0, 0, 2393, 2395, 3, 138, + 69, 0, 2394, 2392, 1, 0, 0, 0, 2394, 2395, 1, 0, 0, 0, 2395, 2397, 1, 0, + 0, 0, 2396, 2390, 1, 0, 0, 0, 2396, 2397, 1, 0, 0, 0, 2397, 2401, 1, 0, + 0, 0, 2398, 2399, 3, 146, 73, 0, 2399, 2400, 5, 292, 0, 0, 2400, 2402, + 1, 0, 0, 0, 2401, 2398, 1, 0, 0, 0, 2401, 2402, 1, 0, 0, 0, 2402, 2410, + 1, 0, 0, 0, 2403, 2404, 7, 19, 0, 0, 2404, 2408, 5, 201, 0, 0, 2405, 2406, + 5, 173, 0, 0, 2406, 2407, 5, 225, 0, 0, 2407, 2409, 5, 248, 0, 0, 2408, + 2405, 1, 0, 0, 0, 2408, 2409, 1, 0, 0, 0, 2409, 2411, 1, 0, 0, 0, 2410, + 2403, 1, 0, 0, 0, 2410, 2411, 1, 0, 0, 0, 2411, 2416, 1, 0, 0, 0, 2412, + 2413, 3, 148, 74, 0, 2413, 2414, 5, 173, 0, 0, 2414, 2415, 5, 68, 0, 0, + 2415, 2417, 1, 0, 0, 0, 2416, 2412, 1, 0, 0, 0, 2416, 2417, 1, 0, 0, 0, + 2417, 2422, 1, 0, 0, 0, 2418, 2419, 3, 148, 74, 0, 2419, 2420, 5, 173, + 0, 0, 2420, 2421, 5, 72, 0, 0, 2421, 2423, 1, 0, 0, 0, 2422, 2418, 1, 0, + 0, 0, 2422, 2423, 1, 0, 0, 0, 2423, 2424, 1, 0, 0, 0, 2424, 2425, 5, 314, + 0, 0, 2425, 2497, 1, 0, 0, 0, 2426, 2427, 5, 123, 0, 0, 2427, 2456, 5, + 313, 0, 0, 2428, 2433, 3, 150, 75, 0, 2429, 2430, 5, 312, 0, 0, 2430, 2432, + 3, 150, 75, 0, 2431, 2429, 1, 0, 0, 0, 2432, 2435, 1, 0, 0, 0, 2433, 2431, + 1, 0, 0, 0, 2433, 2434, 1, 0, 0, 0, 2434, 2442, 1, 0, 0, 0, 2435, 2433, + 1, 0, 0, 0, 2436, 2437, 5, 166, 0, 0, 2437, 2438, 5, 173, 0, 0, 2438, 2443, + 5, 166, 0, 0, 2439, 2440, 5, 1, 0, 0, 2440, 2441, 5, 173, 0, 0, 2441, 2443, + 5, 166, 0, 0, 2442, 2436, 1, 0, 0, 0, 2442, 2439, 1, 0, 0, 0, 2442, 2443, + 1, 0, 0, 0, 2443, 2454, 1, 0, 0, 0, 2444, 2445, 5, 288, 0, 0, 2445, 2447, + 5, 266, 0, 0, 2446, 2448, 5, 129, 0, 0, 2447, 2446, 1, 0, 0, 0, 2447, 2448, + 1, 0, 0, 0, 2448, 2455, 1, 0, 0, 0, 2449, 2450, 5, 290, 0, 0, 2450, 2452, + 5, 266, 0, 0, 2451, 2453, 5, 129, 0, 0, 2452, 2451, 1, 0, 0, 0, 2452, 2453, + 1, 0, 0, 0, 2453, 2455, 1, 0, 0, 0, 2454, 2444, 1, 0, 0, 0, 2454, 2449, + 1, 0, 0, 0, 2454, 2455, 1, 0, 0, 0, 2455, 2457, 1, 0, 0, 0, 2456, 2428, + 1, 0, 0, 0, 2456, 2457, 1, 0, 0, 0, 2457, 2464, 1, 0, 0, 0, 2458, 2459, + 5, 214, 0, 0, 2459, 2462, 3, 172, 86, 0, 2460, 2461, 5, 87, 0, 0, 2461, + 2463, 3, 138, 69, 0, 2462, 2460, 1, 0, 0, 0, 2462, 2463, 1, 0, 0, 0, 2463, + 2465, 1, 0, 0, 0, 2464, 2458, 1, 0, 0, 0, 2464, 2465, 1, 0, 0, 0, 2465, + 2466, 1, 0, 0, 0, 2466, 2497, 5, 314, 0, 0, 2467, 2468, 5, 121, 0, 0, 2468, + 2485, 5, 313, 0, 0, 2469, 2474, 3, 136, 68, 0, 2470, 2471, 5, 312, 0, 0, + 2471, 2473, 3, 136, 68, 0, 2472, 2470, 1, 0, 0, 0, 2473, 2476, 1, 0, 0, + 0, 2474, 2472, 1, 0, 0, 0, 2474, 2475, 1, 0, 0, 0, 2475, 2483, 1, 0, 0, + 0, 2476, 2474, 1, 0, 0, 0, 2477, 2478, 5, 166, 0, 0, 2478, 2479, 5, 173, + 0, 0, 2479, 2484, 5, 166, 0, 0, 2480, 2481, 5, 1, 0, 0, 2481, 2482, 5, + 173, 0, 0, 2482, 2484, 5, 166, 0, 0, 2483, 2477, 1, 0, 0, 0, 2483, 2480, + 1, 0, 0, 0, 2483, 2484, 1, 0, 0, 0, 2484, 2486, 1, 0, 0, 0, 2485, 2469, + 1, 0, 0, 0, 2485, 2486, 1, 0, 0, 0, 2486, 2493, 1, 0, 0, 0, 2487, 2488, + 5, 214, 0, 0, 2488, 2491, 3, 172, 86, 0, 2489, 2490, 5, 87, 0, 0, 2490, + 2492, 3, 138, 69, 0, 2491, 2489, 1, 0, 0, 0, 2491, 2492, 1, 0, 0, 0, 2492, + 2494, 1, 0, 0, 0, 2493, 2487, 1, 0, 0, 0, 2493, 2494, 1, 0, 0, 0, 2494, + 2495, 1, 0, 0, 0, 2495, 2497, 5, 314, 0, 0, 2496, 2043, 1, 0, 0, 0, 2496, + 2045, 1, 0, 0, 0, 2496, 2046, 1, 0, 0, 0, 2496, 2049, 1, 0, 0, 0, 2496, + 2052, 1, 0, 0, 0, 2496, 2053, 1, 0, 0, 0, 2496, 2054, 1, 0, 0, 0, 2496, + 2055, 1, 0, 0, 0, 2496, 2056, 1, 0, 0, 0, 2496, 2057, 1, 0, 0, 0, 2496, + 2064, 1, 0, 0, 0, 2496, 2074, 1, 0, 0, 0, 2496, 2086, 1, 0, 0, 0, 2496, + 2121, 1, 0, 0, 0, 2496, 2139, 1, 0, 0, 0, 2496, 2178, 1, 0, 0, 0, 2496, + 2181, 1, 0, 0, 0, 2496, 2185, 1, 0, 0, 0, 2496, 2199, 1, 0, 0, 0, 2496, + 2203, 1, 0, 0, 0, 2496, 2208, 1, 0, 0, 0, 2496, 2221, 1, 0, 0, 0, 2496, + 2233, 1, 0, 0, 0, 2496, 2240, 1, 0, 0, 0, 2496, 2247, 1, 0, 0, 0, 2496, + 2260, 1, 0, 0, 0, 2496, 2261, 1, 0, 0, 0, 2496, 2262, 1, 0, 0, 0, 2496, + 2268, 1, 0, 0, 0, 2496, 2274, 1, 0, 0, 0, 2496, 2280, 1, 0, 0, 0, 2496, + 2286, 1, 0, 0, 0, 2496, 2287, 1, 0, 0, 0, 2496, 2288, 1, 0, 0, 0, 2496, + 2289, 1, 0, 0, 0, 2496, 2290, 1, 0, 0, 0, 2496, 2304, 1, 0, 0, 0, 2496, + 2311, 1, 0, 0, 0, 2496, 2322, 1, 0, 0, 0, 2496, 2331, 1, 0, 0, 0, 2496, + 2338, 1, 0, 0, 0, 2496, 2342, 1, 0, 0, 0, 2496, 2355, 1, 0, 0, 0, 2496, + 2366, 1, 0, 0, 0, 2496, 2387, 1, 0, 0, 0, 2496, 2426, 1, 0, 0, 0, 2496, + 2467, 1, 0, 0, 0, 2497, 2508, 1, 0, 0, 0, 2498, 2499, 10, 24, 0, 0, 2499, + 2500, 5, 315, 0, 0, 2500, 2501, 3, 130, 65, 0, 2501, 2502, 5, 316, 0, 0, + 2502, 2507, 1, 0, 0, 0, 2503, 2504, 10, 22, 0, 0, 2504, 2505, 5, 310, 0, + 0, 2505, 2507, 3, 248, 124, 0, 2506, 2498, 1, 0, 0, 0, 2506, 2503, 1, 0, + 0, 0, 2507, 2510, 1, 0, 0, 0, 2508, 2506, 1, 0, 0, 0, 2508, 2509, 1, 0, + 0, 0, 2509, 133, 1, 0, 0, 0, 2510, 2508, 1, 0, 0, 0, 2511, 2512, 3, 136, + 68, 0, 2512, 2513, 5, 312, 0, 0, 2513, 2523, 3, 156, 78, 0, 2514, 2515, + 5, 186, 0, 0, 2515, 2520, 3, 140, 70, 0, 2516, 2517, 5, 312, 0, 0, 2517, + 2519, 3, 140, 70, 0, 2518, 2516, 1, 0, 0, 0, 2519, 2522, 1, 0, 0, 0, 2520, + 2518, 1, 0, 0, 0, 2520, 2521, 1, 0, 0, 0, 2521, 2524, 1, 0, 0, 0, 2522, + 2520, 1, 0, 0, 0, 2523, 2514, 1, 0, 0, 0, 2523, 2524, 1, 0, 0, 0, 2524, + 135, 1, 0, 0, 0, 2525, 2528, 3, 124, 62, 0, 2526, 2527, 5, 87, 0, 0, 2527, + 2529, 3, 138, 69, 0, 2528, 2526, 1, 0, 0, 0, 2528, 2529, 1, 0, 0, 0, 2529, + 137, 1, 0, 0, 0, 2530, 2533, 5, 120, 0, 0, 2531, 2532, 5, 70, 0, 0, 2532, + 2534, 7, 20, 0, 0, 2533, 2531, 1, 0, 0, 0, 2533, 2534, 1, 0, 0, 0, 2534, + 139, 1, 0, 0, 0, 2535, 2536, 3, 136, 68, 0, 2536, 2537, 5, 11, 0, 0, 2537, + 2538, 3, 248, 124, 0, 2538, 141, 1, 0, 0, 0, 2539, 2540, 7, 21, 0, 0, 2540, + 143, 1, 0, 0, 0, 2541, 2546, 5, 72, 0, 0, 2542, 2546, 5, 166, 0, 0, 2543, + 2544, 5, 53, 0, 0, 2544, 2546, 3, 124, 62, 0, 2545, 2541, 1, 0, 0, 0, 2545, + 2542, 1, 0, 0, 0, 2545, 2543, 1, 0, 0, 0, 2546, 145, 1, 0, 0, 0, 2547, + 2549, 5, 290, 0, 0, 2548, 2550, 5, 10, 0, 0, 2549, 2548, 1, 0, 0, 0, 2549, + 2550, 1, 0, 0, 0, 2550, 2559, 1, 0, 0, 0, 2551, 2553, 5, 288, 0, 0, 2552, + 2554, 7, 22, 0, 0, 2553, 2552, 1, 0, 0, 0, 2553, 2554, 1, 0, 0, 0, 2554, + 2556, 1, 0, 0, 0, 2555, 2557, 5, 10, 0, 0, 2556, 2555, 1, 0, 0, 0, 2556, + 2557, 1, 0, 0, 0, 2557, 2559, 1, 0, 0, 0, 2558, 2547, 1, 0, 0, 0, 2558, + 2551, 1, 0, 0, 0, 2559, 147, 1, 0, 0, 0, 2560, 2565, 5, 72, 0, 0, 2561, + 2565, 5, 166, 0, 0, 2562, 2563, 5, 68, 0, 0, 2563, 2565, 7, 23, 0, 0, 2564, + 2560, 1, 0, 0, 0, 2564, 2561, 1, 0, 0, 0, 2564, 2562, 1, 0, 0, 0, 2565, + 149, 1, 0, 0, 0, 2566, 2568, 5, 128, 0, 0, 2567, 2566, 1, 0, 0, 0, 2567, + 2568, 1, 0, 0, 0, 2568, 2569, 1, 0, 0, 0, 2569, 2570, 3, 124, 62, 0, 2570, + 2571, 5, 279, 0, 0, 2571, 2572, 3, 136, 68, 0, 2572, 2578, 1, 0, 0, 0, + 2573, 2574, 3, 124, 62, 0, 2574, 2575, 5, 311, 0, 0, 2575, 2576, 3, 136, + 68, 0, 2576, 2578, 1, 0, 0, 0, 2577, 2567, 1, 0, 0, 0, 2577, 2573, 1, 0, + 0, 0, 2578, 151, 1, 0, 0, 0, 2579, 2580, 7, 24, 0, 0, 2580, 153, 1, 0, + 0, 0, 2581, 2582, 5, 103, 0, 0, 2582, 2586, 5, 168, 0, 0, 2583, 2584, 5, + 211, 0, 0, 2584, 2586, 5, 168, 0, 0, 2585, 2581, 1, 0, 0, 0, 2585, 2583, + 1, 0, 0, 0, 2586, 155, 1, 0, 0, 0, 2587, 2594, 5, 327, 0, 0, 2588, 2591, + 5, 328, 0, 0, 2589, 2590, 5, 261, 0, 0, 2590, 2592, 5, 327, 0, 0, 2591, + 2589, 1, 0, 0, 0, 2591, 2592, 1, 0, 0, 0, 2592, 2594, 1, 0, 0, 0, 2593, + 2587, 1, 0, 0, 0, 2593, 2588, 1, 0, 0, 0, 2594, 157, 1, 0, 0, 0, 2595, + 2596, 5, 251, 0, 0, 2596, 2597, 5, 295, 0, 0, 2597, 2602, 3, 166, 83, 0, + 2598, 2599, 5, 251, 0, 0, 2599, 2600, 5, 295, 0, 0, 2600, 2602, 3, 156, + 78, 0, 2601, 2595, 1, 0, 0, 0, 2601, 2598, 1, 0, 0, 0, 2602, 159, 1, 0, + 0, 0, 2603, 2604, 7, 25, 0, 0, 2604, 161, 1, 0, 0, 0, 2605, 2606, 7, 26, + 0, 0, 2606, 163, 1, 0, 0, 0, 2607, 2608, 7, 27, 0, 0, 2608, 165, 1, 0, + 0, 0, 2609, 2611, 5, 112, 0, 0, 2610, 2612, 7, 17, 0, 0, 2611, 2610, 1, + 0, 0, 0, 2611, 2612, 1, 0, 0, 0, 2612, 2613, 1, 0, 0, 0, 2613, 2614, 3, + 156, 78, 0, 2614, 2617, 3, 168, 84, 0, 2615, 2616, 5, 253, 0, 0, 2616, + 2618, 3, 168, 84, 0, 2617, 2615, 1, 0, 0, 0, 2617, 2618, 1, 0, 0, 0, 2618, + 167, 1, 0, 0, 0, 2619, 2620, 7, 28, 0, 0, 2620, 169, 1, 0, 0, 0, 2621, + 2622, 7, 29, 0, 0, 2622, 171, 1, 0, 0, 0, 2623, 2624, 6, 86, -1, 0, 2624, + 2625, 5, 222, 0, 0, 2625, 2626, 5, 313, 0, 0, 2626, 2631, 3, 174, 87, 0, + 2627, 2628, 5, 312, 0, 0, 2628, 2630, 3, 174, 87, 0, 2629, 2627, 1, 0, + 0, 0, 2630, 2633, 1, 0, 0, 0, 2631, 2629, 1, 0, 0, 0, 2631, 2632, 1, 0, + 0, 0, 2632, 2634, 1, 0, 0, 0, 2633, 2631, 1, 0, 0, 0, 2634, 2635, 5, 314, + 0, 0, 2635, 2715, 1, 0, 0, 0, 2636, 2637, 5, 112, 0, 0, 2637, 2640, 3, + 168, 84, 0, 2638, 2639, 5, 253, 0, 0, 2639, 2641, 3, 168, 84, 0, 2640, + 2638, 1, 0, 0, 0, 2640, 2641, 1, 0, 0, 0, 2641, 2715, 1, 0, 0, 0, 2642, + 2647, 5, 252, 0, 0, 2643, 2644, 5, 313, 0, 0, 2644, 2645, 3, 176, 88, 0, + 2645, 2646, 5, 314, 0, 0, 2646, 2648, 1, 0, 0, 0, 2647, 2643, 1, 0, 0, + 0, 2647, 2648, 1, 0, 0, 0, 2648, 2652, 1, 0, 0, 0, 2649, 2650, 5, 290, + 0, 0, 2650, 2651, 5, 251, 0, 0, 2651, 2653, 5, 295, 0, 0, 2652, 2649, 1, + 0, 0, 0, 2652, 2653, 1, 0, 0, 0, 2653, 2715, 1, 0, 0, 0, 2654, 2659, 5, + 252, 0, 0, 2655, 2656, 5, 313, 0, 0, 2656, 2657, 3, 176, 88, 0, 2657, 2658, + 5, 314, 0, 0, 2658, 2660, 1, 0, 0, 0, 2659, 2655, 1, 0, 0, 0, 2659, 2660, + 1, 0, 0, 0, 2660, 2661, 1, 0, 0, 0, 2661, 2662, 5, 288, 0, 0, 2662, 2663, + 5, 251, 0, 0, 2663, 2715, 5, 295, 0, 0, 2664, 2669, 5, 251, 0, 0, 2665, + 2666, 5, 313, 0, 0, 2666, 2667, 3, 176, 88, 0, 2667, 2668, 5, 314, 0, 0, + 2668, 2670, 1, 0, 0, 0, 2669, 2665, 1, 0, 0, 0, 2669, 2670, 1, 0, 0, 0, + 2670, 2674, 1, 0, 0, 0, 2671, 2672, 5, 290, 0, 0, 2672, 2673, 5, 251, 0, + 0, 2673, 2675, 5, 295, 0, 0, 2674, 2671, 1, 0, 0, 0, 2674, 2675, 1, 0, + 0, 0, 2675, 2715, 1, 0, 0, 0, 2676, 2681, 5, 251, 0, 0, 2677, 2678, 5, + 313, 0, 0, 2678, 2679, 3, 176, 88, 0, 2679, 2680, 5, 314, 0, 0, 2680, 2682, + 1, 0, 0, 0, 2681, 2677, 1, 0, 0, 0, 2681, 2682, 1, 0, 0, 0, 2682, 2683, + 1, 0, 0, 0, 2683, 2684, 5, 288, 0, 0, 2684, 2685, 5, 251, 0, 0, 2685, 2715, + 5, 295, 0, 0, 2686, 2687, 5, 65, 0, 0, 2687, 2715, 5, 196, 0, 0, 2688, + 2689, 5, 10, 0, 0, 2689, 2690, 5, 298, 0, 0, 2690, 2691, 3, 172, 86, 0, + 2691, 2692, 5, 300, 0, 0, 2692, 2715, 1, 0, 0, 0, 2693, 2694, 5, 145, 0, + 0, 2694, 2695, 5, 298, 0, 0, 2695, 2696, 3, 172, 86, 0, 2696, 2697, 5, + 312, 0, 0, 2697, 2698, 3, 172, 86, 0, 2698, 2699, 5, 300, 0, 0, 2699, 2715, + 1, 0, 0, 0, 2700, 2712, 3, 248, 124, 0, 2701, 2702, 5, 313, 0, 0, 2702, + 2707, 3, 176, 88, 0, 2703, 2704, 5, 312, 0, 0, 2704, 2706, 3, 176, 88, + 0, 2705, 2703, 1, 0, 0, 0, 2706, 2709, 1, 0, 0, 0, 2707, 2705, 1, 0, 0, + 0, 2707, 2708, 1, 0, 0, 0, 2708, 2710, 1, 0, 0, 0, 2709, 2707, 1, 0, 0, + 0, 2710, 2711, 5, 314, 0, 0, 2711, 2713, 1, 0, 0, 0, 2712, 2701, 1, 0, + 0, 0, 2712, 2713, 1, 0, 0, 0, 2713, 2715, 1, 0, 0, 0, 2714, 2623, 1, 0, + 0, 0, 2714, 2636, 1, 0, 0, 0, 2714, 2642, 1, 0, 0, 0, 2714, 2654, 1, 0, + 0, 0, 2714, 2664, 1, 0, 0, 0, 2714, 2676, 1, 0, 0, 0, 2714, 2686, 1, 0, + 0, 0, 2714, 2688, 1, 0, 0, 0, 2714, 2693, 1, 0, 0, 0, 2714, 2700, 1, 0, + 0, 0, 2715, 2725, 1, 0, 0, 0, 2716, 2717, 10, 2, 0, 0, 2717, 2721, 5, 10, + 0, 0, 2718, 2719, 5, 315, 0, 0, 2719, 2720, 5, 330, 0, 0, 2720, 2722, 5, + 316, 0, 0, 2721, 2718, 1, 0, 0, 0, 2721, 2722, 1, 0, 0, 0, 2722, 2724, + 1, 0, 0, 0, 2723, 2716, 1, 0, 0, 0, 2724, 2727, 1, 0, 0, 0, 2725, 2723, + 1, 0, 0, 0, 2725, 2726, 1, 0, 0, 0, 2726, 173, 1, 0, 0, 0, 2727, 2725, + 1, 0, 0, 0, 2728, 2733, 3, 172, 86, 0, 2729, 2730, 3, 248, 124, 0, 2730, + 2731, 3, 172, 86, 0, 2731, 2733, 1, 0, 0, 0, 2732, 2728, 1, 0, 0, 0, 2732, + 2729, 1, 0, 0, 0, 2733, 175, 1, 0, 0, 0, 2734, 2737, 5, 330, 0, 0, 2735, + 2737, 3, 172, 86, 0, 2736, 2734, 1, 0, 0, 0, 2736, 2735, 1, 0, 0, 0, 2737, + 177, 1, 0, 0, 0, 2738, 2739, 5, 284, 0, 0, 2739, 2740, 3, 124, 62, 0, 2740, + 2741, 5, 249, 0, 0, 2741, 2742, 3, 124, 62, 0, 2742, 179, 1, 0, 0, 0, 2743, + 2744, 5, 82, 0, 0, 2744, 2745, 5, 313, 0, 0, 2745, 2746, 5, 285, 0, 0, + 2746, 2747, 3, 126, 63, 0, 2747, 2748, 5, 314, 0, 0, 2748, 181, 1, 0, 0, + 0, 2749, 2750, 5, 284, 0, 0, 2750, 2753, 5, 147, 0, 0, 2751, 2752, 5, 8, + 0, 0, 2752, 2754, 3, 124, 62, 0, 2753, 2751, 1, 0, 0, 0, 2753, 2754, 1, + 0, 0, 0, 2754, 2755, 1, 0, 0, 0, 2755, 2756, 5, 249, 0, 0, 2756, 2757, + 5, 271, 0, 0, 2757, 2758, 5, 234, 0, 0, 2758, 2759, 3, 248, 124, 0, 2759, + 2760, 5, 296, 0, 0, 2760, 2768, 3, 124, 62, 0, 2761, 2762, 5, 312, 0, 0, + 2762, 2763, 3, 248, 124, 0, 2763, 2764, 5, 296, 0, 0, 2764, 2765, 3, 124, + 62, 0, 2765, 2767, 1, 0, 0, 0, 2766, 2761, 1, 0, 0, 0, 2767, 2770, 1, 0, + 0, 0, 2768, 2766, 1, 0, 0, 0, 2768, 2769, 1, 0, 0, 0, 2769, 2814, 1, 0, + 0, 0, 2770, 2768, 1, 0, 0, 0, 2771, 2772, 5, 284, 0, 0, 2772, 2775, 5, + 147, 0, 0, 2773, 2774, 5, 8, 0, 0, 2774, 2776, 3, 124, 62, 0, 2775, 2773, + 1, 0, 0, 0, 2775, 2776, 1, 0, 0, 0, 2776, 2777, 1, 0, 0, 0, 2777, 2778, + 5, 249, 0, 0, 2778, 2814, 5, 56, 0, 0, 2779, 2780, 5, 284, 0, 0, 2780, + 2781, 5, 165, 0, 0, 2781, 2784, 5, 147, 0, 0, 2782, 2783, 5, 8, 0, 0, 2783, + 2785, 3, 124, 62, 0, 2784, 2782, 1, 0, 0, 0, 2784, 2785, 1, 0, 0, 0, 2785, + 2786, 1, 0, 0, 0, 2786, 2787, 5, 249, 0, 0, 2787, 2799, 5, 110, 0, 0, 2788, + 2789, 5, 313, 0, 0, 2789, 2794, 3, 248, 124, 0, 2790, 2791, 5, 312, 0, + 0, 2791, 2793, 3, 248, 124, 0, 2792, 2790, 1, 0, 0, 0, 2793, 2796, 1, 0, + 0, 0, 2794, 2792, 1, 0, 0, 0, 2794, 2795, 1, 0, 0, 0, 2795, 2797, 1, 0, + 0, 0, 2796, 2794, 1, 0, 0, 0, 2797, 2798, 5, 314, 0, 0, 2798, 2800, 1, + 0, 0, 0, 2799, 2788, 1, 0, 0, 0, 2799, 2800, 1, 0, 0, 0, 2800, 2801, 1, + 0, 0, 0, 2801, 2802, 5, 280, 0, 0, 2802, 2803, 5, 313, 0, 0, 2803, 2808, + 3, 124, 62, 0, 2804, 2805, 5, 312, 0, 0, 2805, 2807, 3, 124, 62, 0, 2806, + 2804, 1, 0, 0, 0, 2807, 2810, 1, 0, 0, 0, 2808, 2806, 1, 0, 0, 0, 2808, + 2809, 1, 0, 0, 0, 2809, 2811, 1, 0, 0, 0, 2810, 2808, 1, 0, 0, 0, 2811, + 2812, 5, 314, 0, 0, 2812, 2814, 1, 0, 0, 0, 2813, 2749, 1, 0, 0, 0, 2813, + 2771, 1, 0, 0, 0, 2813, 2779, 1, 0, 0, 0, 2814, 183, 1, 0, 0, 0, 2815, + 2821, 5, 182, 0, 0, 2816, 2822, 3, 248, 124, 0, 2817, 2818, 5, 313, 0, + 0, 2818, 2819, 3, 62, 31, 0, 2819, 2820, 5, 314, 0, 0, 2820, 2822, 1, 0, + 0, 0, 2821, 2816, 1, 0, 0, 0, 2821, 2817, 1, 0, 0, 0, 2822, 185, 1, 0, + 0, 0, 2823, 2824, 5, 151, 0, 0, 2824, 2829, 3, 92, 46, 0, 2825, 2826, 5, + 312, 0, 0, 2826, 2828, 3, 92, 46, 0, 2827, 2825, 1, 0, 0, 0, 2828, 2831, + 1, 0, 0, 0, 2829, 2827, 1, 0, 0, 0, 2829, 2830, 1, 0, 0, 0, 2830, 2833, + 1, 0, 0, 0, 2831, 2829, 1, 0, 0, 0, 2832, 2823, 1, 0, 0, 0, 2832, 2833, + 1, 0, 0, 0, 2833, 2834, 1, 0, 0, 0, 2834, 2838, 3, 188, 94, 0, 2835, 2836, + 5, 4, 0, 0, 2836, 2837, 5, 146, 0, 0, 2837, 2839, 3, 98, 49, 0, 2838, 2835, + 1, 0, 0, 0, 2838, 2839, 1, 0, 0, 0, 2839, 2841, 1, 0, 0, 0, 2840, 2842, + 7, 16, 0, 0, 2841, 2840, 1, 0, 0, 0, 2841, 2842, 1, 0, 0, 0, 2842, 2848, + 1, 0, 0, 0, 2843, 2844, 5, 189, 0, 0, 2844, 2845, 5, 313, 0, 0, 2845, 2846, + 3, 192, 96, 0, 2846, 2847, 5, 314, 0, 0, 2847, 2849, 1, 0, 0, 0, 2848, + 2843, 1, 0, 0, 0, 2848, 2849, 1, 0, 0, 0, 2849, 2859, 1, 0, 0, 0, 2850, + 2851, 5, 241, 0, 0, 2851, 2856, 3, 100, 50, 0, 2852, 2853, 5, 312, 0, 0, + 2853, 2855, 3, 100, 50, 0, 2854, 2852, 1, 0, 0, 0, 2855, 2858, 1, 0, 0, + 0, 2856, 2854, 1, 0, 0, 0, 2856, 2857, 1, 0, 0, 0, 2857, 2860, 1, 0, 0, + 0, 2858, 2856, 1, 0, 0, 0, 2859, 2850, 1, 0, 0, 0, 2859, 2860, 1, 0, 0, + 0, 2860, 2870, 1, 0, 0, 0, 2861, 2862, 5, 54, 0, 0, 2862, 2867, 3, 102, + 51, 0, 2863, 2864, 5, 312, 0, 0, 2864, 2866, 3, 102, 51, 0, 2865, 2863, + 1, 0, 0, 0, 2866, 2869, 1, 0, 0, 0, 2867, 2865, 1, 0, 0, 0, 2867, 2868, + 1, 0, 0, 0, 2868, 2871, 1, 0, 0, 0, 2869, 2867, 1, 0, 0, 0, 2870, 2861, + 1, 0, 0, 0, 2870, 2871, 1, 0, 0, 0, 2871, 187, 1, 0, 0, 0, 2872, 2873, + 5, 202, 0, 0, 2873, 2897, 3, 190, 95, 0, 2874, 2875, 5, 223, 0, 0, 2875, + 2897, 3, 190, 95, 0, 2876, 2877, 5, 99, 0, 0, 2877, 2897, 3, 190, 95, 0, + 2878, 2879, 5, 202, 0, 0, 2879, 2880, 5, 17, 0, 0, 2880, 2881, 3, 190, + 95, 0, 2881, 2882, 5, 8, 0, 0, 2882, 2883, 3, 190, 95, 0, 2883, 2897, 1, + 0, 0, 0, 2884, 2885, 5, 223, 0, 0, 2885, 2886, 5, 17, 0, 0, 2886, 2887, + 3, 190, 95, 0, 2887, 2888, 5, 8, 0, 0, 2888, 2889, 3, 190, 95, 0, 2889, + 2897, 1, 0, 0, 0, 2890, 2891, 5, 99, 0, 0, 2891, 2892, 5, 17, 0, 0, 2892, + 2893, 3, 190, 95, 0, 2893, 2894, 5, 8, 0, 0, 2894, 2895, 3, 190, 95, 0, + 2895, 2897, 1, 0, 0, 0, 2896, 2872, 1, 0, 0, 0, 2896, 2874, 1, 0, 0, 0, + 2896, 2876, 1, 0, 0, 0, 2896, 2878, 1, 0, 0, 0, 2896, 2884, 1, 0, 0, 0, + 2896, 2890, 1, 0, 0, 0, 2897, 189, 1, 0, 0, 0, 2898, 2899, 5, 262, 0, 0, + 2899, 2908, 5, 195, 0, 0, 2900, 2901, 5, 262, 0, 0, 2901, 2908, 5, 85, + 0, 0, 2902, 2903, 5, 39, 0, 0, 2903, 2908, 5, 222, 0, 0, 2904, 2905, 3, + 124, 62, 0, 2905, 2906, 7, 30, 0, 0, 2906, 2908, 1, 0, 0, 0, 2907, 2898, + 1, 0, 0, 0, 2907, 2900, 1, 0, 0, 0, 2907, 2902, 1, 0, 0, 0, 2907, 2904, + 1, 0, 0, 0, 2908, 191, 1, 0, 0, 0, 2909, 2910, 6, 96, -1, 0, 2910, 2912, + 3, 194, 97, 0, 2911, 2913, 3, 196, 98, 0, 2912, 2911, 1, 0, 0, 0, 2912, + 2913, 1, 0, 0, 0, 2913, 2921, 1, 0, 0, 0, 2914, 2915, 10, 2, 0, 0, 2915, + 2920, 3, 192, 96, 3, 2916, 2917, 10, 1, 0, 0, 2917, 2918, 5, 324, 0, 0, + 2918, 2920, 3, 192, 96, 2, 2919, 2914, 1, 0, 0, 0, 2919, 2916, 1, 0, 0, + 0, 2920, 2923, 1, 0, 0, 0, 2921, 2919, 1, 0, 0, 0, 2921, 2922, 1, 0, 0, + 0, 2922, 193, 1, 0, 0, 0, 2923, 2921, 1, 0, 0, 0, 2924, 2950, 3, 248, 124, + 0, 2925, 2926, 5, 313, 0, 0, 2926, 2950, 5, 314, 0, 0, 2927, 2928, 5, 192, + 0, 0, 2928, 2929, 5, 313, 0, 0, 2929, 2934, 3, 192, 96, 0, 2930, 2931, + 5, 312, 0, 0, 2931, 2933, 3, 192, 96, 0, 2932, 2930, 1, 0, 0, 0, 2933, + 2936, 1, 0, 0, 0, 2934, 2932, 1, 0, 0, 0, 2934, 2935, 1, 0, 0, 0, 2935, + 2937, 1, 0, 0, 0, 2936, 2934, 1, 0, 0, 0, 2937, 2938, 5, 314, 0, 0, 2938, + 2950, 1, 0, 0, 0, 2939, 2940, 5, 313, 0, 0, 2940, 2941, 3, 192, 96, 0, + 2941, 2942, 5, 314, 0, 0, 2942, 2950, 1, 0, 0, 0, 2943, 2950, 5, 326, 0, + 0, 2944, 2950, 5, 325, 0, 0, 2945, 2946, 5, 319, 0, 0, 2946, 2947, 3, 192, + 96, 0, 2947, 2948, 5, 320, 0, 0, 2948, 2950, 1, 0, 0, 0, 2949, 2924, 1, + 0, 0, 0, 2949, 2925, 1, 0, 0, 0, 2949, 2927, 1, 0, 0, 0, 2949, 2939, 1, + 0, 0, 0, 2949, 2943, 1, 0, 0, 0, 2949, 2944, 1, 0, 0, 0, 2949, 2945, 1, + 0, 0, 0, 2950, 195, 1, 0, 0, 0, 2951, 2953, 5, 304, 0, 0, 2952, 2954, 5, + 308, 0, 0, 2953, 2952, 1, 0, 0, 0, 2953, 2954, 1, 0, 0, 0, 2954, 2982, + 1, 0, 0, 0, 2955, 2957, 5, 302, 0, 0, 2956, 2958, 5, 308, 0, 0, 2957, 2956, + 1, 0, 0, 0, 2957, 2958, 1, 0, 0, 0, 2958, 2982, 1, 0, 0, 0, 2959, 2961, + 5, 308, 0, 0, 2960, 2962, 5, 308, 0, 0, 2961, 2960, 1, 0, 0, 0, 2961, 2962, + 1, 0, 0, 0, 2962, 2982, 1, 0, 0, 0, 2963, 2964, 5, 317, 0, 0, 2964, 2965, + 5, 330, 0, 0, 2965, 2967, 5, 318, 0, 0, 2966, 2968, 5, 308, 0, 0, 2967, + 2966, 1, 0, 0, 0, 2967, 2968, 1, 0, 0, 0, 2968, 2982, 1, 0, 0, 0, 2969, + 2971, 5, 317, 0, 0, 2970, 2972, 5, 330, 0, 0, 2971, 2970, 1, 0, 0, 0, 2971, + 2972, 1, 0, 0, 0, 2972, 2973, 1, 0, 0, 0, 2973, 2975, 5, 312, 0, 0, 2974, + 2976, 5, 330, 0, 0, 2975, 2974, 1, 0, 0, 0, 2975, 2976, 1, 0, 0, 0, 2976, + 2977, 1, 0, 0, 0, 2977, 2979, 5, 318, 0, 0, 2978, 2980, 5, 308, 0, 0, 2979, + 2978, 1, 0, 0, 0, 2979, 2980, 1, 0, 0, 0, 2980, 2982, 1, 0, 0, 0, 2981, + 2951, 1, 0, 0, 0, 2981, 2955, 1, 0, 0, 0, 2981, 2959, 1, 0, 0, 0, 2981, + 2963, 1, 0, 0, 0, 2981, 2969, 1, 0, 0, 0, 2982, 197, 1, 0, 0, 0, 2983, + 2984, 3, 248, 124, 0, 2984, 2985, 5, 296, 0, 0, 2985, 2986, 3, 124, 62, + 0, 2986, 199, 1, 0, 0, 0, 2987, 2988, 5, 87, 0, 0, 2988, 2992, 7, 31, 0, + 0, 2989, 2990, 5, 260, 0, 0, 2990, 2992, 7, 32, 0, 0, 2991, 2987, 1, 0, + 0, 0, 2991, 2989, 1, 0, 0, 0, 2992, 201, 1, 0, 0, 0, 2993, 2994, 5, 117, + 0, 0, 2994, 2995, 5, 136, 0, 0, 2995, 2999, 3, 204, 102, 0, 2996, 2997, + 5, 203, 0, 0, 2997, 2999, 7, 33, 0, 0, 2998, 2993, 1, 0, 0, 0, 2998, 2996, + 1, 0, 0, 0, 2999, 203, 1, 0, 0, 0, 3000, 3001, 5, 203, 0, 0, 3001, 3008, + 5, 263, 0, 0, 3002, 3003, 5, 203, 0, 0, 3003, 3008, 5, 31, 0, 0, 3004, + 3005, 5, 208, 0, 0, 3005, 3008, 5, 203, 0, 0, 3006, 3008, 5, 232, 0, 0, + 3007, 3000, 1, 0, 0, 0, 3007, 3002, 1, 0, 0, 0, 3007, 3004, 1, 0, 0, 0, + 3007, 3006, 1, 0, 0, 0, 3008, 205, 1, 0, 0, 0, 3009, 3015, 3, 124, 62, + 0, 3010, 3011, 3, 248, 124, 0, 3011, 3012, 5, 323, 0, 0, 3012, 3013, 3, + 124, 62, 0, 3013, 3015, 1, 0, 0, 0, 3014, 3009, 1, 0, 0, 0, 3014, 3010, + 1, 0, 0, 0, 3015, 207, 1, 0, 0, 0, 3016, 3017, 3, 248, 124, 0, 3017, 3018, + 5, 310, 0, 0, 3018, 3019, 3, 248, 124, 0, 3019, 3022, 1, 0, 0, 0, 3020, + 3022, 3, 248, 124, 0, 3021, 3016, 1, 0, 0, 0, 3021, 3020, 1, 0, 0, 0, 3022, + 209, 1, 0, 0, 0, 3023, 3028, 3, 208, 104, 0, 3024, 3025, 5, 312, 0, 0, + 3025, 3027, 3, 208, 104, 0, 3026, 3024, 1, 0, 0, 0, 3027, 3030, 1, 0, 0, + 0, 3028, 3026, 1, 0, 0, 0, 3028, 3029, 1, 0, 0, 0, 3029, 211, 1, 0, 0, + 0, 3030, 3028, 1, 0, 0, 0, 3031, 3032, 5, 90, 0, 0, 3032, 3033, 3, 214, + 107, 0, 3033, 3037, 3, 218, 109, 0, 3034, 3036, 3, 220, 110, 0, 3035, 3034, + 1, 0, 0, 0, 3036, 3039, 1, 0, 0, 0, 3037, 3035, 1, 0, 0, 0, 3037, 3038, + 1, 0, 0, 0, 3038, 3040, 1, 0, 0, 0, 3039, 3037, 1, 0, 0, 0, 3040, 3041, + 3, 222, 111, 0, 3041, 213, 1, 0, 0, 0, 3042, 3043, 3, 236, 118, 0, 3043, + 3052, 5, 313, 0, 0, 3044, 3049, 3, 216, 108, 0, 3045, 3046, 5, 312, 0, + 0, 3046, 3048, 3, 216, 108, 0, 3047, 3045, 1, 0, 0, 0, 3048, 3051, 1, 0, + 0, 0, 3049, 3047, 1, 0, 0, 0, 3049, 3050, 1, 0, 0, 0, 3050, 3053, 1, 0, + 0, 0, 3051, 3049, 1, 0, 0, 0, 3052, 3044, 1, 0, 0, 0, 3052, 3053, 1, 0, + 0, 0, 3053, 3054, 1, 0, 0, 0, 3054, 3055, 5, 314, 0, 0, 3055, 215, 1, 0, + 0, 0, 3056, 3058, 3, 248, 124, 0, 3057, 3056, 1, 0, 0, 0, 3057, 3058, 1, + 0, 0, 0, 3058, 3059, 1, 0, 0, 0, 3059, 3060, 3, 172, 86, 0, 3060, 217, + 1, 0, 0, 0, 3061, 3062, 5, 215, 0, 0, 3062, 3063, 3, 172, 86, 0, 3063, + 219, 1, 0, 0, 0, 3064, 3065, 5, 130, 0, 0, 3065, 3084, 3, 248, 124, 0, + 3066, 3068, 5, 165, 0, 0, 3067, 3066, 1, 0, 0, 0, 3067, 3068, 1, 0, 0, + 0, 3068, 3069, 1, 0, 0, 0, 3069, 3084, 5, 61, 0, 0, 3070, 3071, 5, 215, + 0, 0, 3071, 3072, 5, 166, 0, 0, 3072, 3073, 5, 173, 0, 0, 3073, 3074, 5, + 166, 0, 0, 3074, 3084, 5, 109, 0, 0, 3075, 3076, 5, 21, 0, 0, 3076, 3077, + 5, 173, 0, 0, 3077, 3078, 5, 166, 0, 0, 3078, 3084, 5, 109, 0, 0, 3079, + 3080, 5, 229, 0, 0, 3080, 3084, 7, 1, 0, 0, 3081, 3082, 5, 29, 0, 0, 3082, + 3084, 3, 156, 78, 0, 3083, 3064, 1, 0, 0, 0, 3083, 3067, 1, 0, 0, 0, 3083, + 3070, 1, 0, 0, 0, 3083, 3075, 1, 0, 0, 0, 3083, 3079, 1, 0, 0, 0, 3083, + 3081, 1, 0, 0, 0, 3084, 221, 1, 0, 0, 0, 3085, 3086, 5, 213, 0, 0, 3086, + 3185, 3, 130, 65, 0, 3087, 3088, 5, 234, 0, 0, 3088, 3089, 3, 248, 124, + 0, 3089, 3090, 5, 296, 0, 0, 3090, 3091, 3, 124, 62, 0, 3091, 3185, 1, + 0, 0, 0, 3092, 3093, 5, 23, 0, 0, 3093, 3095, 3, 124, 62, 0, 3094, 3096, + 3, 224, 112, 0, 3095, 3094, 1, 0, 0, 0, 3096, 3097, 1, 0, 0, 0, 3097, 3095, + 1, 0, 0, 0, 3097, 3098, 1, 0, 0, 0, 3098, 3100, 1, 0, 0, 0, 3099, 3101, + 3, 228, 114, 0, 3100, 3099, 1, 0, 0, 0, 3100, 3101, 1, 0, 0, 0, 3101, 3102, + 1, 0, 0, 0, 3102, 3103, 5, 71, 0, 0, 3103, 3104, 5, 23, 0, 0, 3104, 3185, + 1, 0, 0, 0, 3105, 3107, 5, 23, 0, 0, 3106, 3108, 3, 224, 112, 0, 3107, + 3106, 1, 0, 0, 0, 3108, 3109, 1, 0, 0, 0, 3109, 3107, 1, 0, 0, 0, 3109, + 3110, 1, 0, 0, 0, 3110, 3112, 1, 0, 0, 0, 3111, 3113, 3, 228, 114, 0, 3112, + 3111, 1, 0, 0, 0, 3112, 3113, 1, 0, 0, 0, 3113, 3114, 1, 0, 0, 0, 3114, + 3115, 5, 71, 0, 0, 3115, 3116, 5, 23, 0, 0, 3116, 3185, 1, 0, 0, 0, 3117, + 3118, 5, 102, 0, 0, 3118, 3119, 3, 124, 62, 0, 3119, 3120, 5, 249, 0, 0, + 3120, 3124, 3, 232, 116, 0, 3121, 3123, 3, 226, 113, 0, 3122, 3121, 1, + 0, 0, 0, 3123, 3126, 1, 0, 0, 0, 3124, 3122, 1, 0, 0, 0, 3124, 3125, 1, + 0, 0, 0, 3125, 3128, 1, 0, 0, 0, 3126, 3124, 1, 0, 0, 0, 3127, 3129, 3, + 228, 114, 0, 3128, 3127, 1, 0, 0, 0, 3128, 3129, 1, 0, 0, 0, 3129, 3130, + 1, 0, 0, 0, 3130, 3131, 5, 71, 0, 0, 3131, 3132, 5, 102, 0, 0, 3132, 3185, + 1, 0, 0, 0, 3133, 3134, 5, 118, 0, 0, 3134, 3185, 3, 248, 124, 0, 3135, + 3136, 5, 134, 0, 0, 3136, 3185, 3, 248, 124, 0, 3137, 3143, 5, 15, 0, 0, + 3138, 3139, 3, 230, 115, 0, 3139, 3140, 5, 309, 0, 0, 3140, 3142, 1, 0, + 0, 0, 3141, 3138, 1, 0, 0, 0, 3142, 3145, 1, 0, 0, 0, 3143, 3141, 1, 0, + 0, 0, 3143, 3144, 1, 0, 0, 0, 3144, 3147, 1, 0, 0, 0, 3145, 3143, 1, 0, + 0, 0, 3146, 3148, 3, 232, 116, 0, 3147, 3146, 1, 0, 0, 0, 3147, 3148, 1, + 0, 0, 0, 3148, 3149, 1, 0, 0, 0, 3149, 3185, 5, 71, 0, 0, 3150, 3151, 3, + 248, 124, 0, 3151, 3152, 5, 311, 0, 0, 3152, 3154, 1, 0, 0, 0, 3153, 3150, + 1, 0, 0, 0, 3153, 3154, 1, 0, 0, 0, 3154, 3155, 1, 0, 0, 0, 3155, 3156, + 5, 144, 0, 0, 3156, 3157, 3, 232, 116, 0, 3157, 3158, 5, 71, 0, 0, 3158, + 3159, 5, 144, 0, 0, 3159, 3185, 1, 0, 0, 0, 3160, 3161, 3, 248, 124, 0, + 3161, 3162, 5, 311, 0, 0, 3162, 3164, 1, 0, 0, 0, 3163, 3160, 1, 0, 0, + 0, 3163, 3164, 1, 0, 0, 0, 3164, 3165, 1, 0, 0, 0, 3165, 3166, 5, 286, + 0, 0, 3166, 3167, 3, 124, 62, 0, 3167, 3168, 5, 64, 0, 0, 3168, 3169, 3, + 232, 116, 0, 3169, 3170, 5, 71, 0, 0, 3170, 3171, 5, 286, 0, 0, 3171, 3185, + 1, 0, 0, 0, 3172, 3173, 3, 248, 124, 0, 3173, 3174, 5, 311, 0, 0, 3174, + 3176, 1, 0, 0, 0, 3175, 3172, 1, 0, 0, 0, 3175, 3176, 1, 0, 0, 0, 3176, + 3177, 1, 0, 0, 0, 3177, 3178, 5, 207, 0, 0, 3178, 3179, 3, 232, 116, 0, + 3179, 3180, 5, 270, 0, 0, 3180, 3181, 3, 124, 62, 0, 3181, 3182, 5, 71, + 0, 0, 3182, 3183, 5, 207, 0, 0, 3183, 3185, 1, 0, 0, 0, 3184, 3085, 1, + 0, 0, 0, 3184, 3087, 1, 0, 0, 0, 3184, 3092, 1, 0, 0, 0, 3184, 3105, 1, + 0, 0, 0, 3184, 3117, 1, 0, 0, 0, 3184, 3133, 1, 0, 0, 0, 3184, 3135, 1, + 0, 0, 0, 3184, 3137, 1, 0, 0, 0, 3184, 3153, 1, 0, 0, 0, 3184, 3163, 1, + 0, 0, 0, 3184, 3175, 1, 0, 0, 0, 3185, 223, 1, 0, 0, 0, 3186, 3187, 5, + 284, 0, 0, 3187, 3188, 3, 124, 62, 0, 3188, 3189, 5, 249, 0, 0, 3189, 3190, + 3, 232, 116, 0, 3190, 225, 1, 0, 0, 0, 3191, 3192, 5, 69, 0, 0, 3192, 3193, + 3, 124, 62, 0, 3193, 3194, 5, 249, 0, 0, 3194, 3195, 3, 232, 116, 0, 3195, + 227, 1, 0, 0, 0, 3196, 3197, 5, 67, 0, 0, 3197, 3198, 3, 232, 116, 0, 3198, + 229, 1, 0, 0, 0, 3199, 3200, 5, 52, 0, 0, 3200, 3205, 3, 248, 124, 0, 3201, + 3202, 5, 312, 0, 0, 3202, 3204, 3, 248, 124, 0, 3203, 3201, 1, 0, 0, 0, + 3204, 3207, 1, 0, 0, 0, 3205, 3203, 1, 0, 0, 0, 3205, 3206, 1, 0, 0, 0, + 3206, 3208, 1, 0, 0, 0, 3207, 3205, 1, 0, 0, 0, 3208, 3211, 3, 172, 86, + 0, 3209, 3210, 5, 53, 0, 0, 3210, 3212, 3, 130, 65, 0, 3211, 3209, 1, 0, + 0, 0, 3211, 3212, 1, 0, 0, 0, 3212, 231, 1, 0, 0, 0, 3213, 3214, 3, 222, + 111, 0, 3214, 3215, 5, 309, 0, 0, 3215, 3217, 1, 0, 0, 0, 3216, 3213, 1, + 0, 0, 0, 3217, 3218, 1, 0, 0, 0, 3218, 3216, 1, 0, 0, 0, 3218, 3219, 1, + 0, 0, 0, 3219, 233, 1, 0, 0, 0, 3220, 3221, 7, 34, 0, 0, 3221, 235, 1, + 0, 0, 0, 3222, 3227, 3, 248, 124, 0, 3223, 3224, 5, 310, 0, 0, 3224, 3226, + 3, 248, 124, 0, 3225, 3223, 1, 0, 0, 0, 3226, 3229, 1, 0, 0, 0, 3227, 3225, + 1, 0, 0, 0, 3227, 3228, 1, 0, 0, 0, 3228, 237, 1, 0, 0, 0, 3229, 3227, + 1, 0, 0, 0, 3230, 3231, 5, 86, 0, 0, 3231, 3232, 3, 240, 120, 0, 3232, + 3233, 5, 11, 0, 0, 3233, 3234, 5, 170, 0, 0, 3234, 3235, 3, 130, 65, 0, + 3235, 239, 1, 0, 0, 0, 3236, 3237, 7, 35, 0, 0, 3237, 241, 1, 0, 0, 0, + 3238, 3242, 3, 244, 122, 0, 3239, 3242, 5, 47, 0, 0, 3240, 3242, 5, 43, + 0, 0, 3241, 3238, 1, 0, 0, 0, 3241, 3239, 1, 0, 0, 0, 3241, 3240, 1, 0, + 0, 0, 3242, 243, 1, 0, 0, 0, 3243, 3249, 3, 248, 124, 0, 3244, 3245, 5, + 273, 0, 0, 3245, 3249, 3, 248, 124, 0, 3246, 3247, 5, 218, 0, 0, 3247, + 3249, 3, 248, 124, 0, 3248, 3243, 1, 0, 0, 0, 3248, 3244, 1, 0, 0, 0, 3248, + 3246, 1, 0, 0, 0, 3249, 245, 1, 0, 0, 0, 3250, 3255, 3, 248, 124, 0, 3251, + 3252, 5, 312, 0, 0, 3252, 3254, 3, 248, 124, 0, 3253, 3251, 1, 0, 0, 0, + 3254, 3257, 1, 0, 0, 0, 3255, 3253, 1, 0, 0, 0, 3255, 3256, 1, 0, 0, 0, + 3256, 247, 1, 0, 0, 0, 3257, 3255, 1, 0, 0, 0, 3258, 3264, 5, 333, 0, 0, + 3259, 3264, 5, 335, 0, 0, 3260, 3264, 3, 254, 127, 0, 3261, 3264, 5, 336, + 0, 0, 3262, 3264, 5, 334, 0, 0, 3263, 3258, 1, 0, 0, 0, 3263, 3259, 1, + 0, 0, 0, 3263, 3260, 1, 0, 0, 0, 3263, 3261, 1, 0, 0, 0, 3263, 3262, 1, + 0, 0, 0, 3264, 249, 1, 0, 0, 0, 3265, 3267, 5, 303, 0, 0, 3266, 3265, 1, + 0, 0, 0, 3266, 3267, 1, 0, 0, 0, 3267, 3268, 1, 0, 0, 0, 3268, 3278, 5, + 331, 0, 0, 3269, 3271, 5, 303, 0, 0, 3270, 3269, 1, 0, 0, 0, 3270, 3271, + 1, 0, 0, 0, 3271, 3272, 1, 0, 0, 0, 3272, 3278, 5, 332, 0, 0, 3273, 3275, + 5, 303, 0, 0, 3274, 3273, 1, 0, 0, 0, 3274, 3275, 1, 0, 0, 0, 3275, 3276, + 1, 0, 0, 0, 3276, 3278, 5, 330, 0, 0, 3277, 3266, 1, 0, 0, 0, 3277, 3270, + 1, 0, 0, 0, 3277, 3274, 1, 0, 0, 0, 3278, 251, 1, 0, 0, 0, 3279, 3282, + 3, 248, 124, 0, 3280, 3282, 3, 156, 78, 0, 3281, 3279, 1, 0, 0, 0, 3281, + 3280, 1, 0, 0, 0, 3282, 253, 1, 0, 0, 0, 3283, 3284, 7, 36, 0, 0, 3284, + 255, 1, 0, 0, 0, 434, 259, 270, 273, 306, 313, 317, 321, 327, 331, 338, + 343, 347, 353, 357, 376, 382, 386, 390, 394, 402, 406, 409, 414, 420, 429, + 435, 439, 445, 452, 461, 473, 482, 491, 497, 508, 516, 524, 531, 541, 548, + 556, 592, 595, 598, 602, 608, 613, 620, 626, 630, 634, 642, 648, 652, 666, + 674, 693, 718, 721, 728, 735, 744, 748, 755, 765, 771, 776, 780, 786, 795, + 801, 805, 812, 816, 824, 829, 833, 841, 849, 854, 858, 868, 875, 880, 884, + 894, 897, 906, 911, 917, 941, 947, 949, 955, 961, 963, 971, 973, 979, 985, + 987, 1002, 1007, 1014, 1024, 1030, 1032, 1040, 1042, 1067, 1070, 1074, + 1078, 1096, 1099, 1110, 1113, 1129, 1139, 1144, 1150, 1153, 1162, 1164, + 1167, 1177, 1181, 1187, 1194, 1199, 1205, 1209, 1213, 1219, 1230, 1239, + 1249, 1252, 1257, 1259, 1266, 1272, 1274, 1278, 1288, 1294, 1297, 1299, + 1311, 1318, 1322, 1326, 1330, 1337, 1346, 1349, 1353, 1358, 1362, 1370, + 1373, 1376, 1383, 1394, 1397, 1407, 1410, 1421, 1426, 1434, 1437, 1441, + 1450, 1459, 1462, 1471, 1474, 1477, 1481, 1492, 1499, 1502, 1505, 1528, + 1532, 1536, 1540, 1542, 1553, 1558, 1567, 1576, 1579, 1594, 1597, 1606, + 1609, 1617, 1620, 1623, 1628, 1631, 1643, 1646, 1654, 1659, 1663, 1665, + 1667, 1682, 1684, 1695, 1702, 1705, 1710, 1720, 1731, 1735, 1737, 1745, + 1752, 1765, 1771, 1787, 1796, 1799, 1807, 1810, 1817, 1822, 1833, 1836, + 1840, 1842, 1850, 1860, 1866, 1868, 1875, 1879, 1881, 1888, 1892, 1894, + 1896, 1905, 1916, 1920, 1930, 1940, 1944, 1952, 1954, 1967, 1975, 1984, + 1990, 1998, 2004, 2008, 2013, 2018, 2024, 2038, 2040, 2070, 2081, 2089, + 2094, 2099, 2112, 2118, 2121, 2128, 2133, 2136, 2139, 2144, 2151, 2154, + 2163, 2166, 2170, 2173, 2176, 2191, 2194, 2213, 2217, 2225, 2229, 2254, + 2257, 2266, 2272, 2278, 2284, 2293, 2296, 2299, 2318, 2327, 2349, 2352, + 2362, 2371, 2377, 2383, 2394, 2396, 2401, 2408, 2410, 2416, 2422, 2433, + 2442, 2447, 2452, 2454, 2456, 2462, 2464, 2474, 2483, 2485, 2491, 2493, + 2496, 2506, 2508, 2520, 2523, 2528, 2533, 2545, 2549, 2553, 2556, 2558, + 2564, 2567, 2577, 2585, 2591, 2593, 2601, 2611, 2617, 2631, 2640, 2647, + 2652, 2659, 2669, 2674, 2681, 2707, 2712, 2714, 2721, 2725, 2732, 2736, + 2753, 2768, 2775, 2784, 2794, 2799, 2808, 2813, 2821, 2829, 2832, 2838, + 2841, 2848, 2856, 2859, 2867, 2870, 2896, 2907, 2912, 2919, 2921, 2934, + 2949, 2953, 2957, 2961, 2967, 2971, 2975, 2979, 2981, 2991, 2998, 3007, + 3014, 3021, 3028, 3037, 3049, 3052, 3057, 3067, 3083, 3097, 3100, 3109, + 3112, 3124, 3128, 3143, 3147, 3153, 3163, 3175, 3184, 3205, 3211, 3218, + 3227, 3241, 3248, 3255, 3263, 3266, 3270, 3274, 3277, 3281, + } + deserializer := antlr.NewATNDeserializer(nil) + staticData.atn = deserializer.Deserialize(staticData.serializedATN) + atn := staticData.atn + staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) + decisionToDFA := staticData.decisionToDFA + for index, state := range atn.DecisionToState { + decisionToDFA[index] = antlr.NewDFA(state, index) + } +} + +// TrinoParserInit initializes any static state used to implement TrinoParser. By default the +// static state used to implement the parser is lazily initialized during the first call to +// NewTrinoParser(). You can call this function if you wish to initialize the static state ahead +// of time. +func TrinoParserInit() { + staticData := &TrinoParserParserStaticData + staticData.once.Do(trinoparserParserInit) +} + +// NewTrinoParser produces a new parser instance for the optional input antlr.TokenStream. +func NewTrinoParser(input antlr.TokenStream) *TrinoParser { + TrinoParserInit() + this := new(TrinoParser) + this.BaseParser = antlr.NewBaseParser(input) + staticData := &TrinoParserParserStaticData + this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) + this.RuleNames = staticData.RuleNames + this.LiteralNames = staticData.LiteralNames + this.SymbolicNames = staticData.SymbolicNames + this.GrammarFileName = "TrinoParser.g4" + + return this +} + +// TrinoParser tokens. +const ( + TrinoParserEOF = antlr.TokenEOF + TrinoParserABSENT_ = 1 + TrinoParserADD_ = 2 + TrinoParserADMIN_ = 3 + TrinoParserAFTER_ = 4 + TrinoParserALL_ = 5 + TrinoParserALTER_ = 6 + TrinoParserANALYZE_ = 7 + TrinoParserAND_ = 8 + TrinoParserANY_ = 9 + TrinoParserARRAY_ = 10 + TrinoParserAS_ = 11 + TrinoParserASC_ = 12 + TrinoParserAT_ = 13 + TrinoParserAUTHORIZATION_ = 14 + TrinoParserBEGIN_ = 15 + TrinoParserBERNOULLI_ = 16 + TrinoParserBETWEEN_ = 17 + TrinoParserBOTH_ = 18 + TrinoParserBY_ = 19 + TrinoParserCALL_ = 20 + TrinoParserCALLED_ = 21 + TrinoParserCASCADE_ = 22 + TrinoParserCASE_ = 23 + TrinoParserCAST_ = 24 + TrinoParserCATALOG_ = 25 + TrinoParserCATALOGS_ = 26 + TrinoParserCOLUMN_ = 27 + TrinoParserCOLUMNS_ = 28 + TrinoParserCOMMENT_ = 29 + TrinoParserCOMMIT_ = 30 + TrinoParserCOMMITTED_ = 31 + TrinoParserCONDITIONAL_ = 32 + TrinoParserCONSTRAINT_ = 33 + TrinoParserCOUNT_ = 34 + TrinoParserCOPARTITION_ = 35 + TrinoParserCREATE_ = 36 + TrinoParserCROSS_ = 37 + TrinoParserCUBE_ = 38 + TrinoParserCURRENT_ = 39 + TrinoParserCURRENT_CATALOG_ = 40 + TrinoParserCURRENT_DATE_ = 41 + TrinoParserCURRENT_PATH_ = 42 + TrinoParserCURRENT_ROLE_ = 43 + TrinoParserCURRENT_SCHEMA_ = 44 + TrinoParserCURRENT_TIME_ = 45 + TrinoParserCURRENT_TIMESTAMP_ = 46 + TrinoParserCURRENT_USER_ = 47 + TrinoParserDATA_ = 48 + TrinoParserDATE_ = 49 + TrinoParserDAY_ = 50 + TrinoParserDEALLOCATE_ = 51 + TrinoParserDECLARE_ = 52 + TrinoParserDEFAULT_ = 53 + TrinoParserDEFINE_ = 54 + TrinoParserDEFINER_ = 55 + TrinoParserDELETE_ = 56 + TrinoParserDENY_ = 57 + TrinoParserDESC_ = 58 + TrinoParserDESCRIBE_ = 59 + TrinoParserDESCRIPTOR_ = 60 + TrinoParserDETERMINISTIC_ = 61 + TrinoParserDISTINCT_ = 62 + TrinoParserDISTRIBUTED_ = 63 + TrinoParserDO_ = 64 + TrinoParserDOUBLE_ = 65 + TrinoParserDROP_ = 66 + TrinoParserELSE_ = 67 + TrinoParserEMPTY_ = 68 + TrinoParserELSEIF_ = 69 + TrinoParserENCODING_ = 70 + TrinoParserEND_ = 71 + TrinoParserERROR_ = 72 + TrinoParserESCAPE_ = 73 + TrinoParserEXCEPT_ = 74 + TrinoParserEXCLUDING_ = 75 + TrinoParserEXECUTE_ = 76 + TrinoParserEXISTS_ = 77 + TrinoParserEXPLAIN_ = 78 + TrinoParserEXTRACT_ = 79 + TrinoParserFALSE_ = 80 + TrinoParserFETCH_ = 81 + TrinoParserFILTER_ = 82 + TrinoParserFINAL_ = 83 + TrinoParserFIRST_ = 84 + TrinoParserFOLLOWING_ = 85 + TrinoParserFOR_ = 86 + TrinoParserFORMAT_ = 87 + TrinoParserFROM_ = 88 + TrinoParserFULL_ = 89 + TrinoParserFUNCTION_ = 90 + TrinoParserFUNCTIONS_ = 91 + TrinoParserGRACE_ = 92 + TrinoParserGRANT_ = 93 + TrinoParserGRANTED_ = 94 + TrinoParserGRANTS_ = 95 + TrinoParserGRAPHVIZ_ = 96 + TrinoParserGROUP_ = 97 + TrinoParserGROUPING_ = 98 + TrinoParserGROUPS_ = 99 + TrinoParserHAVING_ = 100 + TrinoParserHOUR_ = 101 + TrinoParserIF_ = 102 + TrinoParserIGNORE_ = 103 + TrinoParserIMMEDIATE_ = 104 + TrinoParserIN_ = 105 + TrinoParserINCLUDING_ = 106 + TrinoParserINITIAL_ = 107 + TrinoParserINNER_ = 108 + TrinoParserINPUT_ = 109 + TrinoParserINSERT_ = 110 + TrinoParserINTERSECT_ = 111 + TrinoParserINTERVAL_ = 112 + TrinoParserINTO_ = 113 + TrinoParserINVOKER_ = 114 + TrinoParserIO_ = 115 + TrinoParserIS_ = 116 + TrinoParserISOLATION_ = 117 + TrinoParserITERATE_ = 118 + TrinoParserJOIN_ = 119 + TrinoParserJSON_ = 120 + TrinoParserJSON_ARRAY_ = 121 + TrinoParserJSON_EXISTS_ = 122 + TrinoParserJSON_OBJECT_ = 123 + TrinoParserJSON_QUERY_ = 124 + TrinoParserJSON_TABLE_ = 125 + TrinoParserJSON_VALUE_ = 126 + TrinoParserKEEP_ = 127 + TrinoParserKEY_ = 128 + TrinoParserKEYS_ = 129 + TrinoParserLANGUAGE_ = 130 + TrinoParserLAST_ = 131 + TrinoParserLATERAL_ = 132 + TrinoParserLEADING_ = 133 + TrinoParserLEAVE_ = 134 + TrinoParserLEFT_ = 135 + TrinoParserLEVEL_ = 136 + TrinoParserLIKE_ = 137 + TrinoParserLIMIT_ = 138 + TrinoParserLISTAGG_ = 139 + TrinoParserLOCAL_ = 140 + TrinoParserLOCALTIME_ = 141 + TrinoParserLOCALTIMESTAMP_ = 142 + TrinoParserLOGICAL_ = 143 + TrinoParserLOOP_ = 144 + TrinoParserMAP_ = 145 + TrinoParserMATCH_ = 146 + TrinoParserMATCHED_ = 147 + TrinoParserMATCHES_ = 148 + TrinoParserMATCH_RECOGNIZE_ = 149 + TrinoParserMATERIALIZED_ = 150 + TrinoParserMEASURES_ = 151 + TrinoParserMERGE_ = 152 + TrinoParserMINUTE_ = 153 + TrinoParserMONTH_ = 154 + TrinoParserNATURAL_ = 155 + TrinoParserNESTED_ = 156 + TrinoParserNEXT_ = 157 + TrinoParserNFC_ = 158 + TrinoParserNFD_ = 159 + TrinoParserNFKC_ = 160 + TrinoParserNFKD_ = 161 + TrinoParserNO_ = 162 + TrinoParserNONE_ = 163 + TrinoParserNORMALIZE_ = 164 + TrinoParserNOT_ = 165 + TrinoParserNULL_ = 166 + TrinoParserNULLIF_ = 167 + TrinoParserNULLS_ = 168 + TrinoParserOBJECT_ = 169 + TrinoParserOF_ = 170 + TrinoParserOFFSET_ = 171 + TrinoParserOMIT_ = 172 + TrinoParserON_ = 173 + TrinoParserONE_ = 174 + TrinoParserONLY_ = 175 + TrinoParserOPTION_ = 176 + TrinoParserOR_ = 177 + TrinoParserORDER_ = 178 + TrinoParserORDINALITY_ = 179 + TrinoParserOUTER_ = 180 + TrinoParserOUTPUT_ = 181 + TrinoParserOVER_ = 182 + TrinoParserOVERFLOW_ = 183 + TrinoParserPARTITION_ = 184 + TrinoParserPARTITIONS_ = 185 + TrinoParserPASSING_ = 186 + TrinoParserPAST_ = 187 + TrinoParserPATH_ = 188 + TrinoParserPATTERN_ = 189 + TrinoParserPER_ = 190 + TrinoParserPERIOD_ = 191 + TrinoParserPERMUTE_ = 192 + TrinoParserPLAN_ = 193 + TrinoParserPOSITION_ = 194 + TrinoParserPRECEDING_ = 195 + TrinoParserPRECISION_ = 196 + TrinoParserPREPARE_ = 197 + TrinoParserPRIVILEGES_ = 198 + TrinoParserPROPERTIES_ = 199 + TrinoParserPRUNE_ = 200 + TrinoParserQUOTES_ = 201 + TrinoParserRANGE_ = 202 + TrinoParserREAD_ = 203 + TrinoParserRECURSIVE_ = 204 + TrinoParserREFRESH_ = 205 + TrinoParserRENAME_ = 206 + TrinoParserREPEAT_ = 207 + TrinoParserREPEATABLE_ = 208 + TrinoParserREPLACE_ = 209 + TrinoParserRESET_ = 210 + TrinoParserRESPECT_ = 211 + TrinoParserRESTRICT_ = 212 + TrinoParserRETURN_ = 213 + TrinoParserRETURNING_ = 214 + TrinoParserRETURNS_ = 215 + TrinoParserREVOKE_ = 216 + TrinoParserRIGHT_ = 217 + TrinoParserROLE_ = 218 + TrinoParserROLES_ = 219 + TrinoParserROLLBACK_ = 220 + TrinoParserROLLUP_ = 221 + TrinoParserROW_ = 222 + TrinoParserROWS_ = 223 + TrinoParserRUNNING_ = 224 + TrinoParserSCALAR_ = 225 + TrinoParserSCHEMA_ = 226 + TrinoParserSCHEMAS_ = 227 + TrinoParserSECOND_ = 228 + TrinoParserSECURITY_ = 229 + TrinoParserSEEK_ = 230 + TrinoParserSELECT_ = 231 + TrinoParserSERIALIZABLE_ = 232 + TrinoParserSESSION_ = 233 + TrinoParserSET_ = 234 + TrinoParserSETS_ = 235 + TrinoParserSHOW_ = 236 + TrinoParserSKIP_ = 237 + TrinoParserSOME_ = 238 + TrinoParserSTART_ = 239 + TrinoParserSTATS_ = 240 + TrinoParserSUBSET_ = 241 + TrinoParserSUBSTRING_ = 242 + TrinoParserSYSTEM_ = 243 + TrinoParserTABLE_ = 244 + TrinoParserTABLES_ = 245 + TrinoParserTABLESAMPLE_ = 246 + TrinoParserTEXT_ = 247 + TrinoParserTEXT_STRING_ = 248 + TrinoParserTHEN_ = 249 + TrinoParserTIES_ = 250 + TrinoParserTIME_ = 251 + TrinoParserTIMESTAMP_ = 252 + TrinoParserTO_ = 253 + TrinoParserTRAILING_ = 254 + TrinoParserTRANSACTION_ = 255 + TrinoParserTRIM_ = 256 + TrinoParserTRUE_ = 257 + TrinoParserTRUNCATE_ = 258 + TrinoParserTRY_CAST_ = 259 + TrinoParserTYPE_ = 260 + TrinoParserUESCAPE_ = 261 + TrinoParserUNBOUNDED_ = 262 + TrinoParserUNCOMMITTED_ = 263 + TrinoParserUNCONDITIONAL_ = 264 + TrinoParserUNION_ = 265 + TrinoParserUNIQUE_ = 266 + TrinoParserUNKNOWN_ = 267 + TrinoParserUNMATCHED_ = 268 + TrinoParserUNNEST_ = 269 + TrinoParserUNTIL_ = 270 + TrinoParserUPDATE_ = 271 + TrinoParserUSE_ = 272 + TrinoParserUSER_ = 273 + TrinoParserUSING_ = 274 + TrinoParserUTF16_ = 275 + TrinoParserUTF32_ = 276 + TrinoParserUTF8_ = 277 + TrinoParserVALIDATE_ = 278 + TrinoParserVALUE_ = 279 + TrinoParserVALUES_ = 280 + TrinoParserVERBOSE_ = 281 + TrinoParserVERSION_ = 282 + TrinoParserVIEW_ = 283 + TrinoParserWHEN_ = 284 + TrinoParserWHERE_ = 285 + TrinoParserWHILE_ = 286 + TrinoParserWINDOW_ = 287 + TrinoParserWITH_ = 288 + TrinoParserWITHIN_ = 289 + TrinoParserWITHOUT_ = 290 + TrinoParserWORK_ = 291 + TrinoParserWRAPPER_ = 292 + TrinoParserWRITE_ = 293 + TrinoParserYEAR_ = 294 + TrinoParserZONE_ = 295 + TrinoParserEQ_ = 296 + TrinoParserNEQ_ = 297 + TrinoParserLT_ = 298 + TrinoParserLTE_ = 299 + TrinoParserGT_ = 300 + TrinoParserGTE_ = 301 + TrinoParserPLUS_ = 302 + TrinoParserMINUS_ = 303 + TrinoParserASTERISK_ = 304 + TrinoParserSLASH_ = 305 + TrinoParserPERCENT_ = 306 + TrinoParserCONCAT_ = 307 + TrinoParserQUESTION_MARK_ = 308 + TrinoParserSEMICOLON_ = 309 + TrinoParserDOT_ = 310 + TrinoParserCOLON_ = 311 + TrinoParserCOMMA_ = 312 + TrinoParserLPAREN_ = 313 + TrinoParserRPAREN_ = 314 + TrinoParserLSQUARE_ = 315 + TrinoParserRSQUARE_ = 316 + TrinoParserLCURLY_ = 317 + TrinoParserRCURLY_ = 318 + TrinoParserLCURLYHYPHEN_ = 319 + TrinoParserRCURLYHYPHEN_ = 320 + TrinoParserLARROW_ = 321 + TrinoParserRARROW_ = 322 + TrinoParserRDOUBLEARROW_ = 323 + TrinoParserVBAR_ = 324 + TrinoParserDOLLAR_ = 325 + TrinoParserCARET_ = 326 + TrinoParserSTRING_ = 327 + TrinoParserUNICODE_STRING_ = 328 + TrinoParserBINARY_LITERAL_ = 329 + TrinoParserINTEGER_VALUE_ = 330 + TrinoParserDECIMAL_VALUE_ = 331 + TrinoParserDOUBLE_VALUE_ = 332 + TrinoParserIDENTIFIER_ = 333 + TrinoParserDIGIT_IDENTIFIER_ = 334 + TrinoParserQUOTED_IDENTIFIER_ = 335 + TrinoParserBACKQUOTED_IDENTIFIER_ = 336 + TrinoParserSIMPLE_COMMENT_ = 337 + TrinoParserBRACKETED_COMMENT_ = 338 + TrinoParserWS_ = 339 + TrinoParserUNRECOGNIZED_ = 340 +) + +// TrinoParser rules. +const ( + TrinoParserRULE_parse = 0 + TrinoParserRULE_statements = 1 + TrinoParserRULE_singleStatement = 2 + TrinoParserRULE_standaloneExpression = 3 + TrinoParserRULE_standalonePathSpecification = 4 + TrinoParserRULE_standaloneType = 5 + TrinoParserRULE_standaloneRowPattern = 6 + TrinoParserRULE_standaloneFunctionSpecification = 7 + TrinoParserRULE_statement = 8 + TrinoParserRULE_rootQuery = 9 + TrinoParserRULE_withFunction = 10 + TrinoParserRULE_query = 11 + TrinoParserRULE_with = 12 + TrinoParserRULE_tableElement = 13 + TrinoParserRULE_columnDefinition = 14 + TrinoParserRULE_likeClause = 15 + TrinoParserRULE_properties = 16 + TrinoParserRULE_propertyAssignments = 17 + TrinoParserRULE_property = 18 + TrinoParserRULE_propertyValue = 19 + TrinoParserRULE_queryNoWith = 20 + TrinoParserRULE_limitRowCount = 21 + TrinoParserRULE_rowCount = 22 + TrinoParserRULE_queryTerm = 23 + TrinoParserRULE_queryPrimary = 24 + TrinoParserRULE_sortItem = 25 + TrinoParserRULE_querySpecification = 26 + TrinoParserRULE_groupBy = 27 + TrinoParserRULE_groupingElement = 28 + TrinoParserRULE_groupingSet = 29 + TrinoParserRULE_windowDefinition = 30 + TrinoParserRULE_windowSpecification = 31 + TrinoParserRULE_namedQuery = 32 + TrinoParserRULE_setQuantifier = 33 + TrinoParserRULE_selectItem = 34 + TrinoParserRULE_as_column_alias = 35 + TrinoParserRULE_column_alias = 36 + TrinoParserRULE_relation = 37 + TrinoParserRULE_joinType = 38 + TrinoParserRULE_joinCriteria = 39 + TrinoParserRULE_sampledRelation = 40 + TrinoParserRULE_sampleType = 41 + TrinoParserRULE_trimsSpecification = 42 + TrinoParserRULE_listAggOverflowBehavior = 43 + TrinoParserRULE_listaggCountIndication = 44 + TrinoParserRULE_patternRecognition = 45 + TrinoParserRULE_measureDefinition = 46 + TrinoParserRULE_rowsPerMatch = 47 + TrinoParserRULE_emptyMatchHandling = 48 + TrinoParserRULE_skipTo = 49 + TrinoParserRULE_subsetDefinition = 50 + TrinoParserRULE_variableDefinition = 51 + TrinoParserRULE_aliasedRelation = 52 + TrinoParserRULE_columnAliases = 53 + TrinoParserRULE_relationPrimary = 54 + TrinoParserRULE_tableFunctionCall = 55 + TrinoParserRULE_tableFunctionArgument = 56 + TrinoParserRULE_tableArgument = 57 + TrinoParserRULE_tableArgumentRelation = 58 + TrinoParserRULE_descriptorArgument = 59 + TrinoParserRULE_descriptorField = 60 + TrinoParserRULE_copartitionTables = 61 + TrinoParserRULE_expression = 62 + TrinoParserRULE_booleanExpression = 63 + TrinoParserRULE_predicate_ = 64 + TrinoParserRULE_valueExpression = 65 + TrinoParserRULE_primaryExpression = 66 + TrinoParserRULE_jsonPathInvocation = 67 + TrinoParserRULE_jsonValueExpression = 68 + TrinoParserRULE_jsonRepresentation = 69 + TrinoParserRULE_jsonArgument = 70 + TrinoParserRULE_jsonExistsErrorBehavior = 71 + TrinoParserRULE_jsonValueBehavior = 72 + TrinoParserRULE_jsonQueryWrapperBehavior = 73 + TrinoParserRULE_jsonQueryBehavior = 74 + TrinoParserRULE_jsonObjectMember = 75 + TrinoParserRULE_processingMode = 76 + TrinoParserRULE_nullTreatment = 77 + TrinoParserRULE_string_ = 78 + TrinoParserRULE_timeZoneSpecifier = 79 + TrinoParserRULE_comparisonOperator = 80 + TrinoParserRULE_comparisonQuantifier = 81 + TrinoParserRULE_booleanValue = 82 + TrinoParserRULE_interval = 83 + TrinoParserRULE_intervalField = 84 + TrinoParserRULE_normalForm = 85 + TrinoParserRULE_type = 86 + TrinoParserRULE_rowField = 87 + TrinoParserRULE_typeParameter = 88 + TrinoParserRULE_whenClause = 89 + TrinoParserRULE_filter = 90 + TrinoParserRULE_mergeCase = 91 + TrinoParserRULE_over = 92 + TrinoParserRULE_windowFrame = 93 + TrinoParserRULE_frameExtent = 94 + TrinoParserRULE_frameBound = 95 + TrinoParserRULE_rowPattern = 96 + TrinoParserRULE_patternPrimary = 97 + TrinoParserRULE_patternQuantifier = 98 + TrinoParserRULE_updateAssignment = 99 + TrinoParserRULE_explainOption = 100 + TrinoParserRULE_transactionMode = 101 + TrinoParserRULE_levelOfIsolation = 102 + TrinoParserRULE_callArgument = 103 + TrinoParserRULE_pathElement = 104 + TrinoParserRULE_pathSpecification = 105 + TrinoParserRULE_functionSpecification = 106 + TrinoParserRULE_functionDeclaration = 107 + TrinoParserRULE_parameterDeclaration = 108 + TrinoParserRULE_returnsClause = 109 + TrinoParserRULE_routineCharacteristic = 110 + TrinoParserRULE_controlStatement = 111 + TrinoParserRULE_caseStatementWhenClause = 112 + TrinoParserRULE_elseIfClause = 113 + TrinoParserRULE_elseClause = 114 + TrinoParserRULE_variableDeclaration = 115 + TrinoParserRULE_sqlStatementList = 116 + TrinoParserRULE_privilege = 117 + TrinoParserRULE_qualifiedName = 118 + TrinoParserRULE_queryPeriod = 119 + TrinoParserRULE_rangeType = 120 + TrinoParserRULE_grantor = 121 + TrinoParserRULE_principal = 122 + TrinoParserRULE_roles = 123 + TrinoParserRULE_identifier = 124 + TrinoParserRULE_number = 125 + TrinoParserRULE_authorizationUser = 126 + TrinoParserRULE_nonReserved = 127 +) + +// IParseContext is an interface to support dynamic dispatch. +type IParseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + EOF() antlr.TerminalNode + AllStatements() []IStatementsContext + Statements(i int) IStatementsContext + + // IsParseContext differentiates from other interfaces. + IsParseContext() +} + +type ParseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyParseContext() *ParseContext { + var p = new(ParseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_parse + return p +} + +func InitEmptyParseContext(p *ParseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_parse +} + +func (*ParseContext) IsParseContext() {} + +func NewParseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParseContext { + var p = new(ParseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_parse + + return p +} + +func (s *ParseContext) GetParser() antlr.Parser { return s.parser } + +func (s *ParseContext) EOF() antlr.TerminalNode { + return s.GetToken(TrinoParserEOF, 0) +} + +func (s *ParseContext) AllStatements() []IStatementsContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IStatementsContext); ok { + len++ + } + } + + tst := make([]IStatementsContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IStatementsContext); ok { + tst[i] = t.(IStatementsContext) + i++ + } + } + + return tst +} + +func (s *ParseContext) Statements(i int) IStatementsContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStatementsContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IStatementsContext) +} + +func (s *ParseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ParseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ParseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterParse(s) + } +} + +func (s *ParseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitParse(s) + } +} + +func (s *ParseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitParse(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Parse() (localctx IParseContext) { + localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 0, TrinoParserRULE_parse) + var _la int + + p.EnterOuterAlt(localctx, 1) + p.SetState(259) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-4611695235427862786) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347098961875043977) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-144150373018374145) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&-9074541044212965921) != 0) || ((int64((_la-325)) & ^0x3f) == 0 && ((int64(1)<<(_la-325))&4095) != 0) { + { + p.SetState(256) + p.Statements() + } + + p.SetState(261) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(262) + p.Match(TrinoParserEOF) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IStatementsContext is an interface to support dynamic dispatch. +type IStatementsContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + SingleStatement() ISingleStatementContext + StandaloneExpression() IStandaloneExpressionContext + StandalonePathSpecification() IStandalonePathSpecificationContext + StandaloneType() IStandaloneTypeContext + StandaloneRowPattern() IStandaloneRowPatternContext + SEMICOLON_() antlr.TerminalNode + StandaloneFunctionSpecification() IStandaloneFunctionSpecificationContext + + // IsStatementsContext differentiates from other interfaces. + IsStatementsContext() +} + +type StatementsContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStatementsContext() *StatementsContext { + var p = new(StatementsContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_statements + return p +} + +func InitEmptyStatementsContext(p *StatementsContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_statements +} + +func (*StatementsContext) IsStatementsContext() {} + +func NewStatementsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StatementsContext { + var p = new(StatementsContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_statements + + return p +} + +func (s *StatementsContext) GetParser() antlr.Parser { return s.parser } + +func (s *StatementsContext) SingleStatement() ISingleStatementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISingleStatementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISingleStatementContext) +} + +func (s *StatementsContext) StandaloneExpression() IStandaloneExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStandaloneExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStandaloneExpressionContext) +} + +func (s *StatementsContext) StandalonePathSpecification() IStandalonePathSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStandalonePathSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStandalonePathSpecificationContext) +} + +func (s *StatementsContext) StandaloneType() IStandaloneTypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStandaloneTypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStandaloneTypeContext) +} + +func (s *StatementsContext) StandaloneRowPattern() IStandaloneRowPatternContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStandaloneRowPatternContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStandaloneRowPatternContext) +} + +func (s *StatementsContext) SEMICOLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, 0) +} + +func (s *StatementsContext) StandaloneFunctionSpecification() IStandaloneFunctionSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStandaloneFunctionSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStandaloneFunctionSpecificationContext) +} + +func (s *StatementsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StatementsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StatementsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStatements(s) + } +} + +func (s *StatementsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStatements(s) + } +} + +func (s *StatementsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStatements(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Statements() (localctx IStatementsContext) { + localctx = NewStatementsContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 2, TrinoParserRULE_statements) + var _la int + + p.SetState(273) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 2, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(264) + p.SingleStatement() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(265) + p.StandaloneExpression() + } + + case 3: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(266) + p.StandalonePathSpecification() + } + + case 4: + p.EnterOuterAlt(localctx, 4) + { + p.SetState(267) + p.StandaloneType() + } + + case 5: + p.EnterOuterAlt(localctx, 5) + { + p.SetState(268) + p.StandaloneRowPattern() + } + p.SetState(270) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserSEMICOLON_ { + { + p.SetState(269) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case 6: + p.EnterOuterAlt(localctx, 6) + { + p.SetState(272) + p.StandaloneFunctionSpecification() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISingleStatementContext is an interface to support dynamic dispatch. +type ISingleStatementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Statement() IStatementContext + SEMICOLON_() antlr.TerminalNode + + // IsSingleStatementContext differentiates from other interfaces. + IsSingleStatementContext() +} + +type SingleStatementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySingleStatementContext() *SingleStatementContext { + var p = new(SingleStatementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_singleStatement + return p +} + +func InitEmptySingleStatementContext(p *SingleStatementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_singleStatement +} + +func (*SingleStatementContext) IsSingleStatementContext() {} + +func NewSingleStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SingleStatementContext { + var p = new(SingleStatementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_singleStatement + + return p +} + +func (s *SingleStatementContext) GetParser() antlr.Parser { return s.parser } + +func (s *SingleStatementContext) Statement() IStatementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStatementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStatementContext) +} + +func (s *SingleStatementContext) SEMICOLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, 0) +} + +func (s *SingleStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SingleStatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SingleStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSingleStatement(s) + } +} + +func (s *SingleStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSingleStatement(s) + } +} + +func (s *SingleStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSingleStatement(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SingleStatement() (localctx ISingleStatementContext) { + localctx = NewSingleStatementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 4, TrinoParserRULE_singleStatement) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(275) + p.Statement() + } + { + p.SetState(276) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IStandaloneExpressionContext is an interface to support dynamic dispatch. +type IStandaloneExpressionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Expression() IExpressionContext + SEMICOLON_() antlr.TerminalNode + + // IsStandaloneExpressionContext differentiates from other interfaces. + IsStandaloneExpressionContext() +} + +type StandaloneExpressionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStandaloneExpressionContext() *StandaloneExpressionContext { + var p = new(StandaloneExpressionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneExpression + return p +} + +func InitEmptyStandaloneExpressionContext(p *StandaloneExpressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneExpression +} + +func (*StandaloneExpressionContext) IsStandaloneExpressionContext() {} + +func NewStandaloneExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StandaloneExpressionContext { + var p = new(StandaloneExpressionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_standaloneExpression + + return p +} + +func (s *StandaloneExpressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *StandaloneExpressionContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *StandaloneExpressionContext) SEMICOLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, 0) +} + +func (s *StandaloneExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StandaloneExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StandaloneExpressionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStandaloneExpression(s) + } +} + +func (s *StandaloneExpressionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStandaloneExpression(s) + } +} + +func (s *StandaloneExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStandaloneExpression(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) StandaloneExpression() (localctx IStandaloneExpressionContext) { + localctx = NewStandaloneExpressionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 6, TrinoParserRULE_standaloneExpression) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(278) + p.Expression() + } + { + p.SetState(279) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IStandalonePathSpecificationContext is an interface to support dynamic dispatch. +type IStandalonePathSpecificationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + PathSpecification() IPathSpecificationContext + SEMICOLON_() antlr.TerminalNode + + // IsStandalonePathSpecificationContext differentiates from other interfaces. + IsStandalonePathSpecificationContext() +} + +type StandalonePathSpecificationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStandalonePathSpecificationContext() *StandalonePathSpecificationContext { + var p = new(StandalonePathSpecificationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standalonePathSpecification + return p +} + +func InitEmptyStandalonePathSpecificationContext(p *StandalonePathSpecificationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standalonePathSpecification +} + +func (*StandalonePathSpecificationContext) IsStandalonePathSpecificationContext() {} + +func NewStandalonePathSpecificationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StandalonePathSpecificationContext { + var p = new(StandalonePathSpecificationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_standalonePathSpecification + + return p +} + +func (s *StandalonePathSpecificationContext) GetParser() antlr.Parser { return s.parser } + +func (s *StandalonePathSpecificationContext) PathSpecification() IPathSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPathSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPathSpecificationContext) +} + +func (s *StandalonePathSpecificationContext) SEMICOLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, 0) +} + +func (s *StandalonePathSpecificationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StandalonePathSpecificationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StandalonePathSpecificationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStandalonePathSpecification(s) + } +} + +func (s *StandalonePathSpecificationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStandalonePathSpecification(s) + } +} + +func (s *StandalonePathSpecificationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStandalonePathSpecification(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) StandalonePathSpecification() (localctx IStandalonePathSpecificationContext) { + localctx = NewStandalonePathSpecificationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 8, TrinoParserRULE_standalonePathSpecification) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(281) + p.PathSpecification() + } + { + p.SetState(282) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IStandaloneTypeContext is an interface to support dynamic dispatch. +type IStandaloneTypeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Type_() ITypeContext + SEMICOLON_() antlr.TerminalNode + + // IsStandaloneTypeContext differentiates from other interfaces. + IsStandaloneTypeContext() +} + +type StandaloneTypeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStandaloneTypeContext() *StandaloneTypeContext { + var p = new(StandaloneTypeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneType + return p +} + +func InitEmptyStandaloneTypeContext(p *StandaloneTypeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneType +} + +func (*StandaloneTypeContext) IsStandaloneTypeContext() {} + +func NewStandaloneTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StandaloneTypeContext { + var p = new(StandaloneTypeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_standaloneType + + return p +} + +func (s *StandaloneTypeContext) GetParser() antlr.Parser { return s.parser } + +func (s *StandaloneTypeContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *StandaloneTypeContext) SEMICOLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, 0) +} + +func (s *StandaloneTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StandaloneTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StandaloneTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStandaloneType(s) + } +} + +func (s *StandaloneTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStandaloneType(s) + } +} + +func (s *StandaloneTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStandaloneType(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) StandaloneType() (localctx IStandaloneTypeContext) { + localctx = NewStandaloneTypeContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 10, TrinoParserRULE_standaloneType) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(284) + p.type_(0) + } + { + p.SetState(285) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IStandaloneRowPatternContext is an interface to support dynamic dispatch. +type IStandaloneRowPatternContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + RowPattern() IRowPatternContext + SEMICOLON_() antlr.TerminalNode + + // IsStandaloneRowPatternContext differentiates from other interfaces. + IsStandaloneRowPatternContext() +} + +type StandaloneRowPatternContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStandaloneRowPatternContext() *StandaloneRowPatternContext { + var p = new(StandaloneRowPatternContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneRowPattern + return p +} + +func InitEmptyStandaloneRowPatternContext(p *StandaloneRowPatternContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneRowPattern +} + +func (*StandaloneRowPatternContext) IsStandaloneRowPatternContext() {} + +func NewStandaloneRowPatternContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StandaloneRowPatternContext { + var p = new(StandaloneRowPatternContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_standaloneRowPattern + + return p +} + +func (s *StandaloneRowPatternContext) GetParser() antlr.Parser { return s.parser } + +func (s *StandaloneRowPatternContext) RowPattern() IRowPatternContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *StandaloneRowPatternContext) SEMICOLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, 0) +} + +func (s *StandaloneRowPatternContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StandaloneRowPatternContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StandaloneRowPatternContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStandaloneRowPattern(s) + } +} + +func (s *StandaloneRowPatternContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStandaloneRowPattern(s) + } +} + +func (s *StandaloneRowPatternContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStandaloneRowPattern(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) StandaloneRowPattern() (localctx IStandaloneRowPatternContext) { + localctx = NewStandaloneRowPatternContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 12, TrinoParserRULE_standaloneRowPattern) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(287) + p.rowPattern(0) + } + { + p.SetState(288) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IStandaloneFunctionSpecificationContext is an interface to support dynamic dispatch. +type IStandaloneFunctionSpecificationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + FunctionSpecification() IFunctionSpecificationContext + SEMICOLON_() antlr.TerminalNode + + // IsStandaloneFunctionSpecificationContext differentiates from other interfaces. + IsStandaloneFunctionSpecificationContext() +} + +type StandaloneFunctionSpecificationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStandaloneFunctionSpecificationContext() *StandaloneFunctionSpecificationContext { + var p = new(StandaloneFunctionSpecificationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneFunctionSpecification + return p +} + +func InitEmptyStandaloneFunctionSpecificationContext(p *StandaloneFunctionSpecificationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_standaloneFunctionSpecification +} + +func (*StandaloneFunctionSpecificationContext) IsStandaloneFunctionSpecificationContext() {} + +func NewStandaloneFunctionSpecificationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StandaloneFunctionSpecificationContext { + var p = new(StandaloneFunctionSpecificationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_standaloneFunctionSpecification + + return p +} + +func (s *StandaloneFunctionSpecificationContext) GetParser() antlr.Parser { return s.parser } + +func (s *StandaloneFunctionSpecificationContext) FunctionSpecification() IFunctionSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFunctionSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFunctionSpecificationContext) +} + +func (s *StandaloneFunctionSpecificationContext) SEMICOLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, 0) +} + +func (s *StandaloneFunctionSpecificationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StandaloneFunctionSpecificationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *StandaloneFunctionSpecificationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStandaloneFunctionSpecification(s) + } +} + +func (s *StandaloneFunctionSpecificationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStandaloneFunctionSpecification(s) + } +} + +func (s *StandaloneFunctionSpecificationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStandaloneFunctionSpecification(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) StandaloneFunctionSpecification() (localctx IStandaloneFunctionSpecificationContext) { + localctx = NewStandaloneFunctionSpecificationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 14, TrinoParserRULE_standaloneFunctionSpecification) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(290) + p.FunctionSpecification() + } + { + p.SetState(291) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IStatementContext is an interface to support dynamic dispatch. +type IStatementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsStatementContext differentiates from other interfaces. + IsStatementContext() +} + +type StatementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyStatementContext() *StatementContext { + var p = new(StatementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_statement + return p +} + +func InitEmptyStatementContext(p *StatementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_statement +} + +func (*StatementContext) IsStatementContext() {} + +func NewStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StatementContext { + var p = new(StatementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_statement + + return p +} + +func (s *StatementContext) GetParser() antlr.Parser { return s.parser } + +func (s *StatementContext) CopyAll(ctx *StatementContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *StatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type ExplainContext struct { + StatementContext +} + +func NewExplainContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExplainContext { + var p = new(ExplainContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ExplainContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExplainContext) EXPLAIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXPLAIN_, 0) +} + +func (s *ExplainContext) Statement() IStatementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStatementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStatementContext) +} + +func (s *ExplainContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *ExplainContext) AllExplainOption() []IExplainOptionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExplainOptionContext); ok { + len++ + } + } + + tst := make([]IExplainOptionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExplainOptionContext); ok { + tst[i] = t.(IExplainOptionContext) + i++ + } + } + + return tst +} + +func (s *ExplainContext) ExplainOption(i int) IExplainOptionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExplainOptionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExplainOptionContext) +} + +func (s *ExplainContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *ExplainContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *ExplainContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *ExplainContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExplain(s) + } +} + +func (s *ExplainContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExplain(s) + } +} + +func (s *ExplainContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExplain(s) + + default: + return t.VisitChildren(s) + } +} + +type PrepareContext struct { + StatementContext +} + +func NewPrepareContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PrepareContext { + var p = new(PrepareContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *PrepareContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PrepareContext) PREPARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserPREPARE_, 0) +} + +func (s *PrepareContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *PrepareContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *PrepareContext) Statement() IStatementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStatementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStatementContext) +} + +func (s *PrepareContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPrepare(s) + } +} + +func (s *PrepareContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPrepare(s) + } +} + +func (s *PrepareContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPrepare(s) + + default: + return t.VisitChildren(s) + } +} + +type DropMaterializedViewContext struct { + StatementContext +} + +func NewDropMaterializedViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropMaterializedViewContext { + var p = new(DropMaterializedViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropMaterializedViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropMaterializedViewContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropMaterializedViewContext) MATERIALIZED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATERIALIZED_, 0) +} + +func (s *DropMaterializedViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *DropMaterializedViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *DropMaterializedViewContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *DropMaterializedViewContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *DropMaterializedViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropMaterializedView(s) + } +} + +func (s *DropMaterializedViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropMaterializedView(s) + } +} + +func (s *DropMaterializedViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropMaterializedView(s) + + default: + return t.VisitChildren(s) + } +} + +type SetMaterializedViewPropertiesContext struct { + StatementContext +} + +func NewSetMaterializedViewPropertiesContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetMaterializedViewPropertiesContext { + var p = new(SetMaterializedViewPropertiesContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetMaterializedViewPropertiesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetMaterializedViewPropertiesContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *SetMaterializedViewPropertiesContext) MATERIALIZED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATERIALIZED_, 0) +} + +func (s *SetMaterializedViewPropertiesContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *SetMaterializedViewPropertiesContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *SetMaterializedViewPropertiesContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetMaterializedViewPropertiesContext) PROPERTIES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPROPERTIES_, 0) +} + +func (s *SetMaterializedViewPropertiesContext) PropertyAssignments() IPropertyAssignmentsContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertyAssignmentsContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertyAssignmentsContext) +} + +func (s *SetMaterializedViewPropertiesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetMaterializedViewProperties(s) + } +} + +func (s *SetMaterializedViewPropertiesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetMaterializedViewProperties(s) + } +} + +func (s *SetMaterializedViewPropertiesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetMaterializedViewProperties(s) + + default: + return t.VisitChildren(s) + } +} + +type UseContext struct { + StatementContext + schema IIdentifierContext + catalog IIdentifierContext +} + +func NewUseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UseContext { + var p = new(UseContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *UseContext) GetSchema() IIdentifierContext { return s.schema } + +func (s *UseContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *UseContext) SetSchema(v IIdentifierContext) { s.schema = v } + +func (s *UseContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *UseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UseContext) USE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSE_, 0) +} + +func (s *UseContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *UseContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *UseContext) DOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOT_, 0) +} + +func (s *UseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUse(s) + } +} + +func (s *UseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUse(s) + } +} + +func (s *UseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUse(s) + + default: + return t.VisitChildren(s) + } +} + +type DeallocateContext struct { + StatementContext +} + +func NewDeallocateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DeallocateContext { + var p = new(DeallocateContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DeallocateContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DeallocateContext) DEALLOCATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEALLOCATE_, 0) +} + +func (s *DeallocateContext) PREPARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserPREPARE_, 0) +} + +func (s *DeallocateContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *DeallocateContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDeallocate(s) + } +} + +func (s *DeallocateContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDeallocate(s) + } +} + +func (s *DeallocateContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDeallocate(s) + + default: + return t.VisitChildren(s) + } +} + +type RenameTableContext struct { + StatementContext + from IQualifiedNameContext + to IQualifiedNameContext +} + +func NewRenameTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RenameTableContext { + var p = new(RenameTableContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RenameTableContext) GetFrom() IQualifiedNameContext { return s.from } + +func (s *RenameTableContext) GetTo() IQualifiedNameContext { return s.to } + +func (s *RenameTableContext) SetFrom(v IQualifiedNameContext) { s.from = v } + +func (s *RenameTableContext) SetTo(v IQualifiedNameContext) { s.to = v } + +func (s *RenameTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RenameTableContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *RenameTableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *RenameTableContext) RENAME_() antlr.TerminalNode { + return s.GetToken(TrinoParserRENAME_, 0) +} + +func (s *RenameTableContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *RenameTableContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *RenameTableContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *RenameTableContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *RenameTableContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *RenameTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRenameTable(s) + } +} + +func (s *RenameTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRenameTable(s) + } +} + +func (s *RenameTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRenameTable(s) + + default: + return t.VisitChildren(s) + } +} + +type CommitContext struct { + StatementContext +} + +func NewCommitContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CommitContext { + var p = new(CommitContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CommitContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CommitContext) COMMIT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMIT_, 0) +} + +func (s *CommitContext) WORK_() antlr.TerminalNode { + return s.GetToken(TrinoParserWORK_, 0) +} + +func (s *CommitContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCommit(s) + } +} + +func (s *CommitContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCommit(s) + } +} + +func (s *CommitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCommit(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateRoleContext struct { + StatementContext + name IIdentifierContext + catalog IIdentifierContext +} + +func NewCreateRoleContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateRoleContext { + var p = new(CreateRoleContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateRoleContext) GetName() IIdentifierContext { return s.name } + +func (s *CreateRoleContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *CreateRoleContext) SetName(v IIdentifierContext) { s.name = v } + +func (s *CreateRoleContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *CreateRoleContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateRoleContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateRoleContext) ROLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLE_, 0) +} + +func (s *CreateRoleContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *CreateRoleContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *CreateRoleContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *CreateRoleContext) ADMIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserADMIN_, 0) +} + +func (s *CreateRoleContext) Grantor() IGrantorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IGrantorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IGrantorContext) +} + +func (s *CreateRoleContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *CreateRoleContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateRole(s) + } +} + +func (s *CreateRoleContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateRole(s) + } +} + +func (s *CreateRoleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateRole(s) + + default: + return t.VisitChildren(s) + } +} + +type DropColumnContext struct { + StatementContext + tableName IQualifiedNameContext + column IQualifiedNameContext +} + +func NewDropColumnContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropColumnContext { + var p = new(DropColumnContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropColumnContext) GetTableName() IQualifiedNameContext { return s.tableName } + +func (s *DropColumnContext) GetColumn() IQualifiedNameContext { return s.column } + +func (s *DropColumnContext) SetTableName(v IQualifiedNameContext) { s.tableName = v } + +func (s *DropColumnContext) SetColumn(v IQualifiedNameContext) { s.column = v } + +func (s *DropColumnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropColumnContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *DropColumnContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *DropColumnContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropColumnContext) COLUMN_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMN_, 0) +} + +func (s *DropColumnContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *DropColumnContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *DropColumnContext) AllIF_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserIF_) +} + +func (s *DropColumnContext) IF_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, i) +} + +func (s *DropColumnContext) AllEXISTS_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserEXISTS_) +} + +func (s *DropColumnContext) EXISTS_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, i) +} + +func (s *DropColumnContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropColumn(s) + } +} + +func (s *DropColumnContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropColumn(s) + } +} + +func (s *DropColumnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropColumn(s) + + default: + return t.VisitChildren(s) + } +} + +type DropViewContext struct { + StatementContext +} + +func NewDropViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropViewContext { + var p = new(DropViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropViewContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *DropViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *DropViewContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *DropViewContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *DropViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropView(s) + } +} + +func (s *DropViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropView(s) + } +} + +func (s *DropViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropView(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowTablesContext struct { + StatementContext + pattern IString_Context + escape IString_Context +} + +func NewShowTablesContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowTablesContext { + var p = new(ShowTablesContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowTablesContext) GetPattern() IString_Context { return s.pattern } + +func (s *ShowTablesContext) GetEscape() IString_Context { return s.escape } + +func (s *ShowTablesContext) SetPattern(v IString_Context) { s.pattern = v } + +func (s *ShowTablesContext) SetEscape(v IString_Context) { s.escape = v } + +func (s *ShowTablesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowTablesContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowTablesContext) TABLES_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLES_, 0) +} + +func (s *ShowTablesContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowTablesContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *ShowTablesContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *ShowTablesContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *ShowTablesContext) AllString_() []IString_Context { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IString_Context); ok { + len++ + } + } + + tst := make([]IString_Context, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IString_Context); ok { + tst[i] = t.(IString_Context) + i++ + } + } + + return tst +} + +func (s *ShowTablesContext) String_(i int) IString_Context { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ShowTablesContext) ESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserESCAPE_, 0) +} + +func (s *ShowTablesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowTables(s) + } +} + +func (s *ShowTablesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowTables(s) + } +} + +func (s *ShowTablesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowTables(s) + + default: + return t.VisitChildren(s) + } +} + +type SetViewAuthorizationContext struct { + StatementContext + from IQualifiedNameContext +} + +func NewSetViewAuthorizationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetViewAuthorizationContext { + var p = new(SetViewAuthorizationContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetViewAuthorizationContext) GetFrom() IQualifiedNameContext { return s.from } + +func (s *SetViewAuthorizationContext) SetFrom(v IQualifiedNameContext) { s.from = v } + +func (s *SetViewAuthorizationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetViewAuthorizationContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *SetViewAuthorizationContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *SetViewAuthorizationContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetViewAuthorizationContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *SetViewAuthorizationContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *SetViewAuthorizationContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *SetViewAuthorizationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetViewAuthorization(s) + } +} + +func (s *SetViewAuthorizationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetViewAuthorization(s) + } +} + +func (s *SetViewAuthorizationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetViewAuthorization(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowCatalogsContext struct { + StatementContext + pattern IString_Context + escape IString_Context +} + +func NewShowCatalogsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowCatalogsContext { + var p = new(ShowCatalogsContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowCatalogsContext) GetPattern() IString_Context { return s.pattern } + +func (s *ShowCatalogsContext) GetEscape() IString_Context { return s.escape } + +func (s *ShowCatalogsContext) SetPattern(v IString_Context) { s.pattern = v } + +func (s *ShowCatalogsContext) SetEscape(v IString_Context) { s.escape = v } + +func (s *ShowCatalogsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowCatalogsContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowCatalogsContext) CATALOGS_() antlr.TerminalNode { + return s.GetToken(TrinoParserCATALOGS_, 0) +} + +func (s *ShowCatalogsContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *ShowCatalogsContext) AllString_() []IString_Context { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IString_Context); ok { + len++ + } + } + + tst := make([]IString_Context, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IString_Context); ok { + tst[i] = t.(IString_Context) + i++ + } + } + + return tst +} + +func (s *ShowCatalogsContext) String_(i int) IString_Context { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ShowCatalogsContext) ESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserESCAPE_, 0) +} + +func (s *ShowCatalogsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowCatalogs(s) + } +} + +func (s *ShowCatalogsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowCatalogs(s) + } +} + +func (s *ShowCatalogsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowCatalogs(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowRolesContext struct { + StatementContext +} + +func NewShowRolesContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowRolesContext { + var p = new(ShowRolesContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowRolesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowRolesContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowRolesContext) ROLES_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLES_, 0) +} + +func (s *ShowRolesContext) CURRENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_, 0) +} + +func (s *ShowRolesContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ShowRolesContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *ShowRolesContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *ShowRolesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowRoles(s) + } +} + +func (s *ShowRolesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowRoles(s) + } +} + +func (s *ShowRolesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowRoles(s) + + default: + return t.VisitChildren(s) + } +} + +type MergeContext struct { + StatementContext +} + +func NewMergeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MergeContext { + var p = new(MergeContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *MergeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MergeContext) MERGE_() antlr.TerminalNode { + return s.GetToken(TrinoParserMERGE_, 0) +} + +func (s *MergeContext) INTO_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTO_, 0) +} + +func (s *MergeContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *MergeContext) USING_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSING_, 0) +} + +func (s *MergeContext) Relation() IRelationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRelationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRelationContext) +} + +func (s *MergeContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *MergeContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *MergeContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *MergeContext) AllMergeCase() []IMergeCaseContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IMergeCaseContext); ok { + len++ + } + } + + tst := make([]IMergeCaseContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IMergeCaseContext); ok { + tst[i] = t.(IMergeCaseContext) + i++ + } + } + + return tst +} + +func (s *MergeContext) MergeCase(i int) IMergeCaseContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IMergeCaseContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IMergeCaseContext) +} + +func (s *MergeContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *MergeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterMerge(s) + } +} + +func (s *MergeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitMerge(s) + } +} + +func (s *MergeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitMerge(s) + + default: + return t.VisitChildren(s) + } +} + +type RenameColumnContext struct { + StatementContext + tableName IQualifiedNameContext + from IQualifiedNameContext + to IIdentifierContext +} + +func NewRenameColumnContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RenameColumnContext { + var p = new(RenameColumnContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RenameColumnContext) GetTableName() IQualifiedNameContext { return s.tableName } + +func (s *RenameColumnContext) GetFrom() IQualifiedNameContext { return s.from } + +func (s *RenameColumnContext) GetTo() IIdentifierContext { return s.to } + +func (s *RenameColumnContext) SetTableName(v IQualifiedNameContext) { s.tableName = v } + +func (s *RenameColumnContext) SetFrom(v IQualifiedNameContext) { s.from = v } + +func (s *RenameColumnContext) SetTo(v IIdentifierContext) { s.to = v } + +func (s *RenameColumnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RenameColumnContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *RenameColumnContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *RenameColumnContext) RENAME_() antlr.TerminalNode { + return s.GetToken(TrinoParserRENAME_, 0) +} + +func (s *RenameColumnContext) COLUMN_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMN_, 0) +} + +func (s *RenameColumnContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *RenameColumnContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *RenameColumnContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *RenameColumnContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *RenameColumnContext) AllIF_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserIF_) +} + +func (s *RenameColumnContext) IF_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, i) +} + +func (s *RenameColumnContext) AllEXISTS_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserEXISTS_) +} + +func (s *RenameColumnContext) EXISTS_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, i) +} + +func (s *RenameColumnContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRenameColumn(s) + } +} + +func (s *RenameColumnContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRenameColumn(s) + } +} + +func (s *RenameColumnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRenameColumn(s) + + default: + return t.VisitChildren(s) + } +} + +type CommentColumnContext struct { + StatementContext +} + +func NewCommentColumnContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CommentColumnContext { + var p = new(CommentColumnContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CommentColumnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CommentColumnContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CommentColumnContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *CommentColumnContext) COLUMN_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMN_, 0) +} + +func (s *CommentColumnContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CommentColumnContext) IS_() antlr.TerminalNode { + return s.GetToken(TrinoParserIS_, 0) +} + +func (s *CommentColumnContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CommentColumnContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *CommentColumnContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCommentColumn(s) + } +} + +func (s *CommentColumnContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCommentColumn(s) + } +} + +func (s *CommentColumnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCommentColumn(s) + + default: + return t.VisitChildren(s) + } +} + +type RevokeRolesContext struct { + StatementContext + catalog IIdentifierContext +} + +func NewRevokeRolesContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RevokeRolesContext { + var p = new(RevokeRolesContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RevokeRolesContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *RevokeRolesContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *RevokeRolesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RevokeRolesContext) REVOKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREVOKE_, 0) +} + +func (s *RevokeRolesContext) Roles() IRolesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRolesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRolesContext) +} + +func (s *RevokeRolesContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *RevokeRolesContext) AllPrincipal() []IPrincipalContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IPrincipalContext); ok { + len++ + } + } + + tst := make([]IPrincipalContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IPrincipalContext); ok { + tst[i] = t.(IPrincipalContext) + i++ + } + } + + return tst +} + +func (s *RevokeRolesContext) Principal(i int) IPrincipalContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *RevokeRolesContext) ADMIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserADMIN_, 0) +} + +func (s *RevokeRolesContext) OPTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserOPTION_, 0) +} + +func (s *RevokeRolesContext) FOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOR_, 0) +} + +func (s *RevokeRolesContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *RevokeRolesContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *RevokeRolesContext) GRANTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANTED_, 0) +} + +func (s *RevokeRolesContext) BY_() antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, 0) +} + +func (s *RevokeRolesContext) Grantor() IGrantorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IGrantorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IGrantorContext) +} + +func (s *RevokeRolesContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *RevokeRolesContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *RevokeRolesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRevokeRoles(s) + } +} + +func (s *RevokeRolesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRevokeRoles(s) + } +} + +func (s *RevokeRolesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRevokeRoles(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowCreateTableContext struct { + StatementContext +} + +func NewShowCreateTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowCreateTableContext { + var p = new(ShowCreateTableContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowCreateTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowCreateTableContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowCreateTableContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *ShowCreateTableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *ShowCreateTableContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowCreateTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowCreateTable(s) + } +} + +func (s *ShowCreateTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowCreateTable(s) + } +} + +func (s *ShowCreateTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowCreateTable(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowColumnsContext struct { + StatementContext + pattern IString_Context + escape IString_Context +} + +func NewShowColumnsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowColumnsContext { + var p = new(ShowColumnsContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowColumnsContext) GetPattern() IString_Context { return s.pattern } + +func (s *ShowColumnsContext) GetEscape() IString_Context { return s.escape } + +func (s *ShowColumnsContext) SetPattern(v IString_Context) { s.pattern = v } + +func (s *ShowColumnsContext) SetEscape(v IString_Context) { s.escape = v } + +func (s *ShowColumnsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowColumnsContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowColumnsContext) COLUMNS_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMNS_, 0) +} + +func (s *ShowColumnsContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *ShowColumnsContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *ShowColumnsContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowColumnsContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *ShowColumnsContext) AllString_() []IString_Context { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IString_Context); ok { + len++ + } + } + + tst := make([]IString_Context, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IString_Context); ok { + tst[i] = t.(IString_Context) + i++ + } + } + + return tst +} + +func (s *ShowColumnsContext) String_(i int) IString_Context { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ShowColumnsContext) ESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserESCAPE_, 0) +} + +func (s *ShowColumnsContext) DESCRIBE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESCRIBE_, 0) +} + +func (s *ShowColumnsContext) DESC_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESC_, 0) +} + +func (s *ShowColumnsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowColumns(s) + } +} + +func (s *ShowColumnsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowColumns(s) + } +} + +func (s *ShowColumnsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowColumns(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowRoleGrantsContext struct { + StatementContext +} + +func NewShowRoleGrantsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowRoleGrantsContext { + var p = new(ShowRoleGrantsContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowRoleGrantsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowRoleGrantsContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowRoleGrantsContext) ROLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLE_, 0) +} + +func (s *ShowRoleGrantsContext) GRANTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANTS_, 0) +} + +func (s *ShowRoleGrantsContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ShowRoleGrantsContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *ShowRoleGrantsContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *ShowRoleGrantsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowRoleGrants(s) + } +} + +func (s *ShowRoleGrantsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowRoleGrants(s) + } +} + +func (s *ShowRoleGrantsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowRoleGrants(s) + + default: + return t.VisitChildren(s) + } +} + +type AddColumnContext struct { + StatementContext + tableName IQualifiedNameContext + column IColumnDefinitionContext +} + +func NewAddColumnContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AddColumnContext { + var p = new(AddColumnContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *AddColumnContext) GetTableName() IQualifiedNameContext { return s.tableName } + +func (s *AddColumnContext) GetColumn() IColumnDefinitionContext { return s.column } + +func (s *AddColumnContext) SetTableName(v IQualifiedNameContext) { s.tableName = v } + +func (s *AddColumnContext) SetColumn(v IColumnDefinitionContext) { s.column = v } + +func (s *AddColumnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *AddColumnContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *AddColumnContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *AddColumnContext) ADD_() antlr.TerminalNode { + return s.GetToken(TrinoParserADD_, 0) +} + +func (s *AddColumnContext) COLUMN_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMN_, 0) +} + +func (s *AddColumnContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *AddColumnContext) ColumnDefinition() IColumnDefinitionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnDefinitionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnDefinitionContext) +} + +func (s *AddColumnContext) AllIF_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserIF_) +} + +func (s *AddColumnContext) IF_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, i) +} + +func (s *AddColumnContext) AllEXISTS_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserEXISTS_) +} + +func (s *AddColumnContext) EXISTS_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, i) +} + +func (s *AddColumnContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *AddColumnContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterAddColumn(s) + } +} + +func (s *AddColumnContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitAddColumn(s) + } +} + +func (s *AddColumnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitAddColumn(s) + + default: + return t.VisitChildren(s) + } +} + +type DenyContext struct { + StatementContext + grantee IPrincipalContext +} + +func NewDenyContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DenyContext { + var p = new(DenyContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DenyContext) GetGrantee() IPrincipalContext { return s.grantee } + +func (s *DenyContext) SetGrantee(v IPrincipalContext) { s.grantee = v } + +func (s *DenyContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DenyContext) DENY_() antlr.TerminalNode { + return s.GetToken(TrinoParserDENY_, 0) +} + +func (s *DenyContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *DenyContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *DenyContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *DenyContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *DenyContext) AllPrivilege() []IPrivilegeContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IPrivilegeContext); ok { + len++ + } + } + + tst := make([]IPrivilegeContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IPrivilegeContext); ok { + tst[i] = t.(IPrivilegeContext) + i++ + } + } + + return tst +} + +func (s *DenyContext) Privilege(i int) IPrivilegeContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrivilegeContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IPrivilegeContext) +} + +func (s *DenyContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *DenyContext) PRIVILEGES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRIVILEGES_, 0) +} + +func (s *DenyContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *DenyContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *DenyContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *DenyContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *DenyContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDeny(s) + } +} + +func (s *DenyContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDeny(s) + } +} + +func (s *DenyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDeny(s) + + default: + return t.VisitChildren(s) + } +} + +type ResetSessionContext struct { + StatementContext +} + +func NewResetSessionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ResetSessionContext { + var p = new(ResetSessionContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ResetSessionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ResetSessionContext) RESET_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESET_, 0) +} + +func (s *ResetSessionContext) SESSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserSESSION_, 0) +} + +func (s *ResetSessionContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ResetSessionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterResetSession(s) + } +} + +func (s *ResetSessionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitResetSession(s) + } +} + +func (s *ResetSessionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitResetSession(s) + + default: + return t.VisitChildren(s) + } +} + +type InsertIntoContext struct { + StatementContext +} + +func NewInsertIntoContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *InsertIntoContext { + var p = new(InsertIntoContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *InsertIntoContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *InsertIntoContext) INSERT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINSERT_, 0) +} + +func (s *InsertIntoContext) INTO_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTO_, 0) +} + +func (s *InsertIntoContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *InsertIntoContext) RootQuery() IRootQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRootQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRootQueryContext) +} + +func (s *InsertIntoContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *InsertIntoContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterInsertInto(s) + } +} + +func (s *InsertIntoContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitInsertInto(s) + } +} + +func (s *InsertIntoContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitInsertInto(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowSessionContext struct { + StatementContext + pattern IString_Context + escape IString_Context +} + +func NewShowSessionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowSessionContext { + var p = new(ShowSessionContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowSessionContext) GetPattern() IString_Context { return s.pattern } + +func (s *ShowSessionContext) GetEscape() IString_Context { return s.escape } + +func (s *ShowSessionContext) SetPattern(v IString_Context) { s.pattern = v } + +func (s *ShowSessionContext) SetEscape(v IString_Context) { s.escape = v } + +func (s *ShowSessionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowSessionContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowSessionContext) SESSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserSESSION_, 0) +} + +func (s *ShowSessionContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *ShowSessionContext) AllString_() []IString_Context { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IString_Context); ok { + len++ + } + } + + tst := make([]IString_Context, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IString_Context); ok { + tst[i] = t.(IString_Context) + i++ + } + } + + return tst +} + +func (s *ShowSessionContext) String_(i int) IString_Context { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ShowSessionContext) ESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserESCAPE_, 0) +} + +func (s *ShowSessionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowSession(s) + } +} + +func (s *ShowSessionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowSession(s) + } +} + +func (s *ShowSessionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowSession(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateSchemaContext struct { + StatementContext +} + +func NewCreateSchemaContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateSchemaContext { + var p = new(CreateSchemaContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateSchemaContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateSchemaContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateSchemaContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *CreateSchemaContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CreateSchemaContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *CreateSchemaContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *CreateSchemaContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *CreateSchemaContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *CreateSchemaContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *CreateSchemaContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *CreateSchemaContext) Properties() IPropertiesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertiesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertiesContext) +} + +func (s *CreateSchemaContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateSchema(s) + } +} + +func (s *CreateSchemaContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateSchema(s) + } +} + +func (s *CreateSchemaContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateSchema(s) + + default: + return t.VisitChildren(s) + } +} + +type SetSessionAuthorizationContext struct { + StatementContext +} + +func NewSetSessionAuthorizationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetSessionAuthorizationContext { + var p = new(SetSessionAuthorizationContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetSessionAuthorizationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetSessionAuthorizationContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetSessionAuthorizationContext) SESSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserSESSION_, 0) +} + +func (s *SetSessionAuthorizationContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *SetSessionAuthorizationContext) AuthorizationUser() IAuthorizationUserContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IAuthorizationUserContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IAuthorizationUserContext) +} + +func (s *SetSessionAuthorizationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetSessionAuthorization(s) + } +} + +func (s *SetSessionAuthorizationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetSessionAuthorization(s) + } +} + +func (s *SetSessionAuthorizationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetSessionAuthorization(s) + + default: + return t.VisitChildren(s) + } +} + +type ExplainAnalyzeContext struct { + StatementContext +} + +func NewExplainAnalyzeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExplainAnalyzeContext { + var p = new(ExplainAnalyzeContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ExplainAnalyzeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExplainAnalyzeContext) EXPLAIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXPLAIN_, 0) +} + +func (s *ExplainAnalyzeContext) ANALYZE_() antlr.TerminalNode { + return s.GetToken(TrinoParserANALYZE_, 0) +} + +func (s *ExplainAnalyzeContext) Statement() IStatementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IStatementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IStatementContext) +} + +func (s *ExplainAnalyzeContext) VERBOSE_() antlr.TerminalNode { + return s.GetToken(TrinoParserVERBOSE_, 0) +} + +func (s *ExplainAnalyzeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExplainAnalyze(s) + } +} + +func (s *ExplainAnalyzeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExplainAnalyze(s) + } +} + +func (s *ExplainAnalyzeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExplainAnalyze(s) + + default: + return t.VisitChildren(s) + } +} + +type ExecuteContext struct { + StatementContext +} + +func NewExecuteContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExecuteContext { + var p = new(ExecuteContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ExecuteContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExecuteContext) EXECUTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXECUTE_, 0) +} + +func (s *ExecuteContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ExecuteContext) USING_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSING_, 0) +} + +func (s *ExecuteContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *ExecuteContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *ExecuteContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *ExecuteContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *ExecuteContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExecute(s) + } +} + +func (s *ExecuteContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExecute(s) + } +} + +func (s *ExecuteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExecute(s) + + default: + return t.VisitChildren(s) + } +} + +type RenameSchemaContext struct { + StatementContext +} + +func NewRenameSchemaContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RenameSchemaContext { + var p = new(RenameSchemaContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RenameSchemaContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RenameSchemaContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *RenameSchemaContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *RenameSchemaContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *RenameSchemaContext) RENAME_() antlr.TerminalNode { + return s.GetToken(TrinoParserRENAME_, 0) +} + +func (s *RenameSchemaContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *RenameSchemaContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *RenameSchemaContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRenameSchema(s) + } +} + +func (s *RenameSchemaContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRenameSchema(s) + } +} + +func (s *RenameSchemaContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRenameSchema(s) + + default: + return t.VisitChildren(s) + } +} + +type DropRoleContext struct { + StatementContext + name IIdentifierContext + catalog IIdentifierContext +} + +func NewDropRoleContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropRoleContext { + var p = new(DropRoleContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropRoleContext) GetName() IIdentifierContext { return s.name } + +func (s *DropRoleContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *DropRoleContext) SetName(v IIdentifierContext) { s.name = v } + +func (s *DropRoleContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *DropRoleContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropRoleContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropRoleContext) ROLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLE_, 0) +} + +func (s *DropRoleContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *DropRoleContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *DropRoleContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *DropRoleContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropRole(s) + } +} + +func (s *DropRoleContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropRole(s) + } +} + +func (s *DropRoleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropRole(s) + + default: + return t.VisitChildren(s) + } +} + +type AnalyzeContext struct { + StatementContext +} + +func NewAnalyzeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AnalyzeContext { + var p = new(AnalyzeContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *AnalyzeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *AnalyzeContext) ANALYZE_() antlr.TerminalNode { + return s.GetToken(TrinoParserANALYZE_, 0) +} + +func (s *AnalyzeContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *AnalyzeContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *AnalyzeContext) Properties() IPropertiesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertiesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertiesContext) +} + +func (s *AnalyzeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterAnalyze(s) + } +} + +func (s *AnalyzeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitAnalyze(s) + } +} + +func (s *AnalyzeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitAnalyze(s) + + default: + return t.VisitChildren(s) + } +} + +type SetRoleContext struct { + StatementContext + role IIdentifierContext + catalog IIdentifierContext +} + +func NewSetRoleContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetRoleContext { + var p = new(SetRoleContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetRoleContext) GetRole() IIdentifierContext { return s.role } + +func (s *SetRoleContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *SetRoleContext) SetRole(v IIdentifierContext) { s.role = v } + +func (s *SetRoleContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *SetRoleContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetRoleContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetRoleContext) ROLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLE_, 0) +} + +func (s *SetRoleContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *SetRoleContext) NONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserNONE_, 0) +} + +func (s *SetRoleContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *SetRoleContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *SetRoleContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *SetRoleContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetRole(s) + } +} + +func (s *SetRoleContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetRole(s) + } +} + +func (s *SetRoleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetRole(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateFunctionContext struct { + StatementContext +} + +func NewCreateFunctionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateFunctionContext { + var p = new(CreateFunctionContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateFunctionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateFunctionContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateFunctionContext) FunctionSpecification() IFunctionSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFunctionSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFunctionSpecificationContext) +} + +func (s *CreateFunctionContext) OR_() antlr.TerminalNode { + return s.GetToken(TrinoParserOR_, 0) +} + +func (s *CreateFunctionContext) REPLACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPLACE_, 0) +} + +func (s *CreateFunctionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateFunction(s) + } +} + +func (s *CreateFunctionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateFunction(s) + } +} + +func (s *CreateFunctionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateFunction(s) + + default: + return t.VisitChildren(s) + } +} + +type DropCatalogContext struct { + StatementContext + catalog IIdentifierContext +} + +func NewDropCatalogContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropCatalogContext { + var p = new(DropCatalogContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropCatalogContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *DropCatalogContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *DropCatalogContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropCatalogContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropCatalogContext) CATALOG_() antlr.TerminalNode { + return s.GetToken(TrinoParserCATALOG_, 0) +} + +func (s *DropCatalogContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *DropCatalogContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *DropCatalogContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *DropCatalogContext) CASCADE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCASCADE_, 0) +} + +func (s *DropCatalogContext) RESTRICT_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESTRICT_, 0) +} + +func (s *DropCatalogContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropCatalog(s) + } +} + +func (s *DropCatalogContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropCatalog(s) + } +} + +func (s *DropCatalogContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropCatalog(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowGrantsContext struct { + StatementContext +} + +func NewShowGrantsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowGrantsContext { + var p = new(ShowGrantsContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowGrantsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowGrantsContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowGrantsContext) GRANTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANTS_, 0) +} + +func (s *ShowGrantsContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *ShowGrantsContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowGrantsContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *ShowGrantsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowGrants(s) + } +} + +func (s *ShowGrantsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowGrants(s) + } +} + +func (s *ShowGrantsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowGrants(s) + + default: + return t.VisitChildren(s) + } +} + +type DropSchemaContext struct { + StatementContext +} + +func NewDropSchemaContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropSchemaContext { + var p = new(DropSchemaContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropSchemaContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropSchemaContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropSchemaContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *DropSchemaContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *DropSchemaContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *DropSchemaContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *DropSchemaContext) CASCADE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCASCADE_, 0) +} + +func (s *DropSchemaContext) RESTRICT_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESTRICT_, 0) +} + +func (s *DropSchemaContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropSchema(s) + } +} + +func (s *DropSchemaContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropSchema(s) + } +} + +func (s *DropSchemaContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropSchema(s) + + default: + return t.VisitChildren(s) + } +} + +type ResetSessionAuthorizationContext struct { + StatementContext +} + +func NewResetSessionAuthorizationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ResetSessionAuthorizationContext { + var p = new(ResetSessionAuthorizationContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ResetSessionAuthorizationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ResetSessionAuthorizationContext) RESET_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESET_, 0) +} + +func (s *ResetSessionAuthorizationContext) SESSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserSESSION_, 0) +} + +func (s *ResetSessionAuthorizationContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *ResetSessionAuthorizationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterResetSessionAuthorization(s) + } +} + +func (s *ResetSessionAuthorizationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitResetSessionAuthorization(s) + } +} + +func (s *ResetSessionAuthorizationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitResetSessionAuthorization(s) + + default: + return t.VisitChildren(s) + } +} + +type SetTableAuthorizationContext struct { + StatementContext + tableName IQualifiedNameContext +} + +func NewSetTableAuthorizationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetTableAuthorizationContext { + var p = new(SetTableAuthorizationContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetTableAuthorizationContext) GetTableName() IQualifiedNameContext { return s.tableName } + +func (s *SetTableAuthorizationContext) SetTableName(v IQualifiedNameContext) { s.tableName = v } + +func (s *SetTableAuthorizationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetTableAuthorizationContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *SetTableAuthorizationContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *SetTableAuthorizationContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetTableAuthorizationContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *SetTableAuthorizationContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *SetTableAuthorizationContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *SetTableAuthorizationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetTableAuthorization(s) + } +} + +func (s *SetTableAuthorizationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetTableAuthorization(s) + } +} + +func (s *SetTableAuthorizationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetTableAuthorization(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowCreateViewContext struct { + StatementContext +} + +func NewShowCreateViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowCreateViewContext { + var p = new(ShowCreateViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowCreateViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowCreateViewContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowCreateViewContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *ShowCreateViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *ShowCreateViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowCreateViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowCreateView(s) + } +} + +func (s *ShowCreateViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowCreateView(s) + } +} + +func (s *ShowCreateViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowCreateView(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateTableContext struct { + StatementContext +} + +func NewCreateTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateTableContext { + var p = new(CreateTableContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateTableContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateTableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *CreateTableContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CreateTableContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *CreateTableContext) AllTableElement() []ITableElementContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITableElementContext); ok { + len++ + } + } + + tst := make([]ITableElementContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITableElementContext); ok { + tst[i] = t.(ITableElementContext) + i++ + } + } + + return tst +} + +func (s *CreateTableContext) TableElement(i int) ITableElementContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITableElementContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITableElementContext) +} + +func (s *CreateTableContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *CreateTableContext) OR_() antlr.TerminalNode { + return s.GetToken(TrinoParserOR_, 0) +} + +func (s *CreateTableContext) REPLACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPLACE_, 0) +} + +func (s *CreateTableContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *CreateTableContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *CreateTableContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *CreateTableContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *CreateTableContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *CreateTableContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CreateTableContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CreateTableContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *CreateTableContext) Properties() IPropertiesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertiesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertiesContext) +} + +func (s *CreateTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateTable(s) + } +} + +func (s *CreateTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateTable(s) + } +} + +func (s *CreateTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateTable(s) + + default: + return t.VisitChildren(s) + } +} + +type StartTransactionContext struct { + StatementContext +} + +func NewStartTransactionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StartTransactionContext { + var p = new(StartTransactionContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *StartTransactionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StartTransactionContext) START_() antlr.TerminalNode { + return s.GetToken(TrinoParserSTART_, 0) +} + +func (s *StartTransactionContext) TRANSACTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRANSACTION_, 0) +} + +func (s *StartTransactionContext) AllTransactionMode() []ITransactionModeContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITransactionModeContext); ok { + len++ + } + } + + tst := make([]ITransactionModeContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITransactionModeContext); ok { + tst[i] = t.(ITransactionModeContext) + i++ + } + } + + return tst +} + +func (s *StartTransactionContext) TransactionMode(i int) ITransactionModeContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITransactionModeContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITransactionModeContext) +} + +func (s *StartTransactionContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *StartTransactionContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *StartTransactionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStartTransaction(s) + } +} + +func (s *StartTransactionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStartTransaction(s) + } +} + +func (s *StartTransactionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStartTransaction(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateTableAsSelectContext struct { + StatementContext +} + +func NewCreateTableAsSelectContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateTableAsSelectContext { + var p = new(CreateTableAsSelectContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateTableAsSelectContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateTableAsSelectContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateTableAsSelectContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *CreateTableAsSelectContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CreateTableAsSelectContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *CreateTableAsSelectContext) RootQuery() IRootQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRootQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRootQueryContext) +} + +func (s *CreateTableAsSelectContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *CreateTableAsSelectContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *CreateTableAsSelectContext) OR_() antlr.TerminalNode { + return s.GetToken(TrinoParserOR_, 0) +} + +func (s *CreateTableAsSelectContext) REPLACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPLACE_, 0) +} + +func (s *CreateTableAsSelectContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *CreateTableAsSelectContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *CreateTableAsSelectContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *CreateTableAsSelectContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *CreateTableAsSelectContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CreateTableAsSelectContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CreateTableAsSelectContext) AllWITH_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserWITH_) +} + +func (s *CreateTableAsSelectContext) WITH_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, i) +} + +func (s *CreateTableAsSelectContext) Properties() IPropertiesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertiesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertiesContext) +} + +func (s *CreateTableAsSelectContext) DATA_() antlr.TerminalNode { + return s.GetToken(TrinoParserDATA_, 0) +} + +func (s *CreateTableAsSelectContext) NO_() antlr.TerminalNode { + return s.GetToken(TrinoParserNO_, 0) +} + +func (s *CreateTableAsSelectContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateTableAsSelect(s) + } +} + +func (s *CreateTableAsSelectContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateTableAsSelect(s) + } +} + +func (s *CreateTableAsSelectContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateTableAsSelect(s) + + default: + return t.VisitChildren(s) + } +} + +type CommentViewContext struct { + StatementContext +} + +func NewCommentViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CommentViewContext { + var p = new(CommentViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CommentViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CommentViewContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CommentViewContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *CommentViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *CommentViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CommentViewContext) IS_() antlr.TerminalNode { + return s.GetToken(TrinoParserIS_, 0) +} + +func (s *CommentViewContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CommentViewContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *CommentViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCommentView(s) + } +} + +func (s *CommentViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCommentView(s) + } +} + +func (s *CommentViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCommentView(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowStatsContext struct { + StatementContext +} + +func NewShowStatsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowStatsContext { + var p = new(ShowStatsContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowStatsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowStatsContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowStatsContext) STATS_() antlr.TerminalNode { + return s.GetToken(TrinoParserSTATS_, 0) +} + +func (s *ShowStatsContext) FOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOR_, 0) +} + +func (s *ShowStatsContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowStatsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowStats(s) + } +} + +func (s *ShowStatsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowStats(s) + } +} + +func (s *ShowStatsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowStats(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowCreateSchemaContext struct { + StatementContext +} + +func NewShowCreateSchemaContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowCreateSchemaContext { + var p = new(ShowCreateSchemaContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowCreateSchemaContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowCreateSchemaContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowCreateSchemaContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *ShowCreateSchemaContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *ShowCreateSchemaContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowCreateSchemaContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowCreateSchema(s) + } +} + +func (s *ShowCreateSchemaContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowCreateSchema(s) + } +} + +func (s *ShowCreateSchemaContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowCreateSchema(s) + + default: + return t.VisitChildren(s) + } +} + +type DropFunctionContext struct { + StatementContext +} + +func NewDropFunctionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropFunctionContext { + var p = new(DropFunctionContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropFunctionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropFunctionContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropFunctionContext) FUNCTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserFUNCTION_, 0) +} + +func (s *DropFunctionContext) FunctionDeclaration() IFunctionDeclarationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFunctionDeclarationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFunctionDeclarationContext) +} + +func (s *DropFunctionContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *DropFunctionContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *DropFunctionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropFunction(s) + } +} + +func (s *DropFunctionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropFunction(s) + } +} + +func (s *DropFunctionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropFunction(s) + + default: + return t.VisitChildren(s) + } +} + +type RevokeContext struct { + StatementContext + grantee IPrincipalContext +} + +func NewRevokeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RevokeContext { + var p = new(RevokeContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RevokeContext) GetGrantee() IPrincipalContext { return s.grantee } + +func (s *RevokeContext) SetGrantee(v IPrincipalContext) { s.grantee = v } + +func (s *RevokeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RevokeContext) REVOKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREVOKE_, 0) +} + +func (s *RevokeContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *RevokeContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *RevokeContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *RevokeContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *RevokeContext) AllPrivilege() []IPrivilegeContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IPrivilegeContext); ok { + len++ + } + } + + tst := make([]IPrivilegeContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IPrivilegeContext); ok { + tst[i] = t.(IPrivilegeContext) + i++ + } + } + + return tst +} + +func (s *RevokeContext) Privilege(i int) IPrivilegeContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrivilegeContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IPrivilegeContext) +} + +func (s *RevokeContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *RevokeContext) PRIVILEGES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRIVILEGES_, 0) +} + +func (s *RevokeContext) GRANT_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANT_, 0) +} + +func (s *RevokeContext) OPTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserOPTION_, 0) +} + +func (s *RevokeContext) FOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOR_, 0) +} + +func (s *RevokeContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *RevokeContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *RevokeContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *RevokeContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *RevokeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRevoke(s) + } +} + +func (s *RevokeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRevoke(s) + } +} + +func (s *RevokeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRevoke(s) + + default: + return t.VisitChildren(s) + } +} + +type UpdateContext struct { + StatementContext + where IBooleanExpressionContext +} + +func NewUpdateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UpdateContext { + var p = new(UpdateContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *UpdateContext) GetWhere() IBooleanExpressionContext { return s.where } + +func (s *UpdateContext) SetWhere(v IBooleanExpressionContext) { s.where = v } + +func (s *UpdateContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UpdateContext) UPDATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUPDATE_, 0) +} + +func (s *UpdateContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *UpdateContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *UpdateContext) AllUpdateAssignment() []IUpdateAssignmentContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IUpdateAssignmentContext); ok { + len++ + } + } + + tst := make([]IUpdateAssignmentContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IUpdateAssignmentContext); ok { + tst[i] = t.(IUpdateAssignmentContext) + i++ + } + } + + return tst +} + +func (s *UpdateContext) UpdateAssignment(i int) IUpdateAssignmentContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IUpdateAssignmentContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IUpdateAssignmentContext) +} + +func (s *UpdateContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *UpdateContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *UpdateContext) WHERE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHERE_, 0) +} + +func (s *UpdateContext) BooleanExpression() IBooleanExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *UpdateContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUpdate(s) + } +} + +func (s *UpdateContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUpdate(s) + } +} + +func (s *UpdateContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUpdate(s) + + default: + return t.VisitChildren(s) + } +} + +type TableExecuteContext struct { + StatementContext + tableName IQualifiedNameContext + procedureName IIdentifierContext + where IBooleanExpressionContext +} + +func NewTableExecuteContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TableExecuteContext { + var p = new(TableExecuteContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *TableExecuteContext) GetTableName() IQualifiedNameContext { return s.tableName } + +func (s *TableExecuteContext) GetProcedureName() IIdentifierContext { return s.procedureName } + +func (s *TableExecuteContext) GetWhere() IBooleanExpressionContext { return s.where } + +func (s *TableExecuteContext) SetTableName(v IQualifiedNameContext) { s.tableName = v } + +func (s *TableExecuteContext) SetProcedureName(v IIdentifierContext) { s.procedureName = v } + +func (s *TableExecuteContext) SetWhere(v IBooleanExpressionContext) { s.where = v } + +func (s *TableExecuteContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableExecuteContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *TableExecuteContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *TableExecuteContext) EXECUTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXECUTE_, 0) +} + +func (s *TableExecuteContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *TableExecuteContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *TableExecuteContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *TableExecuteContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *TableExecuteContext) WHERE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHERE_, 0) +} + +func (s *TableExecuteContext) BooleanExpression() IBooleanExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *TableExecuteContext) AllCallArgument() []ICallArgumentContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ICallArgumentContext); ok { + len++ + } + } + + tst := make([]ICallArgumentContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ICallArgumentContext); ok { + tst[i] = t.(ICallArgumentContext) + i++ + } + } + + return tst +} + +func (s *TableExecuteContext) CallArgument(i int) ICallArgumentContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICallArgumentContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ICallArgumentContext) +} + +func (s *TableExecuteContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *TableExecuteContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *TableExecuteContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableExecute(s) + } +} + +func (s *TableExecuteContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableExecute(s) + } +} + +func (s *TableExecuteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableExecute(s) + + default: + return t.VisitChildren(s) + } +} + +type DeleteContext struct { + StatementContext +} + +func NewDeleteContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DeleteContext { + var p = new(DeleteContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DeleteContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DeleteContext) DELETE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDELETE_, 0) +} + +func (s *DeleteContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *DeleteContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *DeleteContext) WHERE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHERE_, 0) +} + +func (s *DeleteContext) BooleanExpression() IBooleanExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *DeleteContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDelete(s) + } +} + +func (s *DeleteContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDelete(s) + } +} + +func (s *DeleteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDelete(s) + + default: + return t.VisitChildren(s) + } +} + +type DescribeInputContext struct { + StatementContext +} + +func NewDescribeInputContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DescribeInputContext { + var p = new(DescribeInputContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DescribeInputContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DescribeInputContext) DESCRIBE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESCRIBE_, 0) +} + +func (s *DescribeInputContext) INPUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINPUT_, 0) +} + +func (s *DescribeInputContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *DescribeInputContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDescribeInput(s) + } +} + +func (s *DescribeInputContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDescribeInput(s) + } +} + +func (s *DescribeInputContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDescribeInput(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowStatsForQueryContext struct { + StatementContext +} + +func NewShowStatsForQueryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowStatsForQueryContext { + var p = new(ShowStatsForQueryContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowStatsForQueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowStatsForQueryContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowStatsForQueryContext) STATS_() antlr.TerminalNode { + return s.GetToken(TrinoParserSTATS_, 0) +} + +func (s *ShowStatsForQueryContext) FOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOR_, 0) +} + +func (s *ShowStatsForQueryContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *ShowStatsForQueryContext) RootQuery() IRootQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRootQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRootQueryContext) +} + +func (s *ShowStatsForQueryContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *ShowStatsForQueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowStatsForQuery(s) + } +} + +func (s *ShowStatsForQueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowStatsForQuery(s) + } +} + +func (s *ShowStatsForQueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowStatsForQuery(s) + + default: + return t.VisitChildren(s) + } +} + +type SetColumnTypeContext struct { + StatementContext + tableName IQualifiedNameContext + columnName IQualifiedNameContext +} + +func NewSetColumnTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetColumnTypeContext { + var p = new(SetColumnTypeContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetColumnTypeContext) GetTableName() IQualifiedNameContext { return s.tableName } + +func (s *SetColumnTypeContext) GetColumnName() IQualifiedNameContext { return s.columnName } + +func (s *SetColumnTypeContext) SetTableName(v IQualifiedNameContext) { s.tableName = v } + +func (s *SetColumnTypeContext) SetColumnName(v IQualifiedNameContext) { s.columnName = v } + +func (s *SetColumnTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetColumnTypeContext) AllALTER_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserALTER_) +} + +func (s *SetColumnTypeContext) ALTER_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, i) +} + +func (s *SetColumnTypeContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *SetColumnTypeContext) COLUMN_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMN_, 0) +} + +func (s *SetColumnTypeContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetColumnTypeContext) DATA_() antlr.TerminalNode { + return s.GetToken(TrinoParserDATA_, 0) +} + +func (s *SetColumnTypeContext) TYPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTYPE_, 0) +} + +func (s *SetColumnTypeContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *SetColumnTypeContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *SetColumnTypeContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *SetColumnTypeContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *SetColumnTypeContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *SetColumnTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetColumnType(s) + } +} + +func (s *SetColumnTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetColumnType(s) + } +} + +func (s *SetColumnTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetColumnType(s) + + default: + return t.VisitChildren(s) + } +} + +type StatementDefaultContext struct { + StatementContext +} + +func NewStatementDefaultContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StatementDefaultContext { + var p = new(StatementDefaultContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *StatementDefaultContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StatementDefaultContext) RootQuery() IRootQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRootQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRootQueryContext) +} + +func (s *StatementDefaultContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStatementDefault(s) + } +} + +func (s *StatementDefaultContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStatementDefault(s) + } +} + +func (s *StatementDefaultContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStatementDefault(s) + + default: + return t.VisitChildren(s) + } +} + +type SetTimeZoneContext struct { + StatementContext +} + +func NewSetTimeZoneContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetTimeZoneContext { + var p = new(SetTimeZoneContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetTimeZoneContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetTimeZoneContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetTimeZoneContext) TIME_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIME_, 0) +} + +func (s *SetTimeZoneContext) ZONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserZONE_, 0) +} + +func (s *SetTimeZoneContext) LOCAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLOCAL_, 0) +} + +func (s *SetTimeZoneContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SetTimeZoneContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetTimeZone(s) + } +} + +func (s *SetTimeZoneContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetTimeZone(s) + } +} + +func (s *SetTimeZoneContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetTimeZone(s) + + default: + return t.VisitChildren(s) + } +} + +type TruncateTableContext struct { + StatementContext +} + +func NewTruncateTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TruncateTableContext { + var p = new(TruncateTableContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *TruncateTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TruncateTableContext) TRUNCATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRUNCATE_, 0) +} + +func (s *TruncateTableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *TruncateTableContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *TruncateTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTruncateTable(s) + } +} + +func (s *TruncateTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTruncateTable(s) + } +} + +func (s *TruncateTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTruncateTable(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateMaterializedViewContext struct { + StatementContext +} + +func NewCreateMaterializedViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateMaterializedViewContext { + var p = new(CreateMaterializedViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateMaterializedViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateMaterializedViewContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateMaterializedViewContext) MATERIALIZED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATERIALIZED_, 0) +} + +func (s *CreateMaterializedViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *CreateMaterializedViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CreateMaterializedViewContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *CreateMaterializedViewContext) RootQuery() IRootQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRootQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRootQueryContext) +} + +func (s *CreateMaterializedViewContext) OR_() antlr.TerminalNode { + return s.GetToken(TrinoParserOR_, 0) +} + +func (s *CreateMaterializedViewContext) REPLACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPLACE_, 0) +} + +func (s *CreateMaterializedViewContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *CreateMaterializedViewContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *CreateMaterializedViewContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *CreateMaterializedViewContext) GRACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRACE_, 0) +} + +func (s *CreateMaterializedViewContext) PERIOD_() antlr.TerminalNode { + return s.GetToken(TrinoParserPERIOD_, 0) +} + +func (s *CreateMaterializedViewContext) Interval() IIntervalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIntervalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIntervalContext) +} + +func (s *CreateMaterializedViewContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CreateMaterializedViewContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CreateMaterializedViewContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *CreateMaterializedViewContext) Properties() IPropertiesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertiesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertiesContext) +} + +func (s *CreateMaterializedViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateMaterializedView(s) + } +} + +func (s *CreateMaterializedViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateMaterializedView(s) + } +} + +func (s *CreateMaterializedViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateMaterializedView(s) + + default: + return t.VisitChildren(s) + } +} + +type SetSessionContext struct { + StatementContext +} + +func NewSetSessionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetSessionContext { + var p = new(SetSessionContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetSessionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetSessionContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetSessionContext) SESSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserSESSION_, 0) +} + +func (s *SetSessionContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *SetSessionContext) EQ_() antlr.TerminalNode { + return s.GetToken(TrinoParserEQ_, 0) +} + +func (s *SetSessionContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SetSessionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetSession(s) + } +} + +func (s *SetSessionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetSession(s) + } +} + +func (s *SetSessionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetSession(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateViewContext struct { + StatementContext +} + +func NewCreateViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateViewContext { + var p = new(CreateViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateViewContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *CreateViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CreateViewContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *CreateViewContext) RootQuery() IRootQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRootQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRootQueryContext) +} + +func (s *CreateViewContext) OR_() antlr.TerminalNode { + return s.GetToken(TrinoParserOR_, 0) +} + +func (s *CreateViewContext) REPLACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPLACE_, 0) +} + +func (s *CreateViewContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CreateViewContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CreateViewContext) SECURITY_() antlr.TerminalNode { + return s.GetToken(TrinoParserSECURITY_, 0) +} + +func (s *CreateViewContext) DEFINER_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFINER_, 0) +} + +func (s *CreateViewContext) INVOKER_() antlr.TerminalNode { + return s.GetToken(TrinoParserINVOKER_, 0) +} + +func (s *CreateViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateView(s) + } +} + +func (s *CreateViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateView(s) + } +} + +func (s *CreateViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateView(s) + + default: + return t.VisitChildren(s) + } +} + +type RenameMaterializedViewContext struct { + StatementContext + from IQualifiedNameContext + to IQualifiedNameContext +} + +func NewRenameMaterializedViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RenameMaterializedViewContext { + var p = new(RenameMaterializedViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RenameMaterializedViewContext) GetFrom() IQualifiedNameContext { return s.from } + +func (s *RenameMaterializedViewContext) GetTo() IQualifiedNameContext { return s.to } + +func (s *RenameMaterializedViewContext) SetFrom(v IQualifiedNameContext) { s.from = v } + +func (s *RenameMaterializedViewContext) SetTo(v IQualifiedNameContext) { s.to = v } + +func (s *RenameMaterializedViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RenameMaterializedViewContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *RenameMaterializedViewContext) MATERIALIZED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATERIALIZED_, 0) +} + +func (s *RenameMaterializedViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *RenameMaterializedViewContext) RENAME_() antlr.TerminalNode { + return s.GetToken(TrinoParserRENAME_, 0) +} + +func (s *RenameMaterializedViewContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *RenameMaterializedViewContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *RenameMaterializedViewContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *RenameMaterializedViewContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *RenameMaterializedViewContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *RenameMaterializedViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRenameMaterializedView(s) + } +} + +func (s *RenameMaterializedViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRenameMaterializedView(s) + } +} + +func (s *RenameMaterializedViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRenameMaterializedView(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowSchemasContext struct { + StatementContext + pattern IString_Context + escape IString_Context +} + +func NewShowSchemasContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowSchemasContext { + var p = new(ShowSchemasContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowSchemasContext) GetPattern() IString_Context { return s.pattern } + +func (s *ShowSchemasContext) GetEscape() IString_Context { return s.escape } + +func (s *ShowSchemasContext) SetPattern(v IString_Context) { s.pattern = v } + +func (s *ShowSchemasContext) SetEscape(v IString_Context) { s.escape = v } + +func (s *ShowSchemasContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowSchemasContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowSchemasContext) SCHEMAS_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMAS_, 0) +} + +func (s *ShowSchemasContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ShowSchemasContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *ShowSchemasContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *ShowSchemasContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *ShowSchemasContext) AllString_() []IString_Context { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IString_Context); ok { + len++ + } + } + + tst := make([]IString_Context, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IString_Context); ok { + tst[i] = t.(IString_Context) + i++ + } + } + + return tst +} + +func (s *ShowSchemasContext) String_(i int) IString_Context { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ShowSchemasContext) ESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserESCAPE_, 0) +} + +func (s *ShowSchemasContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowSchemas(s) + } +} + +func (s *ShowSchemasContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowSchemas(s) + } +} + +func (s *ShowSchemasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowSchemas(s) + + default: + return t.VisitChildren(s) + } +} + +type DropTableContext struct { + StatementContext +} + +func NewDropTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DropTableContext { + var p = new(DropTableContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DropTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DropTableContext) DROP_() antlr.TerminalNode { + return s.GetToken(TrinoParserDROP_, 0) +} + +func (s *DropTableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *DropTableContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *DropTableContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *DropTableContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *DropTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDropTable(s) + } +} + +func (s *DropTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDropTable(s) + } +} + +func (s *DropTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDropTable(s) + + default: + return t.VisitChildren(s) + } +} + +type SetSchemaAuthorizationContext struct { + StatementContext +} + +func NewSetSchemaAuthorizationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetSchemaAuthorizationContext { + var p = new(SetSchemaAuthorizationContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetSchemaAuthorizationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetSchemaAuthorizationContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *SetSchemaAuthorizationContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *SetSchemaAuthorizationContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *SetSchemaAuthorizationContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetSchemaAuthorizationContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *SetSchemaAuthorizationContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *SetSchemaAuthorizationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetSchemaAuthorization(s) + } +} + +func (s *SetSchemaAuthorizationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetSchemaAuthorization(s) + } +} + +func (s *SetSchemaAuthorizationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetSchemaAuthorization(s) + + default: + return t.VisitChildren(s) + } +} + +type RollbackContext struct { + StatementContext +} + +func NewRollbackContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RollbackContext { + var p = new(RollbackContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RollbackContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RollbackContext) ROLLBACK_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLLBACK_, 0) +} + +func (s *RollbackContext) WORK_() antlr.TerminalNode { + return s.GetToken(TrinoParserWORK_, 0) +} + +func (s *RollbackContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRollback(s) + } +} + +func (s *RollbackContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRollback(s) + } +} + +func (s *RollbackContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRollback(s) + + default: + return t.VisitChildren(s) + } +} + +type CommentTableContext struct { + StatementContext +} + +func NewCommentTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CommentTableContext { + var p = new(CommentTableContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CommentTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CommentTableContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CommentTableContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *CommentTableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *CommentTableContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CommentTableContext) IS_() antlr.TerminalNode { + return s.GetToken(TrinoParserIS_, 0) +} + +func (s *CommentTableContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CommentTableContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *CommentTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCommentTable(s) + } +} + +func (s *CommentTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCommentTable(s) + } +} + +func (s *CommentTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCommentTable(s) + + default: + return t.VisitChildren(s) + } +} + +type ExecuteImmediateContext struct { + StatementContext +} + +func NewExecuteImmediateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExecuteImmediateContext { + var p = new(ExecuteImmediateContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ExecuteImmediateContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExecuteImmediateContext) EXECUTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXECUTE_, 0) +} + +func (s *ExecuteImmediateContext) IMMEDIATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserIMMEDIATE_, 0) +} + +func (s *ExecuteImmediateContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ExecuteImmediateContext) USING_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSING_, 0) +} + +func (s *ExecuteImmediateContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *ExecuteImmediateContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *ExecuteImmediateContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *ExecuteImmediateContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *ExecuteImmediateContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExecuteImmediate(s) + } +} + +func (s *ExecuteImmediateContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExecuteImmediate(s) + } +} + +func (s *ExecuteImmediateContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExecuteImmediate(s) + + default: + return t.VisitChildren(s) + } +} + +type RenameViewContext struct { + StatementContext + from IQualifiedNameContext + to IQualifiedNameContext +} + +func NewRenameViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RenameViewContext { + var p = new(RenameViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RenameViewContext) GetFrom() IQualifiedNameContext { return s.from } + +func (s *RenameViewContext) GetTo() IQualifiedNameContext { return s.to } + +func (s *RenameViewContext) SetFrom(v IQualifiedNameContext) { s.from = v } + +func (s *RenameViewContext) SetTo(v IQualifiedNameContext) { s.to = v } + +func (s *RenameViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RenameViewContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *RenameViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *RenameViewContext) RENAME_() antlr.TerminalNode { + return s.GetToken(TrinoParserRENAME_, 0) +} + +func (s *RenameViewContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *RenameViewContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *RenameViewContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *RenameViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRenameView(s) + } +} + +func (s *RenameViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRenameView(s) + } +} + +func (s *RenameViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRenameView(s) + + default: + return t.VisitChildren(s) + } +} + +type SetPathContext struct { + StatementContext +} + +func NewSetPathContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetPathContext { + var p = new(SetPathContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetPathContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetPathContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetPathContext) PATH_() antlr.TerminalNode { + return s.GetToken(TrinoParserPATH_, 0) +} + +func (s *SetPathContext) PathSpecification() IPathSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPathSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPathSpecificationContext) +} + +func (s *SetPathContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetPath(s) + } +} + +func (s *SetPathContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetPath(s) + } +} + +func (s *SetPathContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetPath(s) + + default: + return t.VisitChildren(s) + } +} + +type GrantRolesContext struct { + StatementContext + catalog IIdentifierContext +} + +func NewGrantRolesContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *GrantRolesContext { + var p = new(GrantRolesContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *GrantRolesContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *GrantRolesContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *GrantRolesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GrantRolesContext) GRANT_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANT_, 0) +} + +func (s *GrantRolesContext) Roles() IRolesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRolesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRolesContext) +} + +func (s *GrantRolesContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *GrantRolesContext) AllPrincipal() []IPrincipalContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IPrincipalContext); ok { + len++ + } + } + + tst := make([]IPrincipalContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IPrincipalContext); ok { + tst[i] = t.(IPrincipalContext) + i++ + } + } + + return tst +} + +func (s *GrantRolesContext) Principal(i int) IPrincipalContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *GrantRolesContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *GrantRolesContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *GrantRolesContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *GrantRolesContext) ADMIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserADMIN_, 0) +} + +func (s *GrantRolesContext) OPTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserOPTION_, 0) +} + +func (s *GrantRolesContext) GRANTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANTED_, 0) +} + +func (s *GrantRolesContext) BY_() antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, 0) +} + +func (s *GrantRolesContext) Grantor() IGrantorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IGrantorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IGrantorContext) +} + +func (s *GrantRolesContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *GrantRolesContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *GrantRolesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterGrantRoles(s) + } +} + +func (s *GrantRolesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitGrantRoles(s) + } +} + +func (s *GrantRolesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitGrantRoles(s) + + default: + return t.VisitChildren(s) + } +} + +type CallContext struct { + StatementContext +} + +func NewCallContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CallContext { + var p = new(CallContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CallContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CallContext) CALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserCALL_, 0) +} + +func (s *CallContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CallContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *CallContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *CallContext) AllCallArgument() []ICallArgumentContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ICallArgumentContext); ok { + len++ + } + } + + tst := make([]ICallArgumentContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ICallArgumentContext); ok { + tst[i] = t.(ICallArgumentContext) + i++ + } + } + + return tst +} + +func (s *CallContext) CallArgument(i int) ICallArgumentContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICallArgumentContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ICallArgumentContext) +} + +func (s *CallContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *CallContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *CallContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCall(s) + } +} + +func (s *CallContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCall(s) + } +} + +func (s *CallContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCall(s) + + default: + return t.VisitChildren(s) + } +} + +type RefreshMaterializedViewContext struct { + StatementContext +} + +func NewRefreshMaterializedViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RefreshMaterializedViewContext { + var p = new(RefreshMaterializedViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *RefreshMaterializedViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RefreshMaterializedViewContext) REFRESH_() antlr.TerminalNode { + return s.GetToken(TrinoParserREFRESH_, 0) +} + +func (s *RefreshMaterializedViewContext) MATERIALIZED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATERIALIZED_, 0) +} + +func (s *RefreshMaterializedViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *RefreshMaterializedViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *RefreshMaterializedViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRefreshMaterializedView(s) + } +} + +func (s *RefreshMaterializedViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRefreshMaterializedView(s) + } +} + +func (s *RefreshMaterializedViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRefreshMaterializedView(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowCreateMaterializedViewContext struct { + StatementContext +} + +func NewShowCreateMaterializedViewContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowCreateMaterializedViewContext { + var p = new(ShowCreateMaterializedViewContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowCreateMaterializedViewContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowCreateMaterializedViewContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowCreateMaterializedViewContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *ShowCreateMaterializedViewContext) MATERIALIZED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATERIALIZED_, 0) +} + +func (s *ShowCreateMaterializedViewContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *ShowCreateMaterializedViewContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowCreateMaterializedViewContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowCreateMaterializedView(s) + } +} + +func (s *ShowCreateMaterializedViewContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowCreateMaterializedView(s) + } +} + +func (s *ShowCreateMaterializedViewContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowCreateMaterializedView(s) + + default: + return t.VisitChildren(s) + } +} + +type CreateCatalogContext struct { + StatementContext + catalog IIdentifierContext + connectorName IIdentifierContext +} + +func NewCreateCatalogContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CreateCatalogContext { + var p = new(CreateCatalogContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *CreateCatalogContext) GetCatalog() IIdentifierContext { return s.catalog } + +func (s *CreateCatalogContext) GetConnectorName() IIdentifierContext { return s.connectorName } + +func (s *CreateCatalogContext) SetCatalog(v IIdentifierContext) { s.catalog = v } + +func (s *CreateCatalogContext) SetConnectorName(v IIdentifierContext) { s.connectorName = v } + +func (s *CreateCatalogContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CreateCatalogContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *CreateCatalogContext) CATALOG_() antlr.TerminalNode { + return s.GetToken(TrinoParserCATALOG_, 0) +} + +func (s *CreateCatalogContext) USING_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSING_, 0) +} + +func (s *CreateCatalogContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *CreateCatalogContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *CreateCatalogContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *CreateCatalogContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *CreateCatalogContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *CreateCatalogContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CreateCatalogContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CreateCatalogContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *CreateCatalogContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *CreateCatalogContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *CreateCatalogContext) Properties() IPropertiesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertiesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertiesContext) +} + +func (s *CreateCatalogContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCreateCatalog(s) + } +} + +func (s *CreateCatalogContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCreateCatalog(s) + } +} + +func (s *CreateCatalogContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCreateCatalog(s) + + default: + return t.VisitChildren(s) + } +} + +type ShowFunctionsContext struct { + StatementContext + pattern IString_Context + escape IString_Context +} + +func NewShowFunctionsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShowFunctionsContext { + var p = new(ShowFunctionsContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *ShowFunctionsContext) GetPattern() IString_Context { return s.pattern } + +func (s *ShowFunctionsContext) GetEscape() IString_Context { return s.escape } + +func (s *ShowFunctionsContext) SetPattern(v IString_Context) { s.pattern = v } + +func (s *ShowFunctionsContext) SetEscape(v IString_Context) { s.escape = v } + +func (s *ShowFunctionsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ShowFunctionsContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *ShowFunctionsContext) FUNCTIONS_() antlr.TerminalNode { + return s.GetToken(TrinoParserFUNCTIONS_, 0) +} + +func (s *ShowFunctionsContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *ShowFunctionsContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *ShowFunctionsContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *ShowFunctionsContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *ShowFunctionsContext) AllString_() []IString_Context { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IString_Context); ok { + len++ + } + } + + tst := make([]IString_Context, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IString_Context); ok { + tst[i] = t.(IString_Context) + i++ + } + } + + return tst +} + +func (s *ShowFunctionsContext) String_(i int) IString_Context { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ShowFunctionsContext) ESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserESCAPE_, 0) +} + +func (s *ShowFunctionsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterShowFunctions(s) + } +} + +func (s *ShowFunctionsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitShowFunctions(s) + } +} + +func (s *ShowFunctionsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitShowFunctions(s) + + default: + return t.VisitChildren(s) + } +} + +type DescribeOutputContext struct { + StatementContext +} + +func NewDescribeOutputContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DescribeOutputContext { + var p = new(DescribeOutputContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *DescribeOutputContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DescribeOutputContext) DESCRIBE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESCRIBE_, 0) +} + +func (s *DescribeOutputContext) OUTPUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserOUTPUT_, 0) +} + +func (s *DescribeOutputContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *DescribeOutputContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDescribeOutput(s) + } +} + +func (s *DescribeOutputContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDescribeOutput(s) + } +} + +func (s *DescribeOutputContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDescribeOutput(s) + + default: + return t.VisitChildren(s) + } +} + +type GrantContext struct { + StatementContext + grantee IPrincipalContext +} + +func NewGrantContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *GrantContext { + var p = new(GrantContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *GrantContext) GetGrantee() IPrincipalContext { return s.grantee } + +func (s *GrantContext) SetGrantee(v IPrincipalContext) { s.grantee = v } + +func (s *GrantContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GrantContext) AllGRANT_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserGRANT_) +} + +func (s *GrantContext) GRANT_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserGRANT_, i) +} + +func (s *GrantContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *GrantContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *GrantContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *GrantContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *GrantContext) AllPrivilege() []IPrivilegeContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IPrivilegeContext); ok { + len++ + } + } + + tst := make([]IPrivilegeContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IPrivilegeContext); ok { + tst[i] = t.(IPrivilegeContext) + i++ + } + } + + return tst +} + +func (s *GrantContext) Privilege(i int) IPrivilegeContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrivilegeContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IPrivilegeContext) +} + +func (s *GrantContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *GrantContext) PRIVILEGES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRIVILEGES_, 0) +} + +func (s *GrantContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *GrantContext) OPTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserOPTION_, 0) +} + +func (s *GrantContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *GrantContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *GrantContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *GrantContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *GrantContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterGrant(s) + } +} + +func (s *GrantContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitGrant(s) + } +} + +func (s *GrantContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitGrant(s) + + default: + return t.VisitChildren(s) + } +} + +type SetTablePropertiesContext struct { + StatementContext + tableName IQualifiedNameContext +} + +func NewSetTablePropertiesContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetTablePropertiesContext { + var p = new(SetTablePropertiesContext) + + InitEmptyStatementContext(&p.StatementContext) + p.parser = parser + p.CopyAll(ctx.(*StatementContext)) + + return p +} + +func (s *SetTablePropertiesContext) GetTableName() IQualifiedNameContext { return s.tableName } + +func (s *SetTablePropertiesContext) SetTableName(v IQualifiedNameContext) { s.tableName = v } + +func (s *SetTablePropertiesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetTablePropertiesContext) ALTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserALTER_, 0) +} + +func (s *SetTablePropertiesContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *SetTablePropertiesContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *SetTablePropertiesContext) PROPERTIES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPROPERTIES_, 0) +} + +func (s *SetTablePropertiesContext) PropertyAssignments() IPropertyAssignmentsContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertyAssignmentsContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertyAssignmentsContext) +} + +func (s *SetTablePropertiesContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *SetTablePropertiesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetTableProperties(s) + } +} + +func (s *SetTablePropertiesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetTableProperties(s) + } +} + +func (s *SetTablePropertiesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetTableProperties(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Statement() (localctx IStatementContext) { + localctx = NewStatementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 16, TrinoParserRULE_statement) + var _la int + + p.SetState(1164) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 123, p.GetParserRuleContext()) { + case 1: + localctx = NewStatementDefaultContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(293) + p.RootQuery() + } + + case 2: + localctx = NewUseContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(294) + p.Match(TrinoParserUSE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(295) + + var _x = p.Identifier() + + localctx.(*UseContext).schema = _x + } + + case 3: + localctx = NewUseContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(296) + p.Match(TrinoParserUSE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(297) + + var _x = p.Identifier() + + localctx.(*UseContext).catalog = _x + } + { + p.SetState(298) + p.Match(TrinoParserDOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(299) + + var _x = p.Identifier() + + localctx.(*UseContext).schema = _x + } + + case 4: + localctx = NewCreateCatalogContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(301) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(302) + p.Match(TrinoParserCATALOG_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(306) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext()) == 1 { + { + p.SetState(303) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(304) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(305) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(308) + + var _x = p.Identifier() + + localctx.(*CreateCatalogContext).catalog = _x + } + { + p.SetState(309) + p.Match(TrinoParserUSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(310) + + var _x = p.Identifier() + + localctx.(*CreateCatalogContext).connectorName = _x + } + p.SetState(313) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMENT_ { + { + p.SetState(311) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(312) + p.String_() + } + + } + p.SetState(317) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAUTHORIZATION_ { + { + p.SetState(315) + p.Match(TrinoParserAUTHORIZATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(316) + p.Principal() + } + + } + p.SetState(321) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(319) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(320) + p.Properties() + } + + } + + case 5: + localctx = NewDropCatalogContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(323) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(324) + p.Match(TrinoParserCATALOG_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(327) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) == 1 { + { + p.SetState(325) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(326) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(329) + + var _x = p.Identifier() + + localctx.(*DropCatalogContext).catalog = _x + } + p.SetState(331) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCASCADE_ || _la == TrinoParserRESTRICT_ { + { + p.SetState(330) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserCASCADE_ || _la == TrinoParserRESTRICT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + + case 6: + localctx = NewCreateSchemaContext(p, localctx) + p.EnterOuterAlt(localctx, 6) + { + p.SetState(333) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(334) + p.Match(TrinoParserSCHEMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(338) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 9, p.GetParserRuleContext()) == 1 { + { + p.SetState(335) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(336) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(337) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(340) + p.QualifiedName() + } + p.SetState(343) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAUTHORIZATION_ { + { + p.SetState(341) + p.Match(TrinoParserAUTHORIZATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(342) + p.Principal() + } + + } + p.SetState(347) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(345) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(346) + p.Properties() + } + + } + + case 7: + localctx = NewDropSchemaContext(p, localctx) + p.EnterOuterAlt(localctx, 7) + { + p.SetState(349) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(350) + p.Match(TrinoParserSCHEMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(353) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 { + { + p.SetState(351) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(352) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(355) + p.QualifiedName() + } + p.SetState(357) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCASCADE_ || _la == TrinoParserRESTRICT_ { + { + p.SetState(356) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserCASCADE_ || _la == TrinoParserRESTRICT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + + case 8: + localctx = NewRenameSchemaContext(p, localctx) + p.EnterOuterAlt(localctx, 8) + { + p.SetState(359) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(360) + p.Match(TrinoParserSCHEMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(361) + p.QualifiedName() + } + { + p.SetState(362) + p.Match(TrinoParserRENAME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(363) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(364) + p.Identifier() + } + + case 9: + localctx = NewSetSchemaAuthorizationContext(p, localctx) + p.EnterOuterAlt(localctx, 9) + { + p.SetState(366) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(367) + p.Match(TrinoParserSCHEMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(368) + p.QualifiedName() + } + { + p.SetState(369) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(370) + p.Match(TrinoParserAUTHORIZATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(371) + p.Principal() + } + + case 10: + localctx = NewCreateTableAsSelectContext(p, localctx) + p.EnterOuterAlt(localctx, 10) + { + p.SetState(373) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(376) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOR_ { + { + p.SetState(374) + p.Match(TrinoParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(375) + p.Match(TrinoParserREPLACE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(378) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(382) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 { + { + p.SetState(379) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(380) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(381) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(384) + p.QualifiedName() + } + p.SetState(386) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(385) + p.ColumnAliases() + } + + } + p.SetState(390) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMENT_ { + { + p.SetState(388) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(389) + p.String_() + } + + } + p.SetState(394) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(392) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(393) + p.Properties() + } + + } + { + p.SetState(396) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(402) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 19, p.GetParserRuleContext()) { + case 1: + { + p.SetState(397) + p.RootQuery() + } + + case 2: + { + p.SetState(398) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(399) + p.RootQuery() + } + { + p.SetState(400) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.SetState(409) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(404) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(406) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNO_ { + { + p.SetState(405) + p.Match(TrinoParserNO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(408) + p.Match(TrinoParserDATA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case 11: + localctx = NewCreateTableContext(p, localctx) + p.EnterOuterAlt(localctx, 11) + { + p.SetState(411) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(414) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOR_ { + { + p.SetState(412) + p.Match(TrinoParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(413) + p.Match(TrinoParserREPLACE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(416) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(420) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 23, p.GetParserRuleContext()) == 1 { + { + p.SetState(417) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(418) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(419) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(422) + p.QualifiedName() + } + { + p.SetState(423) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(424) + p.TableElement() + } + p.SetState(429) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(425) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(426) + p.TableElement() + } + + p.SetState(431) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(432) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(435) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMENT_ { + { + p.SetState(433) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(434) + p.String_() + } + + } + p.SetState(439) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(437) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(438) + p.Properties() + } + + } + + case 12: + localctx = NewDropTableContext(p, localctx) + p.EnterOuterAlt(localctx, 12) + { + p.SetState(441) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(442) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(445) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 { + { + p.SetState(443) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(444) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(447) + p.QualifiedName() + } + + case 13: + localctx = NewInsertIntoContext(p, localctx) + p.EnterOuterAlt(localctx, 13) + { + p.SetState(448) + p.Match(TrinoParserINSERT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(449) + p.Match(TrinoParserINTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(450) + p.QualifiedName() + } + p.SetState(452) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 28, p.GetParserRuleContext()) == 1 { + { + p.SetState(451) + p.ColumnAliases() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(454) + p.RootQuery() + } + + case 14: + localctx = NewDeleteContext(p, localctx) + p.EnterOuterAlt(localctx, 14) + { + p.SetState(456) + p.Match(TrinoParserDELETE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(457) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(458) + p.QualifiedName() + } + p.SetState(461) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWHERE_ { + { + p.SetState(459) + p.Match(TrinoParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(460) + p.booleanExpression(0) + } + + } + + case 15: + localctx = NewTruncateTableContext(p, localctx) + p.EnterOuterAlt(localctx, 15) + { + p.SetState(463) + p.Match(TrinoParserTRUNCATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(464) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(465) + p.QualifiedName() + } + + case 16: + localctx = NewCommentTableContext(p, localctx) + p.EnterOuterAlt(localctx, 16) + { + p.SetState(466) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(467) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(468) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(469) + p.QualifiedName() + } + { + p.SetState(470) + p.Match(TrinoParserIS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(473) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserSTRING_, TrinoParserUNICODE_STRING_: + { + p.SetState(471) + p.String_() + } + + case TrinoParserNULL_: + { + p.SetState(472) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + case 17: + localctx = NewCommentViewContext(p, localctx) + p.EnterOuterAlt(localctx, 17) + { + p.SetState(475) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(476) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(477) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(478) + p.QualifiedName() + } + { + p.SetState(479) + p.Match(TrinoParserIS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(482) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserSTRING_, TrinoParserUNICODE_STRING_: + { + p.SetState(480) + p.String_() + } + + case TrinoParserNULL_: + { + p.SetState(481) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + case 18: + localctx = NewCommentColumnContext(p, localctx) + p.EnterOuterAlt(localctx, 18) + { + p.SetState(484) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(485) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(486) + p.Match(TrinoParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(487) + p.QualifiedName() + } + { + p.SetState(488) + p.Match(TrinoParserIS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(491) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserSTRING_, TrinoParserUNICODE_STRING_: + { + p.SetState(489) + p.String_() + } + + case TrinoParserNULL_: + { + p.SetState(490) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + case 19: + localctx = NewRenameTableContext(p, localctx) + p.EnterOuterAlt(localctx, 19) + { + p.SetState(493) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(494) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(497) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 33, p.GetParserRuleContext()) == 1 { + { + p.SetState(495) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(496) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(499) + + var _x = p.QualifiedName() + + localctx.(*RenameTableContext).from = _x + } + { + p.SetState(500) + p.Match(TrinoParserRENAME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(501) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(502) + + var _x = p.QualifiedName() + + localctx.(*RenameTableContext).to = _x + } + + case 20: + localctx = NewAddColumnContext(p, localctx) + p.EnterOuterAlt(localctx, 20) + { + p.SetState(504) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(505) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(508) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 34, p.GetParserRuleContext()) == 1 { + { + p.SetState(506) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(507) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(510) + + var _x = p.QualifiedName() + + localctx.(*AddColumnContext).tableName = _x + } + { + p.SetState(511) + p.Match(TrinoParserADD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(512) + p.Match(TrinoParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(516) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 35, p.GetParserRuleContext()) == 1 { + { + p.SetState(513) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(514) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(515) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(518) + + var _x = p.ColumnDefinition() + + localctx.(*AddColumnContext).column = _x + } + + case 21: + localctx = NewRenameColumnContext(p, localctx) + p.EnterOuterAlt(localctx, 21) + { + p.SetState(520) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(521) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(524) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext()) == 1 { + { + p.SetState(522) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(523) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(526) + + var _x = p.QualifiedName() + + localctx.(*RenameColumnContext).tableName = _x + } + { + p.SetState(527) + p.Match(TrinoParserRENAME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(528) + p.Match(TrinoParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(531) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 37, p.GetParserRuleContext()) == 1 { + { + p.SetState(529) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(530) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(533) + + var _x = p.QualifiedName() + + localctx.(*RenameColumnContext).from = _x + } + { + p.SetState(534) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(535) + + var _x = p.Identifier() + + localctx.(*RenameColumnContext).to = _x + } + + case 22: + localctx = NewDropColumnContext(p, localctx) + p.EnterOuterAlt(localctx, 22) + { + p.SetState(537) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(538) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(541) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 38, p.GetParserRuleContext()) == 1 { + { + p.SetState(539) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(540) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(543) + + var _x = p.QualifiedName() + + localctx.(*DropColumnContext).tableName = _x + } + { + p.SetState(544) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(545) + p.Match(TrinoParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(548) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 39, p.GetParserRuleContext()) == 1 { + { + p.SetState(546) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(547) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(550) + + var _x = p.QualifiedName() + + localctx.(*DropColumnContext).column = _x + } + + case 23: + localctx = NewSetColumnTypeContext(p, localctx) + p.EnterOuterAlt(localctx, 23) + { + p.SetState(552) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(553) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(556) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 40, p.GetParserRuleContext()) == 1 { + { + p.SetState(554) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(555) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(558) + + var _x = p.QualifiedName() + + localctx.(*SetColumnTypeContext).tableName = _x + } + { + p.SetState(559) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(560) + p.Match(TrinoParserCOLUMN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(561) + + var _x = p.QualifiedName() + + localctx.(*SetColumnTypeContext).columnName = _x + } + { + p.SetState(562) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(563) + p.Match(TrinoParserDATA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(564) + p.Match(TrinoParserTYPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(565) + p.type_(0) + } + + case 24: + localctx = NewSetTableAuthorizationContext(p, localctx) + p.EnterOuterAlt(localctx, 24) + { + p.SetState(567) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(568) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(569) + + var _x = p.QualifiedName() + + localctx.(*SetTableAuthorizationContext).tableName = _x + } + { + p.SetState(570) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(571) + p.Match(TrinoParserAUTHORIZATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(572) + p.Principal() + } + + case 25: + localctx = NewSetTablePropertiesContext(p, localctx) + p.EnterOuterAlt(localctx, 25) + { + p.SetState(574) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(575) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(576) + + var _x = p.QualifiedName() + + localctx.(*SetTablePropertiesContext).tableName = _x + } + { + p.SetState(577) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(578) + p.Match(TrinoParserPROPERTIES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(579) + p.PropertyAssignments() + } + + case 26: + localctx = NewTableExecuteContext(p, localctx) + p.EnterOuterAlt(localctx, 26) + { + p.SetState(581) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(582) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(583) + + var _x = p.QualifiedName() + + localctx.(*TableExecuteContext).tableName = _x + } + { + p.SetState(584) + p.Match(TrinoParserEXECUTE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(585) + + var _x = p.Identifier() + + localctx.(*TableExecuteContext).procedureName = _x + } + p.SetState(598) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(586) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(595) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(587) + p.CallArgument() + } + p.SetState(592) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(588) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(589) + p.CallArgument() + } + + p.SetState(594) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(597) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + p.SetState(602) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWHERE_ { + { + p.SetState(600) + p.Match(TrinoParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(601) + + var _x = p.booleanExpression(0) + + localctx.(*TableExecuteContext).where = _x + } + + } + + case 27: + localctx = NewAnalyzeContext(p, localctx) + p.EnterOuterAlt(localctx, 27) + { + p.SetState(604) + p.Match(TrinoParserANALYZE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(605) + p.QualifiedName() + } + p.SetState(608) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(606) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(607) + p.Properties() + } + + } + + case 28: + localctx = NewCreateMaterializedViewContext(p, localctx) + p.EnterOuterAlt(localctx, 28) + { + p.SetState(610) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(613) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOR_ { + { + p.SetState(611) + p.Match(TrinoParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(612) + p.Match(TrinoParserREPLACE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(615) + p.Match(TrinoParserMATERIALIZED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(616) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(620) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 47, p.GetParserRuleContext()) == 1 { + { + p.SetState(617) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(618) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(619) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(622) + p.QualifiedName() + } + p.SetState(626) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserGRACE_ { + { + p.SetState(623) + p.Match(TrinoParserGRACE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(624) + p.Match(TrinoParserPERIOD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(625) + p.Interval() + } + + } + p.SetState(630) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMENT_ { + { + p.SetState(628) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(629) + p.String_() + } + + } + p.SetState(634) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(632) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(633) + p.Properties() + } + + } + { + p.SetState(636) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(637) + p.RootQuery() + } + + case 29: + localctx = NewCreateViewContext(p, localctx) + p.EnterOuterAlt(localctx, 29) + { + p.SetState(639) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(642) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOR_ { + { + p.SetState(640) + p.Match(TrinoParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(641) + p.Match(TrinoParserREPLACE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(644) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(645) + p.QualifiedName() + } + p.SetState(648) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMENT_ { + { + p.SetState(646) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(647) + p.String_() + } + + } + p.SetState(652) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserSECURITY_ { + { + p.SetState(650) + p.Match(TrinoParserSECURITY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(651) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserDEFINER_ || _la == TrinoParserINVOKER_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + { + p.SetState(654) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(655) + p.RootQuery() + } + + case 30: + localctx = NewRefreshMaterializedViewContext(p, localctx) + p.EnterOuterAlt(localctx, 30) + { + p.SetState(657) + p.Match(TrinoParserREFRESH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(658) + p.Match(TrinoParserMATERIALIZED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(659) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(660) + p.QualifiedName() + } + + case 31: + localctx = NewDropMaterializedViewContext(p, localctx) + p.EnterOuterAlt(localctx, 31) + { + p.SetState(661) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(662) + p.Match(TrinoParserMATERIALIZED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(663) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(666) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 54, p.GetParserRuleContext()) == 1 { + { + p.SetState(664) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(665) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(668) + p.QualifiedName() + } + + case 32: + localctx = NewRenameMaterializedViewContext(p, localctx) + p.EnterOuterAlt(localctx, 32) + { + p.SetState(669) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(670) + p.Match(TrinoParserMATERIALIZED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(671) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(674) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 55, p.GetParserRuleContext()) == 1 { + { + p.SetState(672) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(673) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(676) + + var _x = p.QualifiedName() + + localctx.(*RenameMaterializedViewContext).from = _x + } + { + p.SetState(677) + p.Match(TrinoParserRENAME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(678) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(679) + + var _x = p.QualifiedName() + + localctx.(*RenameMaterializedViewContext).to = _x + } + + case 33: + localctx = NewSetMaterializedViewPropertiesContext(p, localctx) + p.EnterOuterAlt(localctx, 33) + { + p.SetState(681) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(682) + p.Match(TrinoParserMATERIALIZED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(683) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(684) + p.QualifiedName() + } + { + p.SetState(685) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(686) + p.Match(TrinoParserPROPERTIES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(687) + p.PropertyAssignments() + } + + case 34: + localctx = NewDropViewContext(p, localctx) + p.EnterOuterAlt(localctx, 34) + { + p.SetState(689) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(690) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(693) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 56, p.GetParserRuleContext()) == 1 { + { + p.SetState(691) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(692) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(695) + p.QualifiedName() + } + + case 35: + localctx = NewRenameViewContext(p, localctx) + p.EnterOuterAlt(localctx, 35) + { + p.SetState(696) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(697) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(698) + + var _x = p.QualifiedName() + + localctx.(*RenameViewContext).from = _x + } + { + p.SetState(699) + p.Match(TrinoParserRENAME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(700) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(701) + + var _x = p.QualifiedName() + + localctx.(*RenameViewContext).to = _x + } + + case 36: + localctx = NewSetViewAuthorizationContext(p, localctx) + p.EnterOuterAlt(localctx, 36) + { + p.SetState(703) + p.Match(TrinoParserALTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(704) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(705) + + var _x = p.QualifiedName() + + localctx.(*SetViewAuthorizationContext).from = _x + } + { + p.SetState(706) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(707) + p.Match(TrinoParserAUTHORIZATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(708) + p.Principal() + } + + case 37: + localctx = NewCallContext(p, localctx) + p.EnterOuterAlt(localctx, 37) + { + p.SetState(710) + p.Match(TrinoParserCALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(711) + p.QualifiedName() + } + { + p.SetState(712) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(721) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(713) + p.CallArgument() + } + p.SetState(718) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(714) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(715) + p.CallArgument() + } + + p.SetState(720) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(723) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 38: + localctx = NewCreateFunctionContext(p, localctx) + p.EnterOuterAlt(localctx, 38) + { + p.SetState(725) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(728) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOR_ { + { + p.SetState(726) + p.Match(TrinoParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(727) + p.Match(TrinoParserREPLACE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(730) + p.FunctionSpecification() + } + + case 39: + localctx = NewDropFunctionContext(p, localctx) + p.EnterOuterAlt(localctx, 39) + { + p.SetState(731) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(732) + p.Match(TrinoParserFUNCTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(735) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 60, p.GetParserRuleContext()) == 1 { + { + p.SetState(733) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(734) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(737) + p.FunctionDeclaration() + } + + case 40: + localctx = NewCreateRoleContext(p, localctx) + p.EnterOuterAlt(localctx, 40) + { + p.SetState(738) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(739) + p.Match(TrinoParserROLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(740) + + var _x = p.Identifier() + + localctx.(*CreateRoleContext).name = _x + } + p.SetState(744) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(741) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(742) + p.Match(TrinoParserADMIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(743) + p.Grantor() + } + + } + p.SetState(748) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserIN_ { + { + p.SetState(746) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(747) + + var _x = p.Identifier() + + localctx.(*CreateRoleContext).catalog = _x + } + + } + + case 41: + localctx = NewDropRoleContext(p, localctx) + p.EnterOuterAlt(localctx, 41) + { + p.SetState(750) + p.Match(TrinoParserDROP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(751) + p.Match(TrinoParserROLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(752) + + var _x = p.Identifier() + + localctx.(*DropRoleContext).name = _x + } + p.SetState(755) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserIN_ { + { + p.SetState(753) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(754) + + var _x = p.Identifier() + + localctx.(*DropRoleContext).catalog = _x + } + + } + + case 42: + localctx = NewGrantRolesContext(p, localctx) + p.EnterOuterAlt(localctx, 42) + { + p.SetState(757) + p.Match(TrinoParserGRANT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(758) + p.Roles() + } + { + p.SetState(759) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(760) + p.Principal() + } + p.SetState(765) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(761) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(762) + p.Principal() + } + + p.SetState(767) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(771) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(768) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(769) + p.Match(TrinoParserADMIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(770) + p.Match(TrinoParserOPTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + p.SetState(776) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserGRANTED_ { + { + p.SetState(773) + p.Match(TrinoParserGRANTED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(774) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(775) + p.Grantor() + } + + } + p.SetState(780) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserIN_ { + { + p.SetState(778) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(779) + + var _x = p.Identifier() + + localctx.(*GrantRolesContext).catalog = _x + } + + } + + case 43: + localctx = NewRevokeRolesContext(p, localctx) + p.EnterOuterAlt(localctx, 43) + { + p.SetState(782) + p.Match(TrinoParserREVOKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(786) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 68, p.GetParserRuleContext()) == 1 { + { + p.SetState(783) + p.Match(TrinoParserADMIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(784) + p.Match(TrinoParserOPTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(785) + p.Match(TrinoParserFOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(788) + p.Roles() + } + { + p.SetState(789) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(790) + p.Principal() + } + p.SetState(795) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(791) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(792) + p.Principal() + } + + p.SetState(797) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(801) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserGRANTED_ { + { + p.SetState(798) + p.Match(TrinoParserGRANTED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(799) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(800) + p.Grantor() + } + + } + p.SetState(805) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserIN_ { + { + p.SetState(803) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(804) + + var _x = p.Identifier() + + localctx.(*RevokeRolesContext).catalog = _x + } + + } + + case 44: + localctx = NewSetRoleContext(p, localctx) + p.EnterOuterAlt(localctx, 44) + { + p.SetState(807) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(808) + p.Match(TrinoParserROLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(812) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 72, p.GetParserRuleContext()) { + case 1: + { + p.SetState(809) + p.Match(TrinoParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + { + p.SetState(810) + p.Match(TrinoParserNONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + { + p.SetState(811) + + var _x = p.Identifier() + + localctx.(*SetRoleContext).role = _x + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.SetState(816) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserIN_ { + { + p.SetState(814) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(815) + + var _x = p.Identifier() + + localctx.(*SetRoleContext).catalog = _x + } + + } + + case 45: + localctx = NewGrantContext(p, localctx) + p.EnterOuterAlt(localctx, 45) + { + p.SetState(818) + p.Match(TrinoParserGRANT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(829) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserCREATE_, TrinoParserDELETE_, TrinoParserINSERT_, TrinoParserSELECT_, TrinoParserUPDATE_: + { + p.SetState(819) + p.Privilege() + } + p.SetState(824) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(820) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(821) + p.Privilege() + } + + p.SetState(826) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + case TrinoParserALL_: + { + p.SetState(827) + p.Match(TrinoParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(828) + p.Match(TrinoParserPRIVILEGES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + { + p.SetState(831) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(833) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 76, p.GetParserRuleContext()) == 1 { + { + p.SetState(832) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserSCHEMA_ || _la == TrinoParserTABLE_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(835) + p.QualifiedName() + } + { + p.SetState(836) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(837) + + var _x = p.Principal() + + localctx.(*GrantContext).grantee = _x + } + p.SetState(841) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(838) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(839) + p.Match(TrinoParserGRANT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(840) + p.Match(TrinoParserOPTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case 46: + localctx = NewDenyContext(p, localctx) + p.EnterOuterAlt(localctx, 46) + { + p.SetState(843) + p.Match(TrinoParserDENY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(854) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserCREATE_, TrinoParserDELETE_, TrinoParserINSERT_, TrinoParserSELECT_, TrinoParserUPDATE_: + { + p.SetState(844) + p.Privilege() + } + p.SetState(849) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(845) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(846) + p.Privilege() + } + + p.SetState(851) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + case TrinoParserALL_: + { + p.SetState(852) + p.Match(TrinoParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(853) + p.Match(TrinoParserPRIVILEGES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + { + p.SetState(856) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(858) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 80, p.GetParserRuleContext()) == 1 { + { + p.SetState(857) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserSCHEMA_ || _la == TrinoParserTABLE_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(860) + p.QualifiedName() + } + { + p.SetState(861) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(862) + + var _x = p.Principal() + + localctx.(*DenyContext).grantee = _x + } + + case 47: + localctx = NewRevokeContext(p, localctx) + p.EnterOuterAlt(localctx, 47) + { + p.SetState(864) + p.Match(TrinoParserREVOKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(868) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserGRANT_ { + { + p.SetState(865) + p.Match(TrinoParserGRANT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(866) + p.Match(TrinoParserOPTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(867) + p.Match(TrinoParserFOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + p.SetState(880) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserCREATE_, TrinoParserDELETE_, TrinoParserINSERT_, TrinoParserSELECT_, TrinoParserUPDATE_: + { + p.SetState(870) + p.Privilege() + } + p.SetState(875) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(871) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(872) + p.Privilege() + } + + p.SetState(877) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + case TrinoParserALL_: + { + p.SetState(878) + p.Match(TrinoParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(879) + p.Match(TrinoParserPRIVILEGES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + { + p.SetState(882) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(884) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 84, p.GetParserRuleContext()) == 1 { + { + p.SetState(883) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserSCHEMA_ || _la == TrinoParserTABLE_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(886) + p.QualifiedName() + } + { + p.SetState(887) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(888) + + var _x = p.Principal() + + localctx.(*RevokeContext).grantee = _x + } + + case 48: + localctx = NewShowGrantsContext(p, localctx) + p.EnterOuterAlt(localctx, 48) + { + p.SetState(890) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(891) + p.Match(TrinoParserGRANTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(897) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserON_ { + { + p.SetState(892) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(894) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserTABLE_ { + { + p.SetState(893) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(896) + p.QualifiedName() + } + + } + + case 49: + localctx = NewExplainContext(p, localctx) + p.EnterOuterAlt(localctx, 49) + { + p.SetState(899) + p.Match(TrinoParserEXPLAIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(911) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 88, p.GetParserRuleContext()) == 1 { + { + p.SetState(900) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(901) + p.ExplainOption() + } + p.SetState(906) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(902) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(903) + p.ExplainOption() + } + + p.SetState(908) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(909) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(913) + p.Statement() + } + + case 50: + localctx = NewExplainAnalyzeContext(p, localctx) + p.EnterOuterAlt(localctx, 50) + { + p.SetState(914) + p.Match(TrinoParserEXPLAIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(915) + p.Match(TrinoParserANALYZE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(917) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserVERBOSE_ { + { + p.SetState(916) + p.Match(TrinoParserVERBOSE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(919) + p.Statement() + } + + case 51: + localctx = NewShowCreateTableContext(p, localctx) + p.EnterOuterAlt(localctx, 51) + { + p.SetState(920) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(921) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(922) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(923) + p.QualifiedName() + } + + case 52: + localctx = NewShowCreateSchemaContext(p, localctx) + p.EnterOuterAlt(localctx, 52) + { + p.SetState(924) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(925) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(926) + p.Match(TrinoParserSCHEMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(927) + p.QualifiedName() + } + + case 53: + localctx = NewShowCreateViewContext(p, localctx) + p.EnterOuterAlt(localctx, 53) + { + p.SetState(928) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(929) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(930) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(931) + p.QualifiedName() + } + + case 54: + localctx = NewShowCreateMaterializedViewContext(p, localctx) + p.EnterOuterAlt(localctx, 54) + { + p.SetState(932) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(933) + p.Match(TrinoParserCREATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(934) + p.Match(TrinoParserMATERIALIZED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(935) + p.Match(TrinoParserVIEW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(936) + p.QualifiedName() + } + + case 55: + localctx = NewShowTablesContext(p, localctx) + p.EnterOuterAlt(localctx, 55) + { + p.SetState(937) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(938) + p.Match(TrinoParserTABLES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(941) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFROM_ || _la == TrinoParserIN_ { + { + p.SetState(939) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFROM_ || _la == TrinoParserIN_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(940) + p.QualifiedName() + } + + } + p.SetState(949) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLIKE_ { + { + p.SetState(943) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(944) + + var _x = p.String_() + + localctx.(*ShowTablesContext).pattern = _x + } + p.SetState(947) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserESCAPE_ { + { + p.SetState(945) + p.Match(TrinoParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(946) + + var _x = p.String_() + + localctx.(*ShowTablesContext).escape = _x + } + + } + + } + + case 56: + localctx = NewShowSchemasContext(p, localctx) + p.EnterOuterAlt(localctx, 56) + { + p.SetState(951) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(952) + p.Match(TrinoParserSCHEMAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(955) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFROM_ || _la == TrinoParserIN_ { + { + p.SetState(953) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFROM_ || _la == TrinoParserIN_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(954) + p.Identifier() + } + + } + p.SetState(963) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLIKE_ { + { + p.SetState(957) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(958) + + var _x = p.String_() + + localctx.(*ShowSchemasContext).pattern = _x + } + p.SetState(961) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserESCAPE_ { + { + p.SetState(959) + p.Match(TrinoParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(960) + + var _x = p.String_() + + localctx.(*ShowSchemasContext).escape = _x + } + + } + + } + + case 57: + localctx = NewShowCatalogsContext(p, localctx) + p.EnterOuterAlt(localctx, 57) + { + p.SetState(965) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(966) + p.Match(TrinoParserCATALOGS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(973) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLIKE_ { + { + p.SetState(967) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(968) + + var _x = p.String_() + + localctx.(*ShowCatalogsContext).pattern = _x + } + p.SetState(971) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserESCAPE_ { + { + p.SetState(969) + p.Match(TrinoParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(970) + + var _x = p.String_() + + localctx.(*ShowCatalogsContext).escape = _x + } + + } + + } + + case 58: + localctx = NewShowColumnsContext(p, localctx) + p.EnterOuterAlt(localctx, 58) + { + p.SetState(975) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(976) + p.Match(TrinoParserCOLUMNS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(977) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFROM_ || _la == TrinoParserIN_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + p.SetState(979) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699602754) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + { + p.SetState(978) + p.QualifiedName() + } + + } + p.SetState(987) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLIKE_ { + { + p.SetState(981) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(982) + + var _x = p.String_() + + localctx.(*ShowColumnsContext).pattern = _x + } + p.SetState(985) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserESCAPE_ { + { + p.SetState(983) + p.Match(TrinoParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(984) + + var _x = p.String_() + + localctx.(*ShowColumnsContext).escape = _x + } + + } + + } + + case 59: + localctx = NewShowStatsContext(p, localctx) + p.EnterOuterAlt(localctx, 59) + { + p.SetState(989) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(990) + p.Match(TrinoParserSTATS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(991) + p.Match(TrinoParserFOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(992) + p.QualifiedName() + } + + case 60: + localctx = NewShowStatsForQueryContext(p, localctx) + p.EnterOuterAlt(localctx, 60) + { + p.SetState(993) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(994) + p.Match(TrinoParserSTATS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(995) + p.Match(TrinoParserFOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(996) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(997) + p.RootQuery() + } + { + p.SetState(998) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 61: + localctx = NewShowRolesContext(p, localctx) + p.EnterOuterAlt(localctx, 61) + { + p.SetState(1000) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1002) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCURRENT_ { + { + p.SetState(1001) + p.Match(TrinoParserCURRENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1004) + p.Match(TrinoParserROLES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1007) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFROM_ || _la == TrinoParserIN_ { + { + p.SetState(1005) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFROM_ || _la == TrinoParserIN_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(1006) + p.Identifier() + } + + } + + case 62: + localctx = NewShowRoleGrantsContext(p, localctx) + p.EnterOuterAlt(localctx, 62) + { + p.SetState(1009) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1010) + p.Match(TrinoParserROLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1011) + p.Match(TrinoParserGRANTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1014) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFROM_ || _la == TrinoParserIN_ { + { + p.SetState(1012) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFROM_ || _la == TrinoParserIN_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(1013) + p.Identifier() + } + + } + + case 63: + localctx = NewShowColumnsContext(p, localctx) + p.EnterOuterAlt(localctx, 63) + { + p.SetState(1016) + p.Match(TrinoParserDESCRIBE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1017) + p.QualifiedName() + } + + case 64: + localctx = NewShowColumnsContext(p, localctx) + p.EnterOuterAlt(localctx, 64) + { + p.SetState(1018) + p.Match(TrinoParserDESC_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1019) + p.QualifiedName() + } + + case 65: + localctx = NewShowFunctionsContext(p, localctx) + p.EnterOuterAlt(localctx, 65) + { + p.SetState(1020) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1021) + p.Match(TrinoParserFUNCTIONS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1024) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFROM_ || _la == TrinoParserIN_ { + { + p.SetState(1022) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFROM_ || _la == TrinoParserIN_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(1023) + p.QualifiedName() + } + + } + p.SetState(1032) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLIKE_ { + { + p.SetState(1026) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1027) + + var _x = p.String_() + + localctx.(*ShowFunctionsContext).pattern = _x + } + p.SetState(1030) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserESCAPE_ { + { + p.SetState(1028) + p.Match(TrinoParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1029) + + var _x = p.String_() + + localctx.(*ShowFunctionsContext).escape = _x + } + + } + + } + + case 66: + localctx = NewShowSessionContext(p, localctx) + p.EnterOuterAlt(localctx, 66) + { + p.SetState(1034) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1035) + p.Match(TrinoParserSESSION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1042) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLIKE_ { + { + p.SetState(1036) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1037) + + var _x = p.String_() + + localctx.(*ShowSessionContext).pattern = _x + } + p.SetState(1040) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserESCAPE_ { + { + p.SetState(1038) + p.Match(TrinoParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1039) + + var _x = p.String_() + + localctx.(*ShowSessionContext).escape = _x + } + + } + + } + + case 67: + localctx = NewSetSessionAuthorizationContext(p, localctx) + p.EnterOuterAlt(localctx, 67) + { + p.SetState(1044) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1045) + p.Match(TrinoParserSESSION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1046) + p.Match(TrinoParserAUTHORIZATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1047) + p.AuthorizationUser() + } + + case 68: + localctx = NewResetSessionAuthorizationContext(p, localctx) + p.EnterOuterAlt(localctx, 68) + { + p.SetState(1048) + p.Match(TrinoParserRESET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1049) + p.Match(TrinoParserSESSION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1050) + p.Match(TrinoParserAUTHORIZATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 69: + localctx = NewSetSessionContext(p, localctx) + p.EnterOuterAlt(localctx, 69) + { + p.SetState(1051) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1052) + p.Match(TrinoParserSESSION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1053) + p.QualifiedName() + } + { + p.SetState(1054) + p.Match(TrinoParserEQ_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1055) + p.Expression() + } + + case 70: + localctx = NewResetSessionContext(p, localctx) + p.EnterOuterAlt(localctx, 70) + { + p.SetState(1057) + p.Match(TrinoParserRESET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1058) + p.Match(TrinoParserSESSION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1059) + p.QualifiedName() + } + + case 71: + localctx = NewStartTransactionContext(p, localctx) + p.EnterOuterAlt(localctx, 71) + { + p.SetState(1060) + p.Match(TrinoParserSTART_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1061) + p.Match(TrinoParserTRANSACTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1070) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserISOLATION_ || _la == TrinoParserREAD_ { + { + p.SetState(1062) + p.TransactionMode() + } + p.SetState(1067) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1063) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1064) + p.TransactionMode() + } + + p.SetState(1069) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + + case 72: + localctx = NewCommitContext(p, localctx) + p.EnterOuterAlt(localctx, 72) + { + p.SetState(1072) + p.Match(TrinoParserCOMMIT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1074) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWORK_ { + { + p.SetState(1073) + p.Match(TrinoParserWORK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case 73: + localctx = NewRollbackContext(p, localctx) + p.EnterOuterAlt(localctx, 73) + { + p.SetState(1076) + p.Match(TrinoParserROLLBACK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1078) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWORK_ { + { + p.SetState(1077) + p.Match(TrinoParserWORK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case 74: + localctx = NewPrepareContext(p, localctx) + p.EnterOuterAlt(localctx, 74) + { + p.SetState(1080) + p.Match(TrinoParserPREPARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1081) + p.Identifier() + } + { + p.SetState(1082) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1083) + p.Statement() + } + + case 75: + localctx = NewDeallocateContext(p, localctx) + p.EnterOuterAlt(localctx, 75) + { + p.SetState(1085) + p.Match(TrinoParserDEALLOCATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1086) + p.Match(TrinoParserPREPARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1087) + p.Identifier() + } + + case 76: + localctx = NewExecuteContext(p, localctx) + p.EnterOuterAlt(localctx, 76) + { + p.SetState(1088) + p.Match(TrinoParserEXECUTE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1089) + p.Identifier() + } + p.SetState(1099) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserUSING_ { + { + p.SetState(1090) + p.Match(TrinoParserUSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1091) + p.Expression() + } + p.SetState(1096) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1092) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1093) + p.Expression() + } + + p.SetState(1098) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + + case 77: + localctx = NewExecuteImmediateContext(p, localctx) + p.EnterOuterAlt(localctx, 77) + { + p.SetState(1101) + p.Match(TrinoParserEXECUTE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1102) + p.Match(TrinoParserIMMEDIATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1103) + p.String_() + } + p.SetState(1113) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserUSING_ { + { + p.SetState(1104) + p.Match(TrinoParserUSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1105) + p.Expression() + } + p.SetState(1110) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1106) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1107) + p.Expression() + } + + p.SetState(1112) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + + case 78: + localctx = NewDescribeInputContext(p, localctx) + p.EnterOuterAlt(localctx, 78) + { + p.SetState(1115) + p.Match(TrinoParserDESCRIBE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1116) + p.Match(TrinoParserINPUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1117) + p.Identifier() + } + + case 79: + localctx = NewDescribeOutputContext(p, localctx) + p.EnterOuterAlt(localctx, 79) + { + p.SetState(1118) + p.Match(TrinoParserDESCRIBE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1119) + p.Match(TrinoParserOUTPUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1120) + p.Identifier() + } + + case 80: + localctx = NewSetPathContext(p, localctx) + p.EnterOuterAlt(localctx, 80) + { + p.SetState(1121) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1122) + p.Match(TrinoParserPATH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1123) + p.PathSpecification() + } + + case 81: + localctx = NewSetTimeZoneContext(p, localctx) + p.EnterOuterAlt(localctx, 81) + { + p.SetState(1124) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1125) + p.Match(TrinoParserTIME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1126) + p.Match(TrinoParserZONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1129) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 117, p.GetParserRuleContext()) { + case 1: + { + p.SetState(1127) + p.Match(TrinoParserLOCAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + { + p.SetState(1128) + p.Expression() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + case 82: + localctx = NewUpdateContext(p, localctx) + p.EnterOuterAlt(localctx, 82) + { + p.SetState(1131) + p.Match(TrinoParserUPDATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1132) + p.QualifiedName() + } + { + p.SetState(1133) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1134) + p.UpdateAssignment() + } + p.SetState(1139) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1135) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1136) + p.UpdateAssignment() + } + + p.SetState(1141) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(1144) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWHERE_ { + { + p.SetState(1142) + p.Match(TrinoParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1143) + + var _x = p.booleanExpression(0) + + localctx.(*UpdateContext).where = _x + } + + } + + case 83: + localctx = NewMergeContext(p, localctx) + p.EnterOuterAlt(localctx, 83) + { + p.SetState(1146) + p.Match(TrinoParserMERGE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1147) + p.Match(TrinoParserINTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1148) + p.QualifiedName() + } + p.SetState(1153) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699600706) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + p.SetState(1150) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAS_ { + { + p.SetState(1149) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1152) + p.Identifier() + } + + } + { + p.SetState(1155) + p.Match(TrinoParserUSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1156) + p.relation(0) + } + { + p.SetState(1157) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1158) + p.Expression() + } + p.SetState(1160) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for ok := true; ok; ok = _la == TrinoParserWHEN_ { + { + p.SetState(1159) + p.MergeCase() + } + + p.SetState(1162) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRootQueryContext is an interface to support dynamic dispatch. +type IRootQueryContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Query() IQueryContext + WithFunction() IWithFunctionContext + + // IsRootQueryContext differentiates from other interfaces. + IsRootQueryContext() +} + +type RootQueryContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRootQueryContext() *RootQueryContext { + var p = new(RootQueryContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rootQuery + return p +} + +func InitEmptyRootQueryContext(p *RootQueryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rootQuery +} + +func (*RootQueryContext) IsRootQueryContext() {} + +func NewRootQueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RootQueryContext { + var p = new(RootQueryContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_rootQuery + + return p +} + +func (s *RootQueryContext) GetParser() antlr.Parser { return s.parser } + +func (s *RootQueryContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *RootQueryContext) WithFunction() IWithFunctionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWithFunctionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IWithFunctionContext) +} + +func (s *RootQueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RootQueryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *RootQueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRootQuery(s) + } +} + +func (s *RootQueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRootQuery(s) + } +} + +func (s *RootQueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRootQuery(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RootQuery() (localctx IRootQueryContext) { + localctx = NewRootQueryContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 18, TrinoParserRULE_rootQuery) + p.EnterOuterAlt(localctx, 1) + p.SetState(1167) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 124, p.GetParserRuleContext()) == 1 { + { + p.SetState(1166) + p.WithFunction() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(1169) + p.Query() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IWithFunctionContext is an interface to support dynamic dispatch. +type IWithFunctionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + WITH_() antlr.TerminalNode + AllFunctionSpecification() []IFunctionSpecificationContext + FunctionSpecification(i int) IFunctionSpecificationContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsWithFunctionContext differentiates from other interfaces. + IsWithFunctionContext() +} + +type WithFunctionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyWithFunctionContext() *WithFunctionContext { + var p = new(WithFunctionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_withFunction + return p +} + +func InitEmptyWithFunctionContext(p *WithFunctionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_withFunction +} + +func (*WithFunctionContext) IsWithFunctionContext() {} + +func NewWithFunctionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WithFunctionContext { + var p = new(WithFunctionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_withFunction + + return p +} + +func (s *WithFunctionContext) GetParser() antlr.Parser { return s.parser } + +func (s *WithFunctionContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *WithFunctionContext) AllFunctionSpecification() []IFunctionSpecificationContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IFunctionSpecificationContext); ok { + len++ + } + } + + tst := make([]IFunctionSpecificationContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IFunctionSpecificationContext); ok { + tst[i] = t.(IFunctionSpecificationContext) + i++ + } + } + + return tst +} + +func (s *WithFunctionContext) FunctionSpecification(i int) IFunctionSpecificationContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFunctionSpecificationContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IFunctionSpecificationContext) +} + +func (s *WithFunctionContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *WithFunctionContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *WithFunctionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *WithFunctionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *WithFunctionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterWithFunction(s) + } +} + +func (s *WithFunctionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitWithFunction(s) + } +} + +func (s *WithFunctionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitWithFunction(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) WithFunction() (localctx IWithFunctionContext) { + localctx = NewWithFunctionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 20, TrinoParserRULE_withFunction) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1171) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1172) + p.FunctionSpecification() + } + p.SetState(1177) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1173) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1174) + p.FunctionSpecification() + } + + p.SetState(1179) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IQueryContext is an interface to support dynamic dispatch. +type IQueryContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + QueryNoWith() IQueryNoWithContext + With() IWithContext + + // IsQueryContext differentiates from other interfaces. + IsQueryContext() +} + +type QueryContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyQueryContext() *QueryContext { + var p = new(QueryContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_query + return p +} + +func InitEmptyQueryContext(p *QueryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_query +} + +func (*QueryContext) IsQueryContext() {} + +func NewQueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QueryContext { + var p = new(QueryContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_query + + return p +} + +func (s *QueryContext) GetParser() antlr.Parser { return s.parser } + +func (s *QueryContext) QueryNoWith() IQueryNoWithContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryNoWithContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryNoWithContext) +} + +func (s *QueryContext) With() IWithContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWithContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IWithContext) +} + +func (s *QueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QueryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *QueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQuery(s) + } +} + +func (s *QueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQuery(s) + } +} + +func (s *QueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQuery(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Query() (localctx IQueryContext) { + localctx = NewQueryContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 22, TrinoParserRULE_query) + var _la int + + p.EnterOuterAlt(localctx, 1) + p.SetState(1181) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(1180) + p.With() + } + + } + { + p.SetState(1183) + p.QueryNoWith() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IWithContext is an interface to support dynamic dispatch. +type IWithContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + WITH_() antlr.TerminalNode + AllNamedQuery() []INamedQueryContext + NamedQuery(i int) INamedQueryContext + RECURSIVE_() antlr.TerminalNode + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsWithContext differentiates from other interfaces. + IsWithContext() +} + +type WithContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyWithContext() *WithContext { + var p = new(WithContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_with + return p +} + +func InitEmptyWithContext(p *WithContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_with +} + +func (*WithContext) IsWithContext() {} + +func NewWithContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WithContext { + var p = new(WithContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_with + + return p +} + +func (s *WithContext) GetParser() antlr.Parser { return s.parser } + +func (s *WithContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *WithContext) AllNamedQuery() []INamedQueryContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(INamedQueryContext); ok { + len++ + } + } + + tst := make([]INamedQueryContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(INamedQueryContext); ok { + tst[i] = t.(INamedQueryContext) + i++ + } + } + + return tst +} + +func (s *WithContext) NamedQuery(i int) INamedQueryContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(INamedQueryContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(INamedQueryContext) +} + +func (s *WithContext) RECURSIVE_() antlr.TerminalNode { + return s.GetToken(TrinoParserRECURSIVE_, 0) +} + +func (s *WithContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *WithContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *WithContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *WithContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *WithContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterWith(s) + } +} + +func (s *WithContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitWith(s) + } +} + +func (s *WithContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitWith(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) With() (localctx IWithContext) { + localctx = NewWithContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 24, TrinoParserRULE_with) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1185) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1187) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserRECURSIVE_ { + { + p.SetState(1186) + p.Match(TrinoParserRECURSIVE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1189) + p.NamedQuery() + } + p.SetState(1194) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1190) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1191) + p.NamedQuery() + } + + p.SetState(1196) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITableElementContext is an interface to support dynamic dispatch. +type ITableElementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ColumnDefinition() IColumnDefinitionContext + LikeClause() ILikeClauseContext + + // IsTableElementContext differentiates from other interfaces. + IsTableElementContext() +} + +type TableElementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTableElementContext() *TableElementContext { + var p = new(TableElementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableElement + return p +} + +func InitEmptyTableElementContext(p *TableElementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableElement +} + +func (*TableElementContext) IsTableElementContext() {} + +func NewTableElementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TableElementContext { + var p = new(TableElementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_tableElement + + return p +} + +func (s *TableElementContext) GetParser() antlr.Parser { return s.parser } + +func (s *TableElementContext) ColumnDefinition() IColumnDefinitionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnDefinitionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnDefinitionContext) +} + +func (s *TableElementContext) LikeClause() ILikeClauseContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ILikeClauseContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ILikeClauseContext) +} + +func (s *TableElementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableElementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TableElementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableElement(s) + } +} + +func (s *TableElementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableElement(s) + } +} + +func (s *TableElementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableElement(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TableElement() (localctx ITableElementContext) { + localctx = NewTableElementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 26, TrinoParserRULE_tableElement) + p.SetState(1199) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserABSENT_, TrinoParserADD_, TrinoParserADMIN_, TrinoParserAFTER_, TrinoParserALL_, TrinoParserANALYZE_, TrinoParserANY_, TrinoParserARRAY_, TrinoParserASC_, TrinoParserAT_, TrinoParserAUTHORIZATION_, TrinoParserBEGIN_, TrinoParserBERNOULLI_, TrinoParserBOTH_, TrinoParserCALL_, TrinoParserCALLED_, TrinoParserCASCADE_, TrinoParserCATALOG_, TrinoParserCATALOGS_, TrinoParserCOLUMN_, TrinoParserCOLUMNS_, TrinoParserCOMMENT_, TrinoParserCOMMIT_, TrinoParserCOMMITTED_, TrinoParserCONDITIONAL_, TrinoParserCOUNT_, TrinoParserCOPARTITION_, TrinoParserCURRENT_, TrinoParserDATA_, TrinoParserDATE_, TrinoParserDAY_, TrinoParserDECLARE_, TrinoParserDEFAULT_, TrinoParserDEFINE_, TrinoParserDEFINER_, TrinoParserDENY_, TrinoParserDESC_, TrinoParserDESCRIPTOR_, TrinoParserDETERMINISTIC_, TrinoParserDISTRIBUTED_, TrinoParserDO_, TrinoParserDOUBLE_, TrinoParserEMPTY_, TrinoParserELSEIF_, TrinoParserENCODING_, TrinoParserERROR_, TrinoParserEXCLUDING_, TrinoParserEXPLAIN_, TrinoParserFETCH_, TrinoParserFILTER_, TrinoParserFINAL_, TrinoParserFIRST_, TrinoParserFOLLOWING_, TrinoParserFORMAT_, TrinoParserFUNCTION_, TrinoParserFUNCTIONS_, TrinoParserGRACE_, TrinoParserGRANT_, TrinoParserGRANTED_, TrinoParserGRANTS_, TrinoParserGRAPHVIZ_, TrinoParserGROUPS_, TrinoParserHOUR_, TrinoParserIF_, TrinoParserIGNORE_, TrinoParserIMMEDIATE_, TrinoParserINCLUDING_, TrinoParserINITIAL_, TrinoParserINPUT_, TrinoParserINTERVAL_, TrinoParserINVOKER_, TrinoParserIO_, TrinoParserISOLATION_, TrinoParserITERATE_, TrinoParserJSON_, TrinoParserKEEP_, TrinoParserKEY_, TrinoParserKEYS_, TrinoParserLANGUAGE_, TrinoParserLAST_, TrinoParserLATERAL_, TrinoParserLEADING_, TrinoParserLEAVE_, TrinoParserLEVEL_, TrinoParserLIMIT_, TrinoParserLOCAL_, TrinoParserLOGICAL_, TrinoParserLOOP_, TrinoParserMAP_, TrinoParserMATCH_, TrinoParserMATCHED_, TrinoParserMATCHES_, TrinoParserMATCH_RECOGNIZE_, TrinoParserMATERIALIZED_, TrinoParserMEASURES_, TrinoParserMERGE_, TrinoParserMINUTE_, TrinoParserMONTH_, TrinoParserNESTED_, TrinoParserNEXT_, TrinoParserNFC_, TrinoParserNFD_, TrinoParserNFKC_, TrinoParserNFKD_, TrinoParserNO_, TrinoParserNONE_, TrinoParserNULLIF_, TrinoParserNULLS_, TrinoParserOBJECT_, TrinoParserOF_, TrinoParserOFFSET_, TrinoParserOMIT_, TrinoParserONE_, TrinoParserONLY_, TrinoParserOPTION_, TrinoParserORDINALITY_, TrinoParserOUTPUT_, TrinoParserOVER_, TrinoParserOVERFLOW_, TrinoParserPARTITION_, TrinoParserPARTITIONS_, TrinoParserPASSING_, TrinoParserPAST_, TrinoParserPATH_, TrinoParserPATTERN_, TrinoParserPER_, TrinoParserPERIOD_, TrinoParserPERMUTE_, TrinoParserPLAN_, TrinoParserPOSITION_, TrinoParserPRECEDING_, TrinoParserPRECISION_, TrinoParserPRIVILEGES_, TrinoParserPROPERTIES_, TrinoParserPRUNE_, TrinoParserQUOTES_, TrinoParserRANGE_, TrinoParserREAD_, TrinoParserREFRESH_, TrinoParserRENAME_, TrinoParserREPEAT_, TrinoParserREPEATABLE_, TrinoParserREPLACE_, TrinoParserRESET_, TrinoParserRESPECT_, TrinoParserRESTRICT_, TrinoParserRETURN_, TrinoParserRETURNING_, TrinoParserRETURNS_, TrinoParserREVOKE_, TrinoParserROLE_, TrinoParserROLES_, TrinoParserROLLBACK_, TrinoParserROW_, TrinoParserROWS_, TrinoParserRUNNING_, TrinoParserSCALAR_, TrinoParserSCHEMA_, TrinoParserSCHEMAS_, TrinoParserSECOND_, TrinoParserSECURITY_, TrinoParserSEEK_, TrinoParserSERIALIZABLE_, TrinoParserSESSION_, TrinoParserSET_, TrinoParserSETS_, TrinoParserSHOW_, TrinoParserSOME_, TrinoParserSTART_, TrinoParserSTATS_, TrinoParserSUBSET_, TrinoParserSUBSTRING_, TrinoParserSYSTEM_, TrinoParserTABLES_, TrinoParserTABLESAMPLE_, TrinoParserTEXT_, TrinoParserTEXT_STRING_, TrinoParserTIES_, TrinoParserTIME_, TrinoParserTIMESTAMP_, TrinoParserTO_, TrinoParserTRAILING_, TrinoParserTRANSACTION_, TrinoParserTRUNCATE_, TrinoParserTRY_CAST_, TrinoParserTYPE_, TrinoParserUNBOUNDED_, TrinoParserUNCOMMITTED_, TrinoParserUNCONDITIONAL_, TrinoParserUNIQUE_, TrinoParserUNKNOWN_, TrinoParserUNMATCHED_, TrinoParserUNTIL_, TrinoParserUPDATE_, TrinoParserUSE_, TrinoParserUSER_, TrinoParserUTF16_, TrinoParserUTF32_, TrinoParserUTF8_, TrinoParserVALIDATE_, TrinoParserVALUE_, TrinoParserVERBOSE_, TrinoParserVERSION_, TrinoParserVIEW_, TrinoParserWHILE_, TrinoParserWINDOW_, TrinoParserWITHIN_, TrinoParserWITHOUT_, TrinoParserWORK_, TrinoParserWRAPPER_, TrinoParserWRITE_, TrinoParserYEAR_, TrinoParserZONE_, TrinoParserIDENTIFIER_, TrinoParserDIGIT_IDENTIFIER_, TrinoParserQUOTED_IDENTIFIER_, TrinoParserBACKQUOTED_IDENTIFIER_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1197) + p.ColumnDefinition() + } + + case TrinoParserLIKE_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1198) + p.LikeClause() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IColumnDefinitionContext is an interface to support dynamic dispatch. +type IColumnDefinitionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Identifier() IIdentifierContext + Type_() ITypeContext + NOT_() antlr.TerminalNode + NULL_() antlr.TerminalNode + COMMENT_() antlr.TerminalNode + String_() IString_Context + WITH_() antlr.TerminalNode + Properties() IPropertiesContext + + // IsColumnDefinitionContext differentiates from other interfaces. + IsColumnDefinitionContext() +} + +type ColumnDefinitionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyColumnDefinitionContext() *ColumnDefinitionContext { + var p = new(ColumnDefinitionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_columnDefinition + return p +} + +func InitEmptyColumnDefinitionContext(p *ColumnDefinitionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_columnDefinition +} + +func (*ColumnDefinitionContext) IsColumnDefinitionContext() {} + +func NewColumnDefinitionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ColumnDefinitionContext { + var p = new(ColumnDefinitionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_columnDefinition + + return p +} + +func (s *ColumnDefinitionContext) GetParser() antlr.Parser { return s.parser } + +func (s *ColumnDefinitionContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ColumnDefinitionContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *ColumnDefinitionContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *ColumnDefinitionContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *ColumnDefinitionContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *ColumnDefinitionContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ColumnDefinitionContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *ColumnDefinitionContext) Properties() IPropertiesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertiesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertiesContext) +} + +func (s *ColumnDefinitionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ColumnDefinitionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ColumnDefinitionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterColumnDefinition(s) + } +} + +func (s *ColumnDefinitionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitColumnDefinition(s) + } +} + +func (s *ColumnDefinitionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitColumnDefinition(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ColumnDefinition() (localctx IColumnDefinitionContext) { + localctx = NewColumnDefinitionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 28, TrinoParserRULE_columnDefinition) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1201) + p.Identifier() + } + { + p.SetState(1202) + p.type_(0) + } + p.SetState(1205) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(1203) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1204) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + p.SetState(1209) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMENT_ { + { + p.SetState(1207) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1208) + p.String_() + } + + } + p.SetState(1213) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ { + { + p.SetState(1211) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1212) + p.Properties() + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ILikeClauseContext is an interface to support dynamic dispatch. +type ILikeClauseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetOptionType returns the optionType token. + GetOptionType() antlr.Token + + // SetOptionType sets the optionType token. + SetOptionType(antlr.Token) + + // Getter signatures + LIKE_() antlr.TerminalNode + QualifiedName() IQualifiedNameContext + PROPERTIES_() antlr.TerminalNode + INCLUDING_() antlr.TerminalNode + EXCLUDING_() antlr.TerminalNode + + // IsLikeClauseContext differentiates from other interfaces. + IsLikeClauseContext() +} + +type LikeClauseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + optionType antlr.Token +} + +func NewEmptyLikeClauseContext() *LikeClauseContext { + var p = new(LikeClauseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_likeClause + return p +} + +func InitEmptyLikeClauseContext(p *LikeClauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_likeClause +} + +func (*LikeClauseContext) IsLikeClauseContext() {} + +func NewLikeClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LikeClauseContext { + var p = new(LikeClauseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_likeClause + + return p +} + +func (s *LikeClauseContext) GetParser() antlr.Parser { return s.parser } + +func (s *LikeClauseContext) GetOptionType() antlr.Token { return s.optionType } + +func (s *LikeClauseContext) SetOptionType(v antlr.Token) { s.optionType = v } + +func (s *LikeClauseContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *LikeClauseContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *LikeClauseContext) PROPERTIES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPROPERTIES_, 0) +} + +func (s *LikeClauseContext) INCLUDING_() antlr.TerminalNode { + return s.GetToken(TrinoParserINCLUDING_, 0) +} + +func (s *LikeClauseContext) EXCLUDING_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXCLUDING_, 0) +} + +func (s *LikeClauseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LikeClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *LikeClauseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLikeClause(s) + } +} + +func (s *LikeClauseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLikeClause(s) + } +} + +func (s *LikeClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLikeClause(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) LikeClause() (localctx ILikeClauseContext) { + localctx = NewLikeClauseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 30, TrinoParserRULE_likeClause) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1215) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1216) + p.QualifiedName() + } + p.SetState(1219) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserEXCLUDING_ || _la == TrinoParserINCLUDING_ { + { + p.SetState(1217) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*LikeClauseContext).optionType = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserEXCLUDING_ || _la == TrinoParserINCLUDING_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*LikeClauseContext).optionType = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(1218) + p.Match(TrinoParserPROPERTIES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPropertiesContext is an interface to support dynamic dispatch. +type IPropertiesContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + LPAREN_() antlr.TerminalNode + PropertyAssignments() IPropertyAssignmentsContext + RPAREN_() antlr.TerminalNode + + // IsPropertiesContext differentiates from other interfaces. + IsPropertiesContext() +} + +type PropertiesContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPropertiesContext() *PropertiesContext { + var p = new(PropertiesContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_properties + return p +} + +func InitEmptyPropertiesContext(p *PropertiesContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_properties +} + +func (*PropertiesContext) IsPropertiesContext() {} + +func NewPropertiesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertiesContext { + var p = new(PropertiesContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_properties + + return p +} + +func (s *PropertiesContext) GetParser() antlr.Parser { return s.parser } + +func (s *PropertiesContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *PropertiesContext) PropertyAssignments() IPropertyAssignmentsContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertyAssignmentsContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertyAssignmentsContext) +} + +func (s *PropertiesContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *PropertiesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PropertiesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *PropertiesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterProperties(s) + } +} + +func (s *PropertiesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitProperties(s) + } +} + +func (s *PropertiesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitProperties(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Properties() (localctx IPropertiesContext) { + localctx = NewPropertiesContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 32, TrinoParserRULE_properties) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1221) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1222) + p.PropertyAssignments() + } + { + p.SetState(1223) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPropertyAssignmentsContext is an interface to support dynamic dispatch. +type IPropertyAssignmentsContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + AllProperty() []IPropertyContext + Property(i int) IPropertyContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsPropertyAssignmentsContext differentiates from other interfaces. + IsPropertyAssignmentsContext() +} + +type PropertyAssignmentsContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPropertyAssignmentsContext() *PropertyAssignmentsContext { + var p = new(PropertyAssignmentsContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_propertyAssignments + return p +} + +func InitEmptyPropertyAssignmentsContext(p *PropertyAssignmentsContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_propertyAssignments +} + +func (*PropertyAssignmentsContext) IsPropertyAssignmentsContext() {} + +func NewPropertyAssignmentsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertyAssignmentsContext { + var p = new(PropertyAssignmentsContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_propertyAssignments + + return p +} + +func (s *PropertyAssignmentsContext) GetParser() antlr.Parser { return s.parser } + +func (s *PropertyAssignmentsContext) AllProperty() []IPropertyContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IPropertyContext); ok { + len++ + } + } + + tst := make([]IPropertyContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IPropertyContext); ok { + tst[i] = t.(IPropertyContext) + i++ + } + } + + return tst +} + +func (s *PropertyAssignmentsContext) Property(i int) IPropertyContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertyContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IPropertyContext) +} + +func (s *PropertyAssignmentsContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *PropertyAssignmentsContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *PropertyAssignmentsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PropertyAssignmentsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *PropertyAssignmentsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPropertyAssignments(s) + } +} + +func (s *PropertyAssignmentsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPropertyAssignments(s) + } +} + +func (s *PropertyAssignmentsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPropertyAssignments(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PropertyAssignments() (localctx IPropertyAssignmentsContext) { + localctx = NewPropertyAssignmentsContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 34, TrinoParserRULE_propertyAssignments) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1225) + p.Property() + } + p.SetState(1230) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1226) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1227) + p.Property() + } + + p.SetState(1232) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPropertyContext is an interface to support dynamic dispatch. +type IPropertyContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Identifier() IIdentifierContext + EQ_() antlr.TerminalNode + PropertyValue() IPropertyValueContext + + // IsPropertyContext differentiates from other interfaces. + IsPropertyContext() +} + +type PropertyContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPropertyContext() *PropertyContext { + var p = new(PropertyContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_property + return p +} + +func InitEmptyPropertyContext(p *PropertyContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_property +} + +func (*PropertyContext) IsPropertyContext() {} + +func NewPropertyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertyContext { + var p = new(PropertyContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_property + + return p +} + +func (s *PropertyContext) GetParser() antlr.Parser { return s.parser } + +func (s *PropertyContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *PropertyContext) EQ_() antlr.TerminalNode { + return s.GetToken(TrinoParserEQ_, 0) +} + +func (s *PropertyContext) PropertyValue() IPropertyValueContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPropertyValueContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPropertyValueContext) +} + +func (s *PropertyContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PropertyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *PropertyContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterProperty(s) + } +} + +func (s *PropertyContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitProperty(s) + } +} + +func (s *PropertyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitProperty(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Property() (localctx IPropertyContext) { + localctx = NewPropertyContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 36, TrinoParserRULE_property) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1233) + p.Identifier() + } + { + p.SetState(1234) + p.Match(TrinoParserEQ_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1235) + p.PropertyValue() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPropertyValueContext is an interface to support dynamic dispatch. +type IPropertyValueContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsPropertyValueContext differentiates from other interfaces. + IsPropertyValueContext() +} + +type PropertyValueContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPropertyValueContext() *PropertyValueContext { + var p = new(PropertyValueContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_propertyValue + return p +} + +func InitEmptyPropertyValueContext(p *PropertyValueContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_propertyValue +} + +func (*PropertyValueContext) IsPropertyValueContext() {} + +func NewPropertyValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertyValueContext { + var p = new(PropertyValueContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_propertyValue + + return p +} + +func (s *PropertyValueContext) GetParser() antlr.Parser { return s.parser } + +func (s *PropertyValueContext) CopyAll(ctx *PropertyValueContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *PropertyValueContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PropertyValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type DefaultPropertyValueContext struct { + PropertyValueContext +} + +func NewDefaultPropertyValueContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DefaultPropertyValueContext { + var p = new(DefaultPropertyValueContext) + + InitEmptyPropertyValueContext(&p.PropertyValueContext) + p.parser = parser + p.CopyAll(ctx.(*PropertyValueContext)) + + return p +} + +func (s *DefaultPropertyValueContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DefaultPropertyValueContext) DEFAULT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFAULT_, 0) +} + +func (s *DefaultPropertyValueContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDefaultPropertyValue(s) + } +} + +func (s *DefaultPropertyValueContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDefaultPropertyValue(s) + } +} + +func (s *DefaultPropertyValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDefaultPropertyValue(s) + + default: + return t.VisitChildren(s) + } +} + +type NonDefaultPropertyValueContext struct { + PropertyValueContext +} + +func NewNonDefaultPropertyValueContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NonDefaultPropertyValueContext { + var p = new(NonDefaultPropertyValueContext) + + InitEmptyPropertyValueContext(&p.PropertyValueContext) + p.parser = parser + p.CopyAll(ctx.(*PropertyValueContext)) + + return p +} + +func (s *NonDefaultPropertyValueContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NonDefaultPropertyValueContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *NonDefaultPropertyValueContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNonDefaultPropertyValue(s) + } +} + +func (s *NonDefaultPropertyValueContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNonDefaultPropertyValue(s) + } +} + +func (s *NonDefaultPropertyValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNonDefaultPropertyValue(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PropertyValue() (localctx IPropertyValueContext) { + localctx = NewPropertyValueContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 38, TrinoParserRULE_propertyValue) + p.SetState(1239) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) { + case 1: + localctx = NewDefaultPropertyValueContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1237) + p.Match(TrinoParserDEFAULT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + localctx = NewNonDefaultPropertyValueContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1238) + p.Expression() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IQueryNoWithContext is an interface to support dynamic dispatch. +type IQueryNoWithContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetOffset returns the offset rule contexts. + GetOffset() IRowCountContext + + // GetLimit returns the limit rule contexts. + GetLimit() ILimitRowCountContext + + // GetFetchFirst returns the fetchFirst rule contexts. + GetFetchFirst() IRowCountContext + + // SetOffset sets the offset rule contexts. + SetOffset(IRowCountContext) + + // SetLimit sets the limit rule contexts. + SetLimit(ILimitRowCountContext) + + // SetFetchFirst sets the fetchFirst rule contexts. + SetFetchFirst(IRowCountContext) + + // Getter signatures + QueryTerm() IQueryTermContext + ORDER_() antlr.TerminalNode + BY_() antlr.TerminalNode + AllSortItem() []ISortItemContext + SortItem(i int) ISortItemContext + OFFSET_() antlr.TerminalNode + LIMIT_() antlr.TerminalNode + FETCH_() antlr.TerminalNode + AllRowCount() []IRowCountContext + RowCount(i int) IRowCountContext + LimitRowCount() ILimitRowCountContext + FIRST_() antlr.TerminalNode + NEXT_() antlr.TerminalNode + AllROW_() []antlr.TerminalNode + ROW_(i int) antlr.TerminalNode + AllROWS_() []antlr.TerminalNode + ROWS_(i int) antlr.TerminalNode + ONLY_() antlr.TerminalNode + WITH_() antlr.TerminalNode + TIES_() antlr.TerminalNode + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsQueryNoWithContext differentiates from other interfaces. + IsQueryNoWithContext() +} + +type QueryNoWithContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + offset IRowCountContext + limit ILimitRowCountContext + fetchFirst IRowCountContext +} + +func NewEmptyQueryNoWithContext() *QueryNoWithContext { + var p = new(QueryNoWithContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryNoWith + return p +} + +func InitEmptyQueryNoWithContext(p *QueryNoWithContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryNoWith +} + +func (*QueryNoWithContext) IsQueryNoWithContext() {} + +func NewQueryNoWithContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QueryNoWithContext { + var p = new(QueryNoWithContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_queryNoWith + + return p +} + +func (s *QueryNoWithContext) GetParser() antlr.Parser { return s.parser } + +func (s *QueryNoWithContext) GetOffset() IRowCountContext { return s.offset } + +func (s *QueryNoWithContext) GetLimit() ILimitRowCountContext { return s.limit } + +func (s *QueryNoWithContext) GetFetchFirst() IRowCountContext { return s.fetchFirst } + +func (s *QueryNoWithContext) SetOffset(v IRowCountContext) { s.offset = v } + +func (s *QueryNoWithContext) SetLimit(v ILimitRowCountContext) { s.limit = v } + +func (s *QueryNoWithContext) SetFetchFirst(v IRowCountContext) { s.fetchFirst = v } + +func (s *QueryNoWithContext) QueryTerm() IQueryTermContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryTermContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryTermContext) +} + +func (s *QueryNoWithContext) ORDER_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDER_, 0) +} + +func (s *QueryNoWithContext) BY_() antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, 0) +} + +func (s *QueryNoWithContext) AllSortItem() []ISortItemContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISortItemContext); ok { + len++ + } + } + + tst := make([]ISortItemContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISortItemContext); ok { + tst[i] = t.(ISortItemContext) + i++ + } + } + + return tst +} + +func (s *QueryNoWithContext) SortItem(i int) ISortItemContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISortItemContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISortItemContext) +} + +func (s *QueryNoWithContext) OFFSET_() antlr.TerminalNode { + return s.GetToken(TrinoParserOFFSET_, 0) +} + +func (s *QueryNoWithContext) LIMIT_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIMIT_, 0) +} + +func (s *QueryNoWithContext) FETCH_() antlr.TerminalNode { + return s.GetToken(TrinoParserFETCH_, 0) +} + +func (s *QueryNoWithContext) AllRowCount() []IRowCountContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRowCountContext); ok { + len++ + } + } + + tst := make([]IRowCountContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRowCountContext); ok { + tst[i] = t.(IRowCountContext) + i++ + } + } + + return tst +} + +func (s *QueryNoWithContext) RowCount(i int) IRowCountContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowCountContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRowCountContext) +} + +func (s *QueryNoWithContext) LimitRowCount() ILimitRowCountContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ILimitRowCountContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ILimitRowCountContext) +} + +func (s *QueryNoWithContext) FIRST_() antlr.TerminalNode { + return s.GetToken(TrinoParserFIRST_, 0) +} + +func (s *QueryNoWithContext) NEXT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNEXT_, 0) +} + +func (s *QueryNoWithContext) AllROW_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserROW_) +} + +func (s *QueryNoWithContext) ROW_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserROW_, i) +} + +func (s *QueryNoWithContext) AllROWS_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserROWS_) +} + +func (s *QueryNoWithContext) ROWS_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserROWS_, i) +} + +func (s *QueryNoWithContext) ONLY_() antlr.TerminalNode { + return s.GetToken(TrinoParserONLY_, 0) +} + +func (s *QueryNoWithContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *QueryNoWithContext) TIES_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIES_, 0) +} + +func (s *QueryNoWithContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *QueryNoWithContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *QueryNoWithContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QueryNoWithContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *QueryNoWithContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQueryNoWith(s) + } +} + +func (s *QueryNoWithContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQueryNoWith(s) + } +} + +func (s *QueryNoWithContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQueryNoWith(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) QueryNoWith() (localctx IQueryNoWithContext) { + localctx = NewQueryNoWithContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 40, TrinoParserRULE_queryNoWith) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1241) + p.queryTerm(0) + } + p.SetState(1252) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserORDER_ { + { + p.SetState(1242) + p.Match(TrinoParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1243) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1244) + p.SortItem() + } + p.SetState(1249) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1245) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1246) + p.SortItem() + } + + p.SetState(1251) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(1259) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOFFSET_ { + { + p.SetState(1254) + p.Match(TrinoParserOFFSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1255) + + var _x = p.RowCount() + + localctx.(*QueryNoWithContext).offset = _x + } + p.SetState(1257) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserROW_ || _la == TrinoParserROWS_ { + { + p.SetState(1256) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserROW_ || _la == TrinoParserROWS_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + + } + p.SetState(1274) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + switch p.GetTokenStream().LA(1) { + case TrinoParserLIMIT_: + { + p.SetState(1261) + p.Match(TrinoParserLIMIT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1262) + + var _x = p.LimitRowCount() + + localctx.(*QueryNoWithContext).limit = _x + } + + case TrinoParserFETCH_: + { + p.SetState(1263) + p.Match(TrinoParserFETCH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1264) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFIRST_ || _la == TrinoParserNEXT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + p.SetState(1266) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserQUESTION_MARK_ || _la == TrinoParserINTEGER_VALUE_ { + { + p.SetState(1265) + + var _x = p.RowCount() + + localctx.(*QueryNoWithContext).fetchFirst = _x + } + + } + { + p.SetState(1268) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserROW_ || _la == TrinoParserROWS_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + p.SetState(1272) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserONLY_: + { + p.SetState(1269) + p.Match(TrinoParserONLY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserWITH_: + { + p.SetState(1270) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1271) + p.Match(TrinoParserTIES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + case TrinoParserWITH_, TrinoParserSEMICOLON_, TrinoParserRPAREN_: + + default: + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ILimitRowCountContext is an interface to support dynamic dispatch. +type ILimitRowCountContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ALL_() antlr.TerminalNode + RowCount() IRowCountContext + + // IsLimitRowCountContext differentiates from other interfaces. + IsLimitRowCountContext() +} + +type LimitRowCountContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyLimitRowCountContext() *LimitRowCountContext { + var p = new(LimitRowCountContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_limitRowCount + return p +} + +func InitEmptyLimitRowCountContext(p *LimitRowCountContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_limitRowCount +} + +func (*LimitRowCountContext) IsLimitRowCountContext() {} + +func NewLimitRowCountContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LimitRowCountContext { + var p = new(LimitRowCountContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_limitRowCount + + return p +} + +func (s *LimitRowCountContext) GetParser() antlr.Parser { return s.parser } + +func (s *LimitRowCountContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *LimitRowCountContext) RowCount() IRowCountContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowCountContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRowCountContext) +} + +func (s *LimitRowCountContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LimitRowCountContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *LimitRowCountContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLimitRowCount(s) + } +} + +func (s *LimitRowCountContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLimitRowCount(s) + } +} + +func (s *LimitRowCountContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLimitRowCount(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) LimitRowCount() (localctx ILimitRowCountContext) { + localctx = NewLimitRowCountContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 42, TrinoParserRULE_limitRowCount) + p.SetState(1278) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserALL_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1276) + p.Match(TrinoParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserQUESTION_MARK_, TrinoParserINTEGER_VALUE_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1277) + p.RowCount() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRowCountContext is an interface to support dynamic dispatch. +type IRowCountContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + INTEGER_VALUE_() antlr.TerminalNode + QUESTION_MARK_() antlr.TerminalNode + + // IsRowCountContext differentiates from other interfaces. + IsRowCountContext() +} + +type RowCountContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRowCountContext() *RowCountContext { + var p = new(RowCountContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowCount + return p +} + +func InitEmptyRowCountContext(p *RowCountContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowCount +} + +func (*RowCountContext) IsRowCountContext() {} + +func NewRowCountContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RowCountContext { + var p = new(RowCountContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_rowCount + + return p +} + +func (s *RowCountContext) GetParser() antlr.Parser { return s.parser } + +func (s *RowCountContext) INTEGER_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTEGER_VALUE_, 0) +} + +func (s *RowCountContext) QUESTION_MARK_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUESTION_MARK_, 0) +} + +func (s *RowCountContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RowCountContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *RowCountContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRowCount(s) + } +} + +func (s *RowCountContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRowCount(s) + } +} + +func (s *RowCountContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRowCount(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RowCount() (localctx IRowCountContext) { + localctx = NewRowCountContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 44, TrinoParserRULE_rowCount) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1280) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserQUESTION_MARK_ || _la == TrinoParserINTEGER_VALUE_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IQueryTermContext is an interface to support dynamic dispatch. +type IQueryTermContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsQueryTermContext differentiates from other interfaces. + IsQueryTermContext() +} + +type QueryTermContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyQueryTermContext() *QueryTermContext { + var p = new(QueryTermContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryTerm + return p +} + +func InitEmptyQueryTermContext(p *QueryTermContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryTerm +} + +func (*QueryTermContext) IsQueryTermContext() {} + +func NewQueryTermContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QueryTermContext { + var p = new(QueryTermContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_queryTerm + + return p +} + +func (s *QueryTermContext) GetParser() antlr.Parser { return s.parser } + +func (s *QueryTermContext) CopyAll(ctx *QueryTermContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *QueryTermContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QueryTermContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type QueryTermDefaultContext struct { + QueryTermContext +} + +func NewQueryTermDefaultContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *QueryTermDefaultContext { + var p = new(QueryTermDefaultContext) + + InitEmptyQueryTermContext(&p.QueryTermContext) + p.parser = parser + p.CopyAll(ctx.(*QueryTermContext)) + + return p +} + +func (s *QueryTermDefaultContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QueryTermDefaultContext) QueryPrimary() IQueryPrimaryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryPrimaryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryPrimaryContext) +} + +func (s *QueryTermDefaultContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQueryTermDefault(s) + } +} + +func (s *QueryTermDefaultContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQueryTermDefault(s) + } +} + +func (s *QueryTermDefaultContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQueryTermDefault(s) + + default: + return t.VisitChildren(s) + } +} + +type SetOperationContext struct { + QueryTermContext + left IQueryTermContext + operator antlr.Token + right IQueryTermContext +} + +func NewSetOperationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SetOperationContext { + var p = new(SetOperationContext) + + InitEmptyQueryTermContext(&p.QueryTermContext) + p.parser = parser + p.CopyAll(ctx.(*QueryTermContext)) + + return p +} + +func (s *SetOperationContext) GetOperator() antlr.Token { return s.operator } + +func (s *SetOperationContext) SetOperator(v antlr.Token) { s.operator = v } + +func (s *SetOperationContext) GetLeft() IQueryTermContext { return s.left } + +func (s *SetOperationContext) GetRight() IQueryTermContext { return s.right } + +func (s *SetOperationContext) SetLeft(v IQueryTermContext) { s.left = v } + +func (s *SetOperationContext) SetRight(v IQueryTermContext) { s.right = v } + +func (s *SetOperationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetOperationContext) AllQueryTerm() []IQueryTermContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQueryTermContext); ok { + len++ + } + } + + tst := make([]IQueryTermContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQueryTermContext); ok { + tst[i] = t.(IQueryTermContext) + i++ + } + } + + return tst +} + +func (s *SetOperationContext) QueryTerm(i int) IQueryTermContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryTermContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQueryTermContext) +} + +func (s *SetOperationContext) INTERSECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTERSECT_, 0) +} + +func (s *SetOperationContext) SetQuantifier() ISetQuantifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISetQuantifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISetQuantifierContext) +} + +func (s *SetOperationContext) UNION_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNION_, 0) +} + +func (s *SetOperationContext) EXCEPT_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXCEPT_, 0) +} + +func (s *SetOperationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetOperation(s) + } +} + +func (s *SetOperationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetOperation(s) + } +} + +func (s *SetOperationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetOperation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) QueryTerm() (localctx IQueryTermContext) { + return p.queryTerm(0) +} + +func (p *TrinoParser) queryTerm(_p int) (localctx IQueryTermContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewQueryTermContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IQueryTermContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 46 + p.EnterRecursionRule(localctx, 46, TrinoParserRULE_queryTerm, _p) + var _la int + + var _alt int + + p.EnterOuterAlt(localctx, 1) + localctx = NewQueryTermDefaultContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + + { + p.SetState(1283) + p.QueryPrimary() + } + + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(1299) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 147, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + p.SetState(1297) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 146, p.GetParserRuleContext()) { + case 1: + localctx = NewSetOperationContext(p, NewQueryTermContext(p, _parentctx, _parentState)) + localctx.(*SetOperationContext).left = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_queryTerm) + p.SetState(1285) + + if !(p.Precpred(p.GetParserRuleContext(), 2)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit + } + { + p.SetState(1286) + + var _m = p.Match(TrinoParserINTERSECT_) + + localctx.(*SetOperationContext).operator = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1288) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserALL_ || _la == TrinoParserDISTINCT_ { + { + p.SetState(1287) + p.SetQuantifier() + } + + } + { + p.SetState(1290) + + var _x = p.queryTerm(3) + + localctx.(*SetOperationContext).right = _x + } + + case 2: + localctx = NewSetOperationContext(p, NewQueryTermContext(p, _parentctx, _parentState)) + localctx.(*SetOperationContext).left = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_queryTerm) + p.SetState(1291) + + if !(p.Precpred(p.GetParserRuleContext(), 1)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + goto errorExit + } + { + p.SetState(1292) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*SetOperationContext).operator = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserEXCEPT_ || _la == TrinoParserUNION_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*SetOperationContext).operator = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + p.SetState(1294) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserALL_ || _la == TrinoParserDISTINCT_ { + { + p.SetState(1293) + p.SetQuantifier() + } + + } + { + p.SetState(1296) + + var _x = p.queryTerm(2) + + localctx.(*SetOperationContext).right = _x + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + } + p.SetState(1301) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 147, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IQueryPrimaryContext is an interface to support dynamic dispatch. +type IQueryPrimaryContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsQueryPrimaryContext differentiates from other interfaces. + IsQueryPrimaryContext() +} + +type QueryPrimaryContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyQueryPrimaryContext() *QueryPrimaryContext { + var p = new(QueryPrimaryContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryPrimary + return p +} + +func InitEmptyQueryPrimaryContext(p *QueryPrimaryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryPrimary +} + +func (*QueryPrimaryContext) IsQueryPrimaryContext() {} + +func NewQueryPrimaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QueryPrimaryContext { + var p = new(QueryPrimaryContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_queryPrimary + + return p +} + +func (s *QueryPrimaryContext) GetParser() antlr.Parser { return s.parser } + +func (s *QueryPrimaryContext) CopyAll(ctx *QueryPrimaryContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *QueryPrimaryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QueryPrimaryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type SubqueryContext struct { + QueryPrimaryContext +} + +func NewSubqueryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SubqueryContext { + var p = new(SubqueryContext) + + InitEmptyQueryPrimaryContext(&p.QueryPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*QueryPrimaryContext)) + + return p +} + +func (s *SubqueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SubqueryContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *SubqueryContext) QueryNoWith() IQueryNoWithContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryNoWithContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryNoWithContext) +} + +func (s *SubqueryContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *SubqueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSubquery(s) + } +} + +func (s *SubqueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSubquery(s) + } +} + +func (s *SubqueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSubquery(s) + + default: + return t.VisitChildren(s) + } +} + +type QueryPrimaryDefaultContext struct { + QueryPrimaryContext +} + +func NewQueryPrimaryDefaultContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *QueryPrimaryDefaultContext { + var p = new(QueryPrimaryDefaultContext) + + InitEmptyQueryPrimaryContext(&p.QueryPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*QueryPrimaryContext)) + + return p +} + +func (s *QueryPrimaryDefaultContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QueryPrimaryDefaultContext) QuerySpecification() IQuerySpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQuerySpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQuerySpecificationContext) +} + +func (s *QueryPrimaryDefaultContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQueryPrimaryDefault(s) + } +} + +func (s *QueryPrimaryDefaultContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQueryPrimaryDefault(s) + } +} + +func (s *QueryPrimaryDefaultContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQueryPrimaryDefault(s) + + default: + return t.VisitChildren(s) + } +} + +type TableContext struct { + QueryPrimaryContext +} + +func NewTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TableContext { + var p = new(TableContext) + + InitEmptyQueryPrimaryContext(&p.QueryPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*QueryPrimaryContext)) + + return p +} + +func (s *TableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *TableContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *TableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTable(s) + } +} + +func (s *TableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTable(s) + } +} + +func (s *TableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTable(s) + + default: + return t.VisitChildren(s) + } +} + +type InlineTableContext struct { + QueryPrimaryContext +} + +func NewInlineTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *InlineTableContext { + var p = new(InlineTableContext) + + InitEmptyQueryPrimaryContext(&p.QueryPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*QueryPrimaryContext)) + + return p +} + +func (s *InlineTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *InlineTableContext) VALUES_() antlr.TerminalNode { + return s.GetToken(TrinoParserVALUES_, 0) +} + +func (s *InlineTableContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *InlineTableContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *InlineTableContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *InlineTableContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *InlineTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterInlineTable(s) + } +} + +func (s *InlineTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitInlineTable(s) + } +} + +func (s *InlineTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitInlineTable(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) QueryPrimary() (localctx IQueryPrimaryContext) { + localctx = NewQueryPrimaryContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 48, TrinoParserRULE_queryPrimary) + var _alt int + + p.SetState(1318) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserSELECT_: + localctx = NewQueryPrimaryDefaultContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1302) + p.QuerySpecification() + } + + case TrinoParserTABLE_: + localctx = NewTableContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1303) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1304) + p.QualifiedName() + } + + case TrinoParserVALUES_: + localctx = NewInlineTableContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(1305) + p.Match(TrinoParserVALUES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1306) + p.Expression() + } + p.SetState(1311) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 148, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(1307) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1308) + p.Expression() + } + + } + p.SetState(1313) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 148, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + + case TrinoParserLPAREN_: + localctx = NewSubqueryContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(1314) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1315) + p.QueryNoWith() + } + { + p.SetState(1316) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISortItemContext is an interface to support dynamic dispatch. +type ISortItemContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetOrdering returns the ordering token. + GetOrdering() antlr.Token + + // GetNullOrdering returns the nullOrdering token. + GetNullOrdering() antlr.Token + + // SetOrdering sets the ordering token. + SetOrdering(antlr.Token) + + // SetNullOrdering sets the nullOrdering token. + SetNullOrdering(antlr.Token) + + // Getter signatures + Expression() IExpressionContext + NULLS_() antlr.TerminalNode + ASC_() antlr.TerminalNode + DESC_() antlr.TerminalNode + FIRST_() antlr.TerminalNode + LAST_() antlr.TerminalNode + + // IsSortItemContext differentiates from other interfaces. + IsSortItemContext() +} + +type SortItemContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + ordering antlr.Token + nullOrdering antlr.Token +} + +func NewEmptySortItemContext() *SortItemContext { + var p = new(SortItemContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sortItem + return p +} + +func InitEmptySortItemContext(p *SortItemContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sortItem +} + +func (*SortItemContext) IsSortItemContext() {} + +func NewSortItemContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SortItemContext { + var p = new(SortItemContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_sortItem + + return p +} + +func (s *SortItemContext) GetParser() antlr.Parser { return s.parser } + +func (s *SortItemContext) GetOrdering() antlr.Token { return s.ordering } + +func (s *SortItemContext) GetNullOrdering() antlr.Token { return s.nullOrdering } + +func (s *SortItemContext) SetOrdering(v antlr.Token) { s.ordering = v } + +func (s *SortItemContext) SetNullOrdering(v antlr.Token) { s.nullOrdering = v } + +func (s *SortItemContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SortItemContext) NULLS_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULLS_, 0) +} + +func (s *SortItemContext) ASC_() antlr.TerminalNode { + return s.GetToken(TrinoParserASC_, 0) +} + +func (s *SortItemContext) DESC_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESC_, 0) +} + +func (s *SortItemContext) FIRST_() antlr.TerminalNode { + return s.GetToken(TrinoParserFIRST_, 0) +} + +func (s *SortItemContext) LAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserLAST_, 0) +} + +func (s *SortItemContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SortItemContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SortItemContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSortItem(s) + } +} + +func (s *SortItemContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSortItem(s) + } +} + +func (s *SortItemContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSortItem(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SortItem() (localctx ISortItemContext) { + localctx = NewSortItemContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 50, TrinoParserRULE_sortItem) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1320) + p.Expression() + } + p.SetState(1322) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserASC_ || _la == TrinoParserDESC_ { + { + p.SetState(1321) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*SortItemContext).ordering = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserASC_ || _la == TrinoParserDESC_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*SortItemContext).ordering = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + p.SetState(1326) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNULLS_ { + { + p.SetState(1324) + p.Match(TrinoParserNULLS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1325) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*SortItemContext).nullOrdering = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFIRST_ || _la == TrinoParserLAST_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*SortItemContext).nullOrdering = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IQuerySpecificationContext is an interface to support dynamic dispatch. +type IQuerySpecificationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetWhere returns the where rule contexts. + GetWhere() IBooleanExpressionContext + + // GetHaving returns the having rule contexts. + GetHaving() IBooleanExpressionContext + + // SetWhere sets the where rule contexts. + SetWhere(IBooleanExpressionContext) + + // SetHaving sets the having rule contexts. + SetHaving(IBooleanExpressionContext) + + // Getter signatures + SELECT_() antlr.TerminalNode + AllSelectItem() []ISelectItemContext + SelectItem(i int) ISelectItemContext + SetQuantifier() ISetQuantifierContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + FROM_() antlr.TerminalNode + AllRelation() []IRelationContext + Relation(i int) IRelationContext + WHERE_() antlr.TerminalNode + GROUP_() antlr.TerminalNode + BY_() antlr.TerminalNode + GroupBy() IGroupByContext + HAVING_() antlr.TerminalNode + WINDOW_() antlr.TerminalNode + AllWindowDefinition() []IWindowDefinitionContext + WindowDefinition(i int) IWindowDefinitionContext + AllBooleanExpression() []IBooleanExpressionContext + BooleanExpression(i int) IBooleanExpressionContext + + // IsQuerySpecificationContext differentiates from other interfaces. + IsQuerySpecificationContext() +} + +type QuerySpecificationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + where IBooleanExpressionContext + having IBooleanExpressionContext +} + +func NewEmptyQuerySpecificationContext() *QuerySpecificationContext { + var p = new(QuerySpecificationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_querySpecification + return p +} + +func InitEmptyQuerySpecificationContext(p *QuerySpecificationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_querySpecification +} + +func (*QuerySpecificationContext) IsQuerySpecificationContext() {} + +func NewQuerySpecificationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QuerySpecificationContext { + var p = new(QuerySpecificationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_querySpecification + + return p +} + +func (s *QuerySpecificationContext) GetParser() antlr.Parser { return s.parser } + +func (s *QuerySpecificationContext) GetWhere() IBooleanExpressionContext { return s.where } + +func (s *QuerySpecificationContext) GetHaving() IBooleanExpressionContext { return s.having } + +func (s *QuerySpecificationContext) SetWhere(v IBooleanExpressionContext) { s.where = v } + +func (s *QuerySpecificationContext) SetHaving(v IBooleanExpressionContext) { s.having = v } + +func (s *QuerySpecificationContext) SELECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserSELECT_, 0) +} + +func (s *QuerySpecificationContext) AllSelectItem() []ISelectItemContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISelectItemContext); ok { + len++ + } + } + + tst := make([]ISelectItemContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISelectItemContext); ok { + tst[i] = t.(ISelectItemContext) + i++ + } + } + + return tst +} + +func (s *QuerySpecificationContext) SelectItem(i int) ISelectItemContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISelectItemContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISelectItemContext) +} + +func (s *QuerySpecificationContext) SetQuantifier() ISetQuantifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISetQuantifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISetQuantifierContext) +} + +func (s *QuerySpecificationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *QuerySpecificationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *QuerySpecificationContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *QuerySpecificationContext) AllRelation() []IRelationContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRelationContext); ok { + len++ + } + } + + tst := make([]IRelationContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRelationContext); ok { + tst[i] = t.(IRelationContext) + i++ + } + } + + return tst +} + +func (s *QuerySpecificationContext) Relation(i int) IRelationContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRelationContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRelationContext) +} + +func (s *QuerySpecificationContext) WHERE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHERE_, 0) +} + +func (s *QuerySpecificationContext) GROUP_() antlr.TerminalNode { + return s.GetToken(TrinoParserGROUP_, 0) +} + +func (s *QuerySpecificationContext) BY_() antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, 0) +} + +func (s *QuerySpecificationContext) GroupBy() IGroupByContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IGroupByContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IGroupByContext) +} + +func (s *QuerySpecificationContext) HAVING_() antlr.TerminalNode { + return s.GetToken(TrinoParserHAVING_, 0) +} + +func (s *QuerySpecificationContext) WINDOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserWINDOW_, 0) +} + +func (s *QuerySpecificationContext) AllWindowDefinition() []IWindowDefinitionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IWindowDefinitionContext); ok { + len++ + } + } + + tst := make([]IWindowDefinitionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IWindowDefinitionContext); ok { + tst[i] = t.(IWindowDefinitionContext) + i++ + } + } + + return tst +} + +func (s *QuerySpecificationContext) WindowDefinition(i int) IWindowDefinitionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWindowDefinitionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IWindowDefinitionContext) +} + +func (s *QuerySpecificationContext) AllBooleanExpression() []IBooleanExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IBooleanExpressionContext); ok { + len++ + } + } + + tst := make([]IBooleanExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IBooleanExpressionContext); ok { + tst[i] = t.(IBooleanExpressionContext) + i++ + } + } + + return tst +} + +func (s *QuerySpecificationContext) BooleanExpression(i int) IBooleanExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *QuerySpecificationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QuerySpecificationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *QuerySpecificationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQuerySpecification(s) + } +} + +func (s *QuerySpecificationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQuerySpecification(s) + } +} + +func (s *QuerySpecificationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQuerySpecification(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) QuerySpecification() (localctx IQuerySpecificationContext) { + localctx = NewQuerySpecificationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 52, TrinoParserRULE_querySpecification) + var _alt int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1328) + p.Match(TrinoParserSELECT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1330) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 152, p.GetParserRuleContext()) == 1 { + { + p.SetState(1329) + p.SetQuantifier() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(1332) + p.SelectItem() + } + p.SetState(1337) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 153, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(1333) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1334) + p.SelectItem() + } + + } + p.SetState(1339) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 153, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + p.SetState(1349) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 155, p.GetParserRuleContext()) == 1 { + { + p.SetState(1340) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1341) + p.relation(0) + } + p.SetState(1346) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 154, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(1342) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1343) + p.relation(0) + } + + } + p.SetState(1348) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 154, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(1353) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 156, p.GetParserRuleContext()) == 1 { + { + p.SetState(1351) + p.Match(TrinoParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1352) + + var _x = p.booleanExpression(0) + + localctx.(*QuerySpecificationContext).where = _x + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(1358) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 157, p.GetParserRuleContext()) == 1 { + { + p.SetState(1355) + p.Match(TrinoParserGROUP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1356) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1357) + p.GroupBy() + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(1362) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 158, p.GetParserRuleContext()) == 1 { + { + p.SetState(1360) + p.Match(TrinoParserHAVING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1361) + + var _x = p.booleanExpression(0) + + localctx.(*QuerySpecificationContext).having = _x + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(1373) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 160, p.GetParserRuleContext()) == 1 { + { + p.SetState(1364) + p.Match(TrinoParserWINDOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1365) + p.WindowDefinition() + } + p.SetState(1370) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 159, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(1366) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1367) + p.WindowDefinition() + } + + } + p.SetState(1372) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 159, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IGroupByContext is an interface to support dynamic dispatch. +type IGroupByContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + AllGroupingElement() []IGroupingElementContext + GroupingElement(i int) IGroupingElementContext + SetQuantifier() ISetQuantifierContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsGroupByContext differentiates from other interfaces. + IsGroupByContext() +} + +type GroupByContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyGroupByContext() *GroupByContext { + var p = new(GroupByContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_groupBy + return p +} + +func InitEmptyGroupByContext(p *GroupByContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_groupBy +} + +func (*GroupByContext) IsGroupByContext() {} + +func NewGroupByContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GroupByContext { + var p = new(GroupByContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_groupBy + + return p +} + +func (s *GroupByContext) GetParser() antlr.Parser { return s.parser } + +func (s *GroupByContext) AllGroupingElement() []IGroupingElementContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IGroupingElementContext); ok { + len++ + } + } + + tst := make([]IGroupingElementContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IGroupingElementContext); ok { + tst[i] = t.(IGroupingElementContext) + i++ + } + } + + return tst +} + +func (s *GroupByContext) GroupingElement(i int) IGroupingElementContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IGroupingElementContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IGroupingElementContext) +} + +func (s *GroupByContext) SetQuantifier() ISetQuantifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISetQuantifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISetQuantifierContext) +} + +func (s *GroupByContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *GroupByContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *GroupByContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GroupByContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *GroupByContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterGroupBy(s) + } +} + +func (s *GroupByContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitGroupBy(s) + } +} + +func (s *GroupByContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitGroupBy(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) GroupBy() (localctx IGroupByContext) { + localctx = NewGroupByContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 54, TrinoParserRULE_groupBy) + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(1376) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 161, p.GetParserRuleContext()) == 1 { + { + p.SetState(1375) + p.SetQuantifier() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(1378) + p.GroupingElement() + } + p.SetState(1383) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 162, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(1379) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1380) + p.GroupingElement() + } + + } + p.SetState(1385) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 162, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IGroupingElementContext is an interface to support dynamic dispatch. +type IGroupingElementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsGroupingElementContext differentiates from other interfaces. + IsGroupingElementContext() +} + +type GroupingElementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyGroupingElementContext() *GroupingElementContext { + var p = new(GroupingElementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_groupingElement + return p +} + +func InitEmptyGroupingElementContext(p *GroupingElementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_groupingElement +} + +func (*GroupingElementContext) IsGroupingElementContext() {} + +func NewGroupingElementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GroupingElementContext { + var p = new(GroupingElementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_groupingElement + + return p +} + +func (s *GroupingElementContext) GetParser() antlr.Parser { return s.parser } + +func (s *GroupingElementContext) CopyAll(ctx *GroupingElementContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *GroupingElementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GroupingElementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type MultipleGroupingSetsContext struct { + GroupingElementContext +} + +func NewMultipleGroupingSetsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MultipleGroupingSetsContext { + var p = new(MultipleGroupingSetsContext) + + InitEmptyGroupingElementContext(&p.GroupingElementContext) + p.parser = parser + p.CopyAll(ctx.(*GroupingElementContext)) + + return p +} + +func (s *MultipleGroupingSetsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MultipleGroupingSetsContext) GROUPING_() antlr.TerminalNode { + return s.GetToken(TrinoParserGROUPING_, 0) +} + +func (s *MultipleGroupingSetsContext) SETS_() antlr.TerminalNode { + return s.GetToken(TrinoParserSETS_, 0) +} + +func (s *MultipleGroupingSetsContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *MultipleGroupingSetsContext) AllGroupingSet() []IGroupingSetContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IGroupingSetContext); ok { + len++ + } + } + + tst := make([]IGroupingSetContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IGroupingSetContext); ok { + tst[i] = t.(IGroupingSetContext) + i++ + } + } + + return tst +} + +func (s *MultipleGroupingSetsContext) GroupingSet(i int) IGroupingSetContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IGroupingSetContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IGroupingSetContext) +} + +func (s *MultipleGroupingSetsContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *MultipleGroupingSetsContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *MultipleGroupingSetsContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *MultipleGroupingSetsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterMultipleGroupingSets(s) + } +} + +func (s *MultipleGroupingSetsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitMultipleGroupingSets(s) + } +} + +func (s *MultipleGroupingSetsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitMultipleGroupingSets(s) + + default: + return t.VisitChildren(s) + } +} + +type SingleGroupingSetContext struct { + GroupingElementContext +} + +func NewSingleGroupingSetContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SingleGroupingSetContext { + var p = new(SingleGroupingSetContext) + + InitEmptyGroupingElementContext(&p.GroupingElementContext) + p.parser = parser + p.CopyAll(ctx.(*GroupingElementContext)) + + return p +} + +func (s *SingleGroupingSetContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SingleGroupingSetContext) GroupingSet() IGroupingSetContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IGroupingSetContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IGroupingSetContext) +} + +func (s *SingleGroupingSetContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSingleGroupingSet(s) + } +} + +func (s *SingleGroupingSetContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSingleGroupingSet(s) + } +} + +func (s *SingleGroupingSetContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSingleGroupingSet(s) + + default: + return t.VisitChildren(s) + } +} + +type CubeContext struct { + GroupingElementContext +} + +func NewCubeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CubeContext { + var p = new(CubeContext) + + InitEmptyGroupingElementContext(&p.GroupingElementContext) + p.parser = parser + p.CopyAll(ctx.(*GroupingElementContext)) + + return p +} + +func (s *CubeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CubeContext) CUBE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCUBE_, 0) +} + +func (s *CubeContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *CubeContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *CubeContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *CubeContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *CubeContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *CubeContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *CubeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCube(s) + } +} + +func (s *CubeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCube(s) + } +} + +func (s *CubeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCube(s) + + default: + return t.VisitChildren(s) + } +} + +type RollupContext struct { + GroupingElementContext +} + +func NewRollupContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RollupContext { + var p = new(RollupContext) + + InitEmptyGroupingElementContext(&p.GroupingElementContext) + p.parser = parser + p.CopyAll(ctx.(*GroupingElementContext)) + + return p +} + +func (s *RollupContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RollupContext) ROLLUP_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLLUP_, 0) +} + +func (s *RollupContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *RollupContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *RollupContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *RollupContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *RollupContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *RollupContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *RollupContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRollup(s) + } +} + +func (s *RollupContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRollup(s) + } +} + +func (s *RollupContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRollup(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) GroupingElement() (localctx IGroupingElementContext) { + localctx = NewGroupingElementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 56, TrinoParserRULE_groupingElement) + var _la int + + p.SetState(1426) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 168, p.GetParserRuleContext()) { + case 1: + localctx = NewSingleGroupingSetContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1386) + p.GroupingSet() + } + + case 2: + localctx = NewRollupContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1387) + p.Match(TrinoParserROLLUP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1388) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1397) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(1389) + p.Expression() + } + p.SetState(1394) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1390) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1391) + p.Expression() + } + + p.SetState(1396) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(1399) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewCubeContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(1400) + p.Match(TrinoParserCUBE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1401) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1410) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(1402) + p.Expression() + } + p.SetState(1407) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1403) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1404) + p.Expression() + } + + p.SetState(1409) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(1412) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 4: + localctx = NewMultipleGroupingSetsContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(1413) + p.Match(TrinoParserGROUPING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1414) + p.Match(TrinoParserSETS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1415) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1416) + p.GroupingSet() + } + p.SetState(1421) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1417) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1418) + p.GroupingSet() + } + + p.SetState(1423) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1424) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IGroupingSetContext is an interface to support dynamic dispatch. +type IGroupingSetContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + LPAREN_() antlr.TerminalNode + RPAREN_() antlr.TerminalNode + AllExpression() []IExpressionContext + Expression(i int) IExpressionContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsGroupingSetContext differentiates from other interfaces. + IsGroupingSetContext() +} + +type GroupingSetContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyGroupingSetContext() *GroupingSetContext { + var p = new(GroupingSetContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_groupingSet + return p +} + +func InitEmptyGroupingSetContext(p *GroupingSetContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_groupingSet +} + +func (*GroupingSetContext) IsGroupingSetContext() {} + +func NewGroupingSetContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GroupingSetContext { + var p = new(GroupingSetContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_groupingSet + + return p +} + +func (s *GroupingSetContext) GetParser() antlr.Parser { return s.parser } + +func (s *GroupingSetContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *GroupingSetContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *GroupingSetContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *GroupingSetContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *GroupingSetContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *GroupingSetContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *GroupingSetContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GroupingSetContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *GroupingSetContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterGroupingSet(s) + } +} + +func (s *GroupingSetContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitGroupingSet(s) + } +} + +func (s *GroupingSetContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitGroupingSet(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) GroupingSet() (localctx IGroupingSetContext) { + localctx = NewGroupingSetContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 58, TrinoParserRULE_groupingSet) + var _la int + + p.SetState(1441) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 171, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1428) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1437) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(1429) + p.Expression() + } + p.SetState(1434) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1430) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1431) + p.Expression() + } + + p.SetState(1436) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(1439) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1440) + p.Expression() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IWindowDefinitionContext is an interface to support dynamic dispatch. +type IWindowDefinitionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetName returns the name rule contexts. + GetName() IIdentifierContext + + // SetName sets the name rule contexts. + SetName(IIdentifierContext) + + // Getter signatures + AS_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + WindowSpecification() IWindowSpecificationContext + RPAREN_() antlr.TerminalNode + Identifier() IIdentifierContext + + // IsWindowDefinitionContext differentiates from other interfaces. + IsWindowDefinitionContext() +} + +type WindowDefinitionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + name IIdentifierContext +} + +func NewEmptyWindowDefinitionContext() *WindowDefinitionContext { + var p = new(WindowDefinitionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_windowDefinition + return p +} + +func InitEmptyWindowDefinitionContext(p *WindowDefinitionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_windowDefinition +} + +func (*WindowDefinitionContext) IsWindowDefinitionContext() {} + +func NewWindowDefinitionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WindowDefinitionContext { + var p = new(WindowDefinitionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_windowDefinition + + return p +} + +func (s *WindowDefinitionContext) GetParser() antlr.Parser { return s.parser } + +func (s *WindowDefinitionContext) GetName() IIdentifierContext { return s.name } + +func (s *WindowDefinitionContext) SetName(v IIdentifierContext) { s.name = v } + +func (s *WindowDefinitionContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *WindowDefinitionContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *WindowDefinitionContext) WindowSpecification() IWindowSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWindowSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IWindowSpecificationContext) +} + +func (s *WindowDefinitionContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *WindowDefinitionContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *WindowDefinitionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *WindowDefinitionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *WindowDefinitionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterWindowDefinition(s) + } +} + +func (s *WindowDefinitionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitWindowDefinition(s) + } +} + +func (s *WindowDefinitionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitWindowDefinition(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) WindowDefinition() (localctx IWindowDefinitionContext) { + localctx = NewWindowDefinitionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 60, TrinoParserRULE_windowDefinition) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1443) + + var _x = p.Identifier() + + localctx.(*WindowDefinitionContext).name = _x + } + { + p.SetState(1444) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1445) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1446) + p.WindowSpecification() + } + { + p.SetState(1447) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IWindowSpecificationContext is an interface to support dynamic dispatch. +type IWindowSpecificationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetExistingWindowName returns the existingWindowName rule contexts. + GetExistingWindowName() IIdentifierContext + + // Get_expression returns the _expression rule contexts. + Get_expression() IExpressionContext + + // SetExistingWindowName sets the existingWindowName rule contexts. + SetExistingWindowName(IIdentifierContext) + + // Set_expression sets the _expression rule contexts. + Set_expression(IExpressionContext) + + // GetPartition returns the partition rule context list. + GetPartition() []IExpressionContext + + // SetPartition sets the partition rule context list. + SetPartition([]IExpressionContext) + + // Getter signatures + PARTITION_() antlr.TerminalNode + AllBY_() []antlr.TerminalNode + BY_(i int) antlr.TerminalNode + ORDER_() antlr.TerminalNode + AllSortItem() []ISortItemContext + SortItem(i int) ISortItemContext + WindowFrame() IWindowFrameContext + Identifier() IIdentifierContext + AllExpression() []IExpressionContext + Expression(i int) IExpressionContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsWindowSpecificationContext differentiates from other interfaces. + IsWindowSpecificationContext() +} + +type WindowSpecificationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + existingWindowName IIdentifierContext + _expression IExpressionContext + partition []IExpressionContext +} + +func NewEmptyWindowSpecificationContext() *WindowSpecificationContext { + var p = new(WindowSpecificationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_windowSpecification + return p +} + +func InitEmptyWindowSpecificationContext(p *WindowSpecificationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_windowSpecification +} + +func (*WindowSpecificationContext) IsWindowSpecificationContext() {} + +func NewWindowSpecificationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WindowSpecificationContext { + var p = new(WindowSpecificationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_windowSpecification + + return p +} + +func (s *WindowSpecificationContext) GetParser() antlr.Parser { return s.parser } + +func (s *WindowSpecificationContext) GetExistingWindowName() IIdentifierContext { + return s.existingWindowName +} + +func (s *WindowSpecificationContext) Get_expression() IExpressionContext { return s._expression } + +func (s *WindowSpecificationContext) SetExistingWindowName(v IIdentifierContext) { + s.existingWindowName = v +} + +func (s *WindowSpecificationContext) Set_expression(v IExpressionContext) { s._expression = v } + +func (s *WindowSpecificationContext) GetPartition() []IExpressionContext { return s.partition } + +func (s *WindowSpecificationContext) SetPartition(v []IExpressionContext) { s.partition = v } + +func (s *WindowSpecificationContext) PARTITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPARTITION_, 0) +} + +func (s *WindowSpecificationContext) AllBY_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserBY_) +} + +func (s *WindowSpecificationContext) BY_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, i) +} + +func (s *WindowSpecificationContext) ORDER_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDER_, 0) +} + +func (s *WindowSpecificationContext) AllSortItem() []ISortItemContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISortItemContext); ok { + len++ + } + } + + tst := make([]ISortItemContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISortItemContext); ok { + tst[i] = t.(ISortItemContext) + i++ + } + } + + return tst +} + +func (s *WindowSpecificationContext) SortItem(i int) ISortItemContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISortItemContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISortItemContext) +} + +func (s *WindowSpecificationContext) WindowFrame() IWindowFrameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWindowFrameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IWindowFrameContext) +} + +func (s *WindowSpecificationContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *WindowSpecificationContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *WindowSpecificationContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *WindowSpecificationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *WindowSpecificationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *WindowSpecificationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *WindowSpecificationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *WindowSpecificationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterWindowSpecification(s) + } +} + +func (s *WindowSpecificationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitWindowSpecification(s) + } +} + +func (s *WindowSpecificationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitWindowSpecification(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) WindowSpecification() (localctx IWindowSpecificationContext) { + localctx = NewWindowSpecificationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 62, TrinoParserRULE_windowSpecification) + var _la int + + p.EnterOuterAlt(localctx, 1) + p.SetState(1450) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 172, p.GetParserRuleContext()) == 1 { + { + p.SetState(1449) + + var _x = p.Identifier() + + localctx.(*WindowSpecificationContext).existingWindowName = _x + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(1462) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserPARTITION_ { + { + p.SetState(1452) + p.Match(TrinoParserPARTITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1453) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1454) + + var _x = p.Expression() + + localctx.(*WindowSpecificationContext)._expression = _x + } + localctx.(*WindowSpecificationContext).partition = append(localctx.(*WindowSpecificationContext).partition, localctx.(*WindowSpecificationContext)._expression) + p.SetState(1459) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1455) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1456) + + var _x = p.Expression() + + localctx.(*WindowSpecificationContext)._expression = _x + } + localctx.(*WindowSpecificationContext).partition = append(localctx.(*WindowSpecificationContext).partition, localctx.(*WindowSpecificationContext)._expression) + + p.SetState(1461) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(1474) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserORDER_ { + { + p.SetState(1464) + p.Match(TrinoParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1465) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1466) + p.SortItem() + } + p.SetState(1471) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1467) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1468) + p.SortItem() + } + + p.SetState(1473) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(1477) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserGROUPS_ || _la == TrinoParserMEASURES_ || _la == TrinoParserRANGE_ || _la == TrinoParserROWS_ { + { + p.SetState(1476) + p.WindowFrame() + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// INamedQueryContext is an interface to support dynamic dispatch. +type INamedQueryContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetName returns the name rule contexts. + GetName() IIdentifierContext + + // SetName sets the name rule contexts. + SetName(IIdentifierContext) + + // Getter signatures + AS_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + Query() IQueryContext + RPAREN_() antlr.TerminalNode + Identifier() IIdentifierContext + ColumnAliases() IColumnAliasesContext + + // IsNamedQueryContext differentiates from other interfaces. + IsNamedQueryContext() +} + +type NamedQueryContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + name IIdentifierContext +} + +func NewEmptyNamedQueryContext() *NamedQueryContext { + var p = new(NamedQueryContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_namedQuery + return p +} + +func InitEmptyNamedQueryContext(p *NamedQueryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_namedQuery +} + +func (*NamedQueryContext) IsNamedQueryContext() {} + +func NewNamedQueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NamedQueryContext { + var p = new(NamedQueryContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_namedQuery + + return p +} + +func (s *NamedQueryContext) GetParser() antlr.Parser { return s.parser } + +func (s *NamedQueryContext) GetName() IIdentifierContext { return s.name } + +func (s *NamedQueryContext) SetName(v IIdentifierContext) { s.name = v } + +func (s *NamedQueryContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *NamedQueryContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *NamedQueryContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *NamedQueryContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *NamedQueryContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *NamedQueryContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *NamedQueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NamedQueryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *NamedQueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNamedQuery(s) + } +} + +func (s *NamedQueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNamedQuery(s) + } +} + +func (s *NamedQueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNamedQuery(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) NamedQuery() (localctx INamedQueryContext) { + localctx = NewNamedQueryContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 64, TrinoParserRULE_namedQuery) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1479) + + var _x = p.Identifier() + + localctx.(*NamedQueryContext).name = _x + } + p.SetState(1481) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(1480) + p.ColumnAliases() + } + + } + { + p.SetState(1483) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1484) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1485) + p.Query() + } + { + p.SetState(1486) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISetQuantifierContext is an interface to support dynamic dispatch. +type ISetQuantifierContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + DISTINCT_() antlr.TerminalNode + ALL_() antlr.TerminalNode + + // IsSetQuantifierContext differentiates from other interfaces. + IsSetQuantifierContext() +} + +type SetQuantifierContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySetQuantifierContext() *SetQuantifierContext { + var p = new(SetQuantifierContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_setQuantifier + return p +} + +func InitEmptySetQuantifierContext(p *SetQuantifierContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_setQuantifier +} + +func (*SetQuantifierContext) IsSetQuantifierContext() {} + +func NewSetQuantifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SetQuantifierContext { + var p = new(SetQuantifierContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_setQuantifier + + return p +} + +func (s *SetQuantifierContext) GetParser() antlr.Parser { return s.parser } + +func (s *SetQuantifierContext) DISTINCT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDISTINCT_, 0) +} + +func (s *SetQuantifierContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *SetQuantifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SetQuantifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SetQuantifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSetQuantifier(s) + } +} + +func (s *SetQuantifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSetQuantifier(s) + } +} + +func (s *SetQuantifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSetQuantifier(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SetQuantifier() (localctx ISetQuantifierContext) { + localctx = NewSetQuantifierContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 66, TrinoParserRULE_setQuantifier) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1488) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserALL_ || _la == TrinoParserDISTINCT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISelectItemContext is an interface to support dynamic dispatch. +type ISelectItemContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsSelectItemContext differentiates from other interfaces. + IsSelectItemContext() +} + +type SelectItemContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySelectItemContext() *SelectItemContext { + var p = new(SelectItemContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_selectItem + return p +} + +func InitEmptySelectItemContext(p *SelectItemContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_selectItem +} + +func (*SelectItemContext) IsSelectItemContext() {} + +func NewSelectItemContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SelectItemContext { + var p = new(SelectItemContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_selectItem + + return p +} + +func (s *SelectItemContext) GetParser() antlr.Parser { return s.parser } + +func (s *SelectItemContext) CopyAll(ctx *SelectItemContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *SelectItemContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SelectItemContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type SelectAllContext struct { + SelectItemContext +} + +func NewSelectAllContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SelectAllContext { + var p = new(SelectAllContext) + + InitEmptySelectItemContext(&p.SelectItemContext) + p.parser = parser + p.CopyAll(ctx.(*SelectItemContext)) + + return p +} + +func (s *SelectAllContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SelectAllContext) PrimaryExpression() IPrimaryExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrimaryExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrimaryExpressionContext) +} + +func (s *SelectAllContext) DOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOT_, 0) +} + +func (s *SelectAllContext) ASTERISK_() antlr.TerminalNode { + return s.GetToken(TrinoParserASTERISK_, 0) +} + +func (s *SelectAllContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *SelectAllContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *SelectAllContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSelectAll(s) + } +} + +func (s *SelectAllContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSelectAll(s) + } +} + +func (s *SelectAllContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSelectAll(s) + + default: + return t.VisitChildren(s) + } +} + +type SelectSingleContext struct { + SelectItemContext +} + +func NewSelectSingleContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SelectSingleContext { + var p = new(SelectSingleContext) + + InitEmptySelectItemContext(&p.SelectItemContext) + p.parser = parser + p.CopyAll(ctx.(*SelectItemContext)) + + return p +} + +func (s *SelectSingleContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SelectSingleContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SelectSingleContext) As_column_alias() IAs_column_aliasContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IAs_column_aliasContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IAs_column_aliasContext) +} + +func (s *SelectSingleContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSelectSingle(s) + } +} + +func (s *SelectSingleContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSelectSingle(s) + } +} + +func (s *SelectSingleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSelectSingle(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SelectItem() (localctx ISelectItemContext) { + localctx = NewSelectItemContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 68, TrinoParserRULE_selectItem) + p.SetState(1502) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 181, p.GetParserRuleContext()) { + case 1: + localctx = NewSelectSingleContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1490) + p.Expression() + } + p.SetState(1492) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 179, p.GetParserRuleContext()) == 1 { + { + p.SetState(1491) + p.As_column_alias() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 2: + localctx = NewSelectAllContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1494) + p.primaryExpression(0) + } + { + p.SetState(1495) + p.Match(TrinoParserDOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1496) + p.Match(TrinoParserASTERISK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1499) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 180, p.GetParserRuleContext()) == 1 { + { + p.SetState(1497) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1498) + p.ColumnAliases() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 3: + localctx = NewSelectAllContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(1501) + p.Match(TrinoParserASTERISK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IAs_column_aliasContext is an interface to support dynamic dispatch. +type IAs_column_aliasContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Column_alias() IColumn_aliasContext + AS_() antlr.TerminalNode + + // IsAs_column_aliasContext differentiates from other interfaces. + IsAs_column_aliasContext() +} + +type As_column_aliasContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyAs_column_aliasContext() *As_column_aliasContext { + var p = new(As_column_aliasContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_as_column_alias + return p +} + +func InitEmptyAs_column_aliasContext(p *As_column_aliasContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_as_column_alias +} + +func (*As_column_aliasContext) IsAs_column_aliasContext() {} + +func NewAs_column_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *As_column_aliasContext { + var p = new(As_column_aliasContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_as_column_alias + + return p +} + +func (s *As_column_aliasContext) GetParser() antlr.Parser { return s.parser } + +func (s *As_column_aliasContext) Column_alias() IColumn_aliasContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumn_aliasContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumn_aliasContext) +} + +func (s *As_column_aliasContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *As_column_aliasContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *As_column_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *As_column_aliasContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterAs_column_alias(s) + } +} + +func (s *As_column_aliasContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitAs_column_alias(s) + } +} + +func (s *As_column_aliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitAs_column_alias(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) As_column_alias() (localctx IAs_column_aliasContext) { + localctx = NewAs_column_aliasContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 70, TrinoParserRULE_as_column_alias) + var _la int + + p.EnterOuterAlt(localctx, 1) + p.SetState(1505) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAS_ { + { + p.SetState(1504) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1507) + p.Column_alias() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IColumn_aliasContext is an interface to support dynamic dispatch. +type IColumn_aliasContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Identifier() IIdentifierContext + + // IsColumn_aliasContext differentiates from other interfaces. + IsColumn_aliasContext() +} + +type Column_aliasContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyColumn_aliasContext() *Column_aliasContext { + var p = new(Column_aliasContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_column_alias + return p +} + +func InitEmptyColumn_aliasContext(p *Column_aliasContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_column_alias +} + +func (*Column_aliasContext) IsColumn_aliasContext() {} + +func NewColumn_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_aliasContext { + var p = new(Column_aliasContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_column_alias + + return p +} + +func (s *Column_aliasContext) GetParser() antlr.Parser { return s.parser } + +func (s *Column_aliasContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Column_aliasContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Column_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Column_aliasContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterColumn_alias(s) + } +} + +func (s *Column_aliasContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitColumn_alias(s) + } +} + +func (s *Column_aliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitColumn_alias(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Column_alias() (localctx IColumn_aliasContext) { + localctx = NewColumn_aliasContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 72, TrinoParserRULE_column_alias) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1509) + p.Identifier() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRelationContext is an interface to support dynamic dispatch. +type IRelationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsRelationContext differentiates from other interfaces. + IsRelationContext() +} + +type RelationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRelationContext() *RelationContext { + var p = new(RelationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_relation + return p +} + +func InitEmptyRelationContext(p *RelationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_relation +} + +func (*RelationContext) IsRelationContext() {} + +func NewRelationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RelationContext { + var p = new(RelationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_relation + + return p +} + +func (s *RelationContext) GetParser() antlr.Parser { return s.parser } + +func (s *RelationContext) CopyAll(ctx *RelationContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *RelationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RelationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type RelationDefaultContext struct { + RelationContext +} + +func NewRelationDefaultContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RelationDefaultContext { + var p = new(RelationDefaultContext) + + InitEmptyRelationContext(&p.RelationContext) + p.parser = parser + p.CopyAll(ctx.(*RelationContext)) + + return p +} + +func (s *RelationDefaultContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RelationDefaultContext) SampledRelation() ISampledRelationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISampledRelationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISampledRelationContext) +} + +func (s *RelationDefaultContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRelationDefault(s) + } +} + +func (s *RelationDefaultContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRelationDefault(s) + } +} + +func (s *RelationDefaultContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRelationDefault(s) + + default: + return t.VisitChildren(s) + } +} + +type JoinRelationContext struct { + RelationContext + left IRelationContext + right ISampledRelationContext + rightRelation IRelationContext +} + +func NewJoinRelationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JoinRelationContext { + var p = new(JoinRelationContext) + + InitEmptyRelationContext(&p.RelationContext) + p.parser = parser + p.CopyAll(ctx.(*RelationContext)) + + return p +} + +func (s *JoinRelationContext) GetLeft() IRelationContext { return s.left } + +func (s *JoinRelationContext) GetRight() ISampledRelationContext { return s.right } + +func (s *JoinRelationContext) GetRightRelation() IRelationContext { return s.rightRelation } + +func (s *JoinRelationContext) SetLeft(v IRelationContext) { s.left = v } + +func (s *JoinRelationContext) SetRight(v ISampledRelationContext) { s.right = v } + +func (s *JoinRelationContext) SetRightRelation(v IRelationContext) { s.rightRelation = v } + +func (s *JoinRelationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JoinRelationContext) AllRelation() []IRelationContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRelationContext); ok { + len++ + } + } + + tst := make([]IRelationContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRelationContext); ok { + tst[i] = t.(IRelationContext) + i++ + } + } + + return tst +} + +func (s *JoinRelationContext) Relation(i int) IRelationContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRelationContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRelationContext) +} + +func (s *JoinRelationContext) CROSS_() antlr.TerminalNode { + return s.GetToken(TrinoParserCROSS_, 0) +} + +func (s *JoinRelationContext) JOIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserJOIN_, 0) +} + +func (s *JoinRelationContext) JoinType() IJoinTypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJoinTypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJoinTypeContext) +} + +func (s *JoinRelationContext) JoinCriteria() IJoinCriteriaContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJoinCriteriaContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJoinCriteriaContext) +} + +func (s *JoinRelationContext) NATURAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNATURAL_, 0) +} + +func (s *JoinRelationContext) SampledRelation() ISampledRelationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISampledRelationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISampledRelationContext) +} + +func (s *JoinRelationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJoinRelation(s) + } +} + +func (s *JoinRelationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJoinRelation(s) + } +} + +func (s *JoinRelationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJoinRelation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Relation() (localctx IRelationContext) { + return p.relation(0) +} + +func (p *TrinoParser) relation(_p int) (localctx IRelationContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewRelationContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IRelationContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 74 + p.EnterRecursionRule(localctx, 74, TrinoParserRULE_relation, _p) + var _alt int + + p.EnterOuterAlt(localctx, 1) + localctx = NewRelationDefaultContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + + { + p.SetState(1512) + p.SampledRelation() + } + + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(1532) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 184, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + localctx = NewJoinRelationContext(p, NewRelationContext(p, _parentctx, _parentState)) + localctx.(*JoinRelationContext).left = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_relation) + p.SetState(1514) + + if !(p.Precpred(p.GetParserRuleContext(), 2)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit + } + p.SetState(1528) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserCROSS_: + { + p.SetState(1515) + p.Match(TrinoParserCROSS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1516) + p.Match(TrinoParserJOIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1517) + + var _x = p.SampledRelation() + + localctx.(*JoinRelationContext).right = _x + } + + case TrinoParserFULL_, TrinoParserINNER_, TrinoParserJOIN_, TrinoParserLEFT_, TrinoParserRIGHT_: + { + p.SetState(1518) + p.JoinType() + } + { + p.SetState(1519) + p.Match(TrinoParserJOIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1520) + + var _x = p.relation(0) + + localctx.(*JoinRelationContext).rightRelation = _x + } + { + p.SetState(1521) + p.JoinCriteria() + } + + case TrinoParserNATURAL_: + { + p.SetState(1523) + p.Match(TrinoParserNATURAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1524) + p.JoinType() + } + { + p.SetState(1525) + p.Match(TrinoParserJOIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1526) + + var _x = p.SampledRelation() + + localctx.(*JoinRelationContext).right = _x + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + } + p.SetState(1534) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 184, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJoinTypeContext is an interface to support dynamic dispatch. +type IJoinTypeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + INNER_() antlr.TerminalNode + LEFT_() antlr.TerminalNode + RIGHT_() antlr.TerminalNode + FULL_() antlr.TerminalNode + OUTER_() antlr.TerminalNode + + // IsJoinTypeContext differentiates from other interfaces. + IsJoinTypeContext() +} + +type JoinTypeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJoinTypeContext() *JoinTypeContext { + var p = new(JoinTypeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_joinType + return p +} + +func InitEmptyJoinTypeContext(p *JoinTypeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_joinType +} + +func (*JoinTypeContext) IsJoinTypeContext() {} + +func NewJoinTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JoinTypeContext { + var p = new(JoinTypeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_joinType + + return p +} + +func (s *JoinTypeContext) GetParser() antlr.Parser { return s.parser } + +func (s *JoinTypeContext) INNER_() antlr.TerminalNode { + return s.GetToken(TrinoParserINNER_, 0) +} + +func (s *JoinTypeContext) LEFT_() antlr.TerminalNode { + return s.GetToken(TrinoParserLEFT_, 0) +} + +func (s *JoinTypeContext) RIGHT_() antlr.TerminalNode { + return s.GetToken(TrinoParserRIGHT_, 0) +} + +func (s *JoinTypeContext) FULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserFULL_, 0) +} + +func (s *JoinTypeContext) OUTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserOUTER_, 0) +} + +func (s *JoinTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JoinTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JoinTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJoinType(s) + } +} + +func (s *JoinTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJoinType(s) + } +} + +func (s *JoinTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJoinType(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JoinType() (localctx IJoinTypeContext) { + localctx = NewJoinTypeContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 76, TrinoParserRULE_joinType) + var _la int + + p.SetState(1542) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserINNER_, TrinoParserJOIN_: + p.EnterOuterAlt(localctx, 1) + p.SetState(1536) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserINNER_ { + { + p.SetState(1535) + p.Match(TrinoParserINNER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case TrinoParserFULL_, TrinoParserLEFT_, TrinoParserRIGHT_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1538) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFULL_ || _la == TrinoParserLEFT_ || _la == TrinoParserRIGHT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + p.SetState(1540) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOUTER_ { + { + p.SetState(1539) + p.Match(TrinoParserOUTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJoinCriteriaContext is an interface to support dynamic dispatch. +type IJoinCriteriaContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ON_() antlr.TerminalNode + BooleanExpression() IBooleanExpressionContext + USING_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + RPAREN_() antlr.TerminalNode + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsJoinCriteriaContext differentiates from other interfaces. + IsJoinCriteriaContext() +} + +type JoinCriteriaContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJoinCriteriaContext() *JoinCriteriaContext { + var p = new(JoinCriteriaContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_joinCriteria + return p +} + +func InitEmptyJoinCriteriaContext(p *JoinCriteriaContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_joinCriteria +} + +func (*JoinCriteriaContext) IsJoinCriteriaContext() {} + +func NewJoinCriteriaContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JoinCriteriaContext { + var p = new(JoinCriteriaContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_joinCriteria + + return p +} + +func (s *JoinCriteriaContext) GetParser() antlr.Parser { return s.parser } + +func (s *JoinCriteriaContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *JoinCriteriaContext) BooleanExpression() IBooleanExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *JoinCriteriaContext) USING_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSING_, 0) +} + +func (s *JoinCriteriaContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *JoinCriteriaContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *JoinCriteriaContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *JoinCriteriaContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *JoinCriteriaContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *JoinCriteriaContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *JoinCriteriaContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JoinCriteriaContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JoinCriteriaContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJoinCriteria(s) + } +} + +func (s *JoinCriteriaContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJoinCriteria(s) + } +} + +func (s *JoinCriteriaContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJoinCriteria(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JoinCriteria() (localctx IJoinCriteriaContext) { + localctx = NewJoinCriteriaContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 78, TrinoParserRULE_joinCriteria) + var _la int + + p.SetState(1558) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserON_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1544) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1545) + p.booleanExpression(0) + } + + case TrinoParserUSING_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1546) + p.Match(TrinoParserUSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1547) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1548) + p.Identifier() + } + p.SetState(1553) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1549) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1550) + p.Identifier() + } + + p.SetState(1555) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1556) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISampledRelationContext is an interface to support dynamic dispatch. +type ISampledRelationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetPercentage returns the percentage rule contexts. + GetPercentage() IExpressionContext + + // SetPercentage sets the percentage rule contexts. + SetPercentage(IExpressionContext) + + // Getter signatures + PatternRecognition() IPatternRecognitionContext + TABLESAMPLE_() antlr.TerminalNode + SampleType() ISampleTypeContext + LPAREN_() antlr.TerminalNode + RPAREN_() antlr.TerminalNode + Expression() IExpressionContext + + // IsSampledRelationContext differentiates from other interfaces. + IsSampledRelationContext() +} + +type SampledRelationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + percentage IExpressionContext +} + +func NewEmptySampledRelationContext() *SampledRelationContext { + var p = new(SampledRelationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sampledRelation + return p +} + +func InitEmptySampledRelationContext(p *SampledRelationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sampledRelation +} + +func (*SampledRelationContext) IsSampledRelationContext() {} + +func NewSampledRelationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SampledRelationContext { + var p = new(SampledRelationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_sampledRelation + + return p +} + +func (s *SampledRelationContext) GetParser() antlr.Parser { return s.parser } + +func (s *SampledRelationContext) GetPercentage() IExpressionContext { return s.percentage } + +func (s *SampledRelationContext) SetPercentage(v IExpressionContext) { s.percentage = v } + +func (s *SampledRelationContext) PatternRecognition() IPatternRecognitionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPatternRecognitionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPatternRecognitionContext) +} + +func (s *SampledRelationContext) TABLESAMPLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLESAMPLE_, 0) +} + +func (s *SampledRelationContext) SampleType() ISampleTypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISampleTypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISampleTypeContext) +} + +func (s *SampledRelationContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *SampledRelationContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *SampledRelationContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SampledRelationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SampledRelationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SampledRelationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSampledRelation(s) + } +} + +func (s *SampledRelationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSampledRelation(s) + } +} + +func (s *SampledRelationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSampledRelation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SampledRelation() (localctx ISampledRelationContext) { + localctx = NewSampledRelationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 80, TrinoParserRULE_sampledRelation) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1560) + p.PatternRecognition() + } + p.SetState(1567) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 190, p.GetParserRuleContext()) == 1 { + { + p.SetState(1561) + p.Match(TrinoParserTABLESAMPLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1562) + p.SampleType() + } + { + p.SetState(1563) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1564) + + var _x = p.Expression() + + localctx.(*SampledRelationContext).percentage = _x + } + { + p.SetState(1565) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISampleTypeContext is an interface to support dynamic dispatch. +type ISampleTypeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + BERNOULLI_() antlr.TerminalNode + SYSTEM_() antlr.TerminalNode + + // IsSampleTypeContext differentiates from other interfaces. + IsSampleTypeContext() +} + +type SampleTypeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySampleTypeContext() *SampleTypeContext { + var p = new(SampleTypeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sampleType + return p +} + +func InitEmptySampleTypeContext(p *SampleTypeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sampleType +} + +func (*SampleTypeContext) IsSampleTypeContext() {} + +func NewSampleTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SampleTypeContext { + var p = new(SampleTypeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_sampleType + + return p +} + +func (s *SampleTypeContext) GetParser() antlr.Parser { return s.parser } + +func (s *SampleTypeContext) BERNOULLI_() antlr.TerminalNode { + return s.GetToken(TrinoParserBERNOULLI_, 0) +} + +func (s *SampleTypeContext) SYSTEM_() antlr.TerminalNode { + return s.GetToken(TrinoParserSYSTEM_, 0) +} + +func (s *SampleTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SampleTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SampleTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSampleType(s) + } +} + +func (s *SampleTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSampleType(s) + } +} + +func (s *SampleTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSampleType(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SampleType() (localctx ISampleTypeContext) { + localctx = NewSampleTypeContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 82, TrinoParserRULE_sampleType) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1569) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserBERNOULLI_ || _la == TrinoParserSYSTEM_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITrimsSpecificationContext is an interface to support dynamic dispatch. +type ITrimsSpecificationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + LEADING_() antlr.TerminalNode + TRAILING_() antlr.TerminalNode + BOTH_() antlr.TerminalNode + + // IsTrimsSpecificationContext differentiates from other interfaces. + IsTrimsSpecificationContext() +} + +type TrimsSpecificationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTrimsSpecificationContext() *TrimsSpecificationContext { + var p = new(TrimsSpecificationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_trimsSpecification + return p +} + +func InitEmptyTrimsSpecificationContext(p *TrimsSpecificationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_trimsSpecification +} + +func (*TrimsSpecificationContext) IsTrimsSpecificationContext() {} + +func NewTrimsSpecificationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TrimsSpecificationContext { + var p = new(TrimsSpecificationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_trimsSpecification + + return p +} + +func (s *TrimsSpecificationContext) GetParser() antlr.Parser { return s.parser } + +func (s *TrimsSpecificationContext) LEADING_() antlr.TerminalNode { + return s.GetToken(TrinoParserLEADING_, 0) +} + +func (s *TrimsSpecificationContext) TRAILING_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRAILING_, 0) +} + +func (s *TrimsSpecificationContext) BOTH_() antlr.TerminalNode { + return s.GetToken(TrinoParserBOTH_, 0) +} + +func (s *TrimsSpecificationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TrimsSpecificationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TrimsSpecificationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTrimsSpecification(s) + } +} + +func (s *TrimsSpecificationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTrimsSpecification(s) + } +} + +func (s *TrimsSpecificationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTrimsSpecification(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TrimsSpecification() (localctx ITrimsSpecificationContext) { + localctx = NewTrimsSpecificationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 84, TrinoParserRULE_trimsSpecification) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1571) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserBOTH_ || _la == TrinoParserLEADING_ || _la == TrinoParserTRAILING_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IListAggOverflowBehaviorContext is an interface to support dynamic dispatch. +type IListAggOverflowBehaviorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ERROR_() antlr.TerminalNode + TRUNCATE_() antlr.TerminalNode + ListaggCountIndication() IListaggCountIndicationContext + String_() IString_Context + + // IsListAggOverflowBehaviorContext differentiates from other interfaces. + IsListAggOverflowBehaviorContext() +} + +type ListAggOverflowBehaviorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyListAggOverflowBehaviorContext() *ListAggOverflowBehaviorContext { + var p = new(ListAggOverflowBehaviorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_listAggOverflowBehavior + return p +} + +func InitEmptyListAggOverflowBehaviorContext(p *ListAggOverflowBehaviorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_listAggOverflowBehavior +} + +func (*ListAggOverflowBehaviorContext) IsListAggOverflowBehaviorContext() {} + +func NewListAggOverflowBehaviorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ListAggOverflowBehaviorContext { + var p = new(ListAggOverflowBehaviorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_listAggOverflowBehavior + + return p +} + +func (s *ListAggOverflowBehaviorContext) GetParser() antlr.Parser { return s.parser } + +func (s *ListAggOverflowBehaviorContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *ListAggOverflowBehaviorContext) TRUNCATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRUNCATE_, 0) +} + +func (s *ListAggOverflowBehaviorContext) ListaggCountIndication() IListaggCountIndicationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IListaggCountIndicationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IListaggCountIndicationContext) +} + +func (s *ListAggOverflowBehaviorContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ListAggOverflowBehaviorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ListAggOverflowBehaviorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ListAggOverflowBehaviorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterListAggOverflowBehavior(s) + } +} + +func (s *ListAggOverflowBehaviorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitListAggOverflowBehavior(s) + } +} + +func (s *ListAggOverflowBehaviorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitListAggOverflowBehavior(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ListAggOverflowBehavior() (localctx IListAggOverflowBehaviorContext) { + localctx = NewListAggOverflowBehaviorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 86, TrinoParserRULE_listAggOverflowBehavior) + var _la int + + p.SetState(1579) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserERROR_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1573) + p.Match(TrinoParserERROR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserTRUNCATE_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1574) + p.Match(TrinoParserTRUNCATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1576) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserSTRING_ || _la == TrinoParserUNICODE_STRING_ { + { + p.SetState(1575) + p.String_() + } + + } + { + p.SetState(1578) + p.ListaggCountIndication() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IListaggCountIndicationContext is an interface to support dynamic dispatch. +type IListaggCountIndicationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + COUNT_() antlr.TerminalNode + WITH_() antlr.TerminalNode + WITHOUT_() antlr.TerminalNode + + // IsListaggCountIndicationContext differentiates from other interfaces. + IsListaggCountIndicationContext() +} + +type ListaggCountIndicationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyListaggCountIndicationContext() *ListaggCountIndicationContext { + var p = new(ListaggCountIndicationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_listaggCountIndication + return p +} + +func InitEmptyListaggCountIndicationContext(p *ListaggCountIndicationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_listaggCountIndication +} + +func (*ListaggCountIndicationContext) IsListaggCountIndicationContext() {} + +func NewListaggCountIndicationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ListaggCountIndicationContext { + var p = new(ListaggCountIndicationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_listaggCountIndication + + return p +} + +func (s *ListaggCountIndicationContext) GetParser() antlr.Parser { return s.parser } + +func (s *ListaggCountIndicationContext) COUNT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOUNT_, 0) +} + +func (s *ListaggCountIndicationContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *ListaggCountIndicationContext) WITHOUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITHOUT_, 0) +} + +func (s *ListaggCountIndicationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ListaggCountIndicationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ListaggCountIndicationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterListaggCountIndication(s) + } +} + +func (s *ListaggCountIndicationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitListaggCountIndication(s) + } +} + +func (s *ListaggCountIndicationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitListaggCountIndication(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ListaggCountIndication() (localctx IListaggCountIndicationContext) { + localctx = NewListaggCountIndicationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 88, TrinoParserRULE_listaggCountIndication) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1581) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserWITH_ || _la == TrinoParserWITHOUT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(1582) + p.Match(TrinoParserCOUNT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPatternRecognitionContext is an interface to support dynamic dispatch. +type IPatternRecognitionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Get_expression returns the _expression rule contexts. + Get_expression() IExpressionContext + + // Set_expression sets the _expression rule contexts. + Set_expression(IExpressionContext) + + // GetPartition returns the partition rule context list. + GetPartition() []IExpressionContext + + // SetPartition sets the partition rule context list. + SetPartition([]IExpressionContext) + + // Getter signatures + AliasedRelation() IAliasedRelationContext + MATCH_RECOGNIZE_() antlr.TerminalNode + AllLPAREN_() []antlr.TerminalNode + LPAREN_(i int) antlr.TerminalNode + PATTERN_() antlr.TerminalNode + RowPattern() IRowPatternContext + AllRPAREN_() []antlr.TerminalNode + RPAREN_(i int) antlr.TerminalNode + DEFINE_() antlr.TerminalNode + AllVariableDefinition() []IVariableDefinitionContext + VariableDefinition(i int) IVariableDefinitionContext + PARTITION_() antlr.TerminalNode + AllBY_() []antlr.TerminalNode + BY_(i int) antlr.TerminalNode + ORDER_() antlr.TerminalNode + AllSortItem() []ISortItemContext + SortItem(i int) ISortItemContext + MEASURES_() antlr.TerminalNode + AllMeasureDefinition() []IMeasureDefinitionContext + MeasureDefinition(i int) IMeasureDefinitionContext + RowsPerMatch() IRowsPerMatchContext + AFTER_() antlr.TerminalNode + MATCH_() antlr.TerminalNode + SkipTo() ISkipToContext + SUBSET_() antlr.TerminalNode + AllSubsetDefinition() []ISubsetDefinitionContext + SubsetDefinition(i int) ISubsetDefinitionContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + Identifier() IIdentifierContext + AllExpression() []IExpressionContext + Expression(i int) IExpressionContext + INITIAL_() antlr.TerminalNode + SEEK_() antlr.TerminalNode + AS_() antlr.TerminalNode + ColumnAliases() IColumnAliasesContext + + // IsPatternRecognitionContext differentiates from other interfaces. + IsPatternRecognitionContext() +} + +type PatternRecognitionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + _expression IExpressionContext + partition []IExpressionContext +} + +func NewEmptyPatternRecognitionContext() *PatternRecognitionContext { + var p = new(PatternRecognitionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_patternRecognition + return p +} + +func InitEmptyPatternRecognitionContext(p *PatternRecognitionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_patternRecognition +} + +func (*PatternRecognitionContext) IsPatternRecognitionContext() {} + +func NewPatternRecognitionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PatternRecognitionContext { + var p = new(PatternRecognitionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_patternRecognition + + return p +} + +func (s *PatternRecognitionContext) GetParser() antlr.Parser { return s.parser } + +func (s *PatternRecognitionContext) Get_expression() IExpressionContext { return s._expression } + +func (s *PatternRecognitionContext) Set_expression(v IExpressionContext) { s._expression = v } + +func (s *PatternRecognitionContext) GetPartition() []IExpressionContext { return s.partition } + +func (s *PatternRecognitionContext) SetPartition(v []IExpressionContext) { s.partition = v } + +func (s *PatternRecognitionContext) AliasedRelation() IAliasedRelationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IAliasedRelationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IAliasedRelationContext) +} + +func (s *PatternRecognitionContext) MATCH_RECOGNIZE_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCH_RECOGNIZE_, 0) +} + +func (s *PatternRecognitionContext) AllLPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserLPAREN_) +} + +func (s *PatternRecognitionContext) LPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, i) +} + +func (s *PatternRecognitionContext) PATTERN_() antlr.TerminalNode { + return s.GetToken(TrinoParserPATTERN_, 0) +} + +func (s *PatternRecognitionContext) RowPattern() IRowPatternContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *PatternRecognitionContext) AllRPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserRPAREN_) +} + +func (s *PatternRecognitionContext) RPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, i) +} + +func (s *PatternRecognitionContext) DEFINE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFINE_, 0) +} + +func (s *PatternRecognitionContext) AllVariableDefinition() []IVariableDefinitionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IVariableDefinitionContext); ok { + len++ + } + } + + tst := make([]IVariableDefinitionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IVariableDefinitionContext); ok { + tst[i] = t.(IVariableDefinitionContext) + i++ + } + } + + return tst +} + +func (s *PatternRecognitionContext) VariableDefinition(i int) IVariableDefinitionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IVariableDefinitionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IVariableDefinitionContext) +} + +func (s *PatternRecognitionContext) PARTITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPARTITION_, 0) +} + +func (s *PatternRecognitionContext) AllBY_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserBY_) +} + +func (s *PatternRecognitionContext) BY_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, i) +} + +func (s *PatternRecognitionContext) ORDER_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDER_, 0) +} + +func (s *PatternRecognitionContext) AllSortItem() []ISortItemContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISortItemContext); ok { + len++ + } + } + + tst := make([]ISortItemContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISortItemContext); ok { + tst[i] = t.(ISortItemContext) + i++ + } + } + + return tst +} + +func (s *PatternRecognitionContext) SortItem(i int) ISortItemContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISortItemContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISortItemContext) +} + +func (s *PatternRecognitionContext) MEASURES_() antlr.TerminalNode { + return s.GetToken(TrinoParserMEASURES_, 0) +} + +func (s *PatternRecognitionContext) AllMeasureDefinition() []IMeasureDefinitionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IMeasureDefinitionContext); ok { + len++ + } + } + + tst := make([]IMeasureDefinitionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IMeasureDefinitionContext); ok { + tst[i] = t.(IMeasureDefinitionContext) + i++ + } + } + + return tst +} + +func (s *PatternRecognitionContext) MeasureDefinition(i int) IMeasureDefinitionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IMeasureDefinitionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IMeasureDefinitionContext) +} + +func (s *PatternRecognitionContext) RowsPerMatch() IRowsPerMatchContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowsPerMatchContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRowsPerMatchContext) +} + +func (s *PatternRecognitionContext) AFTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserAFTER_, 0) +} + +func (s *PatternRecognitionContext) MATCH_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCH_, 0) +} + +func (s *PatternRecognitionContext) SkipTo() ISkipToContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISkipToContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISkipToContext) +} + +func (s *PatternRecognitionContext) SUBSET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSUBSET_, 0) +} + +func (s *PatternRecognitionContext) AllSubsetDefinition() []ISubsetDefinitionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISubsetDefinitionContext); ok { + len++ + } + } + + tst := make([]ISubsetDefinitionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISubsetDefinitionContext); ok { + tst[i] = t.(ISubsetDefinitionContext) + i++ + } + } + + return tst +} + +func (s *PatternRecognitionContext) SubsetDefinition(i int) ISubsetDefinitionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISubsetDefinitionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISubsetDefinitionContext) +} + +func (s *PatternRecognitionContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *PatternRecognitionContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *PatternRecognitionContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *PatternRecognitionContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *PatternRecognitionContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *PatternRecognitionContext) INITIAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserINITIAL_, 0) +} + +func (s *PatternRecognitionContext) SEEK_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEEK_, 0) +} + +func (s *PatternRecognitionContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *PatternRecognitionContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *PatternRecognitionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PatternRecognitionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *PatternRecognitionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPatternRecognition(s) + } +} + +func (s *PatternRecognitionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPatternRecognition(s) + } +} + +func (s *PatternRecognitionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPatternRecognition(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PatternRecognition() (localctx IPatternRecognitionContext) { + localctx = NewPatternRecognitionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 90, TrinoParserRULE_patternRecognition) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1584) + p.AliasedRelation() + } + p.SetState(1667) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 208, p.GetParserRuleContext()) == 1 { + { + p.SetState(1585) + p.Match(TrinoParserMATCH_RECOGNIZE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1586) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1597) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserPARTITION_ { + { + p.SetState(1587) + p.Match(TrinoParserPARTITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1588) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1589) + + var _x = p.Expression() + + localctx.(*PatternRecognitionContext)._expression = _x + } + localctx.(*PatternRecognitionContext).partition = append(localctx.(*PatternRecognitionContext).partition, localctx.(*PatternRecognitionContext)._expression) + p.SetState(1594) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1590) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1591) + + var _x = p.Expression() + + localctx.(*PatternRecognitionContext)._expression = _x + } + localctx.(*PatternRecognitionContext).partition = append(localctx.(*PatternRecognitionContext).partition, localctx.(*PatternRecognitionContext)._expression) + + p.SetState(1596) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(1609) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserORDER_ { + { + p.SetState(1599) + p.Match(TrinoParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1600) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1601) + p.SortItem() + } + p.SetState(1606) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1602) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1603) + p.SortItem() + } + + p.SetState(1608) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(1620) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserMEASURES_ { + { + p.SetState(1611) + p.Match(TrinoParserMEASURES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1612) + p.MeasureDefinition() + } + p.SetState(1617) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1613) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1614) + p.MeasureDefinition() + } + + p.SetState(1619) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(1623) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserALL_ || _la == TrinoParserONE_ { + { + p.SetState(1622) + p.RowsPerMatch() + } + + } + p.SetState(1628) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAFTER_ { + { + p.SetState(1625) + p.Match(TrinoParserAFTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1626) + p.Match(TrinoParserMATCH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1627) + p.SkipTo() + } + + } + p.SetState(1631) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserINITIAL_ || _la == TrinoParserSEEK_ { + { + p.SetState(1630) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserINITIAL_ || _la == TrinoParserSEEK_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + { + p.SetState(1633) + p.Match(TrinoParserPATTERN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1634) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1635) + p.rowPattern(0) + } + { + p.SetState(1636) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1646) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserSUBSET_ { + { + p.SetState(1637) + p.Match(TrinoParserSUBSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1638) + p.SubsetDefinition() + } + p.SetState(1643) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1639) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1640) + p.SubsetDefinition() + } + + p.SetState(1645) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(1648) + p.Match(TrinoParserDEFINE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1649) + p.VariableDefinition() + } + p.SetState(1654) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1650) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1651) + p.VariableDefinition() + } + + p.SetState(1656) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1657) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1665) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 207, p.GetParserRuleContext()) == 1 { + p.SetState(1659) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAS_ { + { + p.SetState(1658) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1661) + p.Identifier() + } + p.SetState(1663) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 206, p.GetParserRuleContext()) == 1 { + { + p.SetState(1662) + p.ColumnAliases() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + } else if p.HasError() { // JIM + goto errorExit + } + + } else if p.HasError() { // JIM + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IMeasureDefinitionContext is an interface to support dynamic dispatch. +type IMeasureDefinitionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Expression() IExpressionContext + AS_() antlr.TerminalNode + Identifier() IIdentifierContext + + // IsMeasureDefinitionContext differentiates from other interfaces. + IsMeasureDefinitionContext() +} + +type MeasureDefinitionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyMeasureDefinitionContext() *MeasureDefinitionContext { + var p = new(MeasureDefinitionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_measureDefinition + return p +} + +func InitEmptyMeasureDefinitionContext(p *MeasureDefinitionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_measureDefinition +} + +func (*MeasureDefinitionContext) IsMeasureDefinitionContext() {} + +func NewMeasureDefinitionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MeasureDefinitionContext { + var p = new(MeasureDefinitionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_measureDefinition + + return p +} + +func (s *MeasureDefinitionContext) GetParser() antlr.Parser { return s.parser } + +func (s *MeasureDefinitionContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *MeasureDefinitionContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *MeasureDefinitionContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *MeasureDefinitionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MeasureDefinitionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *MeasureDefinitionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterMeasureDefinition(s) + } +} + +func (s *MeasureDefinitionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitMeasureDefinition(s) + } +} + +func (s *MeasureDefinitionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitMeasureDefinition(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) MeasureDefinition() (localctx IMeasureDefinitionContext) { + localctx = NewMeasureDefinitionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 92, TrinoParserRULE_measureDefinition) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1669) + p.Expression() + } + { + p.SetState(1670) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1671) + p.Identifier() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRowsPerMatchContext is an interface to support dynamic dispatch. +type IRowsPerMatchContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ONE_() antlr.TerminalNode + ROW_() antlr.TerminalNode + PER_() antlr.TerminalNode + MATCH_() antlr.TerminalNode + ALL_() antlr.TerminalNode + ROWS_() antlr.TerminalNode + EmptyMatchHandling() IEmptyMatchHandlingContext + + // IsRowsPerMatchContext differentiates from other interfaces. + IsRowsPerMatchContext() +} + +type RowsPerMatchContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRowsPerMatchContext() *RowsPerMatchContext { + var p = new(RowsPerMatchContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowsPerMatch + return p +} + +func InitEmptyRowsPerMatchContext(p *RowsPerMatchContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowsPerMatch +} + +func (*RowsPerMatchContext) IsRowsPerMatchContext() {} + +func NewRowsPerMatchContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RowsPerMatchContext { + var p = new(RowsPerMatchContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_rowsPerMatch + + return p +} + +func (s *RowsPerMatchContext) GetParser() antlr.Parser { return s.parser } + +func (s *RowsPerMatchContext) ONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserONE_, 0) +} + +func (s *RowsPerMatchContext) ROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserROW_, 0) +} + +func (s *RowsPerMatchContext) PER_() antlr.TerminalNode { + return s.GetToken(TrinoParserPER_, 0) +} + +func (s *RowsPerMatchContext) MATCH_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCH_, 0) +} + +func (s *RowsPerMatchContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *RowsPerMatchContext) ROWS_() antlr.TerminalNode { + return s.GetToken(TrinoParserROWS_, 0) +} + +func (s *RowsPerMatchContext) EmptyMatchHandling() IEmptyMatchHandlingContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IEmptyMatchHandlingContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IEmptyMatchHandlingContext) +} + +func (s *RowsPerMatchContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RowsPerMatchContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *RowsPerMatchContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRowsPerMatch(s) + } +} + +func (s *RowsPerMatchContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRowsPerMatch(s) + } +} + +func (s *RowsPerMatchContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRowsPerMatch(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RowsPerMatch() (localctx IRowsPerMatchContext) { + localctx = NewRowsPerMatchContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 94, TrinoParserRULE_rowsPerMatch) + var _la int + + p.SetState(1684) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserONE_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1673) + p.Match(TrinoParserONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1674) + p.Match(TrinoParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1675) + p.Match(TrinoParserPER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1676) + p.Match(TrinoParserMATCH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserALL_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1677) + p.Match(TrinoParserALL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1678) + p.Match(TrinoParserROWS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1679) + p.Match(TrinoParserPER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1680) + p.Match(TrinoParserMATCH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1682) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserOMIT_ || _la == TrinoParserSHOW_ || _la == TrinoParserWITH_ { + { + p.SetState(1681) + p.EmptyMatchHandling() + } + + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IEmptyMatchHandlingContext is an interface to support dynamic dispatch. +type IEmptyMatchHandlingContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + SHOW_() antlr.TerminalNode + EMPTY_() antlr.TerminalNode + MATCHES_() antlr.TerminalNode + OMIT_() antlr.TerminalNode + WITH_() antlr.TerminalNode + UNMATCHED_() antlr.TerminalNode + ROWS_() antlr.TerminalNode + + // IsEmptyMatchHandlingContext differentiates from other interfaces. + IsEmptyMatchHandlingContext() +} + +type EmptyMatchHandlingContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyEmptyMatchHandlingContext() *EmptyMatchHandlingContext { + var p = new(EmptyMatchHandlingContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_emptyMatchHandling + return p +} + +func InitEmptyEmptyMatchHandlingContext(p *EmptyMatchHandlingContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_emptyMatchHandling +} + +func (*EmptyMatchHandlingContext) IsEmptyMatchHandlingContext() {} + +func NewEmptyMatchHandlingContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *EmptyMatchHandlingContext { + var p = new(EmptyMatchHandlingContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_emptyMatchHandling + + return p +} + +func (s *EmptyMatchHandlingContext) GetParser() antlr.Parser { return s.parser } + +func (s *EmptyMatchHandlingContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *EmptyMatchHandlingContext) EMPTY_() antlr.TerminalNode { + return s.GetToken(TrinoParserEMPTY_, 0) +} + +func (s *EmptyMatchHandlingContext) MATCHES_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCHES_, 0) +} + +func (s *EmptyMatchHandlingContext) OMIT_() antlr.TerminalNode { + return s.GetToken(TrinoParserOMIT_, 0) +} + +func (s *EmptyMatchHandlingContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *EmptyMatchHandlingContext) UNMATCHED_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNMATCHED_, 0) +} + +func (s *EmptyMatchHandlingContext) ROWS_() antlr.TerminalNode { + return s.GetToken(TrinoParserROWS_, 0) +} + +func (s *EmptyMatchHandlingContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *EmptyMatchHandlingContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *EmptyMatchHandlingContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterEmptyMatchHandling(s) + } +} + +func (s *EmptyMatchHandlingContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitEmptyMatchHandling(s) + } +} + +func (s *EmptyMatchHandlingContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitEmptyMatchHandling(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) EmptyMatchHandling() (localctx IEmptyMatchHandlingContext) { + localctx = NewEmptyMatchHandlingContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 96, TrinoParserRULE_emptyMatchHandling) + p.SetState(1695) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserSHOW_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1686) + p.Match(TrinoParserSHOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1687) + p.Match(TrinoParserEMPTY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1688) + p.Match(TrinoParserMATCHES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserOMIT_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1689) + p.Match(TrinoParserOMIT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1690) + p.Match(TrinoParserEMPTY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1691) + p.Match(TrinoParserMATCHES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserWITH_: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(1692) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1693) + p.Match(TrinoParserUNMATCHED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1694) + p.Match(TrinoParserROWS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISkipToContext is an interface to support dynamic dispatch. +type ISkipToContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + SKIP_() antlr.TerminalNode + TO_() antlr.TerminalNode + PAST_() antlr.TerminalNode + LAST_() antlr.TerminalNode + ROW_() antlr.TerminalNode + NEXT_() antlr.TerminalNode + Identifier() IIdentifierContext + FIRST_() antlr.TerminalNode + + // IsSkipToContext differentiates from other interfaces. + IsSkipToContext() +} + +type SkipToContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySkipToContext() *SkipToContext { + var p = new(SkipToContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_skipTo + return p +} + +func InitEmptySkipToContext(p *SkipToContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_skipTo +} + +func (*SkipToContext) IsSkipToContext() {} + +func NewSkipToContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SkipToContext { + var p = new(SkipToContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_skipTo + + return p +} + +func (s *SkipToContext) GetParser() antlr.Parser { return s.parser } + +func (s *SkipToContext) SKIP_() antlr.TerminalNode { + return s.GetToken(TrinoParserSKIP_, 0) +} + +func (s *SkipToContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *SkipToContext) PAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserPAST_, 0) +} + +func (s *SkipToContext) LAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserLAST_, 0) +} + +func (s *SkipToContext) ROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserROW_, 0) +} + +func (s *SkipToContext) NEXT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNEXT_, 0) +} + +func (s *SkipToContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *SkipToContext) FIRST_() antlr.TerminalNode { + return s.GetToken(TrinoParserFIRST_, 0) +} + +func (s *SkipToContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SkipToContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SkipToContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSkipTo(s) + } +} + +func (s *SkipToContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSkipTo(s) + } +} + +func (s *SkipToContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSkipTo(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SkipTo() (localctx ISkipToContext) { + localctx = NewSkipToContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 98, TrinoParserRULE_skipTo) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1697) + p.Match(TrinoParserSKIP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1710) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserTO_: + { + p.SetState(1698) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1705) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 213, p.GetParserRuleContext()) { + case 1: + { + p.SetState(1699) + p.Match(TrinoParserNEXT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1700) + p.Match(TrinoParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + p.SetState(1702) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 212, p.GetParserRuleContext()) == 1 { + { + p.SetState(1701) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFIRST_ || _la == TrinoParserLAST_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(1704) + p.Identifier() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + case TrinoParserPAST_: + { + p.SetState(1707) + p.Match(TrinoParserPAST_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1708) + p.Match(TrinoParserLAST_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1709) + p.Match(TrinoParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISubsetDefinitionContext is an interface to support dynamic dispatch. +type ISubsetDefinitionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetName returns the name rule contexts. + GetName() IIdentifierContext + + // Get_identifier returns the _identifier rule contexts. + Get_identifier() IIdentifierContext + + // SetName sets the name rule contexts. + SetName(IIdentifierContext) + + // Set_identifier sets the _identifier rule contexts. + Set_identifier(IIdentifierContext) + + // GetUnion returns the union rule context list. + GetUnion() []IIdentifierContext + + // SetUnion sets the union rule context list. + SetUnion([]IIdentifierContext) + + // Getter signatures + EQ_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + RPAREN_() antlr.TerminalNode + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsSubsetDefinitionContext differentiates from other interfaces. + IsSubsetDefinitionContext() +} + +type SubsetDefinitionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + name IIdentifierContext + _identifier IIdentifierContext + union []IIdentifierContext +} + +func NewEmptySubsetDefinitionContext() *SubsetDefinitionContext { + var p = new(SubsetDefinitionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_subsetDefinition + return p +} + +func InitEmptySubsetDefinitionContext(p *SubsetDefinitionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_subsetDefinition +} + +func (*SubsetDefinitionContext) IsSubsetDefinitionContext() {} + +func NewSubsetDefinitionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SubsetDefinitionContext { + var p = new(SubsetDefinitionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_subsetDefinition + + return p +} + +func (s *SubsetDefinitionContext) GetParser() antlr.Parser { return s.parser } + +func (s *SubsetDefinitionContext) GetName() IIdentifierContext { return s.name } + +func (s *SubsetDefinitionContext) Get_identifier() IIdentifierContext { return s._identifier } + +func (s *SubsetDefinitionContext) SetName(v IIdentifierContext) { s.name = v } + +func (s *SubsetDefinitionContext) Set_identifier(v IIdentifierContext) { s._identifier = v } + +func (s *SubsetDefinitionContext) GetUnion() []IIdentifierContext { return s.union } + +func (s *SubsetDefinitionContext) SetUnion(v []IIdentifierContext) { s.union = v } + +func (s *SubsetDefinitionContext) EQ_() antlr.TerminalNode { + return s.GetToken(TrinoParserEQ_, 0) +} + +func (s *SubsetDefinitionContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *SubsetDefinitionContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *SubsetDefinitionContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *SubsetDefinitionContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *SubsetDefinitionContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *SubsetDefinitionContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *SubsetDefinitionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SubsetDefinitionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SubsetDefinitionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSubsetDefinition(s) + } +} + +func (s *SubsetDefinitionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSubsetDefinition(s) + } +} + +func (s *SubsetDefinitionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSubsetDefinition(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SubsetDefinition() (localctx ISubsetDefinitionContext) { + localctx = NewSubsetDefinitionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 100, TrinoParserRULE_subsetDefinition) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1712) + + var _x = p.Identifier() + + localctx.(*SubsetDefinitionContext).name = _x + } + { + p.SetState(1713) + p.Match(TrinoParserEQ_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1714) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1715) + + var _x = p.Identifier() + + localctx.(*SubsetDefinitionContext)._identifier = _x + } + localctx.(*SubsetDefinitionContext).union = append(localctx.(*SubsetDefinitionContext).union, localctx.(*SubsetDefinitionContext)._identifier) + p.SetState(1720) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1716) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1717) + + var _x = p.Identifier() + + localctx.(*SubsetDefinitionContext)._identifier = _x + } + localctx.(*SubsetDefinitionContext).union = append(localctx.(*SubsetDefinitionContext).union, localctx.(*SubsetDefinitionContext)._identifier) + + p.SetState(1722) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1723) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IVariableDefinitionContext is an interface to support dynamic dispatch. +type IVariableDefinitionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Identifier() IIdentifierContext + AS_() antlr.TerminalNode + Expression() IExpressionContext + + // IsVariableDefinitionContext differentiates from other interfaces. + IsVariableDefinitionContext() +} + +type VariableDefinitionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyVariableDefinitionContext() *VariableDefinitionContext { + var p = new(VariableDefinitionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_variableDefinition + return p +} + +func InitEmptyVariableDefinitionContext(p *VariableDefinitionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_variableDefinition +} + +func (*VariableDefinitionContext) IsVariableDefinitionContext() {} + +func NewVariableDefinitionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VariableDefinitionContext { + var p = new(VariableDefinitionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_variableDefinition + + return p +} + +func (s *VariableDefinitionContext) GetParser() antlr.Parser { return s.parser } + +func (s *VariableDefinitionContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *VariableDefinitionContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *VariableDefinitionContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *VariableDefinitionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *VariableDefinitionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *VariableDefinitionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterVariableDefinition(s) + } +} + +func (s *VariableDefinitionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitVariableDefinition(s) + } +} + +func (s *VariableDefinitionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitVariableDefinition(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) VariableDefinition() (localctx IVariableDefinitionContext) { + localctx = NewVariableDefinitionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 102, TrinoParserRULE_variableDefinition) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1725) + p.Identifier() + } + { + p.SetState(1726) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1727) + p.Expression() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IAliasedRelationContext is an interface to support dynamic dispatch. +type IAliasedRelationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + RelationPrimary() IRelationPrimaryContext + Identifier() IIdentifierContext + AS_() antlr.TerminalNode + ColumnAliases() IColumnAliasesContext + + // IsAliasedRelationContext differentiates from other interfaces. + IsAliasedRelationContext() +} + +type AliasedRelationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyAliasedRelationContext() *AliasedRelationContext { + var p = new(AliasedRelationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_aliasedRelation + return p +} + +func InitEmptyAliasedRelationContext(p *AliasedRelationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_aliasedRelation +} + +func (*AliasedRelationContext) IsAliasedRelationContext() {} + +func NewAliasedRelationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AliasedRelationContext { + var p = new(AliasedRelationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_aliasedRelation + + return p +} + +func (s *AliasedRelationContext) GetParser() antlr.Parser { return s.parser } + +func (s *AliasedRelationContext) RelationPrimary() IRelationPrimaryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRelationPrimaryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRelationPrimaryContext) +} + +func (s *AliasedRelationContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *AliasedRelationContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *AliasedRelationContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *AliasedRelationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *AliasedRelationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *AliasedRelationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterAliasedRelation(s) + } +} + +func (s *AliasedRelationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitAliasedRelation(s) + } +} + +func (s *AliasedRelationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitAliasedRelation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) AliasedRelation() (localctx IAliasedRelationContext) { + localctx = NewAliasedRelationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 104, TrinoParserRULE_aliasedRelation) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1729) + p.RelationPrimary() + } + p.SetState(1737) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 218, p.GetParserRuleContext()) == 1 { + p.SetState(1731) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAS_ { + { + p.SetState(1730) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1733) + p.Identifier() + } + p.SetState(1735) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 217, p.GetParserRuleContext()) == 1 { + { + p.SetState(1734) + p.ColumnAliases() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + } else if p.HasError() { // JIM + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IColumnAliasesContext is an interface to support dynamic dispatch. +type IColumnAliasesContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + LPAREN_() antlr.TerminalNode + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + RPAREN_() antlr.TerminalNode + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsColumnAliasesContext differentiates from other interfaces. + IsColumnAliasesContext() +} + +type ColumnAliasesContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyColumnAliasesContext() *ColumnAliasesContext { + var p = new(ColumnAliasesContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_columnAliases + return p +} + +func InitEmptyColumnAliasesContext(p *ColumnAliasesContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_columnAliases +} + +func (*ColumnAliasesContext) IsColumnAliasesContext() {} + +func NewColumnAliasesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ColumnAliasesContext { + var p = new(ColumnAliasesContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_columnAliases + + return p +} + +func (s *ColumnAliasesContext) GetParser() antlr.Parser { return s.parser } + +func (s *ColumnAliasesContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *ColumnAliasesContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *ColumnAliasesContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ColumnAliasesContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *ColumnAliasesContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *ColumnAliasesContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *ColumnAliasesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ColumnAliasesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ColumnAliasesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterColumnAliases(s) + } +} + +func (s *ColumnAliasesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitColumnAliases(s) + } +} + +func (s *ColumnAliasesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitColumnAliases(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ColumnAliases() (localctx IColumnAliasesContext) { + localctx = NewColumnAliasesContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 106, TrinoParserRULE_columnAliases) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1739) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1740) + p.Identifier() + } + p.SetState(1745) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1741) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1742) + p.Identifier() + } + + p.SetState(1747) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1748) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRelationPrimaryContext is an interface to support dynamic dispatch. +type IRelationPrimaryContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsRelationPrimaryContext differentiates from other interfaces. + IsRelationPrimaryContext() +} + +type RelationPrimaryContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRelationPrimaryContext() *RelationPrimaryContext { + var p = new(RelationPrimaryContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_relationPrimary + return p +} + +func InitEmptyRelationPrimaryContext(p *RelationPrimaryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_relationPrimary +} + +func (*RelationPrimaryContext) IsRelationPrimaryContext() {} + +func NewRelationPrimaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RelationPrimaryContext { + var p = new(RelationPrimaryContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_relationPrimary + + return p +} + +func (s *RelationPrimaryContext) GetParser() antlr.Parser { return s.parser } + +func (s *RelationPrimaryContext) CopyAll(ctx *RelationPrimaryContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *RelationPrimaryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RelationPrimaryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type SubqueryRelationContext struct { + RelationPrimaryContext +} + +func NewSubqueryRelationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SubqueryRelationContext { + var p = new(SubqueryRelationContext) + + InitEmptyRelationPrimaryContext(&p.RelationPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*RelationPrimaryContext)) + + return p +} + +func (s *SubqueryRelationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SubqueryRelationContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *SubqueryRelationContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *SubqueryRelationContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *SubqueryRelationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSubqueryRelation(s) + } +} + +func (s *SubqueryRelationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSubqueryRelation(s) + } +} + +func (s *SubqueryRelationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSubqueryRelation(s) + + default: + return t.VisitChildren(s) + } +} + +type ParenthesizedRelationContext struct { + RelationPrimaryContext +} + +func NewParenthesizedRelationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ParenthesizedRelationContext { + var p = new(ParenthesizedRelationContext) + + InitEmptyRelationPrimaryContext(&p.RelationPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*RelationPrimaryContext)) + + return p +} + +func (s *ParenthesizedRelationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ParenthesizedRelationContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *ParenthesizedRelationContext) Relation() IRelationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRelationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRelationContext) +} + +func (s *ParenthesizedRelationContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *ParenthesizedRelationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterParenthesizedRelation(s) + } +} + +func (s *ParenthesizedRelationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitParenthesizedRelation(s) + } +} + +func (s *ParenthesizedRelationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitParenthesizedRelation(s) + + default: + return t.VisitChildren(s) + } +} + +type UnnestContext struct { + RelationPrimaryContext +} + +func NewUnnestContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnnestContext { + var p = new(UnnestContext) + + InitEmptyRelationPrimaryContext(&p.RelationPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*RelationPrimaryContext)) + + return p +} + +func (s *UnnestContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UnnestContext) UNNEST_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNNEST_, 0) +} + +func (s *UnnestContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *UnnestContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *UnnestContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *UnnestContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *UnnestContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *UnnestContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *UnnestContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *UnnestContext) ORDINALITY_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDINALITY_, 0) +} + +func (s *UnnestContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUnnest(s) + } +} + +func (s *UnnestContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUnnest(s) + } +} + +func (s *UnnestContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUnnest(s) + + default: + return t.VisitChildren(s) + } +} + +type TableFunctionInvocationContext struct { + RelationPrimaryContext +} + +func NewTableFunctionInvocationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TableFunctionInvocationContext { + var p = new(TableFunctionInvocationContext) + + InitEmptyRelationPrimaryContext(&p.RelationPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*RelationPrimaryContext)) + + return p +} + +func (s *TableFunctionInvocationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableFunctionInvocationContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *TableFunctionInvocationContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *TableFunctionInvocationContext) TableFunctionCall() ITableFunctionCallContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITableFunctionCallContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITableFunctionCallContext) +} + +func (s *TableFunctionInvocationContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *TableFunctionInvocationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableFunctionInvocation(s) + } +} + +func (s *TableFunctionInvocationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableFunctionInvocation(s) + } +} + +func (s *TableFunctionInvocationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableFunctionInvocation(s) + + default: + return t.VisitChildren(s) + } +} + +type LateralContext struct { + RelationPrimaryContext +} + +func NewLateralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LateralContext { + var p = new(LateralContext) + + InitEmptyRelationPrimaryContext(&p.RelationPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*RelationPrimaryContext)) + + return p +} + +func (s *LateralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LateralContext) LATERAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLATERAL_, 0) +} + +func (s *LateralContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *LateralContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *LateralContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *LateralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLateral(s) + } +} + +func (s *LateralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLateral(s) + } +} + +func (s *LateralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLateral(s) + + default: + return t.VisitChildren(s) + } +} + +type TableNameContext struct { + RelationPrimaryContext +} + +func NewTableNameContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TableNameContext { + var p = new(TableNameContext) + + InitEmptyRelationPrimaryContext(&p.RelationPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*RelationPrimaryContext)) + + return p +} + +func (s *TableNameContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableNameContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *TableNameContext) QueryPeriod() IQueryPeriodContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryPeriodContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryPeriodContext) +} + +func (s *TableNameContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableName(s) + } +} + +func (s *TableNameContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableName(s) + } +} + +func (s *TableNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableName(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RelationPrimary() (localctx IRelationPrimaryContext) { + localctx = NewRelationPrimaryContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 108, TrinoParserRULE_relationPrimary) + var _la int + + p.SetState(1787) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 223, p.GetParserRuleContext()) { + case 1: + localctx = NewTableNameContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1750) + p.QualifiedName() + } + p.SetState(1752) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 220, p.GetParserRuleContext()) == 1 { + { + p.SetState(1751) + p.QueryPeriod() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 2: + localctx = NewSubqueryRelationContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1754) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1755) + p.Query() + } + { + p.SetState(1756) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewUnnestContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(1758) + p.Match(TrinoParserUNNEST_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1759) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1760) + p.Expression() + } + p.SetState(1765) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1761) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1762) + p.Expression() + } + + p.SetState(1767) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1768) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1771) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 222, p.GetParserRuleContext()) == 1 { + { + p.SetState(1769) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1770) + p.Match(TrinoParserORDINALITY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 4: + localctx = NewLateralContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(1773) + p.Match(TrinoParserLATERAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1774) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1775) + p.Query() + } + { + p.SetState(1776) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 5: + localctx = NewTableFunctionInvocationContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(1778) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1779) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1780) + p.TableFunctionCall() + } + { + p.SetState(1781) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 6: + localctx = NewParenthesizedRelationContext(p, localctx) + p.EnterOuterAlt(localctx, 6) + { + p.SetState(1783) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1784) + p.relation(0) + } + { + p.SetState(1785) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITableFunctionCallContext is an interface to support dynamic dispatch. +type ITableFunctionCallContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + QualifiedName() IQualifiedNameContext + LPAREN_() antlr.TerminalNode + RPAREN_() antlr.TerminalNode + AllTableFunctionArgument() []ITableFunctionArgumentContext + TableFunctionArgument(i int) ITableFunctionArgumentContext + COPARTITION_() antlr.TerminalNode + AllCopartitionTables() []ICopartitionTablesContext + CopartitionTables(i int) ICopartitionTablesContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsTableFunctionCallContext differentiates from other interfaces. + IsTableFunctionCallContext() +} + +type TableFunctionCallContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTableFunctionCallContext() *TableFunctionCallContext { + var p = new(TableFunctionCallContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableFunctionCall + return p +} + +func InitEmptyTableFunctionCallContext(p *TableFunctionCallContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableFunctionCall +} + +func (*TableFunctionCallContext) IsTableFunctionCallContext() {} + +func NewTableFunctionCallContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TableFunctionCallContext { + var p = new(TableFunctionCallContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_tableFunctionCall + + return p +} + +func (s *TableFunctionCallContext) GetParser() antlr.Parser { return s.parser } + +func (s *TableFunctionCallContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *TableFunctionCallContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *TableFunctionCallContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *TableFunctionCallContext) AllTableFunctionArgument() []ITableFunctionArgumentContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITableFunctionArgumentContext); ok { + len++ + } + } + + tst := make([]ITableFunctionArgumentContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITableFunctionArgumentContext); ok { + tst[i] = t.(ITableFunctionArgumentContext) + i++ + } + } + + return tst +} + +func (s *TableFunctionCallContext) TableFunctionArgument(i int) ITableFunctionArgumentContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITableFunctionArgumentContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITableFunctionArgumentContext) +} + +func (s *TableFunctionCallContext) COPARTITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOPARTITION_, 0) +} + +func (s *TableFunctionCallContext) AllCopartitionTables() []ICopartitionTablesContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ICopartitionTablesContext); ok { + len++ + } + } + + tst := make([]ICopartitionTablesContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ICopartitionTablesContext); ok { + tst[i] = t.(ICopartitionTablesContext) + i++ + } + } + + return tst +} + +func (s *TableFunctionCallContext) CopartitionTables(i int) ICopartitionTablesContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICopartitionTablesContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ICopartitionTablesContext) +} + +func (s *TableFunctionCallContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *TableFunctionCallContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *TableFunctionCallContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableFunctionCallContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TableFunctionCallContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableFunctionCall(s) + } +} + +func (s *TableFunctionCallContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableFunctionCall(s) + } +} + +func (s *TableFunctionCallContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableFunctionCall(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TableFunctionCall() (localctx ITableFunctionCallContext) { + localctx = NewTableFunctionCallContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 110, TrinoParserRULE_tableFunctionCall) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1789) + p.QualifiedName() + } + { + p.SetState(1790) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1799) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 225, p.GetParserRuleContext()) == 1 { + { + p.SetState(1791) + p.TableFunctionArgument() + } + p.SetState(1796) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1792) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1793) + p.TableFunctionArgument() + } + + p.SetState(1798) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(1810) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOPARTITION_ { + { + p.SetState(1801) + p.Match(TrinoParserCOPARTITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1802) + p.CopartitionTables() + } + p.SetState(1807) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1803) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1804) + p.CopartitionTables() + } + + p.SetState(1809) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(1812) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITableFunctionArgumentContext is an interface to support dynamic dispatch. +type ITableFunctionArgumentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + TableArgument() ITableArgumentContext + DescriptorArgument() IDescriptorArgumentContext + Expression() IExpressionContext + Identifier() IIdentifierContext + RDOUBLEARROW_() antlr.TerminalNode + + // IsTableFunctionArgumentContext differentiates from other interfaces. + IsTableFunctionArgumentContext() +} + +type TableFunctionArgumentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTableFunctionArgumentContext() *TableFunctionArgumentContext { + var p = new(TableFunctionArgumentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableFunctionArgument + return p +} + +func InitEmptyTableFunctionArgumentContext(p *TableFunctionArgumentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableFunctionArgument +} + +func (*TableFunctionArgumentContext) IsTableFunctionArgumentContext() {} + +func NewTableFunctionArgumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TableFunctionArgumentContext { + var p = new(TableFunctionArgumentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_tableFunctionArgument + + return p +} + +func (s *TableFunctionArgumentContext) GetParser() antlr.Parser { return s.parser } + +func (s *TableFunctionArgumentContext) TableArgument() ITableArgumentContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITableArgumentContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITableArgumentContext) +} + +func (s *TableFunctionArgumentContext) DescriptorArgument() IDescriptorArgumentContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IDescriptorArgumentContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IDescriptorArgumentContext) +} + +func (s *TableFunctionArgumentContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *TableFunctionArgumentContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *TableFunctionArgumentContext) RDOUBLEARROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserRDOUBLEARROW_, 0) +} + +func (s *TableFunctionArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableFunctionArgumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TableFunctionArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableFunctionArgument(s) + } +} + +func (s *TableFunctionArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableFunctionArgument(s) + } +} + +func (s *TableFunctionArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableFunctionArgument(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TableFunctionArgument() (localctx ITableFunctionArgumentContext) { + localctx = NewTableFunctionArgumentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 112, TrinoParserRULE_tableFunctionArgument) + p.EnterOuterAlt(localctx, 1) + p.SetState(1817) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 228, p.GetParserRuleContext()) == 1 { + { + p.SetState(1814) + p.Identifier() + } + { + p.SetState(1815) + p.Match(TrinoParserRDOUBLEARROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(1822) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 229, p.GetParserRuleContext()) { + case 1: + { + p.SetState(1819) + p.TableArgument() + } + + case 2: + { + p.SetState(1820) + p.DescriptorArgument() + } + + case 3: + { + p.SetState(1821) + p.Expression() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITableArgumentContext is an interface to support dynamic dispatch. +type ITableArgumentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + TableArgumentRelation() ITableArgumentRelationContext + PARTITION_() antlr.TerminalNode + AllBY_() []antlr.TerminalNode + BY_(i int) antlr.TerminalNode + PRUNE_() antlr.TerminalNode + WHEN_() antlr.TerminalNode + EMPTY_() antlr.TerminalNode + KEEP_() antlr.TerminalNode + ORDER_() antlr.TerminalNode + AllLPAREN_() []antlr.TerminalNode + LPAREN_(i int) antlr.TerminalNode + AllRPAREN_() []antlr.TerminalNode + RPAREN_(i int) antlr.TerminalNode + AllExpression() []IExpressionContext + Expression(i int) IExpressionContext + AllSortItem() []ISortItemContext + SortItem(i int) ISortItemContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsTableArgumentContext differentiates from other interfaces. + IsTableArgumentContext() +} + +type TableArgumentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTableArgumentContext() *TableArgumentContext { + var p = new(TableArgumentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableArgument + return p +} + +func InitEmptyTableArgumentContext(p *TableArgumentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableArgument +} + +func (*TableArgumentContext) IsTableArgumentContext() {} + +func NewTableArgumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TableArgumentContext { + var p = new(TableArgumentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_tableArgument + + return p +} + +func (s *TableArgumentContext) GetParser() antlr.Parser { return s.parser } + +func (s *TableArgumentContext) TableArgumentRelation() ITableArgumentRelationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITableArgumentRelationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITableArgumentRelationContext) +} + +func (s *TableArgumentContext) PARTITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPARTITION_, 0) +} + +func (s *TableArgumentContext) AllBY_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserBY_) +} + +func (s *TableArgumentContext) BY_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, i) +} + +func (s *TableArgumentContext) PRUNE_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRUNE_, 0) +} + +func (s *TableArgumentContext) WHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHEN_, 0) +} + +func (s *TableArgumentContext) EMPTY_() antlr.TerminalNode { + return s.GetToken(TrinoParserEMPTY_, 0) +} + +func (s *TableArgumentContext) KEEP_() antlr.TerminalNode { + return s.GetToken(TrinoParserKEEP_, 0) +} + +func (s *TableArgumentContext) ORDER_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDER_, 0) +} + +func (s *TableArgumentContext) AllLPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserLPAREN_) +} + +func (s *TableArgumentContext) LPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, i) +} + +func (s *TableArgumentContext) AllRPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserRPAREN_) +} + +func (s *TableArgumentContext) RPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, i) +} + +func (s *TableArgumentContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *TableArgumentContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *TableArgumentContext) AllSortItem() []ISortItemContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISortItemContext); ok { + len++ + } + } + + tst := make([]ISortItemContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISortItemContext); ok { + tst[i] = t.(ISortItemContext) + i++ + } + } + + return tst +} + +func (s *TableArgumentContext) SortItem(i int) ISortItemContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISortItemContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISortItemContext) +} + +func (s *TableArgumentContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *TableArgumentContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *TableArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableArgumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TableArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableArgument(s) + } +} + +func (s *TableArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableArgument(s) + } +} + +func (s *TableArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableArgument(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TableArgument() (localctx ITableArgumentContext) { + localctx = NewTableArgumentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 114, TrinoParserRULE_tableArgument) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1824) + p.TableArgumentRelation() + } + p.SetState(1842) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserPARTITION_ { + { + p.SetState(1825) + p.Match(TrinoParserPARTITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1826) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1840) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 232, p.GetParserRuleContext()) { + case 1: + { + p.SetState(1827) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1836) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(1828) + p.Expression() + } + p.SetState(1833) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1829) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1830) + p.Expression() + } + + p.SetState(1835) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(1838) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + { + p.SetState(1839) + p.Expression() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + } + p.SetState(1850) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + switch p.GetTokenStream().LA(1) { + case TrinoParserPRUNE_: + { + p.SetState(1844) + p.Match(TrinoParserPRUNE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1845) + p.Match(TrinoParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1846) + p.Match(TrinoParserEMPTY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserKEEP_: + { + p.SetState(1847) + p.Match(TrinoParserKEEP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1848) + p.Match(TrinoParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1849) + p.Match(TrinoParserEMPTY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserCOPARTITION_, TrinoParserORDER_, TrinoParserCOMMA_, TrinoParserRPAREN_: + + default: + } + p.SetState(1868) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserORDER_ { + { + p.SetState(1852) + p.Match(TrinoParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1853) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1866) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 236, p.GetParserRuleContext()) { + case 1: + { + p.SetState(1854) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1855) + p.SortItem() + } + p.SetState(1860) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1856) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1857) + p.SortItem() + } + + p.SetState(1862) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1863) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + { + p.SetState(1865) + p.SortItem() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITableArgumentRelationContext is an interface to support dynamic dispatch. +type ITableArgumentRelationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsTableArgumentRelationContext differentiates from other interfaces. + IsTableArgumentRelationContext() +} + +type TableArgumentRelationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTableArgumentRelationContext() *TableArgumentRelationContext { + var p = new(TableArgumentRelationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableArgumentRelation + return p +} + +func InitEmptyTableArgumentRelationContext(p *TableArgumentRelationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_tableArgumentRelation +} + +func (*TableArgumentRelationContext) IsTableArgumentRelationContext() {} + +func NewTableArgumentRelationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TableArgumentRelationContext { + var p = new(TableArgumentRelationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_tableArgumentRelation + + return p +} + +func (s *TableArgumentRelationContext) GetParser() antlr.Parser { return s.parser } + +func (s *TableArgumentRelationContext) CopyAll(ctx *TableArgumentRelationContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *TableArgumentRelationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableArgumentRelationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type TableArgumentQueryContext struct { + TableArgumentRelationContext +} + +func NewTableArgumentQueryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TableArgumentQueryContext { + var p = new(TableArgumentQueryContext) + + InitEmptyTableArgumentRelationContext(&p.TableArgumentRelationContext) + p.parser = parser + p.CopyAll(ctx.(*TableArgumentRelationContext)) + + return p +} + +func (s *TableArgumentQueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableArgumentQueryContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *TableArgumentQueryContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *TableArgumentQueryContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *TableArgumentQueryContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *TableArgumentQueryContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *TableArgumentQueryContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *TableArgumentQueryContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *TableArgumentQueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableArgumentQuery(s) + } +} + +func (s *TableArgumentQueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableArgumentQuery(s) + } +} + +func (s *TableArgumentQueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableArgumentQuery(s) + + default: + return t.VisitChildren(s) + } +} + +type TableArgumentTableContext struct { + TableArgumentRelationContext +} + +func NewTableArgumentTableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TableArgumentTableContext { + var p = new(TableArgumentTableContext) + + InitEmptyTableArgumentRelationContext(&p.TableArgumentRelationContext) + p.parser = parser + p.CopyAll(ctx.(*TableArgumentRelationContext)) + + return p +} + +func (s *TableArgumentTableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TableArgumentTableContext) TABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLE_, 0) +} + +func (s *TableArgumentTableContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *TableArgumentTableContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *TableArgumentTableContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *TableArgumentTableContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *TableArgumentTableContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *TableArgumentTableContext) ColumnAliases() IColumnAliasesContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IColumnAliasesContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IColumnAliasesContext) +} + +func (s *TableArgumentTableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTableArgumentTable(s) + } +} + +func (s *TableArgumentTableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTableArgumentTable(s) + } +} + +func (s *TableArgumentTableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTableArgumentTable(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TableArgumentRelation() (localctx ITableArgumentRelationContext) { + localctx = NewTableArgumentRelationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 116, TrinoParserRULE_tableArgumentRelation) + var _la int + + p.SetState(1896) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 244, p.GetParserRuleContext()) { + case 1: + localctx = NewTableArgumentTableContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1870) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1871) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1872) + p.QualifiedName() + } + { + p.SetState(1873) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1881) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 240, p.GetParserRuleContext()) == 1 { + p.SetState(1875) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAS_ { + { + p.SetState(1874) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1877) + p.Identifier() + } + p.SetState(1879) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(1878) + p.ColumnAliases() + } + + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 2: + localctx = NewTableArgumentQueryContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1883) + p.Match(TrinoParserTABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1884) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1885) + p.Query() + } + { + p.SetState(1886) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(1894) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 243, p.GetParserRuleContext()) == 1 { + p.SetState(1888) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAS_ { + { + p.SetState(1887) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1890) + p.Identifier() + } + p.SetState(1892) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(1891) + p.ColumnAliases() + } + + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IDescriptorArgumentContext is an interface to support dynamic dispatch. +type IDescriptorArgumentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + DESCRIPTOR_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + AllDescriptorField() []IDescriptorFieldContext + DescriptorField(i int) IDescriptorFieldContext + RPAREN_() antlr.TerminalNode + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + CAST_() antlr.TerminalNode + NULL_() antlr.TerminalNode + AS_() antlr.TerminalNode + + // IsDescriptorArgumentContext differentiates from other interfaces. + IsDescriptorArgumentContext() +} + +type DescriptorArgumentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyDescriptorArgumentContext() *DescriptorArgumentContext { + var p = new(DescriptorArgumentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_descriptorArgument + return p +} + +func InitEmptyDescriptorArgumentContext(p *DescriptorArgumentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_descriptorArgument +} + +func (*DescriptorArgumentContext) IsDescriptorArgumentContext() {} + +func NewDescriptorArgumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DescriptorArgumentContext { + var p = new(DescriptorArgumentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_descriptorArgument + + return p +} + +func (s *DescriptorArgumentContext) GetParser() antlr.Parser { return s.parser } + +func (s *DescriptorArgumentContext) DESCRIPTOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESCRIPTOR_, 0) +} + +func (s *DescriptorArgumentContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *DescriptorArgumentContext) AllDescriptorField() []IDescriptorFieldContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IDescriptorFieldContext); ok { + len++ + } + } + + tst := make([]IDescriptorFieldContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IDescriptorFieldContext); ok { + tst[i] = t.(IDescriptorFieldContext) + i++ + } + } + + return tst +} + +func (s *DescriptorArgumentContext) DescriptorField(i int) IDescriptorFieldContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IDescriptorFieldContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IDescriptorFieldContext) +} + +func (s *DescriptorArgumentContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *DescriptorArgumentContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *DescriptorArgumentContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *DescriptorArgumentContext) CAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserCAST_, 0) +} + +func (s *DescriptorArgumentContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *DescriptorArgumentContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *DescriptorArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DescriptorArgumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *DescriptorArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDescriptorArgument(s) + } +} + +func (s *DescriptorArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDescriptorArgument(s) + } +} + +func (s *DescriptorArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDescriptorArgument(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) DescriptorArgument() (localctx IDescriptorArgumentContext) { + localctx = NewDescriptorArgumentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 118, TrinoParserRULE_descriptorArgument) + var _la int + + p.SetState(1916) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserDESCRIPTOR_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1898) + p.Match(TrinoParserDESCRIPTOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1899) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1900) + p.DescriptorField() + } + p.SetState(1905) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1901) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1902) + p.DescriptorField() + } + + p.SetState(1907) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1908) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserCAST_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1910) + p.Match(TrinoParserCAST_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1911) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1912) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1913) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1914) + p.Match(TrinoParserDESCRIPTOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1915) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IDescriptorFieldContext is an interface to support dynamic dispatch. +type IDescriptorFieldContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Identifier() IIdentifierContext + Type_() ITypeContext + + // IsDescriptorFieldContext differentiates from other interfaces. + IsDescriptorFieldContext() +} + +type DescriptorFieldContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyDescriptorFieldContext() *DescriptorFieldContext { + var p = new(DescriptorFieldContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_descriptorField + return p +} + +func InitEmptyDescriptorFieldContext(p *DescriptorFieldContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_descriptorField +} + +func (*DescriptorFieldContext) IsDescriptorFieldContext() {} + +func NewDescriptorFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *DescriptorFieldContext { + var p = new(DescriptorFieldContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_descriptorField + + return p +} + +func (s *DescriptorFieldContext) GetParser() antlr.Parser { return s.parser } + +func (s *DescriptorFieldContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *DescriptorFieldContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *DescriptorFieldContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DescriptorFieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *DescriptorFieldContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDescriptorField(s) + } +} + +func (s *DescriptorFieldContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDescriptorField(s) + } +} + +func (s *DescriptorFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDescriptorField(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) DescriptorField() (localctx IDescriptorFieldContext) { + localctx = NewDescriptorFieldContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 120, TrinoParserRULE_descriptorField) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1918) + p.Identifier() + } + p.SetState(1920) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699602754) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + { + p.SetState(1919) + p.type_(0) + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ICopartitionTablesContext is an interface to support dynamic dispatch. +type ICopartitionTablesContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + LPAREN_() antlr.TerminalNode + AllQualifiedName() []IQualifiedNameContext + QualifiedName(i int) IQualifiedNameContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + RPAREN_() antlr.TerminalNode + + // IsCopartitionTablesContext differentiates from other interfaces. + IsCopartitionTablesContext() +} + +type CopartitionTablesContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyCopartitionTablesContext() *CopartitionTablesContext { + var p = new(CopartitionTablesContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_copartitionTables + return p +} + +func InitEmptyCopartitionTablesContext(p *CopartitionTablesContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_copartitionTables +} + +func (*CopartitionTablesContext) IsCopartitionTablesContext() {} + +func NewCopartitionTablesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CopartitionTablesContext { + var p = new(CopartitionTablesContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_copartitionTables + + return p +} + +func (s *CopartitionTablesContext) GetParser() antlr.Parser { return s.parser } + +func (s *CopartitionTablesContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *CopartitionTablesContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *CopartitionTablesContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *CopartitionTablesContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *CopartitionTablesContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *CopartitionTablesContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *CopartitionTablesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CopartitionTablesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *CopartitionTablesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCopartitionTables(s) + } +} + +func (s *CopartitionTablesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCopartitionTables(s) + } +} + +func (s *CopartitionTablesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCopartitionTables(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) CopartitionTables() (localctx ICopartitionTablesContext) { + localctx = NewCopartitionTablesContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 122, TrinoParserRULE_copartitionTables) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1922) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1923) + p.QualifiedName() + } + { + p.SetState(1924) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1925) + p.QualifiedName() + } + p.SetState(1930) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1926) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1927) + p.QualifiedName() + } + + p.SetState(1932) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1933) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IExpressionContext is an interface to support dynamic dispatch. +type IExpressionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + BooleanExpression() IBooleanExpressionContext + + // IsExpressionContext differentiates from other interfaces. + IsExpressionContext() +} + +type ExpressionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyExpressionContext() *ExpressionContext { + var p = new(ExpressionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_expression + return p +} + +func InitEmptyExpressionContext(p *ExpressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_expression +} + +func (*ExpressionContext) IsExpressionContext() {} + +func NewExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionContext { + var p = new(ExpressionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_expression + + return p +} + +func (s *ExpressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *ExpressionContext) BooleanExpression() IBooleanExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *ExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ExpressionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExpression(s) + } +} + +func (s *ExpressionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExpression(s) + } +} + +func (s *ExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExpression(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Expression() (localctx IExpressionContext) { + localctx = NewExpressionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 124, TrinoParserRULE_expression) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1935) + p.booleanExpression(0) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IBooleanExpressionContext is an interface to support dynamic dispatch. +type IBooleanExpressionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsBooleanExpressionContext differentiates from other interfaces. + IsBooleanExpressionContext() +} + +type BooleanExpressionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyBooleanExpressionContext() *BooleanExpressionContext { + var p = new(BooleanExpressionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_booleanExpression + return p +} + +func InitEmptyBooleanExpressionContext(p *BooleanExpressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_booleanExpression +} + +func (*BooleanExpressionContext) IsBooleanExpressionContext() {} + +func NewBooleanExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BooleanExpressionContext { + var p = new(BooleanExpressionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_booleanExpression + + return p +} + +func (s *BooleanExpressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *BooleanExpressionContext) CopyAll(ctx *BooleanExpressionContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *BooleanExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BooleanExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type LogicalNotContext struct { + BooleanExpressionContext +} + +func NewLogicalNotContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LogicalNotContext { + var p = new(LogicalNotContext) + + InitEmptyBooleanExpressionContext(&p.BooleanExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*BooleanExpressionContext)) + + return p +} + +func (s *LogicalNotContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LogicalNotContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *LogicalNotContext) BooleanExpression() IBooleanExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *LogicalNotContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLogicalNot(s) + } +} + +func (s *LogicalNotContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLogicalNot(s) + } +} + +func (s *LogicalNotContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLogicalNot(s) + + default: + return t.VisitChildren(s) + } +} + +type PredicatedContext struct { + BooleanExpressionContext +} + +func NewPredicatedContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PredicatedContext { + var p = new(PredicatedContext) + + InitEmptyBooleanExpressionContext(&p.BooleanExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*BooleanExpressionContext)) + + return p +} + +func (s *PredicatedContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PredicatedContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *PredicatedContext) Predicate_() IPredicate_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPredicate_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPredicate_Context) +} + +func (s *PredicatedContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPredicated(s) + } +} + +func (s *PredicatedContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPredicated(s) + } +} + +func (s *PredicatedContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPredicated(s) + + default: + return t.VisitChildren(s) + } +} + +type OrContext struct { + BooleanExpressionContext +} + +func NewOrContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *OrContext { + var p = new(OrContext) + + InitEmptyBooleanExpressionContext(&p.BooleanExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*BooleanExpressionContext)) + + return p +} + +func (s *OrContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *OrContext) AllBooleanExpression() []IBooleanExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IBooleanExpressionContext); ok { + len++ + } + } + + tst := make([]IBooleanExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IBooleanExpressionContext); ok { + tst[i] = t.(IBooleanExpressionContext) + i++ + } + } + + return tst +} + +func (s *OrContext) BooleanExpression(i int) IBooleanExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *OrContext) OR_() antlr.TerminalNode { + return s.GetToken(TrinoParserOR_, 0) +} + +func (s *OrContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterOr(s) + } +} + +func (s *OrContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitOr(s) + } +} + +func (s *OrContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitOr(s) + + default: + return t.VisitChildren(s) + } +} + +type AndContext struct { + BooleanExpressionContext +} + +func NewAndContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AndContext { + var p = new(AndContext) + + InitEmptyBooleanExpressionContext(&p.BooleanExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*BooleanExpressionContext)) + + return p +} + +func (s *AndContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *AndContext) AllBooleanExpression() []IBooleanExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IBooleanExpressionContext); ok { + len++ + } + } + + tst := make([]IBooleanExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IBooleanExpressionContext); ok { + tst[i] = t.(IBooleanExpressionContext) + i++ + } + } + + return tst +} + +func (s *AndContext) BooleanExpression(i int) IBooleanExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *AndContext) AND_() antlr.TerminalNode { + return s.GetToken(TrinoParserAND_, 0) +} + +func (s *AndContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterAnd(s) + } +} + +func (s *AndContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitAnd(s) + } +} + +func (s *AndContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitAnd(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) BooleanExpression() (localctx IBooleanExpressionContext) { + return p.booleanExpression(0) +} + +func (p *TrinoParser) booleanExpression(_p int) (localctx IBooleanExpressionContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewBooleanExpressionContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IBooleanExpressionContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 126 + p.EnterRecursionRule(localctx, 126, TrinoParserRULE_booleanExpression, _p) + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(1944) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserABSENT_, TrinoParserADD_, TrinoParserADMIN_, TrinoParserAFTER_, TrinoParserALL_, TrinoParserANALYZE_, TrinoParserANY_, TrinoParserARRAY_, TrinoParserASC_, TrinoParserAT_, TrinoParserAUTHORIZATION_, TrinoParserBEGIN_, TrinoParserBERNOULLI_, TrinoParserBOTH_, TrinoParserCALL_, TrinoParserCALLED_, TrinoParserCASCADE_, TrinoParserCASE_, TrinoParserCAST_, TrinoParserCATALOG_, TrinoParserCATALOGS_, TrinoParserCOLUMN_, TrinoParserCOLUMNS_, TrinoParserCOMMENT_, TrinoParserCOMMIT_, TrinoParserCOMMITTED_, TrinoParserCONDITIONAL_, TrinoParserCOUNT_, TrinoParserCOPARTITION_, TrinoParserCURRENT_, TrinoParserCURRENT_CATALOG_, TrinoParserCURRENT_DATE_, TrinoParserCURRENT_PATH_, TrinoParserCURRENT_SCHEMA_, TrinoParserCURRENT_TIME_, TrinoParserCURRENT_TIMESTAMP_, TrinoParserCURRENT_USER_, TrinoParserDATA_, TrinoParserDATE_, TrinoParserDAY_, TrinoParserDECLARE_, TrinoParserDEFAULT_, TrinoParserDEFINE_, TrinoParserDEFINER_, TrinoParserDENY_, TrinoParserDESC_, TrinoParserDESCRIPTOR_, TrinoParserDETERMINISTIC_, TrinoParserDISTRIBUTED_, TrinoParserDO_, TrinoParserDOUBLE_, TrinoParserEMPTY_, TrinoParserELSEIF_, TrinoParserENCODING_, TrinoParserERROR_, TrinoParserEXCLUDING_, TrinoParserEXISTS_, TrinoParserEXPLAIN_, TrinoParserEXTRACT_, TrinoParserFALSE_, TrinoParserFETCH_, TrinoParserFILTER_, TrinoParserFINAL_, TrinoParserFIRST_, TrinoParserFOLLOWING_, TrinoParserFORMAT_, TrinoParserFUNCTION_, TrinoParserFUNCTIONS_, TrinoParserGRACE_, TrinoParserGRANT_, TrinoParserGRANTED_, TrinoParserGRANTS_, TrinoParserGRAPHVIZ_, TrinoParserGROUPING_, TrinoParserGROUPS_, TrinoParserHOUR_, TrinoParserIF_, TrinoParserIGNORE_, TrinoParserIMMEDIATE_, TrinoParserINCLUDING_, TrinoParserINITIAL_, TrinoParserINPUT_, TrinoParserINTERVAL_, TrinoParserINVOKER_, TrinoParserIO_, TrinoParserISOLATION_, TrinoParserITERATE_, TrinoParserJSON_, TrinoParserJSON_ARRAY_, TrinoParserJSON_EXISTS_, TrinoParserJSON_OBJECT_, TrinoParserJSON_QUERY_, TrinoParserJSON_VALUE_, TrinoParserKEEP_, TrinoParserKEY_, TrinoParserKEYS_, TrinoParserLANGUAGE_, TrinoParserLAST_, TrinoParserLATERAL_, TrinoParserLEADING_, TrinoParserLEAVE_, TrinoParserLEVEL_, TrinoParserLIMIT_, TrinoParserLISTAGG_, TrinoParserLOCAL_, TrinoParserLOCALTIME_, TrinoParserLOCALTIMESTAMP_, TrinoParserLOGICAL_, TrinoParserLOOP_, TrinoParserMAP_, TrinoParserMATCH_, TrinoParserMATCHED_, TrinoParserMATCHES_, TrinoParserMATCH_RECOGNIZE_, TrinoParserMATERIALIZED_, TrinoParserMEASURES_, TrinoParserMERGE_, TrinoParserMINUTE_, TrinoParserMONTH_, TrinoParserNESTED_, TrinoParserNEXT_, TrinoParserNFC_, TrinoParserNFD_, TrinoParserNFKC_, TrinoParserNFKD_, TrinoParserNO_, TrinoParserNONE_, TrinoParserNORMALIZE_, TrinoParserNULL_, TrinoParserNULLIF_, TrinoParserNULLS_, TrinoParserOBJECT_, TrinoParserOF_, TrinoParserOFFSET_, TrinoParserOMIT_, TrinoParserONE_, TrinoParserONLY_, TrinoParserOPTION_, TrinoParserORDINALITY_, TrinoParserOUTPUT_, TrinoParserOVER_, TrinoParserOVERFLOW_, TrinoParserPARTITION_, TrinoParserPARTITIONS_, TrinoParserPASSING_, TrinoParserPAST_, TrinoParserPATH_, TrinoParserPATTERN_, TrinoParserPER_, TrinoParserPERIOD_, TrinoParserPERMUTE_, TrinoParserPLAN_, TrinoParserPOSITION_, TrinoParserPRECEDING_, TrinoParserPRECISION_, TrinoParserPRIVILEGES_, TrinoParserPROPERTIES_, TrinoParserPRUNE_, TrinoParserQUOTES_, TrinoParserRANGE_, TrinoParserREAD_, TrinoParserREFRESH_, TrinoParserRENAME_, TrinoParserREPEAT_, TrinoParserREPEATABLE_, TrinoParserREPLACE_, TrinoParserRESET_, TrinoParserRESPECT_, TrinoParserRESTRICT_, TrinoParserRETURN_, TrinoParserRETURNING_, TrinoParserRETURNS_, TrinoParserREVOKE_, TrinoParserROLE_, TrinoParserROLES_, TrinoParserROLLBACK_, TrinoParserROW_, TrinoParserROWS_, TrinoParserRUNNING_, TrinoParserSCALAR_, TrinoParserSCHEMA_, TrinoParserSCHEMAS_, TrinoParserSECOND_, TrinoParserSECURITY_, TrinoParserSEEK_, TrinoParserSERIALIZABLE_, TrinoParserSESSION_, TrinoParserSET_, TrinoParserSETS_, TrinoParserSHOW_, TrinoParserSOME_, TrinoParserSTART_, TrinoParserSTATS_, TrinoParserSUBSET_, TrinoParserSUBSTRING_, TrinoParserSYSTEM_, TrinoParserTABLES_, TrinoParserTABLESAMPLE_, TrinoParserTEXT_, TrinoParserTEXT_STRING_, TrinoParserTIES_, TrinoParserTIME_, TrinoParserTIMESTAMP_, TrinoParserTO_, TrinoParserTRAILING_, TrinoParserTRANSACTION_, TrinoParserTRIM_, TrinoParserTRUE_, TrinoParserTRUNCATE_, TrinoParserTRY_CAST_, TrinoParserTYPE_, TrinoParserUNBOUNDED_, TrinoParserUNCOMMITTED_, TrinoParserUNCONDITIONAL_, TrinoParserUNIQUE_, TrinoParserUNKNOWN_, TrinoParserUNMATCHED_, TrinoParserUNTIL_, TrinoParserUPDATE_, TrinoParserUSE_, TrinoParserUSER_, TrinoParserUTF16_, TrinoParserUTF32_, TrinoParserUTF8_, TrinoParserVALIDATE_, TrinoParserVALUE_, TrinoParserVERBOSE_, TrinoParserVERSION_, TrinoParserVIEW_, TrinoParserWHILE_, TrinoParserWINDOW_, TrinoParserWITHIN_, TrinoParserWITHOUT_, TrinoParserWORK_, TrinoParserWRAPPER_, TrinoParserWRITE_, TrinoParserYEAR_, TrinoParserZONE_, TrinoParserPLUS_, TrinoParserMINUS_, TrinoParserQUESTION_MARK_, TrinoParserLPAREN_, TrinoParserSTRING_, TrinoParserUNICODE_STRING_, TrinoParserBINARY_LITERAL_, TrinoParserINTEGER_VALUE_, TrinoParserDECIMAL_VALUE_, TrinoParserDOUBLE_VALUE_, TrinoParserIDENTIFIER_, TrinoParserDIGIT_IDENTIFIER_, TrinoParserQUOTED_IDENTIFIER_, TrinoParserBACKQUOTED_IDENTIFIER_: + localctx = NewPredicatedContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + + { + p.SetState(1938) + p.valueExpression(0) + } + p.SetState(1940) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 249, p.GetParserRuleContext()) == 1 { + { + p.SetState(1939) + p.Predicate_() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case TrinoParserNOT_: + localctx = NewLogicalNotContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(1942) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1943) + p.booleanExpression(3) + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(1954) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 252, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + p.SetState(1952) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 251, p.GetParserRuleContext()) { + case 1: + localctx = NewAndContext(p, NewBooleanExpressionContext(p, _parentctx, _parentState)) + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_booleanExpression) + p.SetState(1946) + + if !(p.Precpred(p.GetParserRuleContext(), 2)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit + } + { + p.SetState(1947) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1948) + p.booleanExpression(3) + } + + case 2: + localctx = NewOrContext(p, NewBooleanExpressionContext(p, _parentctx, _parentState)) + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_booleanExpression) + p.SetState(1949) + + if !(p.Precpred(p.GetParserRuleContext(), 1)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + goto errorExit + } + { + p.SetState(1950) + p.Match(TrinoParserOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1951) + p.booleanExpression(2) + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + } + p.SetState(1956) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 252, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPredicate_Context is an interface to support dynamic dispatch. +type IPredicate_Context interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsPredicate_Context differentiates from other interfaces. + IsPredicate_Context() +} + +type Predicate_Context struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPredicate_Context() *Predicate_Context { + var p = new(Predicate_Context) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_predicate_ + return p +} + +func InitEmptyPredicate_Context(p *Predicate_Context) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_predicate_ +} + +func (*Predicate_Context) IsPredicate_Context() {} + +func NewPredicate_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Predicate_Context { + var p = new(Predicate_Context) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_predicate_ + + return p +} + +func (s *Predicate_Context) GetParser() antlr.Parser { return s.parser } + +func (s *Predicate_Context) CopyAll(ctx *Predicate_Context) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *Predicate_Context) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Predicate_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type ComparisonContext struct { + Predicate_Context + right IValueExpressionContext +} + +func NewComparisonContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ComparisonContext { + var p = new(ComparisonContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *ComparisonContext) GetRight() IValueExpressionContext { return s.right } + +func (s *ComparisonContext) SetRight(v IValueExpressionContext) { s.right = v } + +func (s *ComparisonContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ComparisonContext) ComparisonOperator() IComparisonOperatorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IComparisonOperatorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IComparisonOperatorContext) +} + +func (s *ComparisonContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *ComparisonContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterComparison(s) + } +} + +func (s *ComparisonContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitComparison(s) + } +} + +func (s *ComparisonContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitComparison(s) + + default: + return t.VisitChildren(s) + } +} + +type LikeContext struct { + Predicate_Context + pattern IValueExpressionContext + escape IValueExpressionContext +} + +func NewLikeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LikeContext { + var p = new(LikeContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *LikeContext) GetPattern() IValueExpressionContext { return s.pattern } + +func (s *LikeContext) GetEscape() IValueExpressionContext { return s.escape } + +func (s *LikeContext) SetPattern(v IValueExpressionContext) { s.pattern = v } + +func (s *LikeContext) SetEscape(v IValueExpressionContext) { s.escape = v } + +func (s *LikeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LikeContext) LIKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIKE_, 0) +} + +func (s *LikeContext) AllValueExpression() []IValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IValueExpressionContext); ok { + len++ + } + } + + tst := make([]IValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IValueExpressionContext); ok { + tst[i] = t.(IValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *LikeContext) ValueExpression(i int) IValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *LikeContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *LikeContext) ESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserESCAPE_, 0) +} + +func (s *LikeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLike(s) + } +} + +func (s *LikeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLike(s) + } +} + +func (s *LikeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLike(s) + + default: + return t.VisitChildren(s) + } +} + +type InSubqueryContext struct { + Predicate_Context +} + +func NewInSubqueryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *InSubqueryContext { + var p = new(InSubqueryContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *InSubqueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *InSubqueryContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *InSubqueryContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *InSubqueryContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *InSubqueryContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *InSubqueryContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *InSubqueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterInSubquery(s) + } +} + +func (s *InSubqueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitInSubquery(s) + } +} + +func (s *InSubqueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitInSubquery(s) + + default: + return t.VisitChildren(s) + } +} + +type DistinctFromContext struct { + Predicate_Context + right IValueExpressionContext +} + +func NewDistinctFromContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DistinctFromContext { + var p = new(DistinctFromContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *DistinctFromContext) GetRight() IValueExpressionContext { return s.right } + +func (s *DistinctFromContext) SetRight(v IValueExpressionContext) { s.right = v } + +func (s *DistinctFromContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DistinctFromContext) IS_() antlr.TerminalNode { + return s.GetToken(TrinoParserIS_, 0) +} + +func (s *DistinctFromContext) DISTINCT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDISTINCT_, 0) +} + +func (s *DistinctFromContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *DistinctFromContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *DistinctFromContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *DistinctFromContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDistinctFrom(s) + } +} + +func (s *DistinctFromContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDistinctFrom(s) + } +} + +func (s *DistinctFromContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDistinctFrom(s) + + default: + return t.VisitChildren(s) + } +} + +type InListContext struct { + Predicate_Context +} + +func NewInListContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *InListContext { + var p = new(InListContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *InListContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *InListContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *InListContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *InListContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *InListContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *InListContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *InListContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *InListContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *InListContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *InListContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterInList(s) + } +} + +func (s *InListContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitInList(s) + } +} + +func (s *InListContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitInList(s) + + default: + return t.VisitChildren(s) + } +} + +type NullPredicateContext struct { + Predicate_Context +} + +func NewNullPredicateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NullPredicateContext { + var p = new(NullPredicateContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *NullPredicateContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NullPredicateContext) IS_() antlr.TerminalNode { + return s.GetToken(TrinoParserIS_, 0) +} + +func (s *NullPredicateContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *NullPredicateContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *NullPredicateContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNullPredicate(s) + } +} + +func (s *NullPredicateContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNullPredicate(s) + } +} + +func (s *NullPredicateContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNullPredicate(s) + + default: + return t.VisitChildren(s) + } +} + +type BetweenContext struct { + Predicate_Context + lower IValueExpressionContext + upper IValueExpressionContext +} + +func NewBetweenContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BetweenContext { + var p = new(BetweenContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *BetweenContext) GetLower() IValueExpressionContext { return s.lower } + +func (s *BetweenContext) GetUpper() IValueExpressionContext { return s.upper } + +func (s *BetweenContext) SetLower(v IValueExpressionContext) { s.lower = v } + +func (s *BetweenContext) SetUpper(v IValueExpressionContext) { s.upper = v } + +func (s *BetweenContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BetweenContext) BETWEEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserBETWEEN_, 0) +} + +func (s *BetweenContext) AND_() antlr.TerminalNode { + return s.GetToken(TrinoParserAND_, 0) +} + +func (s *BetweenContext) AllValueExpression() []IValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IValueExpressionContext); ok { + len++ + } + } + + tst := make([]IValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IValueExpressionContext); ok { + tst[i] = t.(IValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *BetweenContext) ValueExpression(i int) IValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *BetweenContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *BetweenContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterBetween(s) + } +} + +func (s *BetweenContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitBetween(s) + } +} + +func (s *BetweenContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitBetween(s) + + default: + return t.VisitChildren(s) + } +} + +type QuantifiedComparisonContext struct { + Predicate_Context +} + +func NewQuantifiedComparisonContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *QuantifiedComparisonContext { + var p = new(QuantifiedComparisonContext) + + InitEmptyPredicate_Context(&p.Predicate_Context) + p.parser = parser + p.CopyAll(ctx.(*Predicate_Context)) + + return p +} + +func (s *QuantifiedComparisonContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QuantifiedComparisonContext) ComparisonOperator() IComparisonOperatorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IComparisonOperatorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IComparisonOperatorContext) +} + +func (s *QuantifiedComparisonContext) ComparisonQuantifier() IComparisonQuantifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IComparisonQuantifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IComparisonQuantifierContext) +} + +func (s *QuantifiedComparisonContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *QuantifiedComparisonContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *QuantifiedComparisonContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *QuantifiedComparisonContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQuantifiedComparison(s) + } +} + +func (s *QuantifiedComparisonContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQuantifiedComparison(s) + } +} + +func (s *QuantifiedComparisonContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQuantifiedComparison(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Predicate_() (localctx IPredicate_Context) { + localctx = NewPredicate_Context(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 128, TrinoParserRULE_predicate_) + var _la int + + p.SetState(2018) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 261, p.GetParserRuleContext()) { + case 1: + localctx = NewComparisonContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(1957) + p.ComparisonOperator() + } + { + p.SetState(1958) + + var _x = p.valueExpression(0) + + localctx.(*ComparisonContext).right = _x + } + + case 2: + localctx = NewQuantifiedComparisonContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(1960) + p.ComparisonOperator() + } + { + p.SetState(1961) + p.ComparisonQuantifier() + } + { + p.SetState(1962) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1963) + p.Query() + } + { + p.SetState(1964) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewBetweenContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + p.SetState(1967) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(1966) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1969) + p.Match(TrinoParserBETWEEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1970) + + var _x = p.valueExpression(0) + + localctx.(*BetweenContext).lower = _x + } + { + p.SetState(1971) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1972) + + var _x = p.valueExpression(0) + + localctx.(*BetweenContext).upper = _x + } + + case 4: + localctx = NewInListContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + p.SetState(1975) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(1974) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1977) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1978) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1979) + p.Expression() + } + p.SetState(1984) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(1980) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1981) + p.Expression() + } + + p.SetState(1986) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(1987) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 5: + localctx = NewInSubqueryContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + p.SetState(1990) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(1989) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(1992) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1993) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(1994) + p.Query() + } + { + p.SetState(1995) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 6: + localctx = NewLikeContext(p, localctx) + p.EnterOuterAlt(localctx, 6) + p.SetState(1998) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(1997) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2000) + p.Match(TrinoParserLIKE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2001) + + var _x = p.valueExpression(0) + + localctx.(*LikeContext).pattern = _x + } + p.SetState(2004) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 258, p.GetParserRuleContext()) == 1 { + { + p.SetState(2002) + p.Match(TrinoParserESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2003) + + var _x = p.valueExpression(0) + + localctx.(*LikeContext).escape = _x + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 7: + localctx = NewNullPredicateContext(p, localctx) + p.EnterOuterAlt(localctx, 7) + { + p.SetState(2006) + p.Match(TrinoParserIS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2008) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(2007) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2010) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 8: + localctx = NewDistinctFromContext(p, localctx) + p.EnterOuterAlt(localctx, 8) + { + p.SetState(2011) + p.Match(TrinoParserIS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2013) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(2012) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2015) + p.Match(TrinoParserDISTINCT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2016) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2017) + + var _x = p.valueExpression(0) + + localctx.(*DistinctFromContext).right = _x + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IValueExpressionContext is an interface to support dynamic dispatch. +type IValueExpressionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsValueExpressionContext differentiates from other interfaces. + IsValueExpressionContext() +} + +type ValueExpressionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyValueExpressionContext() *ValueExpressionContext { + var p = new(ValueExpressionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_valueExpression + return p +} + +func InitEmptyValueExpressionContext(p *ValueExpressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_valueExpression +} + +func (*ValueExpressionContext) IsValueExpressionContext() {} + +func NewValueExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ValueExpressionContext { + var p = new(ValueExpressionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_valueExpression + + return p +} + +func (s *ValueExpressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *ValueExpressionContext) CopyAll(ctx *ValueExpressionContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *ValueExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ValueExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type ValueExpressionDefaultContext struct { + ValueExpressionContext +} + +func NewValueExpressionDefaultContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ValueExpressionDefaultContext { + var p = new(ValueExpressionDefaultContext) + + InitEmptyValueExpressionContext(&p.ValueExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*ValueExpressionContext)) + + return p +} + +func (s *ValueExpressionDefaultContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ValueExpressionDefaultContext) PrimaryExpression() IPrimaryExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrimaryExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrimaryExpressionContext) +} + +func (s *ValueExpressionDefaultContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterValueExpressionDefault(s) + } +} + +func (s *ValueExpressionDefaultContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitValueExpressionDefault(s) + } +} + +func (s *ValueExpressionDefaultContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitValueExpressionDefault(s) + + default: + return t.VisitChildren(s) + } +} + +type ConcatenationContext struct { + ValueExpressionContext + left IValueExpressionContext + right IValueExpressionContext +} + +func NewConcatenationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ConcatenationContext { + var p = new(ConcatenationContext) + + InitEmptyValueExpressionContext(&p.ValueExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*ValueExpressionContext)) + + return p +} + +func (s *ConcatenationContext) GetLeft() IValueExpressionContext { return s.left } + +func (s *ConcatenationContext) GetRight() IValueExpressionContext { return s.right } + +func (s *ConcatenationContext) SetLeft(v IValueExpressionContext) { s.left = v } + +func (s *ConcatenationContext) SetRight(v IValueExpressionContext) { s.right = v } + +func (s *ConcatenationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ConcatenationContext) CONCAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCONCAT_, 0) +} + +func (s *ConcatenationContext) AllValueExpression() []IValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IValueExpressionContext); ok { + len++ + } + } + + tst := make([]IValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IValueExpressionContext); ok { + tst[i] = t.(IValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *ConcatenationContext) ValueExpression(i int) IValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *ConcatenationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterConcatenation(s) + } +} + +func (s *ConcatenationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitConcatenation(s) + } +} + +func (s *ConcatenationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitConcatenation(s) + + default: + return t.VisitChildren(s) + } +} + +type ArithmeticBinaryContext struct { + ValueExpressionContext + left IValueExpressionContext + operator antlr.Token + right IValueExpressionContext +} + +func NewArithmeticBinaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArithmeticBinaryContext { + var p = new(ArithmeticBinaryContext) + + InitEmptyValueExpressionContext(&p.ValueExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*ValueExpressionContext)) + + return p +} + +func (s *ArithmeticBinaryContext) GetOperator() antlr.Token { return s.operator } + +func (s *ArithmeticBinaryContext) SetOperator(v antlr.Token) { s.operator = v } + +func (s *ArithmeticBinaryContext) GetLeft() IValueExpressionContext { return s.left } + +func (s *ArithmeticBinaryContext) GetRight() IValueExpressionContext { return s.right } + +func (s *ArithmeticBinaryContext) SetLeft(v IValueExpressionContext) { s.left = v } + +func (s *ArithmeticBinaryContext) SetRight(v IValueExpressionContext) { s.right = v } + +func (s *ArithmeticBinaryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ArithmeticBinaryContext) AllValueExpression() []IValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IValueExpressionContext); ok { + len++ + } + } + + tst := make([]IValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IValueExpressionContext); ok { + tst[i] = t.(IValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *ArithmeticBinaryContext) ValueExpression(i int) IValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *ArithmeticBinaryContext) ASTERISK_() antlr.TerminalNode { + return s.GetToken(TrinoParserASTERISK_, 0) +} + +func (s *ArithmeticBinaryContext) SLASH_() antlr.TerminalNode { + return s.GetToken(TrinoParserSLASH_, 0) +} + +func (s *ArithmeticBinaryContext) PERCENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserPERCENT_, 0) +} + +func (s *ArithmeticBinaryContext) PLUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserPLUS_, 0) +} + +func (s *ArithmeticBinaryContext) MINUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUS_, 0) +} + +func (s *ArithmeticBinaryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterArithmeticBinary(s) + } +} + +func (s *ArithmeticBinaryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitArithmeticBinary(s) + } +} + +func (s *ArithmeticBinaryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitArithmeticBinary(s) + + default: + return t.VisitChildren(s) + } +} + +type ArithmeticUnaryContext struct { + ValueExpressionContext + operator antlr.Token +} + +func NewArithmeticUnaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArithmeticUnaryContext { + var p = new(ArithmeticUnaryContext) + + InitEmptyValueExpressionContext(&p.ValueExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*ValueExpressionContext)) + + return p +} + +func (s *ArithmeticUnaryContext) GetOperator() antlr.Token { return s.operator } + +func (s *ArithmeticUnaryContext) SetOperator(v antlr.Token) { s.operator = v } + +func (s *ArithmeticUnaryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ArithmeticUnaryContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *ArithmeticUnaryContext) MINUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUS_, 0) +} + +func (s *ArithmeticUnaryContext) PLUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserPLUS_, 0) +} + +func (s *ArithmeticUnaryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterArithmeticUnary(s) + } +} + +func (s *ArithmeticUnaryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitArithmeticUnary(s) + } +} + +func (s *ArithmeticUnaryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitArithmeticUnary(s) + + default: + return t.VisitChildren(s) + } +} + +type AtTimeZoneContext struct { + ValueExpressionContext +} + +func NewAtTimeZoneContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AtTimeZoneContext { + var p = new(AtTimeZoneContext) + + InitEmptyValueExpressionContext(&p.ValueExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*ValueExpressionContext)) + + return p +} + +func (s *AtTimeZoneContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *AtTimeZoneContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *AtTimeZoneContext) AT_() antlr.TerminalNode { + return s.GetToken(TrinoParserAT_, 0) +} + +func (s *AtTimeZoneContext) TimeZoneSpecifier() ITimeZoneSpecifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITimeZoneSpecifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITimeZoneSpecifierContext) +} + +func (s *AtTimeZoneContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterAtTimeZone(s) + } +} + +func (s *AtTimeZoneContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitAtTimeZone(s) + } +} + +func (s *AtTimeZoneContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitAtTimeZone(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ValueExpression() (localctx IValueExpressionContext) { + return p.valueExpression(0) +} + +func (p *TrinoParser) valueExpression(_p int) (localctx IValueExpressionContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewValueExpressionContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IValueExpressionContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 130 + p.EnterRecursionRule(localctx, 130, TrinoParserRULE_valueExpression, _p) + var _la int + + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(2024) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 262, p.GetParserRuleContext()) { + case 1: + localctx = NewValueExpressionDefaultContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + + { + p.SetState(2021) + p.primaryExpression(0) + } + + case 2: + localctx = NewArithmeticUnaryContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2022) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*ArithmeticUnaryContext).operator = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserPLUS_ || _la == TrinoParserMINUS_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*ArithmeticUnaryContext).operator = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(2023) + p.valueExpression(4) + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(2040) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 264, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + p.SetState(2038) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 263, p.GetParserRuleContext()) { + case 1: + localctx = NewArithmeticBinaryContext(p, NewValueExpressionContext(p, _parentctx, _parentState)) + localctx.(*ArithmeticBinaryContext).left = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_valueExpression) + p.SetState(2026) + + if !(p.Precpred(p.GetParserRuleContext(), 3)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) + goto errorExit + } + { + p.SetState(2027) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*ArithmeticBinaryContext).operator = _lt + + _la = p.GetTokenStream().LA(1) + + if !((int64((_la-304)) & ^0x3f) == 0 && ((int64(1)<<(_la-304))&7) != 0) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*ArithmeticBinaryContext).operator = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(2028) + + var _x = p.valueExpression(4) + + localctx.(*ArithmeticBinaryContext).right = _x + } + + case 2: + localctx = NewArithmeticBinaryContext(p, NewValueExpressionContext(p, _parentctx, _parentState)) + localctx.(*ArithmeticBinaryContext).left = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_valueExpression) + p.SetState(2029) + + if !(p.Precpred(p.GetParserRuleContext(), 2)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit + } + { + p.SetState(2030) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*ArithmeticBinaryContext).operator = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserPLUS_ || _la == TrinoParserMINUS_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*ArithmeticBinaryContext).operator = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(2031) + + var _x = p.valueExpression(3) + + localctx.(*ArithmeticBinaryContext).right = _x + } + + case 3: + localctx = NewConcatenationContext(p, NewValueExpressionContext(p, _parentctx, _parentState)) + localctx.(*ConcatenationContext).left = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_valueExpression) + p.SetState(2032) + + if !(p.Precpred(p.GetParserRuleContext(), 1)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + goto errorExit + } + { + p.SetState(2033) + p.Match(TrinoParserCONCAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2034) + + var _x = p.valueExpression(2) + + localctx.(*ConcatenationContext).right = _x + } + + case 4: + localctx = NewAtTimeZoneContext(p, NewValueExpressionContext(p, _parentctx, _parentState)) + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_valueExpression) + p.SetState(2035) + + if !(p.Precpred(p.GetParserRuleContext(), 5)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) + goto errorExit + } + { + p.SetState(2036) + p.Match(TrinoParserAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2037) + p.TimeZoneSpecifier() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + } + p.SetState(2042) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 264, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPrimaryExpressionContext is an interface to support dynamic dispatch. +type IPrimaryExpressionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsPrimaryExpressionContext differentiates from other interfaces. + IsPrimaryExpressionContext() +} + +type PrimaryExpressionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPrimaryExpressionContext() *PrimaryExpressionContext { + var p = new(PrimaryExpressionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_primaryExpression + return p +} + +func InitEmptyPrimaryExpressionContext(p *PrimaryExpressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_primaryExpression +} + +func (*PrimaryExpressionContext) IsPrimaryExpressionContext() {} + +func NewPrimaryExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrimaryExpressionContext { + var p = new(PrimaryExpressionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_primaryExpression + + return p +} + +func (s *PrimaryExpressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *PrimaryExpressionContext) CopyAll(ctx *PrimaryExpressionContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *PrimaryExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PrimaryExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type DereferenceContext struct { + PrimaryExpressionContext + base_ IPrimaryExpressionContext + fieldName IIdentifierContext +} + +func NewDereferenceContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DereferenceContext { + var p = new(DereferenceContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *DereferenceContext) GetBase_() IPrimaryExpressionContext { return s.base_ } + +func (s *DereferenceContext) GetFieldName() IIdentifierContext { return s.fieldName } + +func (s *DereferenceContext) SetBase_(v IPrimaryExpressionContext) { s.base_ = v } + +func (s *DereferenceContext) SetFieldName(v IIdentifierContext) { s.fieldName = v } + +func (s *DereferenceContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DereferenceContext) DOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOT_, 0) +} + +func (s *DereferenceContext) PrimaryExpression() IPrimaryExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrimaryExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrimaryExpressionContext) +} + +func (s *DereferenceContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *DereferenceContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDereference(s) + } +} + +func (s *DereferenceContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDereference(s) + } +} + +func (s *DereferenceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDereference(s) + + default: + return t.VisitChildren(s) + } +} + +type TypeConstructorContext struct { + PrimaryExpressionContext +} + +func NewTypeConstructorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TypeConstructorContext { + var p = new(TypeConstructorContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *TypeConstructorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeConstructorContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *TypeConstructorContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *TypeConstructorContext) DOUBLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOUBLE_, 0) +} + +func (s *TypeConstructorContext) PRECISION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRECISION_, 0) +} + +func (s *TypeConstructorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTypeConstructor(s) + } +} + +func (s *TypeConstructorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTypeConstructor(s) + } +} + +func (s *TypeConstructorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTypeConstructor(s) + + default: + return t.VisitChildren(s) + } +} + +type JsonValueContext struct { + PrimaryExpressionContext + emptyBehavior IJsonValueBehaviorContext + errorBehavior IJsonValueBehaviorContext +} + +func NewJsonValueContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JsonValueContext { + var p = new(JsonValueContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *JsonValueContext) GetEmptyBehavior() IJsonValueBehaviorContext { return s.emptyBehavior } + +func (s *JsonValueContext) GetErrorBehavior() IJsonValueBehaviorContext { return s.errorBehavior } + +func (s *JsonValueContext) SetEmptyBehavior(v IJsonValueBehaviorContext) { s.emptyBehavior = v } + +func (s *JsonValueContext) SetErrorBehavior(v IJsonValueBehaviorContext) { s.errorBehavior = v } + +func (s *JsonValueContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonValueContext) JSON_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_VALUE_, 0) +} + +func (s *JsonValueContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *JsonValueContext) JsonPathInvocation() IJsonPathInvocationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonPathInvocationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonPathInvocationContext) +} + +func (s *JsonValueContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *JsonValueContext) RETURNING_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNING_, 0) +} + +func (s *JsonValueContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *JsonValueContext) AllON_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserON_) +} + +func (s *JsonValueContext) ON_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserON_, i) +} + +func (s *JsonValueContext) EMPTY_() antlr.TerminalNode { + return s.GetToken(TrinoParserEMPTY_, 0) +} + +func (s *JsonValueContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *JsonValueContext) AllJsonValueBehavior() []IJsonValueBehaviorContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IJsonValueBehaviorContext); ok { + len++ + } + } + + tst := make([]IJsonValueBehaviorContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IJsonValueBehaviorContext); ok { + tst[i] = t.(IJsonValueBehaviorContext) + i++ + } + } + + return tst +} + +func (s *JsonValueContext) JsonValueBehavior(i int) IJsonValueBehaviorContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonValueBehaviorContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IJsonValueBehaviorContext) +} + +func (s *JsonValueContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonValue(s) + } +} + +func (s *JsonValueContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonValue(s) + } +} + +func (s *JsonValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonValue(s) + + default: + return t.VisitChildren(s) + } +} + +type SpecialDateTimeFunctionContext struct { + PrimaryExpressionContext + name antlr.Token + precision antlr.Token +} + +func NewSpecialDateTimeFunctionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SpecialDateTimeFunctionContext { + var p = new(SpecialDateTimeFunctionContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *SpecialDateTimeFunctionContext) GetName() antlr.Token { return s.name } + +func (s *SpecialDateTimeFunctionContext) GetPrecision() antlr.Token { return s.precision } + +func (s *SpecialDateTimeFunctionContext) SetName(v antlr.Token) { s.name = v } + +func (s *SpecialDateTimeFunctionContext) SetPrecision(v antlr.Token) { s.precision = v } + +func (s *SpecialDateTimeFunctionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SpecialDateTimeFunctionContext) CURRENT_DATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_DATE_, 0) +} + +func (s *SpecialDateTimeFunctionContext) CURRENT_TIME_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_TIME_, 0) +} + +func (s *SpecialDateTimeFunctionContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *SpecialDateTimeFunctionContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *SpecialDateTimeFunctionContext) INTEGER_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTEGER_VALUE_, 0) +} + +func (s *SpecialDateTimeFunctionContext) CURRENT_TIMESTAMP_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_TIMESTAMP_, 0) +} + +func (s *SpecialDateTimeFunctionContext) LOCALTIME_() antlr.TerminalNode { + return s.GetToken(TrinoParserLOCALTIME_, 0) +} + +func (s *SpecialDateTimeFunctionContext) LOCALTIMESTAMP_() antlr.TerminalNode { + return s.GetToken(TrinoParserLOCALTIMESTAMP_, 0) +} + +func (s *SpecialDateTimeFunctionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSpecialDateTimeFunction(s) + } +} + +func (s *SpecialDateTimeFunctionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSpecialDateTimeFunction(s) + } +} + +func (s *SpecialDateTimeFunctionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSpecialDateTimeFunction(s) + + default: + return t.VisitChildren(s) + } +} + +type SubstringContext struct { + PrimaryExpressionContext +} + +func NewSubstringContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SubstringContext { + var p = new(SubstringContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *SubstringContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SubstringContext) SUBSTRING_() antlr.TerminalNode { + return s.GetToken(TrinoParserSUBSTRING_, 0) +} + +func (s *SubstringContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *SubstringContext) AllValueExpression() []IValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IValueExpressionContext); ok { + len++ + } + } + + tst := make([]IValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IValueExpressionContext); ok { + tst[i] = t.(IValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *SubstringContext) ValueExpression(i int) IValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *SubstringContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *SubstringContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *SubstringContext) FOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOR_, 0) +} + +func (s *SubstringContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSubstring(s) + } +} + +func (s *SubstringContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSubstring(s) + } +} + +func (s *SubstringContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSubstring(s) + + default: + return t.VisitChildren(s) + } +} + +type CastContext struct { + PrimaryExpressionContext +} + +func NewCastContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CastContext { + var p = new(CastContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *CastContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CastContext) CAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserCAST_, 0) +} + +func (s *CastContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *CastContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *CastContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *CastContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *CastContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *CastContext) TRY_CAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRY_CAST_, 0) +} + +func (s *CastContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCast(s) + } +} + +func (s *CastContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCast(s) + } +} + +func (s *CastContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCast(s) + + default: + return t.VisitChildren(s) + } +} + +type LambdaContext struct { + PrimaryExpressionContext +} + +func NewLambdaContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LambdaContext { + var p = new(LambdaContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *LambdaContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LambdaContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *LambdaContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *LambdaContext) RARROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserRARROW_, 0) +} + +func (s *LambdaContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *LambdaContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *LambdaContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *LambdaContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *LambdaContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *LambdaContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLambda(s) + } +} + +func (s *LambdaContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLambda(s) + } +} + +func (s *LambdaContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLambda(s) + + default: + return t.VisitChildren(s) + } +} + +type ParenthesizedExpressionContext struct { + PrimaryExpressionContext +} + +func NewParenthesizedExpressionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ParenthesizedExpressionContext { + var p = new(ParenthesizedExpressionContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *ParenthesizedExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ParenthesizedExpressionContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *ParenthesizedExpressionContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *ParenthesizedExpressionContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *ParenthesizedExpressionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterParenthesizedExpression(s) + } +} + +func (s *ParenthesizedExpressionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitParenthesizedExpression(s) + } +} + +func (s *ParenthesizedExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitParenthesizedExpression(s) + + default: + return t.VisitChildren(s) + } +} + +type TrimContext struct { + PrimaryExpressionContext + trimChar IValueExpressionContext + trimSource IValueExpressionContext +} + +func NewTrimContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TrimContext { + var p = new(TrimContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *TrimContext) GetTrimChar() IValueExpressionContext { return s.trimChar } + +func (s *TrimContext) GetTrimSource() IValueExpressionContext { return s.trimSource } + +func (s *TrimContext) SetTrimChar(v IValueExpressionContext) { s.trimChar = v } + +func (s *TrimContext) SetTrimSource(v IValueExpressionContext) { s.trimSource = v } + +func (s *TrimContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TrimContext) TRIM_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRIM_, 0) +} + +func (s *TrimContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *TrimContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *TrimContext) AllValueExpression() []IValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IValueExpressionContext); ok { + len++ + } + } + + tst := make([]IValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IValueExpressionContext); ok { + tst[i] = t.(IValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *TrimContext) ValueExpression(i int) IValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *TrimContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *TrimContext) TrimsSpecification() ITrimsSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITrimsSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITrimsSpecificationContext) +} + +func (s *TrimContext) COMMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, 0) +} + +func (s *TrimContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTrim(s) + } +} + +func (s *TrimContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTrim(s) + } +} + +func (s *TrimContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTrim(s) + + default: + return t.VisitChildren(s) + } +} + +type ParameterContext struct { + PrimaryExpressionContext +} + +func NewParameterContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ParameterContext { + var p = new(ParameterContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *ParameterContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ParameterContext) QUESTION_MARK_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUESTION_MARK_, 0) +} + +func (s *ParameterContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterParameter(s) + } +} + +func (s *ParameterContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitParameter(s) + } +} + +func (s *ParameterContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitParameter(s) + + default: + return t.VisitChildren(s) + } +} + +type NormalizeContext struct { + PrimaryExpressionContext +} + +func NewNormalizeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NormalizeContext { + var p = new(NormalizeContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *NormalizeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NormalizeContext) NORMALIZE_() antlr.TerminalNode { + return s.GetToken(TrinoParserNORMALIZE_, 0) +} + +func (s *NormalizeContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *NormalizeContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *NormalizeContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *NormalizeContext) COMMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, 0) +} + +func (s *NormalizeContext) NormalForm() INormalFormContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(INormalFormContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(INormalFormContext) +} + +func (s *NormalizeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNormalize(s) + } +} + +func (s *NormalizeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNormalize(s) + } +} + +func (s *NormalizeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNormalize(s) + + default: + return t.VisitChildren(s) + } +} + +type JsonObjectContext struct { + PrimaryExpressionContext +} + +func NewJsonObjectContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JsonObjectContext { + var p = new(JsonObjectContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *JsonObjectContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonObjectContext) JSON_OBJECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_OBJECT_, 0) +} + +func (s *JsonObjectContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *JsonObjectContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *JsonObjectContext) AllJsonObjectMember() []IJsonObjectMemberContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IJsonObjectMemberContext); ok { + len++ + } + } + + tst := make([]IJsonObjectMemberContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IJsonObjectMemberContext); ok { + tst[i] = t.(IJsonObjectMemberContext) + i++ + } + } + + return tst +} + +func (s *JsonObjectContext) JsonObjectMember(i int) IJsonObjectMemberContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonObjectMemberContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IJsonObjectMemberContext) +} + +func (s *JsonObjectContext) RETURNING_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNING_, 0) +} + +func (s *JsonObjectContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *JsonObjectContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *JsonObjectContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *JsonObjectContext) AllNULL_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserNULL_) +} + +func (s *JsonObjectContext) NULL_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, i) +} + +func (s *JsonObjectContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *JsonObjectContext) ABSENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserABSENT_, 0) +} + +func (s *JsonObjectContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *JsonObjectContext) UNIQUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNIQUE_, 0) +} + +func (s *JsonObjectContext) WITHOUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITHOUT_, 0) +} + +func (s *JsonObjectContext) FORMAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserFORMAT_, 0) +} + +func (s *JsonObjectContext) JsonRepresentation() IJsonRepresentationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonRepresentationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonRepresentationContext) +} + +func (s *JsonObjectContext) KEYS_() antlr.TerminalNode { + return s.GetToken(TrinoParserKEYS_, 0) +} + +func (s *JsonObjectContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonObject(s) + } +} + +func (s *JsonObjectContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonObject(s) + } +} + +func (s *JsonObjectContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonObject(s) + + default: + return t.VisitChildren(s) + } +} + +type IntervalLiteralContext struct { + PrimaryExpressionContext +} + +func NewIntervalLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IntervalLiteralContext { + var p = new(IntervalLiteralContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *IntervalLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IntervalLiteralContext) Interval() IIntervalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIntervalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIntervalContext) +} + +func (s *IntervalLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIntervalLiteral(s) + } +} + +func (s *IntervalLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIntervalLiteral(s) + } +} + +func (s *IntervalLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIntervalLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type NumericLiteralContext struct { + PrimaryExpressionContext +} + +func NewNumericLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NumericLiteralContext { + var p = new(NumericLiteralContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *NumericLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NumericLiteralContext) Number() INumberContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(INumberContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(INumberContext) +} + +func (s *NumericLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNumericLiteral(s) + } +} + +func (s *NumericLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNumericLiteral(s) + } +} + +func (s *NumericLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNumericLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type BooleanLiteralContext struct { + PrimaryExpressionContext +} + +func NewBooleanLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BooleanLiteralContext { + var p = new(BooleanLiteralContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *BooleanLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BooleanLiteralContext) BooleanValue() IBooleanValueContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanValueContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanValueContext) +} + +func (s *BooleanLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterBooleanLiteral(s) + } +} + +func (s *BooleanLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitBooleanLiteral(s) + } +} + +func (s *BooleanLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitBooleanLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type JsonArrayContext struct { + PrimaryExpressionContext +} + +func NewJsonArrayContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JsonArrayContext { + var p = new(JsonArrayContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *JsonArrayContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonArrayContext) JSON_ARRAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_ARRAY_, 0) +} + +func (s *JsonArrayContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *JsonArrayContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *JsonArrayContext) AllJsonValueExpression() []IJsonValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IJsonValueExpressionContext); ok { + len++ + } + } + + tst := make([]IJsonValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IJsonValueExpressionContext); ok { + tst[i] = t.(IJsonValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *JsonArrayContext) JsonValueExpression(i int) IJsonValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IJsonValueExpressionContext) +} + +func (s *JsonArrayContext) RETURNING_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNING_, 0) +} + +func (s *JsonArrayContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *JsonArrayContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *JsonArrayContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *JsonArrayContext) AllNULL_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserNULL_) +} + +func (s *JsonArrayContext) NULL_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, i) +} + +func (s *JsonArrayContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *JsonArrayContext) ABSENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserABSENT_, 0) +} + +func (s *JsonArrayContext) FORMAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserFORMAT_, 0) +} + +func (s *JsonArrayContext) JsonRepresentation() IJsonRepresentationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonRepresentationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonRepresentationContext) +} + +func (s *JsonArrayContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonArray(s) + } +} + +func (s *JsonArrayContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonArray(s) + } +} + +func (s *JsonArrayContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonArray(s) + + default: + return t.VisitChildren(s) + } +} + +type SimpleCaseContext struct { + PrimaryExpressionContext + operand IExpressionContext + elseExpression IExpressionContext +} + +func NewSimpleCaseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SimpleCaseContext { + var p = new(SimpleCaseContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *SimpleCaseContext) GetOperand() IExpressionContext { return s.operand } + +func (s *SimpleCaseContext) GetElseExpression() IExpressionContext { return s.elseExpression } + +func (s *SimpleCaseContext) SetOperand(v IExpressionContext) { s.operand = v } + +func (s *SimpleCaseContext) SetElseExpression(v IExpressionContext) { s.elseExpression = v } + +func (s *SimpleCaseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SimpleCaseContext) CASE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCASE_, 0) +} + +func (s *SimpleCaseContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *SimpleCaseContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *SimpleCaseContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SimpleCaseContext) AllWhenClause() []IWhenClauseContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IWhenClauseContext); ok { + len++ + } + } + + tst := make([]IWhenClauseContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IWhenClauseContext); ok { + tst[i] = t.(IWhenClauseContext) + i++ + } + } + + return tst +} + +func (s *SimpleCaseContext) WhenClause(i int) IWhenClauseContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWhenClauseContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IWhenClauseContext) +} + +func (s *SimpleCaseContext) ELSE_() antlr.TerminalNode { + return s.GetToken(TrinoParserELSE_, 0) +} + +func (s *SimpleCaseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSimpleCase(s) + } +} + +func (s *SimpleCaseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSimpleCase(s) + } +} + +func (s *SimpleCaseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSimpleCase(s) + + default: + return t.VisitChildren(s) + } +} + +type ColumnReferenceContext struct { + PrimaryExpressionContext +} + +func NewColumnReferenceContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ColumnReferenceContext { + var p = new(ColumnReferenceContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *ColumnReferenceContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ColumnReferenceContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ColumnReferenceContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterColumnReference(s) + } +} + +func (s *ColumnReferenceContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitColumnReference(s) + } +} + +func (s *ColumnReferenceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitColumnReference(s) + + default: + return t.VisitChildren(s) + } +} + +type NullLiteralContext struct { + PrimaryExpressionContext +} + +func NewNullLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NullLiteralContext { + var p = new(NullLiteralContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *NullLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NullLiteralContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *NullLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNullLiteral(s) + } +} + +func (s *NullLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNullLiteral(s) + } +} + +func (s *NullLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNullLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type RowConstructorContext struct { + PrimaryExpressionContext +} + +func NewRowConstructorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RowConstructorContext { + var p = new(RowConstructorContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *RowConstructorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RowConstructorContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *RowConstructorContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *RowConstructorContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *RowConstructorContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *RowConstructorContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *RowConstructorContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *RowConstructorContext) ROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserROW_, 0) +} + +func (s *RowConstructorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRowConstructor(s) + } +} + +func (s *RowConstructorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRowConstructor(s) + } +} + +func (s *RowConstructorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRowConstructor(s) + + default: + return t.VisitChildren(s) + } +} + +type SubscriptContext struct { + PrimaryExpressionContext + value IPrimaryExpressionContext + index IValueExpressionContext +} + +func NewSubscriptContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SubscriptContext { + var p = new(SubscriptContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *SubscriptContext) GetValue() IPrimaryExpressionContext { return s.value } + +func (s *SubscriptContext) GetIndex() IValueExpressionContext { return s.index } + +func (s *SubscriptContext) SetValue(v IPrimaryExpressionContext) { s.value = v } + +func (s *SubscriptContext) SetIndex(v IValueExpressionContext) { s.index = v } + +func (s *SubscriptContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SubscriptContext) LSQUARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLSQUARE_, 0) +} + +func (s *SubscriptContext) RSQUARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserRSQUARE_, 0) +} + +func (s *SubscriptContext) PrimaryExpression() IPrimaryExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrimaryExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrimaryExpressionContext) +} + +func (s *SubscriptContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *SubscriptContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSubscript(s) + } +} + +func (s *SubscriptContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSubscript(s) + } +} + +func (s *SubscriptContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSubscript(s) + + default: + return t.VisitChildren(s) + } +} + +type JsonExistsContext struct { + PrimaryExpressionContext +} + +func NewJsonExistsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JsonExistsContext { + var p = new(JsonExistsContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *JsonExistsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonExistsContext) JSON_EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_EXISTS_, 0) +} + +func (s *JsonExistsContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *JsonExistsContext) JsonPathInvocation() IJsonPathInvocationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonPathInvocationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonPathInvocationContext) +} + +func (s *JsonExistsContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *JsonExistsContext) JsonExistsErrorBehavior() IJsonExistsErrorBehaviorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonExistsErrorBehaviorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonExistsErrorBehaviorContext) +} + +func (s *JsonExistsContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *JsonExistsContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *JsonExistsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonExists(s) + } +} + +func (s *JsonExistsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonExists(s) + } +} + +func (s *JsonExistsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonExists(s) + + default: + return t.VisitChildren(s) + } +} + +type CurrentPathContext struct { + PrimaryExpressionContext + name antlr.Token +} + +func NewCurrentPathContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CurrentPathContext { + var p = new(CurrentPathContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *CurrentPathContext) GetName() antlr.Token { return s.name } + +func (s *CurrentPathContext) SetName(v antlr.Token) { s.name = v } + +func (s *CurrentPathContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CurrentPathContext) CURRENT_PATH_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_PATH_, 0) +} + +func (s *CurrentPathContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCurrentPath(s) + } +} + +func (s *CurrentPathContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCurrentPath(s) + } +} + +func (s *CurrentPathContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCurrentPath(s) + + default: + return t.VisitChildren(s) + } +} + +type SubqueryExpressionContext struct { + PrimaryExpressionContext +} + +func NewSubqueryExpressionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SubqueryExpressionContext { + var p = new(SubqueryExpressionContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *SubqueryExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SubqueryExpressionContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *SubqueryExpressionContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *SubqueryExpressionContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *SubqueryExpressionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSubqueryExpression(s) + } +} + +func (s *SubqueryExpressionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSubqueryExpression(s) + } +} + +func (s *SubqueryExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSubqueryExpression(s) + + default: + return t.VisitChildren(s) + } +} + +type BinaryLiteralContext struct { + PrimaryExpressionContext +} + +func NewBinaryLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BinaryLiteralContext { + var p = new(BinaryLiteralContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *BinaryLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BinaryLiteralContext) BINARY_LITERAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserBINARY_LITERAL_, 0) +} + +func (s *BinaryLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterBinaryLiteral(s) + } +} + +func (s *BinaryLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitBinaryLiteral(s) + } +} + +func (s *BinaryLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitBinaryLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type CurrentUserContext struct { + PrimaryExpressionContext + name antlr.Token +} + +func NewCurrentUserContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CurrentUserContext { + var p = new(CurrentUserContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *CurrentUserContext) GetName() antlr.Token { return s.name } + +func (s *CurrentUserContext) SetName(v antlr.Token) { s.name = v } + +func (s *CurrentUserContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CurrentUserContext) CURRENT_USER_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_USER_, 0) +} + +func (s *CurrentUserContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCurrentUser(s) + } +} + +func (s *CurrentUserContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCurrentUser(s) + } +} + +func (s *CurrentUserContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCurrentUser(s) + + default: + return t.VisitChildren(s) + } +} + +type JsonQueryContext struct { + PrimaryExpressionContext + emptyBehavior IJsonQueryBehaviorContext + errorBehavior IJsonQueryBehaviorContext +} + +func NewJsonQueryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JsonQueryContext { + var p = new(JsonQueryContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *JsonQueryContext) GetEmptyBehavior() IJsonQueryBehaviorContext { return s.emptyBehavior } + +func (s *JsonQueryContext) GetErrorBehavior() IJsonQueryBehaviorContext { return s.errorBehavior } + +func (s *JsonQueryContext) SetEmptyBehavior(v IJsonQueryBehaviorContext) { s.emptyBehavior = v } + +func (s *JsonQueryContext) SetErrorBehavior(v IJsonQueryBehaviorContext) { s.errorBehavior = v } + +func (s *JsonQueryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonQueryContext) JSON_QUERY_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_QUERY_, 0) +} + +func (s *JsonQueryContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *JsonQueryContext) JsonPathInvocation() IJsonPathInvocationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonPathInvocationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonPathInvocationContext) +} + +func (s *JsonQueryContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *JsonQueryContext) RETURNING_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNING_, 0) +} + +func (s *JsonQueryContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *JsonQueryContext) JsonQueryWrapperBehavior() IJsonQueryWrapperBehaviorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonQueryWrapperBehaviorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonQueryWrapperBehaviorContext) +} + +func (s *JsonQueryContext) WRAPPER_() antlr.TerminalNode { + return s.GetToken(TrinoParserWRAPPER_, 0) +} + +func (s *JsonQueryContext) QUOTES_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUOTES_, 0) +} + +func (s *JsonQueryContext) AllON_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserON_) +} + +func (s *JsonQueryContext) ON_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserON_, i) +} + +func (s *JsonQueryContext) EMPTY_() antlr.TerminalNode { + return s.GetToken(TrinoParserEMPTY_, 0) +} + +func (s *JsonQueryContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *JsonQueryContext) KEEP_() antlr.TerminalNode { + return s.GetToken(TrinoParserKEEP_, 0) +} + +func (s *JsonQueryContext) OMIT_() antlr.TerminalNode { + return s.GetToken(TrinoParserOMIT_, 0) +} + +func (s *JsonQueryContext) AllJsonQueryBehavior() []IJsonQueryBehaviorContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IJsonQueryBehaviorContext); ok { + len++ + } + } + + tst := make([]IJsonQueryBehaviorContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IJsonQueryBehaviorContext); ok { + tst[i] = t.(IJsonQueryBehaviorContext) + i++ + } + } + + return tst +} + +func (s *JsonQueryContext) JsonQueryBehavior(i int) IJsonQueryBehaviorContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonQueryBehaviorContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IJsonQueryBehaviorContext) +} + +func (s *JsonQueryContext) FORMAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserFORMAT_, 0) +} + +func (s *JsonQueryContext) JsonRepresentation() IJsonRepresentationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonRepresentationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonRepresentationContext) +} + +func (s *JsonQueryContext) SCALAR_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCALAR_, 0) +} + +func (s *JsonQueryContext) TEXT_STRING_() antlr.TerminalNode { + return s.GetToken(TrinoParserTEXT_STRING_, 0) +} + +func (s *JsonQueryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonQuery(s) + } +} + +func (s *JsonQueryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonQuery(s) + } +} + +func (s *JsonQueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonQuery(s) + + default: + return t.VisitChildren(s) + } +} + +type MeasureContext struct { + PrimaryExpressionContext +} + +func NewMeasureContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MeasureContext { + var p = new(MeasureContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *MeasureContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MeasureContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *MeasureContext) Over() IOverContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IOverContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IOverContext) +} + +func (s *MeasureContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterMeasure(s) + } +} + +func (s *MeasureContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitMeasure(s) + } +} + +func (s *MeasureContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitMeasure(s) + + default: + return t.VisitChildren(s) + } +} + +type ExtractContext struct { + PrimaryExpressionContext +} + +func NewExtractContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExtractContext { + var p = new(ExtractContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *ExtractContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExtractContext) EXTRACT_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXTRACT_, 0) +} + +func (s *ExtractContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *ExtractContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ExtractContext) FROM_() antlr.TerminalNode { + return s.GetToken(TrinoParserFROM_, 0) +} + +func (s *ExtractContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *ExtractContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *ExtractContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExtract(s) + } +} + +func (s *ExtractContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExtract(s) + } +} + +func (s *ExtractContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExtract(s) + + default: + return t.VisitChildren(s) + } +} + +type StringLiteralContext struct { + PrimaryExpressionContext +} + +func NewStringLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StringLiteralContext { + var p = new(StringLiteralContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *StringLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StringLiteralContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *StringLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStringLiteral(s) + } +} + +func (s *StringLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStringLiteral(s) + } +} + +func (s *StringLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStringLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type ArrayConstructorContext struct { + PrimaryExpressionContext +} + +func NewArrayConstructorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArrayConstructorContext { + var p = new(ArrayConstructorContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *ArrayConstructorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ArrayConstructorContext) ARRAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserARRAY_, 0) +} + +func (s *ArrayConstructorContext) LSQUARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLSQUARE_, 0) +} + +func (s *ArrayConstructorContext) RSQUARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserRSQUARE_, 0) +} + +func (s *ArrayConstructorContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *ArrayConstructorContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *ArrayConstructorContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *ArrayConstructorContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *ArrayConstructorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterArrayConstructor(s) + } +} + +func (s *ArrayConstructorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitArrayConstructor(s) + } +} + +func (s *ArrayConstructorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitArrayConstructor(s) + + default: + return t.VisitChildren(s) + } +} + +type FunctionCallContext struct { + PrimaryExpressionContext + label IIdentifierContext +} + +func NewFunctionCallContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *FunctionCallContext { + var p = new(FunctionCallContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *FunctionCallContext) GetLabel() IIdentifierContext { return s.label } + +func (s *FunctionCallContext) SetLabel(v IIdentifierContext) { s.label = v } + +func (s *FunctionCallContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *FunctionCallContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *FunctionCallContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *FunctionCallContext) ASTERISK_() antlr.TerminalNode { + return s.GetToken(TrinoParserASTERISK_, 0) +} + +func (s *FunctionCallContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *FunctionCallContext) ProcessingMode() IProcessingModeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IProcessingModeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IProcessingModeContext) +} + +func (s *FunctionCallContext) DOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOT_, 0) +} + +func (s *FunctionCallContext) Filter() IFilterContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFilterContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFilterContext) +} + +func (s *FunctionCallContext) Over() IOverContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IOverContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IOverContext) +} + +func (s *FunctionCallContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *FunctionCallContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *FunctionCallContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *FunctionCallContext) ORDER_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDER_, 0) +} + +func (s *FunctionCallContext) BY_() antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, 0) +} + +func (s *FunctionCallContext) AllSortItem() []ISortItemContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISortItemContext); ok { + len++ + } + } + + tst := make([]ISortItemContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISortItemContext); ok { + tst[i] = t.(ISortItemContext) + i++ + } + } + + return tst +} + +func (s *FunctionCallContext) SortItem(i int) ISortItemContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISortItemContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISortItemContext) +} + +func (s *FunctionCallContext) SetQuantifier() ISetQuantifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISetQuantifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISetQuantifierContext) +} + +func (s *FunctionCallContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *FunctionCallContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *FunctionCallContext) NullTreatment() INullTreatmentContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(INullTreatmentContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(INullTreatmentContext) +} + +func (s *FunctionCallContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterFunctionCall(s) + } +} + +func (s *FunctionCallContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitFunctionCall(s) + } +} + +func (s *FunctionCallContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitFunctionCall(s) + + default: + return t.VisitChildren(s) + } +} + +type CurrentSchemaContext struct { + PrimaryExpressionContext + name antlr.Token +} + +func NewCurrentSchemaContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CurrentSchemaContext { + var p = new(CurrentSchemaContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *CurrentSchemaContext) GetName() antlr.Token { return s.name } + +func (s *CurrentSchemaContext) SetName(v antlr.Token) { s.name = v } + +func (s *CurrentSchemaContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CurrentSchemaContext) CURRENT_SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_SCHEMA_, 0) +} + +func (s *CurrentSchemaContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCurrentSchema(s) + } +} + +func (s *CurrentSchemaContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCurrentSchema(s) + } +} + +func (s *CurrentSchemaContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCurrentSchema(s) + + default: + return t.VisitChildren(s) + } +} + +type ExistsContext struct { + PrimaryExpressionContext +} + +func NewExistsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExistsContext { + var p = new(ExistsContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *ExistsContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExistsContext) EXISTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXISTS_, 0) +} + +func (s *ExistsContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *ExistsContext) Query() IQueryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQueryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQueryContext) +} + +func (s *ExistsContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *ExistsContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExists(s) + } +} + +func (s *ExistsContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExists(s) + } +} + +func (s *ExistsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExists(s) + + default: + return t.VisitChildren(s) + } +} + +type PositionContext struct { + PrimaryExpressionContext +} + +func NewPositionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PositionContext { + var p = new(PositionContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *PositionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PositionContext) POSITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPOSITION_, 0) +} + +func (s *PositionContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *PositionContext) AllValueExpression() []IValueExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IValueExpressionContext); ok { + len++ + } + } + + tst := make([]IValueExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IValueExpressionContext); ok { + tst[i] = t.(IValueExpressionContext) + i++ + } + } + + return tst +} + +func (s *PositionContext) ValueExpression(i int) IValueExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *PositionContext) IN_() antlr.TerminalNode { + return s.GetToken(TrinoParserIN_, 0) +} + +func (s *PositionContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *PositionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPosition(s) + } +} + +func (s *PositionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPosition(s) + } +} + +func (s *PositionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPosition(s) + + default: + return t.VisitChildren(s) + } +} + +type ListaggContext struct { + PrimaryExpressionContext + name antlr.Token +} + +func NewListaggContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ListaggContext { + var p = new(ListaggContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *ListaggContext) GetName() antlr.Token { return s.name } + +func (s *ListaggContext) SetName(v antlr.Token) { s.name = v } + +func (s *ListaggContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ListaggContext) AllLPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserLPAREN_) +} + +func (s *ListaggContext) LPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, i) +} + +func (s *ListaggContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *ListaggContext) AllRPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserRPAREN_) +} + +func (s *ListaggContext) RPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, i) +} + +func (s *ListaggContext) LISTAGG_() antlr.TerminalNode { + return s.GetToken(TrinoParserLISTAGG_, 0) +} + +func (s *ListaggContext) WITHIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITHIN_, 0) +} + +func (s *ListaggContext) GROUP_() antlr.TerminalNode { + return s.GetToken(TrinoParserGROUP_, 0) +} + +func (s *ListaggContext) ORDER_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDER_, 0) +} + +func (s *ListaggContext) BY_() antlr.TerminalNode { + return s.GetToken(TrinoParserBY_, 0) +} + +func (s *ListaggContext) AllSortItem() []ISortItemContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISortItemContext); ok { + len++ + } + } + + tst := make([]ISortItemContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISortItemContext); ok { + tst[i] = t.(ISortItemContext) + i++ + } + } + + return tst +} + +func (s *ListaggContext) SortItem(i int) ISortItemContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISortItemContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISortItemContext) +} + +func (s *ListaggContext) SetQuantifier() ISetQuantifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISetQuantifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISetQuantifierContext) +} + +func (s *ListaggContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *ListaggContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *ListaggContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *ListaggContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *ListaggContext) OVERFLOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserOVERFLOW_, 0) +} + +func (s *ListaggContext) ListAggOverflowBehavior() IListAggOverflowBehaviorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IListAggOverflowBehaviorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IListAggOverflowBehaviorContext) +} + +func (s *ListaggContext) Filter() IFilterContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFilterContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFilterContext) +} + +func (s *ListaggContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterListagg(s) + } +} + +func (s *ListaggContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitListagg(s) + } +} + +func (s *ListaggContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitListagg(s) + + default: + return t.VisitChildren(s) + } +} + +type SearchedCaseContext struct { + PrimaryExpressionContext + elseExpression IExpressionContext +} + +func NewSearchedCaseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SearchedCaseContext { + var p = new(SearchedCaseContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *SearchedCaseContext) GetElseExpression() IExpressionContext { return s.elseExpression } + +func (s *SearchedCaseContext) SetElseExpression(v IExpressionContext) { s.elseExpression = v } + +func (s *SearchedCaseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SearchedCaseContext) CASE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCASE_, 0) +} + +func (s *SearchedCaseContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *SearchedCaseContext) AllWhenClause() []IWhenClauseContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IWhenClauseContext); ok { + len++ + } + } + + tst := make([]IWhenClauseContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IWhenClauseContext); ok { + tst[i] = t.(IWhenClauseContext) + i++ + } + } + + return tst +} + +func (s *SearchedCaseContext) WhenClause(i int) IWhenClauseContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWhenClauseContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IWhenClauseContext) +} + +func (s *SearchedCaseContext) ELSE_() antlr.TerminalNode { + return s.GetToken(TrinoParserELSE_, 0) +} + +func (s *SearchedCaseContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SearchedCaseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSearchedCase(s) + } +} + +func (s *SearchedCaseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSearchedCase(s) + } +} + +func (s *SearchedCaseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSearchedCase(s) + + default: + return t.VisitChildren(s) + } +} + +type CurrentCatalogContext struct { + PrimaryExpressionContext + name antlr.Token +} + +func NewCurrentCatalogContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CurrentCatalogContext { + var p = new(CurrentCatalogContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *CurrentCatalogContext) GetName() antlr.Token { return s.name } + +func (s *CurrentCatalogContext) SetName(v antlr.Token) { s.name = v } + +func (s *CurrentCatalogContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CurrentCatalogContext) CURRENT_CATALOG_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_CATALOG_, 0) +} + +func (s *CurrentCatalogContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCurrentCatalog(s) + } +} + +func (s *CurrentCatalogContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCurrentCatalog(s) + } +} + +func (s *CurrentCatalogContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCurrentCatalog(s) + + default: + return t.VisitChildren(s) + } +} + +type GroupingOperationContext struct { + PrimaryExpressionContext +} + +func NewGroupingOperationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *GroupingOperationContext { + var p = new(GroupingOperationContext) + + InitEmptyPrimaryExpressionContext(&p.PrimaryExpressionContext) + p.parser = parser + p.CopyAll(ctx.(*PrimaryExpressionContext)) + + return p +} + +func (s *GroupingOperationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GroupingOperationContext) GROUPING_() antlr.TerminalNode { + return s.GetToken(TrinoParserGROUPING_, 0) +} + +func (s *GroupingOperationContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *GroupingOperationContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *GroupingOperationContext) AllQualifiedName() []IQualifiedNameContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IQualifiedNameContext); ok { + len++ + } + } + + tst := make([]IQualifiedNameContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IQualifiedNameContext); ok { + tst[i] = t.(IQualifiedNameContext) + i++ + } + } + + return tst +} + +func (s *GroupingOperationContext) QualifiedName(i int) IQualifiedNameContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *GroupingOperationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *GroupingOperationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *GroupingOperationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterGroupingOperation(s) + } +} + +func (s *GroupingOperationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitGroupingOperation(s) + } +} + +func (s *GroupingOperationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitGroupingOperation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PrimaryExpression() (localctx IPrimaryExpressionContext) { + return p.primaryExpression(0) +} + +func (p *TrinoParser) primaryExpression(_p int) (localctx IPrimaryExpressionContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewPrimaryExpressionContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IPrimaryExpressionContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 132 + p.EnterRecursionRule(localctx, 132, TrinoParserRULE_primaryExpression, _p) + var _la int + + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(2496) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 328, p.GetParserRuleContext()) { + case 1: + localctx = NewNullLiteralContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + + { + p.SetState(2044) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + localctx = NewIntervalLiteralContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2045) + p.Interval() + } + + case 3: + localctx = NewTypeConstructorContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2046) + p.Identifier() + } + { + p.SetState(2047) + p.String_() + } + + case 4: + localctx = NewTypeConstructorContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2049) + p.Match(TrinoParserDOUBLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2050) + p.Match(TrinoParserPRECISION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2051) + p.String_() + } + + case 5: + localctx = NewNumericLiteralContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2052) + p.Number() + } + + case 6: + localctx = NewBooleanLiteralContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2053) + p.BooleanValue() + } + + case 7: + localctx = NewStringLiteralContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2054) + p.String_() + } + + case 8: + localctx = NewBinaryLiteralContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2055) + p.Match(TrinoParserBINARY_LITERAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 9: + localctx = NewParameterContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2056) + p.Match(TrinoParserQUESTION_MARK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 10: + localctx = NewPositionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2057) + p.Match(TrinoParserPOSITION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2058) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2059) + p.valueExpression(0) + } + { + p.SetState(2060) + p.Match(TrinoParserIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2061) + p.valueExpression(0) + } + { + p.SetState(2062) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 11: + localctx = NewRowConstructorContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2064) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2065) + p.Expression() + } + p.SetState(2068) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for ok := true; ok; ok = _la == TrinoParserCOMMA_ { + { + p.SetState(2066) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2067) + p.Expression() + } + + p.SetState(2070) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2072) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 12: + localctx = NewRowConstructorContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2074) + p.Match(TrinoParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2075) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2076) + p.Expression() + } + p.SetState(2081) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2077) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2078) + p.Expression() + } + + p.SetState(2083) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2084) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 13: + localctx = NewListaggContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2086) + + var _m = p.Match(TrinoParserLISTAGG_) + + localctx.(*ListaggContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2087) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2089) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 267, p.GetParserRuleContext()) == 1 { + { + p.SetState(2088) + p.SetQuantifier() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(2091) + p.Expression() + } + p.SetState(2094) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMA_ { + { + p.SetState(2092) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2093) + p.String_() + } + + } + p.SetState(2099) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserON_ { + { + p.SetState(2096) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2097) + p.Match(TrinoParserOVERFLOW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2098) + p.ListAggOverflowBehavior() + } + + } + { + p.SetState(2101) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + { + p.SetState(2102) + p.Match(TrinoParserWITHIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2103) + p.Match(TrinoParserGROUP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2104) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2105) + p.Match(TrinoParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2106) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2107) + p.SortItem() + } + p.SetState(2112) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2108) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2109) + p.SortItem() + } + + p.SetState(2114) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2115) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + p.SetState(2118) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 271, p.GetParserRuleContext()) == 1 { + { + p.SetState(2117) + p.Filter() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 14: + localctx = NewFunctionCallContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + p.SetState(2121) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 272, p.GetParserRuleContext()) == 1 { + { + p.SetState(2120) + p.ProcessingMode() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(2123) + p.QualifiedName() + } + { + p.SetState(2124) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2128) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699602754) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + { + p.SetState(2125) + + var _x = p.Identifier() + + localctx.(*FunctionCallContext).label = _x + } + { + p.SetState(2126) + p.Match(TrinoParserDOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2130) + p.Match(TrinoParserASTERISK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2131) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2133) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 274, p.GetParserRuleContext()) == 1 { + { + p.SetState(2132) + p.Filter() + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2136) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 275, p.GetParserRuleContext()) == 1 { + { + p.SetState(2135) + p.Over() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 15: + localctx = NewFunctionCallContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + p.SetState(2139) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 276, p.GetParserRuleContext()) == 1 { + { + p.SetState(2138) + p.ProcessingMode() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(2141) + p.QualifiedName() + } + { + p.SetState(2142) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2154) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-650779431874988354) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + p.SetState(2144) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 277, p.GetParserRuleContext()) == 1 { + { + p.SetState(2143) + p.SetQuantifier() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(2146) + p.Expression() + } + p.SetState(2151) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2147) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2148) + p.Expression() + } + + p.SetState(2153) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(2166) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserORDER_ { + { + p.SetState(2156) + p.Match(TrinoParserORDER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2157) + p.Match(TrinoParserBY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2158) + p.SortItem() + } + p.SetState(2163) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2159) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2160) + p.SortItem() + } + + p.SetState(2165) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(2168) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2170) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 282, p.GetParserRuleContext()) == 1 { + { + p.SetState(2169) + p.Filter() + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2176) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 284, p.GetParserRuleContext()) == 1 { + p.SetState(2173) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserIGNORE_ || _la == TrinoParserRESPECT_ { + { + p.SetState(2172) + p.NullTreatment() + } + + } + { + p.SetState(2175) + p.Over() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 16: + localctx = NewMeasureContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2178) + p.Identifier() + } + { + p.SetState(2179) + p.Over() + } + + case 17: + localctx = NewLambdaContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2181) + p.Identifier() + } + { + p.SetState(2182) + p.Match(TrinoParserRARROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2183) + p.Expression() + } + + case 18: + localctx = NewLambdaContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2185) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2194) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699602754) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + { + p.SetState(2186) + p.Identifier() + } + p.SetState(2191) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2187) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2188) + p.Identifier() + } + + p.SetState(2193) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(2196) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2197) + p.Match(TrinoParserRARROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2198) + p.Expression() + } + + case 19: + localctx = NewSubqueryExpressionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2199) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2200) + p.Query() + } + { + p.SetState(2201) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 20: + localctx = NewExistsContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2203) + p.Match(TrinoParserEXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2204) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2205) + p.Query() + } + { + p.SetState(2206) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 21: + localctx = NewSimpleCaseContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2208) + p.Match(TrinoParserCASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2209) + + var _x = p.Expression() + + localctx.(*SimpleCaseContext).operand = _x + } + p.SetState(2211) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for ok := true; ok; ok = _la == TrinoParserWHEN_ { + { + p.SetState(2210) + p.WhenClause() + } + + p.SetState(2213) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(2217) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserELSE_ { + { + p.SetState(2215) + p.Match(TrinoParserELSE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2216) + + var _x = p.Expression() + + localctx.(*SimpleCaseContext).elseExpression = _x + } + + } + { + p.SetState(2219) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 22: + localctx = NewSearchedCaseContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2221) + p.Match(TrinoParserCASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2223) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for ok := true; ok; ok = _la == TrinoParserWHEN_ { + { + p.SetState(2222) + p.WhenClause() + } + + p.SetState(2225) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(2229) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserELSE_ { + { + p.SetState(2227) + p.Match(TrinoParserELSE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2228) + + var _x = p.Expression() + + localctx.(*SearchedCaseContext).elseExpression = _x + } + + } + { + p.SetState(2231) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 23: + localctx = NewCastContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2233) + p.Match(TrinoParserCAST_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2234) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2235) + p.Expression() + } + { + p.SetState(2236) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2237) + p.type_(0) + } + { + p.SetState(2238) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 24: + localctx = NewCastContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2240) + p.Match(TrinoParserTRY_CAST_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2241) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2242) + p.Expression() + } + { + p.SetState(2243) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2244) + p.type_(0) + } + { + p.SetState(2245) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 25: + localctx = NewArrayConstructorContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2247) + p.Match(TrinoParserARRAY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2248) + p.Match(TrinoParserLSQUARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2257) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227633993941633) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(2249) + p.Expression() + } + p.SetState(2254) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2250) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2251) + p.Expression() + } + + p.SetState(2256) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(2259) + p.Match(TrinoParserRSQUARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 26: + localctx = NewColumnReferenceContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2260) + p.Identifier() + } + + case 27: + localctx = NewSpecialDateTimeFunctionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2261) + + var _m = p.Match(TrinoParserCURRENT_DATE_) + + localctx.(*SpecialDateTimeFunctionContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 28: + localctx = NewSpecialDateTimeFunctionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2262) + + var _m = p.Match(TrinoParserCURRENT_TIME_) + + localctx.(*SpecialDateTimeFunctionContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2266) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 293, p.GetParserRuleContext()) == 1 { + { + p.SetState(2263) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2264) + + var _m = p.Match(TrinoParserINTEGER_VALUE_) + + localctx.(*SpecialDateTimeFunctionContext).precision = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2265) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 29: + localctx = NewSpecialDateTimeFunctionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2268) + + var _m = p.Match(TrinoParserCURRENT_TIMESTAMP_) + + localctx.(*SpecialDateTimeFunctionContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2272) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 294, p.GetParserRuleContext()) == 1 { + { + p.SetState(2269) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2270) + + var _m = p.Match(TrinoParserINTEGER_VALUE_) + + localctx.(*SpecialDateTimeFunctionContext).precision = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2271) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 30: + localctx = NewSpecialDateTimeFunctionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2274) + + var _m = p.Match(TrinoParserLOCALTIME_) + + localctx.(*SpecialDateTimeFunctionContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2278) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 295, p.GetParserRuleContext()) == 1 { + { + p.SetState(2275) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2276) + + var _m = p.Match(TrinoParserINTEGER_VALUE_) + + localctx.(*SpecialDateTimeFunctionContext).precision = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2277) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 31: + localctx = NewSpecialDateTimeFunctionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2280) + + var _m = p.Match(TrinoParserLOCALTIMESTAMP_) + + localctx.(*SpecialDateTimeFunctionContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2284) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 296, p.GetParserRuleContext()) == 1 { + { + p.SetState(2281) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2282) + + var _m = p.Match(TrinoParserINTEGER_VALUE_) + + localctx.(*SpecialDateTimeFunctionContext).precision = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2283) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 32: + localctx = NewCurrentUserContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2286) + + var _m = p.Match(TrinoParserCURRENT_USER_) + + localctx.(*CurrentUserContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 33: + localctx = NewCurrentCatalogContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2287) + + var _m = p.Match(TrinoParserCURRENT_CATALOG_) + + localctx.(*CurrentCatalogContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 34: + localctx = NewCurrentSchemaContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2288) + + var _m = p.Match(TrinoParserCURRENT_SCHEMA_) + + localctx.(*CurrentSchemaContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 35: + localctx = NewCurrentPathContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2289) + + var _m = p.Match(TrinoParserCURRENT_PATH_) + + localctx.(*CurrentPathContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 36: + localctx = NewTrimContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2290) + p.Match(TrinoParserTRIM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2291) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2299) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 299, p.GetParserRuleContext()) == 1 { + p.SetState(2293) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 297, p.GetParserRuleContext()) == 1 { + { + p.SetState(2292) + p.TrimsSpecification() + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2296) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262465450302376258) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-2347169330619225741) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6227771432895105) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-256)) & ^0x3f) == 0 && ((int64(1)<<(_la-256))&148830988330065375) != 0) || ((int64((_la-327)) & ^0x3f) == 0 && ((int64(1)<<(_la-327))&1023) != 0) { + { + p.SetState(2295) + + var _x = p.valueExpression(0) + + localctx.(*TrimContext).trimChar = _x + } + + } + { + p.SetState(2298) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(2301) + + var _x = p.valueExpression(0) + + localctx.(*TrimContext).trimSource = _x + } + { + p.SetState(2302) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 37: + localctx = NewTrimContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2304) + p.Match(TrinoParserTRIM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2305) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2306) + + var _x = p.valueExpression(0) + + localctx.(*TrimContext).trimSource = _x + } + { + p.SetState(2307) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2308) + + var _x = p.valueExpression(0) + + localctx.(*TrimContext).trimChar = _x + } + { + p.SetState(2309) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 38: + localctx = NewSubstringContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2311) + p.Match(TrinoParserSUBSTRING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2312) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2313) + p.valueExpression(0) + } + { + p.SetState(2314) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2315) + p.valueExpression(0) + } + p.SetState(2318) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFOR_ { + { + p.SetState(2316) + p.Match(TrinoParserFOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2317) + p.valueExpression(0) + } + + } + { + p.SetState(2320) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 39: + localctx = NewNormalizeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2322) + p.Match(TrinoParserNORMALIZE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2323) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2324) + p.valueExpression(0) + } + p.SetState(2327) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCOMMA_ { + { + p.SetState(2325) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2326) + p.NormalForm() + } + + } + { + p.SetState(2329) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 40: + localctx = NewExtractContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2331) + p.Match(TrinoParserEXTRACT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2332) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2333) + p.Identifier() + } + { + p.SetState(2334) + p.Match(TrinoParserFROM_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2335) + p.valueExpression(0) + } + { + p.SetState(2336) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 41: + localctx = NewParenthesizedExpressionContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2338) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2339) + p.Expression() + } + { + p.SetState(2340) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 42: + localctx = NewGroupingOperationContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2342) + p.Match(TrinoParserGROUPING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2343) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2352) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699602754) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + { + p.SetState(2344) + p.QualifiedName() + } + p.SetState(2349) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2345) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2346) + p.QualifiedName() + } + + p.SetState(2351) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(2354) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 43: + localctx = NewJsonExistsContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2355) + p.Match(TrinoParserJSON_EXISTS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2356) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2357) + p.JsonPathInvocation() + } + p.SetState(2362) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserERROR_ || _la == TrinoParserFALSE_ || _la == TrinoParserTRUE_ || _la == TrinoParserUNKNOWN_ { + { + p.SetState(2358) + p.JsonExistsErrorBehavior() + } + { + p.SetState(2359) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2360) + p.Match(TrinoParserERROR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2364) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 44: + localctx = NewJsonValueContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2366) + p.Match(TrinoParserJSON_VALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2367) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2368) + p.JsonPathInvocation() + } + p.SetState(2371) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserRETURNING_ { + { + p.SetState(2369) + p.Match(TrinoParserRETURNING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2370) + p.type_(0) + } + + } + p.SetState(2377) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 306, p.GetParserRuleContext()) == 1 { + { + p.SetState(2373) + + var _x = p.JsonValueBehavior() + + localctx.(*JsonValueContext).emptyBehavior = _x + } + { + p.SetState(2374) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2375) + p.Match(TrinoParserEMPTY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2383) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserDEFAULT_ || _la == TrinoParserERROR_ || _la == TrinoParserNULL_ { + { + p.SetState(2379) + + var _x = p.JsonValueBehavior() + + localctx.(*JsonValueContext).errorBehavior = _x + } + { + p.SetState(2380) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2381) + p.Match(TrinoParserERROR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2385) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 45: + localctx = NewJsonQueryContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2387) + p.Match(TrinoParserJSON_QUERY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2388) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2389) + p.JsonPathInvocation() + } + p.SetState(2396) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserRETURNING_ { + { + p.SetState(2390) + p.Match(TrinoParserRETURNING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2391) + p.type_(0) + } + p.SetState(2394) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFORMAT_ { + { + p.SetState(2392) + p.Match(TrinoParserFORMAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2393) + p.JsonRepresentation() + } + + } + + } + p.SetState(2401) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserWITH_ || _la == TrinoParserWITHOUT_ { + { + p.SetState(2398) + p.JsonQueryWrapperBehavior() + } + { + p.SetState(2399) + p.Match(TrinoParserWRAPPER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + p.SetState(2410) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserKEEP_ || _la == TrinoParserOMIT_ { + { + p.SetState(2403) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserKEEP_ || _la == TrinoParserOMIT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + { + p.SetState(2404) + p.Match(TrinoParserQUOTES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2408) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserON_ { + { + p.SetState(2405) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2406) + p.Match(TrinoParserSCALAR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2407) + p.Match(TrinoParserTEXT_STRING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + } + p.SetState(2416) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 313, p.GetParserRuleContext()) == 1 { + { + p.SetState(2412) + + var _x = p.JsonQueryBehavior() + + localctx.(*JsonQueryContext).emptyBehavior = _x + } + { + p.SetState(2413) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2414) + p.Match(TrinoParserEMPTY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2422) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserEMPTY_ || _la == TrinoParserERROR_ || _la == TrinoParserNULL_ { + { + p.SetState(2418) + + var _x = p.JsonQueryBehavior() + + localctx.(*JsonQueryContext).errorBehavior = _x + } + { + p.SetState(2419) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2420) + p.Match(TrinoParserERROR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2424) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 46: + localctx = NewJsonObjectContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2426) + p.Match(TrinoParserJSON_OBJECT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2427) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2456) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 320, p.GetParserRuleContext()) == 1 { + { + p.SetState(2428) + p.JsonObjectMember() + } + p.SetState(2433) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2429) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2430) + p.JsonObjectMember() + } + + p.SetState(2435) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(2442) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + switch p.GetTokenStream().LA(1) { + case TrinoParserNULL_: + { + p.SetState(2436) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2437) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2438) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserABSENT_: + { + p.SetState(2439) + p.Match(TrinoParserABSENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2440) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2441) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserRETURNING_, TrinoParserWITH_, TrinoParserWITHOUT_, TrinoParserRPAREN_: + + default: + } + p.SetState(2454) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + switch p.GetTokenStream().LA(1) { + case TrinoParserWITH_: + { + p.SetState(2444) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2445) + p.Match(TrinoParserUNIQUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2447) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserKEYS_ { + { + p.SetState(2446) + p.Match(TrinoParserKEYS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case TrinoParserWITHOUT_: + { + p.SetState(2449) + p.Match(TrinoParserWITHOUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2450) + p.Match(TrinoParserUNIQUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2452) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserKEYS_ { + { + p.SetState(2451) + p.Match(TrinoParserKEYS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case TrinoParserRETURNING_, TrinoParserRPAREN_: + + default: + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2464) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserRETURNING_ { + { + p.SetState(2458) + p.Match(TrinoParserRETURNING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2459) + p.type_(0) + } + p.SetState(2462) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFORMAT_ { + { + p.SetState(2460) + p.Match(TrinoParserFORMAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2461) + p.JsonRepresentation() + } + + } + + } + { + p.SetState(2466) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 47: + localctx = NewJsonArrayContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2467) + p.Match(TrinoParserJSON_ARRAY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2468) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2485) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 325, p.GetParserRuleContext()) == 1 { + { + p.SetState(2469) + p.JsonValueExpression() + } + p.SetState(2474) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2470) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2471) + p.JsonValueExpression() + } + + p.SetState(2476) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(2483) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + switch p.GetTokenStream().LA(1) { + case TrinoParserNULL_: + { + p.SetState(2477) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2478) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2479) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserABSENT_: + { + p.SetState(2480) + p.Match(TrinoParserABSENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2481) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2482) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserRETURNING_, TrinoParserRPAREN_: + + default: + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2493) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserRETURNING_ { + { + p.SetState(2487) + p.Match(TrinoParserRETURNING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2488) + p.type_(0) + } + p.SetState(2491) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFORMAT_ { + { + p.SetState(2489) + p.Match(TrinoParserFORMAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2490) + p.JsonRepresentation() + } + + } + + } + { + p.SetState(2495) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(2508) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 330, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + p.SetState(2506) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 329, p.GetParserRuleContext()) { + case 1: + localctx = NewSubscriptContext(p, NewPrimaryExpressionContext(p, _parentctx, _parentState)) + localctx.(*SubscriptContext).value = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_primaryExpression) + p.SetState(2498) + + if !(p.Precpred(p.GetParserRuleContext(), 24)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 24)", "")) + goto errorExit + } + { + p.SetState(2499) + p.Match(TrinoParserLSQUARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2500) + + var _x = p.valueExpression(0) + + localctx.(*SubscriptContext).index = _x + } + { + p.SetState(2501) + p.Match(TrinoParserRSQUARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + localctx = NewDereferenceContext(p, NewPrimaryExpressionContext(p, _parentctx, _parentState)) + localctx.(*DereferenceContext).base_ = _prevctx + + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_primaryExpression) + p.SetState(2503) + + if !(p.Precpred(p.GetParserRuleContext(), 22)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 22)", "")) + goto errorExit + } + { + p.SetState(2504) + p.Match(TrinoParserDOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2505) + + var _x = p.Identifier() + + localctx.(*DereferenceContext).fieldName = _x + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + } + p.SetState(2510) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 330, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonPathInvocationContext is an interface to support dynamic dispatch. +type IJsonPathInvocationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetPath returns the path rule contexts. + GetPath() IString_Context + + // SetPath sets the path rule contexts. + SetPath(IString_Context) + + // Getter signatures + JsonValueExpression() IJsonValueExpressionContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + String_() IString_Context + PASSING_() antlr.TerminalNode + AllJsonArgument() []IJsonArgumentContext + JsonArgument(i int) IJsonArgumentContext + + // IsJsonPathInvocationContext differentiates from other interfaces. + IsJsonPathInvocationContext() +} + +type JsonPathInvocationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + path IString_Context +} + +func NewEmptyJsonPathInvocationContext() *JsonPathInvocationContext { + var p = new(JsonPathInvocationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonPathInvocation + return p +} + +func InitEmptyJsonPathInvocationContext(p *JsonPathInvocationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonPathInvocation +} + +func (*JsonPathInvocationContext) IsJsonPathInvocationContext() {} + +func NewJsonPathInvocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonPathInvocationContext { + var p = new(JsonPathInvocationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonPathInvocation + + return p +} + +func (s *JsonPathInvocationContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonPathInvocationContext) GetPath() IString_Context { return s.path } + +func (s *JsonPathInvocationContext) SetPath(v IString_Context) { s.path = v } + +func (s *JsonPathInvocationContext) JsonValueExpression() IJsonValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonValueExpressionContext) +} + +func (s *JsonPathInvocationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *JsonPathInvocationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *JsonPathInvocationContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *JsonPathInvocationContext) PASSING_() antlr.TerminalNode { + return s.GetToken(TrinoParserPASSING_, 0) +} + +func (s *JsonPathInvocationContext) AllJsonArgument() []IJsonArgumentContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IJsonArgumentContext); ok { + len++ + } + } + + tst := make([]IJsonArgumentContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IJsonArgumentContext); ok { + tst[i] = t.(IJsonArgumentContext) + i++ + } + } + + return tst +} + +func (s *JsonPathInvocationContext) JsonArgument(i int) IJsonArgumentContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonArgumentContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IJsonArgumentContext) +} + +func (s *JsonPathInvocationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonPathInvocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonPathInvocationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonPathInvocation(s) + } +} + +func (s *JsonPathInvocationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonPathInvocation(s) + } +} + +func (s *JsonPathInvocationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonPathInvocation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonPathInvocation() (localctx IJsonPathInvocationContext) { + localctx = NewJsonPathInvocationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 134, TrinoParserRULE_jsonPathInvocation) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2511) + p.JsonValueExpression() + } + { + p.SetState(2512) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2513) + + var _x = p.String_() + + localctx.(*JsonPathInvocationContext).path = _x + } + p.SetState(2523) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserPASSING_ { + { + p.SetState(2514) + p.Match(TrinoParserPASSING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2515) + p.JsonArgument() + } + p.SetState(2520) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2516) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2517) + p.JsonArgument() + } + + p.SetState(2522) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonValueExpressionContext is an interface to support dynamic dispatch. +type IJsonValueExpressionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Expression() IExpressionContext + FORMAT_() antlr.TerminalNode + JsonRepresentation() IJsonRepresentationContext + + // IsJsonValueExpressionContext differentiates from other interfaces. + IsJsonValueExpressionContext() +} + +type JsonValueExpressionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonValueExpressionContext() *JsonValueExpressionContext { + var p = new(JsonValueExpressionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonValueExpression + return p +} + +func InitEmptyJsonValueExpressionContext(p *JsonValueExpressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonValueExpression +} + +func (*JsonValueExpressionContext) IsJsonValueExpressionContext() {} + +func NewJsonValueExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonValueExpressionContext { + var p = new(JsonValueExpressionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonValueExpression + + return p +} + +func (s *JsonValueExpressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonValueExpressionContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *JsonValueExpressionContext) FORMAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserFORMAT_, 0) +} + +func (s *JsonValueExpressionContext) JsonRepresentation() IJsonRepresentationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonRepresentationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonRepresentationContext) +} + +func (s *JsonValueExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonValueExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonValueExpressionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonValueExpression(s) + } +} + +func (s *JsonValueExpressionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonValueExpression(s) + } +} + +func (s *JsonValueExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonValueExpression(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonValueExpression() (localctx IJsonValueExpressionContext) { + localctx = NewJsonValueExpressionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 136, TrinoParserRULE_jsonValueExpression) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2525) + p.Expression() + } + p.SetState(2528) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserFORMAT_ { + { + p.SetState(2526) + p.Match(TrinoParserFORMAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2527) + p.JsonRepresentation() + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonRepresentationContext is an interface to support dynamic dispatch. +type IJsonRepresentationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + JSON_() antlr.TerminalNode + ENCODING_() antlr.TerminalNode + UTF8_() antlr.TerminalNode + UTF16_() antlr.TerminalNode + UTF32_() antlr.TerminalNode + + // IsJsonRepresentationContext differentiates from other interfaces. + IsJsonRepresentationContext() +} + +type JsonRepresentationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonRepresentationContext() *JsonRepresentationContext { + var p = new(JsonRepresentationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonRepresentation + return p +} + +func InitEmptyJsonRepresentationContext(p *JsonRepresentationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonRepresentation +} + +func (*JsonRepresentationContext) IsJsonRepresentationContext() {} + +func NewJsonRepresentationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonRepresentationContext { + var p = new(JsonRepresentationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonRepresentation + + return p +} + +func (s *JsonRepresentationContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonRepresentationContext) JSON_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_, 0) +} + +func (s *JsonRepresentationContext) ENCODING_() antlr.TerminalNode { + return s.GetToken(TrinoParserENCODING_, 0) +} + +func (s *JsonRepresentationContext) UTF8_() antlr.TerminalNode { + return s.GetToken(TrinoParserUTF8_, 0) +} + +func (s *JsonRepresentationContext) UTF16_() antlr.TerminalNode { + return s.GetToken(TrinoParserUTF16_, 0) +} + +func (s *JsonRepresentationContext) UTF32_() antlr.TerminalNode { + return s.GetToken(TrinoParserUTF32_, 0) +} + +func (s *JsonRepresentationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonRepresentationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonRepresentationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonRepresentation(s) + } +} + +func (s *JsonRepresentationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonRepresentation(s) + } +} + +func (s *JsonRepresentationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonRepresentation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonRepresentation() (localctx IJsonRepresentationContext) { + localctx = NewJsonRepresentationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 138, TrinoParserRULE_jsonRepresentation) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2530) + p.Match(TrinoParserJSON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2533) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserENCODING_ { + { + p.SetState(2531) + p.Match(TrinoParserENCODING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2532) + _la = p.GetTokenStream().LA(1) + + if !((int64((_la-275)) & ^0x3f) == 0 && ((int64(1)<<(_la-275))&7) != 0) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonArgumentContext is an interface to support dynamic dispatch. +type IJsonArgumentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + JsonValueExpression() IJsonValueExpressionContext + AS_() antlr.TerminalNode + Identifier() IIdentifierContext + + // IsJsonArgumentContext differentiates from other interfaces. + IsJsonArgumentContext() +} + +type JsonArgumentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonArgumentContext() *JsonArgumentContext { + var p = new(JsonArgumentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonArgument + return p +} + +func InitEmptyJsonArgumentContext(p *JsonArgumentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonArgument +} + +func (*JsonArgumentContext) IsJsonArgumentContext() {} + +func NewJsonArgumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonArgumentContext { + var p = new(JsonArgumentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonArgument + + return p +} + +func (s *JsonArgumentContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonArgumentContext) JsonValueExpression() IJsonValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonValueExpressionContext) +} + +func (s *JsonArgumentContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *JsonArgumentContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *JsonArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonArgumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonArgument(s) + } +} + +func (s *JsonArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonArgument(s) + } +} + +func (s *JsonArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonArgument(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonArgument() (localctx IJsonArgumentContext) { + localctx = NewJsonArgumentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 140, TrinoParserRULE_jsonArgument) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2535) + p.JsonValueExpression() + } + { + p.SetState(2536) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2537) + p.Identifier() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonExistsErrorBehaviorContext is an interface to support dynamic dispatch. +type IJsonExistsErrorBehaviorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + TRUE_() antlr.TerminalNode + FALSE_() antlr.TerminalNode + UNKNOWN_() antlr.TerminalNode + ERROR_() antlr.TerminalNode + + // IsJsonExistsErrorBehaviorContext differentiates from other interfaces. + IsJsonExistsErrorBehaviorContext() +} + +type JsonExistsErrorBehaviorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonExistsErrorBehaviorContext() *JsonExistsErrorBehaviorContext { + var p = new(JsonExistsErrorBehaviorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonExistsErrorBehavior + return p +} + +func InitEmptyJsonExistsErrorBehaviorContext(p *JsonExistsErrorBehaviorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonExistsErrorBehavior +} + +func (*JsonExistsErrorBehaviorContext) IsJsonExistsErrorBehaviorContext() {} + +func NewJsonExistsErrorBehaviorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonExistsErrorBehaviorContext { + var p = new(JsonExistsErrorBehaviorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonExistsErrorBehavior + + return p +} + +func (s *JsonExistsErrorBehaviorContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonExistsErrorBehaviorContext) TRUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRUE_, 0) +} + +func (s *JsonExistsErrorBehaviorContext) FALSE_() antlr.TerminalNode { + return s.GetToken(TrinoParserFALSE_, 0) +} + +func (s *JsonExistsErrorBehaviorContext) UNKNOWN_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNKNOWN_, 0) +} + +func (s *JsonExistsErrorBehaviorContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *JsonExistsErrorBehaviorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonExistsErrorBehaviorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonExistsErrorBehaviorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonExistsErrorBehavior(s) + } +} + +func (s *JsonExistsErrorBehaviorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonExistsErrorBehavior(s) + } +} + +func (s *JsonExistsErrorBehaviorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonExistsErrorBehavior(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonExistsErrorBehavior() (localctx IJsonExistsErrorBehaviorContext) { + localctx = NewJsonExistsErrorBehaviorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 142, TrinoParserRULE_jsonExistsErrorBehavior) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2539) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserERROR_ || _la == TrinoParserFALSE_ || _la == TrinoParserTRUE_ || _la == TrinoParserUNKNOWN_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonValueBehaviorContext is an interface to support dynamic dispatch. +type IJsonValueBehaviorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ERROR_() antlr.TerminalNode + NULL_() antlr.TerminalNode + DEFAULT_() antlr.TerminalNode + Expression() IExpressionContext + + // IsJsonValueBehaviorContext differentiates from other interfaces. + IsJsonValueBehaviorContext() +} + +type JsonValueBehaviorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonValueBehaviorContext() *JsonValueBehaviorContext { + var p = new(JsonValueBehaviorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonValueBehavior + return p +} + +func InitEmptyJsonValueBehaviorContext(p *JsonValueBehaviorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonValueBehavior +} + +func (*JsonValueBehaviorContext) IsJsonValueBehaviorContext() {} + +func NewJsonValueBehaviorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonValueBehaviorContext { + var p = new(JsonValueBehaviorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonValueBehavior + + return p +} + +func (s *JsonValueBehaviorContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonValueBehaviorContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *JsonValueBehaviorContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *JsonValueBehaviorContext) DEFAULT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFAULT_, 0) +} + +func (s *JsonValueBehaviorContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *JsonValueBehaviorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonValueBehaviorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonValueBehaviorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonValueBehavior(s) + } +} + +func (s *JsonValueBehaviorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonValueBehavior(s) + } +} + +func (s *JsonValueBehaviorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonValueBehavior(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonValueBehavior() (localctx IJsonValueBehaviorContext) { + localctx = NewJsonValueBehaviorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 144, TrinoParserRULE_jsonValueBehavior) + p.SetState(2545) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserERROR_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2541) + p.Match(TrinoParserERROR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserNULL_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2542) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserDEFAULT_: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(2543) + p.Match(TrinoParserDEFAULT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2544) + p.Expression() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonQueryWrapperBehaviorContext is an interface to support dynamic dispatch. +type IJsonQueryWrapperBehaviorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + WITHOUT_() antlr.TerminalNode + ARRAY_() antlr.TerminalNode + WITH_() antlr.TerminalNode + CONDITIONAL_() antlr.TerminalNode + UNCONDITIONAL_() antlr.TerminalNode + + // IsJsonQueryWrapperBehaviorContext differentiates from other interfaces. + IsJsonQueryWrapperBehaviorContext() +} + +type JsonQueryWrapperBehaviorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonQueryWrapperBehaviorContext() *JsonQueryWrapperBehaviorContext { + var p = new(JsonQueryWrapperBehaviorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonQueryWrapperBehavior + return p +} + +func InitEmptyJsonQueryWrapperBehaviorContext(p *JsonQueryWrapperBehaviorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonQueryWrapperBehavior +} + +func (*JsonQueryWrapperBehaviorContext) IsJsonQueryWrapperBehaviorContext() {} + +func NewJsonQueryWrapperBehaviorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonQueryWrapperBehaviorContext { + var p = new(JsonQueryWrapperBehaviorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonQueryWrapperBehavior + + return p +} + +func (s *JsonQueryWrapperBehaviorContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonQueryWrapperBehaviorContext) WITHOUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITHOUT_, 0) +} + +func (s *JsonQueryWrapperBehaviorContext) ARRAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserARRAY_, 0) +} + +func (s *JsonQueryWrapperBehaviorContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *JsonQueryWrapperBehaviorContext) CONDITIONAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserCONDITIONAL_, 0) +} + +func (s *JsonQueryWrapperBehaviorContext) UNCONDITIONAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNCONDITIONAL_, 0) +} + +func (s *JsonQueryWrapperBehaviorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonQueryWrapperBehaviorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonQueryWrapperBehaviorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonQueryWrapperBehavior(s) + } +} + +func (s *JsonQueryWrapperBehaviorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonQueryWrapperBehavior(s) + } +} + +func (s *JsonQueryWrapperBehaviorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonQueryWrapperBehavior(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonQueryWrapperBehavior() (localctx IJsonQueryWrapperBehaviorContext) { + localctx = NewJsonQueryWrapperBehaviorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 146, TrinoParserRULE_jsonQueryWrapperBehavior) + var _la int + + p.SetState(2558) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserWITHOUT_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2547) + p.Match(TrinoParserWITHOUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2549) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserARRAY_ { + { + p.SetState(2548) + p.Match(TrinoParserARRAY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + case TrinoParserWITH_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2551) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2553) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserCONDITIONAL_ || _la == TrinoParserUNCONDITIONAL_ { + { + p.SetState(2552) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserCONDITIONAL_ || _la == TrinoParserUNCONDITIONAL_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + p.SetState(2556) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserARRAY_ { + { + p.SetState(2555) + p.Match(TrinoParserARRAY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonQueryBehaviorContext is an interface to support dynamic dispatch. +type IJsonQueryBehaviorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ERROR_() antlr.TerminalNode + NULL_() antlr.TerminalNode + EMPTY_() antlr.TerminalNode + ARRAY_() antlr.TerminalNode + OBJECT_() antlr.TerminalNode + + // IsJsonQueryBehaviorContext differentiates from other interfaces. + IsJsonQueryBehaviorContext() +} + +type JsonQueryBehaviorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonQueryBehaviorContext() *JsonQueryBehaviorContext { + var p = new(JsonQueryBehaviorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonQueryBehavior + return p +} + +func InitEmptyJsonQueryBehaviorContext(p *JsonQueryBehaviorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonQueryBehavior +} + +func (*JsonQueryBehaviorContext) IsJsonQueryBehaviorContext() {} + +func NewJsonQueryBehaviorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonQueryBehaviorContext { + var p = new(JsonQueryBehaviorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonQueryBehavior + + return p +} + +func (s *JsonQueryBehaviorContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonQueryBehaviorContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *JsonQueryBehaviorContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *JsonQueryBehaviorContext) EMPTY_() antlr.TerminalNode { + return s.GetToken(TrinoParserEMPTY_, 0) +} + +func (s *JsonQueryBehaviorContext) ARRAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserARRAY_, 0) +} + +func (s *JsonQueryBehaviorContext) OBJECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserOBJECT_, 0) +} + +func (s *JsonQueryBehaviorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonQueryBehaviorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonQueryBehaviorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonQueryBehavior(s) + } +} + +func (s *JsonQueryBehaviorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonQueryBehavior(s) + } +} + +func (s *JsonQueryBehaviorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonQueryBehavior(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonQueryBehavior() (localctx IJsonQueryBehaviorContext) { + localctx = NewJsonQueryBehaviorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 148, TrinoParserRULE_jsonQueryBehavior) + var _la int + + p.SetState(2564) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserERROR_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2560) + p.Match(TrinoParserERROR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserNULL_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2561) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserEMPTY_: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(2562) + p.Match(TrinoParserEMPTY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2563) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserARRAY_ || _la == TrinoParserOBJECT_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IJsonObjectMemberContext is an interface to support dynamic dispatch. +type IJsonObjectMemberContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Expression() IExpressionContext + VALUE_() antlr.TerminalNode + JsonValueExpression() IJsonValueExpressionContext + KEY_() antlr.TerminalNode + COLON_() antlr.TerminalNode + + // IsJsonObjectMemberContext differentiates from other interfaces. + IsJsonObjectMemberContext() +} + +type JsonObjectMemberContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyJsonObjectMemberContext() *JsonObjectMemberContext { + var p = new(JsonObjectMemberContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonObjectMember + return p +} + +func InitEmptyJsonObjectMemberContext(p *JsonObjectMemberContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_jsonObjectMember +} + +func (*JsonObjectMemberContext) IsJsonObjectMemberContext() {} + +func NewJsonObjectMemberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *JsonObjectMemberContext { + var p = new(JsonObjectMemberContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_jsonObjectMember + + return p +} + +func (s *JsonObjectMemberContext) GetParser() antlr.Parser { return s.parser } + +func (s *JsonObjectMemberContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *JsonObjectMemberContext) VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserVALUE_, 0) +} + +func (s *JsonObjectMemberContext) JsonValueExpression() IJsonValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJsonValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IJsonValueExpressionContext) +} + +func (s *JsonObjectMemberContext) KEY_() antlr.TerminalNode { + return s.GetToken(TrinoParserKEY_, 0) +} + +func (s *JsonObjectMemberContext) COLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLON_, 0) +} + +func (s *JsonObjectMemberContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JsonObjectMemberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *JsonObjectMemberContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterJsonObjectMember(s) + } +} + +func (s *JsonObjectMemberContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitJsonObjectMember(s) + } +} + +func (s *JsonObjectMemberContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitJsonObjectMember(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) JsonObjectMember() (localctx IJsonObjectMemberContext) { + localctx = NewJsonObjectMemberContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 150, TrinoParserRULE_jsonObjectMember) + p.SetState(2577) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 342, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + p.SetState(2567) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 341, p.GetParserRuleContext()) == 1 { + { + p.SetState(2566) + p.Match(TrinoParserKEY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(2569) + p.Expression() + } + { + p.SetState(2570) + p.Match(TrinoParserVALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2571) + p.JsonValueExpression() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2573) + p.Expression() + } + { + p.SetState(2574) + p.Match(TrinoParserCOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2575) + p.JsonValueExpression() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IProcessingModeContext is an interface to support dynamic dispatch. +type IProcessingModeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + RUNNING_() antlr.TerminalNode + FINAL_() antlr.TerminalNode + + // IsProcessingModeContext differentiates from other interfaces. + IsProcessingModeContext() +} + +type ProcessingModeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyProcessingModeContext() *ProcessingModeContext { + var p = new(ProcessingModeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_processingMode + return p +} + +func InitEmptyProcessingModeContext(p *ProcessingModeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_processingMode +} + +func (*ProcessingModeContext) IsProcessingModeContext() {} + +func NewProcessingModeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProcessingModeContext { + var p = new(ProcessingModeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_processingMode + + return p +} + +func (s *ProcessingModeContext) GetParser() antlr.Parser { return s.parser } + +func (s *ProcessingModeContext) RUNNING_() antlr.TerminalNode { + return s.GetToken(TrinoParserRUNNING_, 0) +} + +func (s *ProcessingModeContext) FINAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserFINAL_, 0) +} + +func (s *ProcessingModeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ProcessingModeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ProcessingModeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterProcessingMode(s) + } +} + +func (s *ProcessingModeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitProcessingMode(s) + } +} + +func (s *ProcessingModeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitProcessingMode(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ProcessingMode() (localctx IProcessingModeContext) { + localctx = NewProcessingModeContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 152, TrinoParserRULE_processingMode) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2579) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFINAL_ || _la == TrinoParserRUNNING_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// INullTreatmentContext is an interface to support dynamic dispatch. +type INullTreatmentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + IGNORE_() antlr.TerminalNode + NULLS_() antlr.TerminalNode + RESPECT_() antlr.TerminalNode + + // IsNullTreatmentContext differentiates from other interfaces. + IsNullTreatmentContext() +} + +type NullTreatmentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyNullTreatmentContext() *NullTreatmentContext { + var p = new(NullTreatmentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_nullTreatment + return p +} + +func InitEmptyNullTreatmentContext(p *NullTreatmentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_nullTreatment +} + +func (*NullTreatmentContext) IsNullTreatmentContext() {} + +func NewNullTreatmentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NullTreatmentContext { + var p = new(NullTreatmentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_nullTreatment + + return p +} + +func (s *NullTreatmentContext) GetParser() antlr.Parser { return s.parser } + +func (s *NullTreatmentContext) IGNORE_() antlr.TerminalNode { + return s.GetToken(TrinoParserIGNORE_, 0) +} + +func (s *NullTreatmentContext) NULLS_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULLS_, 0) +} + +func (s *NullTreatmentContext) RESPECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESPECT_, 0) +} + +func (s *NullTreatmentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NullTreatmentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *NullTreatmentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNullTreatment(s) + } +} + +func (s *NullTreatmentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNullTreatment(s) + } +} + +func (s *NullTreatmentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNullTreatment(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) NullTreatment() (localctx INullTreatmentContext) { + localctx = NewNullTreatmentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 154, TrinoParserRULE_nullTreatment) + p.SetState(2585) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserIGNORE_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2581) + p.Match(TrinoParserIGNORE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2582) + p.Match(TrinoParserNULLS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserRESPECT_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2583) + p.Match(TrinoParserRESPECT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2584) + p.Match(TrinoParserNULLS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IString_Context is an interface to support dynamic dispatch. +type IString_Context interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsString_Context differentiates from other interfaces. + IsString_Context() +} + +type String_Context struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyString_Context() *String_Context { + var p = new(String_Context) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_string_ + return p +} + +func InitEmptyString_Context(p *String_Context) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_string_ +} + +func (*String_Context) IsString_Context() {} + +func NewString_Context(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *String_Context { + var p = new(String_Context) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_string_ + + return p +} + +func (s *String_Context) GetParser() antlr.Parser { return s.parser } + +func (s *String_Context) CopyAll(ctx *String_Context) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *String_Context) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *String_Context) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type UnicodeStringLiteralContext struct { + String_Context +} + +func NewUnicodeStringLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnicodeStringLiteralContext { + var p = new(UnicodeStringLiteralContext) + + InitEmptyString_Context(&p.String_Context) + p.parser = parser + p.CopyAll(ctx.(*String_Context)) + + return p +} + +func (s *UnicodeStringLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UnicodeStringLiteralContext) UNICODE_STRING_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNICODE_STRING_, 0) +} + +func (s *UnicodeStringLiteralContext) UESCAPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUESCAPE_, 0) +} + +func (s *UnicodeStringLiteralContext) STRING_() antlr.TerminalNode { + return s.GetToken(TrinoParserSTRING_, 0) +} + +func (s *UnicodeStringLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUnicodeStringLiteral(s) + } +} + +func (s *UnicodeStringLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUnicodeStringLiteral(s) + } +} + +func (s *UnicodeStringLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUnicodeStringLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type BasicStringLiteralContext struct { + String_Context +} + +func NewBasicStringLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BasicStringLiteralContext { + var p = new(BasicStringLiteralContext) + + InitEmptyString_Context(&p.String_Context) + p.parser = parser + p.CopyAll(ctx.(*String_Context)) + + return p +} + +func (s *BasicStringLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BasicStringLiteralContext) STRING_() antlr.TerminalNode { + return s.GetToken(TrinoParserSTRING_, 0) +} + +func (s *BasicStringLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterBasicStringLiteral(s) + } +} + +func (s *BasicStringLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitBasicStringLiteral(s) + } +} + +func (s *BasicStringLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitBasicStringLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) String_() (localctx IString_Context) { + localctx = NewString_Context(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 156, TrinoParserRULE_string_) + p.SetState(2593) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserSTRING_: + localctx = NewBasicStringLiteralContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2587) + p.Match(TrinoParserSTRING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserUNICODE_STRING_: + localctx = NewUnicodeStringLiteralContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2588) + p.Match(TrinoParserUNICODE_STRING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2591) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 344, p.GetParserRuleContext()) == 1 { + { + p.SetState(2589) + p.Match(TrinoParserUESCAPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2590) + p.Match(TrinoParserSTRING_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITimeZoneSpecifierContext is an interface to support dynamic dispatch. +type ITimeZoneSpecifierContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsTimeZoneSpecifierContext differentiates from other interfaces. + IsTimeZoneSpecifierContext() +} + +type TimeZoneSpecifierContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTimeZoneSpecifierContext() *TimeZoneSpecifierContext { + var p = new(TimeZoneSpecifierContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_timeZoneSpecifier + return p +} + +func InitEmptyTimeZoneSpecifierContext(p *TimeZoneSpecifierContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_timeZoneSpecifier +} + +func (*TimeZoneSpecifierContext) IsTimeZoneSpecifierContext() {} + +func NewTimeZoneSpecifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TimeZoneSpecifierContext { + var p = new(TimeZoneSpecifierContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_timeZoneSpecifier + + return p +} + +func (s *TimeZoneSpecifierContext) GetParser() antlr.Parser { return s.parser } + +func (s *TimeZoneSpecifierContext) CopyAll(ctx *TimeZoneSpecifierContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *TimeZoneSpecifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TimeZoneSpecifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type TimeZoneIntervalContext struct { + TimeZoneSpecifierContext +} + +func NewTimeZoneIntervalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TimeZoneIntervalContext { + var p = new(TimeZoneIntervalContext) + + InitEmptyTimeZoneSpecifierContext(&p.TimeZoneSpecifierContext) + p.parser = parser + p.CopyAll(ctx.(*TimeZoneSpecifierContext)) + + return p +} + +func (s *TimeZoneIntervalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TimeZoneIntervalContext) TIME_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIME_, 0) +} + +func (s *TimeZoneIntervalContext) ZONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserZONE_, 0) +} + +func (s *TimeZoneIntervalContext) Interval() IIntervalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIntervalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIntervalContext) +} + +func (s *TimeZoneIntervalContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTimeZoneInterval(s) + } +} + +func (s *TimeZoneIntervalContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTimeZoneInterval(s) + } +} + +func (s *TimeZoneIntervalContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTimeZoneInterval(s) + + default: + return t.VisitChildren(s) + } +} + +type TimeZoneStringContext struct { + TimeZoneSpecifierContext +} + +func NewTimeZoneStringContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TimeZoneStringContext { + var p = new(TimeZoneStringContext) + + InitEmptyTimeZoneSpecifierContext(&p.TimeZoneSpecifierContext) + p.parser = parser + p.CopyAll(ctx.(*TimeZoneSpecifierContext)) + + return p +} + +func (s *TimeZoneStringContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TimeZoneStringContext) TIME_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIME_, 0) +} + +func (s *TimeZoneStringContext) ZONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserZONE_, 0) +} + +func (s *TimeZoneStringContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *TimeZoneStringContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTimeZoneString(s) + } +} + +func (s *TimeZoneStringContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTimeZoneString(s) + } +} + +func (s *TimeZoneStringContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTimeZoneString(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TimeZoneSpecifier() (localctx ITimeZoneSpecifierContext) { + localctx = NewTimeZoneSpecifierContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 158, TrinoParserRULE_timeZoneSpecifier) + p.SetState(2601) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 346, p.GetParserRuleContext()) { + case 1: + localctx = NewTimeZoneIntervalContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2595) + p.Match(TrinoParserTIME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2596) + p.Match(TrinoParserZONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2597) + p.Interval() + } + + case 2: + localctx = NewTimeZoneStringContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2598) + p.Match(TrinoParserTIME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2599) + p.Match(TrinoParserZONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2600) + p.String_() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IComparisonOperatorContext is an interface to support dynamic dispatch. +type IComparisonOperatorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + EQ_() antlr.TerminalNode + NEQ_() antlr.TerminalNode + LT_() antlr.TerminalNode + LTE_() antlr.TerminalNode + GT_() antlr.TerminalNode + GTE_() antlr.TerminalNode + + // IsComparisonOperatorContext differentiates from other interfaces. + IsComparisonOperatorContext() +} + +type ComparisonOperatorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyComparisonOperatorContext() *ComparisonOperatorContext { + var p = new(ComparisonOperatorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_comparisonOperator + return p +} + +func InitEmptyComparisonOperatorContext(p *ComparisonOperatorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_comparisonOperator +} + +func (*ComparisonOperatorContext) IsComparisonOperatorContext() {} + +func NewComparisonOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ComparisonOperatorContext { + var p = new(ComparisonOperatorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_comparisonOperator + + return p +} + +func (s *ComparisonOperatorContext) GetParser() antlr.Parser { return s.parser } + +func (s *ComparisonOperatorContext) EQ_() antlr.TerminalNode { + return s.GetToken(TrinoParserEQ_, 0) +} + +func (s *ComparisonOperatorContext) NEQ_() antlr.TerminalNode { + return s.GetToken(TrinoParserNEQ_, 0) +} + +func (s *ComparisonOperatorContext) LT_() antlr.TerminalNode { + return s.GetToken(TrinoParserLT_, 0) +} + +func (s *ComparisonOperatorContext) LTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLTE_, 0) +} + +func (s *ComparisonOperatorContext) GT_() antlr.TerminalNode { + return s.GetToken(TrinoParserGT_, 0) +} + +func (s *ComparisonOperatorContext) GTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserGTE_, 0) +} + +func (s *ComparisonOperatorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ComparisonOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ComparisonOperatorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterComparisonOperator(s) + } +} + +func (s *ComparisonOperatorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitComparisonOperator(s) + } +} + +func (s *ComparisonOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitComparisonOperator(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ComparisonOperator() (localctx IComparisonOperatorContext) { + localctx = NewComparisonOperatorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 160, TrinoParserRULE_comparisonOperator) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2603) + _la = p.GetTokenStream().LA(1) + + if !((int64((_la-296)) & ^0x3f) == 0 && ((int64(1)<<(_la-296))&63) != 0) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IComparisonQuantifierContext is an interface to support dynamic dispatch. +type IComparisonQuantifierContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ALL_() antlr.TerminalNode + SOME_() antlr.TerminalNode + ANY_() antlr.TerminalNode + + // IsComparisonQuantifierContext differentiates from other interfaces. + IsComparisonQuantifierContext() +} + +type ComparisonQuantifierContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyComparisonQuantifierContext() *ComparisonQuantifierContext { + var p = new(ComparisonQuantifierContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_comparisonQuantifier + return p +} + +func InitEmptyComparisonQuantifierContext(p *ComparisonQuantifierContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_comparisonQuantifier +} + +func (*ComparisonQuantifierContext) IsComparisonQuantifierContext() {} + +func NewComparisonQuantifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ComparisonQuantifierContext { + var p = new(ComparisonQuantifierContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_comparisonQuantifier + + return p +} + +func (s *ComparisonQuantifierContext) GetParser() antlr.Parser { return s.parser } + +func (s *ComparisonQuantifierContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *ComparisonQuantifierContext) SOME_() antlr.TerminalNode { + return s.GetToken(TrinoParserSOME_, 0) +} + +func (s *ComparisonQuantifierContext) ANY_() antlr.TerminalNode { + return s.GetToken(TrinoParserANY_, 0) +} + +func (s *ComparisonQuantifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ComparisonQuantifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ComparisonQuantifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterComparisonQuantifier(s) + } +} + +func (s *ComparisonQuantifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitComparisonQuantifier(s) + } +} + +func (s *ComparisonQuantifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitComparisonQuantifier(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ComparisonQuantifier() (localctx IComparisonQuantifierContext) { + localctx = NewComparisonQuantifierContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 162, TrinoParserRULE_comparisonQuantifier) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2605) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserALL_ || _la == TrinoParserANY_ || _la == TrinoParserSOME_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IBooleanValueContext is an interface to support dynamic dispatch. +type IBooleanValueContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + TRUE_() antlr.TerminalNode + FALSE_() antlr.TerminalNode + + // IsBooleanValueContext differentiates from other interfaces. + IsBooleanValueContext() +} + +type BooleanValueContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyBooleanValueContext() *BooleanValueContext { + var p = new(BooleanValueContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_booleanValue + return p +} + +func InitEmptyBooleanValueContext(p *BooleanValueContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_booleanValue +} + +func (*BooleanValueContext) IsBooleanValueContext() {} + +func NewBooleanValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BooleanValueContext { + var p = new(BooleanValueContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_booleanValue + + return p +} + +func (s *BooleanValueContext) GetParser() antlr.Parser { return s.parser } + +func (s *BooleanValueContext) TRUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRUE_, 0) +} + +func (s *BooleanValueContext) FALSE_() antlr.TerminalNode { + return s.GetToken(TrinoParserFALSE_, 0) +} + +func (s *BooleanValueContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BooleanValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *BooleanValueContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterBooleanValue(s) + } +} + +func (s *BooleanValueContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitBooleanValue(s) + } +} + +func (s *BooleanValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitBooleanValue(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) BooleanValue() (localctx IBooleanValueContext) { + localctx = NewBooleanValueContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 164, TrinoParserRULE_booleanValue) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2607) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFALSE_ || _la == TrinoParserTRUE_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IIntervalContext is an interface to support dynamic dispatch. +type IIntervalContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetSign returns the sign token. + GetSign() antlr.Token + + // SetSign sets the sign token. + SetSign(antlr.Token) + + // GetFrom returns the from rule contexts. + GetFrom() IIntervalFieldContext + + // GetTo returns the to rule contexts. + GetTo() IIntervalFieldContext + + // SetFrom sets the from rule contexts. + SetFrom(IIntervalFieldContext) + + // SetTo sets the to rule contexts. + SetTo(IIntervalFieldContext) + + // Getter signatures + INTERVAL_() antlr.TerminalNode + String_() IString_Context + AllIntervalField() []IIntervalFieldContext + IntervalField(i int) IIntervalFieldContext + TO_() antlr.TerminalNode + PLUS_() antlr.TerminalNode + MINUS_() antlr.TerminalNode + + // IsIntervalContext differentiates from other interfaces. + IsIntervalContext() +} + +type IntervalContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + sign antlr.Token + from IIntervalFieldContext + to IIntervalFieldContext +} + +func NewEmptyIntervalContext() *IntervalContext { + var p = new(IntervalContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_interval + return p +} + +func InitEmptyIntervalContext(p *IntervalContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_interval +} + +func (*IntervalContext) IsIntervalContext() {} + +func NewIntervalContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IntervalContext { + var p = new(IntervalContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_interval + + return p +} + +func (s *IntervalContext) GetParser() antlr.Parser { return s.parser } + +func (s *IntervalContext) GetSign() antlr.Token { return s.sign } + +func (s *IntervalContext) SetSign(v antlr.Token) { s.sign = v } + +func (s *IntervalContext) GetFrom() IIntervalFieldContext { return s.from } + +func (s *IntervalContext) GetTo() IIntervalFieldContext { return s.to } + +func (s *IntervalContext) SetFrom(v IIntervalFieldContext) { s.from = v } + +func (s *IntervalContext) SetTo(v IIntervalFieldContext) { s.to = v } + +func (s *IntervalContext) INTERVAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTERVAL_, 0) +} + +func (s *IntervalContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *IntervalContext) AllIntervalField() []IIntervalFieldContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIntervalFieldContext); ok { + len++ + } + } + + tst := make([]IIntervalFieldContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIntervalFieldContext); ok { + tst[i] = t.(IIntervalFieldContext) + i++ + } + } + + return tst +} + +func (s *IntervalContext) IntervalField(i int) IIntervalFieldContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIntervalFieldContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIntervalFieldContext) +} + +func (s *IntervalContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *IntervalContext) PLUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserPLUS_, 0) +} + +func (s *IntervalContext) MINUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUS_, 0) +} + +func (s *IntervalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IntervalContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *IntervalContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterInterval(s) + } +} + +func (s *IntervalContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitInterval(s) + } +} + +func (s *IntervalContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitInterval(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Interval() (localctx IIntervalContext) { + localctx = NewIntervalContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 166, TrinoParserRULE_interval) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2609) + p.Match(TrinoParserINTERVAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2611) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserPLUS_ || _la == TrinoParserMINUS_ { + { + p.SetState(2610) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*IntervalContext).sign = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserPLUS_ || _la == TrinoParserMINUS_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*IntervalContext).sign = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + { + p.SetState(2613) + p.String_() + } + { + p.SetState(2614) + + var _x = p.IntervalField() + + localctx.(*IntervalContext).from = _x + } + p.SetState(2617) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 348, p.GetParserRuleContext()) == 1 { + { + p.SetState(2615) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2616) + + var _x = p.IntervalField() + + localctx.(*IntervalContext).to = _x + } + + } else if p.HasError() { // JIM + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IIntervalFieldContext is an interface to support dynamic dispatch. +type IIntervalFieldContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + YEAR_() antlr.TerminalNode + MONTH_() antlr.TerminalNode + DAY_() antlr.TerminalNode + HOUR_() antlr.TerminalNode + MINUTE_() antlr.TerminalNode + SECOND_() antlr.TerminalNode + + // IsIntervalFieldContext differentiates from other interfaces. + IsIntervalFieldContext() +} + +type IntervalFieldContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyIntervalFieldContext() *IntervalFieldContext { + var p = new(IntervalFieldContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_intervalField + return p +} + +func InitEmptyIntervalFieldContext(p *IntervalFieldContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_intervalField +} + +func (*IntervalFieldContext) IsIntervalFieldContext() {} + +func NewIntervalFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IntervalFieldContext { + var p = new(IntervalFieldContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_intervalField + + return p +} + +func (s *IntervalFieldContext) GetParser() antlr.Parser { return s.parser } + +func (s *IntervalFieldContext) YEAR_() antlr.TerminalNode { + return s.GetToken(TrinoParserYEAR_, 0) +} + +func (s *IntervalFieldContext) MONTH_() antlr.TerminalNode { + return s.GetToken(TrinoParserMONTH_, 0) +} + +func (s *IntervalFieldContext) DAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserDAY_, 0) +} + +func (s *IntervalFieldContext) HOUR_() antlr.TerminalNode { + return s.GetToken(TrinoParserHOUR_, 0) +} + +func (s *IntervalFieldContext) MINUTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUTE_, 0) +} + +func (s *IntervalFieldContext) SECOND_() antlr.TerminalNode { + return s.GetToken(TrinoParserSECOND_, 0) +} + +func (s *IntervalFieldContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IntervalFieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *IntervalFieldContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIntervalField(s) + } +} + +func (s *IntervalFieldContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIntervalField(s) + } +} + +func (s *IntervalFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIntervalField(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) IntervalField() (localctx IIntervalFieldContext) { + localctx = NewIntervalFieldContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 168, TrinoParserRULE_intervalField) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2619) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserDAY_ || ((int64((_la-101)) & ^0x3f) == 0 && ((int64(1)<<(_la-101))&13510798882111489) != 0) || _la == TrinoParserSECOND_ || _la == TrinoParserYEAR_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// INormalFormContext is an interface to support dynamic dispatch. +type INormalFormContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + NFD_() antlr.TerminalNode + NFC_() antlr.TerminalNode + NFKD_() antlr.TerminalNode + NFKC_() antlr.TerminalNode + + // IsNormalFormContext differentiates from other interfaces. + IsNormalFormContext() +} + +type NormalFormContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyNormalFormContext() *NormalFormContext { + var p = new(NormalFormContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_normalForm + return p +} + +func InitEmptyNormalFormContext(p *NormalFormContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_normalForm +} + +func (*NormalFormContext) IsNormalFormContext() {} + +func NewNormalFormContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NormalFormContext { + var p = new(NormalFormContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_normalForm + + return p +} + +func (s *NormalFormContext) GetParser() antlr.Parser { return s.parser } + +func (s *NormalFormContext) NFD_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFD_, 0) +} + +func (s *NormalFormContext) NFC_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFC_, 0) +} + +func (s *NormalFormContext) NFKD_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFKD_, 0) +} + +func (s *NormalFormContext) NFKC_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFKC_, 0) +} + +func (s *NormalFormContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NormalFormContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *NormalFormContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNormalForm(s) + } +} + +func (s *NormalFormContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNormalForm(s) + } +} + +func (s *NormalFormContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNormalForm(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) NormalForm() (localctx INormalFormContext) { + localctx = NewNormalFormContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 170, TrinoParserRULE_normalForm) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2621) + _la = p.GetTokenStream().LA(1) + + if !((int64((_la-158)) & ^0x3f) == 0 && ((int64(1)<<(_la-158))&15) != 0) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITypeContext is an interface to support dynamic dispatch. +type ITypeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsTypeContext differentiates from other interfaces. + IsTypeContext() +} + +type TypeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTypeContext() *TypeContext { + var p = new(TypeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_type + return p +} + +func InitEmptyTypeContext(p *TypeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_type +} + +func (*TypeContext) IsTypeContext() {} + +func NewTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeContext { + var p = new(TypeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_type + + return p +} + +func (s *TypeContext) GetParser() antlr.Parser { return s.parser } + +func (s *TypeContext) CopyAll(ctx *TypeContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *TypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type RowTypeContext struct { + TypeContext +} + +func NewRowTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RowTypeContext { + var p = new(RowTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *RowTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RowTypeContext) ROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserROW_, 0) +} + +func (s *RowTypeContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *RowTypeContext) AllRowField() []IRowFieldContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRowFieldContext); ok { + len++ + } + } + + tst := make([]IRowFieldContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRowFieldContext); ok { + tst[i] = t.(IRowFieldContext) + i++ + } + } + + return tst +} + +func (s *RowTypeContext) RowField(i int) IRowFieldContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowFieldContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRowFieldContext) +} + +func (s *RowTypeContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *RowTypeContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *RowTypeContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *RowTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRowType(s) + } +} + +func (s *RowTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRowType(s) + } +} + +func (s *RowTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRowType(s) + + default: + return t.VisitChildren(s) + } +} + +type IntervalTypeContext struct { + TypeContext + from IIntervalFieldContext + to IIntervalFieldContext +} + +func NewIntervalTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IntervalTypeContext { + var p = new(IntervalTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *IntervalTypeContext) GetFrom() IIntervalFieldContext { return s.from } + +func (s *IntervalTypeContext) GetTo() IIntervalFieldContext { return s.to } + +func (s *IntervalTypeContext) SetFrom(v IIntervalFieldContext) { s.from = v } + +func (s *IntervalTypeContext) SetTo(v IIntervalFieldContext) { s.to = v } + +func (s *IntervalTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IntervalTypeContext) INTERVAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTERVAL_, 0) +} + +func (s *IntervalTypeContext) AllIntervalField() []IIntervalFieldContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIntervalFieldContext); ok { + len++ + } + } + + tst := make([]IIntervalFieldContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIntervalFieldContext); ok { + tst[i] = t.(IIntervalFieldContext) + i++ + } + } + + return tst +} + +func (s *IntervalTypeContext) IntervalField(i int) IIntervalFieldContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIntervalFieldContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIntervalFieldContext) +} + +func (s *IntervalTypeContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *IntervalTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIntervalType(s) + } +} + +func (s *IntervalTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIntervalType(s) + } +} + +func (s *IntervalTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIntervalType(s) + + default: + return t.VisitChildren(s) + } +} + +type ArrayTypeContext struct { + TypeContext +} + +func NewArrayTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArrayTypeContext { + var p = new(ArrayTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *ArrayTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ArrayTypeContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *ArrayTypeContext) ARRAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserARRAY_, 0) +} + +func (s *ArrayTypeContext) LSQUARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLSQUARE_, 0) +} + +func (s *ArrayTypeContext) INTEGER_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTEGER_VALUE_, 0) +} + +func (s *ArrayTypeContext) RSQUARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserRSQUARE_, 0) +} + +func (s *ArrayTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterArrayType(s) + } +} + +func (s *ArrayTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitArrayType(s) + } +} + +func (s *ArrayTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitArrayType(s) + + default: + return t.VisitChildren(s) + } +} + +type DoublePrecisionTypeContext struct { + TypeContext +} + +func NewDoublePrecisionTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DoublePrecisionTypeContext { + var p = new(DoublePrecisionTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *DoublePrecisionTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DoublePrecisionTypeContext) DOUBLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOUBLE_, 0) +} + +func (s *DoublePrecisionTypeContext) PRECISION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRECISION_, 0) +} + +func (s *DoublePrecisionTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDoublePrecisionType(s) + } +} + +func (s *DoublePrecisionTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDoublePrecisionType(s) + } +} + +func (s *DoublePrecisionTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDoublePrecisionType(s) + + default: + return t.VisitChildren(s) + } +} + +type LegacyArrayTypeContext struct { + TypeContext +} + +func NewLegacyArrayTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LegacyArrayTypeContext { + var p = new(LegacyArrayTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *LegacyArrayTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LegacyArrayTypeContext) ARRAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserARRAY_, 0) +} + +func (s *LegacyArrayTypeContext) LT_() antlr.TerminalNode { + return s.GetToken(TrinoParserLT_, 0) +} + +func (s *LegacyArrayTypeContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *LegacyArrayTypeContext) GT_() antlr.TerminalNode { + return s.GetToken(TrinoParserGT_, 0) +} + +func (s *LegacyArrayTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLegacyArrayType(s) + } +} + +func (s *LegacyArrayTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLegacyArrayType(s) + } +} + +func (s *LegacyArrayTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLegacyArrayType(s) + + default: + return t.VisitChildren(s) + } +} + +type GenericTypeContext struct { + TypeContext +} + +func NewGenericTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *GenericTypeContext { + var p = new(GenericTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *GenericTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GenericTypeContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *GenericTypeContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *GenericTypeContext) AllTypeParameter() []ITypeParameterContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITypeParameterContext); ok { + len++ + } + } + + tst := make([]ITypeParameterContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITypeParameterContext); ok { + tst[i] = t.(ITypeParameterContext) + i++ + } + } + + return tst +} + +func (s *GenericTypeContext) TypeParameter(i int) ITypeParameterContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeParameterContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITypeParameterContext) +} + +func (s *GenericTypeContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *GenericTypeContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *GenericTypeContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *GenericTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterGenericType(s) + } +} + +func (s *GenericTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitGenericType(s) + } +} + +func (s *GenericTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitGenericType(s) + + default: + return t.VisitChildren(s) + } +} + +type DateTimeTypeContext struct { + TypeContext + base_ antlr.Token + precision ITypeParameterContext +} + +func NewDateTimeTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DateTimeTypeContext { + var p = new(DateTimeTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *DateTimeTypeContext) GetBase_() antlr.Token { return s.base_ } + +func (s *DateTimeTypeContext) SetBase_(v antlr.Token) { s.base_ = v } + +func (s *DateTimeTypeContext) GetPrecision() ITypeParameterContext { return s.precision } + +func (s *DateTimeTypeContext) SetPrecision(v ITypeParameterContext) { s.precision = v } + +func (s *DateTimeTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DateTimeTypeContext) TIMESTAMP_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIMESTAMP_, 0) +} + +func (s *DateTimeTypeContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *DateTimeTypeContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *DateTimeTypeContext) WITHOUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITHOUT_, 0) +} + +func (s *DateTimeTypeContext) AllTIME_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserTIME_) +} + +func (s *DateTimeTypeContext) TIME_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserTIME_, i) +} + +func (s *DateTimeTypeContext) ZONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserZONE_, 0) +} + +func (s *DateTimeTypeContext) TypeParameter() ITypeParameterContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeParameterContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeParameterContext) +} + +func (s *DateTimeTypeContext) WITH_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITH_, 0) +} + +func (s *DateTimeTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDateTimeType(s) + } +} + +func (s *DateTimeTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDateTimeType(s) + } +} + +func (s *DateTimeTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDateTimeType(s) + + default: + return t.VisitChildren(s) + } +} + +type LegacyMapTypeContext struct { + TypeContext + keyType ITypeContext + valueType ITypeContext +} + +func NewLegacyMapTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LegacyMapTypeContext { + var p = new(LegacyMapTypeContext) + + InitEmptyTypeContext(&p.TypeContext) + p.parser = parser + p.CopyAll(ctx.(*TypeContext)) + + return p +} + +func (s *LegacyMapTypeContext) GetKeyType() ITypeContext { return s.keyType } + +func (s *LegacyMapTypeContext) GetValueType() ITypeContext { return s.valueType } + +func (s *LegacyMapTypeContext) SetKeyType(v ITypeContext) { s.keyType = v } + +func (s *LegacyMapTypeContext) SetValueType(v ITypeContext) { s.valueType = v } + +func (s *LegacyMapTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LegacyMapTypeContext) MAP_() antlr.TerminalNode { + return s.GetToken(TrinoParserMAP_, 0) +} + +func (s *LegacyMapTypeContext) LT_() antlr.TerminalNode { + return s.GetToken(TrinoParserLT_, 0) +} + +func (s *LegacyMapTypeContext) COMMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, 0) +} + +func (s *LegacyMapTypeContext) GT_() antlr.TerminalNode { + return s.GetToken(TrinoParserGT_, 0) +} + +func (s *LegacyMapTypeContext) AllType_() []ITypeContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITypeContext); ok { + len++ + } + } + + tst := make([]ITypeContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITypeContext); ok { + tst[i] = t.(ITypeContext) + i++ + } + } + + return tst +} + +func (s *LegacyMapTypeContext) Type_(i int) ITypeContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *LegacyMapTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLegacyMapType(s) + } +} + +func (s *LegacyMapTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLegacyMapType(s) + } +} + +func (s *LegacyMapTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLegacyMapType(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Type_() (localctx ITypeContext) { + return p.type_(0) +} + +func (p *TrinoParser) type_(_p int) (localctx ITypeContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewTypeContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx ITypeContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 172 + p.EnterRecursionRule(localctx, 172, TrinoParserRULE_type, _p) + var _la int + + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(2714) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 359, p.GetParserRuleContext()) { + case 1: + localctx = NewRowTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + + { + p.SetState(2624) + p.Match(TrinoParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2625) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2626) + p.RowField() + } + p.SetState(2631) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2627) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2628) + p.RowField() + } + + p.SetState(2633) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2634) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + localctx = NewIntervalTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2636) + p.Match(TrinoParserINTERVAL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2637) + + var _x = p.IntervalField() + + localctx.(*IntervalTypeContext).from = _x + } + p.SetState(2640) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 350, p.GetParserRuleContext()) == 1 { + { + p.SetState(2638) + p.Match(TrinoParserTO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2639) + + var _x = p.IntervalField() + + localctx.(*IntervalTypeContext).to = _x + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 3: + localctx = NewDateTimeTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2642) + + var _m = p.Match(TrinoParserTIMESTAMP_) + + localctx.(*DateTimeTypeContext).base_ = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2647) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 351, p.GetParserRuleContext()) == 1 { + { + p.SetState(2643) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2644) + + var _x = p.TypeParameter() + + localctx.(*DateTimeTypeContext).precision = _x + } + { + p.SetState(2645) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2652) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 352, p.GetParserRuleContext()) == 1 { + { + p.SetState(2649) + p.Match(TrinoParserWITHOUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2650) + p.Match(TrinoParserTIME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2651) + p.Match(TrinoParserZONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 4: + localctx = NewDateTimeTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2654) + + var _m = p.Match(TrinoParserTIMESTAMP_) + + localctx.(*DateTimeTypeContext).base_ = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2659) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(2655) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2656) + + var _x = p.TypeParameter() + + localctx.(*DateTimeTypeContext).precision = _x + } + { + p.SetState(2657) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2661) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2662) + p.Match(TrinoParserTIME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2663) + p.Match(TrinoParserZONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 5: + localctx = NewDateTimeTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2664) + + var _m = p.Match(TrinoParserTIME_) + + localctx.(*DateTimeTypeContext).base_ = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2669) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 354, p.GetParserRuleContext()) == 1 { + { + p.SetState(2665) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2666) + + var _x = p.TypeParameter() + + localctx.(*DateTimeTypeContext).precision = _x + } + { + p.SetState(2667) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + p.SetState(2674) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 355, p.GetParserRuleContext()) == 1 { + { + p.SetState(2671) + p.Match(TrinoParserWITHOUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2672) + p.Match(TrinoParserTIME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2673) + p.Match(TrinoParserZONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 6: + localctx = NewDateTimeTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2676) + + var _m = p.Match(TrinoParserTIME_) + + localctx.(*DateTimeTypeContext).base_ = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2681) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(2677) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2678) + + var _x = p.TypeParameter() + + localctx.(*DateTimeTypeContext).precision = _x + } + { + p.SetState(2679) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2683) + p.Match(TrinoParserWITH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2684) + p.Match(TrinoParserTIME_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2685) + p.Match(TrinoParserZONE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 7: + localctx = NewDoublePrecisionTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2686) + p.Match(TrinoParserDOUBLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2687) + p.Match(TrinoParserPRECISION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 8: + localctx = NewLegacyArrayTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2688) + p.Match(TrinoParserARRAY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2689) + p.Match(TrinoParserLT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2690) + p.type_(0) + } + { + p.SetState(2691) + p.Match(TrinoParserGT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 9: + localctx = NewLegacyMapTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2693) + p.Match(TrinoParserMAP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2694) + p.Match(TrinoParserLT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2695) + + var _x = p.type_(0) + + localctx.(*LegacyMapTypeContext).keyType = _x + } + { + p.SetState(2696) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2697) + + var _x = p.type_(0) + + localctx.(*LegacyMapTypeContext).valueType = _x + } + { + p.SetState(2698) + p.Match(TrinoParserGT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 10: + localctx = NewGenericTypeContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(2700) + p.Identifier() + } + p.SetState(2712) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 358, p.GetParserRuleContext()) == 1 { + { + p.SetState(2701) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2702) + p.TypeParameter() + } + p.SetState(2707) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2703) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2704) + p.TypeParameter() + } + + p.SetState(2709) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2710) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(2725) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 361, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + localctx = NewArrayTypeContext(p, NewTypeContext(p, _parentctx, _parentState)) + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_type) + p.SetState(2716) + + if !(p.Precpred(p.GetParserRuleContext(), 2)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit + } + { + p.SetState(2717) + p.Match(TrinoParserARRAY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2721) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 360, p.GetParserRuleContext()) == 1 { + { + p.SetState(2718) + p.Match(TrinoParserLSQUARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2719) + p.Match(TrinoParserINTEGER_VALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2720) + p.Match(TrinoParserRSQUARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + } + p.SetState(2727) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 361, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRowFieldContext is an interface to support dynamic dispatch. +type IRowFieldContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Type_() ITypeContext + Identifier() IIdentifierContext + + // IsRowFieldContext differentiates from other interfaces. + IsRowFieldContext() +} + +type RowFieldContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRowFieldContext() *RowFieldContext { + var p = new(RowFieldContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowField + return p +} + +func InitEmptyRowFieldContext(p *RowFieldContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowField +} + +func (*RowFieldContext) IsRowFieldContext() {} + +func NewRowFieldContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RowFieldContext { + var p = new(RowFieldContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_rowField + + return p +} + +func (s *RowFieldContext) GetParser() antlr.Parser { return s.parser } + +func (s *RowFieldContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *RowFieldContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *RowFieldContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RowFieldContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *RowFieldContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRowField(s) + } +} + +func (s *RowFieldContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRowField(s) + } +} + +func (s *RowFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRowField(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RowField() (localctx IRowFieldContext) { + localctx = NewRowFieldContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 174, TrinoParserRULE_rowField) + p.SetState(2732) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 362, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2728) + p.type_(0) + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2729) + p.Identifier() + } + { + p.SetState(2730) + p.type_(0) + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITypeParameterContext is an interface to support dynamic dispatch. +type ITypeParameterContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + INTEGER_VALUE_() antlr.TerminalNode + Type_() ITypeContext + + // IsTypeParameterContext differentiates from other interfaces. + IsTypeParameterContext() +} + +type TypeParameterContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTypeParameterContext() *TypeParameterContext { + var p = new(TypeParameterContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_typeParameter + return p +} + +func InitEmptyTypeParameterContext(p *TypeParameterContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_typeParameter +} + +func (*TypeParameterContext) IsTypeParameterContext() {} + +func NewTypeParameterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TypeParameterContext { + var p = new(TypeParameterContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_typeParameter + + return p +} + +func (s *TypeParameterContext) GetParser() antlr.Parser { return s.parser } + +func (s *TypeParameterContext) INTEGER_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTEGER_VALUE_, 0) +} + +func (s *TypeParameterContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *TypeParameterContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TypeParameterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *TypeParameterContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTypeParameter(s) + } +} + +func (s *TypeParameterContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTypeParameter(s) + } +} + +func (s *TypeParameterContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTypeParameter(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TypeParameter() (localctx ITypeParameterContext) { + localctx = NewTypeParameterContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 176, TrinoParserRULE_typeParameter) + p.SetState(2736) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserINTEGER_VALUE_: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2734) + p.Match(TrinoParserINTEGER_VALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserABSENT_, TrinoParserADD_, TrinoParserADMIN_, TrinoParserAFTER_, TrinoParserALL_, TrinoParserANALYZE_, TrinoParserANY_, TrinoParserARRAY_, TrinoParserASC_, TrinoParserAT_, TrinoParserAUTHORIZATION_, TrinoParserBEGIN_, TrinoParserBERNOULLI_, TrinoParserBOTH_, TrinoParserCALL_, TrinoParserCALLED_, TrinoParserCASCADE_, TrinoParserCATALOG_, TrinoParserCATALOGS_, TrinoParserCOLUMN_, TrinoParserCOLUMNS_, TrinoParserCOMMENT_, TrinoParserCOMMIT_, TrinoParserCOMMITTED_, TrinoParserCONDITIONAL_, TrinoParserCOUNT_, TrinoParserCOPARTITION_, TrinoParserCURRENT_, TrinoParserDATA_, TrinoParserDATE_, TrinoParserDAY_, TrinoParserDECLARE_, TrinoParserDEFAULT_, TrinoParserDEFINE_, TrinoParserDEFINER_, TrinoParserDENY_, TrinoParserDESC_, TrinoParserDESCRIPTOR_, TrinoParserDETERMINISTIC_, TrinoParserDISTRIBUTED_, TrinoParserDO_, TrinoParserDOUBLE_, TrinoParserEMPTY_, TrinoParserELSEIF_, TrinoParserENCODING_, TrinoParserERROR_, TrinoParserEXCLUDING_, TrinoParserEXPLAIN_, TrinoParserFETCH_, TrinoParserFILTER_, TrinoParserFINAL_, TrinoParserFIRST_, TrinoParserFOLLOWING_, TrinoParserFORMAT_, TrinoParserFUNCTION_, TrinoParserFUNCTIONS_, TrinoParserGRACE_, TrinoParserGRANT_, TrinoParserGRANTED_, TrinoParserGRANTS_, TrinoParserGRAPHVIZ_, TrinoParserGROUPS_, TrinoParserHOUR_, TrinoParserIF_, TrinoParserIGNORE_, TrinoParserIMMEDIATE_, TrinoParserINCLUDING_, TrinoParserINITIAL_, TrinoParserINPUT_, TrinoParserINTERVAL_, TrinoParserINVOKER_, TrinoParserIO_, TrinoParserISOLATION_, TrinoParserITERATE_, TrinoParserJSON_, TrinoParserKEEP_, TrinoParserKEY_, TrinoParserKEYS_, TrinoParserLANGUAGE_, TrinoParserLAST_, TrinoParserLATERAL_, TrinoParserLEADING_, TrinoParserLEAVE_, TrinoParserLEVEL_, TrinoParserLIMIT_, TrinoParserLOCAL_, TrinoParserLOGICAL_, TrinoParserLOOP_, TrinoParserMAP_, TrinoParserMATCH_, TrinoParserMATCHED_, TrinoParserMATCHES_, TrinoParserMATCH_RECOGNIZE_, TrinoParserMATERIALIZED_, TrinoParserMEASURES_, TrinoParserMERGE_, TrinoParserMINUTE_, TrinoParserMONTH_, TrinoParserNESTED_, TrinoParserNEXT_, TrinoParserNFC_, TrinoParserNFD_, TrinoParserNFKC_, TrinoParserNFKD_, TrinoParserNO_, TrinoParserNONE_, TrinoParserNULLIF_, TrinoParserNULLS_, TrinoParserOBJECT_, TrinoParserOF_, TrinoParserOFFSET_, TrinoParserOMIT_, TrinoParserONE_, TrinoParserONLY_, TrinoParserOPTION_, TrinoParserORDINALITY_, TrinoParserOUTPUT_, TrinoParserOVER_, TrinoParserOVERFLOW_, TrinoParserPARTITION_, TrinoParserPARTITIONS_, TrinoParserPASSING_, TrinoParserPAST_, TrinoParserPATH_, TrinoParserPATTERN_, TrinoParserPER_, TrinoParserPERIOD_, TrinoParserPERMUTE_, TrinoParserPLAN_, TrinoParserPOSITION_, TrinoParserPRECEDING_, TrinoParserPRECISION_, TrinoParserPRIVILEGES_, TrinoParserPROPERTIES_, TrinoParserPRUNE_, TrinoParserQUOTES_, TrinoParserRANGE_, TrinoParserREAD_, TrinoParserREFRESH_, TrinoParserRENAME_, TrinoParserREPEAT_, TrinoParserREPEATABLE_, TrinoParserREPLACE_, TrinoParserRESET_, TrinoParserRESPECT_, TrinoParserRESTRICT_, TrinoParserRETURN_, TrinoParserRETURNING_, TrinoParserRETURNS_, TrinoParserREVOKE_, TrinoParserROLE_, TrinoParserROLES_, TrinoParserROLLBACK_, TrinoParserROW_, TrinoParserROWS_, TrinoParserRUNNING_, TrinoParserSCALAR_, TrinoParserSCHEMA_, TrinoParserSCHEMAS_, TrinoParserSECOND_, TrinoParserSECURITY_, TrinoParserSEEK_, TrinoParserSERIALIZABLE_, TrinoParserSESSION_, TrinoParserSET_, TrinoParserSETS_, TrinoParserSHOW_, TrinoParserSOME_, TrinoParserSTART_, TrinoParserSTATS_, TrinoParserSUBSET_, TrinoParserSUBSTRING_, TrinoParserSYSTEM_, TrinoParserTABLES_, TrinoParserTABLESAMPLE_, TrinoParserTEXT_, TrinoParserTEXT_STRING_, TrinoParserTIES_, TrinoParserTIME_, TrinoParserTIMESTAMP_, TrinoParserTO_, TrinoParserTRAILING_, TrinoParserTRANSACTION_, TrinoParserTRUNCATE_, TrinoParserTRY_CAST_, TrinoParserTYPE_, TrinoParserUNBOUNDED_, TrinoParserUNCOMMITTED_, TrinoParserUNCONDITIONAL_, TrinoParserUNIQUE_, TrinoParserUNKNOWN_, TrinoParserUNMATCHED_, TrinoParserUNTIL_, TrinoParserUPDATE_, TrinoParserUSE_, TrinoParserUSER_, TrinoParserUTF16_, TrinoParserUTF32_, TrinoParserUTF8_, TrinoParserVALIDATE_, TrinoParserVALUE_, TrinoParserVERBOSE_, TrinoParserVERSION_, TrinoParserVIEW_, TrinoParserWHILE_, TrinoParserWINDOW_, TrinoParserWITHIN_, TrinoParserWITHOUT_, TrinoParserWORK_, TrinoParserWRAPPER_, TrinoParserWRITE_, TrinoParserYEAR_, TrinoParserZONE_, TrinoParserIDENTIFIER_, TrinoParserDIGIT_IDENTIFIER_, TrinoParserQUOTED_IDENTIFIER_, TrinoParserBACKQUOTED_IDENTIFIER_: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2735) + p.type_(0) + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IWhenClauseContext is an interface to support dynamic dispatch. +type IWhenClauseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetCondition returns the condition rule contexts. + GetCondition() IExpressionContext + + // GetResult returns the result rule contexts. + GetResult() IExpressionContext + + // SetCondition sets the condition rule contexts. + SetCondition(IExpressionContext) + + // SetResult sets the result rule contexts. + SetResult(IExpressionContext) + + // Getter signatures + WHEN_() antlr.TerminalNode + THEN_() antlr.TerminalNode + AllExpression() []IExpressionContext + Expression(i int) IExpressionContext + + // IsWhenClauseContext differentiates from other interfaces. + IsWhenClauseContext() +} + +type WhenClauseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + condition IExpressionContext + result IExpressionContext +} + +func NewEmptyWhenClauseContext() *WhenClauseContext { + var p = new(WhenClauseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_whenClause + return p +} + +func InitEmptyWhenClauseContext(p *WhenClauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_whenClause +} + +func (*WhenClauseContext) IsWhenClauseContext() {} + +func NewWhenClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WhenClauseContext { + var p = new(WhenClauseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_whenClause + + return p +} + +func (s *WhenClauseContext) GetParser() antlr.Parser { return s.parser } + +func (s *WhenClauseContext) GetCondition() IExpressionContext { return s.condition } + +func (s *WhenClauseContext) GetResult() IExpressionContext { return s.result } + +func (s *WhenClauseContext) SetCondition(v IExpressionContext) { s.condition = v } + +func (s *WhenClauseContext) SetResult(v IExpressionContext) { s.result = v } + +func (s *WhenClauseContext) WHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHEN_, 0) +} + +func (s *WhenClauseContext) THEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserTHEN_, 0) +} + +func (s *WhenClauseContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *WhenClauseContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *WhenClauseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *WhenClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *WhenClauseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterWhenClause(s) + } +} + +func (s *WhenClauseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitWhenClause(s) + } +} + +func (s *WhenClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitWhenClause(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) WhenClause() (localctx IWhenClauseContext) { + localctx = NewWhenClauseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 178, TrinoParserRULE_whenClause) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2738) + p.Match(TrinoParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2739) + + var _x = p.Expression() + + localctx.(*WhenClauseContext).condition = _x + } + { + p.SetState(2740) + p.Match(TrinoParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2741) + + var _x = p.Expression() + + localctx.(*WhenClauseContext).result = _x + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IFilterContext is an interface to support dynamic dispatch. +type IFilterContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + FILTER_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + WHERE_() antlr.TerminalNode + BooleanExpression() IBooleanExpressionContext + RPAREN_() antlr.TerminalNode + + // IsFilterContext differentiates from other interfaces. + IsFilterContext() +} + +type FilterContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyFilterContext() *FilterContext { + var p = new(FilterContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_filter + return p +} + +func InitEmptyFilterContext(p *FilterContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_filter +} + +func (*FilterContext) IsFilterContext() {} + +func NewFilterContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FilterContext { + var p = new(FilterContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_filter + + return p +} + +func (s *FilterContext) GetParser() antlr.Parser { return s.parser } + +func (s *FilterContext) FILTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserFILTER_, 0) +} + +func (s *FilterContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *FilterContext) WHERE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHERE_, 0) +} + +func (s *FilterContext) BooleanExpression() IBooleanExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IBooleanExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IBooleanExpressionContext) +} + +func (s *FilterContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *FilterContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *FilterContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *FilterContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterFilter(s) + } +} + +func (s *FilterContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitFilter(s) + } +} + +func (s *FilterContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitFilter(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Filter() (localctx IFilterContext) { + localctx = NewFilterContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 180, TrinoParserRULE_filter) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2743) + p.Match(TrinoParserFILTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2744) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2745) + p.Match(TrinoParserWHERE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2746) + p.booleanExpression(0) + } + { + p.SetState(2747) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IMergeCaseContext is an interface to support dynamic dispatch. +type IMergeCaseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsMergeCaseContext differentiates from other interfaces. + IsMergeCaseContext() +} + +type MergeCaseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyMergeCaseContext() *MergeCaseContext { + var p = new(MergeCaseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_mergeCase + return p +} + +func InitEmptyMergeCaseContext(p *MergeCaseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_mergeCase +} + +func (*MergeCaseContext) IsMergeCaseContext() {} + +func NewMergeCaseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MergeCaseContext { + var p = new(MergeCaseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_mergeCase + + return p +} + +func (s *MergeCaseContext) GetParser() antlr.Parser { return s.parser } + +func (s *MergeCaseContext) CopyAll(ctx *MergeCaseContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *MergeCaseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MergeCaseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type MergeInsertContext struct { + MergeCaseContext + condition IExpressionContext + _identifier IIdentifierContext + targets []IIdentifierContext + _expression IExpressionContext + values []IExpressionContext +} + +func NewMergeInsertContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MergeInsertContext { + var p = new(MergeInsertContext) + + InitEmptyMergeCaseContext(&p.MergeCaseContext) + p.parser = parser + p.CopyAll(ctx.(*MergeCaseContext)) + + return p +} + +func (s *MergeInsertContext) GetCondition() IExpressionContext { return s.condition } + +func (s *MergeInsertContext) Get_identifier() IIdentifierContext { return s._identifier } + +func (s *MergeInsertContext) Get_expression() IExpressionContext { return s._expression } + +func (s *MergeInsertContext) SetCondition(v IExpressionContext) { s.condition = v } + +func (s *MergeInsertContext) Set_identifier(v IIdentifierContext) { s._identifier = v } + +func (s *MergeInsertContext) Set_expression(v IExpressionContext) { s._expression = v } + +func (s *MergeInsertContext) GetTargets() []IIdentifierContext { return s.targets } + +func (s *MergeInsertContext) GetValues() []IExpressionContext { return s.values } + +func (s *MergeInsertContext) SetTargets(v []IIdentifierContext) { s.targets = v } + +func (s *MergeInsertContext) SetValues(v []IExpressionContext) { s.values = v } + +func (s *MergeInsertContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MergeInsertContext) WHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHEN_, 0) +} + +func (s *MergeInsertContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *MergeInsertContext) MATCHED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCHED_, 0) +} + +func (s *MergeInsertContext) THEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserTHEN_, 0) +} + +func (s *MergeInsertContext) INSERT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINSERT_, 0) +} + +func (s *MergeInsertContext) VALUES_() antlr.TerminalNode { + return s.GetToken(TrinoParserVALUES_, 0) +} + +func (s *MergeInsertContext) AllLPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserLPAREN_) +} + +func (s *MergeInsertContext) LPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, i) +} + +func (s *MergeInsertContext) AllRPAREN_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserRPAREN_) +} + +func (s *MergeInsertContext) RPAREN_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, i) +} + +func (s *MergeInsertContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *MergeInsertContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *MergeInsertContext) AND_() antlr.TerminalNode { + return s.GetToken(TrinoParserAND_, 0) +} + +func (s *MergeInsertContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *MergeInsertContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *MergeInsertContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *MergeInsertContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *MergeInsertContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterMergeInsert(s) + } +} + +func (s *MergeInsertContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitMergeInsert(s) + } +} + +func (s *MergeInsertContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitMergeInsert(s) + + default: + return t.VisitChildren(s) + } +} + +type MergeUpdateContext struct { + MergeCaseContext + condition IExpressionContext + _identifier IIdentifierContext + targets []IIdentifierContext + _expression IExpressionContext + values []IExpressionContext +} + +func NewMergeUpdateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MergeUpdateContext { + var p = new(MergeUpdateContext) + + InitEmptyMergeCaseContext(&p.MergeCaseContext) + p.parser = parser + p.CopyAll(ctx.(*MergeCaseContext)) + + return p +} + +func (s *MergeUpdateContext) GetCondition() IExpressionContext { return s.condition } + +func (s *MergeUpdateContext) Get_identifier() IIdentifierContext { return s._identifier } + +func (s *MergeUpdateContext) Get_expression() IExpressionContext { return s._expression } + +func (s *MergeUpdateContext) SetCondition(v IExpressionContext) { s.condition = v } + +func (s *MergeUpdateContext) Set_identifier(v IIdentifierContext) { s._identifier = v } + +func (s *MergeUpdateContext) Set_expression(v IExpressionContext) { s._expression = v } + +func (s *MergeUpdateContext) GetTargets() []IIdentifierContext { return s.targets } + +func (s *MergeUpdateContext) GetValues() []IExpressionContext { return s.values } + +func (s *MergeUpdateContext) SetTargets(v []IIdentifierContext) { s.targets = v } + +func (s *MergeUpdateContext) SetValues(v []IExpressionContext) { s.values = v } + +func (s *MergeUpdateContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MergeUpdateContext) WHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHEN_, 0) +} + +func (s *MergeUpdateContext) MATCHED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCHED_, 0) +} + +func (s *MergeUpdateContext) THEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserTHEN_, 0) +} + +func (s *MergeUpdateContext) UPDATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUPDATE_, 0) +} + +func (s *MergeUpdateContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *MergeUpdateContext) AllEQ_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserEQ_) +} + +func (s *MergeUpdateContext) EQ_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserEQ_, i) +} + +func (s *MergeUpdateContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *MergeUpdateContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *MergeUpdateContext) AllExpression() []IExpressionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IExpressionContext); ok { + len++ + } + } + + tst := make([]IExpressionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IExpressionContext); ok { + tst[i] = t.(IExpressionContext) + i++ + } + } + + return tst +} + +func (s *MergeUpdateContext) Expression(i int) IExpressionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *MergeUpdateContext) AND_() antlr.TerminalNode { + return s.GetToken(TrinoParserAND_, 0) +} + +func (s *MergeUpdateContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *MergeUpdateContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *MergeUpdateContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterMergeUpdate(s) + } +} + +func (s *MergeUpdateContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitMergeUpdate(s) + } +} + +func (s *MergeUpdateContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitMergeUpdate(s) + + default: + return t.VisitChildren(s) + } +} + +type MergeDeleteContext struct { + MergeCaseContext + condition IExpressionContext +} + +func NewMergeDeleteContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MergeDeleteContext { + var p = new(MergeDeleteContext) + + InitEmptyMergeCaseContext(&p.MergeCaseContext) + p.parser = parser + p.CopyAll(ctx.(*MergeCaseContext)) + + return p +} + +func (s *MergeDeleteContext) GetCondition() IExpressionContext { return s.condition } + +func (s *MergeDeleteContext) SetCondition(v IExpressionContext) { s.condition = v } + +func (s *MergeDeleteContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *MergeDeleteContext) WHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHEN_, 0) +} + +func (s *MergeDeleteContext) MATCHED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCHED_, 0) +} + +func (s *MergeDeleteContext) THEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserTHEN_, 0) +} + +func (s *MergeDeleteContext) DELETE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDELETE_, 0) +} + +func (s *MergeDeleteContext) AND_() antlr.TerminalNode { + return s.GetToken(TrinoParserAND_, 0) +} + +func (s *MergeDeleteContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *MergeDeleteContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterMergeDelete(s) + } +} + +func (s *MergeDeleteContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitMergeDelete(s) + } +} + +func (s *MergeDeleteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitMergeDelete(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) MergeCase() (localctx IMergeCaseContext) { + localctx = NewMergeCaseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 182, TrinoParserRULE_mergeCase) + var _la int + + p.SetState(2813) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 371, p.GetParserRuleContext()) { + case 1: + localctx = NewMergeUpdateContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2749) + p.Match(TrinoParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2750) + p.Match(TrinoParserMATCHED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2753) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAND_ { + { + p.SetState(2751) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2752) + + var _x = p.Expression() + + localctx.(*MergeUpdateContext).condition = _x + } + + } + { + p.SetState(2755) + p.Match(TrinoParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2756) + p.Match(TrinoParserUPDATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2757) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2758) + + var _x = p.Identifier() + + localctx.(*MergeUpdateContext)._identifier = _x + } + localctx.(*MergeUpdateContext).targets = append(localctx.(*MergeUpdateContext).targets, localctx.(*MergeUpdateContext)._identifier) + { + p.SetState(2759) + p.Match(TrinoParserEQ_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2760) + + var _x = p.Expression() + + localctx.(*MergeUpdateContext)._expression = _x + } + localctx.(*MergeUpdateContext).values = append(localctx.(*MergeUpdateContext).values, localctx.(*MergeUpdateContext)._expression) + p.SetState(2768) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2761) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2762) + + var _x = p.Identifier() + + localctx.(*MergeUpdateContext)._identifier = _x + } + localctx.(*MergeUpdateContext).targets = append(localctx.(*MergeUpdateContext).targets, localctx.(*MergeUpdateContext)._identifier) + { + p.SetState(2763) + p.Match(TrinoParserEQ_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2764) + + var _x = p.Expression() + + localctx.(*MergeUpdateContext)._expression = _x + } + localctx.(*MergeUpdateContext).values = append(localctx.(*MergeUpdateContext).values, localctx.(*MergeUpdateContext)._expression) + + p.SetState(2770) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + case 2: + localctx = NewMergeDeleteContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2771) + p.Match(TrinoParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2772) + p.Match(TrinoParserMATCHED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2775) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAND_ { + { + p.SetState(2773) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2774) + + var _x = p.Expression() + + localctx.(*MergeDeleteContext).condition = _x + } + + } + { + p.SetState(2777) + p.Match(TrinoParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2778) + p.Match(TrinoParserDELETE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewMergeInsertContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(2779) + p.Match(TrinoParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2780) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2781) + p.Match(TrinoParserMATCHED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2784) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAND_ { + { + p.SetState(2782) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2783) + + var _x = p.Expression() + + localctx.(*MergeInsertContext).condition = _x + } + + } + { + p.SetState(2786) + p.Match(TrinoParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2787) + p.Match(TrinoParserINSERT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2799) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserLPAREN_ { + { + p.SetState(2788) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2789) + + var _x = p.Identifier() + + localctx.(*MergeInsertContext)._identifier = _x + } + localctx.(*MergeInsertContext).targets = append(localctx.(*MergeInsertContext).targets, localctx.(*MergeInsertContext)._identifier) + p.SetState(2794) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2790) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2791) + + var _x = p.Identifier() + + localctx.(*MergeInsertContext)._identifier = _x + } + localctx.(*MergeInsertContext).targets = append(localctx.(*MergeInsertContext).targets, localctx.(*MergeInsertContext)._identifier) + + p.SetState(2796) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2797) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2801) + p.Match(TrinoParserVALUES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2802) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2803) + + var _x = p.Expression() + + localctx.(*MergeInsertContext)._expression = _x + } + localctx.(*MergeInsertContext).values = append(localctx.(*MergeInsertContext).values, localctx.(*MergeInsertContext)._expression) + p.SetState(2808) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2804) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2805) + + var _x = p.Expression() + + localctx.(*MergeInsertContext)._expression = _x + } + localctx.(*MergeInsertContext).values = append(localctx.(*MergeInsertContext).values, localctx.(*MergeInsertContext)._expression) + + p.SetState(2810) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2811) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IOverContext is an interface to support dynamic dispatch. +type IOverContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetWindowName returns the windowName rule contexts. + GetWindowName() IIdentifierContext + + // SetWindowName sets the windowName rule contexts. + SetWindowName(IIdentifierContext) + + // Getter signatures + OVER_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + WindowSpecification() IWindowSpecificationContext + RPAREN_() antlr.TerminalNode + Identifier() IIdentifierContext + + // IsOverContext differentiates from other interfaces. + IsOverContext() +} + +type OverContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + windowName IIdentifierContext +} + +func NewEmptyOverContext() *OverContext { + var p = new(OverContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_over + return p +} + +func InitEmptyOverContext(p *OverContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_over +} + +func (*OverContext) IsOverContext() {} + +func NewOverContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OverContext { + var p = new(OverContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_over + + return p +} + +func (s *OverContext) GetParser() antlr.Parser { return s.parser } + +func (s *OverContext) GetWindowName() IIdentifierContext { return s.windowName } + +func (s *OverContext) SetWindowName(v IIdentifierContext) { s.windowName = v } + +func (s *OverContext) OVER_() antlr.TerminalNode { + return s.GetToken(TrinoParserOVER_, 0) +} + +func (s *OverContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *OverContext) WindowSpecification() IWindowSpecificationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IWindowSpecificationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IWindowSpecificationContext) +} + +func (s *OverContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *OverContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *OverContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *OverContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *OverContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterOver(s) + } +} + +func (s *OverContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitOver(s) + } +} + +func (s *OverContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitOver(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Over() (localctx IOverContext) { + localctx = NewOverContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 184, TrinoParserRULE_over) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2815) + p.Match(TrinoParserOVER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2821) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserABSENT_, TrinoParserADD_, TrinoParserADMIN_, TrinoParserAFTER_, TrinoParserALL_, TrinoParserANALYZE_, TrinoParserANY_, TrinoParserARRAY_, TrinoParserASC_, TrinoParserAT_, TrinoParserAUTHORIZATION_, TrinoParserBEGIN_, TrinoParserBERNOULLI_, TrinoParserBOTH_, TrinoParserCALL_, TrinoParserCALLED_, TrinoParserCASCADE_, TrinoParserCATALOG_, TrinoParserCATALOGS_, TrinoParserCOLUMN_, TrinoParserCOLUMNS_, TrinoParserCOMMENT_, TrinoParserCOMMIT_, TrinoParserCOMMITTED_, TrinoParserCONDITIONAL_, TrinoParserCOUNT_, TrinoParserCOPARTITION_, TrinoParserCURRENT_, TrinoParserDATA_, TrinoParserDATE_, TrinoParserDAY_, TrinoParserDECLARE_, TrinoParserDEFAULT_, TrinoParserDEFINE_, TrinoParserDEFINER_, TrinoParserDENY_, TrinoParserDESC_, TrinoParserDESCRIPTOR_, TrinoParserDETERMINISTIC_, TrinoParserDISTRIBUTED_, TrinoParserDO_, TrinoParserDOUBLE_, TrinoParserEMPTY_, TrinoParserELSEIF_, TrinoParserENCODING_, TrinoParserERROR_, TrinoParserEXCLUDING_, TrinoParserEXPLAIN_, TrinoParserFETCH_, TrinoParserFILTER_, TrinoParserFINAL_, TrinoParserFIRST_, TrinoParserFOLLOWING_, TrinoParserFORMAT_, TrinoParserFUNCTION_, TrinoParserFUNCTIONS_, TrinoParserGRACE_, TrinoParserGRANT_, TrinoParserGRANTED_, TrinoParserGRANTS_, TrinoParserGRAPHVIZ_, TrinoParserGROUPS_, TrinoParserHOUR_, TrinoParserIF_, TrinoParserIGNORE_, TrinoParserIMMEDIATE_, TrinoParserINCLUDING_, TrinoParserINITIAL_, TrinoParserINPUT_, TrinoParserINTERVAL_, TrinoParserINVOKER_, TrinoParserIO_, TrinoParserISOLATION_, TrinoParserITERATE_, TrinoParserJSON_, TrinoParserKEEP_, TrinoParserKEY_, TrinoParserKEYS_, TrinoParserLANGUAGE_, TrinoParserLAST_, TrinoParserLATERAL_, TrinoParserLEADING_, TrinoParserLEAVE_, TrinoParserLEVEL_, TrinoParserLIMIT_, TrinoParserLOCAL_, TrinoParserLOGICAL_, TrinoParserLOOP_, TrinoParserMAP_, TrinoParserMATCH_, TrinoParserMATCHED_, TrinoParserMATCHES_, TrinoParserMATCH_RECOGNIZE_, TrinoParserMATERIALIZED_, TrinoParserMEASURES_, TrinoParserMERGE_, TrinoParserMINUTE_, TrinoParserMONTH_, TrinoParserNESTED_, TrinoParserNEXT_, TrinoParserNFC_, TrinoParserNFD_, TrinoParserNFKC_, TrinoParserNFKD_, TrinoParserNO_, TrinoParserNONE_, TrinoParserNULLIF_, TrinoParserNULLS_, TrinoParserOBJECT_, TrinoParserOF_, TrinoParserOFFSET_, TrinoParserOMIT_, TrinoParserONE_, TrinoParserONLY_, TrinoParserOPTION_, TrinoParserORDINALITY_, TrinoParserOUTPUT_, TrinoParserOVER_, TrinoParserOVERFLOW_, TrinoParserPARTITION_, TrinoParserPARTITIONS_, TrinoParserPASSING_, TrinoParserPAST_, TrinoParserPATH_, TrinoParserPATTERN_, TrinoParserPER_, TrinoParserPERIOD_, TrinoParserPERMUTE_, TrinoParserPLAN_, TrinoParserPOSITION_, TrinoParserPRECEDING_, TrinoParserPRECISION_, TrinoParserPRIVILEGES_, TrinoParserPROPERTIES_, TrinoParserPRUNE_, TrinoParserQUOTES_, TrinoParserRANGE_, TrinoParserREAD_, TrinoParserREFRESH_, TrinoParserRENAME_, TrinoParserREPEAT_, TrinoParserREPEATABLE_, TrinoParserREPLACE_, TrinoParserRESET_, TrinoParserRESPECT_, TrinoParserRESTRICT_, TrinoParserRETURN_, TrinoParserRETURNING_, TrinoParserRETURNS_, TrinoParserREVOKE_, TrinoParserROLE_, TrinoParserROLES_, TrinoParserROLLBACK_, TrinoParserROW_, TrinoParserROWS_, TrinoParserRUNNING_, TrinoParserSCALAR_, TrinoParserSCHEMA_, TrinoParserSCHEMAS_, TrinoParserSECOND_, TrinoParserSECURITY_, TrinoParserSEEK_, TrinoParserSERIALIZABLE_, TrinoParserSESSION_, TrinoParserSET_, TrinoParserSETS_, TrinoParserSHOW_, TrinoParserSOME_, TrinoParserSTART_, TrinoParserSTATS_, TrinoParserSUBSET_, TrinoParserSUBSTRING_, TrinoParserSYSTEM_, TrinoParserTABLES_, TrinoParserTABLESAMPLE_, TrinoParserTEXT_, TrinoParserTEXT_STRING_, TrinoParserTIES_, TrinoParserTIME_, TrinoParserTIMESTAMP_, TrinoParserTO_, TrinoParserTRAILING_, TrinoParserTRANSACTION_, TrinoParserTRUNCATE_, TrinoParserTRY_CAST_, TrinoParserTYPE_, TrinoParserUNBOUNDED_, TrinoParserUNCOMMITTED_, TrinoParserUNCONDITIONAL_, TrinoParserUNIQUE_, TrinoParserUNKNOWN_, TrinoParserUNMATCHED_, TrinoParserUNTIL_, TrinoParserUPDATE_, TrinoParserUSE_, TrinoParserUSER_, TrinoParserUTF16_, TrinoParserUTF32_, TrinoParserUTF8_, TrinoParserVALIDATE_, TrinoParserVALUE_, TrinoParserVERBOSE_, TrinoParserVERSION_, TrinoParserVIEW_, TrinoParserWHILE_, TrinoParserWINDOW_, TrinoParserWITHIN_, TrinoParserWITHOUT_, TrinoParserWORK_, TrinoParserWRAPPER_, TrinoParserWRITE_, TrinoParserYEAR_, TrinoParserZONE_, TrinoParserIDENTIFIER_, TrinoParserDIGIT_IDENTIFIER_, TrinoParserQUOTED_IDENTIFIER_, TrinoParserBACKQUOTED_IDENTIFIER_: + { + p.SetState(2816) + + var _x = p.Identifier() + + localctx.(*OverContext).windowName = _x + } + + case TrinoParserLPAREN_: + { + p.SetState(2817) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2818) + p.WindowSpecification() + } + { + p.SetState(2819) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IWindowFrameContext is an interface to support dynamic dispatch. +type IWindowFrameContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + FrameExtent() IFrameExtentContext + MEASURES_() antlr.TerminalNode + AllMeasureDefinition() []IMeasureDefinitionContext + MeasureDefinition(i int) IMeasureDefinitionContext + AFTER_() antlr.TerminalNode + MATCH_() antlr.TerminalNode + SkipTo() ISkipToContext + PATTERN_() antlr.TerminalNode + LPAREN_() antlr.TerminalNode + RowPattern() IRowPatternContext + RPAREN_() antlr.TerminalNode + SUBSET_() antlr.TerminalNode + AllSubsetDefinition() []ISubsetDefinitionContext + SubsetDefinition(i int) ISubsetDefinitionContext + DEFINE_() antlr.TerminalNode + AllVariableDefinition() []IVariableDefinitionContext + VariableDefinition(i int) IVariableDefinitionContext + INITIAL_() antlr.TerminalNode + SEEK_() antlr.TerminalNode + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsWindowFrameContext differentiates from other interfaces. + IsWindowFrameContext() +} + +type WindowFrameContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyWindowFrameContext() *WindowFrameContext { + var p = new(WindowFrameContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_windowFrame + return p +} + +func InitEmptyWindowFrameContext(p *WindowFrameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_windowFrame +} + +func (*WindowFrameContext) IsWindowFrameContext() {} + +func NewWindowFrameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *WindowFrameContext { + var p = new(WindowFrameContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_windowFrame + + return p +} + +func (s *WindowFrameContext) GetParser() antlr.Parser { return s.parser } + +func (s *WindowFrameContext) FrameExtent() IFrameExtentContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFrameExtentContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFrameExtentContext) +} + +func (s *WindowFrameContext) MEASURES_() antlr.TerminalNode { + return s.GetToken(TrinoParserMEASURES_, 0) +} + +func (s *WindowFrameContext) AllMeasureDefinition() []IMeasureDefinitionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IMeasureDefinitionContext); ok { + len++ + } + } + + tst := make([]IMeasureDefinitionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IMeasureDefinitionContext); ok { + tst[i] = t.(IMeasureDefinitionContext) + i++ + } + } + + return tst +} + +func (s *WindowFrameContext) MeasureDefinition(i int) IMeasureDefinitionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IMeasureDefinitionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IMeasureDefinitionContext) +} + +func (s *WindowFrameContext) AFTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserAFTER_, 0) +} + +func (s *WindowFrameContext) MATCH_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCH_, 0) +} + +func (s *WindowFrameContext) SkipTo() ISkipToContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISkipToContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISkipToContext) +} + +func (s *WindowFrameContext) PATTERN_() antlr.TerminalNode { + return s.GetToken(TrinoParserPATTERN_, 0) +} + +func (s *WindowFrameContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *WindowFrameContext) RowPattern() IRowPatternContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *WindowFrameContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *WindowFrameContext) SUBSET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSUBSET_, 0) +} + +func (s *WindowFrameContext) AllSubsetDefinition() []ISubsetDefinitionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ISubsetDefinitionContext); ok { + len++ + } + } + + tst := make([]ISubsetDefinitionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ISubsetDefinitionContext); ok { + tst[i] = t.(ISubsetDefinitionContext) + i++ + } + } + + return tst +} + +func (s *WindowFrameContext) SubsetDefinition(i int) ISubsetDefinitionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISubsetDefinitionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ISubsetDefinitionContext) +} + +func (s *WindowFrameContext) DEFINE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFINE_, 0) +} + +func (s *WindowFrameContext) AllVariableDefinition() []IVariableDefinitionContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IVariableDefinitionContext); ok { + len++ + } + } + + tst := make([]IVariableDefinitionContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IVariableDefinitionContext); ok { + tst[i] = t.(IVariableDefinitionContext) + i++ + } + } + + return tst +} + +func (s *WindowFrameContext) VariableDefinition(i int) IVariableDefinitionContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IVariableDefinitionContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IVariableDefinitionContext) +} + +func (s *WindowFrameContext) INITIAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserINITIAL_, 0) +} + +func (s *WindowFrameContext) SEEK_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEEK_, 0) +} + +func (s *WindowFrameContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *WindowFrameContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *WindowFrameContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *WindowFrameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *WindowFrameContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterWindowFrame(s) + } +} + +func (s *WindowFrameContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitWindowFrame(s) + } +} + +func (s *WindowFrameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitWindowFrame(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) WindowFrame() (localctx IWindowFrameContext) { + localctx = NewWindowFrameContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 186, TrinoParserRULE_windowFrame) + var _la int + + p.EnterOuterAlt(localctx, 1) + p.SetState(2832) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserMEASURES_ { + { + p.SetState(2823) + p.Match(TrinoParserMEASURES_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2824) + p.MeasureDefinition() + } + p.SetState(2829) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2825) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2826) + p.MeasureDefinition() + } + + p.SetState(2831) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(2834) + p.FrameExtent() + } + p.SetState(2838) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserAFTER_ { + { + p.SetState(2835) + p.Match(TrinoParserAFTER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2836) + p.Match(TrinoParserMATCH_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2837) + p.SkipTo() + } + + } + p.SetState(2841) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserINITIAL_ || _la == TrinoParserSEEK_ { + { + p.SetState(2840) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserINITIAL_ || _la == TrinoParserSEEK_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + p.SetState(2848) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserPATTERN_ { + { + p.SetState(2843) + p.Match(TrinoParserPATTERN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2844) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2845) + p.rowPattern(0) + } + { + p.SetState(2846) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + p.SetState(2859) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserSUBSET_ { + { + p.SetState(2850) + p.Match(TrinoParserSUBSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2851) + p.SubsetDefinition() + } + p.SetState(2856) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2852) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2853) + p.SubsetDefinition() + } + + p.SetState(2858) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(2870) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserDEFINE_ { + { + p.SetState(2861) + p.Match(TrinoParserDEFINE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2862) + p.VariableDefinition() + } + p.SetState(2867) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2863) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2864) + p.VariableDefinition() + } + + p.SetState(2869) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IFrameExtentContext is an interface to support dynamic dispatch. +type IFrameExtentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetFrameType returns the frameType token. + GetFrameType() antlr.Token + + // SetFrameType sets the frameType token. + SetFrameType(antlr.Token) + + // GetStart_ returns the start_ rule contexts. + GetStart_() IFrameBoundContext + + // GetEnd_ returns the end_ rule contexts. + GetEnd_() IFrameBoundContext + + // SetStart_ sets the start_ rule contexts. + SetStart_(IFrameBoundContext) + + // SetEnd_ sets the end_ rule contexts. + SetEnd_(IFrameBoundContext) + + // Getter signatures + RANGE_() antlr.TerminalNode + AllFrameBound() []IFrameBoundContext + FrameBound(i int) IFrameBoundContext + ROWS_() antlr.TerminalNode + GROUPS_() antlr.TerminalNode + BETWEEN_() antlr.TerminalNode + AND_() antlr.TerminalNode + + // IsFrameExtentContext differentiates from other interfaces. + IsFrameExtentContext() +} + +type FrameExtentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + frameType antlr.Token + start_ IFrameBoundContext + end_ IFrameBoundContext +} + +func NewEmptyFrameExtentContext() *FrameExtentContext { + var p = new(FrameExtentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_frameExtent + return p +} + +func InitEmptyFrameExtentContext(p *FrameExtentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_frameExtent +} + +func (*FrameExtentContext) IsFrameExtentContext() {} + +func NewFrameExtentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FrameExtentContext { + var p = new(FrameExtentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_frameExtent + + return p +} + +func (s *FrameExtentContext) GetParser() antlr.Parser { return s.parser } + +func (s *FrameExtentContext) GetFrameType() antlr.Token { return s.frameType } + +func (s *FrameExtentContext) SetFrameType(v antlr.Token) { s.frameType = v } + +func (s *FrameExtentContext) GetStart_() IFrameBoundContext { return s.start_ } + +func (s *FrameExtentContext) GetEnd_() IFrameBoundContext { return s.end_ } + +func (s *FrameExtentContext) SetStart_(v IFrameBoundContext) { s.start_ = v } + +func (s *FrameExtentContext) SetEnd_(v IFrameBoundContext) { s.end_ = v } + +func (s *FrameExtentContext) RANGE_() antlr.TerminalNode { + return s.GetToken(TrinoParserRANGE_, 0) +} + +func (s *FrameExtentContext) AllFrameBound() []IFrameBoundContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IFrameBoundContext); ok { + len++ + } + } + + tst := make([]IFrameBoundContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IFrameBoundContext); ok { + tst[i] = t.(IFrameBoundContext) + i++ + } + } + + return tst +} + +func (s *FrameExtentContext) FrameBound(i int) IFrameBoundContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFrameBoundContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IFrameBoundContext) +} + +func (s *FrameExtentContext) ROWS_() antlr.TerminalNode { + return s.GetToken(TrinoParserROWS_, 0) +} + +func (s *FrameExtentContext) GROUPS_() antlr.TerminalNode { + return s.GetToken(TrinoParserGROUPS_, 0) +} + +func (s *FrameExtentContext) BETWEEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserBETWEEN_, 0) +} + +func (s *FrameExtentContext) AND_() antlr.TerminalNode { + return s.GetToken(TrinoParserAND_, 0) +} + +func (s *FrameExtentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *FrameExtentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *FrameExtentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterFrameExtent(s) + } +} + +func (s *FrameExtentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitFrameExtent(s) + } +} + +func (s *FrameExtentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitFrameExtent(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) FrameExtent() (localctx IFrameExtentContext) { + localctx = NewFrameExtentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 188, TrinoParserRULE_frameExtent) + p.SetState(2896) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 382, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2872) + + var _m = p.Match(TrinoParserRANGE_) + + localctx.(*FrameExtentContext).frameType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2873) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).start_ = _x + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2874) + + var _m = p.Match(TrinoParserROWS_) + + localctx.(*FrameExtentContext).frameType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2875) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).start_ = _x + } + + case 3: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(2876) + + var _m = p.Match(TrinoParserGROUPS_) + + localctx.(*FrameExtentContext).frameType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2877) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).start_ = _x + } + + case 4: + p.EnterOuterAlt(localctx, 4) + { + p.SetState(2878) + + var _m = p.Match(TrinoParserRANGE_) + + localctx.(*FrameExtentContext).frameType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2879) + p.Match(TrinoParserBETWEEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2880) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).start_ = _x + } + { + p.SetState(2881) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2882) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).end_ = _x + } + + case 5: + p.EnterOuterAlt(localctx, 5) + { + p.SetState(2884) + + var _m = p.Match(TrinoParserROWS_) + + localctx.(*FrameExtentContext).frameType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2885) + p.Match(TrinoParserBETWEEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2886) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).start_ = _x + } + { + p.SetState(2887) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2888) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).end_ = _x + } + + case 6: + p.EnterOuterAlt(localctx, 6) + { + p.SetState(2890) + + var _m = p.Match(TrinoParserGROUPS_) + + localctx.(*FrameExtentContext).frameType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2891) + p.Match(TrinoParserBETWEEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2892) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).start_ = _x + } + { + p.SetState(2893) + p.Match(TrinoParserAND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2894) + + var _x = p.FrameBound() + + localctx.(*FrameExtentContext).end_ = _x + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IFrameBoundContext is an interface to support dynamic dispatch. +type IFrameBoundContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsFrameBoundContext differentiates from other interfaces. + IsFrameBoundContext() +} + +type FrameBoundContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyFrameBoundContext() *FrameBoundContext { + var p = new(FrameBoundContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_frameBound + return p +} + +func InitEmptyFrameBoundContext(p *FrameBoundContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_frameBound +} + +func (*FrameBoundContext) IsFrameBoundContext() {} + +func NewFrameBoundContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FrameBoundContext { + var p = new(FrameBoundContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_frameBound + + return p +} + +func (s *FrameBoundContext) GetParser() antlr.Parser { return s.parser } + +func (s *FrameBoundContext) CopyAll(ctx *FrameBoundContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *FrameBoundContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *FrameBoundContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type BoundedFrameContext struct { + FrameBoundContext + boundType antlr.Token +} + +func NewBoundedFrameContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BoundedFrameContext { + var p = new(BoundedFrameContext) + + InitEmptyFrameBoundContext(&p.FrameBoundContext) + p.parser = parser + p.CopyAll(ctx.(*FrameBoundContext)) + + return p +} + +func (s *BoundedFrameContext) GetBoundType() antlr.Token { return s.boundType } + +func (s *BoundedFrameContext) SetBoundType(v antlr.Token) { s.boundType = v } + +func (s *BoundedFrameContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BoundedFrameContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *BoundedFrameContext) PRECEDING_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRECEDING_, 0) +} + +func (s *BoundedFrameContext) FOLLOWING_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOLLOWING_, 0) +} + +func (s *BoundedFrameContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterBoundedFrame(s) + } +} + +func (s *BoundedFrameContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitBoundedFrame(s) + } +} + +func (s *BoundedFrameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitBoundedFrame(s) + + default: + return t.VisitChildren(s) + } +} + +type UnboundedFrameContext struct { + FrameBoundContext + boundType antlr.Token +} + +func NewUnboundedFrameContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnboundedFrameContext { + var p = new(UnboundedFrameContext) + + InitEmptyFrameBoundContext(&p.FrameBoundContext) + p.parser = parser + p.CopyAll(ctx.(*FrameBoundContext)) + + return p +} + +func (s *UnboundedFrameContext) GetBoundType() antlr.Token { return s.boundType } + +func (s *UnboundedFrameContext) SetBoundType(v antlr.Token) { s.boundType = v } + +func (s *UnboundedFrameContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UnboundedFrameContext) UNBOUNDED_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNBOUNDED_, 0) +} + +func (s *UnboundedFrameContext) PRECEDING_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRECEDING_, 0) +} + +func (s *UnboundedFrameContext) FOLLOWING_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOLLOWING_, 0) +} + +func (s *UnboundedFrameContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUnboundedFrame(s) + } +} + +func (s *UnboundedFrameContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUnboundedFrame(s) + } +} + +func (s *UnboundedFrameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUnboundedFrame(s) + + default: + return t.VisitChildren(s) + } +} + +type CurrentRowBoundContext struct { + FrameBoundContext +} + +func NewCurrentRowBoundContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CurrentRowBoundContext { + var p = new(CurrentRowBoundContext) + + InitEmptyFrameBoundContext(&p.FrameBoundContext) + p.parser = parser + p.CopyAll(ctx.(*FrameBoundContext)) + + return p +} + +func (s *CurrentRowBoundContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CurrentRowBoundContext) CURRENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_, 0) +} + +func (s *CurrentRowBoundContext) ROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserROW_, 0) +} + +func (s *CurrentRowBoundContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCurrentRowBound(s) + } +} + +func (s *CurrentRowBoundContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCurrentRowBound(s) + } +} + +func (s *CurrentRowBoundContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCurrentRowBound(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) FrameBound() (localctx IFrameBoundContext) { + localctx = NewFrameBoundContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 190, TrinoParserRULE_frameBound) + var _la int + + p.SetState(2907) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 383, p.GetParserRuleContext()) { + case 1: + localctx = NewUnboundedFrameContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2898) + p.Match(TrinoParserUNBOUNDED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2899) + + var _m = p.Match(TrinoParserPRECEDING_) + + localctx.(*UnboundedFrameContext).boundType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + localctx = NewUnboundedFrameContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2900) + p.Match(TrinoParserUNBOUNDED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2901) + + var _m = p.Match(TrinoParserFOLLOWING_) + + localctx.(*UnboundedFrameContext).boundType = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewCurrentRowBoundContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(2902) + p.Match(TrinoParserCURRENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2903) + p.Match(TrinoParserROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 4: + localctx = NewBoundedFrameContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(2904) + p.Expression() + } + { + p.SetState(2905) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*BoundedFrameContext).boundType = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserFOLLOWING_ || _la == TrinoParserPRECEDING_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*BoundedFrameContext).boundType = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRowPatternContext is an interface to support dynamic dispatch. +type IRowPatternContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsRowPatternContext differentiates from other interfaces. + IsRowPatternContext() +} + +type RowPatternContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRowPatternContext() *RowPatternContext { + var p = new(RowPatternContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowPattern + return p +} + +func InitEmptyRowPatternContext(p *RowPatternContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rowPattern +} + +func (*RowPatternContext) IsRowPatternContext() {} + +func NewRowPatternContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RowPatternContext { + var p = new(RowPatternContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_rowPattern + + return p +} + +func (s *RowPatternContext) GetParser() antlr.Parser { return s.parser } + +func (s *RowPatternContext) CopyAll(ctx *RowPatternContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *RowPatternContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RowPatternContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type QuantifiedPrimaryContext struct { + RowPatternContext +} + +func NewQuantifiedPrimaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *QuantifiedPrimaryContext { + var p = new(QuantifiedPrimaryContext) + + InitEmptyRowPatternContext(&p.RowPatternContext) + p.parser = parser + p.CopyAll(ctx.(*RowPatternContext)) + + return p +} + +func (s *QuantifiedPrimaryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QuantifiedPrimaryContext) PatternPrimary() IPatternPrimaryContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPatternPrimaryContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPatternPrimaryContext) +} + +func (s *QuantifiedPrimaryContext) PatternQuantifier() IPatternQuantifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPatternQuantifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPatternQuantifierContext) +} + +func (s *QuantifiedPrimaryContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQuantifiedPrimary(s) + } +} + +func (s *QuantifiedPrimaryContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQuantifiedPrimary(s) + } +} + +func (s *QuantifiedPrimaryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQuantifiedPrimary(s) + + default: + return t.VisitChildren(s) + } +} + +type PatternConcatenationContext struct { + RowPatternContext +} + +func NewPatternConcatenationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PatternConcatenationContext { + var p = new(PatternConcatenationContext) + + InitEmptyRowPatternContext(&p.RowPatternContext) + p.parser = parser + p.CopyAll(ctx.(*RowPatternContext)) + + return p +} + +func (s *PatternConcatenationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PatternConcatenationContext) AllRowPattern() []IRowPatternContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRowPatternContext); ok { + len++ + } + } + + tst := make([]IRowPatternContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRowPatternContext); ok { + tst[i] = t.(IRowPatternContext) + i++ + } + } + + return tst +} + +func (s *PatternConcatenationContext) RowPattern(i int) IRowPatternContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *PatternConcatenationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPatternConcatenation(s) + } +} + +func (s *PatternConcatenationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPatternConcatenation(s) + } +} + +func (s *PatternConcatenationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPatternConcatenation(s) + + default: + return t.VisitChildren(s) + } +} + +type PatternAlternationContext struct { + RowPatternContext +} + +func NewPatternAlternationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PatternAlternationContext { + var p = new(PatternAlternationContext) + + InitEmptyRowPatternContext(&p.RowPatternContext) + p.parser = parser + p.CopyAll(ctx.(*RowPatternContext)) + + return p +} + +func (s *PatternAlternationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PatternAlternationContext) AllRowPattern() []IRowPatternContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRowPatternContext); ok { + len++ + } + } + + tst := make([]IRowPatternContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRowPatternContext); ok { + tst[i] = t.(IRowPatternContext) + i++ + } + } + + return tst +} + +func (s *PatternAlternationContext) RowPattern(i int) IRowPatternContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *PatternAlternationContext) VBAR_() antlr.TerminalNode { + return s.GetToken(TrinoParserVBAR_, 0) +} + +func (s *PatternAlternationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPatternAlternation(s) + } +} + +func (s *PatternAlternationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPatternAlternation(s) + } +} + +func (s *PatternAlternationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPatternAlternation(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RowPattern() (localctx IRowPatternContext) { + return p.rowPattern(0) +} + +func (p *TrinoParser) rowPattern(_p int) (localctx IRowPatternContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewRowPatternContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IRowPatternContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 192 + p.EnterRecursionRule(localctx, 192, TrinoParserRULE_rowPattern, _p) + var _alt int + + p.EnterOuterAlt(localctx, 1) + localctx = NewQuantifiedPrimaryContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + + { + p.SetState(2910) + p.PatternPrimary() + } + p.SetState(2912) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 384, p.GetParserRuleContext()) == 1 { + { + p.SetState(2911) + p.PatternQuantifier() + } + + } else if p.HasError() { // JIM + goto errorExit + } + + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(2921) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 386, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + p.SetState(2919) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 385, p.GetParserRuleContext()) { + case 1: + localctx = NewPatternConcatenationContext(p, NewRowPatternContext(p, _parentctx, _parentState)) + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_rowPattern) + p.SetState(2914) + + if !(p.Precpred(p.GetParserRuleContext(), 2)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit + } + { + p.SetState(2915) + p.rowPattern(3) + } + + case 2: + localctx = NewPatternAlternationContext(p, NewRowPatternContext(p, _parentctx, _parentState)) + p.PushNewRecursionContext(localctx, _startState, TrinoParserRULE_rowPattern) + p.SetState(2916) + + if !(p.Precpred(p.GetParserRuleContext(), 1)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + goto errorExit + } + { + p.SetState(2917) + p.Match(TrinoParserVBAR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2918) + p.rowPattern(2) + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + } + p.SetState(2923) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 386, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.UnrollRecursionContexts(_parentctx) + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPatternPrimaryContext is an interface to support dynamic dispatch. +type IPatternPrimaryContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsPatternPrimaryContext differentiates from other interfaces. + IsPatternPrimaryContext() +} + +type PatternPrimaryContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPatternPrimaryContext() *PatternPrimaryContext { + var p = new(PatternPrimaryContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_patternPrimary + return p +} + +func InitEmptyPatternPrimaryContext(p *PatternPrimaryContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_patternPrimary +} + +func (*PatternPrimaryContext) IsPatternPrimaryContext() {} + +func NewPatternPrimaryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PatternPrimaryContext { + var p = new(PatternPrimaryContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_patternPrimary + + return p +} + +func (s *PatternPrimaryContext) GetParser() antlr.Parser { return s.parser } + +func (s *PatternPrimaryContext) CopyAll(ctx *PatternPrimaryContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *PatternPrimaryContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PatternPrimaryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type PatternPermutationContext struct { + PatternPrimaryContext +} + +func NewPatternPermutationContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PatternPermutationContext { + var p = new(PatternPermutationContext) + + InitEmptyPatternPrimaryContext(&p.PatternPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*PatternPrimaryContext)) + + return p +} + +func (s *PatternPermutationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PatternPermutationContext) PERMUTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserPERMUTE_, 0) +} + +func (s *PatternPermutationContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *PatternPermutationContext) AllRowPattern() []IRowPatternContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRowPatternContext); ok { + len++ + } + } + + tst := make([]IRowPatternContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRowPatternContext); ok { + tst[i] = t.(IRowPatternContext) + i++ + } + } + + return tst +} + +func (s *PatternPermutationContext) RowPattern(i int) IRowPatternContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *PatternPermutationContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *PatternPermutationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *PatternPermutationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *PatternPermutationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPatternPermutation(s) + } +} + +func (s *PatternPermutationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPatternPermutation(s) + } +} + +func (s *PatternPermutationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPatternPermutation(s) + + default: + return t.VisitChildren(s) + } +} + +type PartitionEndAnchorContext struct { + PatternPrimaryContext +} + +func NewPartitionEndAnchorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PartitionEndAnchorContext { + var p = new(PartitionEndAnchorContext) + + InitEmptyPatternPrimaryContext(&p.PatternPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*PatternPrimaryContext)) + + return p +} + +func (s *PartitionEndAnchorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PartitionEndAnchorContext) DOLLAR_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOLLAR_, 0) +} + +func (s *PartitionEndAnchorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPartitionEndAnchor(s) + } +} + +func (s *PartitionEndAnchorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPartitionEndAnchor(s) + } +} + +func (s *PartitionEndAnchorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPartitionEndAnchor(s) + + default: + return t.VisitChildren(s) + } +} + +type PatternVariableContext struct { + PatternPrimaryContext +} + +func NewPatternVariableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PatternVariableContext { + var p = new(PatternVariableContext) + + InitEmptyPatternPrimaryContext(&p.PatternPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*PatternPrimaryContext)) + + return p +} + +func (s *PatternVariableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PatternVariableContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *PatternVariableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPatternVariable(s) + } +} + +func (s *PatternVariableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPatternVariable(s) + } +} + +func (s *PatternVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPatternVariable(s) + + default: + return t.VisitChildren(s) + } +} + +type ExcludedPatternContext struct { + PatternPrimaryContext +} + +func NewExcludedPatternContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExcludedPatternContext { + var p = new(ExcludedPatternContext) + + InitEmptyPatternPrimaryContext(&p.PatternPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*PatternPrimaryContext)) + + return p +} + +func (s *ExcludedPatternContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExcludedPatternContext) LCURLYHYPHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLCURLYHYPHEN_, 0) +} + +func (s *ExcludedPatternContext) RowPattern() IRowPatternContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *ExcludedPatternContext) RCURLYHYPHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRCURLYHYPHEN_, 0) +} + +func (s *ExcludedPatternContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExcludedPattern(s) + } +} + +func (s *ExcludedPatternContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExcludedPattern(s) + } +} + +func (s *ExcludedPatternContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExcludedPattern(s) + + default: + return t.VisitChildren(s) + } +} + +type PartitionStartAnchorContext struct { + PatternPrimaryContext +} + +func NewPartitionStartAnchorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PartitionStartAnchorContext { + var p = new(PartitionStartAnchorContext) + + InitEmptyPatternPrimaryContext(&p.PatternPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*PatternPrimaryContext)) + + return p +} + +func (s *PartitionStartAnchorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PartitionStartAnchorContext) CARET_() antlr.TerminalNode { + return s.GetToken(TrinoParserCARET_, 0) +} + +func (s *PartitionStartAnchorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPartitionStartAnchor(s) + } +} + +func (s *PartitionStartAnchorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPartitionStartAnchor(s) + } +} + +func (s *PartitionStartAnchorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPartitionStartAnchor(s) + + default: + return t.VisitChildren(s) + } +} + +type EmptyPatternContext struct { + PatternPrimaryContext +} + +func NewEmptyPatternContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *EmptyPatternContext { + var p = new(EmptyPatternContext) + + InitEmptyPatternPrimaryContext(&p.PatternPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*PatternPrimaryContext)) + + return p +} + +func (s *EmptyPatternContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *EmptyPatternContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *EmptyPatternContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *EmptyPatternContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterEmptyPattern(s) + } +} + +func (s *EmptyPatternContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitEmptyPattern(s) + } +} + +func (s *EmptyPatternContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitEmptyPattern(s) + + default: + return t.VisitChildren(s) + } +} + +type GroupedPatternContext struct { + PatternPrimaryContext +} + +func NewGroupedPatternContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *GroupedPatternContext { + var p = new(GroupedPatternContext) + + InitEmptyPatternPrimaryContext(&p.PatternPrimaryContext) + p.parser = parser + p.CopyAll(ctx.(*PatternPrimaryContext)) + + return p +} + +func (s *GroupedPatternContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GroupedPatternContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *GroupedPatternContext) RowPattern() IRowPatternContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRowPatternContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRowPatternContext) +} + +func (s *GroupedPatternContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *GroupedPatternContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterGroupedPattern(s) + } +} + +func (s *GroupedPatternContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitGroupedPattern(s) + } +} + +func (s *GroupedPatternContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitGroupedPattern(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PatternPrimary() (localctx IPatternPrimaryContext) { + localctx = NewPatternPrimaryContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 194, TrinoParserRULE_patternPrimary) + var _la int + + p.SetState(2949) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 388, p.GetParserRuleContext()) { + case 1: + localctx = NewPatternVariableContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2924) + p.Identifier() + } + + case 2: + localctx = NewEmptyPatternContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2925) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2926) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewPatternPermutationContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(2927) + p.Match(TrinoParserPERMUTE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2928) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2929) + p.rowPattern(0) + } + p.SetState(2934) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(2930) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2931) + p.rowPattern(0) + } + + p.SetState(2936) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(2937) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 4: + localctx = NewGroupedPatternContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(2939) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2940) + p.rowPattern(0) + } + { + p.SetState(2941) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 5: + localctx = NewPartitionStartAnchorContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(2943) + p.Match(TrinoParserCARET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 6: + localctx = NewPartitionEndAnchorContext(p, localctx) + p.EnterOuterAlt(localctx, 6) + { + p.SetState(2944) + p.Match(TrinoParserDOLLAR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 7: + localctx = NewExcludedPatternContext(p, localctx) + p.EnterOuterAlt(localctx, 7) + { + p.SetState(2945) + p.Match(TrinoParserLCURLYHYPHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2946) + p.rowPattern(0) + } + { + p.SetState(2947) + p.Match(TrinoParserRCURLYHYPHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPatternQuantifierContext is an interface to support dynamic dispatch. +type IPatternQuantifierContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsPatternQuantifierContext differentiates from other interfaces. + IsPatternQuantifierContext() +} + +type PatternQuantifierContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPatternQuantifierContext() *PatternQuantifierContext { + var p = new(PatternQuantifierContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_patternQuantifier + return p +} + +func InitEmptyPatternQuantifierContext(p *PatternQuantifierContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_patternQuantifier +} + +func (*PatternQuantifierContext) IsPatternQuantifierContext() {} + +func NewPatternQuantifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PatternQuantifierContext { + var p = new(PatternQuantifierContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_patternQuantifier + + return p +} + +func (s *PatternQuantifierContext) GetParser() antlr.Parser { return s.parser } + +func (s *PatternQuantifierContext) CopyAll(ctx *PatternQuantifierContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *PatternQuantifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PatternQuantifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type ZeroOrMoreQuantifierContext struct { + PatternQuantifierContext + reluctant antlr.Token +} + +func NewZeroOrMoreQuantifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ZeroOrMoreQuantifierContext { + var p = new(ZeroOrMoreQuantifierContext) + + InitEmptyPatternQuantifierContext(&p.PatternQuantifierContext) + p.parser = parser + p.CopyAll(ctx.(*PatternQuantifierContext)) + + return p +} + +func (s *ZeroOrMoreQuantifierContext) GetReluctant() antlr.Token { return s.reluctant } + +func (s *ZeroOrMoreQuantifierContext) SetReluctant(v antlr.Token) { s.reluctant = v } + +func (s *ZeroOrMoreQuantifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ZeroOrMoreQuantifierContext) ASTERISK_() antlr.TerminalNode { + return s.GetToken(TrinoParserASTERISK_, 0) +} + +func (s *ZeroOrMoreQuantifierContext) QUESTION_MARK_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUESTION_MARK_, 0) +} + +func (s *ZeroOrMoreQuantifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterZeroOrMoreQuantifier(s) + } +} + +func (s *ZeroOrMoreQuantifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitZeroOrMoreQuantifier(s) + } +} + +func (s *ZeroOrMoreQuantifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitZeroOrMoreQuantifier(s) + + default: + return t.VisitChildren(s) + } +} + +type OneOrMoreQuantifierContext struct { + PatternQuantifierContext + reluctant antlr.Token +} + +func NewOneOrMoreQuantifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *OneOrMoreQuantifierContext { + var p = new(OneOrMoreQuantifierContext) + + InitEmptyPatternQuantifierContext(&p.PatternQuantifierContext) + p.parser = parser + p.CopyAll(ctx.(*PatternQuantifierContext)) + + return p +} + +func (s *OneOrMoreQuantifierContext) GetReluctant() antlr.Token { return s.reluctant } + +func (s *OneOrMoreQuantifierContext) SetReluctant(v antlr.Token) { s.reluctant = v } + +func (s *OneOrMoreQuantifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *OneOrMoreQuantifierContext) PLUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserPLUS_, 0) +} + +func (s *OneOrMoreQuantifierContext) QUESTION_MARK_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUESTION_MARK_, 0) +} + +func (s *OneOrMoreQuantifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterOneOrMoreQuantifier(s) + } +} + +func (s *OneOrMoreQuantifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitOneOrMoreQuantifier(s) + } +} + +func (s *OneOrMoreQuantifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitOneOrMoreQuantifier(s) + + default: + return t.VisitChildren(s) + } +} + +type ZeroOrOneQuantifierContext struct { + PatternQuantifierContext + reluctant antlr.Token +} + +func NewZeroOrOneQuantifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ZeroOrOneQuantifierContext { + var p = new(ZeroOrOneQuantifierContext) + + InitEmptyPatternQuantifierContext(&p.PatternQuantifierContext) + p.parser = parser + p.CopyAll(ctx.(*PatternQuantifierContext)) + + return p +} + +func (s *ZeroOrOneQuantifierContext) GetReluctant() antlr.Token { return s.reluctant } + +func (s *ZeroOrOneQuantifierContext) SetReluctant(v antlr.Token) { s.reluctant = v } + +func (s *ZeroOrOneQuantifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ZeroOrOneQuantifierContext) AllQUESTION_MARK_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserQUESTION_MARK_) +} + +func (s *ZeroOrOneQuantifierContext) QUESTION_MARK_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserQUESTION_MARK_, i) +} + +func (s *ZeroOrOneQuantifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterZeroOrOneQuantifier(s) + } +} + +func (s *ZeroOrOneQuantifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitZeroOrOneQuantifier(s) + } +} + +func (s *ZeroOrOneQuantifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitZeroOrOneQuantifier(s) + + default: + return t.VisitChildren(s) + } +} + +type RangeQuantifierContext struct { + PatternQuantifierContext + exactly antlr.Token + reluctant antlr.Token + atLeast antlr.Token + atMost antlr.Token +} + +func NewRangeQuantifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RangeQuantifierContext { + var p = new(RangeQuantifierContext) + + InitEmptyPatternQuantifierContext(&p.PatternQuantifierContext) + p.parser = parser + p.CopyAll(ctx.(*PatternQuantifierContext)) + + return p +} + +func (s *RangeQuantifierContext) GetExactly() antlr.Token { return s.exactly } + +func (s *RangeQuantifierContext) GetReluctant() antlr.Token { return s.reluctant } + +func (s *RangeQuantifierContext) GetAtLeast() antlr.Token { return s.atLeast } + +func (s *RangeQuantifierContext) GetAtMost() antlr.Token { return s.atMost } + +func (s *RangeQuantifierContext) SetExactly(v antlr.Token) { s.exactly = v } + +func (s *RangeQuantifierContext) SetReluctant(v antlr.Token) { s.reluctant = v } + +func (s *RangeQuantifierContext) SetAtLeast(v antlr.Token) { s.atLeast = v } + +func (s *RangeQuantifierContext) SetAtMost(v antlr.Token) { s.atMost = v } + +func (s *RangeQuantifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RangeQuantifierContext) LCURLY_() antlr.TerminalNode { + return s.GetToken(TrinoParserLCURLY_, 0) +} + +func (s *RangeQuantifierContext) RCURLY_() antlr.TerminalNode { + return s.GetToken(TrinoParserRCURLY_, 0) +} + +func (s *RangeQuantifierContext) AllINTEGER_VALUE_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserINTEGER_VALUE_) +} + +func (s *RangeQuantifierContext) INTEGER_VALUE_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserINTEGER_VALUE_, i) +} + +func (s *RangeQuantifierContext) QUESTION_MARK_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUESTION_MARK_, 0) +} + +func (s *RangeQuantifierContext) COMMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, 0) +} + +func (s *RangeQuantifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRangeQuantifier(s) + } +} + +func (s *RangeQuantifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRangeQuantifier(s) + } +} + +func (s *RangeQuantifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRangeQuantifier(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PatternQuantifier() (localctx IPatternQuantifierContext) { + localctx = NewPatternQuantifierContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 196, TrinoParserRULE_patternQuantifier) + var _la int + + p.SetState(2981) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 396, p.GetParserRuleContext()) { + case 1: + localctx = NewZeroOrMoreQuantifierContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2951) + p.Match(TrinoParserASTERISK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2953) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 389, p.GetParserRuleContext()) == 1 { + { + p.SetState(2952) + + var _m = p.Match(TrinoParserQUESTION_MARK_) + + localctx.(*ZeroOrMoreQuantifierContext).reluctant = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 2: + localctx = NewOneOrMoreQuantifierContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2955) + p.Match(TrinoParserPLUS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2957) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 390, p.GetParserRuleContext()) == 1 { + { + p.SetState(2956) + + var _m = p.Match(TrinoParserQUESTION_MARK_) + + localctx.(*OneOrMoreQuantifierContext).reluctant = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 3: + localctx = NewZeroOrOneQuantifierContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(2959) + p.Match(TrinoParserQUESTION_MARK_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2961) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 391, p.GetParserRuleContext()) == 1 { + { + p.SetState(2960) + + var _m = p.Match(TrinoParserQUESTION_MARK_) + + localctx.(*ZeroOrOneQuantifierContext).reluctant = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 4: + localctx = NewRangeQuantifierContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(2963) + p.Match(TrinoParserLCURLY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2964) + + var _m = p.Match(TrinoParserINTEGER_VALUE_) + + localctx.(*RangeQuantifierContext).exactly = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2965) + p.Match(TrinoParserRCURLY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2967) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 392, p.GetParserRuleContext()) == 1 { + { + p.SetState(2966) + + var _m = p.Match(TrinoParserQUESTION_MARK_) + + localctx.(*RangeQuantifierContext).reluctant = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case 5: + localctx = NewRangeQuantifierContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(2969) + p.Match(TrinoParserLCURLY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2971) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserINTEGER_VALUE_ { + { + p.SetState(2970) + + var _m = p.Match(TrinoParserINTEGER_VALUE_) + + localctx.(*RangeQuantifierContext).atLeast = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2973) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2975) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserINTEGER_VALUE_ { + { + p.SetState(2974) + + var _m = p.Match(TrinoParserINTEGER_VALUE_) + + localctx.(*RangeQuantifierContext).atMost = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(2977) + p.Match(TrinoParserRCURLY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(2979) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 395, p.GetParserRuleContext()) == 1 { + { + p.SetState(2978) + + var _m = p.Match(TrinoParserQUESTION_MARK_) + + localctx.(*RangeQuantifierContext).reluctant = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IUpdateAssignmentContext is an interface to support dynamic dispatch. +type IUpdateAssignmentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Identifier() IIdentifierContext + EQ_() antlr.TerminalNode + Expression() IExpressionContext + + // IsUpdateAssignmentContext differentiates from other interfaces. + IsUpdateAssignmentContext() +} + +type UpdateAssignmentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyUpdateAssignmentContext() *UpdateAssignmentContext { + var p = new(UpdateAssignmentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_updateAssignment + return p +} + +func InitEmptyUpdateAssignmentContext(p *UpdateAssignmentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_updateAssignment +} + +func (*UpdateAssignmentContext) IsUpdateAssignmentContext() {} + +func NewUpdateAssignmentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UpdateAssignmentContext { + var p = new(UpdateAssignmentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_updateAssignment + + return p +} + +func (s *UpdateAssignmentContext) GetParser() antlr.Parser { return s.parser } + +func (s *UpdateAssignmentContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *UpdateAssignmentContext) EQ_() antlr.TerminalNode { + return s.GetToken(TrinoParserEQ_, 0) +} + +func (s *UpdateAssignmentContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *UpdateAssignmentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UpdateAssignmentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *UpdateAssignmentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUpdateAssignment(s) + } +} + +func (s *UpdateAssignmentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUpdateAssignment(s) + } +} + +func (s *UpdateAssignmentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUpdateAssignment(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) UpdateAssignment() (localctx IUpdateAssignmentContext) { + localctx = NewUpdateAssignmentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 198, TrinoParserRULE_updateAssignment) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2983) + p.Identifier() + } + { + p.SetState(2984) + p.Match(TrinoParserEQ_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2985) + p.Expression() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IExplainOptionContext is an interface to support dynamic dispatch. +type IExplainOptionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsExplainOptionContext differentiates from other interfaces. + IsExplainOptionContext() +} + +type ExplainOptionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyExplainOptionContext() *ExplainOptionContext { + var p = new(ExplainOptionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_explainOption + return p +} + +func InitEmptyExplainOptionContext(p *ExplainOptionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_explainOption +} + +func (*ExplainOptionContext) IsExplainOptionContext() {} + +func NewExplainOptionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExplainOptionContext { + var p = new(ExplainOptionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_explainOption + + return p +} + +func (s *ExplainOptionContext) GetParser() antlr.Parser { return s.parser } + +func (s *ExplainOptionContext) CopyAll(ctx *ExplainOptionContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *ExplainOptionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExplainOptionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type ExplainFormatContext struct { + ExplainOptionContext + value antlr.Token +} + +func NewExplainFormatContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExplainFormatContext { + var p = new(ExplainFormatContext) + + InitEmptyExplainOptionContext(&p.ExplainOptionContext) + p.parser = parser + p.CopyAll(ctx.(*ExplainOptionContext)) + + return p +} + +func (s *ExplainFormatContext) GetValue() antlr.Token { return s.value } + +func (s *ExplainFormatContext) SetValue(v antlr.Token) { s.value = v } + +func (s *ExplainFormatContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExplainFormatContext) FORMAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserFORMAT_, 0) +} + +func (s *ExplainFormatContext) TEXT_() antlr.TerminalNode { + return s.GetToken(TrinoParserTEXT_, 0) +} + +func (s *ExplainFormatContext) GRAPHVIZ_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRAPHVIZ_, 0) +} + +func (s *ExplainFormatContext) JSON_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_, 0) +} + +func (s *ExplainFormatContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExplainFormat(s) + } +} + +func (s *ExplainFormatContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExplainFormat(s) + } +} + +func (s *ExplainFormatContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExplainFormat(s) + + default: + return t.VisitChildren(s) + } +} + +type ExplainTypeContext struct { + ExplainOptionContext + value antlr.Token +} + +func NewExplainTypeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExplainTypeContext { + var p = new(ExplainTypeContext) + + InitEmptyExplainOptionContext(&p.ExplainOptionContext) + p.parser = parser + p.CopyAll(ctx.(*ExplainOptionContext)) + + return p +} + +func (s *ExplainTypeContext) GetValue() antlr.Token { return s.value } + +func (s *ExplainTypeContext) SetValue(v antlr.Token) { s.value = v } + +func (s *ExplainTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ExplainTypeContext) TYPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTYPE_, 0) +} + +func (s *ExplainTypeContext) LOGICAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLOGICAL_, 0) +} + +func (s *ExplainTypeContext) DISTRIBUTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserDISTRIBUTED_, 0) +} + +func (s *ExplainTypeContext) VALIDATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserVALIDATE_, 0) +} + +func (s *ExplainTypeContext) IO_() antlr.TerminalNode { + return s.GetToken(TrinoParserIO_, 0) +} + +func (s *ExplainTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterExplainType(s) + } +} + +func (s *ExplainTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitExplainType(s) + } +} + +func (s *ExplainTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitExplainType(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ExplainOption() (localctx IExplainOptionContext) { + localctx = NewExplainOptionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 200, TrinoParserRULE_explainOption) + var _la int + + p.SetState(2991) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserFORMAT_: + localctx = NewExplainFormatContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2987) + p.Match(TrinoParserFORMAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2988) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*ExplainFormatContext).value = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserGRAPHVIZ_ || _la == TrinoParserJSON_ || _la == TrinoParserTEXT_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*ExplainFormatContext).value = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + case TrinoParserTYPE_: + localctx = NewExplainTypeContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2989) + p.Match(TrinoParserTYPE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2990) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*ExplainTypeContext).value = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserDISTRIBUTED_ || _la == TrinoParserIO_ || _la == TrinoParserLOGICAL_ || _la == TrinoParserVALIDATE_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*ExplainTypeContext).value = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ITransactionModeContext is an interface to support dynamic dispatch. +type ITransactionModeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsTransactionModeContext differentiates from other interfaces. + IsTransactionModeContext() +} + +type TransactionModeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyTransactionModeContext() *TransactionModeContext { + var p = new(TransactionModeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_transactionMode + return p +} + +func InitEmptyTransactionModeContext(p *TransactionModeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_transactionMode +} + +func (*TransactionModeContext) IsTransactionModeContext() {} + +func NewTransactionModeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TransactionModeContext { + var p = new(TransactionModeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_transactionMode + + return p +} + +func (s *TransactionModeContext) GetParser() antlr.Parser { return s.parser } + +func (s *TransactionModeContext) CopyAll(ctx *TransactionModeContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *TransactionModeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TransactionModeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type TransactionAccessModeContext struct { + TransactionModeContext + accessMode antlr.Token +} + +func NewTransactionAccessModeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TransactionAccessModeContext { + var p = new(TransactionAccessModeContext) + + InitEmptyTransactionModeContext(&p.TransactionModeContext) + p.parser = parser + p.CopyAll(ctx.(*TransactionModeContext)) + + return p +} + +func (s *TransactionAccessModeContext) GetAccessMode() antlr.Token { return s.accessMode } + +func (s *TransactionAccessModeContext) SetAccessMode(v antlr.Token) { s.accessMode = v } + +func (s *TransactionAccessModeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *TransactionAccessModeContext) READ_() antlr.TerminalNode { + return s.GetToken(TrinoParserREAD_, 0) +} + +func (s *TransactionAccessModeContext) ONLY_() antlr.TerminalNode { + return s.GetToken(TrinoParserONLY_, 0) +} + +func (s *TransactionAccessModeContext) WRITE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWRITE_, 0) +} + +func (s *TransactionAccessModeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterTransactionAccessMode(s) + } +} + +func (s *TransactionAccessModeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitTransactionAccessMode(s) + } +} + +func (s *TransactionAccessModeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitTransactionAccessMode(s) + + default: + return t.VisitChildren(s) + } +} + +type IsolationLevelContext struct { + TransactionModeContext +} + +func NewIsolationLevelContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IsolationLevelContext { + var p = new(IsolationLevelContext) + + InitEmptyTransactionModeContext(&p.TransactionModeContext) + p.parser = parser + p.CopyAll(ctx.(*TransactionModeContext)) + + return p +} + +func (s *IsolationLevelContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IsolationLevelContext) ISOLATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserISOLATION_, 0) +} + +func (s *IsolationLevelContext) LEVEL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLEVEL_, 0) +} + +func (s *IsolationLevelContext) LevelOfIsolation() ILevelOfIsolationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ILevelOfIsolationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ILevelOfIsolationContext) +} + +func (s *IsolationLevelContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIsolationLevel(s) + } +} + +func (s *IsolationLevelContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIsolationLevel(s) + } +} + +func (s *IsolationLevelContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIsolationLevel(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) TransactionMode() (localctx ITransactionModeContext) { + localctx = NewTransactionModeContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 202, TrinoParserRULE_transactionMode) + var _la int + + p.SetState(2998) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserISOLATION_: + localctx = NewIsolationLevelContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(2993) + p.Match(TrinoParserISOLATION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2994) + p.Match(TrinoParserLEVEL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2995) + p.LevelOfIsolation() + } + + case TrinoParserREAD_: + localctx = NewTransactionAccessModeContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(2996) + p.Match(TrinoParserREAD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(2997) + + var _lt = p.GetTokenStream().LT(1) + + localctx.(*TransactionAccessModeContext).accessMode = _lt + + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserONLY_ || _la == TrinoParserWRITE_) { + var _ri = p.GetErrorHandler().RecoverInline(p) + + localctx.(*TransactionAccessModeContext).accessMode = _ri + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ILevelOfIsolationContext is an interface to support dynamic dispatch. +type ILevelOfIsolationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsLevelOfIsolationContext differentiates from other interfaces. + IsLevelOfIsolationContext() +} + +type LevelOfIsolationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyLevelOfIsolationContext() *LevelOfIsolationContext { + var p = new(LevelOfIsolationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_levelOfIsolation + return p +} + +func InitEmptyLevelOfIsolationContext(p *LevelOfIsolationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_levelOfIsolation +} + +func (*LevelOfIsolationContext) IsLevelOfIsolationContext() {} + +func NewLevelOfIsolationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LevelOfIsolationContext { + var p = new(LevelOfIsolationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_levelOfIsolation + + return p +} + +func (s *LevelOfIsolationContext) GetParser() antlr.Parser { return s.parser } + +func (s *LevelOfIsolationContext) CopyAll(ctx *LevelOfIsolationContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *LevelOfIsolationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LevelOfIsolationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type ReadUncommittedContext struct { + LevelOfIsolationContext +} + +func NewReadUncommittedContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ReadUncommittedContext { + var p = new(ReadUncommittedContext) + + InitEmptyLevelOfIsolationContext(&p.LevelOfIsolationContext) + p.parser = parser + p.CopyAll(ctx.(*LevelOfIsolationContext)) + + return p +} + +func (s *ReadUncommittedContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ReadUncommittedContext) READ_() antlr.TerminalNode { + return s.GetToken(TrinoParserREAD_, 0) +} + +func (s *ReadUncommittedContext) UNCOMMITTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNCOMMITTED_, 0) +} + +func (s *ReadUncommittedContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterReadUncommitted(s) + } +} + +func (s *ReadUncommittedContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitReadUncommitted(s) + } +} + +func (s *ReadUncommittedContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitReadUncommitted(s) + + default: + return t.VisitChildren(s) + } +} + +type SerializableContext struct { + LevelOfIsolationContext +} + +func NewSerializableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SerializableContext { + var p = new(SerializableContext) + + InitEmptyLevelOfIsolationContext(&p.LevelOfIsolationContext) + p.parser = parser + p.CopyAll(ctx.(*LevelOfIsolationContext)) + + return p +} + +func (s *SerializableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SerializableContext) SERIALIZABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserSERIALIZABLE_, 0) +} + +func (s *SerializableContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSerializable(s) + } +} + +func (s *SerializableContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSerializable(s) + } +} + +func (s *SerializableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSerializable(s) + + default: + return t.VisitChildren(s) + } +} + +type ReadCommittedContext struct { + LevelOfIsolationContext +} + +func NewReadCommittedContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ReadCommittedContext { + var p = new(ReadCommittedContext) + + InitEmptyLevelOfIsolationContext(&p.LevelOfIsolationContext) + p.parser = parser + p.CopyAll(ctx.(*LevelOfIsolationContext)) + + return p +} + +func (s *ReadCommittedContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ReadCommittedContext) READ_() antlr.TerminalNode { + return s.GetToken(TrinoParserREAD_, 0) +} + +func (s *ReadCommittedContext) COMMITTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMITTED_, 0) +} + +func (s *ReadCommittedContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterReadCommitted(s) + } +} + +func (s *ReadCommittedContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitReadCommitted(s) + } +} + +func (s *ReadCommittedContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitReadCommitted(s) + + default: + return t.VisitChildren(s) + } +} + +type RepeatableReadContext struct { + LevelOfIsolationContext +} + +func NewRepeatableReadContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RepeatableReadContext { + var p = new(RepeatableReadContext) + + InitEmptyLevelOfIsolationContext(&p.LevelOfIsolationContext) + p.parser = parser + p.CopyAll(ctx.(*LevelOfIsolationContext)) + + return p +} + +func (s *RepeatableReadContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RepeatableReadContext) REPEATABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPEATABLE_, 0) +} + +func (s *RepeatableReadContext) READ_() antlr.TerminalNode { + return s.GetToken(TrinoParserREAD_, 0) +} + +func (s *RepeatableReadContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRepeatableRead(s) + } +} + +func (s *RepeatableReadContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRepeatableRead(s) + } +} + +func (s *RepeatableReadContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRepeatableRead(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) LevelOfIsolation() (localctx ILevelOfIsolationContext) { + localctx = NewLevelOfIsolationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 204, TrinoParserRULE_levelOfIsolation) + p.SetState(3007) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 399, p.GetParserRuleContext()) { + case 1: + localctx = NewReadUncommittedContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3000) + p.Match(TrinoParserREAD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3001) + p.Match(TrinoParserUNCOMMITTED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + localctx = NewReadCommittedContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3002) + p.Match(TrinoParserREAD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3003) + p.Match(TrinoParserCOMMITTED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewRepeatableReadContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(3004) + p.Match(TrinoParserREPEATABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3005) + p.Match(TrinoParserREAD_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 4: + localctx = NewSerializableContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(3006) + p.Match(TrinoParserSERIALIZABLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ICallArgumentContext is an interface to support dynamic dispatch. +type ICallArgumentContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsCallArgumentContext differentiates from other interfaces. + IsCallArgumentContext() +} + +type CallArgumentContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyCallArgumentContext() *CallArgumentContext { + var p = new(CallArgumentContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_callArgument + return p +} + +func InitEmptyCallArgumentContext(p *CallArgumentContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_callArgument +} + +func (*CallArgumentContext) IsCallArgumentContext() {} + +func NewCallArgumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CallArgumentContext { + var p = new(CallArgumentContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_callArgument + + return p +} + +func (s *CallArgumentContext) GetParser() antlr.Parser { return s.parser } + +func (s *CallArgumentContext) CopyAll(ctx *CallArgumentContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *CallArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CallArgumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type PositionalArgumentContext struct { + CallArgumentContext +} + +func NewPositionalArgumentContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PositionalArgumentContext { + var p = new(PositionalArgumentContext) + + InitEmptyCallArgumentContext(&p.CallArgumentContext) + p.parser = parser + p.CopyAll(ctx.(*CallArgumentContext)) + + return p +} + +func (s *PositionalArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PositionalArgumentContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *PositionalArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPositionalArgument(s) + } +} + +func (s *PositionalArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPositionalArgument(s) + } +} + +func (s *PositionalArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPositionalArgument(s) + + default: + return t.VisitChildren(s) + } +} + +type NamedArgumentContext struct { + CallArgumentContext +} + +func NewNamedArgumentContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NamedArgumentContext { + var p = new(NamedArgumentContext) + + InitEmptyCallArgumentContext(&p.CallArgumentContext) + p.parser = parser + p.CopyAll(ctx.(*CallArgumentContext)) + + return p +} + +func (s *NamedArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NamedArgumentContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *NamedArgumentContext) RDOUBLEARROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserRDOUBLEARROW_, 0) +} + +func (s *NamedArgumentContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *NamedArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNamedArgument(s) + } +} + +func (s *NamedArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNamedArgument(s) + } +} + +func (s *NamedArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNamedArgument(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) CallArgument() (localctx ICallArgumentContext) { + localctx = NewCallArgumentContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 206, TrinoParserRULE_callArgument) + p.SetState(3014) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 400, p.GetParserRuleContext()) { + case 1: + localctx = NewPositionalArgumentContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3009) + p.Expression() + } + + case 2: + localctx = NewNamedArgumentContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3010) + p.Identifier() + } + { + p.SetState(3011) + p.Match(TrinoParserRDOUBLEARROW_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3012) + p.Expression() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPathElementContext is an interface to support dynamic dispatch. +type IPathElementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsPathElementContext differentiates from other interfaces. + IsPathElementContext() +} + +type PathElementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPathElementContext() *PathElementContext { + var p = new(PathElementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_pathElement + return p +} + +func InitEmptyPathElementContext(p *PathElementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_pathElement +} + +func (*PathElementContext) IsPathElementContext() {} + +func NewPathElementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PathElementContext { + var p = new(PathElementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_pathElement + + return p +} + +func (s *PathElementContext) GetParser() antlr.Parser { return s.parser } + +func (s *PathElementContext) CopyAll(ctx *PathElementContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *PathElementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PathElementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type QualifiedArgumentContext struct { + PathElementContext +} + +func NewQualifiedArgumentContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *QualifiedArgumentContext { + var p = new(QualifiedArgumentContext) + + InitEmptyPathElementContext(&p.PathElementContext) + p.parser = parser + p.CopyAll(ctx.(*PathElementContext)) + + return p +} + +func (s *QualifiedArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QualifiedArgumentContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *QualifiedArgumentContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *QualifiedArgumentContext) DOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOT_, 0) +} + +func (s *QualifiedArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQualifiedArgument(s) + } +} + +func (s *QualifiedArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQualifiedArgument(s) + } +} + +func (s *QualifiedArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQualifiedArgument(s) + + default: + return t.VisitChildren(s) + } +} + +type UnqualifiedArgumentContext struct { + PathElementContext +} + +func NewUnqualifiedArgumentContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnqualifiedArgumentContext { + var p = new(UnqualifiedArgumentContext) + + InitEmptyPathElementContext(&p.PathElementContext) + p.parser = parser + p.CopyAll(ctx.(*PathElementContext)) + + return p +} + +func (s *UnqualifiedArgumentContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UnqualifiedArgumentContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *UnqualifiedArgumentContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUnqualifiedArgument(s) + } +} + +func (s *UnqualifiedArgumentContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUnqualifiedArgument(s) + } +} + +func (s *UnqualifiedArgumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUnqualifiedArgument(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PathElement() (localctx IPathElementContext) { + localctx = NewPathElementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 208, TrinoParserRULE_pathElement) + p.SetState(3021) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 401, p.GetParserRuleContext()) { + case 1: + localctx = NewQualifiedArgumentContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3016) + p.Identifier() + } + { + p.SetState(3017) + p.Match(TrinoParserDOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3018) + p.Identifier() + } + + case 2: + localctx = NewUnqualifiedArgumentContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3020) + p.Identifier() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPathSpecificationContext is an interface to support dynamic dispatch. +type IPathSpecificationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + AllPathElement() []IPathElementContext + PathElement(i int) IPathElementContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsPathSpecificationContext differentiates from other interfaces. + IsPathSpecificationContext() +} + +type PathSpecificationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPathSpecificationContext() *PathSpecificationContext { + var p = new(PathSpecificationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_pathSpecification + return p +} + +func InitEmptyPathSpecificationContext(p *PathSpecificationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_pathSpecification +} + +func (*PathSpecificationContext) IsPathSpecificationContext() {} + +func NewPathSpecificationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PathSpecificationContext { + var p = new(PathSpecificationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_pathSpecification + + return p +} + +func (s *PathSpecificationContext) GetParser() antlr.Parser { return s.parser } + +func (s *PathSpecificationContext) AllPathElement() []IPathElementContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IPathElementContext); ok { + len++ + } + } + + tst := make([]IPathElementContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IPathElementContext); ok { + tst[i] = t.(IPathElementContext) + i++ + } + } + + return tst +} + +func (s *PathSpecificationContext) PathElement(i int) IPathElementContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPathElementContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IPathElementContext) +} + +func (s *PathSpecificationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *PathSpecificationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *PathSpecificationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PathSpecificationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *PathSpecificationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPathSpecification(s) + } +} + +func (s *PathSpecificationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPathSpecification(s) + } +} + +func (s *PathSpecificationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPathSpecification(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) PathSpecification() (localctx IPathSpecificationContext) { + localctx = NewPathSpecificationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 210, TrinoParserRULE_pathSpecification) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3023) + p.PathElement() + } + p.SetState(3028) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(3024) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3025) + p.PathElement() + } + + p.SetState(3030) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IFunctionSpecificationContext is an interface to support dynamic dispatch. +type IFunctionSpecificationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + FUNCTION_() antlr.TerminalNode + FunctionDeclaration() IFunctionDeclarationContext + ReturnsClause() IReturnsClauseContext + ControlStatement() IControlStatementContext + AllRoutineCharacteristic() []IRoutineCharacteristicContext + RoutineCharacteristic(i int) IRoutineCharacteristicContext + + // IsFunctionSpecificationContext differentiates from other interfaces. + IsFunctionSpecificationContext() +} + +type FunctionSpecificationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyFunctionSpecificationContext() *FunctionSpecificationContext { + var p = new(FunctionSpecificationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_functionSpecification + return p +} + +func InitEmptyFunctionSpecificationContext(p *FunctionSpecificationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_functionSpecification +} + +func (*FunctionSpecificationContext) IsFunctionSpecificationContext() {} + +func NewFunctionSpecificationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FunctionSpecificationContext { + var p = new(FunctionSpecificationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_functionSpecification + + return p +} + +func (s *FunctionSpecificationContext) GetParser() antlr.Parser { return s.parser } + +func (s *FunctionSpecificationContext) FUNCTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserFUNCTION_, 0) +} + +func (s *FunctionSpecificationContext) FunctionDeclaration() IFunctionDeclarationContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFunctionDeclarationContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFunctionDeclarationContext) +} + +func (s *FunctionSpecificationContext) ReturnsClause() IReturnsClauseContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IReturnsClauseContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IReturnsClauseContext) +} + +func (s *FunctionSpecificationContext) ControlStatement() IControlStatementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IControlStatementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IControlStatementContext) +} + +func (s *FunctionSpecificationContext) AllRoutineCharacteristic() []IRoutineCharacteristicContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IRoutineCharacteristicContext); ok { + len++ + } + } + + tst := make([]IRoutineCharacteristicContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IRoutineCharacteristicContext); ok { + tst[i] = t.(IRoutineCharacteristicContext) + i++ + } + } + + return tst +} + +func (s *FunctionSpecificationContext) RoutineCharacteristic(i int) IRoutineCharacteristicContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRoutineCharacteristicContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IRoutineCharacteristicContext) +} + +func (s *FunctionSpecificationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *FunctionSpecificationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *FunctionSpecificationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterFunctionSpecification(s) + } +} + +func (s *FunctionSpecificationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitFunctionSpecification(s) + } +} + +func (s *FunctionSpecificationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitFunctionSpecification(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) FunctionSpecification() (localctx IFunctionSpecificationContext) { + localctx = NewFunctionSpecificationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 212, TrinoParserRULE_functionSpecification) + var _alt int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3031) + p.Match(TrinoParserFUNCTION_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3032) + p.FunctionDeclaration() + } + { + p.SetState(3033) + p.ReturnsClause() + } + p.SetState(3037) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 403, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(3034) + p.RoutineCharacteristic() + } + + } + p.SetState(3039) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 403, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + { + p.SetState(3040) + p.ControlStatement() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IFunctionDeclarationContext is an interface to support dynamic dispatch. +type IFunctionDeclarationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + QualifiedName() IQualifiedNameContext + LPAREN_() antlr.TerminalNode + RPAREN_() antlr.TerminalNode + AllParameterDeclaration() []IParameterDeclarationContext + ParameterDeclaration(i int) IParameterDeclarationContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsFunctionDeclarationContext differentiates from other interfaces. + IsFunctionDeclarationContext() +} + +type FunctionDeclarationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyFunctionDeclarationContext() *FunctionDeclarationContext { + var p = new(FunctionDeclarationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_functionDeclaration + return p +} + +func InitEmptyFunctionDeclarationContext(p *FunctionDeclarationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_functionDeclaration +} + +func (*FunctionDeclarationContext) IsFunctionDeclarationContext() {} + +func NewFunctionDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FunctionDeclarationContext { + var p = new(FunctionDeclarationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_functionDeclaration + + return p +} + +func (s *FunctionDeclarationContext) GetParser() antlr.Parser { return s.parser } + +func (s *FunctionDeclarationContext) QualifiedName() IQualifiedNameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IQualifiedNameContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IQualifiedNameContext) +} + +func (s *FunctionDeclarationContext) LPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserLPAREN_, 0) +} + +func (s *FunctionDeclarationContext) RPAREN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRPAREN_, 0) +} + +func (s *FunctionDeclarationContext) AllParameterDeclaration() []IParameterDeclarationContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IParameterDeclarationContext); ok { + len++ + } + } + + tst := make([]IParameterDeclarationContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IParameterDeclarationContext); ok { + tst[i] = t.(IParameterDeclarationContext) + i++ + } + } + + return tst +} + +func (s *FunctionDeclarationContext) ParameterDeclaration(i int) IParameterDeclarationContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IParameterDeclarationContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IParameterDeclarationContext) +} + +func (s *FunctionDeclarationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *FunctionDeclarationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *FunctionDeclarationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *FunctionDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *FunctionDeclarationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterFunctionDeclaration(s) + } +} + +func (s *FunctionDeclarationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitFunctionDeclaration(s) + } +} + +func (s *FunctionDeclarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitFunctionDeclaration(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) FunctionDeclaration() (localctx IFunctionDeclarationContext) { + localctx = NewFunctionDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 214, TrinoParserRULE_functionDeclaration) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3042) + p.QualifiedName() + } + { + p.SetState(3043) + p.Match(TrinoParserLPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(3052) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699602754) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + { + p.SetState(3044) + p.ParameterDeclaration() + } + p.SetState(3049) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(3045) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3046) + p.ParameterDeclaration() + } + + p.SetState(3051) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(3054) + p.Match(TrinoParserRPAREN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IParameterDeclarationContext is an interface to support dynamic dispatch. +type IParameterDeclarationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Type_() ITypeContext + Identifier() IIdentifierContext + + // IsParameterDeclarationContext differentiates from other interfaces. + IsParameterDeclarationContext() +} + +type ParameterDeclarationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyParameterDeclarationContext() *ParameterDeclarationContext { + var p = new(ParameterDeclarationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_parameterDeclaration + return p +} + +func InitEmptyParameterDeclarationContext(p *ParameterDeclarationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_parameterDeclaration +} + +func (*ParameterDeclarationContext) IsParameterDeclarationContext() {} + +func NewParameterDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParameterDeclarationContext { + var p = new(ParameterDeclarationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_parameterDeclaration + + return p +} + +func (s *ParameterDeclarationContext) GetParser() antlr.Parser { return s.parser } + +func (s *ParameterDeclarationContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *ParameterDeclarationContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *ParameterDeclarationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ParameterDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ParameterDeclarationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterParameterDeclaration(s) + } +} + +func (s *ParameterDeclarationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitParameterDeclaration(s) + } +} + +func (s *ParameterDeclarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitParameterDeclaration(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ParameterDeclaration() (localctx IParameterDeclarationContext) { + localctx = NewParameterDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 216, TrinoParserRULE_parameterDeclaration) + p.EnterOuterAlt(localctx, 1) + p.SetState(3057) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 406, p.GetParserRuleContext()) == 1 { + { + p.SetState(3056) + p.Identifier() + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(3059) + p.type_(0) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IReturnsClauseContext is an interface to support dynamic dispatch. +type IReturnsClauseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + RETURNS_() antlr.TerminalNode + Type_() ITypeContext + + // IsReturnsClauseContext differentiates from other interfaces. + IsReturnsClauseContext() +} + +type ReturnsClauseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyReturnsClauseContext() *ReturnsClauseContext { + var p = new(ReturnsClauseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_returnsClause + return p +} + +func InitEmptyReturnsClauseContext(p *ReturnsClauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_returnsClause +} + +func (*ReturnsClauseContext) IsReturnsClauseContext() {} + +func NewReturnsClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ReturnsClauseContext { + var p = new(ReturnsClauseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_returnsClause + + return p +} + +func (s *ReturnsClauseContext) GetParser() antlr.Parser { return s.parser } + +func (s *ReturnsClauseContext) RETURNS_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNS_, 0) +} + +func (s *ReturnsClauseContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *ReturnsClauseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ReturnsClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ReturnsClauseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterReturnsClause(s) + } +} + +func (s *ReturnsClauseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitReturnsClause(s) + } +} + +func (s *ReturnsClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitReturnsClause(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ReturnsClause() (localctx IReturnsClauseContext) { + localctx = NewReturnsClauseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 218, TrinoParserRULE_returnsClause) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3061) + p.Match(TrinoParserRETURNS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3062) + p.type_(0) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRoutineCharacteristicContext is an interface to support dynamic dispatch. +type IRoutineCharacteristicContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsRoutineCharacteristicContext differentiates from other interfaces. + IsRoutineCharacteristicContext() +} + +type RoutineCharacteristicContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRoutineCharacteristicContext() *RoutineCharacteristicContext { + var p = new(RoutineCharacteristicContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_routineCharacteristic + return p +} + +func InitEmptyRoutineCharacteristicContext(p *RoutineCharacteristicContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_routineCharacteristic +} + +func (*RoutineCharacteristicContext) IsRoutineCharacteristicContext() {} + +func NewRoutineCharacteristicContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RoutineCharacteristicContext { + var p = new(RoutineCharacteristicContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_routineCharacteristic + + return p +} + +func (s *RoutineCharacteristicContext) GetParser() antlr.Parser { return s.parser } + +func (s *RoutineCharacteristicContext) CopyAll(ctx *RoutineCharacteristicContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *RoutineCharacteristicContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RoutineCharacteristicContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type ReturnsNullOnNullInputCharacteristicContext struct { + RoutineCharacteristicContext +} + +func NewReturnsNullOnNullInputCharacteristicContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ReturnsNullOnNullInputCharacteristicContext { + var p = new(ReturnsNullOnNullInputCharacteristicContext) + + InitEmptyRoutineCharacteristicContext(&p.RoutineCharacteristicContext) + p.parser = parser + p.CopyAll(ctx.(*RoutineCharacteristicContext)) + + return p +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) RETURNS_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNS_, 0) +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) AllNULL_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserNULL_) +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) NULL_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, i) +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) INPUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINPUT_, 0) +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterReturnsNullOnNullInputCharacteristic(s) + } +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitReturnsNullOnNullInputCharacteristic(s) + } +} + +func (s *ReturnsNullOnNullInputCharacteristicContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitReturnsNullOnNullInputCharacteristic(s) + + default: + return t.VisitChildren(s) + } +} + +type SecurityCharacteristicContext struct { + RoutineCharacteristicContext +} + +func NewSecurityCharacteristicContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SecurityCharacteristicContext { + var p = new(SecurityCharacteristicContext) + + InitEmptyRoutineCharacteristicContext(&p.RoutineCharacteristicContext) + p.parser = parser + p.CopyAll(ctx.(*RoutineCharacteristicContext)) + + return p +} + +func (s *SecurityCharacteristicContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SecurityCharacteristicContext) SECURITY_() antlr.TerminalNode { + return s.GetToken(TrinoParserSECURITY_, 0) +} + +func (s *SecurityCharacteristicContext) DEFINER_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFINER_, 0) +} + +func (s *SecurityCharacteristicContext) INVOKER_() antlr.TerminalNode { + return s.GetToken(TrinoParserINVOKER_, 0) +} + +func (s *SecurityCharacteristicContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSecurityCharacteristic(s) + } +} + +func (s *SecurityCharacteristicContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSecurityCharacteristic(s) + } +} + +func (s *SecurityCharacteristicContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSecurityCharacteristic(s) + + default: + return t.VisitChildren(s) + } +} + +type CalledOnNullInputCharacteristicContext struct { + RoutineCharacteristicContext +} + +func NewCalledOnNullInputCharacteristicContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CalledOnNullInputCharacteristicContext { + var p = new(CalledOnNullInputCharacteristicContext) + + InitEmptyRoutineCharacteristicContext(&p.RoutineCharacteristicContext) + p.parser = parser + p.CopyAll(ctx.(*RoutineCharacteristicContext)) + + return p +} + +func (s *CalledOnNullInputCharacteristicContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CalledOnNullInputCharacteristicContext) CALLED_() antlr.TerminalNode { + return s.GetToken(TrinoParserCALLED_, 0) +} + +func (s *CalledOnNullInputCharacteristicContext) ON_() antlr.TerminalNode { + return s.GetToken(TrinoParserON_, 0) +} + +func (s *CalledOnNullInputCharacteristicContext) NULL_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULL_, 0) +} + +func (s *CalledOnNullInputCharacteristicContext) INPUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINPUT_, 0) +} + +func (s *CalledOnNullInputCharacteristicContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCalledOnNullInputCharacteristic(s) + } +} + +func (s *CalledOnNullInputCharacteristicContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCalledOnNullInputCharacteristic(s) + } +} + +func (s *CalledOnNullInputCharacteristicContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCalledOnNullInputCharacteristic(s) + + default: + return t.VisitChildren(s) + } +} + +type CommentCharacteristicContext struct { + RoutineCharacteristicContext +} + +func NewCommentCharacteristicContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CommentCharacteristicContext { + var p = new(CommentCharacteristicContext) + + InitEmptyRoutineCharacteristicContext(&p.RoutineCharacteristicContext) + p.parser = parser + p.CopyAll(ctx.(*RoutineCharacteristicContext)) + + return p +} + +func (s *CommentCharacteristicContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CommentCharacteristicContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *CommentCharacteristicContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *CommentCharacteristicContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCommentCharacteristic(s) + } +} + +func (s *CommentCharacteristicContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCommentCharacteristic(s) + } +} + +func (s *CommentCharacteristicContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCommentCharacteristic(s) + + default: + return t.VisitChildren(s) + } +} + +type LanguageCharacteristicContext struct { + RoutineCharacteristicContext +} + +func NewLanguageCharacteristicContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LanguageCharacteristicContext { + var p = new(LanguageCharacteristicContext) + + InitEmptyRoutineCharacteristicContext(&p.RoutineCharacteristicContext) + p.parser = parser + p.CopyAll(ctx.(*RoutineCharacteristicContext)) + + return p +} + +func (s *LanguageCharacteristicContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LanguageCharacteristicContext) LANGUAGE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLANGUAGE_, 0) +} + +func (s *LanguageCharacteristicContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *LanguageCharacteristicContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLanguageCharacteristic(s) + } +} + +func (s *LanguageCharacteristicContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLanguageCharacteristic(s) + } +} + +func (s *LanguageCharacteristicContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLanguageCharacteristic(s) + + default: + return t.VisitChildren(s) + } +} + +type DeterministicCharacteristicContext struct { + RoutineCharacteristicContext +} + +func NewDeterministicCharacteristicContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DeterministicCharacteristicContext { + var p = new(DeterministicCharacteristicContext) + + InitEmptyRoutineCharacteristicContext(&p.RoutineCharacteristicContext) + p.parser = parser + p.CopyAll(ctx.(*RoutineCharacteristicContext)) + + return p +} + +func (s *DeterministicCharacteristicContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DeterministicCharacteristicContext) DETERMINISTIC_() antlr.TerminalNode { + return s.GetToken(TrinoParserDETERMINISTIC_, 0) +} + +func (s *DeterministicCharacteristicContext) NOT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNOT_, 0) +} + +func (s *DeterministicCharacteristicContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDeterministicCharacteristic(s) + } +} + +func (s *DeterministicCharacteristicContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDeterministicCharacteristic(s) + } +} + +func (s *DeterministicCharacteristicContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDeterministicCharacteristic(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RoutineCharacteristic() (localctx IRoutineCharacteristicContext) { + localctx = NewRoutineCharacteristicContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 220, TrinoParserRULE_routineCharacteristic) + var _la int + + p.SetState(3083) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserLANGUAGE_: + localctx = NewLanguageCharacteristicContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3064) + p.Match(TrinoParserLANGUAGE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3065) + p.Identifier() + } + + case TrinoParserDETERMINISTIC_, TrinoParserNOT_: + localctx = NewDeterministicCharacteristicContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + p.SetState(3067) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserNOT_ { + { + p.SetState(3066) + p.Match(TrinoParserNOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(3069) + p.Match(TrinoParserDETERMINISTIC_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserRETURNS_: + localctx = NewReturnsNullOnNullInputCharacteristicContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(3070) + p.Match(TrinoParserRETURNS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3071) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3072) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3073) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3074) + p.Match(TrinoParserINPUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserCALLED_: + localctx = NewCalledOnNullInputCharacteristicContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(3075) + p.Match(TrinoParserCALLED_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3076) + p.Match(TrinoParserON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3077) + p.Match(TrinoParserNULL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3078) + p.Match(TrinoParserINPUT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserSECURITY_: + localctx = NewSecurityCharacteristicContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(3079) + p.Match(TrinoParserSECURITY_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3080) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserDEFINER_ || _la == TrinoParserINVOKER_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + case TrinoParserCOMMENT_: + localctx = NewCommentCharacteristicContext(p, localctx) + p.EnterOuterAlt(localctx, 6) + { + p.SetState(3081) + p.Match(TrinoParserCOMMENT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3082) + p.String_() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IControlStatementContext is an interface to support dynamic dispatch. +type IControlStatementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsControlStatementContext differentiates from other interfaces. + IsControlStatementContext() +} + +type ControlStatementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyControlStatementContext() *ControlStatementContext { + var p = new(ControlStatementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_controlStatement + return p +} + +func InitEmptyControlStatementContext(p *ControlStatementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_controlStatement +} + +func (*ControlStatementContext) IsControlStatementContext() {} + +func NewControlStatementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ControlStatementContext { + var p = new(ControlStatementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_controlStatement + + return p +} + +func (s *ControlStatementContext) GetParser() antlr.Parser { return s.parser } + +func (s *ControlStatementContext) CopyAll(ctx *ControlStatementContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *ControlStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ControlStatementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type WhileStatementContext struct { + ControlStatementContext + label IIdentifierContext +} + +func NewWhileStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *WhileStatementContext { + var p = new(WhileStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *WhileStatementContext) GetLabel() IIdentifierContext { return s.label } + +func (s *WhileStatementContext) SetLabel(v IIdentifierContext) { s.label = v } + +func (s *WhileStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *WhileStatementContext) AllWHILE_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserWHILE_) +} + +func (s *WhileStatementContext) WHILE_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserWHILE_, i) +} + +func (s *WhileStatementContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *WhileStatementContext) DO_() antlr.TerminalNode { + return s.GetToken(TrinoParserDO_, 0) +} + +func (s *WhileStatementContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *WhileStatementContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *WhileStatementContext) COLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLON_, 0) +} + +func (s *WhileStatementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *WhileStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterWhileStatement(s) + } +} + +func (s *WhileStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitWhileStatement(s) + } +} + +func (s *WhileStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitWhileStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type SimpleCaseStatementContext struct { + ControlStatementContext +} + +func NewSimpleCaseStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SimpleCaseStatementContext { + var p = new(SimpleCaseStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *SimpleCaseStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SimpleCaseStatementContext) AllCASE_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCASE_) +} + +func (s *SimpleCaseStatementContext) CASE_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCASE_, i) +} + +func (s *SimpleCaseStatementContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *SimpleCaseStatementContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *SimpleCaseStatementContext) AllCaseStatementWhenClause() []ICaseStatementWhenClauseContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ICaseStatementWhenClauseContext); ok { + len++ + } + } + + tst := make([]ICaseStatementWhenClauseContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ICaseStatementWhenClauseContext); ok { + tst[i] = t.(ICaseStatementWhenClauseContext) + i++ + } + } + + return tst +} + +func (s *SimpleCaseStatementContext) CaseStatementWhenClause(i int) ICaseStatementWhenClauseContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICaseStatementWhenClauseContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ICaseStatementWhenClauseContext) +} + +func (s *SimpleCaseStatementContext) ElseClause() IElseClauseContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IElseClauseContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IElseClauseContext) +} + +func (s *SimpleCaseStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSimpleCaseStatement(s) + } +} + +func (s *SimpleCaseStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSimpleCaseStatement(s) + } +} + +func (s *SimpleCaseStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSimpleCaseStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type RepeatStatementContext struct { + ControlStatementContext + label IIdentifierContext +} + +func NewRepeatStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RepeatStatementContext { + var p = new(RepeatStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *RepeatStatementContext) GetLabel() IIdentifierContext { return s.label } + +func (s *RepeatStatementContext) SetLabel(v IIdentifierContext) { s.label = v } + +func (s *RepeatStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RepeatStatementContext) AllREPEAT_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserREPEAT_) +} + +func (s *RepeatStatementContext) REPEAT_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserREPEAT_, i) +} + +func (s *RepeatStatementContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *RepeatStatementContext) UNTIL_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNTIL_, 0) +} + +func (s *RepeatStatementContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *RepeatStatementContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *RepeatStatementContext) COLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLON_, 0) +} + +func (s *RepeatStatementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *RepeatStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRepeatStatement(s) + } +} + +func (s *RepeatStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRepeatStatement(s) + } +} + +func (s *RepeatStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRepeatStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type AssignmentStatementContext struct { + ControlStatementContext +} + +func NewAssignmentStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AssignmentStatementContext { + var p = new(AssignmentStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *AssignmentStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *AssignmentStatementContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *AssignmentStatementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *AssignmentStatementContext) EQ_() antlr.TerminalNode { + return s.GetToken(TrinoParserEQ_, 0) +} + +func (s *AssignmentStatementContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *AssignmentStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterAssignmentStatement(s) + } +} + +func (s *AssignmentStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitAssignmentStatement(s) + } +} + +func (s *AssignmentStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitAssignmentStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type LeaveStatementContext struct { + ControlStatementContext +} + +func NewLeaveStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LeaveStatementContext { + var p = new(LeaveStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *LeaveStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LeaveStatementContext) LEAVE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLEAVE_, 0) +} + +func (s *LeaveStatementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *LeaveStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLeaveStatement(s) + } +} + +func (s *LeaveStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLeaveStatement(s) + } +} + +func (s *LeaveStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLeaveStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type CompoundStatementContext struct { + ControlStatementContext +} + +func NewCompoundStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CompoundStatementContext { + var p = new(CompoundStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *CompoundStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CompoundStatementContext) BEGIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserBEGIN_, 0) +} + +func (s *CompoundStatementContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *CompoundStatementContext) AllVariableDeclaration() []IVariableDeclarationContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IVariableDeclarationContext); ok { + len++ + } + } + + tst := make([]IVariableDeclarationContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IVariableDeclarationContext); ok { + tst[i] = t.(IVariableDeclarationContext) + i++ + } + } + + return tst +} + +func (s *CompoundStatementContext) VariableDeclaration(i int) IVariableDeclarationContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IVariableDeclarationContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IVariableDeclarationContext) +} + +func (s *CompoundStatementContext) AllSEMICOLON_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserSEMICOLON_) +} + +func (s *CompoundStatementContext) SEMICOLON_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, i) +} + +func (s *CompoundStatementContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *CompoundStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCompoundStatement(s) + } +} + +func (s *CompoundStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCompoundStatement(s) + } +} + +func (s *CompoundStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCompoundStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type IterateStatementContext struct { + ControlStatementContext +} + +func NewIterateStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IterateStatementContext { + var p = new(IterateStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *IterateStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IterateStatementContext) ITERATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserITERATE_, 0) +} + +func (s *IterateStatementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *IterateStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIterateStatement(s) + } +} + +func (s *IterateStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIterateStatement(s) + } +} + +func (s *IterateStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIterateStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type LoopStatementContext struct { + ControlStatementContext + label IIdentifierContext +} + +func NewLoopStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LoopStatementContext { + var p = new(LoopStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *LoopStatementContext) GetLabel() IIdentifierContext { return s.label } + +func (s *LoopStatementContext) SetLabel(v IIdentifierContext) { s.label = v } + +func (s *LoopStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *LoopStatementContext) AllLOOP_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserLOOP_) +} + +func (s *LoopStatementContext) LOOP_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserLOOP_, i) +} + +func (s *LoopStatementContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *LoopStatementContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *LoopStatementContext) COLON_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLON_, 0) +} + +func (s *LoopStatementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *LoopStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterLoopStatement(s) + } +} + +func (s *LoopStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitLoopStatement(s) + } +} + +func (s *LoopStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitLoopStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type ReturnStatementContext struct { + ControlStatementContext +} + +func NewReturnStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ReturnStatementContext { + var p = new(ReturnStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *ReturnStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ReturnStatementContext) RETURN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURN_, 0) +} + +func (s *ReturnStatementContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *ReturnStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterReturnStatement(s) + } +} + +func (s *ReturnStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitReturnStatement(s) + } +} + +func (s *ReturnStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitReturnStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type IfStatementContext struct { + ControlStatementContext +} + +func NewIfStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IfStatementContext { + var p = new(IfStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *IfStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IfStatementContext) AllIF_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserIF_) +} + +func (s *IfStatementContext) IF_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, i) +} + +func (s *IfStatementContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *IfStatementContext) THEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserTHEN_, 0) +} + +func (s *IfStatementContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *IfStatementContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *IfStatementContext) AllElseIfClause() []IElseIfClauseContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IElseIfClauseContext); ok { + len++ + } + } + + tst := make([]IElseIfClauseContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IElseIfClauseContext); ok { + tst[i] = t.(IElseIfClauseContext) + i++ + } + } + + return tst +} + +func (s *IfStatementContext) ElseIfClause(i int) IElseIfClauseContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IElseIfClauseContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IElseIfClauseContext) +} + +func (s *IfStatementContext) ElseClause() IElseClauseContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IElseClauseContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IElseClauseContext) +} + +func (s *IfStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIfStatement(s) + } +} + +func (s *IfStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIfStatement(s) + } +} + +func (s *IfStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIfStatement(s) + + default: + return t.VisitChildren(s) + } +} + +type SearchedCaseStatementContext struct { + ControlStatementContext +} + +func NewSearchedCaseStatementContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SearchedCaseStatementContext { + var p = new(SearchedCaseStatementContext) + + InitEmptyControlStatementContext(&p.ControlStatementContext) + p.parser = parser + p.CopyAll(ctx.(*ControlStatementContext)) + + return p +} + +func (s *SearchedCaseStatementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SearchedCaseStatementContext) AllCASE_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCASE_) +} + +func (s *SearchedCaseStatementContext) CASE_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCASE_, i) +} + +func (s *SearchedCaseStatementContext) END_() antlr.TerminalNode { + return s.GetToken(TrinoParserEND_, 0) +} + +func (s *SearchedCaseStatementContext) AllCaseStatementWhenClause() []ICaseStatementWhenClauseContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ICaseStatementWhenClauseContext); ok { + len++ + } + } + + tst := make([]ICaseStatementWhenClauseContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ICaseStatementWhenClauseContext); ok { + tst[i] = t.(ICaseStatementWhenClauseContext) + i++ + } + } + + return tst +} + +func (s *SearchedCaseStatementContext) CaseStatementWhenClause(i int) ICaseStatementWhenClauseContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICaseStatementWhenClauseContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ICaseStatementWhenClauseContext) +} + +func (s *SearchedCaseStatementContext) ElseClause() IElseClauseContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IElseClauseContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IElseClauseContext) +} + +func (s *SearchedCaseStatementContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSearchedCaseStatement(s) + } +} + +func (s *SearchedCaseStatementContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSearchedCaseStatement(s) + } +} + +func (s *SearchedCaseStatementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSearchedCaseStatement(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ControlStatement() (localctx IControlStatementContext) { + localctx = NewControlStatementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 222, TrinoParserRULE_controlStatement) + var _la int + + var _alt int + + p.SetState(3184) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 420, p.GetParserRuleContext()) { + case 1: + localctx = NewReturnStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3085) + p.Match(TrinoParserRETURN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3086) + p.valueExpression(0) + } + + case 2: + localctx = NewAssignmentStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3087) + p.Match(TrinoParserSET_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3088) + p.Identifier() + } + { + p.SetState(3089) + p.Match(TrinoParserEQ_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3090) + p.Expression() + } + + case 3: + localctx = NewSimpleCaseStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(3092) + p.Match(TrinoParserCASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3093) + p.Expression() + } + p.SetState(3095) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for ok := true; ok; ok = _la == TrinoParserWHEN_ { + { + p.SetState(3094) + p.CaseStatementWhenClause() + } + + p.SetState(3097) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(3100) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserELSE_ { + { + p.SetState(3099) + p.ElseClause() + } + + } + { + p.SetState(3102) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3103) + p.Match(TrinoParserCASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 4: + localctx = NewSearchedCaseStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(3105) + p.Match(TrinoParserCASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(3107) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for ok := true; ok; ok = _la == TrinoParserWHEN_ { + { + p.SetState(3106) + p.CaseStatementWhenClause() + } + + p.SetState(3109) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(3112) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserELSE_ { + { + p.SetState(3111) + p.ElseClause() + } + + } + { + p.SetState(3114) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3115) + p.Match(TrinoParserCASE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 5: + localctx = NewIfStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(3117) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3118) + p.Expression() + } + { + p.SetState(3119) + p.Match(TrinoParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3120) + p.SqlStatementList() + } + p.SetState(3124) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserELSEIF_ { + { + p.SetState(3121) + p.ElseIfClause() + } + + p.SetState(3126) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(3128) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserELSE_ { + { + p.SetState(3127) + p.ElseClause() + } + + } + { + p.SetState(3130) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3131) + p.Match(TrinoParserIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 6: + localctx = NewIterateStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 6) + { + p.SetState(3133) + p.Match(TrinoParserITERATE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3134) + p.Identifier() + } + + case 7: + localctx = NewLeaveStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 7) + { + p.SetState(3135) + p.Match(TrinoParserLEAVE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3136) + p.Identifier() + } + + case 8: + localctx = NewCompoundStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 8) + { + p.SetState(3137) + p.Match(TrinoParserBEGIN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(3143) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 415, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(3138) + p.VariableDeclaration() + } + { + p.SetState(3139) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + p.SetState(3145) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 415, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + p.SetState(3147) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029691214146) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0) || ((int64((_la-333)) & ^0x3f) == 0 && ((int64(1)<<(_la-333))&15) != 0) { + { + p.SetState(3146) + p.SqlStatementList() + } + + } + { + p.SetState(3149) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 9: + localctx = NewLoopStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 9) + p.SetState(3153) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 417, p.GetParserRuleContext()) == 1 { + { + p.SetState(3150) + + var _x = p.Identifier() + + localctx.(*LoopStatementContext).label = _x + } + { + p.SetState(3151) + p.Match(TrinoParserCOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(3155) + p.Match(TrinoParserLOOP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3156) + p.SqlStatementList() + } + { + p.SetState(3157) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3158) + p.Match(TrinoParserLOOP_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 10: + localctx = NewWhileStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 10) + p.SetState(3163) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 418, p.GetParserRuleContext()) == 1 { + { + p.SetState(3160) + + var _x = p.Identifier() + + localctx.(*WhileStatementContext).label = _x + } + { + p.SetState(3161) + p.Match(TrinoParserCOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(3165) + p.Match(TrinoParserWHILE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3166) + p.Expression() + } + { + p.SetState(3167) + p.Match(TrinoParserDO_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3168) + p.SqlStatementList() + } + { + p.SetState(3169) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3170) + p.Match(TrinoParserWHILE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 11: + localctx = NewRepeatStatementContext(p, localctx) + p.EnterOuterAlt(localctx, 11) + p.SetState(3175) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 419, p.GetParserRuleContext()) == 1 { + { + p.SetState(3172) + + var _x = p.Identifier() + + localctx.(*RepeatStatementContext).label = _x + } + { + p.SetState(3173) + p.Match(TrinoParserCOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } else if p.HasError() { // JIM + goto errorExit + } + { + p.SetState(3177) + p.Match(TrinoParserREPEAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3178) + p.SqlStatementList() + } + { + p.SetState(3179) + p.Match(TrinoParserUNTIL_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3180) + p.Expression() + } + { + p.SetState(3181) + p.Match(TrinoParserEND_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3182) + p.Match(TrinoParserREPEAT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ICaseStatementWhenClauseContext is an interface to support dynamic dispatch. +type ICaseStatementWhenClauseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + WHEN_() antlr.TerminalNode + Expression() IExpressionContext + THEN_() antlr.TerminalNode + SqlStatementList() ISqlStatementListContext + + // IsCaseStatementWhenClauseContext differentiates from other interfaces. + IsCaseStatementWhenClauseContext() +} + +type CaseStatementWhenClauseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyCaseStatementWhenClauseContext() *CaseStatementWhenClauseContext { + var p = new(CaseStatementWhenClauseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_caseStatementWhenClause + return p +} + +func InitEmptyCaseStatementWhenClauseContext(p *CaseStatementWhenClauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_caseStatementWhenClause +} + +func (*CaseStatementWhenClauseContext) IsCaseStatementWhenClauseContext() {} + +func NewCaseStatementWhenClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CaseStatementWhenClauseContext { + var p = new(CaseStatementWhenClauseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_caseStatementWhenClause + + return p +} + +func (s *CaseStatementWhenClauseContext) GetParser() antlr.Parser { return s.parser } + +func (s *CaseStatementWhenClauseContext) WHEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHEN_, 0) +} + +func (s *CaseStatementWhenClauseContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *CaseStatementWhenClauseContext) THEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserTHEN_, 0) +} + +func (s *CaseStatementWhenClauseContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *CaseStatementWhenClauseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CaseStatementWhenClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *CaseStatementWhenClauseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCaseStatementWhenClause(s) + } +} + +func (s *CaseStatementWhenClauseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCaseStatementWhenClause(s) + } +} + +func (s *CaseStatementWhenClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCaseStatementWhenClause(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) CaseStatementWhenClause() (localctx ICaseStatementWhenClauseContext) { + localctx = NewCaseStatementWhenClauseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 224, TrinoParserRULE_caseStatementWhenClause) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3186) + p.Match(TrinoParserWHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3187) + p.Expression() + } + { + p.SetState(3188) + p.Match(TrinoParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3189) + p.SqlStatementList() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IElseIfClauseContext is an interface to support dynamic dispatch. +type IElseIfClauseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ELSEIF_() antlr.TerminalNode + Expression() IExpressionContext + THEN_() antlr.TerminalNode + SqlStatementList() ISqlStatementListContext + + // IsElseIfClauseContext differentiates from other interfaces. + IsElseIfClauseContext() +} + +type ElseIfClauseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyElseIfClauseContext() *ElseIfClauseContext { + var p = new(ElseIfClauseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_elseIfClause + return p +} + +func InitEmptyElseIfClauseContext(p *ElseIfClauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_elseIfClause +} + +func (*ElseIfClauseContext) IsElseIfClauseContext() {} + +func NewElseIfClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ElseIfClauseContext { + var p = new(ElseIfClauseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_elseIfClause + + return p +} + +func (s *ElseIfClauseContext) GetParser() antlr.Parser { return s.parser } + +func (s *ElseIfClauseContext) ELSEIF_() antlr.TerminalNode { + return s.GetToken(TrinoParserELSEIF_, 0) +} + +func (s *ElseIfClauseContext) Expression() IExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IExpressionContext) +} + +func (s *ElseIfClauseContext) THEN_() antlr.TerminalNode { + return s.GetToken(TrinoParserTHEN_, 0) +} + +func (s *ElseIfClauseContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *ElseIfClauseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ElseIfClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ElseIfClauseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterElseIfClause(s) + } +} + +func (s *ElseIfClauseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitElseIfClause(s) + } +} + +func (s *ElseIfClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitElseIfClause(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ElseIfClause() (localctx IElseIfClauseContext) { + localctx = NewElseIfClauseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 226, TrinoParserRULE_elseIfClause) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3191) + p.Match(TrinoParserELSEIF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3192) + p.Expression() + } + { + p.SetState(3193) + p.Match(TrinoParserTHEN_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3194) + p.SqlStatementList() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IElseClauseContext is an interface to support dynamic dispatch. +type IElseClauseContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ELSE_() antlr.TerminalNode + SqlStatementList() ISqlStatementListContext + + // IsElseClauseContext differentiates from other interfaces. + IsElseClauseContext() +} + +type ElseClauseContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyElseClauseContext() *ElseClauseContext { + var p = new(ElseClauseContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_elseClause + return p +} + +func InitEmptyElseClauseContext(p *ElseClauseContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_elseClause +} + +func (*ElseClauseContext) IsElseClauseContext() {} + +func NewElseClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ElseClauseContext { + var p = new(ElseClauseContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_elseClause + + return p +} + +func (s *ElseClauseContext) GetParser() antlr.Parser { return s.parser } + +func (s *ElseClauseContext) ELSE_() antlr.TerminalNode { + return s.GetToken(TrinoParserELSE_, 0) +} + +func (s *ElseClauseContext) SqlStatementList() ISqlStatementListContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISqlStatementListContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISqlStatementListContext) +} + +func (s *ElseClauseContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ElseClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ElseClauseContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterElseClause(s) + } +} + +func (s *ElseClauseContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitElseClause(s) + } +} + +func (s *ElseClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitElseClause(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) ElseClause() (localctx IElseClauseContext) { + localctx = NewElseClauseContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 228, TrinoParserRULE_elseClause) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3196) + p.Match(TrinoParserELSE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3197) + p.SqlStatementList() + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IVariableDeclarationContext is an interface to support dynamic dispatch. +type IVariableDeclarationContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + DECLARE_() antlr.TerminalNode + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + Type_() ITypeContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + DEFAULT_() antlr.TerminalNode + ValueExpression() IValueExpressionContext + + // IsVariableDeclarationContext differentiates from other interfaces. + IsVariableDeclarationContext() +} + +type VariableDeclarationContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyVariableDeclarationContext() *VariableDeclarationContext { + var p = new(VariableDeclarationContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_variableDeclaration + return p +} + +func InitEmptyVariableDeclarationContext(p *VariableDeclarationContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_variableDeclaration +} + +func (*VariableDeclarationContext) IsVariableDeclarationContext() {} + +func NewVariableDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VariableDeclarationContext { + var p = new(VariableDeclarationContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_variableDeclaration + + return p +} + +func (s *VariableDeclarationContext) GetParser() antlr.Parser { return s.parser } + +func (s *VariableDeclarationContext) DECLARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDECLARE_, 0) +} + +func (s *VariableDeclarationContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *VariableDeclarationContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *VariableDeclarationContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *VariableDeclarationContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *VariableDeclarationContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *VariableDeclarationContext) DEFAULT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFAULT_, 0) +} + +func (s *VariableDeclarationContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *VariableDeclarationContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *VariableDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *VariableDeclarationContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterVariableDeclaration(s) + } +} + +func (s *VariableDeclarationContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitVariableDeclaration(s) + } +} + +func (s *VariableDeclarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitVariableDeclaration(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) VariableDeclaration() (localctx IVariableDeclarationContext) { + localctx = NewVariableDeclarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 230, TrinoParserRULE_variableDeclaration) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3199) + p.Match(TrinoParserDECLARE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3200) + p.Identifier() + } + p.SetState(3205) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(3201) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3202) + p.Identifier() + } + + p.SetState(3207) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(3208) + p.type_(0) + } + p.SetState(3211) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserDEFAULT_ { + { + p.SetState(3209) + p.Match(TrinoParserDEFAULT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3210) + p.valueExpression(0) + } + + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// ISqlStatementListContext is an interface to support dynamic dispatch. +type ISqlStatementListContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + AllControlStatement() []IControlStatementContext + ControlStatement(i int) IControlStatementContext + AllSEMICOLON_() []antlr.TerminalNode + SEMICOLON_(i int) antlr.TerminalNode + + // IsSqlStatementListContext differentiates from other interfaces. + IsSqlStatementListContext() +} + +type SqlStatementListContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySqlStatementListContext() *SqlStatementListContext { + var p = new(SqlStatementListContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sqlStatementList + return p +} + +func InitEmptySqlStatementListContext(p *SqlStatementListContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_sqlStatementList +} + +func (*SqlStatementListContext) IsSqlStatementListContext() {} + +func NewSqlStatementListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SqlStatementListContext { + var p = new(SqlStatementListContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_sqlStatementList + + return p +} + +func (s *SqlStatementListContext) GetParser() antlr.Parser { return s.parser } + +func (s *SqlStatementListContext) AllControlStatement() []IControlStatementContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IControlStatementContext); ok { + len++ + } + } + + tst := make([]IControlStatementContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IControlStatementContext); ok { + tst[i] = t.(IControlStatementContext) + i++ + } + } + + return tst +} + +func (s *SqlStatementListContext) ControlStatement(i int) IControlStatementContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IControlStatementContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IControlStatementContext) +} + +func (s *SqlStatementListContext) AllSEMICOLON_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserSEMICOLON_) +} + +func (s *SqlStatementListContext) SEMICOLON_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserSEMICOLON_, i) +} + +func (s *SqlStatementListContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SqlStatementListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *SqlStatementListContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSqlStatementList(s) + } +} + +func (s *SqlStatementListContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSqlStatementList(s) + } +} + +func (s *SqlStatementListContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSqlStatementList(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) SqlStatementList() (localctx ISqlStatementListContext) { + localctx = NewSqlStatementListContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 232, TrinoParserRULE_sqlStatementList) + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(3216) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = 1 + for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + switch _alt { + case 1: + { + p.SetState(3213) + p.ControlStatement() + } + { + p.SetState(3214) + p.Match(TrinoParserSEMICOLON_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + p.SetState(3218) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 423, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPrivilegeContext is an interface to support dynamic dispatch. +type IPrivilegeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + CREATE_() antlr.TerminalNode + SELECT_() antlr.TerminalNode + DELETE_() antlr.TerminalNode + INSERT_() antlr.TerminalNode + UPDATE_() antlr.TerminalNode + + // IsPrivilegeContext differentiates from other interfaces. + IsPrivilegeContext() +} + +type PrivilegeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPrivilegeContext() *PrivilegeContext { + var p = new(PrivilegeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_privilege + return p +} + +func InitEmptyPrivilegeContext(p *PrivilegeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_privilege +} + +func (*PrivilegeContext) IsPrivilegeContext() {} + +func NewPrivilegeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrivilegeContext { + var p = new(PrivilegeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_privilege + + return p +} + +func (s *PrivilegeContext) GetParser() antlr.Parser { return s.parser } + +func (s *PrivilegeContext) CREATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCREATE_, 0) +} + +func (s *PrivilegeContext) SELECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserSELECT_, 0) +} + +func (s *PrivilegeContext) DELETE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDELETE_, 0) +} + +func (s *PrivilegeContext) INSERT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINSERT_, 0) +} + +func (s *PrivilegeContext) UPDATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUPDATE_, 0) +} + +func (s *PrivilegeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PrivilegeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *PrivilegeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterPrivilege(s) + } +} + +func (s *PrivilegeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitPrivilege(s) + } +} + +func (s *PrivilegeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitPrivilege(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Privilege() (localctx IPrivilegeContext) { + localctx = NewPrivilegeContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 234, TrinoParserRULE_privilege) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3220) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserCREATE_ || _la == TrinoParserDELETE_ || _la == TrinoParserINSERT_ || _la == TrinoParserSELECT_ || _la == TrinoParserUPDATE_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IQualifiedNameContext is an interface to support dynamic dispatch. +type IQualifiedNameContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + AllDOT_() []antlr.TerminalNode + DOT_(i int) antlr.TerminalNode + + // IsQualifiedNameContext differentiates from other interfaces. + IsQualifiedNameContext() +} + +type QualifiedNameContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyQualifiedNameContext() *QualifiedNameContext { + var p = new(QualifiedNameContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_qualifiedName + return p +} + +func InitEmptyQualifiedNameContext(p *QualifiedNameContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_qualifiedName +} + +func (*QualifiedNameContext) IsQualifiedNameContext() {} + +func NewQualifiedNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QualifiedNameContext { + var p = new(QualifiedNameContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_qualifiedName + + return p +} + +func (s *QualifiedNameContext) GetParser() antlr.Parser { return s.parser } + +func (s *QualifiedNameContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *QualifiedNameContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *QualifiedNameContext) AllDOT_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserDOT_) +} + +func (s *QualifiedNameContext) DOT_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserDOT_, i) +} + +func (s *QualifiedNameContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QualifiedNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *QualifiedNameContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQualifiedName(s) + } +} + +func (s *QualifiedNameContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQualifiedName(s) + } +} + +func (s *QualifiedNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQualifiedName(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) QualifiedName() (localctx IQualifiedNameContext) { + localctx = NewQualifiedNameContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 236, TrinoParserRULE_qualifiedName) + var _alt int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3222) + p.Identifier() + } + p.SetState(3227) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 424, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(3223) + p.Match(TrinoParserDOT_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3224) + p.Identifier() + } + + } + p.SetState(3229) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 424, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IQueryPeriodContext is an interface to support dynamic dispatch. +type IQueryPeriodContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetEnd returns the end rule contexts. + GetEnd() IValueExpressionContext + + // SetEnd sets the end rule contexts. + SetEnd(IValueExpressionContext) + + // Getter signatures + FOR_() antlr.TerminalNode + RangeType() IRangeTypeContext + AS_() antlr.TerminalNode + OF_() antlr.TerminalNode + ValueExpression() IValueExpressionContext + + // IsQueryPeriodContext differentiates from other interfaces. + IsQueryPeriodContext() +} + +type QueryPeriodContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + end IValueExpressionContext +} + +func NewEmptyQueryPeriodContext() *QueryPeriodContext { + var p = new(QueryPeriodContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryPeriod + return p +} + +func InitEmptyQueryPeriodContext(p *QueryPeriodContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_queryPeriod +} + +func (*QueryPeriodContext) IsQueryPeriodContext() {} + +func NewQueryPeriodContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QueryPeriodContext { + var p = new(QueryPeriodContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_queryPeriod + + return p +} + +func (s *QueryPeriodContext) GetParser() antlr.Parser { return s.parser } + +func (s *QueryPeriodContext) GetEnd() IValueExpressionContext { return s.end } + +func (s *QueryPeriodContext) SetEnd(v IValueExpressionContext) { s.end = v } + +func (s *QueryPeriodContext) FOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOR_, 0) +} + +func (s *QueryPeriodContext) RangeType() IRangeTypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IRangeTypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IRangeTypeContext) +} + +func (s *QueryPeriodContext) AS_() antlr.TerminalNode { + return s.GetToken(TrinoParserAS_, 0) +} + +func (s *QueryPeriodContext) OF_() antlr.TerminalNode { + return s.GetToken(TrinoParserOF_, 0) +} + +func (s *QueryPeriodContext) ValueExpression() IValueExpressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IValueExpressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IValueExpressionContext) +} + +func (s *QueryPeriodContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QueryPeriodContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *QueryPeriodContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQueryPeriod(s) + } +} + +func (s *QueryPeriodContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQueryPeriod(s) + } +} + +func (s *QueryPeriodContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQueryPeriod(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) QueryPeriod() (localctx IQueryPeriodContext) { + localctx = NewQueryPeriodContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 238, TrinoParserRULE_queryPeriod) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3230) + p.Match(TrinoParserFOR_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3231) + p.RangeType() + } + { + p.SetState(3232) + p.Match(TrinoParserAS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3233) + p.Match(TrinoParserOF_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3234) + + var _x = p.valueExpression(0) + + localctx.(*QueryPeriodContext).end = _x + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRangeTypeContext is an interface to support dynamic dispatch. +type IRangeTypeContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + TIMESTAMP_() antlr.TerminalNode + VERSION_() antlr.TerminalNode + + // IsRangeTypeContext differentiates from other interfaces. + IsRangeTypeContext() +} + +type RangeTypeContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRangeTypeContext() *RangeTypeContext { + var p = new(RangeTypeContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rangeType + return p +} + +func InitEmptyRangeTypeContext(p *RangeTypeContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_rangeType +} + +func (*RangeTypeContext) IsRangeTypeContext() {} + +func NewRangeTypeContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RangeTypeContext { + var p = new(RangeTypeContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_rangeType + + return p +} + +func (s *RangeTypeContext) GetParser() antlr.Parser { return s.parser } + +func (s *RangeTypeContext) TIMESTAMP_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIMESTAMP_, 0) +} + +func (s *RangeTypeContext) VERSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserVERSION_, 0) +} + +func (s *RangeTypeContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RangeTypeContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *RangeTypeContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRangeType(s) + } +} + +func (s *RangeTypeContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRangeType(s) + } +} + +func (s *RangeTypeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRangeType(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) RangeType() (localctx IRangeTypeContext) { + localctx = NewRangeTypeContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 240, TrinoParserRULE_rangeType) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3236) + _la = p.GetTokenStream().LA(1) + + if !(_la == TrinoParserTIMESTAMP_ || _la == TrinoParserVERSION_) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IGrantorContext is an interface to support dynamic dispatch. +type IGrantorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsGrantorContext differentiates from other interfaces. + IsGrantorContext() +} + +type GrantorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyGrantorContext() *GrantorContext { + var p = new(GrantorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_grantor + return p +} + +func InitEmptyGrantorContext(p *GrantorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_grantor +} + +func (*GrantorContext) IsGrantorContext() {} + +func NewGrantorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *GrantorContext { + var p = new(GrantorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_grantor + + return p +} + +func (s *GrantorContext) GetParser() antlr.Parser { return s.parser } + +func (s *GrantorContext) CopyAll(ctx *GrantorContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *GrantorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *GrantorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type CurrentUserGrantorContext struct { + GrantorContext +} + +func NewCurrentUserGrantorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CurrentUserGrantorContext { + var p = new(CurrentUserGrantorContext) + + InitEmptyGrantorContext(&p.GrantorContext) + p.parser = parser + p.CopyAll(ctx.(*GrantorContext)) + + return p +} + +func (s *CurrentUserGrantorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CurrentUserGrantorContext) CURRENT_USER_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_USER_, 0) +} + +func (s *CurrentUserGrantorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCurrentUserGrantor(s) + } +} + +func (s *CurrentUserGrantorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCurrentUserGrantor(s) + } +} + +func (s *CurrentUserGrantorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCurrentUserGrantor(s) + + default: + return t.VisitChildren(s) + } +} + +type SpecifiedPrincipalContext struct { + GrantorContext +} + +func NewSpecifiedPrincipalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SpecifiedPrincipalContext { + var p = new(SpecifiedPrincipalContext) + + InitEmptyGrantorContext(&p.GrantorContext) + p.parser = parser + p.CopyAll(ctx.(*GrantorContext)) + + return p +} + +func (s *SpecifiedPrincipalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *SpecifiedPrincipalContext) Principal() IPrincipalContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IPrincipalContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IPrincipalContext) +} + +func (s *SpecifiedPrincipalContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterSpecifiedPrincipal(s) + } +} + +func (s *SpecifiedPrincipalContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitSpecifiedPrincipal(s) + } +} + +func (s *SpecifiedPrincipalContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitSpecifiedPrincipal(s) + + default: + return t.VisitChildren(s) + } +} + +type CurrentRoleGrantorContext struct { + GrantorContext +} + +func NewCurrentRoleGrantorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CurrentRoleGrantorContext { + var p = new(CurrentRoleGrantorContext) + + InitEmptyGrantorContext(&p.GrantorContext) + p.parser = parser + p.CopyAll(ctx.(*GrantorContext)) + + return p +} + +func (s *CurrentRoleGrantorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *CurrentRoleGrantorContext) CURRENT_ROLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_ROLE_, 0) +} + +func (s *CurrentRoleGrantorContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterCurrentRoleGrantor(s) + } +} + +func (s *CurrentRoleGrantorContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitCurrentRoleGrantor(s) + } +} + +func (s *CurrentRoleGrantorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitCurrentRoleGrantor(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Grantor() (localctx IGrantorContext) { + localctx = NewGrantorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 242, TrinoParserRULE_grantor) + p.SetState(3241) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserABSENT_, TrinoParserADD_, TrinoParserADMIN_, TrinoParserAFTER_, TrinoParserALL_, TrinoParserANALYZE_, TrinoParserANY_, TrinoParserARRAY_, TrinoParserASC_, TrinoParserAT_, TrinoParserAUTHORIZATION_, TrinoParserBEGIN_, TrinoParserBERNOULLI_, TrinoParserBOTH_, TrinoParserCALL_, TrinoParserCALLED_, TrinoParserCASCADE_, TrinoParserCATALOG_, TrinoParserCATALOGS_, TrinoParserCOLUMN_, TrinoParserCOLUMNS_, TrinoParserCOMMENT_, TrinoParserCOMMIT_, TrinoParserCOMMITTED_, TrinoParserCONDITIONAL_, TrinoParserCOUNT_, TrinoParserCOPARTITION_, TrinoParserCURRENT_, TrinoParserDATA_, TrinoParserDATE_, TrinoParserDAY_, TrinoParserDECLARE_, TrinoParserDEFAULT_, TrinoParserDEFINE_, TrinoParserDEFINER_, TrinoParserDENY_, TrinoParserDESC_, TrinoParserDESCRIPTOR_, TrinoParserDETERMINISTIC_, TrinoParserDISTRIBUTED_, TrinoParserDO_, TrinoParserDOUBLE_, TrinoParserEMPTY_, TrinoParserELSEIF_, TrinoParserENCODING_, TrinoParserERROR_, TrinoParserEXCLUDING_, TrinoParserEXPLAIN_, TrinoParserFETCH_, TrinoParserFILTER_, TrinoParserFINAL_, TrinoParserFIRST_, TrinoParserFOLLOWING_, TrinoParserFORMAT_, TrinoParserFUNCTION_, TrinoParserFUNCTIONS_, TrinoParserGRACE_, TrinoParserGRANT_, TrinoParserGRANTED_, TrinoParserGRANTS_, TrinoParserGRAPHVIZ_, TrinoParserGROUPS_, TrinoParserHOUR_, TrinoParserIF_, TrinoParserIGNORE_, TrinoParserIMMEDIATE_, TrinoParserINCLUDING_, TrinoParserINITIAL_, TrinoParserINPUT_, TrinoParserINTERVAL_, TrinoParserINVOKER_, TrinoParserIO_, TrinoParserISOLATION_, TrinoParserITERATE_, TrinoParserJSON_, TrinoParserKEEP_, TrinoParserKEY_, TrinoParserKEYS_, TrinoParserLANGUAGE_, TrinoParserLAST_, TrinoParserLATERAL_, TrinoParserLEADING_, TrinoParserLEAVE_, TrinoParserLEVEL_, TrinoParserLIMIT_, TrinoParserLOCAL_, TrinoParserLOGICAL_, TrinoParserLOOP_, TrinoParserMAP_, TrinoParserMATCH_, TrinoParserMATCHED_, TrinoParserMATCHES_, TrinoParserMATCH_RECOGNIZE_, TrinoParserMATERIALIZED_, TrinoParserMEASURES_, TrinoParserMERGE_, TrinoParserMINUTE_, TrinoParserMONTH_, TrinoParserNESTED_, TrinoParserNEXT_, TrinoParserNFC_, TrinoParserNFD_, TrinoParserNFKC_, TrinoParserNFKD_, TrinoParserNO_, TrinoParserNONE_, TrinoParserNULLIF_, TrinoParserNULLS_, TrinoParserOBJECT_, TrinoParserOF_, TrinoParserOFFSET_, TrinoParserOMIT_, TrinoParserONE_, TrinoParserONLY_, TrinoParserOPTION_, TrinoParserORDINALITY_, TrinoParserOUTPUT_, TrinoParserOVER_, TrinoParserOVERFLOW_, TrinoParserPARTITION_, TrinoParserPARTITIONS_, TrinoParserPASSING_, TrinoParserPAST_, TrinoParserPATH_, TrinoParserPATTERN_, TrinoParserPER_, TrinoParserPERIOD_, TrinoParserPERMUTE_, TrinoParserPLAN_, TrinoParserPOSITION_, TrinoParserPRECEDING_, TrinoParserPRECISION_, TrinoParserPRIVILEGES_, TrinoParserPROPERTIES_, TrinoParserPRUNE_, TrinoParserQUOTES_, TrinoParserRANGE_, TrinoParserREAD_, TrinoParserREFRESH_, TrinoParserRENAME_, TrinoParserREPEAT_, TrinoParserREPEATABLE_, TrinoParserREPLACE_, TrinoParserRESET_, TrinoParserRESPECT_, TrinoParserRESTRICT_, TrinoParserRETURN_, TrinoParserRETURNING_, TrinoParserRETURNS_, TrinoParserREVOKE_, TrinoParserROLE_, TrinoParserROLES_, TrinoParserROLLBACK_, TrinoParserROW_, TrinoParserROWS_, TrinoParserRUNNING_, TrinoParserSCALAR_, TrinoParserSCHEMA_, TrinoParserSCHEMAS_, TrinoParserSECOND_, TrinoParserSECURITY_, TrinoParserSEEK_, TrinoParserSERIALIZABLE_, TrinoParserSESSION_, TrinoParserSET_, TrinoParserSETS_, TrinoParserSHOW_, TrinoParserSOME_, TrinoParserSTART_, TrinoParserSTATS_, TrinoParserSUBSET_, TrinoParserSUBSTRING_, TrinoParserSYSTEM_, TrinoParserTABLES_, TrinoParserTABLESAMPLE_, TrinoParserTEXT_, TrinoParserTEXT_STRING_, TrinoParserTIES_, TrinoParserTIME_, TrinoParserTIMESTAMP_, TrinoParserTO_, TrinoParserTRAILING_, TrinoParserTRANSACTION_, TrinoParserTRUNCATE_, TrinoParserTRY_CAST_, TrinoParserTYPE_, TrinoParserUNBOUNDED_, TrinoParserUNCOMMITTED_, TrinoParserUNCONDITIONAL_, TrinoParserUNIQUE_, TrinoParserUNKNOWN_, TrinoParserUNMATCHED_, TrinoParserUNTIL_, TrinoParserUPDATE_, TrinoParserUSE_, TrinoParserUSER_, TrinoParserUTF16_, TrinoParserUTF32_, TrinoParserUTF8_, TrinoParserVALIDATE_, TrinoParserVALUE_, TrinoParserVERBOSE_, TrinoParserVERSION_, TrinoParserVIEW_, TrinoParserWHILE_, TrinoParserWINDOW_, TrinoParserWITHIN_, TrinoParserWITHOUT_, TrinoParserWORK_, TrinoParserWRAPPER_, TrinoParserWRITE_, TrinoParserYEAR_, TrinoParserZONE_, TrinoParserIDENTIFIER_, TrinoParserDIGIT_IDENTIFIER_, TrinoParserQUOTED_IDENTIFIER_, TrinoParserBACKQUOTED_IDENTIFIER_: + localctx = NewSpecifiedPrincipalContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3238) + p.Principal() + } + + case TrinoParserCURRENT_USER_: + localctx = NewCurrentUserGrantorContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3239) + p.Match(TrinoParserCURRENT_USER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserCURRENT_ROLE_: + localctx = NewCurrentRoleGrantorContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(3240) + p.Match(TrinoParserCURRENT_ROLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IPrincipalContext is an interface to support dynamic dispatch. +type IPrincipalContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsPrincipalContext differentiates from other interfaces. + IsPrincipalContext() +} + +type PrincipalContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyPrincipalContext() *PrincipalContext { + var p = new(PrincipalContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_principal + return p +} + +func InitEmptyPrincipalContext(p *PrincipalContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_principal +} + +func (*PrincipalContext) IsPrincipalContext() {} + +func NewPrincipalContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PrincipalContext { + var p = new(PrincipalContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_principal + + return p +} + +func (s *PrincipalContext) GetParser() antlr.Parser { return s.parser } + +func (s *PrincipalContext) CopyAll(ctx *PrincipalContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *PrincipalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PrincipalContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type UnspecifiedPrincipalContext struct { + PrincipalContext +} + +func NewUnspecifiedPrincipalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnspecifiedPrincipalContext { + var p = new(UnspecifiedPrincipalContext) + + InitEmptyPrincipalContext(&p.PrincipalContext) + p.parser = parser + p.CopyAll(ctx.(*PrincipalContext)) + + return p +} + +func (s *UnspecifiedPrincipalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UnspecifiedPrincipalContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *UnspecifiedPrincipalContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUnspecifiedPrincipal(s) + } +} + +func (s *UnspecifiedPrincipalContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUnspecifiedPrincipal(s) + } +} + +func (s *UnspecifiedPrincipalContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUnspecifiedPrincipal(s) + + default: + return t.VisitChildren(s) + } +} + +type UserPrincipalContext struct { + PrincipalContext +} + +func NewUserPrincipalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UserPrincipalContext { + var p = new(UserPrincipalContext) + + InitEmptyPrincipalContext(&p.PrincipalContext) + p.parser = parser + p.CopyAll(ctx.(*PrincipalContext)) + + return p +} + +func (s *UserPrincipalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UserPrincipalContext) USER_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSER_, 0) +} + +func (s *UserPrincipalContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *UserPrincipalContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUserPrincipal(s) + } +} + +func (s *UserPrincipalContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUserPrincipal(s) + } +} + +func (s *UserPrincipalContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUserPrincipal(s) + + default: + return t.VisitChildren(s) + } +} + +type RolePrincipalContext struct { + PrincipalContext +} + +func NewRolePrincipalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RolePrincipalContext { + var p = new(RolePrincipalContext) + + InitEmptyPrincipalContext(&p.PrincipalContext) + p.parser = parser + p.CopyAll(ctx.(*PrincipalContext)) + + return p +} + +func (s *RolePrincipalContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RolePrincipalContext) ROLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLE_, 0) +} + +func (s *RolePrincipalContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *RolePrincipalContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRolePrincipal(s) + } +} + +func (s *RolePrincipalContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRolePrincipal(s) + } +} + +func (s *RolePrincipalContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRolePrincipal(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Principal() (localctx IPrincipalContext) { + localctx = NewPrincipalContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 244, TrinoParserRULE_principal) + p.SetState(3248) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 426, p.GetParserRuleContext()) { + case 1: + localctx = NewUnspecifiedPrincipalContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3243) + p.Identifier() + } + + case 2: + localctx = NewUserPrincipalContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3244) + p.Match(TrinoParserUSER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3245) + p.Identifier() + } + + case 3: + localctx = NewRolePrincipalContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(3246) + p.Match(TrinoParserROLE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3247) + p.Identifier() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IRolesContext is an interface to support dynamic dispatch. +type IRolesContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + AllCOMMA_() []antlr.TerminalNode + COMMA_(i int) antlr.TerminalNode + + // IsRolesContext differentiates from other interfaces. + IsRolesContext() +} + +type RolesContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyRolesContext() *RolesContext { + var p = new(RolesContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_roles + return p +} + +func InitEmptyRolesContext(p *RolesContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_roles +} + +func (*RolesContext) IsRolesContext() {} + +func NewRolesContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *RolesContext { + var p = new(RolesContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_roles + + return p +} + +func (s *RolesContext) GetParser() antlr.Parser { return s.parser } + +func (s *RolesContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *RolesContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *RolesContext) AllCOMMA_() []antlr.TerminalNode { + return s.GetTokens(TrinoParserCOMMA_) +} + +func (s *RolesContext) COMMA_(i int) antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMA_, i) +} + +func (s *RolesContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *RolesContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *RolesContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterRoles(s) + } +} + +func (s *RolesContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitRoles(s) + } +} + +func (s *RolesContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitRoles(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Roles() (localctx IRolesContext) { + localctx = NewRolesContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 246, TrinoParserRULE_roles) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3250) + p.Identifier() + } + p.SetState(3255) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == TrinoParserCOMMA_ { + { + p.SetState(3251) + p.Match(TrinoParserCOMMA_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(3252) + p.Identifier() + } + + p.SetState(3257) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IIdentifierContext is an interface to support dynamic dispatch. +type IIdentifierContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsIdentifierContext differentiates from other interfaces. + IsIdentifierContext() +} + +type IdentifierContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyIdentifierContext() *IdentifierContext { + var p = new(IdentifierContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_identifier + return p +} + +func InitEmptyIdentifierContext(p *IdentifierContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_identifier +} + +func (*IdentifierContext) IsIdentifierContext() {} + +func NewIdentifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IdentifierContext { + var p = new(IdentifierContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_identifier + + return p +} + +func (s *IdentifierContext) GetParser() antlr.Parser { return s.parser } + +func (s *IdentifierContext) CopyAll(ctx *IdentifierContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *IdentifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IdentifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type BackQuotedIdentifierContext struct { + IdentifierContext +} + +func NewBackQuotedIdentifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BackQuotedIdentifierContext { + var p = new(BackQuotedIdentifierContext) + + InitEmptyIdentifierContext(&p.IdentifierContext) + p.parser = parser + p.CopyAll(ctx.(*IdentifierContext)) + + return p +} + +func (s *BackQuotedIdentifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *BackQuotedIdentifierContext) BACKQUOTED_IDENTIFIER_() antlr.TerminalNode { + return s.GetToken(TrinoParserBACKQUOTED_IDENTIFIER_, 0) +} + +func (s *BackQuotedIdentifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterBackQuotedIdentifier(s) + } +} + +func (s *BackQuotedIdentifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitBackQuotedIdentifier(s) + } +} + +func (s *BackQuotedIdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitBackQuotedIdentifier(s) + + default: + return t.VisitChildren(s) + } +} + +type QuotedIdentifierContext struct { + IdentifierContext +} + +func NewQuotedIdentifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *QuotedIdentifierContext { + var p = new(QuotedIdentifierContext) + + InitEmptyIdentifierContext(&p.IdentifierContext) + p.parser = parser + p.CopyAll(ctx.(*IdentifierContext)) + + return p +} + +func (s *QuotedIdentifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *QuotedIdentifierContext) QUOTED_IDENTIFIER_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUOTED_IDENTIFIER_, 0) +} + +func (s *QuotedIdentifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterQuotedIdentifier(s) + } +} + +func (s *QuotedIdentifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitQuotedIdentifier(s) + } +} + +func (s *QuotedIdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitQuotedIdentifier(s) + + default: + return t.VisitChildren(s) + } +} + +type DigitIdentifierContext struct { + IdentifierContext +} + +func NewDigitIdentifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DigitIdentifierContext { + var p = new(DigitIdentifierContext) + + InitEmptyIdentifierContext(&p.IdentifierContext) + p.parser = parser + p.CopyAll(ctx.(*IdentifierContext)) + + return p +} + +func (s *DigitIdentifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DigitIdentifierContext) DIGIT_IDENTIFIER_() antlr.TerminalNode { + return s.GetToken(TrinoParserDIGIT_IDENTIFIER_, 0) +} + +func (s *DigitIdentifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDigitIdentifier(s) + } +} + +func (s *DigitIdentifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDigitIdentifier(s) + } +} + +func (s *DigitIdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDigitIdentifier(s) + + default: + return t.VisitChildren(s) + } +} + +type UnquotedIdentifierContext struct { + IdentifierContext +} + +func NewUnquotedIdentifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnquotedIdentifierContext { + var p = new(UnquotedIdentifierContext) + + InitEmptyIdentifierContext(&p.IdentifierContext) + p.parser = parser + p.CopyAll(ctx.(*IdentifierContext)) + + return p +} + +func (s *UnquotedIdentifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *UnquotedIdentifierContext) IDENTIFIER_() antlr.TerminalNode { + return s.GetToken(TrinoParserIDENTIFIER_, 0) +} + +func (s *UnquotedIdentifierContext) NonReserved() INonReservedContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(INonReservedContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(INonReservedContext) +} + +func (s *UnquotedIdentifierContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterUnquotedIdentifier(s) + } +} + +func (s *UnquotedIdentifierContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitUnquotedIdentifier(s) + } +} + +func (s *UnquotedIdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitUnquotedIdentifier(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Identifier() (localctx IIdentifierContext) { + localctx = NewIdentifierContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 248, TrinoParserRULE_identifier) + p.SetState(3263) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserIDENTIFIER_: + localctx = NewUnquotedIdentifierContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3258) + p.Match(TrinoParserIDENTIFIER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserQUOTED_IDENTIFIER_: + localctx = NewQuotedIdentifierContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3259) + p.Match(TrinoParserQUOTED_IDENTIFIER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserABSENT_, TrinoParserADD_, TrinoParserADMIN_, TrinoParserAFTER_, TrinoParserALL_, TrinoParserANALYZE_, TrinoParserANY_, TrinoParserARRAY_, TrinoParserASC_, TrinoParserAT_, TrinoParserAUTHORIZATION_, TrinoParserBEGIN_, TrinoParserBERNOULLI_, TrinoParserBOTH_, TrinoParserCALL_, TrinoParserCALLED_, TrinoParserCASCADE_, TrinoParserCATALOG_, TrinoParserCATALOGS_, TrinoParserCOLUMN_, TrinoParserCOLUMNS_, TrinoParserCOMMENT_, TrinoParserCOMMIT_, TrinoParserCOMMITTED_, TrinoParserCONDITIONAL_, TrinoParserCOUNT_, TrinoParserCOPARTITION_, TrinoParserCURRENT_, TrinoParserDATA_, TrinoParserDATE_, TrinoParserDAY_, TrinoParserDECLARE_, TrinoParserDEFAULT_, TrinoParserDEFINE_, TrinoParserDEFINER_, TrinoParserDENY_, TrinoParserDESC_, TrinoParserDESCRIPTOR_, TrinoParserDETERMINISTIC_, TrinoParserDISTRIBUTED_, TrinoParserDO_, TrinoParserDOUBLE_, TrinoParserEMPTY_, TrinoParserELSEIF_, TrinoParserENCODING_, TrinoParserERROR_, TrinoParserEXCLUDING_, TrinoParserEXPLAIN_, TrinoParserFETCH_, TrinoParserFILTER_, TrinoParserFINAL_, TrinoParserFIRST_, TrinoParserFOLLOWING_, TrinoParserFORMAT_, TrinoParserFUNCTION_, TrinoParserFUNCTIONS_, TrinoParserGRACE_, TrinoParserGRANT_, TrinoParserGRANTED_, TrinoParserGRANTS_, TrinoParserGRAPHVIZ_, TrinoParserGROUPS_, TrinoParserHOUR_, TrinoParserIF_, TrinoParserIGNORE_, TrinoParserIMMEDIATE_, TrinoParserINCLUDING_, TrinoParserINITIAL_, TrinoParserINPUT_, TrinoParserINTERVAL_, TrinoParserINVOKER_, TrinoParserIO_, TrinoParserISOLATION_, TrinoParserITERATE_, TrinoParserJSON_, TrinoParserKEEP_, TrinoParserKEY_, TrinoParserKEYS_, TrinoParserLANGUAGE_, TrinoParserLAST_, TrinoParserLATERAL_, TrinoParserLEADING_, TrinoParserLEAVE_, TrinoParserLEVEL_, TrinoParserLIMIT_, TrinoParserLOCAL_, TrinoParserLOGICAL_, TrinoParserLOOP_, TrinoParserMAP_, TrinoParserMATCH_, TrinoParserMATCHED_, TrinoParserMATCHES_, TrinoParserMATCH_RECOGNIZE_, TrinoParserMATERIALIZED_, TrinoParserMEASURES_, TrinoParserMERGE_, TrinoParserMINUTE_, TrinoParserMONTH_, TrinoParserNESTED_, TrinoParserNEXT_, TrinoParserNFC_, TrinoParserNFD_, TrinoParserNFKC_, TrinoParserNFKD_, TrinoParserNO_, TrinoParserNONE_, TrinoParserNULLIF_, TrinoParserNULLS_, TrinoParserOBJECT_, TrinoParserOF_, TrinoParserOFFSET_, TrinoParserOMIT_, TrinoParserONE_, TrinoParserONLY_, TrinoParserOPTION_, TrinoParserORDINALITY_, TrinoParserOUTPUT_, TrinoParserOVER_, TrinoParserOVERFLOW_, TrinoParserPARTITION_, TrinoParserPARTITIONS_, TrinoParserPASSING_, TrinoParserPAST_, TrinoParserPATH_, TrinoParserPATTERN_, TrinoParserPER_, TrinoParserPERIOD_, TrinoParserPERMUTE_, TrinoParserPLAN_, TrinoParserPOSITION_, TrinoParserPRECEDING_, TrinoParserPRECISION_, TrinoParserPRIVILEGES_, TrinoParserPROPERTIES_, TrinoParserPRUNE_, TrinoParserQUOTES_, TrinoParserRANGE_, TrinoParserREAD_, TrinoParserREFRESH_, TrinoParserRENAME_, TrinoParserREPEAT_, TrinoParserREPEATABLE_, TrinoParserREPLACE_, TrinoParserRESET_, TrinoParserRESPECT_, TrinoParserRESTRICT_, TrinoParserRETURN_, TrinoParserRETURNING_, TrinoParserRETURNS_, TrinoParserREVOKE_, TrinoParserROLE_, TrinoParserROLES_, TrinoParserROLLBACK_, TrinoParserROW_, TrinoParserROWS_, TrinoParserRUNNING_, TrinoParserSCALAR_, TrinoParserSCHEMA_, TrinoParserSCHEMAS_, TrinoParserSECOND_, TrinoParserSECURITY_, TrinoParserSEEK_, TrinoParserSERIALIZABLE_, TrinoParserSESSION_, TrinoParserSET_, TrinoParserSETS_, TrinoParserSHOW_, TrinoParserSOME_, TrinoParserSTART_, TrinoParserSTATS_, TrinoParserSUBSET_, TrinoParserSUBSTRING_, TrinoParserSYSTEM_, TrinoParserTABLES_, TrinoParserTABLESAMPLE_, TrinoParserTEXT_, TrinoParserTEXT_STRING_, TrinoParserTIES_, TrinoParserTIME_, TrinoParserTIMESTAMP_, TrinoParserTO_, TrinoParserTRAILING_, TrinoParserTRANSACTION_, TrinoParserTRUNCATE_, TrinoParserTRY_CAST_, TrinoParserTYPE_, TrinoParserUNBOUNDED_, TrinoParserUNCOMMITTED_, TrinoParserUNCONDITIONAL_, TrinoParserUNIQUE_, TrinoParserUNKNOWN_, TrinoParserUNMATCHED_, TrinoParserUNTIL_, TrinoParserUPDATE_, TrinoParserUSE_, TrinoParserUSER_, TrinoParserUTF16_, TrinoParserUTF32_, TrinoParserUTF8_, TrinoParserVALIDATE_, TrinoParserVALUE_, TrinoParserVERBOSE_, TrinoParserVERSION_, TrinoParserVIEW_, TrinoParserWHILE_, TrinoParserWINDOW_, TrinoParserWITHIN_, TrinoParserWITHOUT_, TrinoParserWORK_, TrinoParserWRAPPER_, TrinoParserWRITE_, TrinoParserYEAR_, TrinoParserZONE_: + localctx = NewUnquotedIdentifierContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(3260) + p.NonReserved() + } + + case TrinoParserBACKQUOTED_IDENTIFIER_: + localctx = NewBackQuotedIdentifierContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(3261) + p.Match(TrinoParserBACKQUOTED_IDENTIFIER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case TrinoParserDIGIT_IDENTIFIER_: + localctx = NewDigitIdentifierContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(3262) + p.Match(TrinoParserDIGIT_IDENTIFIER_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// INumberContext is an interface to support dynamic dispatch. +type INumberContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsNumberContext differentiates from other interfaces. + IsNumberContext() +} + +type NumberContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyNumberContext() *NumberContext { + var p = new(NumberContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_number + return p +} + +func InitEmptyNumberContext(p *NumberContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_number +} + +func (*NumberContext) IsNumberContext() {} + +func NewNumberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NumberContext { + var p = new(NumberContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_number + + return p +} + +func (s *NumberContext) GetParser() antlr.Parser { return s.parser } + +func (s *NumberContext) CopyAll(ctx *NumberContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *NumberContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NumberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type DecimalLiteralContext struct { + NumberContext +} + +func NewDecimalLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DecimalLiteralContext { + var p = new(DecimalLiteralContext) + + InitEmptyNumberContext(&p.NumberContext) + p.parser = parser + p.CopyAll(ctx.(*NumberContext)) + + return p +} + +func (s *DecimalLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DecimalLiteralContext) DECIMAL_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDECIMAL_VALUE_, 0) +} + +func (s *DecimalLiteralContext) MINUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUS_, 0) +} + +func (s *DecimalLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDecimalLiteral(s) + } +} + +func (s *DecimalLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDecimalLiteral(s) + } +} + +func (s *DecimalLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDecimalLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type DoubleLiteralContext struct { + NumberContext +} + +func NewDoubleLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *DoubleLiteralContext { + var p = new(DoubleLiteralContext) + + InitEmptyNumberContext(&p.NumberContext) + p.parser = parser + p.CopyAll(ctx.(*NumberContext)) + + return p +} + +func (s *DoubleLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *DoubleLiteralContext) DOUBLE_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOUBLE_VALUE_, 0) +} + +func (s *DoubleLiteralContext) MINUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUS_, 0) +} + +func (s *DoubleLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterDoubleLiteral(s) + } +} + +func (s *DoubleLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitDoubleLiteral(s) + } +} + +func (s *DoubleLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitDoubleLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +type IntegerLiteralContext struct { + NumberContext +} + +func NewIntegerLiteralContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IntegerLiteralContext { + var p = new(IntegerLiteralContext) + + InitEmptyNumberContext(&p.NumberContext) + p.parser = parser + p.CopyAll(ctx.(*NumberContext)) + + return p +} + +func (s *IntegerLiteralContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IntegerLiteralContext) INTEGER_VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTEGER_VALUE_, 0) +} + +func (s *IntegerLiteralContext) MINUS_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUS_, 0) +} + +func (s *IntegerLiteralContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIntegerLiteral(s) + } +} + +func (s *IntegerLiteralContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIntegerLiteral(s) + } +} + +func (s *IntegerLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIntegerLiteral(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) Number() (localctx INumberContext) { + localctx = NewNumberContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 250, TrinoParserRULE_number) + var _la int + + p.SetState(3277) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 432, p.GetParserRuleContext()) { + case 1: + localctx = NewDecimalLiteralContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + p.SetState(3266) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserMINUS_ { + { + p.SetState(3265) + p.Match(TrinoParserMINUS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(3268) + p.Match(TrinoParserDECIMAL_VALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + localctx = NewDoubleLiteralContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + p.SetState(3270) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserMINUS_ { + { + p.SetState(3269) + p.Match(TrinoParserMINUS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(3272) + p.Match(TrinoParserDOUBLE_VALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + localctx = NewIntegerLiteralContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + p.SetState(3274) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == TrinoParserMINUS_ { + { + p.SetState(3273) + p.Match(TrinoParserMINUS_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(3276) + p.Match(TrinoParserINTEGER_VALUE_) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// IAuthorizationUserContext is an interface to support dynamic dispatch. +type IAuthorizationUserContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsAuthorizationUserContext differentiates from other interfaces. + IsAuthorizationUserContext() +} + +type AuthorizationUserContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyAuthorizationUserContext() *AuthorizationUserContext { + var p = new(AuthorizationUserContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_authorizationUser + return p +} + +func InitEmptyAuthorizationUserContext(p *AuthorizationUserContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_authorizationUser +} + +func (*AuthorizationUserContext) IsAuthorizationUserContext() {} + +func NewAuthorizationUserContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AuthorizationUserContext { + var p = new(AuthorizationUserContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_authorizationUser + + return p +} + +func (s *AuthorizationUserContext) GetParser() antlr.Parser { return s.parser } + +func (s *AuthorizationUserContext) CopyAll(ctx *AuthorizationUserContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *AuthorizationUserContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *AuthorizationUserContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type StringUserContext struct { + AuthorizationUserContext +} + +func NewStringUserContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StringUserContext { + var p = new(StringUserContext) + + InitEmptyAuthorizationUserContext(&p.AuthorizationUserContext) + p.parser = parser + p.CopyAll(ctx.(*AuthorizationUserContext)) + + return p +} + +func (s *StringUserContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *StringUserContext) String_() IString_Context { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IString_Context); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IString_Context) +} + +func (s *StringUserContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterStringUser(s) + } +} + +func (s *StringUserContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitStringUser(s) + } +} + +func (s *StringUserContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitStringUser(s) + + default: + return t.VisitChildren(s) + } +} + +type IdentifierUserContext struct { + AuthorizationUserContext +} + +func NewIdentifierUserContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IdentifierUserContext { + var p = new(IdentifierUserContext) + + InitEmptyAuthorizationUserContext(&p.AuthorizationUserContext) + p.parser = parser + p.CopyAll(ctx.(*AuthorizationUserContext)) + + return p +} + +func (s *IdentifierUserContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *IdentifierUserContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *IdentifierUserContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterIdentifierUser(s) + } +} + +func (s *IdentifierUserContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitIdentifierUser(s) + } +} + +func (s *IdentifierUserContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitIdentifierUser(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) AuthorizationUser() (localctx IAuthorizationUserContext) { + localctx = NewAuthorizationUserContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 252, TrinoParserRULE_authorizationUser) + p.SetState(3281) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case TrinoParserABSENT_, TrinoParserADD_, TrinoParserADMIN_, TrinoParserAFTER_, TrinoParserALL_, TrinoParserANALYZE_, TrinoParserANY_, TrinoParserARRAY_, TrinoParserASC_, TrinoParserAT_, TrinoParserAUTHORIZATION_, TrinoParserBEGIN_, TrinoParserBERNOULLI_, TrinoParserBOTH_, TrinoParserCALL_, TrinoParserCALLED_, TrinoParserCASCADE_, TrinoParserCATALOG_, TrinoParserCATALOGS_, TrinoParserCOLUMN_, TrinoParserCOLUMNS_, TrinoParserCOMMENT_, TrinoParserCOMMIT_, TrinoParserCOMMITTED_, TrinoParserCONDITIONAL_, TrinoParserCOUNT_, TrinoParserCOPARTITION_, TrinoParserCURRENT_, TrinoParserDATA_, TrinoParserDATE_, TrinoParserDAY_, TrinoParserDECLARE_, TrinoParserDEFAULT_, TrinoParserDEFINE_, TrinoParserDEFINER_, TrinoParserDENY_, TrinoParserDESC_, TrinoParserDESCRIPTOR_, TrinoParserDETERMINISTIC_, TrinoParserDISTRIBUTED_, TrinoParserDO_, TrinoParserDOUBLE_, TrinoParserEMPTY_, TrinoParserELSEIF_, TrinoParserENCODING_, TrinoParserERROR_, TrinoParserEXCLUDING_, TrinoParserEXPLAIN_, TrinoParserFETCH_, TrinoParserFILTER_, TrinoParserFINAL_, TrinoParserFIRST_, TrinoParserFOLLOWING_, TrinoParserFORMAT_, TrinoParserFUNCTION_, TrinoParserFUNCTIONS_, TrinoParserGRACE_, TrinoParserGRANT_, TrinoParserGRANTED_, TrinoParserGRANTS_, TrinoParserGRAPHVIZ_, TrinoParserGROUPS_, TrinoParserHOUR_, TrinoParserIF_, TrinoParserIGNORE_, TrinoParserIMMEDIATE_, TrinoParserINCLUDING_, TrinoParserINITIAL_, TrinoParserINPUT_, TrinoParserINTERVAL_, TrinoParserINVOKER_, TrinoParserIO_, TrinoParserISOLATION_, TrinoParserITERATE_, TrinoParserJSON_, TrinoParserKEEP_, TrinoParserKEY_, TrinoParserKEYS_, TrinoParserLANGUAGE_, TrinoParserLAST_, TrinoParserLATERAL_, TrinoParserLEADING_, TrinoParserLEAVE_, TrinoParserLEVEL_, TrinoParserLIMIT_, TrinoParserLOCAL_, TrinoParserLOGICAL_, TrinoParserLOOP_, TrinoParserMAP_, TrinoParserMATCH_, TrinoParserMATCHED_, TrinoParserMATCHES_, TrinoParserMATCH_RECOGNIZE_, TrinoParserMATERIALIZED_, TrinoParserMEASURES_, TrinoParserMERGE_, TrinoParserMINUTE_, TrinoParserMONTH_, TrinoParserNESTED_, TrinoParserNEXT_, TrinoParserNFC_, TrinoParserNFD_, TrinoParserNFKC_, TrinoParserNFKD_, TrinoParserNO_, TrinoParserNONE_, TrinoParserNULLIF_, TrinoParserNULLS_, TrinoParserOBJECT_, TrinoParserOF_, TrinoParserOFFSET_, TrinoParserOMIT_, TrinoParserONE_, TrinoParserONLY_, TrinoParserOPTION_, TrinoParserORDINALITY_, TrinoParserOUTPUT_, TrinoParserOVER_, TrinoParserOVERFLOW_, TrinoParserPARTITION_, TrinoParserPARTITIONS_, TrinoParserPASSING_, TrinoParserPAST_, TrinoParserPATH_, TrinoParserPATTERN_, TrinoParserPER_, TrinoParserPERIOD_, TrinoParserPERMUTE_, TrinoParserPLAN_, TrinoParserPOSITION_, TrinoParserPRECEDING_, TrinoParserPRECISION_, TrinoParserPRIVILEGES_, TrinoParserPROPERTIES_, TrinoParserPRUNE_, TrinoParserQUOTES_, TrinoParserRANGE_, TrinoParserREAD_, TrinoParserREFRESH_, TrinoParserRENAME_, TrinoParserREPEAT_, TrinoParserREPEATABLE_, TrinoParserREPLACE_, TrinoParserRESET_, TrinoParserRESPECT_, TrinoParserRESTRICT_, TrinoParserRETURN_, TrinoParserRETURNING_, TrinoParserRETURNS_, TrinoParserREVOKE_, TrinoParserROLE_, TrinoParserROLES_, TrinoParserROLLBACK_, TrinoParserROW_, TrinoParserROWS_, TrinoParserRUNNING_, TrinoParserSCALAR_, TrinoParserSCHEMA_, TrinoParserSCHEMAS_, TrinoParserSECOND_, TrinoParserSECURITY_, TrinoParserSEEK_, TrinoParserSERIALIZABLE_, TrinoParserSESSION_, TrinoParserSET_, TrinoParserSETS_, TrinoParserSHOW_, TrinoParserSOME_, TrinoParserSTART_, TrinoParserSTATS_, TrinoParserSUBSET_, TrinoParserSUBSTRING_, TrinoParserSYSTEM_, TrinoParserTABLES_, TrinoParserTABLESAMPLE_, TrinoParserTEXT_, TrinoParserTEXT_STRING_, TrinoParserTIES_, TrinoParserTIME_, TrinoParserTIMESTAMP_, TrinoParserTO_, TrinoParserTRAILING_, TrinoParserTRANSACTION_, TrinoParserTRUNCATE_, TrinoParserTRY_CAST_, TrinoParserTYPE_, TrinoParserUNBOUNDED_, TrinoParserUNCOMMITTED_, TrinoParserUNCONDITIONAL_, TrinoParserUNIQUE_, TrinoParserUNKNOWN_, TrinoParserUNMATCHED_, TrinoParserUNTIL_, TrinoParserUPDATE_, TrinoParserUSE_, TrinoParserUSER_, TrinoParserUTF16_, TrinoParserUTF32_, TrinoParserUTF8_, TrinoParserVALIDATE_, TrinoParserVALUE_, TrinoParserVERBOSE_, TrinoParserVERSION_, TrinoParserVIEW_, TrinoParserWHILE_, TrinoParserWINDOW_, TrinoParserWITHIN_, TrinoParserWITHOUT_, TrinoParserWORK_, TrinoParserWRAPPER_, TrinoParserWRITE_, TrinoParserYEAR_, TrinoParserZONE_, TrinoParserIDENTIFIER_, TrinoParserDIGIT_IDENTIFIER_, TrinoParserQUOTED_IDENTIFIER_, TrinoParserBACKQUOTED_IDENTIFIER_: + localctx = NewIdentifierUserContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3279) + p.Identifier() + } + + case TrinoParserSTRING_, TrinoParserUNICODE_STRING_: + localctx = NewStringUserContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(3280) + p.String_() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +// INonReservedContext is an interface to support dynamic dispatch. +type INonReservedContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + ABSENT_() antlr.TerminalNode + ADD_() antlr.TerminalNode + ADMIN_() antlr.TerminalNode + AFTER_() antlr.TerminalNode + ALL_() antlr.TerminalNode + ANALYZE_() antlr.TerminalNode + ANY_() antlr.TerminalNode + ARRAY_() antlr.TerminalNode + ASC_() antlr.TerminalNode + AT_() antlr.TerminalNode + AUTHORIZATION_() antlr.TerminalNode + BEGIN_() antlr.TerminalNode + BERNOULLI_() antlr.TerminalNode + BOTH_() antlr.TerminalNode + CALL_() antlr.TerminalNode + CALLED_() antlr.TerminalNode + CASCADE_() antlr.TerminalNode + CATALOG_() antlr.TerminalNode + CATALOGS_() antlr.TerminalNode + COLUMN_() antlr.TerminalNode + COLUMNS_() antlr.TerminalNode + COMMENT_() antlr.TerminalNode + COMMIT_() antlr.TerminalNode + COMMITTED_() antlr.TerminalNode + CONDITIONAL_() antlr.TerminalNode + COPARTITION_() antlr.TerminalNode + COUNT_() antlr.TerminalNode + CURRENT_() antlr.TerminalNode + DATA_() antlr.TerminalNode + DATE_() antlr.TerminalNode + DAY_() antlr.TerminalNode + DECLARE_() antlr.TerminalNode + DEFAULT_() antlr.TerminalNode + DEFINE_() antlr.TerminalNode + DEFINER_() antlr.TerminalNode + DENY_() antlr.TerminalNode + DESC_() antlr.TerminalNode + DESCRIPTOR_() antlr.TerminalNode + DETERMINISTIC_() antlr.TerminalNode + DISTRIBUTED_() antlr.TerminalNode + DO_() antlr.TerminalNode + DOUBLE_() antlr.TerminalNode + ELSEIF_() antlr.TerminalNode + EMPTY_() antlr.TerminalNode + ENCODING_() antlr.TerminalNode + ERROR_() antlr.TerminalNode + EXCLUDING_() antlr.TerminalNode + EXPLAIN_() antlr.TerminalNode + FETCH_() antlr.TerminalNode + FILTER_() antlr.TerminalNode + FINAL_() antlr.TerminalNode + FIRST_() antlr.TerminalNode + FOLLOWING_() antlr.TerminalNode + FORMAT_() antlr.TerminalNode + FUNCTION_() antlr.TerminalNode + FUNCTIONS_() antlr.TerminalNode + GRACE_() antlr.TerminalNode + GRANT_() antlr.TerminalNode + GRANTED_() antlr.TerminalNode + GRANTS_() antlr.TerminalNode + GRAPHVIZ_() antlr.TerminalNode + GROUPS_() antlr.TerminalNode + HOUR_() antlr.TerminalNode + IF_() antlr.TerminalNode + IGNORE_() antlr.TerminalNode + IMMEDIATE_() antlr.TerminalNode + INCLUDING_() antlr.TerminalNode + INITIAL_() antlr.TerminalNode + INPUT_() antlr.TerminalNode + INTERVAL_() antlr.TerminalNode + INVOKER_() antlr.TerminalNode + IO_() antlr.TerminalNode + ITERATE_() antlr.TerminalNode + ISOLATION_() antlr.TerminalNode + JSON_() antlr.TerminalNode + KEEP_() antlr.TerminalNode + KEY_() antlr.TerminalNode + KEYS_() antlr.TerminalNode + LANGUAGE_() antlr.TerminalNode + LAST_() antlr.TerminalNode + LATERAL_() antlr.TerminalNode + LEADING_() antlr.TerminalNode + LEAVE_() antlr.TerminalNode + LEVEL_() antlr.TerminalNode + LIMIT_() antlr.TerminalNode + LOCAL_() antlr.TerminalNode + LOGICAL_() antlr.TerminalNode + LOOP_() antlr.TerminalNode + MAP_() antlr.TerminalNode + MATCH_() antlr.TerminalNode + MATCHED_() antlr.TerminalNode + MATCHES_() antlr.TerminalNode + MATCH_RECOGNIZE_() antlr.TerminalNode + MATERIALIZED_() antlr.TerminalNode + MEASURES_() antlr.TerminalNode + MERGE_() antlr.TerminalNode + MINUTE_() antlr.TerminalNode + MONTH_() antlr.TerminalNode + NESTED_() antlr.TerminalNode + NEXT_() antlr.TerminalNode + NFC_() antlr.TerminalNode + NFD_() antlr.TerminalNode + NFKC_() antlr.TerminalNode + NFKD_() antlr.TerminalNode + NO_() antlr.TerminalNode + NONE_() antlr.TerminalNode + NULLIF_() antlr.TerminalNode + NULLS_() antlr.TerminalNode + OBJECT_() antlr.TerminalNode + OF_() antlr.TerminalNode + OFFSET_() antlr.TerminalNode + OMIT_() antlr.TerminalNode + ONE_() antlr.TerminalNode + ONLY_() antlr.TerminalNode + OPTION_() antlr.TerminalNode + ORDINALITY_() antlr.TerminalNode + OUTPUT_() antlr.TerminalNode + OVER_() antlr.TerminalNode + OVERFLOW_() antlr.TerminalNode + PARTITION_() antlr.TerminalNode + PARTITIONS_() antlr.TerminalNode + PASSING_() antlr.TerminalNode + PAST_() antlr.TerminalNode + PATH_() antlr.TerminalNode + PATTERN_() antlr.TerminalNode + PER_() antlr.TerminalNode + PERIOD_() antlr.TerminalNode + PERMUTE_() antlr.TerminalNode + PLAN_() antlr.TerminalNode + POSITION_() antlr.TerminalNode + PRECEDING_() antlr.TerminalNode + PRECISION_() antlr.TerminalNode + PRIVILEGES_() antlr.TerminalNode + PROPERTIES_() antlr.TerminalNode + PRUNE_() antlr.TerminalNode + QUOTES_() antlr.TerminalNode + RANGE_() antlr.TerminalNode + READ_() antlr.TerminalNode + REFRESH_() antlr.TerminalNode + RENAME_() antlr.TerminalNode + REPEAT_() antlr.TerminalNode + REPEATABLE_() antlr.TerminalNode + REPLACE_() antlr.TerminalNode + RESET_() antlr.TerminalNode + RESPECT_() antlr.TerminalNode + RESTRICT_() antlr.TerminalNode + RETURN_() antlr.TerminalNode + RETURNING_() antlr.TerminalNode + RETURNS_() antlr.TerminalNode + REVOKE_() antlr.TerminalNode + ROLE_() antlr.TerminalNode + ROLES_() antlr.TerminalNode + ROLLBACK_() antlr.TerminalNode + ROW_() antlr.TerminalNode + ROWS_() antlr.TerminalNode + RUNNING_() antlr.TerminalNode + SCALAR_() antlr.TerminalNode + SCHEMA_() antlr.TerminalNode + SCHEMAS_() antlr.TerminalNode + SECOND_() antlr.TerminalNode + SECURITY_() antlr.TerminalNode + SEEK_() antlr.TerminalNode + SERIALIZABLE_() antlr.TerminalNode + SESSION_() antlr.TerminalNode + SET_() antlr.TerminalNode + SETS_() antlr.TerminalNode + SHOW_() antlr.TerminalNode + SOME_() antlr.TerminalNode + START_() antlr.TerminalNode + STATS_() antlr.TerminalNode + SUBSET_() antlr.TerminalNode + SUBSTRING_() antlr.TerminalNode + SYSTEM_() antlr.TerminalNode + TABLES_() antlr.TerminalNode + TABLESAMPLE_() antlr.TerminalNode + TEXT_() antlr.TerminalNode + TEXT_STRING_() antlr.TerminalNode + TIES_() antlr.TerminalNode + TIME_() antlr.TerminalNode + TIMESTAMP_() antlr.TerminalNode + TO_() antlr.TerminalNode + TRAILING_() antlr.TerminalNode + TRANSACTION_() antlr.TerminalNode + TRUNCATE_() antlr.TerminalNode + TRY_CAST_() antlr.TerminalNode + TYPE_() antlr.TerminalNode + UNBOUNDED_() antlr.TerminalNode + UNCOMMITTED_() antlr.TerminalNode + UNCONDITIONAL_() antlr.TerminalNode + UNIQUE_() antlr.TerminalNode + UNKNOWN_() antlr.TerminalNode + UNMATCHED_() antlr.TerminalNode + UNTIL_() antlr.TerminalNode + UPDATE_() antlr.TerminalNode + USE_() antlr.TerminalNode + USER_() antlr.TerminalNode + UTF16_() antlr.TerminalNode + UTF32_() antlr.TerminalNode + UTF8_() antlr.TerminalNode + VALIDATE_() antlr.TerminalNode + VALUE_() antlr.TerminalNode + VERBOSE_() antlr.TerminalNode + VERSION_() antlr.TerminalNode + VIEW_() antlr.TerminalNode + WHILE_() antlr.TerminalNode + WINDOW_() antlr.TerminalNode + WITHIN_() antlr.TerminalNode + WITHOUT_() antlr.TerminalNode + WORK_() antlr.TerminalNode + WRAPPER_() antlr.TerminalNode + WRITE_() antlr.TerminalNode + YEAR_() antlr.TerminalNode + ZONE_() antlr.TerminalNode + + // IsNonReservedContext differentiates from other interfaces. + IsNonReservedContext() +} + +type NonReservedContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyNonReservedContext() *NonReservedContext { + var p = new(NonReservedContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_nonReserved + return p +} + +func InitEmptyNonReservedContext(p *NonReservedContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = TrinoParserRULE_nonReserved +} + +func (*NonReservedContext) IsNonReservedContext() {} + +func NewNonReservedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NonReservedContext { + var p = new(NonReservedContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = TrinoParserRULE_nonReserved + + return p +} + +func (s *NonReservedContext) GetParser() antlr.Parser { return s.parser } + +func (s *NonReservedContext) ABSENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserABSENT_, 0) +} + +func (s *NonReservedContext) ADD_() antlr.TerminalNode { + return s.GetToken(TrinoParserADD_, 0) +} + +func (s *NonReservedContext) ADMIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserADMIN_, 0) +} + +func (s *NonReservedContext) AFTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserAFTER_, 0) +} + +func (s *NonReservedContext) ALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserALL_, 0) +} + +func (s *NonReservedContext) ANALYZE_() antlr.TerminalNode { + return s.GetToken(TrinoParserANALYZE_, 0) +} + +func (s *NonReservedContext) ANY_() antlr.TerminalNode { + return s.GetToken(TrinoParserANY_, 0) +} + +func (s *NonReservedContext) ARRAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserARRAY_, 0) +} + +func (s *NonReservedContext) ASC_() antlr.TerminalNode { + return s.GetToken(TrinoParserASC_, 0) +} + +func (s *NonReservedContext) AT_() antlr.TerminalNode { + return s.GetToken(TrinoParserAT_, 0) +} + +func (s *NonReservedContext) AUTHORIZATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserAUTHORIZATION_, 0) +} + +func (s *NonReservedContext) BEGIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserBEGIN_, 0) +} + +func (s *NonReservedContext) BERNOULLI_() antlr.TerminalNode { + return s.GetToken(TrinoParserBERNOULLI_, 0) +} + +func (s *NonReservedContext) BOTH_() antlr.TerminalNode { + return s.GetToken(TrinoParserBOTH_, 0) +} + +func (s *NonReservedContext) CALL_() antlr.TerminalNode { + return s.GetToken(TrinoParserCALL_, 0) +} + +func (s *NonReservedContext) CALLED_() antlr.TerminalNode { + return s.GetToken(TrinoParserCALLED_, 0) +} + +func (s *NonReservedContext) CASCADE_() antlr.TerminalNode { + return s.GetToken(TrinoParserCASCADE_, 0) +} + +func (s *NonReservedContext) CATALOG_() antlr.TerminalNode { + return s.GetToken(TrinoParserCATALOG_, 0) +} + +func (s *NonReservedContext) CATALOGS_() antlr.TerminalNode { + return s.GetToken(TrinoParserCATALOGS_, 0) +} + +func (s *NonReservedContext) COLUMN_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMN_, 0) +} + +func (s *NonReservedContext) COLUMNS_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOLUMNS_, 0) +} + +func (s *NonReservedContext) COMMENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMENT_, 0) +} + +func (s *NonReservedContext) COMMIT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMIT_, 0) +} + +func (s *NonReservedContext) COMMITTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOMMITTED_, 0) +} + +func (s *NonReservedContext) CONDITIONAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserCONDITIONAL_, 0) +} + +func (s *NonReservedContext) COPARTITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOPARTITION_, 0) +} + +func (s *NonReservedContext) COUNT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCOUNT_, 0) +} + +func (s *NonReservedContext) CURRENT_() antlr.TerminalNode { + return s.GetToken(TrinoParserCURRENT_, 0) +} + +func (s *NonReservedContext) DATA_() antlr.TerminalNode { + return s.GetToken(TrinoParserDATA_, 0) +} + +func (s *NonReservedContext) DATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDATE_, 0) +} + +func (s *NonReservedContext) DAY_() antlr.TerminalNode { + return s.GetToken(TrinoParserDAY_, 0) +} + +func (s *NonReservedContext) DECLARE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDECLARE_, 0) +} + +func (s *NonReservedContext) DEFAULT_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFAULT_, 0) +} + +func (s *NonReservedContext) DEFINE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFINE_, 0) +} + +func (s *NonReservedContext) DEFINER_() antlr.TerminalNode { + return s.GetToken(TrinoParserDEFINER_, 0) +} + +func (s *NonReservedContext) DENY_() antlr.TerminalNode { + return s.GetToken(TrinoParserDENY_, 0) +} + +func (s *NonReservedContext) DESC_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESC_, 0) +} + +func (s *NonReservedContext) DESCRIPTOR_() antlr.TerminalNode { + return s.GetToken(TrinoParserDESCRIPTOR_, 0) +} + +func (s *NonReservedContext) DETERMINISTIC_() antlr.TerminalNode { + return s.GetToken(TrinoParserDETERMINISTIC_, 0) +} + +func (s *NonReservedContext) DISTRIBUTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserDISTRIBUTED_, 0) +} + +func (s *NonReservedContext) DO_() antlr.TerminalNode { + return s.GetToken(TrinoParserDO_, 0) +} + +func (s *NonReservedContext) DOUBLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserDOUBLE_, 0) +} + +func (s *NonReservedContext) ELSEIF_() antlr.TerminalNode { + return s.GetToken(TrinoParserELSEIF_, 0) +} + +func (s *NonReservedContext) EMPTY_() antlr.TerminalNode { + return s.GetToken(TrinoParserEMPTY_, 0) +} + +func (s *NonReservedContext) ENCODING_() antlr.TerminalNode { + return s.GetToken(TrinoParserENCODING_, 0) +} + +func (s *NonReservedContext) ERROR_() antlr.TerminalNode { + return s.GetToken(TrinoParserERROR_, 0) +} + +func (s *NonReservedContext) EXCLUDING_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXCLUDING_, 0) +} + +func (s *NonReservedContext) EXPLAIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserEXPLAIN_, 0) +} + +func (s *NonReservedContext) FETCH_() antlr.TerminalNode { + return s.GetToken(TrinoParserFETCH_, 0) +} + +func (s *NonReservedContext) FILTER_() antlr.TerminalNode { + return s.GetToken(TrinoParserFILTER_, 0) +} + +func (s *NonReservedContext) FINAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserFINAL_, 0) +} + +func (s *NonReservedContext) FIRST_() antlr.TerminalNode { + return s.GetToken(TrinoParserFIRST_, 0) +} + +func (s *NonReservedContext) FOLLOWING_() antlr.TerminalNode { + return s.GetToken(TrinoParserFOLLOWING_, 0) +} + +func (s *NonReservedContext) FORMAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserFORMAT_, 0) +} + +func (s *NonReservedContext) FUNCTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserFUNCTION_, 0) +} + +func (s *NonReservedContext) FUNCTIONS_() antlr.TerminalNode { + return s.GetToken(TrinoParserFUNCTIONS_, 0) +} + +func (s *NonReservedContext) GRACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRACE_, 0) +} + +func (s *NonReservedContext) GRANT_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANT_, 0) +} + +func (s *NonReservedContext) GRANTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANTED_, 0) +} + +func (s *NonReservedContext) GRANTS_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRANTS_, 0) +} + +func (s *NonReservedContext) GRAPHVIZ_() antlr.TerminalNode { + return s.GetToken(TrinoParserGRAPHVIZ_, 0) +} + +func (s *NonReservedContext) GROUPS_() antlr.TerminalNode { + return s.GetToken(TrinoParserGROUPS_, 0) +} + +func (s *NonReservedContext) HOUR_() antlr.TerminalNode { + return s.GetToken(TrinoParserHOUR_, 0) +} + +func (s *NonReservedContext) IF_() antlr.TerminalNode { + return s.GetToken(TrinoParserIF_, 0) +} + +func (s *NonReservedContext) IGNORE_() antlr.TerminalNode { + return s.GetToken(TrinoParserIGNORE_, 0) +} + +func (s *NonReservedContext) IMMEDIATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserIMMEDIATE_, 0) +} + +func (s *NonReservedContext) INCLUDING_() antlr.TerminalNode { + return s.GetToken(TrinoParserINCLUDING_, 0) +} + +func (s *NonReservedContext) INITIAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserINITIAL_, 0) +} + +func (s *NonReservedContext) INPUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserINPUT_, 0) +} + +func (s *NonReservedContext) INTERVAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserINTERVAL_, 0) +} + +func (s *NonReservedContext) INVOKER_() antlr.TerminalNode { + return s.GetToken(TrinoParserINVOKER_, 0) +} + +func (s *NonReservedContext) IO_() antlr.TerminalNode { + return s.GetToken(TrinoParserIO_, 0) +} + +func (s *NonReservedContext) ITERATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserITERATE_, 0) +} + +func (s *NonReservedContext) ISOLATION_() antlr.TerminalNode { + return s.GetToken(TrinoParserISOLATION_, 0) +} + +func (s *NonReservedContext) JSON_() antlr.TerminalNode { + return s.GetToken(TrinoParserJSON_, 0) +} + +func (s *NonReservedContext) KEEP_() antlr.TerminalNode { + return s.GetToken(TrinoParserKEEP_, 0) +} + +func (s *NonReservedContext) KEY_() antlr.TerminalNode { + return s.GetToken(TrinoParserKEY_, 0) +} + +func (s *NonReservedContext) KEYS_() antlr.TerminalNode { + return s.GetToken(TrinoParserKEYS_, 0) +} + +func (s *NonReservedContext) LANGUAGE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLANGUAGE_, 0) +} + +func (s *NonReservedContext) LAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserLAST_, 0) +} + +func (s *NonReservedContext) LATERAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLATERAL_, 0) +} + +func (s *NonReservedContext) LEADING_() antlr.TerminalNode { + return s.GetToken(TrinoParserLEADING_, 0) +} + +func (s *NonReservedContext) LEAVE_() antlr.TerminalNode { + return s.GetToken(TrinoParserLEAVE_, 0) +} + +func (s *NonReservedContext) LEVEL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLEVEL_, 0) +} + +func (s *NonReservedContext) LIMIT_() antlr.TerminalNode { + return s.GetToken(TrinoParserLIMIT_, 0) +} + +func (s *NonReservedContext) LOCAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLOCAL_, 0) +} + +func (s *NonReservedContext) LOGICAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserLOGICAL_, 0) +} + +func (s *NonReservedContext) LOOP_() antlr.TerminalNode { + return s.GetToken(TrinoParserLOOP_, 0) +} + +func (s *NonReservedContext) MAP_() antlr.TerminalNode { + return s.GetToken(TrinoParserMAP_, 0) +} + +func (s *NonReservedContext) MATCH_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCH_, 0) +} + +func (s *NonReservedContext) MATCHED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCHED_, 0) +} + +func (s *NonReservedContext) MATCHES_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCHES_, 0) +} + +func (s *NonReservedContext) MATCH_RECOGNIZE_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATCH_RECOGNIZE_, 0) +} + +func (s *NonReservedContext) MATERIALIZED_() antlr.TerminalNode { + return s.GetToken(TrinoParserMATERIALIZED_, 0) +} + +func (s *NonReservedContext) MEASURES_() antlr.TerminalNode { + return s.GetToken(TrinoParserMEASURES_, 0) +} + +func (s *NonReservedContext) MERGE_() antlr.TerminalNode { + return s.GetToken(TrinoParserMERGE_, 0) +} + +func (s *NonReservedContext) MINUTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserMINUTE_, 0) +} + +func (s *NonReservedContext) MONTH_() antlr.TerminalNode { + return s.GetToken(TrinoParserMONTH_, 0) +} + +func (s *NonReservedContext) NESTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserNESTED_, 0) +} + +func (s *NonReservedContext) NEXT_() antlr.TerminalNode { + return s.GetToken(TrinoParserNEXT_, 0) +} + +func (s *NonReservedContext) NFC_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFC_, 0) +} + +func (s *NonReservedContext) NFD_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFD_, 0) +} + +func (s *NonReservedContext) NFKC_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFKC_, 0) +} + +func (s *NonReservedContext) NFKD_() antlr.TerminalNode { + return s.GetToken(TrinoParserNFKD_, 0) +} + +func (s *NonReservedContext) NO_() antlr.TerminalNode { + return s.GetToken(TrinoParserNO_, 0) +} + +func (s *NonReservedContext) NONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserNONE_, 0) +} + +func (s *NonReservedContext) NULLIF_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULLIF_, 0) +} + +func (s *NonReservedContext) NULLS_() antlr.TerminalNode { + return s.GetToken(TrinoParserNULLS_, 0) +} + +func (s *NonReservedContext) OBJECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserOBJECT_, 0) +} + +func (s *NonReservedContext) OF_() antlr.TerminalNode { + return s.GetToken(TrinoParserOF_, 0) +} + +func (s *NonReservedContext) OFFSET_() antlr.TerminalNode { + return s.GetToken(TrinoParserOFFSET_, 0) +} + +func (s *NonReservedContext) OMIT_() antlr.TerminalNode { + return s.GetToken(TrinoParserOMIT_, 0) +} + +func (s *NonReservedContext) ONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserONE_, 0) +} + +func (s *NonReservedContext) ONLY_() antlr.TerminalNode { + return s.GetToken(TrinoParserONLY_, 0) +} + +func (s *NonReservedContext) OPTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserOPTION_, 0) +} + +func (s *NonReservedContext) ORDINALITY_() antlr.TerminalNode { + return s.GetToken(TrinoParserORDINALITY_, 0) +} + +func (s *NonReservedContext) OUTPUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserOUTPUT_, 0) +} + +func (s *NonReservedContext) OVER_() antlr.TerminalNode { + return s.GetToken(TrinoParserOVER_, 0) +} + +func (s *NonReservedContext) OVERFLOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserOVERFLOW_, 0) +} + +func (s *NonReservedContext) PARTITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPARTITION_, 0) +} + +func (s *NonReservedContext) PARTITIONS_() antlr.TerminalNode { + return s.GetToken(TrinoParserPARTITIONS_, 0) +} + +func (s *NonReservedContext) PASSING_() antlr.TerminalNode { + return s.GetToken(TrinoParserPASSING_, 0) +} + +func (s *NonReservedContext) PAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserPAST_, 0) +} + +func (s *NonReservedContext) PATH_() antlr.TerminalNode { + return s.GetToken(TrinoParserPATH_, 0) +} + +func (s *NonReservedContext) PATTERN_() antlr.TerminalNode { + return s.GetToken(TrinoParserPATTERN_, 0) +} + +func (s *NonReservedContext) PER_() antlr.TerminalNode { + return s.GetToken(TrinoParserPER_, 0) +} + +func (s *NonReservedContext) PERIOD_() antlr.TerminalNode { + return s.GetToken(TrinoParserPERIOD_, 0) +} + +func (s *NonReservedContext) PERMUTE_() antlr.TerminalNode { + return s.GetToken(TrinoParserPERMUTE_, 0) +} + +func (s *NonReservedContext) PLAN_() antlr.TerminalNode { + return s.GetToken(TrinoParserPLAN_, 0) +} + +func (s *NonReservedContext) POSITION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPOSITION_, 0) +} + +func (s *NonReservedContext) PRECEDING_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRECEDING_, 0) +} + +func (s *NonReservedContext) PRECISION_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRECISION_, 0) +} + +func (s *NonReservedContext) PRIVILEGES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRIVILEGES_, 0) +} + +func (s *NonReservedContext) PROPERTIES_() antlr.TerminalNode { + return s.GetToken(TrinoParserPROPERTIES_, 0) +} + +func (s *NonReservedContext) PRUNE_() antlr.TerminalNode { + return s.GetToken(TrinoParserPRUNE_, 0) +} + +func (s *NonReservedContext) QUOTES_() antlr.TerminalNode { + return s.GetToken(TrinoParserQUOTES_, 0) +} + +func (s *NonReservedContext) RANGE_() antlr.TerminalNode { + return s.GetToken(TrinoParserRANGE_, 0) +} + +func (s *NonReservedContext) READ_() antlr.TerminalNode { + return s.GetToken(TrinoParserREAD_, 0) +} + +func (s *NonReservedContext) REFRESH_() antlr.TerminalNode { + return s.GetToken(TrinoParserREFRESH_, 0) +} + +func (s *NonReservedContext) RENAME_() antlr.TerminalNode { + return s.GetToken(TrinoParserRENAME_, 0) +} + +func (s *NonReservedContext) REPEAT_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPEAT_, 0) +} + +func (s *NonReservedContext) REPEATABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPEATABLE_, 0) +} + +func (s *NonReservedContext) REPLACE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREPLACE_, 0) +} + +func (s *NonReservedContext) RESET_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESET_, 0) +} + +func (s *NonReservedContext) RESPECT_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESPECT_, 0) +} + +func (s *NonReservedContext) RESTRICT_() antlr.TerminalNode { + return s.GetToken(TrinoParserRESTRICT_, 0) +} + +func (s *NonReservedContext) RETURN_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURN_, 0) +} + +func (s *NonReservedContext) RETURNING_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNING_, 0) +} + +func (s *NonReservedContext) RETURNS_() antlr.TerminalNode { + return s.GetToken(TrinoParserRETURNS_, 0) +} + +func (s *NonReservedContext) REVOKE_() antlr.TerminalNode { + return s.GetToken(TrinoParserREVOKE_, 0) +} + +func (s *NonReservedContext) ROLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLE_, 0) +} + +func (s *NonReservedContext) ROLES_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLES_, 0) +} + +func (s *NonReservedContext) ROLLBACK_() antlr.TerminalNode { + return s.GetToken(TrinoParserROLLBACK_, 0) +} + +func (s *NonReservedContext) ROW_() antlr.TerminalNode { + return s.GetToken(TrinoParserROW_, 0) +} + +func (s *NonReservedContext) ROWS_() antlr.TerminalNode { + return s.GetToken(TrinoParserROWS_, 0) +} + +func (s *NonReservedContext) RUNNING_() antlr.TerminalNode { + return s.GetToken(TrinoParserRUNNING_, 0) +} + +func (s *NonReservedContext) SCALAR_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCALAR_, 0) +} + +func (s *NonReservedContext) SCHEMA_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMA_, 0) +} + +func (s *NonReservedContext) SCHEMAS_() antlr.TerminalNode { + return s.GetToken(TrinoParserSCHEMAS_, 0) +} + +func (s *NonReservedContext) SECOND_() antlr.TerminalNode { + return s.GetToken(TrinoParserSECOND_, 0) +} + +func (s *NonReservedContext) SECURITY_() antlr.TerminalNode { + return s.GetToken(TrinoParserSECURITY_, 0) +} + +func (s *NonReservedContext) SEEK_() antlr.TerminalNode { + return s.GetToken(TrinoParserSEEK_, 0) +} + +func (s *NonReservedContext) SERIALIZABLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserSERIALIZABLE_, 0) +} + +func (s *NonReservedContext) SESSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserSESSION_, 0) +} + +func (s *NonReservedContext) SET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSET_, 0) +} + +func (s *NonReservedContext) SETS_() antlr.TerminalNode { + return s.GetToken(TrinoParserSETS_, 0) +} + +func (s *NonReservedContext) SHOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserSHOW_, 0) +} + +func (s *NonReservedContext) SOME_() antlr.TerminalNode { + return s.GetToken(TrinoParserSOME_, 0) +} + +func (s *NonReservedContext) START_() antlr.TerminalNode { + return s.GetToken(TrinoParserSTART_, 0) +} + +func (s *NonReservedContext) STATS_() antlr.TerminalNode { + return s.GetToken(TrinoParserSTATS_, 0) +} + +func (s *NonReservedContext) SUBSET_() antlr.TerminalNode { + return s.GetToken(TrinoParserSUBSET_, 0) +} + +func (s *NonReservedContext) SUBSTRING_() antlr.TerminalNode { + return s.GetToken(TrinoParserSUBSTRING_, 0) +} + +func (s *NonReservedContext) SYSTEM_() antlr.TerminalNode { + return s.GetToken(TrinoParserSYSTEM_, 0) +} + +func (s *NonReservedContext) TABLES_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLES_, 0) +} + +func (s *NonReservedContext) TABLESAMPLE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTABLESAMPLE_, 0) +} + +func (s *NonReservedContext) TEXT_() antlr.TerminalNode { + return s.GetToken(TrinoParserTEXT_, 0) +} + +func (s *NonReservedContext) TEXT_STRING_() antlr.TerminalNode { + return s.GetToken(TrinoParserTEXT_STRING_, 0) +} + +func (s *NonReservedContext) TIES_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIES_, 0) +} + +func (s *NonReservedContext) TIME_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIME_, 0) +} + +func (s *NonReservedContext) TIMESTAMP_() antlr.TerminalNode { + return s.GetToken(TrinoParserTIMESTAMP_, 0) +} + +func (s *NonReservedContext) TO_() antlr.TerminalNode { + return s.GetToken(TrinoParserTO_, 0) +} + +func (s *NonReservedContext) TRAILING_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRAILING_, 0) +} + +func (s *NonReservedContext) TRANSACTION_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRANSACTION_, 0) +} + +func (s *NonReservedContext) TRUNCATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRUNCATE_, 0) +} + +func (s *NonReservedContext) TRY_CAST_() antlr.TerminalNode { + return s.GetToken(TrinoParserTRY_CAST_, 0) +} + +func (s *NonReservedContext) TYPE_() antlr.TerminalNode { + return s.GetToken(TrinoParserTYPE_, 0) +} + +func (s *NonReservedContext) UNBOUNDED_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNBOUNDED_, 0) +} + +func (s *NonReservedContext) UNCOMMITTED_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNCOMMITTED_, 0) +} + +func (s *NonReservedContext) UNCONDITIONAL_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNCONDITIONAL_, 0) +} + +func (s *NonReservedContext) UNIQUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNIQUE_, 0) +} + +func (s *NonReservedContext) UNKNOWN_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNKNOWN_, 0) +} + +func (s *NonReservedContext) UNMATCHED_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNMATCHED_, 0) +} + +func (s *NonReservedContext) UNTIL_() antlr.TerminalNode { + return s.GetToken(TrinoParserUNTIL_, 0) +} + +func (s *NonReservedContext) UPDATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUPDATE_, 0) +} + +func (s *NonReservedContext) USE_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSE_, 0) +} + +func (s *NonReservedContext) USER_() antlr.TerminalNode { + return s.GetToken(TrinoParserUSER_, 0) +} + +func (s *NonReservedContext) UTF16_() antlr.TerminalNode { + return s.GetToken(TrinoParserUTF16_, 0) +} + +func (s *NonReservedContext) UTF32_() antlr.TerminalNode { + return s.GetToken(TrinoParserUTF32_, 0) +} + +func (s *NonReservedContext) UTF8_() antlr.TerminalNode { + return s.GetToken(TrinoParserUTF8_, 0) +} + +func (s *NonReservedContext) VALIDATE_() antlr.TerminalNode { + return s.GetToken(TrinoParserVALIDATE_, 0) +} + +func (s *NonReservedContext) VALUE_() antlr.TerminalNode { + return s.GetToken(TrinoParserVALUE_, 0) +} + +func (s *NonReservedContext) VERBOSE_() antlr.TerminalNode { + return s.GetToken(TrinoParserVERBOSE_, 0) +} + +func (s *NonReservedContext) VERSION_() antlr.TerminalNode { + return s.GetToken(TrinoParserVERSION_, 0) +} + +func (s *NonReservedContext) VIEW_() antlr.TerminalNode { + return s.GetToken(TrinoParserVIEW_, 0) +} + +func (s *NonReservedContext) WHILE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWHILE_, 0) +} + +func (s *NonReservedContext) WINDOW_() antlr.TerminalNode { + return s.GetToken(TrinoParserWINDOW_, 0) +} + +func (s *NonReservedContext) WITHIN_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITHIN_, 0) +} + +func (s *NonReservedContext) WITHOUT_() antlr.TerminalNode { + return s.GetToken(TrinoParserWITHOUT_, 0) +} + +func (s *NonReservedContext) WORK_() antlr.TerminalNode { + return s.GetToken(TrinoParserWORK_, 0) +} + +func (s *NonReservedContext) WRAPPER_() antlr.TerminalNode { + return s.GetToken(TrinoParserWRAPPER_, 0) +} + +func (s *NonReservedContext) WRITE_() antlr.TerminalNode { + return s.GetToken(TrinoParserWRITE_, 0) +} + +func (s *NonReservedContext) YEAR_() antlr.TerminalNode { + return s.GetToken(TrinoParserYEAR_, 0) +} + +func (s *NonReservedContext) ZONE_() antlr.TerminalNode { + return s.GetToken(TrinoParserZONE_, 0) +} + +func (s *NonReservedContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *NonReservedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *NonReservedContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.EnterNonReserved(s) + } +} + +func (s *NonReservedContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(TrinoParserListener); ok { + listenerT.ExitNonReserved(s) + } +} + +func (s *NonReservedContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case TrinoParserVisitor: + return t.VisitNonReserved(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *TrinoParser) NonReserved() (localctx INonReservedContext) { + localctx = NewNonReservedContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 254, TrinoParserRULE_nonReserved) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(3283) + _la = p.GetTokenStream().LA(1) + + if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-5262737029699602754) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-9120583187364427405) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&-6228115030305409) != 0) || ((int64((_la-192)) & ^0x3f) == 0 && ((int64(1)<<(_la-192))&-148654522401558561) != 0) || ((int64((_la-258)) & ^0x3f) == 0 && ((int64(1)<<(_la-258))&273598576503) != 0)) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + +errorExit: + if p.HasError() { + v := p.GetError() + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + p.SetError(nil) + } + p.ExitRule() + return localctx + goto errorExit // Trick to prevent compiler error if the label is not used +} + +func (p *TrinoParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { + switch ruleIndex { + case 23: + var t *QueryTermContext = nil + if localctx != nil { + t = localctx.(*QueryTermContext) + } + return p.QueryTerm_Sempred(t, predIndex) + + case 37: + var t *RelationContext = nil + if localctx != nil { + t = localctx.(*RelationContext) + } + return p.Relation_Sempred(t, predIndex) + + case 63: + var t *BooleanExpressionContext = nil + if localctx != nil { + t = localctx.(*BooleanExpressionContext) + } + return p.BooleanExpression_Sempred(t, predIndex) + + case 65: + var t *ValueExpressionContext = nil + if localctx != nil { + t = localctx.(*ValueExpressionContext) + } + return p.ValueExpression_Sempred(t, predIndex) + + case 66: + var t *PrimaryExpressionContext = nil + if localctx != nil { + t = localctx.(*PrimaryExpressionContext) + } + return p.PrimaryExpression_Sempred(t, predIndex) + + case 86: + var t *TypeContext = nil + if localctx != nil { + t = localctx.(*TypeContext) + } + return p.Type__Sempred(t, predIndex) + + case 96: + var t *RowPatternContext = nil + if localctx != nil { + t = localctx.(*RowPatternContext) + } + return p.RowPattern_Sempred(t, predIndex) + + default: + panic("No predicate with index: " + fmt.Sprint(ruleIndex)) + } +} + +func (p *TrinoParser) QueryTerm_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 0: + return p.Precpred(p.GetParserRuleContext(), 2) + + case 1: + return p.Precpred(p.GetParserRuleContext(), 1) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TrinoParser) Relation_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 2: + return p.Precpred(p.GetParserRuleContext(), 2) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TrinoParser) BooleanExpression_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 3: + return p.Precpred(p.GetParserRuleContext(), 2) + + case 4: + return p.Precpred(p.GetParserRuleContext(), 1) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TrinoParser) ValueExpression_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 5: + return p.Precpred(p.GetParserRuleContext(), 3) + + case 6: + return p.Precpred(p.GetParserRuleContext(), 2) + + case 7: + return p.Precpred(p.GetParserRuleContext(), 1) + + case 8: + return p.Precpred(p.GetParserRuleContext(), 5) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TrinoParser) PrimaryExpression_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 9: + return p.Precpred(p.GetParserRuleContext(), 24) + + case 10: + return p.Precpred(p.GetParserRuleContext(), 22) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TrinoParser) Type__Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 11: + return p.Precpred(p.GetParserRuleContext(), 2) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} + +func (p *TrinoParser) RowPattern_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 12: + return p.Precpred(p.GetParserRuleContext(), 2) + + case 13: + return p.Precpred(p.GetParserRuleContext(), 1) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} diff --git a/trino/trinoparser_base_listener.go b/trino/trinoparser_base_listener.go new file mode 100644 index 0000000..dddc297 --- /dev/null +++ b/trino/trinoparser_base_listener.go @@ -0,0 +1,2025 @@ +// Code generated from TrinoParser.g4 by ANTLR 4.13.2. DO NOT EDIT. + +package trino // TrinoParser +import "github.com/antlr4-go/antlr/v4" + +// BaseTrinoParserListener is a complete listener for a parse tree produced by TrinoParser. +type BaseTrinoParserListener struct{} + +var _ TrinoParserListener = &BaseTrinoParserListener{} + +// VisitTerminal is called when a terminal node is visited. +func (s *BaseTrinoParserListener) VisitTerminal(node antlr.TerminalNode) {} + +// VisitErrorNode is called when an error node is visited. +func (s *BaseTrinoParserListener) VisitErrorNode(node antlr.ErrorNode) {} + +// EnterEveryRule is called when any rule is entered. +func (s *BaseTrinoParserListener) EnterEveryRule(ctx antlr.ParserRuleContext) {} + +// ExitEveryRule is called when any rule is exited. +func (s *BaseTrinoParserListener) ExitEveryRule(ctx antlr.ParserRuleContext) {} + +// EnterParse is called when production parse is entered. +func (s *BaseTrinoParserListener) EnterParse(ctx *ParseContext) {} + +// ExitParse is called when production parse is exited. +func (s *BaseTrinoParserListener) ExitParse(ctx *ParseContext) {} + +// EnterStatements is called when production statements is entered. +func (s *BaseTrinoParserListener) EnterStatements(ctx *StatementsContext) {} + +// ExitStatements is called when production statements is exited. +func (s *BaseTrinoParserListener) ExitStatements(ctx *StatementsContext) {} + +// EnterSingleStatement is called when production singleStatement is entered. +func (s *BaseTrinoParserListener) EnterSingleStatement(ctx *SingleStatementContext) {} + +// ExitSingleStatement is called when production singleStatement is exited. +func (s *BaseTrinoParserListener) ExitSingleStatement(ctx *SingleStatementContext) {} + +// EnterStandaloneExpression is called when production standaloneExpression is entered. +func (s *BaseTrinoParserListener) EnterStandaloneExpression(ctx *StandaloneExpressionContext) {} + +// ExitStandaloneExpression is called when production standaloneExpression is exited. +func (s *BaseTrinoParserListener) ExitStandaloneExpression(ctx *StandaloneExpressionContext) {} + +// EnterStandalonePathSpecification is called when production standalonePathSpecification is entered. +func (s *BaseTrinoParserListener) EnterStandalonePathSpecification(ctx *StandalonePathSpecificationContext) { +} + +// ExitStandalonePathSpecification is called when production standalonePathSpecification is exited. +func (s *BaseTrinoParserListener) ExitStandalonePathSpecification(ctx *StandalonePathSpecificationContext) { +} + +// EnterStandaloneType is called when production standaloneType is entered. +func (s *BaseTrinoParserListener) EnterStandaloneType(ctx *StandaloneTypeContext) {} + +// ExitStandaloneType is called when production standaloneType is exited. +func (s *BaseTrinoParserListener) ExitStandaloneType(ctx *StandaloneTypeContext) {} + +// EnterStandaloneRowPattern is called when production standaloneRowPattern is entered. +func (s *BaseTrinoParserListener) EnterStandaloneRowPattern(ctx *StandaloneRowPatternContext) {} + +// ExitStandaloneRowPattern is called when production standaloneRowPattern is exited. +func (s *BaseTrinoParserListener) ExitStandaloneRowPattern(ctx *StandaloneRowPatternContext) {} + +// EnterStandaloneFunctionSpecification is called when production standaloneFunctionSpecification is entered. +func (s *BaseTrinoParserListener) EnterStandaloneFunctionSpecification(ctx *StandaloneFunctionSpecificationContext) { +} + +// ExitStandaloneFunctionSpecification is called when production standaloneFunctionSpecification is exited. +func (s *BaseTrinoParserListener) ExitStandaloneFunctionSpecification(ctx *StandaloneFunctionSpecificationContext) { +} + +// EnterStatementDefault is called when production statementDefault is entered. +func (s *BaseTrinoParserListener) EnterStatementDefault(ctx *StatementDefaultContext) {} + +// ExitStatementDefault is called when production statementDefault is exited. +func (s *BaseTrinoParserListener) ExitStatementDefault(ctx *StatementDefaultContext) {} + +// EnterUse is called when production use is entered. +func (s *BaseTrinoParserListener) EnterUse(ctx *UseContext) {} + +// ExitUse is called when production use is exited. +func (s *BaseTrinoParserListener) ExitUse(ctx *UseContext) {} + +// EnterCreateCatalog is called when production createCatalog is entered. +func (s *BaseTrinoParserListener) EnterCreateCatalog(ctx *CreateCatalogContext) {} + +// ExitCreateCatalog is called when production createCatalog is exited. +func (s *BaseTrinoParserListener) ExitCreateCatalog(ctx *CreateCatalogContext) {} + +// EnterDropCatalog is called when production dropCatalog is entered. +func (s *BaseTrinoParserListener) EnterDropCatalog(ctx *DropCatalogContext) {} + +// ExitDropCatalog is called when production dropCatalog is exited. +func (s *BaseTrinoParserListener) ExitDropCatalog(ctx *DropCatalogContext) {} + +// EnterCreateSchema is called when production createSchema is entered. +func (s *BaseTrinoParserListener) EnterCreateSchema(ctx *CreateSchemaContext) {} + +// ExitCreateSchema is called when production createSchema is exited. +func (s *BaseTrinoParserListener) ExitCreateSchema(ctx *CreateSchemaContext) {} + +// EnterDropSchema is called when production dropSchema is entered. +func (s *BaseTrinoParserListener) EnterDropSchema(ctx *DropSchemaContext) {} + +// ExitDropSchema is called when production dropSchema is exited. +func (s *BaseTrinoParserListener) ExitDropSchema(ctx *DropSchemaContext) {} + +// EnterRenameSchema is called when production renameSchema is entered. +func (s *BaseTrinoParserListener) EnterRenameSchema(ctx *RenameSchemaContext) {} + +// ExitRenameSchema is called when production renameSchema is exited. +func (s *BaseTrinoParserListener) ExitRenameSchema(ctx *RenameSchemaContext) {} + +// EnterSetSchemaAuthorization is called when production setSchemaAuthorization is entered. +func (s *BaseTrinoParserListener) EnterSetSchemaAuthorization(ctx *SetSchemaAuthorizationContext) {} + +// ExitSetSchemaAuthorization is called when production setSchemaAuthorization is exited. +func (s *BaseTrinoParserListener) ExitSetSchemaAuthorization(ctx *SetSchemaAuthorizationContext) {} + +// EnterCreateTableAsSelect is called when production createTableAsSelect is entered. +func (s *BaseTrinoParserListener) EnterCreateTableAsSelect(ctx *CreateTableAsSelectContext) {} + +// ExitCreateTableAsSelect is called when production createTableAsSelect is exited. +func (s *BaseTrinoParserListener) ExitCreateTableAsSelect(ctx *CreateTableAsSelectContext) {} + +// EnterCreateTable is called when production createTable is entered. +func (s *BaseTrinoParserListener) EnterCreateTable(ctx *CreateTableContext) {} + +// ExitCreateTable is called when production createTable is exited. +func (s *BaseTrinoParserListener) ExitCreateTable(ctx *CreateTableContext) {} + +// EnterDropTable is called when production dropTable is entered. +func (s *BaseTrinoParserListener) EnterDropTable(ctx *DropTableContext) {} + +// ExitDropTable is called when production dropTable is exited. +func (s *BaseTrinoParserListener) ExitDropTable(ctx *DropTableContext) {} + +// EnterInsertInto is called when production insertInto is entered. +func (s *BaseTrinoParserListener) EnterInsertInto(ctx *InsertIntoContext) {} + +// ExitInsertInto is called when production insertInto is exited. +func (s *BaseTrinoParserListener) ExitInsertInto(ctx *InsertIntoContext) {} + +// EnterDelete is called when production delete is entered. +func (s *BaseTrinoParserListener) EnterDelete(ctx *DeleteContext) {} + +// ExitDelete is called when production delete is exited. +func (s *BaseTrinoParserListener) ExitDelete(ctx *DeleteContext) {} + +// EnterTruncateTable is called when production truncateTable is entered. +func (s *BaseTrinoParserListener) EnterTruncateTable(ctx *TruncateTableContext) {} + +// ExitTruncateTable is called when production truncateTable is exited. +func (s *BaseTrinoParserListener) ExitTruncateTable(ctx *TruncateTableContext) {} + +// EnterCommentTable is called when production commentTable is entered. +func (s *BaseTrinoParserListener) EnterCommentTable(ctx *CommentTableContext) {} + +// ExitCommentTable is called when production commentTable is exited. +func (s *BaseTrinoParserListener) ExitCommentTable(ctx *CommentTableContext) {} + +// EnterCommentView is called when production commentView is entered. +func (s *BaseTrinoParserListener) EnterCommentView(ctx *CommentViewContext) {} + +// ExitCommentView is called when production commentView is exited. +func (s *BaseTrinoParserListener) ExitCommentView(ctx *CommentViewContext) {} + +// EnterCommentColumn is called when production commentColumn is entered. +func (s *BaseTrinoParserListener) EnterCommentColumn(ctx *CommentColumnContext) {} + +// ExitCommentColumn is called when production commentColumn is exited. +func (s *BaseTrinoParserListener) ExitCommentColumn(ctx *CommentColumnContext) {} + +// EnterRenameTable is called when production renameTable is entered. +func (s *BaseTrinoParserListener) EnterRenameTable(ctx *RenameTableContext) {} + +// ExitRenameTable is called when production renameTable is exited. +func (s *BaseTrinoParserListener) ExitRenameTable(ctx *RenameTableContext) {} + +// EnterAddColumn is called when production addColumn is entered. +func (s *BaseTrinoParserListener) EnterAddColumn(ctx *AddColumnContext) {} + +// ExitAddColumn is called when production addColumn is exited. +func (s *BaseTrinoParserListener) ExitAddColumn(ctx *AddColumnContext) {} + +// EnterRenameColumn is called when production renameColumn is entered. +func (s *BaseTrinoParserListener) EnterRenameColumn(ctx *RenameColumnContext) {} + +// ExitRenameColumn is called when production renameColumn is exited. +func (s *BaseTrinoParserListener) ExitRenameColumn(ctx *RenameColumnContext) {} + +// EnterDropColumn is called when production dropColumn is entered. +func (s *BaseTrinoParserListener) EnterDropColumn(ctx *DropColumnContext) {} + +// ExitDropColumn is called when production dropColumn is exited. +func (s *BaseTrinoParserListener) ExitDropColumn(ctx *DropColumnContext) {} + +// EnterSetColumnType is called when production setColumnType is entered. +func (s *BaseTrinoParserListener) EnterSetColumnType(ctx *SetColumnTypeContext) {} + +// ExitSetColumnType is called when production setColumnType is exited. +func (s *BaseTrinoParserListener) ExitSetColumnType(ctx *SetColumnTypeContext) {} + +// EnterSetTableAuthorization is called when production setTableAuthorization is entered. +func (s *BaseTrinoParserListener) EnterSetTableAuthorization(ctx *SetTableAuthorizationContext) {} + +// ExitSetTableAuthorization is called when production setTableAuthorization is exited. +func (s *BaseTrinoParserListener) ExitSetTableAuthorization(ctx *SetTableAuthorizationContext) {} + +// EnterSetTableProperties is called when production setTableProperties is entered. +func (s *BaseTrinoParserListener) EnterSetTableProperties(ctx *SetTablePropertiesContext) {} + +// ExitSetTableProperties is called when production setTableProperties is exited. +func (s *BaseTrinoParserListener) ExitSetTableProperties(ctx *SetTablePropertiesContext) {} + +// EnterTableExecute is called when production tableExecute is entered. +func (s *BaseTrinoParserListener) EnterTableExecute(ctx *TableExecuteContext) {} + +// ExitTableExecute is called when production tableExecute is exited. +func (s *BaseTrinoParserListener) ExitTableExecute(ctx *TableExecuteContext) {} + +// EnterAnalyze is called when production analyze is entered. +func (s *BaseTrinoParserListener) EnterAnalyze(ctx *AnalyzeContext) {} + +// ExitAnalyze is called when production analyze is exited. +func (s *BaseTrinoParserListener) ExitAnalyze(ctx *AnalyzeContext) {} + +// EnterCreateMaterializedView is called when production createMaterializedView is entered. +func (s *BaseTrinoParserListener) EnterCreateMaterializedView(ctx *CreateMaterializedViewContext) {} + +// ExitCreateMaterializedView is called when production createMaterializedView is exited. +func (s *BaseTrinoParserListener) ExitCreateMaterializedView(ctx *CreateMaterializedViewContext) {} + +// EnterCreateView is called when production createView is entered. +func (s *BaseTrinoParserListener) EnterCreateView(ctx *CreateViewContext) {} + +// ExitCreateView is called when production createView is exited. +func (s *BaseTrinoParserListener) ExitCreateView(ctx *CreateViewContext) {} + +// EnterRefreshMaterializedView is called when production refreshMaterializedView is entered. +func (s *BaseTrinoParserListener) EnterRefreshMaterializedView(ctx *RefreshMaterializedViewContext) {} + +// ExitRefreshMaterializedView is called when production refreshMaterializedView is exited. +func (s *BaseTrinoParserListener) ExitRefreshMaterializedView(ctx *RefreshMaterializedViewContext) {} + +// EnterDropMaterializedView is called when production dropMaterializedView is entered. +func (s *BaseTrinoParserListener) EnterDropMaterializedView(ctx *DropMaterializedViewContext) {} + +// ExitDropMaterializedView is called when production dropMaterializedView is exited. +func (s *BaseTrinoParserListener) ExitDropMaterializedView(ctx *DropMaterializedViewContext) {} + +// EnterRenameMaterializedView is called when production renameMaterializedView is entered. +func (s *BaseTrinoParserListener) EnterRenameMaterializedView(ctx *RenameMaterializedViewContext) {} + +// ExitRenameMaterializedView is called when production renameMaterializedView is exited. +func (s *BaseTrinoParserListener) ExitRenameMaterializedView(ctx *RenameMaterializedViewContext) {} + +// EnterSetMaterializedViewProperties is called when production setMaterializedViewProperties is entered. +func (s *BaseTrinoParserListener) EnterSetMaterializedViewProperties(ctx *SetMaterializedViewPropertiesContext) { +} + +// ExitSetMaterializedViewProperties is called when production setMaterializedViewProperties is exited. +func (s *BaseTrinoParserListener) ExitSetMaterializedViewProperties(ctx *SetMaterializedViewPropertiesContext) { +} + +// EnterDropView is called when production dropView is entered. +func (s *BaseTrinoParserListener) EnterDropView(ctx *DropViewContext) {} + +// ExitDropView is called when production dropView is exited. +func (s *BaseTrinoParserListener) ExitDropView(ctx *DropViewContext) {} + +// EnterRenameView is called when production renameView is entered. +func (s *BaseTrinoParserListener) EnterRenameView(ctx *RenameViewContext) {} + +// ExitRenameView is called when production renameView is exited. +func (s *BaseTrinoParserListener) ExitRenameView(ctx *RenameViewContext) {} + +// EnterSetViewAuthorization is called when production setViewAuthorization is entered. +func (s *BaseTrinoParserListener) EnterSetViewAuthorization(ctx *SetViewAuthorizationContext) {} + +// ExitSetViewAuthorization is called when production setViewAuthorization is exited. +func (s *BaseTrinoParserListener) ExitSetViewAuthorization(ctx *SetViewAuthorizationContext) {} + +// EnterCall is called when production call is entered. +func (s *BaseTrinoParserListener) EnterCall(ctx *CallContext) {} + +// ExitCall is called when production call is exited. +func (s *BaseTrinoParserListener) ExitCall(ctx *CallContext) {} + +// EnterCreateFunction is called when production createFunction is entered. +func (s *BaseTrinoParserListener) EnterCreateFunction(ctx *CreateFunctionContext) {} + +// ExitCreateFunction is called when production createFunction is exited. +func (s *BaseTrinoParserListener) ExitCreateFunction(ctx *CreateFunctionContext) {} + +// EnterDropFunction is called when production dropFunction is entered. +func (s *BaseTrinoParserListener) EnterDropFunction(ctx *DropFunctionContext) {} + +// ExitDropFunction is called when production dropFunction is exited. +func (s *BaseTrinoParserListener) ExitDropFunction(ctx *DropFunctionContext) {} + +// EnterCreateRole is called when production createRole is entered. +func (s *BaseTrinoParserListener) EnterCreateRole(ctx *CreateRoleContext) {} + +// ExitCreateRole is called when production createRole is exited. +func (s *BaseTrinoParserListener) ExitCreateRole(ctx *CreateRoleContext) {} + +// EnterDropRole is called when production dropRole is entered. +func (s *BaseTrinoParserListener) EnterDropRole(ctx *DropRoleContext) {} + +// ExitDropRole is called when production dropRole is exited. +func (s *BaseTrinoParserListener) ExitDropRole(ctx *DropRoleContext) {} + +// EnterGrantRoles is called when production grantRoles is entered. +func (s *BaseTrinoParserListener) EnterGrantRoles(ctx *GrantRolesContext) {} + +// ExitGrantRoles is called when production grantRoles is exited. +func (s *BaseTrinoParserListener) ExitGrantRoles(ctx *GrantRolesContext) {} + +// EnterRevokeRoles is called when production revokeRoles is entered. +func (s *BaseTrinoParserListener) EnterRevokeRoles(ctx *RevokeRolesContext) {} + +// ExitRevokeRoles is called when production revokeRoles is exited. +func (s *BaseTrinoParserListener) ExitRevokeRoles(ctx *RevokeRolesContext) {} + +// EnterSetRole is called when production setRole is entered. +func (s *BaseTrinoParserListener) EnterSetRole(ctx *SetRoleContext) {} + +// ExitSetRole is called when production setRole is exited. +func (s *BaseTrinoParserListener) ExitSetRole(ctx *SetRoleContext) {} + +// EnterGrant is called when production grant is entered. +func (s *BaseTrinoParserListener) EnterGrant(ctx *GrantContext) {} + +// ExitGrant is called when production grant is exited. +func (s *BaseTrinoParserListener) ExitGrant(ctx *GrantContext) {} + +// EnterDeny is called when production deny is entered. +func (s *BaseTrinoParserListener) EnterDeny(ctx *DenyContext) {} + +// ExitDeny is called when production deny is exited. +func (s *BaseTrinoParserListener) ExitDeny(ctx *DenyContext) {} + +// EnterRevoke is called when production revoke is entered. +func (s *BaseTrinoParserListener) EnterRevoke(ctx *RevokeContext) {} + +// ExitRevoke is called when production revoke is exited. +func (s *BaseTrinoParserListener) ExitRevoke(ctx *RevokeContext) {} + +// EnterShowGrants is called when production showGrants is entered. +func (s *BaseTrinoParserListener) EnterShowGrants(ctx *ShowGrantsContext) {} + +// ExitShowGrants is called when production showGrants is exited. +func (s *BaseTrinoParserListener) ExitShowGrants(ctx *ShowGrantsContext) {} + +// EnterExplain is called when production explain is entered. +func (s *BaseTrinoParserListener) EnterExplain(ctx *ExplainContext) {} + +// ExitExplain is called when production explain is exited. +func (s *BaseTrinoParserListener) ExitExplain(ctx *ExplainContext) {} + +// EnterExplainAnalyze is called when production explainAnalyze is entered. +func (s *BaseTrinoParserListener) EnterExplainAnalyze(ctx *ExplainAnalyzeContext) {} + +// ExitExplainAnalyze is called when production explainAnalyze is exited. +func (s *BaseTrinoParserListener) ExitExplainAnalyze(ctx *ExplainAnalyzeContext) {} + +// EnterShowCreateTable is called when production showCreateTable is entered. +func (s *BaseTrinoParserListener) EnterShowCreateTable(ctx *ShowCreateTableContext) {} + +// ExitShowCreateTable is called when production showCreateTable is exited. +func (s *BaseTrinoParserListener) ExitShowCreateTable(ctx *ShowCreateTableContext) {} + +// EnterShowCreateSchema is called when production showCreateSchema is entered. +func (s *BaseTrinoParserListener) EnterShowCreateSchema(ctx *ShowCreateSchemaContext) {} + +// ExitShowCreateSchema is called when production showCreateSchema is exited. +func (s *BaseTrinoParserListener) ExitShowCreateSchema(ctx *ShowCreateSchemaContext) {} + +// EnterShowCreateView is called when production showCreateView is entered. +func (s *BaseTrinoParserListener) EnterShowCreateView(ctx *ShowCreateViewContext) {} + +// ExitShowCreateView is called when production showCreateView is exited. +func (s *BaseTrinoParserListener) ExitShowCreateView(ctx *ShowCreateViewContext) {} + +// EnterShowCreateMaterializedView is called when production showCreateMaterializedView is entered. +func (s *BaseTrinoParserListener) EnterShowCreateMaterializedView(ctx *ShowCreateMaterializedViewContext) { +} + +// ExitShowCreateMaterializedView is called when production showCreateMaterializedView is exited. +func (s *BaseTrinoParserListener) ExitShowCreateMaterializedView(ctx *ShowCreateMaterializedViewContext) { +} + +// EnterShowTables is called when production showTables is entered. +func (s *BaseTrinoParserListener) EnterShowTables(ctx *ShowTablesContext) {} + +// ExitShowTables is called when production showTables is exited. +func (s *BaseTrinoParserListener) ExitShowTables(ctx *ShowTablesContext) {} + +// EnterShowSchemas is called when production showSchemas is entered. +func (s *BaseTrinoParserListener) EnterShowSchemas(ctx *ShowSchemasContext) {} + +// ExitShowSchemas is called when production showSchemas is exited. +func (s *BaseTrinoParserListener) ExitShowSchemas(ctx *ShowSchemasContext) {} + +// EnterShowCatalogs is called when production showCatalogs is entered. +func (s *BaseTrinoParserListener) EnterShowCatalogs(ctx *ShowCatalogsContext) {} + +// ExitShowCatalogs is called when production showCatalogs is exited. +func (s *BaseTrinoParserListener) ExitShowCatalogs(ctx *ShowCatalogsContext) {} + +// EnterShowColumns is called when production showColumns is entered. +func (s *BaseTrinoParserListener) EnterShowColumns(ctx *ShowColumnsContext) {} + +// ExitShowColumns is called when production showColumns is exited. +func (s *BaseTrinoParserListener) ExitShowColumns(ctx *ShowColumnsContext) {} + +// EnterShowStats is called when production showStats is entered. +func (s *BaseTrinoParserListener) EnterShowStats(ctx *ShowStatsContext) {} + +// ExitShowStats is called when production showStats is exited. +func (s *BaseTrinoParserListener) ExitShowStats(ctx *ShowStatsContext) {} + +// EnterShowStatsForQuery is called when production showStatsForQuery is entered. +func (s *BaseTrinoParserListener) EnterShowStatsForQuery(ctx *ShowStatsForQueryContext) {} + +// ExitShowStatsForQuery is called when production showStatsForQuery is exited. +func (s *BaseTrinoParserListener) ExitShowStatsForQuery(ctx *ShowStatsForQueryContext) {} + +// EnterShowRoles is called when production showRoles is entered. +func (s *BaseTrinoParserListener) EnterShowRoles(ctx *ShowRolesContext) {} + +// ExitShowRoles is called when production showRoles is exited. +func (s *BaseTrinoParserListener) ExitShowRoles(ctx *ShowRolesContext) {} + +// EnterShowRoleGrants is called when production showRoleGrants is entered. +func (s *BaseTrinoParserListener) EnterShowRoleGrants(ctx *ShowRoleGrantsContext) {} + +// ExitShowRoleGrants is called when production showRoleGrants is exited. +func (s *BaseTrinoParserListener) ExitShowRoleGrants(ctx *ShowRoleGrantsContext) {} + +// EnterShowFunctions is called when production showFunctions is entered. +func (s *BaseTrinoParserListener) EnterShowFunctions(ctx *ShowFunctionsContext) {} + +// ExitShowFunctions is called when production showFunctions is exited. +func (s *BaseTrinoParserListener) ExitShowFunctions(ctx *ShowFunctionsContext) {} + +// EnterShowSession is called when production showSession is entered. +func (s *BaseTrinoParserListener) EnterShowSession(ctx *ShowSessionContext) {} + +// ExitShowSession is called when production showSession is exited. +func (s *BaseTrinoParserListener) ExitShowSession(ctx *ShowSessionContext) {} + +// EnterSetSessionAuthorization is called when production setSessionAuthorization is entered. +func (s *BaseTrinoParserListener) EnterSetSessionAuthorization(ctx *SetSessionAuthorizationContext) {} + +// ExitSetSessionAuthorization is called when production setSessionAuthorization is exited. +func (s *BaseTrinoParserListener) ExitSetSessionAuthorization(ctx *SetSessionAuthorizationContext) {} + +// EnterResetSessionAuthorization is called when production resetSessionAuthorization is entered. +func (s *BaseTrinoParserListener) EnterResetSessionAuthorization(ctx *ResetSessionAuthorizationContext) { +} + +// ExitResetSessionAuthorization is called when production resetSessionAuthorization is exited. +func (s *BaseTrinoParserListener) ExitResetSessionAuthorization(ctx *ResetSessionAuthorizationContext) { +} + +// EnterSetSession is called when production setSession is entered. +func (s *BaseTrinoParserListener) EnterSetSession(ctx *SetSessionContext) {} + +// ExitSetSession is called when production setSession is exited. +func (s *BaseTrinoParserListener) ExitSetSession(ctx *SetSessionContext) {} + +// EnterResetSession is called when production resetSession is entered. +func (s *BaseTrinoParserListener) EnterResetSession(ctx *ResetSessionContext) {} + +// ExitResetSession is called when production resetSession is exited. +func (s *BaseTrinoParserListener) ExitResetSession(ctx *ResetSessionContext) {} + +// EnterStartTransaction is called when production startTransaction is entered. +func (s *BaseTrinoParserListener) EnterStartTransaction(ctx *StartTransactionContext) {} + +// ExitStartTransaction is called when production startTransaction is exited. +func (s *BaseTrinoParserListener) ExitStartTransaction(ctx *StartTransactionContext) {} + +// EnterCommit is called when production commit is entered. +func (s *BaseTrinoParserListener) EnterCommit(ctx *CommitContext) {} + +// ExitCommit is called when production commit is exited. +func (s *BaseTrinoParserListener) ExitCommit(ctx *CommitContext) {} + +// EnterRollback is called when production rollback is entered. +func (s *BaseTrinoParserListener) EnterRollback(ctx *RollbackContext) {} + +// ExitRollback is called when production rollback is exited. +func (s *BaseTrinoParserListener) ExitRollback(ctx *RollbackContext) {} + +// EnterPrepare is called when production prepare is entered. +func (s *BaseTrinoParserListener) EnterPrepare(ctx *PrepareContext) {} + +// ExitPrepare is called when production prepare is exited. +func (s *BaseTrinoParserListener) ExitPrepare(ctx *PrepareContext) {} + +// EnterDeallocate is called when production deallocate is entered. +func (s *BaseTrinoParserListener) EnterDeallocate(ctx *DeallocateContext) {} + +// ExitDeallocate is called when production deallocate is exited. +func (s *BaseTrinoParserListener) ExitDeallocate(ctx *DeallocateContext) {} + +// EnterExecute is called when production execute is entered. +func (s *BaseTrinoParserListener) EnterExecute(ctx *ExecuteContext) {} + +// ExitExecute is called when production execute is exited. +func (s *BaseTrinoParserListener) ExitExecute(ctx *ExecuteContext) {} + +// EnterExecuteImmediate is called when production executeImmediate is entered. +func (s *BaseTrinoParserListener) EnterExecuteImmediate(ctx *ExecuteImmediateContext) {} + +// ExitExecuteImmediate is called when production executeImmediate is exited. +func (s *BaseTrinoParserListener) ExitExecuteImmediate(ctx *ExecuteImmediateContext) {} + +// EnterDescribeInput is called when production describeInput is entered. +func (s *BaseTrinoParserListener) EnterDescribeInput(ctx *DescribeInputContext) {} + +// ExitDescribeInput is called when production describeInput is exited. +func (s *BaseTrinoParserListener) ExitDescribeInput(ctx *DescribeInputContext) {} + +// EnterDescribeOutput is called when production describeOutput is entered. +func (s *BaseTrinoParserListener) EnterDescribeOutput(ctx *DescribeOutputContext) {} + +// ExitDescribeOutput is called when production describeOutput is exited. +func (s *BaseTrinoParserListener) ExitDescribeOutput(ctx *DescribeOutputContext) {} + +// EnterSetPath is called when production setPath is entered. +func (s *BaseTrinoParserListener) EnterSetPath(ctx *SetPathContext) {} + +// ExitSetPath is called when production setPath is exited. +func (s *BaseTrinoParserListener) ExitSetPath(ctx *SetPathContext) {} + +// EnterSetTimeZone is called when production setTimeZone is entered. +func (s *BaseTrinoParserListener) EnterSetTimeZone(ctx *SetTimeZoneContext) {} + +// ExitSetTimeZone is called when production setTimeZone is exited. +func (s *BaseTrinoParserListener) ExitSetTimeZone(ctx *SetTimeZoneContext) {} + +// EnterUpdate is called when production update is entered. +func (s *BaseTrinoParserListener) EnterUpdate(ctx *UpdateContext) {} + +// ExitUpdate is called when production update is exited. +func (s *BaseTrinoParserListener) ExitUpdate(ctx *UpdateContext) {} + +// EnterMerge is called when production merge is entered. +func (s *BaseTrinoParserListener) EnterMerge(ctx *MergeContext) {} + +// ExitMerge is called when production merge is exited. +func (s *BaseTrinoParserListener) ExitMerge(ctx *MergeContext) {} + +// EnterRootQuery is called when production rootQuery is entered. +func (s *BaseTrinoParserListener) EnterRootQuery(ctx *RootQueryContext) {} + +// ExitRootQuery is called when production rootQuery is exited. +func (s *BaseTrinoParserListener) ExitRootQuery(ctx *RootQueryContext) {} + +// EnterWithFunction is called when production withFunction is entered. +func (s *BaseTrinoParserListener) EnterWithFunction(ctx *WithFunctionContext) {} + +// ExitWithFunction is called when production withFunction is exited. +func (s *BaseTrinoParserListener) ExitWithFunction(ctx *WithFunctionContext) {} + +// EnterQuery is called when production query is entered. +func (s *BaseTrinoParserListener) EnterQuery(ctx *QueryContext) {} + +// ExitQuery is called when production query is exited. +func (s *BaseTrinoParserListener) ExitQuery(ctx *QueryContext) {} + +// EnterWith is called when production with is entered. +func (s *BaseTrinoParserListener) EnterWith(ctx *WithContext) {} + +// ExitWith is called when production with is exited. +func (s *BaseTrinoParserListener) ExitWith(ctx *WithContext) {} + +// EnterTableElement is called when production tableElement is entered. +func (s *BaseTrinoParserListener) EnterTableElement(ctx *TableElementContext) {} + +// ExitTableElement is called when production tableElement is exited. +func (s *BaseTrinoParserListener) ExitTableElement(ctx *TableElementContext) {} + +// EnterColumnDefinition is called when production columnDefinition is entered. +func (s *BaseTrinoParserListener) EnterColumnDefinition(ctx *ColumnDefinitionContext) {} + +// ExitColumnDefinition is called when production columnDefinition is exited. +func (s *BaseTrinoParserListener) ExitColumnDefinition(ctx *ColumnDefinitionContext) {} + +// EnterLikeClause is called when production likeClause is entered. +func (s *BaseTrinoParserListener) EnterLikeClause(ctx *LikeClauseContext) {} + +// ExitLikeClause is called when production likeClause is exited. +func (s *BaseTrinoParserListener) ExitLikeClause(ctx *LikeClauseContext) {} + +// EnterProperties is called when production properties is entered. +func (s *BaseTrinoParserListener) EnterProperties(ctx *PropertiesContext) {} + +// ExitProperties is called when production properties is exited. +func (s *BaseTrinoParserListener) ExitProperties(ctx *PropertiesContext) {} + +// EnterPropertyAssignments is called when production propertyAssignments is entered. +func (s *BaseTrinoParserListener) EnterPropertyAssignments(ctx *PropertyAssignmentsContext) {} + +// ExitPropertyAssignments is called when production propertyAssignments is exited. +func (s *BaseTrinoParserListener) ExitPropertyAssignments(ctx *PropertyAssignmentsContext) {} + +// EnterProperty is called when production property is entered. +func (s *BaseTrinoParserListener) EnterProperty(ctx *PropertyContext) {} + +// ExitProperty is called when production property is exited. +func (s *BaseTrinoParserListener) ExitProperty(ctx *PropertyContext) {} + +// EnterDefaultPropertyValue is called when production defaultPropertyValue is entered. +func (s *BaseTrinoParserListener) EnterDefaultPropertyValue(ctx *DefaultPropertyValueContext) {} + +// ExitDefaultPropertyValue is called when production defaultPropertyValue is exited. +func (s *BaseTrinoParserListener) ExitDefaultPropertyValue(ctx *DefaultPropertyValueContext) {} + +// EnterNonDefaultPropertyValue is called when production nonDefaultPropertyValue is entered. +func (s *BaseTrinoParserListener) EnterNonDefaultPropertyValue(ctx *NonDefaultPropertyValueContext) {} + +// ExitNonDefaultPropertyValue is called when production nonDefaultPropertyValue is exited. +func (s *BaseTrinoParserListener) ExitNonDefaultPropertyValue(ctx *NonDefaultPropertyValueContext) {} + +// EnterQueryNoWith is called when production queryNoWith is entered. +func (s *BaseTrinoParserListener) EnterQueryNoWith(ctx *QueryNoWithContext) {} + +// ExitQueryNoWith is called when production queryNoWith is exited. +func (s *BaseTrinoParserListener) ExitQueryNoWith(ctx *QueryNoWithContext) {} + +// EnterLimitRowCount is called when production limitRowCount is entered. +func (s *BaseTrinoParserListener) EnterLimitRowCount(ctx *LimitRowCountContext) {} + +// ExitLimitRowCount is called when production limitRowCount is exited. +func (s *BaseTrinoParserListener) ExitLimitRowCount(ctx *LimitRowCountContext) {} + +// EnterRowCount is called when production rowCount is entered. +func (s *BaseTrinoParserListener) EnterRowCount(ctx *RowCountContext) {} + +// ExitRowCount is called when production rowCount is exited. +func (s *BaseTrinoParserListener) ExitRowCount(ctx *RowCountContext) {} + +// EnterQueryTermDefault is called when production queryTermDefault is entered. +func (s *BaseTrinoParserListener) EnterQueryTermDefault(ctx *QueryTermDefaultContext) {} + +// ExitQueryTermDefault is called when production queryTermDefault is exited. +func (s *BaseTrinoParserListener) ExitQueryTermDefault(ctx *QueryTermDefaultContext) {} + +// EnterSetOperation is called when production setOperation is entered. +func (s *BaseTrinoParserListener) EnterSetOperation(ctx *SetOperationContext) {} + +// ExitSetOperation is called when production setOperation is exited. +func (s *BaseTrinoParserListener) ExitSetOperation(ctx *SetOperationContext) {} + +// EnterQueryPrimaryDefault is called when production queryPrimaryDefault is entered. +func (s *BaseTrinoParserListener) EnterQueryPrimaryDefault(ctx *QueryPrimaryDefaultContext) {} + +// ExitQueryPrimaryDefault is called when production queryPrimaryDefault is exited. +func (s *BaseTrinoParserListener) ExitQueryPrimaryDefault(ctx *QueryPrimaryDefaultContext) {} + +// EnterTable is called when production table is entered. +func (s *BaseTrinoParserListener) EnterTable(ctx *TableContext) {} + +// ExitTable is called when production table is exited. +func (s *BaseTrinoParserListener) ExitTable(ctx *TableContext) {} + +// EnterInlineTable is called when production inlineTable is entered. +func (s *BaseTrinoParserListener) EnterInlineTable(ctx *InlineTableContext) {} + +// ExitInlineTable is called when production inlineTable is exited. +func (s *BaseTrinoParserListener) ExitInlineTable(ctx *InlineTableContext) {} + +// EnterSubquery is called when production subquery is entered. +func (s *BaseTrinoParserListener) EnterSubquery(ctx *SubqueryContext) {} + +// ExitSubquery is called when production subquery is exited. +func (s *BaseTrinoParserListener) ExitSubquery(ctx *SubqueryContext) {} + +// EnterSortItem is called when production sortItem is entered. +func (s *BaseTrinoParserListener) EnterSortItem(ctx *SortItemContext) {} + +// ExitSortItem is called when production sortItem is exited. +func (s *BaseTrinoParserListener) ExitSortItem(ctx *SortItemContext) {} + +// EnterQuerySpecification is called when production querySpecification is entered. +func (s *BaseTrinoParserListener) EnterQuerySpecification(ctx *QuerySpecificationContext) {} + +// ExitQuerySpecification is called when production querySpecification is exited. +func (s *BaseTrinoParserListener) ExitQuerySpecification(ctx *QuerySpecificationContext) {} + +// EnterGroupBy is called when production groupBy is entered. +func (s *BaseTrinoParserListener) EnterGroupBy(ctx *GroupByContext) {} + +// ExitGroupBy is called when production groupBy is exited. +func (s *BaseTrinoParserListener) ExitGroupBy(ctx *GroupByContext) {} + +// EnterSingleGroupingSet is called when production singleGroupingSet is entered. +func (s *BaseTrinoParserListener) EnterSingleGroupingSet(ctx *SingleGroupingSetContext) {} + +// ExitSingleGroupingSet is called when production singleGroupingSet is exited. +func (s *BaseTrinoParserListener) ExitSingleGroupingSet(ctx *SingleGroupingSetContext) {} + +// EnterRollup is called when production rollup is entered. +func (s *BaseTrinoParserListener) EnterRollup(ctx *RollupContext) {} + +// ExitRollup is called when production rollup is exited. +func (s *BaseTrinoParserListener) ExitRollup(ctx *RollupContext) {} + +// EnterCube is called when production cube is entered. +func (s *BaseTrinoParserListener) EnterCube(ctx *CubeContext) {} + +// ExitCube is called when production cube is exited. +func (s *BaseTrinoParserListener) ExitCube(ctx *CubeContext) {} + +// EnterMultipleGroupingSets is called when production multipleGroupingSets is entered. +func (s *BaseTrinoParserListener) EnterMultipleGroupingSets(ctx *MultipleGroupingSetsContext) {} + +// ExitMultipleGroupingSets is called when production multipleGroupingSets is exited. +func (s *BaseTrinoParserListener) ExitMultipleGroupingSets(ctx *MultipleGroupingSetsContext) {} + +// EnterGroupingSet is called when production groupingSet is entered. +func (s *BaseTrinoParserListener) EnterGroupingSet(ctx *GroupingSetContext) {} + +// ExitGroupingSet is called when production groupingSet is exited. +func (s *BaseTrinoParserListener) ExitGroupingSet(ctx *GroupingSetContext) {} + +// EnterWindowDefinition is called when production windowDefinition is entered. +func (s *BaseTrinoParserListener) EnterWindowDefinition(ctx *WindowDefinitionContext) {} + +// ExitWindowDefinition is called when production windowDefinition is exited. +func (s *BaseTrinoParserListener) ExitWindowDefinition(ctx *WindowDefinitionContext) {} + +// EnterWindowSpecification is called when production windowSpecification is entered. +func (s *BaseTrinoParserListener) EnterWindowSpecification(ctx *WindowSpecificationContext) {} + +// ExitWindowSpecification is called when production windowSpecification is exited. +func (s *BaseTrinoParserListener) ExitWindowSpecification(ctx *WindowSpecificationContext) {} + +// EnterNamedQuery is called when production namedQuery is entered. +func (s *BaseTrinoParserListener) EnterNamedQuery(ctx *NamedQueryContext) {} + +// ExitNamedQuery is called when production namedQuery is exited. +func (s *BaseTrinoParserListener) ExitNamedQuery(ctx *NamedQueryContext) {} + +// EnterSetQuantifier is called when production setQuantifier is entered. +func (s *BaseTrinoParserListener) EnterSetQuantifier(ctx *SetQuantifierContext) {} + +// ExitSetQuantifier is called when production setQuantifier is exited. +func (s *BaseTrinoParserListener) ExitSetQuantifier(ctx *SetQuantifierContext) {} + +// EnterSelectSingle is called when production selectSingle is entered. +func (s *BaseTrinoParserListener) EnterSelectSingle(ctx *SelectSingleContext) {} + +// ExitSelectSingle is called when production selectSingle is exited. +func (s *BaseTrinoParserListener) ExitSelectSingle(ctx *SelectSingleContext) {} + +// EnterSelectAll is called when production selectAll is entered. +func (s *BaseTrinoParserListener) EnterSelectAll(ctx *SelectAllContext) {} + +// ExitSelectAll is called when production selectAll is exited. +func (s *BaseTrinoParserListener) ExitSelectAll(ctx *SelectAllContext) {} + +// EnterAs_column_alias is called when production as_column_alias is entered. +func (s *BaseTrinoParserListener) EnterAs_column_alias(ctx *As_column_aliasContext) {} + +// ExitAs_column_alias is called when production as_column_alias is exited. +func (s *BaseTrinoParserListener) ExitAs_column_alias(ctx *As_column_aliasContext) {} + +// EnterColumn_alias is called when production column_alias is entered. +func (s *BaseTrinoParserListener) EnterColumn_alias(ctx *Column_aliasContext) {} + +// ExitColumn_alias is called when production column_alias is exited. +func (s *BaseTrinoParserListener) ExitColumn_alias(ctx *Column_aliasContext) {} + +// EnterRelationDefault is called when production relationDefault is entered. +func (s *BaseTrinoParserListener) EnterRelationDefault(ctx *RelationDefaultContext) {} + +// ExitRelationDefault is called when production relationDefault is exited. +func (s *BaseTrinoParserListener) ExitRelationDefault(ctx *RelationDefaultContext) {} + +// EnterJoinRelation is called when production joinRelation is entered. +func (s *BaseTrinoParserListener) EnterJoinRelation(ctx *JoinRelationContext) {} + +// ExitJoinRelation is called when production joinRelation is exited. +func (s *BaseTrinoParserListener) ExitJoinRelation(ctx *JoinRelationContext) {} + +// EnterJoinType is called when production joinType is entered. +func (s *BaseTrinoParserListener) EnterJoinType(ctx *JoinTypeContext) {} + +// ExitJoinType is called when production joinType is exited. +func (s *BaseTrinoParserListener) ExitJoinType(ctx *JoinTypeContext) {} + +// EnterJoinCriteria is called when production joinCriteria is entered. +func (s *BaseTrinoParserListener) EnterJoinCriteria(ctx *JoinCriteriaContext) {} + +// ExitJoinCriteria is called when production joinCriteria is exited. +func (s *BaseTrinoParserListener) ExitJoinCriteria(ctx *JoinCriteriaContext) {} + +// EnterSampledRelation is called when production sampledRelation is entered. +func (s *BaseTrinoParserListener) EnterSampledRelation(ctx *SampledRelationContext) {} + +// ExitSampledRelation is called when production sampledRelation is exited. +func (s *BaseTrinoParserListener) ExitSampledRelation(ctx *SampledRelationContext) {} + +// EnterSampleType is called when production sampleType is entered. +func (s *BaseTrinoParserListener) EnterSampleType(ctx *SampleTypeContext) {} + +// ExitSampleType is called when production sampleType is exited. +func (s *BaseTrinoParserListener) ExitSampleType(ctx *SampleTypeContext) {} + +// EnterTrimsSpecification is called when production trimsSpecification is entered. +func (s *BaseTrinoParserListener) EnterTrimsSpecification(ctx *TrimsSpecificationContext) {} + +// ExitTrimsSpecification is called when production trimsSpecification is exited. +func (s *BaseTrinoParserListener) ExitTrimsSpecification(ctx *TrimsSpecificationContext) {} + +// EnterListAggOverflowBehavior is called when production listAggOverflowBehavior is entered. +func (s *BaseTrinoParserListener) EnterListAggOverflowBehavior(ctx *ListAggOverflowBehaviorContext) {} + +// ExitListAggOverflowBehavior is called when production listAggOverflowBehavior is exited. +func (s *BaseTrinoParserListener) ExitListAggOverflowBehavior(ctx *ListAggOverflowBehaviorContext) {} + +// EnterListaggCountIndication is called when production listaggCountIndication is entered. +func (s *BaseTrinoParserListener) EnterListaggCountIndication(ctx *ListaggCountIndicationContext) {} + +// ExitListaggCountIndication is called when production listaggCountIndication is exited. +func (s *BaseTrinoParserListener) ExitListaggCountIndication(ctx *ListaggCountIndicationContext) {} + +// EnterPatternRecognition is called when production patternRecognition is entered. +func (s *BaseTrinoParserListener) EnterPatternRecognition(ctx *PatternRecognitionContext) {} + +// ExitPatternRecognition is called when production patternRecognition is exited. +func (s *BaseTrinoParserListener) ExitPatternRecognition(ctx *PatternRecognitionContext) {} + +// EnterMeasureDefinition is called when production measureDefinition is entered. +func (s *BaseTrinoParserListener) EnterMeasureDefinition(ctx *MeasureDefinitionContext) {} + +// ExitMeasureDefinition is called when production measureDefinition is exited. +func (s *BaseTrinoParserListener) ExitMeasureDefinition(ctx *MeasureDefinitionContext) {} + +// EnterRowsPerMatch is called when production rowsPerMatch is entered. +func (s *BaseTrinoParserListener) EnterRowsPerMatch(ctx *RowsPerMatchContext) {} + +// ExitRowsPerMatch is called when production rowsPerMatch is exited. +func (s *BaseTrinoParserListener) ExitRowsPerMatch(ctx *RowsPerMatchContext) {} + +// EnterEmptyMatchHandling is called when production emptyMatchHandling is entered. +func (s *BaseTrinoParserListener) EnterEmptyMatchHandling(ctx *EmptyMatchHandlingContext) {} + +// ExitEmptyMatchHandling is called when production emptyMatchHandling is exited. +func (s *BaseTrinoParserListener) ExitEmptyMatchHandling(ctx *EmptyMatchHandlingContext) {} + +// EnterSkipTo is called when production skipTo is entered. +func (s *BaseTrinoParserListener) EnterSkipTo(ctx *SkipToContext) {} + +// ExitSkipTo is called when production skipTo is exited. +func (s *BaseTrinoParserListener) ExitSkipTo(ctx *SkipToContext) {} + +// EnterSubsetDefinition is called when production subsetDefinition is entered. +func (s *BaseTrinoParserListener) EnterSubsetDefinition(ctx *SubsetDefinitionContext) {} + +// ExitSubsetDefinition is called when production subsetDefinition is exited. +func (s *BaseTrinoParserListener) ExitSubsetDefinition(ctx *SubsetDefinitionContext) {} + +// EnterVariableDefinition is called when production variableDefinition is entered. +func (s *BaseTrinoParserListener) EnterVariableDefinition(ctx *VariableDefinitionContext) {} + +// ExitVariableDefinition is called when production variableDefinition is exited. +func (s *BaseTrinoParserListener) ExitVariableDefinition(ctx *VariableDefinitionContext) {} + +// EnterAliasedRelation is called when production aliasedRelation is entered. +func (s *BaseTrinoParserListener) EnterAliasedRelation(ctx *AliasedRelationContext) {} + +// ExitAliasedRelation is called when production aliasedRelation is exited. +func (s *BaseTrinoParserListener) ExitAliasedRelation(ctx *AliasedRelationContext) {} + +// EnterColumnAliases is called when production columnAliases is entered. +func (s *BaseTrinoParserListener) EnterColumnAliases(ctx *ColumnAliasesContext) {} + +// ExitColumnAliases is called when production columnAliases is exited. +func (s *BaseTrinoParserListener) ExitColumnAliases(ctx *ColumnAliasesContext) {} + +// EnterTableName is called when production tableName is entered. +func (s *BaseTrinoParserListener) EnterTableName(ctx *TableNameContext) {} + +// ExitTableName is called when production tableName is exited. +func (s *BaseTrinoParserListener) ExitTableName(ctx *TableNameContext) {} + +// EnterSubqueryRelation is called when production subqueryRelation is entered. +func (s *BaseTrinoParserListener) EnterSubqueryRelation(ctx *SubqueryRelationContext) {} + +// ExitSubqueryRelation is called when production subqueryRelation is exited. +func (s *BaseTrinoParserListener) ExitSubqueryRelation(ctx *SubqueryRelationContext) {} + +// EnterUnnest is called when production unnest is entered. +func (s *BaseTrinoParserListener) EnterUnnest(ctx *UnnestContext) {} + +// ExitUnnest is called when production unnest is exited. +func (s *BaseTrinoParserListener) ExitUnnest(ctx *UnnestContext) {} + +// EnterLateral is called when production lateral is entered. +func (s *BaseTrinoParserListener) EnterLateral(ctx *LateralContext) {} + +// ExitLateral is called when production lateral is exited. +func (s *BaseTrinoParserListener) ExitLateral(ctx *LateralContext) {} + +// EnterTableFunctionInvocation is called when production tableFunctionInvocation is entered. +func (s *BaseTrinoParserListener) EnterTableFunctionInvocation(ctx *TableFunctionInvocationContext) {} + +// ExitTableFunctionInvocation is called when production tableFunctionInvocation is exited. +func (s *BaseTrinoParserListener) ExitTableFunctionInvocation(ctx *TableFunctionInvocationContext) {} + +// EnterParenthesizedRelation is called when production parenthesizedRelation is entered. +func (s *BaseTrinoParserListener) EnterParenthesizedRelation(ctx *ParenthesizedRelationContext) {} + +// ExitParenthesizedRelation is called when production parenthesizedRelation is exited. +func (s *BaseTrinoParserListener) ExitParenthesizedRelation(ctx *ParenthesizedRelationContext) {} + +// EnterTableFunctionCall is called when production tableFunctionCall is entered. +func (s *BaseTrinoParserListener) EnterTableFunctionCall(ctx *TableFunctionCallContext) {} + +// ExitTableFunctionCall is called when production tableFunctionCall is exited. +func (s *BaseTrinoParserListener) ExitTableFunctionCall(ctx *TableFunctionCallContext) {} + +// EnterTableFunctionArgument is called when production tableFunctionArgument is entered. +func (s *BaseTrinoParserListener) EnterTableFunctionArgument(ctx *TableFunctionArgumentContext) {} + +// ExitTableFunctionArgument is called when production tableFunctionArgument is exited. +func (s *BaseTrinoParserListener) ExitTableFunctionArgument(ctx *TableFunctionArgumentContext) {} + +// EnterTableArgument is called when production tableArgument is entered. +func (s *BaseTrinoParserListener) EnterTableArgument(ctx *TableArgumentContext) {} + +// ExitTableArgument is called when production tableArgument is exited. +func (s *BaseTrinoParserListener) ExitTableArgument(ctx *TableArgumentContext) {} + +// EnterTableArgumentTable is called when production tableArgumentTable is entered. +func (s *BaseTrinoParserListener) EnterTableArgumentTable(ctx *TableArgumentTableContext) {} + +// ExitTableArgumentTable is called when production tableArgumentTable is exited. +func (s *BaseTrinoParserListener) ExitTableArgumentTable(ctx *TableArgumentTableContext) {} + +// EnterTableArgumentQuery is called when production tableArgumentQuery is entered. +func (s *BaseTrinoParserListener) EnterTableArgumentQuery(ctx *TableArgumentQueryContext) {} + +// ExitTableArgumentQuery is called when production tableArgumentQuery is exited. +func (s *BaseTrinoParserListener) ExitTableArgumentQuery(ctx *TableArgumentQueryContext) {} + +// EnterDescriptorArgument is called when production descriptorArgument is entered. +func (s *BaseTrinoParserListener) EnterDescriptorArgument(ctx *DescriptorArgumentContext) {} + +// ExitDescriptorArgument is called when production descriptorArgument is exited. +func (s *BaseTrinoParserListener) ExitDescriptorArgument(ctx *DescriptorArgumentContext) {} + +// EnterDescriptorField is called when production descriptorField is entered. +func (s *BaseTrinoParserListener) EnterDescriptorField(ctx *DescriptorFieldContext) {} + +// ExitDescriptorField is called when production descriptorField is exited. +func (s *BaseTrinoParserListener) ExitDescriptorField(ctx *DescriptorFieldContext) {} + +// EnterCopartitionTables is called when production copartitionTables is entered. +func (s *BaseTrinoParserListener) EnterCopartitionTables(ctx *CopartitionTablesContext) {} + +// ExitCopartitionTables is called when production copartitionTables is exited. +func (s *BaseTrinoParserListener) ExitCopartitionTables(ctx *CopartitionTablesContext) {} + +// EnterExpression is called when production expression is entered. +func (s *BaseTrinoParserListener) EnterExpression(ctx *ExpressionContext) {} + +// ExitExpression is called when production expression is exited. +func (s *BaseTrinoParserListener) ExitExpression(ctx *ExpressionContext) {} + +// EnterLogicalNot is called when production logicalNot is entered. +func (s *BaseTrinoParserListener) EnterLogicalNot(ctx *LogicalNotContext) {} + +// ExitLogicalNot is called when production logicalNot is exited. +func (s *BaseTrinoParserListener) ExitLogicalNot(ctx *LogicalNotContext) {} + +// EnterPredicated is called when production predicated is entered. +func (s *BaseTrinoParserListener) EnterPredicated(ctx *PredicatedContext) {} + +// ExitPredicated is called when production predicated is exited. +func (s *BaseTrinoParserListener) ExitPredicated(ctx *PredicatedContext) {} + +// EnterOr is called when production or is entered. +func (s *BaseTrinoParserListener) EnterOr(ctx *OrContext) {} + +// ExitOr is called when production or is exited. +func (s *BaseTrinoParserListener) ExitOr(ctx *OrContext) {} + +// EnterAnd is called when production and is entered. +func (s *BaseTrinoParserListener) EnterAnd(ctx *AndContext) {} + +// ExitAnd is called when production and is exited. +func (s *BaseTrinoParserListener) ExitAnd(ctx *AndContext) {} + +// EnterComparison is called when production comparison is entered. +func (s *BaseTrinoParserListener) EnterComparison(ctx *ComparisonContext) {} + +// ExitComparison is called when production comparison is exited. +func (s *BaseTrinoParserListener) ExitComparison(ctx *ComparisonContext) {} + +// EnterQuantifiedComparison is called when production quantifiedComparison is entered. +func (s *BaseTrinoParserListener) EnterQuantifiedComparison(ctx *QuantifiedComparisonContext) {} + +// ExitQuantifiedComparison is called when production quantifiedComparison is exited. +func (s *BaseTrinoParserListener) ExitQuantifiedComparison(ctx *QuantifiedComparisonContext) {} + +// EnterBetween is called when production between is entered. +func (s *BaseTrinoParserListener) EnterBetween(ctx *BetweenContext) {} + +// ExitBetween is called when production between is exited. +func (s *BaseTrinoParserListener) ExitBetween(ctx *BetweenContext) {} + +// EnterInList is called when production inList is entered. +func (s *BaseTrinoParserListener) EnterInList(ctx *InListContext) {} + +// ExitInList is called when production inList is exited. +func (s *BaseTrinoParserListener) ExitInList(ctx *InListContext) {} + +// EnterInSubquery is called when production inSubquery is entered. +func (s *BaseTrinoParserListener) EnterInSubquery(ctx *InSubqueryContext) {} + +// ExitInSubquery is called when production inSubquery is exited. +func (s *BaseTrinoParserListener) ExitInSubquery(ctx *InSubqueryContext) {} + +// EnterLike is called when production like is entered. +func (s *BaseTrinoParserListener) EnterLike(ctx *LikeContext) {} + +// ExitLike is called when production like is exited. +func (s *BaseTrinoParserListener) ExitLike(ctx *LikeContext) {} + +// EnterNullPredicate is called when production nullPredicate is entered. +func (s *BaseTrinoParserListener) EnterNullPredicate(ctx *NullPredicateContext) {} + +// ExitNullPredicate is called when production nullPredicate is exited. +func (s *BaseTrinoParserListener) ExitNullPredicate(ctx *NullPredicateContext) {} + +// EnterDistinctFrom is called when production distinctFrom is entered. +func (s *BaseTrinoParserListener) EnterDistinctFrom(ctx *DistinctFromContext) {} + +// ExitDistinctFrom is called when production distinctFrom is exited. +func (s *BaseTrinoParserListener) ExitDistinctFrom(ctx *DistinctFromContext) {} + +// EnterValueExpressionDefault is called when production valueExpressionDefault is entered. +func (s *BaseTrinoParserListener) EnterValueExpressionDefault(ctx *ValueExpressionDefaultContext) {} + +// ExitValueExpressionDefault is called when production valueExpressionDefault is exited. +func (s *BaseTrinoParserListener) ExitValueExpressionDefault(ctx *ValueExpressionDefaultContext) {} + +// EnterConcatenation is called when production concatenation is entered. +func (s *BaseTrinoParserListener) EnterConcatenation(ctx *ConcatenationContext) {} + +// ExitConcatenation is called when production concatenation is exited. +func (s *BaseTrinoParserListener) ExitConcatenation(ctx *ConcatenationContext) {} + +// EnterArithmeticBinary is called when production arithmeticBinary is entered. +func (s *BaseTrinoParserListener) EnterArithmeticBinary(ctx *ArithmeticBinaryContext) {} + +// ExitArithmeticBinary is called when production arithmeticBinary is exited. +func (s *BaseTrinoParserListener) ExitArithmeticBinary(ctx *ArithmeticBinaryContext) {} + +// EnterArithmeticUnary is called when production arithmeticUnary is entered. +func (s *BaseTrinoParserListener) EnterArithmeticUnary(ctx *ArithmeticUnaryContext) {} + +// ExitArithmeticUnary is called when production arithmeticUnary is exited. +func (s *BaseTrinoParserListener) ExitArithmeticUnary(ctx *ArithmeticUnaryContext) {} + +// EnterAtTimeZone is called when production atTimeZone is entered. +func (s *BaseTrinoParserListener) EnterAtTimeZone(ctx *AtTimeZoneContext) {} + +// ExitAtTimeZone is called when production atTimeZone is exited. +func (s *BaseTrinoParserListener) ExitAtTimeZone(ctx *AtTimeZoneContext) {} + +// EnterDereference is called when production dereference is entered. +func (s *BaseTrinoParserListener) EnterDereference(ctx *DereferenceContext) {} + +// ExitDereference is called when production dereference is exited. +func (s *BaseTrinoParserListener) ExitDereference(ctx *DereferenceContext) {} + +// EnterTypeConstructor is called when production typeConstructor is entered. +func (s *BaseTrinoParserListener) EnterTypeConstructor(ctx *TypeConstructorContext) {} + +// ExitTypeConstructor is called when production typeConstructor is exited. +func (s *BaseTrinoParserListener) ExitTypeConstructor(ctx *TypeConstructorContext) {} + +// EnterJsonValue is called when production jsonValue is entered. +func (s *BaseTrinoParserListener) EnterJsonValue(ctx *JsonValueContext) {} + +// ExitJsonValue is called when production jsonValue is exited. +func (s *BaseTrinoParserListener) ExitJsonValue(ctx *JsonValueContext) {} + +// EnterSpecialDateTimeFunction is called when production specialDateTimeFunction is entered. +func (s *BaseTrinoParserListener) EnterSpecialDateTimeFunction(ctx *SpecialDateTimeFunctionContext) {} + +// ExitSpecialDateTimeFunction is called when production specialDateTimeFunction is exited. +func (s *BaseTrinoParserListener) ExitSpecialDateTimeFunction(ctx *SpecialDateTimeFunctionContext) {} + +// EnterSubstring is called when production substring is entered. +func (s *BaseTrinoParserListener) EnterSubstring(ctx *SubstringContext) {} + +// ExitSubstring is called when production substring is exited. +func (s *BaseTrinoParserListener) ExitSubstring(ctx *SubstringContext) {} + +// EnterCast is called when production cast is entered. +func (s *BaseTrinoParserListener) EnterCast(ctx *CastContext) {} + +// ExitCast is called when production cast is exited. +func (s *BaseTrinoParserListener) ExitCast(ctx *CastContext) {} + +// EnterLambda is called when production lambda is entered. +func (s *BaseTrinoParserListener) EnterLambda(ctx *LambdaContext) {} + +// ExitLambda is called when production lambda is exited. +func (s *BaseTrinoParserListener) ExitLambda(ctx *LambdaContext) {} + +// EnterParenthesizedExpression is called when production parenthesizedExpression is entered. +func (s *BaseTrinoParserListener) EnterParenthesizedExpression(ctx *ParenthesizedExpressionContext) {} + +// ExitParenthesizedExpression is called when production parenthesizedExpression is exited. +func (s *BaseTrinoParserListener) ExitParenthesizedExpression(ctx *ParenthesizedExpressionContext) {} + +// EnterTrim is called when production trim is entered. +func (s *BaseTrinoParserListener) EnterTrim(ctx *TrimContext) {} + +// ExitTrim is called when production trim is exited. +func (s *BaseTrinoParserListener) ExitTrim(ctx *TrimContext) {} + +// EnterParameter is called when production parameter is entered. +func (s *BaseTrinoParserListener) EnterParameter(ctx *ParameterContext) {} + +// ExitParameter is called when production parameter is exited. +func (s *BaseTrinoParserListener) ExitParameter(ctx *ParameterContext) {} + +// EnterNormalize is called when production normalize is entered. +func (s *BaseTrinoParserListener) EnterNormalize(ctx *NormalizeContext) {} + +// ExitNormalize is called when production normalize is exited. +func (s *BaseTrinoParserListener) ExitNormalize(ctx *NormalizeContext) {} + +// EnterJsonObject is called when production jsonObject is entered. +func (s *BaseTrinoParserListener) EnterJsonObject(ctx *JsonObjectContext) {} + +// ExitJsonObject is called when production jsonObject is exited. +func (s *BaseTrinoParserListener) ExitJsonObject(ctx *JsonObjectContext) {} + +// EnterIntervalLiteral is called when production intervalLiteral is entered. +func (s *BaseTrinoParserListener) EnterIntervalLiteral(ctx *IntervalLiteralContext) {} + +// ExitIntervalLiteral is called when production intervalLiteral is exited. +func (s *BaseTrinoParserListener) ExitIntervalLiteral(ctx *IntervalLiteralContext) {} + +// EnterNumericLiteral is called when production numericLiteral is entered. +func (s *BaseTrinoParserListener) EnterNumericLiteral(ctx *NumericLiteralContext) {} + +// ExitNumericLiteral is called when production numericLiteral is exited. +func (s *BaseTrinoParserListener) ExitNumericLiteral(ctx *NumericLiteralContext) {} + +// EnterBooleanLiteral is called when production booleanLiteral is entered. +func (s *BaseTrinoParserListener) EnterBooleanLiteral(ctx *BooleanLiteralContext) {} + +// ExitBooleanLiteral is called when production booleanLiteral is exited. +func (s *BaseTrinoParserListener) ExitBooleanLiteral(ctx *BooleanLiteralContext) {} + +// EnterJsonArray is called when production jsonArray is entered. +func (s *BaseTrinoParserListener) EnterJsonArray(ctx *JsonArrayContext) {} + +// ExitJsonArray is called when production jsonArray is exited. +func (s *BaseTrinoParserListener) ExitJsonArray(ctx *JsonArrayContext) {} + +// EnterSimpleCase is called when production simpleCase is entered. +func (s *BaseTrinoParserListener) EnterSimpleCase(ctx *SimpleCaseContext) {} + +// ExitSimpleCase is called when production simpleCase is exited. +func (s *BaseTrinoParserListener) ExitSimpleCase(ctx *SimpleCaseContext) {} + +// EnterColumnReference is called when production columnReference is entered. +func (s *BaseTrinoParserListener) EnterColumnReference(ctx *ColumnReferenceContext) {} + +// ExitColumnReference is called when production columnReference is exited. +func (s *BaseTrinoParserListener) ExitColumnReference(ctx *ColumnReferenceContext) {} + +// EnterNullLiteral is called when production nullLiteral is entered. +func (s *BaseTrinoParserListener) EnterNullLiteral(ctx *NullLiteralContext) {} + +// ExitNullLiteral is called when production nullLiteral is exited. +func (s *BaseTrinoParserListener) ExitNullLiteral(ctx *NullLiteralContext) {} + +// EnterRowConstructor is called when production rowConstructor is entered. +func (s *BaseTrinoParserListener) EnterRowConstructor(ctx *RowConstructorContext) {} + +// ExitRowConstructor is called when production rowConstructor is exited. +func (s *BaseTrinoParserListener) ExitRowConstructor(ctx *RowConstructorContext) {} + +// EnterSubscript is called when production subscript is entered. +func (s *BaseTrinoParserListener) EnterSubscript(ctx *SubscriptContext) {} + +// ExitSubscript is called when production subscript is exited. +func (s *BaseTrinoParserListener) ExitSubscript(ctx *SubscriptContext) {} + +// EnterJsonExists is called when production jsonExists is entered. +func (s *BaseTrinoParserListener) EnterJsonExists(ctx *JsonExistsContext) {} + +// ExitJsonExists is called when production jsonExists is exited. +func (s *BaseTrinoParserListener) ExitJsonExists(ctx *JsonExistsContext) {} + +// EnterCurrentPath is called when production currentPath is entered. +func (s *BaseTrinoParserListener) EnterCurrentPath(ctx *CurrentPathContext) {} + +// ExitCurrentPath is called when production currentPath is exited. +func (s *BaseTrinoParserListener) ExitCurrentPath(ctx *CurrentPathContext) {} + +// EnterSubqueryExpression is called when production subqueryExpression is entered. +func (s *BaseTrinoParserListener) EnterSubqueryExpression(ctx *SubqueryExpressionContext) {} + +// ExitSubqueryExpression is called when production subqueryExpression is exited. +func (s *BaseTrinoParserListener) ExitSubqueryExpression(ctx *SubqueryExpressionContext) {} + +// EnterBinaryLiteral is called when production binaryLiteral is entered. +func (s *BaseTrinoParserListener) EnterBinaryLiteral(ctx *BinaryLiteralContext) {} + +// ExitBinaryLiteral is called when production binaryLiteral is exited. +func (s *BaseTrinoParserListener) ExitBinaryLiteral(ctx *BinaryLiteralContext) {} + +// EnterCurrentUser is called when production currentUser is entered. +func (s *BaseTrinoParserListener) EnterCurrentUser(ctx *CurrentUserContext) {} + +// ExitCurrentUser is called when production currentUser is exited. +func (s *BaseTrinoParserListener) ExitCurrentUser(ctx *CurrentUserContext) {} + +// EnterJsonQuery is called when production jsonQuery is entered. +func (s *BaseTrinoParserListener) EnterJsonQuery(ctx *JsonQueryContext) {} + +// ExitJsonQuery is called when production jsonQuery is exited. +func (s *BaseTrinoParserListener) ExitJsonQuery(ctx *JsonQueryContext) {} + +// EnterMeasure is called when production measure is entered. +func (s *BaseTrinoParserListener) EnterMeasure(ctx *MeasureContext) {} + +// ExitMeasure is called when production measure is exited. +func (s *BaseTrinoParserListener) ExitMeasure(ctx *MeasureContext) {} + +// EnterExtract is called when production extract is entered. +func (s *BaseTrinoParserListener) EnterExtract(ctx *ExtractContext) {} + +// ExitExtract is called when production extract is exited. +func (s *BaseTrinoParserListener) ExitExtract(ctx *ExtractContext) {} + +// EnterStringLiteral is called when production stringLiteral is entered. +func (s *BaseTrinoParserListener) EnterStringLiteral(ctx *StringLiteralContext) {} + +// ExitStringLiteral is called when production stringLiteral is exited. +func (s *BaseTrinoParserListener) ExitStringLiteral(ctx *StringLiteralContext) {} + +// EnterArrayConstructor is called when production arrayConstructor is entered. +func (s *BaseTrinoParserListener) EnterArrayConstructor(ctx *ArrayConstructorContext) {} + +// ExitArrayConstructor is called when production arrayConstructor is exited. +func (s *BaseTrinoParserListener) ExitArrayConstructor(ctx *ArrayConstructorContext) {} + +// EnterFunctionCall is called when production functionCall is entered. +func (s *BaseTrinoParserListener) EnterFunctionCall(ctx *FunctionCallContext) {} + +// ExitFunctionCall is called when production functionCall is exited. +func (s *BaseTrinoParserListener) ExitFunctionCall(ctx *FunctionCallContext) {} + +// EnterCurrentSchema is called when production currentSchema is entered. +func (s *BaseTrinoParserListener) EnterCurrentSchema(ctx *CurrentSchemaContext) {} + +// ExitCurrentSchema is called when production currentSchema is exited. +func (s *BaseTrinoParserListener) ExitCurrentSchema(ctx *CurrentSchemaContext) {} + +// EnterExists is called when production exists is entered. +func (s *BaseTrinoParserListener) EnterExists(ctx *ExistsContext) {} + +// ExitExists is called when production exists is exited. +func (s *BaseTrinoParserListener) ExitExists(ctx *ExistsContext) {} + +// EnterPosition is called when production position is entered. +func (s *BaseTrinoParserListener) EnterPosition(ctx *PositionContext) {} + +// ExitPosition is called when production position is exited. +func (s *BaseTrinoParserListener) ExitPosition(ctx *PositionContext) {} + +// EnterListagg is called when production listagg is entered. +func (s *BaseTrinoParserListener) EnterListagg(ctx *ListaggContext) {} + +// ExitListagg is called when production listagg is exited. +func (s *BaseTrinoParserListener) ExitListagg(ctx *ListaggContext) {} + +// EnterSearchedCase is called when production searchedCase is entered. +func (s *BaseTrinoParserListener) EnterSearchedCase(ctx *SearchedCaseContext) {} + +// ExitSearchedCase is called when production searchedCase is exited. +func (s *BaseTrinoParserListener) ExitSearchedCase(ctx *SearchedCaseContext) {} + +// EnterCurrentCatalog is called when production currentCatalog is entered. +func (s *BaseTrinoParserListener) EnterCurrentCatalog(ctx *CurrentCatalogContext) {} + +// ExitCurrentCatalog is called when production currentCatalog is exited. +func (s *BaseTrinoParserListener) ExitCurrentCatalog(ctx *CurrentCatalogContext) {} + +// EnterGroupingOperation is called when production groupingOperation is entered. +func (s *BaseTrinoParserListener) EnterGroupingOperation(ctx *GroupingOperationContext) {} + +// ExitGroupingOperation is called when production groupingOperation is exited. +func (s *BaseTrinoParserListener) ExitGroupingOperation(ctx *GroupingOperationContext) {} + +// EnterJsonPathInvocation is called when production jsonPathInvocation is entered. +func (s *BaseTrinoParserListener) EnterJsonPathInvocation(ctx *JsonPathInvocationContext) {} + +// ExitJsonPathInvocation is called when production jsonPathInvocation is exited. +func (s *BaseTrinoParserListener) ExitJsonPathInvocation(ctx *JsonPathInvocationContext) {} + +// EnterJsonValueExpression is called when production jsonValueExpression is entered. +func (s *BaseTrinoParserListener) EnterJsonValueExpression(ctx *JsonValueExpressionContext) {} + +// ExitJsonValueExpression is called when production jsonValueExpression is exited. +func (s *BaseTrinoParserListener) ExitJsonValueExpression(ctx *JsonValueExpressionContext) {} + +// EnterJsonRepresentation is called when production jsonRepresentation is entered. +func (s *BaseTrinoParserListener) EnterJsonRepresentation(ctx *JsonRepresentationContext) {} + +// ExitJsonRepresentation is called when production jsonRepresentation is exited. +func (s *BaseTrinoParserListener) ExitJsonRepresentation(ctx *JsonRepresentationContext) {} + +// EnterJsonArgument is called when production jsonArgument is entered. +func (s *BaseTrinoParserListener) EnterJsonArgument(ctx *JsonArgumentContext) {} + +// ExitJsonArgument is called when production jsonArgument is exited. +func (s *BaseTrinoParserListener) ExitJsonArgument(ctx *JsonArgumentContext) {} + +// EnterJsonExistsErrorBehavior is called when production jsonExistsErrorBehavior is entered. +func (s *BaseTrinoParserListener) EnterJsonExistsErrorBehavior(ctx *JsonExistsErrorBehaviorContext) {} + +// ExitJsonExistsErrorBehavior is called when production jsonExistsErrorBehavior is exited. +func (s *BaseTrinoParserListener) ExitJsonExistsErrorBehavior(ctx *JsonExistsErrorBehaviorContext) {} + +// EnterJsonValueBehavior is called when production jsonValueBehavior is entered. +func (s *BaseTrinoParserListener) EnterJsonValueBehavior(ctx *JsonValueBehaviorContext) {} + +// ExitJsonValueBehavior is called when production jsonValueBehavior is exited. +func (s *BaseTrinoParserListener) ExitJsonValueBehavior(ctx *JsonValueBehaviorContext) {} + +// EnterJsonQueryWrapperBehavior is called when production jsonQueryWrapperBehavior is entered. +func (s *BaseTrinoParserListener) EnterJsonQueryWrapperBehavior(ctx *JsonQueryWrapperBehaviorContext) { +} + +// ExitJsonQueryWrapperBehavior is called when production jsonQueryWrapperBehavior is exited. +func (s *BaseTrinoParserListener) ExitJsonQueryWrapperBehavior(ctx *JsonQueryWrapperBehaviorContext) { +} + +// EnterJsonQueryBehavior is called when production jsonQueryBehavior is entered. +func (s *BaseTrinoParserListener) EnterJsonQueryBehavior(ctx *JsonQueryBehaviorContext) {} + +// ExitJsonQueryBehavior is called when production jsonQueryBehavior is exited. +func (s *BaseTrinoParserListener) ExitJsonQueryBehavior(ctx *JsonQueryBehaviorContext) {} + +// EnterJsonObjectMember is called when production jsonObjectMember is entered. +func (s *BaseTrinoParserListener) EnterJsonObjectMember(ctx *JsonObjectMemberContext) {} + +// ExitJsonObjectMember is called when production jsonObjectMember is exited. +func (s *BaseTrinoParserListener) ExitJsonObjectMember(ctx *JsonObjectMemberContext) {} + +// EnterProcessingMode is called when production processingMode is entered. +func (s *BaseTrinoParserListener) EnterProcessingMode(ctx *ProcessingModeContext) {} + +// ExitProcessingMode is called when production processingMode is exited. +func (s *BaseTrinoParserListener) ExitProcessingMode(ctx *ProcessingModeContext) {} + +// EnterNullTreatment is called when production nullTreatment is entered. +func (s *BaseTrinoParserListener) EnterNullTreatment(ctx *NullTreatmentContext) {} + +// ExitNullTreatment is called when production nullTreatment is exited. +func (s *BaseTrinoParserListener) ExitNullTreatment(ctx *NullTreatmentContext) {} + +// EnterBasicStringLiteral is called when production basicStringLiteral is entered. +func (s *BaseTrinoParserListener) EnterBasicStringLiteral(ctx *BasicStringLiteralContext) {} + +// ExitBasicStringLiteral is called when production basicStringLiteral is exited. +func (s *BaseTrinoParserListener) ExitBasicStringLiteral(ctx *BasicStringLiteralContext) {} + +// EnterUnicodeStringLiteral is called when production unicodeStringLiteral is entered. +func (s *BaseTrinoParserListener) EnterUnicodeStringLiteral(ctx *UnicodeStringLiteralContext) {} + +// ExitUnicodeStringLiteral is called when production unicodeStringLiteral is exited. +func (s *BaseTrinoParserListener) ExitUnicodeStringLiteral(ctx *UnicodeStringLiteralContext) {} + +// EnterTimeZoneInterval is called when production timeZoneInterval is entered. +func (s *BaseTrinoParserListener) EnterTimeZoneInterval(ctx *TimeZoneIntervalContext) {} + +// ExitTimeZoneInterval is called when production timeZoneInterval is exited. +func (s *BaseTrinoParserListener) ExitTimeZoneInterval(ctx *TimeZoneIntervalContext) {} + +// EnterTimeZoneString is called when production timeZoneString is entered. +func (s *BaseTrinoParserListener) EnterTimeZoneString(ctx *TimeZoneStringContext) {} + +// ExitTimeZoneString is called when production timeZoneString is exited. +func (s *BaseTrinoParserListener) ExitTimeZoneString(ctx *TimeZoneStringContext) {} + +// EnterComparisonOperator is called when production comparisonOperator is entered. +func (s *BaseTrinoParserListener) EnterComparisonOperator(ctx *ComparisonOperatorContext) {} + +// ExitComparisonOperator is called when production comparisonOperator is exited. +func (s *BaseTrinoParserListener) ExitComparisonOperator(ctx *ComparisonOperatorContext) {} + +// EnterComparisonQuantifier is called when production comparisonQuantifier is entered. +func (s *BaseTrinoParserListener) EnterComparisonQuantifier(ctx *ComparisonQuantifierContext) {} + +// ExitComparisonQuantifier is called when production comparisonQuantifier is exited. +func (s *BaseTrinoParserListener) ExitComparisonQuantifier(ctx *ComparisonQuantifierContext) {} + +// EnterBooleanValue is called when production booleanValue is entered. +func (s *BaseTrinoParserListener) EnterBooleanValue(ctx *BooleanValueContext) {} + +// ExitBooleanValue is called when production booleanValue is exited. +func (s *BaseTrinoParserListener) ExitBooleanValue(ctx *BooleanValueContext) {} + +// EnterInterval is called when production interval is entered. +func (s *BaseTrinoParserListener) EnterInterval(ctx *IntervalContext) {} + +// ExitInterval is called when production interval is exited. +func (s *BaseTrinoParserListener) ExitInterval(ctx *IntervalContext) {} + +// EnterIntervalField is called when production intervalField is entered. +func (s *BaseTrinoParserListener) EnterIntervalField(ctx *IntervalFieldContext) {} + +// ExitIntervalField is called when production intervalField is exited. +func (s *BaseTrinoParserListener) ExitIntervalField(ctx *IntervalFieldContext) {} + +// EnterNormalForm is called when production normalForm is entered. +func (s *BaseTrinoParserListener) EnterNormalForm(ctx *NormalFormContext) {} + +// ExitNormalForm is called when production normalForm is exited. +func (s *BaseTrinoParserListener) ExitNormalForm(ctx *NormalFormContext) {} + +// EnterRowType is called when production rowType is entered. +func (s *BaseTrinoParserListener) EnterRowType(ctx *RowTypeContext) {} + +// ExitRowType is called when production rowType is exited. +func (s *BaseTrinoParserListener) ExitRowType(ctx *RowTypeContext) {} + +// EnterIntervalType is called when production intervalType is entered. +func (s *BaseTrinoParserListener) EnterIntervalType(ctx *IntervalTypeContext) {} + +// ExitIntervalType is called when production intervalType is exited. +func (s *BaseTrinoParserListener) ExitIntervalType(ctx *IntervalTypeContext) {} + +// EnterArrayType is called when production arrayType is entered. +func (s *BaseTrinoParserListener) EnterArrayType(ctx *ArrayTypeContext) {} + +// ExitArrayType is called when production arrayType is exited. +func (s *BaseTrinoParserListener) ExitArrayType(ctx *ArrayTypeContext) {} + +// EnterDoublePrecisionType is called when production doublePrecisionType is entered. +func (s *BaseTrinoParserListener) EnterDoublePrecisionType(ctx *DoublePrecisionTypeContext) {} + +// ExitDoublePrecisionType is called when production doublePrecisionType is exited. +func (s *BaseTrinoParserListener) ExitDoublePrecisionType(ctx *DoublePrecisionTypeContext) {} + +// EnterLegacyArrayType is called when production legacyArrayType is entered. +func (s *BaseTrinoParserListener) EnterLegacyArrayType(ctx *LegacyArrayTypeContext) {} + +// ExitLegacyArrayType is called when production legacyArrayType is exited. +func (s *BaseTrinoParserListener) ExitLegacyArrayType(ctx *LegacyArrayTypeContext) {} + +// EnterGenericType is called when production genericType is entered. +func (s *BaseTrinoParserListener) EnterGenericType(ctx *GenericTypeContext) {} + +// ExitGenericType is called when production genericType is exited. +func (s *BaseTrinoParserListener) ExitGenericType(ctx *GenericTypeContext) {} + +// EnterDateTimeType is called when production dateTimeType is entered. +func (s *BaseTrinoParserListener) EnterDateTimeType(ctx *DateTimeTypeContext) {} + +// ExitDateTimeType is called when production dateTimeType is exited. +func (s *BaseTrinoParserListener) ExitDateTimeType(ctx *DateTimeTypeContext) {} + +// EnterLegacyMapType is called when production legacyMapType is entered. +func (s *BaseTrinoParserListener) EnterLegacyMapType(ctx *LegacyMapTypeContext) {} + +// ExitLegacyMapType is called when production legacyMapType is exited. +func (s *BaseTrinoParserListener) ExitLegacyMapType(ctx *LegacyMapTypeContext) {} + +// EnterRowField is called when production rowField is entered. +func (s *BaseTrinoParserListener) EnterRowField(ctx *RowFieldContext) {} + +// ExitRowField is called when production rowField is exited. +func (s *BaseTrinoParserListener) ExitRowField(ctx *RowFieldContext) {} + +// EnterTypeParameter is called when production typeParameter is entered. +func (s *BaseTrinoParserListener) EnterTypeParameter(ctx *TypeParameterContext) {} + +// ExitTypeParameter is called when production typeParameter is exited. +func (s *BaseTrinoParserListener) ExitTypeParameter(ctx *TypeParameterContext) {} + +// EnterWhenClause is called when production whenClause is entered. +func (s *BaseTrinoParserListener) EnterWhenClause(ctx *WhenClauseContext) {} + +// ExitWhenClause is called when production whenClause is exited. +func (s *BaseTrinoParserListener) ExitWhenClause(ctx *WhenClauseContext) {} + +// EnterFilter is called when production filter is entered. +func (s *BaseTrinoParserListener) EnterFilter(ctx *FilterContext) {} + +// ExitFilter is called when production filter is exited. +func (s *BaseTrinoParserListener) ExitFilter(ctx *FilterContext) {} + +// EnterMergeUpdate is called when production mergeUpdate is entered. +func (s *BaseTrinoParserListener) EnterMergeUpdate(ctx *MergeUpdateContext) {} + +// ExitMergeUpdate is called when production mergeUpdate is exited. +func (s *BaseTrinoParserListener) ExitMergeUpdate(ctx *MergeUpdateContext) {} + +// EnterMergeDelete is called when production mergeDelete is entered. +func (s *BaseTrinoParserListener) EnterMergeDelete(ctx *MergeDeleteContext) {} + +// ExitMergeDelete is called when production mergeDelete is exited. +func (s *BaseTrinoParserListener) ExitMergeDelete(ctx *MergeDeleteContext) {} + +// EnterMergeInsert is called when production mergeInsert is entered. +func (s *BaseTrinoParserListener) EnterMergeInsert(ctx *MergeInsertContext) {} + +// ExitMergeInsert is called when production mergeInsert is exited. +func (s *BaseTrinoParserListener) ExitMergeInsert(ctx *MergeInsertContext) {} + +// EnterOver is called when production over is entered. +func (s *BaseTrinoParserListener) EnterOver(ctx *OverContext) {} + +// ExitOver is called when production over is exited. +func (s *BaseTrinoParserListener) ExitOver(ctx *OverContext) {} + +// EnterWindowFrame is called when production windowFrame is entered. +func (s *BaseTrinoParserListener) EnterWindowFrame(ctx *WindowFrameContext) {} + +// ExitWindowFrame is called when production windowFrame is exited. +func (s *BaseTrinoParserListener) ExitWindowFrame(ctx *WindowFrameContext) {} + +// EnterFrameExtent is called when production frameExtent is entered. +func (s *BaseTrinoParserListener) EnterFrameExtent(ctx *FrameExtentContext) {} + +// ExitFrameExtent is called when production frameExtent is exited. +func (s *BaseTrinoParserListener) ExitFrameExtent(ctx *FrameExtentContext) {} + +// EnterUnboundedFrame is called when production unboundedFrame is entered. +func (s *BaseTrinoParserListener) EnterUnboundedFrame(ctx *UnboundedFrameContext) {} + +// ExitUnboundedFrame is called when production unboundedFrame is exited. +func (s *BaseTrinoParserListener) ExitUnboundedFrame(ctx *UnboundedFrameContext) {} + +// EnterCurrentRowBound is called when production currentRowBound is entered. +func (s *BaseTrinoParserListener) EnterCurrentRowBound(ctx *CurrentRowBoundContext) {} + +// ExitCurrentRowBound is called when production currentRowBound is exited. +func (s *BaseTrinoParserListener) ExitCurrentRowBound(ctx *CurrentRowBoundContext) {} + +// EnterBoundedFrame is called when production boundedFrame is entered. +func (s *BaseTrinoParserListener) EnterBoundedFrame(ctx *BoundedFrameContext) {} + +// ExitBoundedFrame is called when production boundedFrame is exited. +func (s *BaseTrinoParserListener) ExitBoundedFrame(ctx *BoundedFrameContext) {} + +// EnterQuantifiedPrimary is called when production quantifiedPrimary is entered. +func (s *BaseTrinoParserListener) EnterQuantifiedPrimary(ctx *QuantifiedPrimaryContext) {} + +// ExitQuantifiedPrimary is called when production quantifiedPrimary is exited. +func (s *BaseTrinoParserListener) ExitQuantifiedPrimary(ctx *QuantifiedPrimaryContext) {} + +// EnterPatternConcatenation is called when production patternConcatenation is entered. +func (s *BaseTrinoParserListener) EnterPatternConcatenation(ctx *PatternConcatenationContext) {} + +// ExitPatternConcatenation is called when production patternConcatenation is exited. +func (s *BaseTrinoParserListener) ExitPatternConcatenation(ctx *PatternConcatenationContext) {} + +// EnterPatternAlternation is called when production patternAlternation is entered. +func (s *BaseTrinoParserListener) EnterPatternAlternation(ctx *PatternAlternationContext) {} + +// ExitPatternAlternation is called when production patternAlternation is exited. +func (s *BaseTrinoParserListener) ExitPatternAlternation(ctx *PatternAlternationContext) {} + +// EnterPatternVariable is called when production patternVariable is entered. +func (s *BaseTrinoParserListener) EnterPatternVariable(ctx *PatternVariableContext) {} + +// ExitPatternVariable is called when production patternVariable is exited. +func (s *BaseTrinoParserListener) ExitPatternVariable(ctx *PatternVariableContext) {} + +// EnterEmptyPattern is called when production emptyPattern is entered. +func (s *BaseTrinoParserListener) EnterEmptyPattern(ctx *EmptyPatternContext) {} + +// ExitEmptyPattern is called when production emptyPattern is exited. +func (s *BaseTrinoParserListener) ExitEmptyPattern(ctx *EmptyPatternContext) {} + +// EnterPatternPermutation is called when production patternPermutation is entered. +func (s *BaseTrinoParserListener) EnterPatternPermutation(ctx *PatternPermutationContext) {} + +// ExitPatternPermutation is called when production patternPermutation is exited. +func (s *BaseTrinoParserListener) ExitPatternPermutation(ctx *PatternPermutationContext) {} + +// EnterGroupedPattern is called when production groupedPattern is entered. +func (s *BaseTrinoParserListener) EnterGroupedPattern(ctx *GroupedPatternContext) {} + +// ExitGroupedPattern is called when production groupedPattern is exited. +func (s *BaseTrinoParserListener) ExitGroupedPattern(ctx *GroupedPatternContext) {} + +// EnterPartitionStartAnchor is called when production partitionStartAnchor is entered. +func (s *BaseTrinoParserListener) EnterPartitionStartAnchor(ctx *PartitionStartAnchorContext) {} + +// ExitPartitionStartAnchor is called when production partitionStartAnchor is exited. +func (s *BaseTrinoParserListener) ExitPartitionStartAnchor(ctx *PartitionStartAnchorContext) {} + +// EnterPartitionEndAnchor is called when production partitionEndAnchor is entered. +func (s *BaseTrinoParserListener) EnterPartitionEndAnchor(ctx *PartitionEndAnchorContext) {} + +// ExitPartitionEndAnchor is called when production partitionEndAnchor is exited. +func (s *BaseTrinoParserListener) ExitPartitionEndAnchor(ctx *PartitionEndAnchorContext) {} + +// EnterExcludedPattern is called when production excludedPattern is entered. +func (s *BaseTrinoParserListener) EnterExcludedPattern(ctx *ExcludedPatternContext) {} + +// ExitExcludedPattern is called when production excludedPattern is exited. +func (s *BaseTrinoParserListener) ExitExcludedPattern(ctx *ExcludedPatternContext) {} + +// EnterZeroOrMoreQuantifier is called when production zeroOrMoreQuantifier is entered. +func (s *BaseTrinoParserListener) EnterZeroOrMoreQuantifier(ctx *ZeroOrMoreQuantifierContext) {} + +// ExitZeroOrMoreQuantifier is called when production zeroOrMoreQuantifier is exited. +func (s *BaseTrinoParserListener) ExitZeroOrMoreQuantifier(ctx *ZeroOrMoreQuantifierContext) {} + +// EnterOneOrMoreQuantifier is called when production oneOrMoreQuantifier is entered. +func (s *BaseTrinoParserListener) EnterOneOrMoreQuantifier(ctx *OneOrMoreQuantifierContext) {} + +// ExitOneOrMoreQuantifier is called when production oneOrMoreQuantifier is exited. +func (s *BaseTrinoParserListener) ExitOneOrMoreQuantifier(ctx *OneOrMoreQuantifierContext) {} + +// EnterZeroOrOneQuantifier is called when production zeroOrOneQuantifier is entered. +func (s *BaseTrinoParserListener) EnterZeroOrOneQuantifier(ctx *ZeroOrOneQuantifierContext) {} + +// ExitZeroOrOneQuantifier is called when production zeroOrOneQuantifier is exited. +func (s *BaseTrinoParserListener) ExitZeroOrOneQuantifier(ctx *ZeroOrOneQuantifierContext) {} + +// EnterRangeQuantifier is called when production rangeQuantifier is entered. +func (s *BaseTrinoParserListener) EnterRangeQuantifier(ctx *RangeQuantifierContext) {} + +// ExitRangeQuantifier is called when production rangeQuantifier is exited. +func (s *BaseTrinoParserListener) ExitRangeQuantifier(ctx *RangeQuantifierContext) {} + +// EnterUpdateAssignment is called when production updateAssignment is entered. +func (s *BaseTrinoParserListener) EnterUpdateAssignment(ctx *UpdateAssignmentContext) {} + +// ExitUpdateAssignment is called when production updateAssignment is exited. +func (s *BaseTrinoParserListener) ExitUpdateAssignment(ctx *UpdateAssignmentContext) {} + +// EnterExplainFormat is called when production explainFormat is entered. +func (s *BaseTrinoParserListener) EnterExplainFormat(ctx *ExplainFormatContext) {} + +// ExitExplainFormat is called when production explainFormat is exited. +func (s *BaseTrinoParserListener) ExitExplainFormat(ctx *ExplainFormatContext) {} + +// EnterExplainType is called when production explainType is entered. +func (s *BaseTrinoParserListener) EnterExplainType(ctx *ExplainTypeContext) {} + +// ExitExplainType is called when production explainType is exited. +func (s *BaseTrinoParserListener) ExitExplainType(ctx *ExplainTypeContext) {} + +// EnterIsolationLevel is called when production isolationLevel is entered. +func (s *BaseTrinoParserListener) EnterIsolationLevel(ctx *IsolationLevelContext) {} + +// ExitIsolationLevel is called when production isolationLevel is exited. +func (s *BaseTrinoParserListener) ExitIsolationLevel(ctx *IsolationLevelContext) {} + +// EnterTransactionAccessMode is called when production transactionAccessMode is entered. +func (s *BaseTrinoParserListener) EnterTransactionAccessMode(ctx *TransactionAccessModeContext) {} + +// ExitTransactionAccessMode is called when production transactionAccessMode is exited. +func (s *BaseTrinoParserListener) ExitTransactionAccessMode(ctx *TransactionAccessModeContext) {} + +// EnterReadUncommitted is called when production readUncommitted is entered. +func (s *BaseTrinoParserListener) EnterReadUncommitted(ctx *ReadUncommittedContext) {} + +// ExitReadUncommitted is called when production readUncommitted is exited. +func (s *BaseTrinoParserListener) ExitReadUncommitted(ctx *ReadUncommittedContext) {} + +// EnterReadCommitted is called when production readCommitted is entered. +func (s *BaseTrinoParserListener) EnterReadCommitted(ctx *ReadCommittedContext) {} + +// ExitReadCommitted is called when production readCommitted is exited. +func (s *BaseTrinoParserListener) ExitReadCommitted(ctx *ReadCommittedContext) {} + +// EnterRepeatableRead is called when production repeatableRead is entered. +func (s *BaseTrinoParserListener) EnterRepeatableRead(ctx *RepeatableReadContext) {} + +// ExitRepeatableRead is called when production repeatableRead is exited. +func (s *BaseTrinoParserListener) ExitRepeatableRead(ctx *RepeatableReadContext) {} + +// EnterSerializable is called when production serializable is entered. +func (s *BaseTrinoParserListener) EnterSerializable(ctx *SerializableContext) {} + +// ExitSerializable is called when production serializable is exited. +func (s *BaseTrinoParserListener) ExitSerializable(ctx *SerializableContext) {} + +// EnterPositionalArgument is called when production positionalArgument is entered. +func (s *BaseTrinoParserListener) EnterPositionalArgument(ctx *PositionalArgumentContext) {} + +// ExitPositionalArgument is called when production positionalArgument is exited. +func (s *BaseTrinoParserListener) ExitPositionalArgument(ctx *PositionalArgumentContext) {} + +// EnterNamedArgument is called when production namedArgument is entered. +func (s *BaseTrinoParserListener) EnterNamedArgument(ctx *NamedArgumentContext) {} + +// ExitNamedArgument is called when production namedArgument is exited. +func (s *BaseTrinoParserListener) ExitNamedArgument(ctx *NamedArgumentContext) {} + +// EnterQualifiedArgument is called when production qualifiedArgument is entered. +func (s *BaseTrinoParserListener) EnterQualifiedArgument(ctx *QualifiedArgumentContext) {} + +// ExitQualifiedArgument is called when production qualifiedArgument is exited. +func (s *BaseTrinoParserListener) ExitQualifiedArgument(ctx *QualifiedArgumentContext) {} + +// EnterUnqualifiedArgument is called when production unqualifiedArgument is entered. +func (s *BaseTrinoParserListener) EnterUnqualifiedArgument(ctx *UnqualifiedArgumentContext) {} + +// ExitUnqualifiedArgument is called when production unqualifiedArgument is exited. +func (s *BaseTrinoParserListener) ExitUnqualifiedArgument(ctx *UnqualifiedArgumentContext) {} + +// EnterPathSpecification is called when production pathSpecification is entered. +func (s *BaseTrinoParserListener) EnterPathSpecification(ctx *PathSpecificationContext) {} + +// ExitPathSpecification is called when production pathSpecification is exited. +func (s *BaseTrinoParserListener) ExitPathSpecification(ctx *PathSpecificationContext) {} + +// EnterFunctionSpecification is called when production functionSpecification is entered. +func (s *BaseTrinoParserListener) EnterFunctionSpecification(ctx *FunctionSpecificationContext) {} + +// ExitFunctionSpecification is called when production functionSpecification is exited. +func (s *BaseTrinoParserListener) ExitFunctionSpecification(ctx *FunctionSpecificationContext) {} + +// EnterFunctionDeclaration is called when production functionDeclaration is entered. +func (s *BaseTrinoParserListener) EnterFunctionDeclaration(ctx *FunctionDeclarationContext) {} + +// ExitFunctionDeclaration is called when production functionDeclaration is exited. +func (s *BaseTrinoParserListener) ExitFunctionDeclaration(ctx *FunctionDeclarationContext) {} + +// EnterParameterDeclaration is called when production parameterDeclaration is entered. +func (s *BaseTrinoParserListener) EnterParameterDeclaration(ctx *ParameterDeclarationContext) {} + +// ExitParameterDeclaration is called when production parameterDeclaration is exited. +func (s *BaseTrinoParserListener) ExitParameterDeclaration(ctx *ParameterDeclarationContext) {} + +// EnterReturnsClause is called when production returnsClause is entered. +func (s *BaseTrinoParserListener) EnterReturnsClause(ctx *ReturnsClauseContext) {} + +// ExitReturnsClause is called when production returnsClause is exited. +func (s *BaseTrinoParserListener) ExitReturnsClause(ctx *ReturnsClauseContext) {} + +// EnterLanguageCharacteristic is called when production languageCharacteristic is entered. +func (s *BaseTrinoParserListener) EnterLanguageCharacteristic(ctx *LanguageCharacteristicContext) {} + +// ExitLanguageCharacteristic is called when production languageCharacteristic is exited. +func (s *BaseTrinoParserListener) ExitLanguageCharacteristic(ctx *LanguageCharacteristicContext) {} + +// EnterDeterministicCharacteristic is called when production deterministicCharacteristic is entered. +func (s *BaseTrinoParserListener) EnterDeterministicCharacteristic(ctx *DeterministicCharacteristicContext) { +} + +// ExitDeterministicCharacteristic is called when production deterministicCharacteristic is exited. +func (s *BaseTrinoParserListener) ExitDeterministicCharacteristic(ctx *DeterministicCharacteristicContext) { +} + +// EnterReturnsNullOnNullInputCharacteristic is called when production returnsNullOnNullInputCharacteristic is entered. +func (s *BaseTrinoParserListener) EnterReturnsNullOnNullInputCharacteristic(ctx *ReturnsNullOnNullInputCharacteristicContext) { +} + +// ExitReturnsNullOnNullInputCharacteristic is called when production returnsNullOnNullInputCharacteristic is exited. +func (s *BaseTrinoParserListener) ExitReturnsNullOnNullInputCharacteristic(ctx *ReturnsNullOnNullInputCharacteristicContext) { +} + +// EnterCalledOnNullInputCharacteristic is called when production calledOnNullInputCharacteristic is entered. +func (s *BaseTrinoParserListener) EnterCalledOnNullInputCharacteristic(ctx *CalledOnNullInputCharacteristicContext) { +} + +// ExitCalledOnNullInputCharacteristic is called when production calledOnNullInputCharacteristic is exited. +func (s *BaseTrinoParserListener) ExitCalledOnNullInputCharacteristic(ctx *CalledOnNullInputCharacteristicContext) { +} + +// EnterSecurityCharacteristic is called when production securityCharacteristic is entered. +func (s *BaseTrinoParserListener) EnterSecurityCharacteristic(ctx *SecurityCharacteristicContext) {} + +// ExitSecurityCharacteristic is called when production securityCharacteristic is exited. +func (s *BaseTrinoParserListener) ExitSecurityCharacteristic(ctx *SecurityCharacteristicContext) {} + +// EnterCommentCharacteristic is called when production commentCharacteristic is entered. +func (s *BaseTrinoParserListener) EnterCommentCharacteristic(ctx *CommentCharacteristicContext) {} + +// ExitCommentCharacteristic is called when production commentCharacteristic is exited. +func (s *BaseTrinoParserListener) ExitCommentCharacteristic(ctx *CommentCharacteristicContext) {} + +// EnterReturnStatement is called when production returnStatement is entered. +func (s *BaseTrinoParserListener) EnterReturnStatement(ctx *ReturnStatementContext) {} + +// ExitReturnStatement is called when production returnStatement is exited. +func (s *BaseTrinoParserListener) ExitReturnStatement(ctx *ReturnStatementContext) {} + +// EnterAssignmentStatement is called when production assignmentStatement is entered. +func (s *BaseTrinoParserListener) EnterAssignmentStatement(ctx *AssignmentStatementContext) {} + +// ExitAssignmentStatement is called when production assignmentStatement is exited. +func (s *BaseTrinoParserListener) ExitAssignmentStatement(ctx *AssignmentStatementContext) {} + +// EnterSimpleCaseStatement is called when production simpleCaseStatement is entered. +func (s *BaseTrinoParserListener) EnterSimpleCaseStatement(ctx *SimpleCaseStatementContext) {} + +// ExitSimpleCaseStatement is called when production simpleCaseStatement is exited. +func (s *BaseTrinoParserListener) ExitSimpleCaseStatement(ctx *SimpleCaseStatementContext) {} + +// EnterSearchedCaseStatement is called when production searchedCaseStatement is entered. +func (s *BaseTrinoParserListener) EnterSearchedCaseStatement(ctx *SearchedCaseStatementContext) {} + +// ExitSearchedCaseStatement is called when production searchedCaseStatement is exited. +func (s *BaseTrinoParserListener) ExitSearchedCaseStatement(ctx *SearchedCaseStatementContext) {} + +// EnterIfStatement is called when production ifStatement is entered. +func (s *BaseTrinoParserListener) EnterIfStatement(ctx *IfStatementContext) {} + +// ExitIfStatement is called when production ifStatement is exited. +func (s *BaseTrinoParserListener) ExitIfStatement(ctx *IfStatementContext) {} + +// EnterIterateStatement is called when production iterateStatement is entered. +func (s *BaseTrinoParserListener) EnterIterateStatement(ctx *IterateStatementContext) {} + +// ExitIterateStatement is called when production iterateStatement is exited. +func (s *BaseTrinoParserListener) ExitIterateStatement(ctx *IterateStatementContext) {} + +// EnterLeaveStatement is called when production leaveStatement is entered. +func (s *BaseTrinoParserListener) EnterLeaveStatement(ctx *LeaveStatementContext) {} + +// ExitLeaveStatement is called when production leaveStatement is exited. +func (s *BaseTrinoParserListener) ExitLeaveStatement(ctx *LeaveStatementContext) {} + +// EnterCompoundStatement is called when production compoundStatement is entered. +func (s *BaseTrinoParserListener) EnterCompoundStatement(ctx *CompoundStatementContext) {} + +// ExitCompoundStatement is called when production compoundStatement is exited. +func (s *BaseTrinoParserListener) ExitCompoundStatement(ctx *CompoundStatementContext) {} + +// EnterLoopStatement is called when production loopStatement is entered. +func (s *BaseTrinoParserListener) EnterLoopStatement(ctx *LoopStatementContext) {} + +// ExitLoopStatement is called when production loopStatement is exited. +func (s *BaseTrinoParserListener) ExitLoopStatement(ctx *LoopStatementContext) {} + +// EnterWhileStatement is called when production whileStatement is entered. +func (s *BaseTrinoParserListener) EnterWhileStatement(ctx *WhileStatementContext) {} + +// ExitWhileStatement is called when production whileStatement is exited. +func (s *BaseTrinoParserListener) ExitWhileStatement(ctx *WhileStatementContext) {} + +// EnterRepeatStatement is called when production repeatStatement is entered. +func (s *BaseTrinoParserListener) EnterRepeatStatement(ctx *RepeatStatementContext) {} + +// ExitRepeatStatement is called when production repeatStatement is exited. +func (s *BaseTrinoParserListener) ExitRepeatStatement(ctx *RepeatStatementContext) {} + +// EnterCaseStatementWhenClause is called when production caseStatementWhenClause is entered. +func (s *BaseTrinoParserListener) EnterCaseStatementWhenClause(ctx *CaseStatementWhenClauseContext) {} + +// ExitCaseStatementWhenClause is called when production caseStatementWhenClause is exited. +func (s *BaseTrinoParserListener) ExitCaseStatementWhenClause(ctx *CaseStatementWhenClauseContext) {} + +// EnterElseIfClause is called when production elseIfClause is entered. +func (s *BaseTrinoParserListener) EnterElseIfClause(ctx *ElseIfClauseContext) {} + +// ExitElseIfClause is called when production elseIfClause is exited. +func (s *BaseTrinoParserListener) ExitElseIfClause(ctx *ElseIfClauseContext) {} + +// EnterElseClause is called when production elseClause is entered. +func (s *BaseTrinoParserListener) EnterElseClause(ctx *ElseClauseContext) {} + +// ExitElseClause is called when production elseClause is exited. +func (s *BaseTrinoParserListener) ExitElseClause(ctx *ElseClauseContext) {} + +// EnterVariableDeclaration is called when production variableDeclaration is entered. +func (s *BaseTrinoParserListener) EnterVariableDeclaration(ctx *VariableDeclarationContext) {} + +// ExitVariableDeclaration is called when production variableDeclaration is exited. +func (s *BaseTrinoParserListener) ExitVariableDeclaration(ctx *VariableDeclarationContext) {} + +// EnterSqlStatementList is called when production sqlStatementList is entered. +func (s *BaseTrinoParserListener) EnterSqlStatementList(ctx *SqlStatementListContext) {} + +// ExitSqlStatementList is called when production sqlStatementList is exited. +func (s *BaseTrinoParserListener) ExitSqlStatementList(ctx *SqlStatementListContext) {} + +// EnterPrivilege is called when production privilege is entered. +func (s *BaseTrinoParserListener) EnterPrivilege(ctx *PrivilegeContext) {} + +// ExitPrivilege is called when production privilege is exited. +func (s *BaseTrinoParserListener) ExitPrivilege(ctx *PrivilegeContext) {} + +// EnterQualifiedName is called when production qualifiedName is entered. +func (s *BaseTrinoParserListener) EnterQualifiedName(ctx *QualifiedNameContext) {} + +// ExitQualifiedName is called when production qualifiedName is exited. +func (s *BaseTrinoParserListener) ExitQualifiedName(ctx *QualifiedNameContext) {} + +// EnterQueryPeriod is called when production queryPeriod is entered. +func (s *BaseTrinoParserListener) EnterQueryPeriod(ctx *QueryPeriodContext) {} + +// ExitQueryPeriod is called when production queryPeriod is exited. +func (s *BaseTrinoParserListener) ExitQueryPeriod(ctx *QueryPeriodContext) {} + +// EnterRangeType is called when production rangeType is entered. +func (s *BaseTrinoParserListener) EnterRangeType(ctx *RangeTypeContext) {} + +// ExitRangeType is called when production rangeType is exited. +func (s *BaseTrinoParserListener) ExitRangeType(ctx *RangeTypeContext) {} + +// EnterSpecifiedPrincipal is called when production specifiedPrincipal is entered. +func (s *BaseTrinoParserListener) EnterSpecifiedPrincipal(ctx *SpecifiedPrincipalContext) {} + +// ExitSpecifiedPrincipal is called when production specifiedPrincipal is exited. +func (s *BaseTrinoParserListener) ExitSpecifiedPrincipal(ctx *SpecifiedPrincipalContext) {} + +// EnterCurrentUserGrantor is called when production currentUserGrantor is entered. +func (s *BaseTrinoParserListener) EnterCurrentUserGrantor(ctx *CurrentUserGrantorContext) {} + +// ExitCurrentUserGrantor is called when production currentUserGrantor is exited. +func (s *BaseTrinoParserListener) ExitCurrentUserGrantor(ctx *CurrentUserGrantorContext) {} + +// EnterCurrentRoleGrantor is called when production currentRoleGrantor is entered. +func (s *BaseTrinoParserListener) EnterCurrentRoleGrantor(ctx *CurrentRoleGrantorContext) {} + +// ExitCurrentRoleGrantor is called when production currentRoleGrantor is exited. +func (s *BaseTrinoParserListener) ExitCurrentRoleGrantor(ctx *CurrentRoleGrantorContext) {} + +// EnterUnspecifiedPrincipal is called when production unspecifiedPrincipal is entered. +func (s *BaseTrinoParserListener) EnterUnspecifiedPrincipal(ctx *UnspecifiedPrincipalContext) {} + +// ExitUnspecifiedPrincipal is called when production unspecifiedPrincipal is exited. +func (s *BaseTrinoParserListener) ExitUnspecifiedPrincipal(ctx *UnspecifiedPrincipalContext) {} + +// EnterUserPrincipal is called when production userPrincipal is entered. +func (s *BaseTrinoParserListener) EnterUserPrincipal(ctx *UserPrincipalContext) {} + +// ExitUserPrincipal is called when production userPrincipal is exited. +func (s *BaseTrinoParserListener) ExitUserPrincipal(ctx *UserPrincipalContext) {} + +// EnterRolePrincipal is called when production rolePrincipal is entered. +func (s *BaseTrinoParserListener) EnterRolePrincipal(ctx *RolePrincipalContext) {} + +// ExitRolePrincipal is called when production rolePrincipal is exited. +func (s *BaseTrinoParserListener) ExitRolePrincipal(ctx *RolePrincipalContext) {} + +// EnterRoles is called when production roles is entered. +func (s *BaseTrinoParserListener) EnterRoles(ctx *RolesContext) {} + +// ExitRoles is called when production roles is exited. +func (s *BaseTrinoParserListener) ExitRoles(ctx *RolesContext) {} + +// EnterUnquotedIdentifier is called when production unquotedIdentifier is entered. +func (s *BaseTrinoParserListener) EnterUnquotedIdentifier(ctx *UnquotedIdentifierContext) {} + +// ExitUnquotedIdentifier is called when production unquotedIdentifier is exited. +func (s *BaseTrinoParserListener) ExitUnquotedIdentifier(ctx *UnquotedIdentifierContext) {} + +// EnterQuotedIdentifier is called when production quotedIdentifier is entered. +func (s *BaseTrinoParserListener) EnterQuotedIdentifier(ctx *QuotedIdentifierContext) {} + +// ExitQuotedIdentifier is called when production quotedIdentifier is exited. +func (s *BaseTrinoParserListener) ExitQuotedIdentifier(ctx *QuotedIdentifierContext) {} + +// EnterBackQuotedIdentifier is called when production backQuotedIdentifier is entered. +func (s *BaseTrinoParserListener) EnterBackQuotedIdentifier(ctx *BackQuotedIdentifierContext) {} + +// ExitBackQuotedIdentifier is called when production backQuotedIdentifier is exited. +func (s *BaseTrinoParserListener) ExitBackQuotedIdentifier(ctx *BackQuotedIdentifierContext) {} + +// EnterDigitIdentifier is called when production digitIdentifier is entered. +func (s *BaseTrinoParserListener) EnterDigitIdentifier(ctx *DigitIdentifierContext) {} + +// ExitDigitIdentifier is called when production digitIdentifier is exited. +func (s *BaseTrinoParserListener) ExitDigitIdentifier(ctx *DigitIdentifierContext) {} + +// EnterDecimalLiteral is called when production decimalLiteral is entered. +func (s *BaseTrinoParserListener) EnterDecimalLiteral(ctx *DecimalLiteralContext) {} + +// ExitDecimalLiteral is called when production decimalLiteral is exited. +func (s *BaseTrinoParserListener) ExitDecimalLiteral(ctx *DecimalLiteralContext) {} + +// EnterDoubleLiteral is called when production doubleLiteral is entered. +func (s *BaseTrinoParserListener) EnterDoubleLiteral(ctx *DoubleLiteralContext) {} + +// ExitDoubleLiteral is called when production doubleLiteral is exited. +func (s *BaseTrinoParserListener) ExitDoubleLiteral(ctx *DoubleLiteralContext) {} + +// EnterIntegerLiteral is called when production integerLiteral is entered. +func (s *BaseTrinoParserListener) EnterIntegerLiteral(ctx *IntegerLiteralContext) {} + +// ExitIntegerLiteral is called when production integerLiteral is exited. +func (s *BaseTrinoParserListener) ExitIntegerLiteral(ctx *IntegerLiteralContext) {} + +// EnterIdentifierUser is called when production identifierUser is entered. +func (s *BaseTrinoParserListener) EnterIdentifierUser(ctx *IdentifierUserContext) {} + +// ExitIdentifierUser is called when production identifierUser is exited. +func (s *BaseTrinoParserListener) ExitIdentifierUser(ctx *IdentifierUserContext) {} + +// EnterStringUser is called when production stringUser is entered. +func (s *BaseTrinoParserListener) EnterStringUser(ctx *StringUserContext) {} + +// ExitStringUser is called when production stringUser is exited. +func (s *BaseTrinoParserListener) ExitStringUser(ctx *StringUserContext) {} + +// EnterNonReserved is called when production nonReserved is entered. +func (s *BaseTrinoParserListener) EnterNonReserved(ctx *NonReservedContext) {} + +// ExitNonReserved is called when production nonReserved is exited. +func (s *BaseTrinoParserListener) ExitNonReserved(ctx *NonReservedContext) {} diff --git a/trino/trinoparser_base_visitor.go b/trino/trinoparser_base_visitor.go new file mode 100644 index 0000000..a330c8e --- /dev/null +++ b/trino/trinoparser_base_visitor.go @@ -0,0 +1,1332 @@ +// Code generated from TrinoParser.g4 by ANTLR 4.13.2. DO NOT EDIT. + +package trino // TrinoParser +import "github.com/antlr4-go/antlr/v4" + +type BaseTrinoParserVisitor struct { + *antlr.BaseParseTreeVisitor +} + +func (v *BaseTrinoParserVisitor) VisitParse(ctx *ParseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStatements(ctx *StatementsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSingleStatement(ctx *SingleStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStandaloneExpression(ctx *StandaloneExpressionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStandalonePathSpecification(ctx *StandalonePathSpecificationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStandaloneType(ctx *StandaloneTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStandaloneRowPattern(ctx *StandaloneRowPatternContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStandaloneFunctionSpecification(ctx *StandaloneFunctionSpecificationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStatementDefault(ctx *StatementDefaultContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUse(ctx *UseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateCatalog(ctx *CreateCatalogContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropCatalog(ctx *DropCatalogContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateSchema(ctx *CreateSchemaContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropSchema(ctx *DropSchemaContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRenameSchema(ctx *RenameSchemaContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetSchemaAuthorization(ctx *SetSchemaAuthorizationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateTableAsSelect(ctx *CreateTableAsSelectContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateTable(ctx *CreateTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropTable(ctx *DropTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitInsertInto(ctx *InsertIntoContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDelete(ctx *DeleteContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTruncateTable(ctx *TruncateTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCommentTable(ctx *CommentTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCommentView(ctx *CommentViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCommentColumn(ctx *CommentColumnContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRenameTable(ctx *RenameTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitAddColumn(ctx *AddColumnContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRenameColumn(ctx *RenameColumnContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropColumn(ctx *DropColumnContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetColumnType(ctx *SetColumnTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetTableAuthorization(ctx *SetTableAuthorizationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetTableProperties(ctx *SetTablePropertiesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableExecute(ctx *TableExecuteContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitAnalyze(ctx *AnalyzeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateMaterializedView(ctx *CreateMaterializedViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateView(ctx *CreateViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRefreshMaterializedView(ctx *RefreshMaterializedViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropMaterializedView(ctx *DropMaterializedViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRenameMaterializedView(ctx *RenameMaterializedViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetMaterializedViewProperties(ctx *SetMaterializedViewPropertiesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropView(ctx *DropViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRenameView(ctx *RenameViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetViewAuthorization(ctx *SetViewAuthorizationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCall(ctx *CallContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateFunction(ctx *CreateFunctionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropFunction(ctx *DropFunctionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCreateRole(ctx *CreateRoleContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDropRole(ctx *DropRoleContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitGrantRoles(ctx *GrantRolesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRevokeRoles(ctx *RevokeRolesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetRole(ctx *SetRoleContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitGrant(ctx *GrantContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDeny(ctx *DenyContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRevoke(ctx *RevokeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowGrants(ctx *ShowGrantsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExplain(ctx *ExplainContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExplainAnalyze(ctx *ExplainAnalyzeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowCreateTable(ctx *ShowCreateTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowCreateSchema(ctx *ShowCreateSchemaContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowCreateView(ctx *ShowCreateViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowCreateMaterializedView(ctx *ShowCreateMaterializedViewContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowTables(ctx *ShowTablesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowSchemas(ctx *ShowSchemasContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowCatalogs(ctx *ShowCatalogsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowColumns(ctx *ShowColumnsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowStats(ctx *ShowStatsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowStatsForQuery(ctx *ShowStatsForQueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowRoles(ctx *ShowRolesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowRoleGrants(ctx *ShowRoleGrantsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowFunctions(ctx *ShowFunctionsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitShowSession(ctx *ShowSessionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetSessionAuthorization(ctx *SetSessionAuthorizationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitResetSessionAuthorization(ctx *ResetSessionAuthorizationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetSession(ctx *SetSessionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitResetSession(ctx *ResetSessionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStartTransaction(ctx *StartTransactionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCommit(ctx *CommitContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRollback(ctx *RollbackContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPrepare(ctx *PrepareContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDeallocate(ctx *DeallocateContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExecute(ctx *ExecuteContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExecuteImmediate(ctx *ExecuteImmediateContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDescribeInput(ctx *DescribeInputContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDescribeOutput(ctx *DescribeOutputContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetPath(ctx *SetPathContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetTimeZone(ctx *SetTimeZoneContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUpdate(ctx *UpdateContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitMerge(ctx *MergeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRootQuery(ctx *RootQueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitWithFunction(ctx *WithFunctionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQuery(ctx *QueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitWith(ctx *WithContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableElement(ctx *TableElementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitColumnDefinition(ctx *ColumnDefinitionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLikeClause(ctx *LikeClauseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitProperties(ctx *PropertiesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPropertyAssignments(ctx *PropertyAssignmentsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitProperty(ctx *PropertyContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDefaultPropertyValue(ctx *DefaultPropertyValueContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNonDefaultPropertyValue(ctx *NonDefaultPropertyValueContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQueryNoWith(ctx *QueryNoWithContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLimitRowCount(ctx *LimitRowCountContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRowCount(ctx *RowCountContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQueryTermDefault(ctx *QueryTermDefaultContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetOperation(ctx *SetOperationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQueryPrimaryDefault(ctx *QueryPrimaryDefaultContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTable(ctx *TableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitInlineTable(ctx *InlineTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSubquery(ctx *SubqueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSortItem(ctx *SortItemContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQuerySpecification(ctx *QuerySpecificationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitGroupBy(ctx *GroupByContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSingleGroupingSet(ctx *SingleGroupingSetContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRollup(ctx *RollupContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCube(ctx *CubeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitMultipleGroupingSets(ctx *MultipleGroupingSetsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitGroupingSet(ctx *GroupingSetContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitWindowDefinition(ctx *WindowDefinitionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitWindowSpecification(ctx *WindowSpecificationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNamedQuery(ctx *NamedQueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSetQuantifier(ctx *SetQuantifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSelectSingle(ctx *SelectSingleContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSelectAll(ctx *SelectAllContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitAs_column_alias(ctx *As_column_aliasContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitColumn_alias(ctx *Column_aliasContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRelationDefault(ctx *RelationDefaultContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJoinRelation(ctx *JoinRelationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJoinType(ctx *JoinTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJoinCriteria(ctx *JoinCriteriaContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSampledRelation(ctx *SampledRelationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSampleType(ctx *SampleTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTrimsSpecification(ctx *TrimsSpecificationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitListAggOverflowBehavior(ctx *ListAggOverflowBehaviorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitListaggCountIndication(ctx *ListaggCountIndicationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPatternRecognition(ctx *PatternRecognitionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitMeasureDefinition(ctx *MeasureDefinitionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRowsPerMatch(ctx *RowsPerMatchContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitEmptyMatchHandling(ctx *EmptyMatchHandlingContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSkipTo(ctx *SkipToContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSubsetDefinition(ctx *SubsetDefinitionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitVariableDefinition(ctx *VariableDefinitionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitAliasedRelation(ctx *AliasedRelationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitColumnAliases(ctx *ColumnAliasesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableName(ctx *TableNameContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSubqueryRelation(ctx *SubqueryRelationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUnnest(ctx *UnnestContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLateral(ctx *LateralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableFunctionInvocation(ctx *TableFunctionInvocationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitParenthesizedRelation(ctx *ParenthesizedRelationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableFunctionCall(ctx *TableFunctionCallContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableFunctionArgument(ctx *TableFunctionArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableArgument(ctx *TableArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableArgumentTable(ctx *TableArgumentTableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTableArgumentQuery(ctx *TableArgumentQueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDescriptorArgument(ctx *DescriptorArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDescriptorField(ctx *DescriptorFieldContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCopartitionTables(ctx *CopartitionTablesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExpression(ctx *ExpressionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLogicalNot(ctx *LogicalNotContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPredicated(ctx *PredicatedContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitOr(ctx *OrContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitAnd(ctx *AndContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitComparison(ctx *ComparisonContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQuantifiedComparison(ctx *QuantifiedComparisonContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitBetween(ctx *BetweenContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitInList(ctx *InListContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitInSubquery(ctx *InSubqueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLike(ctx *LikeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNullPredicate(ctx *NullPredicateContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDistinctFrom(ctx *DistinctFromContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitValueExpressionDefault(ctx *ValueExpressionDefaultContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitConcatenation(ctx *ConcatenationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitArithmeticBinary(ctx *ArithmeticBinaryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitArithmeticUnary(ctx *ArithmeticUnaryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitAtTimeZone(ctx *AtTimeZoneContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDereference(ctx *DereferenceContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTypeConstructor(ctx *TypeConstructorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonValue(ctx *JsonValueContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSpecialDateTimeFunction(ctx *SpecialDateTimeFunctionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSubstring(ctx *SubstringContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCast(ctx *CastContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLambda(ctx *LambdaContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitParenthesizedExpression(ctx *ParenthesizedExpressionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTrim(ctx *TrimContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitParameter(ctx *ParameterContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNormalize(ctx *NormalizeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonObject(ctx *JsonObjectContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIntervalLiteral(ctx *IntervalLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNumericLiteral(ctx *NumericLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitBooleanLiteral(ctx *BooleanLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonArray(ctx *JsonArrayContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSimpleCase(ctx *SimpleCaseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitColumnReference(ctx *ColumnReferenceContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNullLiteral(ctx *NullLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRowConstructor(ctx *RowConstructorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSubscript(ctx *SubscriptContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonExists(ctx *JsonExistsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCurrentPath(ctx *CurrentPathContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSubqueryExpression(ctx *SubqueryExpressionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitBinaryLiteral(ctx *BinaryLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCurrentUser(ctx *CurrentUserContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonQuery(ctx *JsonQueryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitMeasure(ctx *MeasureContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExtract(ctx *ExtractContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStringLiteral(ctx *StringLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitArrayConstructor(ctx *ArrayConstructorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitFunctionCall(ctx *FunctionCallContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCurrentSchema(ctx *CurrentSchemaContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExists(ctx *ExistsContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPosition(ctx *PositionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitListagg(ctx *ListaggContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSearchedCase(ctx *SearchedCaseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCurrentCatalog(ctx *CurrentCatalogContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitGroupingOperation(ctx *GroupingOperationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonPathInvocation(ctx *JsonPathInvocationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonValueExpression(ctx *JsonValueExpressionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonRepresentation(ctx *JsonRepresentationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonArgument(ctx *JsonArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonExistsErrorBehavior(ctx *JsonExistsErrorBehaviorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonValueBehavior(ctx *JsonValueBehaviorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonQueryWrapperBehavior(ctx *JsonQueryWrapperBehaviorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonQueryBehavior(ctx *JsonQueryBehaviorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitJsonObjectMember(ctx *JsonObjectMemberContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitProcessingMode(ctx *ProcessingModeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNullTreatment(ctx *NullTreatmentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitBasicStringLiteral(ctx *BasicStringLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUnicodeStringLiteral(ctx *UnicodeStringLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTimeZoneInterval(ctx *TimeZoneIntervalContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTimeZoneString(ctx *TimeZoneStringContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitComparisonOperator(ctx *ComparisonOperatorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitComparisonQuantifier(ctx *ComparisonQuantifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitBooleanValue(ctx *BooleanValueContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitInterval(ctx *IntervalContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIntervalField(ctx *IntervalFieldContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNormalForm(ctx *NormalFormContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRowType(ctx *RowTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIntervalType(ctx *IntervalTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitArrayType(ctx *ArrayTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDoublePrecisionType(ctx *DoublePrecisionTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLegacyArrayType(ctx *LegacyArrayTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitGenericType(ctx *GenericTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDateTimeType(ctx *DateTimeTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLegacyMapType(ctx *LegacyMapTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRowField(ctx *RowFieldContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTypeParameter(ctx *TypeParameterContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitWhenClause(ctx *WhenClauseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitFilter(ctx *FilterContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitMergeUpdate(ctx *MergeUpdateContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitMergeDelete(ctx *MergeDeleteContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitMergeInsert(ctx *MergeInsertContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitOver(ctx *OverContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitWindowFrame(ctx *WindowFrameContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitFrameExtent(ctx *FrameExtentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUnboundedFrame(ctx *UnboundedFrameContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCurrentRowBound(ctx *CurrentRowBoundContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitBoundedFrame(ctx *BoundedFrameContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQuantifiedPrimary(ctx *QuantifiedPrimaryContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPatternConcatenation(ctx *PatternConcatenationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPatternAlternation(ctx *PatternAlternationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPatternVariable(ctx *PatternVariableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitEmptyPattern(ctx *EmptyPatternContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPatternPermutation(ctx *PatternPermutationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitGroupedPattern(ctx *GroupedPatternContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPartitionStartAnchor(ctx *PartitionStartAnchorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPartitionEndAnchor(ctx *PartitionEndAnchorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExcludedPattern(ctx *ExcludedPatternContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitZeroOrMoreQuantifier(ctx *ZeroOrMoreQuantifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitOneOrMoreQuantifier(ctx *OneOrMoreQuantifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitZeroOrOneQuantifier(ctx *ZeroOrOneQuantifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRangeQuantifier(ctx *RangeQuantifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUpdateAssignment(ctx *UpdateAssignmentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExplainFormat(ctx *ExplainFormatContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitExplainType(ctx *ExplainTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIsolationLevel(ctx *IsolationLevelContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitTransactionAccessMode(ctx *TransactionAccessModeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitReadUncommitted(ctx *ReadUncommittedContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitReadCommitted(ctx *ReadCommittedContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRepeatableRead(ctx *RepeatableReadContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSerializable(ctx *SerializableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPositionalArgument(ctx *PositionalArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNamedArgument(ctx *NamedArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQualifiedArgument(ctx *QualifiedArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUnqualifiedArgument(ctx *UnqualifiedArgumentContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPathSpecification(ctx *PathSpecificationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitFunctionSpecification(ctx *FunctionSpecificationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitFunctionDeclaration(ctx *FunctionDeclarationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitParameterDeclaration(ctx *ParameterDeclarationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitReturnsClause(ctx *ReturnsClauseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLanguageCharacteristic(ctx *LanguageCharacteristicContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDeterministicCharacteristic(ctx *DeterministicCharacteristicContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitReturnsNullOnNullInputCharacteristic(ctx *ReturnsNullOnNullInputCharacteristicContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCalledOnNullInputCharacteristic(ctx *CalledOnNullInputCharacteristicContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSecurityCharacteristic(ctx *SecurityCharacteristicContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCommentCharacteristic(ctx *CommentCharacteristicContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitReturnStatement(ctx *ReturnStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitAssignmentStatement(ctx *AssignmentStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSimpleCaseStatement(ctx *SimpleCaseStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSearchedCaseStatement(ctx *SearchedCaseStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIfStatement(ctx *IfStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIterateStatement(ctx *IterateStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLeaveStatement(ctx *LeaveStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCompoundStatement(ctx *CompoundStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitLoopStatement(ctx *LoopStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitWhileStatement(ctx *WhileStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRepeatStatement(ctx *RepeatStatementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCaseStatementWhenClause(ctx *CaseStatementWhenClauseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitElseIfClause(ctx *ElseIfClauseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitElseClause(ctx *ElseClauseContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitVariableDeclaration(ctx *VariableDeclarationContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSqlStatementList(ctx *SqlStatementListContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitPrivilege(ctx *PrivilegeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQualifiedName(ctx *QualifiedNameContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQueryPeriod(ctx *QueryPeriodContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRangeType(ctx *RangeTypeContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitSpecifiedPrincipal(ctx *SpecifiedPrincipalContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCurrentUserGrantor(ctx *CurrentUserGrantorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitCurrentRoleGrantor(ctx *CurrentRoleGrantorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUnspecifiedPrincipal(ctx *UnspecifiedPrincipalContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUserPrincipal(ctx *UserPrincipalContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRolePrincipal(ctx *RolePrincipalContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitRoles(ctx *RolesContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitUnquotedIdentifier(ctx *UnquotedIdentifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitQuotedIdentifier(ctx *QuotedIdentifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitBackQuotedIdentifier(ctx *BackQuotedIdentifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDigitIdentifier(ctx *DigitIdentifierContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDecimalLiteral(ctx *DecimalLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitDoubleLiteral(ctx *DoubleLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIntegerLiteral(ctx *IntegerLiteralContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitIdentifierUser(ctx *IdentifierUserContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitStringUser(ctx *StringUserContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseTrinoParserVisitor) VisitNonReserved(ctx *NonReservedContext) interface{} { + return v.VisitChildren(ctx) +} diff --git a/trino/trinoparser_listener.go b/trino/trinoparser_listener.go new file mode 100644 index 0000000..1e58446 --- /dev/null +++ b/trino/trinoparser_listener.go @@ -0,0 +1,1995 @@ +// Code generated from TrinoParser.g4 by ANTLR 4.13.2. DO NOT EDIT. + +package trino // TrinoParser +import "github.com/antlr4-go/antlr/v4" + +// TrinoParserListener is a complete listener for a parse tree produced by TrinoParser. +type TrinoParserListener interface { + antlr.ParseTreeListener + + // EnterParse is called when entering the parse production. + EnterParse(c *ParseContext) + + // EnterStatements is called when entering the statements production. + EnterStatements(c *StatementsContext) + + // EnterSingleStatement is called when entering the singleStatement production. + EnterSingleStatement(c *SingleStatementContext) + + // EnterStandaloneExpression is called when entering the standaloneExpression production. + EnterStandaloneExpression(c *StandaloneExpressionContext) + + // EnterStandalonePathSpecification is called when entering the standalonePathSpecification production. + EnterStandalonePathSpecification(c *StandalonePathSpecificationContext) + + // EnterStandaloneType is called when entering the standaloneType production. + EnterStandaloneType(c *StandaloneTypeContext) + + // EnterStandaloneRowPattern is called when entering the standaloneRowPattern production. + EnterStandaloneRowPattern(c *StandaloneRowPatternContext) + + // EnterStandaloneFunctionSpecification is called when entering the standaloneFunctionSpecification production. + EnterStandaloneFunctionSpecification(c *StandaloneFunctionSpecificationContext) + + // EnterStatementDefault is called when entering the statementDefault production. + EnterStatementDefault(c *StatementDefaultContext) + + // EnterUse is called when entering the use production. + EnterUse(c *UseContext) + + // EnterCreateCatalog is called when entering the createCatalog production. + EnterCreateCatalog(c *CreateCatalogContext) + + // EnterDropCatalog is called when entering the dropCatalog production. + EnterDropCatalog(c *DropCatalogContext) + + // EnterCreateSchema is called when entering the createSchema production. + EnterCreateSchema(c *CreateSchemaContext) + + // EnterDropSchema is called when entering the dropSchema production. + EnterDropSchema(c *DropSchemaContext) + + // EnterRenameSchema is called when entering the renameSchema production. + EnterRenameSchema(c *RenameSchemaContext) + + // EnterSetSchemaAuthorization is called when entering the setSchemaAuthorization production. + EnterSetSchemaAuthorization(c *SetSchemaAuthorizationContext) + + // EnterCreateTableAsSelect is called when entering the createTableAsSelect production. + EnterCreateTableAsSelect(c *CreateTableAsSelectContext) + + // EnterCreateTable is called when entering the createTable production. + EnterCreateTable(c *CreateTableContext) + + // EnterDropTable is called when entering the dropTable production. + EnterDropTable(c *DropTableContext) + + // EnterInsertInto is called when entering the insertInto production. + EnterInsertInto(c *InsertIntoContext) + + // EnterDelete is called when entering the delete production. + EnterDelete(c *DeleteContext) + + // EnterTruncateTable is called when entering the truncateTable production. + EnterTruncateTable(c *TruncateTableContext) + + // EnterCommentTable is called when entering the commentTable production. + EnterCommentTable(c *CommentTableContext) + + // EnterCommentView is called when entering the commentView production. + EnterCommentView(c *CommentViewContext) + + // EnterCommentColumn is called when entering the commentColumn production. + EnterCommentColumn(c *CommentColumnContext) + + // EnterRenameTable is called when entering the renameTable production. + EnterRenameTable(c *RenameTableContext) + + // EnterAddColumn is called when entering the addColumn production. + EnterAddColumn(c *AddColumnContext) + + // EnterRenameColumn is called when entering the renameColumn production. + EnterRenameColumn(c *RenameColumnContext) + + // EnterDropColumn is called when entering the dropColumn production. + EnterDropColumn(c *DropColumnContext) + + // EnterSetColumnType is called when entering the setColumnType production. + EnterSetColumnType(c *SetColumnTypeContext) + + // EnterSetTableAuthorization is called when entering the setTableAuthorization production. + EnterSetTableAuthorization(c *SetTableAuthorizationContext) + + // EnterSetTableProperties is called when entering the setTableProperties production. + EnterSetTableProperties(c *SetTablePropertiesContext) + + // EnterTableExecute is called when entering the tableExecute production. + EnterTableExecute(c *TableExecuteContext) + + // EnterAnalyze is called when entering the analyze production. + EnterAnalyze(c *AnalyzeContext) + + // EnterCreateMaterializedView is called when entering the createMaterializedView production. + EnterCreateMaterializedView(c *CreateMaterializedViewContext) + + // EnterCreateView is called when entering the createView production. + EnterCreateView(c *CreateViewContext) + + // EnterRefreshMaterializedView is called when entering the refreshMaterializedView production. + EnterRefreshMaterializedView(c *RefreshMaterializedViewContext) + + // EnterDropMaterializedView is called when entering the dropMaterializedView production. + EnterDropMaterializedView(c *DropMaterializedViewContext) + + // EnterRenameMaterializedView is called when entering the renameMaterializedView production. + EnterRenameMaterializedView(c *RenameMaterializedViewContext) + + // EnterSetMaterializedViewProperties is called when entering the setMaterializedViewProperties production. + EnterSetMaterializedViewProperties(c *SetMaterializedViewPropertiesContext) + + // EnterDropView is called when entering the dropView production. + EnterDropView(c *DropViewContext) + + // EnterRenameView is called when entering the renameView production. + EnterRenameView(c *RenameViewContext) + + // EnterSetViewAuthorization is called when entering the setViewAuthorization production. + EnterSetViewAuthorization(c *SetViewAuthorizationContext) + + // EnterCall is called when entering the call production. + EnterCall(c *CallContext) + + // EnterCreateFunction is called when entering the createFunction production. + EnterCreateFunction(c *CreateFunctionContext) + + // EnterDropFunction is called when entering the dropFunction production. + EnterDropFunction(c *DropFunctionContext) + + // EnterCreateRole is called when entering the createRole production. + EnterCreateRole(c *CreateRoleContext) + + // EnterDropRole is called when entering the dropRole production. + EnterDropRole(c *DropRoleContext) + + // EnterGrantRoles is called when entering the grantRoles production. + EnterGrantRoles(c *GrantRolesContext) + + // EnterRevokeRoles is called when entering the revokeRoles production. + EnterRevokeRoles(c *RevokeRolesContext) + + // EnterSetRole is called when entering the setRole production. + EnterSetRole(c *SetRoleContext) + + // EnterGrant is called when entering the grant production. + EnterGrant(c *GrantContext) + + // EnterDeny is called when entering the deny production. + EnterDeny(c *DenyContext) + + // EnterRevoke is called when entering the revoke production. + EnterRevoke(c *RevokeContext) + + // EnterShowGrants is called when entering the showGrants production. + EnterShowGrants(c *ShowGrantsContext) + + // EnterExplain is called when entering the explain production. + EnterExplain(c *ExplainContext) + + // EnterExplainAnalyze is called when entering the explainAnalyze production. + EnterExplainAnalyze(c *ExplainAnalyzeContext) + + // EnterShowCreateTable is called when entering the showCreateTable production. + EnterShowCreateTable(c *ShowCreateTableContext) + + // EnterShowCreateSchema is called when entering the showCreateSchema production. + EnterShowCreateSchema(c *ShowCreateSchemaContext) + + // EnterShowCreateView is called when entering the showCreateView production. + EnterShowCreateView(c *ShowCreateViewContext) + + // EnterShowCreateMaterializedView is called when entering the showCreateMaterializedView production. + EnterShowCreateMaterializedView(c *ShowCreateMaterializedViewContext) + + // EnterShowTables is called when entering the showTables production. + EnterShowTables(c *ShowTablesContext) + + // EnterShowSchemas is called when entering the showSchemas production. + EnterShowSchemas(c *ShowSchemasContext) + + // EnterShowCatalogs is called when entering the showCatalogs production. + EnterShowCatalogs(c *ShowCatalogsContext) + + // EnterShowColumns is called when entering the showColumns production. + EnterShowColumns(c *ShowColumnsContext) + + // EnterShowStats is called when entering the showStats production. + EnterShowStats(c *ShowStatsContext) + + // EnterShowStatsForQuery is called when entering the showStatsForQuery production. + EnterShowStatsForQuery(c *ShowStatsForQueryContext) + + // EnterShowRoles is called when entering the showRoles production. + EnterShowRoles(c *ShowRolesContext) + + // EnterShowRoleGrants is called when entering the showRoleGrants production. + EnterShowRoleGrants(c *ShowRoleGrantsContext) + + // EnterShowFunctions is called when entering the showFunctions production. + EnterShowFunctions(c *ShowFunctionsContext) + + // EnterShowSession is called when entering the showSession production. + EnterShowSession(c *ShowSessionContext) + + // EnterSetSessionAuthorization is called when entering the setSessionAuthorization production. + EnterSetSessionAuthorization(c *SetSessionAuthorizationContext) + + // EnterResetSessionAuthorization is called when entering the resetSessionAuthorization production. + EnterResetSessionAuthorization(c *ResetSessionAuthorizationContext) + + // EnterSetSession is called when entering the setSession production. + EnterSetSession(c *SetSessionContext) + + // EnterResetSession is called when entering the resetSession production. + EnterResetSession(c *ResetSessionContext) + + // EnterStartTransaction is called when entering the startTransaction production. + EnterStartTransaction(c *StartTransactionContext) + + // EnterCommit is called when entering the commit production. + EnterCommit(c *CommitContext) + + // EnterRollback is called when entering the rollback production. + EnterRollback(c *RollbackContext) + + // EnterPrepare is called when entering the prepare production. + EnterPrepare(c *PrepareContext) + + // EnterDeallocate is called when entering the deallocate production. + EnterDeallocate(c *DeallocateContext) + + // EnterExecute is called when entering the execute production. + EnterExecute(c *ExecuteContext) + + // EnterExecuteImmediate is called when entering the executeImmediate production. + EnterExecuteImmediate(c *ExecuteImmediateContext) + + // EnterDescribeInput is called when entering the describeInput production. + EnterDescribeInput(c *DescribeInputContext) + + // EnterDescribeOutput is called when entering the describeOutput production. + EnterDescribeOutput(c *DescribeOutputContext) + + // EnterSetPath is called when entering the setPath production. + EnterSetPath(c *SetPathContext) + + // EnterSetTimeZone is called when entering the setTimeZone production. + EnterSetTimeZone(c *SetTimeZoneContext) + + // EnterUpdate is called when entering the update production. + EnterUpdate(c *UpdateContext) + + // EnterMerge is called when entering the merge production. + EnterMerge(c *MergeContext) + + // EnterRootQuery is called when entering the rootQuery production. + EnterRootQuery(c *RootQueryContext) + + // EnterWithFunction is called when entering the withFunction production. + EnterWithFunction(c *WithFunctionContext) + + // EnterQuery is called when entering the query production. + EnterQuery(c *QueryContext) + + // EnterWith is called when entering the with production. + EnterWith(c *WithContext) + + // EnterTableElement is called when entering the tableElement production. + EnterTableElement(c *TableElementContext) + + // EnterColumnDefinition is called when entering the columnDefinition production. + EnterColumnDefinition(c *ColumnDefinitionContext) + + // EnterLikeClause is called when entering the likeClause production. + EnterLikeClause(c *LikeClauseContext) + + // EnterProperties is called when entering the properties production. + EnterProperties(c *PropertiesContext) + + // EnterPropertyAssignments is called when entering the propertyAssignments production. + EnterPropertyAssignments(c *PropertyAssignmentsContext) + + // EnterProperty is called when entering the property production. + EnterProperty(c *PropertyContext) + + // EnterDefaultPropertyValue is called when entering the defaultPropertyValue production. + EnterDefaultPropertyValue(c *DefaultPropertyValueContext) + + // EnterNonDefaultPropertyValue is called when entering the nonDefaultPropertyValue production. + EnterNonDefaultPropertyValue(c *NonDefaultPropertyValueContext) + + // EnterQueryNoWith is called when entering the queryNoWith production. + EnterQueryNoWith(c *QueryNoWithContext) + + // EnterLimitRowCount is called when entering the limitRowCount production. + EnterLimitRowCount(c *LimitRowCountContext) + + // EnterRowCount is called when entering the rowCount production. + EnterRowCount(c *RowCountContext) + + // EnterQueryTermDefault is called when entering the queryTermDefault production. + EnterQueryTermDefault(c *QueryTermDefaultContext) + + // EnterSetOperation is called when entering the setOperation production. + EnterSetOperation(c *SetOperationContext) + + // EnterQueryPrimaryDefault is called when entering the queryPrimaryDefault production. + EnterQueryPrimaryDefault(c *QueryPrimaryDefaultContext) + + // EnterTable is called when entering the table production. + EnterTable(c *TableContext) + + // EnterInlineTable is called when entering the inlineTable production. + EnterInlineTable(c *InlineTableContext) + + // EnterSubquery is called when entering the subquery production. + EnterSubquery(c *SubqueryContext) + + // EnterSortItem is called when entering the sortItem production. + EnterSortItem(c *SortItemContext) + + // EnterQuerySpecification is called when entering the querySpecification production. + EnterQuerySpecification(c *QuerySpecificationContext) + + // EnterGroupBy is called when entering the groupBy production. + EnterGroupBy(c *GroupByContext) + + // EnterSingleGroupingSet is called when entering the singleGroupingSet production. + EnterSingleGroupingSet(c *SingleGroupingSetContext) + + // EnterRollup is called when entering the rollup production. + EnterRollup(c *RollupContext) + + // EnterCube is called when entering the cube production. + EnterCube(c *CubeContext) + + // EnterMultipleGroupingSets is called when entering the multipleGroupingSets production. + EnterMultipleGroupingSets(c *MultipleGroupingSetsContext) + + // EnterGroupingSet is called when entering the groupingSet production. + EnterGroupingSet(c *GroupingSetContext) + + // EnterWindowDefinition is called when entering the windowDefinition production. + EnterWindowDefinition(c *WindowDefinitionContext) + + // EnterWindowSpecification is called when entering the windowSpecification production. + EnterWindowSpecification(c *WindowSpecificationContext) + + // EnterNamedQuery is called when entering the namedQuery production. + EnterNamedQuery(c *NamedQueryContext) + + // EnterSetQuantifier is called when entering the setQuantifier production. + EnterSetQuantifier(c *SetQuantifierContext) + + // EnterSelectSingle is called when entering the selectSingle production. + EnterSelectSingle(c *SelectSingleContext) + + // EnterSelectAll is called when entering the selectAll production. + EnterSelectAll(c *SelectAllContext) + + // EnterAs_column_alias is called when entering the as_column_alias production. + EnterAs_column_alias(c *As_column_aliasContext) + + // EnterColumn_alias is called when entering the column_alias production. + EnterColumn_alias(c *Column_aliasContext) + + // EnterRelationDefault is called when entering the relationDefault production. + EnterRelationDefault(c *RelationDefaultContext) + + // EnterJoinRelation is called when entering the joinRelation production. + EnterJoinRelation(c *JoinRelationContext) + + // EnterJoinType is called when entering the joinType production. + EnterJoinType(c *JoinTypeContext) + + // EnterJoinCriteria is called when entering the joinCriteria production. + EnterJoinCriteria(c *JoinCriteriaContext) + + // EnterSampledRelation is called when entering the sampledRelation production. + EnterSampledRelation(c *SampledRelationContext) + + // EnterSampleType is called when entering the sampleType production. + EnterSampleType(c *SampleTypeContext) + + // EnterTrimsSpecification is called when entering the trimsSpecification production. + EnterTrimsSpecification(c *TrimsSpecificationContext) + + // EnterListAggOverflowBehavior is called when entering the listAggOverflowBehavior production. + EnterListAggOverflowBehavior(c *ListAggOverflowBehaviorContext) + + // EnterListaggCountIndication is called when entering the listaggCountIndication production. + EnterListaggCountIndication(c *ListaggCountIndicationContext) + + // EnterPatternRecognition is called when entering the patternRecognition production. + EnterPatternRecognition(c *PatternRecognitionContext) + + // EnterMeasureDefinition is called when entering the measureDefinition production. + EnterMeasureDefinition(c *MeasureDefinitionContext) + + // EnterRowsPerMatch is called when entering the rowsPerMatch production. + EnterRowsPerMatch(c *RowsPerMatchContext) + + // EnterEmptyMatchHandling is called when entering the emptyMatchHandling production. + EnterEmptyMatchHandling(c *EmptyMatchHandlingContext) + + // EnterSkipTo is called when entering the skipTo production. + EnterSkipTo(c *SkipToContext) + + // EnterSubsetDefinition is called when entering the subsetDefinition production. + EnterSubsetDefinition(c *SubsetDefinitionContext) + + // EnterVariableDefinition is called when entering the variableDefinition production. + EnterVariableDefinition(c *VariableDefinitionContext) + + // EnterAliasedRelation is called when entering the aliasedRelation production. + EnterAliasedRelation(c *AliasedRelationContext) + + // EnterColumnAliases is called when entering the columnAliases production. + EnterColumnAliases(c *ColumnAliasesContext) + + // EnterTableName is called when entering the tableName production. + EnterTableName(c *TableNameContext) + + // EnterSubqueryRelation is called when entering the subqueryRelation production. + EnterSubqueryRelation(c *SubqueryRelationContext) + + // EnterUnnest is called when entering the unnest production. + EnterUnnest(c *UnnestContext) + + // EnterLateral is called when entering the lateral production. + EnterLateral(c *LateralContext) + + // EnterTableFunctionInvocation is called when entering the tableFunctionInvocation production. + EnterTableFunctionInvocation(c *TableFunctionInvocationContext) + + // EnterParenthesizedRelation is called when entering the parenthesizedRelation production. + EnterParenthesizedRelation(c *ParenthesizedRelationContext) + + // EnterTableFunctionCall is called when entering the tableFunctionCall production. + EnterTableFunctionCall(c *TableFunctionCallContext) + + // EnterTableFunctionArgument is called when entering the tableFunctionArgument production. + EnterTableFunctionArgument(c *TableFunctionArgumentContext) + + // EnterTableArgument is called when entering the tableArgument production. + EnterTableArgument(c *TableArgumentContext) + + // EnterTableArgumentTable is called when entering the tableArgumentTable production. + EnterTableArgumentTable(c *TableArgumentTableContext) + + // EnterTableArgumentQuery is called when entering the tableArgumentQuery production. + EnterTableArgumentQuery(c *TableArgumentQueryContext) + + // EnterDescriptorArgument is called when entering the descriptorArgument production. + EnterDescriptorArgument(c *DescriptorArgumentContext) + + // EnterDescriptorField is called when entering the descriptorField production. + EnterDescriptorField(c *DescriptorFieldContext) + + // EnterCopartitionTables is called when entering the copartitionTables production. + EnterCopartitionTables(c *CopartitionTablesContext) + + // EnterExpression is called when entering the expression production. + EnterExpression(c *ExpressionContext) + + // EnterLogicalNot is called when entering the logicalNot production. + EnterLogicalNot(c *LogicalNotContext) + + // EnterPredicated is called when entering the predicated production. + EnterPredicated(c *PredicatedContext) + + // EnterOr is called when entering the or production. + EnterOr(c *OrContext) + + // EnterAnd is called when entering the and production. + EnterAnd(c *AndContext) + + // EnterComparison is called when entering the comparison production. + EnterComparison(c *ComparisonContext) + + // EnterQuantifiedComparison is called when entering the quantifiedComparison production. + EnterQuantifiedComparison(c *QuantifiedComparisonContext) + + // EnterBetween is called when entering the between production. + EnterBetween(c *BetweenContext) + + // EnterInList is called when entering the inList production. + EnterInList(c *InListContext) + + // EnterInSubquery is called when entering the inSubquery production. + EnterInSubquery(c *InSubqueryContext) + + // EnterLike is called when entering the like production. + EnterLike(c *LikeContext) + + // EnterNullPredicate is called when entering the nullPredicate production. + EnterNullPredicate(c *NullPredicateContext) + + // EnterDistinctFrom is called when entering the distinctFrom production. + EnterDistinctFrom(c *DistinctFromContext) + + // EnterValueExpressionDefault is called when entering the valueExpressionDefault production. + EnterValueExpressionDefault(c *ValueExpressionDefaultContext) + + // EnterConcatenation is called when entering the concatenation production. + EnterConcatenation(c *ConcatenationContext) + + // EnterArithmeticBinary is called when entering the arithmeticBinary production. + EnterArithmeticBinary(c *ArithmeticBinaryContext) + + // EnterArithmeticUnary is called when entering the arithmeticUnary production. + EnterArithmeticUnary(c *ArithmeticUnaryContext) + + // EnterAtTimeZone is called when entering the atTimeZone production. + EnterAtTimeZone(c *AtTimeZoneContext) + + // EnterDereference is called when entering the dereference production. + EnterDereference(c *DereferenceContext) + + // EnterTypeConstructor is called when entering the typeConstructor production. + EnterTypeConstructor(c *TypeConstructorContext) + + // EnterJsonValue is called when entering the jsonValue production. + EnterJsonValue(c *JsonValueContext) + + // EnterSpecialDateTimeFunction is called when entering the specialDateTimeFunction production. + EnterSpecialDateTimeFunction(c *SpecialDateTimeFunctionContext) + + // EnterSubstring is called when entering the substring production. + EnterSubstring(c *SubstringContext) + + // EnterCast is called when entering the cast production. + EnterCast(c *CastContext) + + // EnterLambda is called when entering the lambda production. + EnterLambda(c *LambdaContext) + + // EnterParenthesizedExpression is called when entering the parenthesizedExpression production. + EnterParenthesizedExpression(c *ParenthesizedExpressionContext) + + // EnterTrim is called when entering the trim production. + EnterTrim(c *TrimContext) + + // EnterParameter is called when entering the parameter production. + EnterParameter(c *ParameterContext) + + // EnterNormalize is called when entering the normalize production. + EnterNormalize(c *NormalizeContext) + + // EnterJsonObject is called when entering the jsonObject production. + EnterJsonObject(c *JsonObjectContext) + + // EnterIntervalLiteral is called when entering the intervalLiteral production. + EnterIntervalLiteral(c *IntervalLiteralContext) + + // EnterNumericLiteral is called when entering the numericLiteral production. + EnterNumericLiteral(c *NumericLiteralContext) + + // EnterBooleanLiteral is called when entering the booleanLiteral production. + EnterBooleanLiteral(c *BooleanLiteralContext) + + // EnterJsonArray is called when entering the jsonArray production. + EnterJsonArray(c *JsonArrayContext) + + // EnterSimpleCase is called when entering the simpleCase production. + EnterSimpleCase(c *SimpleCaseContext) + + // EnterColumnReference is called when entering the columnReference production. + EnterColumnReference(c *ColumnReferenceContext) + + // EnterNullLiteral is called when entering the nullLiteral production. + EnterNullLiteral(c *NullLiteralContext) + + // EnterRowConstructor is called when entering the rowConstructor production. + EnterRowConstructor(c *RowConstructorContext) + + // EnterSubscript is called when entering the subscript production. + EnterSubscript(c *SubscriptContext) + + // EnterJsonExists is called when entering the jsonExists production. + EnterJsonExists(c *JsonExistsContext) + + // EnterCurrentPath is called when entering the currentPath production. + EnterCurrentPath(c *CurrentPathContext) + + // EnterSubqueryExpression is called when entering the subqueryExpression production. + EnterSubqueryExpression(c *SubqueryExpressionContext) + + // EnterBinaryLiteral is called when entering the binaryLiteral production. + EnterBinaryLiteral(c *BinaryLiteralContext) + + // EnterCurrentUser is called when entering the currentUser production. + EnterCurrentUser(c *CurrentUserContext) + + // EnterJsonQuery is called when entering the jsonQuery production. + EnterJsonQuery(c *JsonQueryContext) + + // EnterMeasure is called when entering the measure production. + EnterMeasure(c *MeasureContext) + + // EnterExtract is called when entering the extract production. + EnterExtract(c *ExtractContext) + + // EnterStringLiteral is called when entering the stringLiteral production. + EnterStringLiteral(c *StringLiteralContext) + + // EnterArrayConstructor is called when entering the arrayConstructor production. + EnterArrayConstructor(c *ArrayConstructorContext) + + // EnterFunctionCall is called when entering the functionCall production. + EnterFunctionCall(c *FunctionCallContext) + + // EnterCurrentSchema is called when entering the currentSchema production. + EnterCurrentSchema(c *CurrentSchemaContext) + + // EnterExists is called when entering the exists production. + EnterExists(c *ExistsContext) + + // EnterPosition is called when entering the position production. + EnterPosition(c *PositionContext) + + // EnterListagg is called when entering the listagg production. + EnterListagg(c *ListaggContext) + + // EnterSearchedCase is called when entering the searchedCase production. + EnterSearchedCase(c *SearchedCaseContext) + + // EnterCurrentCatalog is called when entering the currentCatalog production. + EnterCurrentCatalog(c *CurrentCatalogContext) + + // EnterGroupingOperation is called when entering the groupingOperation production. + EnterGroupingOperation(c *GroupingOperationContext) + + // EnterJsonPathInvocation is called when entering the jsonPathInvocation production. + EnterJsonPathInvocation(c *JsonPathInvocationContext) + + // EnterJsonValueExpression is called when entering the jsonValueExpression production. + EnterJsonValueExpression(c *JsonValueExpressionContext) + + // EnterJsonRepresentation is called when entering the jsonRepresentation production. + EnterJsonRepresentation(c *JsonRepresentationContext) + + // EnterJsonArgument is called when entering the jsonArgument production. + EnterJsonArgument(c *JsonArgumentContext) + + // EnterJsonExistsErrorBehavior is called when entering the jsonExistsErrorBehavior production. + EnterJsonExistsErrorBehavior(c *JsonExistsErrorBehaviorContext) + + // EnterJsonValueBehavior is called when entering the jsonValueBehavior production. + EnterJsonValueBehavior(c *JsonValueBehaviorContext) + + // EnterJsonQueryWrapperBehavior is called when entering the jsonQueryWrapperBehavior production. + EnterJsonQueryWrapperBehavior(c *JsonQueryWrapperBehaviorContext) + + // EnterJsonQueryBehavior is called when entering the jsonQueryBehavior production. + EnterJsonQueryBehavior(c *JsonQueryBehaviorContext) + + // EnterJsonObjectMember is called when entering the jsonObjectMember production. + EnterJsonObjectMember(c *JsonObjectMemberContext) + + // EnterProcessingMode is called when entering the processingMode production. + EnterProcessingMode(c *ProcessingModeContext) + + // EnterNullTreatment is called when entering the nullTreatment production. + EnterNullTreatment(c *NullTreatmentContext) + + // EnterBasicStringLiteral is called when entering the basicStringLiteral production. + EnterBasicStringLiteral(c *BasicStringLiteralContext) + + // EnterUnicodeStringLiteral is called when entering the unicodeStringLiteral production. + EnterUnicodeStringLiteral(c *UnicodeStringLiteralContext) + + // EnterTimeZoneInterval is called when entering the timeZoneInterval production. + EnterTimeZoneInterval(c *TimeZoneIntervalContext) + + // EnterTimeZoneString is called when entering the timeZoneString production. + EnterTimeZoneString(c *TimeZoneStringContext) + + // EnterComparisonOperator is called when entering the comparisonOperator production. + EnterComparisonOperator(c *ComparisonOperatorContext) + + // EnterComparisonQuantifier is called when entering the comparisonQuantifier production. + EnterComparisonQuantifier(c *ComparisonQuantifierContext) + + // EnterBooleanValue is called when entering the booleanValue production. + EnterBooleanValue(c *BooleanValueContext) + + // EnterInterval is called when entering the interval production. + EnterInterval(c *IntervalContext) + + // EnterIntervalField is called when entering the intervalField production. + EnterIntervalField(c *IntervalFieldContext) + + // EnterNormalForm is called when entering the normalForm production. + EnterNormalForm(c *NormalFormContext) + + // EnterRowType is called when entering the rowType production. + EnterRowType(c *RowTypeContext) + + // EnterIntervalType is called when entering the intervalType production. + EnterIntervalType(c *IntervalTypeContext) + + // EnterArrayType is called when entering the arrayType production. + EnterArrayType(c *ArrayTypeContext) + + // EnterDoublePrecisionType is called when entering the doublePrecisionType production. + EnterDoublePrecisionType(c *DoublePrecisionTypeContext) + + // EnterLegacyArrayType is called when entering the legacyArrayType production. + EnterLegacyArrayType(c *LegacyArrayTypeContext) + + // EnterGenericType is called when entering the genericType production. + EnterGenericType(c *GenericTypeContext) + + // EnterDateTimeType is called when entering the dateTimeType production. + EnterDateTimeType(c *DateTimeTypeContext) + + // EnterLegacyMapType is called when entering the legacyMapType production. + EnterLegacyMapType(c *LegacyMapTypeContext) + + // EnterRowField is called when entering the rowField production. + EnterRowField(c *RowFieldContext) + + // EnterTypeParameter is called when entering the typeParameter production. + EnterTypeParameter(c *TypeParameterContext) + + // EnterWhenClause is called when entering the whenClause production. + EnterWhenClause(c *WhenClauseContext) + + // EnterFilter is called when entering the filter production. + EnterFilter(c *FilterContext) + + // EnterMergeUpdate is called when entering the mergeUpdate production. + EnterMergeUpdate(c *MergeUpdateContext) + + // EnterMergeDelete is called when entering the mergeDelete production. + EnterMergeDelete(c *MergeDeleteContext) + + // EnterMergeInsert is called when entering the mergeInsert production. + EnterMergeInsert(c *MergeInsertContext) + + // EnterOver is called when entering the over production. + EnterOver(c *OverContext) + + // EnterWindowFrame is called when entering the windowFrame production. + EnterWindowFrame(c *WindowFrameContext) + + // EnterFrameExtent is called when entering the frameExtent production. + EnterFrameExtent(c *FrameExtentContext) + + // EnterUnboundedFrame is called when entering the unboundedFrame production. + EnterUnboundedFrame(c *UnboundedFrameContext) + + // EnterCurrentRowBound is called when entering the currentRowBound production. + EnterCurrentRowBound(c *CurrentRowBoundContext) + + // EnterBoundedFrame is called when entering the boundedFrame production. + EnterBoundedFrame(c *BoundedFrameContext) + + // EnterQuantifiedPrimary is called when entering the quantifiedPrimary production. + EnterQuantifiedPrimary(c *QuantifiedPrimaryContext) + + // EnterPatternConcatenation is called when entering the patternConcatenation production. + EnterPatternConcatenation(c *PatternConcatenationContext) + + // EnterPatternAlternation is called when entering the patternAlternation production. + EnterPatternAlternation(c *PatternAlternationContext) + + // EnterPatternVariable is called when entering the patternVariable production. + EnterPatternVariable(c *PatternVariableContext) + + // EnterEmptyPattern is called when entering the emptyPattern production. + EnterEmptyPattern(c *EmptyPatternContext) + + // EnterPatternPermutation is called when entering the patternPermutation production. + EnterPatternPermutation(c *PatternPermutationContext) + + // EnterGroupedPattern is called when entering the groupedPattern production. + EnterGroupedPattern(c *GroupedPatternContext) + + // EnterPartitionStartAnchor is called when entering the partitionStartAnchor production. + EnterPartitionStartAnchor(c *PartitionStartAnchorContext) + + // EnterPartitionEndAnchor is called when entering the partitionEndAnchor production. + EnterPartitionEndAnchor(c *PartitionEndAnchorContext) + + // EnterExcludedPattern is called when entering the excludedPattern production. + EnterExcludedPattern(c *ExcludedPatternContext) + + // EnterZeroOrMoreQuantifier is called when entering the zeroOrMoreQuantifier production. + EnterZeroOrMoreQuantifier(c *ZeroOrMoreQuantifierContext) + + // EnterOneOrMoreQuantifier is called when entering the oneOrMoreQuantifier production. + EnterOneOrMoreQuantifier(c *OneOrMoreQuantifierContext) + + // EnterZeroOrOneQuantifier is called when entering the zeroOrOneQuantifier production. + EnterZeroOrOneQuantifier(c *ZeroOrOneQuantifierContext) + + // EnterRangeQuantifier is called when entering the rangeQuantifier production. + EnterRangeQuantifier(c *RangeQuantifierContext) + + // EnterUpdateAssignment is called when entering the updateAssignment production. + EnterUpdateAssignment(c *UpdateAssignmentContext) + + // EnterExplainFormat is called when entering the explainFormat production. + EnterExplainFormat(c *ExplainFormatContext) + + // EnterExplainType is called when entering the explainType production. + EnterExplainType(c *ExplainTypeContext) + + // EnterIsolationLevel is called when entering the isolationLevel production. + EnterIsolationLevel(c *IsolationLevelContext) + + // EnterTransactionAccessMode is called when entering the transactionAccessMode production. + EnterTransactionAccessMode(c *TransactionAccessModeContext) + + // EnterReadUncommitted is called when entering the readUncommitted production. + EnterReadUncommitted(c *ReadUncommittedContext) + + // EnterReadCommitted is called when entering the readCommitted production. + EnterReadCommitted(c *ReadCommittedContext) + + // EnterRepeatableRead is called when entering the repeatableRead production. + EnterRepeatableRead(c *RepeatableReadContext) + + // EnterSerializable is called when entering the serializable production. + EnterSerializable(c *SerializableContext) + + // EnterPositionalArgument is called when entering the positionalArgument production. + EnterPositionalArgument(c *PositionalArgumentContext) + + // EnterNamedArgument is called when entering the namedArgument production. + EnterNamedArgument(c *NamedArgumentContext) + + // EnterQualifiedArgument is called when entering the qualifiedArgument production. + EnterQualifiedArgument(c *QualifiedArgumentContext) + + // EnterUnqualifiedArgument is called when entering the unqualifiedArgument production. + EnterUnqualifiedArgument(c *UnqualifiedArgumentContext) + + // EnterPathSpecification is called when entering the pathSpecification production. + EnterPathSpecification(c *PathSpecificationContext) + + // EnterFunctionSpecification is called when entering the functionSpecification production. + EnterFunctionSpecification(c *FunctionSpecificationContext) + + // EnterFunctionDeclaration is called when entering the functionDeclaration production. + EnterFunctionDeclaration(c *FunctionDeclarationContext) + + // EnterParameterDeclaration is called when entering the parameterDeclaration production. + EnterParameterDeclaration(c *ParameterDeclarationContext) + + // EnterReturnsClause is called when entering the returnsClause production. + EnterReturnsClause(c *ReturnsClauseContext) + + // EnterLanguageCharacteristic is called when entering the languageCharacteristic production. + EnterLanguageCharacteristic(c *LanguageCharacteristicContext) + + // EnterDeterministicCharacteristic is called when entering the deterministicCharacteristic production. + EnterDeterministicCharacteristic(c *DeterministicCharacteristicContext) + + // EnterReturnsNullOnNullInputCharacteristic is called when entering the returnsNullOnNullInputCharacteristic production. + EnterReturnsNullOnNullInputCharacteristic(c *ReturnsNullOnNullInputCharacteristicContext) + + // EnterCalledOnNullInputCharacteristic is called when entering the calledOnNullInputCharacteristic production. + EnterCalledOnNullInputCharacteristic(c *CalledOnNullInputCharacteristicContext) + + // EnterSecurityCharacteristic is called when entering the securityCharacteristic production. + EnterSecurityCharacteristic(c *SecurityCharacteristicContext) + + // EnterCommentCharacteristic is called when entering the commentCharacteristic production. + EnterCommentCharacteristic(c *CommentCharacteristicContext) + + // EnterReturnStatement is called when entering the returnStatement production. + EnterReturnStatement(c *ReturnStatementContext) + + // EnterAssignmentStatement is called when entering the assignmentStatement production. + EnterAssignmentStatement(c *AssignmentStatementContext) + + // EnterSimpleCaseStatement is called when entering the simpleCaseStatement production. + EnterSimpleCaseStatement(c *SimpleCaseStatementContext) + + // EnterSearchedCaseStatement is called when entering the searchedCaseStatement production. + EnterSearchedCaseStatement(c *SearchedCaseStatementContext) + + // EnterIfStatement is called when entering the ifStatement production. + EnterIfStatement(c *IfStatementContext) + + // EnterIterateStatement is called when entering the iterateStatement production. + EnterIterateStatement(c *IterateStatementContext) + + // EnterLeaveStatement is called when entering the leaveStatement production. + EnterLeaveStatement(c *LeaveStatementContext) + + // EnterCompoundStatement is called when entering the compoundStatement production. + EnterCompoundStatement(c *CompoundStatementContext) + + // EnterLoopStatement is called when entering the loopStatement production. + EnterLoopStatement(c *LoopStatementContext) + + // EnterWhileStatement is called when entering the whileStatement production. + EnterWhileStatement(c *WhileStatementContext) + + // EnterRepeatStatement is called when entering the repeatStatement production. + EnterRepeatStatement(c *RepeatStatementContext) + + // EnterCaseStatementWhenClause is called when entering the caseStatementWhenClause production. + EnterCaseStatementWhenClause(c *CaseStatementWhenClauseContext) + + // EnterElseIfClause is called when entering the elseIfClause production. + EnterElseIfClause(c *ElseIfClauseContext) + + // EnterElseClause is called when entering the elseClause production. + EnterElseClause(c *ElseClauseContext) + + // EnterVariableDeclaration is called when entering the variableDeclaration production. + EnterVariableDeclaration(c *VariableDeclarationContext) + + // EnterSqlStatementList is called when entering the sqlStatementList production. + EnterSqlStatementList(c *SqlStatementListContext) + + // EnterPrivilege is called when entering the privilege production. + EnterPrivilege(c *PrivilegeContext) + + // EnterQualifiedName is called when entering the qualifiedName production. + EnterQualifiedName(c *QualifiedNameContext) + + // EnterQueryPeriod is called when entering the queryPeriod production. + EnterQueryPeriod(c *QueryPeriodContext) + + // EnterRangeType is called when entering the rangeType production. + EnterRangeType(c *RangeTypeContext) + + // EnterSpecifiedPrincipal is called when entering the specifiedPrincipal production. + EnterSpecifiedPrincipal(c *SpecifiedPrincipalContext) + + // EnterCurrentUserGrantor is called when entering the currentUserGrantor production. + EnterCurrentUserGrantor(c *CurrentUserGrantorContext) + + // EnterCurrentRoleGrantor is called when entering the currentRoleGrantor production. + EnterCurrentRoleGrantor(c *CurrentRoleGrantorContext) + + // EnterUnspecifiedPrincipal is called when entering the unspecifiedPrincipal production. + EnterUnspecifiedPrincipal(c *UnspecifiedPrincipalContext) + + // EnterUserPrincipal is called when entering the userPrincipal production. + EnterUserPrincipal(c *UserPrincipalContext) + + // EnterRolePrincipal is called when entering the rolePrincipal production. + EnterRolePrincipal(c *RolePrincipalContext) + + // EnterRoles is called when entering the roles production. + EnterRoles(c *RolesContext) + + // EnterUnquotedIdentifier is called when entering the unquotedIdentifier production. + EnterUnquotedIdentifier(c *UnquotedIdentifierContext) + + // EnterQuotedIdentifier is called when entering the quotedIdentifier production. + EnterQuotedIdentifier(c *QuotedIdentifierContext) + + // EnterBackQuotedIdentifier is called when entering the backQuotedIdentifier production. + EnterBackQuotedIdentifier(c *BackQuotedIdentifierContext) + + // EnterDigitIdentifier is called when entering the digitIdentifier production. + EnterDigitIdentifier(c *DigitIdentifierContext) + + // EnterDecimalLiteral is called when entering the decimalLiteral production. + EnterDecimalLiteral(c *DecimalLiteralContext) + + // EnterDoubleLiteral is called when entering the doubleLiteral production. + EnterDoubleLiteral(c *DoubleLiteralContext) + + // EnterIntegerLiteral is called when entering the integerLiteral production. + EnterIntegerLiteral(c *IntegerLiteralContext) + + // EnterIdentifierUser is called when entering the identifierUser production. + EnterIdentifierUser(c *IdentifierUserContext) + + // EnterStringUser is called when entering the stringUser production. + EnterStringUser(c *StringUserContext) + + // EnterNonReserved is called when entering the nonReserved production. + EnterNonReserved(c *NonReservedContext) + + // ExitParse is called when exiting the parse production. + ExitParse(c *ParseContext) + + // ExitStatements is called when exiting the statements production. + ExitStatements(c *StatementsContext) + + // ExitSingleStatement is called when exiting the singleStatement production. + ExitSingleStatement(c *SingleStatementContext) + + // ExitStandaloneExpression is called when exiting the standaloneExpression production. + ExitStandaloneExpression(c *StandaloneExpressionContext) + + // ExitStandalonePathSpecification is called when exiting the standalonePathSpecification production. + ExitStandalonePathSpecification(c *StandalonePathSpecificationContext) + + // ExitStandaloneType is called when exiting the standaloneType production. + ExitStandaloneType(c *StandaloneTypeContext) + + // ExitStandaloneRowPattern is called when exiting the standaloneRowPattern production. + ExitStandaloneRowPattern(c *StandaloneRowPatternContext) + + // ExitStandaloneFunctionSpecification is called when exiting the standaloneFunctionSpecification production. + ExitStandaloneFunctionSpecification(c *StandaloneFunctionSpecificationContext) + + // ExitStatementDefault is called when exiting the statementDefault production. + ExitStatementDefault(c *StatementDefaultContext) + + // ExitUse is called when exiting the use production. + ExitUse(c *UseContext) + + // ExitCreateCatalog is called when exiting the createCatalog production. + ExitCreateCatalog(c *CreateCatalogContext) + + // ExitDropCatalog is called when exiting the dropCatalog production. + ExitDropCatalog(c *DropCatalogContext) + + // ExitCreateSchema is called when exiting the createSchema production. + ExitCreateSchema(c *CreateSchemaContext) + + // ExitDropSchema is called when exiting the dropSchema production. + ExitDropSchema(c *DropSchemaContext) + + // ExitRenameSchema is called when exiting the renameSchema production. + ExitRenameSchema(c *RenameSchemaContext) + + // ExitSetSchemaAuthorization is called when exiting the setSchemaAuthorization production. + ExitSetSchemaAuthorization(c *SetSchemaAuthorizationContext) + + // ExitCreateTableAsSelect is called when exiting the createTableAsSelect production. + ExitCreateTableAsSelect(c *CreateTableAsSelectContext) + + // ExitCreateTable is called when exiting the createTable production. + ExitCreateTable(c *CreateTableContext) + + // ExitDropTable is called when exiting the dropTable production. + ExitDropTable(c *DropTableContext) + + // ExitInsertInto is called when exiting the insertInto production. + ExitInsertInto(c *InsertIntoContext) + + // ExitDelete is called when exiting the delete production. + ExitDelete(c *DeleteContext) + + // ExitTruncateTable is called when exiting the truncateTable production. + ExitTruncateTable(c *TruncateTableContext) + + // ExitCommentTable is called when exiting the commentTable production. + ExitCommentTable(c *CommentTableContext) + + // ExitCommentView is called when exiting the commentView production. + ExitCommentView(c *CommentViewContext) + + // ExitCommentColumn is called when exiting the commentColumn production. + ExitCommentColumn(c *CommentColumnContext) + + // ExitRenameTable is called when exiting the renameTable production. + ExitRenameTable(c *RenameTableContext) + + // ExitAddColumn is called when exiting the addColumn production. + ExitAddColumn(c *AddColumnContext) + + // ExitRenameColumn is called when exiting the renameColumn production. + ExitRenameColumn(c *RenameColumnContext) + + // ExitDropColumn is called when exiting the dropColumn production. + ExitDropColumn(c *DropColumnContext) + + // ExitSetColumnType is called when exiting the setColumnType production. + ExitSetColumnType(c *SetColumnTypeContext) + + // ExitSetTableAuthorization is called when exiting the setTableAuthorization production. + ExitSetTableAuthorization(c *SetTableAuthorizationContext) + + // ExitSetTableProperties is called when exiting the setTableProperties production. + ExitSetTableProperties(c *SetTablePropertiesContext) + + // ExitTableExecute is called when exiting the tableExecute production. + ExitTableExecute(c *TableExecuteContext) + + // ExitAnalyze is called when exiting the analyze production. + ExitAnalyze(c *AnalyzeContext) + + // ExitCreateMaterializedView is called when exiting the createMaterializedView production. + ExitCreateMaterializedView(c *CreateMaterializedViewContext) + + // ExitCreateView is called when exiting the createView production. + ExitCreateView(c *CreateViewContext) + + // ExitRefreshMaterializedView is called when exiting the refreshMaterializedView production. + ExitRefreshMaterializedView(c *RefreshMaterializedViewContext) + + // ExitDropMaterializedView is called when exiting the dropMaterializedView production. + ExitDropMaterializedView(c *DropMaterializedViewContext) + + // ExitRenameMaterializedView is called when exiting the renameMaterializedView production. + ExitRenameMaterializedView(c *RenameMaterializedViewContext) + + // ExitSetMaterializedViewProperties is called when exiting the setMaterializedViewProperties production. + ExitSetMaterializedViewProperties(c *SetMaterializedViewPropertiesContext) + + // ExitDropView is called when exiting the dropView production. + ExitDropView(c *DropViewContext) + + // ExitRenameView is called when exiting the renameView production. + ExitRenameView(c *RenameViewContext) + + // ExitSetViewAuthorization is called when exiting the setViewAuthorization production. + ExitSetViewAuthorization(c *SetViewAuthorizationContext) + + // ExitCall is called when exiting the call production. + ExitCall(c *CallContext) + + // ExitCreateFunction is called when exiting the createFunction production. + ExitCreateFunction(c *CreateFunctionContext) + + // ExitDropFunction is called when exiting the dropFunction production. + ExitDropFunction(c *DropFunctionContext) + + // ExitCreateRole is called when exiting the createRole production. + ExitCreateRole(c *CreateRoleContext) + + // ExitDropRole is called when exiting the dropRole production. + ExitDropRole(c *DropRoleContext) + + // ExitGrantRoles is called when exiting the grantRoles production. + ExitGrantRoles(c *GrantRolesContext) + + // ExitRevokeRoles is called when exiting the revokeRoles production. + ExitRevokeRoles(c *RevokeRolesContext) + + // ExitSetRole is called when exiting the setRole production. + ExitSetRole(c *SetRoleContext) + + // ExitGrant is called when exiting the grant production. + ExitGrant(c *GrantContext) + + // ExitDeny is called when exiting the deny production. + ExitDeny(c *DenyContext) + + // ExitRevoke is called when exiting the revoke production. + ExitRevoke(c *RevokeContext) + + // ExitShowGrants is called when exiting the showGrants production. + ExitShowGrants(c *ShowGrantsContext) + + // ExitExplain is called when exiting the explain production. + ExitExplain(c *ExplainContext) + + // ExitExplainAnalyze is called when exiting the explainAnalyze production. + ExitExplainAnalyze(c *ExplainAnalyzeContext) + + // ExitShowCreateTable is called when exiting the showCreateTable production. + ExitShowCreateTable(c *ShowCreateTableContext) + + // ExitShowCreateSchema is called when exiting the showCreateSchema production. + ExitShowCreateSchema(c *ShowCreateSchemaContext) + + // ExitShowCreateView is called when exiting the showCreateView production. + ExitShowCreateView(c *ShowCreateViewContext) + + // ExitShowCreateMaterializedView is called when exiting the showCreateMaterializedView production. + ExitShowCreateMaterializedView(c *ShowCreateMaterializedViewContext) + + // ExitShowTables is called when exiting the showTables production. + ExitShowTables(c *ShowTablesContext) + + // ExitShowSchemas is called when exiting the showSchemas production. + ExitShowSchemas(c *ShowSchemasContext) + + // ExitShowCatalogs is called when exiting the showCatalogs production. + ExitShowCatalogs(c *ShowCatalogsContext) + + // ExitShowColumns is called when exiting the showColumns production. + ExitShowColumns(c *ShowColumnsContext) + + // ExitShowStats is called when exiting the showStats production. + ExitShowStats(c *ShowStatsContext) + + // ExitShowStatsForQuery is called when exiting the showStatsForQuery production. + ExitShowStatsForQuery(c *ShowStatsForQueryContext) + + // ExitShowRoles is called when exiting the showRoles production. + ExitShowRoles(c *ShowRolesContext) + + // ExitShowRoleGrants is called when exiting the showRoleGrants production. + ExitShowRoleGrants(c *ShowRoleGrantsContext) + + // ExitShowFunctions is called when exiting the showFunctions production. + ExitShowFunctions(c *ShowFunctionsContext) + + // ExitShowSession is called when exiting the showSession production. + ExitShowSession(c *ShowSessionContext) + + // ExitSetSessionAuthorization is called when exiting the setSessionAuthorization production. + ExitSetSessionAuthorization(c *SetSessionAuthorizationContext) + + // ExitResetSessionAuthorization is called when exiting the resetSessionAuthorization production. + ExitResetSessionAuthorization(c *ResetSessionAuthorizationContext) + + // ExitSetSession is called when exiting the setSession production. + ExitSetSession(c *SetSessionContext) + + // ExitResetSession is called when exiting the resetSession production. + ExitResetSession(c *ResetSessionContext) + + // ExitStartTransaction is called when exiting the startTransaction production. + ExitStartTransaction(c *StartTransactionContext) + + // ExitCommit is called when exiting the commit production. + ExitCommit(c *CommitContext) + + // ExitRollback is called when exiting the rollback production. + ExitRollback(c *RollbackContext) + + // ExitPrepare is called when exiting the prepare production. + ExitPrepare(c *PrepareContext) + + // ExitDeallocate is called when exiting the deallocate production. + ExitDeallocate(c *DeallocateContext) + + // ExitExecute is called when exiting the execute production. + ExitExecute(c *ExecuteContext) + + // ExitExecuteImmediate is called when exiting the executeImmediate production. + ExitExecuteImmediate(c *ExecuteImmediateContext) + + // ExitDescribeInput is called when exiting the describeInput production. + ExitDescribeInput(c *DescribeInputContext) + + // ExitDescribeOutput is called when exiting the describeOutput production. + ExitDescribeOutput(c *DescribeOutputContext) + + // ExitSetPath is called when exiting the setPath production. + ExitSetPath(c *SetPathContext) + + // ExitSetTimeZone is called when exiting the setTimeZone production. + ExitSetTimeZone(c *SetTimeZoneContext) + + // ExitUpdate is called when exiting the update production. + ExitUpdate(c *UpdateContext) + + // ExitMerge is called when exiting the merge production. + ExitMerge(c *MergeContext) + + // ExitRootQuery is called when exiting the rootQuery production. + ExitRootQuery(c *RootQueryContext) + + // ExitWithFunction is called when exiting the withFunction production. + ExitWithFunction(c *WithFunctionContext) + + // ExitQuery is called when exiting the query production. + ExitQuery(c *QueryContext) + + // ExitWith is called when exiting the with production. + ExitWith(c *WithContext) + + // ExitTableElement is called when exiting the tableElement production. + ExitTableElement(c *TableElementContext) + + // ExitColumnDefinition is called when exiting the columnDefinition production. + ExitColumnDefinition(c *ColumnDefinitionContext) + + // ExitLikeClause is called when exiting the likeClause production. + ExitLikeClause(c *LikeClauseContext) + + // ExitProperties is called when exiting the properties production. + ExitProperties(c *PropertiesContext) + + // ExitPropertyAssignments is called when exiting the propertyAssignments production. + ExitPropertyAssignments(c *PropertyAssignmentsContext) + + // ExitProperty is called when exiting the property production. + ExitProperty(c *PropertyContext) + + // ExitDefaultPropertyValue is called when exiting the defaultPropertyValue production. + ExitDefaultPropertyValue(c *DefaultPropertyValueContext) + + // ExitNonDefaultPropertyValue is called when exiting the nonDefaultPropertyValue production. + ExitNonDefaultPropertyValue(c *NonDefaultPropertyValueContext) + + // ExitQueryNoWith is called when exiting the queryNoWith production. + ExitQueryNoWith(c *QueryNoWithContext) + + // ExitLimitRowCount is called when exiting the limitRowCount production. + ExitLimitRowCount(c *LimitRowCountContext) + + // ExitRowCount is called when exiting the rowCount production. + ExitRowCount(c *RowCountContext) + + // ExitQueryTermDefault is called when exiting the queryTermDefault production. + ExitQueryTermDefault(c *QueryTermDefaultContext) + + // ExitSetOperation is called when exiting the setOperation production. + ExitSetOperation(c *SetOperationContext) + + // ExitQueryPrimaryDefault is called when exiting the queryPrimaryDefault production. + ExitQueryPrimaryDefault(c *QueryPrimaryDefaultContext) + + // ExitTable is called when exiting the table production. + ExitTable(c *TableContext) + + // ExitInlineTable is called when exiting the inlineTable production. + ExitInlineTable(c *InlineTableContext) + + // ExitSubquery is called when exiting the subquery production. + ExitSubquery(c *SubqueryContext) + + // ExitSortItem is called when exiting the sortItem production. + ExitSortItem(c *SortItemContext) + + // ExitQuerySpecification is called when exiting the querySpecification production. + ExitQuerySpecification(c *QuerySpecificationContext) + + // ExitGroupBy is called when exiting the groupBy production. + ExitGroupBy(c *GroupByContext) + + // ExitSingleGroupingSet is called when exiting the singleGroupingSet production. + ExitSingleGroupingSet(c *SingleGroupingSetContext) + + // ExitRollup is called when exiting the rollup production. + ExitRollup(c *RollupContext) + + // ExitCube is called when exiting the cube production. + ExitCube(c *CubeContext) + + // ExitMultipleGroupingSets is called when exiting the multipleGroupingSets production. + ExitMultipleGroupingSets(c *MultipleGroupingSetsContext) + + // ExitGroupingSet is called when exiting the groupingSet production. + ExitGroupingSet(c *GroupingSetContext) + + // ExitWindowDefinition is called when exiting the windowDefinition production. + ExitWindowDefinition(c *WindowDefinitionContext) + + // ExitWindowSpecification is called when exiting the windowSpecification production. + ExitWindowSpecification(c *WindowSpecificationContext) + + // ExitNamedQuery is called when exiting the namedQuery production. + ExitNamedQuery(c *NamedQueryContext) + + // ExitSetQuantifier is called when exiting the setQuantifier production. + ExitSetQuantifier(c *SetQuantifierContext) + + // ExitSelectSingle is called when exiting the selectSingle production. + ExitSelectSingle(c *SelectSingleContext) + + // ExitSelectAll is called when exiting the selectAll production. + ExitSelectAll(c *SelectAllContext) + + // ExitAs_column_alias is called when exiting the as_column_alias production. + ExitAs_column_alias(c *As_column_aliasContext) + + // ExitColumn_alias is called when exiting the column_alias production. + ExitColumn_alias(c *Column_aliasContext) + + // ExitRelationDefault is called when exiting the relationDefault production. + ExitRelationDefault(c *RelationDefaultContext) + + // ExitJoinRelation is called when exiting the joinRelation production. + ExitJoinRelation(c *JoinRelationContext) + + // ExitJoinType is called when exiting the joinType production. + ExitJoinType(c *JoinTypeContext) + + // ExitJoinCriteria is called when exiting the joinCriteria production. + ExitJoinCriteria(c *JoinCriteriaContext) + + // ExitSampledRelation is called when exiting the sampledRelation production. + ExitSampledRelation(c *SampledRelationContext) + + // ExitSampleType is called when exiting the sampleType production. + ExitSampleType(c *SampleTypeContext) + + // ExitTrimsSpecification is called when exiting the trimsSpecification production. + ExitTrimsSpecification(c *TrimsSpecificationContext) + + // ExitListAggOverflowBehavior is called when exiting the listAggOverflowBehavior production. + ExitListAggOverflowBehavior(c *ListAggOverflowBehaviorContext) + + // ExitListaggCountIndication is called when exiting the listaggCountIndication production. + ExitListaggCountIndication(c *ListaggCountIndicationContext) + + // ExitPatternRecognition is called when exiting the patternRecognition production. + ExitPatternRecognition(c *PatternRecognitionContext) + + // ExitMeasureDefinition is called when exiting the measureDefinition production. + ExitMeasureDefinition(c *MeasureDefinitionContext) + + // ExitRowsPerMatch is called when exiting the rowsPerMatch production. + ExitRowsPerMatch(c *RowsPerMatchContext) + + // ExitEmptyMatchHandling is called when exiting the emptyMatchHandling production. + ExitEmptyMatchHandling(c *EmptyMatchHandlingContext) + + // ExitSkipTo is called when exiting the skipTo production. + ExitSkipTo(c *SkipToContext) + + // ExitSubsetDefinition is called when exiting the subsetDefinition production. + ExitSubsetDefinition(c *SubsetDefinitionContext) + + // ExitVariableDefinition is called when exiting the variableDefinition production. + ExitVariableDefinition(c *VariableDefinitionContext) + + // ExitAliasedRelation is called when exiting the aliasedRelation production. + ExitAliasedRelation(c *AliasedRelationContext) + + // ExitColumnAliases is called when exiting the columnAliases production. + ExitColumnAliases(c *ColumnAliasesContext) + + // ExitTableName is called when exiting the tableName production. + ExitTableName(c *TableNameContext) + + // ExitSubqueryRelation is called when exiting the subqueryRelation production. + ExitSubqueryRelation(c *SubqueryRelationContext) + + // ExitUnnest is called when exiting the unnest production. + ExitUnnest(c *UnnestContext) + + // ExitLateral is called when exiting the lateral production. + ExitLateral(c *LateralContext) + + // ExitTableFunctionInvocation is called when exiting the tableFunctionInvocation production. + ExitTableFunctionInvocation(c *TableFunctionInvocationContext) + + // ExitParenthesizedRelation is called when exiting the parenthesizedRelation production. + ExitParenthesizedRelation(c *ParenthesizedRelationContext) + + // ExitTableFunctionCall is called when exiting the tableFunctionCall production. + ExitTableFunctionCall(c *TableFunctionCallContext) + + // ExitTableFunctionArgument is called when exiting the tableFunctionArgument production. + ExitTableFunctionArgument(c *TableFunctionArgumentContext) + + // ExitTableArgument is called when exiting the tableArgument production. + ExitTableArgument(c *TableArgumentContext) + + // ExitTableArgumentTable is called when exiting the tableArgumentTable production. + ExitTableArgumentTable(c *TableArgumentTableContext) + + // ExitTableArgumentQuery is called when exiting the tableArgumentQuery production. + ExitTableArgumentQuery(c *TableArgumentQueryContext) + + // ExitDescriptorArgument is called when exiting the descriptorArgument production. + ExitDescriptorArgument(c *DescriptorArgumentContext) + + // ExitDescriptorField is called when exiting the descriptorField production. + ExitDescriptorField(c *DescriptorFieldContext) + + // ExitCopartitionTables is called when exiting the copartitionTables production. + ExitCopartitionTables(c *CopartitionTablesContext) + + // ExitExpression is called when exiting the expression production. + ExitExpression(c *ExpressionContext) + + // ExitLogicalNot is called when exiting the logicalNot production. + ExitLogicalNot(c *LogicalNotContext) + + // ExitPredicated is called when exiting the predicated production. + ExitPredicated(c *PredicatedContext) + + // ExitOr is called when exiting the or production. + ExitOr(c *OrContext) + + // ExitAnd is called when exiting the and production. + ExitAnd(c *AndContext) + + // ExitComparison is called when exiting the comparison production. + ExitComparison(c *ComparisonContext) + + // ExitQuantifiedComparison is called when exiting the quantifiedComparison production. + ExitQuantifiedComparison(c *QuantifiedComparisonContext) + + // ExitBetween is called when exiting the between production. + ExitBetween(c *BetweenContext) + + // ExitInList is called when exiting the inList production. + ExitInList(c *InListContext) + + // ExitInSubquery is called when exiting the inSubquery production. + ExitInSubquery(c *InSubqueryContext) + + // ExitLike is called when exiting the like production. + ExitLike(c *LikeContext) + + // ExitNullPredicate is called when exiting the nullPredicate production. + ExitNullPredicate(c *NullPredicateContext) + + // ExitDistinctFrom is called when exiting the distinctFrom production. + ExitDistinctFrom(c *DistinctFromContext) + + // ExitValueExpressionDefault is called when exiting the valueExpressionDefault production. + ExitValueExpressionDefault(c *ValueExpressionDefaultContext) + + // ExitConcatenation is called when exiting the concatenation production. + ExitConcatenation(c *ConcatenationContext) + + // ExitArithmeticBinary is called when exiting the arithmeticBinary production. + ExitArithmeticBinary(c *ArithmeticBinaryContext) + + // ExitArithmeticUnary is called when exiting the arithmeticUnary production. + ExitArithmeticUnary(c *ArithmeticUnaryContext) + + // ExitAtTimeZone is called when exiting the atTimeZone production. + ExitAtTimeZone(c *AtTimeZoneContext) + + // ExitDereference is called when exiting the dereference production. + ExitDereference(c *DereferenceContext) + + // ExitTypeConstructor is called when exiting the typeConstructor production. + ExitTypeConstructor(c *TypeConstructorContext) + + // ExitJsonValue is called when exiting the jsonValue production. + ExitJsonValue(c *JsonValueContext) + + // ExitSpecialDateTimeFunction is called when exiting the specialDateTimeFunction production. + ExitSpecialDateTimeFunction(c *SpecialDateTimeFunctionContext) + + // ExitSubstring is called when exiting the substring production. + ExitSubstring(c *SubstringContext) + + // ExitCast is called when exiting the cast production. + ExitCast(c *CastContext) + + // ExitLambda is called when exiting the lambda production. + ExitLambda(c *LambdaContext) + + // ExitParenthesizedExpression is called when exiting the parenthesizedExpression production. + ExitParenthesizedExpression(c *ParenthesizedExpressionContext) + + // ExitTrim is called when exiting the trim production. + ExitTrim(c *TrimContext) + + // ExitParameter is called when exiting the parameter production. + ExitParameter(c *ParameterContext) + + // ExitNormalize is called when exiting the normalize production. + ExitNormalize(c *NormalizeContext) + + // ExitJsonObject is called when exiting the jsonObject production. + ExitJsonObject(c *JsonObjectContext) + + // ExitIntervalLiteral is called when exiting the intervalLiteral production. + ExitIntervalLiteral(c *IntervalLiteralContext) + + // ExitNumericLiteral is called when exiting the numericLiteral production. + ExitNumericLiteral(c *NumericLiteralContext) + + // ExitBooleanLiteral is called when exiting the booleanLiteral production. + ExitBooleanLiteral(c *BooleanLiteralContext) + + // ExitJsonArray is called when exiting the jsonArray production. + ExitJsonArray(c *JsonArrayContext) + + // ExitSimpleCase is called when exiting the simpleCase production. + ExitSimpleCase(c *SimpleCaseContext) + + // ExitColumnReference is called when exiting the columnReference production. + ExitColumnReference(c *ColumnReferenceContext) + + // ExitNullLiteral is called when exiting the nullLiteral production. + ExitNullLiteral(c *NullLiteralContext) + + // ExitRowConstructor is called when exiting the rowConstructor production. + ExitRowConstructor(c *RowConstructorContext) + + // ExitSubscript is called when exiting the subscript production. + ExitSubscript(c *SubscriptContext) + + // ExitJsonExists is called when exiting the jsonExists production. + ExitJsonExists(c *JsonExistsContext) + + // ExitCurrentPath is called when exiting the currentPath production. + ExitCurrentPath(c *CurrentPathContext) + + // ExitSubqueryExpression is called when exiting the subqueryExpression production. + ExitSubqueryExpression(c *SubqueryExpressionContext) + + // ExitBinaryLiteral is called when exiting the binaryLiteral production. + ExitBinaryLiteral(c *BinaryLiteralContext) + + // ExitCurrentUser is called when exiting the currentUser production. + ExitCurrentUser(c *CurrentUserContext) + + // ExitJsonQuery is called when exiting the jsonQuery production. + ExitJsonQuery(c *JsonQueryContext) + + // ExitMeasure is called when exiting the measure production. + ExitMeasure(c *MeasureContext) + + // ExitExtract is called when exiting the extract production. + ExitExtract(c *ExtractContext) + + // ExitStringLiteral is called when exiting the stringLiteral production. + ExitStringLiteral(c *StringLiteralContext) + + // ExitArrayConstructor is called when exiting the arrayConstructor production. + ExitArrayConstructor(c *ArrayConstructorContext) + + // ExitFunctionCall is called when exiting the functionCall production. + ExitFunctionCall(c *FunctionCallContext) + + // ExitCurrentSchema is called when exiting the currentSchema production. + ExitCurrentSchema(c *CurrentSchemaContext) + + // ExitExists is called when exiting the exists production. + ExitExists(c *ExistsContext) + + // ExitPosition is called when exiting the position production. + ExitPosition(c *PositionContext) + + // ExitListagg is called when exiting the listagg production. + ExitListagg(c *ListaggContext) + + // ExitSearchedCase is called when exiting the searchedCase production. + ExitSearchedCase(c *SearchedCaseContext) + + // ExitCurrentCatalog is called when exiting the currentCatalog production. + ExitCurrentCatalog(c *CurrentCatalogContext) + + // ExitGroupingOperation is called when exiting the groupingOperation production. + ExitGroupingOperation(c *GroupingOperationContext) + + // ExitJsonPathInvocation is called when exiting the jsonPathInvocation production. + ExitJsonPathInvocation(c *JsonPathInvocationContext) + + // ExitJsonValueExpression is called when exiting the jsonValueExpression production. + ExitJsonValueExpression(c *JsonValueExpressionContext) + + // ExitJsonRepresentation is called when exiting the jsonRepresentation production. + ExitJsonRepresentation(c *JsonRepresentationContext) + + // ExitJsonArgument is called when exiting the jsonArgument production. + ExitJsonArgument(c *JsonArgumentContext) + + // ExitJsonExistsErrorBehavior is called when exiting the jsonExistsErrorBehavior production. + ExitJsonExistsErrorBehavior(c *JsonExistsErrorBehaviorContext) + + // ExitJsonValueBehavior is called when exiting the jsonValueBehavior production. + ExitJsonValueBehavior(c *JsonValueBehaviorContext) + + // ExitJsonQueryWrapperBehavior is called when exiting the jsonQueryWrapperBehavior production. + ExitJsonQueryWrapperBehavior(c *JsonQueryWrapperBehaviorContext) + + // ExitJsonQueryBehavior is called when exiting the jsonQueryBehavior production. + ExitJsonQueryBehavior(c *JsonQueryBehaviorContext) + + // ExitJsonObjectMember is called when exiting the jsonObjectMember production. + ExitJsonObjectMember(c *JsonObjectMemberContext) + + // ExitProcessingMode is called when exiting the processingMode production. + ExitProcessingMode(c *ProcessingModeContext) + + // ExitNullTreatment is called when exiting the nullTreatment production. + ExitNullTreatment(c *NullTreatmentContext) + + // ExitBasicStringLiteral is called when exiting the basicStringLiteral production. + ExitBasicStringLiteral(c *BasicStringLiteralContext) + + // ExitUnicodeStringLiteral is called when exiting the unicodeStringLiteral production. + ExitUnicodeStringLiteral(c *UnicodeStringLiteralContext) + + // ExitTimeZoneInterval is called when exiting the timeZoneInterval production. + ExitTimeZoneInterval(c *TimeZoneIntervalContext) + + // ExitTimeZoneString is called when exiting the timeZoneString production. + ExitTimeZoneString(c *TimeZoneStringContext) + + // ExitComparisonOperator is called when exiting the comparisonOperator production. + ExitComparisonOperator(c *ComparisonOperatorContext) + + // ExitComparisonQuantifier is called when exiting the comparisonQuantifier production. + ExitComparisonQuantifier(c *ComparisonQuantifierContext) + + // ExitBooleanValue is called when exiting the booleanValue production. + ExitBooleanValue(c *BooleanValueContext) + + // ExitInterval is called when exiting the interval production. + ExitInterval(c *IntervalContext) + + // ExitIntervalField is called when exiting the intervalField production. + ExitIntervalField(c *IntervalFieldContext) + + // ExitNormalForm is called when exiting the normalForm production. + ExitNormalForm(c *NormalFormContext) + + // ExitRowType is called when exiting the rowType production. + ExitRowType(c *RowTypeContext) + + // ExitIntervalType is called when exiting the intervalType production. + ExitIntervalType(c *IntervalTypeContext) + + // ExitArrayType is called when exiting the arrayType production. + ExitArrayType(c *ArrayTypeContext) + + // ExitDoublePrecisionType is called when exiting the doublePrecisionType production. + ExitDoublePrecisionType(c *DoublePrecisionTypeContext) + + // ExitLegacyArrayType is called when exiting the legacyArrayType production. + ExitLegacyArrayType(c *LegacyArrayTypeContext) + + // ExitGenericType is called when exiting the genericType production. + ExitGenericType(c *GenericTypeContext) + + // ExitDateTimeType is called when exiting the dateTimeType production. + ExitDateTimeType(c *DateTimeTypeContext) + + // ExitLegacyMapType is called when exiting the legacyMapType production. + ExitLegacyMapType(c *LegacyMapTypeContext) + + // ExitRowField is called when exiting the rowField production. + ExitRowField(c *RowFieldContext) + + // ExitTypeParameter is called when exiting the typeParameter production. + ExitTypeParameter(c *TypeParameterContext) + + // ExitWhenClause is called when exiting the whenClause production. + ExitWhenClause(c *WhenClauseContext) + + // ExitFilter is called when exiting the filter production. + ExitFilter(c *FilterContext) + + // ExitMergeUpdate is called when exiting the mergeUpdate production. + ExitMergeUpdate(c *MergeUpdateContext) + + // ExitMergeDelete is called when exiting the mergeDelete production. + ExitMergeDelete(c *MergeDeleteContext) + + // ExitMergeInsert is called when exiting the mergeInsert production. + ExitMergeInsert(c *MergeInsertContext) + + // ExitOver is called when exiting the over production. + ExitOver(c *OverContext) + + // ExitWindowFrame is called when exiting the windowFrame production. + ExitWindowFrame(c *WindowFrameContext) + + // ExitFrameExtent is called when exiting the frameExtent production. + ExitFrameExtent(c *FrameExtentContext) + + // ExitUnboundedFrame is called when exiting the unboundedFrame production. + ExitUnboundedFrame(c *UnboundedFrameContext) + + // ExitCurrentRowBound is called when exiting the currentRowBound production. + ExitCurrentRowBound(c *CurrentRowBoundContext) + + // ExitBoundedFrame is called when exiting the boundedFrame production. + ExitBoundedFrame(c *BoundedFrameContext) + + // ExitQuantifiedPrimary is called when exiting the quantifiedPrimary production. + ExitQuantifiedPrimary(c *QuantifiedPrimaryContext) + + // ExitPatternConcatenation is called when exiting the patternConcatenation production. + ExitPatternConcatenation(c *PatternConcatenationContext) + + // ExitPatternAlternation is called when exiting the patternAlternation production. + ExitPatternAlternation(c *PatternAlternationContext) + + // ExitPatternVariable is called when exiting the patternVariable production. + ExitPatternVariable(c *PatternVariableContext) + + // ExitEmptyPattern is called when exiting the emptyPattern production. + ExitEmptyPattern(c *EmptyPatternContext) + + // ExitPatternPermutation is called when exiting the patternPermutation production. + ExitPatternPermutation(c *PatternPermutationContext) + + // ExitGroupedPattern is called when exiting the groupedPattern production. + ExitGroupedPattern(c *GroupedPatternContext) + + // ExitPartitionStartAnchor is called when exiting the partitionStartAnchor production. + ExitPartitionStartAnchor(c *PartitionStartAnchorContext) + + // ExitPartitionEndAnchor is called when exiting the partitionEndAnchor production. + ExitPartitionEndAnchor(c *PartitionEndAnchorContext) + + // ExitExcludedPattern is called when exiting the excludedPattern production. + ExitExcludedPattern(c *ExcludedPatternContext) + + // ExitZeroOrMoreQuantifier is called when exiting the zeroOrMoreQuantifier production. + ExitZeroOrMoreQuantifier(c *ZeroOrMoreQuantifierContext) + + // ExitOneOrMoreQuantifier is called when exiting the oneOrMoreQuantifier production. + ExitOneOrMoreQuantifier(c *OneOrMoreQuantifierContext) + + // ExitZeroOrOneQuantifier is called when exiting the zeroOrOneQuantifier production. + ExitZeroOrOneQuantifier(c *ZeroOrOneQuantifierContext) + + // ExitRangeQuantifier is called when exiting the rangeQuantifier production. + ExitRangeQuantifier(c *RangeQuantifierContext) + + // ExitUpdateAssignment is called when exiting the updateAssignment production. + ExitUpdateAssignment(c *UpdateAssignmentContext) + + // ExitExplainFormat is called when exiting the explainFormat production. + ExitExplainFormat(c *ExplainFormatContext) + + // ExitExplainType is called when exiting the explainType production. + ExitExplainType(c *ExplainTypeContext) + + // ExitIsolationLevel is called when exiting the isolationLevel production. + ExitIsolationLevel(c *IsolationLevelContext) + + // ExitTransactionAccessMode is called when exiting the transactionAccessMode production. + ExitTransactionAccessMode(c *TransactionAccessModeContext) + + // ExitReadUncommitted is called when exiting the readUncommitted production. + ExitReadUncommitted(c *ReadUncommittedContext) + + // ExitReadCommitted is called when exiting the readCommitted production. + ExitReadCommitted(c *ReadCommittedContext) + + // ExitRepeatableRead is called when exiting the repeatableRead production. + ExitRepeatableRead(c *RepeatableReadContext) + + // ExitSerializable is called when exiting the serializable production. + ExitSerializable(c *SerializableContext) + + // ExitPositionalArgument is called when exiting the positionalArgument production. + ExitPositionalArgument(c *PositionalArgumentContext) + + // ExitNamedArgument is called when exiting the namedArgument production. + ExitNamedArgument(c *NamedArgumentContext) + + // ExitQualifiedArgument is called when exiting the qualifiedArgument production. + ExitQualifiedArgument(c *QualifiedArgumentContext) + + // ExitUnqualifiedArgument is called when exiting the unqualifiedArgument production. + ExitUnqualifiedArgument(c *UnqualifiedArgumentContext) + + // ExitPathSpecification is called when exiting the pathSpecification production. + ExitPathSpecification(c *PathSpecificationContext) + + // ExitFunctionSpecification is called when exiting the functionSpecification production. + ExitFunctionSpecification(c *FunctionSpecificationContext) + + // ExitFunctionDeclaration is called when exiting the functionDeclaration production. + ExitFunctionDeclaration(c *FunctionDeclarationContext) + + // ExitParameterDeclaration is called when exiting the parameterDeclaration production. + ExitParameterDeclaration(c *ParameterDeclarationContext) + + // ExitReturnsClause is called when exiting the returnsClause production. + ExitReturnsClause(c *ReturnsClauseContext) + + // ExitLanguageCharacteristic is called when exiting the languageCharacteristic production. + ExitLanguageCharacteristic(c *LanguageCharacteristicContext) + + // ExitDeterministicCharacteristic is called when exiting the deterministicCharacteristic production. + ExitDeterministicCharacteristic(c *DeterministicCharacteristicContext) + + // ExitReturnsNullOnNullInputCharacteristic is called when exiting the returnsNullOnNullInputCharacteristic production. + ExitReturnsNullOnNullInputCharacteristic(c *ReturnsNullOnNullInputCharacteristicContext) + + // ExitCalledOnNullInputCharacteristic is called when exiting the calledOnNullInputCharacteristic production. + ExitCalledOnNullInputCharacteristic(c *CalledOnNullInputCharacteristicContext) + + // ExitSecurityCharacteristic is called when exiting the securityCharacteristic production. + ExitSecurityCharacteristic(c *SecurityCharacteristicContext) + + // ExitCommentCharacteristic is called when exiting the commentCharacteristic production. + ExitCommentCharacteristic(c *CommentCharacteristicContext) + + // ExitReturnStatement is called when exiting the returnStatement production. + ExitReturnStatement(c *ReturnStatementContext) + + // ExitAssignmentStatement is called when exiting the assignmentStatement production. + ExitAssignmentStatement(c *AssignmentStatementContext) + + // ExitSimpleCaseStatement is called when exiting the simpleCaseStatement production. + ExitSimpleCaseStatement(c *SimpleCaseStatementContext) + + // ExitSearchedCaseStatement is called when exiting the searchedCaseStatement production. + ExitSearchedCaseStatement(c *SearchedCaseStatementContext) + + // ExitIfStatement is called when exiting the ifStatement production. + ExitIfStatement(c *IfStatementContext) + + // ExitIterateStatement is called when exiting the iterateStatement production. + ExitIterateStatement(c *IterateStatementContext) + + // ExitLeaveStatement is called when exiting the leaveStatement production. + ExitLeaveStatement(c *LeaveStatementContext) + + // ExitCompoundStatement is called when exiting the compoundStatement production. + ExitCompoundStatement(c *CompoundStatementContext) + + // ExitLoopStatement is called when exiting the loopStatement production. + ExitLoopStatement(c *LoopStatementContext) + + // ExitWhileStatement is called when exiting the whileStatement production. + ExitWhileStatement(c *WhileStatementContext) + + // ExitRepeatStatement is called when exiting the repeatStatement production. + ExitRepeatStatement(c *RepeatStatementContext) + + // ExitCaseStatementWhenClause is called when exiting the caseStatementWhenClause production. + ExitCaseStatementWhenClause(c *CaseStatementWhenClauseContext) + + // ExitElseIfClause is called when exiting the elseIfClause production. + ExitElseIfClause(c *ElseIfClauseContext) + + // ExitElseClause is called when exiting the elseClause production. + ExitElseClause(c *ElseClauseContext) + + // ExitVariableDeclaration is called when exiting the variableDeclaration production. + ExitVariableDeclaration(c *VariableDeclarationContext) + + // ExitSqlStatementList is called when exiting the sqlStatementList production. + ExitSqlStatementList(c *SqlStatementListContext) + + // ExitPrivilege is called when exiting the privilege production. + ExitPrivilege(c *PrivilegeContext) + + // ExitQualifiedName is called when exiting the qualifiedName production. + ExitQualifiedName(c *QualifiedNameContext) + + // ExitQueryPeriod is called when exiting the queryPeriod production. + ExitQueryPeriod(c *QueryPeriodContext) + + // ExitRangeType is called when exiting the rangeType production. + ExitRangeType(c *RangeTypeContext) + + // ExitSpecifiedPrincipal is called when exiting the specifiedPrincipal production. + ExitSpecifiedPrincipal(c *SpecifiedPrincipalContext) + + // ExitCurrentUserGrantor is called when exiting the currentUserGrantor production. + ExitCurrentUserGrantor(c *CurrentUserGrantorContext) + + // ExitCurrentRoleGrantor is called when exiting the currentRoleGrantor production. + ExitCurrentRoleGrantor(c *CurrentRoleGrantorContext) + + // ExitUnspecifiedPrincipal is called when exiting the unspecifiedPrincipal production. + ExitUnspecifiedPrincipal(c *UnspecifiedPrincipalContext) + + // ExitUserPrincipal is called when exiting the userPrincipal production. + ExitUserPrincipal(c *UserPrincipalContext) + + // ExitRolePrincipal is called when exiting the rolePrincipal production. + ExitRolePrincipal(c *RolePrincipalContext) + + // ExitRoles is called when exiting the roles production. + ExitRoles(c *RolesContext) + + // ExitUnquotedIdentifier is called when exiting the unquotedIdentifier production. + ExitUnquotedIdentifier(c *UnquotedIdentifierContext) + + // ExitQuotedIdentifier is called when exiting the quotedIdentifier production. + ExitQuotedIdentifier(c *QuotedIdentifierContext) + + // ExitBackQuotedIdentifier is called when exiting the backQuotedIdentifier production. + ExitBackQuotedIdentifier(c *BackQuotedIdentifierContext) + + // ExitDigitIdentifier is called when exiting the digitIdentifier production. + ExitDigitIdentifier(c *DigitIdentifierContext) + + // ExitDecimalLiteral is called when exiting the decimalLiteral production. + ExitDecimalLiteral(c *DecimalLiteralContext) + + // ExitDoubleLiteral is called when exiting the doubleLiteral production. + ExitDoubleLiteral(c *DoubleLiteralContext) + + // ExitIntegerLiteral is called when exiting the integerLiteral production. + ExitIntegerLiteral(c *IntegerLiteralContext) + + // ExitIdentifierUser is called when exiting the identifierUser production. + ExitIdentifierUser(c *IdentifierUserContext) + + // ExitStringUser is called when exiting the stringUser production. + ExitStringUser(c *StringUserContext) + + // ExitNonReserved is called when exiting the nonReserved production. + ExitNonReserved(c *NonReservedContext) +} diff --git a/trino/trinoparser_visitor.go b/trino/trinoparser_visitor.go new file mode 100644 index 0000000..d67939b --- /dev/null +++ b/trino/trinoparser_visitor.go @@ -0,0 +1,1002 @@ +// Code generated from TrinoParser.g4 by ANTLR 4.13.2. DO NOT EDIT. + +package trino // TrinoParser +import "github.com/antlr4-go/antlr/v4" + +// A complete Visitor for a parse tree produced by TrinoParser. +type TrinoParserVisitor interface { + antlr.ParseTreeVisitor + + // Visit a parse tree produced by TrinoParser#parse. + VisitParse(ctx *ParseContext) interface{} + + // Visit a parse tree produced by TrinoParser#statements. + VisitStatements(ctx *StatementsContext) interface{} + + // Visit a parse tree produced by TrinoParser#singleStatement. + VisitSingleStatement(ctx *SingleStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#standaloneExpression. + VisitStandaloneExpression(ctx *StandaloneExpressionContext) interface{} + + // Visit a parse tree produced by TrinoParser#standalonePathSpecification. + VisitStandalonePathSpecification(ctx *StandalonePathSpecificationContext) interface{} + + // Visit a parse tree produced by TrinoParser#standaloneType. + VisitStandaloneType(ctx *StandaloneTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#standaloneRowPattern. + VisitStandaloneRowPattern(ctx *StandaloneRowPatternContext) interface{} + + // Visit a parse tree produced by TrinoParser#standaloneFunctionSpecification. + VisitStandaloneFunctionSpecification(ctx *StandaloneFunctionSpecificationContext) interface{} + + // Visit a parse tree produced by TrinoParser#statementDefault. + VisitStatementDefault(ctx *StatementDefaultContext) interface{} + + // Visit a parse tree produced by TrinoParser#use. + VisitUse(ctx *UseContext) interface{} + + // Visit a parse tree produced by TrinoParser#createCatalog. + VisitCreateCatalog(ctx *CreateCatalogContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropCatalog. + VisitDropCatalog(ctx *DropCatalogContext) interface{} + + // Visit a parse tree produced by TrinoParser#createSchema. + VisitCreateSchema(ctx *CreateSchemaContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropSchema. + VisitDropSchema(ctx *DropSchemaContext) interface{} + + // Visit a parse tree produced by TrinoParser#renameSchema. + VisitRenameSchema(ctx *RenameSchemaContext) interface{} + + // Visit a parse tree produced by TrinoParser#setSchemaAuthorization. + VisitSetSchemaAuthorization(ctx *SetSchemaAuthorizationContext) interface{} + + // Visit a parse tree produced by TrinoParser#createTableAsSelect. + VisitCreateTableAsSelect(ctx *CreateTableAsSelectContext) interface{} + + // Visit a parse tree produced by TrinoParser#createTable. + VisitCreateTable(ctx *CreateTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropTable. + VisitDropTable(ctx *DropTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#insertInto. + VisitInsertInto(ctx *InsertIntoContext) interface{} + + // Visit a parse tree produced by TrinoParser#delete. + VisitDelete(ctx *DeleteContext) interface{} + + // Visit a parse tree produced by TrinoParser#truncateTable. + VisitTruncateTable(ctx *TruncateTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#commentTable. + VisitCommentTable(ctx *CommentTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#commentView. + VisitCommentView(ctx *CommentViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#commentColumn. + VisitCommentColumn(ctx *CommentColumnContext) interface{} + + // Visit a parse tree produced by TrinoParser#renameTable. + VisitRenameTable(ctx *RenameTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#addColumn. + VisitAddColumn(ctx *AddColumnContext) interface{} + + // Visit a parse tree produced by TrinoParser#renameColumn. + VisitRenameColumn(ctx *RenameColumnContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropColumn. + VisitDropColumn(ctx *DropColumnContext) interface{} + + // Visit a parse tree produced by TrinoParser#setColumnType. + VisitSetColumnType(ctx *SetColumnTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#setTableAuthorization. + VisitSetTableAuthorization(ctx *SetTableAuthorizationContext) interface{} + + // Visit a parse tree produced by TrinoParser#setTableProperties. + VisitSetTableProperties(ctx *SetTablePropertiesContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableExecute. + VisitTableExecute(ctx *TableExecuteContext) interface{} + + // Visit a parse tree produced by TrinoParser#analyze. + VisitAnalyze(ctx *AnalyzeContext) interface{} + + // Visit a parse tree produced by TrinoParser#createMaterializedView. + VisitCreateMaterializedView(ctx *CreateMaterializedViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#createView. + VisitCreateView(ctx *CreateViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#refreshMaterializedView. + VisitRefreshMaterializedView(ctx *RefreshMaterializedViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropMaterializedView. + VisitDropMaterializedView(ctx *DropMaterializedViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#renameMaterializedView. + VisitRenameMaterializedView(ctx *RenameMaterializedViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#setMaterializedViewProperties. + VisitSetMaterializedViewProperties(ctx *SetMaterializedViewPropertiesContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropView. + VisitDropView(ctx *DropViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#renameView. + VisitRenameView(ctx *RenameViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#setViewAuthorization. + VisitSetViewAuthorization(ctx *SetViewAuthorizationContext) interface{} + + // Visit a parse tree produced by TrinoParser#call. + VisitCall(ctx *CallContext) interface{} + + // Visit a parse tree produced by TrinoParser#createFunction. + VisitCreateFunction(ctx *CreateFunctionContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropFunction. + VisitDropFunction(ctx *DropFunctionContext) interface{} + + // Visit a parse tree produced by TrinoParser#createRole. + VisitCreateRole(ctx *CreateRoleContext) interface{} + + // Visit a parse tree produced by TrinoParser#dropRole. + VisitDropRole(ctx *DropRoleContext) interface{} + + // Visit a parse tree produced by TrinoParser#grantRoles. + VisitGrantRoles(ctx *GrantRolesContext) interface{} + + // Visit a parse tree produced by TrinoParser#revokeRoles. + VisitRevokeRoles(ctx *RevokeRolesContext) interface{} + + // Visit a parse tree produced by TrinoParser#setRole. + VisitSetRole(ctx *SetRoleContext) interface{} + + // Visit a parse tree produced by TrinoParser#grant. + VisitGrant(ctx *GrantContext) interface{} + + // Visit a parse tree produced by TrinoParser#deny. + VisitDeny(ctx *DenyContext) interface{} + + // Visit a parse tree produced by TrinoParser#revoke. + VisitRevoke(ctx *RevokeContext) interface{} + + // Visit a parse tree produced by TrinoParser#showGrants. + VisitShowGrants(ctx *ShowGrantsContext) interface{} + + // Visit a parse tree produced by TrinoParser#explain. + VisitExplain(ctx *ExplainContext) interface{} + + // Visit a parse tree produced by TrinoParser#explainAnalyze. + VisitExplainAnalyze(ctx *ExplainAnalyzeContext) interface{} + + // Visit a parse tree produced by TrinoParser#showCreateTable. + VisitShowCreateTable(ctx *ShowCreateTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#showCreateSchema. + VisitShowCreateSchema(ctx *ShowCreateSchemaContext) interface{} + + // Visit a parse tree produced by TrinoParser#showCreateView. + VisitShowCreateView(ctx *ShowCreateViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#showCreateMaterializedView. + VisitShowCreateMaterializedView(ctx *ShowCreateMaterializedViewContext) interface{} + + // Visit a parse tree produced by TrinoParser#showTables. + VisitShowTables(ctx *ShowTablesContext) interface{} + + // Visit a parse tree produced by TrinoParser#showSchemas. + VisitShowSchemas(ctx *ShowSchemasContext) interface{} + + // Visit a parse tree produced by TrinoParser#showCatalogs. + VisitShowCatalogs(ctx *ShowCatalogsContext) interface{} + + // Visit a parse tree produced by TrinoParser#showColumns. + VisitShowColumns(ctx *ShowColumnsContext) interface{} + + // Visit a parse tree produced by TrinoParser#showStats. + VisitShowStats(ctx *ShowStatsContext) interface{} + + // Visit a parse tree produced by TrinoParser#showStatsForQuery. + VisitShowStatsForQuery(ctx *ShowStatsForQueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#showRoles. + VisitShowRoles(ctx *ShowRolesContext) interface{} + + // Visit a parse tree produced by TrinoParser#showRoleGrants. + VisitShowRoleGrants(ctx *ShowRoleGrantsContext) interface{} + + // Visit a parse tree produced by TrinoParser#showFunctions. + VisitShowFunctions(ctx *ShowFunctionsContext) interface{} + + // Visit a parse tree produced by TrinoParser#showSession. + VisitShowSession(ctx *ShowSessionContext) interface{} + + // Visit a parse tree produced by TrinoParser#setSessionAuthorization. + VisitSetSessionAuthorization(ctx *SetSessionAuthorizationContext) interface{} + + // Visit a parse tree produced by TrinoParser#resetSessionAuthorization. + VisitResetSessionAuthorization(ctx *ResetSessionAuthorizationContext) interface{} + + // Visit a parse tree produced by TrinoParser#setSession. + VisitSetSession(ctx *SetSessionContext) interface{} + + // Visit a parse tree produced by TrinoParser#resetSession. + VisitResetSession(ctx *ResetSessionContext) interface{} + + // Visit a parse tree produced by TrinoParser#startTransaction. + VisitStartTransaction(ctx *StartTransactionContext) interface{} + + // Visit a parse tree produced by TrinoParser#commit. + VisitCommit(ctx *CommitContext) interface{} + + // Visit a parse tree produced by TrinoParser#rollback. + VisitRollback(ctx *RollbackContext) interface{} + + // Visit a parse tree produced by TrinoParser#prepare. + VisitPrepare(ctx *PrepareContext) interface{} + + // Visit a parse tree produced by TrinoParser#deallocate. + VisitDeallocate(ctx *DeallocateContext) interface{} + + // Visit a parse tree produced by TrinoParser#execute. + VisitExecute(ctx *ExecuteContext) interface{} + + // Visit a parse tree produced by TrinoParser#executeImmediate. + VisitExecuteImmediate(ctx *ExecuteImmediateContext) interface{} + + // Visit a parse tree produced by TrinoParser#describeInput. + VisitDescribeInput(ctx *DescribeInputContext) interface{} + + // Visit a parse tree produced by TrinoParser#describeOutput. + VisitDescribeOutput(ctx *DescribeOutputContext) interface{} + + // Visit a parse tree produced by TrinoParser#setPath. + VisitSetPath(ctx *SetPathContext) interface{} + + // Visit a parse tree produced by TrinoParser#setTimeZone. + VisitSetTimeZone(ctx *SetTimeZoneContext) interface{} + + // Visit a parse tree produced by TrinoParser#update. + VisitUpdate(ctx *UpdateContext) interface{} + + // Visit a parse tree produced by TrinoParser#merge. + VisitMerge(ctx *MergeContext) interface{} + + // Visit a parse tree produced by TrinoParser#rootQuery. + VisitRootQuery(ctx *RootQueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#withFunction. + VisitWithFunction(ctx *WithFunctionContext) interface{} + + // Visit a parse tree produced by TrinoParser#query. + VisitQuery(ctx *QueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#with. + VisitWith(ctx *WithContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableElement. + VisitTableElement(ctx *TableElementContext) interface{} + + // Visit a parse tree produced by TrinoParser#columnDefinition. + VisitColumnDefinition(ctx *ColumnDefinitionContext) interface{} + + // Visit a parse tree produced by TrinoParser#likeClause. + VisitLikeClause(ctx *LikeClauseContext) interface{} + + // Visit a parse tree produced by TrinoParser#properties. + VisitProperties(ctx *PropertiesContext) interface{} + + // Visit a parse tree produced by TrinoParser#propertyAssignments. + VisitPropertyAssignments(ctx *PropertyAssignmentsContext) interface{} + + // Visit a parse tree produced by TrinoParser#property. + VisitProperty(ctx *PropertyContext) interface{} + + // Visit a parse tree produced by TrinoParser#defaultPropertyValue. + VisitDefaultPropertyValue(ctx *DefaultPropertyValueContext) interface{} + + // Visit a parse tree produced by TrinoParser#nonDefaultPropertyValue. + VisitNonDefaultPropertyValue(ctx *NonDefaultPropertyValueContext) interface{} + + // Visit a parse tree produced by TrinoParser#queryNoWith. + VisitQueryNoWith(ctx *QueryNoWithContext) interface{} + + // Visit a parse tree produced by TrinoParser#limitRowCount. + VisitLimitRowCount(ctx *LimitRowCountContext) interface{} + + // Visit a parse tree produced by TrinoParser#rowCount. + VisitRowCount(ctx *RowCountContext) interface{} + + // Visit a parse tree produced by TrinoParser#queryTermDefault. + VisitQueryTermDefault(ctx *QueryTermDefaultContext) interface{} + + // Visit a parse tree produced by TrinoParser#setOperation. + VisitSetOperation(ctx *SetOperationContext) interface{} + + // Visit a parse tree produced by TrinoParser#queryPrimaryDefault. + VisitQueryPrimaryDefault(ctx *QueryPrimaryDefaultContext) interface{} + + // Visit a parse tree produced by TrinoParser#table. + VisitTable(ctx *TableContext) interface{} + + // Visit a parse tree produced by TrinoParser#inlineTable. + VisitInlineTable(ctx *InlineTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#subquery. + VisitSubquery(ctx *SubqueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#sortItem. + VisitSortItem(ctx *SortItemContext) interface{} + + // Visit a parse tree produced by TrinoParser#querySpecification. + VisitQuerySpecification(ctx *QuerySpecificationContext) interface{} + + // Visit a parse tree produced by TrinoParser#groupBy. + VisitGroupBy(ctx *GroupByContext) interface{} + + // Visit a parse tree produced by TrinoParser#singleGroupingSet. + VisitSingleGroupingSet(ctx *SingleGroupingSetContext) interface{} + + // Visit a parse tree produced by TrinoParser#rollup. + VisitRollup(ctx *RollupContext) interface{} + + // Visit a parse tree produced by TrinoParser#cube. + VisitCube(ctx *CubeContext) interface{} + + // Visit a parse tree produced by TrinoParser#multipleGroupingSets. + VisitMultipleGroupingSets(ctx *MultipleGroupingSetsContext) interface{} + + // Visit a parse tree produced by TrinoParser#groupingSet. + VisitGroupingSet(ctx *GroupingSetContext) interface{} + + // Visit a parse tree produced by TrinoParser#windowDefinition. + VisitWindowDefinition(ctx *WindowDefinitionContext) interface{} + + // Visit a parse tree produced by TrinoParser#windowSpecification. + VisitWindowSpecification(ctx *WindowSpecificationContext) interface{} + + // Visit a parse tree produced by TrinoParser#namedQuery. + VisitNamedQuery(ctx *NamedQueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#setQuantifier. + VisitSetQuantifier(ctx *SetQuantifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#selectSingle. + VisitSelectSingle(ctx *SelectSingleContext) interface{} + + // Visit a parse tree produced by TrinoParser#selectAll. + VisitSelectAll(ctx *SelectAllContext) interface{} + + // Visit a parse tree produced by TrinoParser#as_column_alias. + VisitAs_column_alias(ctx *As_column_aliasContext) interface{} + + // Visit a parse tree produced by TrinoParser#column_alias. + VisitColumn_alias(ctx *Column_aliasContext) interface{} + + // Visit a parse tree produced by TrinoParser#relationDefault. + VisitRelationDefault(ctx *RelationDefaultContext) interface{} + + // Visit a parse tree produced by TrinoParser#joinRelation. + VisitJoinRelation(ctx *JoinRelationContext) interface{} + + // Visit a parse tree produced by TrinoParser#joinType. + VisitJoinType(ctx *JoinTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#joinCriteria. + VisitJoinCriteria(ctx *JoinCriteriaContext) interface{} + + // Visit a parse tree produced by TrinoParser#sampledRelation. + VisitSampledRelation(ctx *SampledRelationContext) interface{} + + // Visit a parse tree produced by TrinoParser#sampleType. + VisitSampleType(ctx *SampleTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#trimsSpecification. + VisitTrimsSpecification(ctx *TrimsSpecificationContext) interface{} + + // Visit a parse tree produced by TrinoParser#listAggOverflowBehavior. + VisitListAggOverflowBehavior(ctx *ListAggOverflowBehaviorContext) interface{} + + // Visit a parse tree produced by TrinoParser#listaggCountIndication. + VisitListaggCountIndication(ctx *ListaggCountIndicationContext) interface{} + + // Visit a parse tree produced by TrinoParser#patternRecognition. + VisitPatternRecognition(ctx *PatternRecognitionContext) interface{} + + // Visit a parse tree produced by TrinoParser#measureDefinition. + VisitMeasureDefinition(ctx *MeasureDefinitionContext) interface{} + + // Visit a parse tree produced by TrinoParser#rowsPerMatch. + VisitRowsPerMatch(ctx *RowsPerMatchContext) interface{} + + // Visit a parse tree produced by TrinoParser#emptyMatchHandling. + VisitEmptyMatchHandling(ctx *EmptyMatchHandlingContext) interface{} + + // Visit a parse tree produced by TrinoParser#skipTo. + VisitSkipTo(ctx *SkipToContext) interface{} + + // Visit a parse tree produced by TrinoParser#subsetDefinition. + VisitSubsetDefinition(ctx *SubsetDefinitionContext) interface{} + + // Visit a parse tree produced by TrinoParser#variableDefinition. + VisitVariableDefinition(ctx *VariableDefinitionContext) interface{} + + // Visit a parse tree produced by TrinoParser#aliasedRelation. + VisitAliasedRelation(ctx *AliasedRelationContext) interface{} + + // Visit a parse tree produced by TrinoParser#columnAliases. + VisitColumnAliases(ctx *ColumnAliasesContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableName. + VisitTableName(ctx *TableNameContext) interface{} + + // Visit a parse tree produced by TrinoParser#subqueryRelation. + VisitSubqueryRelation(ctx *SubqueryRelationContext) interface{} + + // Visit a parse tree produced by TrinoParser#unnest. + VisitUnnest(ctx *UnnestContext) interface{} + + // Visit a parse tree produced by TrinoParser#lateral. + VisitLateral(ctx *LateralContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableFunctionInvocation. + VisitTableFunctionInvocation(ctx *TableFunctionInvocationContext) interface{} + + // Visit a parse tree produced by TrinoParser#parenthesizedRelation. + VisitParenthesizedRelation(ctx *ParenthesizedRelationContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableFunctionCall. + VisitTableFunctionCall(ctx *TableFunctionCallContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableFunctionArgument. + VisitTableFunctionArgument(ctx *TableFunctionArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableArgument. + VisitTableArgument(ctx *TableArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableArgumentTable. + VisitTableArgumentTable(ctx *TableArgumentTableContext) interface{} + + // Visit a parse tree produced by TrinoParser#tableArgumentQuery. + VisitTableArgumentQuery(ctx *TableArgumentQueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#descriptorArgument. + VisitDescriptorArgument(ctx *DescriptorArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#descriptorField. + VisitDescriptorField(ctx *DescriptorFieldContext) interface{} + + // Visit a parse tree produced by TrinoParser#copartitionTables. + VisitCopartitionTables(ctx *CopartitionTablesContext) interface{} + + // Visit a parse tree produced by TrinoParser#expression. + VisitExpression(ctx *ExpressionContext) interface{} + + // Visit a parse tree produced by TrinoParser#logicalNot. + VisitLogicalNot(ctx *LogicalNotContext) interface{} + + // Visit a parse tree produced by TrinoParser#predicated. + VisitPredicated(ctx *PredicatedContext) interface{} + + // Visit a parse tree produced by TrinoParser#or. + VisitOr(ctx *OrContext) interface{} + + // Visit a parse tree produced by TrinoParser#and. + VisitAnd(ctx *AndContext) interface{} + + // Visit a parse tree produced by TrinoParser#comparison. + VisitComparison(ctx *ComparisonContext) interface{} + + // Visit a parse tree produced by TrinoParser#quantifiedComparison. + VisitQuantifiedComparison(ctx *QuantifiedComparisonContext) interface{} + + // Visit a parse tree produced by TrinoParser#between. + VisitBetween(ctx *BetweenContext) interface{} + + // Visit a parse tree produced by TrinoParser#inList. + VisitInList(ctx *InListContext) interface{} + + // Visit a parse tree produced by TrinoParser#inSubquery. + VisitInSubquery(ctx *InSubqueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#like. + VisitLike(ctx *LikeContext) interface{} + + // Visit a parse tree produced by TrinoParser#nullPredicate. + VisitNullPredicate(ctx *NullPredicateContext) interface{} + + // Visit a parse tree produced by TrinoParser#distinctFrom. + VisitDistinctFrom(ctx *DistinctFromContext) interface{} + + // Visit a parse tree produced by TrinoParser#valueExpressionDefault. + VisitValueExpressionDefault(ctx *ValueExpressionDefaultContext) interface{} + + // Visit a parse tree produced by TrinoParser#concatenation. + VisitConcatenation(ctx *ConcatenationContext) interface{} + + // Visit a parse tree produced by TrinoParser#arithmeticBinary. + VisitArithmeticBinary(ctx *ArithmeticBinaryContext) interface{} + + // Visit a parse tree produced by TrinoParser#arithmeticUnary. + VisitArithmeticUnary(ctx *ArithmeticUnaryContext) interface{} + + // Visit a parse tree produced by TrinoParser#atTimeZone. + VisitAtTimeZone(ctx *AtTimeZoneContext) interface{} + + // Visit a parse tree produced by TrinoParser#dereference. + VisitDereference(ctx *DereferenceContext) interface{} + + // Visit a parse tree produced by TrinoParser#typeConstructor. + VisitTypeConstructor(ctx *TypeConstructorContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonValue. + VisitJsonValue(ctx *JsonValueContext) interface{} + + // Visit a parse tree produced by TrinoParser#specialDateTimeFunction. + VisitSpecialDateTimeFunction(ctx *SpecialDateTimeFunctionContext) interface{} + + // Visit a parse tree produced by TrinoParser#substring. + VisitSubstring(ctx *SubstringContext) interface{} + + // Visit a parse tree produced by TrinoParser#cast. + VisitCast(ctx *CastContext) interface{} + + // Visit a parse tree produced by TrinoParser#lambda. + VisitLambda(ctx *LambdaContext) interface{} + + // Visit a parse tree produced by TrinoParser#parenthesizedExpression. + VisitParenthesizedExpression(ctx *ParenthesizedExpressionContext) interface{} + + // Visit a parse tree produced by TrinoParser#trim. + VisitTrim(ctx *TrimContext) interface{} + + // Visit a parse tree produced by TrinoParser#parameter. + VisitParameter(ctx *ParameterContext) interface{} + + // Visit a parse tree produced by TrinoParser#normalize. + VisitNormalize(ctx *NormalizeContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonObject. + VisitJsonObject(ctx *JsonObjectContext) interface{} + + // Visit a parse tree produced by TrinoParser#intervalLiteral. + VisitIntervalLiteral(ctx *IntervalLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#numericLiteral. + VisitNumericLiteral(ctx *NumericLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#booleanLiteral. + VisitBooleanLiteral(ctx *BooleanLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonArray. + VisitJsonArray(ctx *JsonArrayContext) interface{} + + // Visit a parse tree produced by TrinoParser#simpleCase. + VisitSimpleCase(ctx *SimpleCaseContext) interface{} + + // Visit a parse tree produced by TrinoParser#columnReference. + VisitColumnReference(ctx *ColumnReferenceContext) interface{} + + // Visit a parse tree produced by TrinoParser#nullLiteral. + VisitNullLiteral(ctx *NullLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#rowConstructor. + VisitRowConstructor(ctx *RowConstructorContext) interface{} + + // Visit a parse tree produced by TrinoParser#subscript. + VisitSubscript(ctx *SubscriptContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonExists. + VisitJsonExists(ctx *JsonExistsContext) interface{} + + // Visit a parse tree produced by TrinoParser#currentPath. + VisitCurrentPath(ctx *CurrentPathContext) interface{} + + // Visit a parse tree produced by TrinoParser#subqueryExpression. + VisitSubqueryExpression(ctx *SubqueryExpressionContext) interface{} + + // Visit a parse tree produced by TrinoParser#binaryLiteral. + VisitBinaryLiteral(ctx *BinaryLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#currentUser. + VisitCurrentUser(ctx *CurrentUserContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonQuery. + VisitJsonQuery(ctx *JsonQueryContext) interface{} + + // Visit a parse tree produced by TrinoParser#measure. + VisitMeasure(ctx *MeasureContext) interface{} + + // Visit a parse tree produced by TrinoParser#extract. + VisitExtract(ctx *ExtractContext) interface{} + + // Visit a parse tree produced by TrinoParser#stringLiteral. + VisitStringLiteral(ctx *StringLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#arrayConstructor. + VisitArrayConstructor(ctx *ArrayConstructorContext) interface{} + + // Visit a parse tree produced by TrinoParser#functionCall. + VisitFunctionCall(ctx *FunctionCallContext) interface{} + + // Visit a parse tree produced by TrinoParser#currentSchema. + VisitCurrentSchema(ctx *CurrentSchemaContext) interface{} + + // Visit a parse tree produced by TrinoParser#exists. + VisitExists(ctx *ExistsContext) interface{} + + // Visit a parse tree produced by TrinoParser#position. + VisitPosition(ctx *PositionContext) interface{} + + // Visit a parse tree produced by TrinoParser#listagg. + VisitListagg(ctx *ListaggContext) interface{} + + // Visit a parse tree produced by TrinoParser#searchedCase. + VisitSearchedCase(ctx *SearchedCaseContext) interface{} + + // Visit a parse tree produced by TrinoParser#currentCatalog. + VisitCurrentCatalog(ctx *CurrentCatalogContext) interface{} + + // Visit a parse tree produced by TrinoParser#groupingOperation. + VisitGroupingOperation(ctx *GroupingOperationContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonPathInvocation. + VisitJsonPathInvocation(ctx *JsonPathInvocationContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonValueExpression. + VisitJsonValueExpression(ctx *JsonValueExpressionContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonRepresentation. + VisitJsonRepresentation(ctx *JsonRepresentationContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonArgument. + VisitJsonArgument(ctx *JsonArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonExistsErrorBehavior. + VisitJsonExistsErrorBehavior(ctx *JsonExistsErrorBehaviorContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonValueBehavior. + VisitJsonValueBehavior(ctx *JsonValueBehaviorContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonQueryWrapperBehavior. + VisitJsonQueryWrapperBehavior(ctx *JsonQueryWrapperBehaviorContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonQueryBehavior. + VisitJsonQueryBehavior(ctx *JsonQueryBehaviorContext) interface{} + + // Visit a parse tree produced by TrinoParser#jsonObjectMember. + VisitJsonObjectMember(ctx *JsonObjectMemberContext) interface{} + + // Visit a parse tree produced by TrinoParser#processingMode. + VisitProcessingMode(ctx *ProcessingModeContext) interface{} + + // Visit a parse tree produced by TrinoParser#nullTreatment. + VisitNullTreatment(ctx *NullTreatmentContext) interface{} + + // Visit a parse tree produced by TrinoParser#basicStringLiteral. + VisitBasicStringLiteral(ctx *BasicStringLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#unicodeStringLiteral. + VisitUnicodeStringLiteral(ctx *UnicodeStringLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#timeZoneInterval. + VisitTimeZoneInterval(ctx *TimeZoneIntervalContext) interface{} + + // Visit a parse tree produced by TrinoParser#timeZoneString. + VisitTimeZoneString(ctx *TimeZoneStringContext) interface{} + + // Visit a parse tree produced by TrinoParser#comparisonOperator. + VisitComparisonOperator(ctx *ComparisonOperatorContext) interface{} + + // Visit a parse tree produced by TrinoParser#comparisonQuantifier. + VisitComparisonQuantifier(ctx *ComparisonQuantifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#booleanValue. + VisitBooleanValue(ctx *BooleanValueContext) interface{} + + // Visit a parse tree produced by TrinoParser#interval. + VisitInterval(ctx *IntervalContext) interface{} + + // Visit a parse tree produced by TrinoParser#intervalField. + VisitIntervalField(ctx *IntervalFieldContext) interface{} + + // Visit a parse tree produced by TrinoParser#normalForm. + VisitNormalForm(ctx *NormalFormContext) interface{} + + // Visit a parse tree produced by TrinoParser#rowType. + VisitRowType(ctx *RowTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#intervalType. + VisitIntervalType(ctx *IntervalTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#arrayType. + VisitArrayType(ctx *ArrayTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#doublePrecisionType. + VisitDoublePrecisionType(ctx *DoublePrecisionTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#legacyArrayType. + VisitLegacyArrayType(ctx *LegacyArrayTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#genericType. + VisitGenericType(ctx *GenericTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#dateTimeType. + VisitDateTimeType(ctx *DateTimeTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#legacyMapType. + VisitLegacyMapType(ctx *LegacyMapTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#rowField. + VisitRowField(ctx *RowFieldContext) interface{} + + // Visit a parse tree produced by TrinoParser#typeParameter. + VisitTypeParameter(ctx *TypeParameterContext) interface{} + + // Visit a parse tree produced by TrinoParser#whenClause. + VisitWhenClause(ctx *WhenClauseContext) interface{} + + // Visit a parse tree produced by TrinoParser#filter. + VisitFilter(ctx *FilterContext) interface{} + + // Visit a parse tree produced by TrinoParser#mergeUpdate. + VisitMergeUpdate(ctx *MergeUpdateContext) interface{} + + // Visit a parse tree produced by TrinoParser#mergeDelete. + VisitMergeDelete(ctx *MergeDeleteContext) interface{} + + // Visit a parse tree produced by TrinoParser#mergeInsert. + VisitMergeInsert(ctx *MergeInsertContext) interface{} + + // Visit a parse tree produced by TrinoParser#over. + VisitOver(ctx *OverContext) interface{} + + // Visit a parse tree produced by TrinoParser#windowFrame. + VisitWindowFrame(ctx *WindowFrameContext) interface{} + + // Visit a parse tree produced by TrinoParser#frameExtent. + VisitFrameExtent(ctx *FrameExtentContext) interface{} + + // Visit a parse tree produced by TrinoParser#unboundedFrame. + VisitUnboundedFrame(ctx *UnboundedFrameContext) interface{} + + // Visit a parse tree produced by TrinoParser#currentRowBound. + VisitCurrentRowBound(ctx *CurrentRowBoundContext) interface{} + + // Visit a parse tree produced by TrinoParser#boundedFrame. + VisitBoundedFrame(ctx *BoundedFrameContext) interface{} + + // Visit a parse tree produced by TrinoParser#quantifiedPrimary. + VisitQuantifiedPrimary(ctx *QuantifiedPrimaryContext) interface{} + + // Visit a parse tree produced by TrinoParser#patternConcatenation. + VisitPatternConcatenation(ctx *PatternConcatenationContext) interface{} + + // Visit a parse tree produced by TrinoParser#patternAlternation. + VisitPatternAlternation(ctx *PatternAlternationContext) interface{} + + // Visit a parse tree produced by TrinoParser#patternVariable. + VisitPatternVariable(ctx *PatternVariableContext) interface{} + + // Visit a parse tree produced by TrinoParser#emptyPattern. + VisitEmptyPattern(ctx *EmptyPatternContext) interface{} + + // Visit a parse tree produced by TrinoParser#patternPermutation. + VisitPatternPermutation(ctx *PatternPermutationContext) interface{} + + // Visit a parse tree produced by TrinoParser#groupedPattern. + VisitGroupedPattern(ctx *GroupedPatternContext) interface{} + + // Visit a parse tree produced by TrinoParser#partitionStartAnchor. + VisitPartitionStartAnchor(ctx *PartitionStartAnchorContext) interface{} + + // Visit a parse tree produced by TrinoParser#partitionEndAnchor. + VisitPartitionEndAnchor(ctx *PartitionEndAnchorContext) interface{} + + // Visit a parse tree produced by TrinoParser#excludedPattern. + VisitExcludedPattern(ctx *ExcludedPatternContext) interface{} + + // Visit a parse tree produced by TrinoParser#zeroOrMoreQuantifier. + VisitZeroOrMoreQuantifier(ctx *ZeroOrMoreQuantifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#oneOrMoreQuantifier. + VisitOneOrMoreQuantifier(ctx *OneOrMoreQuantifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#zeroOrOneQuantifier. + VisitZeroOrOneQuantifier(ctx *ZeroOrOneQuantifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#rangeQuantifier. + VisitRangeQuantifier(ctx *RangeQuantifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#updateAssignment. + VisitUpdateAssignment(ctx *UpdateAssignmentContext) interface{} + + // Visit a parse tree produced by TrinoParser#explainFormat. + VisitExplainFormat(ctx *ExplainFormatContext) interface{} + + // Visit a parse tree produced by TrinoParser#explainType. + VisitExplainType(ctx *ExplainTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#isolationLevel. + VisitIsolationLevel(ctx *IsolationLevelContext) interface{} + + // Visit a parse tree produced by TrinoParser#transactionAccessMode. + VisitTransactionAccessMode(ctx *TransactionAccessModeContext) interface{} + + // Visit a parse tree produced by TrinoParser#readUncommitted. + VisitReadUncommitted(ctx *ReadUncommittedContext) interface{} + + // Visit a parse tree produced by TrinoParser#readCommitted. + VisitReadCommitted(ctx *ReadCommittedContext) interface{} + + // Visit a parse tree produced by TrinoParser#repeatableRead. + VisitRepeatableRead(ctx *RepeatableReadContext) interface{} + + // Visit a parse tree produced by TrinoParser#serializable. + VisitSerializable(ctx *SerializableContext) interface{} + + // Visit a parse tree produced by TrinoParser#positionalArgument. + VisitPositionalArgument(ctx *PositionalArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#namedArgument. + VisitNamedArgument(ctx *NamedArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#qualifiedArgument. + VisitQualifiedArgument(ctx *QualifiedArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#unqualifiedArgument. + VisitUnqualifiedArgument(ctx *UnqualifiedArgumentContext) interface{} + + // Visit a parse tree produced by TrinoParser#pathSpecification. + VisitPathSpecification(ctx *PathSpecificationContext) interface{} + + // Visit a parse tree produced by TrinoParser#functionSpecification. + VisitFunctionSpecification(ctx *FunctionSpecificationContext) interface{} + + // Visit a parse tree produced by TrinoParser#functionDeclaration. + VisitFunctionDeclaration(ctx *FunctionDeclarationContext) interface{} + + // Visit a parse tree produced by TrinoParser#parameterDeclaration. + VisitParameterDeclaration(ctx *ParameterDeclarationContext) interface{} + + // Visit a parse tree produced by TrinoParser#returnsClause. + VisitReturnsClause(ctx *ReturnsClauseContext) interface{} + + // Visit a parse tree produced by TrinoParser#languageCharacteristic. + VisitLanguageCharacteristic(ctx *LanguageCharacteristicContext) interface{} + + // Visit a parse tree produced by TrinoParser#deterministicCharacteristic. + VisitDeterministicCharacteristic(ctx *DeterministicCharacteristicContext) interface{} + + // Visit a parse tree produced by TrinoParser#returnsNullOnNullInputCharacteristic. + VisitReturnsNullOnNullInputCharacteristic(ctx *ReturnsNullOnNullInputCharacteristicContext) interface{} + + // Visit a parse tree produced by TrinoParser#calledOnNullInputCharacteristic. + VisitCalledOnNullInputCharacteristic(ctx *CalledOnNullInputCharacteristicContext) interface{} + + // Visit a parse tree produced by TrinoParser#securityCharacteristic. + VisitSecurityCharacteristic(ctx *SecurityCharacteristicContext) interface{} + + // Visit a parse tree produced by TrinoParser#commentCharacteristic. + VisitCommentCharacteristic(ctx *CommentCharacteristicContext) interface{} + + // Visit a parse tree produced by TrinoParser#returnStatement. + VisitReturnStatement(ctx *ReturnStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#assignmentStatement. + VisitAssignmentStatement(ctx *AssignmentStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#simpleCaseStatement. + VisitSimpleCaseStatement(ctx *SimpleCaseStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#searchedCaseStatement. + VisitSearchedCaseStatement(ctx *SearchedCaseStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#ifStatement. + VisitIfStatement(ctx *IfStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#iterateStatement. + VisitIterateStatement(ctx *IterateStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#leaveStatement. + VisitLeaveStatement(ctx *LeaveStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#compoundStatement. + VisitCompoundStatement(ctx *CompoundStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#loopStatement. + VisitLoopStatement(ctx *LoopStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#whileStatement. + VisitWhileStatement(ctx *WhileStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#repeatStatement. + VisitRepeatStatement(ctx *RepeatStatementContext) interface{} + + // Visit a parse tree produced by TrinoParser#caseStatementWhenClause. + VisitCaseStatementWhenClause(ctx *CaseStatementWhenClauseContext) interface{} + + // Visit a parse tree produced by TrinoParser#elseIfClause. + VisitElseIfClause(ctx *ElseIfClauseContext) interface{} + + // Visit a parse tree produced by TrinoParser#elseClause. + VisitElseClause(ctx *ElseClauseContext) interface{} + + // Visit a parse tree produced by TrinoParser#variableDeclaration. + VisitVariableDeclaration(ctx *VariableDeclarationContext) interface{} + + // Visit a parse tree produced by TrinoParser#sqlStatementList. + VisitSqlStatementList(ctx *SqlStatementListContext) interface{} + + // Visit a parse tree produced by TrinoParser#privilege. + VisitPrivilege(ctx *PrivilegeContext) interface{} + + // Visit a parse tree produced by TrinoParser#qualifiedName. + VisitQualifiedName(ctx *QualifiedNameContext) interface{} + + // Visit a parse tree produced by TrinoParser#queryPeriod. + VisitQueryPeriod(ctx *QueryPeriodContext) interface{} + + // Visit a parse tree produced by TrinoParser#rangeType. + VisitRangeType(ctx *RangeTypeContext) interface{} + + // Visit a parse tree produced by TrinoParser#specifiedPrincipal. + VisitSpecifiedPrincipal(ctx *SpecifiedPrincipalContext) interface{} + + // Visit a parse tree produced by TrinoParser#currentUserGrantor. + VisitCurrentUserGrantor(ctx *CurrentUserGrantorContext) interface{} + + // Visit a parse tree produced by TrinoParser#currentRoleGrantor. + VisitCurrentRoleGrantor(ctx *CurrentRoleGrantorContext) interface{} + + // Visit a parse tree produced by TrinoParser#unspecifiedPrincipal. + VisitUnspecifiedPrincipal(ctx *UnspecifiedPrincipalContext) interface{} + + // Visit a parse tree produced by TrinoParser#userPrincipal. + VisitUserPrincipal(ctx *UserPrincipalContext) interface{} + + // Visit a parse tree produced by TrinoParser#rolePrincipal. + VisitRolePrincipal(ctx *RolePrincipalContext) interface{} + + // Visit a parse tree produced by TrinoParser#roles. + VisitRoles(ctx *RolesContext) interface{} + + // Visit a parse tree produced by TrinoParser#unquotedIdentifier. + VisitUnquotedIdentifier(ctx *UnquotedIdentifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#quotedIdentifier. + VisitQuotedIdentifier(ctx *QuotedIdentifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#backQuotedIdentifier. + VisitBackQuotedIdentifier(ctx *BackQuotedIdentifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#digitIdentifier. + VisitDigitIdentifier(ctx *DigitIdentifierContext) interface{} + + // Visit a parse tree produced by TrinoParser#decimalLiteral. + VisitDecimalLiteral(ctx *DecimalLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#doubleLiteral. + VisitDoubleLiteral(ctx *DoubleLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#integerLiteral. + VisitIntegerLiteral(ctx *IntegerLiteralContext) interface{} + + // Visit a parse tree produced by TrinoParser#identifierUser. + VisitIdentifierUser(ctx *IdentifierUserContext) interface{} + + // Visit a parse tree produced by TrinoParser#stringUser. + VisitStringUser(ctx *StringUserContext) interface{} + + // Visit a parse tree produced by TrinoParser#nonReserved. + VisitNonReserved(ctx *NonReservedContext) interface{} +}