org.apache.hive.hplsql.HplsqlParser Maven / Gradle / Ivy
The newest version!
// Generated from org/apache/hive/hplsql/Hplsql.g4 by ANTLR 4.9.3
package org.apache.hive.hplsql;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class HplsqlParser extends Parser {
static { RuntimeMetaData.checkVersion("4.9.3", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T_ACTION=5, T_ADD2=6, T_ALL=7, T_ALLOCATE=8,
T_ALTER=9, T_AND=10, T_ANSI_NULLS=11, T_ANSI_PADDING=12, T_AS=13, T_ASC=14,
T_ASSOCIATE=15, T_AT=16, T_AUTO_INCREMENT=17, T_AVG=18, T_BATCHSIZE=19,
T_BEGIN=20, T_BETWEEN=21, T_BIGINT=22, T_BINARY_DOUBLE=23, T_BINARY_FLOAT=24,
T_BINARY_INTEGER=25, T_BIT=26, T_BODY=27, T_BREAK=28, T_BULK=29, T_BY=30,
T_BYTE=31, T_CALL=32, T_CALLER=33, T_CASCADE=34, T_CASE=35, T_CASESPECIFIC=36,
T_CAST=37, T_CHAR=38, T_CHARACTER=39, T_CHARSET=40, T_CLIENT=41, T_CLOSE=42,
T_CLUSTERED=43, T_CMP=44, T_COLLECT=45, T_COLLECTION=46, T_COLUMN=47,
T_COMMENT=48, T_CONSTANT=49, T_COMMIT=50, T_COMPRESS=51, T_CONCAT=52,
T_CONDITION=53, T_CONSTRAINT=54, T_CONTINUE=55, T_COPY=56, T_COUNT=57,
T_COUNT_BIG=58, T_CREATE=59, T_CREATION=60, T_CREATOR=61, T_CS=62, T_CURRENT=63,
T_CURRENT_SCHEMA=64, T_CURSOR=65, T_DATABASE=66, T_DATA=67, T_DATE=68,
T_DATETIME=69, T_DAY=70, T_DAYS=71, T_DEC=72, T_DECIMAL=73, T_DECLARE=74,
T_DEFAULT=75, T_DEFERRED=76, T_DEFINED=77, T_DEFINER=78, T_DEFINITION=79,
T_DELETE=80, T_DELIMITED=81, T_DELIMITER=82, T_DESC=83, T_DESCRIBE=84,
T_DIAGNOSTICS=85, T_DIR=86, T_DIRECTORY=87, T_DISTINCT=88, T_DISTRIBUTE=89,
T_DO=90, T_DOUBLE=91, T_DROP=92, T_DYNAMIC=93, T_ELSE=94, T_ELSEIF=95,
T_ELSIF=96, T_ENABLE=97, T_END=98, T_ENGINE=99, T_ESCAPED=100, T_EXCEPT=101,
T_EXEC=102, T_EXECUTE=103, T_EXCEPTION=104, T_EXCLUSIVE=105, T_EXISTS=106,
T_EXIT=107, T_FALLBACK=108, T_FALSE=109, T_FETCH=110, T_FIELDS=111, T_FILE=112,
T_FILES=113, T_FLOAT=114, T_FOR=115, T_FOREIGN=116, T_FORMAT=117, T_FOUND=118,
T_FROM=119, T_FULL=120, T_FUNCTION=121, T_GET=122, T_GLOBAL=123, T_GO=124,
T_GRANT=125, T_GROUP=126, T_HANDLER=127, T_HASH=128, T_HAVING=129, T_HDFS=130,
T_HIVE=131, T_HOST=132, T_IDENTITY=133, T_IF=134, T_IGNORE=135, T_IMMEDIATE=136,
T_IN=137, T_INCLUDE=138, T_INDEX=139, T_INITRANS=140, T_INNER=141, T_INOUT=142,
T_INSERT=143, T_INT=144, T_INT2=145, T_INT4=146, T_INT8=147, T_INTEGER=148,
T_INTERSECT=149, T_INTERVAL=150, T_INTO=151, T_INVOKER=152, T_IS=153,
T_ISOPEN=154, T_ITEMS=155, T_JOIN=156, T_KEEP=157, T_KEY=158, T_KEYS=159,
T_LANGUAGE=160, T_LEAVE=161, T_LEFT=162, T_LIKE=163, T_LIMIT=164, T_LINES=165,
T_LOCAL=166, T_LOCATION=167, T_LOCATOR=168, T_LOCATORS=169, T_LOCKS=170,
T_LOG=171, T_LOGGED=172, T_LOGGING=173, T_LOOP=174, T_MAP=175, T_MATCHED=176,
T_MAX=177, T_MAXTRANS=178, T_MERGE=179, T_MESSAGE_TEXT=180, T_MICROSECOND=181,
T_MICROSECONDS=182, T_MILLIS=183, T_MIN=184, T_MULTISET=185, T_NCHAR=186,
T_NEW=187, T_NVARCHAR=188, T_NO=189, T_NOCOUNT=190, T_NOCOMPRESS=191,
T_NOLOGGING=192, T_NONE=193, T_NOT=194, T_NOTFOUND=195, T_NULL=196, T_NUMERIC=197,
T_NUMBER=198, T_OBJECT=199, T_OFF=200, T_OF=201, T_ON=202, T_ONLY=203,
T_OPEN=204, T_OR=205, T_ORDER=206, T_OUT=207, T_OUTER=208, T_OVER=209,
T_OVERWRITE=210, T_OWNER=211, T_PACKAGE=212, T_PARTITION=213, T_PCTFREE=214,
T_PCTUSED=215, T_PLS_INTEGER=216, T_PRECISION=217, T_PRESERVE=218, T_PRIMARY=219,
T_PRINT=220, T_PROC=221, T_PROCEDURE=222, T_QUALIFY=223, T_QUERY_BAND=224,
T_QUIT=225, T_QUOTED_IDENTIFIER=226, T_RAISE=227, T_REAL=228, T_REFERENCES=229,
T_REGEXP=230, T_REPLACE=231, T_RESIGNAL=232, T_RESTRICT=233, T_RESULT=234,
T_RESULT_SET_LOCATOR=235, T_RETURN=236, T_RETURNS=237, T_REVERSE=238,
T_RIGHT=239, T_RLIKE=240, T_ROLE=241, T_ROLLBACK=242, T_ROW=243, T_ROWS=244,
T_ROWTYPE=245, T_ROW_COUNT=246, T_RR=247, T_RS=248, T_PWD=249, T_TRIM=250,
T_SCHEMA=251, T_SECOND=252, T_SECONDS=253, T_SECURITY=254, T_SEGMENT=255,
T_SEL=256, T_SELECT=257, T_SET=258, T_SESSION=259, T_SESSIONS=260, T_SETS=261,
T_SHARE=262, T_SIGNAL=263, T_SIMPLE_DOUBLE=264, T_SIMPLE_FLOAT=265, T_SIMPLE_INTEGER=266,
T_SMALLDATETIME=267, T_SMALLINT=268, T_SQL=269, T_SQLEXCEPTION=270, T_SQLINSERT=271,
T_SQLSTATE=272, T_SQLWARNING=273, T_STATS=274, T_STATISTICS=275, T_STEP=276,
T_STORAGE=277, T_STORED=278, T_STRING=279, T_SUBDIR=280, T_SUBSTRING=281,
T_SUM=282, T_SUMMARY=283, T_SYS_REFCURSOR=284, T_TABLE=285, T_TABLESPACE=286,
T_TEMPORARY=287, T_TERMINATED=288, T_TEXTIMAGE_ON=289, T_THEN=290, T_TIME=291,
T_TIMESTAMP=292, T_TINYINT=293, T_TITLE=294, T_TO=295, T_TOP=296, T_TRANSACTION=297,
T_TRUE=298, T_TRUNCATE=299, T_TYPE=300, T_UNION=301, T_UNIQUE=302, T_UPDATE=303,
T_UR=304, T_USE=305, T_USING=306, T_VALUE=307, T_VALUES=308, T_VAR=309,
T_VARCHAR=310, T_VARCHAR2=311, T_VARYING=312, T_VOLATILE=313, T_WHEN=314,
T_WHERE=315, T_WHILE=316, T_WITH=317, T_WITHOUT=318, T_WORK=319, T_XACT_ABORT=320,
T_XML=321, T_YES=322, T_ACTIVITY_COUNT=323, T_CUME_DIST=324, T_CURRENT_DATE=325,
T_CURRENT_TIME_MILLIS=326, T_CURRENT_TIMESTAMP=327, T_CURRENT_USER=328,
T_DENSE_RANK=329, T_FIRST_VALUE=330, T_LAG=331, T_LAST_VALUE=332, T_LEAD=333,
T_MAX_PART_STRING=334, T_MIN_PART_STRING=335, T_MAX_PART_INT=336, T_MIN_PART_INT=337,
T_MAX_PART_DATE=338, T_MIN_PART_DATE=339, T_PART_COUNT=340, T_PART_LOC=341,
T_RANK=342, T_ROW_NUMBER=343, T_STDEV=344, T_SYSDATE=345, T_VARIANCE=346,
T_USER=347, T_ADD=348, T_COLON=349, T_COMMA=350, T_PIPE=351, T_DIV=352,
T_DOT=353, T_DOT2=354, T_EQUAL=355, T_EQUAL2=356, T_NOTEQUAL=357, T_NOTEQUAL2=358,
T_GREATER=359, T_GREATEREQUAL=360, T_LESS=361, T_LESSEQUAL=362, T_MUL=363,
T_OPEN_B=364, T_OPEN_P=365, T_OPEN_SB=366, T_CLOSE_B=367, T_CLOSE_P=368,
T_CLOSE_SB=369, T_SEMICOLON=370, T_SUB=371, L_ID=372, L_S_STRING=373,
L_D_STRING=374, L_INT=375, L_DEC=376, L_WS=377, L_M_COMMENT=378, L_S_COMMENT=379,
L_FILE=380, L_LABEL=381;
public static final int
RULE_program = 0, RULE_block = 1, RULE_begin_end_block = 2, RULE_single_block_stmt = 3,
RULE_block_end = 4, RULE_proc_block = 5, RULE_stmt = 6, RULE_semicolon_stmt = 7,
RULE_exception_block = 8, RULE_exception_block_item = 9, RULE_null_stmt = 10,
RULE_expr_stmt = 11, RULE_assignment_stmt = 12, RULE_assignment_stmt_item = 13,
RULE_assignment_stmt_single_item = 14, RULE_assignment_stmt_collection_item = 15,
RULE_assignment_stmt_multiple_item = 16, RULE_assignment_stmt_select_item = 17,
RULE_allocate_cursor_stmt = 18, RULE_associate_locator_stmt = 19, RULE_begin_transaction_stmt = 20,
RULE_break_stmt = 21, RULE_call_stmt = 22, RULE_declare_stmt = 23, RULE_declare_block = 24,
RULE_declare_block_inplace = 25, RULE_declare_stmt_item = 26, RULE_declare_var_item = 27,
RULE_declare_condition_item = 28, RULE_declare_cursor_item = 29, RULE_cursor_with_return = 30,
RULE_cursor_without_return = 31, RULE_declare_handler_item = 32, RULE_declare_temporary_table_item = 33,
RULE_create_table_stmt = 34, RULE_create_local_temp_table_stmt = 35, RULE_create_table_definition = 36,
RULE_create_table_columns = 37, RULE_create_table_columns_item = 38, RULE_create_table_type_stmt = 39,
RULE_tbl_type = 40, RULE_sql_type = 41, RULE_column_name = 42, RULE_create_table_column_inline_cons = 43,
RULE_create_table_column_cons = 44, RULE_create_table_fk_action = 45,
RULE_create_table_preoptions = 46, RULE_create_table_preoptions_item = 47,
RULE_create_table_preoptions_td_item = 48, RULE_create_table_options = 49,
RULE_create_table_options_item = 50, RULE_create_table_options_ora_item = 51,
RULE_create_table_options_db2_item = 52, RULE_create_table_options_td_item = 53,
RULE_create_table_options_hive_item = 54, RULE_create_table_hive_row_format = 55,
RULE_create_table_hive_row_format_fields = 56, RULE_create_table_options_mssql_item = 57,
RULE_create_table_options_mysql_item = 58, RULE_alter_table_stmt = 59,
RULE_alter_table_item = 60, RULE_alter_table_add_constraint = 61, RULE_alter_table_add_constraint_item = 62,
RULE_dtype = 63, RULE_dtype_len = 64, RULE_dtype_attr = 65, RULE_dtype_default = 66,
RULE_create_database_stmt = 67, RULE_create_database_option = 68, RULE_create_function_stmt = 69,
RULE_create_function_return = 70, RULE_create_package_stmt = 71, RULE_package_spec = 72,
RULE_package_spec_item = 73, RULE_create_package_body_stmt = 74, RULE_package_body = 75,
RULE_package_body_item = 76, RULE_create_procedure_stmt = 77, RULE_create_routine_params = 78,
RULE_create_routine_param_item = 79, RULE_create_routine_options = 80,
RULE_create_routine_option = 81, RULE_drop_stmt = 82, RULE_end_transaction_stmt = 83,
RULE_exec_stmt = 84, RULE_if_stmt = 85, RULE_if_plsql_stmt = 86, RULE_if_tsql_stmt = 87,
RULE_if_bteq_stmt = 88, RULE_elseif_block = 89, RULE_else_block = 90,
RULE_include_stmt = 91, RULE_insert_stmt = 92, RULE_insert_stmt_cols = 93,
RULE_insert_stmt_rows = 94, RULE_insert_stmt_row = 95, RULE_insert_directory_stmt = 96,
RULE_exit_stmt = 97, RULE_get_diag_stmt = 98, RULE_get_diag_stmt_item = 99,
RULE_get_diag_stmt_exception_item = 100, RULE_get_diag_stmt_rowcount_item = 101,
RULE_grant_stmt = 102, RULE_grant_stmt_item = 103, RULE_leave_stmt = 104,
RULE_map_object_stmt = 105, RULE_open_stmt = 106, RULE_fetch_stmt = 107,
RULE_fetch_limit = 108, RULE_collect_stats_stmt = 109, RULE_collect_stats_clause = 110,
RULE_close_stmt = 111, RULE_cmp_stmt = 112, RULE_cmp_source = 113, RULE_copy_from_local_stmt = 114,
RULE_copy_stmt = 115, RULE_copy_source = 116, RULE_copy_target = 117,
RULE_copy_option = 118, RULE_copy_file_option = 119, RULE_commit_stmt = 120,
RULE_create_index_stmt = 121, RULE_create_index_col = 122, RULE_index_storage_clause = 123,
RULE_index_mssql_storage_clause = 124, RULE_print_stmt = 125, RULE_quit_stmt = 126,
RULE_raise_stmt = 127, RULE_resignal_stmt = 128, RULE_return_stmt = 129,
RULE_rollback_stmt = 130, RULE_set_session_option = 131, RULE_set_current_schema_option = 132,
RULE_set_mssql_session_option = 133, RULE_set_teradata_session_option = 134,
RULE_signal_stmt = 135, RULE_summary_stmt = 136, RULE_truncate_stmt = 137,
RULE_use_stmt = 138, RULE_values_into_stmt = 139, RULE_while_stmt = 140,
RULE_unconditional_loop_stmt = 141, RULE_for_cursor_stmt = 142, RULE_for_range_stmt = 143,
RULE_label = 144, RULE_using_clause = 145, RULE_select_stmt = 146, RULE_cte_select_stmt = 147,
RULE_cte_select_stmt_item = 148, RULE_cte_select_cols = 149, RULE_fullselect_stmt = 150,
RULE_fullselect_stmt_item = 151, RULE_fullselect_set_clause = 152, RULE_subselect_stmt = 153,
RULE_select_list = 154, RULE_select_list_set = 155, RULE_select_list_limit = 156,
RULE_select_list_item = 157, RULE_select_list_alias = 158, RULE_select_list_asterisk = 159,
RULE_table_row = 160, RULE_into_clause = 161, RULE_bulk_collect_clause = 162,
RULE_from_clause = 163, RULE_from_table_clause = 164, RULE_from_table_name_clause = 165,
RULE_from_subselect_clause = 166, RULE_from_join_clause = 167, RULE_from_join_type_clause = 168,
RULE_from_table_values_clause = 169, RULE_from_table_values_row = 170,
RULE_from_alias_clause = 171, RULE_table_name = 172, RULE_where_clause = 173,
RULE_group_by_clause = 174, RULE_having_clause = 175, RULE_qualify_clause = 176,
RULE_order_by_clause = 177, RULE_select_options = 178, RULE_select_options_item = 179,
RULE_update_stmt = 180, RULE_update_assignment = 181, RULE_update_table = 182,
RULE_update_upsert = 183, RULE_merge_stmt = 184, RULE_merge_table = 185,
RULE_merge_condition = 186, RULE_merge_action = 187, RULE_delete_stmt = 188,
RULE_delete_alias = 189, RULE_describe_stmt = 190, RULE_bool_expr = 191,
RULE_bool_expr_atom = 192, RULE_bool_expr_unary = 193, RULE_bool_expr_single_in = 194,
RULE_bool_expr_multi_in = 195, RULE_bool_expr_binary = 196, RULE_bool_expr_logical_operator = 197,
RULE_bool_expr_binary_operator = 198, RULE_expr = 199, RULE_expr_atom = 200,
RULE_expr_interval = 201, RULE_interval_item = 202, RULE_expr_concat = 203,
RULE_expr_concat_item = 204, RULE_expr_case = 205, RULE_expr_case_simple = 206,
RULE_expr_case_searched = 207, RULE_expr_cursor_attribute = 208, RULE_expr_agg_window_func = 209,
RULE_expr_func_all_distinct = 210, RULE_expr_func_over_clause = 211, RULE_expr_func_partition_by_clause = 212,
RULE_expr_spec_func = 213, RULE_expr_func = 214, RULE_expr_dot = 215,
RULE_expr_dot_method_call = 216, RULE_expr_dot_property_access = 217,
RULE_expr_func_params = 218, RULE_func_param = 219, RULE_expr_select = 220,
RULE_expr_file = 221, RULE_hive = 222, RULE_hive_item = 223, RULE_host = 224,
RULE_host_cmd = 225, RULE_host_stmt = 226, RULE_file_name = 227, RULE_date_literal = 228,
RULE_timestamp_literal = 229, RULE_ident = 230, RULE_qident = 231, RULE_string = 232,
RULE_int_number = 233, RULE_dec_number = 234, RULE_bool_literal = 235,
RULE_null_const = 236, RULE_non_reserved_words = 237;
private static String[] makeRuleNames() {
return new String[] {
"program", "block", "begin_end_block", "single_block_stmt", "block_end",
"proc_block", "stmt", "semicolon_stmt", "exception_block", "exception_block_item",
"null_stmt", "expr_stmt", "assignment_stmt", "assignment_stmt_item",
"assignment_stmt_single_item", "assignment_stmt_collection_item", "assignment_stmt_multiple_item",
"assignment_stmt_select_item", "allocate_cursor_stmt", "associate_locator_stmt",
"begin_transaction_stmt", "break_stmt", "call_stmt", "declare_stmt",
"declare_block", "declare_block_inplace", "declare_stmt_item", "declare_var_item",
"declare_condition_item", "declare_cursor_item", "cursor_with_return",
"cursor_without_return", "declare_handler_item", "declare_temporary_table_item",
"create_table_stmt", "create_local_temp_table_stmt", "create_table_definition",
"create_table_columns", "create_table_columns_item", "create_table_type_stmt",
"tbl_type", "sql_type", "column_name", "create_table_column_inline_cons",
"create_table_column_cons", "create_table_fk_action", "create_table_preoptions",
"create_table_preoptions_item", "create_table_preoptions_td_item", "create_table_options",
"create_table_options_item", "create_table_options_ora_item", "create_table_options_db2_item",
"create_table_options_td_item", "create_table_options_hive_item", "create_table_hive_row_format",
"create_table_hive_row_format_fields", "create_table_options_mssql_item",
"create_table_options_mysql_item", "alter_table_stmt", "alter_table_item",
"alter_table_add_constraint", "alter_table_add_constraint_item", "dtype",
"dtype_len", "dtype_attr", "dtype_default", "create_database_stmt", "create_database_option",
"create_function_stmt", "create_function_return", "create_package_stmt",
"package_spec", "package_spec_item", "create_package_body_stmt", "package_body",
"package_body_item", "create_procedure_stmt", "create_routine_params",
"create_routine_param_item", "create_routine_options", "create_routine_option",
"drop_stmt", "end_transaction_stmt", "exec_stmt", "if_stmt", "if_plsql_stmt",
"if_tsql_stmt", "if_bteq_stmt", "elseif_block", "else_block", "include_stmt",
"insert_stmt", "insert_stmt_cols", "insert_stmt_rows", "insert_stmt_row",
"insert_directory_stmt", "exit_stmt", "get_diag_stmt", "get_diag_stmt_item",
"get_diag_stmt_exception_item", "get_diag_stmt_rowcount_item", "grant_stmt",
"grant_stmt_item", "leave_stmt", "map_object_stmt", "open_stmt", "fetch_stmt",
"fetch_limit", "collect_stats_stmt", "collect_stats_clause", "close_stmt",
"cmp_stmt", "cmp_source", "copy_from_local_stmt", "copy_stmt", "copy_source",
"copy_target", "copy_option", "copy_file_option", "commit_stmt", "create_index_stmt",
"create_index_col", "index_storage_clause", "index_mssql_storage_clause",
"print_stmt", "quit_stmt", "raise_stmt", "resignal_stmt", "return_stmt",
"rollback_stmt", "set_session_option", "set_current_schema_option", "set_mssql_session_option",
"set_teradata_session_option", "signal_stmt", "summary_stmt", "truncate_stmt",
"use_stmt", "values_into_stmt", "while_stmt", "unconditional_loop_stmt",
"for_cursor_stmt", "for_range_stmt", "label", "using_clause", "select_stmt",
"cte_select_stmt", "cte_select_stmt_item", "cte_select_cols", "fullselect_stmt",
"fullselect_stmt_item", "fullselect_set_clause", "subselect_stmt", "select_list",
"select_list_set", "select_list_limit", "select_list_item", "select_list_alias",
"select_list_asterisk", "table_row", "into_clause", "bulk_collect_clause",
"from_clause", "from_table_clause", "from_table_name_clause", "from_subselect_clause",
"from_join_clause", "from_join_type_clause", "from_table_values_clause",
"from_table_values_row", "from_alias_clause", "table_name", "where_clause",
"group_by_clause", "having_clause", "qualify_clause", "order_by_clause",
"select_options", "select_options_item", "update_stmt", "update_assignment",
"update_table", "update_upsert", "merge_stmt", "merge_table", "merge_condition",
"merge_action", "delete_stmt", "delete_alias", "describe_stmt", "bool_expr",
"bool_expr_atom", "bool_expr_unary", "bool_expr_single_in", "bool_expr_multi_in",
"bool_expr_binary", "bool_expr_logical_operator", "bool_expr_binary_operator",
"expr", "expr_atom", "expr_interval", "interval_item", "expr_concat",
"expr_concat_item", "expr_case", "expr_case_simple", "expr_case_searched",
"expr_cursor_attribute", "expr_agg_window_func", "expr_func_all_distinct",
"expr_func_over_clause", "expr_func_partition_by_clause", "expr_spec_func",
"expr_func", "expr_dot", "expr_dot_method_call", "expr_dot_property_access",
"expr_func_params", "func_param", "expr_select", "expr_file", "hive",
"hive_item", "host", "host_cmd", "host_stmt", "file_name", "date_literal",
"timestamp_literal", "ident", "qident", "string", "int_number", "dec_number",
"bool_literal", "null_const", "non_reserved_words"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, "'@'", "'#'", "'%'", "'!'", null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, "'+'", "':'", "','", "'||'", "'/'", "'.'", "'..'", "'='", "'=='",
"'<>'", "'!='", "'>'", "'>='", "'<'", "'<='", "'*'", "'{'", "'('", "'['",
"'}'", "')'", "']'", "';'", "'-'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, null, null, null, null, "T_ACTION", "T_ADD2", "T_ALL", "T_ALLOCATE",
"T_ALTER", "T_AND", "T_ANSI_NULLS", "T_ANSI_PADDING", "T_AS", "T_ASC",
"T_ASSOCIATE", "T_AT", "T_AUTO_INCREMENT", "T_AVG", "T_BATCHSIZE", "T_BEGIN",
"T_BETWEEN", "T_BIGINT", "T_BINARY_DOUBLE", "T_BINARY_FLOAT", "T_BINARY_INTEGER",
"T_BIT", "T_BODY", "T_BREAK", "T_BULK", "T_BY", "T_BYTE", "T_CALL", "T_CALLER",
"T_CASCADE", "T_CASE", "T_CASESPECIFIC", "T_CAST", "T_CHAR", "T_CHARACTER",
"T_CHARSET", "T_CLIENT", "T_CLOSE", "T_CLUSTERED", "T_CMP", "T_COLLECT",
"T_COLLECTION", "T_COLUMN", "T_COMMENT", "T_CONSTANT", "T_COMMIT", "T_COMPRESS",
"T_CONCAT", "T_CONDITION", "T_CONSTRAINT", "T_CONTINUE", "T_COPY", "T_COUNT",
"T_COUNT_BIG", "T_CREATE", "T_CREATION", "T_CREATOR", "T_CS", "T_CURRENT",
"T_CURRENT_SCHEMA", "T_CURSOR", "T_DATABASE", "T_DATA", "T_DATE", "T_DATETIME",
"T_DAY", "T_DAYS", "T_DEC", "T_DECIMAL", "T_DECLARE", "T_DEFAULT", "T_DEFERRED",
"T_DEFINED", "T_DEFINER", "T_DEFINITION", "T_DELETE", "T_DELIMITED",
"T_DELIMITER", "T_DESC", "T_DESCRIBE", "T_DIAGNOSTICS", "T_DIR", "T_DIRECTORY",
"T_DISTINCT", "T_DISTRIBUTE", "T_DO", "T_DOUBLE", "T_DROP", "T_DYNAMIC",
"T_ELSE", "T_ELSEIF", "T_ELSIF", "T_ENABLE", "T_END", "T_ENGINE", "T_ESCAPED",
"T_EXCEPT", "T_EXEC", "T_EXECUTE", "T_EXCEPTION", "T_EXCLUSIVE", "T_EXISTS",
"T_EXIT", "T_FALLBACK", "T_FALSE", "T_FETCH", "T_FIELDS", "T_FILE", "T_FILES",
"T_FLOAT", "T_FOR", "T_FOREIGN", "T_FORMAT", "T_FOUND", "T_FROM", "T_FULL",
"T_FUNCTION", "T_GET", "T_GLOBAL", "T_GO", "T_GRANT", "T_GROUP", "T_HANDLER",
"T_HASH", "T_HAVING", "T_HDFS", "T_HIVE", "T_HOST", "T_IDENTITY", "T_IF",
"T_IGNORE", "T_IMMEDIATE", "T_IN", "T_INCLUDE", "T_INDEX", "T_INITRANS",
"T_INNER", "T_INOUT", "T_INSERT", "T_INT", "T_INT2", "T_INT4", "T_INT8",
"T_INTEGER", "T_INTERSECT", "T_INTERVAL", "T_INTO", "T_INVOKER", "T_IS",
"T_ISOPEN", "T_ITEMS", "T_JOIN", "T_KEEP", "T_KEY", "T_KEYS", "T_LANGUAGE",
"T_LEAVE", "T_LEFT", "T_LIKE", "T_LIMIT", "T_LINES", "T_LOCAL", "T_LOCATION",
"T_LOCATOR", "T_LOCATORS", "T_LOCKS", "T_LOG", "T_LOGGED", "T_LOGGING",
"T_LOOP", "T_MAP", "T_MATCHED", "T_MAX", "T_MAXTRANS", "T_MERGE", "T_MESSAGE_TEXT",
"T_MICROSECOND", "T_MICROSECONDS", "T_MILLIS", "T_MIN", "T_MULTISET",
"T_NCHAR", "T_NEW", "T_NVARCHAR", "T_NO", "T_NOCOUNT", "T_NOCOMPRESS",
"T_NOLOGGING", "T_NONE", "T_NOT", "T_NOTFOUND", "T_NULL", "T_NUMERIC",
"T_NUMBER", "T_OBJECT", "T_OFF", "T_OF", "T_ON", "T_ONLY", "T_OPEN",
"T_OR", "T_ORDER", "T_OUT", "T_OUTER", "T_OVER", "T_OVERWRITE", "T_OWNER",
"T_PACKAGE", "T_PARTITION", "T_PCTFREE", "T_PCTUSED", "T_PLS_INTEGER",
"T_PRECISION", "T_PRESERVE", "T_PRIMARY", "T_PRINT", "T_PROC", "T_PROCEDURE",
"T_QUALIFY", "T_QUERY_BAND", "T_QUIT", "T_QUOTED_IDENTIFIER", "T_RAISE",
"T_REAL", "T_REFERENCES", "T_REGEXP", "T_REPLACE", "T_RESIGNAL", "T_RESTRICT",
"T_RESULT", "T_RESULT_SET_LOCATOR", "T_RETURN", "T_RETURNS", "T_REVERSE",
"T_RIGHT", "T_RLIKE", "T_ROLE", "T_ROLLBACK", "T_ROW", "T_ROWS", "T_ROWTYPE",
"T_ROW_COUNT", "T_RR", "T_RS", "T_PWD", "T_TRIM", "T_SCHEMA", "T_SECOND",
"T_SECONDS", "T_SECURITY", "T_SEGMENT", "T_SEL", "T_SELECT", "T_SET",
"T_SESSION", "T_SESSIONS", "T_SETS", "T_SHARE", "T_SIGNAL", "T_SIMPLE_DOUBLE",
"T_SIMPLE_FLOAT", "T_SIMPLE_INTEGER", "T_SMALLDATETIME", "T_SMALLINT",
"T_SQL", "T_SQLEXCEPTION", "T_SQLINSERT", "T_SQLSTATE", "T_SQLWARNING",
"T_STATS", "T_STATISTICS", "T_STEP", "T_STORAGE", "T_STORED", "T_STRING",
"T_SUBDIR", "T_SUBSTRING", "T_SUM", "T_SUMMARY", "T_SYS_REFCURSOR", "T_TABLE",
"T_TABLESPACE", "T_TEMPORARY", "T_TERMINATED", "T_TEXTIMAGE_ON", "T_THEN",
"T_TIME", "T_TIMESTAMP", "T_TINYINT", "T_TITLE", "T_TO", "T_TOP", "T_TRANSACTION",
"T_TRUE", "T_TRUNCATE", "T_TYPE", "T_UNION", "T_UNIQUE", "T_UPDATE",
"T_UR", "T_USE", "T_USING", "T_VALUE", "T_VALUES", "T_VAR", "T_VARCHAR",
"T_VARCHAR2", "T_VARYING", "T_VOLATILE", "T_WHEN", "T_WHERE", "T_WHILE",
"T_WITH", "T_WITHOUT", "T_WORK", "T_XACT_ABORT", "T_XML", "T_YES", "T_ACTIVITY_COUNT",
"T_CUME_DIST", "T_CURRENT_DATE", "T_CURRENT_TIME_MILLIS", "T_CURRENT_TIMESTAMP",
"T_CURRENT_USER", "T_DENSE_RANK", "T_FIRST_VALUE", "T_LAG", "T_LAST_VALUE",
"T_LEAD", "T_MAX_PART_STRING", "T_MIN_PART_STRING", "T_MAX_PART_INT",
"T_MIN_PART_INT", "T_MAX_PART_DATE", "T_MIN_PART_DATE", "T_PART_COUNT",
"T_PART_LOC", "T_RANK", "T_ROW_NUMBER", "T_STDEV", "T_SYSDATE", "T_VARIANCE",
"T_USER", "T_ADD", "T_COLON", "T_COMMA", "T_PIPE", "T_DIV", "T_DOT",
"T_DOT2", "T_EQUAL", "T_EQUAL2", "T_NOTEQUAL", "T_NOTEQUAL2", "T_GREATER",
"T_GREATEREQUAL", "T_LESS", "T_LESSEQUAL", "T_MUL", "T_OPEN_B", "T_OPEN_P",
"T_OPEN_SB", "T_CLOSE_B", "T_CLOSE_P", "T_CLOSE_SB", "T_SEMICOLON", "T_SUB",
"L_ID", "L_S_STRING", "L_D_STRING", "L_INT", "L_DEC", "L_WS", "L_M_COMMENT",
"L_S_COMMENT", "L_FILE", "L_LABEL"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
@Override
public String getGrammarFileName() { return "Hplsql.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public HplsqlParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class ProgramContext extends ParserRuleContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public TerminalNode EOF() { return getToken(HplsqlParser.EOF, 0); }
public ProgramContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_program; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterProgram(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitProgram(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitProgram(this);
else return visitor.visitChildren(this);
}
}
public final ProgramContext program() throws RecognitionException {
ProgramContext _localctx = new ProgramContext(_ctx, getState());
enterRule(_localctx, 0, RULE_program);
try {
enterOuterAlt(_localctx, 1);
{
setState(476);
block();
setState(477);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockContext extends ParserRuleContext {
public List begin_end_block() {
return getRuleContexts(Begin_end_blockContext.class);
}
public Begin_end_blockContext begin_end_block(int i) {
return getRuleContext(Begin_end_blockContext.class,i);
}
public List stmt() {
return getRuleContexts(StmtContext.class);
}
public StmtContext stmt(int i) {
return getRuleContext(StmtContext.class,i);
}
public List T_GO() { return getTokens(HplsqlParser.T_GO); }
public TerminalNode T_GO(int i) {
return getToken(HplsqlParser.T_GO, i);
}
public BlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitBlock(this);
else return visitor.visitChildren(this);
}
}
public final BlockContext block() throws RecognitionException {
BlockContext _localctx = new BlockContext(_ctx, getState());
enterRule(_localctx, 2, RULE_block);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(486);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(481);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
{
setState(479);
begin_end_block();
}
break;
case 2:
{
setState(480);
stmt();
}
break;
}
setState(484);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
case 1:
{
setState(483);
match(T_GO);
}
break;
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(488);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Begin_end_blockContext extends ParserRuleContext {
public TerminalNode T_BEGIN() { return getToken(HplsqlParser.T_BEGIN, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public Block_endContext block_end() {
return getRuleContext(Block_endContext.class,0);
}
public Declare_blockContext declare_block() {
return getRuleContext(Declare_blockContext.class,0);
}
public Exception_blockContext exception_block() {
return getRuleContext(Exception_blockContext.class,0);
}
public Begin_end_blockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_begin_end_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterBegin_end_block(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitBegin_end_block(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitBegin_end_block(this);
else return visitor.visitChildren(this);
}
}
public final Begin_end_blockContext begin_end_block() throws RecognitionException {
Begin_end_blockContext _localctx = new Begin_end_blockContext(_ctx, getState());
enterRule(_localctx, 4, RULE_begin_end_block);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(491);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_DECLARE) {
{
setState(490);
declare_block();
}
}
setState(493);
match(T_BEGIN);
setState(494);
block();
setState(496);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
case 1:
{
setState(495);
exception_block();
}
break;
}
setState(498);
block_end();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Single_block_stmtContext extends ParserRuleContext {
public TerminalNode T_BEGIN() { return getToken(HplsqlParser.T_BEGIN, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public Block_endContext block_end() {
return getRuleContext(Block_endContext.class,0);
}
public Exception_blockContext exception_block() {
return getRuleContext(Exception_blockContext.class,0);
}
public StmtContext stmt() {
return getRuleContext(StmtContext.class,0);
}
public TerminalNode T_SEMICOLON() { return getToken(HplsqlParser.T_SEMICOLON, 0); }
public Single_block_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_single_block_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSingle_block_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSingle_block_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSingle_block_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Single_block_stmtContext single_block_stmt() throws RecognitionException {
Single_block_stmtContext _localctx = new Single_block_stmtContext(_ctx, getState());
enterRule(_localctx, 6, RULE_single_block_stmt);
try {
setState(511);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(500);
match(T_BEGIN);
setState(501);
block();
setState(503);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
case 1:
{
setState(502);
exception_block();
}
break;
}
setState(505);
block_end();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(507);
stmt();
setState(509);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
case 1:
{
setState(508);
match(T_SEMICOLON);
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Block_endContext extends ParserRuleContext {
public TerminalNode T_END() { return getToken(HplsqlParser.T_END, 0); }
public Block_endContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_block_end; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterBlock_end(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitBlock_end(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitBlock_end(this);
else return visitor.visitChildren(this);
}
}
public final Block_endContext block_end() throws RecognitionException {
Block_endContext _localctx = new Block_endContext(_ctx, getState());
enterRule(_localctx, 8, RULE_block_end);
try {
enterOuterAlt(_localctx, 1);
{
setState(513);
if (!(!_input.LT(2).getText().equalsIgnoreCase("TRANSACTION"))) throw new FailedPredicateException(this, "!_input.LT(2).getText().equalsIgnoreCase(\"TRANSACTION\")");
setState(514);
match(T_END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Proc_blockContext extends ParserRuleContext {
public Begin_end_blockContext begin_end_block() {
return getRuleContext(Begin_end_blockContext.class,0);
}
public List stmt() {
return getRuleContexts(StmtContext.class);
}
public StmtContext stmt(int i) {
return getRuleContext(StmtContext.class,i);
}
public TerminalNode T_GO() { return getToken(HplsqlParser.T_GO, 0); }
public Proc_blockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_proc_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterProc_block(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitProc_block(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitProc_block(this);
else return visitor.visitChildren(this);
}
}
public final Proc_blockContext proc_block() throws RecognitionException {
Proc_blockContext _localctx = new Proc_blockContext(_ctx, getState());
enterRule(_localctx, 10, RULE_proc_block);
try {
int _alt;
setState(525);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(516);
begin_end_block();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(518);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(517);
stmt();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(520);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(523);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
case 1:
{
setState(522);
match(T_GO);
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StmtContext extends ParserRuleContext {
public Assignment_stmtContext assignment_stmt() {
return getRuleContext(Assignment_stmtContext.class,0);
}
public Allocate_cursor_stmtContext allocate_cursor_stmt() {
return getRuleContext(Allocate_cursor_stmtContext.class,0);
}
public Alter_table_stmtContext alter_table_stmt() {
return getRuleContext(Alter_table_stmtContext.class,0);
}
public Associate_locator_stmtContext associate_locator_stmt() {
return getRuleContext(Associate_locator_stmtContext.class,0);
}
public Begin_transaction_stmtContext begin_transaction_stmt() {
return getRuleContext(Begin_transaction_stmtContext.class,0);
}
public Break_stmtContext break_stmt() {
return getRuleContext(Break_stmtContext.class,0);
}
public Call_stmtContext call_stmt() {
return getRuleContext(Call_stmtContext.class,0);
}
public Collect_stats_stmtContext collect_stats_stmt() {
return getRuleContext(Collect_stats_stmtContext.class,0);
}
public Close_stmtContext close_stmt() {
return getRuleContext(Close_stmtContext.class,0);
}
public Cmp_stmtContext cmp_stmt() {
return getRuleContext(Cmp_stmtContext.class,0);
}
public Copy_from_local_stmtContext copy_from_local_stmt() {
return getRuleContext(Copy_from_local_stmtContext.class,0);
}
public Copy_stmtContext copy_stmt() {
return getRuleContext(Copy_stmtContext.class,0);
}
public Commit_stmtContext commit_stmt() {
return getRuleContext(Commit_stmtContext.class,0);
}
public Create_database_stmtContext create_database_stmt() {
return getRuleContext(Create_database_stmtContext.class,0);
}
public Create_function_stmtContext create_function_stmt() {
return getRuleContext(Create_function_stmtContext.class,0);
}
public Create_index_stmtContext create_index_stmt() {
return getRuleContext(Create_index_stmtContext.class,0);
}
public Create_local_temp_table_stmtContext create_local_temp_table_stmt() {
return getRuleContext(Create_local_temp_table_stmtContext.class,0);
}
public Create_package_stmtContext create_package_stmt() {
return getRuleContext(Create_package_stmtContext.class,0);
}
public Create_package_body_stmtContext create_package_body_stmt() {
return getRuleContext(Create_package_body_stmtContext.class,0);
}
public Create_procedure_stmtContext create_procedure_stmt() {
return getRuleContext(Create_procedure_stmtContext.class,0);
}
public Create_table_stmtContext create_table_stmt() {
return getRuleContext(Create_table_stmtContext.class,0);
}
public Create_table_type_stmtContext create_table_type_stmt() {
return getRuleContext(Create_table_type_stmtContext.class,0);
}
public Declare_stmtContext declare_stmt() {
return getRuleContext(Declare_stmtContext.class,0);
}
public Delete_stmtContext delete_stmt() {
return getRuleContext(Delete_stmtContext.class,0);
}
public Describe_stmtContext describe_stmt() {
return getRuleContext(Describe_stmtContext.class,0);
}
public Drop_stmtContext drop_stmt() {
return getRuleContext(Drop_stmtContext.class,0);
}
public End_transaction_stmtContext end_transaction_stmt() {
return getRuleContext(End_transaction_stmtContext.class,0);
}
public Exec_stmtContext exec_stmt() {
return getRuleContext(Exec_stmtContext.class,0);
}
public Exit_stmtContext exit_stmt() {
return getRuleContext(Exit_stmtContext.class,0);
}
public Fetch_stmtContext fetch_stmt() {
return getRuleContext(Fetch_stmtContext.class,0);
}
public For_cursor_stmtContext for_cursor_stmt() {
return getRuleContext(For_cursor_stmtContext.class,0);
}
public For_range_stmtContext for_range_stmt() {
return getRuleContext(For_range_stmtContext.class,0);
}
public If_stmtContext if_stmt() {
return getRuleContext(If_stmtContext.class,0);
}
public Include_stmtContext include_stmt() {
return getRuleContext(Include_stmtContext.class,0);
}
public Insert_stmtContext insert_stmt() {
return getRuleContext(Insert_stmtContext.class,0);
}
public Insert_directory_stmtContext insert_directory_stmt() {
return getRuleContext(Insert_directory_stmtContext.class,0);
}
public Get_diag_stmtContext get_diag_stmt() {
return getRuleContext(Get_diag_stmtContext.class,0);
}
public Grant_stmtContext grant_stmt() {
return getRuleContext(Grant_stmtContext.class,0);
}
public Leave_stmtContext leave_stmt() {
return getRuleContext(Leave_stmtContext.class,0);
}
public Map_object_stmtContext map_object_stmt() {
return getRuleContext(Map_object_stmtContext.class,0);
}
public Merge_stmtContext merge_stmt() {
return getRuleContext(Merge_stmtContext.class,0);
}
public Open_stmtContext open_stmt() {
return getRuleContext(Open_stmtContext.class,0);
}
public Print_stmtContext print_stmt() {
return getRuleContext(Print_stmtContext.class,0);
}
public Quit_stmtContext quit_stmt() {
return getRuleContext(Quit_stmtContext.class,0);
}
public Raise_stmtContext raise_stmt() {
return getRuleContext(Raise_stmtContext.class,0);
}
public Resignal_stmtContext resignal_stmt() {
return getRuleContext(Resignal_stmtContext.class,0);
}
public Return_stmtContext return_stmt() {
return getRuleContext(Return_stmtContext.class,0);
}
public Rollback_stmtContext rollback_stmt() {
return getRuleContext(Rollback_stmtContext.class,0);
}
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public Signal_stmtContext signal_stmt() {
return getRuleContext(Signal_stmtContext.class,0);
}
public Summary_stmtContext summary_stmt() {
return getRuleContext(Summary_stmtContext.class,0);
}
public Update_stmtContext update_stmt() {
return getRuleContext(Update_stmtContext.class,0);
}
public Use_stmtContext use_stmt() {
return getRuleContext(Use_stmtContext.class,0);
}
public Truncate_stmtContext truncate_stmt() {
return getRuleContext(Truncate_stmtContext.class,0);
}
public Values_into_stmtContext values_into_stmt() {
return getRuleContext(Values_into_stmtContext.class,0);
}
public While_stmtContext while_stmt() {
return getRuleContext(While_stmtContext.class,0);
}
public Unconditional_loop_stmtContext unconditional_loop_stmt() {
return getRuleContext(Unconditional_loop_stmtContext.class,0);
}
public LabelContext label() {
return getRuleContext(LabelContext.class,0);
}
public HiveContext hive() {
return getRuleContext(HiveContext.class,0);
}
public HostContext host() {
return getRuleContext(HostContext.class,0);
}
public Null_stmtContext null_stmt() {
return getRuleContext(Null_stmtContext.class,0);
}
public Expr_stmtContext expr_stmt() {
return getRuleContext(Expr_stmtContext.class,0);
}
public Semicolon_stmtContext semicolon_stmt() {
return getRuleContext(Semicolon_stmtContext.class,0);
}
public StmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterStmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitStmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitStmt(this);
else return visitor.visitChildren(this);
}
}
public final StmtContext stmt() throws RecognitionException {
StmtContext _localctx = new StmtContext(_ctx, getState());
enterRule(_localctx, 12, RULE_stmt);
try {
setState(590);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(527);
assignment_stmt();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(528);
allocate_cursor_stmt();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(529);
alter_table_stmt();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(530);
associate_locator_stmt();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(531);
begin_transaction_stmt();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(532);
break_stmt();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(533);
call_stmt();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(534);
collect_stats_stmt();
}
break;
case 9:
enterOuterAlt(_localctx, 9);
{
setState(535);
close_stmt();
}
break;
case 10:
enterOuterAlt(_localctx, 10);
{
setState(536);
cmp_stmt();
}
break;
case 11:
enterOuterAlt(_localctx, 11);
{
setState(537);
copy_from_local_stmt();
}
break;
case 12:
enterOuterAlt(_localctx, 12);
{
setState(538);
copy_stmt();
}
break;
case 13:
enterOuterAlt(_localctx, 13);
{
setState(539);
commit_stmt();
}
break;
case 14:
enterOuterAlt(_localctx, 14);
{
setState(540);
create_database_stmt();
}
break;
case 15:
enterOuterAlt(_localctx, 15);
{
setState(541);
create_function_stmt();
}
break;
case 16:
enterOuterAlt(_localctx, 16);
{
setState(542);
create_index_stmt();
}
break;
case 17:
enterOuterAlt(_localctx, 17);
{
setState(543);
create_local_temp_table_stmt();
}
break;
case 18:
enterOuterAlt(_localctx, 18);
{
setState(544);
create_package_stmt();
}
break;
case 19:
enterOuterAlt(_localctx, 19);
{
setState(545);
create_package_body_stmt();
}
break;
case 20:
enterOuterAlt(_localctx, 20);
{
setState(546);
create_procedure_stmt();
}
break;
case 21:
enterOuterAlt(_localctx, 21);
{
setState(547);
create_table_stmt();
}
break;
case 22:
enterOuterAlt(_localctx, 22);
{
setState(548);
create_table_type_stmt();
}
break;
case 23:
enterOuterAlt(_localctx, 23);
{
setState(549);
declare_stmt();
}
break;
case 24:
enterOuterAlt(_localctx, 24);
{
setState(550);
delete_stmt();
}
break;
case 25:
enterOuterAlt(_localctx, 25);
{
setState(551);
describe_stmt();
}
break;
case 26:
enterOuterAlt(_localctx, 26);
{
setState(552);
drop_stmt();
}
break;
case 27:
enterOuterAlt(_localctx, 27);
{
setState(553);
end_transaction_stmt();
}
break;
case 28:
enterOuterAlt(_localctx, 28);
{
setState(554);
exec_stmt();
}
break;
case 29:
enterOuterAlt(_localctx, 29);
{
setState(555);
exit_stmt();
}
break;
case 30:
enterOuterAlt(_localctx, 30);
{
setState(556);
fetch_stmt();
}
break;
case 31:
enterOuterAlt(_localctx, 31);
{
setState(557);
for_cursor_stmt();
}
break;
case 32:
enterOuterAlt(_localctx, 32);
{
setState(558);
for_range_stmt();
}
break;
case 33:
enterOuterAlt(_localctx, 33);
{
setState(559);
if_stmt();
}
break;
case 34:
enterOuterAlt(_localctx, 34);
{
setState(560);
include_stmt();
}
break;
case 35:
enterOuterAlt(_localctx, 35);
{
setState(561);
insert_stmt();
}
break;
case 36:
enterOuterAlt(_localctx, 36);
{
setState(562);
insert_directory_stmt();
}
break;
case 37:
enterOuterAlt(_localctx, 37);
{
setState(563);
get_diag_stmt();
}
break;
case 38:
enterOuterAlt(_localctx, 38);
{
setState(564);
grant_stmt();
}
break;
case 39:
enterOuterAlt(_localctx, 39);
{
setState(565);
leave_stmt();
}
break;
case 40:
enterOuterAlt(_localctx, 40);
{
setState(566);
map_object_stmt();
}
break;
case 41:
enterOuterAlt(_localctx, 41);
{
setState(567);
merge_stmt();
}
break;
case 42:
enterOuterAlt(_localctx, 42);
{
setState(568);
open_stmt();
}
break;
case 43:
enterOuterAlt(_localctx, 43);
{
setState(569);
print_stmt();
}
break;
case 44:
enterOuterAlt(_localctx, 44);
{
setState(570);
quit_stmt();
}
break;
case 45:
enterOuterAlt(_localctx, 45);
{
setState(571);
raise_stmt();
}
break;
case 46:
enterOuterAlt(_localctx, 46);
{
setState(572);
resignal_stmt();
}
break;
case 47:
enterOuterAlt(_localctx, 47);
{
setState(573);
return_stmt();
}
break;
case 48:
enterOuterAlt(_localctx, 48);
{
setState(574);
rollback_stmt();
}
break;
case 49:
enterOuterAlt(_localctx, 49);
{
setState(575);
select_stmt();
}
break;
case 50:
enterOuterAlt(_localctx, 50);
{
setState(576);
signal_stmt();
}
break;
case 51:
enterOuterAlt(_localctx, 51);
{
setState(577);
summary_stmt();
}
break;
case 52:
enterOuterAlt(_localctx, 52);
{
setState(578);
update_stmt();
}
break;
case 53:
enterOuterAlt(_localctx, 53);
{
setState(579);
use_stmt();
}
break;
case 54:
enterOuterAlt(_localctx, 54);
{
setState(580);
truncate_stmt();
}
break;
case 55:
enterOuterAlt(_localctx, 55);
{
setState(581);
values_into_stmt();
}
break;
case 56:
enterOuterAlt(_localctx, 56);
{
setState(582);
while_stmt();
}
break;
case 57:
enterOuterAlt(_localctx, 57);
{
setState(583);
unconditional_loop_stmt();
}
break;
case 58:
enterOuterAlt(_localctx, 58);
{
setState(584);
label();
}
break;
case 59:
enterOuterAlt(_localctx, 59);
{
setState(585);
hive();
}
break;
case 60:
enterOuterAlt(_localctx, 60);
{
setState(586);
host();
}
break;
case 61:
enterOuterAlt(_localctx, 61);
{
setState(587);
null_stmt();
}
break;
case 62:
enterOuterAlt(_localctx, 62);
{
setState(588);
expr_stmt();
}
break;
case 63:
enterOuterAlt(_localctx, 63);
{
setState(589);
semicolon_stmt();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Semicolon_stmtContext extends ParserRuleContext {
public TerminalNode T_SEMICOLON() { return getToken(HplsqlParser.T_SEMICOLON, 0); }
public TerminalNode T_DIV() { return getToken(HplsqlParser.T_DIV, 0); }
public Semicolon_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_semicolon_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSemicolon_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSemicolon_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSemicolon_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Semicolon_stmtContext semicolon_stmt() throws RecognitionException {
Semicolon_stmtContext _localctx = new Semicolon_stmtContext(_ctx, getState());
enterRule(_localctx, 14, RULE_semicolon_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(592);
_la = _input.LA(1);
if ( !(_la==T__0 || _la==T__1 || _la==T_DIV || _la==T_SEMICOLON) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Exception_blockContext extends ParserRuleContext {
public TerminalNode T_EXCEPTION() { return getToken(HplsqlParser.T_EXCEPTION, 0); }
public List exception_block_item() {
return getRuleContexts(Exception_block_itemContext.class);
}
public Exception_block_itemContext exception_block_item(int i) {
return getRuleContext(Exception_block_itemContext.class,i);
}
public Exception_blockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exception_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterException_block(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitException_block(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitException_block(this);
else return visitor.visitChildren(this);
}
}
public final Exception_blockContext exception_block() throws RecognitionException {
Exception_blockContext _localctx = new Exception_blockContext(_ctx, getState());
enterRule(_localctx, 16, RULE_exception_block);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(594);
match(T_EXCEPTION);
setState(596);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(595);
exception_block_item();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(598);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,12,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Exception_block_itemContext extends ParserRuleContext {
public List T_WHEN() { return getTokens(HplsqlParser.T_WHEN); }
public TerminalNode T_WHEN(int i) {
return getToken(HplsqlParser.T_WHEN, i);
}
public TerminalNode L_ID() { return getToken(HplsqlParser.L_ID, 0); }
public TerminalNode T_THEN() { return getToken(HplsqlParser.T_THEN, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public TerminalNode T_END() { return getToken(HplsqlParser.T_END, 0); }
public Exception_block_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exception_block_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterException_block_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitException_block_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitException_block_item(this);
else return visitor.visitChildren(this);
}
}
public final Exception_block_itemContext exception_block_item() throws RecognitionException {
Exception_block_itemContext _localctx = new Exception_block_itemContext(_ctx, getState());
enterRule(_localctx, 18, RULE_exception_block_item);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(600);
match(T_WHEN);
setState(601);
match(L_ID);
setState(602);
match(T_THEN);
setState(603);
block();
setState(604);
_la = _input.LA(1);
if ( _la <= 0 || (_la==T_END || _la==T_WHEN) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Null_stmtContext extends ParserRuleContext {
public TerminalNode T_NULL() { return getToken(HplsqlParser.T_NULL, 0); }
public Null_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_null_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterNull_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitNull_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitNull_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Null_stmtContext null_stmt() throws RecognitionException {
Null_stmtContext _localctx = new Null_stmtContext(_ctx, getState());
enterRule(_localctx, 20, RULE_null_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(606);
match(T_NULL);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Expr_stmtContext extends ParserRuleContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Expr_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expr_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterExpr_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitExpr_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitExpr_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Expr_stmtContext expr_stmt() throws RecognitionException {
Expr_stmtContext _localctx = new Expr_stmtContext(_ctx, getState());
enterRule(_localctx, 22, RULE_expr_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(608);
if (!(!_input.LT(1).getText().equalsIgnoreCase("GO"))) throw new FailedPredicateException(this, "!_input.LT(1).getText().equalsIgnoreCase(\"GO\")");
setState(609);
expr(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Assignment_stmtContext extends ParserRuleContext {
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public Set_session_optionContext set_session_option() {
return getRuleContext(Set_session_optionContext.class,0);
}
public List assignment_stmt_item() {
return getRuleContexts(Assignment_stmt_itemContext.class);
}
public Assignment_stmt_itemContext assignment_stmt_item(int i) {
return getRuleContext(Assignment_stmt_itemContext.class,i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Assignment_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAssignment_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAssignment_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAssignment_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Assignment_stmtContext assignment_stmt() throws RecognitionException {
Assignment_stmtContext _localctx = new Assignment_stmtContext(_ctx, getState());
enterRule(_localctx, 24, RULE_assignment_stmt);
try {
int _alt;
setState(624);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(611);
match(T_SET);
setState(612);
set_session_option();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(614);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
case 1:
{
setState(613);
match(T_SET);
}
break;
}
setState(616);
assignment_stmt_item();
setState(621);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,14,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(617);
match(T_COMMA);
setState(618);
assignment_stmt_item();
}
}
}
setState(623);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,14,_ctx);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Assignment_stmt_itemContext extends ParserRuleContext {
public Assignment_stmt_single_itemContext assignment_stmt_single_item() {
return getRuleContext(Assignment_stmt_single_itemContext.class,0);
}
public Assignment_stmt_multiple_itemContext assignment_stmt_multiple_item() {
return getRuleContext(Assignment_stmt_multiple_itemContext.class,0);
}
public Assignment_stmt_select_itemContext assignment_stmt_select_item() {
return getRuleContext(Assignment_stmt_select_itemContext.class,0);
}
public Assignment_stmt_collection_itemContext assignment_stmt_collection_item() {
return getRuleContext(Assignment_stmt_collection_itemContext.class,0);
}
public Assignment_stmt_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment_stmt_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAssignment_stmt_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAssignment_stmt_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAssignment_stmt_item(this);
else return visitor.visitChildren(this);
}
}
public final Assignment_stmt_itemContext assignment_stmt_item() throws RecognitionException {
Assignment_stmt_itemContext _localctx = new Assignment_stmt_itemContext(_ctx, getState());
enterRule(_localctx, 26, RULE_assignment_stmt_item);
try {
setState(630);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(626);
assignment_stmt_single_item();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(627);
assignment_stmt_multiple_item();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(628);
assignment_stmt_select_item();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(629);
assignment_stmt_collection_item();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Assignment_stmt_single_itemContext extends ParserRuleContext {
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_COLON() { return getToken(HplsqlParser.T_COLON, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public Assignment_stmt_single_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment_stmt_single_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAssignment_stmt_single_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAssignment_stmt_single_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAssignment_stmt_single_item(this);
else return visitor.visitChildren(this);
}
}
public final Assignment_stmt_single_itemContext assignment_stmt_single_item() throws RecognitionException {
Assignment_stmt_single_itemContext _localctx = new Assignment_stmt_single_itemContext(_ctx, getState());
enterRule(_localctx, 28, RULE_assignment_stmt_single_item);
int _la;
try {
setState(648);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ACTION:
case T_ADD2:
case T_ALL:
case T_ALLOCATE:
case T_ALTER:
case T_AND:
case T_ANSI_NULLS:
case T_ANSI_PADDING:
case T_AS:
case T_ASC:
case T_ASSOCIATE:
case T_AT:
case T_AUTO_INCREMENT:
case T_AVG:
case T_BATCHSIZE:
case T_BEGIN:
case T_BETWEEN:
case T_BIGINT:
case T_BINARY_DOUBLE:
case T_BINARY_FLOAT:
case T_BIT:
case T_BODY:
case T_BREAK:
case T_BULK:
case T_BY:
case T_BYTE:
case T_CALL:
case T_CALLER:
case T_CASCADE:
case T_CASE:
case T_CASESPECIFIC:
case T_CAST:
case T_CHAR:
case T_CHARACTER:
case T_CHARSET:
case T_CLIENT:
case T_CLOSE:
case T_CLUSTERED:
case T_CMP:
case T_COLLECT:
case T_COLLECTION:
case T_COLUMN:
case T_COMMENT:
case T_CONSTANT:
case T_COMMIT:
case T_COMPRESS:
case T_CONCAT:
case T_CONDITION:
case T_CONSTRAINT:
case T_CONTINUE:
case T_COPY:
case T_COUNT:
case T_COUNT_BIG:
case T_CREATE:
case T_CREATION:
case T_CREATOR:
case T_CS:
case T_CURRENT:
case T_CURRENT_SCHEMA:
case T_CURSOR:
case T_DATABASE:
case T_DATA:
case T_DATE:
case T_DATETIME:
case T_DAY:
case T_DAYS:
case T_DEC:
case T_DECIMAL:
case T_DECLARE:
case T_DEFAULT:
case T_DEFERRED:
case T_DEFINED:
case T_DEFINER:
case T_DEFINITION:
case T_DELETE:
case T_DELIMITED:
case T_DELIMITER:
case T_DESC:
case T_DESCRIBE:
case T_DIAGNOSTICS:
case T_DIR:
case T_DIRECTORY:
case T_DISTINCT:
case T_DISTRIBUTE:
case T_DO:
case T_DOUBLE:
case T_DROP:
case T_DYNAMIC:
case T_ENABLE:
case T_ENGINE:
case T_ESCAPED:
case T_EXCEPT:
case T_EXEC:
case T_EXECUTE:
case T_EXCEPTION:
case T_EXCLUSIVE:
case T_EXISTS:
case T_EXIT:
case T_FALLBACK:
case T_FALSE:
case T_FETCH:
case T_FIELDS:
case T_FILE:
case T_FILES:
case T_FLOAT:
case T_FOR:
case T_FOREIGN:
case T_FORMAT:
case T_FOUND:
case T_FROM:
case T_FULL:
case T_FUNCTION:
case T_GET:
case T_GLOBAL:
case T_GO:
case T_GRANT:
case T_GROUP:
case T_HANDLER:
case T_HASH:
case T_HAVING:
case T_HDFS:
case T_HIVE:
case T_HOST:
case T_IDENTITY:
case T_IF:
case T_IGNORE:
case T_IMMEDIATE:
case T_IN:
case T_INCLUDE:
case T_INDEX:
case T_INITRANS:
case T_INNER:
case T_INOUT:
case T_INSERT:
case T_INT:
case T_INT2:
case T_INT4:
case T_INT8:
case T_INTEGER:
case T_INTERSECT:
case T_INTERVAL:
case T_INTO:
case T_INVOKER:
case T_IS:
case T_ISOPEN:
case T_ITEMS:
case T_JOIN:
case T_KEEP:
case T_KEY:
case T_KEYS:
case T_LANGUAGE:
case T_LEAVE:
case T_LEFT:
case T_LIKE:
case T_LIMIT:
case T_LINES:
case T_LOCAL:
case T_LOCATION:
case T_LOCATOR:
case T_LOCATORS:
case T_LOCKS:
case T_LOG:
case T_LOGGED:
case T_LOGGING:
case T_LOOP:
case T_MAP:
case T_MATCHED:
case T_MAX:
case T_MAXTRANS:
case T_MERGE:
case T_MESSAGE_TEXT:
case T_MICROSECOND:
case T_MICROSECONDS:
case T_MIN:
case T_MULTISET:
case T_NCHAR:
case T_NEW:
case T_NVARCHAR:
case T_NO:
case T_NOCOUNT:
case T_NOCOMPRESS:
case T_NOLOGGING:
case T_NONE:
case T_NOT:
case T_NOTFOUND:
case T_NUMERIC:
case T_NUMBER:
case T_OBJECT:
case T_OFF:
case T_ON:
case T_ONLY:
case T_OPEN:
case T_OR:
case T_ORDER:
case T_OUT:
case T_OUTER:
case T_OVER:
case T_OVERWRITE:
case T_OWNER:
case T_PACKAGE:
case T_PARTITION:
case T_PCTFREE:
case T_PCTUSED:
case T_PRECISION:
case T_PRESERVE:
case T_PRIMARY:
case T_PRINT:
case T_PROC:
case T_PROCEDURE:
case T_QUALIFY:
case T_QUERY_BAND:
case T_QUIT:
case T_QUOTED_IDENTIFIER:
case T_RAISE:
case T_REAL:
case T_REFERENCES:
case T_REGEXP:
case T_REPLACE:
case T_RESIGNAL:
case T_RESTRICT:
case T_RESULT:
case T_RESULT_SET_LOCATOR:
case T_RETURN:
case T_RETURNS:
case T_REVERSE:
case T_RIGHT:
case T_RLIKE:
case T_ROLE:
case T_ROLLBACK:
case T_ROW:
case T_ROWS:
case T_ROW_COUNT:
case T_RR:
case T_RS:
case T_PWD:
case T_TRIM:
case T_SCHEMA:
case T_SECOND:
case T_SECONDS:
case T_SECURITY:
case T_SEGMENT:
case T_SEL:
case T_SELECT:
case T_SET:
case T_SESSION:
case T_SESSIONS:
case T_SETS:
case T_SHARE:
case T_SIGNAL:
case T_SIMPLE_DOUBLE:
case T_SIMPLE_FLOAT:
case T_SMALLDATETIME:
case T_SMALLINT:
case T_SQL:
case T_SQLEXCEPTION:
case T_SQLINSERT:
case T_SQLSTATE:
case T_SQLWARNING:
case T_STATS:
case T_STATISTICS:
case T_STEP:
case T_STORAGE:
case T_STORED:
case T_STRING:
case T_SUBDIR:
case T_SUBSTRING:
case T_SUM:
case T_SUMMARY:
case T_SYS_REFCURSOR:
case T_TABLE:
case T_TABLESPACE:
case T_TEMPORARY:
case T_TERMINATED:
case T_TEXTIMAGE_ON:
case T_THEN:
case T_TIMESTAMP:
case T_TITLE:
case T_TO:
case T_TOP:
case T_TRANSACTION:
case T_TRUE:
case T_TRUNCATE:
case T_UNIQUE:
case T_UPDATE:
case T_UR:
case T_USE:
case T_USING:
case T_VALUE:
case T_VALUES:
case T_VAR:
case T_VARCHAR:
case T_VARCHAR2:
case T_VARYING:
case T_VOLATILE:
case T_WHILE:
case T_WITH:
case T_WITHOUT:
case T_WORK:
case T_XACT_ABORT:
case T_XML:
case T_YES:
case T_ACTIVITY_COUNT:
case T_CUME_DIST:
case T_CURRENT_DATE:
case T_CURRENT_TIME_MILLIS:
case T_CURRENT_TIMESTAMP:
case T_CURRENT_USER:
case T_DENSE_RANK:
case T_FIRST_VALUE:
case T_LAG:
case T_LAST_VALUE:
case T_LEAD:
case T_PART_COUNT:
case T_PART_LOC:
case T_RANK:
case T_ROW_NUMBER:
case T_STDEV:
case T_SYSDATE:
case T_VARIANCE:
case T_USER:
case T_SUB:
case L_ID:
enterOuterAlt(_localctx, 1);
{
setState(632);
qident();
setState(634);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_COLON) {
{
setState(633);
match(T_COLON);
}
}
setState(636);
match(T_EQUAL);
setState(637);
expr(0);
}
break;
case T_OPEN_P:
enterOuterAlt(_localctx, 2);
{
setState(639);
match(T_OPEN_P);
setState(640);
qident();
setState(641);
match(T_CLOSE_P);
setState(643);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_COLON) {
{
setState(642);
match(T_COLON);
}
}
setState(645);
match(T_EQUAL);
setState(646);
expr(0);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Assignment_stmt_collection_itemContext extends ParserRuleContext {
public Expr_funcContext expr_func() {
return getRuleContext(Expr_funcContext.class,0);
}
public TerminalNode T_COLON() { return getToken(HplsqlParser.T_COLON, 0); }
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Assignment_stmt_collection_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment_stmt_collection_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAssignment_stmt_collection_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAssignment_stmt_collection_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAssignment_stmt_collection_item(this);
else return visitor.visitChildren(this);
}
}
public final Assignment_stmt_collection_itemContext assignment_stmt_collection_item() throws RecognitionException {
Assignment_stmt_collection_itemContext _localctx = new Assignment_stmt_collection_itemContext(_ctx, getState());
enterRule(_localctx, 30, RULE_assignment_stmt_collection_item);
try {
enterOuterAlt(_localctx, 1);
{
setState(650);
expr_func();
setState(651);
match(T_COLON);
setState(652);
match(T_EQUAL);
setState(653);
expr(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Assignment_stmt_multiple_itemContext extends ParserRuleContext {
public List T_OPEN_P() { return getTokens(HplsqlParser.T_OPEN_P); }
public TerminalNode T_OPEN_P(int i) {
return getToken(HplsqlParser.T_OPEN_P, i);
}
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public List T_CLOSE_P() { return getTokens(HplsqlParser.T_CLOSE_P); }
public TerminalNode T_CLOSE_P(int i) {
return getToken(HplsqlParser.T_CLOSE_P, i);
}
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public TerminalNode T_COLON() { return getToken(HplsqlParser.T_COLON, 0); }
public Assignment_stmt_multiple_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment_stmt_multiple_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAssignment_stmt_multiple_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAssignment_stmt_multiple_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAssignment_stmt_multiple_item(this);
else return visitor.visitChildren(this);
}
}
public final Assignment_stmt_multiple_itemContext assignment_stmt_multiple_item() throws RecognitionException {
Assignment_stmt_multiple_itemContext _localctx = new Assignment_stmt_multiple_itemContext(_ctx, getState());
enterRule(_localctx, 32, RULE_assignment_stmt_multiple_item);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(655);
match(T_OPEN_P);
setState(656);
ident();
setState(661);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(657);
match(T_COMMA);
setState(658);
ident();
}
}
setState(663);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(664);
match(T_CLOSE_P);
setState(666);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_COLON) {
{
setState(665);
match(T_COLON);
}
}
setState(668);
match(T_EQUAL);
setState(669);
match(T_OPEN_P);
setState(670);
expr(0);
setState(675);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(671);
match(T_COMMA);
setState(672);
expr(0);
}
}
setState(677);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(678);
match(T_CLOSE_P);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Assignment_stmt_select_itemContext extends ParserRuleContext {
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public List T_OPEN_P() { return getTokens(HplsqlParser.T_OPEN_P); }
public TerminalNode T_OPEN_P(int i) {
return getToken(HplsqlParser.T_OPEN_P, i);
}
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public List T_CLOSE_P() { return getTokens(HplsqlParser.T_CLOSE_P); }
public TerminalNode T_CLOSE_P(int i) {
return getToken(HplsqlParser.T_CLOSE_P, i);
}
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public TerminalNode T_COLON() { return getToken(HplsqlParser.T_COLON, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Assignment_stmt_select_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment_stmt_select_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAssignment_stmt_select_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAssignment_stmt_select_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAssignment_stmt_select_item(this);
else return visitor.visitChildren(this);
}
}
public final Assignment_stmt_select_itemContext assignment_stmt_select_item() throws RecognitionException {
Assignment_stmt_select_itemContext _localctx = new Assignment_stmt_select_itemContext(_ctx, getState());
enterRule(_localctx, 34, RULE_assignment_stmt_select_item);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(692);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ACTION:
case T_ADD2:
case T_ALL:
case T_ALLOCATE:
case T_ALTER:
case T_AND:
case T_ANSI_NULLS:
case T_ANSI_PADDING:
case T_AS:
case T_ASC:
case T_ASSOCIATE:
case T_AT:
case T_AUTO_INCREMENT:
case T_AVG:
case T_BATCHSIZE:
case T_BEGIN:
case T_BETWEEN:
case T_BIGINT:
case T_BINARY_DOUBLE:
case T_BINARY_FLOAT:
case T_BIT:
case T_BODY:
case T_BREAK:
case T_BULK:
case T_BY:
case T_BYTE:
case T_CALL:
case T_CALLER:
case T_CASCADE:
case T_CASE:
case T_CASESPECIFIC:
case T_CAST:
case T_CHAR:
case T_CHARACTER:
case T_CHARSET:
case T_CLIENT:
case T_CLOSE:
case T_CLUSTERED:
case T_CMP:
case T_COLLECT:
case T_COLLECTION:
case T_COLUMN:
case T_COMMENT:
case T_CONSTANT:
case T_COMMIT:
case T_COMPRESS:
case T_CONCAT:
case T_CONDITION:
case T_CONSTRAINT:
case T_CONTINUE:
case T_COPY:
case T_COUNT:
case T_COUNT_BIG:
case T_CREATE:
case T_CREATION:
case T_CREATOR:
case T_CS:
case T_CURRENT:
case T_CURRENT_SCHEMA:
case T_CURSOR:
case T_DATABASE:
case T_DATA:
case T_DATE:
case T_DATETIME:
case T_DAY:
case T_DAYS:
case T_DEC:
case T_DECIMAL:
case T_DECLARE:
case T_DEFAULT:
case T_DEFERRED:
case T_DEFINED:
case T_DEFINER:
case T_DEFINITION:
case T_DELETE:
case T_DELIMITED:
case T_DELIMITER:
case T_DESC:
case T_DESCRIBE:
case T_DIAGNOSTICS:
case T_DIR:
case T_DIRECTORY:
case T_DISTINCT:
case T_DISTRIBUTE:
case T_DO:
case T_DOUBLE:
case T_DROP:
case T_DYNAMIC:
case T_ENABLE:
case T_ENGINE:
case T_ESCAPED:
case T_EXCEPT:
case T_EXEC:
case T_EXECUTE:
case T_EXCEPTION:
case T_EXCLUSIVE:
case T_EXISTS:
case T_EXIT:
case T_FALLBACK:
case T_FALSE:
case T_FETCH:
case T_FIELDS:
case T_FILE:
case T_FILES:
case T_FLOAT:
case T_FOR:
case T_FOREIGN:
case T_FORMAT:
case T_FOUND:
case T_FROM:
case T_FULL:
case T_FUNCTION:
case T_GET:
case T_GLOBAL:
case T_GO:
case T_GRANT:
case T_GROUP:
case T_HANDLER:
case T_HASH:
case T_HAVING:
case T_HDFS:
case T_HIVE:
case T_HOST:
case T_IDENTITY:
case T_IF:
case T_IGNORE:
case T_IMMEDIATE:
case T_IN:
case T_INCLUDE:
case T_INDEX:
case T_INITRANS:
case T_INNER:
case T_INOUT:
case T_INSERT:
case T_INT:
case T_INT2:
case T_INT4:
case T_INT8:
case T_INTEGER:
case T_INTERSECT:
case T_INTERVAL:
case T_INTO:
case T_INVOKER:
case T_IS:
case T_ISOPEN:
case T_ITEMS:
case T_JOIN:
case T_KEEP:
case T_KEY:
case T_KEYS:
case T_LANGUAGE:
case T_LEAVE:
case T_LEFT:
case T_LIKE:
case T_LIMIT:
case T_LINES:
case T_LOCAL:
case T_LOCATION:
case T_LOCATOR:
case T_LOCATORS:
case T_LOCKS:
case T_LOG:
case T_LOGGED:
case T_LOGGING:
case T_LOOP:
case T_MAP:
case T_MATCHED:
case T_MAX:
case T_MAXTRANS:
case T_MERGE:
case T_MESSAGE_TEXT:
case T_MICROSECOND:
case T_MICROSECONDS:
case T_MIN:
case T_MULTISET:
case T_NCHAR:
case T_NEW:
case T_NVARCHAR:
case T_NO:
case T_NOCOUNT:
case T_NOCOMPRESS:
case T_NOLOGGING:
case T_NONE:
case T_NOT:
case T_NOTFOUND:
case T_NUMERIC:
case T_NUMBER:
case T_OBJECT:
case T_OFF:
case T_ON:
case T_ONLY:
case T_OPEN:
case T_OR:
case T_ORDER:
case T_OUT:
case T_OUTER:
case T_OVER:
case T_OVERWRITE:
case T_OWNER:
case T_PACKAGE:
case T_PARTITION:
case T_PCTFREE:
case T_PCTUSED:
case T_PRECISION:
case T_PRESERVE:
case T_PRIMARY:
case T_PRINT:
case T_PROC:
case T_PROCEDURE:
case T_QUALIFY:
case T_QUERY_BAND:
case T_QUIT:
case T_QUOTED_IDENTIFIER:
case T_RAISE:
case T_REAL:
case T_REFERENCES:
case T_REGEXP:
case T_REPLACE:
case T_RESIGNAL:
case T_RESTRICT:
case T_RESULT:
case T_RESULT_SET_LOCATOR:
case T_RETURN:
case T_RETURNS:
case T_REVERSE:
case T_RIGHT:
case T_RLIKE:
case T_ROLE:
case T_ROLLBACK:
case T_ROW:
case T_ROWS:
case T_ROW_COUNT:
case T_RR:
case T_RS:
case T_PWD:
case T_TRIM:
case T_SCHEMA:
case T_SECOND:
case T_SECONDS:
case T_SECURITY:
case T_SEGMENT:
case T_SEL:
case T_SELECT:
case T_SET:
case T_SESSION:
case T_SESSIONS:
case T_SETS:
case T_SHARE:
case T_SIGNAL:
case T_SIMPLE_DOUBLE:
case T_SIMPLE_FLOAT:
case T_SMALLDATETIME:
case T_SMALLINT:
case T_SQL:
case T_SQLEXCEPTION:
case T_SQLINSERT:
case T_SQLSTATE:
case T_SQLWARNING:
case T_STATS:
case T_STATISTICS:
case T_STEP:
case T_STORAGE:
case T_STORED:
case T_STRING:
case T_SUBDIR:
case T_SUBSTRING:
case T_SUM:
case T_SUMMARY:
case T_SYS_REFCURSOR:
case T_TABLE:
case T_TABLESPACE:
case T_TEMPORARY:
case T_TERMINATED:
case T_TEXTIMAGE_ON:
case T_THEN:
case T_TIMESTAMP:
case T_TITLE:
case T_TO:
case T_TOP:
case T_TRANSACTION:
case T_TRUE:
case T_TRUNCATE:
case T_UNIQUE:
case T_UPDATE:
case T_UR:
case T_USE:
case T_USING:
case T_VALUE:
case T_VALUES:
case T_VAR:
case T_VARCHAR:
case T_VARCHAR2:
case T_VARYING:
case T_VOLATILE:
case T_WHILE:
case T_WITH:
case T_WITHOUT:
case T_WORK:
case T_XACT_ABORT:
case T_XML:
case T_YES:
case T_ACTIVITY_COUNT:
case T_CUME_DIST:
case T_CURRENT_DATE:
case T_CURRENT_TIME_MILLIS:
case T_CURRENT_TIMESTAMP:
case T_CURRENT_USER:
case T_DENSE_RANK:
case T_FIRST_VALUE:
case T_LAG:
case T_LAST_VALUE:
case T_LEAD:
case T_PART_COUNT:
case T_PART_LOC:
case T_RANK:
case T_ROW_NUMBER:
case T_STDEV:
case T_SYSDATE:
case T_VARIANCE:
case T_USER:
case T_SUB:
case L_ID:
{
setState(680);
ident();
}
break;
case T_OPEN_P:
{
{
setState(681);
match(T_OPEN_P);
setState(682);
ident();
setState(687);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(683);
match(T_COMMA);
setState(684);
ident();
}
}
setState(689);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(690);
match(T_CLOSE_P);
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(695);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_COLON) {
{
setState(694);
match(T_COLON);
}
}
setState(697);
match(T_EQUAL);
setState(698);
match(T_OPEN_P);
setState(699);
select_stmt();
setState(700);
match(T_CLOSE_P);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Allocate_cursor_stmtContext extends ParserRuleContext {
public TerminalNode T_ALLOCATE() { return getToken(HplsqlParser.T_ALLOCATE, 0); }
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public TerminalNode T_CURSOR() { return getToken(HplsqlParser.T_CURSOR, 0); }
public TerminalNode T_FOR() { return getToken(HplsqlParser.T_FOR, 0); }
public TerminalNode T_PROCEDURE() { return getToken(HplsqlParser.T_PROCEDURE, 0); }
public TerminalNode T_RESULT() { return getToken(HplsqlParser.T_RESULT, 0); }
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public Allocate_cursor_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_allocate_cursor_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAllocate_cursor_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAllocate_cursor_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAllocate_cursor_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Allocate_cursor_stmtContext allocate_cursor_stmt() throws RecognitionException {
Allocate_cursor_stmtContext _localctx = new Allocate_cursor_stmtContext(_ctx, getState());
enterRule(_localctx, 36, RULE_allocate_cursor_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(702);
match(T_ALLOCATE);
setState(703);
ident();
setState(704);
match(T_CURSOR);
setState(705);
match(T_FOR);
setState(709);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_RESULT:
{
{
setState(706);
match(T_RESULT);
setState(707);
match(T_SET);
}
}
break;
case T_PROCEDURE:
{
setState(708);
match(T_PROCEDURE);
}
break;
default:
throw new NoViableAltException(this);
}
setState(711);
ident();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Associate_locator_stmtContext extends ParserRuleContext {
public TerminalNode T_ASSOCIATE() { return getToken(HplsqlParser.T_ASSOCIATE, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public TerminalNode T_WITH() { return getToken(HplsqlParser.T_WITH, 0); }
public TerminalNode T_PROCEDURE() { return getToken(HplsqlParser.T_PROCEDURE, 0); }
public TerminalNode T_LOCATOR() { return getToken(HplsqlParser.T_LOCATOR, 0); }
public TerminalNode T_LOCATORS() { return getToken(HplsqlParser.T_LOCATORS, 0); }
public TerminalNode T_RESULT() { return getToken(HplsqlParser.T_RESULT, 0); }
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Associate_locator_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_associate_locator_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAssociate_locator_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAssociate_locator_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAssociate_locator_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Associate_locator_stmtContext associate_locator_stmt() throws RecognitionException {
Associate_locator_stmtContext _localctx = new Associate_locator_stmtContext(_ctx, getState());
enterRule(_localctx, 38, RULE_associate_locator_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(713);
match(T_ASSOCIATE);
setState(716);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_RESULT) {
{
setState(714);
match(T_RESULT);
setState(715);
match(T_SET);
}
}
setState(718);
_la = _input.LA(1);
if ( !(_la==T_LOCATOR || _la==T_LOCATORS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(719);
match(T_OPEN_P);
setState(720);
ident();
setState(725);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(721);
match(T_COMMA);
setState(722);
ident();
}
}
setState(727);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(728);
match(T_CLOSE_P);
setState(729);
match(T_WITH);
setState(730);
match(T_PROCEDURE);
setState(731);
ident();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Begin_transaction_stmtContext extends ParserRuleContext {
public TerminalNode T_BEGIN() { return getToken(HplsqlParser.T_BEGIN, 0); }
public TerminalNode T_TRANSACTION() { return getToken(HplsqlParser.T_TRANSACTION, 0); }
public Begin_transaction_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_begin_transaction_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterBegin_transaction_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitBegin_transaction_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitBegin_transaction_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Begin_transaction_stmtContext begin_transaction_stmt() throws RecognitionException {
Begin_transaction_stmtContext _localctx = new Begin_transaction_stmtContext(_ctx, getState());
enterRule(_localctx, 40, RULE_begin_transaction_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(733);
match(T_BEGIN);
setState(734);
match(T_TRANSACTION);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Break_stmtContext extends ParserRuleContext {
public TerminalNode T_BREAK() { return getToken(HplsqlParser.T_BREAK, 0); }
public Break_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_break_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterBreak_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitBreak_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitBreak_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Break_stmtContext break_stmt() throws RecognitionException {
Break_stmtContext _localctx = new Break_stmtContext(_ctx, getState());
enterRule(_localctx, 42, RULE_break_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(736);
match(T_BREAK);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Call_stmtContext extends ParserRuleContext {
public TerminalNode T_CALL() { return getToken(HplsqlParser.T_CALL, 0); }
public Expr_dotContext expr_dot() {
return getRuleContext(Expr_dotContext.class,0);
}
public Expr_funcContext expr_func() {
return getRuleContext(Expr_funcContext.class,0);
}
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public Call_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_call_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCall_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCall_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCall_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Call_stmtContext call_stmt() throws RecognitionException {
Call_stmtContext _localctx = new Call_stmtContext(_ctx, getState());
enterRule(_localctx, 44, RULE_call_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(738);
match(T_CALL);
setState(742);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
case 1:
{
setState(739);
expr_dot();
}
break;
case 2:
{
setState(740);
expr_func();
}
break;
case 3:
{
setState(741);
ident();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_stmtContext extends ParserRuleContext {
public TerminalNode T_DECLARE() { return getToken(HplsqlParser.T_DECLARE, 0); }
public List declare_stmt_item() {
return getRuleContexts(Declare_stmt_itemContext.class);
}
public Declare_stmt_itemContext declare_stmt_item(int i) {
return getRuleContext(Declare_stmt_itemContext.class,i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Declare_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Declare_stmtContext declare_stmt() throws RecognitionException {
Declare_stmtContext _localctx = new Declare_stmtContext(_ctx, getState());
enterRule(_localctx, 46, RULE_declare_stmt);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(744);
match(T_DECLARE);
setState(745);
declare_stmt_item();
setState(750);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,30,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(746);
match(T_COMMA);
setState(747);
declare_stmt_item();
}
}
}
setState(752);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,30,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_blockContext extends ParserRuleContext {
public TerminalNode T_DECLARE() { return getToken(HplsqlParser.T_DECLARE, 0); }
public List declare_stmt_item() {
return getRuleContexts(Declare_stmt_itemContext.class);
}
public Declare_stmt_itemContext declare_stmt_item(int i) {
return getRuleContext(Declare_stmt_itemContext.class,i);
}
public List T_SEMICOLON() { return getTokens(HplsqlParser.T_SEMICOLON); }
public TerminalNode T_SEMICOLON(int i) {
return getToken(HplsqlParser.T_SEMICOLON, i);
}
public Declare_blockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_block(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_block(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_block(this);
else return visitor.visitChildren(this);
}
}
public final Declare_blockContext declare_block() throws RecognitionException {
Declare_blockContext _localctx = new Declare_blockContext(_ctx, getState());
enterRule(_localctx, 48, RULE_declare_block);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(753);
match(T_DECLARE);
setState(754);
declare_stmt_item();
setState(755);
match(T_SEMICOLON);
setState(761);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,31,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(756);
declare_stmt_item();
setState(757);
match(T_SEMICOLON);
}
}
}
setState(763);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,31,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_block_inplaceContext extends ParserRuleContext {
public List declare_stmt_item() {
return getRuleContexts(Declare_stmt_itemContext.class);
}
public Declare_stmt_itemContext declare_stmt_item(int i) {
return getRuleContext(Declare_stmt_itemContext.class,i);
}
public List T_SEMICOLON() { return getTokens(HplsqlParser.T_SEMICOLON); }
public TerminalNode T_SEMICOLON(int i) {
return getToken(HplsqlParser.T_SEMICOLON, i);
}
public Declare_block_inplaceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_block_inplace; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_block_inplace(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_block_inplace(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_block_inplace(this);
else return visitor.visitChildren(this);
}
}
public final Declare_block_inplaceContext declare_block_inplace() throws RecognitionException {
Declare_block_inplaceContext _localctx = new Declare_block_inplaceContext(_ctx, getState());
enterRule(_localctx, 50, RULE_declare_block_inplace);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(764);
declare_stmt_item();
setState(765);
match(T_SEMICOLON);
setState(771);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,32,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(766);
declare_stmt_item();
setState(767);
match(T_SEMICOLON);
}
}
}
setState(773);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,32,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_stmt_itemContext extends ParserRuleContext {
public Declare_cursor_itemContext declare_cursor_item() {
return getRuleContext(Declare_cursor_itemContext.class,0);
}
public Declare_condition_itemContext declare_condition_item() {
return getRuleContext(Declare_condition_itemContext.class,0);
}
public Declare_handler_itemContext declare_handler_item() {
return getRuleContext(Declare_handler_itemContext.class,0);
}
public Declare_var_itemContext declare_var_item() {
return getRuleContext(Declare_var_itemContext.class,0);
}
public Declare_temporary_table_itemContext declare_temporary_table_item() {
return getRuleContext(Declare_temporary_table_itemContext.class,0);
}
public Declare_stmt_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_stmt_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_stmt_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_stmt_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_stmt_item(this);
else return visitor.visitChildren(this);
}
}
public final Declare_stmt_itemContext declare_stmt_item() throws RecognitionException {
Declare_stmt_itemContext _localctx = new Declare_stmt_itemContext(_ctx, getState());
enterRule(_localctx, 52, RULE_declare_stmt_item);
try {
setState(779);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(774);
declare_cursor_item();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(775);
declare_condition_item();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(776);
declare_handler_item();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(777);
declare_var_item();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(778);
declare_temporary_table_item();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_var_itemContext extends ParserRuleContext {
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public DtypeContext dtype() {
return getRuleContext(DtypeContext.class,0);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public Dtype_lenContext dtype_len() {
return getRuleContext(Dtype_lenContext.class,0);
}
public List dtype_attr() {
return getRuleContexts(Dtype_attrContext.class);
}
public Dtype_attrContext dtype_attr(int i) {
return getRuleContext(Dtype_attrContext.class,i);
}
public Dtype_defaultContext dtype_default() {
return getRuleContext(Dtype_defaultContext.class,0);
}
public TerminalNode T_CONSTANT() { return getToken(HplsqlParser.T_CONSTANT, 0); }
public Declare_var_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_var_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_var_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_var_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_var_item(this);
else return visitor.visitChildren(this);
}
}
public final Declare_var_itemContext declare_var_item() throws RecognitionException {
Declare_var_itemContext _localctx = new Declare_var_itemContext(_ctx, getState());
enterRule(_localctx, 54, RULE_declare_var_item);
int _la;
try {
int _alt;
setState(816);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(781);
ident();
setState(786);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(782);
match(T_COMMA);
setState(783);
ident();
}
}
setState(788);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(790);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
case 1:
{
setState(789);
match(T_AS);
}
break;
}
setState(792);
dtype();
setState(794);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
case 1:
{
setState(793);
dtype_len();
}
break;
}
setState(799);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,37,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(796);
dtype_attr();
}
}
}
setState(801);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,37,_ctx);
}
setState(803);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
case 1:
{
setState(802);
dtype_default();
}
break;
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(805);
ident();
setState(806);
match(T_CONSTANT);
setState(808);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
case 1:
{
setState(807);
match(T_AS);
}
break;
}
setState(810);
dtype();
setState(812);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_OPEN_P) {
{
setState(811);
dtype_len();
}
}
setState(814);
dtype_default();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_condition_itemContext extends ParserRuleContext {
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public TerminalNode T_CONDITION() { return getToken(HplsqlParser.T_CONDITION, 0); }
public Declare_condition_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_condition_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_condition_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_condition_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_condition_item(this);
else return visitor.visitChildren(this);
}
}
public final Declare_condition_itemContext declare_condition_item() throws RecognitionException {
Declare_condition_itemContext _localctx = new Declare_condition_itemContext(_ctx, getState());
enterRule(_localctx, 56, RULE_declare_condition_item);
try {
enterOuterAlt(_localctx, 1);
{
setState(818);
ident();
setState(819);
match(T_CONDITION);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_cursor_itemContext extends ParserRuleContext {
public TerminalNode T_IS() { return getToken(HplsqlParser.T_IS, 0); }
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public TerminalNode T_FOR() { return getToken(HplsqlParser.T_FOR, 0); }
public TerminalNode T_CURSOR() { return getToken(HplsqlParser.T_CURSOR, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Cursor_with_returnContext cursor_with_return() {
return getRuleContext(Cursor_with_returnContext.class,0);
}
public Cursor_without_returnContext cursor_without_return() {
return getRuleContext(Cursor_without_returnContext.class,0);
}
public Declare_cursor_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_cursor_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_cursor_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_cursor_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_cursor_item(this);
else return visitor.visitChildren(this);
}
}
public final Declare_cursor_itemContext declare_cursor_item() throws RecognitionException {
Declare_cursor_itemContext _localctx = new Declare_cursor_itemContext(_ctx, getState());
enterRule(_localctx, 58, RULE_declare_cursor_item);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(826);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
case 1:
{
setState(821);
match(T_CURSOR);
setState(822);
ident();
}
break;
case 2:
{
setState(823);
ident();
setState(824);
match(T_CURSOR);
}
break;
}
setState(830);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_WITH:
{
setState(828);
cursor_with_return();
}
break;
case T_WITHOUT:
{
setState(829);
cursor_without_return();
}
break;
case T_AS:
case T_FOR:
case T_IS:
break;
default:
break;
}
setState(832);
_la = _input.LA(1);
if ( !(_la==T_AS || _la==T_FOR || _la==T_IS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(835);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) {
case 1:
{
setState(833);
select_stmt();
}
break;
case 2:
{
setState(834);
expr(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Cursor_with_returnContext extends ParserRuleContext {
public TerminalNode T_WITH() { return getToken(HplsqlParser.T_WITH, 0); }
public TerminalNode T_RETURN() { return getToken(HplsqlParser.T_RETURN, 0); }
public TerminalNode T_ONLY() { return getToken(HplsqlParser.T_ONLY, 0); }
public TerminalNode T_TO() { return getToken(HplsqlParser.T_TO, 0); }
public TerminalNode T_CALLER() { return getToken(HplsqlParser.T_CALLER, 0); }
public TerminalNode T_CLIENT() { return getToken(HplsqlParser.T_CLIENT, 0); }
public Cursor_with_returnContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_cursor_with_return; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCursor_with_return(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCursor_with_return(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCursor_with_return(this);
else return visitor.visitChildren(this);
}
}
public final Cursor_with_returnContext cursor_with_return() throws RecognitionException {
Cursor_with_returnContext _localctx = new Cursor_with_returnContext(_ctx, getState());
enterRule(_localctx, 60, RULE_cursor_with_return);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(837);
match(T_WITH);
setState(838);
match(T_RETURN);
setState(840);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ONLY) {
{
setState(839);
match(T_ONLY);
}
}
setState(844);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_TO) {
{
setState(842);
match(T_TO);
setState(843);
_la = _input.LA(1);
if ( !(_la==T_CALLER || _la==T_CLIENT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Cursor_without_returnContext extends ParserRuleContext {
public TerminalNode T_WITHOUT() { return getToken(HplsqlParser.T_WITHOUT, 0); }
public TerminalNode T_RETURN() { return getToken(HplsqlParser.T_RETURN, 0); }
public Cursor_without_returnContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_cursor_without_return; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCursor_without_return(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCursor_without_return(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCursor_without_return(this);
else return visitor.visitChildren(this);
}
}
public final Cursor_without_returnContext cursor_without_return() throws RecognitionException {
Cursor_without_returnContext _localctx = new Cursor_without_returnContext(_ctx, getState());
enterRule(_localctx, 62, RULE_cursor_without_return);
try {
enterOuterAlt(_localctx, 1);
{
setState(846);
match(T_WITHOUT);
setState(847);
match(T_RETURN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_handler_itemContext extends ParserRuleContext {
public TerminalNode T_HANDLER() { return getToken(HplsqlParser.T_HANDLER, 0); }
public TerminalNode T_FOR() { return getToken(HplsqlParser.T_FOR, 0); }
public Single_block_stmtContext single_block_stmt() {
return getRuleContext(Single_block_stmtContext.class,0);
}
public TerminalNode T_CONTINUE() { return getToken(HplsqlParser.T_CONTINUE, 0); }
public TerminalNode T_EXIT() { return getToken(HplsqlParser.T_EXIT, 0); }
public TerminalNode T_SQLEXCEPTION() { return getToken(HplsqlParser.T_SQLEXCEPTION, 0); }
public TerminalNode T_SQLWARNING() { return getToken(HplsqlParser.T_SQLWARNING, 0); }
public TerminalNode T_NOT() { return getToken(HplsqlParser.T_NOT, 0); }
public TerminalNode T_FOUND() { return getToken(HplsqlParser.T_FOUND, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public Declare_handler_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_handler_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_handler_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_handler_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_handler_item(this);
else return visitor.visitChildren(this);
}
}
public final Declare_handler_itemContext declare_handler_item() throws RecognitionException {
Declare_handler_itemContext _localctx = new Declare_handler_itemContext(_ctx, getState());
enterRule(_localctx, 64, RULE_declare_handler_item);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(849);
_la = _input.LA(1);
if ( !(_la==T_CONTINUE || _la==T_EXIT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(850);
match(T_HANDLER);
setState(851);
match(T_FOR);
setState(857);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) {
case 1:
{
setState(852);
match(T_SQLEXCEPTION);
}
break;
case 2:
{
setState(853);
match(T_SQLWARNING);
}
break;
case 3:
{
setState(854);
match(T_NOT);
setState(855);
match(T_FOUND);
}
break;
case 4:
{
setState(856);
ident();
}
break;
}
setState(859);
single_block_stmt();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Declare_temporary_table_itemContext extends ParserRuleContext {
public TerminalNode T_TEMPORARY() { return getToken(HplsqlParser.T_TEMPORARY, 0); }
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Create_table_definitionContext create_table_definition() {
return getRuleContext(Create_table_definitionContext.class,0);
}
public TerminalNode T_GLOBAL() { return getToken(HplsqlParser.T_GLOBAL, 0); }
public Create_table_preoptionsContext create_table_preoptions() {
return getRuleContext(Create_table_preoptionsContext.class,0);
}
public Declare_temporary_table_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declare_temporary_table_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDeclare_temporary_table_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDeclare_temporary_table_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDeclare_temporary_table_item(this);
else return visitor.visitChildren(this);
}
}
public final Declare_temporary_table_itemContext declare_temporary_table_item() throws RecognitionException {
Declare_temporary_table_itemContext _localctx = new Declare_temporary_table_itemContext(_ctx, getState());
enterRule(_localctx, 66, RULE_declare_temporary_table_item);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(862);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_GLOBAL) {
{
setState(861);
match(T_GLOBAL);
}
}
setState(864);
match(T_TEMPORARY);
setState(865);
match(T_TABLE);
setState(866);
qident();
setState(868);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ROW || _la==T_STORED || _la==T_COMMA) {
{
setState(867);
create_table_preoptions();
}
}
setState(870);
create_table_definition();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_stmtContext extends ParserRuleContext {
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public Create_table_definitionContext create_table_definition() {
return getRuleContext(Create_table_definitionContext.class,0);
}
public TerminalNode T_IF() { return getToken(HplsqlParser.T_IF, 0); }
public TerminalNode T_NOT() { return getToken(HplsqlParser.T_NOT, 0); }
public TerminalNode T_EXISTS() { return getToken(HplsqlParser.T_EXISTS, 0); }
public Create_table_preoptionsContext create_table_preoptions() {
return getRuleContext(Create_table_preoptionsContext.class,0);
}
public Create_table_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_stmtContext create_table_stmt() throws RecognitionException {
Create_table_stmtContext _localctx = new Create_table_stmtContext(_ctx, getState());
enterRule(_localctx, 68, RULE_create_table_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(872);
match(T_CREATE);
setState(873);
match(T_TABLE);
setState(877);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) {
case 1:
{
setState(874);
match(T_IF);
setState(875);
match(T_NOT);
setState(876);
match(T_EXISTS);
}
break;
}
setState(879);
table_name();
setState(881);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ROW || _la==T_STORED || _la==T_COMMA) {
{
setState(880);
create_table_preoptions();
}
}
setState(883);
create_table_definition();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_local_temp_table_stmtContext extends ParserRuleContext {
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Create_table_definitionContext create_table_definition() {
return getRuleContext(Create_table_definitionContext.class,0);
}
public TerminalNode T_LOCAL() { return getToken(HplsqlParser.T_LOCAL, 0); }
public TerminalNode T_TEMPORARY() { return getToken(HplsqlParser.T_TEMPORARY, 0); }
public TerminalNode T_VOLATILE() { return getToken(HplsqlParser.T_VOLATILE, 0); }
public Create_table_preoptionsContext create_table_preoptions() {
return getRuleContext(Create_table_preoptionsContext.class,0);
}
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public TerminalNode T_MULTISET() { return getToken(HplsqlParser.T_MULTISET, 0); }
public Create_local_temp_table_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_local_temp_table_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_local_temp_table_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_local_temp_table_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_local_temp_table_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_local_temp_table_stmtContext create_local_temp_table_stmt() throws RecognitionException {
Create_local_temp_table_stmtContext _localctx = new Create_local_temp_table_stmtContext(_ctx, getState());
enterRule(_localctx, 70, RULE_create_local_temp_table_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(885);
match(T_CREATE);
setState(892);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_LOCAL:
{
setState(886);
match(T_LOCAL);
setState(887);
match(T_TEMPORARY);
}
break;
case T_MULTISET:
case T_SET:
case T_VOLATILE:
{
setState(889);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_MULTISET || _la==T_SET) {
{
setState(888);
_la = _input.LA(1);
if ( !(_la==T_MULTISET || _la==T_SET) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(891);
match(T_VOLATILE);
}
break;
default:
throw new NoViableAltException(this);
}
setState(894);
match(T_TABLE);
setState(895);
qident();
setState(897);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ROW || _la==T_STORED || _la==T_COMMA) {
{
setState(896);
create_table_preoptions();
}
}
setState(899);
create_table_definition();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_definitionContext extends ParserRuleContext {
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public Create_table_columnsContext create_table_columns() {
return getRuleContext(Create_table_columnsContext.class,0);
}
public TerminalNode T_LIKE() { return getToken(HplsqlParser.T_LIKE, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public Create_table_optionsContext create_table_options() {
return getRuleContext(Create_table_optionsContext.class,0);
}
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public Create_table_definitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_definition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_definition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_definition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_definition(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_definitionContext create_table_definition() throws RecognitionException {
Create_table_definitionContext _localctx = new Create_table_definitionContext(_ctx, getState());
enterRule(_localctx, 72, RULE_create_table_definition);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(918);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) {
case 1:
{
setState(902);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_AS) {
{
setState(901);
match(T_AS);
}
}
setState(904);
match(T_OPEN_P);
setState(905);
select_stmt();
setState(906);
match(T_CLOSE_P);
}
break;
case 2:
{
setState(909);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_AS) {
{
setState(908);
match(T_AS);
}
}
setState(911);
select_stmt();
}
break;
case 3:
{
setState(912);
match(T_OPEN_P);
setState(913);
create_table_columns();
setState(914);
match(T_CLOSE_P);
}
break;
case 4:
{
setState(916);
match(T_LIKE);
setState(917);
table_name();
}
break;
}
setState(921);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) {
case 1:
{
setState(920);
create_table_options();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_columnsContext extends ParserRuleContext {
public List create_table_columns_item() {
return getRuleContexts(Create_table_columns_itemContext.class);
}
public Create_table_columns_itemContext create_table_columns_item(int i) {
return getRuleContext(Create_table_columns_itemContext.class,i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Create_table_columnsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_columns; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_columns(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_columns(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_columns(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_columnsContext create_table_columns() throws RecognitionException {
Create_table_columnsContext _localctx = new Create_table_columnsContext(_ctx, getState());
enterRule(_localctx, 74, RULE_create_table_columns);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(923);
create_table_columns_item();
setState(928);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(924);
match(T_COMMA);
setState(925);
create_table_columns_item();
}
}
setState(930);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_columns_itemContext extends ParserRuleContext {
public Column_nameContext column_name() {
return getRuleContext(Column_nameContext.class,0);
}
public DtypeContext dtype() {
return getRuleContext(DtypeContext.class,0);
}
public Dtype_lenContext dtype_len() {
return getRuleContext(Dtype_lenContext.class,0);
}
public List dtype_attr() {
return getRuleContexts(Dtype_attrContext.class);
}
public Dtype_attrContext dtype_attr(int i) {
return getRuleContext(Dtype_attrContext.class,i);
}
public List create_table_column_inline_cons() {
return getRuleContexts(Create_table_column_inline_consContext.class);
}
public Create_table_column_inline_consContext create_table_column_inline_cons(int i) {
return getRuleContext(Create_table_column_inline_consContext.class,i);
}
public Create_table_column_consContext create_table_column_cons() {
return getRuleContext(Create_table_column_consContext.class,0);
}
public TerminalNode T_CONSTRAINT() { return getToken(HplsqlParser.T_CONSTRAINT, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Create_table_columns_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_columns_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_columns_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_columns_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_columns_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_columns_itemContext create_table_columns_item() throws RecognitionException {
Create_table_columns_itemContext _localctx = new Create_table_columns_itemContext(_ctx, getState());
enterRule(_localctx, 76, RULE_create_table_columns_item);
int _la;
try {
int _alt;
setState(953);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,64,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(931);
column_name();
setState(932);
dtype();
setState(934);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_OPEN_P) {
{
setState(933);
dtype_len();
}
}
setState(939);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,61,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(936);
dtype_attr();
}
}
}
setState(941);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,61,_ctx);
}
setState(945);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_AUTO_INCREMENT || ((((_la - 75)) & ~0x3f) == 0 && ((1L << (_la - 75)) & ((1L << (T_DEFAULT - 75)) | (1L << (T_ENABLE - 75)) | (1L << (T_IDENTITY - 75)))) != 0) || ((((_la - 194)) & ~0x3f) == 0 && ((1L << (_la - 194)) & ((1L << (T_NOT - 194)) | (1L << (T_NULL - 194)) | (1L << (T_PRIMARY - 194)) | (1L << (T_REFERENCES - 194)))) != 0) || ((((_la - 302)) & ~0x3f) == 0 && ((1L << (_la - 302)) & ((1L << (T_UNIQUE - 302)) | (1L << (T_WITH - 302)) | (1L << (T_COLON - 302)) | (1L << (T_EQUAL - 302)))) != 0)) {
{
{
setState(942);
create_table_column_inline_cons();
}
}
setState(947);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(950);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_CONSTRAINT) {
{
setState(948);
match(T_CONSTRAINT);
setState(949);
qident();
}
}
setState(952);
create_table_column_cons();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_type_stmtContext extends ParserRuleContext {
public TerminalNode T_TYPE() { return getToken(HplsqlParser.T_TYPE, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public TerminalNode T_IS() { return getToken(HplsqlParser.T_IS, 0); }
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public TerminalNode T_OF() { return getToken(HplsqlParser.T_OF, 0); }
public Tbl_typeContext tbl_type() {
return getRuleContext(Tbl_typeContext.class,0);
}
public TerminalNode T_INDEX() { return getToken(HplsqlParser.T_INDEX, 0); }
public TerminalNode T_BY() { return getToken(HplsqlParser.T_BY, 0); }
public DtypeContext dtype() {
return getRuleContext(DtypeContext.class,0);
}
public TerminalNode T_NOT() { return getToken(HplsqlParser.T_NOT, 0); }
public TerminalNode T_NULL() { return getToken(HplsqlParser.T_NULL, 0); }
public Create_table_type_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_type_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_type_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_type_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_type_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_type_stmtContext create_table_type_stmt() throws RecognitionException {
Create_table_type_stmtContext _localctx = new Create_table_type_stmtContext(_ctx, getState());
enterRule(_localctx, 78, RULE_create_table_type_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(955);
match(T_TYPE);
setState(956);
ident();
setState(957);
match(T_IS);
setState(958);
match(T_TABLE);
setState(959);
match(T_OF);
setState(960);
tbl_type();
setState(963);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_NOT) {
{
setState(961);
match(T_NOT);
setState(962);
match(T_NULL);
}
}
setState(965);
match(T_INDEX);
setState(966);
match(T_BY);
setState(967);
dtype();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Tbl_typeContext extends ParserRuleContext {
public Sql_typeContext sql_type() {
return getRuleContext(Sql_typeContext.class,0);
}
public DtypeContext dtype() {
return getRuleContext(DtypeContext.class,0);
}
public Tbl_typeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_tbl_type; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterTbl_type(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitTbl_type(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitTbl_type(this);
else return visitor.visitChildren(this);
}
}
public final Tbl_typeContext tbl_type() throws RecognitionException {
Tbl_typeContext _localctx = new Tbl_typeContext(_ctx, getState());
enterRule(_localctx, 80, RULE_tbl_type);
try {
setState(971);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,66,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(969);
sql_type();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(970);
dtype();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Sql_typeContext extends ParserRuleContext {
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_TYPE() { return getToken(HplsqlParser.T_TYPE, 0); }
public TerminalNode T_ROWTYPE() { return getToken(HplsqlParser.T_ROWTYPE, 0); }
public Sql_typeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sql_type; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSql_type(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSql_type(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSql_type(this);
else return visitor.visitChildren(this);
}
}
public final Sql_typeContext sql_type() throws RecognitionException {
Sql_typeContext _localctx = new Sql_typeContext(_ctx, getState());
enterRule(_localctx, 82, RULE_sql_type);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(973);
qident();
setState(974);
match(T__2);
setState(975);
_la = _input.LA(1);
if ( !(_la==T_ROWTYPE || _la==T_TYPE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Column_nameContext extends ParserRuleContext {
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Column_nameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_column_name; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterColumn_name(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitColumn_name(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitColumn_name(this);
else return visitor.visitChildren(this);
}
}
public final Column_nameContext column_name() throws RecognitionException {
Column_nameContext _localctx = new Column_nameContext(_ctx, getState());
enterRule(_localctx, 84, RULE_column_name);
try {
enterOuterAlt(_localctx, 1);
{
setState(977);
qident();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_column_inline_consContext extends ParserRuleContext {
public Dtype_defaultContext dtype_default() {
return getRuleContext(Dtype_defaultContext.class,0);
}
public TerminalNode T_NULL() { return getToken(HplsqlParser.T_NULL, 0); }
public TerminalNode T_NOT() { return getToken(HplsqlParser.T_NOT, 0); }
public TerminalNode T_PRIMARY() { return getToken(HplsqlParser.T_PRIMARY, 0); }
public TerminalNode T_KEY() { return getToken(HplsqlParser.T_KEY, 0); }
public TerminalNode T_UNIQUE() { return getToken(HplsqlParser.T_UNIQUE, 0); }
public TerminalNode T_REFERENCES() { return getToken(HplsqlParser.T_REFERENCES, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List create_table_fk_action() {
return getRuleContexts(Create_table_fk_actionContext.class);
}
public Create_table_fk_actionContext create_table_fk_action(int i) {
return getRuleContext(Create_table_fk_actionContext.class,i);
}
public TerminalNode T_IDENTITY() { return getToken(HplsqlParser.T_IDENTITY, 0); }
public List L_INT() { return getTokens(HplsqlParser.L_INT); }
public TerminalNode L_INT(int i) {
return getToken(HplsqlParser.L_INT, i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public TerminalNode T_AUTO_INCREMENT() { return getToken(HplsqlParser.T_AUTO_INCREMENT, 0); }
public TerminalNode T_ENABLE() { return getToken(HplsqlParser.T_ENABLE, 0); }
public Create_table_column_inline_consContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_column_inline_cons; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_column_inline_cons(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_column_inline_cons(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_column_inline_cons(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_column_inline_consContext create_table_column_inline_cons() throws RecognitionException {
Create_table_column_inline_consContext _localctx = new Create_table_column_inline_consContext(_ctx, getState());
enterRule(_localctx, 86, RULE_create_table_column_inline_cons);
int _la;
try {
setState(1011);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_DEFAULT:
case T_WITH:
case T_COLON:
case T_EQUAL:
enterOuterAlt(_localctx, 1);
{
setState(979);
dtype_default();
}
break;
case T_NOT:
case T_NULL:
enterOuterAlt(_localctx, 2);
{
setState(981);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_NOT) {
{
setState(980);
match(T_NOT);
}
}
setState(983);
match(T_NULL);
}
break;
case T_PRIMARY:
enterOuterAlt(_localctx, 3);
{
setState(984);
match(T_PRIMARY);
setState(985);
match(T_KEY);
}
break;
case T_UNIQUE:
enterOuterAlt(_localctx, 4);
{
setState(986);
match(T_UNIQUE);
}
break;
case T_REFERENCES:
enterOuterAlt(_localctx, 5);
{
setState(987);
match(T_REFERENCES);
setState(988);
table_name();
setState(989);
match(T_OPEN_P);
setState(990);
qident();
setState(991);
match(T_CLOSE_P);
setState(995);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_ON) {
{
{
setState(992);
create_table_fk_action();
}
}
setState(997);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
case T_IDENTITY:
enterOuterAlt(_localctx, 6);
{
setState(998);
match(T_IDENTITY);
setState(999);
match(T_OPEN_P);
setState(1000);
match(L_INT);
setState(1005);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1001);
match(T_COMMA);
setState(1002);
match(L_INT);
}
}
setState(1007);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1008);
match(T_CLOSE_P);
}
break;
case T_AUTO_INCREMENT:
enterOuterAlt(_localctx, 7);
{
setState(1009);
match(T_AUTO_INCREMENT);
}
break;
case T_ENABLE:
enterOuterAlt(_localctx, 8);
{
setState(1010);
match(T_ENABLE);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_column_consContext extends ParserRuleContext {
public TerminalNode T_PRIMARY() { return getToken(HplsqlParser.T_PRIMARY, 0); }
public TerminalNode T_KEY() { return getToken(HplsqlParser.T_KEY, 0); }
public List T_OPEN_P() { return getTokens(HplsqlParser.T_OPEN_P); }
public TerminalNode T_OPEN_P(int i) {
return getToken(HplsqlParser.T_OPEN_P, i);
}
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public List T_CLOSE_P() { return getTokens(HplsqlParser.T_CLOSE_P); }
public TerminalNode T_CLOSE_P(int i) {
return getToken(HplsqlParser.T_CLOSE_P, i);
}
public TerminalNode T_CLUSTERED() { return getToken(HplsqlParser.T_CLUSTERED, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public TerminalNode T_ENABLE() { return getToken(HplsqlParser.T_ENABLE, 0); }
public Index_storage_clauseContext index_storage_clause() {
return getRuleContext(Index_storage_clauseContext.class,0);
}
public List T_ASC() { return getTokens(HplsqlParser.T_ASC); }
public TerminalNode T_ASC(int i) {
return getToken(HplsqlParser.T_ASC, i);
}
public List T_DESC() { return getTokens(HplsqlParser.T_DESC); }
public TerminalNode T_DESC(int i) {
return getToken(HplsqlParser.T_DESC, i);
}
public TerminalNode T_FOREIGN() { return getToken(HplsqlParser.T_FOREIGN, 0); }
public TerminalNode T_REFERENCES() { return getToken(HplsqlParser.T_REFERENCES, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public List create_table_fk_action() {
return getRuleContexts(Create_table_fk_actionContext.class);
}
public Create_table_fk_actionContext create_table_fk_action(int i) {
return getRuleContext(Create_table_fk_actionContext.class,i);
}
public Create_table_column_consContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_column_cons; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_column_cons(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_column_cons(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_column_cons(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_column_consContext create_table_column_cons() throws RecognitionException {
Create_table_column_consContext _localctx = new Create_table_column_consContext(_ctx, getState());
enterRule(_localctx, 88, RULE_create_table_column_cons);
int _la;
try {
setState(1070);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_PRIMARY:
enterOuterAlt(_localctx, 1);
{
setState(1013);
match(T_PRIMARY);
setState(1014);
match(T_KEY);
setState(1016);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_CLUSTERED) {
{
setState(1015);
match(T_CLUSTERED);
}
}
setState(1018);
match(T_OPEN_P);
setState(1019);
qident();
setState(1021);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ASC || _la==T_DESC) {
{
setState(1020);
_la = _input.LA(1);
if ( !(_la==T_ASC || _la==T_DESC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(1030);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1023);
match(T_COMMA);
setState(1024);
qident();
setState(1026);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ASC || _la==T_DESC) {
{
setState(1025);
_la = _input.LA(1);
if ( !(_la==T_ASC || _la==T_DESC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
}
}
setState(1032);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1033);
match(T_CLOSE_P);
setState(1035);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ENABLE) {
{
setState(1034);
match(T_ENABLE);
}
}
setState(1038);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_WITH) {
{
setState(1037);
index_storage_clause();
}
}
}
break;
case T_FOREIGN:
enterOuterAlt(_localctx, 2);
{
setState(1040);
match(T_FOREIGN);
setState(1041);
match(T_KEY);
setState(1042);
match(T_OPEN_P);
setState(1043);
qident();
setState(1048);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1044);
match(T_COMMA);
setState(1045);
qident();
}
}
setState(1050);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1051);
match(T_CLOSE_P);
setState(1052);
match(T_REFERENCES);
setState(1053);
table_name();
setState(1054);
match(T_OPEN_P);
setState(1055);
qident();
setState(1060);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1056);
match(T_COMMA);
setState(1057);
qident();
}
}
setState(1062);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1063);
match(T_CLOSE_P);
setState(1067);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_ON) {
{
{
setState(1064);
create_table_fk_action();
}
}
setState(1069);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_fk_actionContext extends ParserRuleContext {
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public TerminalNode T_UPDATE() { return getToken(HplsqlParser.T_UPDATE, 0); }
public TerminalNode T_DELETE() { return getToken(HplsqlParser.T_DELETE, 0); }
public TerminalNode T_NO() { return getToken(HplsqlParser.T_NO, 0); }
public TerminalNode T_ACTION() { return getToken(HplsqlParser.T_ACTION, 0); }
public TerminalNode T_RESTRICT() { return getToken(HplsqlParser.T_RESTRICT, 0); }
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public TerminalNode T_NULL() { return getToken(HplsqlParser.T_NULL, 0); }
public TerminalNode T_DEFAULT() { return getToken(HplsqlParser.T_DEFAULT, 0); }
public TerminalNode T_CASCADE() { return getToken(HplsqlParser.T_CASCADE, 0); }
public Create_table_fk_actionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_fk_action; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_fk_action(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_fk_action(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_fk_action(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_fk_actionContext create_table_fk_action() throws RecognitionException {
Create_table_fk_actionContext _localctx = new Create_table_fk_actionContext(_ctx, getState());
enterRule(_localctx, 90, RULE_create_table_fk_action);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1072);
match(T_ON);
setState(1073);
_la = _input.LA(1);
if ( !(_la==T_DELETE || _la==T_UPDATE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1082);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) {
case 1:
{
setState(1074);
match(T_NO);
setState(1075);
match(T_ACTION);
}
break;
case 2:
{
setState(1076);
match(T_RESTRICT);
}
break;
case 3:
{
setState(1077);
match(T_SET);
setState(1078);
match(T_NULL);
}
break;
case 4:
{
setState(1079);
match(T_SET);
setState(1080);
match(T_DEFAULT);
}
break;
case 5:
{
setState(1081);
match(T_CASCADE);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_preoptionsContext extends ParserRuleContext {
public List create_table_preoptions_item() {
return getRuleContexts(Create_table_preoptions_itemContext.class);
}
public Create_table_preoptions_itemContext create_table_preoptions_item(int i) {
return getRuleContext(Create_table_preoptions_itemContext.class,i);
}
public Create_table_preoptionsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_preoptions; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_preoptions(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_preoptions(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_preoptions(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_preoptionsContext create_table_preoptions() throws RecognitionException {
Create_table_preoptionsContext _localctx = new Create_table_preoptionsContext(_ctx, getState());
enterRule(_localctx, 92, RULE_create_table_preoptions);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1085);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1084);
create_table_preoptions_item();
}
}
setState(1087);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==T_ROW || _la==T_STORED || _la==T_COMMA );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_preoptions_itemContext extends ParserRuleContext {
public TerminalNode T_COMMA() { return getToken(HplsqlParser.T_COMMA, 0); }
public Create_table_preoptions_td_itemContext create_table_preoptions_td_item() {
return getRuleContext(Create_table_preoptions_td_itemContext.class,0);
}
public Create_table_options_hive_itemContext create_table_options_hive_item() {
return getRuleContext(Create_table_options_hive_itemContext.class,0);
}
public Create_table_preoptions_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_preoptions_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_preoptions_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_preoptions_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_preoptions_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_preoptions_itemContext create_table_preoptions_item() throws RecognitionException {
Create_table_preoptions_itemContext _localctx = new Create_table_preoptions_itemContext(_ctx, getState());
enterRule(_localctx, 94, RULE_create_table_preoptions_item);
try {
setState(1092);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_COMMA:
enterOuterAlt(_localctx, 1);
{
setState(1089);
match(T_COMMA);
setState(1090);
create_table_preoptions_td_item();
}
break;
case T_ROW:
case T_STORED:
enterOuterAlt(_localctx, 2);
{
setState(1091);
create_table_options_hive_item();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_preoptions_td_itemContext extends ParserRuleContext {
public TerminalNode T_LOG() { return getToken(HplsqlParser.T_LOG, 0); }
public TerminalNode T_FALLBACK() { return getToken(HplsqlParser.T_FALLBACK, 0); }
public TerminalNode T_NO() { return getToken(HplsqlParser.T_NO, 0); }
public Create_table_preoptions_td_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_preoptions_td_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_preoptions_td_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_preoptions_td_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_preoptions_td_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_preoptions_td_itemContext create_table_preoptions_td_item() throws RecognitionException {
Create_table_preoptions_td_itemContext _localctx = new Create_table_preoptions_td_itemContext(_ctx, getState());
enterRule(_localctx, 96, RULE_create_table_preoptions_td_item);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1095);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_NO) {
{
setState(1094);
match(T_NO);
}
}
setState(1097);
_la = _input.LA(1);
if ( !(_la==T_FALLBACK || _la==T_LOG) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_optionsContext extends ParserRuleContext {
public List create_table_options_item() {
return getRuleContexts(Create_table_options_itemContext.class);
}
public Create_table_options_itemContext create_table_options_item(int i) {
return getRuleContext(Create_table_options_itemContext.class,i);
}
public Create_table_optionsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_optionsContext create_table_options() throws RecognitionException {
Create_table_optionsContext _localctx = new Create_table_optionsContext(_ctx, getState());
enterRule(_localctx, 98, RULE_create_table_options);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1100);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1099);
create_table_options_item();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1102);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,85,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_options_itemContext extends ParserRuleContext {
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public TerminalNode T_COMMIT() { return getToken(HplsqlParser.T_COMMIT, 0); }
public TerminalNode T_ROWS() { return getToken(HplsqlParser.T_ROWS, 0); }
public TerminalNode T_DELETE() { return getToken(HplsqlParser.T_DELETE, 0); }
public TerminalNode T_PRESERVE() { return getToken(HplsqlParser.T_PRESERVE, 0); }
public Create_table_options_ora_itemContext create_table_options_ora_item() {
return getRuleContext(Create_table_options_ora_itemContext.class,0);
}
public Create_table_options_db2_itemContext create_table_options_db2_item() {
return getRuleContext(Create_table_options_db2_itemContext.class,0);
}
public Create_table_options_td_itemContext create_table_options_td_item() {
return getRuleContext(Create_table_options_td_itemContext.class,0);
}
public Create_table_options_hive_itemContext create_table_options_hive_item() {
return getRuleContext(Create_table_options_hive_itemContext.class,0);
}
public Create_table_options_mssql_itemContext create_table_options_mssql_item() {
return getRuleContext(Create_table_options_mssql_itemContext.class,0);
}
public Create_table_options_mysql_itemContext create_table_options_mysql_item() {
return getRuleContext(Create_table_options_mysql_itemContext.class,0);
}
public Create_table_options_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_options_itemContext create_table_options_item() throws RecognitionException {
Create_table_options_itemContext _localctx = new Create_table_options_itemContext(_ctx, getState());
enterRule(_localctx, 100, RULE_create_table_options_item);
int _la;
try {
setState(1114);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1104);
match(T_ON);
setState(1105);
match(T_COMMIT);
setState(1106);
_la = _input.LA(1);
if ( !(_la==T_DELETE || _la==T_PRESERVE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1107);
match(T_ROWS);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1108);
create_table_options_ora_item();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1109);
create_table_options_db2_item();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1110);
create_table_options_td_item();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1111);
create_table_options_hive_item();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1112);
create_table_options_mssql_item();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(1113);
create_table_options_mysql_item();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_options_ora_itemContext extends ParserRuleContext {
public TerminalNode T_SEGMENT() { return getToken(HplsqlParser.T_SEGMENT, 0); }
public TerminalNode T_CREATION() { return getToken(HplsqlParser.T_CREATION, 0); }
public TerminalNode T_IMMEDIATE() { return getToken(HplsqlParser.T_IMMEDIATE, 0); }
public TerminalNode T_DEFERRED() { return getToken(HplsqlParser.T_DEFERRED, 0); }
public List L_INT() { return getTokens(HplsqlParser.L_INT); }
public TerminalNode L_INT(int i) {
return getToken(HplsqlParser.L_INT, i);
}
public TerminalNode T_PCTFREE() { return getToken(HplsqlParser.T_PCTFREE, 0); }
public TerminalNode T_PCTUSED() { return getToken(HplsqlParser.T_PCTUSED, 0); }
public TerminalNode T_INITRANS() { return getToken(HplsqlParser.T_INITRANS, 0); }
public TerminalNode T_MAXTRANS() { return getToken(HplsqlParser.T_MAXTRANS, 0); }
public TerminalNode T_NOCOMPRESS() { return getToken(HplsqlParser.T_NOCOMPRESS, 0); }
public TerminalNode T_LOGGING() { return getToken(HplsqlParser.T_LOGGING, 0); }
public TerminalNode T_NOLOGGING() { return getToken(HplsqlParser.T_NOLOGGING, 0); }
public TerminalNode T_STORAGE() { return getToken(HplsqlParser.T_STORAGE, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public TerminalNode T_TABLESPACE() { return getToken(HplsqlParser.T_TABLESPACE, 0); }
public Create_table_options_ora_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options_ora_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options_ora_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options_ora_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options_ora_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_options_ora_itemContext create_table_options_ora_item() throws RecognitionException {
Create_table_options_ora_itemContext _localctx = new Create_table_options_ora_itemContext(_ctx, getState());
enterRule(_localctx, 102, RULE_create_table_options_ora_item);
int _la;
try {
setState(1134);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_SEGMENT:
enterOuterAlt(_localctx, 1);
{
setState(1116);
match(T_SEGMENT);
setState(1117);
match(T_CREATION);
setState(1118);
_la = _input.LA(1);
if ( !(_la==T_DEFERRED || _la==T_IMMEDIATE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case T_INITRANS:
case T_MAXTRANS:
case T_PCTFREE:
case T_PCTUSED:
enterOuterAlt(_localctx, 2);
{
setState(1119);
_la = _input.LA(1);
if ( !(_la==T_INITRANS || _la==T_MAXTRANS || _la==T_PCTFREE || _la==T_PCTUSED) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1120);
match(L_INT);
}
break;
case T_NOCOMPRESS:
enterOuterAlt(_localctx, 3);
{
setState(1121);
match(T_NOCOMPRESS);
}
break;
case T_LOGGING:
case T_NOLOGGING:
enterOuterAlt(_localctx, 4);
{
setState(1122);
_la = _input.LA(1);
if ( !(_la==T_LOGGING || _la==T_NOLOGGING) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case T_STORAGE:
enterOuterAlt(_localctx, 5);
{
setState(1123);
match(T_STORAGE);
setState(1124);
match(T_OPEN_P);
setState(1127);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
setState(1127);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ACTION:
case T_ADD2:
case T_ALL:
case T_ALLOCATE:
case T_ALTER:
case T_AND:
case T_ANSI_NULLS:
case T_ANSI_PADDING:
case T_AS:
case T_ASC:
case T_ASSOCIATE:
case T_AT:
case T_AUTO_INCREMENT:
case T_AVG:
case T_BATCHSIZE:
case T_BEGIN:
case T_BETWEEN:
case T_BIGINT:
case T_BINARY_DOUBLE:
case T_BINARY_FLOAT:
case T_BIT:
case T_BODY:
case T_BREAK:
case T_BULK:
case T_BY:
case T_BYTE:
case T_CALL:
case T_CALLER:
case T_CASCADE:
case T_CASE:
case T_CASESPECIFIC:
case T_CAST:
case T_CHAR:
case T_CHARACTER:
case T_CHARSET:
case T_CLIENT:
case T_CLOSE:
case T_CLUSTERED:
case T_CMP:
case T_COLLECT:
case T_COLLECTION:
case T_COLUMN:
case T_COMMENT:
case T_CONSTANT:
case T_COMMIT:
case T_COMPRESS:
case T_CONCAT:
case T_CONDITION:
case T_CONSTRAINT:
case T_CONTINUE:
case T_COPY:
case T_COUNT:
case T_COUNT_BIG:
case T_CREATE:
case T_CREATION:
case T_CREATOR:
case T_CS:
case T_CURRENT:
case T_CURRENT_SCHEMA:
case T_CURSOR:
case T_DATABASE:
case T_DATA:
case T_DATE:
case T_DATETIME:
case T_DAY:
case T_DAYS:
case T_DEC:
case T_DECIMAL:
case T_DECLARE:
case T_DEFAULT:
case T_DEFERRED:
case T_DEFINED:
case T_DEFINER:
case T_DEFINITION:
case T_DELETE:
case T_DELIMITED:
case T_DELIMITER:
case T_DESC:
case T_DESCRIBE:
case T_DIAGNOSTICS:
case T_DIR:
case T_DIRECTORY:
case T_DISTINCT:
case T_DISTRIBUTE:
case T_DO:
case T_DOUBLE:
case T_DROP:
case T_DYNAMIC:
case T_ENABLE:
case T_ENGINE:
case T_ESCAPED:
case T_EXCEPT:
case T_EXEC:
case T_EXECUTE:
case T_EXCEPTION:
case T_EXCLUSIVE:
case T_EXISTS:
case T_EXIT:
case T_FALLBACK:
case T_FALSE:
case T_FETCH:
case T_FIELDS:
case T_FILE:
case T_FILES:
case T_FLOAT:
case T_FOR:
case T_FOREIGN:
case T_FORMAT:
case T_FOUND:
case T_FROM:
case T_FULL:
case T_FUNCTION:
case T_GET:
case T_GLOBAL:
case T_GO:
case T_GRANT:
case T_GROUP:
case T_HANDLER:
case T_HASH:
case T_HAVING:
case T_HDFS:
case T_HIVE:
case T_HOST:
case T_IDENTITY:
case T_IF:
case T_IGNORE:
case T_IMMEDIATE:
case T_IN:
case T_INCLUDE:
case T_INDEX:
case T_INITRANS:
case T_INNER:
case T_INOUT:
case T_INSERT:
case T_INT:
case T_INT2:
case T_INT4:
case T_INT8:
case T_INTEGER:
case T_INTERSECT:
case T_INTERVAL:
case T_INTO:
case T_INVOKER:
case T_IS:
case T_ISOPEN:
case T_ITEMS:
case T_JOIN:
case T_KEEP:
case T_KEY:
case T_KEYS:
case T_LANGUAGE:
case T_LEAVE:
case T_LEFT:
case T_LIKE:
case T_LIMIT:
case T_LINES:
case T_LOCAL:
case T_LOCATION:
case T_LOCATOR:
case T_LOCATORS:
case T_LOCKS:
case T_LOG:
case T_LOGGED:
case T_LOGGING:
case T_LOOP:
case T_MAP:
case T_MATCHED:
case T_MAX:
case T_MAXTRANS:
case T_MERGE:
case T_MESSAGE_TEXT:
case T_MICROSECOND:
case T_MICROSECONDS:
case T_MIN:
case T_MULTISET:
case T_NCHAR:
case T_NEW:
case T_NVARCHAR:
case T_NO:
case T_NOCOUNT:
case T_NOCOMPRESS:
case T_NOLOGGING:
case T_NONE:
case T_NOT:
case T_NOTFOUND:
case T_NUMERIC:
case T_NUMBER:
case T_OBJECT:
case T_OFF:
case T_ON:
case T_ONLY:
case T_OPEN:
case T_OR:
case T_ORDER:
case T_OUT:
case T_OUTER:
case T_OVER:
case T_OVERWRITE:
case T_OWNER:
case T_PACKAGE:
case T_PARTITION:
case T_PCTFREE:
case T_PCTUSED:
case T_PRECISION:
case T_PRESERVE:
case T_PRIMARY:
case T_PRINT:
case T_PROC:
case T_PROCEDURE:
case T_QUALIFY:
case T_QUERY_BAND:
case T_QUIT:
case T_QUOTED_IDENTIFIER:
case T_RAISE:
case T_REAL:
case T_REFERENCES:
case T_REGEXP:
case T_REPLACE:
case T_RESIGNAL:
case T_RESTRICT:
case T_RESULT:
case T_RESULT_SET_LOCATOR:
case T_RETURN:
case T_RETURNS:
case T_REVERSE:
case T_RIGHT:
case T_RLIKE:
case T_ROLE:
case T_ROLLBACK:
case T_ROW:
case T_ROWS:
case T_ROW_COUNT:
case T_RR:
case T_RS:
case T_PWD:
case T_TRIM:
case T_SCHEMA:
case T_SECOND:
case T_SECONDS:
case T_SECURITY:
case T_SEGMENT:
case T_SEL:
case T_SELECT:
case T_SET:
case T_SESSION:
case T_SESSIONS:
case T_SETS:
case T_SHARE:
case T_SIGNAL:
case T_SIMPLE_DOUBLE:
case T_SIMPLE_FLOAT:
case T_SMALLDATETIME:
case T_SMALLINT:
case T_SQL:
case T_SQLEXCEPTION:
case T_SQLINSERT:
case T_SQLSTATE:
case T_SQLWARNING:
case T_STATS:
case T_STATISTICS:
case T_STEP:
case T_STORAGE:
case T_STORED:
case T_STRING:
case T_SUBDIR:
case T_SUBSTRING:
case T_SUM:
case T_SUMMARY:
case T_SYS_REFCURSOR:
case T_TABLE:
case T_TABLESPACE:
case T_TEMPORARY:
case T_TERMINATED:
case T_TEXTIMAGE_ON:
case T_THEN:
case T_TIMESTAMP:
case T_TITLE:
case T_TO:
case T_TOP:
case T_TRANSACTION:
case T_TRUE:
case T_TRUNCATE:
case T_UNIQUE:
case T_UPDATE:
case T_UR:
case T_USE:
case T_USING:
case T_VALUE:
case T_VALUES:
case T_VAR:
case T_VARCHAR:
case T_VARCHAR2:
case T_VARYING:
case T_VOLATILE:
case T_WHILE:
case T_WITH:
case T_WITHOUT:
case T_WORK:
case T_XACT_ABORT:
case T_XML:
case T_YES:
case T_ACTIVITY_COUNT:
case T_CUME_DIST:
case T_CURRENT_DATE:
case T_CURRENT_TIME_MILLIS:
case T_CURRENT_TIMESTAMP:
case T_CURRENT_USER:
case T_DENSE_RANK:
case T_FIRST_VALUE:
case T_LAG:
case T_LAST_VALUE:
case T_LEAD:
case T_PART_COUNT:
case T_PART_LOC:
case T_RANK:
case T_ROW_NUMBER:
case T_STDEV:
case T_SYSDATE:
case T_VARIANCE:
case T_USER:
case T_SUB:
case L_ID:
{
setState(1125);
qident();
}
break;
case L_INT:
{
setState(1126);
match(L_INT);
}
break;
default:
throw new NoViableAltException(this);
}
}
setState(1129);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T_ACTION) | (1L << T_ADD2) | (1L << T_ALL) | (1L << T_ALLOCATE) | (1L << T_ALTER) | (1L << T_AND) | (1L << T_ANSI_NULLS) | (1L << T_ANSI_PADDING) | (1L << T_AS) | (1L << T_ASC) | (1L << T_ASSOCIATE) | (1L << T_AT) | (1L << T_AUTO_INCREMENT) | (1L << T_AVG) | (1L << T_BATCHSIZE) | (1L << T_BEGIN) | (1L << T_BETWEEN) | (1L << T_BIGINT) | (1L << T_BINARY_DOUBLE) | (1L << T_BINARY_FLOAT) | (1L << T_BIT) | (1L << T_BODY) | (1L << T_BREAK) | (1L << T_BULK) | (1L << T_BY) | (1L << T_BYTE) | (1L << T_CALL) | (1L << T_CALLER) | (1L << T_CASCADE) | (1L << T_CASE) | (1L << T_CASESPECIFIC) | (1L << T_CAST) | (1L << T_CHAR) | (1L << T_CHARACTER) | (1L << T_CHARSET) | (1L << T_CLIENT) | (1L << T_CLOSE) | (1L << T_CLUSTERED) | (1L << T_CMP) | (1L << T_COLLECT) | (1L << T_COLLECTION) | (1L << T_COLUMN) | (1L << T_COMMENT) | (1L << T_CONSTANT) | (1L << T_COMMIT) | (1L << T_COMPRESS) | (1L << T_CONCAT) | (1L << T_CONDITION) | (1L << T_CONSTRAINT) | (1L << T_CONTINUE) | (1L << T_COPY) | (1L << T_COUNT) | (1L << T_COUNT_BIG) | (1L << T_CREATE) | (1L << T_CREATION) | (1L << T_CREATOR) | (1L << T_CS) | (1L << T_CURRENT))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T_CURRENT_SCHEMA - 64)) | (1L << (T_CURSOR - 64)) | (1L << (T_DATABASE - 64)) | (1L << (T_DATA - 64)) | (1L << (T_DATE - 64)) | (1L << (T_DATETIME - 64)) | (1L << (T_DAY - 64)) | (1L << (T_DAYS - 64)) | (1L << (T_DEC - 64)) | (1L << (T_DECIMAL - 64)) | (1L << (T_DECLARE - 64)) | (1L << (T_DEFAULT - 64)) | (1L << (T_DEFERRED - 64)) | (1L << (T_DEFINED - 64)) | (1L << (T_DEFINER - 64)) | (1L << (T_DEFINITION - 64)) | (1L << (T_DELETE - 64)) | (1L << (T_DELIMITED - 64)) | (1L << (T_DELIMITER - 64)) | (1L << (T_DESC - 64)) | (1L << (T_DESCRIBE - 64)) | (1L << (T_DIAGNOSTICS - 64)) | (1L << (T_DIR - 64)) | (1L << (T_DIRECTORY - 64)) | (1L << (T_DISTINCT - 64)) | (1L << (T_DISTRIBUTE - 64)) | (1L << (T_DO - 64)) | (1L << (T_DOUBLE - 64)) | (1L << (T_DROP - 64)) | (1L << (T_DYNAMIC - 64)) | (1L << (T_ENABLE - 64)) | (1L << (T_ENGINE - 64)) | (1L << (T_ESCAPED - 64)) | (1L << (T_EXCEPT - 64)) | (1L << (T_EXEC - 64)) | (1L << (T_EXECUTE - 64)) | (1L << (T_EXCEPTION - 64)) | (1L << (T_EXCLUSIVE - 64)) | (1L << (T_EXISTS - 64)) | (1L << (T_EXIT - 64)) | (1L << (T_FALLBACK - 64)) | (1L << (T_FALSE - 64)) | (1L << (T_FETCH - 64)) | (1L << (T_FIELDS - 64)) | (1L << (T_FILE - 64)) | (1L << (T_FILES - 64)) | (1L << (T_FLOAT - 64)) | (1L << (T_FOR - 64)) | (1L << (T_FOREIGN - 64)) | (1L << (T_FORMAT - 64)) | (1L << (T_FOUND - 64)) | (1L << (T_FROM - 64)) | (1L << (T_FULL - 64)) | (1L << (T_FUNCTION - 64)) | (1L << (T_GET - 64)) | (1L << (T_GLOBAL - 64)) | (1L << (T_GO - 64)) | (1L << (T_GRANT - 64)) | (1L << (T_GROUP - 64)) | (1L << (T_HANDLER - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (T_HASH - 128)) | (1L << (T_HAVING - 128)) | (1L << (T_HDFS - 128)) | (1L << (T_HIVE - 128)) | (1L << (T_HOST - 128)) | (1L << (T_IDENTITY - 128)) | (1L << (T_IF - 128)) | (1L << (T_IGNORE - 128)) | (1L << (T_IMMEDIATE - 128)) | (1L << (T_IN - 128)) | (1L << (T_INCLUDE - 128)) | (1L << (T_INDEX - 128)) | (1L << (T_INITRANS - 128)) | (1L << (T_INNER - 128)) | (1L << (T_INOUT - 128)) | (1L << (T_INSERT - 128)) | (1L << (T_INT - 128)) | (1L << (T_INT2 - 128)) | (1L << (T_INT4 - 128)) | (1L << (T_INT8 - 128)) | (1L << (T_INTEGER - 128)) | (1L << (T_INTERSECT - 128)) | (1L << (T_INTERVAL - 128)) | (1L << (T_INTO - 128)) | (1L << (T_INVOKER - 128)) | (1L << (T_IS - 128)) | (1L << (T_ISOPEN - 128)) | (1L << (T_ITEMS - 128)) | (1L << (T_JOIN - 128)) | (1L << (T_KEEP - 128)) | (1L << (T_KEY - 128)) | (1L << (T_KEYS - 128)) | (1L << (T_LANGUAGE - 128)) | (1L << (T_LEAVE - 128)) | (1L << (T_LEFT - 128)) | (1L << (T_LIKE - 128)) | (1L << (T_LIMIT - 128)) | (1L << (T_LINES - 128)) | (1L << (T_LOCAL - 128)) | (1L << (T_LOCATION - 128)) | (1L << (T_LOCATOR - 128)) | (1L << (T_LOCATORS - 128)) | (1L << (T_LOCKS - 128)) | (1L << (T_LOG - 128)) | (1L << (T_LOGGED - 128)) | (1L << (T_LOGGING - 128)) | (1L << (T_LOOP - 128)) | (1L << (T_MAP - 128)) | (1L << (T_MATCHED - 128)) | (1L << (T_MAX - 128)) | (1L << (T_MAXTRANS - 128)) | (1L << (T_MERGE - 128)) | (1L << (T_MESSAGE_TEXT - 128)) | (1L << (T_MICROSECOND - 128)) | (1L << (T_MICROSECONDS - 128)) | (1L << (T_MIN - 128)) | (1L << (T_MULTISET - 128)) | (1L << (T_NCHAR - 128)) | (1L << (T_NEW - 128)) | (1L << (T_NVARCHAR - 128)) | (1L << (T_NO - 128)) | (1L << (T_NOCOUNT - 128)) | (1L << (T_NOCOMPRESS - 128)))) != 0) || ((((_la - 192)) & ~0x3f) == 0 && ((1L << (_la - 192)) & ((1L << (T_NOLOGGING - 192)) | (1L << (T_NONE - 192)) | (1L << (T_NOT - 192)) | (1L << (T_NOTFOUND - 192)) | (1L << (T_NUMERIC - 192)) | (1L << (T_NUMBER - 192)) | (1L << (T_OBJECT - 192)) | (1L << (T_OFF - 192)) | (1L << (T_ON - 192)) | (1L << (T_ONLY - 192)) | (1L << (T_OPEN - 192)) | (1L << (T_OR - 192)) | (1L << (T_ORDER - 192)) | (1L << (T_OUT - 192)) | (1L << (T_OUTER - 192)) | (1L << (T_OVER - 192)) | (1L << (T_OVERWRITE - 192)) | (1L << (T_OWNER - 192)) | (1L << (T_PACKAGE - 192)) | (1L << (T_PARTITION - 192)) | (1L << (T_PCTFREE - 192)) | (1L << (T_PCTUSED - 192)) | (1L << (T_PRECISION - 192)) | (1L << (T_PRESERVE - 192)) | (1L << (T_PRIMARY - 192)) | (1L << (T_PRINT - 192)) | (1L << (T_PROC - 192)) | (1L << (T_PROCEDURE - 192)) | (1L << (T_QUALIFY - 192)) | (1L << (T_QUERY_BAND - 192)) | (1L << (T_QUIT - 192)) | (1L << (T_QUOTED_IDENTIFIER - 192)) | (1L << (T_RAISE - 192)) | (1L << (T_REAL - 192)) | (1L << (T_REFERENCES - 192)) | (1L << (T_REGEXP - 192)) | (1L << (T_REPLACE - 192)) | (1L << (T_RESIGNAL - 192)) | (1L << (T_RESTRICT - 192)) | (1L << (T_RESULT - 192)) | (1L << (T_RESULT_SET_LOCATOR - 192)) | (1L << (T_RETURN - 192)) | (1L << (T_RETURNS - 192)) | (1L << (T_REVERSE - 192)) | (1L << (T_RIGHT - 192)) | (1L << (T_RLIKE - 192)) | (1L << (T_ROLE - 192)) | (1L << (T_ROLLBACK - 192)) | (1L << (T_ROW - 192)) | (1L << (T_ROWS - 192)) | (1L << (T_ROW_COUNT - 192)) | (1L << (T_RR - 192)) | (1L << (T_RS - 192)) | (1L << (T_PWD - 192)) | (1L << (T_TRIM - 192)) | (1L << (T_SCHEMA - 192)) | (1L << (T_SECOND - 192)) | (1L << (T_SECONDS - 192)) | (1L << (T_SECURITY - 192)) | (1L << (T_SEGMENT - 192)))) != 0) || ((((_la - 256)) & ~0x3f) == 0 && ((1L << (_la - 256)) & ((1L << (T_SEL - 256)) | (1L << (T_SELECT - 256)) | (1L << (T_SET - 256)) | (1L << (T_SESSION - 256)) | (1L << (T_SESSIONS - 256)) | (1L << (T_SETS - 256)) | (1L << (T_SHARE - 256)) | (1L << (T_SIGNAL - 256)) | (1L << (T_SIMPLE_DOUBLE - 256)) | (1L << (T_SIMPLE_FLOAT - 256)) | (1L << (T_SMALLDATETIME - 256)) | (1L << (T_SMALLINT - 256)) | (1L << (T_SQL - 256)) | (1L << (T_SQLEXCEPTION - 256)) | (1L << (T_SQLINSERT - 256)) | (1L << (T_SQLSTATE - 256)) | (1L << (T_SQLWARNING - 256)) | (1L << (T_STATS - 256)) | (1L << (T_STATISTICS - 256)) | (1L << (T_STEP - 256)) | (1L << (T_STORAGE - 256)) | (1L << (T_STORED - 256)) | (1L << (T_STRING - 256)) | (1L << (T_SUBDIR - 256)) | (1L << (T_SUBSTRING - 256)) | (1L << (T_SUM - 256)) | (1L << (T_SUMMARY - 256)) | (1L << (T_SYS_REFCURSOR - 256)) | (1L << (T_TABLE - 256)) | (1L << (T_TABLESPACE - 256)) | (1L << (T_TEMPORARY - 256)) | (1L << (T_TERMINATED - 256)) | (1L << (T_TEXTIMAGE_ON - 256)) | (1L << (T_THEN - 256)) | (1L << (T_TIMESTAMP - 256)) | (1L << (T_TITLE - 256)) | (1L << (T_TO - 256)) | (1L << (T_TOP - 256)) | (1L << (T_TRANSACTION - 256)) | (1L << (T_TRUE - 256)) | (1L << (T_TRUNCATE - 256)) | (1L << (T_UNIQUE - 256)) | (1L << (T_UPDATE - 256)) | (1L << (T_UR - 256)) | (1L << (T_USE - 256)) | (1L << (T_USING - 256)) | (1L << (T_VALUE - 256)) | (1L << (T_VALUES - 256)) | (1L << (T_VAR - 256)) | (1L << (T_VARCHAR - 256)) | (1L << (T_VARCHAR2 - 256)) | (1L << (T_VARYING - 256)) | (1L << (T_VOLATILE - 256)) | (1L << (T_WHILE - 256)) | (1L << (T_WITH - 256)) | (1L << (T_WITHOUT - 256)) | (1L << (T_WORK - 256)))) != 0) || ((((_la - 320)) & ~0x3f) == 0 && ((1L << (_la - 320)) & ((1L << (T_XACT_ABORT - 320)) | (1L << (T_XML - 320)) | (1L << (T_YES - 320)) | (1L << (T_ACTIVITY_COUNT - 320)) | (1L << (T_CUME_DIST - 320)) | (1L << (T_CURRENT_DATE - 320)) | (1L << (T_CURRENT_TIME_MILLIS - 320)) | (1L << (T_CURRENT_TIMESTAMP - 320)) | (1L << (T_CURRENT_USER - 320)) | (1L << (T_DENSE_RANK - 320)) | (1L << (T_FIRST_VALUE - 320)) | (1L << (T_LAG - 320)) | (1L << (T_LAST_VALUE - 320)) | (1L << (T_LEAD - 320)) | (1L << (T_PART_COUNT - 320)) | (1L << (T_PART_LOC - 320)) | (1L << (T_RANK - 320)) | (1L << (T_ROW_NUMBER - 320)) | (1L << (T_STDEV - 320)) | (1L << (T_SYSDATE - 320)) | (1L << (T_VARIANCE - 320)) | (1L << (T_USER - 320)) | (1L << (T_SUB - 320)) | (1L << (L_ID - 320)) | (1L << (L_INT - 320)))) != 0) );
setState(1131);
match(T_CLOSE_P);
}
break;
case T_TABLESPACE:
enterOuterAlt(_localctx, 6);
{
setState(1132);
match(T_TABLESPACE);
setState(1133);
qident();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_options_db2_itemContext extends ParserRuleContext {
public TerminalNode T_IN() { return getToken(HplsqlParser.T_IN, 0); }
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public TerminalNode T_INDEX() { return getToken(HplsqlParser.T_INDEX, 0); }
public TerminalNode T_WITH() { return getToken(HplsqlParser.T_WITH, 0); }
public TerminalNode T_REPLACE() { return getToken(HplsqlParser.T_REPLACE, 0); }
public TerminalNode T_DISTRIBUTE() { return getToken(HplsqlParser.T_DISTRIBUTE, 0); }
public TerminalNode T_BY() { return getToken(HplsqlParser.T_BY, 0); }
public TerminalNode T_HASH() { return getToken(HplsqlParser.T_HASH, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public TerminalNode T_LOGGED() { return getToken(HplsqlParser.T_LOGGED, 0); }
public TerminalNode T_NOT() { return getToken(HplsqlParser.T_NOT, 0); }
public TerminalNode T_COMPRESS() { return getToken(HplsqlParser.T_COMPRESS, 0); }
public TerminalNode T_YES() { return getToken(HplsqlParser.T_YES, 0); }
public TerminalNode T_NO() { return getToken(HplsqlParser.T_NO, 0); }
public TerminalNode T_DEFINITION() { return getToken(HplsqlParser.T_DEFINITION, 0); }
public TerminalNode T_ONLY() { return getToken(HplsqlParser.T_ONLY, 0); }
public TerminalNode T_RESTRICT() { return getToken(HplsqlParser.T_RESTRICT, 0); }
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public TerminalNode T_DROP() { return getToken(HplsqlParser.T_DROP, 0); }
public Create_table_options_db2_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options_db2_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options_db2_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options_db2_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options_db2_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_options_db2_itemContext create_table_options_db2_item() throws RecognitionException {
Create_table_options_db2_itemContext _localctx = new Create_table_options_db2_itemContext(_ctx, getState());
enterRule(_localctx, 104, RULE_create_table_options_db2_item);
int _la;
try {
setState(1169);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1137);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_INDEX) {
{
setState(1136);
match(T_INDEX);
}
}
setState(1139);
match(T_IN);
setState(1140);
qident();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1141);
match(T_WITH);
setState(1142);
match(T_REPLACE);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1143);
match(T_DISTRIBUTE);
setState(1144);
match(T_BY);
setState(1145);
match(T_HASH);
setState(1146);
match(T_OPEN_P);
setState(1147);
qident();
setState(1152);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1148);
match(T_COMMA);
setState(1149);
qident();
}
}
setState(1154);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1155);
match(T_CLOSE_P);
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1158);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_NOT) {
{
setState(1157);
match(T_NOT);
}
}
setState(1160);
match(T_LOGGED);
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1161);
match(T_COMPRESS);
setState(1162);
_la = _input.LA(1);
if ( !(_la==T_NO || _la==T_YES) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1163);
match(T_DEFINITION);
setState(1164);
match(T_ONLY);
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(1165);
match(T_WITH);
setState(1166);
match(T_RESTRICT);
setState(1167);
match(T_ON);
setState(1168);
match(T_DROP);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_options_td_itemContext extends ParserRuleContext {
public TerminalNode T_PRIMARY() { return getToken(HplsqlParser.T_PRIMARY, 0); }
public TerminalNode T_INDEX() { return getToken(HplsqlParser.T_INDEX, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public TerminalNode T_UNIQUE() { return getToken(HplsqlParser.T_UNIQUE, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public TerminalNode T_WITH() { return getToken(HplsqlParser.T_WITH, 0); }
public TerminalNode T_DATA() { return getToken(HplsqlParser.T_DATA, 0); }
public Create_table_options_td_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options_td_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options_td_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options_td_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options_td_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_options_td_itemContext create_table_options_td_item() throws RecognitionException {
Create_table_options_td_itemContext _localctx = new Create_table_options_td_itemContext(_ctx, getState());
enterRule(_localctx, 106, RULE_create_table_options_td_item);
int _la;
try {
setState(1189);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_PRIMARY:
case T_UNIQUE:
enterOuterAlt(_localctx, 1);
{
setState(1172);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_UNIQUE) {
{
setState(1171);
match(T_UNIQUE);
}
}
setState(1174);
match(T_PRIMARY);
setState(1175);
match(T_INDEX);
setState(1176);
match(T_OPEN_P);
setState(1177);
qident();
setState(1182);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1178);
match(T_COMMA);
setState(1179);
qident();
}
}
setState(1184);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1185);
match(T_CLOSE_P);
}
break;
case T_WITH:
enterOuterAlt(_localctx, 2);
{
setState(1187);
match(T_WITH);
setState(1188);
match(T_DATA);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_options_hive_itemContext extends ParserRuleContext {
public Create_table_hive_row_formatContext create_table_hive_row_format() {
return getRuleContext(Create_table_hive_row_formatContext.class,0);
}
public TerminalNode T_STORED() { return getToken(HplsqlParser.T_STORED, 0); }
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Create_table_options_hive_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options_hive_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options_hive_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options_hive_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options_hive_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_options_hive_itemContext create_table_options_hive_item() throws RecognitionException {
Create_table_options_hive_itemContext _localctx = new Create_table_options_hive_itemContext(_ctx, getState());
enterRule(_localctx, 108, RULE_create_table_options_hive_item);
try {
setState(1195);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ROW:
enterOuterAlt(_localctx, 1);
{
setState(1191);
create_table_hive_row_format();
}
break;
case T_STORED:
enterOuterAlt(_localctx, 2);
{
setState(1192);
match(T_STORED);
setState(1193);
match(T_AS);
setState(1194);
qident();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_hive_row_formatContext extends ParserRuleContext {
public TerminalNode T_ROW() { return getToken(HplsqlParser.T_ROW, 0); }
public TerminalNode T_FORMAT() { return getToken(HplsqlParser.T_FORMAT, 0); }
public TerminalNode T_DELIMITED() { return getToken(HplsqlParser.T_DELIMITED, 0); }
public List create_table_hive_row_format_fields() {
return getRuleContexts(Create_table_hive_row_format_fieldsContext.class);
}
public Create_table_hive_row_format_fieldsContext create_table_hive_row_format_fields(int i) {
return getRuleContext(Create_table_hive_row_format_fieldsContext.class,i);
}
public Create_table_hive_row_formatContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_hive_row_format; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_hive_row_format(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_hive_row_format(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_hive_row_format(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_hive_row_formatContext create_table_hive_row_format() throws RecognitionException {
Create_table_hive_row_formatContext _localctx = new Create_table_hive_row_formatContext(_ctx, getState());
enterRule(_localctx, 110, RULE_create_table_hive_row_format);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1197);
match(T_ROW);
setState(1198);
match(T_FORMAT);
setState(1199);
match(T_DELIMITED);
setState(1203);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,98,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1200);
create_table_hive_row_format_fields();
}
}
}
setState(1205);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,98,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_hive_row_format_fieldsContext extends ParserRuleContext {
public TerminalNode T_FIELDS() { return getToken(HplsqlParser.T_FIELDS, 0); }
public TerminalNode T_TERMINATED() { return getToken(HplsqlParser.T_TERMINATED, 0); }
public List T_BY() { return getTokens(HplsqlParser.T_BY); }
public TerminalNode T_BY(int i) {
return getToken(HplsqlParser.T_BY, i);
}
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode T_ESCAPED() { return getToken(HplsqlParser.T_ESCAPED, 0); }
public TerminalNode T_COLLECTION() { return getToken(HplsqlParser.T_COLLECTION, 0); }
public TerminalNode T_ITEMS() { return getToken(HplsqlParser.T_ITEMS, 0); }
public TerminalNode T_MAP() { return getToken(HplsqlParser.T_MAP, 0); }
public TerminalNode T_KEYS() { return getToken(HplsqlParser.T_KEYS, 0); }
public TerminalNode T_LINES() { return getToken(HplsqlParser.T_LINES, 0); }
public TerminalNode T_NULL() { return getToken(HplsqlParser.T_NULL, 0); }
public TerminalNode T_DEFINED() { return getToken(HplsqlParser.T_DEFINED, 0); }
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public Create_table_hive_row_format_fieldsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_hive_row_format_fields; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_hive_row_format_fields(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_hive_row_format_fields(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_hive_row_format_fields(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_hive_row_format_fieldsContext create_table_hive_row_format_fields() throws RecognitionException {
Create_table_hive_row_format_fieldsContext _localctx = new Create_table_hive_row_format_fieldsContext(_ctx, getState());
enterRule(_localctx, 112, RULE_create_table_hive_row_format_fields);
try {
setState(1233);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_FIELDS:
enterOuterAlt(_localctx, 1);
{
setState(1206);
match(T_FIELDS);
setState(1207);
match(T_TERMINATED);
setState(1208);
match(T_BY);
setState(1209);
expr(0);
setState(1213);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) {
case 1:
{
setState(1210);
match(T_ESCAPED);
setState(1211);
match(T_BY);
setState(1212);
expr(0);
}
break;
}
}
break;
case T_COLLECTION:
enterOuterAlt(_localctx, 2);
{
setState(1215);
match(T_COLLECTION);
setState(1216);
match(T_ITEMS);
setState(1217);
match(T_TERMINATED);
setState(1218);
match(T_BY);
setState(1219);
expr(0);
}
break;
case T_MAP:
enterOuterAlt(_localctx, 3);
{
setState(1220);
match(T_MAP);
setState(1221);
match(T_KEYS);
setState(1222);
match(T_TERMINATED);
setState(1223);
match(T_BY);
setState(1224);
expr(0);
}
break;
case T_LINES:
enterOuterAlt(_localctx, 4);
{
setState(1225);
match(T_LINES);
setState(1226);
match(T_TERMINATED);
setState(1227);
match(T_BY);
setState(1228);
expr(0);
}
break;
case T_NULL:
enterOuterAlt(_localctx, 5);
{
setState(1229);
match(T_NULL);
setState(1230);
match(T_DEFINED);
setState(1231);
match(T_AS);
setState(1232);
expr(0);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_options_mssql_itemContext extends ParserRuleContext {
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_TEXTIMAGE_ON() { return getToken(HplsqlParser.T_TEXTIMAGE_ON, 0); }
public Create_table_options_mssql_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options_mssql_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options_mssql_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options_mssql_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options_mssql_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_options_mssql_itemContext create_table_options_mssql_item() throws RecognitionException {
Create_table_options_mssql_itemContext _localctx = new Create_table_options_mssql_itemContext(_ctx, getState());
enterRule(_localctx, 114, RULE_create_table_options_mssql_item);
try {
setState(1239);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ON:
enterOuterAlt(_localctx, 1);
{
setState(1235);
match(T_ON);
setState(1236);
qident();
}
break;
case T_TEXTIMAGE_ON:
enterOuterAlt(_localctx, 2);
{
setState(1237);
match(T_TEXTIMAGE_ON);
setState(1238);
qident();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_table_options_mysql_itemContext extends ParserRuleContext {
public TerminalNode T_AUTO_INCREMENT() { return getToken(HplsqlParser.T_AUTO_INCREMENT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public TerminalNode T_COMMENT() { return getToken(HplsqlParser.T_COMMENT, 0); }
public TerminalNode T_CHARACTER() { return getToken(HplsqlParser.T_CHARACTER, 0); }
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public TerminalNode T_CHARSET() { return getToken(HplsqlParser.T_CHARSET, 0); }
public TerminalNode T_DEFAULT() { return getToken(HplsqlParser.T_DEFAULT, 0); }
public TerminalNode T_ENGINE() { return getToken(HplsqlParser.T_ENGINE, 0); }
public Create_table_options_mysql_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_table_options_mysql_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_table_options_mysql_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_table_options_mysql_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_table_options_mysql_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_table_options_mysql_itemContext create_table_options_mysql_item() throws RecognitionException {
Create_table_options_mysql_itemContext _localctx = new Create_table_options_mysql_itemContext(_ctx, getState());
enterRule(_localctx, 116, RULE_create_table_options_mysql_item);
int _la;
try {
setState(1268);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_AUTO_INCREMENT:
enterOuterAlt(_localctx, 1);
{
setState(1241);
match(T_AUTO_INCREMENT);
setState(1243);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_EQUAL) {
{
setState(1242);
match(T_EQUAL);
}
}
setState(1245);
expr(0);
}
break;
case T_COMMENT:
enterOuterAlt(_localctx, 2);
{
setState(1246);
match(T_COMMENT);
setState(1248);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_EQUAL) {
{
setState(1247);
match(T_EQUAL);
}
}
setState(1250);
expr(0);
}
break;
case T_CHARACTER:
case T_CHARSET:
case T_DEFAULT:
enterOuterAlt(_localctx, 3);
{
setState(1252);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_DEFAULT) {
{
setState(1251);
match(T_DEFAULT);
}
}
setState(1257);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_CHARACTER:
{
setState(1254);
match(T_CHARACTER);
setState(1255);
match(T_SET);
}
break;
case T_CHARSET:
{
setState(1256);
match(T_CHARSET);
}
break;
default:
throw new NoViableAltException(this);
}
setState(1260);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_EQUAL) {
{
setState(1259);
match(T_EQUAL);
}
}
setState(1262);
expr(0);
}
break;
case T_ENGINE:
enterOuterAlt(_localctx, 4);
{
setState(1263);
match(T_ENGINE);
setState(1265);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_EQUAL) {
{
setState(1264);
match(T_EQUAL);
}
}
setState(1267);
expr(0);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Alter_table_stmtContext extends ParserRuleContext {
public TerminalNode T_ALTER() { return getToken(HplsqlParser.T_ALTER, 0); }
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public Alter_table_itemContext alter_table_item() {
return getRuleContext(Alter_table_itemContext.class,0);
}
public Alter_table_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_alter_table_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAlter_table_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAlter_table_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAlter_table_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Alter_table_stmtContext alter_table_stmt() throws RecognitionException {
Alter_table_stmtContext _localctx = new Alter_table_stmtContext(_ctx, getState());
enterRule(_localctx, 118, RULE_alter_table_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1270);
match(T_ALTER);
setState(1271);
match(T_TABLE);
setState(1272);
table_name();
setState(1273);
alter_table_item();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Alter_table_itemContext extends ParserRuleContext {
public Alter_table_add_constraintContext alter_table_add_constraint() {
return getRuleContext(Alter_table_add_constraintContext.class,0);
}
public Alter_table_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_alter_table_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAlter_table_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAlter_table_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAlter_table_item(this);
else return visitor.visitChildren(this);
}
}
public final Alter_table_itemContext alter_table_item() throws RecognitionException {
Alter_table_itemContext _localctx = new Alter_table_itemContext(_ctx, getState());
enterRule(_localctx, 120, RULE_alter_table_item);
try {
enterOuterAlt(_localctx, 1);
{
setState(1275);
alter_table_add_constraint();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Alter_table_add_constraintContext extends ParserRuleContext {
public TerminalNode T_ADD2() { return getToken(HplsqlParser.T_ADD2, 0); }
public Alter_table_add_constraint_itemContext alter_table_add_constraint_item() {
return getRuleContext(Alter_table_add_constraint_itemContext.class,0);
}
public TerminalNode T_CONSTRAINT() { return getToken(HplsqlParser.T_CONSTRAINT, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Alter_table_add_constraintContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_alter_table_add_constraint; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAlter_table_add_constraint(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAlter_table_add_constraint(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAlter_table_add_constraint(this);
else return visitor.visitChildren(this);
}
}
public final Alter_table_add_constraintContext alter_table_add_constraint() throws RecognitionException {
Alter_table_add_constraintContext _localctx = new Alter_table_add_constraintContext(_ctx, getState());
enterRule(_localctx, 122, RULE_alter_table_add_constraint);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1277);
match(T_ADD2);
setState(1280);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_CONSTRAINT) {
{
setState(1278);
match(T_CONSTRAINT);
setState(1279);
qident();
}
}
setState(1282);
alter_table_add_constraint_item();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Alter_table_add_constraint_itemContext extends ParserRuleContext {
public TerminalNode T_PRIMARY() { return getToken(HplsqlParser.T_PRIMARY, 0); }
public TerminalNode T_KEY() { return getToken(HplsqlParser.T_KEY, 0); }
public List T_OPEN_P() { return getTokens(HplsqlParser.T_OPEN_P); }
public TerminalNode T_OPEN_P(int i) {
return getToken(HplsqlParser.T_OPEN_P, i);
}
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public List T_CLOSE_P() { return getTokens(HplsqlParser.T_CLOSE_P); }
public TerminalNode T_CLOSE_P(int i) {
return getToken(HplsqlParser.T_CLOSE_P, i);
}
public TerminalNode T_CLUSTERED() { return getToken(HplsqlParser.T_CLUSTERED, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public TerminalNode T_ENABLE() { return getToken(HplsqlParser.T_ENABLE, 0); }
public Index_storage_clauseContext index_storage_clause() {
return getRuleContext(Index_storage_clauseContext.class,0);
}
public List T_ASC() { return getTokens(HplsqlParser.T_ASC); }
public TerminalNode T_ASC(int i) {
return getToken(HplsqlParser.T_ASC, i);
}
public List T_DESC() { return getTokens(HplsqlParser.T_DESC); }
public TerminalNode T_DESC(int i) {
return getToken(HplsqlParser.T_DESC, i);
}
public TerminalNode T_FOREIGN() { return getToken(HplsqlParser.T_FOREIGN, 0); }
public TerminalNode T_REFERENCES() { return getToken(HplsqlParser.T_REFERENCES, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public List create_table_fk_action() {
return getRuleContexts(Create_table_fk_actionContext.class);
}
public Create_table_fk_actionContext create_table_fk_action(int i) {
return getRuleContext(Create_table_fk_actionContext.class,i);
}
public TerminalNode T_DEFAULT() { return getToken(HplsqlParser.T_DEFAULT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_FOR() { return getToken(HplsqlParser.T_FOR, 0); }
public Alter_table_add_constraint_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_alter_table_add_constraint_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterAlter_table_add_constraint_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitAlter_table_add_constraint_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitAlter_table_add_constraint_item(this);
else return visitor.visitChildren(this);
}
}
public final Alter_table_add_constraint_itemContext alter_table_add_constraint_item() throws RecognitionException {
Alter_table_add_constraint_itemContext _localctx = new Alter_table_add_constraint_itemContext(_ctx, getState());
enterRule(_localctx, 124, RULE_alter_table_add_constraint_item);
int _la;
try {
int _alt;
setState(1346);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_PRIMARY:
enterOuterAlt(_localctx, 1);
{
setState(1284);
match(T_PRIMARY);
setState(1285);
match(T_KEY);
setState(1287);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_CLUSTERED) {
{
setState(1286);
match(T_CLUSTERED);
}
}
setState(1289);
match(T_OPEN_P);
setState(1290);
qident();
setState(1292);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ASC || _la==T_DESC) {
{
setState(1291);
_la = _input.LA(1);
if ( !(_la==T_ASC || _la==T_DESC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(1301);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1294);
match(T_COMMA);
setState(1295);
qident();
setState(1297);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ASC || _la==T_DESC) {
{
setState(1296);
_la = _input.LA(1);
if ( !(_la==T_ASC || _la==T_DESC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
}
}
setState(1303);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1304);
match(T_CLOSE_P);
setState(1306);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,114,_ctx) ) {
case 1:
{
setState(1305);
match(T_ENABLE);
}
break;
}
setState(1309);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) {
case 1:
{
setState(1308);
index_storage_clause();
}
break;
}
}
break;
case T_FOREIGN:
enterOuterAlt(_localctx, 2);
{
setState(1311);
match(T_FOREIGN);
setState(1312);
match(T_KEY);
setState(1313);
match(T_OPEN_P);
setState(1314);
qident();
setState(1319);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1315);
match(T_COMMA);
setState(1316);
qident();
}
}
setState(1321);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1322);
match(T_CLOSE_P);
setState(1323);
match(T_REFERENCES);
setState(1324);
table_name();
setState(1325);
match(T_OPEN_P);
setState(1326);
qident();
setState(1331);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1327);
match(T_COMMA);
setState(1328);
qident();
}
}
setState(1333);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1334);
match(T_CLOSE_P);
setState(1338);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,118,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1335);
create_table_fk_action();
}
}
}
setState(1340);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,118,_ctx);
}
}
break;
case T_DEFAULT:
enterOuterAlt(_localctx, 3);
{
setState(1341);
match(T_DEFAULT);
setState(1342);
expr(0);
setState(1343);
match(T_FOR);
setState(1344);
qident();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DtypeContext extends ParserRuleContext {
public TerminalNode T_CHAR() { return getToken(HplsqlParser.T_CHAR, 0); }
public TerminalNode T_CHARACTER() { return getToken(HplsqlParser.T_CHARACTER, 0); }
public TerminalNode T_BIGINT() { return getToken(HplsqlParser.T_BIGINT, 0); }
public TerminalNode T_BINARY_DOUBLE() { return getToken(HplsqlParser.T_BINARY_DOUBLE, 0); }
public TerminalNode T_BINARY_FLOAT() { return getToken(HplsqlParser.T_BINARY_FLOAT, 0); }
public TerminalNode T_BINARY_INTEGER() { return getToken(HplsqlParser.T_BINARY_INTEGER, 0); }
public TerminalNode T_BIT() { return getToken(HplsqlParser.T_BIT, 0); }
public TerminalNode T_DATE() { return getToken(HplsqlParser.T_DATE, 0); }
public TerminalNode T_DATETIME() { return getToken(HplsqlParser.T_DATETIME, 0); }
public TerminalNode T_DEC() { return getToken(HplsqlParser.T_DEC, 0); }
public TerminalNode T_DECIMAL() { return getToken(HplsqlParser.T_DECIMAL, 0); }
public TerminalNode T_DOUBLE() { return getToken(HplsqlParser.T_DOUBLE, 0); }
public TerminalNode T_PRECISION() { return getToken(HplsqlParser.T_PRECISION, 0); }
public TerminalNode T_FLOAT() { return getToken(HplsqlParser.T_FLOAT, 0); }
public TerminalNode T_INT() { return getToken(HplsqlParser.T_INT, 0); }
public TerminalNode T_INT2() { return getToken(HplsqlParser.T_INT2, 0); }
public TerminalNode T_INT4() { return getToken(HplsqlParser.T_INT4, 0); }
public TerminalNode T_INT8() { return getToken(HplsqlParser.T_INT8, 0); }
public TerminalNode T_INTEGER() { return getToken(HplsqlParser.T_INTEGER, 0); }
public TerminalNode T_NCHAR() { return getToken(HplsqlParser.T_NCHAR, 0); }
public TerminalNode T_NVARCHAR() { return getToken(HplsqlParser.T_NVARCHAR, 0); }
public TerminalNode T_NUMBER() { return getToken(HplsqlParser.T_NUMBER, 0); }
public TerminalNode T_NUMERIC() { return getToken(HplsqlParser.T_NUMERIC, 0); }
public TerminalNode T_PLS_INTEGER() { return getToken(HplsqlParser.T_PLS_INTEGER, 0); }
public TerminalNode T_REAL() { return getToken(HplsqlParser.T_REAL, 0); }
public TerminalNode T_RESULT_SET_LOCATOR() { return getToken(HplsqlParser.T_RESULT_SET_LOCATOR, 0); }
public TerminalNode T_VARYING() { return getToken(HplsqlParser.T_VARYING, 0); }
public TerminalNode T_SIMPLE_FLOAT() { return getToken(HplsqlParser.T_SIMPLE_FLOAT, 0); }
public TerminalNode T_SIMPLE_DOUBLE() { return getToken(HplsqlParser.T_SIMPLE_DOUBLE, 0); }
public TerminalNode T_SIMPLE_INTEGER() { return getToken(HplsqlParser.T_SIMPLE_INTEGER, 0); }
public TerminalNode T_SMALLINT() { return getToken(HplsqlParser.T_SMALLINT, 0); }
public TerminalNode T_SMALLDATETIME() { return getToken(HplsqlParser.T_SMALLDATETIME, 0); }
public TerminalNode T_STRING() { return getToken(HplsqlParser.T_STRING, 0); }
public TerminalNode T_SYS_REFCURSOR() { return getToken(HplsqlParser.T_SYS_REFCURSOR, 0); }
public TerminalNode T_TIMESTAMP() { return getToken(HplsqlParser.T_TIMESTAMP, 0); }
public TerminalNode T_TINYINT() { return getToken(HplsqlParser.T_TINYINT, 0); }
public TerminalNode T_VARCHAR() { return getToken(HplsqlParser.T_VARCHAR, 0); }
public TerminalNode T_VARCHAR2() { return getToken(HplsqlParser.T_VARCHAR2, 0); }
public TerminalNode T_XML() { return getToken(HplsqlParser.T_XML, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_TYPE() { return getToken(HplsqlParser.T_TYPE, 0); }
public TerminalNode T_ROWTYPE() { return getToken(HplsqlParser.T_ROWTYPE, 0); }
public DtypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dtype; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDtype(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDtype(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDtype(this);
else return visitor.visitChildren(this);
}
}
public final DtypeContext dtype() throws RecognitionException {
DtypeContext _localctx = new DtypeContext(_ctx, getState());
enterRule(_localctx, 126, RULE_dtype);
int _la;
try {
setState(1394);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,122,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1348);
match(T_CHAR);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1349);
match(T_CHARACTER);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1350);
match(T_BIGINT);
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1351);
match(T_BINARY_DOUBLE);
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1352);
match(T_BINARY_FLOAT);
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1353);
match(T_BINARY_INTEGER);
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(1354);
match(T_BIT);
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(1355);
match(T_DATE);
}
break;
case 9:
enterOuterAlt(_localctx, 9);
{
setState(1356);
match(T_DATETIME);
}
break;
case 10:
enterOuterAlt(_localctx, 10);
{
setState(1357);
match(T_DEC);
}
break;
case 11:
enterOuterAlt(_localctx, 11);
{
setState(1358);
match(T_DECIMAL);
}
break;
case 12:
enterOuterAlt(_localctx, 12);
{
setState(1359);
match(T_DOUBLE);
setState(1361);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) {
case 1:
{
setState(1360);
match(T_PRECISION);
}
break;
}
}
break;
case 13:
enterOuterAlt(_localctx, 13);
{
setState(1363);
match(T_FLOAT);
}
break;
case 14:
enterOuterAlt(_localctx, 14);
{
setState(1364);
match(T_INT);
}
break;
case 15:
enterOuterAlt(_localctx, 15);
{
setState(1365);
match(T_INT2);
}
break;
case 16:
enterOuterAlt(_localctx, 16);
{
setState(1366);
match(T_INT4);
}
break;
case 17:
enterOuterAlt(_localctx, 17);
{
setState(1367);
match(T_INT8);
}
break;
case 18:
enterOuterAlt(_localctx, 18);
{
setState(1368);
match(T_INTEGER);
}
break;
case 19:
enterOuterAlt(_localctx, 19);
{
setState(1369);
match(T_NCHAR);
}
break;
case 20:
enterOuterAlt(_localctx, 20);
{
setState(1370);
match(T_NVARCHAR);
}
break;
case 21:
enterOuterAlt(_localctx, 21);
{
setState(1371);
match(T_NUMBER);
}
break;
case 22:
enterOuterAlt(_localctx, 22);
{
setState(1372);
match(T_NUMERIC);
}
break;
case 23:
enterOuterAlt(_localctx, 23);
{
setState(1373);
match(T_PLS_INTEGER);
}
break;
case 24:
enterOuterAlt(_localctx, 24);
{
setState(1374);
match(T_REAL);
}
break;
case 25:
enterOuterAlt(_localctx, 25);
{
setState(1375);
match(T_RESULT_SET_LOCATOR);
setState(1376);
match(T_VARYING);
}
break;
case 26:
enterOuterAlt(_localctx, 26);
{
setState(1377);
match(T_SIMPLE_FLOAT);
}
break;
case 27:
enterOuterAlt(_localctx, 27);
{
setState(1378);
match(T_SIMPLE_DOUBLE);
}
break;
case 28:
enterOuterAlt(_localctx, 28);
{
setState(1379);
match(T_SIMPLE_INTEGER);
}
break;
case 29:
enterOuterAlt(_localctx, 29);
{
setState(1380);
match(T_SMALLINT);
}
break;
case 30:
enterOuterAlt(_localctx, 30);
{
setState(1381);
match(T_SMALLDATETIME);
}
break;
case 31:
enterOuterAlt(_localctx, 31);
{
setState(1382);
match(T_STRING);
}
break;
case 32:
enterOuterAlt(_localctx, 32);
{
setState(1383);
match(T_SYS_REFCURSOR);
}
break;
case 33:
enterOuterAlt(_localctx, 33);
{
setState(1384);
match(T_TIMESTAMP);
}
break;
case 34:
enterOuterAlt(_localctx, 34);
{
setState(1385);
match(T_TINYINT);
}
break;
case 35:
enterOuterAlt(_localctx, 35);
{
setState(1386);
match(T_VARCHAR);
}
break;
case 36:
enterOuterAlt(_localctx, 36);
{
setState(1387);
match(T_VARCHAR2);
}
break;
case 37:
enterOuterAlt(_localctx, 37);
{
setState(1388);
match(T_XML);
}
break;
case 38:
enterOuterAlt(_localctx, 38);
{
setState(1389);
qident();
setState(1392);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,121,_ctx) ) {
case 1:
{
setState(1390);
match(T__2);
setState(1391);
_la = _input.LA(1);
if ( !(_la==T_ROWTYPE || _la==T_TYPE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Dtype_lenContext extends ParserRuleContext {
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List L_INT() { return getTokens(HplsqlParser.L_INT); }
public TerminalNode L_INT(int i) {
return getToken(HplsqlParser.L_INT, i);
}
public TerminalNode T_MAX() { return getToken(HplsqlParser.T_MAX, 0); }
public TerminalNode T_COMMA() { return getToken(HplsqlParser.T_COMMA, 0); }
public TerminalNode T_CHAR() { return getToken(HplsqlParser.T_CHAR, 0); }
public TerminalNode T_BYTE() { return getToken(HplsqlParser.T_BYTE, 0); }
public Dtype_lenContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dtype_len; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDtype_len(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDtype_len(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDtype_len(this);
else return visitor.visitChildren(this);
}
}
public final Dtype_lenContext dtype_len() throws RecognitionException {
Dtype_lenContext _localctx = new Dtype_lenContext(_ctx, getState());
enterRule(_localctx, 128, RULE_dtype_len);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1396);
match(T_OPEN_P);
setState(1397);
_la = _input.LA(1);
if ( !(_la==T_MAX || _la==L_INT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1399);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_BYTE || _la==T_CHAR) {
{
setState(1398);
_la = _input.LA(1);
if ( !(_la==T_BYTE || _la==T_CHAR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(1403);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_COMMA) {
{
setState(1401);
match(T_COMMA);
setState(1402);
match(L_INT);
}
}
setState(1405);
match(T_CLOSE_P);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Dtype_attrContext extends ParserRuleContext {
public TerminalNode T_NULL() { return getToken(HplsqlParser.T_NULL, 0); }
public TerminalNode T_NOT() { return getToken(HplsqlParser.T_NOT, 0); }
public TerminalNode T_CHARACTER() { return getToken(HplsqlParser.T_CHARACTER, 0); }
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public TerminalNode T_CASESPECIFIC() { return getToken(HplsqlParser.T_CASESPECIFIC, 0); }
public TerminalNode T_CS() { return getToken(HplsqlParser.T_CS, 0); }
public Dtype_attrContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dtype_attr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDtype_attr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDtype_attr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDtype_attr(this);
else return visitor.visitChildren(this);
}
}
public final Dtype_attrContext dtype_attr() throws RecognitionException {
Dtype_attrContext _localctx = new Dtype_attrContext(_ctx, getState());
enterRule(_localctx, 130, RULE_dtype_attr);
int _la;
try {
setState(1418);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1408);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_NOT) {
{
setState(1407);
match(T_NOT);
}
}
setState(1410);
match(T_NULL);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1411);
match(T_CHARACTER);
setState(1412);
match(T_SET);
setState(1413);
ident();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1415);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_NOT) {
{
setState(1414);
match(T_NOT);
}
}
setState(1417);
_la = _input.LA(1);
if ( !(_la==T_CASESPECIFIC || _la==T_CS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Dtype_defaultContext extends ParserRuleContext {
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_COLON() { return getToken(HplsqlParser.T_COLON, 0); }
public TerminalNode T_DEFAULT() { return getToken(HplsqlParser.T_DEFAULT, 0); }
public TerminalNode T_WITH() { return getToken(HplsqlParser.T_WITH, 0); }
public Dtype_defaultContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dtype_default; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDtype_default(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDtype_default(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDtype_default(this);
else return visitor.visitChildren(this);
}
}
public final Dtype_defaultContext dtype_default() throws RecognitionException {
Dtype_defaultContext _localctx = new Dtype_defaultContext(_ctx, getState());
enterRule(_localctx, 132, RULE_dtype_default);
int _la;
try {
setState(1432);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_COLON:
case T_EQUAL:
enterOuterAlt(_localctx, 1);
{
setState(1421);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_COLON) {
{
setState(1420);
match(T_COLON);
}
}
setState(1423);
match(T_EQUAL);
setState(1424);
expr(0);
}
break;
case T_DEFAULT:
case T_WITH:
enterOuterAlt(_localctx, 2);
{
setState(1426);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_WITH) {
{
setState(1425);
match(T_WITH);
}
}
setState(1428);
match(T_DEFAULT);
setState(1430);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) {
case 1:
{
setState(1429);
expr(0);
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_database_stmtContext extends ParserRuleContext {
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_DATABASE() { return getToken(HplsqlParser.T_DATABASE, 0); }
public TerminalNode T_SCHEMA() { return getToken(HplsqlParser.T_SCHEMA, 0); }
public TerminalNode T_IF() { return getToken(HplsqlParser.T_IF, 0); }
public TerminalNode T_NOT() { return getToken(HplsqlParser.T_NOT, 0); }
public TerminalNode T_EXISTS() { return getToken(HplsqlParser.T_EXISTS, 0); }
public List create_database_option() {
return getRuleContexts(Create_database_optionContext.class);
}
public Create_database_optionContext create_database_option(int i) {
return getRuleContext(Create_database_optionContext.class,i);
}
public Create_database_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_database_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_database_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_database_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_database_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_database_stmtContext create_database_stmt() throws RecognitionException {
Create_database_stmtContext _localctx = new Create_database_stmtContext(_ctx, getState());
enterRule(_localctx, 134, RULE_create_database_stmt);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1434);
match(T_CREATE);
setState(1435);
_la = _input.LA(1);
if ( !(_la==T_DATABASE || _la==T_SCHEMA) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1439);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,132,_ctx) ) {
case 1:
{
setState(1436);
match(T_IF);
setState(1437);
match(T_NOT);
setState(1438);
match(T_EXISTS);
}
break;
}
setState(1441);
expr(0);
setState(1445);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,133,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1442);
create_database_option();
}
}
}
setState(1447);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,133,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_database_optionContext extends ParserRuleContext {
public TerminalNode T_COMMENT() { return getToken(HplsqlParser.T_COMMENT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_LOCATION() { return getToken(HplsqlParser.T_LOCATION, 0); }
public Create_database_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_database_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_database_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_database_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_database_option(this);
else return visitor.visitChildren(this);
}
}
public final Create_database_optionContext create_database_option() throws RecognitionException {
Create_database_optionContext _localctx = new Create_database_optionContext(_ctx, getState());
enterRule(_localctx, 136, RULE_create_database_option);
try {
setState(1452);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_COMMENT:
enterOuterAlt(_localctx, 1);
{
setState(1448);
match(T_COMMENT);
setState(1449);
expr(0);
}
break;
case T_LOCATION:
enterOuterAlt(_localctx, 2);
{
setState(1450);
match(T_LOCATION);
setState(1451);
expr(0);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_function_stmtContext extends ParserRuleContext {
public TerminalNode T_FUNCTION() { return getToken(HplsqlParser.T_FUNCTION, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public Create_function_returnContext create_function_return() {
return getRuleContext(Create_function_returnContext.class,0);
}
public Single_block_stmtContext single_block_stmt() {
return getRuleContext(Single_block_stmtContext.class,0);
}
public TerminalNode T_ALTER() { return getToken(HplsqlParser.T_ALTER, 0); }
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public TerminalNode T_REPLACE() { return getToken(HplsqlParser.T_REPLACE, 0); }
public Create_routine_paramsContext create_routine_params() {
return getRuleContext(Create_routine_paramsContext.class,0);
}
public Declare_block_inplaceContext declare_block_inplace() {
return getRuleContext(Declare_block_inplaceContext.class,0);
}
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public TerminalNode T_IS() { return getToken(HplsqlParser.T_IS, 0); }
public TerminalNode T_OR() { return getToken(HplsqlParser.T_OR, 0); }
public Create_function_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_function_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_function_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_function_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_function_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_function_stmtContext create_function_stmt() throws RecognitionException {
Create_function_stmtContext _localctx = new Create_function_stmtContext(_ctx, getState());
enterRule(_localctx, 138, RULE_create_function_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1461);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ALTER:
{
setState(1454);
match(T_ALTER);
}
break;
case T_CREATE:
{
setState(1455);
match(T_CREATE);
setState(1458);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_OR) {
{
setState(1456);
match(T_OR);
setState(1457);
match(T_REPLACE);
}
}
}
break;
case T_REPLACE:
{
setState(1460);
match(T_REPLACE);
}
break;
case T_FUNCTION:
break;
default:
break;
}
setState(1463);
match(T_FUNCTION);
setState(1464);
ident();
setState(1466);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,137,_ctx) ) {
case 1:
{
setState(1465);
create_routine_params();
}
break;
}
setState(1468);
create_function_return();
setState(1470);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,138,_ctx) ) {
case 1:
{
setState(1469);
_la = _input.LA(1);
if ( !(_la==T_AS || _la==T_IS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
}
setState(1473);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,139,_ctx) ) {
case 1:
{
setState(1472);
declare_block_inplace();
}
break;
}
setState(1475);
single_block_stmt();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_function_returnContext extends ParserRuleContext {
public DtypeContext dtype() {
return getRuleContext(DtypeContext.class,0);
}
public TerminalNode T_RETURN() { return getToken(HplsqlParser.T_RETURN, 0); }
public TerminalNode T_RETURNS() { return getToken(HplsqlParser.T_RETURNS, 0); }
public Dtype_lenContext dtype_len() {
return getRuleContext(Dtype_lenContext.class,0);
}
public Create_function_returnContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_function_return; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_function_return(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_function_return(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_function_return(this);
else return visitor.visitChildren(this);
}
}
public final Create_function_returnContext create_function_return() throws RecognitionException {
Create_function_returnContext _localctx = new Create_function_returnContext(_ctx, getState());
enterRule(_localctx, 140, RULE_create_function_return);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1477);
_la = _input.LA(1);
if ( !(_la==T_RETURN || _la==T_RETURNS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1478);
dtype();
setState(1480);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,140,_ctx) ) {
case 1:
{
setState(1479);
dtype_len();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_package_stmtContext extends ParserRuleContext {
public TerminalNode T_PACKAGE() { return getToken(HplsqlParser.T_PACKAGE, 0); }
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public Package_specContext package_spec() {
return getRuleContext(Package_specContext.class,0);
}
public TerminalNode T_END() { return getToken(HplsqlParser.T_END, 0); }
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public TerminalNode T_IS() { return getToken(HplsqlParser.T_IS, 0); }
public TerminalNode T_ALTER() { return getToken(HplsqlParser.T_ALTER, 0); }
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public TerminalNode T_REPLACE() { return getToken(HplsqlParser.T_REPLACE, 0); }
public TerminalNode T_SEMICOLON() { return getToken(HplsqlParser.T_SEMICOLON, 0); }
public TerminalNode T_OR() { return getToken(HplsqlParser.T_OR, 0); }
public Create_package_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_package_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_package_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_package_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_package_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_package_stmtContext create_package_stmt() throws RecognitionException {
Create_package_stmtContext _localctx = new Create_package_stmtContext(_ctx, getState());
enterRule(_localctx, 142, RULE_create_package_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1489);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ALTER:
{
setState(1482);
match(T_ALTER);
}
break;
case T_CREATE:
{
setState(1483);
match(T_CREATE);
setState(1486);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_OR) {
{
setState(1484);
match(T_OR);
setState(1485);
match(T_REPLACE);
}
}
}
break;
case T_REPLACE:
{
setState(1488);
match(T_REPLACE);
}
break;
case T_PACKAGE:
break;
default:
break;
}
setState(1491);
match(T_PACKAGE);
setState(1492);
ident();
setState(1493);
_la = _input.LA(1);
if ( !(_la==T_AS || _la==T_IS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1494);
package_spec();
setState(1495);
match(T_END);
setState(1499);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) {
case 1:
{
setState(1496);
ident();
setState(1497);
match(T_SEMICOLON);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Package_specContext extends ParserRuleContext {
public List package_spec_item() {
return getRuleContexts(Package_spec_itemContext.class);
}
public Package_spec_itemContext package_spec_item(int i) {
return getRuleContext(Package_spec_itemContext.class,i);
}
public List T_SEMICOLON() { return getTokens(HplsqlParser.T_SEMICOLON); }
public TerminalNode T_SEMICOLON(int i) {
return getToken(HplsqlParser.T_SEMICOLON, i);
}
public Package_specContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_package_spec; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterPackage_spec(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitPackage_spec(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitPackage_spec(this);
else return visitor.visitChildren(this);
}
}
public final Package_specContext package_spec() throws RecognitionException {
Package_specContext _localctx = new Package_specContext(_ctx, getState());
enterRule(_localctx, 144, RULE_package_spec);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1501);
package_spec_item();
setState(1502);
match(T_SEMICOLON);
setState(1508);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T_ACTION) | (1L << T_ADD2) | (1L << T_ALL) | (1L << T_ALLOCATE) | (1L << T_ALTER) | (1L << T_AND) | (1L << T_ANSI_NULLS) | (1L << T_ANSI_PADDING) | (1L << T_AS) | (1L << T_ASC) | (1L << T_ASSOCIATE) | (1L << T_AT) | (1L << T_AUTO_INCREMENT) | (1L << T_AVG) | (1L << T_BATCHSIZE) | (1L << T_BEGIN) | (1L << T_BETWEEN) | (1L << T_BIGINT) | (1L << T_BINARY_DOUBLE) | (1L << T_BINARY_FLOAT) | (1L << T_BIT) | (1L << T_BODY) | (1L << T_BREAK) | (1L << T_BULK) | (1L << T_BY) | (1L << T_BYTE) | (1L << T_CALL) | (1L << T_CALLER) | (1L << T_CASCADE) | (1L << T_CASE) | (1L << T_CASESPECIFIC) | (1L << T_CAST) | (1L << T_CHAR) | (1L << T_CHARACTER) | (1L << T_CHARSET) | (1L << T_CLIENT) | (1L << T_CLOSE) | (1L << T_CLUSTERED) | (1L << T_CMP) | (1L << T_COLLECT) | (1L << T_COLLECTION) | (1L << T_COLUMN) | (1L << T_COMMENT) | (1L << T_CONSTANT) | (1L << T_COMMIT) | (1L << T_COMPRESS) | (1L << T_CONCAT) | (1L << T_CONDITION) | (1L << T_CONSTRAINT) | (1L << T_CONTINUE) | (1L << T_COPY) | (1L << T_COUNT) | (1L << T_COUNT_BIG) | (1L << T_CREATE) | (1L << T_CREATION) | (1L << T_CREATOR) | (1L << T_CS) | (1L << T_CURRENT))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T_CURRENT_SCHEMA - 64)) | (1L << (T_CURSOR - 64)) | (1L << (T_DATABASE - 64)) | (1L << (T_DATA - 64)) | (1L << (T_DATE - 64)) | (1L << (T_DATETIME - 64)) | (1L << (T_DAY - 64)) | (1L << (T_DAYS - 64)) | (1L << (T_DEC - 64)) | (1L << (T_DECIMAL - 64)) | (1L << (T_DECLARE - 64)) | (1L << (T_DEFAULT - 64)) | (1L << (T_DEFERRED - 64)) | (1L << (T_DEFINED - 64)) | (1L << (T_DEFINER - 64)) | (1L << (T_DEFINITION - 64)) | (1L << (T_DELETE - 64)) | (1L << (T_DELIMITED - 64)) | (1L << (T_DELIMITER - 64)) | (1L << (T_DESC - 64)) | (1L << (T_DESCRIBE - 64)) | (1L << (T_DIAGNOSTICS - 64)) | (1L << (T_DIR - 64)) | (1L << (T_DIRECTORY - 64)) | (1L << (T_DISTINCT - 64)) | (1L << (T_DISTRIBUTE - 64)) | (1L << (T_DO - 64)) | (1L << (T_DOUBLE - 64)) | (1L << (T_DROP - 64)) | (1L << (T_DYNAMIC - 64)) | (1L << (T_ENABLE - 64)) | (1L << (T_ENGINE - 64)) | (1L << (T_ESCAPED - 64)) | (1L << (T_EXCEPT - 64)) | (1L << (T_EXEC - 64)) | (1L << (T_EXECUTE - 64)) | (1L << (T_EXCEPTION - 64)) | (1L << (T_EXCLUSIVE - 64)) | (1L << (T_EXISTS - 64)) | (1L << (T_EXIT - 64)) | (1L << (T_FALLBACK - 64)) | (1L << (T_FALSE - 64)) | (1L << (T_FETCH - 64)) | (1L << (T_FIELDS - 64)) | (1L << (T_FILE - 64)) | (1L << (T_FILES - 64)) | (1L << (T_FLOAT - 64)) | (1L << (T_FOR - 64)) | (1L << (T_FOREIGN - 64)) | (1L << (T_FORMAT - 64)) | (1L << (T_FOUND - 64)) | (1L << (T_FROM - 64)) | (1L << (T_FULL - 64)) | (1L << (T_FUNCTION - 64)) | (1L << (T_GET - 64)) | (1L << (T_GLOBAL - 64)) | (1L << (T_GO - 64)) | (1L << (T_GRANT - 64)) | (1L << (T_GROUP - 64)) | (1L << (T_HANDLER - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (T_HASH - 128)) | (1L << (T_HAVING - 128)) | (1L << (T_HDFS - 128)) | (1L << (T_HIVE - 128)) | (1L << (T_HOST - 128)) | (1L << (T_IDENTITY - 128)) | (1L << (T_IF - 128)) | (1L << (T_IGNORE - 128)) | (1L << (T_IMMEDIATE - 128)) | (1L << (T_IN - 128)) | (1L << (T_INCLUDE - 128)) | (1L << (T_INDEX - 128)) | (1L << (T_INITRANS - 128)) | (1L << (T_INNER - 128)) | (1L << (T_INOUT - 128)) | (1L << (T_INSERT - 128)) | (1L << (T_INT - 128)) | (1L << (T_INT2 - 128)) | (1L << (T_INT4 - 128)) | (1L << (T_INT8 - 128)) | (1L << (T_INTEGER - 128)) | (1L << (T_INTERSECT - 128)) | (1L << (T_INTERVAL - 128)) | (1L << (T_INTO - 128)) | (1L << (T_INVOKER - 128)) | (1L << (T_IS - 128)) | (1L << (T_ISOPEN - 128)) | (1L << (T_ITEMS - 128)) | (1L << (T_JOIN - 128)) | (1L << (T_KEEP - 128)) | (1L << (T_KEY - 128)) | (1L << (T_KEYS - 128)) | (1L << (T_LANGUAGE - 128)) | (1L << (T_LEAVE - 128)) | (1L << (T_LEFT - 128)) | (1L << (T_LIKE - 128)) | (1L << (T_LIMIT - 128)) | (1L << (T_LINES - 128)) | (1L << (T_LOCAL - 128)) | (1L << (T_LOCATION - 128)) | (1L << (T_LOCATOR - 128)) | (1L << (T_LOCATORS - 128)) | (1L << (T_LOCKS - 128)) | (1L << (T_LOG - 128)) | (1L << (T_LOGGED - 128)) | (1L << (T_LOGGING - 128)) | (1L << (T_LOOP - 128)) | (1L << (T_MAP - 128)) | (1L << (T_MATCHED - 128)) | (1L << (T_MAX - 128)) | (1L << (T_MAXTRANS - 128)) | (1L << (T_MERGE - 128)) | (1L << (T_MESSAGE_TEXT - 128)) | (1L << (T_MICROSECOND - 128)) | (1L << (T_MICROSECONDS - 128)) | (1L << (T_MIN - 128)) | (1L << (T_MULTISET - 128)) | (1L << (T_NCHAR - 128)) | (1L << (T_NEW - 128)) | (1L << (T_NVARCHAR - 128)) | (1L << (T_NO - 128)) | (1L << (T_NOCOUNT - 128)) | (1L << (T_NOCOMPRESS - 128)))) != 0) || ((((_la - 192)) & ~0x3f) == 0 && ((1L << (_la - 192)) & ((1L << (T_NOLOGGING - 192)) | (1L << (T_NONE - 192)) | (1L << (T_NOT - 192)) | (1L << (T_NOTFOUND - 192)) | (1L << (T_NUMERIC - 192)) | (1L << (T_NUMBER - 192)) | (1L << (T_OBJECT - 192)) | (1L << (T_OFF - 192)) | (1L << (T_ON - 192)) | (1L << (T_ONLY - 192)) | (1L << (T_OPEN - 192)) | (1L << (T_OR - 192)) | (1L << (T_ORDER - 192)) | (1L << (T_OUT - 192)) | (1L << (T_OUTER - 192)) | (1L << (T_OVER - 192)) | (1L << (T_OVERWRITE - 192)) | (1L << (T_OWNER - 192)) | (1L << (T_PACKAGE - 192)) | (1L << (T_PARTITION - 192)) | (1L << (T_PCTFREE - 192)) | (1L << (T_PCTUSED - 192)) | (1L << (T_PRECISION - 192)) | (1L << (T_PRESERVE - 192)) | (1L << (T_PRIMARY - 192)) | (1L << (T_PRINT - 192)) | (1L << (T_PROC - 192)) | (1L << (T_PROCEDURE - 192)) | (1L << (T_QUALIFY - 192)) | (1L << (T_QUERY_BAND - 192)) | (1L << (T_QUIT - 192)) | (1L << (T_QUOTED_IDENTIFIER - 192)) | (1L << (T_RAISE - 192)) | (1L << (T_REAL - 192)) | (1L << (T_REFERENCES - 192)) | (1L << (T_REGEXP - 192)) | (1L << (T_REPLACE - 192)) | (1L << (T_RESIGNAL - 192)) | (1L << (T_RESTRICT - 192)) | (1L << (T_RESULT - 192)) | (1L << (T_RESULT_SET_LOCATOR - 192)) | (1L << (T_RETURN - 192)) | (1L << (T_RETURNS - 192)) | (1L << (T_REVERSE - 192)) | (1L << (T_RIGHT - 192)) | (1L << (T_RLIKE - 192)) | (1L << (T_ROLE - 192)) | (1L << (T_ROLLBACK - 192)) | (1L << (T_ROW - 192)) | (1L << (T_ROWS - 192)) | (1L << (T_ROW_COUNT - 192)) | (1L << (T_RR - 192)) | (1L << (T_RS - 192)) | (1L << (T_PWD - 192)) | (1L << (T_TRIM - 192)) | (1L << (T_SCHEMA - 192)) | (1L << (T_SECOND - 192)) | (1L << (T_SECONDS - 192)) | (1L << (T_SECURITY - 192)) | (1L << (T_SEGMENT - 192)))) != 0) || ((((_la - 256)) & ~0x3f) == 0 && ((1L << (_la - 256)) & ((1L << (T_SEL - 256)) | (1L << (T_SELECT - 256)) | (1L << (T_SET - 256)) | (1L << (T_SESSION - 256)) | (1L << (T_SESSIONS - 256)) | (1L << (T_SETS - 256)) | (1L << (T_SHARE - 256)) | (1L << (T_SIGNAL - 256)) | (1L << (T_SIMPLE_DOUBLE - 256)) | (1L << (T_SIMPLE_FLOAT - 256)) | (1L << (T_SMALLDATETIME - 256)) | (1L << (T_SMALLINT - 256)) | (1L << (T_SQL - 256)) | (1L << (T_SQLEXCEPTION - 256)) | (1L << (T_SQLINSERT - 256)) | (1L << (T_SQLSTATE - 256)) | (1L << (T_SQLWARNING - 256)) | (1L << (T_STATS - 256)) | (1L << (T_STATISTICS - 256)) | (1L << (T_STEP - 256)) | (1L << (T_STORAGE - 256)) | (1L << (T_STORED - 256)) | (1L << (T_STRING - 256)) | (1L << (T_SUBDIR - 256)) | (1L << (T_SUBSTRING - 256)) | (1L << (T_SUM - 256)) | (1L << (T_SUMMARY - 256)) | (1L << (T_SYS_REFCURSOR - 256)) | (1L << (T_TABLE - 256)) | (1L << (T_TABLESPACE - 256)) | (1L << (T_TEMPORARY - 256)) | (1L << (T_TERMINATED - 256)) | (1L << (T_TEXTIMAGE_ON - 256)) | (1L << (T_THEN - 256)) | (1L << (T_TIMESTAMP - 256)) | (1L << (T_TITLE - 256)) | (1L << (T_TO - 256)) | (1L << (T_TOP - 256)) | (1L << (T_TRANSACTION - 256)) | (1L << (T_TRUE - 256)) | (1L << (T_TRUNCATE - 256)) | (1L << (T_UNIQUE - 256)) | (1L << (T_UPDATE - 256)) | (1L << (T_UR - 256)) | (1L << (T_USE - 256)) | (1L << (T_USING - 256)) | (1L << (T_VALUE - 256)) | (1L << (T_VALUES - 256)) | (1L << (T_VAR - 256)) | (1L << (T_VARCHAR - 256)) | (1L << (T_VARCHAR2 - 256)) | (1L << (T_VARYING - 256)) | (1L << (T_VOLATILE - 256)) | (1L << (T_WHILE - 256)) | (1L << (T_WITH - 256)) | (1L << (T_WITHOUT - 256)) | (1L << (T_WORK - 256)))) != 0) || ((((_la - 320)) & ~0x3f) == 0 && ((1L << (_la - 320)) & ((1L << (T_XACT_ABORT - 320)) | (1L << (T_XML - 320)) | (1L << (T_YES - 320)) | (1L << (T_ACTIVITY_COUNT - 320)) | (1L << (T_CUME_DIST - 320)) | (1L << (T_CURRENT_DATE - 320)) | (1L << (T_CURRENT_TIME_MILLIS - 320)) | (1L << (T_CURRENT_TIMESTAMP - 320)) | (1L << (T_CURRENT_USER - 320)) | (1L << (T_DENSE_RANK - 320)) | (1L << (T_FIRST_VALUE - 320)) | (1L << (T_LAG - 320)) | (1L << (T_LAST_VALUE - 320)) | (1L << (T_LEAD - 320)) | (1L << (T_PART_COUNT - 320)) | (1L << (T_PART_LOC - 320)) | (1L << (T_RANK - 320)) | (1L << (T_ROW_NUMBER - 320)) | (1L << (T_STDEV - 320)) | (1L << (T_SYSDATE - 320)) | (1L << (T_VARIANCE - 320)) | (1L << (T_USER - 320)) | (1L << (T_SUB - 320)) | (1L << (L_ID - 320)))) != 0)) {
{
{
setState(1503);
package_spec_item();
setState(1504);
match(T_SEMICOLON);
}
}
setState(1510);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Package_spec_itemContext extends ParserRuleContext {
public Declare_stmt_itemContext declare_stmt_item() {
return getRuleContext(Declare_stmt_itemContext.class,0);
}
public TerminalNode T_FUNCTION() { return getToken(HplsqlParser.T_FUNCTION, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public Create_function_returnContext create_function_return() {
return getRuleContext(Create_function_returnContext.class,0);
}
public Create_routine_paramsContext create_routine_params() {
return getRuleContext(Create_routine_paramsContext.class,0);
}
public TerminalNode T_PROCEDURE() { return getToken(HplsqlParser.T_PROCEDURE, 0); }
public TerminalNode T_PROC() { return getToken(HplsqlParser.T_PROC, 0); }
public Package_spec_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_package_spec_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterPackage_spec_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitPackage_spec_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitPackage_spec_item(this);
else return visitor.visitChildren(this);
}
}
public final Package_spec_itemContext package_spec_item() throws RecognitionException {
Package_spec_itemContext _localctx = new Package_spec_itemContext(_ctx, getState());
enterRule(_localctx, 146, RULE_package_spec_item);
int _la;
try {
setState(1524);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,147,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1511);
declare_stmt_item();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1512);
match(T_FUNCTION);
setState(1513);
ident();
setState(1515);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) {
case 1:
{
setState(1514);
create_routine_params();
}
break;
}
setState(1517);
create_function_return();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1519);
_la = _input.LA(1);
if ( !(_la==T_PROC || _la==T_PROCEDURE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1520);
ident();
setState(1522);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,146,_ctx) ) {
case 1:
{
setState(1521);
create_routine_params();
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_package_body_stmtContext extends ParserRuleContext {
public TerminalNode T_PACKAGE() { return getToken(HplsqlParser.T_PACKAGE, 0); }
public TerminalNode T_BODY() { return getToken(HplsqlParser.T_BODY, 0); }
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public Package_bodyContext package_body() {
return getRuleContext(Package_bodyContext.class,0);
}
public TerminalNode T_END() { return getToken(HplsqlParser.T_END, 0); }
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public TerminalNode T_IS() { return getToken(HplsqlParser.T_IS, 0); }
public TerminalNode T_ALTER() { return getToken(HplsqlParser.T_ALTER, 0); }
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public TerminalNode T_REPLACE() { return getToken(HplsqlParser.T_REPLACE, 0); }
public TerminalNode T_SEMICOLON() { return getToken(HplsqlParser.T_SEMICOLON, 0); }
public TerminalNode T_OR() { return getToken(HplsqlParser.T_OR, 0); }
public Create_package_body_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_package_body_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_package_body_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_package_body_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_package_body_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_package_body_stmtContext create_package_body_stmt() throws RecognitionException {
Create_package_body_stmtContext _localctx = new Create_package_body_stmtContext(_ctx, getState());
enterRule(_localctx, 148, RULE_create_package_body_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1533);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ALTER:
{
setState(1526);
match(T_ALTER);
}
break;
case T_CREATE:
{
setState(1527);
match(T_CREATE);
setState(1530);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_OR) {
{
setState(1528);
match(T_OR);
setState(1529);
match(T_REPLACE);
}
}
}
break;
case T_REPLACE:
{
setState(1532);
match(T_REPLACE);
}
break;
case T_PACKAGE:
break;
default:
break;
}
setState(1535);
match(T_PACKAGE);
setState(1536);
match(T_BODY);
setState(1537);
ident();
setState(1538);
_la = _input.LA(1);
if ( !(_la==T_AS || _la==T_IS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1539);
package_body();
setState(1540);
match(T_END);
setState(1544);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,150,_ctx) ) {
case 1:
{
setState(1541);
ident();
setState(1542);
match(T_SEMICOLON);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Package_bodyContext extends ParserRuleContext {
public List package_body_item() {
return getRuleContexts(Package_body_itemContext.class);
}
public Package_body_itemContext package_body_item(int i) {
return getRuleContext(Package_body_itemContext.class,i);
}
public List T_SEMICOLON() { return getTokens(HplsqlParser.T_SEMICOLON); }
public TerminalNode T_SEMICOLON(int i) {
return getToken(HplsqlParser.T_SEMICOLON, i);
}
public Package_bodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_package_body; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterPackage_body(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitPackage_body(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitPackage_body(this);
else return visitor.visitChildren(this);
}
}
public final Package_bodyContext package_body() throws RecognitionException {
Package_bodyContext _localctx = new Package_bodyContext(_ctx, getState());
enterRule(_localctx, 150, RULE_package_body);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1546);
package_body_item();
setState(1547);
match(T_SEMICOLON);
setState(1553);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T_ACTION) | (1L << T_ADD2) | (1L << T_ALL) | (1L << T_ALLOCATE) | (1L << T_ALTER) | (1L << T_AND) | (1L << T_ANSI_NULLS) | (1L << T_ANSI_PADDING) | (1L << T_AS) | (1L << T_ASC) | (1L << T_ASSOCIATE) | (1L << T_AT) | (1L << T_AUTO_INCREMENT) | (1L << T_AVG) | (1L << T_BATCHSIZE) | (1L << T_BEGIN) | (1L << T_BETWEEN) | (1L << T_BIGINT) | (1L << T_BINARY_DOUBLE) | (1L << T_BINARY_FLOAT) | (1L << T_BIT) | (1L << T_BODY) | (1L << T_BREAK) | (1L << T_BULK) | (1L << T_BY) | (1L << T_BYTE) | (1L << T_CALL) | (1L << T_CALLER) | (1L << T_CASCADE) | (1L << T_CASE) | (1L << T_CASESPECIFIC) | (1L << T_CAST) | (1L << T_CHAR) | (1L << T_CHARACTER) | (1L << T_CHARSET) | (1L << T_CLIENT) | (1L << T_CLOSE) | (1L << T_CLUSTERED) | (1L << T_CMP) | (1L << T_COLLECT) | (1L << T_COLLECTION) | (1L << T_COLUMN) | (1L << T_COMMENT) | (1L << T_CONSTANT) | (1L << T_COMMIT) | (1L << T_COMPRESS) | (1L << T_CONCAT) | (1L << T_CONDITION) | (1L << T_CONSTRAINT) | (1L << T_CONTINUE) | (1L << T_COPY) | (1L << T_COUNT) | (1L << T_COUNT_BIG) | (1L << T_CREATE) | (1L << T_CREATION) | (1L << T_CREATOR) | (1L << T_CS) | (1L << T_CURRENT))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (T_CURRENT_SCHEMA - 64)) | (1L << (T_CURSOR - 64)) | (1L << (T_DATABASE - 64)) | (1L << (T_DATA - 64)) | (1L << (T_DATE - 64)) | (1L << (T_DATETIME - 64)) | (1L << (T_DAY - 64)) | (1L << (T_DAYS - 64)) | (1L << (T_DEC - 64)) | (1L << (T_DECIMAL - 64)) | (1L << (T_DECLARE - 64)) | (1L << (T_DEFAULT - 64)) | (1L << (T_DEFERRED - 64)) | (1L << (T_DEFINED - 64)) | (1L << (T_DEFINER - 64)) | (1L << (T_DEFINITION - 64)) | (1L << (T_DELETE - 64)) | (1L << (T_DELIMITED - 64)) | (1L << (T_DELIMITER - 64)) | (1L << (T_DESC - 64)) | (1L << (T_DESCRIBE - 64)) | (1L << (T_DIAGNOSTICS - 64)) | (1L << (T_DIR - 64)) | (1L << (T_DIRECTORY - 64)) | (1L << (T_DISTINCT - 64)) | (1L << (T_DISTRIBUTE - 64)) | (1L << (T_DO - 64)) | (1L << (T_DOUBLE - 64)) | (1L << (T_DROP - 64)) | (1L << (T_DYNAMIC - 64)) | (1L << (T_ENABLE - 64)) | (1L << (T_ENGINE - 64)) | (1L << (T_ESCAPED - 64)) | (1L << (T_EXCEPT - 64)) | (1L << (T_EXEC - 64)) | (1L << (T_EXECUTE - 64)) | (1L << (T_EXCEPTION - 64)) | (1L << (T_EXCLUSIVE - 64)) | (1L << (T_EXISTS - 64)) | (1L << (T_EXIT - 64)) | (1L << (T_FALLBACK - 64)) | (1L << (T_FALSE - 64)) | (1L << (T_FETCH - 64)) | (1L << (T_FIELDS - 64)) | (1L << (T_FILE - 64)) | (1L << (T_FILES - 64)) | (1L << (T_FLOAT - 64)) | (1L << (T_FOR - 64)) | (1L << (T_FOREIGN - 64)) | (1L << (T_FORMAT - 64)) | (1L << (T_FOUND - 64)) | (1L << (T_FROM - 64)) | (1L << (T_FULL - 64)) | (1L << (T_FUNCTION - 64)) | (1L << (T_GET - 64)) | (1L << (T_GLOBAL - 64)) | (1L << (T_GO - 64)) | (1L << (T_GRANT - 64)) | (1L << (T_GROUP - 64)) | (1L << (T_HANDLER - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (T_HASH - 128)) | (1L << (T_HAVING - 128)) | (1L << (T_HDFS - 128)) | (1L << (T_HIVE - 128)) | (1L << (T_HOST - 128)) | (1L << (T_IDENTITY - 128)) | (1L << (T_IF - 128)) | (1L << (T_IGNORE - 128)) | (1L << (T_IMMEDIATE - 128)) | (1L << (T_IN - 128)) | (1L << (T_INCLUDE - 128)) | (1L << (T_INDEX - 128)) | (1L << (T_INITRANS - 128)) | (1L << (T_INNER - 128)) | (1L << (T_INOUT - 128)) | (1L << (T_INSERT - 128)) | (1L << (T_INT - 128)) | (1L << (T_INT2 - 128)) | (1L << (T_INT4 - 128)) | (1L << (T_INT8 - 128)) | (1L << (T_INTEGER - 128)) | (1L << (T_INTERSECT - 128)) | (1L << (T_INTERVAL - 128)) | (1L << (T_INTO - 128)) | (1L << (T_INVOKER - 128)) | (1L << (T_IS - 128)) | (1L << (T_ISOPEN - 128)) | (1L << (T_ITEMS - 128)) | (1L << (T_JOIN - 128)) | (1L << (T_KEEP - 128)) | (1L << (T_KEY - 128)) | (1L << (T_KEYS - 128)) | (1L << (T_LANGUAGE - 128)) | (1L << (T_LEAVE - 128)) | (1L << (T_LEFT - 128)) | (1L << (T_LIKE - 128)) | (1L << (T_LIMIT - 128)) | (1L << (T_LINES - 128)) | (1L << (T_LOCAL - 128)) | (1L << (T_LOCATION - 128)) | (1L << (T_LOCATOR - 128)) | (1L << (T_LOCATORS - 128)) | (1L << (T_LOCKS - 128)) | (1L << (T_LOG - 128)) | (1L << (T_LOGGED - 128)) | (1L << (T_LOGGING - 128)) | (1L << (T_LOOP - 128)) | (1L << (T_MAP - 128)) | (1L << (T_MATCHED - 128)) | (1L << (T_MAX - 128)) | (1L << (T_MAXTRANS - 128)) | (1L << (T_MERGE - 128)) | (1L << (T_MESSAGE_TEXT - 128)) | (1L << (T_MICROSECOND - 128)) | (1L << (T_MICROSECONDS - 128)) | (1L << (T_MIN - 128)) | (1L << (T_MULTISET - 128)) | (1L << (T_NCHAR - 128)) | (1L << (T_NEW - 128)) | (1L << (T_NVARCHAR - 128)) | (1L << (T_NO - 128)) | (1L << (T_NOCOUNT - 128)) | (1L << (T_NOCOMPRESS - 128)))) != 0) || ((((_la - 192)) & ~0x3f) == 0 && ((1L << (_la - 192)) & ((1L << (T_NOLOGGING - 192)) | (1L << (T_NONE - 192)) | (1L << (T_NOT - 192)) | (1L << (T_NOTFOUND - 192)) | (1L << (T_NUMERIC - 192)) | (1L << (T_NUMBER - 192)) | (1L << (T_OBJECT - 192)) | (1L << (T_OFF - 192)) | (1L << (T_ON - 192)) | (1L << (T_ONLY - 192)) | (1L << (T_OPEN - 192)) | (1L << (T_OR - 192)) | (1L << (T_ORDER - 192)) | (1L << (T_OUT - 192)) | (1L << (T_OUTER - 192)) | (1L << (T_OVER - 192)) | (1L << (T_OVERWRITE - 192)) | (1L << (T_OWNER - 192)) | (1L << (T_PACKAGE - 192)) | (1L << (T_PARTITION - 192)) | (1L << (T_PCTFREE - 192)) | (1L << (T_PCTUSED - 192)) | (1L << (T_PRECISION - 192)) | (1L << (T_PRESERVE - 192)) | (1L << (T_PRIMARY - 192)) | (1L << (T_PRINT - 192)) | (1L << (T_PROC - 192)) | (1L << (T_PROCEDURE - 192)) | (1L << (T_QUALIFY - 192)) | (1L << (T_QUERY_BAND - 192)) | (1L << (T_QUIT - 192)) | (1L << (T_QUOTED_IDENTIFIER - 192)) | (1L << (T_RAISE - 192)) | (1L << (T_REAL - 192)) | (1L << (T_REFERENCES - 192)) | (1L << (T_REGEXP - 192)) | (1L << (T_REPLACE - 192)) | (1L << (T_RESIGNAL - 192)) | (1L << (T_RESTRICT - 192)) | (1L << (T_RESULT - 192)) | (1L << (T_RESULT_SET_LOCATOR - 192)) | (1L << (T_RETURN - 192)) | (1L << (T_RETURNS - 192)) | (1L << (T_REVERSE - 192)) | (1L << (T_RIGHT - 192)) | (1L << (T_RLIKE - 192)) | (1L << (T_ROLE - 192)) | (1L << (T_ROLLBACK - 192)) | (1L << (T_ROW - 192)) | (1L << (T_ROWS - 192)) | (1L << (T_ROW_COUNT - 192)) | (1L << (T_RR - 192)) | (1L << (T_RS - 192)) | (1L << (T_PWD - 192)) | (1L << (T_TRIM - 192)) | (1L << (T_SCHEMA - 192)) | (1L << (T_SECOND - 192)) | (1L << (T_SECONDS - 192)) | (1L << (T_SECURITY - 192)) | (1L << (T_SEGMENT - 192)))) != 0) || ((((_la - 256)) & ~0x3f) == 0 && ((1L << (_la - 256)) & ((1L << (T_SEL - 256)) | (1L << (T_SELECT - 256)) | (1L << (T_SET - 256)) | (1L << (T_SESSION - 256)) | (1L << (T_SESSIONS - 256)) | (1L << (T_SETS - 256)) | (1L << (T_SHARE - 256)) | (1L << (T_SIGNAL - 256)) | (1L << (T_SIMPLE_DOUBLE - 256)) | (1L << (T_SIMPLE_FLOAT - 256)) | (1L << (T_SMALLDATETIME - 256)) | (1L << (T_SMALLINT - 256)) | (1L << (T_SQL - 256)) | (1L << (T_SQLEXCEPTION - 256)) | (1L << (T_SQLINSERT - 256)) | (1L << (T_SQLSTATE - 256)) | (1L << (T_SQLWARNING - 256)) | (1L << (T_STATS - 256)) | (1L << (T_STATISTICS - 256)) | (1L << (T_STEP - 256)) | (1L << (T_STORAGE - 256)) | (1L << (T_STORED - 256)) | (1L << (T_STRING - 256)) | (1L << (T_SUBDIR - 256)) | (1L << (T_SUBSTRING - 256)) | (1L << (T_SUM - 256)) | (1L << (T_SUMMARY - 256)) | (1L << (T_SYS_REFCURSOR - 256)) | (1L << (T_TABLE - 256)) | (1L << (T_TABLESPACE - 256)) | (1L << (T_TEMPORARY - 256)) | (1L << (T_TERMINATED - 256)) | (1L << (T_TEXTIMAGE_ON - 256)) | (1L << (T_THEN - 256)) | (1L << (T_TIMESTAMP - 256)) | (1L << (T_TITLE - 256)) | (1L << (T_TO - 256)) | (1L << (T_TOP - 256)) | (1L << (T_TRANSACTION - 256)) | (1L << (T_TRUE - 256)) | (1L << (T_TRUNCATE - 256)) | (1L << (T_UNIQUE - 256)) | (1L << (T_UPDATE - 256)) | (1L << (T_UR - 256)) | (1L << (T_USE - 256)) | (1L << (T_USING - 256)) | (1L << (T_VALUE - 256)) | (1L << (T_VALUES - 256)) | (1L << (T_VAR - 256)) | (1L << (T_VARCHAR - 256)) | (1L << (T_VARCHAR2 - 256)) | (1L << (T_VARYING - 256)) | (1L << (T_VOLATILE - 256)) | (1L << (T_WHILE - 256)) | (1L << (T_WITH - 256)) | (1L << (T_WITHOUT - 256)) | (1L << (T_WORK - 256)))) != 0) || ((((_la - 320)) & ~0x3f) == 0 && ((1L << (_la - 320)) & ((1L << (T_XACT_ABORT - 320)) | (1L << (T_XML - 320)) | (1L << (T_YES - 320)) | (1L << (T_ACTIVITY_COUNT - 320)) | (1L << (T_CUME_DIST - 320)) | (1L << (T_CURRENT_DATE - 320)) | (1L << (T_CURRENT_TIME_MILLIS - 320)) | (1L << (T_CURRENT_TIMESTAMP - 320)) | (1L << (T_CURRENT_USER - 320)) | (1L << (T_DENSE_RANK - 320)) | (1L << (T_FIRST_VALUE - 320)) | (1L << (T_LAG - 320)) | (1L << (T_LAST_VALUE - 320)) | (1L << (T_LEAD - 320)) | (1L << (T_PART_COUNT - 320)) | (1L << (T_PART_LOC - 320)) | (1L << (T_RANK - 320)) | (1L << (T_ROW_NUMBER - 320)) | (1L << (T_STDEV - 320)) | (1L << (T_SYSDATE - 320)) | (1L << (T_VARIANCE - 320)) | (1L << (T_USER - 320)) | (1L << (T_SUB - 320)) | (1L << (L_ID - 320)))) != 0)) {
{
{
setState(1548);
package_body_item();
setState(1549);
match(T_SEMICOLON);
}
}
setState(1555);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Package_body_itemContext extends ParserRuleContext {
public Declare_stmt_itemContext declare_stmt_item() {
return getRuleContext(Declare_stmt_itemContext.class,0);
}
public Create_function_stmtContext create_function_stmt() {
return getRuleContext(Create_function_stmtContext.class,0);
}
public Create_procedure_stmtContext create_procedure_stmt() {
return getRuleContext(Create_procedure_stmtContext.class,0);
}
public Package_body_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_package_body_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterPackage_body_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitPackage_body_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitPackage_body_item(this);
else return visitor.visitChildren(this);
}
}
public final Package_body_itemContext package_body_item() throws RecognitionException {
Package_body_itemContext _localctx = new Package_body_itemContext(_ctx, getState());
enterRule(_localctx, 152, RULE_package_body_item);
try {
setState(1559);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,152,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1556);
declare_stmt_item();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1557);
create_function_stmt();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1558);
create_procedure_stmt();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_procedure_stmtContext extends ParserRuleContext {
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public Proc_blockContext proc_block() {
return getRuleContext(Proc_blockContext.class,0);
}
public TerminalNode T_PROCEDURE() { return getToken(HplsqlParser.T_PROCEDURE, 0); }
public TerminalNode T_PROC() { return getToken(HplsqlParser.T_PROC, 0); }
public TerminalNode T_ALTER() { return getToken(HplsqlParser.T_ALTER, 0); }
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public TerminalNode T_REPLACE() { return getToken(HplsqlParser.T_REPLACE, 0); }
public Create_routine_paramsContext create_routine_params() {
return getRuleContext(Create_routine_paramsContext.class,0);
}
public Create_routine_optionsContext create_routine_options() {
return getRuleContext(Create_routine_optionsContext.class,0);
}
public Declare_block_inplaceContext declare_block_inplace() {
return getRuleContext(Declare_block_inplaceContext.class,0);
}
public LabelContext label() {
return getRuleContext(LabelContext.class,0);
}
public TerminalNode T_SEMICOLON() { return getToken(HplsqlParser.T_SEMICOLON, 0); }
public TerminalNode T_AS() { return getToken(HplsqlParser.T_AS, 0); }
public TerminalNode T_IS() { return getToken(HplsqlParser.T_IS, 0); }
public TerminalNode T_OR() { return getToken(HplsqlParser.T_OR, 0); }
public Create_procedure_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_procedure_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_procedure_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_procedure_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_procedure_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_procedure_stmtContext create_procedure_stmt() throws RecognitionException {
Create_procedure_stmtContext _localctx = new Create_procedure_stmtContext(_ctx, getState());
enterRule(_localctx, 154, RULE_create_procedure_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1568);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ALTER:
{
setState(1561);
match(T_ALTER);
}
break;
case T_CREATE:
{
setState(1562);
match(T_CREATE);
setState(1565);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_OR) {
{
setState(1563);
match(T_OR);
setState(1564);
match(T_REPLACE);
}
}
}
break;
case T_REPLACE:
{
setState(1567);
match(T_REPLACE);
}
break;
case T_PROC:
case T_PROCEDURE:
break;
default:
break;
}
setState(1570);
_la = _input.LA(1);
if ( !(_la==T_PROC || _la==T_PROCEDURE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1571);
ident();
setState(1573);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,155,_ctx) ) {
case 1:
{
setState(1572);
create_routine_params();
}
break;
}
setState(1576);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,156,_ctx) ) {
case 1:
{
setState(1575);
create_routine_options();
}
break;
}
setState(1579);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,157,_ctx) ) {
case 1:
{
setState(1578);
_la = _input.LA(1);
if ( !(_la==T_AS || _la==T_IS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
}
setState(1582);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,158,_ctx) ) {
case 1:
{
setState(1581);
declare_block_inplace();
}
break;
}
setState(1585);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,159,_ctx) ) {
case 1:
{
setState(1584);
label();
}
break;
}
setState(1587);
proc_block();
setState(1591);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,160,_ctx) ) {
case 1:
{
setState(1588);
ident();
setState(1589);
match(T_SEMICOLON);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_routine_paramsContext extends ParserRuleContext {
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List create_routine_param_item() {
return getRuleContexts(Create_routine_param_itemContext.class);
}
public Create_routine_param_itemContext create_routine_param_item(int i) {
return getRuleContext(Create_routine_param_itemContext.class,i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Create_routine_paramsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_routine_params; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_routine_params(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_routine_params(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_routine_params(this);
else return visitor.visitChildren(this);
}
}
public final Create_routine_paramsContext create_routine_params() throws RecognitionException {
Create_routine_paramsContext _localctx = new Create_routine_paramsContext(_ctx, getState());
enterRule(_localctx, 156, RULE_create_routine_params);
int _la;
try {
int _alt;
setState(1615);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,163,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1593);
match(T_OPEN_P);
setState(1594);
match(T_CLOSE_P);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1595);
match(T_OPEN_P);
setState(1596);
create_routine_param_item();
setState(1601);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1597);
match(T_COMMA);
setState(1598);
create_routine_param_item();
}
}
setState(1603);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1604);
match(T_CLOSE_P);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1606);
if (!(!_input.LT(1).getText().equalsIgnoreCase("IS") &&
!_input.LT(1).getText().equalsIgnoreCase("AS") &&
!(_input.LT(1).getText().equalsIgnoreCase("DYNAMIC") && _input.LT(2).getText().equalsIgnoreCase("RESULT"))
)) throw new FailedPredicateException(this, "!_input.LT(1).getText().equalsIgnoreCase(\"IS\") &&\n !_input.LT(1).getText().equalsIgnoreCase(\"AS\") &&\n !(_input.LT(1).getText().equalsIgnoreCase(\"DYNAMIC\") && _input.LT(2).getText().equalsIgnoreCase(\"RESULT\"))\n ");
setState(1607);
create_routine_param_item();
setState(1612);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,162,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1608);
match(T_COMMA);
setState(1609);
create_routine_param_item();
}
}
}
setState(1614);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,162,_ctx);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_routine_param_itemContext extends ParserRuleContext {
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public DtypeContext dtype() {
return getRuleContext(DtypeContext.class,0);
}
public TerminalNode T_IN() { return getToken(HplsqlParser.T_IN, 0); }
public TerminalNode T_OUT() { return getToken(HplsqlParser.T_OUT, 0); }
public TerminalNode T_INOUT() { return getToken(HplsqlParser.T_INOUT, 0); }
public Dtype_lenContext dtype_len() {
return getRuleContext(Dtype_lenContext.class,0);
}
public List dtype_attr() {
return getRuleContexts(Dtype_attrContext.class);
}
public Dtype_attrContext dtype_attr(int i) {
return getRuleContext(Dtype_attrContext.class,i);
}
public Dtype_defaultContext dtype_default() {
return getRuleContext(Dtype_defaultContext.class,0);
}
public Create_routine_param_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_routine_param_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_routine_param_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_routine_param_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_routine_param_item(this);
else return visitor.visitChildren(this);
}
}
public final Create_routine_param_itemContext create_routine_param_item() throws RecognitionException {
Create_routine_param_itemContext _localctx = new Create_routine_param_itemContext(_ctx, getState());
enterRule(_localctx, 158, RULE_create_routine_param_item);
try {
int _alt;
setState(1659);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,172,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1622);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,164,_ctx) ) {
case 1:
{
setState(1617);
match(T_IN);
}
break;
case 2:
{
setState(1618);
match(T_OUT);
}
break;
case 3:
{
setState(1619);
match(T_INOUT);
}
break;
case 4:
{
setState(1620);
match(T_IN);
setState(1621);
match(T_OUT);
}
break;
}
setState(1624);
ident();
setState(1625);
dtype();
setState(1627);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,165,_ctx) ) {
case 1:
{
setState(1626);
dtype_len();
}
break;
}
setState(1632);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,166,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1629);
dtype_attr();
}
}
}
setState(1634);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,166,_ctx);
}
setState(1636);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,167,_ctx) ) {
case 1:
{
setState(1635);
dtype_default();
}
break;
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1638);
ident();
setState(1644);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,168,_ctx) ) {
case 1:
{
setState(1639);
match(T_IN);
}
break;
case 2:
{
setState(1640);
match(T_OUT);
}
break;
case 3:
{
setState(1641);
match(T_INOUT);
}
break;
case 4:
{
setState(1642);
match(T_IN);
setState(1643);
match(T_OUT);
}
break;
}
setState(1646);
dtype();
setState(1648);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,169,_ctx) ) {
case 1:
{
setState(1647);
dtype_len();
}
break;
}
setState(1653);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,170,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1650);
dtype_attr();
}
}
}
setState(1655);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,170,_ctx);
}
setState(1657);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,171,_ctx) ) {
case 1:
{
setState(1656);
dtype_default();
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_routine_optionsContext extends ParserRuleContext {
public List create_routine_option() {
return getRuleContexts(Create_routine_optionContext.class);
}
public Create_routine_optionContext create_routine_option(int i) {
return getRuleContext(Create_routine_optionContext.class,i);
}
public Create_routine_optionsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_routine_options; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_routine_options(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_routine_options(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_routine_options(this);
else return visitor.visitChildren(this);
}
}
public final Create_routine_optionsContext create_routine_options() throws RecognitionException {
Create_routine_optionsContext _localctx = new Create_routine_optionsContext(_ctx, getState());
enterRule(_localctx, 160, RULE_create_routine_options);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1662);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1661);
create_routine_option();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1664);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,173,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_routine_optionContext extends ParserRuleContext {
public TerminalNode T_LANGUAGE() { return getToken(HplsqlParser.T_LANGUAGE, 0); }
public TerminalNode T_SQL() { return getToken(HplsqlParser.T_SQL, 0); }
public TerminalNode T_SECURITY() { return getToken(HplsqlParser.T_SECURITY, 0); }
public TerminalNode T_CREATOR() { return getToken(HplsqlParser.T_CREATOR, 0); }
public TerminalNode T_DEFINER() { return getToken(HplsqlParser.T_DEFINER, 0); }
public TerminalNode T_INVOKER() { return getToken(HplsqlParser.T_INVOKER, 0); }
public TerminalNode T_OWNER() { return getToken(HplsqlParser.T_OWNER, 0); }
public TerminalNode T_RESULT() { return getToken(HplsqlParser.T_RESULT, 0); }
public TerminalNode T_SETS() { return getToken(HplsqlParser.T_SETS, 0); }
public TerminalNode L_INT() { return getToken(HplsqlParser.L_INT, 0); }
public TerminalNode T_DYNAMIC() { return getToken(HplsqlParser.T_DYNAMIC, 0); }
public Create_routine_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_routine_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_routine_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_routine_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_routine_option(this);
else return visitor.visitChildren(this);
}
}
public final Create_routine_optionContext create_routine_option() throws RecognitionException {
Create_routine_optionContext _localctx = new Create_routine_optionContext(_ctx, getState());
enterRule(_localctx, 162, RULE_create_routine_option);
int _la;
try {
setState(1677);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_LANGUAGE:
enterOuterAlt(_localctx, 1);
{
setState(1666);
match(T_LANGUAGE);
setState(1667);
match(T_SQL);
}
break;
case T_SQL:
enterOuterAlt(_localctx, 2);
{
setState(1668);
match(T_SQL);
setState(1669);
match(T_SECURITY);
setState(1670);
_la = _input.LA(1);
if ( !(_la==T_CREATOR || _la==T_DEFINER || _la==T_INVOKER || _la==T_OWNER) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case T_DYNAMIC:
case T_RESULT:
enterOuterAlt(_localctx, 3);
{
setState(1672);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_DYNAMIC) {
{
setState(1671);
match(T_DYNAMIC);
}
}
setState(1674);
match(T_RESULT);
setState(1675);
match(T_SETS);
setState(1676);
match(L_INT);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Drop_stmtContext extends ParserRuleContext {
public TerminalNode T_DROP() { return getToken(HplsqlParser.T_DROP, 0); }
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_IF() { return getToken(HplsqlParser.T_IF, 0); }
public TerminalNode T_EXISTS() { return getToken(HplsqlParser.T_EXISTS, 0); }
public TerminalNode T_PACKAGE() { return getToken(HplsqlParser.T_PACKAGE, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public TerminalNode T_PROCEDURE() { return getToken(HplsqlParser.T_PROCEDURE, 0); }
public TerminalNode T_FUNCTION() { return getToken(HplsqlParser.T_FUNCTION, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_DATABASE() { return getToken(HplsqlParser.T_DATABASE, 0); }
public TerminalNode T_SCHEMA() { return getToken(HplsqlParser.T_SCHEMA, 0); }
public Drop_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_drop_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterDrop_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitDrop_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitDrop_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Drop_stmtContext drop_stmt() throws RecognitionException {
Drop_stmtContext _localctx = new Drop_stmtContext(_ctx, getState());
enterRule(_localctx, 164, RULE_drop_stmt);
int _la;
try {
setState(1707);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,180,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1679);
match(T_DROP);
setState(1680);
match(T_TABLE);
setState(1683);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,176,_ctx) ) {
case 1:
{
setState(1681);
match(T_IF);
setState(1682);
match(T_EXISTS);
}
break;
}
setState(1685);
table_name();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1686);
match(T_DROP);
setState(1687);
match(T_PACKAGE);
setState(1690);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,177,_ctx) ) {
case 1:
{
setState(1688);
match(T_IF);
setState(1689);
match(T_EXISTS);
}
break;
}
setState(1692);
ident();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1693);
match(T_DROP);
setState(1694);
_la = _input.LA(1);
if ( !(_la==T_FUNCTION || _la==T_PROCEDURE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1697);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,178,_ctx) ) {
case 1:
{
setState(1695);
match(T_IF);
setState(1696);
match(T_EXISTS);
}
break;
}
setState(1699);
ident();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1700);
match(T_DROP);
setState(1701);
_la = _input.LA(1);
if ( !(_la==T_DATABASE || _la==T_SCHEMA) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1704);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,179,_ctx) ) {
case 1:
{
setState(1702);
match(T_IF);
setState(1703);
match(T_EXISTS);
}
break;
}
setState(1706);
expr(0);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class End_transaction_stmtContext extends ParserRuleContext {
public TerminalNode T_END() { return getToken(HplsqlParser.T_END, 0); }
public TerminalNode T_TRANSACTION() { return getToken(HplsqlParser.T_TRANSACTION, 0); }
public End_transaction_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_end_transaction_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterEnd_transaction_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitEnd_transaction_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitEnd_transaction_stmt(this);
else return visitor.visitChildren(this);
}
}
public final End_transaction_stmtContext end_transaction_stmt() throws RecognitionException {
End_transaction_stmtContext _localctx = new End_transaction_stmtContext(_ctx, getState());
enterRule(_localctx, 166, RULE_end_transaction_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1709);
match(T_END);
setState(1710);
match(T_TRANSACTION);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Exec_stmtContext extends ParserRuleContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_EXEC() { return getToken(HplsqlParser.T_EXEC, 0); }
public TerminalNode T_EXECUTE() { return getToken(HplsqlParser.T_EXECUTE, 0); }
public TerminalNode T_IMMEDIATE() { return getToken(HplsqlParser.T_IMMEDIATE, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public Expr_func_paramsContext expr_func_params() {
return getRuleContext(Expr_func_paramsContext.class,0);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public TerminalNode T_INTO() { return getToken(HplsqlParser.T_INTO, 0); }
public List L_ID() { return getTokens(HplsqlParser.L_ID); }
public TerminalNode L_ID(int i) {
return getToken(HplsqlParser.L_ID, i);
}
public Using_clauseContext using_clause() {
return getRuleContext(Using_clauseContext.class,0);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Exec_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exec_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterExec_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitExec_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitExec_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Exec_stmtContext exec_stmt() throws RecognitionException {
Exec_stmtContext _localctx = new Exec_stmtContext(_ctx, getState());
enterRule(_localctx, 168, RULE_exec_stmt);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1712);
_la = _input.LA(1);
if ( !(_la==T_EXEC || _la==T_EXECUTE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1714);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,181,_ctx) ) {
case 1:
{
setState(1713);
match(T_IMMEDIATE);
}
break;
}
setState(1716);
expr(0);
setState(1722);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,182,_ctx) ) {
case 1:
{
setState(1717);
match(T_OPEN_P);
setState(1718);
expr_func_params();
setState(1719);
match(T_CLOSE_P);
}
break;
case 2:
{
setState(1721);
expr_func_params();
}
break;
}
setState(1733);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,184,_ctx) ) {
case 1:
{
setState(1724);
match(T_INTO);
setState(1725);
match(L_ID);
setState(1730);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,183,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1726);
match(T_COMMA);
setState(1727);
match(L_ID);
}
}
}
setState(1732);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,183,_ctx);
}
}
break;
}
setState(1736);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,185,_ctx) ) {
case 1:
{
setState(1735);
using_clause();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class If_stmtContext extends ParserRuleContext {
public If_plsql_stmtContext if_plsql_stmt() {
return getRuleContext(If_plsql_stmtContext.class,0);
}
public If_tsql_stmtContext if_tsql_stmt() {
return getRuleContext(If_tsql_stmtContext.class,0);
}
public If_bteq_stmtContext if_bteq_stmt() {
return getRuleContext(If_bteq_stmtContext.class,0);
}
public If_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_if_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterIf_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitIf_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitIf_stmt(this);
else return visitor.visitChildren(this);
}
}
public final If_stmtContext if_stmt() throws RecognitionException {
If_stmtContext _localctx = new If_stmtContext(_ctx, getState());
enterRule(_localctx, 170, RULE_if_stmt);
try {
setState(1741);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,186,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1738);
if_plsql_stmt();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1739);
if_tsql_stmt();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1740);
if_bteq_stmt();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class If_plsql_stmtContext extends ParserRuleContext {
public List T_IF() { return getTokens(HplsqlParser.T_IF); }
public TerminalNode T_IF(int i) {
return getToken(HplsqlParser.T_IF, i);
}
public Bool_exprContext bool_expr() {
return getRuleContext(Bool_exprContext.class,0);
}
public TerminalNode T_THEN() { return getToken(HplsqlParser.T_THEN, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public TerminalNode T_END() { return getToken(HplsqlParser.T_END, 0); }
public List elseif_block() {
return getRuleContexts(Elseif_blockContext.class);
}
public Elseif_blockContext elseif_block(int i) {
return getRuleContext(Elseif_blockContext.class,i);
}
public Else_blockContext else_block() {
return getRuleContext(Else_blockContext.class,0);
}
public If_plsql_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_if_plsql_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterIf_plsql_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitIf_plsql_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitIf_plsql_stmt(this);
else return visitor.visitChildren(this);
}
}
public final If_plsql_stmtContext if_plsql_stmt() throws RecognitionException {
If_plsql_stmtContext _localctx = new If_plsql_stmtContext(_ctx, getState());
enterRule(_localctx, 172, RULE_if_plsql_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1743);
match(T_IF);
setState(1744);
bool_expr(0);
setState(1745);
match(T_THEN);
setState(1746);
block();
setState(1750);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_ELSEIF || _la==T_ELSIF) {
{
{
setState(1747);
elseif_block();
}
}
setState(1752);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1754);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ELSE) {
{
setState(1753);
else_block();
}
}
setState(1756);
match(T_END);
setState(1757);
match(T_IF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class If_tsql_stmtContext extends ParserRuleContext {
public TerminalNode T_IF() { return getToken(HplsqlParser.T_IF, 0); }
public Bool_exprContext bool_expr() {
return getRuleContext(Bool_exprContext.class,0);
}
public List single_block_stmt() {
return getRuleContexts(Single_block_stmtContext.class);
}
public Single_block_stmtContext single_block_stmt(int i) {
return getRuleContext(Single_block_stmtContext.class,i);
}
public TerminalNode T_ELSE() { return getToken(HplsqlParser.T_ELSE, 0); }
public If_tsql_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_if_tsql_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterIf_tsql_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitIf_tsql_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitIf_tsql_stmt(this);
else return visitor.visitChildren(this);
}
}
public final If_tsql_stmtContext if_tsql_stmt() throws RecognitionException {
If_tsql_stmtContext _localctx = new If_tsql_stmtContext(_ctx, getState());
enterRule(_localctx, 174, RULE_if_tsql_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1759);
match(T_IF);
setState(1760);
bool_expr(0);
setState(1761);
single_block_stmt();
setState(1764);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,189,_ctx) ) {
case 1:
{
setState(1762);
match(T_ELSE);
setState(1763);
single_block_stmt();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class If_bteq_stmtContext extends ParserRuleContext {
public TerminalNode T_DOT() { return getToken(HplsqlParser.T_DOT, 0); }
public TerminalNode T_IF() { return getToken(HplsqlParser.T_IF, 0); }
public Bool_exprContext bool_expr() {
return getRuleContext(Bool_exprContext.class,0);
}
public TerminalNode T_THEN() { return getToken(HplsqlParser.T_THEN, 0); }
public Single_block_stmtContext single_block_stmt() {
return getRuleContext(Single_block_stmtContext.class,0);
}
public If_bteq_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_if_bteq_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterIf_bteq_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitIf_bteq_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitIf_bteq_stmt(this);
else return visitor.visitChildren(this);
}
}
public final If_bteq_stmtContext if_bteq_stmt() throws RecognitionException {
If_bteq_stmtContext _localctx = new If_bteq_stmtContext(_ctx, getState());
enterRule(_localctx, 176, RULE_if_bteq_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1766);
match(T_DOT);
setState(1767);
match(T_IF);
setState(1768);
bool_expr(0);
setState(1769);
match(T_THEN);
setState(1770);
single_block_stmt();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Elseif_blockContext extends ParserRuleContext {
public Bool_exprContext bool_expr() {
return getRuleContext(Bool_exprContext.class,0);
}
public TerminalNode T_THEN() { return getToken(HplsqlParser.T_THEN, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public TerminalNode T_ELSIF() { return getToken(HplsqlParser.T_ELSIF, 0); }
public TerminalNode T_ELSEIF() { return getToken(HplsqlParser.T_ELSEIF, 0); }
public Elseif_blockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elseif_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterElseif_block(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitElseif_block(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitElseif_block(this);
else return visitor.visitChildren(this);
}
}
public final Elseif_blockContext elseif_block() throws RecognitionException {
Elseif_blockContext _localctx = new Elseif_blockContext(_ctx, getState());
enterRule(_localctx, 178, RULE_elseif_block);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1772);
_la = _input.LA(1);
if ( !(_la==T_ELSEIF || _la==T_ELSIF) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1773);
bool_expr(0);
setState(1774);
match(T_THEN);
setState(1775);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Else_blockContext extends ParserRuleContext {
public TerminalNode T_ELSE() { return getToken(HplsqlParser.T_ELSE, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public Else_blockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_else_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterElse_block(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitElse_block(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitElse_block(this);
else return visitor.visitChildren(this);
}
}
public final Else_blockContext else_block() throws RecognitionException {
Else_blockContext _localctx = new Else_blockContext(_ctx, getState());
enterRule(_localctx, 180, RULE_else_block);
try {
enterOuterAlt(_localctx, 1);
{
setState(1777);
match(T_ELSE);
setState(1778);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Include_stmtContext extends ParserRuleContext {
public TerminalNode T_INCLUDE() { return getToken(HplsqlParser.T_INCLUDE, 0); }
public File_nameContext file_name() {
return getRuleContext(File_nameContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Include_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_include_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterInclude_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitInclude_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitInclude_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Include_stmtContext include_stmt() throws RecognitionException {
Include_stmtContext _localctx = new Include_stmtContext(_ctx, getState());
enterRule(_localctx, 182, RULE_include_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1780);
match(T_INCLUDE);
setState(1783);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,190,_ctx) ) {
case 1:
{
setState(1781);
file_name();
}
break;
case 2:
{
setState(1782);
expr(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Insert_stmtContext extends ParserRuleContext {
public TerminalNode T_INSERT() { return getToken(HplsqlParser.T_INSERT, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_OVERWRITE() { return getToken(HplsqlParser.T_OVERWRITE, 0); }
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public TerminalNode T_INTO() { return getToken(HplsqlParser.T_INTO, 0); }
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public Insert_stmt_rowsContext insert_stmt_rows() {
return getRuleContext(Insert_stmt_rowsContext.class,0);
}
public Insert_stmt_colsContext insert_stmt_cols() {
return getRuleContext(Insert_stmt_colsContext.class,0);
}
public Insert_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_insert_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterInsert_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitInsert_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitInsert_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Insert_stmtContext insert_stmt() throws RecognitionException {
Insert_stmtContext _localctx = new Insert_stmtContext(_ctx, getState());
enterRule(_localctx, 184, RULE_insert_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1785);
match(T_INSERT);
setState(1792);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_OVERWRITE:
{
setState(1786);
match(T_OVERWRITE);
setState(1787);
match(T_TABLE);
}
break;
case T_INTO:
{
setState(1788);
match(T_INTO);
setState(1790);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,191,_ctx) ) {
case 1:
{
setState(1789);
match(T_TABLE);
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1794);
table_name();
setState(1796);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,193,_ctx) ) {
case 1:
{
setState(1795);
insert_stmt_cols();
}
break;
}
setState(1800);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_SEL:
case T_SELECT:
case T_WITH:
case T_OPEN_P:
{
setState(1798);
select_stmt();
}
break;
case T_VALUES:
{
setState(1799);
insert_stmt_rows();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Insert_stmt_colsContext extends ParserRuleContext {
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Insert_stmt_colsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_insert_stmt_cols; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterInsert_stmt_cols(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitInsert_stmt_cols(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitInsert_stmt_cols(this);
else return visitor.visitChildren(this);
}
}
public final Insert_stmt_colsContext insert_stmt_cols() throws RecognitionException {
Insert_stmt_colsContext _localctx = new Insert_stmt_colsContext(_ctx, getState());
enterRule(_localctx, 186, RULE_insert_stmt_cols);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1802);
match(T_OPEN_P);
setState(1803);
qident();
setState(1808);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1804);
match(T_COMMA);
setState(1805);
qident();
}
}
setState(1810);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1811);
match(T_CLOSE_P);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Insert_stmt_rowsContext extends ParserRuleContext {
public TerminalNode T_VALUES() { return getToken(HplsqlParser.T_VALUES, 0); }
public List insert_stmt_row() {
return getRuleContexts(Insert_stmt_rowContext.class);
}
public Insert_stmt_rowContext insert_stmt_row(int i) {
return getRuleContext(Insert_stmt_rowContext.class,i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Insert_stmt_rowsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_insert_stmt_rows; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterInsert_stmt_rows(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitInsert_stmt_rows(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitInsert_stmt_rows(this);
else return visitor.visitChildren(this);
}
}
public final Insert_stmt_rowsContext insert_stmt_rows() throws RecognitionException {
Insert_stmt_rowsContext _localctx = new Insert_stmt_rowsContext(_ctx, getState());
enterRule(_localctx, 188, RULE_insert_stmt_rows);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1813);
match(T_VALUES);
setState(1814);
insert_stmt_row();
setState(1819);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,196,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1815);
match(T_COMMA);
setState(1816);
insert_stmt_row();
}
}
}
setState(1821);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,196,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Insert_stmt_rowContext extends ParserRuleContext {
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Insert_stmt_rowContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_insert_stmt_row; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterInsert_stmt_row(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitInsert_stmt_row(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitInsert_stmt_row(this);
else return visitor.visitChildren(this);
}
}
public final Insert_stmt_rowContext insert_stmt_row() throws RecognitionException {
Insert_stmt_rowContext _localctx = new Insert_stmt_rowContext(_ctx, getState());
enterRule(_localctx, 190, RULE_insert_stmt_row);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1822);
match(T_OPEN_P);
setState(1823);
expr(0);
setState(1828);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1824);
match(T_COMMA);
setState(1825);
expr(0);
}
}
setState(1830);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1831);
match(T_CLOSE_P);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Insert_directory_stmtContext extends ParserRuleContext {
public TerminalNode T_INSERT() { return getToken(HplsqlParser.T_INSERT, 0); }
public TerminalNode T_OVERWRITE() { return getToken(HplsqlParser.T_OVERWRITE, 0); }
public TerminalNode T_DIRECTORY() { return getToken(HplsqlParser.T_DIRECTORY, 0); }
public Expr_fileContext expr_file() {
return getRuleContext(Expr_fileContext.class,0);
}
public Expr_selectContext expr_select() {
return getRuleContext(Expr_selectContext.class,0);
}
public TerminalNode T_LOCAL() { return getToken(HplsqlParser.T_LOCAL, 0); }
public Insert_directory_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_insert_directory_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterInsert_directory_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitInsert_directory_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitInsert_directory_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Insert_directory_stmtContext insert_directory_stmt() throws RecognitionException {
Insert_directory_stmtContext _localctx = new Insert_directory_stmtContext(_ctx, getState());
enterRule(_localctx, 192, RULE_insert_directory_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1833);
match(T_INSERT);
setState(1834);
match(T_OVERWRITE);
setState(1836);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_LOCAL) {
{
setState(1835);
match(T_LOCAL);
}
}
setState(1838);
match(T_DIRECTORY);
setState(1839);
expr_file();
setState(1840);
expr_select();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Exit_stmtContext extends ParserRuleContext {
public TerminalNode T_EXIT() { return getToken(HplsqlParser.T_EXIT, 0); }
public TerminalNode L_ID() { return getToken(HplsqlParser.L_ID, 0); }
public TerminalNode T_WHEN() { return getToken(HplsqlParser.T_WHEN, 0); }
public Bool_exprContext bool_expr() {
return getRuleContext(Bool_exprContext.class,0);
}
public Exit_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exit_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterExit_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitExit_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitExit_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Exit_stmtContext exit_stmt() throws RecognitionException {
Exit_stmtContext _localctx = new Exit_stmtContext(_ctx, getState());
enterRule(_localctx, 194, RULE_exit_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1842);
match(T_EXIT);
setState(1844);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,199,_ctx) ) {
case 1:
{
setState(1843);
match(L_ID);
}
break;
}
setState(1848);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,200,_ctx) ) {
case 1:
{
setState(1846);
match(T_WHEN);
setState(1847);
bool_expr(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Get_diag_stmtContext extends ParserRuleContext {
public TerminalNode T_GET() { return getToken(HplsqlParser.T_GET, 0); }
public TerminalNode T_DIAGNOSTICS() { return getToken(HplsqlParser.T_DIAGNOSTICS, 0); }
public Get_diag_stmt_itemContext get_diag_stmt_item() {
return getRuleContext(Get_diag_stmt_itemContext.class,0);
}
public Get_diag_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_get_diag_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterGet_diag_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitGet_diag_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitGet_diag_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Get_diag_stmtContext get_diag_stmt() throws RecognitionException {
Get_diag_stmtContext _localctx = new Get_diag_stmtContext(_ctx, getState());
enterRule(_localctx, 196, RULE_get_diag_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1850);
match(T_GET);
setState(1851);
match(T_DIAGNOSTICS);
setState(1852);
get_diag_stmt_item();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Get_diag_stmt_itemContext extends ParserRuleContext {
public Get_diag_stmt_exception_itemContext get_diag_stmt_exception_item() {
return getRuleContext(Get_diag_stmt_exception_itemContext.class,0);
}
public Get_diag_stmt_rowcount_itemContext get_diag_stmt_rowcount_item() {
return getRuleContext(Get_diag_stmt_rowcount_itemContext.class,0);
}
public Get_diag_stmt_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_get_diag_stmt_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterGet_diag_stmt_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitGet_diag_stmt_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitGet_diag_stmt_item(this);
else return visitor.visitChildren(this);
}
}
public final Get_diag_stmt_itemContext get_diag_stmt_item() throws RecognitionException {
Get_diag_stmt_itemContext _localctx = new Get_diag_stmt_itemContext(_ctx, getState());
enterRule(_localctx, 198, RULE_get_diag_stmt_item);
try {
setState(1856);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,201,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1854);
get_diag_stmt_exception_item();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1855);
get_diag_stmt_rowcount_item();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Get_diag_stmt_exception_itemContext extends ParserRuleContext {
public TerminalNode T_EXCEPTION() { return getToken(HplsqlParser.T_EXCEPTION, 0); }
public TerminalNode L_INT() { return getToken(HplsqlParser.L_INT, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public TerminalNode T_MESSAGE_TEXT() { return getToken(HplsqlParser.T_MESSAGE_TEXT, 0); }
public Get_diag_stmt_exception_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_get_diag_stmt_exception_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterGet_diag_stmt_exception_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitGet_diag_stmt_exception_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitGet_diag_stmt_exception_item(this);
else return visitor.visitChildren(this);
}
}
public final Get_diag_stmt_exception_itemContext get_diag_stmt_exception_item() throws RecognitionException {
Get_diag_stmt_exception_itemContext _localctx = new Get_diag_stmt_exception_itemContext(_ctx, getState());
enterRule(_localctx, 200, RULE_get_diag_stmt_exception_item);
try {
enterOuterAlt(_localctx, 1);
{
setState(1858);
match(T_EXCEPTION);
setState(1859);
match(L_INT);
setState(1860);
qident();
setState(1861);
match(T_EQUAL);
setState(1862);
match(T_MESSAGE_TEXT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Get_diag_stmt_rowcount_itemContext extends ParserRuleContext {
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public TerminalNode T_ROW_COUNT() { return getToken(HplsqlParser.T_ROW_COUNT, 0); }
public Get_diag_stmt_rowcount_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_get_diag_stmt_rowcount_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterGet_diag_stmt_rowcount_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitGet_diag_stmt_rowcount_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitGet_diag_stmt_rowcount_item(this);
else return visitor.visitChildren(this);
}
}
public final Get_diag_stmt_rowcount_itemContext get_diag_stmt_rowcount_item() throws RecognitionException {
Get_diag_stmt_rowcount_itemContext _localctx = new Get_diag_stmt_rowcount_itemContext(_ctx, getState());
enterRule(_localctx, 202, RULE_get_diag_stmt_rowcount_item);
try {
enterOuterAlt(_localctx, 1);
{
setState(1864);
qident();
setState(1865);
match(T_EQUAL);
setState(1866);
match(T_ROW_COUNT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Grant_stmtContext extends ParserRuleContext {
public TerminalNode T_GRANT() { return getToken(HplsqlParser.T_GRANT, 0); }
public List grant_stmt_item() {
return getRuleContexts(Grant_stmt_itemContext.class);
}
public Grant_stmt_itemContext grant_stmt_item(int i) {
return getRuleContext(Grant_stmt_itemContext.class,i);
}
public TerminalNode T_TO() { return getToken(HplsqlParser.T_TO, 0); }
public TerminalNode T_ROLE() { return getToken(HplsqlParser.T_ROLE, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Grant_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_grant_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterGrant_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitGrant_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitGrant_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Grant_stmtContext grant_stmt() throws RecognitionException {
Grant_stmtContext _localctx = new Grant_stmtContext(_ctx, getState());
enterRule(_localctx, 204, RULE_grant_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1868);
match(T_GRANT);
setState(1869);
grant_stmt_item();
setState(1874);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1870);
match(T_COMMA);
setState(1871);
grant_stmt_item();
}
}
setState(1876);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1877);
match(T_TO);
setState(1878);
match(T_ROLE);
setState(1879);
qident();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Grant_stmt_itemContext extends ParserRuleContext {
public TerminalNode T_EXECUTE() { return getToken(HplsqlParser.T_EXECUTE, 0); }
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public TerminalNode T_PROCEDURE() { return getToken(HplsqlParser.T_PROCEDURE, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Grant_stmt_itemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_grant_stmt_item; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterGrant_stmt_item(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitGrant_stmt_item(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitGrant_stmt_item(this);
else return visitor.visitChildren(this);
}
}
public final Grant_stmt_itemContext grant_stmt_item() throws RecognitionException {
Grant_stmt_itemContext _localctx = new Grant_stmt_itemContext(_ctx, getState());
enterRule(_localctx, 206, RULE_grant_stmt_item);
try {
enterOuterAlt(_localctx, 1);
{
setState(1881);
match(T_EXECUTE);
setState(1882);
match(T_ON);
setState(1883);
match(T_PROCEDURE);
setState(1884);
qident();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Leave_stmtContext extends ParserRuleContext {
public TerminalNode T_LEAVE() { return getToken(HplsqlParser.T_LEAVE, 0); }
public TerminalNode L_ID() { return getToken(HplsqlParser.L_ID, 0); }
public Leave_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_leave_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterLeave_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitLeave_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitLeave_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Leave_stmtContext leave_stmt() throws RecognitionException {
Leave_stmtContext _localctx = new Leave_stmtContext(_ctx, getState());
enterRule(_localctx, 208, RULE_leave_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1886);
match(T_LEAVE);
setState(1888);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,203,_ctx) ) {
case 1:
{
setState(1887);
match(L_ID);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Map_object_stmtContext extends ParserRuleContext {
public TerminalNode T_MAP() { return getToken(HplsqlParser.T_MAP, 0); }
public TerminalNode T_OBJECT() { return getToken(HplsqlParser.T_OBJECT, 0); }
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public TerminalNode T_TO() { return getToken(HplsqlParser.T_TO, 0); }
public TerminalNode T_AT() { return getToken(HplsqlParser.T_AT, 0); }
public Map_object_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_map_object_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterMap_object_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitMap_object_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitMap_object_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Map_object_stmtContext map_object_stmt() throws RecognitionException {
Map_object_stmtContext _localctx = new Map_object_stmtContext(_ctx, getState());
enterRule(_localctx, 210, RULE_map_object_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1890);
match(T_MAP);
setState(1891);
match(T_OBJECT);
setState(1892);
ident();
setState(1895);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,204,_ctx) ) {
case 1:
{
setState(1893);
match(T_TO);
setState(1894);
ident();
}
break;
}
setState(1899);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,205,_ctx) ) {
case 1:
{
setState(1897);
match(T_AT);
setState(1898);
ident();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Open_stmtContext extends ParserRuleContext {
public TerminalNode T_OPEN() { return getToken(HplsqlParser.T_OPEN, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public TerminalNode T_FOR() { return getToken(HplsqlParser.T_FOR, 0); }
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Open_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_open_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterOpen_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitOpen_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitOpen_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Open_stmtContext open_stmt() throws RecognitionException {
Open_stmtContext _localctx = new Open_stmtContext(_ctx, getState());
enterRule(_localctx, 212, RULE_open_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1901);
match(T_OPEN);
setState(1902);
ident();
setState(1908);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,207,_ctx) ) {
case 1:
{
setState(1903);
match(T_FOR);
setState(1906);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,206,_ctx) ) {
case 1:
{
setState(1904);
select_stmt();
}
break;
case 2:
{
setState(1905);
expr(0);
}
break;
}
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Fetch_stmtContext extends ParserRuleContext {
public TerminalNode T_FETCH() { return getToken(HplsqlParser.T_FETCH, 0); }
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public TerminalNode T_INTO() { return getToken(HplsqlParser.T_INTO, 0); }
public TerminalNode T_FROM() { return getToken(HplsqlParser.T_FROM, 0); }
public Bulk_collect_clauseContext bulk_collect_clause() {
return getRuleContext(Bulk_collect_clauseContext.class,0);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Fetch_limitContext fetch_limit() {
return getRuleContext(Fetch_limitContext.class,0);
}
public Fetch_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fetch_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterFetch_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitFetch_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitFetch_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Fetch_stmtContext fetch_stmt() throws RecognitionException {
Fetch_stmtContext _localctx = new Fetch_stmtContext(_ctx, getState());
enterRule(_localctx, 214, RULE_fetch_stmt);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1910);
match(T_FETCH);
setState(1912);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,208,_ctx) ) {
case 1:
{
setState(1911);
match(T_FROM);
}
break;
}
setState(1914);
ident();
setState(1916);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_BULK) {
{
setState(1915);
bulk_collect_clause();
}
}
setState(1918);
match(T_INTO);
setState(1919);
ident();
setState(1924);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,210,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1920);
match(T_COMMA);
setState(1921);
ident();
}
}
}
setState(1926);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,210,_ctx);
}
setState(1928);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,211,_ctx) ) {
case 1:
{
setState(1927);
fetch_limit();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Fetch_limitContext extends ParserRuleContext {
public TerminalNode T_LIMIT() { return getToken(HplsqlParser.T_LIMIT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Fetch_limitContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fetch_limit; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterFetch_limit(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitFetch_limit(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitFetch_limit(this);
else return visitor.visitChildren(this);
}
}
public final Fetch_limitContext fetch_limit() throws RecognitionException {
Fetch_limitContext _localctx = new Fetch_limitContext(_ctx, getState());
enterRule(_localctx, 216, RULE_fetch_limit);
try {
enterOuterAlt(_localctx, 1);
{
setState(1930);
match(T_LIMIT);
setState(1931);
expr(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Collect_stats_stmtContext extends ParserRuleContext {
public TerminalNode T_COLLECT() { return getToken(HplsqlParser.T_COLLECT, 0); }
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_STATISTICS() { return getToken(HplsqlParser.T_STATISTICS, 0); }
public TerminalNode T_STATS() { return getToken(HplsqlParser.T_STATS, 0); }
public Collect_stats_clauseContext collect_stats_clause() {
return getRuleContext(Collect_stats_clauseContext.class,0);
}
public Collect_stats_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_collect_stats_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCollect_stats_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCollect_stats_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCollect_stats_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Collect_stats_stmtContext collect_stats_stmt() throws RecognitionException {
Collect_stats_stmtContext _localctx = new Collect_stats_stmtContext(_ctx, getState());
enterRule(_localctx, 218, RULE_collect_stats_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1933);
match(T_COLLECT);
setState(1934);
_la = _input.LA(1);
if ( !(_la==T_STATS || _la==T_STATISTICS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1935);
match(T_ON);
setState(1936);
table_name();
setState(1938);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,212,_ctx) ) {
case 1:
{
setState(1937);
collect_stats_clause();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Collect_stats_clauseContext extends ParserRuleContext {
public TerminalNode T_COLUMN() { return getToken(HplsqlParser.T_COLUMN, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Collect_stats_clauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_collect_stats_clause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCollect_stats_clause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCollect_stats_clause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCollect_stats_clause(this);
else return visitor.visitChildren(this);
}
}
public final Collect_stats_clauseContext collect_stats_clause() throws RecognitionException {
Collect_stats_clauseContext _localctx = new Collect_stats_clauseContext(_ctx, getState());
enterRule(_localctx, 220, RULE_collect_stats_clause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1940);
match(T_COLUMN);
setState(1941);
match(T_OPEN_P);
setState(1942);
qident();
setState(1947);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1943);
match(T_COMMA);
setState(1944);
qident();
}
}
setState(1949);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1950);
match(T_CLOSE_P);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Close_stmtContext extends ParserRuleContext {
public TerminalNode T_CLOSE() { return getToken(HplsqlParser.T_CLOSE, 0); }
public TerminalNode L_ID() { return getToken(HplsqlParser.L_ID, 0); }
public Close_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_close_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterClose_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitClose_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitClose_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Close_stmtContext close_stmt() throws RecognitionException {
Close_stmtContext _localctx = new Close_stmtContext(_ctx, getState());
enterRule(_localctx, 222, RULE_close_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(1952);
match(T_CLOSE);
setState(1953);
match(L_ID);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Cmp_stmtContext extends ParserRuleContext {
public TerminalNode T_CMP() { return getToken(HplsqlParser.T_CMP, 0); }
public List cmp_source() {
return getRuleContexts(Cmp_sourceContext.class);
}
public Cmp_sourceContext cmp_source(int i) {
return getRuleContext(Cmp_sourceContext.class,i);
}
public TerminalNode T_COMMA() { return getToken(HplsqlParser.T_COMMA, 0); }
public TerminalNode T_ROW_COUNT() { return getToken(HplsqlParser.T_ROW_COUNT, 0); }
public TerminalNode T_SUM() { return getToken(HplsqlParser.T_SUM, 0); }
public Cmp_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_cmp_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCmp_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCmp_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCmp_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Cmp_stmtContext cmp_stmt() throws RecognitionException {
Cmp_stmtContext _localctx = new Cmp_stmtContext(_ctx, getState());
enterRule(_localctx, 224, RULE_cmp_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1955);
match(T_CMP);
setState(1956);
_la = _input.LA(1);
if ( !(_la==T_ROW_COUNT || _la==T_SUM) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1957);
cmp_source();
setState(1958);
match(T_COMMA);
setState(1959);
cmp_source();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Cmp_sourceContext extends ParserRuleContext {
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public TerminalNode T_AT() { return getToken(HplsqlParser.T_AT, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public Where_clauseContext where_clause() {
return getRuleContext(Where_clauseContext.class,0);
}
public Cmp_sourceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_cmp_source; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCmp_source(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCmp_source(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCmp_source(this);
else return visitor.visitChildren(this);
}
}
public final Cmp_sourceContext cmp_source() throws RecognitionException {
Cmp_sourceContext _localctx = new Cmp_sourceContext(_ctx, getState());
enterRule(_localctx, 226, RULE_cmp_source);
try {
enterOuterAlt(_localctx, 1);
{
setState(1969);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ACTION:
case T_ADD2:
case T_ALL:
case T_ALLOCATE:
case T_ALTER:
case T_AND:
case T_ANSI_NULLS:
case T_ANSI_PADDING:
case T_AS:
case T_ASC:
case T_ASSOCIATE:
case T_AT:
case T_AUTO_INCREMENT:
case T_AVG:
case T_BATCHSIZE:
case T_BEGIN:
case T_BETWEEN:
case T_BIGINT:
case T_BINARY_DOUBLE:
case T_BINARY_FLOAT:
case T_BIT:
case T_BODY:
case T_BREAK:
case T_BULK:
case T_BY:
case T_BYTE:
case T_CALL:
case T_CALLER:
case T_CASCADE:
case T_CASE:
case T_CASESPECIFIC:
case T_CAST:
case T_CHAR:
case T_CHARACTER:
case T_CHARSET:
case T_CLIENT:
case T_CLOSE:
case T_CLUSTERED:
case T_CMP:
case T_COLLECT:
case T_COLLECTION:
case T_COLUMN:
case T_COMMENT:
case T_CONSTANT:
case T_COMMIT:
case T_COMPRESS:
case T_CONCAT:
case T_CONDITION:
case T_CONSTRAINT:
case T_CONTINUE:
case T_COPY:
case T_COUNT:
case T_COUNT_BIG:
case T_CREATE:
case T_CREATION:
case T_CREATOR:
case T_CS:
case T_CURRENT:
case T_CURRENT_SCHEMA:
case T_CURSOR:
case T_DATABASE:
case T_DATA:
case T_DATE:
case T_DATETIME:
case T_DAY:
case T_DAYS:
case T_DEC:
case T_DECIMAL:
case T_DECLARE:
case T_DEFAULT:
case T_DEFERRED:
case T_DEFINED:
case T_DEFINER:
case T_DEFINITION:
case T_DELETE:
case T_DELIMITED:
case T_DELIMITER:
case T_DESC:
case T_DESCRIBE:
case T_DIAGNOSTICS:
case T_DIR:
case T_DIRECTORY:
case T_DISTINCT:
case T_DISTRIBUTE:
case T_DO:
case T_DOUBLE:
case T_DROP:
case T_DYNAMIC:
case T_ENABLE:
case T_ENGINE:
case T_ESCAPED:
case T_EXCEPT:
case T_EXEC:
case T_EXECUTE:
case T_EXCEPTION:
case T_EXCLUSIVE:
case T_EXISTS:
case T_EXIT:
case T_FALLBACK:
case T_FALSE:
case T_FETCH:
case T_FIELDS:
case T_FILE:
case T_FILES:
case T_FLOAT:
case T_FOR:
case T_FOREIGN:
case T_FORMAT:
case T_FOUND:
case T_FROM:
case T_FULL:
case T_FUNCTION:
case T_GET:
case T_GLOBAL:
case T_GO:
case T_GRANT:
case T_GROUP:
case T_HANDLER:
case T_HASH:
case T_HAVING:
case T_HDFS:
case T_HIVE:
case T_HOST:
case T_IDENTITY:
case T_IF:
case T_IGNORE:
case T_IMMEDIATE:
case T_IN:
case T_INCLUDE:
case T_INDEX:
case T_INITRANS:
case T_INNER:
case T_INOUT:
case T_INSERT:
case T_INT:
case T_INT2:
case T_INT4:
case T_INT8:
case T_INTEGER:
case T_INTERSECT:
case T_INTERVAL:
case T_INTO:
case T_INVOKER:
case T_IS:
case T_ISOPEN:
case T_ITEMS:
case T_JOIN:
case T_KEEP:
case T_KEY:
case T_KEYS:
case T_LANGUAGE:
case T_LEAVE:
case T_LEFT:
case T_LIKE:
case T_LIMIT:
case T_LINES:
case T_LOCAL:
case T_LOCATION:
case T_LOCATOR:
case T_LOCATORS:
case T_LOCKS:
case T_LOG:
case T_LOGGED:
case T_LOGGING:
case T_LOOP:
case T_MAP:
case T_MATCHED:
case T_MAX:
case T_MAXTRANS:
case T_MERGE:
case T_MESSAGE_TEXT:
case T_MICROSECOND:
case T_MICROSECONDS:
case T_MIN:
case T_MULTISET:
case T_NCHAR:
case T_NEW:
case T_NVARCHAR:
case T_NO:
case T_NOCOUNT:
case T_NOCOMPRESS:
case T_NOLOGGING:
case T_NONE:
case T_NOT:
case T_NOTFOUND:
case T_NUMERIC:
case T_NUMBER:
case T_OBJECT:
case T_OFF:
case T_ON:
case T_ONLY:
case T_OPEN:
case T_OR:
case T_ORDER:
case T_OUT:
case T_OUTER:
case T_OVER:
case T_OVERWRITE:
case T_OWNER:
case T_PACKAGE:
case T_PARTITION:
case T_PCTFREE:
case T_PCTUSED:
case T_PRECISION:
case T_PRESERVE:
case T_PRIMARY:
case T_PRINT:
case T_PROC:
case T_PROCEDURE:
case T_QUALIFY:
case T_QUERY_BAND:
case T_QUIT:
case T_QUOTED_IDENTIFIER:
case T_RAISE:
case T_REAL:
case T_REFERENCES:
case T_REGEXP:
case T_REPLACE:
case T_RESIGNAL:
case T_RESTRICT:
case T_RESULT:
case T_RESULT_SET_LOCATOR:
case T_RETURN:
case T_RETURNS:
case T_REVERSE:
case T_RIGHT:
case T_RLIKE:
case T_ROLE:
case T_ROLLBACK:
case T_ROW:
case T_ROWS:
case T_ROW_COUNT:
case T_RR:
case T_RS:
case T_PWD:
case T_TRIM:
case T_SCHEMA:
case T_SECOND:
case T_SECONDS:
case T_SECURITY:
case T_SEGMENT:
case T_SEL:
case T_SELECT:
case T_SET:
case T_SESSION:
case T_SESSIONS:
case T_SETS:
case T_SHARE:
case T_SIGNAL:
case T_SIMPLE_DOUBLE:
case T_SIMPLE_FLOAT:
case T_SMALLDATETIME:
case T_SMALLINT:
case T_SQL:
case T_SQLEXCEPTION:
case T_SQLINSERT:
case T_SQLSTATE:
case T_SQLWARNING:
case T_STATS:
case T_STATISTICS:
case T_STEP:
case T_STORAGE:
case T_STORED:
case T_STRING:
case T_SUBDIR:
case T_SUBSTRING:
case T_SUM:
case T_SUMMARY:
case T_SYS_REFCURSOR:
case T_TABLE:
case T_TABLESPACE:
case T_TEMPORARY:
case T_TERMINATED:
case T_TEXTIMAGE_ON:
case T_THEN:
case T_TIMESTAMP:
case T_TITLE:
case T_TO:
case T_TOP:
case T_TRANSACTION:
case T_TRUE:
case T_TRUNCATE:
case T_UNIQUE:
case T_UPDATE:
case T_UR:
case T_USE:
case T_USING:
case T_VALUE:
case T_VALUES:
case T_VAR:
case T_VARCHAR:
case T_VARCHAR2:
case T_VARYING:
case T_VOLATILE:
case T_WHILE:
case T_WITH:
case T_WITHOUT:
case T_WORK:
case T_XACT_ABORT:
case T_XML:
case T_YES:
case T_ACTIVITY_COUNT:
case T_CUME_DIST:
case T_CURRENT_DATE:
case T_CURRENT_TIME_MILLIS:
case T_CURRENT_TIMESTAMP:
case T_CURRENT_USER:
case T_DENSE_RANK:
case T_FIRST_VALUE:
case T_LAG:
case T_LAST_VALUE:
case T_LEAD:
case T_PART_COUNT:
case T_PART_LOC:
case T_RANK:
case T_ROW_NUMBER:
case T_STDEV:
case T_SYSDATE:
case T_VARIANCE:
case T_USER:
case T_SUB:
case L_ID:
{
setState(1961);
table_name();
setState(1963);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,214,_ctx) ) {
case 1:
{
setState(1962);
where_clause();
}
break;
}
}
break;
case T_OPEN_P:
{
setState(1965);
match(T_OPEN_P);
setState(1966);
select_stmt();
setState(1967);
match(T_CLOSE_P);
}
break;
default:
throw new NoViableAltException(this);
}
setState(1973);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,216,_ctx) ) {
case 1:
{
setState(1971);
match(T_AT);
setState(1972);
qident();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Copy_from_local_stmtContext extends ParserRuleContext {
public TerminalNode T_COPY() { return getToken(HplsqlParser.T_COPY, 0); }
public TerminalNode T_FROM() { return getToken(HplsqlParser.T_FROM, 0); }
public TerminalNode T_LOCAL() { return getToken(HplsqlParser.T_LOCAL, 0); }
public List copy_source() {
return getRuleContexts(Copy_sourceContext.class);
}
public Copy_sourceContext copy_source(int i) {
return getRuleContext(Copy_sourceContext.class,i);
}
public TerminalNode T_TO() { return getToken(HplsqlParser.T_TO, 0); }
public Copy_targetContext copy_target() {
return getRuleContext(Copy_targetContext.class,0);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public List copy_file_option() {
return getRuleContexts(Copy_file_optionContext.class);
}
public Copy_file_optionContext copy_file_option(int i) {
return getRuleContext(Copy_file_optionContext.class,i);
}
public Copy_from_local_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_copy_from_local_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCopy_from_local_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCopy_from_local_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCopy_from_local_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Copy_from_local_stmtContext copy_from_local_stmt() throws RecognitionException {
Copy_from_local_stmtContext _localctx = new Copy_from_local_stmtContext(_ctx, getState());
enterRule(_localctx, 228, RULE_copy_from_local_stmt);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1975);
match(T_COPY);
setState(1976);
match(T_FROM);
setState(1977);
match(T_LOCAL);
setState(1978);
copy_source();
setState(1983);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(1979);
match(T_COMMA);
setState(1980);
copy_source();
}
}
setState(1985);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1986);
match(T_TO);
setState(1987);
copy_target();
setState(1991);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,218,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1988);
copy_file_option();
}
}
}
setState(1993);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,218,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Copy_stmtContext extends ParserRuleContext {
public TerminalNode T_COPY() { return getToken(HplsqlParser.T_COPY, 0); }
public TerminalNode T_TO() { return getToken(HplsqlParser.T_TO, 0); }
public Copy_targetContext copy_target() {
return getRuleContext(Copy_targetContext.class,0);
}
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public TerminalNode T_HDFS() { return getToken(HplsqlParser.T_HDFS, 0); }
public List copy_option() {
return getRuleContexts(Copy_optionContext.class);
}
public Copy_optionContext copy_option(int i) {
return getRuleContext(Copy_optionContext.class,i);
}
public Copy_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_copy_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCopy_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCopy_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCopy_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Copy_stmtContext copy_stmt() throws RecognitionException {
Copy_stmtContext _localctx = new Copy_stmtContext(_ctx, getState());
enterRule(_localctx, 230, RULE_copy_stmt);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1994);
match(T_COPY);
setState(2000);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_ACTION:
case T_ADD2:
case T_ALL:
case T_ALLOCATE:
case T_ALTER:
case T_AND:
case T_ANSI_NULLS:
case T_ANSI_PADDING:
case T_AS:
case T_ASC:
case T_ASSOCIATE:
case T_AT:
case T_AUTO_INCREMENT:
case T_AVG:
case T_BATCHSIZE:
case T_BEGIN:
case T_BETWEEN:
case T_BIGINT:
case T_BINARY_DOUBLE:
case T_BINARY_FLOAT:
case T_BIT:
case T_BODY:
case T_BREAK:
case T_BULK:
case T_BY:
case T_BYTE:
case T_CALL:
case T_CALLER:
case T_CASCADE:
case T_CASE:
case T_CASESPECIFIC:
case T_CAST:
case T_CHAR:
case T_CHARACTER:
case T_CHARSET:
case T_CLIENT:
case T_CLOSE:
case T_CLUSTERED:
case T_CMP:
case T_COLLECT:
case T_COLLECTION:
case T_COLUMN:
case T_COMMENT:
case T_CONSTANT:
case T_COMMIT:
case T_COMPRESS:
case T_CONCAT:
case T_CONDITION:
case T_CONSTRAINT:
case T_CONTINUE:
case T_COPY:
case T_COUNT:
case T_COUNT_BIG:
case T_CREATE:
case T_CREATION:
case T_CREATOR:
case T_CS:
case T_CURRENT:
case T_CURRENT_SCHEMA:
case T_CURSOR:
case T_DATABASE:
case T_DATA:
case T_DATE:
case T_DATETIME:
case T_DAY:
case T_DAYS:
case T_DEC:
case T_DECIMAL:
case T_DECLARE:
case T_DEFAULT:
case T_DEFERRED:
case T_DEFINED:
case T_DEFINER:
case T_DEFINITION:
case T_DELETE:
case T_DELIMITED:
case T_DELIMITER:
case T_DESC:
case T_DESCRIBE:
case T_DIAGNOSTICS:
case T_DIR:
case T_DIRECTORY:
case T_DISTINCT:
case T_DISTRIBUTE:
case T_DO:
case T_DOUBLE:
case T_DROP:
case T_DYNAMIC:
case T_ENABLE:
case T_ENGINE:
case T_ESCAPED:
case T_EXCEPT:
case T_EXEC:
case T_EXECUTE:
case T_EXCEPTION:
case T_EXCLUSIVE:
case T_EXISTS:
case T_EXIT:
case T_FALLBACK:
case T_FALSE:
case T_FETCH:
case T_FIELDS:
case T_FILE:
case T_FILES:
case T_FLOAT:
case T_FOR:
case T_FOREIGN:
case T_FORMAT:
case T_FOUND:
case T_FROM:
case T_FULL:
case T_FUNCTION:
case T_GET:
case T_GLOBAL:
case T_GO:
case T_GRANT:
case T_GROUP:
case T_HANDLER:
case T_HASH:
case T_HAVING:
case T_HDFS:
case T_HIVE:
case T_HOST:
case T_IDENTITY:
case T_IF:
case T_IGNORE:
case T_IMMEDIATE:
case T_IN:
case T_INCLUDE:
case T_INDEX:
case T_INITRANS:
case T_INNER:
case T_INOUT:
case T_INSERT:
case T_INT:
case T_INT2:
case T_INT4:
case T_INT8:
case T_INTEGER:
case T_INTERSECT:
case T_INTERVAL:
case T_INTO:
case T_INVOKER:
case T_IS:
case T_ISOPEN:
case T_ITEMS:
case T_JOIN:
case T_KEEP:
case T_KEY:
case T_KEYS:
case T_LANGUAGE:
case T_LEAVE:
case T_LEFT:
case T_LIKE:
case T_LIMIT:
case T_LINES:
case T_LOCAL:
case T_LOCATION:
case T_LOCATOR:
case T_LOCATORS:
case T_LOCKS:
case T_LOG:
case T_LOGGED:
case T_LOGGING:
case T_LOOP:
case T_MAP:
case T_MATCHED:
case T_MAX:
case T_MAXTRANS:
case T_MERGE:
case T_MESSAGE_TEXT:
case T_MICROSECOND:
case T_MICROSECONDS:
case T_MIN:
case T_MULTISET:
case T_NCHAR:
case T_NEW:
case T_NVARCHAR:
case T_NO:
case T_NOCOUNT:
case T_NOCOMPRESS:
case T_NOLOGGING:
case T_NONE:
case T_NOT:
case T_NOTFOUND:
case T_NUMERIC:
case T_NUMBER:
case T_OBJECT:
case T_OFF:
case T_ON:
case T_ONLY:
case T_OPEN:
case T_OR:
case T_ORDER:
case T_OUT:
case T_OUTER:
case T_OVER:
case T_OVERWRITE:
case T_OWNER:
case T_PACKAGE:
case T_PARTITION:
case T_PCTFREE:
case T_PCTUSED:
case T_PRECISION:
case T_PRESERVE:
case T_PRIMARY:
case T_PRINT:
case T_PROC:
case T_PROCEDURE:
case T_QUALIFY:
case T_QUERY_BAND:
case T_QUIT:
case T_QUOTED_IDENTIFIER:
case T_RAISE:
case T_REAL:
case T_REFERENCES:
case T_REGEXP:
case T_REPLACE:
case T_RESIGNAL:
case T_RESTRICT:
case T_RESULT:
case T_RESULT_SET_LOCATOR:
case T_RETURN:
case T_RETURNS:
case T_REVERSE:
case T_RIGHT:
case T_RLIKE:
case T_ROLE:
case T_ROLLBACK:
case T_ROW:
case T_ROWS:
case T_ROW_COUNT:
case T_RR:
case T_RS:
case T_PWD:
case T_TRIM:
case T_SCHEMA:
case T_SECOND:
case T_SECONDS:
case T_SECURITY:
case T_SEGMENT:
case T_SEL:
case T_SELECT:
case T_SET:
case T_SESSION:
case T_SESSIONS:
case T_SETS:
case T_SHARE:
case T_SIGNAL:
case T_SIMPLE_DOUBLE:
case T_SIMPLE_FLOAT:
case T_SMALLDATETIME:
case T_SMALLINT:
case T_SQL:
case T_SQLEXCEPTION:
case T_SQLINSERT:
case T_SQLSTATE:
case T_SQLWARNING:
case T_STATS:
case T_STATISTICS:
case T_STEP:
case T_STORAGE:
case T_STORED:
case T_STRING:
case T_SUBDIR:
case T_SUBSTRING:
case T_SUM:
case T_SUMMARY:
case T_SYS_REFCURSOR:
case T_TABLE:
case T_TABLESPACE:
case T_TEMPORARY:
case T_TERMINATED:
case T_TEXTIMAGE_ON:
case T_THEN:
case T_TIMESTAMP:
case T_TITLE:
case T_TO:
case T_TOP:
case T_TRANSACTION:
case T_TRUE:
case T_TRUNCATE:
case T_UNIQUE:
case T_UPDATE:
case T_UR:
case T_USE:
case T_USING:
case T_VALUE:
case T_VALUES:
case T_VAR:
case T_VARCHAR:
case T_VARCHAR2:
case T_VARYING:
case T_VOLATILE:
case T_WHILE:
case T_WITH:
case T_WITHOUT:
case T_WORK:
case T_XACT_ABORT:
case T_XML:
case T_YES:
case T_ACTIVITY_COUNT:
case T_CUME_DIST:
case T_CURRENT_DATE:
case T_CURRENT_TIME_MILLIS:
case T_CURRENT_TIMESTAMP:
case T_CURRENT_USER:
case T_DENSE_RANK:
case T_FIRST_VALUE:
case T_LAG:
case T_LAST_VALUE:
case T_LEAD:
case T_PART_COUNT:
case T_PART_LOC:
case T_RANK:
case T_ROW_NUMBER:
case T_STDEV:
case T_SYSDATE:
case T_VARIANCE:
case T_USER:
case T_SUB:
case L_ID:
{
setState(1995);
table_name();
}
break;
case T_OPEN_P:
{
setState(1996);
match(T_OPEN_P);
setState(1997);
select_stmt();
setState(1998);
match(T_CLOSE_P);
}
break;
default:
throw new NoViableAltException(this);
}
setState(2002);
match(T_TO);
setState(2004);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,220,_ctx) ) {
case 1:
{
setState(2003);
match(T_HDFS);
}
break;
}
setState(2006);
copy_target();
setState(2010);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,221,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2007);
copy_option();
}
}
}
setState(2012);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,221,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Copy_sourceContext extends ParserRuleContext {
public File_nameContext file_name() {
return getRuleContext(File_nameContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Copy_sourceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_copy_source; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCopy_source(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCopy_source(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCopy_source(this);
else return visitor.visitChildren(this);
}
}
public final Copy_sourceContext copy_source() throws RecognitionException {
Copy_sourceContext _localctx = new Copy_sourceContext(_ctx, getState());
enterRule(_localctx, 232, RULE_copy_source);
try {
enterOuterAlt(_localctx, 1);
{
setState(2015);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,222,_ctx) ) {
case 1:
{
setState(2013);
file_name();
}
break;
case 2:
{
setState(2014);
expr(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Copy_targetContext extends ParserRuleContext {
public File_nameContext file_name() {
return getRuleContext(File_nameContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Copy_targetContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_copy_target; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCopy_target(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCopy_target(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCopy_target(this);
else return visitor.visitChildren(this);
}
}
public final Copy_targetContext copy_target() throws RecognitionException {
Copy_targetContext _localctx = new Copy_targetContext(_ctx, getState());
enterRule(_localctx, 234, RULE_copy_target);
try {
enterOuterAlt(_localctx, 1);
{
setState(2019);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,223,_ctx) ) {
case 1:
{
setState(2017);
file_name();
}
break;
case 2:
{
setState(2018);
expr(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Copy_optionContext extends ParserRuleContext {
public TerminalNode T_AT() { return getToken(HplsqlParser.T_AT, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_BATCHSIZE() { return getToken(HplsqlParser.T_BATCHSIZE, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_DELIMITER() { return getToken(HplsqlParser.T_DELIMITER, 0); }
public TerminalNode T_SQLINSERT() { return getToken(HplsqlParser.T_SQLINSERT, 0); }
public Copy_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_copy_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCopy_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCopy_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCopy_option(this);
else return visitor.visitChildren(this);
}
}
public final Copy_optionContext copy_option() throws RecognitionException {
Copy_optionContext _localctx = new Copy_optionContext(_ctx, getState());
enterRule(_localctx, 236, RULE_copy_option);
try {
setState(2029);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_AT:
enterOuterAlt(_localctx, 1);
{
setState(2021);
match(T_AT);
setState(2022);
qident();
}
break;
case T_BATCHSIZE:
enterOuterAlt(_localctx, 2);
{
setState(2023);
match(T_BATCHSIZE);
setState(2024);
expr(0);
}
break;
case T_DELIMITER:
enterOuterAlt(_localctx, 3);
{
setState(2025);
match(T_DELIMITER);
setState(2026);
expr(0);
}
break;
case T_SQLINSERT:
enterOuterAlt(_localctx, 4);
{
setState(2027);
match(T_SQLINSERT);
setState(2028);
qident();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Copy_file_optionContext extends ParserRuleContext {
public TerminalNode T_DELETE() { return getToken(HplsqlParser.T_DELETE, 0); }
public TerminalNode T_IGNORE() { return getToken(HplsqlParser.T_IGNORE, 0); }
public TerminalNode T_OVERWRITE() { return getToken(HplsqlParser.T_OVERWRITE, 0); }
public Copy_file_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_copy_file_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCopy_file_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCopy_file_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCopy_file_option(this);
else return visitor.visitChildren(this);
}
}
public final Copy_file_optionContext copy_file_option() throws RecognitionException {
Copy_file_optionContext _localctx = new Copy_file_optionContext(_ctx, getState());
enterRule(_localctx, 238, RULE_copy_file_option);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2031);
_la = _input.LA(1);
if ( !(_la==T_DELETE || _la==T_IGNORE || _la==T_OVERWRITE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Commit_stmtContext extends ParserRuleContext {
public TerminalNode T_COMMIT() { return getToken(HplsqlParser.T_COMMIT, 0); }
public TerminalNode T_WORK() { return getToken(HplsqlParser.T_WORK, 0); }
public Commit_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_commit_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCommit_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCommit_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCommit_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Commit_stmtContext commit_stmt() throws RecognitionException {
Commit_stmtContext _localctx = new Commit_stmtContext(_ctx, getState());
enterRule(_localctx, 240, RULE_commit_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2033);
match(T_COMMIT);
setState(2035);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,225,_ctx) ) {
case 1:
{
setState(2034);
match(T_WORK);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_index_stmtContext extends ParserRuleContext {
public TerminalNode T_CREATE() { return getToken(HplsqlParser.T_CREATE, 0); }
public TerminalNode T_INDEX() { return getToken(HplsqlParser.T_INDEX, 0); }
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public List create_index_col() {
return getRuleContexts(Create_index_colContext.class);
}
public Create_index_colContext create_index_col(int i) {
return getRuleContext(Create_index_colContext.class,i);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public TerminalNode T_UNIQUE() { return getToken(HplsqlParser.T_UNIQUE, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public Create_index_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_index_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_index_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_index_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_index_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Create_index_stmtContext create_index_stmt() throws RecognitionException {
Create_index_stmtContext _localctx = new Create_index_stmtContext(_ctx, getState());
enterRule(_localctx, 242, RULE_create_index_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2037);
match(T_CREATE);
setState(2039);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_UNIQUE) {
{
setState(2038);
match(T_UNIQUE);
}
}
setState(2041);
match(T_INDEX);
setState(2042);
qident();
setState(2043);
match(T_ON);
setState(2044);
table_name();
setState(2045);
match(T_OPEN_P);
setState(2046);
create_index_col();
setState(2051);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(2047);
match(T_COMMA);
setState(2048);
create_index_col();
}
}
setState(2053);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2054);
match(T_CLOSE_P);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Create_index_colContext extends ParserRuleContext {
public QidentContext qident() {
return getRuleContext(QidentContext.class,0);
}
public TerminalNode T_ASC() { return getToken(HplsqlParser.T_ASC, 0); }
public TerminalNode T_DESC() { return getToken(HplsqlParser.T_DESC, 0); }
public Create_index_colContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_create_index_col; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterCreate_index_col(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitCreate_index_col(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitCreate_index_col(this);
else return visitor.visitChildren(this);
}
}
public final Create_index_colContext create_index_col() throws RecognitionException {
Create_index_colContext _localctx = new Create_index_colContext(_ctx, getState());
enterRule(_localctx, 244, RULE_create_index_col);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2056);
qident();
setState(2058);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_ASC || _la==T_DESC) {
{
setState(2057);
_la = _input.LA(1);
if ( !(_la==T_ASC || _la==T_DESC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Index_storage_clauseContext extends ParserRuleContext {
public Index_mssql_storage_clauseContext index_mssql_storage_clause() {
return getRuleContext(Index_mssql_storage_clauseContext.class,0);
}
public Index_storage_clauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_index_storage_clause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterIndex_storage_clause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitIndex_storage_clause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitIndex_storage_clause(this);
else return visitor.visitChildren(this);
}
}
public final Index_storage_clauseContext index_storage_clause() throws RecognitionException {
Index_storage_clauseContext _localctx = new Index_storage_clauseContext(_ctx, getState());
enterRule(_localctx, 246, RULE_index_storage_clause);
try {
enterOuterAlt(_localctx, 1);
{
setState(2060);
index_mssql_storage_clause();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Index_mssql_storage_clauseContext extends ParserRuleContext {
public TerminalNode T_WITH() { return getToken(HplsqlParser.T_WITH, 0); }
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public List qident() {
return getRuleContexts(QidentContext.class);
}
public QidentContext qident(int i) {
return getRuleContext(QidentContext.class,i);
}
public List T_EQUAL() { return getTokens(HplsqlParser.T_EQUAL); }
public TerminalNode T_EQUAL(int i) {
return getToken(HplsqlParser.T_EQUAL, i);
}
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public List create_table_options_mssql_item() {
return getRuleContexts(Create_table_options_mssql_itemContext.class);
}
public Create_table_options_mssql_itemContext create_table_options_mssql_item(int i) {
return getRuleContext(Create_table_options_mssql_itemContext.class,i);
}
public Index_mssql_storage_clauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_index_mssql_storage_clause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterIndex_mssql_storage_clause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitIndex_mssql_storage_clause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitIndex_mssql_storage_clause(this);
else return visitor.visitChildren(this);
}
}
public final Index_mssql_storage_clauseContext index_mssql_storage_clause() throws RecognitionException {
Index_mssql_storage_clauseContext _localctx = new Index_mssql_storage_clauseContext(_ctx, getState());
enterRule(_localctx, 248, RULE_index_mssql_storage_clause);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2062);
match(T_WITH);
setState(2063);
match(T_OPEN_P);
setState(2064);
qident();
setState(2065);
match(T_EQUAL);
setState(2066);
qident();
setState(2074);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T_COMMA) {
{
{
setState(2067);
match(T_COMMA);
setState(2068);
qident();
setState(2069);
match(T_EQUAL);
setState(2070);
qident();
}
}
setState(2076);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2077);
match(T_CLOSE_P);
setState(2081);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,230,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2078);
create_table_options_mssql_item();
}
}
}
setState(2083);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,230,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Print_stmtContext extends ParserRuleContext {
public TerminalNode T_PRINT() { return getToken(HplsqlParser.T_PRINT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_OPEN_P() { return getToken(HplsqlParser.T_OPEN_P, 0); }
public TerminalNode T_CLOSE_P() { return getToken(HplsqlParser.T_CLOSE_P, 0); }
public Print_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_print_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterPrint_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitPrint_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitPrint_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Print_stmtContext print_stmt() throws RecognitionException {
Print_stmtContext _localctx = new Print_stmtContext(_ctx, getState());
enterRule(_localctx, 250, RULE_print_stmt);
try {
setState(2091);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,231,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(2084);
match(T_PRINT);
setState(2085);
expr(0);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(2086);
match(T_PRINT);
setState(2087);
match(T_OPEN_P);
setState(2088);
expr(0);
setState(2089);
match(T_CLOSE_P);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Quit_stmtContext extends ParserRuleContext {
public TerminalNode T_QUIT() { return getToken(HplsqlParser.T_QUIT, 0); }
public TerminalNode T_DOT() { return getToken(HplsqlParser.T_DOT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Quit_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_quit_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterQuit_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitQuit_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitQuit_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Quit_stmtContext quit_stmt() throws RecognitionException {
Quit_stmtContext _localctx = new Quit_stmtContext(_ctx, getState());
enterRule(_localctx, 252, RULE_quit_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2094);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_DOT) {
{
setState(2093);
match(T_DOT);
}
}
setState(2096);
match(T_QUIT);
setState(2098);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,233,_ctx) ) {
case 1:
{
setState(2097);
expr(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Raise_stmtContext extends ParserRuleContext {
public TerminalNode T_RAISE() { return getToken(HplsqlParser.T_RAISE, 0); }
public Raise_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_raise_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterRaise_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitRaise_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitRaise_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Raise_stmtContext raise_stmt() throws RecognitionException {
Raise_stmtContext _localctx = new Raise_stmtContext(_ctx, getState());
enterRule(_localctx, 254, RULE_raise_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2100);
match(T_RAISE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Resignal_stmtContext extends ParserRuleContext {
public TerminalNode T_RESIGNAL() { return getToken(HplsqlParser.T_RESIGNAL, 0); }
public TerminalNode T_SQLSTATE() { return getToken(HplsqlParser.T_SQLSTATE, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode T_VALUE() { return getToken(HplsqlParser.T_VALUE, 0); }
public TerminalNode T_SET() { return getToken(HplsqlParser.T_SET, 0); }
public TerminalNode T_MESSAGE_TEXT() { return getToken(HplsqlParser.T_MESSAGE_TEXT, 0); }
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public Resignal_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_resignal_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterResignal_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitResignal_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitResignal_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Resignal_stmtContext resignal_stmt() throws RecognitionException {
Resignal_stmtContext _localctx = new Resignal_stmtContext(_ctx, getState());
enterRule(_localctx, 256, RULE_resignal_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2102);
match(T_RESIGNAL);
setState(2114);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,236,_ctx) ) {
case 1:
{
setState(2103);
match(T_SQLSTATE);
setState(2105);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,234,_ctx) ) {
case 1:
{
setState(2104);
match(T_VALUE);
}
break;
}
setState(2107);
expr(0);
setState(2112);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,235,_ctx) ) {
case 1:
{
setState(2108);
match(T_SET);
setState(2109);
match(T_MESSAGE_TEXT);
setState(2110);
match(T_EQUAL);
setState(2111);
expr(0);
}
break;
}
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Return_stmtContext extends ParserRuleContext {
public TerminalNode T_RETURN() { return getToken(HplsqlParser.T_RETURN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Return_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_return_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterReturn_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitReturn_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitReturn_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Return_stmtContext return_stmt() throws RecognitionException {
Return_stmtContext _localctx = new Return_stmtContext(_ctx, getState());
enterRule(_localctx, 258, RULE_return_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2116);
match(T_RETURN);
setState(2118);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,237,_ctx) ) {
case 1:
{
setState(2117);
expr(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Rollback_stmtContext extends ParserRuleContext {
public TerminalNode T_ROLLBACK() { return getToken(HplsqlParser.T_ROLLBACK, 0); }
public TerminalNode T_WORK() { return getToken(HplsqlParser.T_WORK, 0); }
public Rollback_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_rollback_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterRollback_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitRollback_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitRollback_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Rollback_stmtContext rollback_stmt() throws RecognitionException {
Rollback_stmtContext _localctx = new Rollback_stmtContext(_ctx, getState());
enterRule(_localctx, 260, RULE_rollback_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2120);
match(T_ROLLBACK);
setState(2122);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,238,_ctx) ) {
case 1:
{
setState(2121);
match(T_WORK);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Set_session_optionContext extends ParserRuleContext {
public Set_current_schema_optionContext set_current_schema_option() {
return getRuleContext(Set_current_schema_optionContext.class,0);
}
public Set_mssql_session_optionContext set_mssql_session_option() {
return getRuleContext(Set_mssql_session_optionContext.class,0);
}
public Set_teradata_session_optionContext set_teradata_session_option() {
return getRuleContext(Set_teradata_session_optionContext.class,0);
}
public Set_session_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_set_session_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSet_session_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSet_session_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSet_session_option(this);
else return visitor.visitChildren(this);
}
}
public final Set_session_optionContext set_session_option() throws RecognitionException {
Set_session_optionContext _localctx = new Set_session_optionContext(_ctx, getState());
enterRule(_localctx, 262, RULE_set_session_option);
try {
setState(2127);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_CURRENT:
case T_CURRENT_SCHEMA:
case T_SCHEMA:
enterOuterAlt(_localctx, 1);
{
setState(2124);
set_current_schema_option();
}
break;
case T_ANSI_NULLS:
case T_ANSI_PADDING:
case T_NOCOUNT:
case T_QUOTED_IDENTIFIER:
case T_XACT_ABORT:
enterOuterAlt(_localctx, 2);
{
setState(2125);
set_mssql_session_option();
}
break;
case T_QUERY_BAND:
enterOuterAlt(_localctx, 3);
{
setState(2126);
set_teradata_session_option();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Set_current_schema_optionContext extends ParserRuleContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_CURRENT_SCHEMA() { return getToken(HplsqlParser.T_CURRENT_SCHEMA, 0); }
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public TerminalNode T_SCHEMA() { return getToken(HplsqlParser.T_SCHEMA, 0); }
public TerminalNode T_CURRENT() { return getToken(HplsqlParser.T_CURRENT, 0); }
public Set_current_schema_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_set_current_schema_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSet_current_schema_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSet_current_schema_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSet_current_schema_option(this);
else return visitor.visitChildren(this);
}
}
public final Set_current_schema_optionContext set_current_schema_option() throws RecognitionException {
Set_current_schema_optionContext _localctx = new Set_current_schema_optionContext(_ctx, getState());
enterRule(_localctx, 264, RULE_set_current_schema_option);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2134);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T_CURRENT:
case T_SCHEMA:
{
{
setState(2130);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_CURRENT) {
{
setState(2129);
match(T_CURRENT);
}
}
setState(2132);
match(T_SCHEMA);
}
}
break;
case T_CURRENT_SCHEMA:
{
setState(2133);
match(T_CURRENT_SCHEMA);
}
break;
default:
throw new NoViableAltException(this);
}
setState(2137);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_EQUAL) {
{
setState(2136);
match(T_EQUAL);
}
}
setState(2139);
expr(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Set_mssql_session_optionContext extends ParserRuleContext {
public TerminalNode T_ANSI_NULLS() { return getToken(HplsqlParser.T_ANSI_NULLS, 0); }
public TerminalNode T_ANSI_PADDING() { return getToken(HplsqlParser.T_ANSI_PADDING, 0); }
public TerminalNode T_NOCOUNT() { return getToken(HplsqlParser.T_NOCOUNT, 0); }
public TerminalNode T_QUOTED_IDENTIFIER() { return getToken(HplsqlParser.T_QUOTED_IDENTIFIER, 0); }
public TerminalNode T_XACT_ABORT() { return getToken(HplsqlParser.T_XACT_ABORT, 0); }
public TerminalNode T_ON() { return getToken(HplsqlParser.T_ON, 0); }
public TerminalNode T_OFF() { return getToken(HplsqlParser.T_OFF, 0); }
public Set_mssql_session_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_set_mssql_session_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSet_mssql_session_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSet_mssql_session_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSet_mssql_session_option(this);
else return visitor.visitChildren(this);
}
}
public final Set_mssql_session_optionContext set_mssql_session_option() throws RecognitionException {
Set_mssql_session_optionContext _localctx = new Set_mssql_session_optionContext(_ctx, getState());
enterRule(_localctx, 266, RULE_set_mssql_session_option);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2141);
_la = _input.LA(1);
if ( !(_la==T_ANSI_NULLS || _la==T_ANSI_PADDING || _la==T_NOCOUNT || _la==T_QUOTED_IDENTIFIER || _la==T_XACT_ABORT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(2142);
_la = _input.LA(1);
if ( !(_la==T_OFF || _la==T_ON) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Set_teradata_session_optionContext extends ParserRuleContext {
public TerminalNode T_QUERY_BAND() { return getToken(HplsqlParser.T_QUERY_BAND, 0); }
public TerminalNode T_EQUAL() { return getToken(HplsqlParser.T_EQUAL, 0); }
public TerminalNode T_FOR() { return getToken(HplsqlParser.T_FOR, 0); }
public TerminalNode T_TRANSACTION() { return getToken(HplsqlParser.T_TRANSACTION, 0); }
public TerminalNode T_SESSION() { return getToken(HplsqlParser.T_SESSION, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode T_NONE() { return getToken(HplsqlParser.T_NONE, 0); }
public TerminalNode T_UPDATE() { return getToken(HplsqlParser.T_UPDATE, 0); }
public Set_teradata_session_optionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_set_teradata_session_option; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSet_teradata_session_option(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSet_teradata_session_option(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSet_teradata_session_option(this);
else return visitor.visitChildren(this);
}
}
public final Set_teradata_session_optionContext set_teradata_session_option() throws RecognitionException {
Set_teradata_session_optionContext _localctx = new Set_teradata_session_optionContext(_ctx, getState());
enterRule(_localctx, 268, RULE_set_teradata_session_option);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2144);
match(T_QUERY_BAND);
setState(2145);
match(T_EQUAL);
setState(2148);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,243,_ctx) ) {
case 1:
{
setState(2146);
expr(0);
}
break;
case 2:
{
setState(2147);
match(T_NONE);
}
break;
}
setState(2151);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_UPDATE) {
{
setState(2150);
match(T_UPDATE);
}
}
setState(2153);
match(T_FOR);
setState(2154);
_la = _input.LA(1);
if ( !(_la==T_SESSION || _la==T_TRANSACTION) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Signal_stmtContext extends ParserRuleContext {
public TerminalNode T_SIGNAL() { return getToken(HplsqlParser.T_SIGNAL, 0); }
public IdentContext ident() {
return getRuleContext(IdentContext.class,0);
}
public Signal_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_signal_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSignal_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSignal_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSignal_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Signal_stmtContext signal_stmt() throws RecognitionException {
Signal_stmtContext _localctx = new Signal_stmtContext(_ctx, getState());
enterRule(_localctx, 270, RULE_signal_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2156);
match(T_SIGNAL);
setState(2157);
ident();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Summary_stmtContext extends ParserRuleContext {
public TerminalNode T_SUMMARY() { return getToken(HplsqlParser.T_SUMMARY, 0); }
public TerminalNode T_FOR() { return getToken(HplsqlParser.T_FOR, 0); }
public Select_stmtContext select_stmt() {
return getRuleContext(Select_stmtContext.class,0);
}
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_TOP() { return getToken(HplsqlParser.T_TOP, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public Where_clauseContext where_clause() {
return getRuleContext(Where_clauseContext.class,0);
}
public TerminalNode T_LIMIT() { return getToken(HplsqlParser.T_LIMIT, 0); }
public Summary_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_summary_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterSummary_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitSummary_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitSummary_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Summary_stmtContext summary_stmt() throws RecognitionException {
Summary_stmtContext _localctx = new Summary_stmtContext(_ctx, getState());
enterRule(_localctx, 272, RULE_summary_stmt);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2159);
match(T_SUMMARY);
setState(2162);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T_TOP) {
{
setState(2160);
match(T_TOP);
setState(2161);
expr(0);
}
}
setState(2164);
match(T_FOR);
setState(2174);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,248,_ctx) ) {
case 1:
{
setState(2165);
select_stmt();
}
break;
case 2:
{
setState(2166);
table_name();
setState(2168);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,246,_ctx) ) {
case 1:
{
setState(2167);
where_clause();
}
break;
}
setState(2172);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,247,_ctx) ) {
case 1:
{
setState(2170);
match(T_LIMIT);
setState(2171);
expr(0);
}
break;
}
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Truncate_stmtContext extends ParserRuleContext {
public TerminalNode T_TRUNCATE() { return getToken(HplsqlParser.T_TRUNCATE, 0); }
public Table_nameContext table_name() {
return getRuleContext(Table_nameContext.class,0);
}
public TerminalNode T_TABLE() { return getToken(HplsqlParser.T_TABLE, 0); }
public Truncate_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_truncate_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterTruncate_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitTruncate_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitTruncate_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Truncate_stmtContext truncate_stmt() throws RecognitionException {
Truncate_stmtContext _localctx = new Truncate_stmtContext(_ctx, getState());
enterRule(_localctx, 274, RULE_truncate_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2176);
match(T_TRUNCATE);
setState(2178);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,249,_ctx) ) {
case 1:
{
setState(2177);
match(T_TABLE);
}
break;
}
setState(2180);
table_name();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Use_stmtContext extends ParserRuleContext {
public TerminalNode T_USE() { return getToken(HplsqlParser.T_USE, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public Use_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_use_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterUse_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitUse_stmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HplsqlVisitor ) return ((HplsqlVisitor extends T>)visitor).visitUse_stmt(this);
else return visitor.visitChildren(this);
}
}
public final Use_stmtContext use_stmt() throws RecognitionException {
Use_stmtContext _localctx = new Use_stmtContext(_ctx, getState());
enterRule(_localctx, 276, RULE_use_stmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(2182);
match(T_USE);
setState(2183);
expr(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Values_into_stmtContext extends ParserRuleContext {
public TerminalNode T_VALUES() { return getToken(HplsqlParser.T_VALUES, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode T_INTO() { return getToken(HplsqlParser.T_INTO, 0); }
public List ident() {
return getRuleContexts(IdentContext.class);
}
public IdentContext ident(int i) {
return getRuleContext(IdentContext.class,i);
}
public List T_OPEN_P() { return getTokens(HplsqlParser.T_OPEN_P); }
public TerminalNode T_OPEN_P(int i) {
return getToken(HplsqlParser.T_OPEN_P, i);
}
public List T_COMMA() { return getTokens(HplsqlParser.T_COMMA); }
public TerminalNode T_COMMA(int i) {
return getToken(HplsqlParser.T_COMMA, i);
}
public List T_CLOSE_P() { return getTokens(HplsqlParser.T_CLOSE_P); }
public TerminalNode T_CLOSE_P(int i) {
return getToken(HplsqlParser.T_CLOSE_P, i);
}
public Values_into_stmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_values_into_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).enterValues_into_stmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof HplsqlListener ) ((HplsqlListener)listener).exitValues_into_stmt(this);
}
@Override
public