// Code generated from Parser.g4 by ANTLR 4.13.1. DO NOT EDIT.

package sqliteparse // Parser
import (
	"fmt"
	"strconv"
	"sync"

	"github.com/antlr4-go/antlr/v4"
)

// Suppress unused import errors
var _ = fmt.Printf
var _ = strconv.Itoa
var _ = sync.Once{}

type Parser struct {
	*antlr.BaseParser
}

var ParserParserStaticData struct {
	once                   sync.Once
	serializedATN          []int32
	LiteralNames           []string
	SymbolicNames          []string
	RuleNames              []string
	PredictionContextCache *antlr.PredictionContextCache
	atn                    *antlr.ATN
	decisionToDFA          []*antlr.DFA
}

func parserParserInit() {
	staticData := &ParserParserStaticData
	staticData.LiteralNames = []string{
		"", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'-'", "'~'",
		"'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", "'<'", "'<='", "'>'",
		"'>='", "'=='", "'!='", "'<>'", "'ABORT'", "'ACTION'", "'ADD'", "'AFTER'",
		"'ALL'", "'ALTER'", "'ANALYZE'", "'AND'", "'AS'", "'ASC'", "'ATTACH'",
		"'AUTOINCREMENT'", "'BEFORE'", "'BEGIN'", "'BETWEEN'", "'BY'", "'CASCADE'",
		"'CASE'", "'CAST'", "'CHECK'", "'COLLATE'", "'COLUMN'", "'COMMIT'",
		"'CONFLICT'", "'CONSTRAINT'", "'CREATE'", "'CROSS'", "'CURRENT_DATE'",
		"'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'DATABASE'", "'DEFAULT'",
		"'DEFERRABLE'", "'DEFERRED'", "'DELETE'", "'DESC'", "'DETACH'", "'DISTINCT'",
		"'DROP'", "'EACH'", "'ELSE'", "'END'", "'ESCAPE'", "'EXCEPT'", "'EXCLUSIVE'",
		"'EXISTS'", "'EXPLAIN'", "'FAIL'", "'FOR'", "'FOREIGN'", "'FROM'", "'FULL'",
		"'GLOB'", "'GROUP'", "'HAVING'", "'IF'", "'IGNORE'", "'IMMEDIATE'",
		"'IN'", "'INDEX'", "'INDEXED'", "'INITIALLY'", "'INNER'", "'INSERT'",
		"'INSTEAD'", "'INTERSECT'", "'INTO'", "'IS'", "'ISNULL'", "'JOIN'",
		"'KEY'", "'LEFT'", "'LIKE'", "'LIMIT'", "'MATCH'", "'NATURAL'", "'NO'",
		"'NOT'", "'NOTNULL'", "'NULL'", "'OF'", "'OFFSET'", "'ON'", "'OR'",
		"'ORDER'", "'OUTER'", "'PLAN'", "'PRAGMA'", "'PRIMARY'", "'QUERY'",
		"'RAISE'", "'RECURSIVE'", "'REFERENCES'", "'REGEXP'", "'REINDEX'", "'RELEASE'",
		"'RENAME'", "'REPLACE'", "'RESTRICT'", "'RETURNING'", "'RIGHT'", "'ROLLBACK'",
		"'ROW'", "'ROWS'", "'SAVEPOINT'", "'SELECT'", "'SET'", "'TABLE'", "'TEMP'",
		"'TEMPORARY'", "'THEN'", "'TO'", "'TRANSACTION'", "'TRIGGER'", "'UNION'",
		"'UNIQUE'", "'UPDATE'", "'USING'", "'VACUUM'", "'VALUES'", "'VIEW'",
		"'VIRTUAL'", "'WHEN'", "'WHERE'", "'WITH'", "'WITHOUT'", "'FIRST_VALUE'",
		"'OVER'", "'PARTITION'", "'RANGE'", "'PRECEDING'", "'UNBOUNDED'", "'CURRENT'",
		"'FOLLOWING'", "'CUME_DIST'", "'DENSE_RANK'", "'LAG'", "'LAST_VALUE'",
		"'LEAD'", "'NTH_VALUE'", "'NTILE'", "'PERCENT_RANK'", "'RANK'", "'ROW_NUMBER'",
		"'GENERATED'", "'ALWAYS'", "'STORED'", "'TRUE'", "'FALSE'", "'WINDOW'",
		"'NULLS'", "'FIRST'", "'LAST'", "'FILTER'", "'GROUPS'", "'EXCLUDE'",
		"'TIES'", "'OTHERS'", "'DO'", "'NOTHING'",
	}
	staticData.SymbolicNames = []string{
		"", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR",
		"PLUS", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", "GT2", "AMP",
		"PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", "NOT_EQ2", "ABORT_",
		"ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", "AND_", "AS_",
		"ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", "BEGIN_", "BETWEEN_",
		"BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", "COLLATE_", "COLUMN_",
		"COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", "CROSS_", "CURRENT_DATE_",
		"CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", "DEFAULT_", "DEFERRABLE_",
		"DEFERRED_", "DELETE_", "DESC_", "DETACH_", "DISTINCT_", "DROP_", "EACH_",
		"ELSE_", "END_", "ESCAPE_", "EXCEPT_", "EXCLUSIVE_", "EXISTS_", "EXPLAIN_",
		"FAIL_", "FOR_", "FOREIGN_", "FROM_", "FULL_", "GLOB_", "GROUP_", "HAVING_",
		"IF_", "IGNORE_", "IMMEDIATE_", "IN_", "INDEX_", "INDEXED_", "INITIALLY_",
		"INNER_", "INSERT_", "INSTEAD_", "INTERSECT_", "INTO_", "IS_", "ISNULL_",
		"JOIN_", "KEY_", "LEFT_", "LIKE_", "LIMIT_", "MATCH_", "NATURAL_", "NO_",
		"NOT_", "NOTNULL_", "NULL_", "OF_", "OFFSET_", "ON_", "OR_", "ORDER_",
		"OUTER_", "PLAN_", "PRAGMA_", "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_",
		"REFERENCES_", "REGEXP_", "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_",
		"RESTRICT_", "RETURNING_", "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_",
		"SELECT_", "SET_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_",
		"TRANSACTION_", "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_",
		"VACUUM_", "VALUES_", "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_",
		"WITHOUT_", "FIRST_VALUE_", "OVER_", "PARTITION_", "RANGE_", "PRECEDING_",
		"UNBOUNDED_", "CURRENT_", "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_",
		"LAG_", "LAST_VALUE_", "LEAD_", "NTH_VALUE_", "NTILE_", "PERCENT_RANK_",
		"RANK_", "ROW_NUMBER_", "GENERATED_", "ALWAYS_", "STORED_", "TRUE_",
		"FALSE_", "WINDOW_", "NULLS_", "FIRST_", "LAST_", "FILTER_", "GROUPS_",
		"EXCLUDE_", "TIES_", "OTHERS_", "DO_", "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL",
		"BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT",
		"MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR",
	}
	staticData.RuleNames = []string{
		"parse", "sql_stmt_list", "sql_stmt", "alter_table_stmt", "analyze_stmt",
		"attach_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "savepoint_stmt",
		"release_stmt", "create_index_stmt", "indexed_column", "create_table_stmt",
		"column_def", "type_name", "column_constraint", "signed_number", "table_constraint",
		"foreign_key_clause", "conflict_clause", "create_trigger_stmt", "create_view_stmt",
		"create_virtual_table_stmt", "with_clause", "cte_table_name", "recursive_cte",
		"common_table_expression", "delete_stmt", "delete_stmt_limited", "detach_stmt",
		"drop_stmt", "expr", "raise_function", "literal_value", "insert_stmt",
		"returning_clause", "upsert_clause", "pragma_stmt", "pragma_value",
		"reindex_stmt", "select_stmt", "join_clause", "select_core", "factored_select_stmt",
		"simple_select_stmt", "compound_select_stmt", "table_or_subquery", "result_column",
		"join_operator", "join_constraint", "compound_operator", "update_stmt",
		"assignment_list", "assignment", "column_name_list", "update_stmt_limited",
		"qualified_table_name", "vacuum_stmt", "filter_clause", "window_defn",
		"over_clause", "frame_spec", "frame_clause", "simple_function_invocation",
		"aggregate_function_invocation", "window_function_invocation", "common_table_stmt",
		"order_by_stmt", "limit_stmt", "ordering_term", "asc_desc", "frame_left",
		"frame_right", "frame_single", "window_function", "offset", "default_value",
		"partition_by", "order_by_expr", "order_by_expr_asc_desc", "expr_asc_desc",
		"initial_select", "recursive_select", "unary_operator", "error_message",
		"module_argument", "column_alias", "keyword", "name", "function_name",
		"schema_name", "table_name", "table_or_index_name", "column_name", "collation_name",
		"foreign_table", "index_name", "trigger_name", "view_name", "module_name",
		"pragma_name", "savepoint_name", "table_alias", "transaction_name",
		"window_name", "alias", "filename", "base_window_name", "simple_func",
		"aggregate_func", "table_function_name", "any_name",
	}
	staticData.PredictionContextCache = antlr.NewPredictionContextCache()
	staticData.serializedATN = []int32{
		4, 1, 193, 2083, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4,
		7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10,
		7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7,
		15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20,
		2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2,
		26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31,
		7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7,
		36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41,
		2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2,
		47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52,
		7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7,
		57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62,
		2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2,
		68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73,
		7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7,
		78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83,
		2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2,
		89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94,
		7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7,
		99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2,
		104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7,
		108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 1,
		0, 5, 0, 228, 8, 0, 10, 0, 12, 0, 231, 9, 0, 1, 0, 1, 0, 1, 1, 5, 1, 236,
		8, 1, 10, 1, 12, 1, 239, 9, 1, 1, 1, 1, 1, 4, 1, 243, 8, 1, 11, 1, 12,
		1, 244, 1, 1, 5, 1, 248, 8, 1, 10, 1, 12, 1, 251, 9, 1, 1, 1, 5, 1, 254,
		8, 1, 10, 1, 12, 1, 257, 9, 1, 1, 2, 1, 2, 1, 2, 3, 2, 262, 8, 2, 3, 2,
		264, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
		1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
		1, 2, 1, 2, 3, 2, 290, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 297, 8,
		3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 304, 8, 3, 1, 3, 1, 3, 1, 3, 1,
		3, 3, 3, 310, 8, 3, 1, 3, 1, 3, 3, 3, 314, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3,
		319, 8, 3, 1, 3, 3, 3, 322, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 329,
		8, 4, 1, 4, 3, 4, 332, 8, 4, 1, 5, 1, 5, 3, 5, 336, 8, 5, 1, 5, 1, 5, 1,
		5, 1, 5, 1, 6, 1, 6, 3, 6, 344, 8, 6, 1, 6, 1, 6, 3, 6, 348, 8, 6, 3, 6,
		350, 8, 6, 1, 7, 1, 7, 3, 7, 354, 8, 7, 1, 8, 1, 8, 3, 8, 358, 8, 8, 1,
		8, 1, 8, 3, 8, 362, 8, 8, 1, 8, 3, 8, 365, 8, 8, 1, 9, 1, 9, 1, 9, 1, 10,
		1, 10, 3, 10, 372, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 378, 8, 11,
		1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 384, 8, 11, 1, 11, 1, 11, 1, 11, 3,
		11, 389, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11,
		398, 8, 11, 10, 11, 12, 11, 401, 9, 11, 1, 11, 1, 11, 1, 11, 3, 11, 406,
		8, 11, 1, 12, 1, 12, 3, 12, 410, 8, 12, 1, 12, 1, 12, 3, 12, 414, 8, 12,
		1, 12, 3, 12, 417, 8, 12, 1, 13, 1, 13, 3, 13, 421, 8, 13, 1, 13, 1, 13,
		1, 13, 1, 13, 3, 13, 427, 8, 13, 1, 13, 1, 13, 1, 13, 3, 13, 432, 8, 13,
		1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 5, 13, 439, 8, 13, 10, 13, 12, 13, 442,
		9, 13, 1, 13, 1, 13, 5, 13, 446, 8, 13, 10, 13, 12, 13, 449, 9, 13, 1,
		13, 1, 13, 1, 13, 3, 13, 454, 8, 13, 1, 13, 1, 13, 3, 13, 458, 8, 13, 1,
		14, 1, 14, 3, 14, 462, 8, 14, 1, 14, 5, 14, 465, 8, 14, 10, 14, 12, 14,
		468, 9, 14, 1, 15, 4, 15, 471, 8, 15, 11, 15, 12, 15, 472, 1, 15, 1, 15,
		1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 485, 8,
		15, 1, 16, 1, 16, 3, 16, 489, 8, 16, 1, 16, 1, 16, 1, 16, 3, 16, 494, 8,
		16, 1, 16, 3, 16, 497, 8, 16, 1, 16, 3, 16, 500, 8, 16, 1, 16, 1, 16, 1,
		16, 3, 16, 505, 8, 16, 1, 16, 3, 16, 508, 8, 16, 1, 16, 1, 16, 1, 16, 1,
		16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 522,
		8, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 529, 8, 16, 1, 16, 1,
		16, 1, 16, 1, 16, 1, 16, 3, 16, 536, 8, 16, 3, 16, 538, 8, 16, 1, 17, 3,
		17, 541, 8, 17, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 547, 8, 18, 1, 18, 1,
		18, 1, 18, 3, 18, 552, 8, 18, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 558, 8,
		18, 10, 18, 12, 18, 561, 9, 18, 1, 18, 1, 18, 3, 18, 565, 8, 18, 1, 18,
		1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 5,
		18, 578, 8, 18, 10, 18, 12, 18, 581, 9, 18, 1, 18, 1, 18, 1, 18, 3, 18,
		586, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 594, 8, 19,
		10, 19, 12, 19, 597, 9, 19, 1, 19, 1, 19, 3, 19, 601, 8, 19, 1, 19, 1,
		19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 611, 8, 19, 1, 19,
		1, 19, 5, 19, 615, 8, 19, 10, 19, 12, 19, 618, 9, 19, 1, 19, 3, 19, 621,
		8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 626, 8, 19, 3, 19, 628, 8, 19, 1, 20,
		1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 3, 21, 636, 8, 21, 1, 21, 1, 21, 1,
		21, 1, 21, 3, 21, 642, 8, 21, 1, 21, 1, 21, 1, 21, 3, 21, 647, 8, 21, 1,
		21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 654, 8, 21, 1, 21, 1, 21, 1, 21,
		1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 663, 8, 21, 10, 21, 12, 21, 666, 9,
		21, 3, 21, 668, 8, 21, 3, 21, 670, 8, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1,
		21, 3, 21, 677, 8, 21, 1, 21, 1, 21, 3, 21, 681, 8, 21, 1, 21, 1, 21, 1,
		21, 1, 21, 1, 21, 3, 21, 688, 8, 21, 1, 21, 1, 21, 4, 21, 692, 8, 21, 11,
		21, 12, 21, 693, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 700, 8, 22, 1, 22,
		1, 22, 1, 22, 1, 22, 3, 22, 706, 8, 22, 1, 22, 1, 22, 1, 22, 3, 22, 711,
		8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 718, 8, 22, 10, 22, 12,
		22, 721, 9, 22, 1, 22, 1, 22, 3, 22, 725, 8, 22, 1, 22, 1, 22, 1, 22, 1,
		23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 736, 8, 23, 1, 23, 1, 23,
		1, 23, 3, 23, 741, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1,
		23, 5, 23, 750, 8, 23, 10, 23, 12, 23, 753, 9, 23, 1, 23, 1, 23, 3, 23,
		757, 8, 23, 1, 24, 1, 24, 3, 24, 761, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24,
		1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 775, 8,
		24, 10, 24, 12, 24, 778, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25,
		785, 8, 25, 10, 25, 12, 25, 788, 9, 25, 1, 25, 1, 25, 3, 25, 792, 8, 25,
		1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 800, 8, 26, 1, 26, 1,
		26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, 810, 8, 27, 10, 27,
		12, 27, 813, 9, 27, 1, 27, 1, 27, 3, 27, 817, 8, 27, 1, 27, 1, 27, 1, 27,
		1, 27, 1, 27, 1, 28, 3, 28, 825, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1,
		28, 3, 28, 832, 8, 28, 1, 28, 3, 28, 835, 8, 28, 1, 29, 3, 29, 838, 8,
		29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 845, 8, 29, 1, 29, 3, 29,
		848, 8, 29, 1, 29, 3, 29, 851, 8, 29, 1, 29, 3, 29, 854, 8, 29, 1, 30,
		1, 30, 3, 30, 858, 8, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 3,
		31, 866, 8, 31, 1, 31, 1, 31, 1, 31, 3, 31, 871, 8, 31, 1, 31, 1, 31, 1,
		32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 881, 8, 32, 1, 32, 1, 32,
		1, 32, 3, 32, 886, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1,
		32, 3, 32, 895, 8, 32, 1, 32, 1, 32, 1, 32, 5, 32, 900, 8, 32, 10, 32,
		12, 32, 903, 9, 32, 1, 32, 3, 32, 906, 8, 32, 1, 32, 1, 32, 3, 32, 910,
		8, 32, 1, 32, 3, 32, 913, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 919,
		8, 32, 10, 32, 12, 32, 922, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1,
		32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 934, 8, 32, 1, 32, 3, 32, 937, 8,
		32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 945, 8, 32, 1, 32,
		1, 32, 1, 32, 1, 32, 1, 32, 4, 32, 952, 8, 32, 11, 32, 12, 32, 953, 1,
		32, 1, 32, 3, 32, 958, 8, 32, 1, 32, 1, 32, 1, 32, 3, 32, 963, 8, 32, 1,
		32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32,
		1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1,
		32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 993, 8, 32, 1, 32,
		1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 1005,
		8, 32, 1, 32, 1, 32, 1, 32, 3, 32, 1010, 8, 32, 1, 32, 1, 32, 1, 32, 1,
		32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 1022, 8, 32, 1, 32,
		1, 32, 1, 32, 1, 32, 3, 32, 1028, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1,
		32, 3, 32, 1035, 8, 32, 1, 32, 1, 32, 3, 32, 1039, 8, 32, 1, 32, 1, 32,
		1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 1047, 8, 32, 10, 32, 12, 32, 1050, 9,
		32, 3, 32, 1052, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 1058, 8, 32,
		1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 1064, 8, 32, 1, 32, 1, 32, 1, 32, 1,
		32, 1, 32, 5, 32, 1071, 8, 32, 10, 32, 12, 32, 1074, 9, 32, 3, 32, 1076,
		8, 32, 1, 32, 1, 32, 3, 32, 1080, 8, 32, 5, 32, 1082, 8, 32, 10, 32, 12,
		32, 1085, 9, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 1093,
		8, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 3, 35, 1100, 8, 35, 1, 35, 1,
		35, 1, 35, 1, 35, 1, 35, 3, 35, 1107, 8, 35, 1, 35, 1, 35, 1, 35, 1, 35,
		3, 35, 1113, 8, 35, 1, 35, 1, 35, 1, 35, 3, 35, 1118, 8, 35, 1, 35, 1,
		35, 1, 35, 1, 35, 5, 35, 1124, 8, 35, 10, 35, 12, 35, 1127, 9, 35, 1, 35,
		1, 35, 3, 35, 1131, 8, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 5, 35, 1138,
		8, 35, 10, 35, 12, 35, 1141, 9, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35,
		1, 35, 5, 35, 1149, 8, 35, 10, 35, 12, 35, 1152, 9, 35, 1, 35, 1, 35, 5,
		35, 1156, 8, 35, 10, 35, 12, 35, 1159, 9, 35, 1, 35, 3, 35, 1162, 8, 35,
		1, 35, 3, 35, 1165, 8, 35, 1, 35, 1, 35, 3, 35, 1169, 8, 35, 1, 35, 3,
		35, 1172, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 1178, 8, 36, 10, 36,
		12, 36, 1181, 9, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1189,
		8, 37, 10, 37, 12, 37, 1192, 9, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1197, 8,
		37, 3, 37, 1199, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37,
		1207, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1214, 8, 37, 1,
		37, 1, 37, 1, 37, 5, 37, 1219, 8, 37, 10, 37, 12, 37, 1222, 9, 37, 1, 37,
		1, 37, 3, 37, 1226, 8, 37, 3, 37, 1228, 8, 37, 1, 38, 1, 38, 1, 38, 1,
		38, 3, 38, 1234, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38,
		3, 38, 1243, 8, 38, 1, 39, 1, 39, 1, 39, 3, 39, 1248, 8, 39, 1, 40, 1,
		40, 1, 40, 1, 40, 1, 40, 3, 40, 1255, 8, 40, 1, 40, 1, 40, 3, 40, 1259,
		8, 40, 3, 40, 1261, 8, 40, 1, 41, 3, 41, 1264, 8, 41, 1, 41, 1, 41, 1,
		41, 1, 41, 5, 41, 1270, 8, 41, 10, 41, 12, 41, 1273, 9, 41, 1, 41, 3, 41,
		1276, 8, 41, 1, 41, 3, 41, 1279, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 3,
		42, 1285, 8, 42, 5, 42, 1287, 8, 42, 10, 42, 12, 42, 1290, 9, 42, 1, 43,
		1, 43, 3, 43, 1294, 8, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1299, 8, 43, 10,
		43, 12, 43, 1302, 9, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1308, 8, 43,
		10, 43, 12, 43, 1311, 9, 43, 1, 43, 3, 43, 1314, 8, 43, 3, 43, 1316, 8,
		43, 1, 43, 1, 43, 3, 43, 1320, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43,
		5, 43, 1327, 8, 43, 10, 43, 12, 43, 1330, 9, 43, 1, 43, 1, 43, 3, 43, 1334,
		8, 43, 3, 43, 1336, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1,
		43, 1, 43, 1, 43, 5, 43, 1347, 8, 43, 10, 43, 12, 43, 1350, 9, 43, 3, 43,
		1352, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1359, 8, 43, 10,
		43, 12, 43, 1362, 9, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43,
		1370, 8, 43, 10, 43, 12, 43, 1373, 9, 43, 1, 43, 1, 43, 5, 43, 1377, 8,
		43, 10, 43, 12, 43, 1380, 9, 43, 3, 43, 1382, 8, 43, 1, 44, 1, 44, 1, 45,
		3, 45, 1387, 8, 45, 1, 45, 1, 45, 3, 45, 1391, 8, 45, 1, 45, 3, 45, 1394,
		8, 45, 1, 46, 3, 46, 1397, 8, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1402, 8,
		46, 1, 46, 1, 46, 3, 46, 1406, 8, 46, 1, 46, 4, 46, 1409, 8, 46, 11, 46,
		12, 46, 1410, 1, 46, 3, 46, 1414, 8, 46, 1, 46, 3, 46, 1417, 8, 46, 1,
		47, 1, 47, 1, 47, 3, 47, 1422, 8, 47, 1, 47, 1, 47, 3, 47, 1426, 8, 47,
		1, 47, 3, 47, 1429, 8, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1436,
		8, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1441, 8, 47, 1, 47, 1, 47, 1, 47, 1,
		47, 1, 47, 5, 47, 1448, 8, 47, 10, 47, 12, 47, 1451, 9, 47, 1, 47, 1, 47,
		3, 47, 1455, 8, 47, 1, 47, 3, 47, 1458, 8, 47, 1, 47, 1, 47, 1, 47, 1,
		47, 5, 47, 1464, 8, 47, 10, 47, 12, 47, 1467, 9, 47, 1, 47, 3, 47, 1470,
		8, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1478, 8, 47, 1,
		47, 3, 47, 1481, 8, 47, 3, 47, 1483, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48,
		1, 48, 1, 48, 1, 48, 3, 48, 1492, 8, 48, 1, 48, 3, 48, 1495, 8, 48, 3,
		48, 1497, 8, 48, 1, 49, 1, 49, 3, 49, 1501, 8, 49, 1, 49, 1, 49, 3, 49,
		1505, 8, 49, 1, 49, 1, 49, 3, 49, 1509, 8, 49, 1, 49, 3, 49, 1512, 8, 49,
		1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 1521, 8, 50, 10,
		50, 12, 50, 1524, 9, 50, 1, 50, 1, 50, 3, 50, 1528, 8, 50, 1, 51, 1, 51,
		3, 51, 1532, 8, 51, 1, 51, 1, 51, 3, 51, 1536, 8, 51, 1, 52, 3, 52, 1539,
		8, 52, 1, 52, 1, 52, 1, 52, 3, 52, 1544, 8, 52, 1, 52, 1, 52, 1, 52, 1,
		52, 1, 52, 1, 52, 1, 52, 5, 52, 1553, 8, 52, 10, 52, 12, 52, 1556, 9, 52,
		1, 52, 3, 52, 1559, 8, 52, 3, 52, 1561, 8, 52, 1, 52, 1, 52, 3, 52, 1565,
		8, 52, 1, 52, 3, 52, 1568, 8, 52, 1, 53, 1, 53, 1, 53, 5, 53, 1573, 8,
		53, 10, 53, 12, 53, 1576, 9, 53, 1, 54, 1, 54, 3, 54, 1580, 8, 54, 1, 54,
		1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 5, 55, 1589, 8, 55, 10, 55, 12,
		55, 1592, 9, 55, 1, 55, 1, 55, 1, 56, 3, 56, 1597, 8, 56, 1, 56, 1, 56,
		1, 56, 3, 56, 1602, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1608, 8,
		56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1615, 8, 56, 1, 56, 1, 56,
		1, 56, 5, 56, 1620, 8, 56, 10, 56, 12, 56, 1623, 9, 56, 1, 56, 1, 56, 3,
		56, 1627, 8, 56, 1, 56, 3, 56, 1630, 8, 56, 1, 56, 3, 56, 1633, 8, 56,
		1, 56, 3, 56, 1636, 8, 56, 1, 57, 1, 57, 1, 57, 3, 57, 1641, 8, 57, 1,
		57, 1, 57, 1, 57, 3, 57, 1646, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57,
		3, 57, 1653, 8, 57, 1, 58, 1, 58, 3, 58, 1657, 8, 58, 1, 58, 1, 58, 3,
		58, 1661, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60,
		3, 60, 1671, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1678, 8,
		60, 10, 60, 12, 60, 1681, 9, 60, 3, 60, 1683, 8, 60, 1, 60, 1, 60, 1, 60,
		1, 60, 1, 60, 5, 60, 1690, 8, 60, 10, 60, 12, 60, 1693, 9, 60, 1, 60, 3,
		60, 1696, 8, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 1704,
		8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 1711, 8, 61, 10, 61, 12,
		61, 1714, 9, 61, 3, 61, 1716, 8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61,
		5, 61, 1723, 8, 61, 10, 61, 12, 61, 1726, 9, 61, 3, 61, 1728, 8, 61, 1,
		61, 3, 61, 1731, 8, 61, 1, 61, 3, 61, 1734, 8, 61, 1, 62, 1, 62, 1, 62,
		1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1744, 8, 62, 1, 63, 1, 63, 1,
		63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1753, 8, 63, 1, 64, 1, 64, 1, 64,
		1, 64, 1, 64, 5, 64, 1760, 8, 64, 10, 64, 12, 64, 1763, 9, 64, 1, 64, 3,
		64, 1766, 8, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 3, 65, 1773, 8, 65,
		1, 65, 1, 65, 1, 65, 5, 65, 1778, 8, 65, 10, 65, 12, 65, 1781, 9, 65, 1,
		65, 3, 65, 1784, 8, 65, 1, 65, 1, 65, 3, 65, 1788, 8, 65, 1, 66, 1, 66,
		1, 66, 1, 66, 1, 66, 5, 66, 1795, 8, 66, 10, 66, 12, 66, 1798, 9, 66, 1,
		66, 3, 66, 1801, 8, 66, 1, 66, 1, 66, 3, 66, 1805, 8, 66, 1, 66, 1, 66,
		1, 66, 3, 66, 1810, 8, 66, 1, 67, 1, 67, 3, 67, 1814, 8, 67, 1, 67, 1,
		67, 1, 67, 5, 67, 1819, 8, 67, 10, 67, 12, 67, 1822, 9, 67, 1, 68, 1, 68,
		1, 68, 1, 68, 1, 68, 5, 68, 1829, 8, 68, 10, 68, 12, 68, 1832, 9, 68, 1,
		69, 1, 69, 1, 69, 1, 69, 3, 69, 1838, 8, 69, 1, 70, 1, 70, 1, 70, 3, 70,
		1843, 8, 70, 1, 70, 3, 70, 1846, 8, 70, 1, 70, 1, 70, 3, 70, 1850, 8, 70,
		1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1,
		72, 1, 72, 3, 72, 1864, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73,
		1, 73, 1, 73, 1, 73, 1, 73, 3, 73, 1876, 8, 73, 1, 74, 1, 74, 1, 74, 1,
		74, 1, 74, 1, 74, 1, 74, 3, 74, 1885, 8, 74, 1, 75, 1, 75, 1, 75, 1, 75,
		1, 75, 1, 75, 1, 75, 3, 75, 1894, 8, 75, 1, 75, 1, 75, 3, 75, 1898, 8,
		75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 3, 75, 1908,
		8, 75, 1, 75, 3, 75, 1911, 8, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1,
		75, 1, 75, 3, 75, 1920, 8, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75,
		1, 75, 3, 75, 1929, 8, 75, 1, 75, 3, 75, 1932, 8, 75, 1, 75, 1, 75, 1,
		75, 1, 75, 3, 75, 1938, 8, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75,
		1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 3, 75, 1952, 8, 75, 1, 75, 1,
		75, 3, 75, 1956, 8, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75,
		1, 75, 1, 75, 3, 75, 1967, 8, 75, 1, 75, 1, 75, 1, 75, 3, 75, 1972, 8,
		75, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 4, 78,
		1983, 8, 78, 11, 78, 12, 78, 1984, 1, 79, 1, 79, 1, 79, 4, 79, 1990, 8,
		79, 11, 79, 12, 79, 1991, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 3,
		81, 2000, 8, 81, 1, 81, 1, 81, 1, 81, 3, 81, 2005, 8, 81, 5, 81, 2007,
		8, 81, 10, 81, 12, 81, 2010, 9, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84,
		1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 3, 86, 2022, 8, 86, 1, 87, 1, 87, 1,
		88, 1, 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93,
		1, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1, 98, 1,
		98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 101, 1, 101, 1, 102, 1, 102, 1, 103,
		1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107,
		1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112,
		1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 3, 112, 2081, 8, 112, 1,
		112, 2, 440, 472, 1, 64, 113, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22,
		24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
		60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94,
		96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124,
		126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154,
		156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184,
		186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214,
		216, 218, 220, 222, 224, 0, 28, 3, 0, 58, 58, 69, 69, 82, 82, 2, 0, 47,
		47, 66, 66, 1, 0, 133, 134, 2, 0, 146, 146, 171, 171, 1, 0, 8, 9, 2, 0,
		59, 59, 141, 141, 2, 0, 56, 56, 104, 104, 2, 0, 58, 58, 82, 82, 5, 0, 25,
		25, 72, 72, 81, 81, 122, 122, 126, 126, 4, 0, 84, 84, 132, 132, 138, 138,
		145, 145, 2, 0, 7, 7, 12, 13, 1, 0, 14, 17, 1, 0, 18, 21, 4, 0, 77, 77,
		97, 97, 99, 99, 118, 118, 3, 0, 25, 25, 72, 72, 126, 126, 5, 0, 52, 54,
		104, 104, 172, 173, 186, 186, 188, 189, 2, 0, 29, 29, 62, 62, 3, 0, 128,
		128, 154, 154, 179, 179, 2, 0, 5, 5, 106, 106, 1, 0, 176, 177, 2, 0, 34,
		34, 60, 60, 2, 0, 151, 151, 162, 162, 2, 0, 159, 159, 166, 166, 2, 0, 160,
		160, 167, 168, 2, 0, 161, 161, 163, 163, 2, 0, 8, 10, 102, 102, 2, 0, 185,
		185, 188, 188, 2, 0, 25, 123, 125, 180, 2367, 0, 229, 1, 0, 0, 0, 2, 237,
		1, 0, 0, 0, 4, 263, 1, 0, 0, 0, 6, 291, 1, 0, 0, 0, 8, 323, 1, 0, 0, 0,
		10, 333, 1, 0, 0, 0, 12, 341, 1, 0, 0, 0, 14, 351, 1, 0, 0, 0, 16, 355,
		1, 0, 0, 0, 18, 366, 1, 0, 0, 0, 20, 369, 1, 0, 0, 0, 22, 375, 1, 0, 0,
		0, 24, 409, 1, 0, 0, 0, 26, 418, 1, 0, 0, 0, 28, 459, 1, 0, 0, 0, 30, 470,
		1, 0, 0, 0, 32, 488, 1, 0, 0, 0, 34, 540, 1, 0, 0, 0, 36, 546, 1, 0, 0,
		0, 38, 587, 1, 0, 0, 0, 40, 629, 1, 0, 0, 0, 42, 633, 1, 0, 0, 0, 44, 697,
		1, 0, 0, 0, 46, 729, 1, 0, 0, 0, 48, 758, 1, 0, 0, 0, 50, 779, 1, 0, 0,
		0, 52, 793, 1, 0, 0, 0, 54, 804, 1, 0, 0, 0, 56, 824, 1, 0, 0, 0, 58, 837,
		1, 0, 0, 0, 60, 855, 1, 0, 0, 0, 62, 861, 1, 0, 0, 0, 64, 962, 1, 0, 0,
		0, 66, 1086, 1, 0, 0, 0, 68, 1096, 1, 0, 0, 0, 70, 1099, 1, 0, 0, 0, 72,
		1173, 1, 0, 0, 0, 74, 1182, 1, 0, 0, 0, 76, 1229, 1, 0, 0, 0, 78, 1247,
		1, 0, 0, 0, 80, 1249, 1, 0, 0, 0, 82, 1263, 1, 0, 0, 0, 84, 1280, 1, 0,
		0, 0, 86, 1381, 1, 0, 0, 0, 88, 1383, 1, 0, 0, 0, 90, 1386, 1, 0, 0, 0,
		92, 1396, 1, 0, 0, 0, 94, 1482, 1, 0, 0, 0, 96, 1496, 1, 0, 0, 0, 98, 1511,
		1, 0, 0, 0, 100, 1527, 1, 0, 0, 0, 102, 1535, 1, 0, 0, 0, 104, 1538, 1,
		0, 0, 0, 106, 1569, 1, 0, 0, 0, 108, 1579, 1, 0, 0, 0, 110, 1584, 1, 0,
		0, 0, 112, 1596, 1, 0, 0, 0, 114, 1640, 1, 0, 0, 0, 116, 1654, 1, 0, 0,
		0, 118, 1662, 1, 0, 0, 0, 120, 1668, 1, 0, 0, 0, 122, 1699, 1, 0, 0, 0,
		124, 1735, 1, 0, 0, 0, 126, 1745, 1, 0, 0, 0, 128, 1754, 1, 0, 0, 0, 130,
		1769, 1, 0, 0, 0, 132, 1789, 1, 0, 0, 0, 134, 1811, 1, 0, 0, 0, 136, 1823,
		1, 0, 0, 0, 138, 1833, 1, 0, 0, 0, 140, 1839, 1, 0, 0, 0, 142, 1851, 1,
		0, 0, 0, 144, 1863, 1, 0, 0, 0, 146, 1875, 1, 0, 0, 0, 148, 1884, 1, 0,
		0, 0, 150, 1971, 1, 0, 0, 0, 152, 1973, 1, 0, 0, 0, 154, 1976, 1, 0, 0,
		0, 156, 1979, 1, 0, 0, 0, 158, 1986, 1, 0, 0, 0, 160, 1993, 1, 0, 0, 0,
		162, 1997, 1, 0, 0, 0, 164, 2011, 1, 0, 0, 0, 166, 2013, 1, 0, 0, 0, 168,
		2015, 1, 0, 0, 0, 170, 2017, 1, 0, 0, 0, 172, 2021, 1, 0, 0, 0, 174, 2023,
		1, 0, 0, 0, 176, 2025, 1, 0, 0, 0, 178, 2027, 1, 0, 0, 0, 180, 2029, 1,
		0, 0, 0, 182, 2031, 1, 0, 0, 0, 184, 2033, 1, 0, 0, 0, 186, 2035, 1, 0,
		0, 0, 188, 2037, 1, 0, 0, 0, 190, 2039, 1, 0, 0, 0, 192, 2041, 1, 0, 0,
		0, 194, 2043, 1, 0, 0, 0, 196, 2045, 1, 0, 0, 0, 198, 2047, 1, 0, 0, 0,
		200, 2049, 1, 0, 0, 0, 202, 2051, 1, 0, 0, 0, 204, 2053, 1, 0, 0, 0, 206,
		2055, 1, 0, 0, 0, 208, 2057, 1, 0, 0, 0, 210, 2059, 1, 0, 0, 0, 212, 2061,
		1, 0, 0, 0, 214, 2063, 1, 0, 0, 0, 216, 2065, 1, 0, 0, 0, 218, 2067, 1,
		0, 0, 0, 220, 2069, 1, 0, 0, 0, 222, 2071, 1, 0, 0, 0, 224, 2080, 1, 0,
		0, 0, 226, 228, 3, 2, 1, 0, 227, 226, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0,
		229, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 232, 1, 0, 0, 0, 231,
		229, 1, 0, 0, 0, 232, 233, 5, 0, 0, 1, 233, 1, 1, 0, 0, 0, 234, 236, 5,
		1, 0, 0, 235, 234, 1, 0, 0, 0, 236, 239, 1, 0, 0, 0, 237, 235, 1, 0, 0,
		0, 237, 238, 1, 0, 0, 0, 238, 240, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 240,
		249, 3, 4, 2, 0, 241, 243, 5, 1, 0, 0, 242, 241, 1, 0, 0, 0, 243, 244,
		1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 1, 0,
		0, 0, 246, 248, 3, 4, 2, 0, 247, 242, 1, 0, 0, 0, 248, 251, 1, 0, 0, 0,
		249, 247, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 255, 1, 0, 0, 0, 251,
		249, 1, 0, 0, 0, 252, 254, 5, 1, 0, 0, 253, 252, 1, 0, 0, 0, 254, 257,
		1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 3, 1, 0, 0,
		0, 257, 255, 1, 0, 0, 0, 258, 261, 5, 71, 0, 0, 259, 260, 5, 114, 0, 0,
		260, 262, 5, 111, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262,
		264, 1, 0, 0, 0, 263, 258, 1, 0, 0, 0, 263, 264, 1, 0, 0, 0, 264, 289,
		1, 0, 0, 0, 265, 290, 3, 6, 3, 0, 266, 290, 3, 8, 4, 0, 267, 290, 3, 10,
		5, 0, 268, 290, 3, 12, 6, 0, 269, 290, 3, 14, 7, 0, 270, 290, 3, 22, 11,
		0, 271, 290, 3, 26, 13, 0, 272, 290, 3, 42, 21, 0, 273, 290, 3, 44, 22,
		0, 274, 290, 3, 46, 23, 0, 275, 290, 3, 56, 28, 0, 276, 290, 3, 58, 29,
		0, 277, 290, 3, 60, 30, 0, 278, 290, 3, 62, 31, 0, 279, 290, 3, 70, 35,
		0, 280, 290, 3, 76, 38, 0, 281, 290, 3, 80, 40, 0, 282, 290, 3, 20, 10,
		0, 283, 290, 3, 16, 8, 0, 284, 290, 3, 18, 9, 0, 285, 290, 3, 82, 41, 0,
		286, 290, 3, 104, 52, 0, 287, 290, 3, 112, 56, 0, 288, 290, 3, 116, 58,
		0, 289, 265, 1, 0, 0, 0, 289, 266, 1, 0, 0, 0, 289, 267, 1, 0, 0, 0, 289,
		268, 1, 0, 0, 0, 289, 269, 1, 0, 0, 0, 289, 270, 1, 0, 0, 0, 289, 271,
		1, 0, 0, 0, 289, 272, 1, 0, 0, 0, 289, 273, 1, 0, 0, 0, 289, 274, 1, 0,
		0, 0, 289, 275, 1, 0, 0, 0, 289, 276, 1, 0, 0, 0, 289, 277, 1, 0, 0, 0,
		289, 278, 1, 0, 0, 0, 289, 279, 1, 0, 0, 0, 289, 280, 1, 0, 0, 0, 289,
		281, 1, 0, 0, 0, 289, 282, 1, 0, 0, 0, 289, 283, 1, 0, 0, 0, 289, 284,
		1, 0, 0, 0, 289, 285, 1, 0, 0, 0, 289, 286, 1, 0, 0, 0, 289, 287, 1, 0,
		0, 0, 289, 288, 1, 0, 0, 0, 290, 5, 1, 0, 0, 0, 291, 292, 5, 30, 0, 0,
		292, 296, 5, 132, 0, 0, 293, 294, 3, 182, 91, 0, 294, 295, 5, 2, 0, 0,
		295, 297, 1, 0, 0, 0, 296, 293, 1, 0, 0, 0, 296, 297, 1, 0, 0, 0, 297,
		298, 1, 0, 0, 0, 298, 321, 3, 184, 92, 0, 299, 309, 5, 121, 0, 0, 300,
		301, 5, 136, 0, 0, 301, 310, 3, 184, 92, 0, 302, 304, 5, 46, 0, 0, 303,
		302, 1, 0, 0, 0, 303, 304, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 306,
		3, 188, 94, 0, 306, 307, 5, 136, 0, 0, 307, 308, 3, 188, 94, 0, 308, 310,
		1, 0, 0, 0, 309, 300, 1, 0, 0, 0, 309, 303, 1, 0, 0, 0, 310, 322, 1, 0,
		0, 0, 311, 313, 5, 27, 0, 0, 312, 314, 5, 46, 0, 0, 313, 312, 1, 0, 0,
		0, 313, 314, 1, 0, 0, 0, 314, 315, 1, 0, 0, 0, 315, 322, 3, 28, 14, 0,
		316, 318, 5, 63, 0, 0, 317, 319, 5, 46, 0, 0, 318, 317, 1, 0, 0, 0, 318,
		319, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 322, 3, 188, 94, 0, 321, 299,
		1, 0, 0, 0, 321, 311, 1, 0, 0, 0, 321, 316, 1, 0, 0, 0, 322, 7, 1, 0, 0,
		0, 323, 331, 5, 31, 0, 0, 324, 332, 3, 182, 91, 0, 325, 326, 3, 182, 91,
		0, 326, 327, 5, 2, 0, 0, 327, 329, 1, 0, 0, 0, 328, 325, 1, 0, 0, 0, 328,
		329, 1, 0, 0, 0, 329, 330, 1, 0, 0, 0, 330, 332, 3, 186, 93, 0, 331, 324,
		1, 0, 0, 0, 331, 328, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 9, 1, 0, 0,
		0, 333, 335, 5, 35, 0, 0, 334, 336, 5, 55, 0, 0, 335, 334, 1, 0, 0, 0,
		335, 336, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 338, 3, 64, 32, 0, 338,
		339, 5, 33, 0, 0, 339, 340, 3, 182, 91, 0, 340, 11, 1, 0, 0, 0, 341, 343,
		5, 38, 0, 0, 342, 344, 7, 0, 0, 0, 343, 342, 1, 0, 0, 0, 343, 344, 1, 0,
		0, 0, 344, 349, 1, 0, 0, 0, 345, 347, 5, 137, 0, 0, 346, 348, 3, 208, 104,
		0, 347, 346, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 350, 1, 0, 0, 0, 349,
		345, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 13, 1, 0, 0, 0, 351, 353, 7,
		1, 0, 0, 352, 354, 5, 137, 0, 0, 353, 352, 1, 0, 0, 0, 353, 354, 1, 0,
		0, 0, 354, 15, 1, 0, 0, 0, 355, 357, 5, 126, 0, 0, 356, 358, 5, 137, 0,
		0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 364, 1, 0, 0, 0, 359,
		361, 5, 136, 0, 0, 360, 362, 5, 129, 0, 0, 361, 360, 1, 0, 0, 0, 361, 362,
		1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 365, 3, 204, 102, 0, 364, 359, 1,
		0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 17, 1, 0, 0, 0, 366, 367, 5, 129, 0,
		0, 367, 368, 3, 204, 102, 0, 368, 19, 1, 0, 0, 0, 369, 371, 5, 120, 0,
		0, 370, 372, 5, 129, 0, 0, 371, 370, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0,
		372, 373, 1, 0, 0, 0, 373, 374, 3, 204, 102, 0, 374, 21, 1, 0, 0, 0, 375,
		377, 5, 50, 0, 0, 376, 378, 5, 140, 0, 0, 377, 376, 1, 0, 0, 0, 377, 378,
		1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 383, 5, 84, 0, 0, 380, 381, 5, 80,
		0, 0, 381, 382, 5, 102, 0, 0, 382, 384, 5, 70, 0, 0, 383, 380, 1, 0, 0,
		0, 383, 384, 1, 0, 0, 0, 384, 388, 1, 0, 0, 0, 385, 386, 3, 182, 91, 0,
		386, 387, 5, 2, 0, 0, 387, 389, 1, 0, 0, 0, 388, 385, 1, 0, 0, 0, 388,
		389, 1, 0, 0, 0, 389, 390, 1, 0, 0, 0, 390, 391, 3, 194, 97, 0, 391, 392,
		5, 107, 0, 0, 392, 393, 3, 184, 92, 0, 393, 394, 5, 3, 0, 0, 394, 399,
		3, 24, 12, 0, 395, 396, 5, 5, 0, 0, 396, 398, 3, 24, 12, 0, 397, 395, 1,
		0, 0, 0, 398, 401, 1, 0, 0, 0, 399, 397, 1, 0, 0, 0, 399, 400, 1, 0, 0,
		0, 400, 402, 1, 0, 0, 0, 401, 399, 1, 0, 0, 0, 402, 405, 5, 4, 0, 0, 403,
		404, 5, 148, 0, 0, 404, 406, 3, 64, 32, 0, 405, 403, 1, 0, 0, 0, 405, 406,
		1, 0, 0, 0, 406, 23, 1, 0, 0, 0, 407, 410, 3, 188, 94, 0, 408, 410, 3,
		64, 32, 0, 409, 407, 1, 0, 0, 0, 409, 408, 1, 0, 0, 0, 410, 413, 1, 0,
		0, 0, 411, 412, 5, 45, 0, 0, 412, 414, 3, 190, 95, 0, 413, 411, 1, 0, 0,
		0, 413, 414, 1, 0, 0, 0, 414, 416, 1, 0, 0, 0, 415, 417, 3, 142, 71, 0,
		416, 415, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 25, 1, 0, 0, 0, 418, 420,
		5, 50, 0, 0, 419, 421, 7, 2, 0, 0, 420, 419, 1, 0, 0, 0, 420, 421, 1, 0,
		0, 0, 421, 422, 1, 0, 0, 0, 422, 426, 5, 132, 0, 0, 423, 424, 5, 80, 0,
		0, 424, 425, 5, 102, 0, 0, 425, 427, 5, 70, 0, 0, 426, 423, 1, 0, 0, 0,
		426, 427, 1, 0, 0, 0, 427, 431, 1, 0, 0, 0, 428, 429, 3, 182, 91, 0, 429,
		430, 5, 2, 0, 0, 430, 432, 1, 0, 0, 0, 431, 428, 1, 0, 0, 0, 431, 432,
		1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 457, 3, 184, 92, 0, 434, 435, 5,
		3, 0, 0, 435, 440, 3, 28, 14, 0, 436, 437, 5, 5, 0, 0, 437, 439, 3, 28,
		14, 0, 438, 436, 1, 0, 0, 0, 439, 442, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0,
		440, 438, 1, 0, 0, 0, 441, 447, 1, 0, 0, 0, 442, 440, 1, 0, 0, 0, 443,
		444, 5, 5, 0, 0, 444, 446, 3, 36, 18, 0, 445, 443, 1, 0, 0, 0, 446, 449,
		1, 0, 0, 0, 447, 445, 1, 0, 0, 0, 447, 448, 1, 0, 0, 0, 448, 450, 1, 0,
		0, 0, 449, 447, 1, 0, 0, 0, 450, 453, 5, 4, 0, 0, 451, 452, 5, 150, 0,
		0, 452, 454, 5, 185, 0, 0, 453, 451, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0,
		454, 458, 1, 0, 0, 0, 455, 456, 5, 33, 0, 0, 456, 458, 3, 82, 41, 0, 457,
		434, 1, 0, 0, 0, 457, 455, 1, 0, 0, 0, 458, 27, 1, 0, 0, 0, 459, 461, 3,
		188, 94, 0, 460, 462, 3, 30, 15, 0, 461, 460, 1, 0, 0, 0, 461, 462, 1,
		0, 0, 0, 462, 466, 1, 0, 0, 0, 463, 465, 3, 32, 16, 0, 464, 463, 1, 0,
		0, 0, 465, 468, 1, 0, 0, 0, 466, 464, 1, 0, 0, 0, 466, 467, 1, 0, 0, 0,
		467, 29, 1, 0, 0, 0, 468, 466, 1, 0, 0, 0, 469, 471, 3, 178, 89, 0, 470,
		469, 1, 0, 0, 0, 471, 472, 1, 0, 0, 0, 472, 473, 1, 0, 0, 0, 472, 470,
		1, 0, 0, 0, 473, 484, 1, 0, 0, 0, 474, 475, 5, 3, 0, 0, 475, 476, 3, 34,
		17, 0, 476, 477, 5, 4, 0, 0, 477, 485, 1, 0, 0, 0, 478, 479, 5, 3, 0, 0,
		479, 480, 3, 34, 17, 0, 480, 481, 5, 5, 0, 0, 481, 482, 3, 34, 17, 0, 482,
		483, 5, 4, 0, 0, 483, 485, 1, 0, 0, 0, 484, 474, 1, 0, 0, 0, 484, 478,
		1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 31, 1, 0, 0, 0, 486, 487, 5, 49,
		0, 0, 487, 489, 3, 178, 89, 0, 488, 486, 1, 0, 0, 0, 488, 489, 1, 0, 0,
		0, 489, 537, 1, 0, 0, 0, 490, 491, 5, 113, 0, 0, 491, 493, 5, 95, 0, 0,
		492, 494, 3, 142, 71, 0, 493, 492, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494,
		496, 1, 0, 0, 0, 495, 497, 3, 40, 20, 0, 496, 495, 1, 0, 0, 0, 496, 497,
		1, 0, 0, 0, 497, 499, 1, 0, 0, 0, 498, 500, 5, 36, 0, 0, 499, 498, 1, 0,
		0, 0, 499, 500, 1, 0, 0, 0, 500, 538, 1, 0, 0, 0, 501, 502, 5, 102, 0,
		0, 502, 505, 5, 104, 0, 0, 503, 505, 5, 140, 0, 0, 504, 501, 1, 0, 0, 0,
		504, 503, 1, 0, 0, 0, 505, 507, 1, 0, 0, 0, 506, 508, 3, 40, 20, 0, 507,
		506, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 538, 1, 0, 0, 0, 509, 510,
		5, 44, 0, 0, 510, 511, 5, 3, 0, 0, 511, 512, 3, 64, 32, 0, 512, 513, 5,
		4, 0, 0, 513, 538, 1, 0, 0, 0, 514, 521, 5, 56, 0, 0, 515, 522, 3, 34,
		17, 0, 516, 522, 3, 68, 34, 0, 517, 518, 5, 3, 0, 0, 518, 519, 3, 64, 32,
		0, 519, 520, 5, 4, 0, 0, 520, 522, 1, 0, 0, 0, 521, 515, 1, 0, 0, 0, 521,
		516, 1, 0, 0, 0, 521, 517, 1, 0, 0, 0, 522, 538, 1, 0, 0, 0, 523, 524,
		5, 45, 0, 0, 524, 538, 3, 190, 95, 0, 525, 538, 3, 38, 19, 0, 526, 527,
		5, 169, 0, 0, 527, 529, 5, 170, 0, 0, 528, 526, 1, 0, 0, 0, 528, 529, 1,
		0, 0, 0, 529, 530, 1, 0, 0, 0, 530, 531, 5, 33, 0, 0, 531, 532, 5, 3, 0,
		0, 532, 533, 3, 64, 32, 0, 533, 535, 5, 4, 0, 0, 534, 536, 7, 3, 0, 0,
		535, 534, 1, 0, 0, 0, 535, 536, 1, 0, 0, 0, 536, 538, 1, 0, 0, 0, 537,
		490, 1, 0, 0, 0, 537, 504, 1, 0, 0, 0, 537, 509, 1, 0, 0, 0, 537, 514,
		1, 0, 0, 0, 537, 523, 1, 0, 0, 0, 537, 525, 1, 0, 0, 0, 537, 528, 1, 0,
		0, 0, 538, 33, 1, 0, 0, 0, 539, 541, 7, 4, 0, 0, 540, 539, 1, 0, 0, 0,
		540, 541, 1, 0, 0, 0, 541, 542, 1, 0, 0, 0, 542, 543, 5, 186, 0, 0, 543,
		35, 1, 0, 0, 0, 544, 545, 5, 49, 0, 0, 545, 547, 3, 178, 89, 0, 546, 544,
		1, 0, 0, 0, 546, 547, 1, 0, 0, 0, 547, 585, 1, 0, 0, 0, 548, 549, 5, 113,
		0, 0, 549, 552, 5, 95, 0, 0, 550, 552, 5, 140, 0, 0, 551, 548, 1, 0, 0,
		0, 551, 550, 1, 0, 0, 0, 552, 553, 1, 0, 0, 0, 553, 554, 5, 3, 0, 0, 554,
		559, 3, 24, 12, 0, 555, 556, 5, 5, 0, 0, 556, 558, 3, 24, 12, 0, 557, 555,
		1, 0, 0, 0, 558, 561, 1, 0, 0, 0, 559, 557, 1, 0, 0, 0, 559, 560, 1, 0,
		0, 0, 560, 562, 1, 0, 0, 0, 561, 559, 1, 0, 0, 0, 562, 564, 5, 4, 0, 0,
		563, 565, 3, 40, 20, 0, 564, 563, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, 565,
		586, 1, 0, 0, 0, 566, 567, 5, 44, 0, 0, 567, 568, 5, 3, 0, 0, 568, 569,
		3, 64, 32, 0, 569, 570, 5, 4, 0, 0, 570, 586, 1, 0, 0, 0, 571, 572, 5,
		74, 0, 0, 572, 573, 5, 95, 0, 0, 573, 574, 5, 3, 0, 0, 574, 579, 3, 188,
		94, 0, 575, 576, 5, 5, 0, 0, 576, 578, 3, 188, 94, 0, 577, 575, 1, 0, 0,
		0, 578, 581, 1, 0, 0, 0, 579, 577, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580,
		582, 1, 0, 0, 0, 581, 579, 1, 0, 0, 0, 582, 583, 5, 4, 0, 0, 583, 584,
		3, 38, 19, 0, 584, 586, 1, 0, 0, 0, 585, 551, 1, 0, 0, 0, 585, 566, 1,
		0, 0, 0, 585, 571, 1, 0, 0, 0, 586, 37, 1, 0, 0, 0, 587, 588, 5, 117, 0,
		0, 588, 600, 3, 192, 96, 0, 589, 590, 5, 3, 0, 0, 590, 595, 3, 188, 94,
		0, 591, 592, 5, 5, 0, 0, 592, 594, 3, 188, 94, 0, 593, 591, 1, 0, 0, 0,
		594, 597, 1, 0, 0, 0, 595, 593, 1, 0, 0, 0, 595, 596, 1, 0, 0, 0, 596,
		598, 1, 0, 0, 0, 597, 595, 1, 0, 0, 0, 598, 599, 5, 4, 0, 0, 599, 601,
		1, 0, 0, 0, 600, 589, 1, 0, 0, 0, 600, 601, 1, 0, 0, 0, 601, 616, 1, 0,
		0, 0, 602, 603, 5, 107, 0, 0, 603, 610, 7, 5, 0, 0, 604, 605, 5, 131, 0,
		0, 605, 611, 7, 6, 0, 0, 606, 611, 5, 41, 0, 0, 607, 611, 5, 123, 0, 0,
		608, 609, 5, 101, 0, 0, 609, 611, 5, 26, 0, 0, 610, 604, 1, 0, 0, 0, 610,
		606, 1, 0, 0, 0, 610, 607, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 611, 615,
		1, 0, 0, 0, 612, 613, 5, 99, 0, 0, 613, 615, 3, 178, 89, 0, 614, 602, 1,
		0, 0, 0, 614, 612, 1, 0, 0, 0, 615, 618, 1, 0, 0, 0, 616, 614, 1, 0, 0,
		0, 616, 617, 1, 0, 0, 0, 617, 627, 1, 0, 0, 0, 618, 616, 1, 0, 0, 0, 619,
		621, 5, 102, 0, 0, 620, 619, 1, 0, 0, 0, 620, 621, 1, 0, 0, 0, 621, 622,
		1, 0, 0, 0, 622, 625, 5, 57, 0, 0, 623, 624, 5, 86, 0, 0, 624, 626, 7,
		7, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 628, 1, 0, 0,
		0, 627, 620, 1, 0, 0, 0, 627, 628, 1, 0, 0, 0, 628, 39, 1, 0, 0, 0, 629,
		630, 5, 107, 0, 0, 630, 631, 5, 48, 0, 0, 631, 632, 7, 8, 0, 0, 632, 41,
		1, 0, 0, 0, 633, 635, 5, 50, 0, 0, 634, 636, 7, 2, 0, 0, 635, 634, 1, 0,
		0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 641, 5, 138, 0,
		0, 638, 639, 5, 80, 0, 0, 639, 640, 5, 102, 0, 0, 640, 642, 5, 70, 0, 0,
		641, 638, 1, 0, 0, 0, 641, 642, 1, 0, 0, 0, 642, 646, 1, 0, 0, 0, 643,
		644, 3, 182, 91, 0, 644, 645, 5, 2, 0, 0, 645, 647, 1, 0, 0, 0, 646, 643,
		1, 0, 0, 0, 646, 647, 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 653, 3, 196,
		98, 0, 649, 654, 5, 37, 0, 0, 650, 654, 5, 28, 0, 0, 651, 652, 5, 89, 0,
		0, 652, 654, 5, 105, 0, 0, 653, 649, 1, 0, 0, 0, 653, 650, 1, 0, 0, 0,
		653, 651, 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 669, 1, 0, 0, 0, 655,
		670, 5, 59, 0, 0, 656, 670, 5, 88, 0, 0, 657, 667, 5, 141, 0, 0, 658, 659,
		5, 105, 0, 0, 659, 664, 3, 188, 94, 0, 660, 661, 5, 5, 0, 0, 661, 663,
		3, 188, 94, 0, 662, 660, 1, 0, 0, 0, 663, 666, 1, 0, 0, 0, 664, 662, 1,
		0, 0, 0, 664, 665, 1, 0, 0, 0, 665, 668, 1, 0, 0, 0, 666, 664, 1, 0, 0,
		0, 667, 658, 1, 0, 0, 0, 667, 668, 1, 0, 0, 0, 668, 670, 1, 0, 0, 0, 669,
		655, 1, 0, 0, 0, 669, 656, 1, 0, 0, 0, 669, 657, 1, 0, 0, 0, 670, 671,
		1, 0, 0, 0, 671, 672, 5, 107, 0, 0, 672, 676, 3, 184, 92, 0, 673, 674,
		5, 73, 0, 0, 674, 675, 5, 64, 0, 0, 675, 677, 5, 127, 0, 0, 676, 673, 1,
		0, 0, 0, 676, 677, 1, 0, 0, 0, 677, 680, 1, 0, 0, 0, 678, 679, 5, 147,
		0, 0, 679, 681, 3, 64, 32, 0, 680, 678, 1, 0, 0, 0, 680, 681, 1, 0, 0,
		0, 681, 682, 1, 0, 0, 0, 682, 691, 5, 38, 0, 0, 683, 688, 3, 104, 52, 0,
		684, 688, 3, 70, 35, 0, 685, 688, 3, 56, 28, 0, 686, 688, 3, 82, 41, 0,
		687, 683, 1, 0, 0, 0, 687, 684, 1, 0, 0, 0, 687, 685, 1, 0, 0, 0, 687,
		686, 1, 0, 0, 0, 688, 689, 1, 0, 0, 0, 689, 690, 5, 1, 0, 0, 690, 692,
		1, 0, 0, 0, 691, 687, 1, 0, 0, 0, 692, 693, 1, 0, 0, 0, 693, 691, 1, 0,
		0, 0, 693, 694, 1, 0, 0, 0, 694, 695, 1, 0, 0, 0, 695, 696, 5, 66, 0, 0,
		696, 43, 1, 0, 0, 0, 697, 699, 5, 50, 0, 0, 698, 700, 7, 2, 0, 0, 699,
		698, 1, 0, 0, 0, 699, 700, 1, 0, 0, 0, 700, 701, 1, 0, 0, 0, 701, 705,
		5, 145, 0, 0, 702, 703, 5, 80, 0, 0, 703, 704, 5, 102, 0, 0, 704, 706,
		5, 70, 0, 0, 705, 702, 1, 0, 0, 0, 705, 706, 1, 0, 0, 0, 706, 710, 1, 0,
		0, 0, 707, 708, 3, 182, 91, 0, 708, 709, 5, 2, 0, 0, 709, 711, 1, 0, 0,
		0, 710, 707, 1, 0, 0, 0, 710, 711, 1, 0, 0, 0, 711, 712, 1, 0, 0, 0, 712,
		724, 3, 198, 99, 0, 713, 714, 5, 3, 0, 0, 714, 719, 3, 188, 94, 0, 715,
		716, 5, 5, 0, 0, 716, 718, 3, 188, 94, 0, 717, 715, 1, 0, 0, 0, 718, 721,
		1, 0, 0, 0, 719, 717, 1, 0, 0, 0, 719, 720, 1, 0, 0, 0, 720, 722, 1, 0,
		0, 0, 721, 719, 1, 0, 0, 0, 722, 723, 5, 4, 0, 0, 723, 725, 1, 0, 0, 0,
		724, 713, 1, 0, 0, 0, 724, 725, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, 726,
		727, 5, 33, 0, 0, 727, 728, 3, 82, 41, 0, 728, 45, 1, 0, 0, 0, 729, 730,
		5, 50, 0, 0, 730, 731, 5, 146, 0, 0, 731, 735, 5, 132, 0, 0, 732, 733,
		5, 80, 0, 0, 733, 734, 5, 102, 0, 0, 734, 736, 5, 70, 0, 0, 735, 732, 1,
		0, 0, 0, 735, 736, 1, 0, 0, 0, 736, 740, 1, 0, 0, 0, 737, 738, 3, 182,
		91, 0, 738, 739, 5, 2, 0, 0, 739, 741, 1, 0, 0, 0, 740, 737, 1, 0, 0, 0,
		740, 741, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 742, 743, 3, 184, 92, 0, 743,
		744, 5, 142, 0, 0, 744, 756, 3, 200, 100, 0, 745, 746, 5, 3, 0, 0, 746,
		751, 3, 172, 86, 0, 747, 748, 5, 5, 0, 0, 748, 750, 3, 172, 86, 0, 749,
		747, 1, 0, 0, 0, 750, 753, 1, 0, 0, 0, 751, 749, 1, 0, 0, 0, 751, 752,
		1, 0, 0, 0, 752, 754, 1, 0, 0, 0, 753, 751, 1, 0, 0, 0, 754, 755, 5, 4,
		0, 0, 755, 757, 1, 0, 0, 0, 756, 745, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0,
		757, 47, 1, 0, 0, 0, 758, 760, 5, 149, 0, 0, 759, 761, 5, 116, 0, 0, 760,
		759, 1, 0, 0, 0, 760, 761, 1, 0, 0, 0, 761, 762, 1, 0, 0, 0, 762, 763,
		3, 50, 25, 0, 763, 764, 5, 33, 0, 0, 764, 765, 5, 3, 0, 0, 765, 766, 3,
		82, 41, 0, 766, 776, 5, 4, 0, 0, 767, 768, 5, 5, 0, 0, 768, 769, 3, 50,
		25, 0, 769, 770, 5, 33, 0, 0, 770, 771, 5, 3, 0, 0, 771, 772, 3, 82, 41,
		0, 772, 773, 5, 4, 0, 0, 773, 775, 1, 0, 0, 0, 774, 767, 1, 0, 0, 0, 775,
		778, 1, 0, 0, 0, 776, 774, 1, 0, 0, 0, 776, 777, 1, 0, 0, 0, 777, 49, 1,
		0, 0, 0, 778, 776, 1, 0, 0, 0, 779, 791, 3, 184, 92, 0, 780, 781, 5, 3,
		0, 0, 781, 786, 3, 188, 94, 0, 782, 783, 5, 5, 0, 0, 783, 785, 3, 188,
		94, 0, 784, 782, 1, 0, 0, 0, 785, 788, 1, 0, 0, 0, 786, 784, 1, 0, 0, 0,
		786, 787, 1, 0, 0, 0, 787, 789, 1, 0, 0, 0, 788, 786, 1, 0, 0, 0, 789,
		790, 5, 4, 0, 0, 790, 792, 1, 0, 0, 0, 791, 780, 1, 0, 0, 0, 791, 792,
		1, 0, 0, 0, 792, 51, 1, 0, 0, 0, 793, 794, 3, 50, 25, 0, 794, 795, 5, 33,
		0, 0, 795, 796, 5, 3, 0, 0, 796, 797, 3, 164, 82, 0, 797, 799, 5, 139,
		0, 0, 798, 800, 5, 29, 0, 0, 799, 798, 1, 0, 0, 0, 799, 800, 1, 0, 0, 0,
		800, 801, 1, 0, 0, 0, 801, 802, 3, 166, 83, 0, 802, 803, 5, 4, 0, 0, 803,
		53, 1, 0, 0, 0, 804, 816, 3, 184, 92, 0, 805, 806, 5, 3, 0, 0, 806, 811,
		3, 188, 94, 0, 807, 808, 5, 5, 0, 0, 808, 810, 3, 188, 94, 0, 809, 807,
		1, 0, 0, 0, 810, 813, 1, 0, 0, 0, 811, 809, 1, 0, 0, 0, 811, 812, 1, 0,
		0, 0, 812, 814, 1, 0, 0, 0, 813, 811, 1, 0, 0, 0, 814, 815, 5, 4, 0, 0,
		815, 817, 1, 0, 0, 0, 816, 805, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817,
		818, 1, 0, 0, 0, 818, 819, 5, 33, 0, 0, 819, 820, 5, 3, 0, 0, 820, 821,
		3, 82, 41, 0, 821, 822, 5, 4, 0, 0, 822, 55, 1, 0, 0, 0, 823, 825, 3, 48,
		24, 0, 824, 823, 1, 0, 0, 0, 824, 825, 1, 0, 0, 0, 825, 826, 1, 0, 0, 0,
		826, 827, 5, 59, 0, 0, 827, 828, 5, 75, 0, 0, 828, 831, 3, 114, 57, 0,
		829, 830, 5, 148, 0, 0, 830, 832, 3, 64, 32, 0, 831, 829, 1, 0, 0, 0, 831,
		832, 1, 0, 0, 0, 832, 834, 1, 0, 0, 0, 833, 835, 3, 72, 36, 0, 834, 833,
		1, 0, 0, 0, 834, 835, 1, 0, 0, 0, 835, 57, 1, 0, 0, 0, 836, 838, 3, 48,
		24, 0, 837, 836, 1, 0, 0, 0, 837, 838, 1, 0, 0, 0, 838, 839, 1, 0, 0, 0,
		839, 840, 5, 59, 0, 0, 840, 841, 5, 75, 0, 0, 841, 844, 3, 114, 57, 0,
		842, 843, 5, 148, 0, 0, 843, 845, 3, 64, 32, 0, 844, 842, 1, 0, 0, 0, 844,
		845, 1, 0, 0, 0, 845, 847, 1, 0, 0, 0, 846, 848, 3, 72, 36, 0, 847, 846,
		1, 0, 0, 0, 847, 848, 1, 0, 0, 0, 848, 853, 1, 0, 0, 0, 849, 851, 3, 136,
		68, 0, 850, 849, 1, 0, 0, 0, 850, 851, 1, 0, 0, 0, 851, 852, 1, 0, 0, 0,
		852, 854, 3, 138, 69, 0, 853, 850, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854,
		59, 1, 0, 0, 0, 855, 857, 5, 61, 0, 0, 856, 858, 5, 55, 0, 0, 857, 856,
		1, 0, 0, 0, 857, 858, 1, 0, 0, 0, 858, 859, 1, 0, 0, 0, 859, 860, 3, 182,
		91, 0, 860, 61, 1, 0, 0, 0, 861, 862, 5, 63, 0, 0, 862, 865, 7, 9, 0, 0,
		863, 864, 5, 80, 0, 0, 864, 866, 5, 70, 0, 0, 865, 863, 1, 0, 0, 0, 865,
		866, 1, 0, 0, 0, 866, 870, 1, 0, 0, 0, 867, 868, 3, 182, 91, 0, 868, 869,
		5, 2, 0, 0, 869, 871, 1, 0, 0, 0, 870, 867, 1, 0, 0, 0, 870, 871, 1, 0,
		0, 0, 871, 872, 1, 0, 0, 0, 872, 873, 3, 224, 112, 0, 873, 63, 1, 0, 0,
		0, 874, 875, 6, 32, -1, 0, 875, 963, 3, 68, 34, 0, 876, 963, 5, 187, 0,
		0, 877, 878, 3, 182, 91, 0, 878, 879, 5, 2, 0, 0, 879, 881, 1, 0, 0, 0,
		880, 877, 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 881, 882, 1, 0, 0, 0, 882,
		883, 3, 184, 92, 0, 883, 884, 5, 2, 0, 0, 884, 886, 1, 0, 0, 0, 885, 880,
		1, 0, 0, 0, 885, 886, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 963, 3, 188,
		94, 0, 888, 889, 3, 168, 84, 0, 889, 890, 3, 64, 32, 21, 890, 963, 1, 0,
		0, 0, 891, 892, 3, 180, 90, 0, 892, 905, 5, 3, 0, 0, 893, 895, 5, 62, 0,
		0, 894, 893, 1, 0, 0, 0, 894, 895, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896,
		901, 3, 64, 32, 0, 897, 898, 5, 5, 0, 0, 898, 900, 3, 64, 32, 0, 899, 897,
		1, 0, 0, 0, 900, 903, 1, 0, 0, 0, 901, 899, 1, 0, 0, 0, 901, 902, 1, 0,
		0, 0, 902, 906, 1, 0, 0, 0, 903, 901, 1, 0, 0, 0, 904, 906, 5, 7, 0, 0,
		905, 894, 1, 0, 0, 0, 905, 904, 1, 0, 0, 0, 905, 906, 1, 0, 0, 0, 906,
		907, 1, 0, 0, 0, 907, 909, 5, 4, 0, 0, 908, 910, 3, 118, 59, 0, 909, 908,
		1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 912, 1, 0, 0, 0, 911, 913, 3, 122,
		61, 0, 912, 911, 1, 0, 0, 0, 912, 913, 1, 0, 0, 0, 913, 963, 1, 0, 0, 0,
		914, 915, 5, 3, 0, 0, 915, 920, 3, 64, 32, 0, 916, 917, 5, 5, 0, 0, 917,
		919, 3, 64, 32, 0, 918, 916, 1, 0, 0, 0, 919, 922, 1, 0, 0, 0, 920, 918,
		1, 0, 0, 0, 920, 921, 1, 0, 0, 0, 921, 923, 1, 0, 0, 0, 922, 920, 1, 0,
		0, 0, 923, 924, 5, 4, 0, 0, 924, 963, 1, 0, 0, 0, 925, 926, 5, 43, 0, 0,
		926, 927, 5, 3, 0, 0, 927, 928, 3, 64, 32, 0, 928, 929, 5, 33, 0, 0, 929,
		930, 3, 30, 15, 0, 930, 931, 5, 4, 0, 0, 931, 963, 1, 0, 0, 0, 932, 934,
		5, 102, 0, 0, 933, 932, 1, 0, 0, 0, 933, 934, 1, 0, 0, 0, 934, 935, 1,
		0, 0, 0, 935, 937, 5, 70, 0, 0, 936, 933, 1, 0, 0, 0, 936, 937, 1, 0, 0,
		0, 937, 938, 1, 0, 0, 0, 938, 939, 5, 3, 0, 0, 939, 940, 3, 82, 41, 0,
		940, 941, 5, 4, 0, 0, 941, 963, 1, 0, 0, 0, 942, 944, 5, 42, 0, 0, 943,
		945, 3, 64, 32, 0, 944, 943, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 951,
		1, 0, 0, 0, 946, 947, 5, 147, 0, 0, 947, 948, 3, 64, 32, 0, 948, 949, 5,
		135, 0, 0, 949, 950, 3, 64, 32, 0, 950, 952, 1, 0, 0, 0, 951, 946, 1, 0,
		0, 0, 952, 953, 1, 0, 0, 0, 953, 951, 1, 0, 0, 0, 953, 954, 1, 0, 0, 0,
		954, 957, 1, 0, 0, 0, 955, 956, 5, 65, 0, 0, 956, 958, 3, 64, 32, 0, 957,
		955, 1, 0, 0, 0, 957, 958, 1, 0, 0, 0, 958, 959, 1, 0, 0, 0, 959, 960,
		5, 66, 0, 0, 960, 963, 1, 0, 0, 0, 961, 963, 3, 66, 33, 0, 962, 874, 1,
		0, 0, 0, 962, 876, 1, 0, 0, 0, 962, 885, 1, 0, 0, 0, 962, 888, 1, 0, 0,
		0, 962, 891, 1, 0, 0, 0, 962, 914, 1, 0, 0, 0, 962, 925, 1, 0, 0, 0, 962,
		936, 1, 0, 0, 0, 962, 942, 1, 0, 0, 0, 962, 961, 1, 0, 0, 0, 963, 1083,
		1, 0, 0, 0, 964, 965, 10, 20, 0, 0, 965, 966, 5, 11, 0, 0, 966, 1082, 3,
		64, 32, 21, 967, 968, 10, 19, 0, 0, 968, 969, 7, 10, 0, 0, 969, 1082, 3,
		64, 32, 20, 970, 971, 10, 18, 0, 0, 971, 972, 7, 4, 0, 0, 972, 1082, 3,
		64, 32, 19, 973, 974, 10, 17, 0, 0, 974, 975, 7, 11, 0, 0, 975, 1082, 3,
		64, 32, 18, 976, 977, 10, 16, 0, 0, 977, 978, 7, 12, 0, 0, 978, 1082, 3,
		64, 32, 17, 979, 992, 10, 15, 0, 0, 980, 993, 5, 6, 0, 0, 981, 993, 5,
		22, 0, 0, 982, 993, 5, 23, 0, 0, 983, 993, 5, 24, 0, 0, 984, 993, 5, 92,
		0, 0, 985, 986, 5, 92, 0, 0, 986, 993, 5, 102, 0, 0, 987, 993, 5, 83, 0,
		0, 988, 993, 5, 97, 0, 0, 989, 993, 5, 77, 0, 0, 990, 993, 5, 99, 0, 0,
		991, 993, 5, 118, 0, 0, 992, 980, 1, 0, 0, 0, 992, 981, 1, 0, 0, 0, 992,
		982, 1, 0, 0, 0, 992, 983, 1, 0, 0, 0, 992, 984, 1, 0, 0, 0, 992, 985,
		1, 0, 0, 0, 992, 987, 1, 0, 0, 0, 992, 988, 1, 0, 0, 0, 992, 989, 1, 0,
		0, 0, 992, 990, 1, 0, 0, 0, 992, 991, 1, 0, 0, 0, 993, 994, 1, 0, 0, 0,
		994, 1082, 3, 64, 32, 16, 995, 996, 10, 14, 0, 0, 996, 997, 5, 32, 0, 0,
		997, 1082, 3, 64, 32, 15, 998, 999, 10, 13, 0, 0, 999, 1000, 5, 108, 0,
		0, 1000, 1082, 3, 64, 32, 14, 1001, 1002, 10, 6, 0, 0, 1002, 1004, 5, 92,
		0, 0, 1003, 1005, 5, 102, 0, 0, 1004, 1003, 1, 0, 0, 0, 1004, 1005, 1,
		0, 0, 0, 1005, 1006, 1, 0, 0, 0, 1006, 1082, 3, 64, 32, 7, 1007, 1009,
		10, 5, 0, 0, 1008, 1010, 5, 102, 0, 0, 1009, 1008, 1, 0, 0, 0, 1009, 1010,
		1, 0, 0, 0, 1010, 1011, 1, 0, 0, 0, 1011, 1012, 5, 39, 0, 0, 1012, 1013,
		3, 64, 32, 0, 1013, 1014, 5, 32, 0, 0, 1014, 1015, 3, 64, 32, 6, 1015,
		1082, 1, 0, 0, 0, 1016, 1017, 10, 9, 0, 0, 1017, 1018, 5, 45, 0, 0, 1018,
		1082, 3, 190, 95, 0, 1019, 1021, 10, 8, 0, 0, 1020, 1022, 5, 102, 0, 0,
		1021, 1020, 1, 0, 0, 0, 1021, 1022, 1, 0, 0, 0, 1022, 1023, 1, 0, 0, 0,
		1023, 1024, 7, 13, 0, 0, 1024, 1027, 3, 64, 32, 0, 1025, 1026, 5, 67, 0,
		0, 1026, 1028, 3, 64, 32, 0, 1027, 1025, 1, 0, 0, 0, 1027, 1028, 1, 0,
		0, 0, 1028, 1082, 1, 0, 0, 0, 1029, 1034, 10, 7, 0, 0, 1030, 1035, 5, 93,
		0, 0, 1031, 1035, 5, 103, 0, 0, 1032, 1033, 5, 102, 0, 0, 1033, 1035, 5,
		104, 0, 0, 1034, 1030, 1, 0, 0, 0, 1034, 1031, 1, 0, 0, 0, 1034, 1032,
		1, 0, 0, 0, 1035, 1082, 1, 0, 0, 0, 1036, 1038, 10, 4, 0, 0, 1037, 1039,
		5, 102, 0, 0, 1038, 1037, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1040,
		1, 0, 0, 0, 1040, 1079, 5, 83, 0, 0, 1041, 1051, 5, 3, 0, 0, 1042, 1052,
		3, 82, 41, 0, 1043, 1048, 3, 64, 32, 0, 1044, 1045, 5, 5, 0, 0, 1045, 1047,
		3, 64, 32, 0, 1046, 1044, 1, 0, 0, 0, 1047, 1050, 1, 0, 0, 0, 1048, 1046,
		1, 0, 0, 0, 1048, 1049, 1, 0, 0, 0, 1049, 1052, 1, 0, 0, 0, 1050, 1048,
		1, 0, 0, 0, 1051, 1042, 1, 0, 0, 0, 1051, 1043, 1, 0, 0, 0, 1051, 1052,
		1, 0, 0, 0, 1052, 1053, 1, 0, 0, 0, 1053, 1080, 5, 4, 0, 0, 1054, 1055,
		3, 182, 91, 0, 1055, 1056, 5, 2, 0, 0, 1056, 1058, 1, 0, 0, 0, 1057, 1054,
		1, 0, 0, 0, 1057, 1058, 1, 0, 0, 0, 1058, 1059, 1, 0, 0, 0, 1059, 1080,
		3, 184, 92, 0, 1060, 1061, 3, 182, 91, 0, 1061, 1062, 5, 2, 0, 0, 1062,
		1064, 1, 0, 0, 0, 1063, 1060, 1, 0, 0, 0, 1063, 1064, 1, 0, 0, 0, 1064,
		1065, 1, 0, 0, 0, 1065, 1066, 3, 222, 111, 0, 1066, 1075, 5, 3, 0, 0, 1067,
		1072, 3, 64, 32, 0, 1068, 1069, 5, 5, 0, 0, 1069, 1071, 3, 64, 32, 0, 1070,
		1068, 1, 0, 0, 0, 1071, 1074, 1, 0, 0, 0, 1072, 1070, 1, 0, 0, 0, 1072,
		1073, 1, 0, 0, 0, 1073, 1076, 1, 0, 0, 0, 1074, 1072, 1, 0, 0, 0, 1075,
		1067, 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1077, 1, 0, 0, 0, 1077,
		1078, 5, 4, 0, 0, 1078, 1080, 1, 0, 0, 0, 1079, 1041, 1, 0, 0, 0, 1079,
		1057, 1, 0, 0, 0, 1079, 1063, 1, 0, 0, 0, 1080, 1082, 1, 0, 0, 0, 1081,
		964, 1, 0, 0, 0, 1081, 967, 1, 0, 0, 0, 1081, 970, 1, 0, 0, 0, 1081, 973,
		1, 0, 0, 0, 1081, 976, 1, 0, 0, 0, 1081, 979, 1, 0, 0, 0, 1081, 995, 1,
		0, 0, 0, 1081, 998, 1, 0, 0, 0, 1081, 1001, 1, 0, 0, 0, 1081, 1007, 1,
		0, 0, 0, 1081, 1016, 1, 0, 0, 0, 1081, 1019, 1, 0, 0, 0, 1081, 1029, 1,
		0, 0, 0, 1081, 1036, 1, 0, 0, 0, 1082, 1085, 1, 0, 0, 0, 1083, 1081, 1,
		0, 0, 0, 1083, 1084, 1, 0, 0, 0, 1084, 65, 1, 0, 0, 0, 1085, 1083, 1, 0,
		0, 0, 1086, 1087, 5, 115, 0, 0, 1087, 1092, 5, 3, 0, 0, 1088, 1093, 5,
		81, 0, 0, 1089, 1090, 7, 14, 0, 0, 1090, 1091, 5, 5, 0, 0, 1091, 1093,
		3, 170, 85, 0, 1092, 1088, 1, 0, 0, 0, 1092, 1089, 1, 0, 0, 0, 1093, 1094,
		1, 0, 0, 0, 1094, 1095, 5, 4, 0, 0, 1095, 67, 1, 0, 0, 0, 1096, 1097, 7,
		15, 0, 0, 1097, 69, 1, 0, 0, 0, 1098, 1100, 3, 48, 24, 0, 1099, 1098, 1,
		0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, 1106, 1, 0, 0, 0, 1101, 1107, 5,
		88, 0, 0, 1102, 1107, 5, 122, 0, 0, 1103, 1104, 5, 88, 0, 0, 1104, 1105,
		5, 108, 0, 0, 1105, 1107, 7, 8, 0, 0, 1106, 1101, 1, 0, 0, 0, 1106, 1102,
		1, 0, 0, 0, 1106, 1103, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1112,
		5, 91, 0, 0, 1109, 1110, 3, 182, 91, 0, 1110, 1111, 5, 2, 0, 0, 1111, 1113,
		1, 0, 0, 0, 1112, 1109, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1114,
		1, 0, 0, 0, 1114, 1117, 3, 184, 92, 0, 1115, 1116, 5, 33, 0, 0, 1116, 1118,
		3, 206, 103, 0, 1117, 1115, 1, 0, 0, 0, 1117, 1118, 1, 0, 0, 0, 1118, 1130,
		1, 0, 0, 0, 1119, 1120, 5, 3, 0, 0, 1120, 1125, 3, 188, 94, 0, 1121, 1122,
		5, 5, 0, 0, 1122, 1124, 3, 188, 94, 0, 1123, 1121, 1, 0, 0, 0, 1124, 1127,
		1, 0, 0, 0, 1125, 1123, 1, 0, 0, 0, 1125, 1126, 1, 0, 0, 0, 1126, 1128,
		1, 0, 0, 0, 1127, 1125, 1, 0, 0, 0, 1128, 1129, 5, 4, 0, 0, 1129, 1131,
		1, 0, 0, 0, 1130, 1119, 1, 0, 0, 0, 1130, 1131, 1, 0, 0, 0, 1131, 1168,
		1, 0, 0, 0, 1132, 1133, 5, 144, 0, 0, 1133, 1134, 5, 3, 0, 0, 1134, 1139,
		3, 64, 32, 0, 1135, 1136, 5, 5, 0, 0, 1136, 1138, 3, 64, 32, 0, 1137, 1135,
		1, 0, 0, 0, 1138, 1141, 1, 0, 0, 0, 1139, 1137, 1, 0, 0, 0, 1139, 1140,
		1, 0, 0, 0, 1140, 1142, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1142, 1157,
		5, 4, 0, 0, 1143, 1144, 5, 5, 0, 0, 1144, 1145, 5, 3, 0, 0, 1145, 1150,
		3, 64, 32, 0, 1146, 1147, 5, 5, 0, 0, 1147, 1149, 3, 64, 32, 0, 1148, 1146,
		1, 0, 0, 0, 1149, 1152, 1, 0, 0, 0, 1150, 1148, 1, 0, 0, 0, 1150, 1151,
		1, 0, 0, 0, 1151, 1153, 1, 0, 0, 0, 1152, 1150, 1, 0, 0, 0, 1153, 1154,
		5, 4, 0, 0, 1154, 1156, 1, 0, 0, 0, 1155, 1143, 1, 0, 0, 0, 1156, 1159,
		1, 0, 0, 0, 1157, 1155, 1, 0, 0, 0, 1157, 1158, 1, 0, 0, 0, 1158, 1162,
		1, 0, 0, 0, 1159, 1157, 1, 0, 0, 0, 1160, 1162, 3, 82, 41, 0, 1161, 1132,
		1, 0, 0, 0, 1161, 1160, 1, 0, 0, 0, 1162, 1164, 1, 0, 0, 0, 1163, 1165,
		3, 74, 37, 0, 1164, 1163, 1, 0, 0, 0, 1164, 1165, 1, 0, 0, 0, 1165, 1169,
		1, 0, 0, 0, 1166, 1167, 5, 56, 0, 0, 1167, 1169, 5, 144, 0, 0, 1168, 1161,
		1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1172,
		3, 72, 36, 0, 1171, 1170, 1, 0, 0, 0, 1171, 1172, 1, 0, 0, 0, 1172, 71,
		1, 0, 0, 0, 1173, 1174, 5, 124, 0, 0, 1174, 1179, 3, 96, 48, 0, 1175, 1176,
		5, 5, 0, 0, 1176, 1178, 3, 96, 48, 0, 1177, 1175, 1, 0, 0, 0, 1178, 1181,
		1, 0, 0, 0, 1179, 1177, 1, 0, 0, 0, 1179, 1180, 1, 0, 0, 0, 1180, 73, 1,
		0, 0, 0, 1181, 1179, 1, 0, 0, 0, 1182, 1183, 5, 107, 0, 0, 1183, 1198,
		5, 48, 0, 0, 1184, 1185, 5, 3, 0, 0, 1185, 1190, 3, 24, 12, 0, 1186, 1187,
		5, 5, 0, 0, 1187, 1189, 3, 24, 12, 0, 1188, 1186, 1, 0, 0, 0, 1189, 1192,
		1, 0, 0, 0, 1190, 1188, 1, 0, 0, 0, 1190, 1191, 1, 0, 0, 0, 1191, 1193,
		1, 0, 0, 0, 1192, 1190, 1, 0, 0, 0, 1193, 1196, 5, 4, 0, 0, 1194, 1195,
		5, 148, 0, 0, 1195, 1197, 3, 64, 32, 0, 1196, 1194, 1, 0, 0, 0, 1196, 1197,
		1, 0, 0, 0, 1197, 1199, 1, 0, 0, 0, 1198, 1184, 1, 0, 0, 0, 1198, 1199,
		1, 0, 0, 0, 1199, 1200, 1, 0, 0, 0, 1200, 1227, 5, 183, 0, 0, 1201, 1228,
		5, 184, 0, 0, 1202, 1203, 5, 141, 0, 0, 1203, 1206, 5, 131, 0, 0, 1204,
		1207, 3, 188, 94, 0, 1205, 1207, 3, 110, 55, 0, 1206, 1204, 1, 0, 0, 0,
		1206, 1205, 1, 0, 0, 0, 1207, 1208, 1, 0, 0, 0, 1208, 1209, 5, 6, 0, 0,
		1209, 1220, 3, 64, 32, 0, 1210, 1213, 5, 5, 0, 0, 1211, 1214, 3, 188, 94,
		0, 1212, 1214, 3, 110, 55, 0, 1213, 1211, 1, 0, 0, 0, 1213, 1212, 1, 0,
		0, 0, 1214, 1215, 1, 0, 0, 0, 1215, 1216, 5, 6, 0, 0, 1216, 1217, 3, 64,
		32, 0, 1217, 1219, 1, 0, 0, 0, 1218, 1210, 1, 0, 0, 0, 1219, 1222, 1, 0,
		0, 0, 1220, 1218, 1, 0, 0, 0, 1220, 1221, 1, 0, 0, 0, 1221, 1225, 1, 0,
		0, 0, 1222, 1220, 1, 0, 0, 0, 1223, 1224, 5, 148, 0, 0, 1224, 1226, 3,
		64, 32, 0, 1225, 1223, 1, 0, 0, 0, 1225, 1226, 1, 0, 0, 0, 1226, 1228,
		1, 0, 0, 0, 1227, 1201, 1, 0, 0, 0, 1227, 1202, 1, 0, 0, 0, 1228, 75, 1,
		0, 0, 0, 1229, 1233, 5, 112, 0, 0, 1230, 1231, 3, 182, 91, 0, 1231, 1232,
		5, 2, 0, 0, 1232, 1234, 1, 0, 0, 0, 1233, 1230, 1, 0, 0, 0, 1233, 1234,
		1, 0, 0, 0, 1234, 1235, 1, 0, 0, 0, 1235, 1242, 3, 202, 101, 0, 1236, 1237,
		5, 6, 0, 0, 1237, 1243, 3, 78, 39, 0, 1238, 1239, 5, 3, 0, 0, 1239, 1240,
		3, 78, 39, 0, 1240, 1241, 5, 4, 0, 0, 1241, 1243, 1, 0, 0, 0, 1242, 1236,
		1, 0, 0, 0, 1242, 1238, 1, 0, 0, 0, 1242, 1243, 1, 0, 0, 0, 1243, 77, 1,
		0, 0, 0, 1244, 1248, 3, 34, 17, 0, 1245, 1248, 3, 178, 89, 0, 1246, 1248,
		5, 188, 0, 0, 1247, 1244, 1, 0, 0, 0, 1247, 1245, 1, 0, 0, 0, 1247, 1246,
		1, 0, 0, 0, 1248, 79, 1, 0, 0, 0, 1249, 1260, 5, 119, 0, 0, 1250, 1261,
		3, 190, 95, 0, 1251, 1252, 3, 182, 91, 0, 1252, 1253, 5, 2, 0, 0, 1253,
		1255, 1, 0, 0, 0, 1254, 1251, 1, 0, 0, 0, 1254, 1255, 1, 0, 0, 0, 1255,
		1258, 1, 0, 0, 0, 1256, 1259, 3, 184, 92, 0, 1257, 1259, 3, 194, 97, 0,
		1258, 1256, 1, 0, 0, 0, 1258, 1257, 1, 0, 0, 0, 1259, 1261, 1, 0, 0, 0,
		1260, 1250, 1, 0, 0, 0, 1260, 1254, 1, 0, 0, 0, 1260, 1261, 1, 0, 0, 0,
		1261, 81, 1, 0, 0, 0, 1262, 1264, 3, 134, 67, 0, 1263, 1262, 1, 0, 0, 0,
		1263, 1264, 1, 0, 0, 0, 1264, 1265, 1, 0, 0, 0, 1265, 1271, 3, 86, 43,
		0, 1266, 1267, 3, 102, 51, 0, 1267, 1268, 3, 86, 43, 0, 1268, 1270, 1,
		0, 0, 0, 1269, 1266, 1, 0, 0, 0, 1270, 1273, 1, 0, 0, 0, 1271, 1269, 1,
		0, 0, 0, 1271, 1272, 1, 0, 0, 0, 1272, 1275, 1, 0, 0, 0, 1273, 1271, 1,
		0, 0, 0, 1274, 1276, 3, 136, 68, 0, 1275, 1274, 1, 0, 0, 0, 1275, 1276,
		1, 0, 0, 0, 1276, 1278, 1, 0, 0, 0, 1277, 1279, 3, 138, 69, 0, 1278, 1277,
		1, 0, 0, 0, 1278, 1279, 1, 0, 0, 0, 1279, 83, 1, 0, 0, 0, 1280, 1288, 3,
		94, 47, 0, 1281, 1282, 3, 98, 49, 0, 1282, 1284, 3, 94, 47, 0, 1283, 1285,
		3, 100, 50, 0, 1284, 1283, 1, 0, 0, 0, 1284, 1285, 1, 0, 0, 0, 1285, 1287,
		1, 0, 0, 0, 1286, 1281, 1, 0, 0, 0, 1287, 1290, 1, 0, 0, 0, 1288, 1286,
		1, 0, 0, 0, 1288, 1289, 1, 0, 0, 0, 1289, 85, 1, 0, 0, 0, 1290, 1288, 1,
		0, 0, 0, 1291, 1293, 5, 130, 0, 0, 1292, 1294, 7, 16, 0, 0, 1293, 1292,
		1, 0, 0, 0, 1293, 1294, 1, 0, 0, 0, 1294, 1295, 1, 0, 0, 0, 1295, 1300,
		3, 96, 48, 0, 1296, 1297, 5, 5, 0, 0, 1297, 1299, 3, 96, 48, 0, 1298, 1296,
		1, 0, 0, 0, 1299, 1302, 1, 0, 0, 0, 1300, 1298, 1, 0, 0, 0, 1300, 1301,
		1, 0, 0, 0, 1301, 1315, 1, 0, 0, 0, 1302, 1300, 1, 0, 0, 0, 1303, 1313,
		5, 75, 0, 0, 1304, 1309, 3, 94, 47, 0, 1305, 1306, 5, 5, 0, 0, 1306, 1308,
		3, 94, 47, 0, 1307, 1305, 1, 0, 0, 0, 1308, 1311, 1, 0, 0, 0, 1309, 1307,
		1, 0, 0, 0, 1309, 1310, 1, 0, 0, 0, 1310, 1314, 1, 0, 0, 0, 1311, 1309,
		1, 0, 0, 0, 1312, 1314, 3, 84, 42, 0, 1313, 1304, 1, 0, 0, 0, 1313, 1312,
		1, 0, 0, 0, 1314, 1316, 1, 0, 0, 0, 1315, 1303, 1, 0, 0, 0, 1315, 1316,
		1, 0, 0, 0, 1316, 1319, 1, 0, 0, 0, 1317, 1318, 5, 148, 0, 0, 1318, 1320,
		3, 64, 32, 0, 1319, 1317, 1, 0, 0, 0, 1319, 1320, 1, 0, 0, 0, 1320, 1335,
		1, 0, 0, 0, 1321, 1322, 5, 78, 0, 0, 1322, 1323, 5, 40, 0, 0, 1323, 1328,
		3, 64, 32, 0, 1324, 1325, 5, 5, 0, 0, 1325, 1327, 3, 64, 32, 0, 1326, 1324,
		1, 0, 0, 0, 1327, 1330, 1, 0, 0, 0, 1328, 1326, 1, 0, 0, 0, 1328, 1329,
		1, 0, 0, 0, 1329, 1333, 1, 0, 0, 0, 1330, 1328, 1, 0, 0, 0, 1331, 1332,
		5, 79, 0, 0, 1332, 1334, 3, 64, 32, 0, 1333, 1331, 1, 0, 0, 0, 1333, 1334,
		1, 0, 0, 0, 1334, 1336, 1, 0, 0, 0, 1335, 1321, 1, 0, 0, 0, 1335, 1336,
		1, 0, 0, 0, 1336, 1351, 1, 0, 0, 0, 1337, 1338, 5, 174, 0, 0, 1338, 1339,
		3, 210, 105, 0, 1339, 1340, 5, 33, 0, 0, 1340, 1348, 3, 120, 60, 0, 1341,
		1342, 5, 5, 0, 0, 1342, 1343, 3, 210, 105, 0, 1343, 1344, 5, 33, 0, 0,
		1344, 1345, 3, 120, 60, 0, 1345, 1347, 1, 0, 0, 0, 1346, 1341, 1, 0, 0,
		0, 1347, 1350, 1, 0, 0, 0, 1348, 1346, 1, 0, 0, 0, 1348, 1349, 1, 0, 0,
		0, 1349, 1352, 1, 0, 0, 0, 1350, 1348, 1, 0, 0, 0, 1351, 1337, 1, 0, 0,
		0, 1351, 1352, 1, 0, 0, 0, 1352, 1382, 1, 0, 0, 0, 1353, 1354, 5, 144,
		0, 0, 1354, 1355, 5, 3, 0, 0, 1355, 1360, 3, 64, 32, 0, 1356, 1357, 5,
		5, 0, 0, 1357, 1359, 3, 64, 32, 0, 1358, 1356, 1, 0, 0, 0, 1359, 1362,
		1, 0, 0, 0, 1360, 1358, 1, 0, 0, 0, 1360, 1361, 1, 0, 0, 0, 1361, 1363,
		1, 0, 0, 0, 1362, 1360, 1, 0, 0, 0, 1363, 1378, 5, 4, 0, 0, 1364, 1365,
		5, 5, 0, 0, 1365, 1366, 5, 3, 0, 0, 1366, 1371, 3, 64, 32, 0, 1367, 1368,
		5, 5, 0, 0, 1368, 1370, 3, 64, 32, 0, 1369, 1367, 1, 0, 0, 0, 1370, 1373,
		1, 0, 0, 0, 1371, 1369, 1, 0, 0, 0, 1371, 1372, 1, 0, 0, 0, 1372, 1374,
		1, 0, 0, 0, 1373, 1371, 1, 0, 0, 0, 1374, 1375, 5, 4, 0, 0, 1375, 1377,
		1, 0, 0, 0, 1376, 1364, 1, 0, 0, 0, 1377, 1380, 1, 0, 0, 0, 1378, 1376,
		1, 0, 0, 0, 1378, 1379, 1, 0, 0, 0, 1379, 1382, 1, 0, 0, 0, 1380, 1378,
		1, 0, 0, 0, 1381, 1291, 1, 0, 0, 0, 1381, 1353, 1, 0, 0, 0, 1382, 87, 1,
		0, 0, 0, 1383, 1384, 3, 82, 41, 0, 1384, 89, 1, 0, 0, 0, 1385, 1387, 3,
		134, 67, 0, 1386, 1385, 1, 0, 0, 0, 1386, 1387, 1, 0, 0, 0, 1387, 1388,
		1, 0, 0, 0, 1388, 1390, 3, 86, 43, 0, 1389, 1391, 3, 136, 68, 0, 1390,
		1389, 1, 0, 0, 0, 1390, 1391, 1, 0, 0, 0, 1391, 1393, 1, 0, 0, 0, 1392,
		1394, 3, 138, 69, 0, 1393, 1392, 1, 0, 0, 0, 1393, 1394, 1, 0, 0, 0, 1394,
		91, 1, 0, 0, 0, 1395, 1397, 3, 134, 67, 0, 1396, 1395, 1, 0, 0, 0, 1396,
		1397, 1, 0, 0, 0, 1397, 1398, 1, 0, 0, 0, 1398, 1408, 3, 86, 43, 0, 1399,
		1401, 5, 139, 0, 0, 1400, 1402, 5, 29, 0, 0, 1401, 1400, 1, 0, 0, 0, 1401,
		1402, 1, 0, 0, 0, 1402, 1406, 1, 0, 0, 0, 1403, 1406, 5, 90, 0, 0, 1404,
		1406, 5, 68, 0, 0, 1405, 1399, 1, 0, 0, 0, 1405, 1403, 1, 0, 0, 0, 1405,
		1404, 1, 0, 0, 0, 1406, 1407, 1, 0, 0, 0, 1407, 1409, 3, 86, 43, 0, 1408,
		1405, 1, 0, 0, 0, 1409, 1410, 1, 0, 0, 0, 1410, 1408, 1, 0, 0, 0, 1410,
		1411, 1, 0, 0, 0, 1411, 1413, 1, 0, 0, 0, 1412, 1414, 3, 136, 68, 0, 1413,
		1412, 1, 0, 0, 0, 1413, 1414, 1, 0, 0, 0, 1414, 1416, 1, 0, 0, 0, 1415,
		1417, 3, 138, 69, 0, 1416, 1415, 1, 0, 0, 0, 1416, 1417, 1, 0, 0, 0, 1417,
		93, 1, 0, 0, 0, 1418, 1419, 3, 182, 91, 0, 1419, 1420, 5, 2, 0, 0, 1420,
		1422, 1, 0, 0, 0, 1421, 1418, 1, 0, 0, 0, 1421, 1422, 1, 0, 0, 0, 1422,
		1423, 1, 0, 0, 0, 1423, 1428, 3, 184, 92, 0, 1424, 1426, 5, 33, 0, 0, 1425,
		1424, 1, 0, 0, 0, 1425, 1426, 1, 0, 0, 0, 1426, 1427, 1, 0, 0, 0, 1427,
		1429, 3, 206, 103, 0, 1428, 1425, 1, 0, 0, 0, 1428, 1429, 1, 0, 0, 0, 1429,
		1435, 1, 0, 0, 0, 1430, 1431, 5, 85, 0, 0, 1431, 1432, 5, 40, 0, 0, 1432,
		1436, 3, 194, 97, 0, 1433, 1434, 5, 102, 0, 0, 1434, 1436, 5, 85, 0, 0,
		1435, 1430, 1, 0, 0, 0, 1435, 1433, 1, 0, 0, 0, 1435, 1436, 1, 0, 0, 0,
		1436, 1483, 1, 0, 0, 0, 1437, 1438, 3, 182, 91, 0, 1438, 1439, 5, 2, 0,
		0, 1439, 1441, 1, 0, 0, 0, 1440, 1437, 1, 0, 0, 0, 1440, 1441, 1, 0, 0,
		0, 1441, 1442, 1, 0, 0, 0, 1442, 1443, 3, 222, 111, 0, 1443, 1444, 5, 3,
		0, 0, 1444, 1449, 3, 64, 32, 0, 1445, 1446, 5, 5, 0, 0, 1446, 1448, 3,
		64, 32, 0, 1447, 1445, 1, 0, 0, 0, 1448, 1451, 1, 0, 0, 0, 1449, 1447,
		1, 0, 0, 0, 1449, 1450, 1, 0, 0, 0, 1450, 1452, 1, 0, 0, 0, 1451, 1449,
		1, 0, 0, 0, 1452, 1457, 5, 4, 0, 0, 1453, 1455, 5, 33, 0, 0, 1454, 1453,
		1, 0, 0, 0, 1454, 1455, 1, 0, 0, 0, 1455, 1456, 1, 0, 0, 0, 1456, 1458,
		3, 206, 103, 0, 1457, 1454, 1, 0, 0, 0, 1457, 1458, 1, 0, 0, 0, 1458, 1483,
		1, 0, 0, 0, 1459, 1469, 5, 3, 0, 0, 1460, 1465, 3, 94, 47, 0, 1461, 1462,
		5, 5, 0, 0, 1462, 1464, 3, 94, 47, 0, 1463, 1461, 1, 0, 0, 0, 1464, 1467,
		1, 0, 0, 0, 1465, 1463, 1, 0, 0, 0, 1465, 1466, 1, 0, 0, 0, 1466, 1470,
		1, 0, 0, 0, 1467, 1465, 1, 0, 0, 0, 1468, 1470, 3, 84, 42, 0, 1469, 1460,
		1, 0, 0, 0, 1469, 1468, 1, 0, 0, 0, 1470, 1471, 1, 0, 0, 0, 1471, 1472,
		5, 4, 0, 0, 1472, 1483, 1, 0, 0, 0, 1473, 1474, 5, 3, 0, 0, 1474, 1475,
		3, 82, 41, 0, 1475, 1480, 5, 4, 0, 0, 1476, 1478, 5, 33, 0, 0, 1477, 1476,
		1, 0, 0, 0, 1477, 1478, 1, 0, 0, 0, 1478, 1479, 1, 0, 0, 0, 1479, 1481,
		3, 206, 103, 0, 1480, 1477, 1, 0, 0, 0, 1480, 1481, 1, 0, 0, 0, 1481, 1483,
		1, 0, 0, 0, 1482, 1421, 1, 0, 0, 0, 1482, 1440, 1, 0, 0, 0, 1482, 1459,
		1, 0, 0, 0, 1482, 1473, 1, 0, 0, 0, 1483, 95, 1, 0, 0, 0, 1484, 1497, 5,
		7, 0, 0, 1485, 1486, 3, 184, 92, 0, 1486, 1487, 5, 2, 0, 0, 1487, 1488,
		5, 7, 0, 0, 1488, 1497, 1, 0, 0, 0, 1489, 1494, 3, 64, 32, 0, 1490, 1492,
		5, 33, 0, 0, 1491, 1490, 1, 0, 0, 0, 1491, 1492, 1, 0, 0, 0, 1492, 1493,
		1, 0, 0, 0, 1493, 1495, 3, 174, 87, 0, 1494, 1491, 1, 0, 0, 0, 1494, 1495,
		1, 0, 0, 0, 1495, 1497, 1, 0, 0, 0, 1496, 1484, 1, 0, 0, 0, 1496, 1485,
		1, 0, 0, 0, 1496, 1489, 1, 0, 0, 0, 1497, 97, 1, 0, 0, 0, 1498, 1512, 5,
		5, 0, 0, 1499, 1501, 5, 100, 0, 0, 1500, 1499, 1, 0, 0, 0, 1500, 1501,
		1, 0, 0, 0, 1501, 1508, 1, 0, 0, 0, 1502, 1504, 5, 96, 0, 0, 1503, 1505,
		5, 110, 0, 0, 1504, 1503, 1, 0, 0, 0, 1504, 1505, 1, 0, 0, 0, 1505, 1509,
		1, 0, 0, 0, 1506, 1509, 5, 87, 0, 0, 1507, 1509, 5, 51, 0, 0, 1508, 1502,
		1, 0, 0, 0, 1508, 1506, 1, 0, 0, 0, 1508, 1507, 1, 0, 0, 0, 1508, 1509,
		1, 0, 0, 0, 1509, 1510, 1, 0, 0, 0, 1510, 1512, 5, 94, 0, 0, 1511, 1498,
		1, 0, 0, 0, 1511, 1500, 1, 0, 0, 0, 1512, 99, 1, 0, 0, 0, 1513, 1514, 5,
		107, 0, 0, 1514, 1528, 3, 64, 32, 0, 1515, 1516, 5, 142, 0, 0, 1516, 1517,
		5, 3, 0, 0, 1517, 1522, 3, 188, 94, 0, 1518, 1519, 5, 5, 0, 0, 1519, 1521,
		3, 188, 94, 0, 1520, 1518, 1, 0, 0, 0, 1521, 1524, 1, 0, 0, 0, 1522, 1520,
		1, 0, 0, 0, 1522, 1523, 1, 0, 0, 0, 1523, 1525, 1, 0, 0, 0, 1524, 1522,
		1, 0, 0, 0, 1525, 1526, 5, 4, 0, 0, 1526, 1528, 1, 0, 0, 0, 1527, 1513,
		1, 0, 0, 0, 1527, 1515, 1, 0, 0, 0, 1528, 101, 1, 0, 0, 0, 1529, 1531,
		5, 139, 0, 0, 1530, 1532, 5, 29, 0, 0, 1531, 1530, 1, 0, 0, 0, 1531, 1532,
		1, 0, 0, 0, 1532, 1536, 1, 0, 0, 0, 1533, 1536, 5, 90, 0, 0, 1534, 1536,
		5, 68, 0, 0, 1535, 1529, 1, 0, 0, 0, 1535, 1533, 1, 0, 0, 0, 1535, 1534,
		1, 0, 0, 0, 1536, 103, 1, 0, 0, 0, 1537, 1539, 3, 48, 24, 0, 1538, 1537,
		1, 0, 0, 0, 1538, 1539, 1, 0, 0, 0, 1539, 1540, 1, 0, 0, 0, 1540, 1543,
		5, 141, 0, 0, 1541, 1542, 5, 108, 0, 0, 1542, 1544, 7, 8, 0, 0, 1543, 1541,
		1, 0, 0, 0, 1543, 1544, 1, 0, 0, 0, 1544, 1545, 1, 0, 0, 0, 1545, 1546,
		3, 114, 57, 0, 1546, 1547, 5, 131, 0, 0, 1547, 1560, 3, 106, 53, 0, 1548,
		1558, 5, 75, 0, 0, 1549, 1554, 3, 94, 47, 0, 1550, 1551, 5, 5, 0, 0, 1551,
		1553, 3, 94, 47, 0, 1552, 1550, 1, 0, 0, 0, 1553, 1556, 1, 0, 0, 0, 1554,
		1552, 1, 0, 0, 0, 1554, 1555, 1, 0, 0, 0, 1555, 1559, 1, 0, 0, 0, 1556,
		1554, 1, 0, 0, 0, 1557, 1559, 3, 84, 42, 0, 1558, 1549, 1, 0, 0, 0, 1558,
		1557, 1, 0, 0, 0, 1559, 1561, 1, 0, 0, 0, 1560, 1548, 1, 0, 0, 0, 1560,
		1561, 1, 0, 0, 0, 1561, 1564, 1, 0, 0, 0, 1562, 1563, 5, 148, 0, 0, 1563,
		1565, 3, 64, 32, 0, 1564, 1562, 1, 0, 0, 0, 1564, 1565, 1, 0, 0, 0, 1565,
		1567, 1, 0, 0, 0, 1566, 1568, 3, 72, 36, 0, 1567, 1566, 1, 0, 0, 0, 1567,
		1568, 1, 0, 0, 0, 1568, 105, 1, 0, 0, 0, 1569, 1574, 3, 108, 54, 0, 1570,
		1571, 5, 5, 0, 0, 1571, 1573, 3, 108, 54, 0, 1572, 1570, 1, 0, 0, 0, 1573,
		1576, 1, 0, 0, 0, 1574, 1572, 1, 0, 0, 0, 1574, 1575, 1, 0, 0, 0, 1575,
		107, 1, 0, 0, 0, 1576, 1574, 1, 0, 0, 0, 1577, 1580, 3, 188, 94, 0, 1578,
		1580, 3, 110, 55, 0, 1579, 1577, 1, 0, 0, 0, 1579, 1578, 1, 0, 0, 0, 1580,
		1581, 1, 0, 0, 0, 1581, 1582, 5, 6, 0, 0, 1582, 1583, 3, 64, 32, 0, 1583,
		109, 1, 0, 0, 0, 1584, 1585, 5, 3, 0, 0, 1585, 1590, 3, 188, 94, 0, 1586,
		1587, 5, 5, 0, 0, 1587, 1589, 3, 188, 94, 0, 1588, 1586, 1, 0, 0, 0, 1589,
		1592, 1, 0, 0, 0, 1590, 1588, 1, 0, 0, 0, 1590, 1591, 1, 0, 0, 0, 1591,
		1593, 1, 0, 0, 0, 1592, 1590, 1, 0, 0, 0, 1593, 1594, 5, 4, 0, 0, 1594,
		111, 1, 0, 0, 0, 1595, 1597, 3, 48, 24, 0, 1596, 1595, 1, 0, 0, 0, 1596,
		1597, 1, 0, 0, 0, 1597, 1598, 1, 0, 0, 0, 1598, 1601, 5, 141, 0, 0, 1599,
		1600, 5, 108, 0, 0, 1600, 1602, 7, 8, 0, 0, 1601, 1599, 1, 0, 0, 0, 1601,
		1602, 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1604, 3, 114, 57, 0, 1604,
		1607, 5, 131, 0, 0, 1605, 1608, 3, 188, 94, 0, 1606, 1608, 3, 110, 55,
		0, 1607, 1605, 1, 0, 0, 0, 1607, 1606, 1, 0, 0, 0, 1608, 1609, 1, 0, 0,
		0, 1609, 1610, 5, 6, 0, 0, 1610, 1621, 3, 64, 32, 0, 1611, 1614, 5, 5,
		0, 0, 1612, 1615, 3, 188, 94, 0, 1613, 1615, 3, 110, 55, 0, 1614, 1612,
		1, 0, 0, 0, 1614, 1613, 1, 0, 0, 0, 1615, 1616, 1, 0, 0, 0, 1616, 1617,
		5, 6, 0, 0, 1617, 1618, 3, 64, 32, 0, 1618, 1620, 1, 0, 0, 0, 1619, 1611,
		1, 0, 0, 0, 1620, 1623, 1, 0, 0, 0, 1621, 1619, 1, 0, 0, 0, 1621, 1622,
		1, 0, 0, 0, 1622, 1626, 1, 0, 0, 0, 1623, 1621, 1, 0, 0, 0, 1624, 1625,
		5, 148, 0, 0, 1625, 1627, 3, 64, 32, 0, 1626, 1624, 1, 0, 0, 0, 1626, 1627,
		1, 0, 0, 0, 1627, 1629, 1, 0, 0, 0, 1628, 1630, 3, 72, 36, 0, 1629, 1628,
		1, 0, 0, 0, 1629, 1630, 1, 0, 0, 0, 1630, 1635, 1, 0, 0, 0, 1631, 1633,
		3, 136, 68, 0, 1632, 1631, 1, 0, 0, 0, 1632, 1633, 1, 0, 0, 0, 1633, 1634,
		1, 0, 0, 0, 1634, 1636, 3, 138, 69, 0, 1635, 1632, 1, 0, 0, 0, 1635, 1636,
		1, 0, 0, 0, 1636, 113, 1, 0, 0, 0, 1637, 1638, 3, 182, 91, 0, 1638, 1639,
		5, 2, 0, 0, 1639, 1641, 1, 0, 0, 0, 1640, 1637, 1, 0, 0, 0, 1640, 1641,
		1, 0, 0, 0, 1641, 1642, 1, 0, 0, 0, 1642, 1645, 3, 184, 92, 0, 1643, 1644,
		5, 33, 0, 0, 1644, 1646, 3, 212, 106, 0, 1645, 1643, 1, 0, 0, 0, 1645,
		1646, 1, 0, 0, 0, 1646, 1652, 1, 0, 0, 0, 1647, 1648, 5, 85, 0, 0, 1648,
		1649, 5, 40, 0, 0, 1649, 1653, 3, 194, 97, 0, 1650, 1651, 5, 102, 0, 0,
		1651, 1653, 5, 85, 0, 0, 1652, 1647, 1, 0, 0, 0, 1652, 1650, 1, 0, 0, 0,
		1652, 1653, 1, 0, 0, 0, 1653, 115, 1, 0, 0, 0, 1654, 1656, 5, 143, 0, 0,
		1655, 1657, 3, 182, 91, 0, 1656, 1655, 1, 0, 0, 0, 1656, 1657, 1, 0, 0,
		0, 1657, 1660, 1, 0, 0, 0, 1658, 1659, 5, 91, 0, 0, 1659, 1661, 3, 214,
		107, 0, 1660, 1658, 1, 0, 0, 0, 1660, 1661, 1, 0, 0, 0, 1661, 117, 1, 0,
		0, 0, 1662, 1663, 5, 178, 0, 0, 1663, 1664, 5, 3, 0, 0, 1664, 1665, 5,
		148, 0, 0, 1665, 1666, 3, 64, 32, 0, 1666, 1667, 5, 4, 0, 0, 1667, 119,
		1, 0, 0, 0, 1668, 1670, 5, 3, 0, 0, 1669, 1671, 3, 216, 108, 0, 1670, 1669,
		1, 0, 0, 0, 1670, 1671, 1, 0, 0, 0, 1671, 1682, 1, 0, 0, 0, 1672, 1673,
		5, 153, 0, 0, 1673, 1674, 5, 40, 0, 0, 1674, 1679, 3, 64, 32, 0, 1675,
		1676, 5, 5, 0, 0, 1676, 1678, 3, 64, 32, 0, 1677, 1675, 1, 0, 0, 0, 1678,
		1681, 1, 0, 0, 0, 1679, 1677, 1, 0, 0, 0, 1679, 1680, 1, 0, 0, 0, 1680,
		1683, 1, 0, 0, 0, 1681, 1679, 1, 0, 0, 0, 1682, 1672, 1, 0, 0, 0, 1682,
		1683, 1, 0, 0, 0, 1683, 1684, 1, 0, 0, 0, 1684, 1685, 5, 109, 0, 0, 1685,
		1686, 5, 40, 0, 0, 1686, 1691, 3, 140, 70, 0, 1687, 1688, 5, 5, 0, 0, 1688,
		1690, 3, 140, 70, 0, 1689, 1687, 1, 0, 0, 0, 1690, 1693, 1, 0, 0, 0, 1691,
		1689, 1, 0, 0, 0, 1691, 1692, 1, 0, 0, 0, 1692, 1695, 1, 0, 0, 0, 1693,
		1691, 1, 0, 0, 0, 1694, 1696, 3, 124, 62, 0, 1695, 1694, 1, 0, 0, 0, 1695,
		1696, 1, 0, 0, 0, 1696, 1697, 1, 0, 0, 0, 1697, 1698, 5, 4, 0, 0, 1698,
		121, 1, 0, 0, 0, 1699, 1733, 5, 152, 0, 0, 1700, 1734, 3, 210, 105, 0,
		1701, 1703, 5, 3, 0, 0, 1702, 1704, 3, 216, 108, 0, 1703, 1702, 1, 0, 0,
		0, 1703, 1704, 1, 0, 0, 0, 1704, 1715, 1, 0, 0, 0, 1705, 1706, 5, 153,
		0, 0, 1706, 1707, 5, 40, 0, 0, 1707, 1712, 3, 64, 32, 0, 1708, 1709, 5,
		5, 0, 0, 1709, 1711, 3, 64, 32, 0, 1710, 1708, 1, 0, 0, 0, 1711, 1714,
		1, 0, 0, 0, 1712, 1710, 1, 0, 0, 0, 1712, 1713, 1, 0, 0, 0, 1713, 1716,
		1, 0, 0, 0, 1714, 1712, 1, 0, 0, 0, 1715, 1705, 1, 0, 0, 0, 1715, 1716,
		1, 0, 0, 0, 1716, 1727, 1, 0, 0, 0, 1717, 1718, 5, 109, 0, 0, 1718, 1719,
		5, 40, 0, 0, 1719, 1724, 3, 140, 70, 0, 1720, 1721, 5, 5, 0, 0, 1721, 1723,
		3, 140, 70, 0, 1722, 1720, 1, 0, 0, 0, 1723, 1726, 1, 0, 0, 0, 1724, 1722,
		1, 0, 0, 0, 1724, 1725, 1, 0, 0, 0, 1725, 1728, 1, 0, 0, 0, 1726, 1724,
		1, 0, 0, 0, 1727, 1717, 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1730,
		1, 0, 0, 0, 1729, 1731, 3, 124, 62, 0, 1730, 1729, 1, 0, 0, 0, 1730, 1731,
		1, 0, 0, 0, 1731, 1732, 1, 0, 0, 0, 1732, 1734, 5, 4, 0, 0, 1733, 1700,
		1, 0, 0, 0, 1733, 1701, 1, 0, 0, 0, 1734, 123, 1, 0, 0, 0, 1735, 1743,
		3, 126, 63, 0, 1736, 1737, 5, 180, 0, 0, 1737, 1738, 5, 101, 0, 0, 1738,
		1744, 5, 182, 0, 0, 1739, 1740, 5, 157, 0, 0, 1740, 1744, 5, 127, 0, 0,
		1741, 1744, 5, 78, 0, 0, 1742, 1744, 5, 181, 0, 0, 1743, 1736, 1, 0, 0,
		0, 1743, 1739, 1, 0, 0, 0, 1743, 1741, 1, 0, 0, 0, 1743, 1742, 1, 0, 0,
		0, 1743, 1744, 1, 0, 0, 0, 1744, 125, 1, 0, 0, 0, 1745, 1752, 7, 17, 0,
		0, 1746, 1753, 3, 148, 74, 0, 1747, 1748, 5, 39, 0, 0, 1748, 1749, 3, 144,
		72, 0, 1749, 1750, 5, 32, 0, 0, 1750, 1751, 3, 146, 73, 0, 1751, 1753,
		1, 0, 0, 0, 1752, 1746, 1, 0, 0, 0, 1752, 1747, 1, 0, 0, 0, 1753, 127,
		1, 0, 0, 0, 1754, 1755, 3, 218, 109, 0, 1755, 1765, 5, 3, 0, 0, 1756, 1761,
		3, 64, 32, 0, 1757, 1758, 5, 5, 0, 0, 1758, 1760, 3, 64, 32, 0, 1759, 1757,
		1, 0, 0, 0, 1760, 1763, 1, 0, 0, 0, 1761, 1759, 1, 0, 0, 0, 1761, 1762,
		1, 0, 0, 0, 1762, 1766, 1, 0, 0, 0, 1763, 1761, 1, 0, 0, 0, 1764, 1766,
		5, 7, 0, 0, 1765, 1756, 1, 0, 0, 0, 1765, 1764, 1, 0, 0, 0, 1766, 1767,
		1, 0, 0, 0, 1767, 1768, 5, 4, 0, 0, 1768, 129, 1, 0, 0, 0, 1769, 1770,
		3, 220, 110, 0, 1770, 1783, 5, 3, 0, 0, 1771, 1773, 5, 62, 0, 0, 1772,
		1771, 1, 0, 0, 0, 1772, 1773, 1, 0, 0, 0, 1773, 1774, 1, 0, 0, 0, 1774,
		1779, 3, 64, 32, 0, 1775, 1776, 5, 5, 0, 0, 1776, 1778, 3, 64, 32, 0, 1777,
		1775, 1, 0, 0, 0, 1778, 1781, 1, 0, 0, 0, 1779, 1777, 1, 0, 0, 0, 1779,
		1780, 1, 0, 0, 0, 1780, 1784, 1, 0, 0, 0, 1781, 1779, 1, 0, 0, 0, 1782,
		1784, 5, 7, 0, 0, 1783, 1772, 1, 0, 0, 0, 1783, 1782, 1, 0, 0, 0, 1783,
		1784, 1, 0, 0, 0, 1784, 1785, 1, 0, 0, 0, 1785, 1787, 5, 4, 0, 0, 1786,
		1788, 3, 118, 59, 0, 1787, 1786, 1, 0, 0, 0, 1787, 1788, 1, 0, 0, 0, 1788,
		131, 1, 0, 0, 0, 1789, 1790, 3, 150, 75, 0, 1790, 1800, 5, 3, 0, 0, 1791,
		1796, 3, 64, 32, 0, 1792, 1793, 5, 5, 0, 0, 1793, 1795, 3, 64, 32, 0, 1794,
		1792, 1, 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1794, 1, 0, 0, 0, 1796,
		1797, 1, 0, 0, 0, 1797, 1801, 1, 0, 0, 0, 1798, 1796, 1, 0, 0, 0, 1799,
		1801, 5, 7, 0, 0, 1800, 1791, 1, 0, 0, 0, 1800, 1799, 1, 0, 0, 0, 1800,
		1801, 1, 0, 0, 0, 1801, 1802, 1, 0, 0, 0, 1802, 1804, 5, 4, 0, 0, 1803,
		1805, 3, 118, 59, 0, 1804, 1803, 1, 0, 0, 0, 1804, 1805, 1, 0, 0, 0, 1805,
		1806, 1, 0, 0, 0, 1806, 1809, 5, 152, 0, 0, 1807, 1810, 3, 120, 60, 0,
		1808, 1810, 3, 210, 105, 0, 1809, 1807, 1, 0, 0, 0, 1809, 1808, 1, 0, 0,
		0, 1810, 133, 1, 0, 0, 0, 1811, 1813, 5, 149, 0, 0, 1812, 1814, 5, 116,
		0, 0, 1813, 1812, 1, 0, 0, 0, 1813, 1814, 1, 0, 0, 0, 1814, 1815, 1, 0,
		0, 0, 1815, 1820, 3, 54, 27, 0, 1816, 1817, 5, 5, 0, 0, 1817, 1819, 3,
		54, 27, 0, 1818, 1816, 1, 0, 0, 0, 1819, 1822, 1, 0, 0, 0, 1820, 1818,
		1, 0, 0, 0, 1820, 1821, 1, 0, 0, 0, 1821, 135, 1, 0, 0, 0, 1822, 1820,
		1, 0, 0, 0, 1823, 1824, 5, 109, 0, 0, 1824, 1825, 5, 40, 0, 0, 1825, 1830,
		3, 140, 70, 0, 1826, 1827, 5, 5, 0, 0, 1827, 1829, 3, 140, 70, 0, 1828,
		1826, 1, 0, 0, 0, 1829, 1832, 1, 0, 0, 0, 1830, 1828, 1, 0, 0, 0, 1830,
		1831, 1, 0, 0, 0, 1831, 137, 1, 0, 0, 0, 1832, 1830, 1, 0, 0, 0, 1833,
		1834, 5, 98, 0, 0, 1834, 1837, 3, 64, 32, 0, 1835, 1836, 7, 18, 0, 0, 1836,
		1838, 3, 64, 32, 0, 1837, 1835, 1, 0, 0, 0, 1837, 1838, 1, 0, 0, 0, 1838,
		139, 1, 0, 0, 0, 1839, 1842, 3, 64, 32, 0, 1840, 1841, 5, 45, 0, 0, 1841,
		1843, 3, 190, 95, 0, 1842, 1840, 1, 0, 0, 0, 1842, 1843, 1, 0, 0, 0, 1843,
		1845, 1, 0, 0, 0, 1844, 1846, 3, 142, 71, 0, 1845, 1844, 1, 0, 0, 0, 1845,
		1846, 1, 0, 0, 0, 1846, 1849, 1, 0, 0, 0, 1847, 1848, 5, 175, 0, 0, 1848,
		1850, 7, 19, 0, 0, 1849, 1847, 1, 0, 0, 0, 1849, 1850, 1, 0, 0, 0, 1850,
		141, 1, 0, 0, 0, 1851, 1852, 7, 20, 0, 0, 1852, 143, 1, 0, 0, 0, 1853,
		1854, 3, 64, 32, 0, 1854, 1855, 5, 155, 0, 0, 1855, 1864, 1, 0, 0, 0, 1856,
		1857, 3, 64, 32, 0, 1857, 1858, 5, 158, 0, 0, 1858, 1864, 1, 0, 0, 0, 1859,
		1860, 5, 157, 0, 0, 1860, 1864, 5, 127, 0, 0, 1861, 1862, 5, 156, 0, 0,
		1862, 1864, 5, 155, 0, 0, 1863, 1853, 1, 0, 0, 0, 1863, 1856, 1, 0, 0,
		0, 1863, 1859, 1, 0, 0, 0, 1863, 1861, 1, 0, 0, 0, 1864, 145, 1, 0, 0,
		0, 1865, 1866, 3, 64, 32, 0, 1866, 1867, 5, 155, 0, 0, 1867, 1876, 1, 0,
		0, 0, 1868, 1869, 3, 64, 32, 0, 1869, 1870, 5, 158, 0, 0, 1870, 1876, 1,
		0, 0, 0, 1871, 1872, 5, 157, 0, 0, 1872, 1876, 5, 127, 0, 0, 1873, 1874,
		5, 156, 0, 0, 1874, 1876, 5, 158, 0, 0, 1875, 1865, 1, 0, 0, 0, 1875, 1868,
		1, 0, 0, 0, 1875, 1871, 1, 0, 0, 0, 1875, 1873, 1, 0, 0, 0, 1876, 147,
		1, 0, 0, 0, 1877, 1878, 3, 64, 32, 0, 1878, 1879, 5, 155, 0, 0, 1879, 1885,
		1, 0, 0, 0, 1880, 1881, 5, 156, 0, 0, 1881, 1885, 5, 155, 0, 0, 1882, 1883,
		5, 157, 0, 0, 1883, 1885, 5, 127, 0, 0, 1884, 1877, 1, 0, 0, 0, 1884, 1880,
		1, 0, 0, 0, 1884, 1882, 1, 0, 0, 0, 1885, 149, 1, 0, 0, 0, 1886, 1887,
		7, 21, 0, 0, 1887, 1888, 5, 3, 0, 0, 1888, 1889, 3, 64, 32, 0, 1889, 1890,
		5, 4, 0, 0, 1890, 1891, 5, 152, 0, 0, 1891, 1893, 5, 3, 0, 0, 1892, 1894,
		3, 156, 78, 0, 1893, 1892, 1, 0, 0, 0, 1893, 1894, 1, 0, 0, 0, 1894, 1895,
		1, 0, 0, 0, 1895, 1897, 3, 160, 80, 0, 1896, 1898, 3, 126, 63, 0, 1897,
		1896, 1, 0, 0, 0, 1897, 1898, 1, 0, 0, 0, 1898, 1899, 1, 0, 0, 0, 1899,
		1900, 5, 4, 0, 0, 1900, 1972, 1, 0, 0, 0, 1901, 1902, 7, 22, 0, 0, 1902,
		1903, 5, 3, 0, 0, 1903, 1904, 5, 4, 0, 0, 1904, 1905, 5, 152, 0, 0, 1905,
		1907, 5, 3, 0, 0, 1906, 1908, 3, 156, 78, 0, 1907, 1906, 1, 0, 0, 0, 1907,
		1908, 1, 0, 0, 0, 1908, 1910, 1, 0, 0, 0, 1909, 1911, 3, 158, 79, 0, 1910,
		1909, 1, 0, 0, 0, 1910, 1911, 1, 0, 0, 0, 1911, 1912, 1, 0, 0, 0, 1912,
		1972, 5, 4, 0, 0, 1913, 1914, 7, 23, 0, 0, 1914, 1915, 5, 3, 0, 0, 1915,
		1916, 5, 4, 0, 0, 1916, 1917, 5, 152, 0, 0, 1917, 1919, 5, 3, 0, 0, 1918,
		1920, 3, 156, 78, 0, 1919, 1918, 1, 0, 0, 0, 1919, 1920, 1, 0, 0, 0, 1920,
		1921, 1, 0, 0, 0, 1921, 1922, 3, 160, 80, 0, 1922, 1923, 5, 4, 0, 0, 1923,
		1972, 1, 0, 0, 0, 1924, 1925, 7, 24, 0, 0, 1925, 1926, 5, 3, 0, 0, 1926,
		1928, 3, 64, 32, 0, 1927, 1929, 3, 152, 76, 0, 1928, 1927, 1, 0, 0, 0,
		1928, 1929, 1, 0, 0, 0, 1929, 1931, 1, 0, 0, 0, 1930, 1932, 3, 154, 77,
		0, 1931, 1930, 1, 0, 0, 0, 1931, 1932, 1, 0, 0, 0, 1932, 1933, 1, 0, 0,
		0, 1933, 1934, 5, 4, 0, 0, 1934, 1935, 5, 152, 0, 0, 1935, 1937, 5, 3,
		0, 0, 1936, 1938, 3, 156, 78, 0, 1937, 1936, 1, 0, 0, 0, 1937, 1938, 1,
		0, 0, 0, 1938, 1939, 1, 0, 0, 0, 1939, 1940, 3, 160, 80, 0, 1940, 1941,
		5, 4, 0, 0, 1941, 1972, 1, 0, 0, 0, 1942, 1943, 5, 164, 0, 0, 1943, 1944,
		5, 3, 0, 0, 1944, 1945, 3, 64, 32, 0, 1945, 1946, 5, 5, 0, 0, 1946, 1947,
		3, 34, 17, 0, 1947, 1948, 5, 4, 0, 0, 1948, 1949, 5, 152, 0, 0, 1949, 1951,
		5, 3, 0, 0, 1950, 1952, 3, 156, 78, 0, 1951, 1950, 1, 0, 0, 0, 1951, 1952,
		1, 0, 0, 0, 1952, 1953, 1, 0, 0, 0, 1953, 1955, 3, 160, 80, 0, 1954, 1956,
		3, 126, 63, 0, 1955, 1954, 1, 0, 0, 0, 1955, 1956, 1, 0, 0, 0, 1956, 1957,
		1, 0, 0, 0, 1957, 1958, 5, 4, 0, 0, 1958, 1972, 1, 0, 0, 0, 1959, 1960,
		5, 165, 0, 0, 1960, 1961, 5, 3, 0, 0, 1961, 1962, 3, 64, 32, 0, 1962, 1963,
		5, 4, 0, 0, 1963, 1964, 5, 152, 0, 0, 1964, 1966, 5, 3, 0, 0, 1965, 1967,
		3, 156, 78, 0, 1966, 1965, 1, 0, 0, 0, 1966, 1967, 1, 0, 0, 0, 1967, 1968,
		1, 0, 0, 0, 1968, 1969, 3, 160, 80, 0, 1969, 1970, 5, 4, 0, 0, 1970, 1972,
		1, 0, 0, 0, 1971, 1886, 1, 0, 0, 0, 1971, 1901, 1, 0, 0, 0, 1971, 1913,
		1, 0, 0, 0, 1971, 1924, 1, 0, 0, 0, 1971, 1942, 1, 0, 0, 0, 1971, 1959,
		1, 0, 0, 0, 1972, 151, 1, 0, 0, 0, 1973, 1974, 5, 5, 0, 0, 1974, 1975,
		3, 34, 17, 0, 1975, 153, 1, 0, 0, 0, 1976, 1977, 5, 5, 0, 0, 1977, 1978,
		3, 34, 17, 0, 1978, 155, 1, 0, 0, 0, 1979, 1980, 5, 153, 0, 0, 1980, 1982,
		5, 40, 0, 0, 1981, 1983, 3, 64, 32, 0, 1982, 1981, 1, 0, 0, 0, 1983, 1984,
		1, 0, 0, 0, 1984, 1982, 1, 0, 0, 0, 1984, 1985, 1, 0, 0, 0, 1985, 157,
		1, 0, 0, 0, 1986, 1987, 5, 109, 0, 0, 1987, 1989, 5, 40, 0, 0, 1988, 1990,
		3, 64, 32, 0, 1989, 1988, 1, 0, 0, 0, 1990, 1991, 1, 0, 0, 0, 1991, 1989,
		1, 0, 0, 0, 1991, 1992, 1, 0, 0, 0, 1992, 159, 1, 0, 0, 0, 1993, 1994,
		5, 109, 0, 0, 1994, 1995, 5, 40, 0, 0, 1995, 1996, 3, 162, 81, 0, 1996,
		161, 1, 0, 0, 0, 1997, 1999, 3, 64, 32, 0, 1998, 2000, 3, 142, 71, 0, 1999,
		1998, 1, 0, 0, 0, 1999, 2000, 1, 0, 0, 0, 2000, 2008, 1, 0, 0, 0, 2001,
		2002, 5, 5, 0, 0, 2002, 2004, 3, 64, 32, 0, 2003, 2005, 3, 142, 71, 0,
		2004, 2003, 1, 0, 0, 0, 2004, 2005, 1, 0, 0, 0, 2005, 2007, 1, 0, 0, 0,
		2006, 2001, 1, 0, 0, 0, 2007, 2010, 1, 0, 0, 0, 2008, 2006, 1, 0, 0, 0,
		2008, 2009, 1, 0, 0, 0, 2009, 163, 1, 0, 0, 0, 2010, 2008, 1, 0, 0, 0,
		2011, 2012, 3, 82, 41, 0, 2012, 165, 1, 0, 0, 0, 2013, 2014, 3, 82, 41,
		0, 2014, 167, 1, 0, 0, 0, 2015, 2016, 7, 25, 0, 0, 2016, 169, 1, 0, 0,
		0, 2017, 2018, 5, 188, 0, 0, 2018, 171, 1, 0, 0, 0, 2019, 2022, 3, 64,
		32, 0, 2020, 2022, 3, 28, 14, 0, 2021, 2019, 1, 0, 0, 0, 2021, 2020, 1,
		0, 0, 0, 2022, 173, 1, 0, 0, 0, 2023, 2024, 7, 26, 0, 0, 2024, 175, 1,
		0, 0, 0, 2025, 2026, 7, 27, 0, 0, 2026, 177, 1, 0, 0, 0, 2027, 2028, 3,
		224, 112, 0, 2028, 179, 1, 0, 0, 0, 2029, 2030, 3, 224, 112, 0, 2030, 181,
		1, 0, 0, 0, 2031, 2032, 3, 224, 112, 0, 2032, 183, 1, 0, 0, 0, 2033, 2034,
		3, 224, 112, 0, 2034, 185, 1, 0, 0, 0, 2035, 2036, 3, 224, 112, 0, 2036,
		187, 1, 0, 0, 0, 2037, 2038, 3, 224, 112, 0, 2038, 189, 1, 0, 0, 0, 2039,
		2040, 3, 224, 112, 0, 2040, 191, 1, 0, 0, 0, 2041, 2042, 3, 224, 112, 0,
		2042, 193, 1, 0, 0, 0, 2043, 2044, 3, 224, 112, 0, 2044, 195, 1, 0, 0,
		0, 2045, 2046, 3, 224, 112, 0, 2046, 197, 1, 0, 0, 0, 2047, 2048, 3, 224,
		112, 0, 2048, 199, 1, 0, 0, 0, 2049, 2050, 3, 224, 112, 0, 2050, 201, 1,
		0, 0, 0, 2051, 2052, 3, 224, 112, 0, 2052, 203, 1, 0, 0, 0, 2053, 2054,
		3, 224, 112, 0, 2054, 205, 1, 0, 0, 0, 2055, 2056, 3, 224, 112, 0, 2056,
		207, 1, 0, 0, 0, 2057, 2058, 3, 224, 112, 0, 2058, 209, 1, 0, 0, 0, 2059,
		2060, 3, 224, 112, 0, 2060, 211, 1, 0, 0, 0, 2061, 2062, 3, 224, 112, 0,
		2062, 213, 1, 0, 0, 0, 2063, 2064, 3, 224, 112, 0, 2064, 215, 1, 0, 0,
		0, 2065, 2066, 3, 224, 112, 0, 2066, 217, 1, 0, 0, 0, 2067, 2068, 3, 224,
		112, 0, 2068, 219, 1, 0, 0, 0, 2069, 2070, 3, 224, 112, 0, 2070, 221, 1,
		0, 0, 0, 2071, 2072, 3, 224, 112, 0, 2072, 223, 1, 0, 0, 0, 2073, 2081,
		5, 185, 0, 0, 2074, 2081, 3, 176, 88, 0, 2075, 2081, 5, 188, 0, 0, 2076,
		2077, 5, 3, 0, 0, 2077, 2078, 3, 224, 112, 0, 2078, 2079, 5, 4, 0, 0, 2079,
		2081, 1, 0, 0, 0, 2080, 2073, 1, 0, 0, 0, 2080, 2074, 1, 0, 0, 0, 2080,
		2075, 1, 0, 0, 0, 2080, 2076, 1, 0, 0, 0, 2081, 225, 1, 0, 0, 0, 297, 229,
		237, 244, 249, 255, 261, 263, 289, 296, 303, 309, 313, 318, 321, 328, 331,
		335, 343, 347, 349, 353, 357, 361, 364, 371, 377, 383, 388, 399, 405, 409,
		413, 416, 420, 426, 431, 440, 447, 453, 457, 461, 466, 472, 484, 488, 493,
		496, 499, 504, 507, 521, 528, 535, 537, 540, 546, 551, 559, 564, 579, 585,
		595, 600, 610, 614, 616, 620, 625, 627, 635, 641, 646, 653, 664, 667, 669,
		676, 680, 687, 693, 699, 705, 710, 719, 724, 735, 740, 751, 756, 760, 776,
		786, 791, 799, 811, 816, 824, 831, 834, 837, 844, 847, 850, 853, 857, 865,
		870, 880, 885, 894, 901, 905, 909, 912, 920, 933, 936, 944, 953, 957, 962,
		992, 1004, 1009, 1021, 1027, 1034, 1038, 1048, 1051, 1057, 1063, 1072,
		1075, 1079, 1081, 1083, 1092, 1099, 1106, 1112, 1117, 1125, 1130, 1139,
		1150, 1157, 1161, 1164, 1168, 1171, 1179, 1190, 1196, 1198, 1206, 1213,
		1220, 1225, 1227, 1233, 1242, 1247, 1254, 1258, 1260, 1263, 1271, 1275,
		1278, 1284, 1288, 1293, 1300, 1309, 1313, 1315, 1319, 1328, 1333, 1335,
		1348, 1351, 1360, 1371, 1378, 1381, 1386, 1390, 1393, 1396, 1401, 1405,
		1410, 1413, 1416, 1421, 1425, 1428, 1435, 1440, 1449, 1454, 1457, 1465,
		1469, 1477, 1480, 1482, 1491, 1494, 1496, 1500, 1504, 1508, 1511, 1522,
		1527, 1531, 1535, 1538, 1543, 1554, 1558, 1560, 1564, 1567, 1574, 1579,
		1590, 1596, 1601, 1607, 1614, 1621, 1626, 1629, 1632, 1635, 1640, 1645,
		1652, 1656, 1660, 1670, 1679, 1682, 1691, 1695, 1703, 1712, 1715, 1724,
		1727, 1730, 1733, 1743, 1752, 1761, 1765, 1772, 1779, 1783, 1787, 1796,
		1800, 1804, 1809, 1813, 1820, 1830, 1837, 1842, 1845, 1849, 1863, 1875,
		1884, 1893, 1897, 1907, 1910, 1919, 1928, 1931, 1937, 1951, 1955, 1966,
		1971, 1984, 1991, 1999, 2004, 2008, 2021, 2080,
	}
	deserializer := antlr.NewATNDeserializer(nil)
	staticData.atn = deserializer.Deserialize(staticData.serializedATN)
	atn := staticData.atn
	staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState))
	decisionToDFA := staticData.decisionToDFA
	for index, state := range atn.DecisionToState {
		decisionToDFA[index] = antlr.NewDFA(state, index)
	}
}

// ParserInit initializes any static state used to implement Parser. By default the
// static state used to implement the parser is lazily initialized during the first call to
// NewParser(). You can call this function if you wish to initialize the static state ahead
// of time.
func ParserInit() {
	staticData := &ParserParserStaticData
	staticData.once.Do(parserParserInit)
}

// NewParser produces a new parser instance for the optional input antlr.TokenStream.
func NewParser(input antlr.TokenStream) *Parser {
	ParserInit()
	this := new(Parser)
	this.BaseParser = antlr.NewBaseParser(input)
	staticData := &ParserParserStaticData
	this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache)
	this.RuleNames = staticData.RuleNames
	this.LiteralNames = staticData.LiteralNames
	this.SymbolicNames = staticData.SymbolicNames
	this.GrammarFileName = "Parser.g4"

	return this
}

// Parser tokens.
const (
	ParserEOF                 = antlr.TokenEOF
	ParserSCOL                = 1
	ParserDOT                 = 2
	ParserOPEN_PAR            = 3
	ParserCLOSE_PAR           = 4
	ParserCOMMA               = 5
	ParserASSIGN              = 6
	ParserSTAR                = 7
	ParserPLUS                = 8
	ParserMINUS               = 9
	ParserTILDE               = 10
	ParserPIPE2               = 11
	ParserDIV                 = 12
	ParserMOD                 = 13
	ParserLT2                 = 14
	ParserGT2                 = 15
	ParserAMP                 = 16
	ParserPIPE                = 17
	ParserLT                  = 18
	ParserLT_EQ               = 19
	ParserGT                  = 20
	ParserGT_EQ               = 21
	ParserEQ                  = 22
	ParserNOT_EQ1             = 23
	ParserNOT_EQ2             = 24
	ParserABORT_              = 25
	ParserACTION_             = 26
	ParserADD_                = 27
	ParserAFTER_              = 28
	ParserALL_                = 29
	ParserALTER_              = 30
	ParserANALYZE_            = 31
	ParserAND_                = 32
	ParserAS_                 = 33
	ParserASC_                = 34
	ParserATTACH_             = 35
	ParserAUTOINCREMENT_      = 36
	ParserBEFORE_             = 37
	ParserBEGIN_              = 38
	ParserBETWEEN_            = 39
	ParserBY_                 = 40
	ParserCASCADE_            = 41
	ParserCASE_               = 42
	ParserCAST_               = 43
	ParserCHECK_              = 44
	ParserCOLLATE_            = 45
	ParserCOLUMN_             = 46
	ParserCOMMIT_             = 47
	ParserCONFLICT_           = 48
	ParserCONSTRAINT_         = 49
	ParserCREATE_             = 50
	ParserCROSS_              = 51
	ParserCURRENT_DATE_       = 52
	ParserCURRENT_TIME_       = 53
	ParserCURRENT_TIMESTAMP_  = 54
	ParserDATABASE_           = 55
	ParserDEFAULT_            = 56
	ParserDEFERRABLE_         = 57
	ParserDEFERRED_           = 58
	ParserDELETE_             = 59
	ParserDESC_               = 60
	ParserDETACH_             = 61
	ParserDISTINCT_           = 62
	ParserDROP_               = 63
	ParserEACH_               = 64
	ParserELSE_               = 65
	ParserEND_                = 66
	ParserESCAPE_             = 67
	ParserEXCEPT_             = 68
	ParserEXCLUSIVE_          = 69
	ParserEXISTS_             = 70
	ParserEXPLAIN_            = 71
	ParserFAIL_               = 72
	ParserFOR_                = 73
	ParserFOREIGN_            = 74
	ParserFROM_               = 75
	ParserFULL_               = 76
	ParserGLOB_               = 77
	ParserGROUP_              = 78
	ParserHAVING_             = 79
	ParserIF_                 = 80
	ParserIGNORE_             = 81
	ParserIMMEDIATE_          = 82
	ParserIN_                 = 83
	ParserINDEX_              = 84
	ParserINDEXED_            = 85
	ParserINITIALLY_          = 86
	ParserINNER_              = 87
	ParserINSERT_             = 88
	ParserINSTEAD_            = 89
	ParserINTERSECT_          = 90
	ParserINTO_               = 91
	ParserIS_                 = 92
	ParserISNULL_             = 93
	ParserJOIN_               = 94
	ParserKEY_                = 95
	ParserLEFT_               = 96
	ParserLIKE_               = 97
	ParserLIMIT_              = 98
	ParserMATCH_              = 99
	ParserNATURAL_            = 100
	ParserNO_                 = 101
	ParserNOT_                = 102
	ParserNOTNULL_            = 103
	ParserNULL_               = 104
	ParserOF_                 = 105
	ParserOFFSET_             = 106
	ParserON_                 = 107
	ParserOR_                 = 108
	ParserORDER_              = 109
	ParserOUTER_              = 110
	ParserPLAN_               = 111
	ParserPRAGMA_             = 112
	ParserPRIMARY_            = 113
	ParserQUERY_              = 114
	ParserRAISE_              = 115
	ParserRECURSIVE_          = 116
	ParserREFERENCES_         = 117
	ParserREGEXP_             = 118
	ParserREINDEX_            = 119
	ParserRELEASE_            = 120
	ParserRENAME_             = 121
	ParserREPLACE_            = 122
	ParserRESTRICT_           = 123
	ParserRETURNING_          = 124
	ParserRIGHT_              = 125
	ParserROLLBACK_           = 126
	ParserROW_                = 127
	ParserROWS_               = 128
	ParserSAVEPOINT_          = 129
	ParserSELECT_             = 130
	ParserSET_                = 131
	ParserTABLE_              = 132
	ParserTEMP_               = 133
	ParserTEMPORARY_          = 134
	ParserTHEN_               = 135
	ParserTO_                 = 136
	ParserTRANSACTION_        = 137
	ParserTRIGGER_            = 138
	ParserUNION_              = 139
	ParserUNIQUE_             = 140
	ParserUPDATE_             = 141
	ParserUSING_              = 142
	ParserVACUUM_             = 143
	ParserVALUES_             = 144
	ParserVIEW_               = 145
	ParserVIRTUAL_            = 146
	ParserWHEN_               = 147
	ParserWHERE_              = 148
	ParserWITH_               = 149
	ParserWITHOUT_            = 150
	ParserFIRST_VALUE_        = 151
	ParserOVER_               = 152
	ParserPARTITION_          = 153
	ParserRANGE_              = 154
	ParserPRECEDING_          = 155
	ParserUNBOUNDED_          = 156
	ParserCURRENT_            = 157
	ParserFOLLOWING_          = 158
	ParserCUME_DIST_          = 159
	ParserDENSE_RANK_         = 160
	ParserLAG_                = 161
	ParserLAST_VALUE_         = 162
	ParserLEAD_               = 163
	ParserNTH_VALUE_          = 164
	ParserNTILE_              = 165
	ParserPERCENT_RANK_       = 166
	ParserRANK_               = 167
	ParserROW_NUMBER_         = 168
	ParserGENERATED_          = 169
	ParserALWAYS_             = 170
	ParserSTORED_             = 171
	ParserTRUE_               = 172
	ParserFALSE_              = 173
	ParserWINDOW_             = 174
	ParserNULLS_              = 175
	ParserFIRST_              = 176
	ParserLAST_               = 177
	ParserFILTER_             = 178
	ParserGROUPS_             = 179
	ParserEXCLUDE_            = 180
	ParserTIES_               = 181
	ParserOTHERS_             = 182
	ParserDO_                 = 183
	ParserNOTHING_            = 184
	ParserIDENTIFIER          = 185
	ParserNUMERIC_LITERAL     = 186
	ParserBIND_PARAMETER      = 187
	ParserSTRING_LITERAL      = 188
	ParserBLOB_LITERAL        = 189
	ParserSINGLE_LINE_COMMENT = 190
	ParserMULTILINE_COMMENT   = 191
	ParserSPACES              = 192
	ParserUNEXPECTED_CHAR     = 193
)

// Parser rules.
const (
	ParserRULE_parse                         = 0
	ParserRULE_sql_stmt_list                 = 1
	ParserRULE_sql_stmt                      = 2
	ParserRULE_alter_table_stmt              = 3
	ParserRULE_analyze_stmt                  = 4
	ParserRULE_attach_stmt                   = 5
	ParserRULE_begin_stmt                    = 6
	ParserRULE_commit_stmt                   = 7
	ParserRULE_rollback_stmt                 = 8
	ParserRULE_savepoint_stmt                = 9
	ParserRULE_release_stmt                  = 10
	ParserRULE_create_index_stmt             = 11
	ParserRULE_indexed_column                = 12
	ParserRULE_create_table_stmt             = 13
	ParserRULE_column_def                    = 14
	ParserRULE_type_name                     = 15
	ParserRULE_column_constraint             = 16
	ParserRULE_signed_number                 = 17
	ParserRULE_table_constraint              = 18
	ParserRULE_foreign_key_clause            = 19
	ParserRULE_conflict_clause               = 20
	ParserRULE_create_trigger_stmt           = 21
	ParserRULE_create_view_stmt              = 22
	ParserRULE_create_virtual_table_stmt     = 23
	ParserRULE_with_clause                   = 24
	ParserRULE_cte_table_name                = 25
	ParserRULE_recursive_cte                 = 26
	ParserRULE_common_table_expression       = 27
	ParserRULE_delete_stmt                   = 28
	ParserRULE_delete_stmt_limited           = 29
	ParserRULE_detach_stmt                   = 30
	ParserRULE_drop_stmt                     = 31
	ParserRULE_expr                          = 32
	ParserRULE_raise_function                = 33
	ParserRULE_literal_value                 = 34
	ParserRULE_insert_stmt                   = 35
	ParserRULE_returning_clause              = 36
	ParserRULE_upsert_clause                 = 37
	ParserRULE_pragma_stmt                   = 38
	ParserRULE_pragma_value                  = 39
	ParserRULE_reindex_stmt                  = 40
	ParserRULE_select_stmt                   = 41
	ParserRULE_join_clause                   = 42
	ParserRULE_select_core                   = 43
	ParserRULE_factored_select_stmt          = 44
	ParserRULE_simple_select_stmt            = 45
	ParserRULE_compound_select_stmt          = 46
	ParserRULE_table_or_subquery             = 47
	ParserRULE_result_column                 = 48
	ParserRULE_join_operator                 = 49
	ParserRULE_join_constraint               = 50
	ParserRULE_compound_operator             = 51
	ParserRULE_update_stmt                   = 52
	ParserRULE_assignment_list               = 53
	ParserRULE_assignment                    = 54
	ParserRULE_column_name_list              = 55
	ParserRULE_update_stmt_limited           = 56
	ParserRULE_qualified_table_name          = 57
	ParserRULE_vacuum_stmt                   = 58
	ParserRULE_filter_clause                 = 59
	ParserRULE_window_defn                   = 60
	ParserRULE_over_clause                   = 61
	ParserRULE_frame_spec                    = 62
	ParserRULE_frame_clause                  = 63
	ParserRULE_simple_function_invocation    = 64
	ParserRULE_aggregate_function_invocation = 65
	ParserRULE_window_function_invocation    = 66
	ParserRULE_common_table_stmt             = 67
	ParserRULE_order_by_stmt                 = 68
	ParserRULE_limit_stmt                    = 69
	ParserRULE_ordering_term                 = 70
	ParserRULE_asc_desc                      = 71
	ParserRULE_frame_left                    = 72
	ParserRULE_frame_right                   = 73
	ParserRULE_frame_single                  = 74
	ParserRULE_window_function               = 75
	ParserRULE_offset                        = 76
	ParserRULE_default_value                 = 77
	ParserRULE_partition_by                  = 78
	ParserRULE_order_by_expr                 = 79
	ParserRULE_order_by_expr_asc_desc        = 80
	ParserRULE_expr_asc_desc                 = 81
	ParserRULE_initial_select                = 82
	ParserRULE_recursive_select              = 83
	ParserRULE_unary_operator                = 84
	ParserRULE_error_message                 = 85
	ParserRULE_module_argument               = 86
	ParserRULE_column_alias                  = 87
	ParserRULE_keyword                       = 88
	ParserRULE_name                          = 89
	ParserRULE_function_name                 = 90
	ParserRULE_schema_name                   = 91
	ParserRULE_table_name                    = 92
	ParserRULE_table_or_index_name           = 93
	ParserRULE_column_name                   = 94
	ParserRULE_collation_name                = 95
	ParserRULE_foreign_table                 = 96
	ParserRULE_index_name                    = 97
	ParserRULE_trigger_name                  = 98
	ParserRULE_view_name                     = 99
	ParserRULE_module_name                   = 100
	ParserRULE_pragma_name                   = 101
	ParserRULE_savepoint_name                = 102
	ParserRULE_table_alias                   = 103
	ParserRULE_transaction_name              = 104
	ParserRULE_window_name                   = 105
	ParserRULE_alias                         = 106
	ParserRULE_filename                      = 107
	ParserRULE_base_window_name              = 108
	ParserRULE_simple_func                   = 109
	ParserRULE_aggregate_func                = 110
	ParserRULE_table_function_name           = 111
	ParserRULE_any_name                      = 112
)

// IParseContext is an interface to support dynamic dispatch.
type IParseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	EOF() antlr.TerminalNode
	AllSql_stmt_list() []ISql_stmt_listContext
	Sql_stmt_list(i int) ISql_stmt_listContext

	// IsParseContext differentiates from other interfaces.
	IsParseContext()
}

type ParseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyParseContext() *ParseContext {
	var p = new(ParseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_parse
	return p
}

func InitEmptyParseContext(p *ParseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_parse
}

func (*ParseContext) IsParseContext() {}

func NewParseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParseContext {
	var p = new(ParseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_parse

	return p
}

func (s *ParseContext) GetParser() antlr.Parser { return s.parser }

func (s *ParseContext) EOF() antlr.TerminalNode {
	return s.GetToken(ParserEOF, 0)
}

func (s *ParseContext) AllSql_stmt_list() []ISql_stmt_listContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ISql_stmt_listContext); ok {
			len++
		}
	}

	tst := make([]ISql_stmt_listContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ISql_stmt_listContext); ok {
			tst[i] = t.(ISql_stmt_listContext)
			i++
		}
	}

	return tst
}

func (s *ParseContext) Sql_stmt_list(i int) ISql_stmt_listContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISql_stmt_listContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISql_stmt_listContext)
}

func (s *ParseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *ParseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *ParseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterParse(s)
	}
}

func (s *ParseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitParse(s)
	}
}

func (s *ParseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitParse(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Parse() (localctx IParseContext) {
	localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 0, ParserRULE_parse)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(229)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-6339801325483589630) != 0) || ((int64((_la-66)) & ^0x3f) == 0 && ((int64(1)<<(_la-66))&-7971300971697405919) != 0) || ((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&550913) != 0) {
		{
			p.SetState(226)
			p.Sql_stmt_list()
		}

		p.SetState(231)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(232)
		p.Match(ParserEOF)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISql_stmt_listContext is an interface to support dynamic dispatch.
type ISql_stmt_listContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllSql_stmt() []ISql_stmtContext
	Sql_stmt(i int) ISql_stmtContext
	AllSCOL() []antlr.TerminalNode
	SCOL(i int) antlr.TerminalNode

	// IsSql_stmt_listContext differentiates from other interfaces.
	IsSql_stmt_listContext()
}

type Sql_stmt_listContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySql_stmt_listContext() *Sql_stmt_listContext {
	var p = new(Sql_stmt_listContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_sql_stmt_list
	return p
}

func InitEmptySql_stmt_listContext(p *Sql_stmt_listContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_sql_stmt_list
}

func (*Sql_stmt_listContext) IsSql_stmt_listContext() {}

func NewSql_stmt_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_stmt_listContext {
	var p = new(Sql_stmt_listContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_sql_stmt_list

	return p
}

func (s *Sql_stmt_listContext) GetParser() antlr.Parser { return s.parser }

func (s *Sql_stmt_listContext) AllSql_stmt() []ISql_stmtContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ISql_stmtContext); ok {
			len++
		}
	}

	tst := make([]ISql_stmtContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ISql_stmtContext); ok {
			tst[i] = t.(ISql_stmtContext)
			i++
		}
	}

	return tst
}

func (s *Sql_stmt_listContext) Sql_stmt(i int) ISql_stmtContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISql_stmtContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISql_stmtContext)
}

func (s *Sql_stmt_listContext) AllSCOL() []antlr.TerminalNode {
	return s.GetTokens(ParserSCOL)
}

func (s *Sql_stmt_listContext) SCOL(i int) antlr.TerminalNode {
	return s.GetToken(ParserSCOL, i)
}

func (s *Sql_stmt_listContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Sql_stmt_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Sql_stmt_listContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSql_stmt_list(s)
	}
}

func (s *Sql_stmt_listContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSql_stmt_list(s)
	}
}

func (s *Sql_stmt_listContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSql_stmt_list(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Sql_stmt_list() (localctx ISql_stmt_listContext) {
	localctx = NewSql_stmt_listContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 2, ParserRULE_sql_stmt_list)
	var _la int

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(237)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserSCOL {
		{
			p.SetState(234)
			p.Match(ParserSCOL)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

		p.SetState(239)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(240)
		p.Sql_stmt()
	}
	p.SetState(249)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext())
	if p.HasError() {
		goto errorExit
	}
	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			p.SetState(242)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for ok := true; ok; ok = _la == ParserSCOL {
				{
					p.SetState(241)
					p.Match(ParserSCOL)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

				p.SetState(244)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(246)
				p.Sql_stmt()
			}

		}
		p.SetState(251)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
	}
	p.SetState(255)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext())
	if p.HasError() {
		goto errorExit
	}
	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(252)
				p.Match(ParserSCOL)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}
		p.SetState(257)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISql_stmtContext is an interface to support dynamic dispatch.
type ISql_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Alter_table_stmt() IAlter_table_stmtContext
	Analyze_stmt() IAnalyze_stmtContext
	Attach_stmt() IAttach_stmtContext
	Begin_stmt() IBegin_stmtContext
	Commit_stmt() ICommit_stmtContext
	Create_index_stmt() ICreate_index_stmtContext
	Create_table_stmt() ICreate_table_stmtContext
	Create_trigger_stmt() ICreate_trigger_stmtContext
	Create_view_stmt() ICreate_view_stmtContext
	Create_virtual_table_stmt() ICreate_virtual_table_stmtContext
	Delete_stmt() IDelete_stmtContext
	Delete_stmt_limited() IDelete_stmt_limitedContext
	Detach_stmt() IDetach_stmtContext
	Drop_stmt() IDrop_stmtContext
	Insert_stmt() IInsert_stmtContext
	Pragma_stmt() IPragma_stmtContext
	Reindex_stmt() IReindex_stmtContext
	Release_stmt() IRelease_stmtContext
	Rollback_stmt() IRollback_stmtContext
	Savepoint_stmt() ISavepoint_stmtContext
	Select_stmt() ISelect_stmtContext
	Update_stmt() IUpdate_stmtContext
	Update_stmt_limited() IUpdate_stmt_limitedContext
	Vacuum_stmt() IVacuum_stmtContext
	EXPLAIN_() antlr.TerminalNode
	QUERY_() antlr.TerminalNode
	PLAN_() antlr.TerminalNode

	// IsSql_stmtContext differentiates from other interfaces.
	IsSql_stmtContext()
}

type Sql_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySql_stmtContext() *Sql_stmtContext {
	var p = new(Sql_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_sql_stmt
	return p
}

func InitEmptySql_stmtContext(p *Sql_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_sql_stmt
}

func (*Sql_stmtContext) IsSql_stmtContext() {}

func NewSql_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_stmtContext {
	var p = new(Sql_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_sql_stmt

	return p
}

func (s *Sql_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Sql_stmtContext) Alter_table_stmt() IAlter_table_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAlter_table_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAlter_table_stmtContext)
}

func (s *Sql_stmtContext) Analyze_stmt() IAnalyze_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAnalyze_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAnalyze_stmtContext)
}

func (s *Sql_stmtContext) Attach_stmt() IAttach_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAttach_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAttach_stmtContext)
}

func (s *Sql_stmtContext) Begin_stmt() IBegin_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IBegin_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IBegin_stmtContext)
}

func (s *Sql_stmtContext) Commit_stmt() ICommit_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICommit_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICommit_stmtContext)
}

func (s *Sql_stmtContext) Create_index_stmt() ICreate_index_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICreate_index_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICreate_index_stmtContext)
}

func (s *Sql_stmtContext) Create_table_stmt() ICreate_table_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICreate_table_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICreate_table_stmtContext)
}

func (s *Sql_stmtContext) Create_trigger_stmt() ICreate_trigger_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICreate_trigger_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICreate_trigger_stmtContext)
}

func (s *Sql_stmtContext) Create_view_stmt() ICreate_view_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICreate_view_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICreate_view_stmtContext)
}

func (s *Sql_stmtContext) Create_virtual_table_stmt() ICreate_virtual_table_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICreate_virtual_table_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICreate_virtual_table_stmtContext)
}

func (s *Sql_stmtContext) Delete_stmt() IDelete_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IDelete_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IDelete_stmtContext)
}

func (s *Sql_stmtContext) Delete_stmt_limited() IDelete_stmt_limitedContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IDelete_stmt_limitedContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IDelete_stmt_limitedContext)
}

func (s *Sql_stmtContext) Detach_stmt() IDetach_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IDetach_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IDetach_stmtContext)
}

func (s *Sql_stmtContext) Drop_stmt() IDrop_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IDrop_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IDrop_stmtContext)
}

func (s *Sql_stmtContext) Insert_stmt() IInsert_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IInsert_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IInsert_stmtContext)
}

func (s *Sql_stmtContext) Pragma_stmt() IPragma_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IPragma_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IPragma_stmtContext)
}

func (s *Sql_stmtContext) Reindex_stmt() IReindex_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IReindex_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IReindex_stmtContext)
}

func (s *Sql_stmtContext) Release_stmt() IRelease_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IRelease_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IRelease_stmtContext)
}

func (s *Sql_stmtContext) Rollback_stmt() IRollback_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IRollback_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IRollback_stmtContext)
}

func (s *Sql_stmtContext) Savepoint_stmt() ISavepoint_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISavepoint_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISavepoint_stmtContext)
}

func (s *Sql_stmtContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Sql_stmtContext) Update_stmt() IUpdate_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IUpdate_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IUpdate_stmtContext)
}

func (s *Sql_stmtContext) Update_stmt_limited() IUpdate_stmt_limitedContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IUpdate_stmt_limitedContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IUpdate_stmt_limitedContext)
}

func (s *Sql_stmtContext) Vacuum_stmt() IVacuum_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IVacuum_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IVacuum_stmtContext)
}

func (s *Sql_stmtContext) EXPLAIN_() antlr.TerminalNode {
	return s.GetToken(ParserEXPLAIN_, 0)
}

func (s *Sql_stmtContext) QUERY_() antlr.TerminalNode {
	return s.GetToken(ParserQUERY_, 0)
}

func (s *Sql_stmtContext) PLAN_() antlr.TerminalNode {
	return s.GetToken(ParserPLAN_, 0)
}

func (s *Sql_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Sql_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Sql_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSql_stmt(s)
	}
}

func (s *Sql_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSql_stmt(s)
	}
}

func (s *Sql_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSql_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Sql_stmt() (localctx ISql_stmtContext) {
	localctx = NewSql_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 4, ParserRULE_sql_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(263)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserEXPLAIN_ {
		{
			p.SetState(258)
			p.Match(ParserEXPLAIN_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(261)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserQUERY_ {
			{
				p.SetState(259)
				p.Match(ParserQUERY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(260)
				p.Match(ParserPLAN_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}

	}
	p.SetState(289)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(265)
			p.Alter_table_stmt()
		}

	case 2:
		{
			p.SetState(266)
			p.Analyze_stmt()
		}

	case 3:
		{
			p.SetState(267)
			p.Attach_stmt()
		}

	case 4:
		{
			p.SetState(268)
			p.Begin_stmt()
		}

	case 5:
		{
			p.SetState(269)
			p.Commit_stmt()
		}

	case 6:
		{
			p.SetState(270)
			p.Create_index_stmt()
		}

	case 7:
		{
			p.SetState(271)
			p.Create_table_stmt()
		}

	case 8:
		{
			p.SetState(272)
			p.Create_trigger_stmt()
		}

	case 9:
		{
			p.SetState(273)
			p.Create_view_stmt()
		}

	case 10:
		{
			p.SetState(274)
			p.Create_virtual_table_stmt()
		}

	case 11:
		{
			p.SetState(275)
			p.Delete_stmt()
		}

	case 12:
		{
			p.SetState(276)
			p.Delete_stmt_limited()
		}

	case 13:
		{
			p.SetState(277)
			p.Detach_stmt()
		}

	case 14:
		{
			p.SetState(278)
			p.Drop_stmt()
		}

	case 15:
		{
			p.SetState(279)
			p.Insert_stmt()
		}

	case 16:
		{
			p.SetState(280)
			p.Pragma_stmt()
		}

	case 17:
		{
			p.SetState(281)
			p.Reindex_stmt()
		}

	case 18:
		{
			p.SetState(282)
			p.Release_stmt()
		}

	case 19:
		{
			p.SetState(283)
			p.Rollback_stmt()
		}

	case 20:
		{
			p.SetState(284)
			p.Savepoint_stmt()
		}

	case 21:
		{
			p.SetState(285)
			p.Select_stmt()
		}

	case 22:
		{
			p.SetState(286)
			p.Update_stmt()
		}

	case 23:
		{
			p.SetState(287)
			p.Update_stmt_limited()
		}

	case 24:
		{
			p.SetState(288)
			p.Vacuum_stmt()
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAlter_table_stmtContext is an interface to support dynamic dispatch.
type IAlter_table_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// GetNew_table_name returns the new_table_name rule contexts.
	GetNew_table_name() ITable_nameContext

	// GetOld_column_name returns the old_column_name rule contexts.
	GetOld_column_name() IColumn_nameContext

	// GetNew_column_name returns the new_column_name rule contexts.
	GetNew_column_name() IColumn_nameContext

	// SetNew_table_name sets the new_table_name rule contexts.
	SetNew_table_name(ITable_nameContext)

	// SetOld_column_name sets the old_column_name rule contexts.
	SetOld_column_name(IColumn_nameContext)

	// SetNew_column_name sets the new_column_name rule contexts.
	SetNew_column_name(IColumn_nameContext)

	// Getter signatures
	ALTER_() antlr.TerminalNode
	TABLE_() antlr.TerminalNode
	AllTable_name() []ITable_nameContext
	Table_name(i int) ITable_nameContext
	RENAME_() antlr.TerminalNode
	ADD_() antlr.TerminalNode
	Column_def() IColumn_defContext
	DROP_() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	TO_() antlr.TerminalNode
	COLUMN_() antlr.TerminalNode

	// IsAlter_table_stmtContext differentiates from other interfaces.
	IsAlter_table_stmtContext()
}

type Alter_table_stmtContext struct {
	antlr.BaseParserRuleContext
	parser          antlr.Parser
	new_table_name  ITable_nameContext
	old_column_name IColumn_nameContext
	new_column_name IColumn_nameContext
}

func NewEmptyAlter_table_stmtContext() *Alter_table_stmtContext {
	var p = new(Alter_table_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_alter_table_stmt
	return p
}

func InitEmptyAlter_table_stmtContext(p *Alter_table_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_alter_table_stmt
}

func (*Alter_table_stmtContext) IsAlter_table_stmtContext() {}

func NewAlter_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Alter_table_stmtContext {
	var p = new(Alter_table_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_alter_table_stmt

	return p
}

func (s *Alter_table_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Alter_table_stmtContext) GetNew_table_name() ITable_nameContext { return s.new_table_name }

func (s *Alter_table_stmtContext) GetOld_column_name() IColumn_nameContext { return s.old_column_name }

func (s *Alter_table_stmtContext) GetNew_column_name() IColumn_nameContext { return s.new_column_name }

func (s *Alter_table_stmtContext) SetNew_table_name(v ITable_nameContext) { s.new_table_name = v }

func (s *Alter_table_stmtContext) SetOld_column_name(v IColumn_nameContext) { s.old_column_name = v }

func (s *Alter_table_stmtContext) SetNew_column_name(v IColumn_nameContext) { s.new_column_name = v }

func (s *Alter_table_stmtContext) ALTER_() antlr.TerminalNode {
	return s.GetToken(ParserALTER_, 0)
}

func (s *Alter_table_stmtContext) TABLE_() antlr.TerminalNode {
	return s.GetToken(ParserTABLE_, 0)
}

func (s *Alter_table_stmtContext) AllTable_name() []ITable_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ITable_nameContext); ok {
			len++
		}
	}

	tst := make([]ITable_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ITable_nameContext); ok {
			tst[i] = t.(ITable_nameContext)
			i++
		}
	}

	return tst
}

func (s *Alter_table_stmtContext) Table_name(i int) ITable_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Alter_table_stmtContext) RENAME_() antlr.TerminalNode {
	return s.GetToken(ParserRENAME_, 0)
}

func (s *Alter_table_stmtContext) ADD_() antlr.TerminalNode {
	return s.GetToken(ParserADD_, 0)
}

func (s *Alter_table_stmtContext) Column_def() IColumn_defContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_defContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_defContext)
}

func (s *Alter_table_stmtContext) DROP_() antlr.TerminalNode {
	return s.GetToken(ParserDROP_, 0)
}

func (s *Alter_table_stmtContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Alter_table_stmtContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Alter_table_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Alter_table_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Alter_table_stmtContext) TO_() antlr.TerminalNode {
	return s.GetToken(ParserTO_, 0)
}

func (s *Alter_table_stmtContext) COLUMN_() antlr.TerminalNode {
	return s.GetToken(ParserCOLUMN_, 0)
}

func (s *Alter_table_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Alter_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Alter_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAlter_table_stmt(s)
	}
}

func (s *Alter_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAlter_table_stmt(s)
	}
}

func (s *Alter_table_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAlter_table_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Alter_table_stmt() (localctx IAlter_table_stmtContext) {
	localctx = NewAlter_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 6, ParserRULE_alter_table_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(291)
		p.Match(ParserALTER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(292)
		p.Match(ParserTABLE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(296)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(293)
			p.Schema_name()
		}
		{
			p.SetState(294)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(298)
		p.Table_name()
	}
	p.SetState(321)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserRENAME_:
		{
			p.SetState(299)
			p.Match(ParserRENAME_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(309)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 10, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(300)
				p.Match(ParserTO_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(301)

				var _x = p.Table_name()

				localctx.(*Alter_table_stmtContext).new_table_name = _x
			}

		case 2:
			p.SetState(303)
			p.GetErrorHandler().Sync(p)

			if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 9, p.GetParserRuleContext()) == 1 {
				{
					p.SetState(302)
					p.Match(ParserCOLUMN_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			} else if p.HasError() { // JIM
				goto errorExit
			}
			{
				p.SetState(305)

				var _x = p.Column_name()

				localctx.(*Alter_table_stmtContext).old_column_name = _x
			}
			{
				p.SetState(306)
				p.Match(ParserTO_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(307)

				var _x = p.Column_name()

				localctx.(*Alter_table_stmtContext).new_column_name = _x
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}

	case ParserADD_:
		{
			p.SetState(311)
			p.Match(ParserADD_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(313)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 11, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(312)
				p.Match(ParserCOLUMN_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(315)
			p.Column_def()
		}

	case ParserDROP_:
		{
			p.SetState(316)
			p.Match(ParserDROP_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(318)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(317)
				p.Match(ParserCOLUMN_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(320)
			p.Column_name()
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAnalyze_stmtContext is an interface to support dynamic dispatch.
type IAnalyze_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ANALYZE_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	Table_or_index_name() ITable_or_index_nameContext
	DOT() antlr.TerminalNode

	// IsAnalyze_stmtContext differentiates from other interfaces.
	IsAnalyze_stmtContext()
}

type Analyze_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAnalyze_stmtContext() *Analyze_stmtContext {
	var p = new(Analyze_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_analyze_stmt
	return p
}

func InitEmptyAnalyze_stmtContext(p *Analyze_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_analyze_stmt
}

func (*Analyze_stmtContext) IsAnalyze_stmtContext() {}

func NewAnalyze_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Analyze_stmtContext {
	var p = new(Analyze_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_analyze_stmt

	return p
}

func (s *Analyze_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Analyze_stmtContext) ANALYZE_() antlr.TerminalNode {
	return s.GetToken(ParserANALYZE_, 0)
}

func (s *Analyze_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Analyze_stmtContext) Table_or_index_name() ITable_or_index_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_or_index_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_or_index_nameContext)
}

func (s *Analyze_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Analyze_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Analyze_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Analyze_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAnalyze_stmt(s)
	}
}

func (s *Analyze_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAnalyze_stmt(s)
	}
}

func (s *Analyze_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAnalyze_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Analyze_stmt() (localctx IAnalyze_stmtContext) {
	localctx = NewAnalyze_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 8, ParserRULE_analyze_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(323)
		p.Match(ParserANALYZE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(331)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(324)
			p.Schema_name()
		}

	} else if p.HasError() { // JIM
		goto errorExit
	} else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 2 {
		p.SetState(328)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(325)
				p.Schema_name()
			}
			{
				p.SetState(326)
				p.Match(ParserDOT)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(330)
			p.Table_or_index_name()
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAttach_stmtContext is an interface to support dynamic dispatch.
type IAttach_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ATTACH_() antlr.TerminalNode
	Expr() IExprContext
	AS_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DATABASE_() antlr.TerminalNode

	// IsAttach_stmtContext differentiates from other interfaces.
	IsAttach_stmtContext()
}

type Attach_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAttach_stmtContext() *Attach_stmtContext {
	var p = new(Attach_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_attach_stmt
	return p
}

func InitEmptyAttach_stmtContext(p *Attach_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_attach_stmt
}

func (*Attach_stmtContext) IsAttach_stmtContext() {}

func NewAttach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Attach_stmtContext {
	var p = new(Attach_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_attach_stmt

	return p
}

func (s *Attach_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Attach_stmtContext) ATTACH_() antlr.TerminalNode {
	return s.GetToken(ParserATTACH_, 0)
}

func (s *Attach_stmtContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Attach_stmtContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Attach_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Attach_stmtContext) DATABASE_() antlr.TerminalNode {
	return s.GetToken(ParserDATABASE_, 0)
}

func (s *Attach_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Attach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Attach_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAttach_stmt(s)
	}
}

func (s *Attach_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAttach_stmt(s)
	}
}

func (s *Attach_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAttach_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Attach_stmt() (localctx IAttach_stmtContext) {
	localctx = NewAttach_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 10, ParserRULE_attach_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(333)
		p.Match(ParserATTACH_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(335)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(334)
			p.Match(ParserDATABASE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(337)
		p.expr(0)
	}
	{
		p.SetState(338)
		p.Match(ParserAS_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(339)
		p.Schema_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IBegin_stmtContext is an interface to support dynamic dispatch.
type IBegin_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	BEGIN_() antlr.TerminalNode
	TRANSACTION_() antlr.TerminalNode
	DEFERRED_() antlr.TerminalNode
	IMMEDIATE_() antlr.TerminalNode
	EXCLUSIVE_() antlr.TerminalNode
	Transaction_name() ITransaction_nameContext

	// IsBegin_stmtContext differentiates from other interfaces.
	IsBegin_stmtContext()
}

type Begin_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyBegin_stmtContext() *Begin_stmtContext {
	var p = new(Begin_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_begin_stmt
	return p
}

func InitEmptyBegin_stmtContext(p *Begin_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_begin_stmt
}

func (*Begin_stmtContext) IsBegin_stmtContext() {}

func NewBegin_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Begin_stmtContext {
	var p = new(Begin_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_begin_stmt

	return p
}

func (s *Begin_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Begin_stmtContext) BEGIN_() antlr.TerminalNode {
	return s.GetToken(ParserBEGIN_, 0)
}

func (s *Begin_stmtContext) TRANSACTION_() antlr.TerminalNode {
	return s.GetToken(ParserTRANSACTION_, 0)
}

func (s *Begin_stmtContext) DEFERRED_() antlr.TerminalNode {
	return s.GetToken(ParserDEFERRED_, 0)
}

func (s *Begin_stmtContext) IMMEDIATE_() antlr.TerminalNode {
	return s.GetToken(ParserIMMEDIATE_, 0)
}

func (s *Begin_stmtContext) EXCLUSIVE_() antlr.TerminalNode {
	return s.GetToken(ParserEXCLUSIVE_, 0)
}

func (s *Begin_stmtContext) Transaction_name() ITransaction_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITransaction_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITransaction_nameContext)
}

func (s *Begin_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Begin_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Begin_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterBegin_stmt(s)
	}
}

func (s *Begin_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitBegin_stmt(s)
	}
}

func (s *Begin_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitBegin_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Begin_stmt() (localctx IBegin_stmtContext) {
	localctx = NewBegin_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 12, ParserRULE_begin_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(341)
		p.Match(ParserBEGIN_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(343)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if (int64((_la-58)) & ^0x3f) == 0 && ((int64(1)<<(_la-58))&16779265) != 0 {
		{
			p.SetState(342)
			_la = p.GetTokenStream().LA(1)

			if !((int64((_la-58)) & ^0x3f) == 0 && ((int64(1)<<(_la-58))&16779265) != 0) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	}
	p.SetState(349)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserTRANSACTION_ {
		{
			p.SetState(345)
			p.Match(ParserTRANSACTION_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(347)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(346)
				p.Transaction_name()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICommit_stmtContext is an interface to support dynamic dispatch.
type ICommit_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	COMMIT_() antlr.TerminalNode
	END_() antlr.TerminalNode
	TRANSACTION_() antlr.TerminalNode

	// IsCommit_stmtContext differentiates from other interfaces.
	IsCommit_stmtContext()
}

type Commit_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCommit_stmtContext() *Commit_stmtContext {
	var p = new(Commit_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_commit_stmt
	return p
}

func InitEmptyCommit_stmtContext(p *Commit_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_commit_stmt
}

func (*Commit_stmtContext) IsCommit_stmtContext() {}

func NewCommit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Commit_stmtContext {
	var p = new(Commit_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_commit_stmt

	return p
}

func (s *Commit_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Commit_stmtContext) COMMIT_() antlr.TerminalNode {
	return s.GetToken(ParserCOMMIT_, 0)
}

func (s *Commit_stmtContext) END_() antlr.TerminalNode {
	return s.GetToken(ParserEND_, 0)
}

func (s *Commit_stmtContext) TRANSACTION_() antlr.TerminalNode {
	return s.GetToken(ParserTRANSACTION_, 0)
}

func (s *Commit_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Commit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Commit_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCommit_stmt(s)
	}
}

func (s *Commit_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCommit_stmt(s)
	}
}

func (s *Commit_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCommit_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Commit_stmt() (localctx ICommit_stmtContext) {
	localctx = NewCommit_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 14, ParserRULE_commit_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(351)
		_la = p.GetTokenStream().LA(1)

		if !(_la == ParserCOMMIT_ || _la == ParserEND_) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}
	p.SetState(353)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserTRANSACTION_ {
		{
			p.SetState(352)
			p.Match(ParserTRANSACTION_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IRollback_stmtContext is an interface to support dynamic dispatch.
type IRollback_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ROLLBACK_() antlr.TerminalNode
	TRANSACTION_() antlr.TerminalNode
	TO_() antlr.TerminalNode
	Savepoint_name() ISavepoint_nameContext
	SAVEPOINT_() antlr.TerminalNode

	// IsRollback_stmtContext differentiates from other interfaces.
	IsRollback_stmtContext()
}

type Rollback_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyRollback_stmtContext() *Rollback_stmtContext {
	var p = new(Rollback_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_rollback_stmt
	return p
}

func InitEmptyRollback_stmtContext(p *Rollback_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_rollback_stmt
}

func (*Rollback_stmtContext) IsRollback_stmtContext() {}

func NewRollback_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Rollback_stmtContext {
	var p = new(Rollback_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_rollback_stmt

	return p
}

func (s *Rollback_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Rollback_stmtContext) ROLLBACK_() antlr.TerminalNode {
	return s.GetToken(ParserROLLBACK_, 0)
}

func (s *Rollback_stmtContext) TRANSACTION_() antlr.TerminalNode {
	return s.GetToken(ParserTRANSACTION_, 0)
}

func (s *Rollback_stmtContext) TO_() antlr.TerminalNode {
	return s.GetToken(ParserTO_, 0)
}

func (s *Rollback_stmtContext) Savepoint_name() ISavepoint_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISavepoint_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISavepoint_nameContext)
}

func (s *Rollback_stmtContext) SAVEPOINT_() antlr.TerminalNode {
	return s.GetToken(ParserSAVEPOINT_, 0)
}

func (s *Rollback_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Rollback_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Rollback_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterRollback_stmt(s)
	}
}

func (s *Rollback_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitRollback_stmt(s)
	}
}

func (s *Rollback_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitRollback_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Rollback_stmt() (localctx IRollback_stmtContext) {
	localctx = NewRollback_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 16, ParserRULE_rollback_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(355)
		p.Match(ParserROLLBACK_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(357)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserTRANSACTION_ {
		{
			p.SetState(356)
			p.Match(ParserTRANSACTION_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	p.SetState(364)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserTO_ {
		{
			p.SetState(359)
			p.Match(ParserTO_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(361)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 22, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(360)
				p.Match(ParserSAVEPOINT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(363)
			p.Savepoint_name()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISavepoint_stmtContext is an interface to support dynamic dispatch.
type ISavepoint_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	SAVEPOINT_() antlr.TerminalNode
	Savepoint_name() ISavepoint_nameContext

	// IsSavepoint_stmtContext differentiates from other interfaces.
	IsSavepoint_stmtContext()
}

type Savepoint_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySavepoint_stmtContext() *Savepoint_stmtContext {
	var p = new(Savepoint_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_savepoint_stmt
	return p
}

func InitEmptySavepoint_stmtContext(p *Savepoint_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_savepoint_stmt
}

func (*Savepoint_stmtContext) IsSavepoint_stmtContext() {}

func NewSavepoint_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_stmtContext {
	var p = new(Savepoint_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_savepoint_stmt

	return p
}

func (s *Savepoint_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Savepoint_stmtContext) SAVEPOINT_() antlr.TerminalNode {
	return s.GetToken(ParserSAVEPOINT_, 0)
}

func (s *Savepoint_stmtContext) Savepoint_name() ISavepoint_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISavepoint_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISavepoint_nameContext)
}

func (s *Savepoint_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Savepoint_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Savepoint_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSavepoint_stmt(s)
	}
}

func (s *Savepoint_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSavepoint_stmt(s)
	}
}

func (s *Savepoint_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSavepoint_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Savepoint_stmt() (localctx ISavepoint_stmtContext) {
	localctx = NewSavepoint_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 18, ParserRULE_savepoint_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(366)
		p.Match(ParserSAVEPOINT_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(367)
		p.Savepoint_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IRelease_stmtContext is an interface to support dynamic dispatch.
type IRelease_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	RELEASE_() antlr.TerminalNode
	Savepoint_name() ISavepoint_nameContext
	SAVEPOINT_() antlr.TerminalNode

	// IsRelease_stmtContext differentiates from other interfaces.
	IsRelease_stmtContext()
}

type Release_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyRelease_stmtContext() *Release_stmtContext {
	var p = new(Release_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_release_stmt
	return p
}

func InitEmptyRelease_stmtContext(p *Release_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_release_stmt
}

func (*Release_stmtContext) IsRelease_stmtContext() {}

func NewRelease_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Release_stmtContext {
	var p = new(Release_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_release_stmt

	return p
}

func (s *Release_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Release_stmtContext) RELEASE_() antlr.TerminalNode {
	return s.GetToken(ParserRELEASE_, 0)
}

func (s *Release_stmtContext) Savepoint_name() ISavepoint_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISavepoint_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISavepoint_nameContext)
}

func (s *Release_stmtContext) SAVEPOINT_() antlr.TerminalNode {
	return s.GetToken(ParserSAVEPOINT_, 0)
}

func (s *Release_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Release_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Release_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterRelease_stmt(s)
	}
}

func (s *Release_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitRelease_stmt(s)
	}
}

func (s *Release_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitRelease_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Release_stmt() (localctx IRelease_stmtContext) {
	localctx = NewRelease_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 20, ParserRULE_release_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(369)
		p.Match(ParserRELEASE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(371)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 24, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(370)
			p.Match(ParserSAVEPOINT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(373)
		p.Savepoint_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICreate_index_stmtContext is an interface to support dynamic dispatch.
type ICreate_index_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	CREATE_() antlr.TerminalNode
	INDEX_() antlr.TerminalNode
	Index_name() IIndex_nameContext
	ON_() antlr.TerminalNode
	Table_name() ITable_nameContext
	OPEN_PAR() antlr.TerminalNode
	AllIndexed_column() []IIndexed_columnContext
	Indexed_column(i int) IIndexed_columnContext
	CLOSE_PAR() antlr.TerminalNode
	UNIQUE_() antlr.TerminalNode
	IF_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	EXISTS_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	WHERE_() antlr.TerminalNode
	Expr() IExprContext

	// IsCreate_index_stmtContext differentiates from other interfaces.
	IsCreate_index_stmtContext()
}

type Create_index_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCreate_index_stmtContext() *Create_index_stmtContext {
	var p = new(Create_index_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_index_stmt
	return p
}

func InitEmptyCreate_index_stmtContext(p *Create_index_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_index_stmt
}

func (*Create_index_stmtContext) IsCreate_index_stmtContext() {}

func NewCreate_index_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_index_stmtContext {
	var p = new(Create_index_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_create_index_stmt

	return p
}

func (s *Create_index_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Create_index_stmtContext) CREATE_() antlr.TerminalNode {
	return s.GetToken(ParserCREATE_, 0)
}

func (s *Create_index_stmtContext) INDEX_() antlr.TerminalNode {
	return s.GetToken(ParserINDEX_, 0)
}

func (s *Create_index_stmtContext) Index_name() IIndex_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IIndex_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IIndex_nameContext)
}

func (s *Create_index_stmtContext) ON_() antlr.TerminalNode {
	return s.GetToken(ParserON_, 0)
}

func (s *Create_index_stmtContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Create_index_stmtContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Create_index_stmtContext) AllIndexed_column() []IIndexed_columnContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IIndexed_columnContext); ok {
			len++
		}
	}

	tst := make([]IIndexed_columnContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IIndexed_columnContext); ok {
			tst[i] = t.(IIndexed_columnContext)
			i++
		}
	}

	return tst
}

func (s *Create_index_stmtContext) Indexed_column(i int) IIndexed_columnContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IIndexed_columnContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IIndexed_columnContext)
}

func (s *Create_index_stmtContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Create_index_stmtContext) UNIQUE_() antlr.TerminalNode {
	return s.GetToken(ParserUNIQUE_, 0)
}

func (s *Create_index_stmtContext) IF_() antlr.TerminalNode {
	return s.GetToken(ParserIF_, 0)
}

func (s *Create_index_stmtContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Create_index_stmtContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *Create_index_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Create_index_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Create_index_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Create_index_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Create_index_stmtContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *Create_index_stmtContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Create_index_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Create_index_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Create_index_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCreate_index_stmt(s)
	}
}

func (s *Create_index_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCreate_index_stmt(s)
	}
}

func (s *Create_index_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCreate_index_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Create_index_stmt() (localctx ICreate_index_stmtContext) {
	localctx = NewCreate_index_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 22, ParserRULE_create_index_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(375)
		p.Match(ParserCREATE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(377)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserUNIQUE_ {
		{
			p.SetState(376)
			p.Match(ParserUNIQUE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	{
		p.SetState(379)
		p.Match(ParserINDEX_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(383)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(380)
			p.Match(ParserIF_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(381)
			p.Match(ParserNOT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(382)
			p.Match(ParserEXISTS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(388)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(385)
			p.Schema_name()
		}
		{
			p.SetState(386)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(390)
		p.Index_name()
	}
	{
		p.SetState(391)
		p.Match(ParserON_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(392)
		p.Table_name()
	}
	{
		p.SetState(393)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(394)
		p.Indexed_column()
	}
	p.SetState(399)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(395)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(396)
			p.Indexed_column()
		}

		p.SetState(401)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(402)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(405)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWHERE_ {
		{
			p.SetState(403)
			p.Match(ParserWHERE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(404)
			p.expr(0)
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IIndexed_columnContext is an interface to support dynamic dispatch.
type IIndexed_columnContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Column_name() IColumn_nameContext
	Expr() IExprContext
	COLLATE_() antlr.TerminalNode
	Collation_name() ICollation_nameContext
	Asc_desc() IAsc_descContext

	// IsIndexed_columnContext differentiates from other interfaces.
	IsIndexed_columnContext()
}

type Indexed_columnContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyIndexed_columnContext() *Indexed_columnContext {
	var p = new(Indexed_columnContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_indexed_column
	return p
}

func InitEmptyIndexed_columnContext(p *Indexed_columnContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_indexed_column
}

func (*Indexed_columnContext) IsIndexed_columnContext() {}

func NewIndexed_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Indexed_columnContext {
	var p = new(Indexed_columnContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_indexed_column

	return p
}

func (s *Indexed_columnContext) GetParser() antlr.Parser { return s.parser }

func (s *Indexed_columnContext) Column_name() IColumn_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Indexed_columnContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Indexed_columnContext) COLLATE_() antlr.TerminalNode {
	return s.GetToken(ParserCOLLATE_, 0)
}

func (s *Indexed_columnContext) Collation_name() ICollation_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICollation_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICollation_nameContext)
}

func (s *Indexed_columnContext) Asc_desc() IAsc_descContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAsc_descContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAsc_descContext)
}

func (s *Indexed_columnContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Indexed_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Indexed_columnContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterIndexed_column(s)
	}
}

func (s *Indexed_columnContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitIndexed_column(s)
	}
}

func (s *Indexed_columnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitIndexed_column(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Indexed_column() (localctx IIndexed_columnContext) {
	localctx = NewIndexed_columnContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 24, ParserRULE_indexed_column)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(409)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(407)
			p.Column_name()
		}

	case 2:
		{
			p.SetState(408)
			p.expr(0)
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}
	p.SetState(413)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserCOLLATE_ {
		{
			p.SetState(411)
			p.Match(ParserCOLLATE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(412)
			p.Collation_name()
		}

	}
	p.SetState(416)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserASC_ || _la == ParserDESC_ {
		{
			p.SetState(415)
			p.Asc_desc()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICreate_table_stmtContext is an interface to support dynamic dispatch.
type ICreate_table_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// GetRow_ROW_ID returns the row_ROW_ID token.
	GetRow_ROW_ID() antlr.Token

	// SetRow_ROW_ID sets the row_ROW_ID token.
	SetRow_ROW_ID(antlr.Token)

	// Getter signatures
	CREATE_() antlr.TerminalNode
	TABLE_() antlr.TerminalNode
	Table_name() ITable_nameContext
	OPEN_PAR() antlr.TerminalNode
	AllColumn_def() []IColumn_defContext
	Column_def(i int) IColumn_defContext
	CLOSE_PAR() antlr.TerminalNode
	AS_() antlr.TerminalNode
	Select_stmt() ISelect_stmtContext
	IF_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	EXISTS_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	TEMP_() antlr.TerminalNode
	TEMPORARY_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	AllTable_constraint() []ITable_constraintContext
	Table_constraint(i int) ITable_constraintContext
	WITHOUT_() antlr.TerminalNode
	IDENTIFIER() antlr.TerminalNode

	// IsCreate_table_stmtContext differentiates from other interfaces.
	IsCreate_table_stmtContext()
}

type Create_table_stmtContext struct {
	antlr.BaseParserRuleContext
	parser     antlr.Parser
	row_ROW_ID antlr.Token
}

func NewEmptyCreate_table_stmtContext() *Create_table_stmtContext {
	var p = new(Create_table_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_table_stmt
	return p
}

func InitEmptyCreate_table_stmtContext(p *Create_table_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_table_stmt
}

func (*Create_table_stmtContext) IsCreate_table_stmtContext() {}

func NewCreate_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_table_stmtContext {
	var p = new(Create_table_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_create_table_stmt

	return p
}

func (s *Create_table_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Create_table_stmtContext) GetRow_ROW_ID() antlr.Token { return s.row_ROW_ID }

func (s *Create_table_stmtContext) SetRow_ROW_ID(v antlr.Token) { s.row_ROW_ID = v }

func (s *Create_table_stmtContext) CREATE_() antlr.TerminalNode {
	return s.GetToken(ParserCREATE_, 0)
}

func (s *Create_table_stmtContext) TABLE_() antlr.TerminalNode {
	return s.GetToken(ParserTABLE_, 0)
}

func (s *Create_table_stmtContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Create_table_stmtContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Create_table_stmtContext) AllColumn_def() []IColumn_defContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_defContext); ok {
			len++
		}
	}

	tst := make([]IColumn_defContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_defContext); ok {
			tst[i] = t.(IColumn_defContext)
			i++
		}
	}

	return tst
}

func (s *Create_table_stmtContext) Column_def(i int) IColumn_defContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_defContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_defContext)
}

func (s *Create_table_stmtContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Create_table_stmtContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Create_table_stmtContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Create_table_stmtContext) IF_() antlr.TerminalNode {
	return s.GetToken(ParserIF_, 0)
}

func (s *Create_table_stmtContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Create_table_stmtContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *Create_table_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Create_table_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Create_table_stmtContext) TEMP_() antlr.TerminalNode {
	return s.GetToken(ParserTEMP_, 0)
}

func (s *Create_table_stmtContext) TEMPORARY_() antlr.TerminalNode {
	return s.GetToken(ParserTEMPORARY_, 0)
}

func (s *Create_table_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Create_table_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Create_table_stmtContext) AllTable_constraint() []ITable_constraintContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ITable_constraintContext); ok {
			len++
		}
	}

	tst := make([]ITable_constraintContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ITable_constraintContext); ok {
			tst[i] = t.(ITable_constraintContext)
			i++
		}
	}

	return tst
}

func (s *Create_table_stmtContext) Table_constraint(i int) ITable_constraintContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_constraintContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_constraintContext)
}

func (s *Create_table_stmtContext) WITHOUT_() antlr.TerminalNode {
	return s.GetToken(ParserWITHOUT_, 0)
}

func (s *Create_table_stmtContext) IDENTIFIER() antlr.TerminalNode {
	return s.GetToken(ParserIDENTIFIER, 0)
}

func (s *Create_table_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Create_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Create_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCreate_table_stmt(s)
	}
}

func (s *Create_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCreate_table_stmt(s)
	}
}

func (s *Create_table_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCreate_table_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Create_table_stmt() (localctx ICreate_table_stmtContext) {
	localctx = NewCreate_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 26, ParserRULE_create_table_stmt)
	var _la int

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(418)
		p.Match(ParserCREATE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(420)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserTEMP_ || _la == ParserTEMPORARY_ {
		{
			p.SetState(419)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserTEMP_ || _la == ParserTEMPORARY_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	}
	{
		p.SetState(422)
		p.Match(ParserTABLE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(426)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 34, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(423)
			p.Match(ParserIF_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(424)
			p.Match(ParserNOT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(425)
			p.Match(ParserEXISTS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(431)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 35, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(428)
			p.Schema_name()
		}
		{
			p.SetState(429)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(433)
		p.Table_name()
	}
	p.SetState(457)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserOPEN_PAR:
		{
			p.SetState(434)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(435)
			p.Column_def()
		}
		p.SetState(440)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
		for _alt != 1 && _alt != antlr.ATNInvalidAltNumber {
			if _alt == 1+1 {
				{
					p.SetState(436)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(437)
					p.Column_def()
				}

			}
			p.SetState(442)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext())
			if p.HasError() {
				goto errorExit
			}
		}
		p.SetState(447)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(443)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(444)
				p.Table_constraint()
			}

			p.SetState(449)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(450)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(453)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserWITHOUT_ {
			{
				p.SetState(451)
				p.Match(ParserWITHOUT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(452)

				var _m = p.Match(ParserIDENTIFIER)

				localctx.(*Create_table_stmtContext).row_ROW_ID = _m
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}

	case ParserAS_:
		{
			p.SetState(455)
			p.Match(ParserAS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(456)
			p.Select_stmt()
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IColumn_defContext is an interface to support dynamic dispatch.
type IColumn_defContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Column_name() IColumn_nameContext
	Type_name() IType_nameContext
	AllColumn_constraint() []IColumn_constraintContext
	Column_constraint(i int) IColumn_constraintContext

	// IsColumn_defContext differentiates from other interfaces.
	IsColumn_defContext()
}

type Column_defContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyColumn_defContext() *Column_defContext {
	var p = new(Column_defContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_def
	return p
}

func InitEmptyColumn_defContext(p *Column_defContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_def
}

func (*Column_defContext) IsColumn_defContext() {}

func NewColumn_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_defContext {
	var p = new(Column_defContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_column_def

	return p
}

func (s *Column_defContext) GetParser() antlr.Parser { return s.parser }

func (s *Column_defContext) Column_name() IColumn_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Column_defContext) Type_name() IType_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IType_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IType_nameContext)
}

func (s *Column_defContext) AllColumn_constraint() []IColumn_constraintContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_constraintContext); ok {
			len++
		}
	}

	tst := make([]IColumn_constraintContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_constraintContext); ok {
			tst[i] = t.(IColumn_constraintContext)
			i++
		}
	}

	return tst
}

func (s *Column_defContext) Column_constraint(i int) IColumn_constraintContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_constraintContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_constraintContext)
}

func (s *Column_defContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Column_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Column_defContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterColumn_def(s)
	}
}

func (s *Column_defContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitColumn_def(s)
	}
}

func (s *Column_defContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitColumn_def(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Column_def() (localctx IColumn_defContext) {
	localctx = NewColumn_defContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 28, ParserRULE_column_def)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(459)
		p.Column_name()
	}
	p.SetState(461)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 40, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(460)
			p.Type_name()
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(466)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&72673329139417088) != 0) || ((int64((_la-102)) & ^0x3f) == 0 && ((int64(1)<<(_la-102))&274877941761) != 0) || _la == ParserGENERATED_ {
		{
			p.SetState(463)
			p.Column_constraint()
		}

		p.SetState(468)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IType_nameContext is an interface to support dynamic dispatch.
type IType_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllName() []INameContext
	Name(i int) INameContext
	OPEN_PAR() antlr.TerminalNode
	AllSigned_number() []ISigned_numberContext
	Signed_number(i int) ISigned_numberContext
	CLOSE_PAR() antlr.TerminalNode
	COMMA() antlr.TerminalNode

	// IsType_nameContext differentiates from other interfaces.
	IsType_nameContext()
}

type Type_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyType_nameContext() *Type_nameContext {
	var p = new(Type_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_type_name
	return p
}

func InitEmptyType_nameContext(p *Type_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_type_name
}

func (*Type_nameContext) IsType_nameContext() {}

func NewType_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_nameContext {
	var p = new(Type_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_type_name

	return p
}

func (s *Type_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Type_nameContext) AllName() []INameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(INameContext); ok {
			len++
		}
	}

	tst := make([]INameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(INameContext); ok {
			tst[i] = t.(INameContext)
			i++
		}
	}

	return tst
}

func (s *Type_nameContext) Name(i int) INameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(INameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Type_nameContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Type_nameContext) AllSigned_number() []ISigned_numberContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ISigned_numberContext); ok {
			len++
		}
	}

	tst := make([]ISigned_numberContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ISigned_numberContext); ok {
			tst[i] = t.(ISigned_numberContext)
			i++
		}
	}

	return tst
}

func (s *Type_nameContext) Signed_number(i int) ISigned_numberContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISigned_numberContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISigned_numberContext)
}

func (s *Type_nameContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Type_nameContext) COMMA() antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, 0)
}

func (s *Type_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Type_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Type_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterType_name(s)
	}
}

func (s *Type_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitType_name(s)
	}
}

func (s *Type_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitType_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Type_name() (localctx IType_nameContext) {
	localctx = NewType_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 30, ParserRULE_type_name)
	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(470)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_alt = 1 + 1
	for ok := true; ok; ok = _alt != 1 && _alt != antlr.ATNInvalidAltNumber {
		switch _alt {
		case 1 + 1:
			{
				p.SetState(469)
				p.Name()
			}

		default:
			p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
			goto errorExit
		}

		p.SetState(472)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 42, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
	}
	p.SetState(484)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 43, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(474)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(475)
			p.Signed_number()
		}
		{
			p.SetState(476)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	} else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 43, p.GetParserRuleContext()) == 2 {
		{
			p.SetState(478)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(479)
			p.Signed_number()
		}
		{
			p.SetState(480)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(481)
			p.Signed_number()
		}
		{
			p.SetState(482)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IColumn_constraintContext is an interface to support dynamic dispatch.
type IColumn_constraintContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	CHECK_() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	Expr() IExprContext
	CLOSE_PAR() antlr.TerminalNode
	DEFAULT_() antlr.TerminalNode
	COLLATE_() antlr.TerminalNode
	Collation_name() ICollation_nameContext
	Foreign_key_clause() IForeign_key_clauseContext
	AS_() antlr.TerminalNode
	CONSTRAINT_() antlr.TerminalNode
	Name() INameContext
	PRIMARY_() antlr.TerminalNode
	KEY_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	NULL_() antlr.TerminalNode
	UNIQUE_() antlr.TerminalNode
	Signed_number() ISigned_numberContext
	Literal_value() ILiteral_valueContext
	Conflict_clause() IConflict_clauseContext
	GENERATED_() antlr.TerminalNode
	ALWAYS_() antlr.TerminalNode
	STORED_() antlr.TerminalNode
	VIRTUAL_() antlr.TerminalNode
	Asc_desc() IAsc_descContext
	AUTOINCREMENT_() antlr.TerminalNode

	// IsColumn_constraintContext differentiates from other interfaces.
	IsColumn_constraintContext()
}

type Column_constraintContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyColumn_constraintContext() *Column_constraintContext {
	var p = new(Column_constraintContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_constraint
	return p
}

func InitEmptyColumn_constraintContext(p *Column_constraintContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_constraint
}

func (*Column_constraintContext) IsColumn_constraintContext() {}

func NewColumn_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_constraintContext {
	var p = new(Column_constraintContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_column_constraint

	return p
}

func (s *Column_constraintContext) GetParser() antlr.Parser { return s.parser }

func (s *Column_constraintContext) CHECK_() antlr.TerminalNode {
	return s.GetToken(ParserCHECK_, 0)
}

func (s *Column_constraintContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Column_constraintContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Column_constraintContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Column_constraintContext) DEFAULT_() antlr.TerminalNode {
	return s.GetToken(ParserDEFAULT_, 0)
}

func (s *Column_constraintContext) COLLATE_() antlr.TerminalNode {
	return s.GetToken(ParserCOLLATE_, 0)
}

func (s *Column_constraintContext) Collation_name() ICollation_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICollation_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICollation_nameContext)
}

func (s *Column_constraintContext) Foreign_key_clause() IForeign_key_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IForeign_key_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IForeign_key_clauseContext)
}

func (s *Column_constraintContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Column_constraintContext) CONSTRAINT_() antlr.TerminalNode {
	return s.GetToken(ParserCONSTRAINT_, 0)
}

func (s *Column_constraintContext) Name() INameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(INameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Column_constraintContext) PRIMARY_() antlr.TerminalNode {
	return s.GetToken(ParserPRIMARY_, 0)
}

func (s *Column_constraintContext) KEY_() antlr.TerminalNode {
	return s.GetToken(ParserKEY_, 0)
}

func (s *Column_constraintContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Column_constraintContext) NULL_() antlr.TerminalNode {
	return s.GetToken(ParserNULL_, 0)
}

func (s *Column_constraintContext) UNIQUE_() antlr.TerminalNode {
	return s.GetToken(ParserUNIQUE_, 0)
}

func (s *Column_constraintContext) Signed_number() ISigned_numberContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISigned_numberContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISigned_numberContext)
}

func (s *Column_constraintContext) Literal_value() ILiteral_valueContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ILiteral_valueContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ILiteral_valueContext)
}

func (s *Column_constraintContext) Conflict_clause() IConflict_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IConflict_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IConflict_clauseContext)
}

func (s *Column_constraintContext) GENERATED_() antlr.TerminalNode {
	return s.GetToken(ParserGENERATED_, 0)
}

func (s *Column_constraintContext) ALWAYS_() antlr.TerminalNode {
	return s.GetToken(ParserALWAYS_, 0)
}

func (s *Column_constraintContext) STORED_() antlr.TerminalNode {
	return s.GetToken(ParserSTORED_, 0)
}

func (s *Column_constraintContext) VIRTUAL_() antlr.TerminalNode {
	return s.GetToken(ParserVIRTUAL_, 0)
}

func (s *Column_constraintContext) Asc_desc() IAsc_descContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAsc_descContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAsc_descContext)
}

func (s *Column_constraintContext) AUTOINCREMENT_() antlr.TerminalNode {
	return s.GetToken(ParserAUTOINCREMENT_, 0)
}

func (s *Column_constraintContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Column_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Column_constraintContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterColumn_constraint(s)
	}
}

func (s *Column_constraintContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitColumn_constraint(s)
	}
}

func (s *Column_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitColumn_constraint(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Column_constraint() (localctx IColumn_constraintContext) {
	localctx = NewColumn_constraintContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 32, ParserRULE_column_constraint)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(488)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserCONSTRAINT_ {
		{
			p.SetState(486)
			p.Match(ParserCONSTRAINT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(487)
			p.Name()
		}

	}
	p.SetState(537)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserPRIMARY_:
		{
			p.SetState(490)
			p.Match(ParserPRIMARY_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(491)
			p.Match(ParserKEY_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(493)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserASC_ || _la == ParserDESC_ {
			{
				p.SetState(492)
				p.Asc_desc()
			}

		}
		p.SetState(496)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserON_ {
			{
				p.SetState(495)
				p.Conflict_clause()
			}

		}
		p.SetState(499)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserAUTOINCREMENT_ {
			{
				p.SetState(498)
				p.Match(ParserAUTOINCREMENT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}

	case ParserNOT_, ParserUNIQUE_:
		p.SetState(504)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetTokenStream().LA(1) {
		case ParserNOT_:
			{
				p.SetState(501)
				p.Match(ParserNOT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(502)
				p.Match(ParserNULL_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case ParserUNIQUE_:
			{
				p.SetState(503)
				p.Match(ParserUNIQUE_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		default:
			p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
			goto errorExit
		}
		p.SetState(507)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserON_ {
			{
				p.SetState(506)
				p.Conflict_clause()
			}

		}

	case ParserCHECK_:
		{
			p.SetState(509)
			p.Match(ParserCHECK_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(510)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(511)
			p.expr(0)
		}
		{
			p.SetState(512)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserDEFAULT_:
		{
			p.SetState(514)
			p.Match(ParserDEFAULT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(521)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 50, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(515)
				p.Signed_number()
			}

		case 2:
			{
				p.SetState(516)
				p.Literal_value()
			}

		case 3:
			{
				p.SetState(517)
				p.Match(ParserOPEN_PAR)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(518)
				p.expr(0)
			}
			{
				p.SetState(519)
				p.Match(ParserCLOSE_PAR)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}

	case ParserCOLLATE_:
		{
			p.SetState(523)
			p.Match(ParserCOLLATE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(524)
			p.Collation_name()
		}

	case ParserREFERENCES_:
		{
			p.SetState(525)
			p.Foreign_key_clause()
		}

	case ParserAS_, ParserGENERATED_:
		p.SetState(528)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserGENERATED_ {
			{
				p.SetState(526)
				p.Match(ParserGENERATED_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(527)
				p.Match(ParserALWAYS_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}
		{
			p.SetState(530)
			p.Match(ParserAS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(531)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(532)
			p.expr(0)
		}
		{
			p.SetState(533)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(535)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserVIRTUAL_ || _la == ParserSTORED_ {
			{
				p.SetState(534)
				_la = p.GetTokenStream().LA(1)

				if !(_la == ParserVIRTUAL_ || _la == ParserSTORED_) {
					p.GetErrorHandler().RecoverInline(p)
				} else {
					p.GetErrorHandler().ReportMatch(p)
					p.Consume()
				}
			}

		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISigned_numberContext is an interface to support dynamic dispatch.
type ISigned_numberContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	NUMERIC_LITERAL() antlr.TerminalNode
	PLUS() antlr.TerminalNode
	MINUS() antlr.TerminalNode

	// IsSigned_numberContext differentiates from other interfaces.
	IsSigned_numberContext()
}

type Signed_numberContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySigned_numberContext() *Signed_numberContext {
	var p = new(Signed_numberContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_signed_number
	return p
}

func InitEmptySigned_numberContext(p *Signed_numberContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_signed_number
}

func (*Signed_numberContext) IsSigned_numberContext() {}

func NewSigned_numberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Signed_numberContext {
	var p = new(Signed_numberContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_signed_number

	return p
}

func (s *Signed_numberContext) GetParser() antlr.Parser { return s.parser }

func (s *Signed_numberContext) NUMERIC_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserNUMERIC_LITERAL, 0)
}

func (s *Signed_numberContext) PLUS() antlr.TerminalNode {
	return s.GetToken(ParserPLUS, 0)
}

func (s *Signed_numberContext) MINUS() antlr.TerminalNode {
	return s.GetToken(ParserMINUS, 0)
}

func (s *Signed_numberContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Signed_numberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Signed_numberContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSigned_number(s)
	}
}

func (s *Signed_numberContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSigned_number(s)
	}
}

func (s *Signed_numberContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSigned_number(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Signed_number() (localctx ISigned_numberContext) {
	localctx = NewSigned_numberContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 34, ParserRULE_signed_number)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(540)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserPLUS || _la == ParserMINUS {
		{
			p.SetState(539)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserPLUS || _la == ParserMINUS) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	}
	{
		p.SetState(542)
		p.Match(ParserNUMERIC_LITERAL)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITable_constraintContext is an interface to support dynamic dispatch.
type ITable_constraintContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	OPEN_PAR() antlr.TerminalNode
	AllIndexed_column() []IIndexed_columnContext
	Indexed_column(i int) IIndexed_columnContext
	CLOSE_PAR() antlr.TerminalNode
	CHECK_() antlr.TerminalNode
	Expr() IExprContext
	FOREIGN_() antlr.TerminalNode
	KEY_() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	Foreign_key_clause() IForeign_key_clauseContext
	CONSTRAINT_() antlr.TerminalNode
	Name() INameContext
	PRIMARY_() antlr.TerminalNode
	UNIQUE_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	Conflict_clause() IConflict_clauseContext

	// IsTable_constraintContext differentiates from other interfaces.
	IsTable_constraintContext()
}

type Table_constraintContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_constraintContext() *Table_constraintContext {
	var p = new(Table_constraintContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_constraint
	return p
}

func InitEmptyTable_constraintContext(p *Table_constraintContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_constraint
}

func (*Table_constraintContext) IsTable_constraintContext() {}

func NewTable_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_constraintContext {
	var p = new(Table_constraintContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_table_constraint

	return p
}

func (s *Table_constraintContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_constraintContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Table_constraintContext) AllIndexed_column() []IIndexed_columnContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IIndexed_columnContext); ok {
			len++
		}
	}

	tst := make([]IIndexed_columnContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IIndexed_columnContext); ok {
			tst[i] = t.(IIndexed_columnContext)
			i++
		}
	}

	return tst
}

func (s *Table_constraintContext) Indexed_column(i int) IIndexed_columnContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IIndexed_columnContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IIndexed_columnContext)
}

func (s *Table_constraintContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Table_constraintContext) CHECK_() antlr.TerminalNode {
	return s.GetToken(ParserCHECK_, 0)
}

func (s *Table_constraintContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Table_constraintContext) FOREIGN_() antlr.TerminalNode {
	return s.GetToken(ParserFOREIGN_, 0)
}

func (s *Table_constraintContext) KEY_() antlr.TerminalNode {
	return s.GetToken(ParserKEY_, 0)
}

func (s *Table_constraintContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Table_constraintContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Table_constraintContext) Foreign_key_clause() IForeign_key_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IForeign_key_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IForeign_key_clauseContext)
}

func (s *Table_constraintContext) CONSTRAINT_() antlr.TerminalNode {
	return s.GetToken(ParserCONSTRAINT_, 0)
}

func (s *Table_constraintContext) Name() INameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(INameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Table_constraintContext) PRIMARY_() antlr.TerminalNode {
	return s.GetToken(ParserPRIMARY_, 0)
}

func (s *Table_constraintContext) UNIQUE_() antlr.TerminalNode {
	return s.GetToken(ParserUNIQUE_, 0)
}

func (s *Table_constraintContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Table_constraintContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Table_constraintContext) Conflict_clause() IConflict_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IConflict_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IConflict_clauseContext)
}

func (s *Table_constraintContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_constraintContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTable_constraint(s)
	}
}

func (s *Table_constraintContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTable_constraint(s)
	}
}

func (s *Table_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTable_constraint(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Table_constraint() (localctx ITable_constraintContext) {
	localctx = NewTable_constraintContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 36, ParserRULE_table_constraint)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(546)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserCONSTRAINT_ {
		{
			p.SetState(544)
			p.Match(ParserCONSTRAINT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(545)
			p.Name()
		}

	}
	p.SetState(585)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserPRIMARY_, ParserUNIQUE_:
		p.SetState(551)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetTokenStream().LA(1) {
		case ParserPRIMARY_:
			{
				p.SetState(548)
				p.Match(ParserPRIMARY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(549)
				p.Match(ParserKEY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case ParserUNIQUE_:
			{
				p.SetState(550)
				p.Match(ParserUNIQUE_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		default:
			p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
			goto errorExit
		}
		{
			p.SetState(553)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(554)
			p.Indexed_column()
		}
		p.SetState(559)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(555)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(556)
				p.Indexed_column()
			}

			p.SetState(561)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(562)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(564)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserON_ {
			{
				p.SetState(563)
				p.Conflict_clause()
			}

		}

	case ParserCHECK_:
		{
			p.SetState(566)
			p.Match(ParserCHECK_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(567)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(568)
			p.expr(0)
		}
		{
			p.SetState(569)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserFOREIGN_:
		{
			p.SetState(571)
			p.Match(ParserFOREIGN_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(572)
			p.Match(ParserKEY_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(573)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(574)
			p.Column_name()
		}
		p.SetState(579)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(575)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(576)
				p.Column_name()
			}

			p.SetState(581)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(582)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(583)
			p.Foreign_key_clause()
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IForeign_key_clauseContext is an interface to support dynamic dispatch.
type IForeign_key_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	REFERENCES_() antlr.TerminalNode
	Foreign_table() IForeign_tableContext
	OPEN_PAR() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	CLOSE_PAR() antlr.TerminalNode
	AllON_() []antlr.TerminalNode
	ON_(i int) antlr.TerminalNode
	AllMATCH_() []antlr.TerminalNode
	MATCH_(i int) antlr.TerminalNode
	AllName() []INameContext
	Name(i int) INameContext
	DEFERRABLE_() antlr.TerminalNode
	AllDELETE_() []antlr.TerminalNode
	DELETE_(i int) antlr.TerminalNode
	AllUPDATE_() []antlr.TerminalNode
	UPDATE_(i int) antlr.TerminalNode
	AllSET_() []antlr.TerminalNode
	SET_(i int) antlr.TerminalNode
	AllCASCADE_() []antlr.TerminalNode
	CASCADE_(i int) antlr.TerminalNode
	AllRESTRICT_() []antlr.TerminalNode
	RESTRICT_(i int) antlr.TerminalNode
	AllNO_() []antlr.TerminalNode
	NO_(i int) antlr.TerminalNode
	AllACTION_() []antlr.TerminalNode
	ACTION_(i int) antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	AllNULL_() []antlr.TerminalNode
	NULL_(i int) antlr.TerminalNode
	AllDEFAULT_() []antlr.TerminalNode
	DEFAULT_(i int) antlr.TerminalNode
	NOT_() antlr.TerminalNode
	INITIALLY_() antlr.TerminalNode
	DEFERRED_() antlr.TerminalNode
	IMMEDIATE_() antlr.TerminalNode

	// IsForeign_key_clauseContext differentiates from other interfaces.
	IsForeign_key_clauseContext()
}

type Foreign_key_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyForeign_key_clauseContext() *Foreign_key_clauseContext {
	var p = new(Foreign_key_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_foreign_key_clause
	return p
}

func InitEmptyForeign_key_clauseContext(p *Foreign_key_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_foreign_key_clause
}

func (*Foreign_key_clauseContext) IsForeign_key_clauseContext() {}

func NewForeign_key_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_key_clauseContext {
	var p = new(Foreign_key_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_foreign_key_clause

	return p
}

func (s *Foreign_key_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Foreign_key_clauseContext) REFERENCES_() antlr.TerminalNode {
	return s.GetToken(ParserREFERENCES_, 0)
}

func (s *Foreign_key_clauseContext) Foreign_table() IForeign_tableContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IForeign_tableContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IForeign_tableContext)
}

func (s *Foreign_key_clauseContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Foreign_key_clauseContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Foreign_key_clauseContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Foreign_key_clauseContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Foreign_key_clauseContext) AllON_() []antlr.TerminalNode {
	return s.GetTokens(ParserON_)
}

func (s *Foreign_key_clauseContext) ON_(i int) antlr.TerminalNode {
	return s.GetToken(ParserON_, i)
}

func (s *Foreign_key_clauseContext) AllMATCH_() []antlr.TerminalNode {
	return s.GetTokens(ParserMATCH_)
}

func (s *Foreign_key_clauseContext) MATCH_(i int) antlr.TerminalNode {
	return s.GetToken(ParserMATCH_, i)
}

func (s *Foreign_key_clauseContext) AllName() []INameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(INameContext); ok {
			len++
		}
	}

	tst := make([]INameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(INameContext); ok {
			tst[i] = t.(INameContext)
			i++
		}
	}

	return tst
}

func (s *Foreign_key_clauseContext) Name(i int) INameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(INameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Foreign_key_clauseContext) DEFERRABLE_() antlr.TerminalNode {
	return s.GetToken(ParserDEFERRABLE_, 0)
}

func (s *Foreign_key_clauseContext) AllDELETE_() []antlr.TerminalNode {
	return s.GetTokens(ParserDELETE_)
}

func (s *Foreign_key_clauseContext) DELETE_(i int) antlr.TerminalNode {
	return s.GetToken(ParserDELETE_, i)
}

func (s *Foreign_key_clauseContext) AllUPDATE_() []antlr.TerminalNode {
	return s.GetTokens(ParserUPDATE_)
}

func (s *Foreign_key_clauseContext) UPDATE_(i int) antlr.TerminalNode {
	return s.GetToken(ParserUPDATE_, i)
}

func (s *Foreign_key_clauseContext) AllSET_() []antlr.TerminalNode {
	return s.GetTokens(ParserSET_)
}

func (s *Foreign_key_clauseContext) SET_(i int) antlr.TerminalNode {
	return s.GetToken(ParserSET_, i)
}

func (s *Foreign_key_clauseContext) AllCASCADE_() []antlr.TerminalNode {
	return s.GetTokens(ParserCASCADE_)
}

func (s *Foreign_key_clauseContext) CASCADE_(i int) antlr.TerminalNode {
	return s.GetToken(ParserCASCADE_, i)
}

func (s *Foreign_key_clauseContext) AllRESTRICT_() []antlr.TerminalNode {
	return s.GetTokens(ParserRESTRICT_)
}

func (s *Foreign_key_clauseContext) RESTRICT_(i int) antlr.TerminalNode {
	return s.GetToken(ParserRESTRICT_, i)
}

func (s *Foreign_key_clauseContext) AllNO_() []antlr.TerminalNode {
	return s.GetTokens(ParserNO_)
}

func (s *Foreign_key_clauseContext) NO_(i int) antlr.TerminalNode {
	return s.GetToken(ParserNO_, i)
}

func (s *Foreign_key_clauseContext) AllACTION_() []antlr.TerminalNode {
	return s.GetTokens(ParserACTION_)
}

func (s *Foreign_key_clauseContext) ACTION_(i int) antlr.TerminalNode {
	return s.GetToken(ParserACTION_, i)
}

func (s *Foreign_key_clauseContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Foreign_key_clauseContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Foreign_key_clauseContext) AllNULL_() []antlr.TerminalNode {
	return s.GetTokens(ParserNULL_)
}

func (s *Foreign_key_clauseContext) NULL_(i int) antlr.TerminalNode {
	return s.GetToken(ParserNULL_, i)
}

func (s *Foreign_key_clauseContext) AllDEFAULT_() []antlr.TerminalNode {
	return s.GetTokens(ParserDEFAULT_)
}

func (s *Foreign_key_clauseContext) DEFAULT_(i int) antlr.TerminalNode {
	return s.GetToken(ParserDEFAULT_, i)
}

func (s *Foreign_key_clauseContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Foreign_key_clauseContext) INITIALLY_() antlr.TerminalNode {
	return s.GetToken(ParserINITIALLY_, 0)
}

func (s *Foreign_key_clauseContext) DEFERRED_() antlr.TerminalNode {
	return s.GetToken(ParserDEFERRED_, 0)
}

func (s *Foreign_key_clauseContext) IMMEDIATE_() antlr.TerminalNode {
	return s.GetToken(ParserIMMEDIATE_, 0)
}

func (s *Foreign_key_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Foreign_key_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Foreign_key_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterForeign_key_clause(s)
	}
}

func (s *Foreign_key_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitForeign_key_clause(s)
	}
}

func (s *Foreign_key_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitForeign_key_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Foreign_key_clause() (localctx IForeign_key_clauseContext) {
	localctx = NewForeign_key_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 38, ParserRULE_foreign_key_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(587)
		p.Match(ParserREFERENCES_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(588)
		p.Foreign_table()
	}
	p.SetState(600)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserOPEN_PAR {
		{
			p.SetState(589)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(590)
			p.Column_name()
		}
		p.SetState(595)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(591)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(592)
				p.Column_name()
			}

			p.SetState(597)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(598)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	p.SetState(616)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserMATCH_ || _la == ParserON_ {
		p.SetState(614)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetTokenStream().LA(1) {
		case ParserON_:
			{
				p.SetState(602)
				p.Match(ParserON_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(603)
				_la = p.GetTokenStream().LA(1)

				if !(_la == ParserDELETE_ || _la == ParserUPDATE_) {
					p.GetErrorHandler().RecoverInline(p)
				} else {
					p.GetErrorHandler().ReportMatch(p)
					p.Consume()
				}
			}
			p.SetState(610)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}

			switch p.GetTokenStream().LA(1) {
			case ParserSET_:
				{
					p.SetState(604)
					p.Match(ParserSET_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(605)
					_la = p.GetTokenStream().LA(1)

					if !(_la == ParserDEFAULT_ || _la == ParserNULL_) {
						p.GetErrorHandler().RecoverInline(p)
					} else {
						p.GetErrorHandler().ReportMatch(p)
						p.Consume()
					}
				}

			case ParserCASCADE_:
				{
					p.SetState(606)
					p.Match(ParserCASCADE_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			case ParserRESTRICT_:
				{
					p.SetState(607)
					p.Match(ParserRESTRICT_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			case ParserNO_:
				{
					p.SetState(608)
					p.Match(ParserNO_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(609)
					p.Match(ParserACTION_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			default:
				p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
				goto errorExit
			}

		case ParserMATCH_:
			{
				p.SetState(612)
				p.Match(ParserMATCH_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(613)
				p.Name()
			}

		default:
			p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
			goto errorExit
		}

		p.SetState(618)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	p.SetState(627)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 68, p.GetParserRuleContext()) == 1 {
		p.SetState(620)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserNOT_ {
			{
				p.SetState(619)
				p.Match(ParserNOT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}
		{
			p.SetState(622)
			p.Match(ParserDEFERRABLE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(625)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserINITIALLY_ {
			{
				p.SetState(623)
				p.Match(ParserINITIALLY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(624)
				_la = p.GetTokenStream().LA(1)

				if !(_la == ParserDEFERRED_ || _la == ParserIMMEDIATE_) {
					p.GetErrorHandler().RecoverInline(p)
				} else {
					p.GetErrorHandler().ReportMatch(p)
					p.Consume()
				}
			}

		}

	} else if p.HasError() { // JIM
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IConflict_clauseContext is an interface to support dynamic dispatch.
type IConflict_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ON_() antlr.TerminalNode
	CONFLICT_() antlr.TerminalNode
	ROLLBACK_() antlr.TerminalNode
	ABORT_() antlr.TerminalNode
	FAIL_() antlr.TerminalNode
	IGNORE_() antlr.TerminalNode
	REPLACE_() antlr.TerminalNode

	// IsConflict_clauseContext differentiates from other interfaces.
	IsConflict_clauseContext()
}

type Conflict_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyConflict_clauseContext() *Conflict_clauseContext {
	var p = new(Conflict_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_conflict_clause
	return p
}

func InitEmptyConflict_clauseContext(p *Conflict_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_conflict_clause
}

func (*Conflict_clauseContext) IsConflict_clauseContext() {}

func NewConflict_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Conflict_clauseContext {
	var p = new(Conflict_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_conflict_clause

	return p
}

func (s *Conflict_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Conflict_clauseContext) ON_() antlr.TerminalNode {
	return s.GetToken(ParserON_, 0)
}

func (s *Conflict_clauseContext) CONFLICT_() antlr.TerminalNode {
	return s.GetToken(ParserCONFLICT_, 0)
}

func (s *Conflict_clauseContext) ROLLBACK_() antlr.TerminalNode {
	return s.GetToken(ParserROLLBACK_, 0)
}

func (s *Conflict_clauseContext) ABORT_() antlr.TerminalNode {
	return s.GetToken(ParserABORT_, 0)
}

func (s *Conflict_clauseContext) FAIL_() antlr.TerminalNode {
	return s.GetToken(ParserFAIL_, 0)
}

func (s *Conflict_clauseContext) IGNORE_() antlr.TerminalNode {
	return s.GetToken(ParserIGNORE_, 0)
}

func (s *Conflict_clauseContext) REPLACE_() antlr.TerminalNode {
	return s.GetToken(ParserREPLACE_, 0)
}

func (s *Conflict_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Conflict_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Conflict_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterConflict_clause(s)
	}
}

func (s *Conflict_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitConflict_clause(s)
	}
}

func (s *Conflict_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitConflict_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Conflict_clause() (localctx IConflict_clauseContext) {
	localctx = NewConflict_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 40, ParserRULE_conflict_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(629)
		p.Match(ParserON_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(630)
		p.Match(ParserCONFLICT_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(631)
		_la = p.GetTokenStream().LA(1)

		if !(_la == ParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICreate_trigger_stmtContext is an interface to support dynamic dispatch.
type ICreate_trigger_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	CREATE_() antlr.TerminalNode
	TRIGGER_() antlr.TerminalNode
	Trigger_name() ITrigger_nameContext
	ON_() antlr.TerminalNode
	Table_name() ITable_nameContext
	BEGIN_() antlr.TerminalNode
	END_() antlr.TerminalNode
	DELETE_() antlr.TerminalNode
	INSERT_() antlr.TerminalNode
	UPDATE_() antlr.TerminalNode
	IF_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	EXISTS_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	BEFORE_() antlr.TerminalNode
	AFTER_() antlr.TerminalNode
	INSTEAD_() antlr.TerminalNode
	AllOF_() []antlr.TerminalNode
	OF_(i int) antlr.TerminalNode
	FOR_() antlr.TerminalNode
	EACH_() antlr.TerminalNode
	ROW_() antlr.TerminalNode
	WHEN_() antlr.TerminalNode
	Expr() IExprContext
	AllSCOL() []antlr.TerminalNode
	SCOL(i int) antlr.TerminalNode
	TEMP_() antlr.TerminalNode
	TEMPORARY_() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	AllUpdate_stmt() []IUpdate_stmtContext
	Update_stmt(i int) IUpdate_stmtContext
	AllInsert_stmt() []IInsert_stmtContext
	Insert_stmt(i int) IInsert_stmtContext
	AllDelete_stmt() []IDelete_stmtContext
	Delete_stmt(i int) IDelete_stmtContext
	AllSelect_stmt() []ISelect_stmtContext
	Select_stmt(i int) ISelect_stmtContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsCreate_trigger_stmtContext differentiates from other interfaces.
	IsCreate_trigger_stmtContext()
}

type Create_trigger_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCreate_trigger_stmtContext() *Create_trigger_stmtContext {
	var p = new(Create_trigger_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_trigger_stmt
	return p
}

func InitEmptyCreate_trigger_stmtContext(p *Create_trigger_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_trigger_stmt
}

func (*Create_trigger_stmtContext) IsCreate_trigger_stmtContext() {}

func NewCreate_trigger_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_trigger_stmtContext {
	var p = new(Create_trigger_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_create_trigger_stmt

	return p
}

func (s *Create_trigger_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Create_trigger_stmtContext) CREATE_() antlr.TerminalNode {
	return s.GetToken(ParserCREATE_, 0)
}

func (s *Create_trigger_stmtContext) TRIGGER_() antlr.TerminalNode {
	return s.GetToken(ParserTRIGGER_, 0)
}

func (s *Create_trigger_stmtContext) Trigger_name() ITrigger_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITrigger_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITrigger_nameContext)
}

func (s *Create_trigger_stmtContext) ON_() antlr.TerminalNode {
	return s.GetToken(ParserON_, 0)
}

func (s *Create_trigger_stmtContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Create_trigger_stmtContext) BEGIN_() antlr.TerminalNode {
	return s.GetToken(ParserBEGIN_, 0)
}

func (s *Create_trigger_stmtContext) END_() antlr.TerminalNode {
	return s.GetToken(ParserEND_, 0)
}

func (s *Create_trigger_stmtContext) DELETE_() antlr.TerminalNode {
	return s.GetToken(ParserDELETE_, 0)
}

func (s *Create_trigger_stmtContext) INSERT_() antlr.TerminalNode {
	return s.GetToken(ParserINSERT_, 0)
}

func (s *Create_trigger_stmtContext) UPDATE_() antlr.TerminalNode {
	return s.GetToken(ParserUPDATE_, 0)
}

func (s *Create_trigger_stmtContext) IF_() antlr.TerminalNode {
	return s.GetToken(ParserIF_, 0)
}

func (s *Create_trigger_stmtContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Create_trigger_stmtContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *Create_trigger_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Create_trigger_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Create_trigger_stmtContext) BEFORE_() antlr.TerminalNode {
	return s.GetToken(ParserBEFORE_, 0)
}

func (s *Create_trigger_stmtContext) AFTER_() antlr.TerminalNode {
	return s.GetToken(ParserAFTER_, 0)
}

func (s *Create_trigger_stmtContext) INSTEAD_() antlr.TerminalNode {
	return s.GetToken(ParserINSTEAD_, 0)
}

func (s *Create_trigger_stmtContext) AllOF_() []antlr.TerminalNode {
	return s.GetTokens(ParserOF_)
}

func (s *Create_trigger_stmtContext) OF_(i int) antlr.TerminalNode {
	return s.GetToken(ParserOF_, i)
}

func (s *Create_trigger_stmtContext) FOR_() antlr.TerminalNode {
	return s.GetToken(ParserFOR_, 0)
}

func (s *Create_trigger_stmtContext) EACH_() antlr.TerminalNode {
	return s.GetToken(ParserEACH_, 0)
}

func (s *Create_trigger_stmtContext) ROW_() antlr.TerminalNode {
	return s.GetToken(ParserROW_, 0)
}

func (s *Create_trigger_stmtContext) WHEN_() antlr.TerminalNode {
	return s.GetToken(ParserWHEN_, 0)
}

func (s *Create_trigger_stmtContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Create_trigger_stmtContext) AllSCOL() []antlr.TerminalNode {
	return s.GetTokens(ParserSCOL)
}

func (s *Create_trigger_stmtContext) SCOL(i int) antlr.TerminalNode {
	return s.GetToken(ParserSCOL, i)
}

func (s *Create_trigger_stmtContext) TEMP_() antlr.TerminalNode {
	return s.GetToken(ParserTEMP_, 0)
}

func (s *Create_trigger_stmtContext) TEMPORARY_() antlr.TerminalNode {
	return s.GetToken(ParserTEMPORARY_, 0)
}

func (s *Create_trigger_stmtContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Create_trigger_stmtContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Create_trigger_stmtContext) AllUpdate_stmt() []IUpdate_stmtContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IUpdate_stmtContext); ok {
			len++
		}
	}

	tst := make([]IUpdate_stmtContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IUpdate_stmtContext); ok {
			tst[i] = t.(IUpdate_stmtContext)
			i++
		}
	}

	return tst
}

func (s *Create_trigger_stmtContext) Update_stmt(i int) IUpdate_stmtContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IUpdate_stmtContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IUpdate_stmtContext)
}

func (s *Create_trigger_stmtContext) AllInsert_stmt() []IInsert_stmtContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IInsert_stmtContext); ok {
			len++
		}
	}

	tst := make([]IInsert_stmtContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IInsert_stmtContext); ok {
			tst[i] = t.(IInsert_stmtContext)
			i++
		}
	}

	return tst
}

func (s *Create_trigger_stmtContext) Insert_stmt(i int) IInsert_stmtContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IInsert_stmtContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IInsert_stmtContext)
}

func (s *Create_trigger_stmtContext) AllDelete_stmt() []IDelete_stmtContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IDelete_stmtContext); ok {
			len++
		}
	}

	tst := make([]IDelete_stmtContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IDelete_stmtContext); ok {
			tst[i] = t.(IDelete_stmtContext)
			i++
		}
	}

	return tst
}

func (s *Create_trigger_stmtContext) Delete_stmt(i int) IDelete_stmtContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IDelete_stmtContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IDelete_stmtContext)
}

func (s *Create_trigger_stmtContext) AllSelect_stmt() []ISelect_stmtContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			len++
		}
	}

	tst := make([]ISelect_stmtContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ISelect_stmtContext); ok {
			tst[i] = t.(ISelect_stmtContext)
			i++
		}
	}

	return tst
}

func (s *Create_trigger_stmtContext) Select_stmt(i int) ISelect_stmtContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Create_trigger_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Create_trigger_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Create_trigger_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Create_trigger_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Create_trigger_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCreate_trigger_stmt(s)
	}
}

func (s *Create_trigger_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCreate_trigger_stmt(s)
	}
}

func (s *Create_trigger_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCreate_trigger_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Create_trigger_stmt() (localctx ICreate_trigger_stmtContext) {
	localctx = NewCreate_trigger_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 42, ParserRULE_create_trigger_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(633)
		p.Match(ParserCREATE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(635)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserTEMP_ || _la == ParserTEMPORARY_ {
		{
			p.SetState(634)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserTEMP_ || _la == ParserTEMPORARY_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	}
	{
		p.SetState(637)
		p.Match(ParserTRIGGER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(641)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 70, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(638)
			p.Match(ParserIF_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(639)
			p.Match(ParserNOT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(640)
			p.Match(ParserEXISTS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(646)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 71, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(643)
			p.Schema_name()
		}
		{
			p.SetState(644)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(648)
		p.Trigger_name()
	}
	p.SetState(653)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	switch p.GetTokenStream().LA(1) {
	case ParserBEFORE_:
		{
			p.SetState(649)
			p.Match(ParserBEFORE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserAFTER_:
		{
			p.SetState(650)
			p.Match(ParserAFTER_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserINSTEAD_:
		{
			p.SetState(651)
			p.Match(ParserINSTEAD_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(652)
			p.Match(ParserOF_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserDELETE_, ParserINSERT_, ParserUPDATE_:

	default:
	}
	p.SetState(669)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserDELETE_:
		{
			p.SetState(655)
			p.Match(ParserDELETE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserINSERT_:
		{
			p.SetState(656)
			p.Match(ParserINSERT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserUPDATE_:
		{
			p.SetState(657)
			p.Match(ParserUPDATE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(667)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserOF_ {
			{
				p.SetState(658)
				p.Match(ParserOF_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(659)
				p.Column_name()
			}
			p.SetState(664)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(660)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(661)
					p.Column_name()
				}

				p.SetState(666)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}
	{
		p.SetState(671)
		p.Match(ParserON_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(672)
		p.Table_name()
	}
	p.SetState(676)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserFOR_ {
		{
			p.SetState(673)
			p.Match(ParserFOR_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(674)
			p.Match(ParserEACH_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(675)
			p.Match(ParserROW_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	p.SetState(680)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWHEN_ {
		{
			p.SetState(678)
			p.Match(ParserWHEN_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(679)
			p.expr(0)
		}

	}
	{
		p.SetState(682)
		p.Match(ParserBEGIN_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(691)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for ok := true; ok; ok = _la == ParserDELETE_ || ((int64((_la-88)) & ^0x3f) == 0 && ((int64(1)<<(_la-88))&2386912217732743169) != 0) {
		p.SetState(687)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 78, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(683)
				p.Update_stmt()
			}

		case 2:
			{
				p.SetState(684)
				p.Insert_stmt()
			}

		case 3:
			{
				p.SetState(685)
				p.Delete_stmt()
			}

		case 4:
			{
				p.SetState(686)
				p.Select_stmt()
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}
		{
			p.SetState(689)
			p.Match(ParserSCOL)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

		p.SetState(693)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(695)
		p.Match(ParserEND_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICreate_view_stmtContext is an interface to support dynamic dispatch.
type ICreate_view_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	CREATE_() antlr.TerminalNode
	VIEW_() antlr.TerminalNode
	View_name() IView_nameContext
	AS_() antlr.TerminalNode
	Select_stmt() ISelect_stmtContext
	IF_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	EXISTS_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	CLOSE_PAR() antlr.TerminalNode
	TEMP_() antlr.TerminalNode
	TEMPORARY_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsCreate_view_stmtContext differentiates from other interfaces.
	IsCreate_view_stmtContext()
}

type Create_view_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCreate_view_stmtContext() *Create_view_stmtContext {
	var p = new(Create_view_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_view_stmt
	return p
}

func InitEmptyCreate_view_stmtContext(p *Create_view_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_view_stmt
}

func (*Create_view_stmtContext) IsCreate_view_stmtContext() {}

func NewCreate_view_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_view_stmtContext {
	var p = new(Create_view_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_create_view_stmt

	return p
}

func (s *Create_view_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Create_view_stmtContext) CREATE_() antlr.TerminalNode {
	return s.GetToken(ParserCREATE_, 0)
}

func (s *Create_view_stmtContext) VIEW_() antlr.TerminalNode {
	return s.GetToken(ParserVIEW_, 0)
}

func (s *Create_view_stmtContext) View_name() IView_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IView_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IView_nameContext)
}

func (s *Create_view_stmtContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Create_view_stmtContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Create_view_stmtContext) IF_() antlr.TerminalNode {
	return s.GetToken(ParserIF_, 0)
}

func (s *Create_view_stmtContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Create_view_stmtContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *Create_view_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Create_view_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Create_view_stmtContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Create_view_stmtContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Create_view_stmtContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Create_view_stmtContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Create_view_stmtContext) TEMP_() antlr.TerminalNode {
	return s.GetToken(ParserTEMP_, 0)
}

func (s *Create_view_stmtContext) TEMPORARY_() antlr.TerminalNode {
	return s.GetToken(ParserTEMPORARY_, 0)
}

func (s *Create_view_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Create_view_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Create_view_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Create_view_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Create_view_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCreate_view_stmt(s)
	}
}

func (s *Create_view_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCreate_view_stmt(s)
	}
}

func (s *Create_view_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCreate_view_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Create_view_stmt() (localctx ICreate_view_stmtContext) {
	localctx = NewCreate_view_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 44, ParserRULE_create_view_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(697)
		p.Match(ParserCREATE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(699)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserTEMP_ || _la == ParserTEMPORARY_ {
		{
			p.SetState(698)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserTEMP_ || _la == ParserTEMPORARY_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	}
	{
		p.SetState(701)
		p.Match(ParserVIEW_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(705)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 81, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(702)
			p.Match(ParserIF_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(703)
			p.Match(ParserNOT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(704)
			p.Match(ParserEXISTS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(710)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 82, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(707)
			p.Schema_name()
		}
		{
			p.SetState(708)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(712)
		p.View_name()
	}
	p.SetState(724)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserOPEN_PAR {
		{
			p.SetState(713)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(714)
			p.Column_name()
		}
		p.SetState(719)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(715)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(716)
				p.Column_name()
			}

			p.SetState(721)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(722)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	{
		p.SetState(726)
		p.Match(ParserAS_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(727)
		p.Select_stmt()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICreate_virtual_table_stmtContext is an interface to support dynamic dispatch.
type ICreate_virtual_table_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	CREATE_() antlr.TerminalNode
	VIRTUAL_() antlr.TerminalNode
	TABLE_() antlr.TerminalNode
	Table_name() ITable_nameContext
	USING_() antlr.TerminalNode
	Module_name() IModule_nameContext
	IF_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	EXISTS_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	AllModule_argument() []IModule_argumentContext
	Module_argument(i int) IModule_argumentContext
	CLOSE_PAR() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsCreate_virtual_table_stmtContext differentiates from other interfaces.
	IsCreate_virtual_table_stmtContext()
}

type Create_virtual_table_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCreate_virtual_table_stmtContext() *Create_virtual_table_stmtContext {
	var p = new(Create_virtual_table_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_virtual_table_stmt
	return p
}

func InitEmptyCreate_virtual_table_stmtContext(p *Create_virtual_table_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_create_virtual_table_stmt
}

func (*Create_virtual_table_stmtContext) IsCreate_virtual_table_stmtContext() {}

func NewCreate_virtual_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_virtual_table_stmtContext {
	var p = new(Create_virtual_table_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_create_virtual_table_stmt

	return p
}

func (s *Create_virtual_table_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Create_virtual_table_stmtContext) CREATE_() antlr.TerminalNode {
	return s.GetToken(ParserCREATE_, 0)
}

func (s *Create_virtual_table_stmtContext) VIRTUAL_() antlr.TerminalNode {
	return s.GetToken(ParserVIRTUAL_, 0)
}

func (s *Create_virtual_table_stmtContext) TABLE_() antlr.TerminalNode {
	return s.GetToken(ParserTABLE_, 0)
}

func (s *Create_virtual_table_stmtContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Create_virtual_table_stmtContext) USING_() antlr.TerminalNode {
	return s.GetToken(ParserUSING_, 0)
}

func (s *Create_virtual_table_stmtContext) Module_name() IModule_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IModule_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IModule_nameContext)
}

func (s *Create_virtual_table_stmtContext) IF_() antlr.TerminalNode {
	return s.GetToken(ParserIF_, 0)
}

func (s *Create_virtual_table_stmtContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Create_virtual_table_stmtContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *Create_virtual_table_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Create_virtual_table_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Create_virtual_table_stmtContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Create_virtual_table_stmtContext) AllModule_argument() []IModule_argumentContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IModule_argumentContext); ok {
			len++
		}
	}

	tst := make([]IModule_argumentContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IModule_argumentContext); ok {
			tst[i] = t.(IModule_argumentContext)
			i++
		}
	}

	return tst
}

func (s *Create_virtual_table_stmtContext) Module_argument(i int) IModule_argumentContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IModule_argumentContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IModule_argumentContext)
}

func (s *Create_virtual_table_stmtContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Create_virtual_table_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Create_virtual_table_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Create_virtual_table_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Create_virtual_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Create_virtual_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCreate_virtual_table_stmt(s)
	}
}

func (s *Create_virtual_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCreate_virtual_table_stmt(s)
	}
}

func (s *Create_virtual_table_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCreate_virtual_table_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Create_virtual_table_stmt() (localctx ICreate_virtual_table_stmtContext) {
	localctx = NewCreate_virtual_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 46, ParserRULE_create_virtual_table_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(729)
		p.Match(ParserCREATE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(730)
		p.Match(ParserVIRTUAL_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(731)
		p.Match(ParserTABLE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(735)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 85, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(732)
			p.Match(ParserIF_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(733)
			p.Match(ParserNOT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(734)
			p.Match(ParserEXISTS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(740)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 86, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(737)
			p.Schema_name()
		}
		{
			p.SetState(738)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(742)
		p.Table_name()
	}
	{
		p.SetState(743)
		p.Match(ParserUSING_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(744)
		p.Module_name()
	}
	p.SetState(756)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserOPEN_PAR {
		{
			p.SetState(745)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(746)
			p.Module_argument()
		}
		p.SetState(751)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(747)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(748)
				p.Module_argument()
			}

			p.SetState(753)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(754)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IWith_clauseContext is an interface to support dynamic dispatch.
type IWith_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	WITH_() antlr.TerminalNode
	AllCte_table_name() []ICte_table_nameContext
	Cte_table_name(i int) ICte_table_nameContext
	AllAS_() []antlr.TerminalNode
	AS_(i int) antlr.TerminalNode
	AllOPEN_PAR() []antlr.TerminalNode
	OPEN_PAR(i int) antlr.TerminalNode
	AllSelect_stmt() []ISelect_stmtContext
	Select_stmt(i int) ISelect_stmtContext
	AllCLOSE_PAR() []antlr.TerminalNode
	CLOSE_PAR(i int) antlr.TerminalNode
	RECURSIVE_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsWith_clauseContext differentiates from other interfaces.
	IsWith_clauseContext()
}

type With_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyWith_clauseContext() *With_clauseContext {
	var p = new(With_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_with_clause
	return p
}

func InitEmptyWith_clauseContext(p *With_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_with_clause
}

func (*With_clauseContext) IsWith_clauseContext() {}

func NewWith_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *With_clauseContext {
	var p = new(With_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_with_clause

	return p
}

func (s *With_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *With_clauseContext) WITH_() antlr.TerminalNode {
	return s.GetToken(ParserWITH_, 0)
}

func (s *With_clauseContext) AllCte_table_name() []ICte_table_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ICte_table_nameContext); ok {
			len++
		}
	}

	tst := make([]ICte_table_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ICte_table_nameContext); ok {
			tst[i] = t.(ICte_table_nameContext)
			i++
		}
	}

	return tst
}

func (s *With_clauseContext) Cte_table_name(i int) ICte_table_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICte_table_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICte_table_nameContext)
}

func (s *With_clauseContext) AllAS_() []antlr.TerminalNode {
	return s.GetTokens(ParserAS_)
}

func (s *With_clauseContext) AS_(i int) antlr.TerminalNode {
	return s.GetToken(ParserAS_, i)
}

func (s *With_clauseContext) AllOPEN_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserOPEN_PAR)
}

func (s *With_clauseContext) OPEN_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, i)
}

func (s *With_clauseContext) AllSelect_stmt() []ISelect_stmtContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			len++
		}
	}

	tst := make([]ISelect_stmtContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ISelect_stmtContext); ok {
			tst[i] = t.(ISelect_stmtContext)
			i++
		}
	}

	return tst
}

func (s *With_clauseContext) Select_stmt(i int) ISelect_stmtContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *With_clauseContext) AllCLOSE_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserCLOSE_PAR)
}

func (s *With_clauseContext) CLOSE_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, i)
}

func (s *With_clauseContext) RECURSIVE_() antlr.TerminalNode {
	return s.GetToken(ParserRECURSIVE_, 0)
}

func (s *With_clauseContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *With_clauseContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *With_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *With_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *With_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterWith_clause(s)
	}
}

func (s *With_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitWith_clause(s)
	}
}

func (s *With_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitWith_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) With_clause() (localctx IWith_clauseContext) {
	localctx = NewWith_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 48, ParserRULE_with_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(758)
		p.Match(ParserWITH_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(760)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 89, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(759)
			p.Match(ParserRECURSIVE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(762)
		p.Cte_table_name()
	}
	{
		p.SetState(763)
		p.Match(ParserAS_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(764)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(765)
		p.Select_stmt()
	}
	{
		p.SetState(766)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(776)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(767)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(768)
			p.Cte_table_name()
		}
		{
			p.SetState(769)
			p.Match(ParserAS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(770)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(771)
			p.Select_stmt()
		}
		{
			p.SetState(772)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

		p.SetState(778)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICte_table_nameContext is an interface to support dynamic dispatch.
type ICte_table_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Table_name() ITable_nameContext
	OPEN_PAR() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	CLOSE_PAR() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsCte_table_nameContext differentiates from other interfaces.
	IsCte_table_nameContext()
}

type Cte_table_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCte_table_nameContext() *Cte_table_nameContext {
	var p = new(Cte_table_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_cte_table_name
	return p
}

func InitEmptyCte_table_nameContext(p *Cte_table_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_cte_table_name
}

func (*Cte_table_nameContext) IsCte_table_nameContext() {}

func NewCte_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Cte_table_nameContext {
	var p = new(Cte_table_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_cte_table_name

	return p
}

func (s *Cte_table_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Cte_table_nameContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Cte_table_nameContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Cte_table_nameContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Cte_table_nameContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Cte_table_nameContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Cte_table_nameContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Cte_table_nameContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Cte_table_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Cte_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Cte_table_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCte_table_name(s)
	}
}

func (s *Cte_table_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCte_table_name(s)
	}
}

func (s *Cte_table_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCte_table_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Cte_table_name() (localctx ICte_table_nameContext) {
	localctx = NewCte_table_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 50, ParserRULE_cte_table_name)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(779)
		p.Table_name()
	}
	p.SetState(791)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserOPEN_PAR {
		{
			p.SetState(780)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(781)
			p.Column_name()
		}
		p.SetState(786)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(782)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(783)
				p.Column_name()
			}

			p.SetState(788)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(789)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IRecursive_cteContext is an interface to support dynamic dispatch.
type IRecursive_cteContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Cte_table_name() ICte_table_nameContext
	AS_() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	Initial_select() IInitial_selectContext
	UNION_() antlr.TerminalNode
	Recursive_select() IRecursive_selectContext
	CLOSE_PAR() antlr.TerminalNode
	ALL_() antlr.TerminalNode

	// IsRecursive_cteContext differentiates from other interfaces.
	IsRecursive_cteContext()
}

type Recursive_cteContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyRecursive_cteContext() *Recursive_cteContext {
	var p = new(Recursive_cteContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_recursive_cte
	return p
}

func InitEmptyRecursive_cteContext(p *Recursive_cteContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_recursive_cte
}

func (*Recursive_cteContext) IsRecursive_cteContext() {}

func NewRecursive_cteContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive_cteContext {
	var p = new(Recursive_cteContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_recursive_cte

	return p
}

func (s *Recursive_cteContext) GetParser() antlr.Parser { return s.parser }

func (s *Recursive_cteContext) Cte_table_name() ICte_table_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICte_table_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICte_table_nameContext)
}

func (s *Recursive_cteContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Recursive_cteContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Recursive_cteContext) Initial_select() IInitial_selectContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IInitial_selectContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IInitial_selectContext)
}

func (s *Recursive_cteContext) UNION_() antlr.TerminalNode {
	return s.GetToken(ParserUNION_, 0)
}

func (s *Recursive_cteContext) Recursive_select() IRecursive_selectContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IRecursive_selectContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IRecursive_selectContext)
}

func (s *Recursive_cteContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Recursive_cteContext) ALL_() antlr.TerminalNode {
	return s.GetToken(ParserALL_, 0)
}

func (s *Recursive_cteContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Recursive_cteContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Recursive_cteContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterRecursive_cte(s)
	}
}

func (s *Recursive_cteContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitRecursive_cte(s)
	}
}

func (s *Recursive_cteContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitRecursive_cte(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Recursive_cte() (localctx IRecursive_cteContext) {
	localctx = NewRecursive_cteContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 52, ParserRULE_recursive_cte)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(793)
		p.Cte_table_name()
	}
	{
		p.SetState(794)
		p.Match(ParserAS_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(795)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(796)
		p.Initial_select()
	}
	{
		p.SetState(797)
		p.Match(ParserUNION_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(799)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserALL_ {
		{
			p.SetState(798)
			p.Match(ParserALL_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	{
		p.SetState(801)
		p.Recursive_select()
	}
	{
		p.SetState(802)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICommon_table_expressionContext is an interface to support dynamic dispatch.
type ICommon_table_expressionContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Table_name() ITable_nameContext
	AS_() antlr.TerminalNode
	AllOPEN_PAR() []antlr.TerminalNode
	OPEN_PAR(i int) antlr.TerminalNode
	Select_stmt() ISelect_stmtContext
	AllCLOSE_PAR() []antlr.TerminalNode
	CLOSE_PAR(i int) antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsCommon_table_expressionContext differentiates from other interfaces.
	IsCommon_table_expressionContext()
}

type Common_table_expressionContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCommon_table_expressionContext() *Common_table_expressionContext {
	var p = new(Common_table_expressionContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_common_table_expression
	return p
}

func InitEmptyCommon_table_expressionContext(p *Common_table_expressionContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_common_table_expression
}

func (*Common_table_expressionContext) IsCommon_table_expressionContext() {}

func NewCommon_table_expressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_expressionContext {
	var p = new(Common_table_expressionContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_common_table_expression

	return p
}

func (s *Common_table_expressionContext) GetParser() antlr.Parser { return s.parser }

func (s *Common_table_expressionContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Common_table_expressionContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Common_table_expressionContext) AllOPEN_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserOPEN_PAR)
}

func (s *Common_table_expressionContext) OPEN_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, i)
}

func (s *Common_table_expressionContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Common_table_expressionContext) AllCLOSE_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserCLOSE_PAR)
}

func (s *Common_table_expressionContext) CLOSE_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, i)
}

func (s *Common_table_expressionContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Common_table_expressionContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Common_table_expressionContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Common_table_expressionContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Common_table_expressionContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Common_table_expressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Common_table_expressionContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCommon_table_expression(s)
	}
}

func (s *Common_table_expressionContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCommon_table_expression(s)
	}
}

func (s *Common_table_expressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCommon_table_expression(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Common_table_expression() (localctx ICommon_table_expressionContext) {
	localctx = NewCommon_table_expressionContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 54, ParserRULE_common_table_expression)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(804)
		p.Table_name()
	}
	p.SetState(816)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserOPEN_PAR {
		{
			p.SetState(805)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(806)
			p.Column_name()
		}
		p.SetState(811)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(807)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(808)
				p.Column_name()
			}

			p.SetState(813)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(814)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	{
		p.SetState(818)
		p.Match(ParserAS_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(819)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(820)
		p.Select_stmt()
	}
	{
		p.SetState(821)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IDelete_stmtContext is an interface to support dynamic dispatch.
type IDelete_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	DELETE_() antlr.TerminalNode
	FROM_() antlr.TerminalNode
	Qualified_table_name() IQualified_table_nameContext
	With_clause() IWith_clauseContext
	WHERE_() antlr.TerminalNode
	Expr() IExprContext
	Returning_clause() IReturning_clauseContext

	// IsDelete_stmtContext differentiates from other interfaces.
	IsDelete_stmtContext()
}

type Delete_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyDelete_stmtContext() *Delete_stmtContext {
	var p = new(Delete_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_delete_stmt
	return p
}

func InitEmptyDelete_stmtContext(p *Delete_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_delete_stmt
}

func (*Delete_stmtContext) IsDelete_stmtContext() {}

func NewDelete_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmtContext {
	var p = new(Delete_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_delete_stmt

	return p
}

func (s *Delete_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Delete_stmtContext) DELETE_() antlr.TerminalNode {
	return s.GetToken(ParserDELETE_, 0)
}

func (s *Delete_stmtContext) FROM_() antlr.TerminalNode {
	return s.GetToken(ParserFROM_, 0)
}

func (s *Delete_stmtContext) Qualified_table_name() IQualified_table_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IQualified_table_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IQualified_table_nameContext)
}

func (s *Delete_stmtContext) With_clause() IWith_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWith_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWith_clauseContext)
}

func (s *Delete_stmtContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *Delete_stmtContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Delete_stmtContext) Returning_clause() IReturning_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IReturning_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IReturning_clauseContext)
}

func (s *Delete_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Delete_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Delete_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterDelete_stmt(s)
	}
}

func (s *Delete_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitDelete_stmt(s)
	}
}

func (s *Delete_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitDelete_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Delete_stmt() (localctx IDelete_stmtContext) {
	localctx = NewDelete_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 56, ParserRULE_delete_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(824)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(823)
			p.With_clause()
		}

	}
	{
		p.SetState(826)
		p.Match(ParserDELETE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(827)
		p.Match(ParserFROM_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(828)
		p.Qualified_table_name()
	}
	p.SetState(831)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWHERE_ {
		{
			p.SetState(829)
			p.Match(ParserWHERE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(830)
			p.expr(0)
		}

	}
	p.SetState(834)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserRETURNING_ {
		{
			p.SetState(833)
			p.Returning_clause()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IDelete_stmt_limitedContext is an interface to support dynamic dispatch.
type IDelete_stmt_limitedContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	DELETE_() antlr.TerminalNode
	FROM_() antlr.TerminalNode
	Qualified_table_name() IQualified_table_nameContext
	With_clause() IWith_clauseContext
	WHERE_() antlr.TerminalNode
	Expr() IExprContext
	Returning_clause() IReturning_clauseContext
	Limit_stmt() ILimit_stmtContext
	Order_by_stmt() IOrder_by_stmtContext

	// IsDelete_stmt_limitedContext differentiates from other interfaces.
	IsDelete_stmt_limitedContext()
}

type Delete_stmt_limitedContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyDelete_stmt_limitedContext() *Delete_stmt_limitedContext {
	var p = new(Delete_stmt_limitedContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_delete_stmt_limited
	return p
}

func InitEmptyDelete_stmt_limitedContext(p *Delete_stmt_limitedContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_delete_stmt_limited
}

func (*Delete_stmt_limitedContext) IsDelete_stmt_limitedContext() {}

func NewDelete_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmt_limitedContext {
	var p = new(Delete_stmt_limitedContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_delete_stmt_limited

	return p
}

func (s *Delete_stmt_limitedContext) GetParser() antlr.Parser { return s.parser }

func (s *Delete_stmt_limitedContext) DELETE_() antlr.TerminalNode {
	return s.GetToken(ParserDELETE_, 0)
}

func (s *Delete_stmt_limitedContext) FROM_() antlr.TerminalNode {
	return s.GetToken(ParserFROM_, 0)
}

func (s *Delete_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IQualified_table_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IQualified_table_nameContext)
}

func (s *Delete_stmt_limitedContext) With_clause() IWith_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWith_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWith_clauseContext)
}

func (s *Delete_stmt_limitedContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *Delete_stmt_limitedContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Delete_stmt_limitedContext) Returning_clause() IReturning_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IReturning_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IReturning_clauseContext)
}

func (s *Delete_stmt_limitedContext) Limit_stmt() ILimit_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ILimit_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ILimit_stmtContext)
}

func (s *Delete_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrder_by_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrder_by_stmtContext)
}

func (s *Delete_stmt_limitedContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Delete_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Delete_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterDelete_stmt_limited(s)
	}
}

func (s *Delete_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitDelete_stmt_limited(s)
	}
}

func (s *Delete_stmt_limitedContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitDelete_stmt_limited(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Delete_stmt_limited() (localctx IDelete_stmt_limitedContext) {
	localctx = NewDelete_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 58, ParserRULE_delete_stmt_limited)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(837)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(836)
			p.With_clause()
		}

	}
	{
		p.SetState(839)
		p.Match(ParserDELETE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(840)
		p.Match(ParserFROM_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(841)
		p.Qualified_table_name()
	}
	p.SetState(844)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWHERE_ {
		{
			p.SetState(842)
			p.Match(ParserWHERE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(843)
			p.expr(0)
		}

	}
	p.SetState(847)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserRETURNING_ {
		{
			p.SetState(846)
			p.Returning_clause()
		}

	}
	p.SetState(853)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserLIMIT_ || _la == ParserORDER_ {
		p.SetState(850)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserORDER_ {
			{
				p.SetState(849)
				p.Order_by_stmt()
			}

		}
		{
			p.SetState(852)
			p.Limit_stmt()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IDetach_stmtContext is an interface to support dynamic dispatch.
type IDetach_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	DETACH_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DATABASE_() antlr.TerminalNode

	// IsDetach_stmtContext differentiates from other interfaces.
	IsDetach_stmtContext()
}

type Detach_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyDetach_stmtContext() *Detach_stmtContext {
	var p = new(Detach_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_detach_stmt
	return p
}

func InitEmptyDetach_stmtContext(p *Detach_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_detach_stmt
}

func (*Detach_stmtContext) IsDetach_stmtContext() {}

func NewDetach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Detach_stmtContext {
	var p = new(Detach_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_detach_stmt

	return p
}

func (s *Detach_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Detach_stmtContext) DETACH_() antlr.TerminalNode {
	return s.GetToken(ParserDETACH_, 0)
}

func (s *Detach_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Detach_stmtContext) DATABASE_() antlr.TerminalNode {
	return s.GetToken(ParserDATABASE_, 0)
}

func (s *Detach_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Detach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Detach_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterDetach_stmt(s)
	}
}

func (s *Detach_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitDetach_stmt(s)
	}
}

func (s *Detach_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitDetach_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Detach_stmt() (localctx IDetach_stmtContext) {
	localctx = NewDetach_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 60, ParserRULE_detach_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(855)
		p.Match(ParserDETACH_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(857)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 104, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(856)
			p.Match(ParserDATABASE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(859)
		p.Schema_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IDrop_stmtContext is an interface to support dynamic dispatch.
type IDrop_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// GetObject returns the object token.
	GetObject() antlr.Token

	// SetObject sets the object token.
	SetObject(antlr.Token)

	// Getter signatures
	DROP_() antlr.TerminalNode
	Any_name() IAny_nameContext
	INDEX_() antlr.TerminalNode
	TABLE_() antlr.TerminalNode
	TRIGGER_() antlr.TerminalNode
	VIEW_() antlr.TerminalNode
	IF_() antlr.TerminalNode
	EXISTS_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode

	// IsDrop_stmtContext differentiates from other interfaces.
	IsDrop_stmtContext()
}

type Drop_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
	object antlr.Token
}

func NewEmptyDrop_stmtContext() *Drop_stmtContext {
	var p = new(Drop_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_drop_stmt
	return p
}

func InitEmptyDrop_stmtContext(p *Drop_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_drop_stmt
}

func (*Drop_stmtContext) IsDrop_stmtContext() {}

func NewDrop_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Drop_stmtContext {
	var p = new(Drop_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_drop_stmt

	return p
}

func (s *Drop_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Drop_stmtContext) GetObject() antlr.Token { return s.object }

func (s *Drop_stmtContext) SetObject(v antlr.Token) { s.object = v }

func (s *Drop_stmtContext) DROP_() antlr.TerminalNode {
	return s.GetToken(ParserDROP_, 0)
}

func (s *Drop_stmtContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Drop_stmtContext) INDEX_() antlr.TerminalNode {
	return s.GetToken(ParserINDEX_, 0)
}

func (s *Drop_stmtContext) TABLE_() antlr.TerminalNode {
	return s.GetToken(ParserTABLE_, 0)
}

func (s *Drop_stmtContext) TRIGGER_() antlr.TerminalNode {
	return s.GetToken(ParserTRIGGER_, 0)
}

func (s *Drop_stmtContext) VIEW_() antlr.TerminalNode {
	return s.GetToken(ParserVIEW_, 0)
}

func (s *Drop_stmtContext) IF_() antlr.TerminalNode {
	return s.GetToken(ParserIF_, 0)
}

func (s *Drop_stmtContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *Drop_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Drop_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Drop_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Drop_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Drop_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterDrop_stmt(s)
	}
}

func (s *Drop_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitDrop_stmt(s)
	}
}

func (s *Drop_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitDrop_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Drop_stmt() (localctx IDrop_stmtContext) {
	localctx = NewDrop_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 62, ParserRULE_drop_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(861)
		p.Match(ParserDROP_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(862)

		var _lt = p.GetTokenStream().LT(1)

		localctx.(*Drop_stmtContext).object = _lt

		_la = p.GetTokenStream().LA(1)

		if !((int64((_la-84)) & ^0x3f) == 0 && ((int64(1)<<(_la-84))&2324138882699886593) != 0) {
			var _ri = p.GetErrorHandler().RecoverInline(p)

			localctx.(*Drop_stmtContext).object = _ri
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}
	p.SetState(865)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 105, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(863)
			p.Match(ParserIF_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(864)
			p.Match(ParserEXISTS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(870)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 106, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(867)
			p.Schema_name()
		}
		{
			p.SetState(868)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(872)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IExprContext is an interface to support dynamic dispatch.
type IExprContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Literal_value() ILiteral_valueContext
	BIND_PARAMETER() antlr.TerminalNode
	Column_name() IColumn_nameContext
	Table_name() ITable_nameContext
	AllDOT() []antlr.TerminalNode
	DOT(i int) antlr.TerminalNode
	Schema_name() ISchema_nameContext
	Unary_operator() IUnary_operatorContext
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	Function_name() IFunction_nameContext
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode
	STAR() antlr.TerminalNode
	Filter_clause() IFilter_clauseContext
	Over_clause() IOver_clauseContext
	DISTINCT_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	CAST_() antlr.TerminalNode
	AS_() antlr.TerminalNode
	Type_name() IType_nameContext
	Select_stmt() ISelect_stmtContext
	EXISTS_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	CASE_() antlr.TerminalNode
	END_() antlr.TerminalNode
	AllWHEN_() []antlr.TerminalNode
	WHEN_(i int) antlr.TerminalNode
	AllTHEN_() []antlr.TerminalNode
	THEN_(i int) antlr.TerminalNode
	ELSE_() antlr.TerminalNode
	Raise_function() IRaise_functionContext
	PIPE2() antlr.TerminalNode
	DIV() antlr.TerminalNode
	MOD() antlr.TerminalNode
	PLUS() antlr.TerminalNode
	MINUS() antlr.TerminalNode
	LT2() antlr.TerminalNode
	GT2() antlr.TerminalNode
	AMP() antlr.TerminalNode
	PIPE() antlr.TerminalNode
	LT() antlr.TerminalNode
	LT_EQ() antlr.TerminalNode
	GT() antlr.TerminalNode
	GT_EQ() antlr.TerminalNode
	ASSIGN() antlr.TerminalNode
	EQ() antlr.TerminalNode
	NOT_EQ1() antlr.TerminalNode
	NOT_EQ2() antlr.TerminalNode
	IS_() antlr.TerminalNode
	IN_() antlr.TerminalNode
	LIKE_() antlr.TerminalNode
	GLOB_() antlr.TerminalNode
	MATCH_() antlr.TerminalNode
	REGEXP_() antlr.TerminalNode
	AND_() antlr.TerminalNode
	OR_() antlr.TerminalNode
	BETWEEN_() antlr.TerminalNode
	COLLATE_() antlr.TerminalNode
	Collation_name() ICollation_nameContext
	ESCAPE_() antlr.TerminalNode
	ISNULL_() antlr.TerminalNode
	NOTNULL_() antlr.TerminalNode
	NULL_() antlr.TerminalNode
	Table_function_name() ITable_function_nameContext

	// IsExprContext differentiates from other interfaces.
	IsExprContext()
}

type ExprContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyExprContext() *ExprContext {
	var p = new(ExprContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_expr
	return p
}

func InitEmptyExprContext(p *ExprContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_expr
}

func (*ExprContext) IsExprContext() {}

func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext {
	var p = new(ExprContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_expr

	return p
}

func (s *ExprContext) GetParser() antlr.Parser { return s.parser }

func (s *ExprContext) Literal_value() ILiteral_valueContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ILiteral_valueContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ILiteral_valueContext)
}

func (s *ExprContext) BIND_PARAMETER() antlr.TerminalNode {
	return s.GetToken(ParserBIND_PARAMETER, 0)
}

func (s *ExprContext) Column_name() IColumn_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *ExprContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *ExprContext) AllDOT() []antlr.TerminalNode {
	return s.GetTokens(ParserDOT)
}

func (s *ExprContext) DOT(i int) antlr.TerminalNode {
	return s.GetToken(ParserDOT, i)
}

func (s *ExprContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *ExprContext) Unary_operator() IUnary_operatorContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IUnary_operatorContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IUnary_operatorContext)
}

func (s *ExprContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *ExprContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *ExprContext) Function_name() IFunction_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFunction_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFunction_nameContext)
}

func (s *ExprContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *ExprContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *ExprContext) STAR() antlr.TerminalNode {
	return s.GetToken(ParserSTAR, 0)
}

func (s *ExprContext) Filter_clause() IFilter_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFilter_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFilter_clauseContext)
}

func (s *ExprContext) Over_clause() IOver_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOver_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOver_clauseContext)
}

func (s *ExprContext) DISTINCT_() antlr.TerminalNode {
	return s.GetToken(ParserDISTINCT_, 0)
}

func (s *ExprContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *ExprContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *ExprContext) CAST_() antlr.TerminalNode {
	return s.GetToken(ParserCAST_, 0)
}

func (s *ExprContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *ExprContext) Type_name() IType_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IType_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IType_nameContext)
}

func (s *ExprContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *ExprContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *ExprContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *ExprContext) CASE_() antlr.TerminalNode {
	return s.GetToken(ParserCASE_, 0)
}

func (s *ExprContext) END_() antlr.TerminalNode {
	return s.GetToken(ParserEND_, 0)
}

func (s *ExprContext) AllWHEN_() []antlr.TerminalNode {
	return s.GetTokens(ParserWHEN_)
}

func (s *ExprContext) WHEN_(i int) antlr.TerminalNode {
	return s.GetToken(ParserWHEN_, i)
}

func (s *ExprContext) AllTHEN_() []antlr.TerminalNode {
	return s.GetTokens(ParserTHEN_)
}

func (s *ExprContext) THEN_(i int) antlr.TerminalNode {
	return s.GetToken(ParserTHEN_, i)
}

func (s *ExprContext) ELSE_() antlr.TerminalNode {
	return s.GetToken(ParserELSE_, 0)
}

func (s *ExprContext) Raise_function() IRaise_functionContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IRaise_functionContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IRaise_functionContext)
}

func (s *ExprContext) PIPE2() antlr.TerminalNode {
	return s.GetToken(ParserPIPE2, 0)
}

func (s *ExprContext) DIV() antlr.TerminalNode {
	return s.GetToken(ParserDIV, 0)
}

func (s *ExprContext) MOD() antlr.TerminalNode {
	return s.GetToken(ParserMOD, 0)
}

func (s *ExprContext) PLUS() antlr.TerminalNode {
	return s.GetToken(ParserPLUS, 0)
}

func (s *ExprContext) MINUS() antlr.TerminalNode {
	return s.GetToken(ParserMINUS, 0)
}

func (s *ExprContext) LT2() antlr.TerminalNode {
	return s.GetToken(ParserLT2, 0)
}

func (s *ExprContext) GT2() antlr.TerminalNode {
	return s.GetToken(ParserGT2, 0)
}

func (s *ExprContext) AMP() antlr.TerminalNode {
	return s.GetToken(ParserAMP, 0)
}

func (s *ExprContext) PIPE() antlr.TerminalNode {
	return s.GetToken(ParserPIPE, 0)
}

func (s *ExprContext) LT() antlr.TerminalNode {
	return s.GetToken(ParserLT, 0)
}

func (s *ExprContext) LT_EQ() antlr.TerminalNode {
	return s.GetToken(ParserLT_EQ, 0)
}

func (s *ExprContext) GT() antlr.TerminalNode {
	return s.GetToken(ParserGT, 0)
}

func (s *ExprContext) GT_EQ() antlr.TerminalNode {
	return s.GetToken(ParserGT_EQ, 0)
}

func (s *ExprContext) ASSIGN() antlr.TerminalNode {
	return s.GetToken(ParserASSIGN, 0)
}

func (s *ExprContext) EQ() antlr.TerminalNode {
	return s.GetToken(ParserEQ, 0)
}

func (s *ExprContext) NOT_EQ1() antlr.TerminalNode {
	return s.GetToken(ParserNOT_EQ1, 0)
}

func (s *ExprContext) NOT_EQ2() antlr.TerminalNode {
	return s.GetToken(ParserNOT_EQ2, 0)
}

func (s *ExprContext) IS_() antlr.TerminalNode {
	return s.GetToken(ParserIS_, 0)
}

func (s *ExprContext) IN_() antlr.TerminalNode {
	return s.GetToken(ParserIN_, 0)
}

func (s *ExprContext) LIKE_() antlr.TerminalNode {
	return s.GetToken(ParserLIKE_, 0)
}

func (s *ExprContext) GLOB_() antlr.TerminalNode {
	return s.GetToken(ParserGLOB_, 0)
}

func (s *ExprContext) MATCH_() antlr.TerminalNode {
	return s.GetToken(ParserMATCH_, 0)
}

func (s *ExprContext) REGEXP_() antlr.TerminalNode {
	return s.GetToken(ParserREGEXP_, 0)
}

func (s *ExprContext) AND_() antlr.TerminalNode {
	return s.GetToken(ParserAND_, 0)
}

func (s *ExprContext) OR_() antlr.TerminalNode {
	return s.GetToken(ParserOR_, 0)
}

func (s *ExprContext) BETWEEN_() antlr.TerminalNode {
	return s.GetToken(ParserBETWEEN_, 0)
}

func (s *ExprContext) COLLATE_() antlr.TerminalNode {
	return s.GetToken(ParserCOLLATE_, 0)
}

func (s *ExprContext) Collation_name() ICollation_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICollation_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICollation_nameContext)
}

func (s *ExprContext) ESCAPE_() antlr.TerminalNode {
	return s.GetToken(ParserESCAPE_, 0)
}

func (s *ExprContext) ISNULL_() antlr.TerminalNode {
	return s.GetToken(ParserISNULL_, 0)
}

func (s *ExprContext) NOTNULL_() antlr.TerminalNode {
	return s.GetToken(ParserNOTNULL_, 0)
}

func (s *ExprContext) NULL_() antlr.TerminalNode {
	return s.GetToken(ParserNULL_, 0)
}

func (s *ExprContext) Table_function_name() ITable_function_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_function_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_function_nameContext)
}

func (s *ExprContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *ExprContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterExpr(s)
	}
}

func (s *ExprContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitExpr(s)
	}
}

func (s *ExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitExpr(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Expr() (localctx IExprContext) {
	return p.expr(0)
}

func (p *Parser) expr(_p int) (localctx IExprContext) {
	var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()

	_parentState := p.GetState()
	localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState)
	var _prevctx IExprContext = localctx
	var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
	_startState := 64
	p.EnterRecursionRule(localctx, 64, ParserRULE_expr, _p)
	var _la int

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(962)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 120, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(875)
			p.Literal_value()
		}

	case 2:
		{
			p.SetState(876)
			p.Match(ParserBIND_PARAMETER)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 3:
		p.SetState(885)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 108, p.GetParserRuleContext()) == 1 {
			p.SetState(880)
			p.GetErrorHandler().Sync(p)

			if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 107, p.GetParserRuleContext()) == 1 {
				{
					p.SetState(877)
					p.Schema_name()
				}
				{
					p.SetState(878)
					p.Match(ParserDOT)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			} else if p.HasError() { // JIM
				goto errorExit
			}
			{
				p.SetState(882)
				p.Table_name()
			}
			{
				p.SetState(883)
				p.Match(ParserDOT)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(887)
			p.Column_name()
		}

	case 4:
		{
			p.SetState(888)
			p.Unary_operator()
		}
		{
			p.SetState(889)
			p.expr(21)
		}

	case 5:
		{
			p.SetState(891)
			p.Function_name()
		}
		{
			p.SetState(892)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(905)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		switch p.GetTokenStream().LA(1) {
		case ParserOPEN_PAR, ParserPLUS, ParserMINUS, ParserTILDE, ParserABORT_, ParserACTION_, ParserADD_, ParserAFTER_, ParserALL_, ParserALTER_, ParserANALYZE_, ParserAND_, ParserAS_, ParserASC_, ParserATTACH_, ParserAUTOINCREMENT_, ParserBEFORE_, ParserBEGIN_, ParserBETWEEN_, ParserBY_, ParserCASCADE_, ParserCASE_, ParserCAST_, ParserCHECK_, ParserCOLLATE_, ParserCOLUMN_, ParserCOMMIT_, ParserCONFLICT_, ParserCONSTRAINT_, ParserCREATE_, ParserCROSS_, ParserCURRENT_DATE_, ParserCURRENT_TIME_, ParserCURRENT_TIMESTAMP_, ParserDATABASE_, ParserDEFAULT_, ParserDEFERRABLE_, ParserDEFERRED_, ParserDELETE_, ParserDESC_, ParserDETACH_, ParserDISTINCT_, ParserDROP_, ParserEACH_, ParserELSE_, ParserEND_, ParserESCAPE_, ParserEXCEPT_, ParserEXCLUSIVE_, ParserEXISTS_, ParserEXPLAIN_, ParserFAIL_, ParserFOR_, ParserFOREIGN_, ParserFROM_, ParserFULL_, ParserGLOB_, ParserGROUP_, ParserHAVING_, ParserIF_, ParserIGNORE_, ParserIMMEDIATE_, ParserIN_, ParserINDEX_, ParserINDEXED_, ParserINITIALLY_, ParserINNER_, ParserINSERT_, ParserINSTEAD_, ParserINTERSECT_, ParserINTO_, ParserIS_, ParserISNULL_, ParserJOIN_, ParserKEY_, ParserLEFT_, ParserLIKE_, ParserLIMIT_, ParserMATCH_, ParserNATURAL_, ParserNO_, ParserNOT_, ParserNOTNULL_, ParserNULL_, ParserOF_, ParserOFFSET_, ParserON_, ParserOR_, ParserORDER_, ParserOUTER_, ParserPLAN_, ParserPRAGMA_, ParserPRIMARY_, ParserQUERY_, ParserRAISE_, ParserRECURSIVE_, ParserREFERENCES_, ParserREGEXP_, ParserREINDEX_, ParserRELEASE_, ParserRENAME_, ParserREPLACE_, ParserRESTRICT_, ParserRIGHT_, ParserROLLBACK_, ParserROW_, ParserROWS_, ParserSAVEPOINT_, ParserSELECT_, ParserSET_, ParserTABLE_, ParserTEMP_, ParserTEMPORARY_, ParserTHEN_, ParserTO_, ParserTRANSACTION_, ParserTRIGGER_, ParserUNION_, ParserUNIQUE_, ParserUPDATE_, ParserUSING_, ParserVACUUM_, ParserVALUES_, ParserVIEW_, ParserVIRTUAL_, ParserWHEN_, ParserWHERE_, ParserWITH_, ParserWITHOUT_, ParserFIRST_VALUE_, ParserOVER_, ParserPARTITION_, ParserRANGE_, ParserPRECEDING_, ParserUNBOUNDED_, ParserCURRENT_, ParserFOLLOWING_, ParserCUME_DIST_, ParserDENSE_RANK_, ParserLAG_, ParserLAST_VALUE_, ParserLEAD_, ParserNTH_VALUE_, ParserNTILE_, ParserPERCENT_RANK_, ParserRANK_, ParserROW_NUMBER_, ParserGENERATED_, ParserALWAYS_, ParserSTORED_, ParserTRUE_, ParserFALSE_, ParserWINDOW_, ParserNULLS_, ParserFIRST_, ParserLAST_, ParserFILTER_, ParserGROUPS_, ParserEXCLUDE_, ParserIDENTIFIER, ParserNUMERIC_LITERAL, ParserBIND_PARAMETER, ParserSTRING_LITERAL, ParserBLOB_LITERAL:
			p.SetState(894)
			p.GetErrorHandler().Sync(p)

			if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 109, p.GetParserRuleContext()) == 1 {
				{
					p.SetState(893)
					p.Match(ParserDISTINCT_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			} else if p.HasError() { // JIM
				goto errorExit
			}
			{
				p.SetState(896)
				p.expr(0)
			}
			p.SetState(901)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(897)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(898)
					p.expr(0)
				}

				p.SetState(903)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		case ParserSTAR:
			{
				p.SetState(904)
				p.Match(ParserSTAR)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case ParserCLOSE_PAR:

		default:
		}
		{
			p.SetState(907)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(909)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 112, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(908)
				p.Filter_clause()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		p.SetState(912)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 113, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(911)
				p.Over_clause()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}

	case 6:
		{
			p.SetState(914)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(915)
			p.expr(0)
		}
		p.SetState(920)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(916)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(917)
				p.expr(0)
			}

			p.SetState(922)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(923)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 7:
		{
			p.SetState(925)
			p.Match(ParserCAST_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(926)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(927)
			p.expr(0)
		}
		{
			p.SetState(928)
			p.Match(ParserAS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(929)
			p.Type_name()
		}
		{
			p.SetState(930)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 8:
		p.SetState(936)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserEXISTS_ || _la == ParserNOT_ {
			p.SetState(933)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			if _la == ParserNOT_ {
				{
					p.SetState(932)
					p.Match(ParserNOT_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			}
			{
				p.SetState(935)
				p.Match(ParserEXISTS_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}
		{
			p.SetState(938)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(939)
			p.Select_stmt()
		}
		{
			p.SetState(940)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 9:
		{
			p.SetState(942)
			p.Match(ParserCASE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(944)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 117, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(943)
				p.expr(0)
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		p.SetState(951)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for ok := true; ok; ok = _la == ParserWHEN_ {
			{
				p.SetState(946)
				p.Match(ParserWHEN_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(947)
				p.expr(0)
			}
			{
				p.SetState(948)
				p.Match(ParserTHEN_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(949)
				p.expr(0)
			}

			p.SetState(953)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		p.SetState(957)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserELSE_ {
			{
				p.SetState(955)
				p.Match(ParserELSE_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(956)
				p.expr(0)
			}

		}
		{
			p.SetState(959)
			p.Match(ParserEND_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 10:
		{
			p.SetState(961)
			p.Raise_function()
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}
	p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
	p.SetState(1083)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 136, p.GetParserRuleContext())
	if p.HasError() {
		goto errorExit
	}
	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			if p.GetParseListeners() != nil {
				p.TriggerExitRuleEvent()
			}
			_prevctx = localctx
			p.SetState(1081)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}

			switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) {
			case 1:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(964)

				if !(p.Precpred(p.GetParserRuleContext(), 20)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", ""))
					goto errorExit
				}
				{
					p.SetState(965)
					p.Match(ParserPIPE2)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(966)
					p.expr(21)
				}

			case 2:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(967)

				if !(p.Precpred(p.GetParserRuleContext(), 19)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", ""))
					goto errorExit
				}
				{
					p.SetState(968)
					_la = p.GetTokenStream().LA(1)

					if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&12416) != 0) {
						p.GetErrorHandler().RecoverInline(p)
					} else {
						p.GetErrorHandler().ReportMatch(p)
						p.Consume()
					}
				}
				{
					p.SetState(969)
					p.expr(20)
				}

			case 3:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(970)

				if !(p.Precpred(p.GetParserRuleContext(), 18)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", ""))
					goto errorExit
				}
				{
					p.SetState(971)
					_la = p.GetTokenStream().LA(1)

					if !(_la == ParserPLUS || _la == ParserMINUS) {
						p.GetErrorHandler().RecoverInline(p)
					} else {
						p.GetErrorHandler().ReportMatch(p)
						p.Consume()
					}
				}
				{
					p.SetState(972)
					p.expr(19)
				}

			case 4:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(973)

				if !(p.Precpred(p.GetParserRuleContext(), 17)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", ""))
					goto errorExit
				}
				{
					p.SetState(974)
					_la = p.GetTokenStream().LA(1)

					if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&245760) != 0) {
						p.GetErrorHandler().RecoverInline(p)
					} else {
						p.GetErrorHandler().ReportMatch(p)
						p.Consume()
					}
				}
				{
					p.SetState(975)
					p.expr(18)
				}

			case 5:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(976)

				if !(p.Precpred(p.GetParserRuleContext(), 16)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", ""))
					goto errorExit
				}
				{
					p.SetState(977)
					_la = p.GetTokenStream().LA(1)

					if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&3932160) != 0) {
						p.GetErrorHandler().RecoverInline(p)
					} else {
						p.GetErrorHandler().ReportMatch(p)
						p.Consume()
					}
				}
				{
					p.SetState(978)
					p.expr(17)
				}

			case 6:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(979)

				if !(p.Precpred(p.GetParserRuleContext(), 15)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", ""))
					goto errorExit
				}
				p.SetState(992)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}

				switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 121, p.GetParserRuleContext()) {
				case 1:
					{
						p.SetState(980)
						p.Match(ParserASSIGN)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 2:
					{
						p.SetState(981)
						p.Match(ParserEQ)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 3:
					{
						p.SetState(982)
						p.Match(ParserNOT_EQ1)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 4:
					{
						p.SetState(983)
						p.Match(ParserNOT_EQ2)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 5:
					{
						p.SetState(984)
						p.Match(ParserIS_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 6:
					{
						p.SetState(985)
						p.Match(ParserIS_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}
					{
						p.SetState(986)
						p.Match(ParserNOT_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 7:
					{
						p.SetState(987)
						p.Match(ParserIN_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 8:
					{
						p.SetState(988)
						p.Match(ParserLIKE_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 9:
					{
						p.SetState(989)
						p.Match(ParserGLOB_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 10:
					{
						p.SetState(990)
						p.Match(ParserMATCH_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 11:
					{
						p.SetState(991)
						p.Match(ParserREGEXP_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case antlr.ATNInvalidAltNumber:
					goto errorExit
				}
				{
					p.SetState(994)
					p.expr(16)
				}

			case 7:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(995)

				if !(p.Precpred(p.GetParserRuleContext(), 14)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", ""))
					goto errorExit
				}
				{
					p.SetState(996)
					p.Match(ParserAND_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(997)
					p.expr(15)
				}

			case 8:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(998)

				if !(p.Precpred(p.GetParserRuleContext(), 13)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", ""))
					goto errorExit
				}
				{
					p.SetState(999)
					p.Match(ParserOR_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1000)
					p.expr(14)
				}

			case 9:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(1001)

				if !(p.Precpred(p.GetParserRuleContext(), 6)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", ""))
					goto errorExit
				}
				{
					p.SetState(1002)
					p.Match(ParserIS_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				p.SetState(1004)
				p.GetErrorHandler().Sync(p)

				if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 122, p.GetParserRuleContext()) == 1 {
					{
						p.SetState(1003)
						p.Match(ParserNOT_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				} else if p.HasError() { // JIM
					goto errorExit
				}
				{
					p.SetState(1006)
					p.expr(7)
				}

			case 10:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(1007)

				if !(p.Precpred(p.GetParserRuleContext(), 5)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", ""))
					goto errorExit
				}
				p.SetState(1009)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)

				if _la == ParserNOT_ {
					{
						p.SetState(1008)
						p.Match(ParserNOT_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				}
				{
					p.SetState(1011)
					p.Match(ParserBETWEEN_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1012)
					p.expr(0)
				}
				{
					p.SetState(1013)
					p.Match(ParserAND_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1014)
					p.expr(6)
				}

			case 11:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(1016)

				if !(p.Precpred(p.GetParserRuleContext(), 9)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", ""))
					goto errorExit
				}
				{
					p.SetState(1017)
					p.Match(ParserCOLLATE_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1018)
					p.Collation_name()
				}

			case 12:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(1019)

				if !(p.Precpred(p.GetParserRuleContext(), 8)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", ""))
					goto errorExit
				}
				p.SetState(1021)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)

				if _la == ParserNOT_ {
					{
						p.SetState(1020)
						p.Match(ParserNOT_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				}
				{
					p.SetState(1023)
					_la = p.GetTokenStream().LA(1)

					if !((int64((_la-77)) & ^0x3f) == 0 && ((int64(1)<<(_la-77))&2199028498433) != 0) {
						p.GetErrorHandler().RecoverInline(p)
					} else {
						p.GetErrorHandler().ReportMatch(p)
						p.Consume()
					}
				}
				{
					p.SetState(1024)
					p.expr(0)
				}
				p.SetState(1027)
				p.GetErrorHandler().Sync(p)

				if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 125, p.GetParserRuleContext()) == 1 {
					{
						p.SetState(1025)
						p.Match(ParserESCAPE_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}
					{
						p.SetState(1026)
						p.expr(0)
					}

				} else if p.HasError() { // JIM
					goto errorExit
				}

			case 13:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(1029)

				if !(p.Precpred(p.GetParserRuleContext(), 7)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", ""))
					goto errorExit
				}
				p.SetState(1034)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}

				switch p.GetTokenStream().LA(1) {
				case ParserISNULL_:
					{
						p.SetState(1030)
						p.Match(ParserISNULL_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case ParserNOTNULL_:
					{
						p.SetState(1031)
						p.Match(ParserNOTNULL_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case ParserNOT_:
					{
						p.SetState(1032)
						p.Match(ParserNOT_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}
					{
						p.SetState(1033)
						p.Match(ParserNULL_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				default:
					p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
					goto errorExit
				}

			case 14:
				localctx = NewExprContext(p, _parentctx, _parentState)
				p.PushNewRecursionContext(localctx, _startState, ParserRULE_expr)
				p.SetState(1036)

				if !(p.Precpred(p.GetParserRuleContext(), 4)) {
					p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", ""))
					goto errorExit
				}
				p.SetState(1038)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)

				if _la == ParserNOT_ {
					{
						p.SetState(1037)
						p.Match(ParserNOT_)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				}
				{
					p.SetState(1040)
					p.Match(ParserIN_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				p.SetState(1079)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}

				switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 134, p.GetParserRuleContext()) {
				case 1:
					{
						p.SetState(1041)
						p.Match(ParserOPEN_PAR)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}
					p.SetState(1051)
					p.GetErrorHandler().Sync(p)

					if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 129, p.GetParserRuleContext()) == 1 {
						{
							p.SetState(1042)
							p.Select_stmt()
						}

					} else if p.HasError() { // JIM
						goto errorExit
					} else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 129, p.GetParserRuleContext()) == 2 {
						{
							p.SetState(1043)
							p.expr(0)
						}
						p.SetState(1048)
						p.GetErrorHandler().Sync(p)
						if p.HasError() {
							goto errorExit
						}
						_la = p.GetTokenStream().LA(1)

						for _la == ParserCOMMA {
							{
								p.SetState(1044)
								p.Match(ParserCOMMA)
								if p.HasError() {
									// Recognition error - abort rule
									goto errorExit
								}
							}
							{
								p.SetState(1045)
								p.expr(0)
							}

							p.SetState(1050)
							p.GetErrorHandler().Sync(p)
							if p.HasError() {
								goto errorExit
							}
							_la = p.GetTokenStream().LA(1)
						}

					} else if p.HasError() { // JIM
						goto errorExit
					}
					{
						p.SetState(1053)
						p.Match(ParserCLOSE_PAR)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case 2:
					p.SetState(1057)
					p.GetErrorHandler().Sync(p)

					if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 130, p.GetParserRuleContext()) == 1 {
						{
							p.SetState(1054)
							p.Schema_name()
						}
						{
							p.SetState(1055)
							p.Match(ParserDOT)
							if p.HasError() {
								// Recognition error - abort rule
								goto errorExit
							}
						}

					} else if p.HasError() { // JIM
						goto errorExit
					}
					{
						p.SetState(1059)
						p.Table_name()
					}

				case 3:
					p.SetState(1063)
					p.GetErrorHandler().Sync(p)

					if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 131, p.GetParserRuleContext()) == 1 {
						{
							p.SetState(1060)
							p.Schema_name()
						}
						{
							p.SetState(1061)
							p.Match(ParserDOT)
							if p.HasError() {
								// Recognition error - abort rule
								goto errorExit
							}
						}

					} else if p.HasError() { // JIM
						goto errorExit
					}
					{
						p.SetState(1065)
						p.Table_function_name()
					}
					{
						p.SetState(1066)
						p.Match(ParserOPEN_PAR)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}
					p.SetState(1075)
					p.GetErrorHandler().Sync(p)
					if p.HasError() {
						goto errorExit
					}
					_la = p.GetTokenStream().LA(1)

					if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-33552632) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1152921504606846977) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&4476578029606273023) != 0) {
						{
							p.SetState(1067)
							p.expr(0)
						}
						p.SetState(1072)
						p.GetErrorHandler().Sync(p)
						if p.HasError() {
							goto errorExit
						}
						_la = p.GetTokenStream().LA(1)

						for _la == ParserCOMMA {
							{
								p.SetState(1068)
								p.Match(ParserCOMMA)
								if p.HasError() {
									// Recognition error - abort rule
									goto errorExit
								}
							}
							{
								p.SetState(1069)
								p.expr(0)
							}

							p.SetState(1074)
							p.GetErrorHandler().Sync(p)
							if p.HasError() {
								goto errorExit
							}
							_la = p.GetTokenStream().LA(1)
						}

					}
					{
						p.SetState(1077)
						p.Match(ParserCLOSE_PAR)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}

				case antlr.ATNInvalidAltNumber:
					goto errorExit
				}

			case antlr.ATNInvalidAltNumber:
				goto errorExit
			}

		}
		p.SetState(1085)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 136, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.UnrollRecursionContexts(_parentctx)
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IRaise_functionContext is an interface to support dynamic dispatch.
type IRaise_functionContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	RAISE_() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode
	IGNORE_() antlr.TerminalNode
	COMMA() antlr.TerminalNode
	Error_message() IError_messageContext
	ROLLBACK_() antlr.TerminalNode
	ABORT_() antlr.TerminalNode
	FAIL_() antlr.TerminalNode

	// IsRaise_functionContext differentiates from other interfaces.
	IsRaise_functionContext()
}

type Raise_functionContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyRaise_functionContext() *Raise_functionContext {
	var p = new(Raise_functionContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_raise_function
	return p
}

func InitEmptyRaise_functionContext(p *Raise_functionContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_raise_function
}

func (*Raise_functionContext) IsRaise_functionContext() {}

func NewRaise_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Raise_functionContext {
	var p = new(Raise_functionContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_raise_function

	return p
}

func (s *Raise_functionContext) GetParser() antlr.Parser { return s.parser }

func (s *Raise_functionContext) RAISE_() antlr.TerminalNode {
	return s.GetToken(ParserRAISE_, 0)
}

func (s *Raise_functionContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Raise_functionContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Raise_functionContext) IGNORE_() antlr.TerminalNode {
	return s.GetToken(ParserIGNORE_, 0)
}

func (s *Raise_functionContext) COMMA() antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, 0)
}

func (s *Raise_functionContext) Error_message() IError_messageContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IError_messageContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IError_messageContext)
}

func (s *Raise_functionContext) ROLLBACK_() antlr.TerminalNode {
	return s.GetToken(ParserROLLBACK_, 0)
}

func (s *Raise_functionContext) ABORT_() antlr.TerminalNode {
	return s.GetToken(ParserABORT_, 0)
}

func (s *Raise_functionContext) FAIL_() antlr.TerminalNode {
	return s.GetToken(ParserFAIL_, 0)
}

func (s *Raise_functionContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Raise_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Raise_functionContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterRaise_function(s)
	}
}

func (s *Raise_functionContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitRaise_function(s)
	}
}

func (s *Raise_functionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitRaise_function(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Raise_function() (localctx IRaise_functionContext) {
	localctx = NewRaise_functionContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 66, ParserRULE_raise_function)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1086)
		p.Match(ParserRAISE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1087)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1092)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserIGNORE_:
		{
			p.SetState(1088)
			p.Match(ParserIGNORE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserABORT_, ParserFAIL_, ParserROLLBACK_:
		{
			p.SetState(1089)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserABORT_ || _la == ParserFAIL_ || _la == ParserROLLBACK_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		{
			p.SetState(1090)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1091)
			p.Error_message()
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}
	{
		p.SetState(1094)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ILiteral_valueContext is an interface to support dynamic dispatch.
type ILiteral_valueContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	NUMERIC_LITERAL() antlr.TerminalNode
	STRING_LITERAL() antlr.TerminalNode
	BLOB_LITERAL() antlr.TerminalNode
	NULL_() antlr.TerminalNode
	TRUE_() antlr.TerminalNode
	FALSE_() antlr.TerminalNode
	CURRENT_TIME_() antlr.TerminalNode
	CURRENT_DATE_() antlr.TerminalNode
	CURRENT_TIMESTAMP_() antlr.TerminalNode

	// IsLiteral_valueContext differentiates from other interfaces.
	IsLiteral_valueContext()
}

type Literal_valueContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyLiteral_valueContext() *Literal_valueContext {
	var p = new(Literal_valueContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_literal_value
	return p
}

func InitEmptyLiteral_valueContext(p *Literal_valueContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_literal_value
}

func (*Literal_valueContext) IsLiteral_valueContext() {}

func NewLiteral_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Literal_valueContext {
	var p = new(Literal_valueContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_literal_value

	return p
}

func (s *Literal_valueContext) GetParser() antlr.Parser { return s.parser }

func (s *Literal_valueContext) NUMERIC_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserNUMERIC_LITERAL, 0)
}

func (s *Literal_valueContext) STRING_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserSTRING_LITERAL, 0)
}

func (s *Literal_valueContext) BLOB_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserBLOB_LITERAL, 0)
}

func (s *Literal_valueContext) NULL_() antlr.TerminalNode {
	return s.GetToken(ParserNULL_, 0)
}

func (s *Literal_valueContext) TRUE_() antlr.TerminalNode {
	return s.GetToken(ParserTRUE_, 0)
}

func (s *Literal_valueContext) FALSE_() antlr.TerminalNode {
	return s.GetToken(ParserFALSE_, 0)
}

func (s *Literal_valueContext) CURRENT_TIME_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_TIME_, 0)
}

func (s *Literal_valueContext) CURRENT_DATE_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_DATE_, 0)
}

func (s *Literal_valueContext) CURRENT_TIMESTAMP_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_TIMESTAMP_, 0)
}

func (s *Literal_valueContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Literal_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Literal_valueContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterLiteral_value(s)
	}
}

func (s *Literal_valueContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitLiteral_value(s)
	}
}

func (s *Literal_valueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitLiteral_value(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Literal_value() (localctx ILiteral_valueContext) {
	localctx = NewLiteral_valueContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 68, ParserRULE_literal_value)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1096)
		_la = p.GetTokenStream().LA(1)

		if !(((int64((_la-52)) & ^0x3f) == 0 && ((int64(1)<<(_la-52))&4503599627370503) != 0) || ((int64((_la-172)) & ^0x3f) == 0 && ((int64(1)<<(_la-172))&212995) != 0)) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IInsert_stmtContext is an interface to support dynamic dispatch.
type IInsert_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	INTO_() antlr.TerminalNode
	Table_name() ITable_nameContext
	INSERT_() antlr.TerminalNode
	REPLACE_() antlr.TerminalNode
	OR_() antlr.TerminalNode
	DEFAULT_() antlr.TerminalNode
	VALUES_() antlr.TerminalNode
	With_clause() IWith_clauseContext
	ROLLBACK_() antlr.TerminalNode
	ABORT_() antlr.TerminalNode
	FAIL_() antlr.TerminalNode
	IGNORE_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	AS_() antlr.TerminalNode
	Table_alias() ITable_aliasContext
	AllOPEN_PAR() []antlr.TerminalNode
	OPEN_PAR(i int) antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	AllCLOSE_PAR() []antlr.TerminalNode
	CLOSE_PAR(i int) antlr.TerminalNode
	Returning_clause() IReturning_clauseContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	Select_stmt() ISelect_stmtContext
	Upsert_clause() IUpsert_clauseContext

	// IsInsert_stmtContext differentiates from other interfaces.
	IsInsert_stmtContext()
}

type Insert_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyInsert_stmtContext() *Insert_stmtContext {
	var p = new(Insert_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_insert_stmt
	return p
}

func InitEmptyInsert_stmtContext(p *Insert_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_insert_stmt
}

func (*Insert_stmtContext) IsInsert_stmtContext() {}

func NewInsert_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Insert_stmtContext {
	var p = new(Insert_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_insert_stmt

	return p
}

func (s *Insert_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Insert_stmtContext) INTO_() antlr.TerminalNode {
	return s.GetToken(ParserINTO_, 0)
}

func (s *Insert_stmtContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Insert_stmtContext) INSERT_() antlr.TerminalNode {
	return s.GetToken(ParserINSERT_, 0)
}

func (s *Insert_stmtContext) REPLACE_() antlr.TerminalNode {
	return s.GetToken(ParserREPLACE_, 0)
}

func (s *Insert_stmtContext) OR_() antlr.TerminalNode {
	return s.GetToken(ParserOR_, 0)
}

func (s *Insert_stmtContext) DEFAULT_() antlr.TerminalNode {
	return s.GetToken(ParserDEFAULT_, 0)
}

func (s *Insert_stmtContext) VALUES_() antlr.TerminalNode {
	return s.GetToken(ParserVALUES_, 0)
}

func (s *Insert_stmtContext) With_clause() IWith_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWith_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWith_clauseContext)
}

func (s *Insert_stmtContext) ROLLBACK_() antlr.TerminalNode {
	return s.GetToken(ParserROLLBACK_, 0)
}

func (s *Insert_stmtContext) ABORT_() antlr.TerminalNode {
	return s.GetToken(ParserABORT_, 0)
}

func (s *Insert_stmtContext) FAIL_() antlr.TerminalNode {
	return s.GetToken(ParserFAIL_, 0)
}

func (s *Insert_stmtContext) IGNORE_() antlr.TerminalNode {
	return s.GetToken(ParserIGNORE_, 0)
}

func (s *Insert_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Insert_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Insert_stmtContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Insert_stmtContext) Table_alias() ITable_aliasContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_aliasContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_aliasContext)
}

func (s *Insert_stmtContext) AllOPEN_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserOPEN_PAR)
}

func (s *Insert_stmtContext) OPEN_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, i)
}

func (s *Insert_stmtContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Insert_stmtContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Insert_stmtContext) AllCLOSE_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserCLOSE_PAR)
}

func (s *Insert_stmtContext) CLOSE_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, i)
}

func (s *Insert_stmtContext) Returning_clause() IReturning_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IReturning_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IReturning_clauseContext)
}

func (s *Insert_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Insert_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Insert_stmtContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Insert_stmtContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Insert_stmtContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Insert_stmtContext) Upsert_clause() IUpsert_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IUpsert_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IUpsert_clauseContext)
}

func (s *Insert_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Insert_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Insert_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterInsert_stmt(s)
	}
}

func (s *Insert_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitInsert_stmt(s)
	}
}

func (s *Insert_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitInsert_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Insert_stmt() (localctx IInsert_stmtContext) {
	localctx = NewInsert_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 70, ParserRULE_insert_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(1099)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(1098)
			p.With_clause()
		}

	}
	p.SetState(1106)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 139, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(1101)
			p.Match(ParserINSERT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 2:
		{
			p.SetState(1102)
			p.Match(ParserREPLACE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 3:
		{
			p.SetState(1103)
			p.Match(ParserINSERT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1104)
			p.Match(ParserOR_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1105)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}
	{
		p.SetState(1108)
		p.Match(ParserINTO_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1112)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 140, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1109)
			p.Schema_name()
		}
		{
			p.SetState(1110)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(1114)
		p.Table_name()
	}
	p.SetState(1117)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserAS_ {
		{
			p.SetState(1115)
			p.Match(ParserAS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1116)
			p.Table_alias()
		}

	}
	p.SetState(1130)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserOPEN_PAR {
		{
			p.SetState(1119)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1120)
			p.Column_name()
		}
		p.SetState(1125)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1121)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1122)
				p.Column_name()
			}

			p.SetState(1127)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(1128)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	}
	p.SetState(1168)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserSELECT_, ParserVALUES_, ParserWITH_:
		p.SetState(1161)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 147, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(1132)
				p.Match(ParserVALUES_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1133)
				p.Match(ParserOPEN_PAR)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1134)
				p.expr(0)
			}
			p.SetState(1139)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1135)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1136)
					p.expr(0)
				}

				p.SetState(1141)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(1142)
				p.Match(ParserCLOSE_PAR)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			p.SetState(1157)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1143)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1144)
					p.Match(ParserOPEN_PAR)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1145)
					p.expr(0)
				}
				p.SetState(1150)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)

				for _la == ParserCOMMA {
					{
						p.SetState(1146)
						p.Match(ParserCOMMA)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}
					{
						p.SetState(1147)
						p.expr(0)
					}

					p.SetState(1152)
					p.GetErrorHandler().Sync(p)
					if p.HasError() {
						goto errorExit
					}
					_la = p.GetTokenStream().LA(1)
				}
				{
					p.SetState(1153)
					p.Match(ParserCLOSE_PAR)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

				p.SetState(1159)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		case 2:
			{
				p.SetState(1160)
				p.Select_stmt()
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}
		p.SetState(1164)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserON_ {
			{
				p.SetState(1163)
				p.Upsert_clause()
			}

		}

	case ParserDEFAULT_:
		{
			p.SetState(1166)
			p.Match(ParserDEFAULT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1167)
			p.Match(ParserVALUES_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}
	p.SetState(1171)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserRETURNING_ {
		{
			p.SetState(1170)
			p.Returning_clause()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IReturning_clauseContext is an interface to support dynamic dispatch.
type IReturning_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	RETURNING_() antlr.TerminalNode
	AllResult_column() []IResult_columnContext
	Result_column(i int) IResult_columnContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsReturning_clauseContext differentiates from other interfaces.
	IsReturning_clauseContext()
}

type Returning_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyReturning_clauseContext() *Returning_clauseContext {
	var p = new(Returning_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_returning_clause
	return p
}

func InitEmptyReturning_clauseContext(p *Returning_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_returning_clause
}

func (*Returning_clauseContext) IsReturning_clauseContext() {}

func NewReturning_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Returning_clauseContext {
	var p = new(Returning_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_returning_clause

	return p
}

func (s *Returning_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Returning_clauseContext) RETURNING_() antlr.TerminalNode {
	return s.GetToken(ParserRETURNING_, 0)
}

func (s *Returning_clauseContext) AllResult_column() []IResult_columnContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IResult_columnContext); ok {
			len++
		}
	}

	tst := make([]IResult_columnContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IResult_columnContext); ok {
			tst[i] = t.(IResult_columnContext)
			i++
		}
	}

	return tst
}

func (s *Returning_clauseContext) Result_column(i int) IResult_columnContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IResult_columnContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IResult_columnContext)
}

func (s *Returning_clauseContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Returning_clauseContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Returning_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Returning_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Returning_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterReturning_clause(s)
	}
}

func (s *Returning_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitReturning_clause(s)
	}
}

func (s *Returning_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitReturning_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Returning_clause() (localctx IReturning_clauseContext) {
	localctx = NewReturning_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 72, ParserRULE_returning_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1173)
		p.Match(ParserRETURNING_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1174)
		p.Result_column()
	}
	p.SetState(1179)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(1175)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1176)
			p.Result_column()
		}

		p.SetState(1181)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IUpsert_clauseContext is an interface to support dynamic dispatch.
type IUpsert_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ON_() antlr.TerminalNode
	CONFLICT_() antlr.TerminalNode
	DO_() antlr.TerminalNode
	NOTHING_() antlr.TerminalNode
	UPDATE_() antlr.TerminalNode
	SET_() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	AllIndexed_column() []IIndexed_columnContext
	Indexed_column(i int) IIndexed_columnContext
	CLOSE_PAR() antlr.TerminalNode
	AllASSIGN() []antlr.TerminalNode
	ASSIGN(i int) antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	AllWHERE_() []antlr.TerminalNode
	WHERE_(i int) antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	AllColumn_name_list() []IColumn_name_listContext
	Column_name_list(i int) IColumn_name_listContext

	// IsUpsert_clauseContext differentiates from other interfaces.
	IsUpsert_clauseContext()
}

type Upsert_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyUpsert_clauseContext() *Upsert_clauseContext {
	var p = new(Upsert_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_upsert_clause
	return p
}

func InitEmptyUpsert_clauseContext(p *Upsert_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_upsert_clause
}

func (*Upsert_clauseContext) IsUpsert_clauseContext() {}

func NewUpsert_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Upsert_clauseContext {
	var p = new(Upsert_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_upsert_clause

	return p
}

func (s *Upsert_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Upsert_clauseContext) ON_() antlr.TerminalNode {
	return s.GetToken(ParserON_, 0)
}

func (s *Upsert_clauseContext) CONFLICT_() antlr.TerminalNode {
	return s.GetToken(ParserCONFLICT_, 0)
}

func (s *Upsert_clauseContext) DO_() antlr.TerminalNode {
	return s.GetToken(ParserDO_, 0)
}

func (s *Upsert_clauseContext) NOTHING_() antlr.TerminalNode {
	return s.GetToken(ParserNOTHING_, 0)
}

func (s *Upsert_clauseContext) UPDATE_() antlr.TerminalNode {
	return s.GetToken(ParserUPDATE_, 0)
}

func (s *Upsert_clauseContext) SET_() antlr.TerminalNode {
	return s.GetToken(ParserSET_, 0)
}

func (s *Upsert_clauseContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Upsert_clauseContext) AllIndexed_column() []IIndexed_columnContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IIndexed_columnContext); ok {
			len++
		}
	}

	tst := make([]IIndexed_columnContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IIndexed_columnContext); ok {
			tst[i] = t.(IIndexed_columnContext)
			i++
		}
	}

	return tst
}

func (s *Upsert_clauseContext) Indexed_column(i int) IIndexed_columnContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IIndexed_columnContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IIndexed_columnContext)
}

func (s *Upsert_clauseContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Upsert_clauseContext) AllASSIGN() []antlr.TerminalNode {
	return s.GetTokens(ParserASSIGN)
}

func (s *Upsert_clauseContext) ASSIGN(i int) antlr.TerminalNode {
	return s.GetToken(ParserASSIGN, i)
}

func (s *Upsert_clauseContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Upsert_clauseContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Upsert_clauseContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Upsert_clauseContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Upsert_clauseContext) AllWHERE_() []antlr.TerminalNode {
	return s.GetTokens(ParserWHERE_)
}

func (s *Upsert_clauseContext) WHERE_(i int) antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, i)
}

func (s *Upsert_clauseContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Upsert_clauseContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Upsert_clauseContext) AllColumn_name_list() []IColumn_name_listContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_name_listContext); ok {
			len++
		}
	}

	tst := make([]IColumn_name_listContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_name_listContext); ok {
			tst[i] = t.(IColumn_name_listContext)
			i++
		}
	}

	return tst
}

func (s *Upsert_clauseContext) Column_name_list(i int) IColumn_name_listContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_name_listContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_name_listContext)
}

func (s *Upsert_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Upsert_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Upsert_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterUpsert_clause(s)
	}
}

func (s *Upsert_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitUpsert_clause(s)
	}
}

func (s *Upsert_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitUpsert_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Upsert_clause() (localctx IUpsert_clauseContext) {
	localctx = NewUpsert_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 74, ParserRULE_upsert_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1182)
		p.Match(ParserON_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1183)
		p.Match(ParserCONFLICT_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1198)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserOPEN_PAR {
		{
			p.SetState(1184)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1185)
			p.Indexed_column()
		}
		p.SetState(1190)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1186)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1187)
				p.Indexed_column()
			}

			p.SetState(1192)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(1193)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1196)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserWHERE_ {
			{
				p.SetState(1194)
				p.Match(ParserWHERE_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1195)
				p.expr(0)
			}

		}

	}
	{
		p.SetState(1200)
		p.Match(ParserDO_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1227)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserNOTHING_:
		{
			p.SetState(1201)
			p.Match(ParserNOTHING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserUPDATE_:
		{
			p.SetState(1202)
			p.Match(ParserUPDATE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1203)
			p.Match(ParserSET_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

		p.SetState(1206)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 155, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(1204)
				p.Column_name()
			}

		case 2:
			{
				p.SetState(1205)
				p.Column_name_list()
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}
		{
			p.SetState(1208)
			p.Match(ParserASSIGN)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1209)
			p.expr(0)
		}
		p.SetState(1220)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1210)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			p.SetState(1213)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}

			switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 156, p.GetParserRuleContext()) {
			case 1:
				{
					p.SetState(1211)
					p.Column_name()
				}

			case 2:
				{
					p.SetState(1212)
					p.Column_name_list()
				}

			case antlr.ATNInvalidAltNumber:
				goto errorExit
			}
			{
				p.SetState(1215)
				p.Match(ParserASSIGN)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1216)
				p.expr(0)
			}

			p.SetState(1222)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		p.SetState(1225)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserWHERE_ {
			{
				p.SetState(1223)
				p.Match(ParserWHERE_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1224)
				p.expr(0)
			}

		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IPragma_stmtContext is an interface to support dynamic dispatch.
type IPragma_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	PRAGMA_() antlr.TerminalNode
	Pragma_name() IPragma_nameContext
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	ASSIGN() antlr.TerminalNode
	Pragma_value() IPragma_valueContext
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode

	// IsPragma_stmtContext differentiates from other interfaces.
	IsPragma_stmtContext()
}

type Pragma_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyPragma_stmtContext() *Pragma_stmtContext {
	var p = new(Pragma_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_pragma_stmt
	return p
}

func InitEmptyPragma_stmtContext(p *Pragma_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_pragma_stmt
}

func (*Pragma_stmtContext) IsPragma_stmtContext() {}

func NewPragma_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_stmtContext {
	var p = new(Pragma_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_pragma_stmt

	return p
}

func (s *Pragma_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Pragma_stmtContext) PRAGMA_() antlr.TerminalNode {
	return s.GetToken(ParserPRAGMA_, 0)
}

func (s *Pragma_stmtContext) Pragma_name() IPragma_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IPragma_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IPragma_nameContext)
}

func (s *Pragma_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Pragma_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Pragma_stmtContext) ASSIGN() antlr.TerminalNode {
	return s.GetToken(ParserASSIGN, 0)
}

func (s *Pragma_stmtContext) Pragma_value() IPragma_valueContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IPragma_valueContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IPragma_valueContext)
}

func (s *Pragma_stmtContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Pragma_stmtContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Pragma_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Pragma_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Pragma_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterPragma_stmt(s)
	}
}

func (s *Pragma_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitPragma_stmt(s)
	}
}

func (s *Pragma_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitPragma_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Pragma_stmt() (localctx IPragma_stmtContext) {
	localctx = NewPragma_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 76, ParserRULE_pragma_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1229)
		p.Match(ParserPRAGMA_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1233)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 160, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1230)
			p.Schema_name()
		}
		{
			p.SetState(1231)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(1235)
		p.Pragma_name()
	}
	p.SetState(1242)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	switch p.GetTokenStream().LA(1) {
	case ParserASSIGN:
		{
			p.SetState(1236)
			p.Match(ParserASSIGN)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1237)
			p.Pragma_value()
		}

	case ParserOPEN_PAR:
		{
			p.SetState(1238)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1239)
			p.Pragma_value()
		}
		{
			p.SetState(1240)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserEOF, ParserSCOL, ParserALTER_, ParserANALYZE_, ParserATTACH_, ParserBEGIN_, ParserCOMMIT_, ParserCREATE_, ParserDELETE_, ParserDETACH_, ParserDROP_, ParserEND_, ParserEXPLAIN_, ParserINSERT_, ParserPRAGMA_, ParserREINDEX_, ParserRELEASE_, ParserREPLACE_, ParserROLLBACK_, ParserSAVEPOINT_, ParserSELECT_, ParserUPDATE_, ParserVACUUM_, ParserVALUES_, ParserWITH_:

	default:
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IPragma_valueContext is an interface to support dynamic dispatch.
type IPragma_valueContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Signed_number() ISigned_numberContext
	Name() INameContext
	STRING_LITERAL() antlr.TerminalNode

	// IsPragma_valueContext differentiates from other interfaces.
	IsPragma_valueContext()
}

type Pragma_valueContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyPragma_valueContext() *Pragma_valueContext {
	var p = new(Pragma_valueContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_pragma_value
	return p
}

func InitEmptyPragma_valueContext(p *Pragma_valueContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_pragma_value
}

func (*Pragma_valueContext) IsPragma_valueContext() {}

func NewPragma_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_valueContext {
	var p = new(Pragma_valueContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_pragma_value

	return p
}

func (s *Pragma_valueContext) GetParser() antlr.Parser { return s.parser }

func (s *Pragma_valueContext) Signed_number() ISigned_numberContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISigned_numberContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISigned_numberContext)
}

func (s *Pragma_valueContext) Name() INameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(INameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(INameContext)
}

func (s *Pragma_valueContext) STRING_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserSTRING_LITERAL, 0)
}

func (s *Pragma_valueContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Pragma_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Pragma_valueContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterPragma_value(s)
	}
}

func (s *Pragma_valueContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitPragma_value(s)
	}
}

func (s *Pragma_valueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitPragma_value(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Pragma_value() (localctx IPragma_valueContext) {
	localctx = NewPragma_valueContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 78, ParserRULE_pragma_value)
	p.SetState(1247)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 162, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1244)
			p.Signed_number()
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1245)
			p.Name()
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1246)
			p.Match(ParserSTRING_LITERAL)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IReindex_stmtContext is an interface to support dynamic dispatch.
type IReindex_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	REINDEX_() antlr.TerminalNode
	Collation_name() ICollation_nameContext
	Table_name() ITable_nameContext
	Index_name() IIndex_nameContext
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode

	// IsReindex_stmtContext differentiates from other interfaces.
	IsReindex_stmtContext()
}

type Reindex_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyReindex_stmtContext() *Reindex_stmtContext {
	var p = new(Reindex_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_reindex_stmt
	return p
}

func InitEmptyReindex_stmtContext(p *Reindex_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_reindex_stmt
}

func (*Reindex_stmtContext) IsReindex_stmtContext() {}

func NewReindex_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Reindex_stmtContext {
	var p = new(Reindex_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_reindex_stmt

	return p
}

func (s *Reindex_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Reindex_stmtContext) REINDEX_() antlr.TerminalNode {
	return s.GetToken(ParserREINDEX_, 0)
}

func (s *Reindex_stmtContext) Collation_name() ICollation_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICollation_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICollation_nameContext)
}

func (s *Reindex_stmtContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Reindex_stmtContext) Index_name() IIndex_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IIndex_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IIndex_nameContext)
}

func (s *Reindex_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Reindex_stmtContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Reindex_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Reindex_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Reindex_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterReindex_stmt(s)
	}
}

func (s *Reindex_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitReindex_stmt(s)
	}
}

func (s *Reindex_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitReindex_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Reindex_stmt() (localctx IReindex_stmtContext) {
	localctx = NewReindex_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 80, ParserRULE_reindex_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1249)
		p.Match(ParserREINDEX_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1260)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 165, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1250)
			p.Collation_name()
		}

	} else if p.HasError() { // JIM
		goto errorExit
	} else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 165, p.GetParserRuleContext()) == 2 {
		p.SetState(1254)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 163, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1251)
				p.Schema_name()
			}
			{
				p.SetState(1252)
				p.Match(ParserDOT)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		p.SetState(1258)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 164, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(1256)
				p.Table_name()
			}

		case 2:
			{
				p.SetState(1257)
				p.Index_name()
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISelect_stmtContext is an interface to support dynamic dispatch.
type ISelect_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllSelect_core() []ISelect_coreContext
	Select_core(i int) ISelect_coreContext
	Common_table_stmt() ICommon_table_stmtContext
	AllCompound_operator() []ICompound_operatorContext
	Compound_operator(i int) ICompound_operatorContext
	Order_by_stmt() IOrder_by_stmtContext
	Limit_stmt() ILimit_stmtContext

	// IsSelect_stmtContext differentiates from other interfaces.
	IsSelect_stmtContext()
}

type Select_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySelect_stmtContext() *Select_stmtContext {
	var p = new(Select_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_select_stmt
	return p
}

func InitEmptySelect_stmtContext(p *Select_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_select_stmt
}

func (*Select_stmtContext) IsSelect_stmtContext() {}

func NewSelect_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_stmtContext {
	var p = new(Select_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_select_stmt

	return p
}

func (s *Select_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Select_stmtContext) AllSelect_core() []ISelect_coreContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ISelect_coreContext); ok {
			len++
		}
	}

	tst := make([]ISelect_coreContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ISelect_coreContext); ok {
			tst[i] = t.(ISelect_coreContext)
			i++
		}
	}

	return tst
}

func (s *Select_stmtContext) Select_core(i int) ISelect_coreContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_coreContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_coreContext)
}

func (s *Select_stmtContext) Common_table_stmt() ICommon_table_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICommon_table_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICommon_table_stmtContext)
}

func (s *Select_stmtContext) AllCompound_operator() []ICompound_operatorContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ICompound_operatorContext); ok {
			len++
		}
	}

	tst := make([]ICompound_operatorContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ICompound_operatorContext); ok {
			tst[i] = t.(ICompound_operatorContext)
			i++
		}
	}

	return tst
}

func (s *Select_stmtContext) Compound_operator(i int) ICompound_operatorContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICompound_operatorContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICompound_operatorContext)
}

func (s *Select_stmtContext) Order_by_stmt() IOrder_by_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrder_by_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrder_by_stmtContext)
}

func (s *Select_stmtContext) Limit_stmt() ILimit_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ILimit_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ILimit_stmtContext)
}

func (s *Select_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSelect_stmt(s)
	}
}

func (s *Select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSelect_stmt(s)
	}
}

func (s *Select_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSelect_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Select_stmt() (localctx ISelect_stmtContext) {
	localctx = NewSelect_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 82, ParserRULE_select_stmt)
	var _la int

	var _alt int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(1263)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(1262)
			p.Common_table_stmt()
		}

	}
	{
		p.SetState(1265)
		p.Select_core()
	}
	p.SetState(1271)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 167, p.GetParserRuleContext())
	if p.HasError() {
		goto errorExit
	}
	for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		if _alt == 1 {
			{
				p.SetState(1266)
				p.Compound_operator()
			}
			{
				p.SetState(1267)
				p.Select_core()
			}

		}
		p.SetState(1273)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 167, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
	}
	p.SetState(1275)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserORDER_ {
		{
			p.SetState(1274)
			p.Order_by_stmt()
		}

	}
	p.SetState(1278)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserLIMIT_ {
		{
			p.SetState(1277)
			p.Limit_stmt()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IJoin_clauseContext is an interface to support dynamic dispatch.
type IJoin_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllTable_or_subquery() []ITable_or_subqueryContext
	Table_or_subquery(i int) ITable_or_subqueryContext
	AllJoin_operator() []IJoin_operatorContext
	Join_operator(i int) IJoin_operatorContext
	AllJoin_constraint() []IJoin_constraintContext
	Join_constraint(i int) IJoin_constraintContext

	// IsJoin_clauseContext differentiates from other interfaces.
	IsJoin_clauseContext()
}

type Join_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyJoin_clauseContext() *Join_clauseContext {
	var p = new(Join_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_join_clause
	return p
}

func InitEmptyJoin_clauseContext(p *Join_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_join_clause
}

func (*Join_clauseContext) IsJoin_clauseContext() {}

func NewJoin_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_clauseContext {
	var p = new(Join_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_join_clause

	return p
}

func (s *Join_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Join_clauseContext) AllTable_or_subquery() []ITable_or_subqueryContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			len++
		}
	}

	tst := make([]ITable_or_subqueryContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ITable_or_subqueryContext); ok {
			tst[i] = t.(ITable_or_subqueryContext)
			i++
		}
	}

	return tst
}

func (s *Join_clauseContext) Table_or_subquery(i int) ITable_or_subqueryContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_or_subqueryContext)
}

func (s *Join_clauseContext) AllJoin_operator() []IJoin_operatorContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IJoin_operatorContext); ok {
			len++
		}
	}

	tst := make([]IJoin_operatorContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IJoin_operatorContext); ok {
			tst[i] = t.(IJoin_operatorContext)
			i++
		}
	}

	return tst
}

func (s *Join_clauseContext) Join_operator(i int) IJoin_operatorContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IJoin_operatorContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IJoin_operatorContext)
}

func (s *Join_clauseContext) AllJoin_constraint() []IJoin_constraintContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IJoin_constraintContext); ok {
			len++
		}
	}

	tst := make([]IJoin_constraintContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IJoin_constraintContext); ok {
			tst[i] = t.(IJoin_constraintContext)
			i++
		}
	}

	return tst
}

func (s *Join_clauseContext) Join_constraint(i int) IJoin_constraintContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IJoin_constraintContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IJoin_constraintContext)
}

func (s *Join_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Join_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Join_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterJoin_clause(s)
	}
}

func (s *Join_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitJoin_clause(s)
	}
}

func (s *Join_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitJoin_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Join_clause() (localctx IJoin_clauseContext) {
	localctx = NewJoin_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 84, ParserRULE_join_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1280)
		p.Table_or_subquery()
	}
	p.SetState(1288)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA || _la == ParserCROSS_ || ((int64((_la-87)) & ^0x3f) == 0 && ((int64(1)<<(_la-87))&8833) != 0) {
		{
			p.SetState(1281)
			p.Join_operator()
		}
		{
			p.SetState(1282)
			p.Table_or_subquery()
		}
		p.SetState(1284)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 170, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1283)
				p.Join_constraint()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}

		p.SetState(1290)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISelect_coreContext is an interface to support dynamic dispatch.
type ISelect_coreContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	SELECT_() antlr.TerminalNode
	AllResult_column() []IResult_columnContext
	Result_column(i int) IResult_columnContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	FROM_() antlr.TerminalNode
	WHERE_() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	GROUP_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	WINDOW_() antlr.TerminalNode
	AllWindow_name() []IWindow_nameContext
	Window_name(i int) IWindow_nameContext
	AllAS_() []antlr.TerminalNode
	AS_(i int) antlr.TerminalNode
	AllWindow_defn() []IWindow_defnContext
	Window_defn(i int) IWindow_defnContext
	DISTINCT_() antlr.TerminalNode
	ALL_() antlr.TerminalNode
	AllTable_or_subquery() []ITable_or_subqueryContext
	Table_or_subquery(i int) ITable_or_subqueryContext
	Join_clause() IJoin_clauseContext
	HAVING_() antlr.TerminalNode
	VALUES_() antlr.TerminalNode
	AllOPEN_PAR() []antlr.TerminalNode
	OPEN_PAR(i int) antlr.TerminalNode
	AllCLOSE_PAR() []antlr.TerminalNode
	CLOSE_PAR(i int) antlr.TerminalNode

	// IsSelect_coreContext differentiates from other interfaces.
	IsSelect_coreContext()
}

type Select_coreContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySelect_coreContext() *Select_coreContext {
	var p = new(Select_coreContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_select_core
	return p
}

func InitEmptySelect_coreContext(p *Select_coreContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_select_core
}

func (*Select_coreContext) IsSelect_coreContext() {}

func NewSelect_coreContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_coreContext {
	var p = new(Select_coreContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_select_core

	return p
}

func (s *Select_coreContext) GetParser() antlr.Parser { return s.parser }

func (s *Select_coreContext) SELECT_() antlr.TerminalNode {
	return s.GetToken(ParserSELECT_, 0)
}

func (s *Select_coreContext) AllResult_column() []IResult_columnContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IResult_columnContext); ok {
			len++
		}
	}

	tst := make([]IResult_columnContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IResult_columnContext); ok {
			tst[i] = t.(IResult_columnContext)
			i++
		}
	}

	return tst
}

func (s *Select_coreContext) Result_column(i int) IResult_columnContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IResult_columnContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IResult_columnContext)
}

func (s *Select_coreContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Select_coreContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Select_coreContext) FROM_() antlr.TerminalNode {
	return s.GetToken(ParserFROM_, 0)
}

func (s *Select_coreContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *Select_coreContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Select_coreContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Select_coreContext) GROUP_() antlr.TerminalNode {
	return s.GetToken(ParserGROUP_, 0)
}

func (s *Select_coreContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *Select_coreContext) WINDOW_() antlr.TerminalNode {
	return s.GetToken(ParserWINDOW_, 0)
}

func (s *Select_coreContext) AllWindow_name() []IWindow_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IWindow_nameContext); ok {
			len++
		}
	}

	tst := make([]IWindow_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IWindow_nameContext); ok {
			tst[i] = t.(IWindow_nameContext)
			i++
		}
	}

	return tst
}

func (s *Select_coreContext) Window_name(i int) IWindow_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWindow_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWindow_nameContext)
}

func (s *Select_coreContext) AllAS_() []antlr.TerminalNode {
	return s.GetTokens(ParserAS_)
}

func (s *Select_coreContext) AS_(i int) antlr.TerminalNode {
	return s.GetToken(ParserAS_, i)
}

func (s *Select_coreContext) AllWindow_defn() []IWindow_defnContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IWindow_defnContext); ok {
			len++
		}
	}

	tst := make([]IWindow_defnContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IWindow_defnContext); ok {
			tst[i] = t.(IWindow_defnContext)
			i++
		}
	}

	return tst
}

func (s *Select_coreContext) Window_defn(i int) IWindow_defnContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWindow_defnContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWindow_defnContext)
}

func (s *Select_coreContext) DISTINCT_() antlr.TerminalNode {
	return s.GetToken(ParserDISTINCT_, 0)
}

func (s *Select_coreContext) ALL_() antlr.TerminalNode {
	return s.GetToken(ParserALL_, 0)
}

func (s *Select_coreContext) AllTable_or_subquery() []ITable_or_subqueryContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			len++
		}
	}

	tst := make([]ITable_or_subqueryContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ITable_or_subqueryContext); ok {
			tst[i] = t.(ITable_or_subqueryContext)
			i++
		}
	}

	return tst
}

func (s *Select_coreContext) Table_or_subquery(i int) ITable_or_subqueryContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_or_subqueryContext)
}

func (s *Select_coreContext) Join_clause() IJoin_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IJoin_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IJoin_clauseContext)
}

func (s *Select_coreContext) HAVING_() antlr.TerminalNode {
	return s.GetToken(ParserHAVING_, 0)
}

func (s *Select_coreContext) VALUES_() antlr.TerminalNode {
	return s.GetToken(ParserVALUES_, 0)
}

func (s *Select_coreContext) AllOPEN_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserOPEN_PAR)
}

func (s *Select_coreContext) OPEN_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, i)
}

func (s *Select_coreContext) AllCLOSE_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserCLOSE_PAR)
}

func (s *Select_coreContext) CLOSE_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, i)
}

func (s *Select_coreContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Select_coreContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Select_coreContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSelect_core(s)
	}
}

func (s *Select_coreContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSelect_core(s)
	}
}

func (s *Select_coreContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSelect_core(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Select_core() (localctx ISelect_coreContext) {
	localctx = NewSelect_coreContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 86, ParserRULE_select_core)
	var _la int

	p.SetState(1381)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserSELECT_:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1291)
			p.Match(ParserSELECT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1293)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 172, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1292)
				_la = p.GetTokenStream().LA(1)

				if !(_la == ParserALL_ || _la == ParserDISTINCT_) {
					p.GetErrorHandler().RecoverInline(p)
				} else {
					p.GetErrorHandler().ReportMatch(p)
					p.Consume()
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(1295)
			p.Result_column()
		}
		p.SetState(1300)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1296)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1297)
				p.Result_column()
			}

			p.SetState(1302)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		p.SetState(1315)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserFROM_ {
			{
				p.SetState(1303)
				p.Match(ParserFROM_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			p.SetState(1313)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}

			switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 175, p.GetParserRuleContext()) {
			case 1:
				{
					p.SetState(1304)
					p.Table_or_subquery()
				}
				p.SetState(1309)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)

				for _la == ParserCOMMA {
					{
						p.SetState(1305)
						p.Match(ParserCOMMA)
						if p.HasError() {
							// Recognition error - abort rule
							goto errorExit
						}
					}
					{
						p.SetState(1306)
						p.Table_or_subquery()
					}

					p.SetState(1311)
					p.GetErrorHandler().Sync(p)
					if p.HasError() {
						goto errorExit
					}
					_la = p.GetTokenStream().LA(1)
				}

			case 2:
				{
					p.SetState(1312)
					p.Join_clause()
				}

			case antlr.ATNInvalidAltNumber:
				goto errorExit
			}

		}
		p.SetState(1319)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserWHERE_ {
			{
				p.SetState(1317)
				p.Match(ParserWHERE_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1318)
				p.expr(0)
			}

		}
		p.SetState(1335)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserGROUP_ {
			{
				p.SetState(1321)
				p.Match(ParserGROUP_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1322)
				p.Match(ParserBY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1323)
				p.expr(0)
			}
			p.SetState(1328)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1324)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1325)
					p.expr(0)
				}

				p.SetState(1330)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}
			p.SetState(1333)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			if _la == ParserHAVING_ {
				{
					p.SetState(1331)
					p.Match(ParserHAVING_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1332)
					p.expr(0)
				}

			}

		}
		p.SetState(1351)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserWINDOW_ {
			{
				p.SetState(1337)
				p.Match(ParserWINDOW_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1338)
				p.Window_name()
			}
			{
				p.SetState(1339)
				p.Match(ParserAS_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1340)
				p.Window_defn()
			}
			p.SetState(1348)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1341)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1342)
					p.Window_name()
				}
				{
					p.SetState(1343)
					p.Match(ParserAS_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1344)
					p.Window_defn()
				}

				p.SetState(1350)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		}

	case ParserVALUES_:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1353)
			p.Match(ParserVALUES_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1354)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1355)
			p.expr(0)
		}
		p.SetState(1360)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1356)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1357)
				p.expr(0)
			}

			p.SetState(1362)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(1363)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1378)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1364)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1365)
				p.Match(ParserOPEN_PAR)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1366)
				p.expr(0)
			}
			p.SetState(1371)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1367)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1368)
					p.expr(0)
				}

				p.SetState(1373)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}
			{
				p.SetState(1374)
				p.Match(ParserCLOSE_PAR)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

			p.SetState(1380)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFactored_select_stmtContext is an interface to support dynamic dispatch.
type IFactored_select_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Select_stmt() ISelect_stmtContext

	// IsFactored_select_stmtContext differentiates from other interfaces.
	IsFactored_select_stmtContext()
}

type Factored_select_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFactored_select_stmtContext() *Factored_select_stmtContext {
	var p = new(Factored_select_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_factored_select_stmt
	return p
}

func InitEmptyFactored_select_stmtContext(p *Factored_select_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_factored_select_stmt
}

func (*Factored_select_stmtContext) IsFactored_select_stmtContext() {}

func NewFactored_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Factored_select_stmtContext {
	var p = new(Factored_select_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_factored_select_stmt

	return p
}

func (s *Factored_select_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Factored_select_stmtContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Factored_select_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Factored_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Factored_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFactored_select_stmt(s)
	}
}

func (s *Factored_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFactored_select_stmt(s)
	}
}

func (s *Factored_select_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFactored_select_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Factored_select_stmt() (localctx IFactored_select_stmtContext) {
	localctx = NewFactored_select_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 88, ParserRULE_factored_select_stmt)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1383)
		p.Select_stmt()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISimple_select_stmtContext is an interface to support dynamic dispatch.
type ISimple_select_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Select_core() ISelect_coreContext
	Common_table_stmt() ICommon_table_stmtContext
	Order_by_stmt() IOrder_by_stmtContext
	Limit_stmt() ILimit_stmtContext

	// IsSimple_select_stmtContext differentiates from other interfaces.
	IsSimple_select_stmtContext()
}

type Simple_select_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySimple_select_stmtContext() *Simple_select_stmtContext {
	var p = new(Simple_select_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_simple_select_stmt
	return p
}

func InitEmptySimple_select_stmtContext(p *Simple_select_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_simple_select_stmt
}

func (*Simple_select_stmtContext) IsSimple_select_stmtContext() {}

func NewSimple_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_select_stmtContext {
	var p = new(Simple_select_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_simple_select_stmt

	return p
}

func (s *Simple_select_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Simple_select_stmtContext) Select_core() ISelect_coreContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_coreContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_coreContext)
}

func (s *Simple_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICommon_table_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICommon_table_stmtContext)
}

func (s *Simple_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrder_by_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrder_by_stmtContext)
}

func (s *Simple_select_stmtContext) Limit_stmt() ILimit_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ILimit_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ILimit_stmtContext)
}

func (s *Simple_select_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Simple_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Simple_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSimple_select_stmt(s)
	}
}

func (s *Simple_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSimple_select_stmt(s)
	}
}

func (s *Simple_select_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSimple_select_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Simple_select_stmt() (localctx ISimple_select_stmtContext) {
	localctx = NewSimple_select_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 90, ParserRULE_simple_select_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(1386)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(1385)
			p.Common_table_stmt()
		}

	}
	{
		p.SetState(1388)
		p.Select_core()
	}
	p.SetState(1390)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserORDER_ {
		{
			p.SetState(1389)
			p.Order_by_stmt()
		}

	}
	p.SetState(1393)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserLIMIT_ {
		{
			p.SetState(1392)
			p.Limit_stmt()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICompound_select_stmtContext is an interface to support dynamic dispatch.
type ICompound_select_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllSelect_core() []ISelect_coreContext
	Select_core(i int) ISelect_coreContext
	Common_table_stmt() ICommon_table_stmtContext
	Order_by_stmt() IOrder_by_stmtContext
	Limit_stmt() ILimit_stmtContext
	AllUNION_() []antlr.TerminalNode
	UNION_(i int) antlr.TerminalNode
	AllINTERSECT_() []antlr.TerminalNode
	INTERSECT_(i int) antlr.TerminalNode
	AllEXCEPT_() []antlr.TerminalNode
	EXCEPT_(i int) antlr.TerminalNode
	AllALL_() []antlr.TerminalNode
	ALL_(i int) antlr.TerminalNode

	// IsCompound_select_stmtContext differentiates from other interfaces.
	IsCompound_select_stmtContext()
}

type Compound_select_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCompound_select_stmtContext() *Compound_select_stmtContext {
	var p = new(Compound_select_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_compound_select_stmt
	return p
}

func InitEmptyCompound_select_stmtContext(p *Compound_select_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_compound_select_stmt
}

func (*Compound_select_stmtContext) IsCompound_select_stmtContext() {}

func NewCompound_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_select_stmtContext {
	var p = new(Compound_select_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_compound_select_stmt

	return p
}

func (s *Compound_select_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Compound_select_stmtContext) AllSelect_core() []ISelect_coreContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ISelect_coreContext); ok {
			len++
		}
	}

	tst := make([]ISelect_coreContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ISelect_coreContext); ok {
			tst[i] = t.(ISelect_coreContext)
			i++
		}
	}

	return tst
}

func (s *Compound_select_stmtContext) Select_core(i int) ISelect_coreContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_coreContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_coreContext)
}

func (s *Compound_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICommon_table_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICommon_table_stmtContext)
}

func (s *Compound_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrder_by_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrder_by_stmtContext)
}

func (s *Compound_select_stmtContext) Limit_stmt() ILimit_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ILimit_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ILimit_stmtContext)
}

func (s *Compound_select_stmtContext) AllUNION_() []antlr.TerminalNode {
	return s.GetTokens(ParserUNION_)
}

func (s *Compound_select_stmtContext) UNION_(i int) antlr.TerminalNode {
	return s.GetToken(ParserUNION_, i)
}

func (s *Compound_select_stmtContext) AllINTERSECT_() []antlr.TerminalNode {
	return s.GetTokens(ParserINTERSECT_)
}

func (s *Compound_select_stmtContext) INTERSECT_(i int) antlr.TerminalNode {
	return s.GetToken(ParserINTERSECT_, i)
}

func (s *Compound_select_stmtContext) AllEXCEPT_() []antlr.TerminalNode {
	return s.GetTokens(ParserEXCEPT_)
}

func (s *Compound_select_stmtContext) EXCEPT_(i int) antlr.TerminalNode {
	return s.GetToken(ParserEXCEPT_, i)
}

func (s *Compound_select_stmtContext) AllALL_() []antlr.TerminalNode {
	return s.GetTokens(ParserALL_)
}

func (s *Compound_select_stmtContext) ALL_(i int) antlr.TerminalNode {
	return s.GetToken(ParserALL_, i)
}

func (s *Compound_select_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Compound_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Compound_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCompound_select_stmt(s)
	}
}

func (s *Compound_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCompound_select_stmt(s)
	}
}

func (s *Compound_select_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCompound_select_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Compound_select_stmt() (localctx ICompound_select_stmtContext) {
	localctx = NewCompound_select_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 92, ParserRULE_compound_select_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(1396)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(1395)
			p.Common_table_stmt()
		}

	}
	{
		p.SetState(1398)
		p.Select_core()
	}
	p.SetState(1408)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for ok := true; ok; ok = _la == ParserEXCEPT_ || _la == ParserINTERSECT_ || _la == ParserUNION_ {
		p.SetState(1405)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetTokenStream().LA(1) {
		case ParserUNION_:
			{
				p.SetState(1399)
				p.Match(ParserUNION_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			p.SetState(1401)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			if _la == ParserALL_ {
				{
					p.SetState(1400)
					p.Match(ParserALL_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			}

		case ParserINTERSECT_:
			{
				p.SetState(1403)
				p.Match(ParserINTERSECT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case ParserEXCEPT_:
			{
				p.SetState(1404)
				p.Match(ParserEXCEPT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		default:
			p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
			goto errorExit
		}
		{
			p.SetState(1407)
			p.Select_core()
		}

		p.SetState(1410)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	p.SetState(1413)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserORDER_ {
		{
			p.SetState(1412)
			p.Order_by_stmt()
		}

	}
	p.SetState(1416)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserLIMIT_ {
		{
			p.SetState(1415)
			p.Limit_stmt()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITable_or_subqueryContext is an interface to support dynamic dispatch.
type ITable_or_subqueryContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Table_name() ITable_nameContext
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	Table_alias() ITable_aliasContext
	INDEXED_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	Index_name() IIndex_nameContext
	NOT_() antlr.TerminalNode
	AS_() antlr.TerminalNode
	Table_function_name() ITable_function_nameContext
	OPEN_PAR() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	CLOSE_PAR() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	AllTable_or_subquery() []ITable_or_subqueryContext
	Table_or_subquery(i int) ITable_or_subqueryContext
	Join_clause() IJoin_clauseContext
	Select_stmt() ISelect_stmtContext

	// IsTable_or_subqueryContext differentiates from other interfaces.
	IsTable_or_subqueryContext()
}

type Table_or_subqueryContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_or_subqueryContext() *Table_or_subqueryContext {
	var p = new(Table_or_subqueryContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_or_subquery
	return p
}

func InitEmptyTable_or_subqueryContext(p *Table_or_subqueryContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_or_subquery
}

func (*Table_or_subqueryContext) IsTable_or_subqueryContext() {}

func NewTable_or_subqueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_subqueryContext {
	var p = new(Table_or_subqueryContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_table_or_subquery

	return p
}

func (s *Table_or_subqueryContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_or_subqueryContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Table_or_subqueryContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Table_or_subqueryContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Table_or_subqueryContext) Table_alias() ITable_aliasContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_aliasContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_aliasContext)
}

func (s *Table_or_subqueryContext) INDEXED_() antlr.TerminalNode {
	return s.GetToken(ParserINDEXED_, 0)
}

func (s *Table_or_subqueryContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *Table_or_subqueryContext) Index_name() IIndex_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IIndex_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IIndex_nameContext)
}

func (s *Table_or_subqueryContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Table_or_subqueryContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Table_or_subqueryContext) Table_function_name() ITable_function_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_function_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_function_nameContext)
}

func (s *Table_or_subqueryContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Table_or_subqueryContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Table_or_subqueryContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Table_or_subqueryContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Table_or_subqueryContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Table_or_subqueryContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Table_or_subqueryContext) AllTable_or_subquery() []ITable_or_subqueryContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			len++
		}
	}

	tst := make([]ITable_or_subqueryContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ITable_or_subqueryContext); ok {
			tst[i] = t.(ITable_or_subqueryContext)
			i++
		}
	}

	return tst
}

func (s *Table_or_subqueryContext) Table_or_subquery(i int) ITable_or_subqueryContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_or_subqueryContext)
}

func (s *Table_or_subqueryContext) Join_clause() IJoin_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IJoin_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IJoin_clauseContext)
}

func (s *Table_or_subqueryContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Table_or_subqueryContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_or_subqueryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_or_subqueryContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTable_or_subquery(s)
	}
}

func (s *Table_or_subqueryContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTable_or_subquery(s)
	}
}

func (s *Table_or_subqueryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTable_or_subquery(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Table_or_subquery() (localctx ITable_or_subqueryContext) {
	localctx = NewTable_or_subqueryContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 94, ParserRULE_table_or_subquery)
	var _la int

	p.SetState(1482)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 208, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		p.SetState(1421)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 196, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1418)
				p.Schema_name()
			}
			{
				p.SetState(1419)
				p.Match(ParserDOT)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(1423)
			p.Table_name()
		}
		p.SetState(1428)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 198, p.GetParserRuleContext()) == 1 {
			p.SetState(1425)
			p.GetErrorHandler().Sync(p)

			if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 197, p.GetParserRuleContext()) == 1 {
				{
					p.SetState(1424)
					p.Match(ParserAS_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			} else if p.HasError() { // JIM
				goto errorExit
			}
			{
				p.SetState(1427)
				p.Table_alias()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		p.SetState(1435)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		switch p.GetTokenStream().LA(1) {
		case ParserINDEXED_:
			{
				p.SetState(1430)
				p.Match(ParserINDEXED_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1431)
				p.Match(ParserBY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1432)
				p.Index_name()
			}

		case ParserNOT_:
			{
				p.SetState(1433)
				p.Match(ParserNOT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1434)
				p.Match(ParserINDEXED_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case ParserEOF, ParserSCOL, ParserCLOSE_PAR, ParserCOMMA, ParserALTER_, ParserANALYZE_, ParserATTACH_, ParserBEGIN_, ParserCOMMIT_, ParserCREATE_, ParserCROSS_, ParserDELETE_, ParserDETACH_, ParserDROP_, ParserEND_, ParserEXCEPT_, ParserEXPLAIN_, ParserGROUP_, ParserINNER_, ParserINSERT_, ParserINTERSECT_, ParserJOIN_, ParserLEFT_, ParserLIMIT_, ParserNATURAL_, ParserON_, ParserORDER_, ParserPRAGMA_, ParserREINDEX_, ParserRELEASE_, ParserREPLACE_, ParserRETURNING_, ParserROLLBACK_, ParserSAVEPOINT_, ParserSELECT_, ParserUNION_, ParserUPDATE_, ParserUSING_, ParserVACUUM_, ParserVALUES_, ParserWHERE_, ParserWITH_, ParserWINDOW_:

		default:
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		p.SetState(1440)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 200, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1437)
				p.Schema_name()
			}
			{
				p.SetState(1438)
				p.Match(ParserDOT)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(1442)
			p.Table_function_name()
		}
		{
			p.SetState(1443)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1444)
			p.expr(0)
		}
		p.SetState(1449)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1445)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1446)
				p.expr(0)
			}

			p.SetState(1451)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(1452)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1457)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 203, p.GetParserRuleContext()) == 1 {
			p.SetState(1454)
			p.GetErrorHandler().Sync(p)

			if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 202, p.GetParserRuleContext()) == 1 {
				{
					p.SetState(1453)
					p.Match(ParserAS_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			} else if p.HasError() { // JIM
				goto errorExit
			}
			{
				p.SetState(1456)
				p.Table_alias()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1459)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1469)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 205, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(1460)
				p.Table_or_subquery()
			}
			p.SetState(1465)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1461)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1462)
					p.Table_or_subquery()
				}

				p.SetState(1467)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		case 2:
			{
				p.SetState(1468)
				p.Join_clause()
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}
		{
			p.SetState(1471)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(1473)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1474)
			p.Select_stmt()
		}
		{
			p.SetState(1475)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1480)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 207, p.GetParserRuleContext()) == 1 {
			p.SetState(1477)
			p.GetErrorHandler().Sync(p)

			if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 206, p.GetParserRuleContext()) == 1 {
				{
					p.SetState(1476)
					p.Match(ParserAS_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			} else if p.HasError() { // JIM
				goto errorExit
			}
			{
				p.SetState(1479)
				p.Table_alias()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IResult_columnContext is an interface to support dynamic dispatch.
type IResult_columnContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	STAR() antlr.TerminalNode
	Table_name() ITable_nameContext
	DOT() antlr.TerminalNode
	Expr() IExprContext
	Column_alias() IColumn_aliasContext
	AS_() antlr.TerminalNode

	// IsResult_columnContext differentiates from other interfaces.
	IsResult_columnContext()
}

type Result_columnContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyResult_columnContext() *Result_columnContext {
	var p = new(Result_columnContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_result_column
	return p
}

func InitEmptyResult_columnContext(p *Result_columnContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_result_column
}

func (*Result_columnContext) IsResult_columnContext() {}

func NewResult_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Result_columnContext {
	var p = new(Result_columnContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_result_column

	return p
}

func (s *Result_columnContext) GetParser() antlr.Parser { return s.parser }

func (s *Result_columnContext) STAR() antlr.TerminalNode {
	return s.GetToken(ParserSTAR, 0)
}

func (s *Result_columnContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Result_columnContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Result_columnContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Result_columnContext) Column_alias() IColumn_aliasContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_aliasContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_aliasContext)
}

func (s *Result_columnContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Result_columnContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Result_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Result_columnContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterResult_column(s)
	}
}

func (s *Result_columnContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitResult_column(s)
	}
}

func (s *Result_columnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitResult_column(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Result_column() (localctx IResult_columnContext) {
	localctx = NewResult_columnContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 96, ParserRULE_result_column)
	var _la int

	p.SetState(1496)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 211, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1484)
			p.Match(ParserSTAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1485)
			p.Table_name()
		}
		{
			p.SetState(1486)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1487)
			p.Match(ParserSTAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1489)
			p.expr(0)
		}
		p.SetState(1494)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserAS_ || _la == ParserIDENTIFIER || _la == ParserSTRING_LITERAL {
			p.SetState(1491)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			if _la == ParserAS_ {
				{
					p.SetState(1490)
					p.Match(ParserAS_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			}
			{
				p.SetState(1493)
				p.Column_alias()
			}

		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IJoin_operatorContext is an interface to support dynamic dispatch.
type IJoin_operatorContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	COMMA() antlr.TerminalNode
	JOIN_() antlr.TerminalNode
	NATURAL_() antlr.TerminalNode
	LEFT_() antlr.TerminalNode
	INNER_() antlr.TerminalNode
	CROSS_() antlr.TerminalNode
	OUTER_() antlr.TerminalNode

	// IsJoin_operatorContext differentiates from other interfaces.
	IsJoin_operatorContext()
}

type Join_operatorContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyJoin_operatorContext() *Join_operatorContext {
	var p = new(Join_operatorContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_join_operator
	return p
}

func InitEmptyJoin_operatorContext(p *Join_operatorContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_join_operator
}

func (*Join_operatorContext) IsJoin_operatorContext() {}

func NewJoin_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_operatorContext {
	var p = new(Join_operatorContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_join_operator

	return p
}

func (s *Join_operatorContext) GetParser() antlr.Parser { return s.parser }

func (s *Join_operatorContext) COMMA() antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, 0)
}

func (s *Join_operatorContext) JOIN_() antlr.TerminalNode {
	return s.GetToken(ParserJOIN_, 0)
}

func (s *Join_operatorContext) NATURAL_() antlr.TerminalNode {
	return s.GetToken(ParserNATURAL_, 0)
}

func (s *Join_operatorContext) LEFT_() antlr.TerminalNode {
	return s.GetToken(ParserLEFT_, 0)
}

func (s *Join_operatorContext) INNER_() antlr.TerminalNode {
	return s.GetToken(ParserINNER_, 0)
}

func (s *Join_operatorContext) CROSS_() antlr.TerminalNode {
	return s.GetToken(ParserCROSS_, 0)
}

func (s *Join_operatorContext) OUTER_() antlr.TerminalNode {
	return s.GetToken(ParserOUTER_, 0)
}

func (s *Join_operatorContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Join_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Join_operatorContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterJoin_operator(s)
	}
}

func (s *Join_operatorContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitJoin_operator(s)
	}
}

func (s *Join_operatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitJoin_operator(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Join_operator() (localctx IJoin_operatorContext) {
	localctx = NewJoin_operatorContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 98, ParserRULE_join_operator)
	var _la int

	p.SetState(1511)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserCOMMA:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1498)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserCROSS_, ParserINNER_, ParserJOIN_, ParserLEFT_, ParserNATURAL_:
		p.EnterOuterAlt(localctx, 2)
		p.SetState(1500)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserNATURAL_ {
			{
				p.SetState(1499)
				p.Match(ParserNATURAL_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}
		p.SetState(1508)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		switch p.GetTokenStream().LA(1) {
		case ParserLEFT_:
			{
				p.SetState(1502)
				p.Match(ParserLEFT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			p.SetState(1504)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			if _la == ParserOUTER_ {
				{
					p.SetState(1503)
					p.Match(ParserOUTER_)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}

			}

		case ParserINNER_:
			{
				p.SetState(1506)
				p.Match(ParserINNER_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case ParserCROSS_:
			{
				p.SetState(1507)
				p.Match(ParserCROSS_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		case ParserJOIN_:

		default:
		}
		{
			p.SetState(1510)
			p.Match(ParserJOIN_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IJoin_constraintContext is an interface to support dynamic dispatch.
type IJoin_constraintContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ON_() antlr.TerminalNode
	Expr() IExprContext
	USING_() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	CLOSE_PAR() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsJoin_constraintContext differentiates from other interfaces.
	IsJoin_constraintContext()
}

type Join_constraintContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyJoin_constraintContext() *Join_constraintContext {
	var p = new(Join_constraintContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_join_constraint
	return p
}

func InitEmptyJoin_constraintContext(p *Join_constraintContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_join_constraint
}

func (*Join_constraintContext) IsJoin_constraintContext() {}

func NewJoin_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_constraintContext {
	var p = new(Join_constraintContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_join_constraint

	return p
}

func (s *Join_constraintContext) GetParser() antlr.Parser { return s.parser }

func (s *Join_constraintContext) ON_() antlr.TerminalNode {
	return s.GetToken(ParserON_, 0)
}

func (s *Join_constraintContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Join_constraintContext) USING_() antlr.TerminalNode {
	return s.GetToken(ParserUSING_, 0)
}

func (s *Join_constraintContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Join_constraintContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Join_constraintContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Join_constraintContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Join_constraintContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Join_constraintContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Join_constraintContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Join_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Join_constraintContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterJoin_constraint(s)
	}
}

func (s *Join_constraintContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitJoin_constraint(s)
	}
}

func (s *Join_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitJoin_constraint(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Join_constraint() (localctx IJoin_constraintContext) {
	localctx = NewJoin_constraintContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 100, ParserRULE_join_constraint)
	var _la int

	p.SetState(1527)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserON_:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1513)
			p.Match(ParserON_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1514)
			p.expr(0)
		}

	case ParserUSING_:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1515)
			p.Match(ParserUSING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1516)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1517)
			p.Column_name()
		}
		p.SetState(1522)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1518)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1519)
				p.Column_name()
			}

			p.SetState(1524)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}
		{
			p.SetState(1525)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICompound_operatorContext is an interface to support dynamic dispatch.
type ICompound_operatorContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	UNION_() antlr.TerminalNode
	ALL_() antlr.TerminalNode
	INTERSECT_() antlr.TerminalNode
	EXCEPT_() antlr.TerminalNode

	// IsCompound_operatorContext differentiates from other interfaces.
	IsCompound_operatorContext()
}

type Compound_operatorContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCompound_operatorContext() *Compound_operatorContext {
	var p = new(Compound_operatorContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_compound_operator
	return p
}

func InitEmptyCompound_operatorContext(p *Compound_operatorContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_compound_operator
}

func (*Compound_operatorContext) IsCompound_operatorContext() {}

func NewCompound_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_operatorContext {
	var p = new(Compound_operatorContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_compound_operator

	return p
}

func (s *Compound_operatorContext) GetParser() antlr.Parser { return s.parser }

func (s *Compound_operatorContext) UNION_() antlr.TerminalNode {
	return s.GetToken(ParserUNION_, 0)
}

func (s *Compound_operatorContext) ALL_() antlr.TerminalNode {
	return s.GetToken(ParserALL_, 0)
}

func (s *Compound_operatorContext) INTERSECT_() antlr.TerminalNode {
	return s.GetToken(ParserINTERSECT_, 0)
}

func (s *Compound_operatorContext) EXCEPT_() antlr.TerminalNode {
	return s.GetToken(ParserEXCEPT_, 0)
}

func (s *Compound_operatorContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Compound_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Compound_operatorContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCompound_operator(s)
	}
}

func (s *Compound_operatorContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCompound_operator(s)
	}
}

func (s *Compound_operatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCompound_operator(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Compound_operator() (localctx ICompound_operatorContext) {
	localctx = NewCompound_operatorContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 102, ParserRULE_compound_operator)
	var _la int

	p.SetState(1535)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserUNION_:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1529)
			p.Match(ParserUNION_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1531)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserALL_ {
			{
				p.SetState(1530)
				p.Match(ParserALL_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		}

	case ParserINTERSECT_:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1533)
			p.Match(ParserINTERSECT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserEXCEPT_:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1534)
			p.Match(ParserEXCEPT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IUpdate_stmtContext is an interface to support dynamic dispatch.
type IUpdate_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// GetWhere returns the where rule contexts.
	GetWhere() IExprContext

	// SetWhere sets the where rule contexts.
	SetWhere(IExprContext)

	// Getter signatures
	UPDATE_() antlr.TerminalNode
	Qualified_table_name() IQualified_table_nameContext
	SET_() antlr.TerminalNode
	Assignment_list() IAssignment_listContext
	With_clause() IWith_clauseContext
	OR_() antlr.TerminalNode
	FROM_() antlr.TerminalNode
	WHERE_() antlr.TerminalNode
	Returning_clause() IReturning_clauseContext
	ROLLBACK_() antlr.TerminalNode
	ABORT_() antlr.TerminalNode
	REPLACE_() antlr.TerminalNode
	FAIL_() antlr.TerminalNode
	IGNORE_() antlr.TerminalNode
	Expr() IExprContext
	AllTable_or_subquery() []ITable_or_subqueryContext
	Table_or_subquery(i int) ITable_or_subqueryContext
	Join_clause() IJoin_clauseContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsUpdate_stmtContext differentiates from other interfaces.
	IsUpdate_stmtContext()
}

type Update_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
	where  IExprContext
}

func NewEmptyUpdate_stmtContext() *Update_stmtContext {
	var p = new(Update_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_update_stmt
	return p
}

func InitEmptyUpdate_stmtContext(p *Update_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_update_stmt
}

func (*Update_stmtContext) IsUpdate_stmtContext() {}

func NewUpdate_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmtContext {
	var p = new(Update_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_update_stmt

	return p
}

func (s *Update_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Update_stmtContext) GetWhere() IExprContext { return s.where }

func (s *Update_stmtContext) SetWhere(v IExprContext) { s.where = v }

func (s *Update_stmtContext) UPDATE_() antlr.TerminalNode {
	return s.GetToken(ParserUPDATE_, 0)
}

func (s *Update_stmtContext) Qualified_table_name() IQualified_table_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IQualified_table_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IQualified_table_nameContext)
}

func (s *Update_stmtContext) SET_() antlr.TerminalNode {
	return s.GetToken(ParserSET_, 0)
}

func (s *Update_stmtContext) Assignment_list() IAssignment_listContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAssignment_listContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAssignment_listContext)
}

func (s *Update_stmtContext) With_clause() IWith_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWith_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWith_clauseContext)
}

func (s *Update_stmtContext) OR_() antlr.TerminalNode {
	return s.GetToken(ParserOR_, 0)
}

func (s *Update_stmtContext) FROM_() antlr.TerminalNode {
	return s.GetToken(ParserFROM_, 0)
}

func (s *Update_stmtContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *Update_stmtContext) Returning_clause() IReturning_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IReturning_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IReturning_clauseContext)
}

func (s *Update_stmtContext) ROLLBACK_() antlr.TerminalNode {
	return s.GetToken(ParserROLLBACK_, 0)
}

func (s *Update_stmtContext) ABORT_() antlr.TerminalNode {
	return s.GetToken(ParserABORT_, 0)
}

func (s *Update_stmtContext) REPLACE_() antlr.TerminalNode {
	return s.GetToken(ParserREPLACE_, 0)
}

func (s *Update_stmtContext) FAIL_() antlr.TerminalNode {
	return s.GetToken(ParserFAIL_, 0)
}

func (s *Update_stmtContext) IGNORE_() antlr.TerminalNode {
	return s.GetToken(ParserIGNORE_, 0)
}

func (s *Update_stmtContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Update_stmtContext) AllTable_or_subquery() []ITable_or_subqueryContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			len++
		}
	}

	tst := make([]ITable_or_subqueryContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ITable_or_subqueryContext); ok {
			tst[i] = t.(ITable_or_subqueryContext)
			i++
		}
	}

	return tst
}

func (s *Update_stmtContext) Table_or_subquery(i int) ITable_or_subqueryContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_or_subqueryContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_or_subqueryContext)
}

func (s *Update_stmtContext) Join_clause() IJoin_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IJoin_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IJoin_clauseContext)
}

func (s *Update_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Update_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Update_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Update_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Update_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterUpdate_stmt(s)
	}
}

func (s *Update_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitUpdate_stmt(s)
	}
}

func (s *Update_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitUpdate_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Update_stmt() (localctx IUpdate_stmtContext) {
	localctx = NewUpdate_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 104, ParserRULE_update_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(1538)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(1537)
			p.With_clause()
		}

	}
	{
		p.SetState(1540)
		p.Match(ParserUPDATE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1543)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 221, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1541)
			p.Match(ParserOR_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1542)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(1545)
		p.Qualified_table_name()
	}
	{
		p.SetState(1546)
		p.Match(ParserSET_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1547)
		p.Assignment_list()
	}
	p.SetState(1560)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserFROM_ {
		{
			p.SetState(1548)
			p.Match(ParserFROM_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1558)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 223, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(1549)
				p.Table_or_subquery()
			}
			p.SetState(1554)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1550)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1551)
					p.Table_or_subquery()
				}

				p.SetState(1556)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		case 2:
			{
				p.SetState(1557)
				p.Join_clause()
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}

	}
	p.SetState(1564)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWHERE_ {
		{
			p.SetState(1562)
			p.Match(ParserWHERE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1563)

			var _x = p.expr(0)

			localctx.(*Update_stmtContext).where = _x
		}

	}
	p.SetState(1567)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserRETURNING_ {
		{
			p.SetState(1566)
			p.Returning_clause()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAssignment_listContext is an interface to support dynamic dispatch.
type IAssignment_listContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllAssignment() []IAssignmentContext
	Assignment(i int) IAssignmentContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsAssignment_listContext differentiates from other interfaces.
	IsAssignment_listContext()
}

type Assignment_listContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAssignment_listContext() *Assignment_listContext {
	var p = new(Assignment_listContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_assignment_list
	return p
}

func InitEmptyAssignment_listContext(p *Assignment_listContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_assignment_list
}

func (*Assignment_listContext) IsAssignment_listContext() {}

func NewAssignment_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Assignment_listContext {
	var p = new(Assignment_listContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_assignment_list

	return p
}

func (s *Assignment_listContext) GetParser() antlr.Parser { return s.parser }

func (s *Assignment_listContext) AllAssignment() []IAssignmentContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IAssignmentContext); ok {
			len++
		}
	}

	tst := make([]IAssignmentContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IAssignmentContext); ok {
			tst[i] = t.(IAssignmentContext)
			i++
		}
	}

	return tst
}

func (s *Assignment_listContext) Assignment(i int) IAssignmentContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAssignmentContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAssignmentContext)
}

func (s *Assignment_listContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Assignment_listContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Assignment_listContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Assignment_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Assignment_listContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAssignment_list(s)
	}
}

func (s *Assignment_listContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAssignment_list(s)
	}
}

func (s *Assignment_listContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAssignment_list(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Assignment_list() (localctx IAssignment_listContext) {
	localctx = NewAssignment_listContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 106, ParserRULE_assignment_list)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1569)
		p.Assignment()
	}
	p.SetState(1574)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(1570)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1571)
			p.Assignment()
		}

		p.SetState(1576)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAssignmentContext is an interface to support dynamic dispatch.
type IAssignmentContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ASSIGN() antlr.TerminalNode
	Expr() IExprContext
	Column_name() IColumn_nameContext
	Column_name_list() IColumn_name_listContext

	// IsAssignmentContext differentiates from other interfaces.
	IsAssignmentContext()
}

type AssignmentContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAssignmentContext() *AssignmentContext {
	var p = new(AssignmentContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_assignment
	return p
}

func InitEmptyAssignmentContext(p *AssignmentContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_assignment
}

func (*AssignmentContext) IsAssignmentContext() {}

func NewAssignmentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AssignmentContext {
	var p = new(AssignmentContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_assignment

	return p
}

func (s *AssignmentContext) GetParser() antlr.Parser { return s.parser }

func (s *AssignmentContext) ASSIGN() antlr.TerminalNode {
	return s.GetToken(ParserASSIGN, 0)
}

func (s *AssignmentContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *AssignmentContext) Column_name() IColumn_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *AssignmentContext) Column_name_list() IColumn_name_listContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_name_listContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_name_listContext)
}

func (s *AssignmentContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *AssignmentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *AssignmentContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAssignment(s)
	}
}

func (s *AssignmentContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAssignment(s)
	}
}

func (s *AssignmentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAssignment(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Assignment() (localctx IAssignmentContext) {
	localctx = NewAssignmentContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 108, ParserRULE_assignment)
	p.EnterOuterAlt(localctx, 1)
	p.SetState(1579)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 228, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(1577)
			p.Column_name()
		}

	case 2:
		{
			p.SetState(1578)
			p.Column_name_list()
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}
	{
		p.SetState(1581)
		p.Match(ParserASSIGN)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1582)
		p.expr(0)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IColumn_name_listContext is an interface to support dynamic dispatch.
type IColumn_name_listContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	OPEN_PAR() antlr.TerminalNode
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	CLOSE_PAR() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsColumn_name_listContext differentiates from other interfaces.
	IsColumn_name_listContext()
}

type Column_name_listContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyColumn_name_listContext() *Column_name_listContext {
	var p = new(Column_name_listContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_name_list
	return p
}

func InitEmptyColumn_name_listContext(p *Column_name_listContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_name_list
}

func (*Column_name_listContext) IsColumn_name_listContext() {}

func NewColumn_name_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_name_listContext {
	var p = new(Column_name_listContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_column_name_list

	return p
}

func (s *Column_name_listContext) GetParser() antlr.Parser { return s.parser }

func (s *Column_name_listContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Column_name_listContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Column_name_listContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Column_name_listContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Column_name_listContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Column_name_listContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Column_name_listContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Column_name_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Column_name_listContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterColumn_name_list(s)
	}
}

func (s *Column_name_listContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitColumn_name_list(s)
	}
}

func (s *Column_name_listContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitColumn_name_list(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Column_name_list() (localctx IColumn_name_listContext) {
	localctx = NewColumn_name_listContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 110, ParserRULE_column_name_list)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1584)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1585)
		p.Column_name()
	}
	p.SetState(1590)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(1586)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1587)
			p.Column_name()
		}

		p.SetState(1592)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	{
		p.SetState(1593)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IUpdate_stmt_limitedContext is an interface to support dynamic dispatch.
type IUpdate_stmt_limitedContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	UPDATE_() antlr.TerminalNode
	Qualified_table_name() IQualified_table_nameContext
	SET_() antlr.TerminalNode
	AllASSIGN() []antlr.TerminalNode
	ASSIGN(i int) antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	AllColumn_name() []IColumn_nameContext
	Column_name(i int) IColumn_nameContext
	AllColumn_name_list() []IColumn_name_listContext
	Column_name_list(i int) IColumn_name_listContext
	With_clause() IWith_clauseContext
	OR_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode
	WHERE_() antlr.TerminalNode
	Returning_clause() IReturning_clauseContext
	Limit_stmt() ILimit_stmtContext
	ROLLBACK_() antlr.TerminalNode
	ABORT_() antlr.TerminalNode
	REPLACE_() antlr.TerminalNode
	FAIL_() antlr.TerminalNode
	IGNORE_() antlr.TerminalNode
	Order_by_stmt() IOrder_by_stmtContext

	// IsUpdate_stmt_limitedContext differentiates from other interfaces.
	IsUpdate_stmt_limitedContext()
}

type Update_stmt_limitedContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyUpdate_stmt_limitedContext() *Update_stmt_limitedContext {
	var p = new(Update_stmt_limitedContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_update_stmt_limited
	return p
}

func InitEmptyUpdate_stmt_limitedContext(p *Update_stmt_limitedContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_update_stmt_limited
}

func (*Update_stmt_limitedContext) IsUpdate_stmt_limitedContext() {}

func NewUpdate_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmt_limitedContext {
	var p = new(Update_stmt_limitedContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_update_stmt_limited

	return p
}

func (s *Update_stmt_limitedContext) GetParser() antlr.Parser { return s.parser }

func (s *Update_stmt_limitedContext) UPDATE_() antlr.TerminalNode {
	return s.GetToken(ParserUPDATE_, 0)
}

func (s *Update_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IQualified_table_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IQualified_table_nameContext)
}

func (s *Update_stmt_limitedContext) SET_() antlr.TerminalNode {
	return s.GetToken(ParserSET_, 0)
}

func (s *Update_stmt_limitedContext) AllASSIGN() []antlr.TerminalNode {
	return s.GetTokens(ParserASSIGN)
}

func (s *Update_stmt_limitedContext) ASSIGN(i int) antlr.TerminalNode {
	return s.GetToken(ParserASSIGN, i)
}

func (s *Update_stmt_limitedContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Update_stmt_limitedContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Update_stmt_limitedContext) AllColumn_name() []IColumn_nameContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_nameContext); ok {
			len++
		}
	}

	tst := make([]IColumn_nameContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_nameContext); ok {
			tst[i] = t.(IColumn_nameContext)
			i++
		}
	}

	return tst
}

func (s *Update_stmt_limitedContext) Column_name(i int) IColumn_nameContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_nameContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_nameContext)
}

func (s *Update_stmt_limitedContext) AllColumn_name_list() []IColumn_name_listContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IColumn_name_listContext); ok {
			len++
		}
	}

	tst := make([]IColumn_name_listContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IColumn_name_listContext); ok {
			tst[i] = t.(IColumn_name_listContext)
			i++
		}
	}

	return tst
}

func (s *Update_stmt_limitedContext) Column_name_list(i int) IColumn_name_listContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_name_listContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_name_listContext)
}

func (s *Update_stmt_limitedContext) With_clause() IWith_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWith_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWith_clauseContext)
}

func (s *Update_stmt_limitedContext) OR_() antlr.TerminalNode {
	return s.GetToken(ParserOR_, 0)
}

func (s *Update_stmt_limitedContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Update_stmt_limitedContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Update_stmt_limitedContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *Update_stmt_limitedContext) Returning_clause() IReturning_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IReturning_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IReturning_clauseContext)
}

func (s *Update_stmt_limitedContext) Limit_stmt() ILimit_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ILimit_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ILimit_stmtContext)
}

func (s *Update_stmt_limitedContext) ROLLBACK_() antlr.TerminalNode {
	return s.GetToken(ParserROLLBACK_, 0)
}

func (s *Update_stmt_limitedContext) ABORT_() antlr.TerminalNode {
	return s.GetToken(ParserABORT_, 0)
}

func (s *Update_stmt_limitedContext) REPLACE_() antlr.TerminalNode {
	return s.GetToken(ParserREPLACE_, 0)
}

func (s *Update_stmt_limitedContext) FAIL_() antlr.TerminalNode {
	return s.GetToken(ParserFAIL_, 0)
}

func (s *Update_stmt_limitedContext) IGNORE_() antlr.TerminalNode {
	return s.GetToken(ParserIGNORE_, 0)
}

func (s *Update_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrder_by_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrder_by_stmtContext)
}

func (s *Update_stmt_limitedContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Update_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Update_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterUpdate_stmt_limited(s)
	}
}

func (s *Update_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitUpdate_stmt_limited(s)
	}
}

func (s *Update_stmt_limitedContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitUpdate_stmt_limited(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Update_stmt_limited() (localctx IUpdate_stmt_limitedContext) {
	localctx = NewUpdate_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 112, ParserRULE_update_stmt_limited)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(1596)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWITH_ {
		{
			p.SetState(1595)
			p.With_clause()
		}

	}
	{
		p.SetState(1598)
		p.Match(ParserUPDATE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1601)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 231, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1599)
			p.Match(ParserOR_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1600)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserABORT_ || ((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&19140298416325121) != 0)) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(1603)
		p.Qualified_table_name()
	}
	{
		p.SetState(1604)
		p.Match(ParserSET_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1607)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 232, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(1605)
			p.Column_name()
		}

	case 2:
		{
			p.SetState(1606)
			p.Column_name_list()
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}
	{
		p.SetState(1609)
		p.Match(ParserASSIGN)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1610)
		p.expr(0)
	}
	p.SetState(1621)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(1611)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1614)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}

		switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 233, p.GetParserRuleContext()) {
		case 1:
			{
				p.SetState(1612)
				p.Column_name()
			}

		case 2:
			{
				p.SetState(1613)
				p.Column_name_list()
			}

		case antlr.ATNInvalidAltNumber:
			goto errorExit
		}
		{
			p.SetState(1616)
			p.Match(ParserASSIGN)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1617)
			p.expr(0)
		}

		p.SetState(1623)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}
	p.SetState(1626)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserWHERE_ {
		{
			p.SetState(1624)
			p.Match(ParserWHERE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1625)
			p.expr(0)
		}

	}
	p.SetState(1629)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserRETURNING_ {
		{
			p.SetState(1628)
			p.Returning_clause()
		}

	}
	p.SetState(1635)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserLIMIT_ || _la == ParserORDER_ {
		p.SetState(1632)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserORDER_ {
			{
				p.SetState(1631)
				p.Order_by_stmt()
			}

		}
		{
			p.SetState(1634)
			p.Limit_stmt()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IQualified_table_nameContext is an interface to support dynamic dispatch.
type IQualified_table_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Table_name() ITable_nameContext
	Schema_name() ISchema_nameContext
	DOT() antlr.TerminalNode
	AS_() antlr.TerminalNode
	Alias() IAliasContext
	INDEXED_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	Index_name() IIndex_nameContext
	NOT_() antlr.TerminalNode

	// IsQualified_table_nameContext differentiates from other interfaces.
	IsQualified_table_nameContext()
}

type Qualified_table_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyQualified_table_nameContext() *Qualified_table_nameContext {
	var p = new(Qualified_table_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_qualified_table_name
	return p
}

func InitEmptyQualified_table_nameContext(p *Qualified_table_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_qualified_table_name
}

func (*Qualified_table_nameContext) IsQualified_table_nameContext() {}

func NewQualified_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Qualified_table_nameContext {
	var p = new(Qualified_table_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_qualified_table_name

	return p
}

func (s *Qualified_table_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Qualified_table_nameContext) Table_name() ITable_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ITable_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ITable_nameContext)
}

func (s *Qualified_table_nameContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Qualified_table_nameContext) DOT() antlr.TerminalNode {
	return s.GetToken(ParserDOT, 0)
}

func (s *Qualified_table_nameContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *Qualified_table_nameContext) Alias() IAliasContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAliasContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAliasContext)
}

func (s *Qualified_table_nameContext) INDEXED_() antlr.TerminalNode {
	return s.GetToken(ParserINDEXED_, 0)
}

func (s *Qualified_table_nameContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *Qualified_table_nameContext) Index_name() IIndex_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IIndex_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IIndex_nameContext)
}

func (s *Qualified_table_nameContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Qualified_table_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Qualified_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Qualified_table_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterQualified_table_name(s)
	}
}

func (s *Qualified_table_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitQualified_table_name(s)
	}
}

func (s *Qualified_table_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitQualified_table_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Qualified_table_name() (localctx IQualified_table_nameContext) {
	localctx = NewQualified_table_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 114, ParserRULE_qualified_table_name)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	p.SetState(1640)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 239, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1637)
			p.Schema_name()
		}
		{
			p.SetState(1638)
			p.Match(ParserDOT)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(1642)
		p.Table_name()
	}
	p.SetState(1645)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserAS_ {
		{
			p.SetState(1643)
			p.Match(ParserAS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1644)
			p.Alias()
		}

	}
	p.SetState(1652)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	switch p.GetTokenStream().LA(1) {
	case ParserINDEXED_:
		{
			p.SetState(1647)
			p.Match(ParserINDEXED_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1648)
			p.Match(ParserBY_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1649)
			p.Index_name()
		}

	case ParserNOT_:
		{
			p.SetState(1650)
			p.Match(ParserNOT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1651)
			p.Match(ParserINDEXED_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserEOF, ParserSCOL, ParserALTER_, ParserANALYZE_, ParserATTACH_, ParserBEGIN_, ParserCOMMIT_, ParserCREATE_, ParserDELETE_, ParserDETACH_, ParserDROP_, ParserEND_, ParserEXPLAIN_, ParserINSERT_, ParserLIMIT_, ParserORDER_, ParserPRAGMA_, ParserREINDEX_, ParserRELEASE_, ParserREPLACE_, ParserRETURNING_, ParserROLLBACK_, ParserSAVEPOINT_, ParserSELECT_, ParserSET_, ParserUPDATE_, ParserVACUUM_, ParserVALUES_, ParserWHERE_, ParserWITH_:

	default:
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IVacuum_stmtContext is an interface to support dynamic dispatch.
type IVacuum_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	VACUUM_() antlr.TerminalNode
	Schema_name() ISchema_nameContext
	INTO_() antlr.TerminalNode
	Filename() IFilenameContext

	// IsVacuum_stmtContext differentiates from other interfaces.
	IsVacuum_stmtContext()
}

type Vacuum_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyVacuum_stmtContext() *Vacuum_stmtContext {
	var p = new(Vacuum_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_vacuum_stmt
	return p
}

func InitEmptyVacuum_stmtContext(p *Vacuum_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_vacuum_stmt
}

func (*Vacuum_stmtContext) IsVacuum_stmtContext() {}

func NewVacuum_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Vacuum_stmtContext {
	var p = new(Vacuum_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_vacuum_stmt

	return p
}

func (s *Vacuum_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Vacuum_stmtContext) VACUUM_() antlr.TerminalNode {
	return s.GetToken(ParserVACUUM_, 0)
}

func (s *Vacuum_stmtContext) Schema_name() ISchema_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISchema_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISchema_nameContext)
}

func (s *Vacuum_stmtContext) INTO_() antlr.TerminalNode {
	return s.GetToken(ParserINTO_, 0)
}

func (s *Vacuum_stmtContext) Filename() IFilenameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFilenameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFilenameContext)
}

func (s *Vacuum_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Vacuum_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Vacuum_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterVacuum_stmt(s)
	}
}

func (s *Vacuum_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitVacuum_stmt(s)
	}
}

func (s *Vacuum_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitVacuum_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Vacuum_stmt() (localctx IVacuum_stmtContext) {
	localctx = NewVacuum_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 116, ParserRULE_vacuum_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1654)
		p.Match(ParserVACUUM_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1656)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 242, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1655)
			p.Schema_name()
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(1660)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserINTO_ {
		{
			p.SetState(1658)
			p.Match(ParserINTO_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1659)
			p.Filename()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFilter_clauseContext is an interface to support dynamic dispatch.
type IFilter_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	FILTER_() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	WHERE_() antlr.TerminalNode
	Expr() IExprContext
	CLOSE_PAR() antlr.TerminalNode

	// IsFilter_clauseContext differentiates from other interfaces.
	IsFilter_clauseContext()
}

type Filter_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFilter_clauseContext() *Filter_clauseContext {
	var p = new(Filter_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_filter_clause
	return p
}

func InitEmptyFilter_clauseContext(p *Filter_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_filter_clause
}

func (*Filter_clauseContext) IsFilter_clauseContext() {}

func NewFilter_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Filter_clauseContext {
	var p = new(Filter_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_filter_clause

	return p
}

func (s *Filter_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Filter_clauseContext) FILTER_() antlr.TerminalNode {
	return s.GetToken(ParserFILTER_, 0)
}

func (s *Filter_clauseContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Filter_clauseContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *Filter_clauseContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Filter_clauseContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Filter_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Filter_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Filter_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFilter_clause(s)
	}
}

func (s *Filter_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFilter_clause(s)
	}
}

func (s *Filter_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFilter_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Filter_clause() (localctx IFilter_clauseContext) {
	localctx = NewFilter_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 118, ParserRULE_filter_clause)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1662)
		p.Match(ParserFILTER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1663)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1664)
		p.Match(ParserWHERE_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1665)
		p.expr(0)
	}
	{
		p.SetState(1666)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IWindow_defnContext is an interface to support dynamic dispatch.
type IWindow_defnContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode
	ORDER_() antlr.TerminalNode
	AllBY_() []antlr.TerminalNode
	BY_(i int) antlr.TerminalNode
	AllOrdering_term() []IOrdering_termContext
	Ordering_term(i int) IOrdering_termContext
	Base_window_name() IBase_window_nameContext
	PARTITION_() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	Frame_spec() IFrame_specContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsWindow_defnContext differentiates from other interfaces.
	IsWindow_defnContext()
}

type Window_defnContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyWindow_defnContext() *Window_defnContext {
	var p = new(Window_defnContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_defn
	return p
}

func InitEmptyWindow_defnContext(p *Window_defnContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_defn
}

func (*Window_defnContext) IsWindow_defnContext() {}

func NewWindow_defnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_defnContext {
	var p = new(Window_defnContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_window_defn

	return p
}

func (s *Window_defnContext) GetParser() antlr.Parser { return s.parser }

func (s *Window_defnContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Window_defnContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Window_defnContext) ORDER_() antlr.TerminalNode {
	return s.GetToken(ParserORDER_, 0)
}

func (s *Window_defnContext) AllBY_() []antlr.TerminalNode {
	return s.GetTokens(ParserBY_)
}

func (s *Window_defnContext) BY_(i int) antlr.TerminalNode {
	return s.GetToken(ParserBY_, i)
}

func (s *Window_defnContext) AllOrdering_term() []IOrdering_termContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IOrdering_termContext); ok {
			len++
		}
	}

	tst := make([]IOrdering_termContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IOrdering_termContext); ok {
			tst[i] = t.(IOrdering_termContext)
			i++
		}
	}

	return tst
}

func (s *Window_defnContext) Ordering_term(i int) IOrdering_termContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrdering_termContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrdering_termContext)
}

func (s *Window_defnContext) Base_window_name() IBase_window_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IBase_window_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IBase_window_nameContext)
}

func (s *Window_defnContext) PARTITION_() antlr.TerminalNode {
	return s.GetToken(ParserPARTITION_, 0)
}

func (s *Window_defnContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Window_defnContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Window_defnContext) Frame_spec() IFrame_specContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFrame_specContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFrame_specContext)
}

func (s *Window_defnContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Window_defnContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Window_defnContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Window_defnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Window_defnContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterWindow_defn(s)
	}
}

func (s *Window_defnContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitWindow_defn(s)
	}
}

func (s *Window_defnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitWindow_defn(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Window_defn() (localctx IWindow_defnContext) {
	localctx = NewWindow_defnContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 120, ParserRULE_window_defn)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1668)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1670)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 244, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1669)
			p.Base_window_name()
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	p.SetState(1682)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserPARTITION_ {
		{
			p.SetState(1672)
			p.Match(ParserPARTITION_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1673)
			p.Match(ParserBY_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1674)
			p.expr(0)
		}
		p.SetState(1679)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1675)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1676)
				p.expr(0)
			}

			p.SetState(1681)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}

	}

	{
		p.SetState(1684)
		p.Match(ParserORDER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1685)
		p.Match(ParserBY_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1686)
		p.Ordering_term()
	}
	p.SetState(1691)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(1687)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1688)
			p.Ordering_term()
		}

		p.SetState(1693)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

	p.SetState(1695)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&2251799880794113) != 0 {
		{
			p.SetState(1694)
			p.Frame_spec()
		}

	}
	{
		p.SetState(1697)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IOver_clauseContext is an interface to support dynamic dispatch.
type IOver_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	OVER_() antlr.TerminalNode
	Window_name() IWindow_nameContext
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode
	Base_window_name() IBase_window_nameContext
	PARTITION_() antlr.TerminalNode
	AllBY_() []antlr.TerminalNode
	BY_(i int) antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	ORDER_() antlr.TerminalNode
	AllOrdering_term() []IOrdering_termContext
	Ordering_term(i int) IOrdering_termContext
	Frame_spec() IFrame_specContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsOver_clauseContext differentiates from other interfaces.
	IsOver_clauseContext()
}

type Over_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyOver_clauseContext() *Over_clauseContext {
	var p = new(Over_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_over_clause
	return p
}

func InitEmptyOver_clauseContext(p *Over_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_over_clause
}

func (*Over_clauseContext) IsOver_clauseContext() {}

func NewOver_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Over_clauseContext {
	var p = new(Over_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_over_clause

	return p
}

func (s *Over_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Over_clauseContext) OVER_() antlr.TerminalNode {
	return s.GetToken(ParserOVER_, 0)
}

func (s *Over_clauseContext) Window_name() IWindow_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWindow_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWindow_nameContext)
}

func (s *Over_clauseContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Over_clauseContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Over_clauseContext) Base_window_name() IBase_window_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IBase_window_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IBase_window_nameContext)
}

func (s *Over_clauseContext) PARTITION_() antlr.TerminalNode {
	return s.GetToken(ParserPARTITION_, 0)
}

func (s *Over_clauseContext) AllBY_() []antlr.TerminalNode {
	return s.GetTokens(ParserBY_)
}

func (s *Over_clauseContext) BY_(i int) antlr.TerminalNode {
	return s.GetToken(ParserBY_, i)
}

func (s *Over_clauseContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Over_clauseContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Over_clauseContext) ORDER_() antlr.TerminalNode {
	return s.GetToken(ParserORDER_, 0)
}

func (s *Over_clauseContext) AllOrdering_term() []IOrdering_termContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IOrdering_termContext); ok {
			len++
		}
	}

	tst := make([]IOrdering_termContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IOrdering_termContext); ok {
			tst[i] = t.(IOrdering_termContext)
			i++
		}
	}

	return tst
}

func (s *Over_clauseContext) Ordering_term(i int) IOrdering_termContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrdering_termContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrdering_termContext)
}

func (s *Over_clauseContext) Frame_spec() IFrame_specContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFrame_specContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFrame_specContext)
}

func (s *Over_clauseContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Over_clauseContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Over_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Over_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Over_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterOver_clause(s)
	}
}

func (s *Over_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitOver_clause(s)
	}
}

func (s *Over_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitOver_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Over_clause() (localctx IOver_clauseContext) {
	localctx = NewOver_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 122, ParserRULE_over_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1699)
		p.Match(ParserOVER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1733)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 255, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(1700)
			p.Window_name()
		}

	case 2:
		{
			p.SetState(1701)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1703)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 249, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1702)
				p.Base_window_name()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		p.SetState(1715)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserPARTITION_ {
			{
				p.SetState(1705)
				p.Match(ParserPARTITION_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1706)
				p.Match(ParserBY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1707)
				p.expr(0)
			}
			p.SetState(1712)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1708)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1709)
					p.expr(0)
				}

				p.SetState(1714)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		}
		p.SetState(1727)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserORDER_ {
			{
				p.SetState(1717)
				p.Match(ParserORDER_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1718)
				p.Match(ParserBY_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1719)
				p.Ordering_term()
			}
			p.SetState(1724)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)

			for _la == ParserCOMMA {
				{
					p.SetState(1720)
					p.Match(ParserCOMMA)
					if p.HasError() {
						// Recognition error - abort rule
						goto errorExit
					}
				}
				{
					p.SetState(1721)
					p.Ordering_term()
				}

				p.SetState(1726)
				p.GetErrorHandler().Sync(p)
				if p.HasError() {
					goto errorExit
				}
				_la = p.GetTokenStream().LA(1)
			}

		}
		p.SetState(1730)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&2251799880794113) != 0 {
			{
				p.SetState(1729)
				p.Frame_spec()
			}

		}
		{
			p.SetState(1732)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFrame_specContext is an interface to support dynamic dispatch.
type IFrame_specContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Frame_clause() IFrame_clauseContext
	EXCLUDE_() antlr.TerminalNode
	CURRENT_() antlr.TerminalNode
	ROW_() antlr.TerminalNode
	GROUP_() antlr.TerminalNode
	TIES_() antlr.TerminalNode
	NO_() antlr.TerminalNode
	OTHERS_() antlr.TerminalNode

	// IsFrame_specContext differentiates from other interfaces.
	IsFrame_specContext()
}

type Frame_specContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFrame_specContext() *Frame_specContext {
	var p = new(Frame_specContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_spec
	return p
}

func InitEmptyFrame_specContext(p *Frame_specContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_spec
}

func (*Frame_specContext) IsFrame_specContext() {}

func NewFrame_specContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_specContext {
	var p = new(Frame_specContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_frame_spec

	return p
}

func (s *Frame_specContext) GetParser() antlr.Parser { return s.parser }

func (s *Frame_specContext) Frame_clause() IFrame_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFrame_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFrame_clauseContext)
}

func (s *Frame_specContext) EXCLUDE_() antlr.TerminalNode {
	return s.GetToken(ParserEXCLUDE_, 0)
}

func (s *Frame_specContext) CURRENT_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_, 0)
}

func (s *Frame_specContext) ROW_() antlr.TerminalNode {
	return s.GetToken(ParserROW_, 0)
}

func (s *Frame_specContext) GROUP_() antlr.TerminalNode {
	return s.GetToken(ParserGROUP_, 0)
}

func (s *Frame_specContext) TIES_() antlr.TerminalNode {
	return s.GetToken(ParserTIES_, 0)
}

func (s *Frame_specContext) NO_() antlr.TerminalNode {
	return s.GetToken(ParserNO_, 0)
}

func (s *Frame_specContext) OTHERS_() antlr.TerminalNode {
	return s.GetToken(ParserOTHERS_, 0)
}

func (s *Frame_specContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Frame_specContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Frame_specContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFrame_spec(s)
	}
}

func (s *Frame_specContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFrame_spec(s)
	}
}

func (s *Frame_specContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFrame_spec(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Frame_spec() (localctx IFrame_specContext) {
	localctx = NewFrame_specContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 124, ParserRULE_frame_spec)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1735)
		p.Frame_clause()
	}
	p.SetState(1743)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	switch p.GetTokenStream().LA(1) {
	case ParserEXCLUDE_:
		{
			p.SetState(1736)
			p.Match(ParserEXCLUDE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

		{
			p.SetState(1737)
			p.Match(ParserNO_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1738)
			p.Match(ParserOTHERS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserCURRENT_:
		{
			p.SetState(1739)
			p.Match(ParserCURRENT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1740)
			p.Match(ParserROW_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserGROUP_:
		{
			p.SetState(1741)
			p.Match(ParserGROUP_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserTIES_:
		{
			p.SetState(1742)
			p.Match(ParserTIES_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserCLOSE_PAR:

	default:
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFrame_clauseContext is an interface to support dynamic dispatch.
type IFrame_clauseContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	RANGE_() antlr.TerminalNode
	ROWS_() antlr.TerminalNode
	GROUPS_() antlr.TerminalNode
	Frame_single() IFrame_singleContext
	BETWEEN_() antlr.TerminalNode
	Frame_left() IFrame_leftContext
	AND_() antlr.TerminalNode
	Frame_right() IFrame_rightContext

	// IsFrame_clauseContext differentiates from other interfaces.
	IsFrame_clauseContext()
}

type Frame_clauseContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFrame_clauseContext() *Frame_clauseContext {
	var p = new(Frame_clauseContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_clause
	return p
}

func InitEmptyFrame_clauseContext(p *Frame_clauseContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_clause
}

func (*Frame_clauseContext) IsFrame_clauseContext() {}

func NewFrame_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_clauseContext {
	var p = new(Frame_clauseContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_frame_clause

	return p
}

func (s *Frame_clauseContext) GetParser() antlr.Parser { return s.parser }

func (s *Frame_clauseContext) RANGE_() antlr.TerminalNode {
	return s.GetToken(ParserRANGE_, 0)
}

func (s *Frame_clauseContext) ROWS_() antlr.TerminalNode {
	return s.GetToken(ParserROWS_, 0)
}

func (s *Frame_clauseContext) GROUPS_() antlr.TerminalNode {
	return s.GetToken(ParserGROUPS_, 0)
}

func (s *Frame_clauseContext) Frame_single() IFrame_singleContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFrame_singleContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFrame_singleContext)
}

func (s *Frame_clauseContext) BETWEEN_() antlr.TerminalNode {
	return s.GetToken(ParserBETWEEN_, 0)
}

func (s *Frame_clauseContext) Frame_left() IFrame_leftContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFrame_leftContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFrame_leftContext)
}

func (s *Frame_clauseContext) AND_() antlr.TerminalNode {
	return s.GetToken(ParserAND_, 0)
}

func (s *Frame_clauseContext) Frame_right() IFrame_rightContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFrame_rightContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFrame_rightContext)
}

func (s *Frame_clauseContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Frame_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Frame_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFrame_clause(s)
	}
}

func (s *Frame_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFrame_clause(s)
	}
}

func (s *Frame_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFrame_clause(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Frame_clause() (localctx IFrame_clauseContext) {
	localctx = NewFrame_clauseContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 126, ParserRULE_frame_clause)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1745)
		_la = p.GetTokenStream().LA(1)

		if !((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&2251799880794113) != 0) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}
	p.SetState(1752)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 257, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(1746)
			p.Frame_single()
		}

	case 2:
		{
			p.SetState(1747)
			p.Match(ParserBETWEEN_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1748)
			p.Frame_left()
		}
		{
			p.SetState(1749)
			p.Match(ParserAND_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1750)
			p.Frame_right()
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISimple_function_invocationContext is an interface to support dynamic dispatch.
type ISimple_function_invocationContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Simple_func() ISimple_funcContext
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	STAR() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsSimple_function_invocationContext differentiates from other interfaces.
	IsSimple_function_invocationContext()
}

type Simple_function_invocationContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySimple_function_invocationContext() *Simple_function_invocationContext {
	var p = new(Simple_function_invocationContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_simple_function_invocation
	return p
}

func InitEmptySimple_function_invocationContext(p *Simple_function_invocationContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_simple_function_invocation
}

func (*Simple_function_invocationContext) IsSimple_function_invocationContext() {}

func NewSimple_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_function_invocationContext {
	var p = new(Simple_function_invocationContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_simple_function_invocation

	return p
}

func (s *Simple_function_invocationContext) GetParser() antlr.Parser { return s.parser }

func (s *Simple_function_invocationContext) Simple_func() ISimple_funcContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISimple_funcContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISimple_funcContext)
}

func (s *Simple_function_invocationContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Simple_function_invocationContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Simple_function_invocationContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Simple_function_invocationContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Simple_function_invocationContext) STAR() antlr.TerminalNode {
	return s.GetToken(ParserSTAR, 0)
}

func (s *Simple_function_invocationContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Simple_function_invocationContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Simple_function_invocationContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Simple_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Simple_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSimple_function_invocation(s)
	}
}

func (s *Simple_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSimple_function_invocation(s)
	}
}

func (s *Simple_function_invocationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSimple_function_invocation(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Simple_function_invocation() (localctx ISimple_function_invocationContext) {
	localctx = NewSimple_function_invocationContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 128, ParserRULE_simple_function_invocation)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1754)
		p.Simple_func()
	}
	{
		p.SetState(1755)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1765)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserOPEN_PAR, ParserPLUS, ParserMINUS, ParserTILDE, ParserABORT_, ParserACTION_, ParserADD_, ParserAFTER_, ParserALL_, ParserALTER_, ParserANALYZE_, ParserAND_, ParserAS_, ParserASC_, ParserATTACH_, ParserAUTOINCREMENT_, ParserBEFORE_, ParserBEGIN_, ParserBETWEEN_, ParserBY_, ParserCASCADE_, ParserCASE_, ParserCAST_, ParserCHECK_, ParserCOLLATE_, ParserCOLUMN_, ParserCOMMIT_, ParserCONFLICT_, ParserCONSTRAINT_, ParserCREATE_, ParserCROSS_, ParserCURRENT_DATE_, ParserCURRENT_TIME_, ParserCURRENT_TIMESTAMP_, ParserDATABASE_, ParserDEFAULT_, ParserDEFERRABLE_, ParserDEFERRED_, ParserDELETE_, ParserDESC_, ParserDETACH_, ParserDISTINCT_, ParserDROP_, ParserEACH_, ParserELSE_, ParserEND_, ParserESCAPE_, ParserEXCEPT_, ParserEXCLUSIVE_, ParserEXISTS_, ParserEXPLAIN_, ParserFAIL_, ParserFOR_, ParserFOREIGN_, ParserFROM_, ParserFULL_, ParserGLOB_, ParserGROUP_, ParserHAVING_, ParserIF_, ParserIGNORE_, ParserIMMEDIATE_, ParserIN_, ParserINDEX_, ParserINDEXED_, ParserINITIALLY_, ParserINNER_, ParserINSERT_, ParserINSTEAD_, ParserINTERSECT_, ParserINTO_, ParserIS_, ParserISNULL_, ParserJOIN_, ParserKEY_, ParserLEFT_, ParserLIKE_, ParserLIMIT_, ParserMATCH_, ParserNATURAL_, ParserNO_, ParserNOT_, ParserNOTNULL_, ParserNULL_, ParserOF_, ParserOFFSET_, ParserON_, ParserOR_, ParserORDER_, ParserOUTER_, ParserPLAN_, ParserPRAGMA_, ParserPRIMARY_, ParserQUERY_, ParserRAISE_, ParserRECURSIVE_, ParserREFERENCES_, ParserREGEXP_, ParserREINDEX_, ParserRELEASE_, ParserRENAME_, ParserREPLACE_, ParserRESTRICT_, ParserRIGHT_, ParserROLLBACK_, ParserROW_, ParserROWS_, ParserSAVEPOINT_, ParserSELECT_, ParserSET_, ParserTABLE_, ParserTEMP_, ParserTEMPORARY_, ParserTHEN_, ParserTO_, ParserTRANSACTION_, ParserTRIGGER_, ParserUNION_, ParserUNIQUE_, ParserUPDATE_, ParserUSING_, ParserVACUUM_, ParserVALUES_, ParserVIEW_, ParserVIRTUAL_, ParserWHEN_, ParserWHERE_, ParserWITH_, ParserWITHOUT_, ParserFIRST_VALUE_, ParserOVER_, ParserPARTITION_, ParserRANGE_, ParserPRECEDING_, ParserUNBOUNDED_, ParserCURRENT_, ParserFOLLOWING_, ParserCUME_DIST_, ParserDENSE_RANK_, ParserLAG_, ParserLAST_VALUE_, ParserLEAD_, ParserNTH_VALUE_, ParserNTILE_, ParserPERCENT_RANK_, ParserRANK_, ParserROW_NUMBER_, ParserGENERATED_, ParserALWAYS_, ParserSTORED_, ParserTRUE_, ParserFALSE_, ParserWINDOW_, ParserNULLS_, ParserFIRST_, ParserLAST_, ParserFILTER_, ParserGROUPS_, ParserEXCLUDE_, ParserIDENTIFIER, ParserNUMERIC_LITERAL, ParserBIND_PARAMETER, ParserSTRING_LITERAL, ParserBLOB_LITERAL:
		{
			p.SetState(1756)
			p.expr(0)
		}
		p.SetState(1761)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1757)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1758)
				p.expr(0)
			}

			p.SetState(1763)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}

	case ParserSTAR:
		{
			p.SetState(1764)
			p.Match(ParserSTAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}
	{
		p.SetState(1767)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAggregate_function_invocationContext is an interface to support dynamic dispatch.
type IAggregate_function_invocationContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Aggregate_func() IAggregate_funcContext
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	STAR() antlr.TerminalNode
	Filter_clause() IFilter_clauseContext
	DISTINCT_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsAggregate_function_invocationContext differentiates from other interfaces.
	IsAggregate_function_invocationContext()
}

type Aggregate_function_invocationContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAggregate_function_invocationContext() *Aggregate_function_invocationContext {
	var p = new(Aggregate_function_invocationContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_aggregate_function_invocation
	return p
}

func InitEmptyAggregate_function_invocationContext(p *Aggregate_function_invocationContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_aggregate_function_invocation
}

func (*Aggregate_function_invocationContext) IsAggregate_function_invocationContext() {}

func NewAggregate_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_function_invocationContext {
	var p = new(Aggregate_function_invocationContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_aggregate_function_invocation

	return p
}

func (s *Aggregate_function_invocationContext) GetParser() antlr.Parser { return s.parser }

func (s *Aggregate_function_invocationContext) Aggregate_func() IAggregate_funcContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAggregate_funcContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAggregate_funcContext)
}

func (s *Aggregate_function_invocationContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Aggregate_function_invocationContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Aggregate_function_invocationContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Aggregate_function_invocationContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Aggregate_function_invocationContext) STAR() antlr.TerminalNode {
	return s.GetToken(ParserSTAR, 0)
}

func (s *Aggregate_function_invocationContext) Filter_clause() IFilter_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFilter_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFilter_clauseContext)
}

func (s *Aggregate_function_invocationContext) DISTINCT_() antlr.TerminalNode {
	return s.GetToken(ParserDISTINCT_, 0)
}

func (s *Aggregate_function_invocationContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Aggregate_function_invocationContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Aggregate_function_invocationContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Aggregate_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Aggregate_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAggregate_function_invocation(s)
	}
}

func (s *Aggregate_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAggregate_function_invocation(s)
	}
}

func (s *Aggregate_function_invocationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAggregate_function_invocation(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Aggregate_function_invocation() (localctx IAggregate_function_invocationContext) {
	localctx = NewAggregate_function_invocationContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 130, ParserRULE_aggregate_function_invocation)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1769)
		p.Aggregate_func()
	}
	{
		p.SetState(1770)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1783)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	switch p.GetTokenStream().LA(1) {
	case ParserOPEN_PAR, ParserPLUS, ParserMINUS, ParserTILDE, ParserABORT_, ParserACTION_, ParserADD_, ParserAFTER_, ParserALL_, ParserALTER_, ParserANALYZE_, ParserAND_, ParserAS_, ParserASC_, ParserATTACH_, ParserAUTOINCREMENT_, ParserBEFORE_, ParserBEGIN_, ParserBETWEEN_, ParserBY_, ParserCASCADE_, ParserCASE_, ParserCAST_, ParserCHECK_, ParserCOLLATE_, ParserCOLUMN_, ParserCOMMIT_, ParserCONFLICT_, ParserCONSTRAINT_, ParserCREATE_, ParserCROSS_, ParserCURRENT_DATE_, ParserCURRENT_TIME_, ParserCURRENT_TIMESTAMP_, ParserDATABASE_, ParserDEFAULT_, ParserDEFERRABLE_, ParserDEFERRED_, ParserDELETE_, ParserDESC_, ParserDETACH_, ParserDISTINCT_, ParserDROP_, ParserEACH_, ParserELSE_, ParserEND_, ParserESCAPE_, ParserEXCEPT_, ParserEXCLUSIVE_, ParserEXISTS_, ParserEXPLAIN_, ParserFAIL_, ParserFOR_, ParserFOREIGN_, ParserFROM_, ParserFULL_, ParserGLOB_, ParserGROUP_, ParserHAVING_, ParserIF_, ParserIGNORE_, ParserIMMEDIATE_, ParserIN_, ParserINDEX_, ParserINDEXED_, ParserINITIALLY_, ParserINNER_, ParserINSERT_, ParserINSTEAD_, ParserINTERSECT_, ParserINTO_, ParserIS_, ParserISNULL_, ParserJOIN_, ParserKEY_, ParserLEFT_, ParserLIKE_, ParserLIMIT_, ParserMATCH_, ParserNATURAL_, ParserNO_, ParserNOT_, ParserNOTNULL_, ParserNULL_, ParserOF_, ParserOFFSET_, ParserON_, ParserOR_, ParserORDER_, ParserOUTER_, ParserPLAN_, ParserPRAGMA_, ParserPRIMARY_, ParserQUERY_, ParserRAISE_, ParserRECURSIVE_, ParserREFERENCES_, ParserREGEXP_, ParserREINDEX_, ParserRELEASE_, ParserRENAME_, ParserREPLACE_, ParserRESTRICT_, ParserRIGHT_, ParserROLLBACK_, ParserROW_, ParserROWS_, ParserSAVEPOINT_, ParserSELECT_, ParserSET_, ParserTABLE_, ParserTEMP_, ParserTEMPORARY_, ParserTHEN_, ParserTO_, ParserTRANSACTION_, ParserTRIGGER_, ParserUNION_, ParserUNIQUE_, ParserUPDATE_, ParserUSING_, ParserVACUUM_, ParserVALUES_, ParserVIEW_, ParserVIRTUAL_, ParserWHEN_, ParserWHERE_, ParserWITH_, ParserWITHOUT_, ParserFIRST_VALUE_, ParserOVER_, ParserPARTITION_, ParserRANGE_, ParserPRECEDING_, ParserUNBOUNDED_, ParserCURRENT_, ParserFOLLOWING_, ParserCUME_DIST_, ParserDENSE_RANK_, ParserLAG_, ParserLAST_VALUE_, ParserLEAD_, ParserNTH_VALUE_, ParserNTILE_, ParserPERCENT_RANK_, ParserRANK_, ParserROW_NUMBER_, ParserGENERATED_, ParserALWAYS_, ParserSTORED_, ParserTRUE_, ParserFALSE_, ParserWINDOW_, ParserNULLS_, ParserFIRST_, ParserLAST_, ParserFILTER_, ParserGROUPS_, ParserEXCLUDE_, ParserIDENTIFIER, ParserNUMERIC_LITERAL, ParserBIND_PARAMETER, ParserSTRING_LITERAL, ParserBLOB_LITERAL:
		p.SetState(1772)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 260, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1771)
				p.Match(ParserDISTINCT_)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		{
			p.SetState(1774)
			p.expr(0)
		}
		p.SetState(1779)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1775)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1776)
				p.expr(0)
			}

			p.SetState(1781)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}

	case ParserSTAR:
		{
			p.SetState(1782)
			p.Match(ParserSTAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserCLOSE_PAR:

	default:
	}
	{
		p.SetState(1785)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1787)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserFILTER_ {
		{
			p.SetState(1786)
			p.Filter_clause()
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IWindow_function_invocationContext is an interface to support dynamic dispatch.
type IWindow_function_invocationContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Window_function() IWindow_functionContext
	OPEN_PAR() antlr.TerminalNode
	CLOSE_PAR() antlr.TerminalNode
	OVER_() antlr.TerminalNode
	Window_defn() IWindow_defnContext
	Window_name() IWindow_nameContext
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	STAR() antlr.TerminalNode
	Filter_clause() IFilter_clauseContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsWindow_function_invocationContext differentiates from other interfaces.
	IsWindow_function_invocationContext()
}

type Window_function_invocationContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyWindow_function_invocationContext() *Window_function_invocationContext {
	var p = new(Window_function_invocationContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_function_invocation
	return p
}

func InitEmptyWindow_function_invocationContext(p *Window_function_invocationContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_function_invocation
}

func (*Window_function_invocationContext) IsWindow_function_invocationContext() {}

func NewWindow_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_function_invocationContext {
	var p = new(Window_function_invocationContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_window_function_invocation

	return p
}

func (s *Window_function_invocationContext) GetParser() antlr.Parser { return s.parser }

func (s *Window_function_invocationContext) Window_function() IWindow_functionContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWindow_functionContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWindow_functionContext)
}

func (s *Window_function_invocationContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Window_function_invocationContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Window_function_invocationContext) OVER_() antlr.TerminalNode {
	return s.GetToken(ParserOVER_, 0)
}

func (s *Window_function_invocationContext) Window_defn() IWindow_defnContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWindow_defnContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWindow_defnContext)
}

func (s *Window_function_invocationContext) Window_name() IWindow_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IWindow_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IWindow_nameContext)
}

func (s *Window_function_invocationContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Window_function_invocationContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Window_function_invocationContext) STAR() antlr.TerminalNode {
	return s.GetToken(ParserSTAR, 0)
}

func (s *Window_function_invocationContext) Filter_clause() IFilter_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFilter_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFilter_clauseContext)
}

func (s *Window_function_invocationContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Window_function_invocationContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Window_function_invocationContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Window_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Window_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterWindow_function_invocation(s)
	}
}

func (s *Window_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitWindow_function_invocation(s)
	}
}

func (s *Window_function_invocationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitWindow_function_invocation(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Window_function_invocation() (localctx IWindow_function_invocationContext) {
	localctx = NewWindow_function_invocationContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 132, ParserRULE_window_function_invocation)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1789)
		p.Window_function()
	}
	{
		p.SetState(1790)
		p.Match(ParserOPEN_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1800)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	switch p.GetTokenStream().LA(1) {
	case ParserOPEN_PAR, ParserPLUS, ParserMINUS, ParserTILDE, ParserABORT_, ParserACTION_, ParserADD_, ParserAFTER_, ParserALL_, ParserALTER_, ParserANALYZE_, ParserAND_, ParserAS_, ParserASC_, ParserATTACH_, ParserAUTOINCREMENT_, ParserBEFORE_, ParserBEGIN_, ParserBETWEEN_, ParserBY_, ParserCASCADE_, ParserCASE_, ParserCAST_, ParserCHECK_, ParserCOLLATE_, ParserCOLUMN_, ParserCOMMIT_, ParserCONFLICT_, ParserCONSTRAINT_, ParserCREATE_, ParserCROSS_, ParserCURRENT_DATE_, ParserCURRENT_TIME_, ParserCURRENT_TIMESTAMP_, ParserDATABASE_, ParserDEFAULT_, ParserDEFERRABLE_, ParserDEFERRED_, ParserDELETE_, ParserDESC_, ParserDETACH_, ParserDISTINCT_, ParserDROP_, ParserEACH_, ParserELSE_, ParserEND_, ParserESCAPE_, ParserEXCEPT_, ParserEXCLUSIVE_, ParserEXISTS_, ParserEXPLAIN_, ParserFAIL_, ParserFOR_, ParserFOREIGN_, ParserFROM_, ParserFULL_, ParserGLOB_, ParserGROUP_, ParserHAVING_, ParserIF_, ParserIGNORE_, ParserIMMEDIATE_, ParserIN_, ParserINDEX_, ParserINDEXED_, ParserINITIALLY_, ParserINNER_, ParserINSERT_, ParserINSTEAD_, ParserINTERSECT_, ParserINTO_, ParserIS_, ParserISNULL_, ParserJOIN_, ParserKEY_, ParserLEFT_, ParserLIKE_, ParserLIMIT_, ParserMATCH_, ParserNATURAL_, ParserNO_, ParserNOT_, ParserNOTNULL_, ParserNULL_, ParserOF_, ParserOFFSET_, ParserON_, ParserOR_, ParserORDER_, ParserOUTER_, ParserPLAN_, ParserPRAGMA_, ParserPRIMARY_, ParserQUERY_, ParserRAISE_, ParserRECURSIVE_, ParserREFERENCES_, ParserREGEXP_, ParserREINDEX_, ParserRELEASE_, ParserRENAME_, ParserREPLACE_, ParserRESTRICT_, ParserRIGHT_, ParserROLLBACK_, ParserROW_, ParserROWS_, ParserSAVEPOINT_, ParserSELECT_, ParserSET_, ParserTABLE_, ParserTEMP_, ParserTEMPORARY_, ParserTHEN_, ParserTO_, ParserTRANSACTION_, ParserTRIGGER_, ParserUNION_, ParserUNIQUE_, ParserUPDATE_, ParserUSING_, ParserVACUUM_, ParserVALUES_, ParserVIEW_, ParserVIRTUAL_, ParserWHEN_, ParserWHERE_, ParserWITH_, ParserWITHOUT_, ParserFIRST_VALUE_, ParserOVER_, ParserPARTITION_, ParserRANGE_, ParserPRECEDING_, ParserUNBOUNDED_, ParserCURRENT_, ParserFOLLOWING_, ParserCUME_DIST_, ParserDENSE_RANK_, ParserLAG_, ParserLAST_VALUE_, ParserLEAD_, ParserNTH_VALUE_, ParserNTILE_, ParserPERCENT_RANK_, ParserRANK_, ParserROW_NUMBER_, ParserGENERATED_, ParserALWAYS_, ParserSTORED_, ParserTRUE_, ParserFALSE_, ParserWINDOW_, ParserNULLS_, ParserFIRST_, ParserLAST_, ParserFILTER_, ParserGROUPS_, ParserEXCLUDE_, ParserIDENTIFIER, ParserNUMERIC_LITERAL, ParserBIND_PARAMETER, ParserSTRING_LITERAL, ParserBLOB_LITERAL:
		{
			p.SetState(1791)
			p.expr(0)
		}
		p.SetState(1796)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		for _la == ParserCOMMA {
			{
				p.SetState(1792)
				p.Match(ParserCOMMA)
				if p.HasError() {
					// Recognition error - abort rule
					goto errorExit
				}
			}
			{
				p.SetState(1793)
				p.expr(0)
			}

			p.SetState(1798)
			p.GetErrorHandler().Sync(p)
			if p.HasError() {
				goto errorExit
			}
			_la = p.GetTokenStream().LA(1)
		}

	case ParserSTAR:
		{
			p.SetState(1799)
			p.Match(ParserSTAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserCLOSE_PAR:

	default:
	}
	{
		p.SetState(1802)
		p.Match(ParserCLOSE_PAR)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1804)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserFILTER_ {
		{
			p.SetState(1803)
			p.Filter_clause()
		}

	}
	{
		p.SetState(1806)
		p.Match(ParserOVER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1809)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 267, p.GetParserRuleContext()) {
	case 1:
		{
			p.SetState(1807)
			p.Window_defn()
		}

	case 2:
		{
			p.SetState(1808)
			p.Window_name()
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICommon_table_stmtContext is an interface to support dynamic dispatch.
type ICommon_table_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	WITH_() antlr.TerminalNode
	AllCommon_table_expression() []ICommon_table_expressionContext
	Common_table_expression(i int) ICommon_table_expressionContext
	RECURSIVE_() antlr.TerminalNode
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsCommon_table_stmtContext differentiates from other interfaces.
	IsCommon_table_stmtContext()
}

type Common_table_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCommon_table_stmtContext() *Common_table_stmtContext {
	var p = new(Common_table_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_common_table_stmt
	return p
}

func InitEmptyCommon_table_stmtContext(p *Common_table_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_common_table_stmt
}

func (*Common_table_stmtContext) IsCommon_table_stmtContext() {}

func NewCommon_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_stmtContext {
	var p = new(Common_table_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_common_table_stmt

	return p
}

func (s *Common_table_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Common_table_stmtContext) WITH_() antlr.TerminalNode {
	return s.GetToken(ParserWITH_, 0)
}

func (s *Common_table_stmtContext) AllCommon_table_expression() []ICommon_table_expressionContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(ICommon_table_expressionContext); ok {
			len++
		}
	}

	tst := make([]ICommon_table_expressionContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(ICommon_table_expressionContext); ok {
			tst[i] = t.(ICommon_table_expressionContext)
			i++
		}
	}

	return tst
}

func (s *Common_table_stmtContext) Common_table_expression(i int) ICommon_table_expressionContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICommon_table_expressionContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICommon_table_expressionContext)
}

func (s *Common_table_stmtContext) RECURSIVE_() antlr.TerminalNode {
	return s.GetToken(ParserRECURSIVE_, 0)
}

func (s *Common_table_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Common_table_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Common_table_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Common_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Common_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCommon_table_stmt(s)
	}
}

func (s *Common_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCommon_table_stmt(s)
	}
}

func (s *Common_table_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCommon_table_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Common_table_stmt() (localctx ICommon_table_stmtContext) {
	localctx = NewCommon_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 134, ParserRULE_common_table_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1811)
		p.Match(ParserWITH_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1813)
	p.GetErrorHandler().Sync(p)

	if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 268, p.GetParserRuleContext()) == 1 {
		{
			p.SetState(1812)
			p.Match(ParserRECURSIVE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	} else if p.HasError() { // JIM
		goto errorExit
	}
	{
		p.SetState(1815)
		p.Common_table_expression()
	}
	p.SetState(1820)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(1816)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1817)
			p.Common_table_expression()
		}

		p.SetState(1822)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IOrder_by_stmtContext is an interface to support dynamic dispatch.
type IOrder_by_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ORDER_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	AllOrdering_term() []IOrdering_termContext
	Ordering_term(i int) IOrdering_termContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsOrder_by_stmtContext differentiates from other interfaces.
	IsOrder_by_stmtContext()
}

type Order_by_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyOrder_by_stmtContext() *Order_by_stmtContext {
	var p = new(Order_by_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_order_by_stmt
	return p
}

func InitEmptyOrder_by_stmtContext(p *Order_by_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_order_by_stmt
}

func (*Order_by_stmtContext) IsOrder_by_stmtContext() {}

func NewOrder_by_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_stmtContext {
	var p = new(Order_by_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_order_by_stmt

	return p
}

func (s *Order_by_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Order_by_stmtContext) ORDER_() antlr.TerminalNode {
	return s.GetToken(ParserORDER_, 0)
}

func (s *Order_by_stmtContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *Order_by_stmtContext) AllOrdering_term() []IOrdering_termContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IOrdering_termContext); ok {
			len++
		}
	}

	tst := make([]IOrdering_termContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IOrdering_termContext); ok {
			tst[i] = t.(IOrdering_termContext)
			i++
		}
	}

	return tst
}

func (s *Order_by_stmtContext) Ordering_term(i int) IOrdering_termContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrdering_termContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrdering_termContext)
}

func (s *Order_by_stmtContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Order_by_stmtContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Order_by_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Order_by_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Order_by_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterOrder_by_stmt(s)
	}
}

func (s *Order_by_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitOrder_by_stmt(s)
	}
}

func (s *Order_by_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitOrder_by_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Order_by_stmt() (localctx IOrder_by_stmtContext) {
	localctx = NewOrder_by_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 136, ParserRULE_order_by_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1823)
		p.Match(ParserORDER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1824)
		p.Match(ParserBY_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1825)
		p.Ordering_term()
	}
	p.SetState(1830)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(1826)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1827)
			p.Ordering_term()
		}

		p.SetState(1832)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ILimit_stmtContext is an interface to support dynamic dispatch.
type ILimit_stmtContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	LIMIT_() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	OFFSET_() antlr.TerminalNode
	COMMA() antlr.TerminalNode

	// IsLimit_stmtContext differentiates from other interfaces.
	IsLimit_stmtContext()
}

type Limit_stmtContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyLimit_stmtContext() *Limit_stmtContext {
	var p = new(Limit_stmtContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_limit_stmt
	return p
}

func InitEmptyLimit_stmtContext(p *Limit_stmtContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_limit_stmt
}

func (*Limit_stmtContext) IsLimit_stmtContext() {}

func NewLimit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Limit_stmtContext {
	var p = new(Limit_stmtContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_limit_stmt

	return p
}

func (s *Limit_stmtContext) GetParser() antlr.Parser { return s.parser }

func (s *Limit_stmtContext) LIMIT_() antlr.TerminalNode {
	return s.GetToken(ParserLIMIT_, 0)
}

func (s *Limit_stmtContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Limit_stmtContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Limit_stmtContext) OFFSET_() antlr.TerminalNode {
	return s.GetToken(ParserOFFSET_, 0)
}

func (s *Limit_stmtContext) COMMA() antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, 0)
}

func (s *Limit_stmtContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Limit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Limit_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterLimit_stmt(s)
	}
}

func (s *Limit_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitLimit_stmt(s)
	}
}

func (s *Limit_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitLimit_stmt(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Limit_stmt() (localctx ILimit_stmtContext) {
	localctx = NewLimit_stmtContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 138, ParserRULE_limit_stmt)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1833)
		p.Match(ParserLIMIT_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1834)
		p.expr(0)
	}
	p.SetState(1837)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserCOMMA || _la == ParserOFFSET_ {
		{
			p.SetState(1835)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserCOMMA || _la == ParserOFFSET_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		{
			p.SetState(1836)
			p.expr(0)
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IOrdering_termContext is an interface to support dynamic dispatch.
type IOrdering_termContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Expr() IExprContext
	COLLATE_() antlr.TerminalNode
	Collation_name() ICollation_nameContext
	Asc_desc() IAsc_descContext
	NULLS_() antlr.TerminalNode
	FIRST_() antlr.TerminalNode
	LAST_() antlr.TerminalNode

	// IsOrdering_termContext differentiates from other interfaces.
	IsOrdering_termContext()
}

type Ordering_termContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyOrdering_termContext() *Ordering_termContext {
	var p = new(Ordering_termContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_ordering_term
	return p
}

func InitEmptyOrdering_termContext(p *Ordering_termContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_ordering_term
}

func (*Ordering_termContext) IsOrdering_termContext() {}

func NewOrdering_termContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ordering_termContext {
	var p = new(Ordering_termContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_ordering_term

	return p
}

func (s *Ordering_termContext) GetParser() antlr.Parser { return s.parser }

func (s *Ordering_termContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Ordering_termContext) COLLATE_() antlr.TerminalNode {
	return s.GetToken(ParserCOLLATE_, 0)
}

func (s *Ordering_termContext) Collation_name() ICollation_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ICollation_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ICollation_nameContext)
}

func (s *Ordering_termContext) Asc_desc() IAsc_descContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAsc_descContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAsc_descContext)
}

func (s *Ordering_termContext) NULLS_() antlr.TerminalNode {
	return s.GetToken(ParserNULLS_, 0)
}

func (s *Ordering_termContext) FIRST_() antlr.TerminalNode {
	return s.GetToken(ParserFIRST_, 0)
}

func (s *Ordering_termContext) LAST_() antlr.TerminalNode {
	return s.GetToken(ParserLAST_, 0)
}

func (s *Ordering_termContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Ordering_termContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Ordering_termContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterOrdering_term(s)
	}
}

func (s *Ordering_termContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitOrdering_term(s)
	}
}

func (s *Ordering_termContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitOrdering_term(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Ordering_term() (localctx IOrdering_termContext) {
	localctx = NewOrdering_termContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 140, ParserRULE_ordering_term)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1839)
		p.expr(0)
	}
	p.SetState(1842)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserCOLLATE_ {
		{
			p.SetState(1840)
			p.Match(ParserCOLLATE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1841)
			p.Collation_name()
		}

	}
	p.SetState(1845)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserASC_ || _la == ParserDESC_ {
		{
			p.SetState(1844)
			p.Asc_desc()
		}

	}
	p.SetState(1849)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserNULLS_ {
		{
			p.SetState(1847)
			p.Match(ParserNULLS_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1848)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserFIRST_ || _la == ParserLAST_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}

	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAsc_descContext is an interface to support dynamic dispatch.
type IAsc_descContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ASC_() antlr.TerminalNode
	DESC_() antlr.TerminalNode

	// IsAsc_descContext differentiates from other interfaces.
	IsAsc_descContext()
}

type Asc_descContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAsc_descContext() *Asc_descContext {
	var p = new(Asc_descContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_asc_desc
	return p
}

func InitEmptyAsc_descContext(p *Asc_descContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_asc_desc
}

func (*Asc_descContext) IsAsc_descContext() {}

func NewAsc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Asc_descContext {
	var p = new(Asc_descContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_asc_desc

	return p
}

func (s *Asc_descContext) GetParser() antlr.Parser { return s.parser }

func (s *Asc_descContext) ASC_() antlr.TerminalNode {
	return s.GetToken(ParserASC_, 0)
}

func (s *Asc_descContext) DESC_() antlr.TerminalNode {
	return s.GetToken(ParserDESC_, 0)
}

func (s *Asc_descContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Asc_descContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAsc_desc(s)
	}
}

func (s *Asc_descContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAsc_desc(s)
	}
}

func (s *Asc_descContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAsc_desc(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Asc_desc() (localctx IAsc_descContext) {
	localctx = NewAsc_descContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 142, ParserRULE_asc_desc)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1851)
		_la = p.GetTokenStream().LA(1)

		if !(_la == ParserASC_ || _la == ParserDESC_) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFrame_leftContext is an interface to support dynamic dispatch.
type IFrame_leftContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Expr() IExprContext
	PRECEDING_() antlr.TerminalNode
	FOLLOWING_() antlr.TerminalNode
	CURRENT_() antlr.TerminalNode
	ROW_() antlr.TerminalNode
	UNBOUNDED_() antlr.TerminalNode

	// IsFrame_leftContext differentiates from other interfaces.
	IsFrame_leftContext()
}

type Frame_leftContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFrame_leftContext() *Frame_leftContext {
	var p = new(Frame_leftContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_left
	return p
}

func InitEmptyFrame_leftContext(p *Frame_leftContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_left
}

func (*Frame_leftContext) IsFrame_leftContext() {}

func NewFrame_leftContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_leftContext {
	var p = new(Frame_leftContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_frame_left

	return p
}

func (s *Frame_leftContext) GetParser() antlr.Parser { return s.parser }

func (s *Frame_leftContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Frame_leftContext) PRECEDING_() antlr.TerminalNode {
	return s.GetToken(ParserPRECEDING_, 0)
}

func (s *Frame_leftContext) FOLLOWING_() antlr.TerminalNode {
	return s.GetToken(ParserFOLLOWING_, 0)
}

func (s *Frame_leftContext) CURRENT_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_, 0)
}

func (s *Frame_leftContext) ROW_() antlr.TerminalNode {
	return s.GetToken(ParserROW_, 0)
}

func (s *Frame_leftContext) UNBOUNDED_() antlr.TerminalNode {
	return s.GetToken(ParserUNBOUNDED_, 0)
}

func (s *Frame_leftContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Frame_leftContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Frame_leftContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFrame_left(s)
	}
}

func (s *Frame_leftContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFrame_left(s)
	}
}

func (s *Frame_leftContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFrame_left(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Frame_left() (localctx IFrame_leftContext) {
	localctx = NewFrame_leftContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 144, ParserRULE_frame_left)
	p.SetState(1863)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 275, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1853)
			p.expr(0)
		}
		{
			p.SetState(1854)
			p.Match(ParserPRECEDING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1856)
			p.expr(0)
		}
		{
			p.SetState(1857)
			p.Match(ParserFOLLOWING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1859)
			p.Match(ParserCURRENT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1860)
			p.Match(ParserROW_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(1861)
			p.Match(ParserUNBOUNDED_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1862)
			p.Match(ParserPRECEDING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFrame_rightContext is an interface to support dynamic dispatch.
type IFrame_rightContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Expr() IExprContext
	PRECEDING_() antlr.TerminalNode
	FOLLOWING_() antlr.TerminalNode
	CURRENT_() antlr.TerminalNode
	ROW_() antlr.TerminalNode
	UNBOUNDED_() antlr.TerminalNode

	// IsFrame_rightContext differentiates from other interfaces.
	IsFrame_rightContext()
}

type Frame_rightContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFrame_rightContext() *Frame_rightContext {
	var p = new(Frame_rightContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_right
	return p
}

func InitEmptyFrame_rightContext(p *Frame_rightContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_right
}

func (*Frame_rightContext) IsFrame_rightContext() {}

func NewFrame_rightContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_rightContext {
	var p = new(Frame_rightContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_frame_right

	return p
}

func (s *Frame_rightContext) GetParser() antlr.Parser { return s.parser }

func (s *Frame_rightContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Frame_rightContext) PRECEDING_() antlr.TerminalNode {
	return s.GetToken(ParserPRECEDING_, 0)
}

func (s *Frame_rightContext) FOLLOWING_() antlr.TerminalNode {
	return s.GetToken(ParserFOLLOWING_, 0)
}

func (s *Frame_rightContext) CURRENT_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_, 0)
}

func (s *Frame_rightContext) ROW_() antlr.TerminalNode {
	return s.GetToken(ParserROW_, 0)
}

func (s *Frame_rightContext) UNBOUNDED_() antlr.TerminalNode {
	return s.GetToken(ParserUNBOUNDED_, 0)
}

func (s *Frame_rightContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Frame_rightContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Frame_rightContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFrame_right(s)
	}
}

func (s *Frame_rightContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFrame_right(s)
	}
}

func (s *Frame_rightContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFrame_right(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Frame_right() (localctx IFrame_rightContext) {
	localctx = NewFrame_rightContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 146, ParserRULE_frame_right)
	p.SetState(1875)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 276, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1865)
			p.expr(0)
		}
		{
			p.SetState(1866)
			p.Match(ParserPRECEDING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1868)
			p.expr(0)
		}
		{
			p.SetState(1869)
			p.Match(ParserFOLLOWING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1871)
			p.Match(ParserCURRENT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1872)
			p.Match(ParserROW_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 4:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(1873)
			p.Match(ParserUNBOUNDED_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1874)
			p.Match(ParserFOLLOWING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFrame_singleContext is an interface to support dynamic dispatch.
type IFrame_singleContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Expr() IExprContext
	PRECEDING_() antlr.TerminalNode
	UNBOUNDED_() antlr.TerminalNode
	CURRENT_() antlr.TerminalNode
	ROW_() antlr.TerminalNode

	// IsFrame_singleContext differentiates from other interfaces.
	IsFrame_singleContext()
}

type Frame_singleContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFrame_singleContext() *Frame_singleContext {
	var p = new(Frame_singleContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_single
	return p
}

func InitEmptyFrame_singleContext(p *Frame_singleContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_frame_single
}

func (*Frame_singleContext) IsFrame_singleContext() {}

func NewFrame_singleContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_singleContext {
	var p = new(Frame_singleContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_frame_single

	return p
}

func (s *Frame_singleContext) GetParser() antlr.Parser { return s.parser }

func (s *Frame_singleContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Frame_singleContext) PRECEDING_() antlr.TerminalNode {
	return s.GetToken(ParserPRECEDING_, 0)
}

func (s *Frame_singleContext) UNBOUNDED_() antlr.TerminalNode {
	return s.GetToken(ParserUNBOUNDED_, 0)
}

func (s *Frame_singleContext) CURRENT_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_, 0)
}

func (s *Frame_singleContext) ROW_() antlr.TerminalNode {
	return s.GetToken(ParserROW_, 0)
}

func (s *Frame_singleContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Frame_singleContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Frame_singleContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFrame_single(s)
	}
}

func (s *Frame_singleContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFrame_single(s)
	}
}

func (s *Frame_singleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFrame_single(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Frame_single() (localctx IFrame_singleContext) {
	localctx = NewFrame_singleContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 148, ParserRULE_frame_single)
	p.SetState(1884)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 277, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1877)
			p.expr(0)
		}
		{
			p.SetState(1878)
			p.Match(ParserPRECEDING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1880)
			p.Match(ParserUNBOUNDED_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1881)
			p.Match(ParserPRECEDING_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case 3:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1882)
			p.Match(ParserCURRENT_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1883)
			p.Match(ParserROW_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IWindow_functionContext is an interface to support dynamic dispatch.
type IWindow_functionContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllOPEN_PAR() []antlr.TerminalNode
	OPEN_PAR(i int) antlr.TerminalNode
	Expr() IExprContext
	AllCLOSE_PAR() []antlr.TerminalNode
	CLOSE_PAR(i int) antlr.TerminalNode
	OVER_() antlr.TerminalNode
	Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext
	FIRST_VALUE_() antlr.TerminalNode
	LAST_VALUE_() antlr.TerminalNode
	Partition_by() IPartition_byContext
	Frame_clause() IFrame_clauseContext
	CUME_DIST_() antlr.TerminalNode
	PERCENT_RANK_() antlr.TerminalNode
	Order_by_expr() IOrder_by_exprContext
	DENSE_RANK_() antlr.TerminalNode
	RANK_() antlr.TerminalNode
	ROW_NUMBER_() antlr.TerminalNode
	LAG_() antlr.TerminalNode
	LEAD_() antlr.TerminalNode
	Offset() IOffsetContext
	Default_value() IDefault_valueContext
	NTH_VALUE_() antlr.TerminalNode
	COMMA() antlr.TerminalNode
	Signed_number() ISigned_numberContext
	NTILE_() antlr.TerminalNode

	// IsWindow_functionContext differentiates from other interfaces.
	IsWindow_functionContext()
}

type Window_functionContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyWindow_functionContext() *Window_functionContext {
	var p = new(Window_functionContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_function
	return p
}

func InitEmptyWindow_functionContext(p *Window_functionContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_function
}

func (*Window_functionContext) IsWindow_functionContext() {}

func NewWindow_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_functionContext {
	var p = new(Window_functionContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_window_function

	return p
}

func (s *Window_functionContext) GetParser() antlr.Parser { return s.parser }

func (s *Window_functionContext) AllOPEN_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserOPEN_PAR)
}

func (s *Window_functionContext) OPEN_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, i)
}

func (s *Window_functionContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Window_functionContext) AllCLOSE_PAR() []antlr.TerminalNode {
	return s.GetTokens(ParserCLOSE_PAR)
}

func (s *Window_functionContext) CLOSE_PAR(i int) antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, i)
}

func (s *Window_functionContext) OVER_() antlr.TerminalNode {
	return s.GetToken(ParserOVER_, 0)
}

func (s *Window_functionContext) Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrder_by_expr_asc_descContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrder_by_expr_asc_descContext)
}

func (s *Window_functionContext) FIRST_VALUE_() antlr.TerminalNode {
	return s.GetToken(ParserFIRST_VALUE_, 0)
}

func (s *Window_functionContext) LAST_VALUE_() antlr.TerminalNode {
	return s.GetToken(ParserLAST_VALUE_, 0)
}

func (s *Window_functionContext) Partition_by() IPartition_byContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IPartition_byContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IPartition_byContext)
}

func (s *Window_functionContext) Frame_clause() IFrame_clauseContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IFrame_clauseContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IFrame_clauseContext)
}

func (s *Window_functionContext) CUME_DIST_() antlr.TerminalNode {
	return s.GetToken(ParserCUME_DIST_, 0)
}

func (s *Window_functionContext) PERCENT_RANK_() antlr.TerminalNode {
	return s.GetToken(ParserPERCENT_RANK_, 0)
}

func (s *Window_functionContext) Order_by_expr() IOrder_by_exprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOrder_by_exprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOrder_by_exprContext)
}

func (s *Window_functionContext) DENSE_RANK_() antlr.TerminalNode {
	return s.GetToken(ParserDENSE_RANK_, 0)
}

func (s *Window_functionContext) RANK_() antlr.TerminalNode {
	return s.GetToken(ParserRANK_, 0)
}

func (s *Window_functionContext) ROW_NUMBER_() antlr.TerminalNode {
	return s.GetToken(ParserROW_NUMBER_, 0)
}

func (s *Window_functionContext) LAG_() antlr.TerminalNode {
	return s.GetToken(ParserLAG_, 0)
}

func (s *Window_functionContext) LEAD_() antlr.TerminalNode {
	return s.GetToken(ParserLEAD_, 0)
}

func (s *Window_functionContext) Offset() IOffsetContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IOffsetContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IOffsetContext)
}

func (s *Window_functionContext) Default_value() IDefault_valueContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IDefault_valueContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IDefault_valueContext)
}

func (s *Window_functionContext) NTH_VALUE_() antlr.TerminalNode {
	return s.GetToken(ParserNTH_VALUE_, 0)
}

func (s *Window_functionContext) COMMA() antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, 0)
}

func (s *Window_functionContext) Signed_number() ISigned_numberContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISigned_numberContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISigned_numberContext)
}

func (s *Window_functionContext) NTILE_() antlr.TerminalNode {
	return s.GetToken(ParserNTILE_, 0)
}

func (s *Window_functionContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Window_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Window_functionContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterWindow_function(s)
	}
}

func (s *Window_functionContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitWindow_function(s)
	}
}

func (s *Window_functionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitWindow_function(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Window_function() (localctx IWindow_functionContext) {
	localctx = NewWindow_functionContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 150, ParserRULE_window_function)
	var _la int

	p.SetState(1971)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserFIRST_VALUE_, ParserLAST_VALUE_:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(1886)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserFIRST_VALUE_ || _la == ParserLAST_VALUE_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		{
			p.SetState(1887)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1888)
			p.expr(0)
		}
		{
			p.SetState(1889)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1890)
			p.Match(ParserOVER_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1891)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1893)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserPARTITION_ {
			{
				p.SetState(1892)
				p.Partition_by()
			}

		}
		{
			p.SetState(1895)
			p.Order_by_expr_asc_desc()
		}
		p.SetState(1897)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&2251799880794113) != 0 {
			{
				p.SetState(1896)
				p.Frame_clause()
			}

		}
		{
			p.SetState(1899)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserCUME_DIST_, ParserPERCENT_RANK_:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(1901)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserCUME_DIST_ || _la == ParserPERCENT_RANK_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		{
			p.SetState(1902)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1903)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1904)
			p.Match(ParserOVER_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1905)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1907)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserPARTITION_ {
			{
				p.SetState(1906)
				p.Partition_by()
			}

		}
		p.SetState(1910)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserORDER_ {
			{
				p.SetState(1909)
				p.Order_by_expr()
			}

		}
		{
			p.SetState(1912)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserDENSE_RANK_, ParserRANK_, ParserROW_NUMBER_:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(1913)
			_la = p.GetTokenStream().LA(1)

			if !((int64((_la-160)) & ^0x3f) == 0 && ((int64(1)<<(_la-160))&385) != 0) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		{
			p.SetState(1914)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1915)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1916)
			p.Match(ParserOVER_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1917)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1919)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserPARTITION_ {
			{
				p.SetState(1918)
				p.Partition_by()
			}

		}
		{
			p.SetState(1921)
			p.Order_by_expr_asc_desc()
		}
		{
			p.SetState(1922)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserLAG_, ParserLEAD_:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(1924)
			_la = p.GetTokenStream().LA(1)

			if !(_la == ParserLAG_ || _la == ParserLEAD_) {
				p.GetErrorHandler().RecoverInline(p)
			} else {
				p.GetErrorHandler().ReportMatch(p)
				p.Consume()
			}
		}
		{
			p.SetState(1925)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1926)
			p.expr(0)
		}
		p.SetState(1928)
		p.GetErrorHandler().Sync(p)

		if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 283, p.GetParserRuleContext()) == 1 {
			{
				p.SetState(1927)
				p.Offset()
			}

		} else if p.HasError() { // JIM
			goto errorExit
		}
		p.SetState(1931)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserCOMMA {
			{
				p.SetState(1930)
				p.Default_value()
			}

		}
		{
			p.SetState(1933)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1934)
			p.Match(ParserOVER_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1935)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1937)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserPARTITION_ {
			{
				p.SetState(1936)
				p.Partition_by()
			}

		}
		{
			p.SetState(1939)
			p.Order_by_expr_asc_desc()
		}
		{
			p.SetState(1940)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserNTH_VALUE_:
		p.EnterOuterAlt(localctx, 5)
		{
			p.SetState(1942)
			p.Match(ParserNTH_VALUE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1943)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1944)
			p.expr(0)
		}
		{
			p.SetState(1945)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1946)
			p.Signed_number()
		}
		{
			p.SetState(1947)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1948)
			p.Match(ParserOVER_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1949)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1951)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserPARTITION_ {
			{
				p.SetState(1950)
				p.Partition_by()
			}

		}
		{
			p.SetState(1953)
			p.Order_by_expr_asc_desc()
		}
		p.SetState(1955)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if (int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&2251799880794113) != 0 {
			{
				p.SetState(1954)
				p.Frame_clause()
			}

		}
		{
			p.SetState(1957)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserNTILE_:
		p.EnterOuterAlt(localctx, 6)
		{
			p.SetState(1959)
			p.Match(ParserNTILE_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1960)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1961)
			p.expr(0)
		}
		{
			p.SetState(1962)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1963)
			p.Match(ParserOVER_)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(1964)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		p.SetState(1966)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserPARTITION_ {
			{
				p.SetState(1965)
				p.Partition_by()
			}

		}
		{
			p.SetState(1968)
			p.Order_by_expr_asc_desc()
		}
		{
			p.SetState(1969)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IOffsetContext is an interface to support dynamic dispatch.
type IOffsetContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	COMMA() antlr.TerminalNode
	Signed_number() ISigned_numberContext

	// IsOffsetContext differentiates from other interfaces.
	IsOffsetContext()
}

type OffsetContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyOffsetContext() *OffsetContext {
	var p = new(OffsetContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_offset
	return p
}

func InitEmptyOffsetContext(p *OffsetContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_offset
}

func (*OffsetContext) IsOffsetContext() {}

func NewOffsetContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *OffsetContext {
	var p = new(OffsetContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_offset

	return p
}

func (s *OffsetContext) GetParser() antlr.Parser { return s.parser }

func (s *OffsetContext) COMMA() antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, 0)
}

func (s *OffsetContext) Signed_number() ISigned_numberContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISigned_numberContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISigned_numberContext)
}

func (s *OffsetContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *OffsetContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *OffsetContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterOffset(s)
	}
}

func (s *OffsetContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitOffset(s)
	}
}

func (s *OffsetContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitOffset(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Offset() (localctx IOffsetContext) {
	localctx = NewOffsetContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 152, ParserRULE_offset)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1973)
		p.Match(ParserCOMMA)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1974)
		p.Signed_number()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IDefault_valueContext is an interface to support dynamic dispatch.
type IDefault_valueContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	COMMA() antlr.TerminalNode
	Signed_number() ISigned_numberContext

	// IsDefault_valueContext differentiates from other interfaces.
	IsDefault_valueContext()
}

type Default_valueContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyDefault_valueContext() *Default_valueContext {
	var p = new(Default_valueContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_default_value
	return p
}

func InitEmptyDefault_valueContext(p *Default_valueContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_default_value
}

func (*Default_valueContext) IsDefault_valueContext() {}

func NewDefault_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Default_valueContext {
	var p = new(Default_valueContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_default_value

	return p
}

func (s *Default_valueContext) GetParser() antlr.Parser { return s.parser }

func (s *Default_valueContext) COMMA() antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, 0)
}

func (s *Default_valueContext) Signed_number() ISigned_numberContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISigned_numberContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISigned_numberContext)
}

func (s *Default_valueContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Default_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Default_valueContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterDefault_value(s)
	}
}

func (s *Default_valueContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitDefault_value(s)
	}
}

func (s *Default_valueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitDefault_value(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Default_value() (localctx IDefault_valueContext) {
	localctx = NewDefault_valueContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 154, ParserRULE_default_value)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1976)
		p.Match(ParserCOMMA)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1977)
		p.Signed_number()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IPartition_byContext is an interface to support dynamic dispatch.
type IPartition_byContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	PARTITION_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext

	// IsPartition_byContext differentiates from other interfaces.
	IsPartition_byContext()
}

type Partition_byContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyPartition_byContext() *Partition_byContext {
	var p = new(Partition_byContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_partition_by
	return p
}

func InitEmptyPartition_byContext(p *Partition_byContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_partition_by
}

func (*Partition_byContext) IsPartition_byContext() {}

func NewPartition_byContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Partition_byContext {
	var p = new(Partition_byContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_partition_by

	return p
}

func (s *Partition_byContext) GetParser() antlr.Parser { return s.parser }

func (s *Partition_byContext) PARTITION_() antlr.TerminalNode {
	return s.GetToken(ParserPARTITION_, 0)
}

func (s *Partition_byContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *Partition_byContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Partition_byContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Partition_byContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Partition_byContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Partition_byContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterPartition_by(s)
	}
}

func (s *Partition_byContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitPartition_by(s)
	}
}

func (s *Partition_byContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitPartition_by(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Partition_by() (localctx IPartition_byContext) {
	localctx = NewPartition_byContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 156, ParserRULE_partition_by)
	var _alt int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1979)
		p.Match(ParserPARTITION_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1980)
		p.Match(ParserBY_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1982)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_alt = 1
	for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
		switch _alt {
		case 1:
			{
				p.SetState(1981)
				p.expr(0)
			}

		default:
			p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
			goto errorExit
		}

		p.SetState(1984)
		p.GetErrorHandler().Sync(p)
		_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 290, p.GetParserRuleContext())
		if p.HasError() {
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IOrder_by_exprContext is an interface to support dynamic dispatch.
type IOrder_by_exprContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ORDER_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	AllExpr() []IExprContext
	Expr(i int) IExprContext

	// IsOrder_by_exprContext differentiates from other interfaces.
	IsOrder_by_exprContext()
}

type Order_by_exprContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyOrder_by_exprContext() *Order_by_exprContext {
	var p = new(Order_by_exprContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_order_by_expr
	return p
}

func InitEmptyOrder_by_exprContext(p *Order_by_exprContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_order_by_expr
}

func (*Order_by_exprContext) IsOrder_by_exprContext() {}

func NewOrder_by_exprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_exprContext {
	var p = new(Order_by_exprContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_order_by_expr

	return p
}

func (s *Order_by_exprContext) GetParser() antlr.Parser { return s.parser }

func (s *Order_by_exprContext) ORDER_() antlr.TerminalNode {
	return s.GetToken(ParserORDER_, 0)
}

func (s *Order_by_exprContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *Order_by_exprContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Order_by_exprContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Order_by_exprContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Order_by_exprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Order_by_exprContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterOrder_by_expr(s)
	}
}

func (s *Order_by_exprContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitOrder_by_expr(s)
	}
}

func (s *Order_by_exprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitOrder_by_expr(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Order_by_expr() (localctx IOrder_by_exprContext) {
	localctx = NewOrder_by_exprContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 158, ParserRULE_order_by_expr)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1986)
		p.Match(ParserORDER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1987)
		p.Match(ParserBY_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	p.SetState(1989)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for ok := true; ok; ok = ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-33552632) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1152921504606846977) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&4476578029606273023) != 0) {
		{
			p.SetState(1988)
			p.expr(0)
		}

		p.SetState(1991)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IOrder_by_expr_asc_descContext is an interface to support dynamic dispatch.
type IOrder_by_expr_asc_descContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ORDER_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	Expr_asc_desc() IExpr_asc_descContext

	// IsOrder_by_expr_asc_descContext differentiates from other interfaces.
	IsOrder_by_expr_asc_descContext()
}

type Order_by_expr_asc_descContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyOrder_by_expr_asc_descContext() *Order_by_expr_asc_descContext {
	var p = new(Order_by_expr_asc_descContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_order_by_expr_asc_desc
	return p
}

func InitEmptyOrder_by_expr_asc_descContext(p *Order_by_expr_asc_descContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_order_by_expr_asc_desc
}

func (*Order_by_expr_asc_descContext) IsOrder_by_expr_asc_descContext() {}

func NewOrder_by_expr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_expr_asc_descContext {
	var p = new(Order_by_expr_asc_descContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_order_by_expr_asc_desc

	return p
}

func (s *Order_by_expr_asc_descContext) GetParser() antlr.Parser { return s.parser }

func (s *Order_by_expr_asc_descContext) ORDER_() antlr.TerminalNode {
	return s.GetToken(ParserORDER_, 0)
}

func (s *Order_by_expr_asc_descContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *Order_by_expr_asc_descContext) Expr_asc_desc() IExpr_asc_descContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExpr_asc_descContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExpr_asc_descContext)
}

func (s *Order_by_expr_asc_descContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Order_by_expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Order_by_expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterOrder_by_expr_asc_desc(s)
	}
}

func (s *Order_by_expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitOrder_by_expr_asc_desc(s)
	}
}

func (s *Order_by_expr_asc_descContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitOrder_by_expr_asc_desc(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Order_by_expr_asc_desc() (localctx IOrder_by_expr_asc_descContext) {
	localctx = NewOrder_by_expr_asc_descContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 160, ParserRULE_order_by_expr_asc_desc)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1993)
		p.Match(ParserORDER_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1994)
		p.Match(ParserBY_)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}
	{
		p.SetState(1995)
		p.Expr_asc_desc()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IExpr_asc_descContext is an interface to support dynamic dispatch.
type IExpr_asc_descContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	AllExpr() []IExprContext
	Expr(i int) IExprContext
	AllAsc_desc() []IAsc_descContext
	Asc_desc(i int) IAsc_descContext
	AllCOMMA() []antlr.TerminalNode
	COMMA(i int) antlr.TerminalNode

	// IsExpr_asc_descContext differentiates from other interfaces.
	IsExpr_asc_descContext()
}

type Expr_asc_descContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyExpr_asc_descContext() *Expr_asc_descContext {
	var p = new(Expr_asc_descContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_expr_asc_desc
	return p
}

func InitEmptyExpr_asc_descContext(p *Expr_asc_descContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_expr_asc_desc
}

func (*Expr_asc_descContext) IsExpr_asc_descContext() {}

func NewExpr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Expr_asc_descContext {
	var p = new(Expr_asc_descContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_expr_asc_desc

	return p
}

func (s *Expr_asc_descContext) GetParser() antlr.Parser { return s.parser }

func (s *Expr_asc_descContext) AllExpr() []IExprContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IExprContext); ok {
			len++
		}
	}

	tst := make([]IExprContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IExprContext); ok {
			tst[i] = t.(IExprContext)
			i++
		}
	}

	return tst
}

func (s *Expr_asc_descContext) Expr(i int) IExprContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Expr_asc_descContext) AllAsc_desc() []IAsc_descContext {
	children := s.GetChildren()
	len := 0
	for _, ctx := range children {
		if _, ok := ctx.(IAsc_descContext); ok {
			len++
		}
	}

	tst := make([]IAsc_descContext, len)
	i := 0
	for _, ctx := range children {
		if t, ok := ctx.(IAsc_descContext); ok {
			tst[i] = t.(IAsc_descContext)
			i++
		}
	}

	return tst
}

func (s *Expr_asc_descContext) Asc_desc(i int) IAsc_descContext {
	var t antlr.RuleContext
	j := 0
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAsc_descContext); ok {
			if j == i {
				t = ctx.(antlr.RuleContext)
				break
			}
			j++
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAsc_descContext)
}

func (s *Expr_asc_descContext) AllCOMMA() []antlr.TerminalNode {
	return s.GetTokens(ParserCOMMA)
}

func (s *Expr_asc_descContext) COMMA(i int) antlr.TerminalNode {
	return s.GetToken(ParserCOMMA, i)
}

func (s *Expr_asc_descContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterExpr_asc_desc(s)
	}
}

func (s *Expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitExpr_asc_desc(s)
	}
}

func (s *Expr_asc_descContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitExpr_asc_desc(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Expr_asc_desc() (localctx IExpr_asc_descContext) {
	localctx = NewExpr_asc_descContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 162, ParserRULE_expr_asc_desc)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(1997)
		p.expr(0)
	}
	p.SetState(1999)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	if _la == ParserASC_ || _la == ParserDESC_ {
		{
			p.SetState(1998)
			p.Asc_desc()
		}

	}
	p.SetState(2008)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}
	_la = p.GetTokenStream().LA(1)

	for _la == ParserCOMMA {
		{
			p.SetState(2001)
			p.Match(ParserCOMMA)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(2002)
			p.expr(0)
		}
		p.SetState(2004)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)

		if _la == ParserASC_ || _la == ParserDESC_ {
			{
				p.SetState(2003)
				p.Asc_desc()
			}

		}

		p.SetState(2010)
		p.GetErrorHandler().Sync(p)
		if p.HasError() {
			goto errorExit
		}
		_la = p.GetTokenStream().LA(1)
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IInitial_selectContext is an interface to support dynamic dispatch.
type IInitial_selectContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Select_stmt() ISelect_stmtContext

	// IsInitial_selectContext differentiates from other interfaces.
	IsInitial_selectContext()
}

type Initial_selectContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyInitial_selectContext() *Initial_selectContext {
	var p = new(Initial_selectContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_initial_select
	return p
}

func InitEmptyInitial_selectContext(p *Initial_selectContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_initial_select
}

func (*Initial_selectContext) IsInitial_selectContext() {}

func NewInitial_selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Initial_selectContext {
	var p = new(Initial_selectContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_initial_select

	return p
}

func (s *Initial_selectContext) GetParser() antlr.Parser { return s.parser }

func (s *Initial_selectContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Initial_selectContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Initial_selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Initial_selectContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterInitial_select(s)
	}
}

func (s *Initial_selectContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitInitial_select(s)
	}
}

func (s *Initial_selectContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitInitial_select(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Initial_select() (localctx IInitial_selectContext) {
	localctx = NewInitial_selectContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 164, ParserRULE_initial_select)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2011)
		p.Select_stmt()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IRecursive_selectContext is an interface to support dynamic dispatch.
type IRecursive_selectContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Select_stmt() ISelect_stmtContext

	// IsRecursive_selectContext differentiates from other interfaces.
	IsRecursive_selectContext()
}

type Recursive_selectContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyRecursive_selectContext() *Recursive_selectContext {
	var p = new(Recursive_selectContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_recursive_select
	return p
}

func InitEmptyRecursive_selectContext(p *Recursive_selectContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_recursive_select
}

func (*Recursive_selectContext) IsRecursive_selectContext() {}

func NewRecursive_selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive_selectContext {
	var p = new(Recursive_selectContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_recursive_select

	return p
}

func (s *Recursive_selectContext) GetParser() antlr.Parser { return s.parser }

func (s *Recursive_selectContext) Select_stmt() ISelect_stmtContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(ISelect_stmtContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(ISelect_stmtContext)
}

func (s *Recursive_selectContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Recursive_selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Recursive_selectContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterRecursive_select(s)
	}
}

func (s *Recursive_selectContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitRecursive_select(s)
	}
}

func (s *Recursive_selectContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitRecursive_select(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Recursive_select() (localctx IRecursive_selectContext) {
	localctx = NewRecursive_selectContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 166, ParserRULE_recursive_select)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2013)
		p.Select_stmt()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IUnary_operatorContext is an interface to support dynamic dispatch.
type IUnary_operatorContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	MINUS() antlr.TerminalNode
	PLUS() antlr.TerminalNode
	TILDE() antlr.TerminalNode
	NOT_() antlr.TerminalNode

	// IsUnary_operatorContext differentiates from other interfaces.
	IsUnary_operatorContext()
}

type Unary_operatorContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyUnary_operatorContext() *Unary_operatorContext {
	var p = new(Unary_operatorContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_unary_operator
	return p
}

func InitEmptyUnary_operatorContext(p *Unary_operatorContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_unary_operator
}

func (*Unary_operatorContext) IsUnary_operatorContext() {}

func NewUnary_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Unary_operatorContext {
	var p = new(Unary_operatorContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_unary_operator

	return p
}

func (s *Unary_operatorContext) GetParser() antlr.Parser { return s.parser }

func (s *Unary_operatorContext) MINUS() antlr.TerminalNode {
	return s.GetToken(ParserMINUS, 0)
}

func (s *Unary_operatorContext) PLUS() antlr.TerminalNode {
	return s.GetToken(ParserPLUS, 0)
}

func (s *Unary_operatorContext) TILDE() antlr.TerminalNode {
	return s.GetToken(ParserTILDE, 0)
}

func (s *Unary_operatorContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *Unary_operatorContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Unary_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Unary_operatorContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterUnary_operator(s)
	}
}

func (s *Unary_operatorContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitUnary_operator(s)
	}
}

func (s *Unary_operatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitUnary_operator(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Unary_operator() (localctx IUnary_operatorContext) {
	localctx = NewUnary_operatorContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 168, ParserRULE_unary_operator)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2015)
		_la = p.GetTokenStream().LA(1)

		if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1792) != 0) || _la == ParserNOT_) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IError_messageContext is an interface to support dynamic dispatch.
type IError_messageContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	STRING_LITERAL() antlr.TerminalNode

	// IsError_messageContext differentiates from other interfaces.
	IsError_messageContext()
}

type Error_messageContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyError_messageContext() *Error_messageContext {
	var p = new(Error_messageContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_error_message
	return p
}

func InitEmptyError_messageContext(p *Error_messageContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_error_message
}

func (*Error_messageContext) IsError_messageContext() {}

func NewError_messageContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Error_messageContext {
	var p = new(Error_messageContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_error_message

	return p
}

func (s *Error_messageContext) GetParser() antlr.Parser { return s.parser }

func (s *Error_messageContext) STRING_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserSTRING_LITERAL, 0)
}

func (s *Error_messageContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Error_messageContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Error_messageContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterError_message(s)
	}
}

func (s *Error_messageContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitError_message(s)
	}
}

func (s *Error_messageContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitError_message(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Error_message() (localctx IError_messageContext) {
	localctx = NewError_messageContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 170, ParserRULE_error_message)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2017)
		p.Match(ParserSTRING_LITERAL)
		if p.HasError() {
			// Recognition error - abort rule
			goto errorExit
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IModule_argumentContext is an interface to support dynamic dispatch.
type IModule_argumentContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Expr() IExprContext
	Column_def() IColumn_defContext

	// IsModule_argumentContext differentiates from other interfaces.
	IsModule_argumentContext()
}

type Module_argumentContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyModule_argumentContext() *Module_argumentContext {
	var p = new(Module_argumentContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_module_argument
	return p
}

func InitEmptyModule_argumentContext(p *Module_argumentContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_module_argument
}

func (*Module_argumentContext) IsModule_argumentContext() {}

func NewModule_argumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_argumentContext {
	var p = new(Module_argumentContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_module_argument

	return p
}

func (s *Module_argumentContext) GetParser() antlr.Parser { return s.parser }

func (s *Module_argumentContext) Expr() IExprContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IExprContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IExprContext)
}

func (s *Module_argumentContext) Column_def() IColumn_defContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IColumn_defContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IColumn_defContext)
}

func (s *Module_argumentContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Module_argumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Module_argumentContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterModule_argument(s)
	}
}

func (s *Module_argumentContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitModule_argument(s)
	}
}

func (s *Module_argumentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitModule_argument(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Module_argument() (localctx IModule_argumentContext) {
	localctx = NewModule_argumentContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 172, ParserRULE_module_argument)
	p.SetState(2021)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 295, p.GetParserRuleContext()) {
	case 1:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(2019)
			p.expr(0)
		}

	case 2:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(2020)
			p.Column_def()
		}

	case antlr.ATNInvalidAltNumber:
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IColumn_aliasContext is an interface to support dynamic dispatch.
type IColumn_aliasContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	IDENTIFIER() antlr.TerminalNode
	STRING_LITERAL() antlr.TerminalNode

	// IsColumn_aliasContext differentiates from other interfaces.
	IsColumn_aliasContext()
}

type Column_aliasContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyColumn_aliasContext() *Column_aliasContext {
	var p = new(Column_aliasContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_alias
	return p
}

func InitEmptyColumn_aliasContext(p *Column_aliasContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_alias
}

func (*Column_aliasContext) IsColumn_aliasContext() {}

func NewColumn_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_aliasContext {
	var p = new(Column_aliasContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_column_alias

	return p
}

func (s *Column_aliasContext) GetParser() antlr.Parser { return s.parser }

func (s *Column_aliasContext) IDENTIFIER() antlr.TerminalNode {
	return s.GetToken(ParserIDENTIFIER, 0)
}

func (s *Column_aliasContext) STRING_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserSTRING_LITERAL, 0)
}

func (s *Column_aliasContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Column_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Column_aliasContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterColumn_alias(s)
	}
}

func (s *Column_aliasContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitColumn_alias(s)
	}
}

func (s *Column_aliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitColumn_alias(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Column_alias() (localctx IColumn_aliasContext) {
	localctx = NewColumn_aliasContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 174, ParserRULE_column_alias)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2023)
		_la = p.GetTokenStream().LA(1)

		if !(_la == ParserIDENTIFIER || _la == ParserSTRING_LITERAL) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IKeywordContext is an interface to support dynamic dispatch.
type IKeywordContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	ABORT_() antlr.TerminalNode
	ACTION_() antlr.TerminalNode
	ADD_() antlr.TerminalNode
	AFTER_() antlr.TerminalNode
	ALL_() antlr.TerminalNode
	ALTER_() antlr.TerminalNode
	ANALYZE_() antlr.TerminalNode
	AND_() antlr.TerminalNode
	AS_() antlr.TerminalNode
	ASC_() antlr.TerminalNode
	ATTACH_() antlr.TerminalNode
	AUTOINCREMENT_() antlr.TerminalNode
	BEFORE_() antlr.TerminalNode
	BEGIN_() antlr.TerminalNode
	BETWEEN_() antlr.TerminalNode
	BY_() antlr.TerminalNode
	CASCADE_() antlr.TerminalNode
	CASE_() antlr.TerminalNode
	CAST_() antlr.TerminalNode
	CHECK_() antlr.TerminalNode
	COLLATE_() antlr.TerminalNode
	COLUMN_() antlr.TerminalNode
	COMMIT_() antlr.TerminalNode
	CONFLICT_() antlr.TerminalNode
	CONSTRAINT_() antlr.TerminalNode
	CREATE_() antlr.TerminalNode
	CROSS_() antlr.TerminalNode
	CURRENT_DATE_() antlr.TerminalNode
	CURRENT_TIME_() antlr.TerminalNode
	CURRENT_TIMESTAMP_() antlr.TerminalNode
	DATABASE_() antlr.TerminalNode
	DEFAULT_() antlr.TerminalNode
	DEFERRABLE_() antlr.TerminalNode
	DEFERRED_() antlr.TerminalNode
	DELETE_() antlr.TerminalNode
	DESC_() antlr.TerminalNode
	DETACH_() antlr.TerminalNode
	DISTINCT_() antlr.TerminalNode
	DROP_() antlr.TerminalNode
	EACH_() antlr.TerminalNode
	ELSE_() antlr.TerminalNode
	END_() antlr.TerminalNode
	ESCAPE_() antlr.TerminalNode
	EXCEPT_() antlr.TerminalNode
	EXCLUSIVE_() antlr.TerminalNode
	EXISTS_() antlr.TerminalNode
	EXPLAIN_() antlr.TerminalNode
	FAIL_() antlr.TerminalNode
	FOR_() antlr.TerminalNode
	FOREIGN_() antlr.TerminalNode
	FROM_() antlr.TerminalNode
	FULL_() antlr.TerminalNode
	GLOB_() antlr.TerminalNode
	GROUP_() antlr.TerminalNode
	HAVING_() antlr.TerminalNode
	IF_() antlr.TerminalNode
	IGNORE_() antlr.TerminalNode
	IMMEDIATE_() antlr.TerminalNode
	IN_() antlr.TerminalNode
	INDEX_() antlr.TerminalNode
	INDEXED_() antlr.TerminalNode
	INITIALLY_() antlr.TerminalNode
	INNER_() antlr.TerminalNode
	INSERT_() antlr.TerminalNode
	INSTEAD_() antlr.TerminalNode
	INTERSECT_() antlr.TerminalNode
	INTO_() antlr.TerminalNode
	IS_() antlr.TerminalNode
	ISNULL_() antlr.TerminalNode
	JOIN_() antlr.TerminalNode
	KEY_() antlr.TerminalNode
	LEFT_() antlr.TerminalNode
	LIKE_() antlr.TerminalNode
	LIMIT_() antlr.TerminalNode
	MATCH_() antlr.TerminalNode
	NATURAL_() antlr.TerminalNode
	NO_() antlr.TerminalNode
	NOT_() antlr.TerminalNode
	NOTNULL_() antlr.TerminalNode
	NULL_() antlr.TerminalNode
	OF_() antlr.TerminalNode
	OFFSET_() antlr.TerminalNode
	ON_() antlr.TerminalNode
	OR_() antlr.TerminalNode
	ORDER_() antlr.TerminalNode
	OUTER_() antlr.TerminalNode
	PLAN_() antlr.TerminalNode
	PRAGMA_() antlr.TerminalNode
	PRIMARY_() antlr.TerminalNode
	QUERY_() antlr.TerminalNode
	RAISE_() antlr.TerminalNode
	RECURSIVE_() antlr.TerminalNode
	REFERENCES_() antlr.TerminalNode
	REGEXP_() antlr.TerminalNode
	REINDEX_() antlr.TerminalNode
	RELEASE_() antlr.TerminalNode
	RENAME_() antlr.TerminalNode
	REPLACE_() antlr.TerminalNode
	RESTRICT_() antlr.TerminalNode
	RIGHT_() antlr.TerminalNode
	ROLLBACK_() antlr.TerminalNode
	ROW_() antlr.TerminalNode
	ROWS_() antlr.TerminalNode
	SAVEPOINT_() antlr.TerminalNode
	SELECT_() antlr.TerminalNode
	SET_() antlr.TerminalNode
	TABLE_() antlr.TerminalNode
	TEMP_() antlr.TerminalNode
	TEMPORARY_() antlr.TerminalNode
	THEN_() antlr.TerminalNode
	TO_() antlr.TerminalNode
	TRANSACTION_() antlr.TerminalNode
	TRIGGER_() antlr.TerminalNode
	UNION_() antlr.TerminalNode
	UNIQUE_() antlr.TerminalNode
	UPDATE_() antlr.TerminalNode
	USING_() antlr.TerminalNode
	VACUUM_() antlr.TerminalNode
	VALUES_() antlr.TerminalNode
	VIEW_() antlr.TerminalNode
	VIRTUAL_() antlr.TerminalNode
	WHEN_() antlr.TerminalNode
	WHERE_() antlr.TerminalNode
	WITH_() antlr.TerminalNode
	WITHOUT_() antlr.TerminalNode
	FIRST_VALUE_() antlr.TerminalNode
	OVER_() antlr.TerminalNode
	PARTITION_() antlr.TerminalNode
	RANGE_() antlr.TerminalNode
	PRECEDING_() antlr.TerminalNode
	UNBOUNDED_() antlr.TerminalNode
	CURRENT_() antlr.TerminalNode
	FOLLOWING_() antlr.TerminalNode
	CUME_DIST_() antlr.TerminalNode
	DENSE_RANK_() antlr.TerminalNode
	LAG_() antlr.TerminalNode
	LAST_VALUE_() antlr.TerminalNode
	LEAD_() antlr.TerminalNode
	NTH_VALUE_() antlr.TerminalNode
	NTILE_() antlr.TerminalNode
	PERCENT_RANK_() antlr.TerminalNode
	RANK_() antlr.TerminalNode
	ROW_NUMBER_() antlr.TerminalNode
	GENERATED_() antlr.TerminalNode
	ALWAYS_() antlr.TerminalNode
	STORED_() antlr.TerminalNode
	TRUE_() antlr.TerminalNode
	FALSE_() antlr.TerminalNode
	WINDOW_() antlr.TerminalNode
	NULLS_() antlr.TerminalNode
	FIRST_() antlr.TerminalNode
	LAST_() antlr.TerminalNode
	FILTER_() antlr.TerminalNode
	GROUPS_() antlr.TerminalNode
	EXCLUDE_() antlr.TerminalNode

	// IsKeywordContext differentiates from other interfaces.
	IsKeywordContext()
}

type KeywordContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyKeywordContext() *KeywordContext {
	var p = new(KeywordContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_keyword
	return p
}

func InitEmptyKeywordContext(p *KeywordContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_keyword
}

func (*KeywordContext) IsKeywordContext() {}

func NewKeywordContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *KeywordContext {
	var p = new(KeywordContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_keyword

	return p
}

func (s *KeywordContext) GetParser() antlr.Parser { return s.parser }

func (s *KeywordContext) ABORT_() antlr.TerminalNode {
	return s.GetToken(ParserABORT_, 0)
}

func (s *KeywordContext) ACTION_() antlr.TerminalNode {
	return s.GetToken(ParserACTION_, 0)
}

func (s *KeywordContext) ADD_() antlr.TerminalNode {
	return s.GetToken(ParserADD_, 0)
}

func (s *KeywordContext) AFTER_() antlr.TerminalNode {
	return s.GetToken(ParserAFTER_, 0)
}

func (s *KeywordContext) ALL_() antlr.TerminalNode {
	return s.GetToken(ParserALL_, 0)
}

func (s *KeywordContext) ALTER_() antlr.TerminalNode {
	return s.GetToken(ParserALTER_, 0)
}

func (s *KeywordContext) ANALYZE_() antlr.TerminalNode {
	return s.GetToken(ParserANALYZE_, 0)
}

func (s *KeywordContext) AND_() antlr.TerminalNode {
	return s.GetToken(ParserAND_, 0)
}

func (s *KeywordContext) AS_() antlr.TerminalNode {
	return s.GetToken(ParserAS_, 0)
}

func (s *KeywordContext) ASC_() antlr.TerminalNode {
	return s.GetToken(ParserASC_, 0)
}

func (s *KeywordContext) ATTACH_() antlr.TerminalNode {
	return s.GetToken(ParserATTACH_, 0)
}

func (s *KeywordContext) AUTOINCREMENT_() antlr.TerminalNode {
	return s.GetToken(ParserAUTOINCREMENT_, 0)
}

func (s *KeywordContext) BEFORE_() antlr.TerminalNode {
	return s.GetToken(ParserBEFORE_, 0)
}

func (s *KeywordContext) BEGIN_() antlr.TerminalNode {
	return s.GetToken(ParserBEGIN_, 0)
}

func (s *KeywordContext) BETWEEN_() antlr.TerminalNode {
	return s.GetToken(ParserBETWEEN_, 0)
}

func (s *KeywordContext) BY_() antlr.TerminalNode {
	return s.GetToken(ParserBY_, 0)
}

func (s *KeywordContext) CASCADE_() antlr.TerminalNode {
	return s.GetToken(ParserCASCADE_, 0)
}

func (s *KeywordContext) CASE_() antlr.TerminalNode {
	return s.GetToken(ParserCASE_, 0)
}

func (s *KeywordContext) CAST_() antlr.TerminalNode {
	return s.GetToken(ParserCAST_, 0)
}

func (s *KeywordContext) CHECK_() antlr.TerminalNode {
	return s.GetToken(ParserCHECK_, 0)
}

func (s *KeywordContext) COLLATE_() antlr.TerminalNode {
	return s.GetToken(ParserCOLLATE_, 0)
}

func (s *KeywordContext) COLUMN_() antlr.TerminalNode {
	return s.GetToken(ParserCOLUMN_, 0)
}

func (s *KeywordContext) COMMIT_() antlr.TerminalNode {
	return s.GetToken(ParserCOMMIT_, 0)
}

func (s *KeywordContext) CONFLICT_() antlr.TerminalNode {
	return s.GetToken(ParserCONFLICT_, 0)
}

func (s *KeywordContext) CONSTRAINT_() antlr.TerminalNode {
	return s.GetToken(ParserCONSTRAINT_, 0)
}

func (s *KeywordContext) CREATE_() antlr.TerminalNode {
	return s.GetToken(ParserCREATE_, 0)
}

func (s *KeywordContext) CROSS_() antlr.TerminalNode {
	return s.GetToken(ParserCROSS_, 0)
}

func (s *KeywordContext) CURRENT_DATE_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_DATE_, 0)
}

func (s *KeywordContext) CURRENT_TIME_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_TIME_, 0)
}

func (s *KeywordContext) CURRENT_TIMESTAMP_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_TIMESTAMP_, 0)
}

func (s *KeywordContext) DATABASE_() antlr.TerminalNode {
	return s.GetToken(ParserDATABASE_, 0)
}

func (s *KeywordContext) DEFAULT_() antlr.TerminalNode {
	return s.GetToken(ParserDEFAULT_, 0)
}

func (s *KeywordContext) DEFERRABLE_() antlr.TerminalNode {
	return s.GetToken(ParserDEFERRABLE_, 0)
}

func (s *KeywordContext) DEFERRED_() antlr.TerminalNode {
	return s.GetToken(ParserDEFERRED_, 0)
}

func (s *KeywordContext) DELETE_() antlr.TerminalNode {
	return s.GetToken(ParserDELETE_, 0)
}

func (s *KeywordContext) DESC_() antlr.TerminalNode {
	return s.GetToken(ParserDESC_, 0)
}

func (s *KeywordContext) DETACH_() antlr.TerminalNode {
	return s.GetToken(ParserDETACH_, 0)
}

func (s *KeywordContext) DISTINCT_() antlr.TerminalNode {
	return s.GetToken(ParserDISTINCT_, 0)
}

func (s *KeywordContext) DROP_() antlr.TerminalNode {
	return s.GetToken(ParserDROP_, 0)
}

func (s *KeywordContext) EACH_() antlr.TerminalNode {
	return s.GetToken(ParserEACH_, 0)
}

func (s *KeywordContext) ELSE_() antlr.TerminalNode {
	return s.GetToken(ParserELSE_, 0)
}

func (s *KeywordContext) END_() antlr.TerminalNode {
	return s.GetToken(ParserEND_, 0)
}

func (s *KeywordContext) ESCAPE_() antlr.TerminalNode {
	return s.GetToken(ParserESCAPE_, 0)
}

func (s *KeywordContext) EXCEPT_() antlr.TerminalNode {
	return s.GetToken(ParserEXCEPT_, 0)
}

func (s *KeywordContext) EXCLUSIVE_() antlr.TerminalNode {
	return s.GetToken(ParserEXCLUSIVE_, 0)
}

func (s *KeywordContext) EXISTS_() antlr.TerminalNode {
	return s.GetToken(ParserEXISTS_, 0)
}

func (s *KeywordContext) EXPLAIN_() antlr.TerminalNode {
	return s.GetToken(ParserEXPLAIN_, 0)
}

func (s *KeywordContext) FAIL_() antlr.TerminalNode {
	return s.GetToken(ParserFAIL_, 0)
}

func (s *KeywordContext) FOR_() antlr.TerminalNode {
	return s.GetToken(ParserFOR_, 0)
}

func (s *KeywordContext) FOREIGN_() antlr.TerminalNode {
	return s.GetToken(ParserFOREIGN_, 0)
}

func (s *KeywordContext) FROM_() antlr.TerminalNode {
	return s.GetToken(ParserFROM_, 0)
}

func (s *KeywordContext) FULL_() antlr.TerminalNode {
	return s.GetToken(ParserFULL_, 0)
}

func (s *KeywordContext) GLOB_() antlr.TerminalNode {
	return s.GetToken(ParserGLOB_, 0)
}

func (s *KeywordContext) GROUP_() antlr.TerminalNode {
	return s.GetToken(ParserGROUP_, 0)
}

func (s *KeywordContext) HAVING_() antlr.TerminalNode {
	return s.GetToken(ParserHAVING_, 0)
}

func (s *KeywordContext) IF_() antlr.TerminalNode {
	return s.GetToken(ParserIF_, 0)
}

func (s *KeywordContext) IGNORE_() antlr.TerminalNode {
	return s.GetToken(ParserIGNORE_, 0)
}

func (s *KeywordContext) IMMEDIATE_() antlr.TerminalNode {
	return s.GetToken(ParserIMMEDIATE_, 0)
}

func (s *KeywordContext) IN_() antlr.TerminalNode {
	return s.GetToken(ParserIN_, 0)
}

func (s *KeywordContext) INDEX_() antlr.TerminalNode {
	return s.GetToken(ParserINDEX_, 0)
}

func (s *KeywordContext) INDEXED_() antlr.TerminalNode {
	return s.GetToken(ParserINDEXED_, 0)
}

func (s *KeywordContext) INITIALLY_() antlr.TerminalNode {
	return s.GetToken(ParserINITIALLY_, 0)
}

func (s *KeywordContext) INNER_() antlr.TerminalNode {
	return s.GetToken(ParserINNER_, 0)
}

func (s *KeywordContext) INSERT_() antlr.TerminalNode {
	return s.GetToken(ParserINSERT_, 0)
}

func (s *KeywordContext) INSTEAD_() antlr.TerminalNode {
	return s.GetToken(ParserINSTEAD_, 0)
}

func (s *KeywordContext) INTERSECT_() antlr.TerminalNode {
	return s.GetToken(ParserINTERSECT_, 0)
}

func (s *KeywordContext) INTO_() antlr.TerminalNode {
	return s.GetToken(ParserINTO_, 0)
}

func (s *KeywordContext) IS_() antlr.TerminalNode {
	return s.GetToken(ParserIS_, 0)
}

func (s *KeywordContext) ISNULL_() antlr.TerminalNode {
	return s.GetToken(ParserISNULL_, 0)
}

func (s *KeywordContext) JOIN_() antlr.TerminalNode {
	return s.GetToken(ParserJOIN_, 0)
}

func (s *KeywordContext) KEY_() antlr.TerminalNode {
	return s.GetToken(ParserKEY_, 0)
}

func (s *KeywordContext) LEFT_() antlr.TerminalNode {
	return s.GetToken(ParserLEFT_, 0)
}

func (s *KeywordContext) LIKE_() antlr.TerminalNode {
	return s.GetToken(ParserLIKE_, 0)
}

func (s *KeywordContext) LIMIT_() antlr.TerminalNode {
	return s.GetToken(ParserLIMIT_, 0)
}

func (s *KeywordContext) MATCH_() antlr.TerminalNode {
	return s.GetToken(ParserMATCH_, 0)
}

func (s *KeywordContext) NATURAL_() antlr.TerminalNode {
	return s.GetToken(ParserNATURAL_, 0)
}

func (s *KeywordContext) NO_() antlr.TerminalNode {
	return s.GetToken(ParserNO_, 0)
}

func (s *KeywordContext) NOT_() antlr.TerminalNode {
	return s.GetToken(ParserNOT_, 0)
}

func (s *KeywordContext) NOTNULL_() antlr.TerminalNode {
	return s.GetToken(ParserNOTNULL_, 0)
}

func (s *KeywordContext) NULL_() antlr.TerminalNode {
	return s.GetToken(ParserNULL_, 0)
}

func (s *KeywordContext) OF_() antlr.TerminalNode {
	return s.GetToken(ParserOF_, 0)
}

func (s *KeywordContext) OFFSET_() antlr.TerminalNode {
	return s.GetToken(ParserOFFSET_, 0)
}

func (s *KeywordContext) ON_() antlr.TerminalNode {
	return s.GetToken(ParserON_, 0)
}

func (s *KeywordContext) OR_() antlr.TerminalNode {
	return s.GetToken(ParserOR_, 0)
}

func (s *KeywordContext) ORDER_() antlr.TerminalNode {
	return s.GetToken(ParserORDER_, 0)
}

func (s *KeywordContext) OUTER_() antlr.TerminalNode {
	return s.GetToken(ParserOUTER_, 0)
}

func (s *KeywordContext) PLAN_() antlr.TerminalNode {
	return s.GetToken(ParserPLAN_, 0)
}

func (s *KeywordContext) PRAGMA_() antlr.TerminalNode {
	return s.GetToken(ParserPRAGMA_, 0)
}

func (s *KeywordContext) PRIMARY_() antlr.TerminalNode {
	return s.GetToken(ParserPRIMARY_, 0)
}

func (s *KeywordContext) QUERY_() antlr.TerminalNode {
	return s.GetToken(ParserQUERY_, 0)
}

func (s *KeywordContext) RAISE_() antlr.TerminalNode {
	return s.GetToken(ParserRAISE_, 0)
}

func (s *KeywordContext) RECURSIVE_() antlr.TerminalNode {
	return s.GetToken(ParserRECURSIVE_, 0)
}

func (s *KeywordContext) REFERENCES_() antlr.TerminalNode {
	return s.GetToken(ParserREFERENCES_, 0)
}

func (s *KeywordContext) REGEXP_() antlr.TerminalNode {
	return s.GetToken(ParserREGEXP_, 0)
}

func (s *KeywordContext) REINDEX_() antlr.TerminalNode {
	return s.GetToken(ParserREINDEX_, 0)
}

func (s *KeywordContext) RELEASE_() antlr.TerminalNode {
	return s.GetToken(ParserRELEASE_, 0)
}

func (s *KeywordContext) RENAME_() antlr.TerminalNode {
	return s.GetToken(ParserRENAME_, 0)
}

func (s *KeywordContext) REPLACE_() antlr.TerminalNode {
	return s.GetToken(ParserREPLACE_, 0)
}

func (s *KeywordContext) RESTRICT_() antlr.TerminalNode {
	return s.GetToken(ParserRESTRICT_, 0)
}

func (s *KeywordContext) RIGHT_() antlr.TerminalNode {
	return s.GetToken(ParserRIGHT_, 0)
}

func (s *KeywordContext) ROLLBACK_() antlr.TerminalNode {
	return s.GetToken(ParserROLLBACK_, 0)
}

func (s *KeywordContext) ROW_() antlr.TerminalNode {
	return s.GetToken(ParserROW_, 0)
}

func (s *KeywordContext) ROWS_() antlr.TerminalNode {
	return s.GetToken(ParserROWS_, 0)
}

func (s *KeywordContext) SAVEPOINT_() antlr.TerminalNode {
	return s.GetToken(ParserSAVEPOINT_, 0)
}

func (s *KeywordContext) SELECT_() antlr.TerminalNode {
	return s.GetToken(ParserSELECT_, 0)
}

func (s *KeywordContext) SET_() antlr.TerminalNode {
	return s.GetToken(ParserSET_, 0)
}

func (s *KeywordContext) TABLE_() antlr.TerminalNode {
	return s.GetToken(ParserTABLE_, 0)
}

func (s *KeywordContext) TEMP_() antlr.TerminalNode {
	return s.GetToken(ParserTEMP_, 0)
}

func (s *KeywordContext) TEMPORARY_() antlr.TerminalNode {
	return s.GetToken(ParserTEMPORARY_, 0)
}

func (s *KeywordContext) THEN_() antlr.TerminalNode {
	return s.GetToken(ParserTHEN_, 0)
}

func (s *KeywordContext) TO_() antlr.TerminalNode {
	return s.GetToken(ParserTO_, 0)
}

func (s *KeywordContext) TRANSACTION_() antlr.TerminalNode {
	return s.GetToken(ParserTRANSACTION_, 0)
}

func (s *KeywordContext) TRIGGER_() antlr.TerminalNode {
	return s.GetToken(ParserTRIGGER_, 0)
}

func (s *KeywordContext) UNION_() antlr.TerminalNode {
	return s.GetToken(ParserUNION_, 0)
}

func (s *KeywordContext) UNIQUE_() antlr.TerminalNode {
	return s.GetToken(ParserUNIQUE_, 0)
}

func (s *KeywordContext) UPDATE_() antlr.TerminalNode {
	return s.GetToken(ParserUPDATE_, 0)
}

func (s *KeywordContext) USING_() antlr.TerminalNode {
	return s.GetToken(ParserUSING_, 0)
}

func (s *KeywordContext) VACUUM_() antlr.TerminalNode {
	return s.GetToken(ParserVACUUM_, 0)
}

func (s *KeywordContext) VALUES_() antlr.TerminalNode {
	return s.GetToken(ParserVALUES_, 0)
}

func (s *KeywordContext) VIEW_() antlr.TerminalNode {
	return s.GetToken(ParserVIEW_, 0)
}

func (s *KeywordContext) VIRTUAL_() antlr.TerminalNode {
	return s.GetToken(ParserVIRTUAL_, 0)
}

func (s *KeywordContext) WHEN_() antlr.TerminalNode {
	return s.GetToken(ParserWHEN_, 0)
}

func (s *KeywordContext) WHERE_() antlr.TerminalNode {
	return s.GetToken(ParserWHERE_, 0)
}

func (s *KeywordContext) WITH_() antlr.TerminalNode {
	return s.GetToken(ParserWITH_, 0)
}

func (s *KeywordContext) WITHOUT_() antlr.TerminalNode {
	return s.GetToken(ParserWITHOUT_, 0)
}

func (s *KeywordContext) FIRST_VALUE_() antlr.TerminalNode {
	return s.GetToken(ParserFIRST_VALUE_, 0)
}

func (s *KeywordContext) OVER_() antlr.TerminalNode {
	return s.GetToken(ParserOVER_, 0)
}

func (s *KeywordContext) PARTITION_() antlr.TerminalNode {
	return s.GetToken(ParserPARTITION_, 0)
}

func (s *KeywordContext) RANGE_() antlr.TerminalNode {
	return s.GetToken(ParserRANGE_, 0)
}

func (s *KeywordContext) PRECEDING_() antlr.TerminalNode {
	return s.GetToken(ParserPRECEDING_, 0)
}

func (s *KeywordContext) UNBOUNDED_() antlr.TerminalNode {
	return s.GetToken(ParserUNBOUNDED_, 0)
}

func (s *KeywordContext) CURRENT_() antlr.TerminalNode {
	return s.GetToken(ParserCURRENT_, 0)
}

func (s *KeywordContext) FOLLOWING_() antlr.TerminalNode {
	return s.GetToken(ParserFOLLOWING_, 0)
}

func (s *KeywordContext) CUME_DIST_() antlr.TerminalNode {
	return s.GetToken(ParserCUME_DIST_, 0)
}

func (s *KeywordContext) DENSE_RANK_() antlr.TerminalNode {
	return s.GetToken(ParserDENSE_RANK_, 0)
}

func (s *KeywordContext) LAG_() antlr.TerminalNode {
	return s.GetToken(ParserLAG_, 0)
}

func (s *KeywordContext) LAST_VALUE_() antlr.TerminalNode {
	return s.GetToken(ParserLAST_VALUE_, 0)
}

func (s *KeywordContext) LEAD_() antlr.TerminalNode {
	return s.GetToken(ParserLEAD_, 0)
}

func (s *KeywordContext) NTH_VALUE_() antlr.TerminalNode {
	return s.GetToken(ParserNTH_VALUE_, 0)
}

func (s *KeywordContext) NTILE_() antlr.TerminalNode {
	return s.GetToken(ParserNTILE_, 0)
}

func (s *KeywordContext) PERCENT_RANK_() antlr.TerminalNode {
	return s.GetToken(ParserPERCENT_RANK_, 0)
}

func (s *KeywordContext) RANK_() antlr.TerminalNode {
	return s.GetToken(ParserRANK_, 0)
}

func (s *KeywordContext) ROW_NUMBER_() antlr.TerminalNode {
	return s.GetToken(ParserROW_NUMBER_, 0)
}

func (s *KeywordContext) GENERATED_() antlr.TerminalNode {
	return s.GetToken(ParserGENERATED_, 0)
}

func (s *KeywordContext) ALWAYS_() antlr.TerminalNode {
	return s.GetToken(ParserALWAYS_, 0)
}

func (s *KeywordContext) STORED_() antlr.TerminalNode {
	return s.GetToken(ParserSTORED_, 0)
}

func (s *KeywordContext) TRUE_() antlr.TerminalNode {
	return s.GetToken(ParserTRUE_, 0)
}

func (s *KeywordContext) FALSE_() antlr.TerminalNode {
	return s.GetToken(ParserFALSE_, 0)
}

func (s *KeywordContext) WINDOW_() antlr.TerminalNode {
	return s.GetToken(ParserWINDOW_, 0)
}

func (s *KeywordContext) NULLS_() antlr.TerminalNode {
	return s.GetToken(ParserNULLS_, 0)
}

func (s *KeywordContext) FIRST_() antlr.TerminalNode {
	return s.GetToken(ParserFIRST_, 0)
}

func (s *KeywordContext) LAST_() antlr.TerminalNode {
	return s.GetToken(ParserLAST_, 0)
}

func (s *KeywordContext) FILTER_() antlr.TerminalNode {
	return s.GetToken(ParserFILTER_, 0)
}

func (s *KeywordContext) GROUPS_() antlr.TerminalNode {
	return s.GetToken(ParserGROUPS_, 0)
}

func (s *KeywordContext) EXCLUDE_() antlr.TerminalNode {
	return s.GetToken(ParserEXCLUDE_, 0)
}

func (s *KeywordContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *KeywordContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *KeywordContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterKeyword(s)
	}
}

func (s *KeywordContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitKeyword(s)
	}
}

func (s *KeywordContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitKeyword(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Keyword() (localctx IKeywordContext) {
	localctx = NewKeywordContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 176, ParserRULE_keyword)
	var _la int

	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2025)
		_la = p.GetTokenStream().LA(1)

		if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-33554432) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1152921504606846977) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&9007199254740991) != 0)) {
			p.GetErrorHandler().RecoverInline(p)
		} else {
			p.GetErrorHandler().ReportMatch(p)
			p.Consume()
		}
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// INameContext is an interface to support dynamic dispatch.
type INameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsNameContext differentiates from other interfaces.
	IsNameContext()
}

type NameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyNameContext() *NameContext {
	var p = new(NameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_name
	return p
}

func InitEmptyNameContext(p *NameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_name
}

func (*NameContext) IsNameContext() {}

func NewNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NameContext {
	var p = new(NameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_name

	return p
}

func (s *NameContext) GetParser() antlr.Parser { return s.parser }

func (s *NameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *NameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *NameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *NameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterName(s)
	}
}

func (s *NameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitName(s)
	}
}

func (s *NameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitName(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Name() (localctx INameContext) {
	localctx = NewNameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 178, ParserRULE_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2027)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFunction_nameContext is an interface to support dynamic dispatch.
type IFunction_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsFunction_nameContext differentiates from other interfaces.
	IsFunction_nameContext()
}

type Function_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFunction_nameContext() *Function_nameContext {
	var p = new(Function_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_function_name
	return p
}

func InitEmptyFunction_nameContext(p *Function_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_function_name
}

func (*Function_nameContext) IsFunction_nameContext() {}

func NewFunction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Function_nameContext {
	var p = new(Function_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_function_name

	return p
}

func (s *Function_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Function_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Function_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Function_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFunction_name(s)
	}
}

func (s *Function_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFunction_name(s)
	}
}

func (s *Function_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFunction_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Function_name() (localctx IFunction_nameContext) {
	localctx = NewFunction_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 180, ParserRULE_function_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2029)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISchema_nameContext is an interface to support dynamic dispatch.
type ISchema_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsSchema_nameContext differentiates from other interfaces.
	IsSchema_nameContext()
}

type Schema_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySchema_nameContext() *Schema_nameContext {
	var p = new(Schema_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_schema_name
	return p
}

func InitEmptySchema_nameContext(p *Schema_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_schema_name
}

func (*Schema_nameContext) IsSchema_nameContext() {}

func NewSchema_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Schema_nameContext {
	var p = new(Schema_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_schema_name

	return p
}

func (s *Schema_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Schema_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Schema_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Schema_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Schema_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSchema_name(s)
	}
}

func (s *Schema_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSchema_name(s)
	}
}

func (s *Schema_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSchema_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Schema_name() (localctx ISchema_nameContext) {
	localctx = NewSchema_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 182, ParserRULE_schema_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2031)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITable_nameContext is an interface to support dynamic dispatch.
type ITable_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsTable_nameContext differentiates from other interfaces.
	IsTable_nameContext()
}

type Table_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_nameContext() *Table_nameContext {
	var p = new(Table_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_name
	return p
}

func InitEmptyTable_nameContext(p *Table_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_name
}

func (*Table_nameContext) IsTable_nameContext() {}

func NewTable_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_nameContext {
	var p = new(Table_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_table_name

	return p
}

func (s *Table_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Table_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTable_name(s)
	}
}

func (s *Table_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTable_name(s)
	}
}

func (s *Table_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTable_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Table_name() (localctx ITable_nameContext) {
	localctx = NewTable_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 184, ParserRULE_table_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2033)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITable_or_index_nameContext is an interface to support dynamic dispatch.
type ITable_or_index_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsTable_or_index_nameContext differentiates from other interfaces.
	IsTable_or_index_nameContext()
}

type Table_or_index_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_or_index_nameContext() *Table_or_index_nameContext {
	var p = new(Table_or_index_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_or_index_name
	return p
}

func InitEmptyTable_or_index_nameContext(p *Table_or_index_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_or_index_name
}

func (*Table_or_index_nameContext) IsTable_or_index_nameContext() {}

func NewTable_or_index_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_index_nameContext {
	var p = new(Table_or_index_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_table_or_index_name

	return p
}

func (s *Table_or_index_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_or_index_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Table_or_index_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_or_index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_or_index_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTable_or_index_name(s)
	}
}

func (s *Table_or_index_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTable_or_index_name(s)
	}
}

func (s *Table_or_index_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTable_or_index_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Table_or_index_name() (localctx ITable_or_index_nameContext) {
	localctx = NewTable_or_index_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 186, ParserRULE_table_or_index_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2035)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IColumn_nameContext is an interface to support dynamic dispatch.
type IColumn_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsColumn_nameContext differentiates from other interfaces.
	IsColumn_nameContext()
}

type Column_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyColumn_nameContext() *Column_nameContext {
	var p = new(Column_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_name
	return p
}

func InitEmptyColumn_nameContext(p *Column_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_column_name
}

func (*Column_nameContext) IsColumn_nameContext() {}

func NewColumn_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_nameContext {
	var p = new(Column_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_column_name

	return p
}

func (s *Column_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Column_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Column_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Column_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Column_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterColumn_name(s)
	}
}

func (s *Column_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitColumn_name(s)
	}
}

func (s *Column_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitColumn_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Column_name() (localctx IColumn_nameContext) {
	localctx = NewColumn_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 188, ParserRULE_column_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2037)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ICollation_nameContext is an interface to support dynamic dispatch.
type ICollation_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsCollation_nameContext differentiates from other interfaces.
	IsCollation_nameContext()
}

type Collation_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyCollation_nameContext() *Collation_nameContext {
	var p = new(Collation_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_collation_name
	return p
}

func InitEmptyCollation_nameContext(p *Collation_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_collation_name
}

func (*Collation_nameContext) IsCollation_nameContext() {}

func NewCollation_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Collation_nameContext {
	var p = new(Collation_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_collation_name

	return p
}

func (s *Collation_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Collation_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Collation_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Collation_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Collation_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterCollation_name(s)
	}
}

func (s *Collation_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitCollation_name(s)
	}
}

func (s *Collation_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitCollation_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Collation_name() (localctx ICollation_nameContext) {
	localctx = NewCollation_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 190, ParserRULE_collation_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2039)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IForeign_tableContext is an interface to support dynamic dispatch.
type IForeign_tableContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsForeign_tableContext differentiates from other interfaces.
	IsForeign_tableContext()
}

type Foreign_tableContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyForeign_tableContext() *Foreign_tableContext {
	var p = new(Foreign_tableContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_foreign_table
	return p
}

func InitEmptyForeign_tableContext(p *Foreign_tableContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_foreign_table
}

func (*Foreign_tableContext) IsForeign_tableContext() {}

func NewForeign_tableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_tableContext {
	var p = new(Foreign_tableContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_foreign_table

	return p
}

func (s *Foreign_tableContext) GetParser() antlr.Parser { return s.parser }

func (s *Foreign_tableContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Foreign_tableContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Foreign_tableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Foreign_tableContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterForeign_table(s)
	}
}

func (s *Foreign_tableContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitForeign_table(s)
	}
}

func (s *Foreign_tableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitForeign_table(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Foreign_table() (localctx IForeign_tableContext) {
	localctx = NewForeign_tableContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 192, ParserRULE_foreign_table)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2041)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IIndex_nameContext is an interface to support dynamic dispatch.
type IIndex_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsIndex_nameContext differentiates from other interfaces.
	IsIndex_nameContext()
}

type Index_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyIndex_nameContext() *Index_nameContext {
	var p = new(Index_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_index_name
	return p
}

func InitEmptyIndex_nameContext(p *Index_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_index_name
}

func (*Index_nameContext) IsIndex_nameContext() {}

func NewIndex_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Index_nameContext {
	var p = new(Index_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_index_name

	return p
}

func (s *Index_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Index_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Index_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Index_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterIndex_name(s)
	}
}

func (s *Index_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitIndex_name(s)
	}
}

func (s *Index_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitIndex_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Index_name() (localctx IIndex_nameContext) {
	localctx = NewIndex_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 194, ParserRULE_index_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2043)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITrigger_nameContext is an interface to support dynamic dispatch.
type ITrigger_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsTrigger_nameContext differentiates from other interfaces.
	IsTrigger_nameContext()
}

type Trigger_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTrigger_nameContext() *Trigger_nameContext {
	var p = new(Trigger_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_trigger_name
	return p
}

func InitEmptyTrigger_nameContext(p *Trigger_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_trigger_name
}

func (*Trigger_nameContext) IsTrigger_nameContext() {}

func NewTrigger_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Trigger_nameContext {
	var p = new(Trigger_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_trigger_name

	return p
}

func (s *Trigger_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Trigger_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Trigger_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Trigger_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Trigger_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTrigger_name(s)
	}
}

func (s *Trigger_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTrigger_name(s)
	}
}

func (s *Trigger_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTrigger_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Trigger_name() (localctx ITrigger_nameContext) {
	localctx = NewTrigger_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 196, ParserRULE_trigger_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2045)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IView_nameContext is an interface to support dynamic dispatch.
type IView_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsView_nameContext differentiates from other interfaces.
	IsView_nameContext()
}

type View_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyView_nameContext() *View_nameContext {
	var p = new(View_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_view_name
	return p
}

func InitEmptyView_nameContext(p *View_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_view_name
}

func (*View_nameContext) IsView_nameContext() {}

func NewView_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *View_nameContext {
	var p = new(View_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_view_name

	return p
}

func (s *View_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *View_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *View_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *View_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *View_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterView_name(s)
	}
}

func (s *View_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitView_name(s)
	}
}

func (s *View_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitView_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) View_name() (localctx IView_nameContext) {
	localctx = NewView_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 198, ParserRULE_view_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2047)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IModule_nameContext is an interface to support dynamic dispatch.
type IModule_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsModule_nameContext differentiates from other interfaces.
	IsModule_nameContext()
}

type Module_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyModule_nameContext() *Module_nameContext {
	var p = new(Module_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_module_name
	return p
}

func InitEmptyModule_nameContext(p *Module_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_module_name
}

func (*Module_nameContext) IsModule_nameContext() {}

func NewModule_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_nameContext {
	var p = new(Module_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_module_name

	return p
}

func (s *Module_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Module_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Module_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Module_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Module_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterModule_name(s)
	}
}

func (s *Module_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitModule_name(s)
	}
}

func (s *Module_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitModule_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Module_name() (localctx IModule_nameContext) {
	localctx = NewModule_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 200, ParserRULE_module_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2049)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IPragma_nameContext is an interface to support dynamic dispatch.
type IPragma_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsPragma_nameContext differentiates from other interfaces.
	IsPragma_nameContext()
}

type Pragma_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyPragma_nameContext() *Pragma_nameContext {
	var p = new(Pragma_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_pragma_name
	return p
}

func InitEmptyPragma_nameContext(p *Pragma_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_pragma_name
}

func (*Pragma_nameContext) IsPragma_nameContext() {}

func NewPragma_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_nameContext {
	var p = new(Pragma_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_pragma_name

	return p
}

func (s *Pragma_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Pragma_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Pragma_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Pragma_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Pragma_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterPragma_name(s)
	}
}

func (s *Pragma_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitPragma_name(s)
	}
}

func (s *Pragma_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitPragma_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Pragma_name() (localctx IPragma_nameContext) {
	localctx = NewPragma_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 202, ParserRULE_pragma_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2051)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISavepoint_nameContext is an interface to support dynamic dispatch.
type ISavepoint_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsSavepoint_nameContext differentiates from other interfaces.
	IsSavepoint_nameContext()
}

type Savepoint_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySavepoint_nameContext() *Savepoint_nameContext {
	var p = new(Savepoint_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_savepoint_name
	return p
}

func InitEmptySavepoint_nameContext(p *Savepoint_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_savepoint_name
}

func (*Savepoint_nameContext) IsSavepoint_nameContext() {}

func NewSavepoint_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_nameContext {
	var p = new(Savepoint_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_savepoint_name

	return p
}

func (s *Savepoint_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Savepoint_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Savepoint_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Savepoint_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Savepoint_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSavepoint_name(s)
	}
}

func (s *Savepoint_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSavepoint_name(s)
	}
}

func (s *Savepoint_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSavepoint_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Savepoint_name() (localctx ISavepoint_nameContext) {
	localctx = NewSavepoint_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 204, ParserRULE_savepoint_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2053)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITable_aliasContext is an interface to support dynamic dispatch.
type ITable_aliasContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsTable_aliasContext differentiates from other interfaces.
	IsTable_aliasContext()
}

type Table_aliasContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_aliasContext() *Table_aliasContext {
	var p = new(Table_aliasContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_alias
	return p
}

func InitEmptyTable_aliasContext(p *Table_aliasContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_alias
}

func (*Table_aliasContext) IsTable_aliasContext() {}

func NewTable_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_aliasContext {
	var p = new(Table_aliasContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_table_alias

	return p
}

func (s *Table_aliasContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_aliasContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Table_aliasContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_aliasContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTable_alias(s)
	}
}

func (s *Table_aliasContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTable_alias(s)
	}
}

func (s *Table_aliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTable_alias(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Table_alias() (localctx ITable_aliasContext) {
	localctx = NewTable_aliasContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 206, ParserRULE_table_alias)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2055)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITransaction_nameContext is an interface to support dynamic dispatch.
type ITransaction_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsTransaction_nameContext differentiates from other interfaces.
	IsTransaction_nameContext()
}

type Transaction_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTransaction_nameContext() *Transaction_nameContext {
	var p = new(Transaction_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_transaction_name
	return p
}

func InitEmptyTransaction_nameContext(p *Transaction_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_transaction_name
}

func (*Transaction_nameContext) IsTransaction_nameContext() {}

func NewTransaction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Transaction_nameContext {
	var p = new(Transaction_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_transaction_name

	return p
}

func (s *Transaction_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Transaction_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Transaction_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Transaction_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Transaction_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTransaction_name(s)
	}
}

func (s *Transaction_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTransaction_name(s)
	}
}

func (s *Transaction_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTransaction_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Transaction_name() (localctx ITransaction_nameContext) {
	localctx = NewTransaction_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 208, ParserRULE_transaction_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2057)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IWindow_nameContext is an interface to support dynamic dispatch.
type IWindow_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsWindow_nameContext differentiates from other interfaces.
	IsWindow_nameContext()
}

type Window_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyWindow_nameContext() *Window_nameContext {
	var p = new(Window_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_name
	return p
}

func InitEmptyWindow_nameContext(p *Window_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_window_name
}

func (*Window_nameContext) IsWindow_nameContext() {}

func NewWindow_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_nameContext {
	var p = new(Window_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_window_name

	return p
}

func (s *Window_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Window_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Window_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Window_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterWindow_name(s)
	}
}

func (s *Window_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitWindow_name(s)
	}
}

func (s *Window_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitWindow_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Window_name() (localctx IWindow_nameContext) {
	localctx = NewWindow_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 210, ParserRULE_window_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2059)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAliasContext is an interface to support dynamic dispatch.
type IAliasContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsAliasContext differentiates from other interfaces.
	IsAliasContext()
}

type AliasContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAliasContext() *AliasContext {
	var p = new(AliasContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_alias
	return p
}

func InitEmptyAliasContext(p *AliasContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_alias
}

func (*AliasContext) IsAliasContext() {}

func NewAliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AliasContext {
	var p = new(AliasContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_alias

	return p
}

func (s *AliasContext) GetParser() antlr.Parser { return s.parser }

func (s *AliasContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *AliasContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *AliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *AliasContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAlias(s)
	}
}

func (s *AliasContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAlias(s)
	}
}

func (s *AliasContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAlias(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Alias() (localctx IAliasContext) {
	localctx = NewAliasContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 212, ParserRULE_alias)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2061)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IFilenameContext is an interface to support dynamic dispatch.
type IFilenameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsFilenameContext differentiates from other interfaces.
	IsFilenameContext()
}

type FilenameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyFilenameContext() *FilenameContext {
	var p = new(FilenameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_filename
	return p
}

func InitEmptyFilenameContext(p *FilenameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_filename
}

func (*FilenameContext) IsFilenameContext() {}

func NewFilenameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FilenameContext {
	var p = new(FilenameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_filename

	return p
}

func (s *FilenameContext) GetParser() antlr.Parser { return s.parser }

func (s *FilenameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *FilenameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *FilenameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *FilenameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterFilename(s)
	}
}

func (s *FilenameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitFilename(s)
	}
}

func (s *FilenameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitFilename(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Filename() (localctx IFilenameContext) {
	localctx = NewFilenameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 214, ParserRULE_filename)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2063)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IBase_window_nameContext is an interface to support dynamic dispatch.
type IBase_window_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsBase_window_nameContext differentiates from other interfaces.
	IsBase_window_nameContext()
}

type Base_window_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyBase_window_nameContext() *Base_window_nameContext {
	var p = new(Base_window_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_base_window_name
	return p
}

func InitEmptyBase_window_nameContext(p *Base_window_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_base_window_name
}

func (*Base_window_nameContext) IsBase_window_nameContext() {}

func NewBase_window_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Base_window_nameContext {
	var p = new(Base_window_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_base_window_name

	return p
}

func (s *Base_window_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Base_window_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Base_window_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Base_window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Base_window_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterBase_window_name(s)
	}
}

func (s *Base_window_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitBase_window_name(s)
	}
}

func (s *Base_window_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitBase_window_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Base_window_name() (localctx IBase_window_nameContext) {
	localctx = NewBase_window_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 216, ParserRULE_base_window_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2065)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ISimple_funcContext is an interface to support dynamic dispatch.
type ISimple_funcContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsSimple_funcContext differentiates from other interfaces.
	IsSimple_funcContext()
}

type Simple_funcContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptySimple_funcContext() *Simple_funcContext {
	var p = new(Simple_funcContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_simple_func
	return p
}

func InitEmptySimple_funcContext(p *Simple_funcContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_simple_func
}

func (*Simple_funcContext) IsSimple_funcContext() {}

func NewSimple_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_funcContext {
	var p = new(Simple_funcContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_simple_func

	return p
}

func (s *Simple_funcContext) GetParser() antlr.Parser { return s.parser }

func (s *Simple_funcContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Simple_funcContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Simple_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Simple_funcContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterSimple_func(s)
	}
}

func (s *Simple_funcContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitSimple_func(s)
	}
}

func (s *Simple_funcContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitSimple_func(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Simple_func() (localctx ISimple_funcContext) {
	localctx = NewSimple_funcContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 218, ParserRULE_simple_func)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2067)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAggregate_funcContext is an interface to support dynamic dispatch.
type IAggregate_funcContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsAggregate_funcContext differentiates from other interfaces.
	IsAggregate_funcContext()
}

type Aggregate_funcContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAggregate_funcContext() *Aggregate_funcContext {
	var p = new(Aggregate_funcContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_aggregate_func
	return p
}

func InitEmptyAggregate_funcContext(p *Aggregate_funcContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_aggregate_func
}

func (*Aggregate_funcContext) IsAggregate_funcContext() {}

func NewAggregate_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_funcContext {
	var p = new(Aggregate_funcContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_aggregate_func

	return p
}

func (s *Aggregate_funcContext) GetParser() antlr.Parser { return s.parser }

func (s *Aggregate_funcContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Aggregate_funcContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Aggregate_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Aggregate_funcContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAggregate_func(s)
	}
}

func (s *Aggregate_funcContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAggregate_func(s)
	}
}

func (s *Aggregate_funcContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAggregate_func(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Aggregate_func() (localctx IAggregate_funcContext) {
	localctx = NewAggregate_funcContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 220, ParserRULE_aggregate_func)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2069)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// ITable_function_nameContext is an interface to support dynamic dispatch.
type ITable_function_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	Any_name() IAny_nameContext

	// IsTable_function_nameContext differentiates from other interfaces.
	IsTable_function_nameContext()
}

type Table_function_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyTable_function_nameContext() *Table_function_nameContext {
	var p = new(Table_function_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_function_name
	return p
}

func InitEmptyTable_function_nameContext(p *Table_function_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_table_function_name
}

func (*Table_function_nameContext) IsTable_function_nameContext() {}

func NewTable_function_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_function_nameContext {
	var p = new(Table_function_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_table_function_name

	return p
}

func (s *Table_function_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Table_function_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Table_function_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Table_function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Table_function_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterTable_function_name(s)
	}
}

func (s *Table_function_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitTable_function_name(s)
	}
}

func (s *Table_function_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitTable_function_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Table_function_name() (localctx ITable_function_nameContext) {
	localctx = NewTable_function_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 222, ParserRULE_table_function_name)
	p.EnterOuterAlt(localctx, 1)
	{
		p.SetState(2071)
		p.Any_name()
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

// IAny_nameContext is an interface to support dynamic dispatch.
type IAny_nameContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// Getter signatures
	IDENTIFIER() antlr.TerminalNode
	Keyword() IKeywordContext
	STRING_LITERAL() antlr.TerminalNode
	OPEN_PAR() antlr.TerminalNode
	Any_name() IAny_nameContext
	CLOSE_PAR() antlr.TerminalNode

	// IsAny_nameContext differentiates from other interfaces.
	IsAny_nameContext()
}

type Any_nameContext struct {
	antlr.BaseParserRuleContext
	parser antlr.Parser
}

func NewEmptyAny_nameContext() *Any_nameContext {
	var p = new(Any_nameContext)
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_any_name
	return p
}

func InitEmptyAny_nameContext(p *Any_nameContext) {
	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
	p.RuleIndex = ParserRULE_any_name
}

func (*Any_nameContext) IsAny_nameContext() {}

func NewAny_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Any_nameContext {
	var p = new(Any_nameContext)

	antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)

	p.parser = parser
	p.RuleIndex = ParserRULE_any_name

	return p
}

func (s *Any_nameContext) GetParser() antlr.Parser { return s.parser }

func (s *Any_nameContext) IDENTIFIER() antlr.TerminalNode {
	return s.GetToken(ParserIDENTIFIER, 0)
}

func (s *Any_nameContext) Keyword() IKeywordContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IKeywordContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IKeywordContext)
}

func (s *Any_nameContext) STRING_LITERAL() antlr.TerminalNode {
	return s.GetToken(ParserSTRING_LITERAL, 0)
}

func (s *Any_nameContext) OPEN_PAR() antlr.TerminalNode {
	return s.GetToken(ParserOPEN_PAR, 0)
}

func (s *Any_nameContext) Any_name() IAny_nameContext {
	var t antlr.RuleContext
	for _, ctx := range s.GetChildren() {
		if _, ok := ctx.(IAny_nameContext); ok {
			t = ctx.(antlr.RuleContext)
			break
		}
	}

	if t == nil {
		return nil
	}

	return t.(IAny_nameContext)
}

func (s *Any_nameContext) CLOSE_PAR() antlr.TerminalNode {
	return s.GetToken(ParserCLOSE_PAR, 0)
}

func (s *Any_nameContext) GetRuleContext() antlr.RuleContext {
	return s
}

func (s *Any_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
	return antlr.TreesStringTree(s, ruleNames, recog)
}

func (s *Any_nameContext) EnterRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.EnterAny_name(s)
	}
}

func (s *Any_nameContext) ExitRule(listener antlr.ParseTreeListener) {
	if listenerT, ok := listener.(ParserListener); ok {
		listenerT.ExitAny_name(s)
	}
}

func (s *Any_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
	switch t := visitor.(type) {
	case ParserVisitor:
		return t.VisitAny_name(s)

	default:
		return t.VisitChildren(s)
	}
}

func (p *Parser) Any_name() (localctx IAny_nameContext) {
	localctx = NewAny_nameContext(p, p.GetParserRuleContext(), p.GetState())
	p.EnterRule(localctx, 224, ParserRULE_any_name)
	p.SetState(2080)
	p.GetErrorHandler().Sync(p)
	if p.HasError() {
		goto errorExit
	}

	switch p.GetTokenStream().LA(1) {
	case ParserIDENTIFIER:
		p.EnterOuterAlt(localctx, 1)
		{
			p.SetState(2073)
			p.Match(ParserIDENTIFIER)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserABORT_, ParserACTION_, ParserADD_, ParserAFTER_, ParserALL_, ParserALTER_, ParserANALYZE_, ParserAND_, ParserAS_, ParserASC_, ParserATTACH_, ParserAUTOINCREMENT_, ParserBEFORE_, ParserBEGIN_, ParserBETWEEN_, ParserBY_, ParserCASCADE_, ParserCASE_, ParserCAST_, ParserCHECK_, ParserCOLLATE_, ParserCOLUMN_, ParserCOMMIT_, ParserCONFLICT_, ParserCONSTRAINT_, ParserCREATE_, ParserCROSS_, ParserCURRENT_DATE_, ParserCURRENT_TIME_, ParserCURRENT_TIMESTAMP_, ParserDATABASE_, ParserDEFAULT_, ParserDEFERRABLE_, ParserDEFERRED_, ParserDELETE_, ParserDESC_, ParserDETACH_, ParserDISTINCT_, ParserDROP_, ParserEACH_, ParserELSE_, ParserEND_, ParserESCAPE_, ParserEXCEPT_, ParserEXCLUSIVE_, ParserEXISTS_, ParserEXPLAIN_, ParserFAIL_, ParserFOR_, ParserFOREIGN_, ParserFROM_, ParserFULL_, ParserGLOB_, ParserGROUP_, ParserHAVING_, ParserIF_, ParserIGNORE_, ParserIMMEDIATE_, ParserIN_, ParserINDEX_, ParserINDEXED_, ParserINITIALLY_, ParserINNER_, ParserINSERT_, ParserINSTEAD_, ParserINTERSECT_, ParserINTO_, ParserIS_, ParserISNULL_, ParserJOIN_, ParserKEY_, ParserLEFT_, ParserLIKE_, ParserLIMIT_, ParserMATCH_, ParserNATURAL_, ParserNO_, ParserNOT_, ParserNOTNULL_, ParserNULL_, ParserOF_, ParserOFFSET_, ParserON_, ParserOR_, ParserORDER_, ParserOUTER_, ParserPLAN_, ParserPRAGMA_, ParserPRIMARY_, ParserQUERY_, ParserRAISE_, ParserRECURSIVE_, ParserREFERENCES_, ParserREGEXP_, ParserREINDEX_, ParserRELEASE_, ParserRENAME_, ParserREPLACE_, ParserRESTRICT_, ParserRIGHT_, ParserROLLBACK_, ParserROW_, ParserROWS_, ParserSAVEPOINT_, ParserSELECT_, ParserSET_, ParserTABLE_, ParserTEMP_, ParserTEMPORARY_, ParserTHEN_, ParserTO_, ParserTRANSACTION_, ParserTRIGGER_, ParserUNION_, ParserUNIQUE_, ParserUPDATE_, ParserUSING_, ParserVACUUM_, ParserVALUES_, ParserVIEW_, ParserVIRTUAL_, ParserWHEN_, ParserWHERE_, ParserWITH_, ParserWITHOUT_, ParserFIRST_VALUE_, ParserOVER_, ParserPARTITION_, ParserRANGE_, ParserPRECEDING_, ParserUNBOUNDED_, ParserCURRENT_, ParserFOLLOWING_, ParserCUME_DIST_, ParserDENSE_RANK_, ParserLAG_, ParserLAST_VALUE_, ParserLEAD_, ParserNTH_VALUE_, ParserNTILE_, ParserPERCENT_RANK_, ParserRANK_, ParserROW_NUMBER_, ParserGENERATED_, ParserALWAYS_, ParserSTORED_, ParserTRUE_, ParserFALSE_, ParserWINDOW_, ParserNULLS_, ParserFIRST_, ParserLAST_, ParserFILTER_, ParserGROUPS_, ParserEXCLUDE_:
		p.EnterOuterAlt(localctx, 2)
		{
			p.SetState(2074)
			p.Keyword()
		}

	case ParserSTRING_LITERAL:
		p.EnterOuterAlt(localctx, 3)
		{
			p.SetState(2075)
			p.Match(ParserSTRING_LITERAL)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	case ParserOPEN_PAR:
		p.EnterOuterAlt(localctx, 4)
		{
			p.SetState(2076)
			p.Match(ParserOPEN_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}
		{
			p.SetState(2077)
			p.Any_name()
		}
		{
			p.SetState(2078)
			p.Match(ParserCLOSE_PAR)
			if p.HasError() {
				// Recognition error - abort rule
				goto errorExit
			}
		}

	default:
		p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
		goto errorExit
	}

errorExit:
	if p.HasError() {
		v := p.GetError()
		localctx.SetException(v)
		p.GetErrorHandler().ReportError(p, v)
		p.GetErrorHandler().Recover(p, v)
		p.SetError(nil)
	}
	p.ExitRule()
	return localctx
	goto errorExit // Trick to prevent compiler error if the label is not used
}

func (p *Parser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
	switch ruleIndex {
	case 32:
		var t *ExprContext = nil
		if localctx != nil {
			t = localctx.(*ExprContext)
		}
		return p.Expr_Sempred(t, predIndex)

	default:
		panic("No predicate with index: " + fmt.Sprint(ruleIndex))
	}
}

func (p *Parser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool {
	switch predIndex {
	case 0:
		return p.Precpred(p.GetParserRuleContext(), 20)

	case 1:
		return p.Precpred(p.GetParserRuleContext(), 19)

	case 2:
		return p.Precpred(p.GetParserRuleContext(), 18)

	case 3:
		return p.Precpred(p.GetParserRuleContext(), 17)

	case 4:
		return p.Precpred(p.GetParserRuleContext(), 16)

	case 5:
		return p.Precpred(p.GetParserRuleContext(), 15)

	case 6:
		return p.Precpred(p.GetParserRuleContext(), 14)

	case 7:
		return p.Precpred(p.GetParserRuleContext(), 13)

	case 8:
		return p.Precpred(p.GetParserRuleContext(), 6)

	case 9:
		return p.Precpred(p.GetParserRuleContext(), 5)

	case 10:
		return p.Precpred(p.GetParserRuleContext(), 9)

	case 11:
		return p.Precpred(p.GetParserRuleContext(), 8)

	case 12:
		return p.Precpred(p.GetParserRuleContext(), 7)

	case 13:
		return p.Precpred(p.GetParserRuleContext(), 4)

	default:
		panic("No predicate with index: " + fmt.Sprint(predIndex))
	}
}
