diff --git a/core/types/transactions/payloads.go b/core/types/transactions/payloads.go index f022b1bfb..d674bea56 100644 --- a/core/types/transactions/payloads.go +++ b/core/types/transactions/payloads.go @@ -64,7 +64,7 @@ func UnmarshalPayload(payloadType PayloadType, payload []byte) (Payload, error) } t := reflect.TypeOf(prototype).Elem() - elem := reflect.New(t) // reflect.Type => reflect.Value + elem := reflect.New(t) // reflect.Type => reflect.Param instance := elem.Interface() // reflect.Type => any err := serialize.Decode(payload, instance) diff --git a/internal/engine/generate/generate_test.go b/internal/engine/generate/generate_test.go index 3269ff7e2..f132791b9 100644 --- a/internal/engine/generate/generate_test.go +++ b/internal/engine/generate/generate_test.go @@ -5,12 +5,415 @@ import ( "testing" "unicode" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/kwilteam/kwil-db/core/types" "github.com/kwilteam/kwil-db/internal/engine/generate" + "github.com/kwilteam/kwil-db/parse" "github.com/kwilteam/kwil-db/parse/postgres" - "github.com/stretchr/testify/assert" ) +func TestGenerateDDLStatement(t *testing.T) { + tests := []struct { + name string + sql parse.SQLStmt + want string + wantErr bool + }{ // those are the same as what are in internal.parse.parse_test.Test_SQL, with 'want' and 'sql' swapped + { + name: "create table", + sql: &parse.CreateTableStatement{ + Name: "users", + Columns: []*parse.Column{ + { + Name: "id", + Type: types.IntType, + Constraints: []parse.Constraint{ + &parse.ConstraintPrimaryKey{}, + }, + }, + { + Name: "name", + Type: types.TextType, + Constraints: []parse.Constraint{ + &parse.ConstraintCheck{ + Param: &parse.ExpressionComparison{ + Left: &parse.ExpressionFunctionCall{ + Name: "length", + Args: []parse.Expression{ + &parse.ExpressionColumn{ + Table: "", + Column: "name", + }, + }, + }, + Right: &parse.ExpressionLiteral{ + Type: types.IntType, + Value: int64(10), + }, + Operator: parse.ComparisonOperatorGreaterThan, + }, + }, + }, + }, + { + Name: "address", + Type: types.TextType, + Constraints: []parse.Constraint{ + &parse.ConstraintNotNull{}, + &parse.ConstraintDefault{ + Value: &parse.ExpressionLiteral{ + Type: types.TextType, + Value: "usa", + }, + }, + }, + }, + { + Name: "email", + Type: types.TextType, + Constraints: []parse.Constraint{ + &parse.ConstraintNotNull{}, + &parse.ConstraintUnique{}, + }, + }, + { + Name: "city_id", + Type: types.IntType, + }, + { + Name: "group_id", + Type: types.IntType, + Constraints: []parse.Constraint{ + &parse.ConstraintForeignKey{ + RefTable: "groups", + RefColumn: "id", + Ons: []parse.ForeignKeyActionOn{parse.ON_DELETE}, + Dos: []parse.ForeignKeyActionDo{parse.DO_CASCADE}, + }, + }, + }, + }, + Indexes: []*parse.TableIndex{ + { + Name: "group_name_unique", + Columns: []string{"group_id", "name"}, + Type: parse.IndexTypeUnique, + }, + { + Name: "ithome", + Columns: []string{"name", "address"}, + Type: parse.IndexTypeBTree, + }, + }, + Constraints: []parse.Constraint{ + &parse.ConstraintForeignKey{ + Name: "city_fk", + RefTable: "cities", + RefColumn: "id", + Column: "city_id", + Ons: []parse.ForeignKeyActionOn{parse.ON_UPDATE}, + Dos: []parse.ForeignKeyActionDo{parse.DO_NO_ACTION}, + }, + &parse.ConstraintCheck{ + Param: &parse.ExpressionComparison{ + Left: &parse.ExpressionFunctionCall{ + Name: "length", + Args: []parse.Expression{ + &parse.ExpressionColumn{ + Table: "", + Column: "email", + }, + }, + }, + Right: &parse.ExpressionLiteral{ + Type: types.IntType, + Value: int64(1), + }, + Operator: parse.ComparisonOperatorGreaterThan, + }, + }, + &parse.ConstraintUnique{ + Columns: []string{ + "city_id", + "address", + }, + }, + }, + }, + want: `CREATE TABLE users ( + id int PRIMARY KEY, + name text CHECK(length(name) > 10), + address text NOT NULL DEFAULT 'usa', + email text NOT NULL UNIQUE, + city_id int, + group_id int REFERENCES groups(id) ON DELETE CASCADE, + CONSTRAINT city_fk FOREIGN KEY (city_id) REFERENCES cities(id) ON UPDATE NO ACTION, + CHECK(length(email) > 1), + UNIQUE (city_id, address), + UNIQUE INDEX group_name_unique (group_id, name), + INDEX ithome (name, address) +);`, + }, + { + name: "create table if not exists", + want: `CREATE TABLE IF NOT EXISTS users ( + id int PRIMARY KEY +);`, + sql: &parse.CreateTableStatement{ + Name: "users", + IfNotExists: true, + Columns: []*parse.Column{ + { + Name: "id", + Type: types.IntType, + Constraints: []parse.Constraint{ + &parse.ConstraintPrimaryKey{}, + }, + }, + }, + }, + }, + { + name: "alter table add column constraint NOT NULL", + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddColumnConstraint{ + Column: "name", + Type: parse.NOT_NULL, + }, + }, + want: "ALTER TABLE user ALTER COLUMN name SET NOT NULL;", + }, + { + name: "alter table add column constraint DEFAULT", + want: `ALTER TABLE user ALTER COLUMN name SET DEFAULT 10;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddColumnConstraint{ + Column: "name", + Type: parse.DEFAULT, + Value: &parse.ExpressionLiteral{ + Type: types.IntType, + Value: int64(10), + }, + }, + }, + }, + { + name: "alter table drop column constraint NOT NULL", + want: `ALTER TABLE user ALTER COLUMN name DROP NOT NULL;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumnConstraint{ + Column: "name", + Type: parse.NOT_NULL, + }, + }, + }, + { + name: "alter table drop column constraint DEFAULT", + want: `ALTER TABLE user ALTER COLUMN name DROP DEFAULT;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumnConstraint{ + Column: "name", + Type: parse.DEFAULT, + }, + }, + }, + { + name: "alter table drop column constraint named", + want: `ALTER TABLE user ALTER COLUMN name DROP CONSTRAINT abc;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumnConstraint{ + Column: "name", + Name: "abc", + }, + }, + }, + { + name: "alter table add column", + want: `ALTER TABLE user ADD COLUMN abc int;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddColumn{ + Name: "abc", + Type: types.IntType, + }, + }, + }, + { + name: "alter table drop column", + want: `ALTER TABLE user DROP COLUMN abc;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumn{ + Name: "abc", + }, + }, + }, + + { + name: "alter table rename column", + want: `ALTER TABLE user RENAME COLUMN abc TO def;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.RenameColumn{ + OldName: "abc", + NewName: "def", + }, + }, + }, + { + name: "alter table rename table", + want: `ALTER TABLE user RENAME TO account;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.RenameTable{ + Name: "account", + }, + }, + }, + { + name: "alter table add constraint fk", + want: `ALTER TABLE user ADD CONSTRAINT new_fk FOREIGN KEY (city_id) REFERENCES cities(id) ON DELETE CASCADE;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddTableConstraint{ + Cons: &parse.ConstraintForeignKey{ + Name: "new_fk", + RefTable: "cities", + RefColumn: "id", + Column: "city_id", + Ons: []parse.ForeignKeyActionOn{parse.ON_DELETE}, + Dos: []parse.ForeignKeyActionDo{parse.DO_CASCADE}, + }, + }, + }, + }, + { + name: "alter table drop constraint", + want: `ALTER TABLE user DROP CONSTRAINT abc;`, + sql: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropTableConstraint{ + Name: "abc", + }, + }, + }, + { + name: "drop table", + want: `DROP TABLE users, posts;`, + sql: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + Behavior: parse.DropBehaviorNon, + }, + }, + { + name: "drop table single table", + want: `DROP TABLE users;`, + sql: &parse.DropTableStatement{ + Tables: []string{"users"}, + Behavior: parse.DropBehaviorNon, + }, + }, + { + name: "drop table if exists", + want: `DROP TABLE IF EXISTS users, posts;`, + sql: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + IfExists: true, + Behavior: parse.DropBehaviorNon, + }, + }, + { + name: "drop table CASCADE", + want: `DROP TABLE IF EXISTS users, posts CASCADE;`, + sql: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + Behavior: parse.DropBehaviorCascade, + IfExists: true, + }, + }, + { + name: "drop table RESTRICT ", + want: `DROP TABLE users, posts RESTRICT;`, + sql: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + Behavior: parse.DropBehaviorRestrict, + }, + }, + { + name: "create index", + want: `CREATE INDEX abc ON user(name);`, + sql: &parse.CreateIndexStatement{ + Name: "abc", + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeBTree, + }, + }, + { + name: "create unique index", + want: `CREATE UNIQUE INDEX abc ON user(name);`, + sql: &parse.CreateIndexStatement{ + Name: "abc", + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeUnique, + }, + }, + { + name: "create index with no name", + want: `CREATE INDEX ON user(name);`, + sql: &parse.CreateIndexStatement{ + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeBTree, + }, + }, + { + name: "create index if not exist", + want: `CREATE INDEX IF NOT EXISTS abc ON user(name);`, + sql: &parse.CreateIndexStatement{ + IfNotExists: true, + Name: "abc", + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeBTree, + }, + }, + { + name: "drop index", + want: `DROP INDEX abc;`, + sql: &parse.DropIndexStatement{ + Name: "abc", + }, + }, + + { + name: "drop index if exist", + want: `DROP INDEX IF EXISTS abc;`, + sql: &parse.DropIndexStatement{ + Name: "abc", + CheckExist: true, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := generate.WriteDDL(tt.sql) + require.NoError(t, err) + assert.Equal(t, tt.want, got) + }) + } + +} + func TestGenerateDDL(t *testing.T) { type args struct { table *types.Table diff --git a/internal/engine/generate/plpgsql.go b/internal/engine/generate/plpgsql.go index c45bf58c2..beae4b626 100644 --- a/internal/engine/generate/plpgsql.go +++ b/internal/engine/generate/plpgsql.go @@ -790,6 +790,151 @@ func (s *sqlGenerator) VisitOrderingTerm(p0 *parse.OrderingTerm) any { return str.String() } +func (s *sqlGenerator) VisitCreateTableStatement(p0 *parse.CreateTableStatement) any { + str := strings.Builder{} + indent := " " + str.WriteString("CREATE TABLE ") + if p0.IfNotExists { + str.WriteString("IF NOT EXISTS ") + } + str.WriteString(p0.Name) + str.WriteString(" (\n") + for i, col := range p0.Columns { + str.WriteString(indent) + str.WriteString(col.Name) + str.WriteString(" ") + str.WriteString(col.Type.String()) + for _, con := range col.Constraints { + str.WriteString(" ") + if cc, ok := con.(*parse.ConstraintCheck); ok { + str.WriteString("CHECK(") + str.WriteString(cc.Param.Accept(s).(string)) + str.WriteString(")") + } else { + str.WriteString(con.ToSQL()) + } + } + if i < len(p0.Columns)-1 { + str.WriteString(",\n") + } + } + + if len(p0.Constraints) > 0 { + str.WriteString(",\n") + for i, con := range p0.Constraints { + str.WriteString(indent) + if cc, ok := con.(*parse.ConstraintCheck); ok { + str.WriteString("CHECK(") + str.WriteString(cc.Param.Accept(s).(string)) + str.WriteString(")") + } else { + str.WriteString(con.ToSQL()) + } + + if i < len(p0.Constraints)-1 { + str.WriteString(",\n") + } + } + } + + if len(p0.Indexes) > 0 { + str.WriteString(",\n") + for i, index := range p0.Indexes { + str.WriteString(indent) + str.WriteString(index.String()) + if i < len(p0.Indexes)-1 { + str.WriteString(",\n") + } + } + } + + str.WriteString("\n)") + return str.String() +} + +func (s *sqlGenerator) VisitAlterTableStatement(p0 *parse.AlterTableStatement) any { + str := strings.Builder{} + str.WriteString("ALTER TABLE ") + str.WriteString(p0.Table) + str.WriteString(" ") + + if action, ok := p0.Action.(*parse.AddTableConstraint); ok { + str.WriteString("ADD ") + switch cc := action.Cons.(type) { + case *parse.ConstraintCheck: + //str.WriteString(cc.Name) + str.WriteString("CHECK(") + str.WriteString(cc.Param.Accept(s).(string)) + str.WriteString(")") + case *parse.ConstraintForeignKey: + //str.WriteString(cc.Name) + str.WriteString(cc.ToSQL()) + default: + panic("unknown constraint type") + } + } else { + str.WriteString(p0.Action.ToSQL()) + } + + return str.String() +} + +func (s *sqlGenerator) VisitDropTableStatement(p0 *parse.DropTableStatement) any { + str := strings.Builder{} + str.WriteString("DROP TABLE ") + if p0.IfExists { + str.WriteString("IF EXISTS ") + } + + str.WriteString(strings.Join(p0.Tables, ", ")) + switch p0.Behavior { + case parse.DropBehaviorCascade: + str.WriteString(" CASCADE") + case parse.DropBehaviorRestrict: + str.WriteString(" RESTRICT") + case parse.DropBehaviorNon: + default: + panic("unknown drop behavior") + } + return str.String() +} + +func (s *sqlGenerator) VisitCreateIndexStatement(p0 *parse.CreateIndexStatement) any { + str := strings.Builder{} + str.WriteString("CREATE ") + + switch p0.Type { + case parse.IndexTypeBTree: + str.WriteString("INDEX ") + case parse.IndexTypeUnique: + str.WriteString("UNIQUE INDEX ") + default: + // should not happen + panic("unknown index type") + } + + if p0.IfNotExists { + str.WriteString("IF NOT EXISTS ") + } + if p0.Name != "" { + str.WriteString(p0.Name + " ") + } + str.WriteString("ON " + p0.On) + str.WriteString("(" + strings.Join(p0.Columns, ", ") + ")") + + return str.String() +} + +func (s *sqlGenerator) VisitDropIndexStatement(p0 *parse.DropIndexStatement) any { + str := strings.Builder{} + str.WriteString("DROP INDEX ") + if p0.CheckExist { + str.WriteString("IF EXISTS ") + } + str.WriteString(p0.Name) + return str.String() +} + // procedureGenerator is a visitor that generates plpgsql code. type procedureGenerator struct { sqlGenerator diff --git a/internal/engine/generate/sql.go b/internal/engine/generate/sql.go index 7fd2e188c..068a19047 100644 --- a/internal/engine/generate/sql.go +++ b/internal/engine/generate/sql.go @@ -30,3 +30,23 @@ func WriteSQL(node *parse.SQLStatement, orderParams bool, pgSchema string) (stmt return stmt + ";", sqlGen.orderedParams, nil } + +// WriteDDL converts a DDL node to a string. +// NOTE: this is temporary so that I can write tests, after we shift from *parse.SQLStatement +// to parse.SQLStmt, we can delete this. +func WriteDDL(node parse.SQLStmt) (stmt string, err error) { + if node == nil { + return "", fmt.Errorf("SQL parse node is nil") + } + + defer func() { + if e := recover(); e != nil { + err = fmt.Errorf("panic: %v", e) + } + }() + + sqlGen := &sqlGenerator{} + + stmt = node.Accept(sqlGen).(string) + return stmt + ";", nil +} diff --git a/internal/sql/pg/query.go b/internal/sql/pg/query.go index d9d7a9505..aac33eb97 100644 --- a/internal/sql/pg/query.go +++ b/internal/sql/pg/query.go @@ -7,8 +7,6 @@ import ( "time" "github.com/kwilteam/kwil-db/common/sql" - - "github.com/jackc/pgx/v5" ) func queryImpliedArgTypes(ctx context.Context, conn *pgx.Conn, stmt string, args ...any) (pgx.Rows, error) { @@ -305,7 +303,7 @@ func queryRowFuncAny(ctx context.Context, conn *pgx.Conn, stmt string, return err } - switch pgVal.(type) { // let native (sql/driver.Value) types pass + switch pgVal.(type) { // let native (sql/driver.Param) types pass case int64, float64, bool, []byte, string, time.Time, nil: default: // reject anything else unrecognized return err diff --git a/parse/analyze.go b/parse/analyze.go index 4241941d7..768707e8a 100644 --- a/parse/analyze.go +++ b/parse/analyze.go @@ -2051,6 +2051,26 @@ func (s *sqlAnalyzer) VisitOrderingTerm(p0 *OrderingTerm) any { return nil } +func (s *sqlAnalyzer) VisitCreateTableStatement(p0 *CreateTableStatement) any { + panic("sqlAnalyzer: not implemented") +} + +func (s *sqlAnalyzer) VisitAlterTableStatement(p0 *AlterTableStatement) any { + panic("sqlAnalyzer: not implemented") +} + +func (s *sqlAnalyzer) VisitDropTableStatement(p0 *DropTableStatement) any { + panic("sqlAnalyzer: not implemented") +} + +func (s *sqlAnalyzer) VisitCreateIndexStatement(p0 *CreateIndexStatement) any { + panic("sqlAnalyzer: not implemented") +} + +func (s *sqlAnalyzer) VisitDropIndexStatement(p0 *DropIndexStatement) any { + panic("sqlAnalyzer: not implemented") +} + // tableToRelation converts a table to a relation. func tableToRelation(t *types.Table) *Relation { attrs := make([]*Attribute, len(t.Columns)) diff --git a/parse/antlr.go b/parse/antlr.go index 9ec06d5e8..5b9f4ff76 100644 --- a/parse/antlr.go +++ b/parse/antlr.go @@ -79,7 +79,7 @@ func (s *schemaVisitor) VisitProcedure_entry(ctx *gen.Procedure_entryContext) an } func (s *schemaVisitor) VisitSql_entry(ctx *gen.Sql_entryContext) any { - return ctx.Sql().Accept(s) + return ctx.Sql_stmt().Accept(s) } // unknownExpression creates a new literal with an unknown type and null value. @@ -885,12 +885,35 @@ func (s *schemaVisitor) VisitProcedure_return(ctx *gen.Procedure_returnContext) return ret } -// VisitSQL visits a SQL statement. It is the top-level SQL visitor. -func (s *schemaVisitor) VisitSql(ctx *gen.SqlContext) any { - return ctx.Sql_statement().Accept(s) +// VisitSql_stmt_s visits a SQL statement. It is the top-level SQL visitor. +func (s *schemaVisitor) VisitSql_stmt(ctx *gen.Sql_stmtContext) any { + // NOTE: this should be temporary; we should combine dml and ddl. + if ctx.Sql_statement() != nil { + return ctx.Sql_statement().Accept(s) + } else { + return ctx.Ddl_stmt().Accept(s) + } +} + +// VisitDdl_stmt visits a SQL DDL statement. +func (s *schemaVisitor) VisitDdl_stmt(ctx *gen.Ddl_stmtContext) any { + switch { + case ctx.Create_table_statement() != nil: + return ctx.Create_table_statement().Accept(s).(*CreateTableStatement) + case ctx.Alter_table_statement() != nil: + return ctx.Alter_table_statement().Accept(s).(*AlterTableStatement) + case ctx.Drop_table_statement() != nil: + return ctx.Drop_table_statement().Accept(s).(*DropTableStatement) + case ctx.Create_index_statement() != nil: + return ctx.Create_index_statement().Accept(s).(*CreateIndexStatement) + case ctx.Drop_index_statement() != nil: + return ctx.Drop_index_statement().Accept(s).(*DropIndexStatement) + default: + panic("unknown DDL statement") + } } -// VisitSql_statement visits a SQL statement. It is called by all nested +// VisitSql_statement visits a SQL DML statement. It is called by all nested // sql statements (e.g. in procedures and actions) func (s *schemaVisitor) VisitSql_statement(ctx *gen.Sql_statementContext) any { stmt := &SQLStatement{ @@ -915,7 +938,7 @@ func (s *schemaVisitor) VisitSql_statement(ctx *gen.Sql_statementContext) any { case ctx.Delete_statement() != nil: stmt.SQL = ctx.Delete_statement().Accept(s).(*DeleteStatement) default: - panic("unknown sql statement") + panic("unknown dml statement") } stmt.Set(ctx) @@ -938,6 +961,442 @@ func (s *schemaVisitor) VisitCommon_table_expression(ctx *gen.Common_table_expre return cte } +func (s *schemaVisitor) VisitCreate_table_statement(ctx *gen.Create_table_statementContext) any { + stmt := &CreateTableStatement{ + Name: ctx.GetName().Accept(s).(string), + Columns: arr[*Column](len(ctx.AllTable_column_def())), + Constraints: arr[Constraint](len(ctx.AllTable_constraint_def())), + Indexes: arr[*TableIndex](len(ctx.AllTable_index_def())), + } + + if ctx.EXISTS() != nil { + stmt.IfNotExists = true + } + + // for basic validation + var primaryKey []string + allColumns := make(map[string]bool) + allConstraints := make(map[string]bool) + allIndexes := make(map[string]bool) + + if len(ctx.AllTable_column_def()) == 0 { + s.errs.RuleErr(ctx, ErrTableDefinition, "no column definitions found") + } + for i, c := range ctx.AllTable_column_def() { + col := c.Accept(s).(*Column) + stmt.Columns[i] = col + if allColumns[col.Name] { + s.errs.RuleErr(c, ErrCollation, "constraint name exists") + } else { + allColumns[col.Name] = true + } + } + + for _, column := range stmt.Columns { + for _, constraint := range column.Constraints { + switch constraint.(type) { + case *ConstraintPrimaryKey: + primaryKey = []string{column.Name} + } + } + } + + for i, c := range ctx.AllTable_constraint_def() { + constraint := c.Accept(s).(Constraint) + stmt.Constraints[i] = constraint + + switch cc := constraint.(type) { + case *ConstraintPrimaryKey: + if len(primaryKey) != 0 { + s.errs.RuleErr(c, ErrRedeclarePrimaryKey, "primary key redeclared") + continue + } + + for _, col := range cc.Columns { + if !allColumns[col] { + s.errs.RuleErr(c, ErrUnknownColumn, "primary key on unknown column") + } + } + + primaryKey = cc.Columns + case *ConstraintCheck: + if cc.Name != "" { + if allConstraints[cc.Name] { + s.errs.RuleErr(c, ErrCollation, "constraint name exists") + } else { + allConstraints[cc.Name] = true + } + } + case *ConstraintUnique: + if cc.Name != "" { + if allConstraints[cc.Name] { + s.errs.RuleErr(c, ErrCollation, "constraint name exists") + } else { + allConstraints[cc.Name] = true + } + } + + for _, col := range cc.Columns { + if !allColumns[col] { + s.errs.RuleErr(c, ErrUnknownColumn, "primary key on unknown column") + } + } + case *ConstraintForeignKey: + if cc.Name != "" { + if allConstraints[cc.Name] { + s.errs.RuleErr(c, ErrCollation, "constraint name exists") + } else { + allConstraints[cc.Name] = true + } + } + + if !allColumns[cc.RefColumn] { + s.errs.RuleErr(c, ErrUnknownColumn, "index on unknown column") + } + default: + // should not happen + panic("unknown constraint type") + } + } + + for i, c := range ctx.AllTable_index_def() { + idx := c.Accept(s).(*TableIndex) + stmt.Indexes[i] = idx + + if idx.Name != "" { + if allIndexes[idx.Name] { + s.errs.RuleErr(c, ErrCollation, "index name exists") + } else { + allIndexes[idx.Name] = true + } + } + + for _, col := range idx.Columns { + if !allColumns[col] { + s.errs.RuleErr(c, ErrUnknownColumn, "index on unknown column") + } + } + } + + if len(primaryKey) == 0 { + s.errs.RuleErr(ctx, ErrNoPrimaryKey, "no primary key declared") + } + + stmt.Set(ctx) + return stmt +} + +func (s *schemaVisitor) VisitTable_column_def(ctx *gen.Table_column_defContext) interface{} { + column := &Column{ + Name: s.getIdent(ctx.IDENTIFIER()), + Type: ctx.Type_().Accept(s).(*types.DataType), + Constraints: arr[Constraint](len(ctx.AllInline_constraint())), + } + + for i, c := range ctx.AllInline_constraint() { + column.Constraints[i] = c.Accept(s).(Constraint) + } + + column.Set(ctx) + return column +} + +func (s *schemaVisitor) VisitInline_constraint(ctx *gen.Inline_constraintContext) any { + switch { + case ctx.PRIMARY() != nil: + c := &ConstraintPrimaryKey{} + c.Set(ctx) + return c + case ctx.UNIQUE() != nil: + c := &ConstraintUnique{} + c.Set(ctx) + return c + case ctx.NOT() != nil: + c := &ConstraintNotNull{} + c.Set(ctx) + return c + case ctx.DEFAULT() != nil: + c := &ConstraintDefault{ + Value: ctx.Literal().Accept(s).(*ExpressionLiteral), + } + c.Set(ctx) + return c + case ctx.CHECK() != nil: + c := &ConstraintCheck{ + Param: ctx.Sql_expr().Accept(s).(Expression), + } + c.Set(ctx) + return c + case ctx.Fk_constraint() != nil: + c := ctx.Fk_constraint().Accept(s).(*ConstraintForeignKey) + return c + default: + panic("unknown constraint") + } +} + +func (s *schemaVisitor) VisitFk_constraint(ctx *gen.Fk_constraintContext) any { + c := &ConstraintForeignKey{ + RefTable: ctx.GetTable().Accept(s).(string), + RefColumn: ctx.GetColumn().Accept(s).(string), + Ons: arr[ForeignKeyActionOn](len(ctx.AllFk_action())), + Dos: arr[ForeignKeyActionDo](len(ctx.AllFk_action())), + } + + for i, a := range ctx.AllFk_action() { + switch { + case a.UPDATE() != nil: + c.Ons[i] = ON_UPDATE + case a.DELETE() != nil: + c.Ons[i] = ON_DELETE + default: + panic("unknown foreign key on condition") + } + + switch { + case a.NULL() != nil: + c.Dos[i] = DO_SET_NULL + case a.DEFAULT() != nil: + c.Dos[i] = DO_SET_DEFAULT + case a.RESTRICT() != nil: + c.Dos[i] = DO_RESTRICT + case a.ACTION() != nil: + c.Dos[i] = DO_NO_ACTION + case a.CASCADE() != nil: + c.Dos[i] = DO_CASCADE + default: + panic("unknown foreign key action") + } + } + + c.Set(ctx) + return c +} + +func (s *schemaVisitor) VisitFk_action(ctx *gen.Fk_actionContext) interface{} { + panic("implement me") +} + +func (s *schemaVisitor) VisitTable_constraint_def(ctx *gen.Table_constraint_defContext) any { + name := "" + if ctx.GetName() != nil { + name = ctx.GetName().Accept(s).(string) + } + + switch { + case ctx.PRIMARY() != nil: + if name != "" { + s.errs.RuleErr(ctx, ErrTableDefinition, "primary key has name") + } + c := &ConstraintPrimaryKey{ + Columns: ctx.Identifier_list().Accept(s).([]string), + } + c.Set(ctx) + return c + case ctx.UNIQUE() != nil: + c := &ConstraintUnique{ + Name: name, + Columns: ctx.Identifier_list().Accept(s).([]string), + } + c.Set(ctx) + return c + case ctx.CHECK() != nil: + param := ctx.Sql_expr().Accept(s).(Expression) + c := &ConstraintCheck{ + Name: name, + Param: param, + } + c.Set(ctx) + return c + case ctx.FOREIGN() != nil: + c := ctx.Fk_constraint().Accept(s).(*ConstraintForeignKey) + c.Name = name + c.Column = ctx.GetColumn().Accept(s).(string) + return c + default: + panic("unknown constraint") + } +} + +func (s *schemaVisitor) VisitTable_index_def(ctx *gen.Table_index_defContext) any { + index := &TableIndex{ + Name: ctx.Identifier().Accept(s).(string), + Columns: ctx.Identifier_list().Accept(s).([]string), + Type: IndexTypeBTree, + } + + if ctx.UNIQUE() != nil { + index.Type = IndexTypeUnique + } + + index.Set(ctx) + index.Set(ctx) + return index +} + +func (s *schemaVisitor) VisitDrop_table_statement(ctx *gen.Drop_table_statementContext) any { + stmt := &DropTableStatement{ + Tables: ctx.GetTables().Accept(s).([]string), + Behavior: ctx.Opt_drop_behavior().Accept(s).(DropBehavior), + } + + if ctx.EXISTS() != nil { + stmt.IfExists = true + } + + stmt.Set(ctx) + return stmt +} + +func (s *schemaVisitor) VisitOpt_drop_behavior(ctx *gen.Opt_drop_behaviorContext) any { + switch { + case ctx.CASCADE() != nil: + return DropBehaviorCascade + case ctx.RESTRICT() != nil: + return DropBehaviorRestrict + default: + return DropBehaviorNon + } +} + +func (s *schemaVisitor) VisitAlter_table_statement(ctx *gen.Alter_table_statementContext) any { + stmt := &AlterTableStatement{ + Table: ctx.Identifier().Accept(s).(string), + Action: ctx.Alter_table_action().Accept(s).(AlterTableAction), + } + + stmt.Set(ctx) + return stmt +} + +func (s *schemaVisitor) VisitAdd_column_constraint(ctx *gen.Add_column_constraintContext) any { + a := &AddColumnConstraint{ + Column: ctx.Identifier().Accept(s).(string), + } + + if ctx.NULL() != nil { + a.Type = NOT_NULL + } else { + a.Type = DEFAULT + a.Value = ctx.Literal().Accept(s).(*ExpressionLiteral) + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitDrop_column_constraint(ctx *gen.Drop_column_constraintContext) any { + a := &DropColumnConstraint{ + Column: ctx.Identifier(0).Accept(s).(string), + } + + switch { + case ctx.NULL() != nil: + a.Type = NOT_NULL + case ctx.DEFAULT() != nil: + a.Type = DEFAULT + case ctx.CONSTRAINT() != nil: + a.Name = ctx.Identifier(1).Accept(s).(string) + default: + panic("unknown constraint") + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitAdd_column(ctx *gen.Add_columnContext) any { + a := &AddColumn{ + Name: ctx.Identifier().Accept(s).(string), + Type: ctx.Type_().Accept(s).(*types.DataType), + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitDrop_column(ctx *gen.Drop_columnContext) any { + a := &DropColumn{ + Name: ctx.Identifier().Accept(s).(string), + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitRename_column(ctx *gen.Rename_columnContext) any { + a := &RenameColumn{ + OldName: ctx.GetOld_column().Accept(s).(string), + NewName: ctx.GetNew_column().Accept(s).(string), + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitRename_table(ctx *gen.Rename_tableContext) any { + a := &RenameTable{ + Name: ctx.Identifier().Accept(s).(string), + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitAdd_table_constraint(ctx *gen.Add_table_constraintContext) any { + a := &AddTableConstraint{ + Cons: ctx.Table_constraint_def().Accept(s).(Constraint), + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitDrop_table_constraint(ctx *gen.Drop_table_constraintContext) any { + a := &DropTableConstraint{ + Name: ctx.Identifier().Accept(s).(string), + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitCreate_index_statement(ctx *gen.Create_index_statementContext) any { + a := &CreateIndexStatement{ + On: ctx.GetTable().Accept(s).(string), + Columns: ctx.GetColumns().Accept(s).([]string), + Type: IndexTypeBTree, + } + + if ctx.EXISTS() != nil { + a.IfNotExists = true + } + + if ctx.GetName() != nil { + a.Name = ctx.GetName().Accept(s).(string) + } + + if ctx.UNIQUE() != nil { + a.Type = IndexTypeUnique + } + + a.Set(ctx) + return a +} + +func (s *schemaVisitor) VisitDrop_index_statement(ctx *gen.Drop_index_statementContext) interface{} { + a := &DropIndexStatement{ + Name: ctx.Identifier().Accept(s).(string), + } + + if ctx.EXISTS() != nil { + a.CheckExist = true + } + + a.Set(ctx) + return a +} + func (s *schemaVisitor) VisitSelect_statement(ctx *gen.Select_statementContext) any { stmt := &SelectStatement{ SelectCores: arr[*SelectCore](len(ctx.AllSelect_core())), diff --git a/parse/ast.go b/parse/ast.go index 64cc2fb73..15fee1d0c 100644 --- a/parse/ast.go +++ b/parse/ast.go @@ -507,11 +507,17 @@ func (c *CommonTableExpression) Accept(v Visitor) any { return v.VisitCommonTableExpression(c) } -// SQLStatement is a SQL statement. +// SQLStmt is top-level statement, can be any SQL statement. +type SQLStmt interface { + Node + StmtType() SQLStatementType +} + +// SQLStatement is a DML statement with common table expression. type SQLStatement struct { Position CTEs []*CommonTableExpression - // Recursive is true if the RECUSRIVE keyword is present. + // Recursive is true if the RECURSIVE keyword is present. Recursive bool // SQL can be an insert, update, delete, or select statement. SQL SQLCore @@ -521,7 +527,11 @@ func (s *SQLStatement) Accept(v Visitor) any { return v.VisitSQLStatement(s) } -// SQLCore is a top-level statement. +func (s *SQLStatement) StmtType() SQLStatementType { + return s.SQL.StmtType() +} + +// SQLCore is a DML statement. // It can be INSERT, UPDATE, DELETE, SELECT. type SQLCore interface { Node @@ -531,12 +541,579 @@ type SQLCore interface { type SQLStatementType string const ( - SQLStatementTypeInsert SQLStatementType = "insert" - SQLStatementTypeUpdate SQLStatementType = "update" - SQLStatementTypeDelete SQLStatementType = "delete" - SQLStatementTypeSelect SQLStatementType = "select" + SQLStatementTypeInsert SQLStatementType = "insert" + SQLStatementTypeUpdate SQLStatementType = "update" + SQLStatementTypeDelete SQLStatementType = "delete" + SQLStatementTypeSelect SQLStatementType = "select" + SQLStatementTypeCreateTable SQLStatementType = "create_table" + SQLStatementTypeAlterTable SQLStatementType = "alter_table" + SQLStatementTypeDropTable SQLStatementType = "drop_table" + SQLStatementTypeCreateIndex SQLStatementType = "create_index" + SQLStatementTypeDropIndex SQLStatementType = "drop_index" +) + +// CreateTableStatement is a CREATE TABLE statement. +type CreateTableStatement struct { + Position + + IfNotExists bool + Name string + Columns []*Column + // Indexes contains the non-inline indexes + Indexes []*TableIndex + // Constraints contains the non-inline constraints + Constraints []Constraint +} + +func (c *CreateTableStatement) Accept(v Visitor) any { + return v.VisitCreateTableStatement(c) + +} + +func (c *CreateTableStatement) StmtType() SQLStatementType { + return SQLStatementTypeCreateTable +} + +// Column represents a table column. +type Column struct { + Position + + Name string + Type *types.DataType + Constraints []Constraint +} + +type ConstraintType string + +const ( + PRIMARY_KEY ConstraintType = "PRIMARY KEY" + DEFAULT ConstraintType = "DEFAULT" + NOT_NULL ConstraintType = "NOT NULL" + UNIQUE ConstraintType = "UNIQUE" + CHECK ConstraintType = "CHECK" + FOREIGN_KEY ConstraintType = "FOREIGN KEY" + //CUSTOM ConstraintType = "CUSTOM" +) + +type Constraint interface { + Node + + ConstraintType() ConstraintType + ToSQL() string +} + +type ConstraintPrimaryKey struct { + Position + + Columns []string +} + +func (c *ConstraintPrimaryKey) Accept(visitor Visitor) any { + panic("implement me") +} + +func (c *ConstraintPrimaryKey) ConstraintType() ConstraintType { + return PRIMARY_KEY +} + +func (c *ConstraintPrimaryKey) ToSQL() string { + if len(c.Columns) == 0 { + return "PRIMARY KEY" + } + + return "PRIMARY KEY (" + strings.Join(c.Columns, ", ") + ")" +} + +type ConstraintUnique struct { + Position + + Name string + Columns []string +} + +func (c *ConstraintUnique) Accept(visitor Visitor) any { + panic("implement me") +} + +func (c *ConstraintUnique) ConstraintType() ConstraintType { + return UNIQUE +} + +func (c *ConstraintUnique) ToSQL() string { + if len(c.Columns) == 0 { + return "UNIQUE" + } + + s := "UNIQUE (" + strings.Join(c.Columns, ", ") + ")" + if c.Name == "" { + return s + } + + return "CONSTRAINT " + c.Name + " " + s +} + +type ConstraintDefault struct { + Position + + Name string + Column string + Value *ExpressionLiteral +} + +func (c *ConstraintDefault) Accept(visitor Visitor) any { + panic("implement me") +} + +func (c *ConstraintDefault) ConstraintType() ConstraintType { + return DEFAULT +} + +func (c *ConstraintDefault) ToSQL() string { + return "DEFAULT " + c.Value.String() +} + +type ConstraintNotNull struct { + Position + + Name string + Column string +} + +func (c *ConstraintNotNull) Accept(visitor Visitor) any { + panic("implement me") +} + +func (c *ConstraintNotNull) ConstraintType() ConstraintType { + return NOT_NULL +} + +func (c *ConstraintNotNull) ToSQL() string { + return "NOT NULL" +} + +type ConstraintCheck struct { + Position + + Name string + Param Expression +} + +func (c *ConstraintCheck) Accept(visitor Visitor) any { + panic("implement me") +} + +func (c *ConstraintCheck) ConstraintType() ConstraintType { + return CHECK +} + +func (c *ConstraintCheck) ToSQL() string { + return "" +} + +type ConstraintForeignKey struct { + Position + + Name string + RefTable string + RefColumn string + Column string + Ons []ForeignKeyActionOn + Dos []ForeignKeyActionDo +} + +func (c *ConstraintForeignKey) Accept(visitor Visitor) any { + panic("implement me") +} + +func (c *ConstraintForeignKey) ConstraintType() ConstraintType { + return FOREIGN_KEY +} + +func (c *ConstraintForeignKey) ToSQL() string { + s := "REFERENCES " + c.RefTable + "(" + c.RefColumn + ")" + if len(c.Ons) == 0 { + return s + } + + for i, on := range c.Ons { + s += " ON " + string(on) + " " + string(c.Dos[i]) + } + + if c.Name == "" { + return s + } + + return "CONSTRAINT " + c.Name + " FOREIGN KEY (" + c.Column + ") " + s +} + +type IndexType string + +const ( + // IndexTypePrimary is a primary index, created by using `PRIMARY KEY`. + // Only one primary index is allowed per table. + IndexTypePrimary IndexType = "primary" + // IndexTypeBTree is the default index, created by using `INDEX`. + IndexTypeBTree IndexType = "btree" + // IndexTypeUnique is a unique BTree index, created by using `UNIQUE INDEX`. + IndexTypeUnique IndexType = "unique" +) + +// TableIndex represents table index declaration, both inline and non-inline. +type TableIndex struct { + Position + + Name string + Columns []string + Type IndexType +} + +func (i *TableIndex) String() string { + if len(i.Columns) == 0 { + if i.Type == IndexTypeUnique { + return "UNIQUE" + } + panic("inline index can only be UNIQUE") + } + + str := strings.Builder{} + + switch i.Type { + case IndexTypeBTree: + str.WriteString("INDEX ") + case IndexTypeUnique: + str.WriteString("UNIQUE INDEX ") + default: + // should not happen + panic("unknown index type") + } + + if i.Name != "" { + str.WriteString(i.Name + " ") + } + + str.WriteString("(" + strings.Join(i.Columns, ", ") + ")") + + return str.String() +} + +// ForeignKey is a foreign key in a table. +type ForeignKey struct { + // ChildKeys are the columns that are referencing another. + // For example, in FOREIGN KEY (a) REFERENCES tbl2(b), "a" is the child key + ChildKeys []string `json:"child_keys"` + + // ParentKeys are the columns that are being referred to. + // For example, in FOREIGN KEY (a) REFERENCES tbl2(b), "b" is the parent key + ParentKeys []string `json:"parent_keys"` + + // ParentTable is the table that holds the parent columns. + // For example, in FOREIGN KEY (a) REFERENCES tbl2(b), "tbl2" is the parent table + ParentTable string `json:"parent_table"` + + // Do we need parent schema stored with meta data or should assume and + // enforce same schema when creating the dataset with generated DDL. + // ParentSchema string `json:"parent_schema"` + + // Action refers to what the foreign key should do when the parent is altered. + // This is NOT the same as a database action; + // however sqlite's docs refer to these as actions, + // so we should be consistent with that. + // For example, ON DELETE CASCADE is a foreign key action + Actions []*ForeignKeyAction `json:"actions"` +} + +// ForeignKeyActionOn specifies when a foreign key action should occur. +// It can be either "UPDATE" or "DELETE". +type ForeignKeyActionOn string + +// ForeignKeyActionOn types +const ( + // ON_UPDATE is used to specify an action should occur when a parent key is updated + ON_UPDATE ForeignKeyActionOn = "UPDATE" + // ON_DELETE is used to specify an action should occur when a parent key is deleted + ON_DELETE ForeignKeyActionOn = "DELETE" ) +// ForeignKeyActionDo specifies what should be done when a foreign key action is triggered. +type ForeignKeyActionDo string + +// ForeignKeyActionDo types +const ( + // DO_NO_ACTION does nothing when a parent key is altered + DO_NO_ACTION ForeignKeyActionDo = "NO ACTION" + + // DO_RESTRICT prevents the parent key from being altered + DO_RESTRICT ForeignKeyActionDo = "RESTRICT" + + // DO_SET_NULL sets the child key(s) to NULL + DO_SET_NULL ForeignKeyActionDo = "SET NULL" + + // DO_SET_DEFAULT sets the child key(s) to their default values + DO_SET_DEFAULT ForeignKeyActionDo = "SET DEFAULT" + + // DO_CASCADE updates the child key(s) or deletes the records (depending on the action type) + DO_CASCADE ForeignKeyActionDo = "CASCADE" +) + +// ForeignKeyAction is used to specify what should occur +// if a parent key is updated or deleted +type ForeignKeyAction struct { + // On can be either "UPDATE" or "DELETE" + On ForeignKeyActionOn `json:"on"` + + // Do specifies what a foreign key action should do + Do ForeignKeyActionDo `json:"do"` +} + +type DropBehavior string + +const ( + DropBehaviorCascade DropBehavior = "CASCADE" + DropBehaviorRestrict DropBehavior = "RESTRICT" + DropBehaviorNon DropBehavior = "" +) + +type DropTableStatement struct { + Position + + Tables []string + IfExists bool + Behavior DropBehavior +} + +func (s *DropTableStatement) Accept(v Visitor) any { + return v.VisitDropTableStatement(s) +} + +func (s *DropTableStatement) StmtType() SQLStatementType { + return SQLStatementTypeDropTable +} + +type AlterTableAction interface { + Node + + alterTableAction() + ToSQL() string +} + +// AlterTableStatement is a ALTER TABLE statement. +type AlterTableStatement struct { + Position + + Table string + Action AlterTableAction +} + +func (a *AlterTableStatement) Accept(v Visitor) any { + return v.VisitAlterTableStatement(a) +} + +func (a *AlterTableStatement) StmtType() SQLStatementType { + return SQLStatementTypeAlterTable +} + +type AddColumnConstraint struct { + Position + + Column string + Type ConstraintType + Value *ExpressionLiteral +} + +func (a *AddColumnConstraint) Accept(v Visitor) any { + panic("implement me") +} + +func (a *AddColumnConstraint) alterTableAction() {} + +func (a *AddColumnConstraint) ToSQL() string { + str := strings.Builder{} + str.WriteString("ALTER COLUMN ") + str.WriteString(a.Column) + str.WriteString(" SET ") + switch a.Type { + case NOT_NULL: + str.WriteString("NOT NULL") + case DEFAULT: + str.WriteString("DEFAULT ") + str.WriteString(a.Value.String()) + default: + panic("unknown constraint type") + } + + return str.String() +} + +type DropColumnConstraint struct { + Position + + Column string + Type ConstraintType + Name string // will be set when drop a named constraint +} + +func (a *DropColumnConstraint) Accept(v Visitor) any { + panic("implement me") +} + +func (a *DropColumnConstraint) alterTableAction() {} + +func (a *DropColumnConstraint) ToSQL() string { + str := strings.Builder{} + str.WriteString("ALTER COLUMN ") + str.WriteString(a.Column) + str.WriteString(" DROP ") + + if a.Type != "" { + switch a.Type { + case NOT_NULL: + str.WriteString("NOT NULL") + case DEFAULT: + str.WriteString("DEFAULT") + default: + panic("unknown constraint type") + } + } + + if a.Name != "" { + str.WriteString("CONSTRAINT ") + str.WriteString(a.Name) + } + + return str.String() +} + +type AddColumn struct { + Position + + Name string + Type *types.DataType +} + +func (a *AddColumn) Accept(v Visitor) any { + panic("implement me") +} + +func (a *AddColumn) alterTableAction() {} + +func (a *AddColumn) ToSQL() string { + return "ADD COLUMN " + a.Name + " " + a.Type.String() +} + +type DropColumn struct { + Position + + Name string +} + +func (a *DropColumn) Accept(v Visitor) any { + panic("implement me") +} + +func (a *DropColumn) alterTableAction() {} + +func (a *DropColumn) ToSQL() string { + return "DROP COLUMN " + a.Name +} + +type RenameColumn struct { + Position + + OldName string + NewName string +} + +func (a *RenameColumn) Accept(v Visitor) any { + panic("implement me") +} + +func (a *RenameColumn) alterTableAction() {} + +func (a *RenameColumn) ToSQL() string { + return "RENAME COLUMN " + a.OldName + " TO " + a.NewName +} + +type RenameTable struct { + Position + + Name string +} + +func (a *RenameTable) Accept(v Visitor) any { + panic("implement me") +} + +func (a *RenameTable) alterTableAction() {} + +func (a *RenameTable) ToSQL() string { + return "RENAME TO " + a.Name +} + +type AddTableConstraint struct { + Position + + Cons Constraint +} + +func (a *AddTableConstraint) Accept(v Visitor) any { + panic("implement me") +} + +func (a *AddTableConstraint) alterTableAction() {} + +func (a *AddTableConstraint) ToSQL() string { + return "" +} + +type DropTableConstraint struct { + Position + + Name string +} + +func (a *DropTableConstraint) Accept(v Visitor) any { + panic("implement me") +} + +func (a *DropTableConstraint) alterTableAction() {} + +func (a *DropTableConstraint) ToSQL() string { + return "DROP CONSTRAINT " + a.Name +} + +type CreateIndexStatement struct { + Position + + IfNotExists bool + Name string + On string + Columns []string + Type IndexType +} + +func (s *CreateIndexStatement) Accept(v Visitor) any { + return v.VisitCreateIndexStatement(s) +} + +func (s *CreateIndexStatement) StmtType() SQLStatementType { + return SQLStatementTypeCreateIndex +} + +type DropIndexStatement struct { + Position + + Name string + CheckExist bool +} + +func (s *DropIndexStatement) Accept(v Visitor) any { + return v.VisitDropIndexStatement(s) +} + +func (s *DropIndexStatement) StmtType() SQLStatementType { + return SQLStatementTypeDropIndex +} + // SelectStatement is a SELECT statement. type SelectStatement struct { Position @@ -1095,6 +1672,12 @@ type SQLVisitor interface { VisitInsertStatement(*InsertStatement) any VisitUpsertClause(*OnConflict) any VisitOrderingTerm(*OrderingTerm) any + // DDL + VisitCreateTableStatement(*CreateTableStatement) any + VisitAlterTableStatement(*AlterTableStatement) any + VisitDropTableStatement(*DropTableStatement) any + VisitCreateIndexStatement(*CreateIndexStatement) any + VisitDropIndexStatement(*DropIndexStatement) any } // UnimplementedSqlVisitor is meant to be used when an implementing visitor only intends diff --git a/parse/errors.go b/parse/errors.go index eb8b34c89..3d6ab4de6 100644 --- a/parse/errors.go +++ b/parse/errors.go @@ -257,5 +257,6 @@ var ( ErrAmbiguousConflictTable = errors.New("ambiguous conflict table") ErrCollation = errors.New("collation error") ErrNoPrimaryKey = errors.New("missing primary key") + ErrRedeclarePrimaryKey = errors.New("redeclare primary key") ErrReservedKeyword = errors.New("reserved keyword") ) diff --git a/parse/gen/kuneiform_lexer.go b/parse/gen/kuneiform_lexer.go index 7053b0957..2c7191c86 100644 --- a/parse/gen/kuneiform_lexer.go +++ b/parse/gen/kuneiform_lexer.go @@ -47,20 +47,22 @@ func kuneiformlexerLexerInit() { "'!'", "'.'", "'||'", "'*'", "'='", "'=='", "'#'", "'$'", "'%'", "'+'", "'-'", "'/'", "", "'<'", "'<='", "'>'", "'>='", "'::'", "'_'", "':='", "'..'", "'\"'", "'database'", "'use'", "'table'", "'action'", "'procedure'", - "'public'", "'private'", "'view'", "'owner'", "'foreign'", "'primary'", - "'key'", "'on'", "'do'", "'unique'", "'cascade'", "'restrict'", "'set'", - "'default'", "'null'", "'delete'", "'update'", "'references'", "'ref'", - "'not'", "'index'", "'and'", "'or'", "'like'", "'ilike'", "'in'", "'between'", - "'is'", "'exists'", "'all'", "'any'", "'join'", "'left'", "'right'", - "'inner'", "'as'", "'asc'", "'desc'", "'limit'", "'offset'", "'order'", - "'by'", "'group'", "'having'", "'returns'", "'no'", "'with'", "'case'", - "'when'", "'then'", "'end'", "'distinct'", "'from'", "'where'", "'collate'", - "'select'", "'insert'", "'values'", "'full'", "'union'", "'intersect'", - "'except'", "'nulls'", "'first'", "'last'", "'returning'", "'into'", - "'conflict'", "'nothing'", "'for'", "'if'", "'elseif'", "'else'", "'break'", - "'return'", "'next'", "'over'", "'partition'", "'window'", "'filter'", - "'recursive'", "", "'true'", "'false'", "", "", "", "'on_update'", "'on_delete'", - "'set_default'", "'set_null'", "'no_action'", + "'public'", "'private'", "'view'", "'owner'", "'create'", "'alter'", + "'column'", "'add'", "'drop'", "'rename'", "'to'", "'constraint'", "'check'", + "'foreign'", "'primary'", "'key'", "'on'", "'do'", "'unique'", "'cascade'", + "'restrict'", "'set'", "'default'", "'null'", "'delete'", "'update'", + "'references'", "'ref'", "'not'", "'index'", "'and'", "'or'", "'like'", + "'ilike'", "'in'", "'between'", "'is'", "'exists'", "'all'", "'any'", + "'join'", "'left'", "'right'", "'inner'", "'as'", "'asc'", "'desc'", + "'limit'", "'offset'", "'order'", "'by'", "'group'", "'having'", "'returns'", + "'no'", "'with'", "'case'", "'when'", "'then'", "'end'", "'distinct'", + "'from'", "'where'", "'collate'", "'select'", "'insert'", "'values'", + "'full'", "'union'", "'intersect'", "'except'", "'nulls'", "'first'", + "'last'", "'returning'", "'into'", "'conflict'", "'nothing'", "'for'", + "'if'", "'elseif'", "'else'", "'break'", "'return'", "'next'", "'over'", + "'partition'", "'window'", "'filter'", "'recursive'", "", "'true'", + "'false'", "", "", "", "'on_update'", "'on_delete'", "'set_default'", + "'set_null'", "'no_action'", } staticData.SymbolicNames = []string{ "", "LBRACE", "RBRACE", "LBRACKET", "RBRACKET", "COL", "SCOL", "LPAREN", @@ -68,20 +70,21 @@ func kuneiformlexerLexerInit() { "EQUATE", "HASH", "DOLLAR", "MOD", "PLUS", "MINUS", "DIV", "NEQ", "LT", "LTE", "GT", "GTE", "TYPE_CAST", "UNDERSCORE", "ASSIGN", "RANGE", "DOUBLE_QUOTE", "DATABASE", "USE", "TABLE", "ACTION", "PROCEDURE", "PUBLIC", "PRIVATE", - "VIEW", "OWNER", "FOREIGN", "PRIMARY", "KEY", "ON", "DO", "UNIQUE", - "CASCADE", "RESTRICT", "SET", "DEFAULT", "NULL", "DELETE", "UPDATE", - "REFERENCES", "REF", "NOT", "INDEX", "AND", "OR", "LIKE", "ILIKE", "IN", - "BETWEEN", "IS", "EXISTS", "ALL", "ANY", "JOIN", "LEFT", "RIGHT", "INNER", - "AS", "ASC", "DESC", "LIMIT", "OFFSET", "ORDER", "BY", "GROUP", "HAVING", - "RETURNS", "NO", "WITH", "CASE", "WHEN", "THEN", "END", "DISTINCT", - "FROM", "WHERE", "COLLATE", "SELECT", "INSERT", "VALUES", "FULL", "UNION", - "INTERSECT", "EXCEPT", "NULLS", "FIRST", "LAST", "RETURNING", "INTO", - "CONFLICT", "NOTHING", "FOR", "IF", "ELSEIF", "ELSE", "BREAK", "RETURN", - "NEXT", "OVER", "PARTITION", "WINDOW", "FILTER", "RECURSIVE", "STRING_", - "TRUE", "FALSE", "DIGITS_", "BINARY_", "LEGACY_FOREIGN_KEY", "LEGACY_ON_UPDATE", - "LEGACY_ON_DELETE", "LEGACY_SET_DEFAULT", "LEGACY_SET_NULL", "LEGACY_NO_ACTION", - "IDENTIFIER", "VARIABLE", "CONTEXTUAL_VARIABLE", "HASH_IDENTIFIER", - "WS", "BLOCK_COMMENT", "LINE_COMMENT", + "VIEW", "OWNER", "CREATE", "ALTER", "COLUMN", "ADD", "DROP", "RENAME", + "TO", "CONSTRAINT", "CHECK", "FOREIGN", "PRIMARY", "KEY", "ON", "DO", + "UNIQUE", "CASCADE", "RESTRICT", "SET", "DEFAULT", "NULL", "DELETE", + "UPDATE", "REFERENCES", "REF", "NOT", "INDEX", "AND", "OR", "LIKE", + "ILIKE", "IN", "BETWEEN", "IS", "EXISTS", "ALL", "ANY", "JOIN", "LEFT", + "RIGHT", "INNER", "AS", "ASC", "DESC", "LIMIT", "OFFSET", "ORDER", "BY", + "GROUP", "HAVING", "RETURNS", "NO", "WITH", "CASE", "WHEN", "THEN", + "END", "DISTINCT", "FROM", "WHERE", "COLLATE", "SELECT", "INSERT", "VALUES", + "FULL", "UNION", "INTERSECT", "EXCEPT", "NULLS", "FIRST", "LAST", "RETURNING", + "INTO", "CONFLICT", "NOTHING", "FOR", "IF", "ELSEIF", "ELSE", "BREAK", + "RETURN", "NEXT", "OVER", "PARTITION", "WINDOW", "FILTER", "RECURSIVE", + "STRING_", "TRUE", "FALSE", "DIGITS_", "BINARY_", "LEGACY_FOREIGN_KEY", + "LEGACY_ON_UPDATE", "LEGACY_ON_DELETE", "LEGACY_SET_DEFAULT", "LEGACY_SET_NULL", + "LEGACY_NO_ACTION", "IDENTIFIER", "VARIABLE", "CONTEXTUAL_VARIABLE", + "HASH_IDENTIFIER", "WS", "BLOCK_COMMENT", "LINE_COMMENT", } staticData.RuleNames = []string{ "LBRACE", "RBRACE", "LBRACKET", "RBRACKET", "COL", "SCOL", "LPAREN", @@ -89,24 +92,25 @@ func kuneiformlexerLexerInit() { "EQUATE", "HASH", "DOLLAR", "MOD", "PLUS", "MINUS", "DIV", "NEQ", "LT", "LTE", "GT", "GTE", "TYPE_CAST", "UNDERSCORE", "ASSIGN", "RANGE", "DOUBLE_QUOTE", "DATABASE", "USE", "TABLE", "ACTION", "PROCEDURE", "PUBLIC", "PRIVATE", - "VIEW", "OWNER", "FOREIGN", "PRIMARY", "KEY", "ON", "DO", "UNIQUE", - "CASCADE", "RESTRICT", "SET", "DEFAULT", "NULL", "DELETE", "UPDATE", - "REFERENCES", "REF", "NOT", "INDEX", "AND", "OR", "LIKE", "ILIKE", "IN", - "BETWEEN", "IS", "EXISTS", "ALL", "ANY", "JOIN", "LEFT", "RIGHT", "INNER", - "AS", "ASC", "DESC", "LIMIT", "OFFSET", "ORDER", "BY", "GROUP", "HAVING", - "RETURNS", "NO", "WITH", "CASE", "WHEN", "THEN", "END", "DISTINCT", - "FROM", "WHERE", "COLLATE", "SELECT", "INSERT", "VALUES", "FULL", "UNION", - "INTERSECT", "EXCEPT", "NULLS", "FIRST", "LAST", "RETURNING", "INTO", - "CONFLICT", "NOTHING", "FOR", "IF", "ELSEIF", "ELSE", "BREAK", "RETURN", - "NEXT", "OVER", "PARTITION", "WINDOW", "FILTER", "RECURSIVE", "STRING_", - "TRUE", "FALSE", "DIGITS_", "BINARY_", "LEGACY_FOREIGN_KEY", "LEGACY_ON_UPDATE", - "LEGACY_ON_DELETE", "LEGACY_SET_DEFAULT", "LEGACY_SET_NULL", "LEGACY_NO_ACTION", - "IDENTIFIER", "VARIABLE", "CONTEXTUAL_VARIABLE", "HASH_IDENTIFIER", - "WS", "BLOCK_COMMENT", "LINE_COMMENT", + "VIEW", "OWNER", "CREATE", "ALTER", "COLUMN", "ADD", "DROP", "RENAME", + "TO", "CONSTRAINT", "CHECK", "FOREIGN", "PRIMARY", "KEY", "ON", "DO", + "UNIQUE", "CASCADE", "RESTRICT", "SET", "DEFAULT", "NULL", "DELETE", + "UPDATE", "REFERENCES", "REF", "NOT", "INDEX", "AND", "OR", "LIKE", + "ILIKE", "IN", "BETWEEN", "IS", "EXISTS", "ALL", "ANY", "JOIN", "LEFT", + "RIGHT", "INNER", "AS", "ASC", "DESC", "LIMIT", "OFFSET", "ORDER", "BY", + "GROUP", "HAVING", "RETURNS", "NO", "WITH", "CASE", "WHEN", "THEN", + "END", "DISTINCT", "FROM", "WHERE", "COLLATE", "SELECT", "INSERT", "VALUES", + "FULL", "UNION", "INTERSECT", "EXCEPT", "NULLS", "FIRST", "LAST", "RETURNING", + "INTO", "CONFLICT", "NOTHING", "FOR", "IF", "ELSEIF", "ELSE", "BREAK", + "RETURN", "NEXT", "OVER", "PARTITION", "WINDOW", "FILTER", "RECURSIVE", + "STRING_", "TRUE", "FALSE", "DIGITS_", "BINARY_", "LEGACY_FOREIGN_KEY", + "LEGACY_ON_UPDATE", "LEGACY_ON_DELETE", "LEGACY_SET_DEFAULT", "LEGACY_SET_NULL", + "LEGACY_NO_ACTION", "IDENTIFIER", "VARIABLE", "CONTEXTUAL_VARIABLE", + "HASH_IDENTIFIER", "WS", "BLOCK_COMMENT", "LINE_COMMENT", } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 0, 136, 1015, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, + 4, 0, 145, 1089, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, @@ -133,11 +137,13 @@ func kuneiformlexerLexerInit() { 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, - 7, 135, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, + 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, + 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, + 7, 144, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, - 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 324, 8, 22, 1, + 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 342, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, @@ -146,407 +152,440 @@ func kuneiformlexerLexerInit() { 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, - 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, - 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, - 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, - 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, + 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, + 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, + 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, + 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, - 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, - 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, - 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, - 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, - 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, - 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, - 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, - 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, - 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, - 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, - 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, - 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, - 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, - 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, - 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, - 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, - 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, - 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, - 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, - 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, - 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, - 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, - 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, - 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, - 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, - 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, - 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, - 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, - 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, - 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, - 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, - 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, - 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, - 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, - 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, - 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, - 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, - 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, - 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, - 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, - 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, - 1, 118, 5, 118, 874, 8, 118, 10, 118, 12, 118, 877, 9, 118, 1, 118, 1, - 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, - 120, 1, 120, 1, 120, 1, 121, 4, 121, 893, 8, 121, 11, 121, 12, 121, 894, - 1, 122, 1, 122, 1, 122, 1, 122, 4, 122, 901, 8, 122, 11, 122, 12, 122, - 902, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, - 123, 1, 123, 1, 123, 1, 123, 1, 123, 3, 123, 918, 8, 123, 1, 124, 1, 124, - 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, - 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, + 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, + 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, + 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 55, 1, + 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, + 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, + 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, + 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, + 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, + 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, + 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, + 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, + 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, + 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, + 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, + 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, + 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, + 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, + 80, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, + 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, + 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, + 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, + 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, + 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, + 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, + 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, + 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, + 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, + 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, + 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, + 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, + 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, + 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, + 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, + 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, + 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, + 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, + 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, + 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, + 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, + 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, + 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, + 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, + 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, + 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, + 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, + 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, - 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, - 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, - 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 5, 129, 973, 8, 129, 10, - 129, 12, 129, 976, 9, 129, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, - 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, - 1, 134, 1, 134, 5, 134, 995, 8, 134, 10, 134, 12, 134, 998, 9, 134, 1, - 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 5, - 135, 1009, 8, 135, 10, 135, 12, 135, 1012, 9, 135, 1, 135, 1, 135, 1, 996, - 0, 136, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, - 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, - 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, - 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, - 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, - 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, - 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, - 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, - 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, - 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, - 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, - 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, - 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, - 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, - 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, - 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, - 133, 267, 134, 269, 135, 271, 136, 1, 0, 32, 2, 0, 68, 68, 100, 100, 2, - 0, 65, 65, 97, 97, 2, 0, 84, 84, 116, 116, 2, 0, 66, 66, 98, 98, 2, 0, - 83, 83, 115, 115, 2, 0, 69, 69, 101, 101, 2, 0, 85, 85, 117, 117, 2, 0, - 76, 76, 108, 108, 2, 0, 67, 67, 99, 99, 2, 0, 73, 73, 105, 105, 2, 0, 79, - 79, 111, 111, 2, 0, 78, 78, 110, 110, 2, 0, 80, 80, 112, 112, 2, 0, 82, - 82, 114, 114, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 70, - 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 77, 77, 109, 109, 2, 0, 89, - 89, 121, 121, 2, 0, 75, 75, 107, 107, 2, 0, 81, 81, 113, 113, 2, 0, 88, - 88, 120, 120, 2, 0, 74, 74, 106, 106, 2, 0, 72, 72, 104, 104, 2, 0, 39, - 39, 92, 92, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 65, 90, - 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 11, 13, 13, 32, - 32, 2, 0, 10, 10, 13, 13, 1023, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, - 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, - 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, - 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, - 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, - 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, - 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, - 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, - 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, - 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, - 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, - 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, - 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, - 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, - 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, - 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, - 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, - 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, - 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, - 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, - 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, - 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, - 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, - 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, - 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, - 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, - 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, - 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, - 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, - 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, - 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, - 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, - 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, - 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, - 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, - 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, - 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, - 0, 0, 0, 271, 1, 0, 0, 0, 1, 273, 1, 0, 0, 0, 3, 275, 1, 0, 0, 0, 5, 277, - 1, 0, 0, 0, 7, 279, 1, 0, 0, 0, 9, 281, 1, 0, 0, 0, 11, 283, 1, 0, 0, 0, - 13, 285, 1, 0, 0, 0, 15, 287, 1, 0, 0, 0, 17, 289, 1, 0, 0, 0, 19, 291, - 1, 0, 0, 0, 21, 293, 1, 0, 0, 0, 23, 295, 1, 0, 0, 0, 25, 297, 1, 0, 0, - 0, 27, 300, 1, 0, 0, 0, 29, 302, 1, 0, 0, 0, 31, 304, 1, 0, 0, 0, 33, 307, - 1, 0, 0, 0, 35, 309, 1, 0, 0, 0, 37, 311, 1, 0, 0, 0, 39, 313, 1, 0, 0, - 0, 41, 315, 1, 0, 0, 0, 43, 317, 1, 0, 0, 0, 45, 323, 1, 0, 0, 0, 47, 325, - 1, 0, 0, 0, 49, 327, 1, 0, 0, 0, 51, 330, 1, 0, 0, 0, 53, 332, 1, 0, 0, - 0, 55, 335, 1, 0, 0, 0, 57, 338, 1, 0, 0, 0, 59, 340, 1, 0, 0, 0, 61, 343, - 1, 0, 0, 0, 63, 346, 1, 0, 0, 0, 65, 348, 1, 0, 0, 0, 67, 357, 1, 0, 0, - 0, 69, 361, 1, 0, 0, 0, 71, 367, 1, 0, 0, 0, 73, 374, 1, 0, 0, 0, 75, 384, - 1, 0, 0, 0, 77, 391, 1, 0, 0, 0, 79, 399, 1, 0, 0, 0, 81, 404, 1, 0, 0, - 0, 83, 410, 1, 0, 0, 0, 85, 418, 1, 0, 0, 0, 87, 426, 1, 0, 0, 0, 89, 430, - 1, 0, 0, 0, 91, 433, 1, 0, 0, 0, 93, 436, 1, 0, 0, 0, 95, 443, 1, 0, 0, - 0, 97, 451, 1, 0, 0, 0, 99, 460, 1, 0, 0, 0, 101, 464, 1, 0, 0, 0, 103, - 472, 1, 0, 0, 0, 105, 477, 1, 0, 0, 0, 107, 484, 1, 0, 0, 0, 109, 491, - 1, 0, 0, 0, 111, 502, 1, 0, 0, 0, 113, 506, 1, 0, 0, 0, 115, 510, 1, 0, - 0, 0, 117, 516, 1, 0, 0, 0, 119, 520, 1, 0, 0, 0, 121, 523, 1, 0, 0, 0, - 123, 528, 1, 0, 0, 0, 125, 534, 1, 0, 0, 0, 127, 537, 1, 0, 0, 0, 129, - 545, 1, 0, 0, 0, 131, 548, 1, 0, 0, 0, 133, 555, 1, 0, 0, 0, 135, 559, - 1, 0, 0, 0, 137, 563, 1, 0, 0, 0, 139, 568, 1, 0, 0, 0, 141, 573, 1, 0, - 0, 0, 143, 579, 1, 0, 0, 0, 145, 585, 1, 0, 0, 0, 147, 588, 1, 0, 0, 0, - 149, 592, 1, 0, 0, 0, 151, 597, 1, 0, 0, 0, 153, 603, 1, 0, 0, 0, 155, - 610, 1, 0, 0, 0, 157, 616, 1, 0, 0, 0, 159, 619, 1, 0, 0, 0, 161, 625, - 1, 0, 0, 0, 163, 632, 1, 0, 0, 0, 165, 640, 1, 0, 0, 0, 167, 643, 1, 0, - 0, 0, 169, 648, 1, 0, 0, 0, 171, 653, 1, 0, 0, 0, 173, 658, 1, 0, 0, 0, - 175, 663, 1, 0, 0, 0, 177, 667, 1, 0, 0, 0, 179, 676, 1, 0, 0, 0, 181, - 681, 1, 0, 0, 0, 183, 687, 1, 0, 0, 0, 185, 695, 1, 0, 0, 0, 187, 702, - 1, 0, 0, 0, 189, 709, 1, 0, 0, 0, 191, 716, 1, 0, 0, 0, 193, 721, 1, 0, - 0, 0, 195, 727, 1, 0, 0, 0, 197, 737, 1, 0, 0, 0, 199, 744, 1, 0, 0, 0, - 201, 750, 1, 0, 0, 0, 203, 756, 1, 0, 0, 0, 205, 761, 1, 0, 0, 0, 207, - 771, 1, 0, 0, 0, 209, 776, 1, 0, 0, 0, 211, 785, 1, 0, 0, 0, 213, 793, - 1, 0, 0, 0, 215, 797, 1, 0, 0, 0, 217, 800, 1, 0, 0, 0, 219, 807, 1, 0, - 0, 0, 221, 812, 1, 0, 0, 0, 223, 818, 1, 0, 0, 0, 225, 825, 1, 0, 0, 0, - 227, 830, 1, 0, 0, 0, 229, 835, 1, 0, 0, 0, 231, 845, 1, 0, 0, 0, 233, - 852, 1, 0, 0, 0, 235, 859, 1, 0, 0, 0, 237, 869, 1, 0, 0, 0, 239, 880, - 1, 0, 0, 0, 241, 885, 1, 0, 0, 0, 243, 892, 1, 0, 0, 0, 245, 896, 1, 0, - 0, 0, 247, 917, 1, 0, 0, 0, 249, 919, 1, 0, 0, 0, 251, 929, 1, 0, 0, 0, - 253, 939, 1, 0, 0, 0, 255, 951, 1, 0, 0, 0, 257, 960, 1, 0, 0, 0, 259, - 970, 1, 0, 0, 0, 261, 977, 1, 0, 0, 0, 263, 980, 1, 0, 0, 0, 265, 983, - 1, 0, 0, 0, 267, 986, 1, 0, 0, 0, 269, 990, 1, 0, 0, 0, 271, 1004, 1, 0, - 0, 0, 273, 274, 5, 123, 0, 0, 274, 2, 1, 0, 0, 0, 275, 276, 5, 125, 0, - 0, 276, 4, 1, 0, 0, 0, 277, 278, 5, 91, 0, 0, 278, 6, 1, 0, 0, 0, 279, - 280, 5, 93, 0, 0, 280, 8, 1, 0, 0, 0, 281, 282, 5, 58, 0, 0, 282, 10, 1, - 0, 0, 0, 283, 284, 5, 59, 0, 0, 284, 12, 1, 0, 0, 0, 285, 286, 5, 40, 0, - 0, 286, 14, 1, 0, 0, 0, 287, 288, 5, 41, 0, 0, 288, 16, 1, 0, 0, 0, 289, - 290, 5, 44, 0, 0, 290, 18, 1, 0, 0, 0, 291, 292, 5, 64, 0, 0, 292, 20, - 1, 0, 0, 0, 293, 294, 5, 33, 0, 0, 294, 22, 1, 0, 0, 0, 295, 296, 5, 46, - 0, 0, 296, 24, 1, 0, 0, 0, 297, 298, 5, 124, 0, 0, 298, 299, 5, 124, 0, - 0, 299, 26, 1, 0, 0, 0, 300, 301, 5, 42, 0, 0, 301, 28, 1, 0, 0, 0, 302, - 303, 5, 61, 0, 0, 303, 30, 1, 0, 0, 0, 304, 305, 5, 61, 0, 0, 305, 306, - 5, 61, 0, 0, 306, 32, 1, 0, 0, 0, 307, 308, 5, 35, 0, 0, 308, 34, 1, 0, - 0, 0, 309, 310, 5, 36, 0, 0, 310, 36, 1, 0, 0, 0, 311, 312, 5, 37, 0, 0, - 312, 38, 1, 0, 0, 0, 313, 314, 5, 43, 0, 0, 314, 40, 1, 0, 0, 0, 315, 316, - 5, 45, 0, 0, 316, 42, 1, 0, 0, 0, 317, 318, 5, 47, 0, 0, 318, 44, 1, 0, - 0, 0, 319, 320, 5, 33, 0, 0, 320, 324, 5, 61, 0, 0, 321, 322, 5, 60, 0, - 0, 322, 324, 5, 62, 0, 0, 323, 319, 1, 0, 0, 0, 323, 321, 1, 0, 0, 0, 324, - 46, 1, 0, 0, 0, 325, 326, 5, 60, 0, 0, 326, 48, 1, 0, 0, 0, 327, 328, 5, - 60, 0, 0, 328, 329, 5, 61, 0, 0, 329, 50, 1, 0, 0, 0, 330, 331, 5, 62, - 0, 0, 331, 52, 1, 0, 0, 0, 332, 333, 5, 62, 0, 0, 333, 334, 5, 61, 0, 0, - 334, 54, 1, 0, 0, 0, 335, 336, 5, 58, 0, 0, 336, 337, 5, 58, 0, 0, 337, - 56, 1, 0, 0, 0, 338, 339, 5, 95, 0, 0, 339, 58, 1, 0, 0, 0, 340, 341, 5, - 58, 0, 0, 341, 342, 5, 61, 0, 0, 342, 60, 1, 0, 0, 0, 343, 344, 5, 46, - 0, 0, 344, 345, 5, 46, 0, 0, 345, 62, 1, 0, 0, 0, 346, 347, 5, 34, 0, 0, - 347, 64, 1, 0, 0, 0, 348, 349, 7, 0, 0, 0, 349, 350, 7, 1, 0, 0, 350, 351, - 7, 2, 0, 0, 351, 352, 7, 1, 0, 0, 352, 353, 7, 3, 0, 0, 353, 354, 7, 1, - 0, 0, 354, 355, 7, 4, 0, 0, 355, 356, 7, 5, 0, 0, 356, 66, 1, 0, 0, 0, - 357, 358, 7, 6, 0, 0, 358, 359, 7, 4, 0, 0, 359, 360, 7, 5, 0, 0, 360, - 68, 1, 0, 0, 0, 361, 362, 7, 2, 0, 0, 362, 363, 7, 1, 0, 0, 363, 364, 7, - 3, 0, 0, 364, 365, 7, 7, 0, 0, 365, 366, 7, 5, 0, 0, 366, 70, 1, 0, 0, - 0, 367, 368, 7, 1, 0, 0, 368, 369, 7, 8, 0, 0, 369, 370, 7, 2, 0, 0, 370, - 371, 7, 9, 0, 0, 371, 372, 7, 10, 0, 0, 372, 373, 7, 11, 0, 0, 373, 72, - 1, 0, 0, 0, 374, 375, 7, 12, 0, 0, 375, 376, 7, 13, 0, 0, 376, 377, 7, - 10, 0, 0, 377, 378, 7, 8, 0, 0, 378, 379, 7, 5, 0, 0, 379, 380, 7, 0, 0, - 0, 380, 381, 7, 6, 0, 0, 381, 382, 7, 13, 0, 0, 382, 383, 7, 5, 0, 0, 383, - 74, 1, 0, 0, 0, 384, 385, 7, 12, 0, 0, 385, 386, 7, 6, 0, 0, 386, 387, - 7, 3, 0, 0, 387, 388, 7, 7, 0, 0, 388, 389, 7, 9, 0, 0, 389, 390, 7, 8, - 0, 0, 390, 76, 1, 0, 0, 0, 391, 392, 7, 12, 0, 0, 392, 393, 7, 13, 0, 0, - 393, 394, 7, 9, 0, 0, 394, 395, 7, 14, 0, 0, 395, 396, 7, 1, 0, 0, 396, - 397, 7, 2, 0, 0, 397, 398, 7, 5, 0, 0, 398, 78, 1, 0, 0, 0, 399, 400, 7, - 14, 0, 0, 400, 401, 7, 9, 0, 0, 401, 402, 7, 5, 0, 0, 402, 403, 7, 15, - 0, 0, 403, 80, 1, 0, 0, 0, 404, 405, 7, 10, 0, 0, 405, 406, 7, 15, 0, 0, - 406, 407, 7, 11, 0, 0, 407, 408, 7, 5, 0, 0, 408, 409, 7, 13, 0, 0, 409, - 82, 1, 0, 0, 0, 410, 411, 7, 16, 0, 0, 411, 412, 7, 10, 0, 0, 412, 413, - 7, 13, 0, 0, 413, 414, 7, 5, 0, 0, 414, 415, 7, 9, 0, 0, 415, 416, 7, 17, - 0, 0, 416, 417, 7, 11, 0, 0, 417, 84, 1, 0, 0, 0, 418, 419, 7, 12, 0, 0, - 419, 420, 7, 13, 0, 0, 420, 421, 7, 9, 0, 0, 421, 422, 7, 18, 0, 0, 422, - 423, 7, 1, 0, 0, 423, 424, 7, 13, 0, 0, 424, 425, 7, 19, 0, 0, 425, 86, - 1, 0, 0, 0, 426, 427, 7, 20, 0, 0, 427, 428, 7, 5, 0, 0, 428, 429, 7, 19, - 0, 0, 429, 88, 1, 0, 0, 0, 430, 431, 7, 10, 0, 0, 431, 432, 7, 11, 0, 0, - 432, 90, 1, 0, 0, 0, 433, 434, 7, 0, 0, 0, 434, 435, 7, 10, 0, 0, 435, - 92, 1, 0, 0, 0, 436, 437, 7, 6, 0, 0, 437, 438, 7, 11, 0, 0, 438, 439, - 7, 9, 0, 0, 439, 440, 7, 21, 0, 0, 440, 441, 7, 6, 0, 0, 441, 442, 7, 5, - 0, 0, 442, 94, 1, 0, 0, 0, 443, 444, 7, 8, 0, 0, 444, 445, 7, 1, 0, 0, - 445, 446, 7, 4, 0, 0, 446, 447, 7, 8, 0, 0, 447, 448, 7, 1, 0, 0, 448, - 449, 7, 0, 0, 0, 449, 450, 7, 5, 0, 0, 450, 96, 1, 0, 0, 0, 451, 452, 7, - 13, 0, 0, 452, 453, 7, 5, 0, 0, 453, 454, 7, 4, 0, 0, 454, 455, 7, 2, 0, - 0, 455, 456, 7, 13, 0, 0, 456, 457, 7, 9, 0, 0, 457, 458, 7, 8, 0, 0, 458, - 459, 7, 2, 0, 0, 459, 98, 1, 0, 0, 0, 460, 461, 7, 4, 0, 0, 461, 462, 7, - 5, 0, 0, 462, 463, 7, 2, 0, 0, 463, 100, 1, 0, 0, 0, 464, 465, 7, 0, 0, - 0, 465, 466, 7, 5, 0, 0, 466, 467, 7, 16, 0, 0, 467, 468, 7, 1, 0, 0, 468, - 469, 7, 6, 0, 0, 469, 470, 7, 7, 0, 0, 470, 471, 7, 2, 0, 0, 471, 102, - 1, 0, 0, 0, 472, 473, 7, 11, 0, 0, 473, 474, 7, 6, 0, 0, 474, 475, 7, 7, - 0, 0, 475, 476, 7, 7, 0, 0, 476, 104, 1, 0, 0, 0, 477, 478, 7, 0, 0, 0, - 478, 479, 7, 5, 0, 0, 479, 480, 7, 7, 0, 0, 480, 481, 7, 5, 0, 0, 481, - 482, 7, 2, 0, 0, 482, 483, 7, 5, 0, 0, 483, 106, 1, 0, 0, 0, 484, 485, - 7, 6, 0, 0, 485, 486, 7, 12, 0, 0, 486, 487, 7, 0, 0, 0, 487, 488, 7, 1, - 0, 0, 488, 489, 7, 2, 0, 0, 489, 490, 7, 5, 0, 0, 490, 108, 1, 0, 0, 0, - 491, 492, 7, 13, 0, 0, 492, 493, 7, 5, 0, 0, 493, 494, 7, 16, 0, 0, 494, - 495, 7, 5, 0, 0, 495, 496, 7, 13, 0, 0, 496, 497, 7, 5, 0, 0, 497, 498, - 7, 11, 0, 0, 498, 499, 7, 8, 0, 0, 499, 500, 7, 5, 0, 0, 500, 501, 7, 4, - 0, 0, 501, 110, 1, 0, 0, 0, 502, 503, 7, 13, 0, 0, 503, 504, 7, 5, 0, 0, - 504, 505, 7, 16, 0, 0, 505, 112, 1, 0, 0, 0, 506, 507, 7, 11, 0, 0, 507, - 508, 7, 10, 0, 0, 508, 509, 7, 2, 0, 0, 509, 114, 1, 0, 0, 0, 510, 511, - 7, 9, 0, 0, 511, 512, 7, 11, 0, 0, 512, 513, 7, 0, 0, 0, 513, 514, 7, 5, - 0, 0, 514, 515, 7, 22, 0, 0, 515, 116, 1, 0, 0, 0, 516, 517, 7, 1, 0, 0, - 517, 518, 7, 11, 0, 0, 518, 519, 7, 0, 0, 0, 519, 118, 1, 0, 0, 0, 520, - 521, 7, 10, 0, 0, 521, 522, 7, 13, 0, 0, 522, 120, 1, 0, 0, 0, 523, 524, - 7, 7, 0, 0, 524, 525, 7, 9, 0, 0, 525, 526, 7, 20, 0, 0, 526, 527, 7, 5, - 0, 0, 527, 122, 1, 0, 0, 0, 528, 529, 7, 9, 0, 0, 529, 530, 7, 7, 0, 0, - 530, 531, 7, 9, 0, 0, 531, 532, 7, 20, 0, 0, 532, 533, 7, 5, 0, 0, 533, - 124, 1, 0, 0, 0, 534, 535, 7, 9, 0, 0, 535, 536, 7, 11, 0, 0, 536, 126, - 1, 0, 0, 0, 537, 538, 7, 3, 0, 0, 538, 539, 7, 5, 0, 0, 539, 540, 7, 2, - 0, 0, 540, 541, 7, 15, 0, 0, 541, 542, 7, 5, 0, 0, 542, 543, 7, 5, 0, 0, - 543, 544, 7, 11, 0, 0, 544, 128, 1, 0, 0, 0, 545, 546, 7, 9, 0, 0, 546, - 547, 7, 4, 0, 0, 547, 130, 1, 0, 0, 0, 548, 549, 7, 5, 0, 0, 549, 550, - 7, 22, 0, 0, 550, 551, 7, 9, 0, 0, 551, 552, 7, 4, 0, 0, 552, 553, 7, 2, - 0, 0, 553, 554, 7, 4, 0, 0, 554, 132, 1, 0, 0, 0, 555, 556, 7, 1, 0, 0, - 556, 557, 7, 7, 0, 0, 557, 558, 7, 7, 0, 0, 558, 134, 1, 0, 0, 0, 559, - 560, 7, 1, 0, 0, 560, 561, 7, 11, 0, 0, 561, 562, 7, 19, 0, 0, 562, 136, - 1, 0, 0, 0, 563, 564, 7, 23, 0, 0, 564, 565, 7, 10, 0, 0, 565, 566, 7, - 9, 0, 0, 566, 567, 7, 11, 0, 0, 567, 138, 1, 0, 0, 0, 568, 569, 7, 7, 0, - 0, 569, 570, 7, 5, 0, 0, 570, 571, 7, 16, 0, 0, 571, 572, 7, 2, 0, 0, 572, - 140, 1, 0, 0, 0, 573, 574, 7, 13, 0, 0, 574, 575, 7, 9, 0, 0, 575, 576, - 7, 17, 0, 0, 576, 577, 7, 24, 0, 0, 577, 578, 7, 2, 0, 0, 578, 142, 1, - 0, 0, 0, 579, 580, 7, 9, 0, 0, 580, 581, 7, 11, 0, 0, 581, 582, 7, 11, - 0, 0, 582, 583, 7, 5, 0, 0, 583, 584, 7, 13, 0, 0, 584, 144, 1, 0, 0, 0, - 585, 586, 7, 1, 0, 0, 586, 587, 7, 4, 0, 0, 587, 146, 1, 0, 0, 0, 588, - 589, 7, 1, 0, 0, 589, 590, 7, 4, 0, 0, 590, 591, 7, 8, 0, 0, 591, 148, - 1, 0, 0, 0, 592, 593, 7, 0, 0, 0, 593, 594, 7, 5, 0, 0, 594, 595, 7, 4, - 0, 0, 595, 596, 7, 8, 0, 0, 596, 150, 1, 0, 0, 0, 597, 598, 7, 7, 0, 0, - 598, 599, 7, 9, 0, 0, 599, 600, 7, 18, 0, 0, 600, 601, 7, 9, 0, 0, 601, - 602, 7, 2, 0, 0, 602, 152, 1, 0, 0, 0, 603, 604, 7, 10, 0, 0, 604, 605, - 7, 16, 0, 0, 605, 606, 7, 16, 0, 0, 606, 607, 7, 4, 0, 0, 607, 608, 7, - 5, 0, 0, 608, 609, 7, 2, 0, 0, 609, 154, 1, 0, 0, 0, 610, 611, 7, 10, 0, - 0, 611, 612, 7, 13, 0, 0, 612, 613, 7, 0, 0, 0, 613, 614, 7, 5, 0, 0, 614, - 615, 7, 13, 0, 0, 615, 156, 1, 0, 0, 0, 616, 617, 7, 3, 0, 0, 617, 618, - 7, 19, 0, 0, 618, 158, 1, 0, 0, 0, 619, 620, 7, 17, 0, 0, 620, 621, 7, - 13, 0, 0, 621, 622, 7, 10, 0, 0, 622, 623, 7, 6, 0, 0, 623, 624, 7, 12, - 0, 0, 624, 160, 1, 0, 0, 0, 625, 626, 7, 24, 0, 0, 626, 627, 7, 1, 0, 0, - 627, 628, 7, 14, 0, 0, 628, 629, 7, 9, 0, 0, 629, 630, 7, 11, 0, 0, 630, - 631, 7, 17, 0, 0, 631, 162, 1, 0, 0, 0, 632, 633, 7, 13, 0, 0, 633, 634, - 7, 5, 0, 0, 634, 635, 7, 2, 0, 0, 635, 636, 7, 6, 0, 0, 636, 637, 7, 13, - 0, 0, 637, 638, 7, 11, 0, 0, 638, 639, 7, 4, 0, 0, 639, 164, 1, 0, 0, 0, - 640, 641, 7, 11, 0, 0, 641, 642, 7, 10, 0, 0, 642, 166, 1, 0, 0, 0, 643, - 644, 7, 15, 0, 0, 644, 645, 7, 9, 0, 0, 645, 646, 7, 2, 0, 0, 646, 647, - 7, 24, 0, 0, 647, 168, 1, 0, 0, 0, 648, 649, 7, 8, 0, 0, 649, 650, 7, 1, - 0, 0, 650, 651, 7, 4, 0, 0, 651, 652, 7, 5, 0, 0, 652, 170, 1, 0, 0, 0, - 653, 654, 7, 15, 0, 0, 654, 655, 7, 24, 0, 0, 655, 656, 7, 5, 0, 0, 656, - 657, 7, 11, 0, 0, 657, 172, 1, 0, 0, 0, 658, 659, 7, 2, 0, 0, 659, 660, - 7, 24, 0, 0, 660, 661, 7, 5, 0, 0, 661, 662, 7, 11, 0, 0, 662, 174, 1, - 0, 0, 0, 663, 664, 7, 5, 0, 0, 664, 665, 7, 11, 0, 0, 665, 666, 7, 0, 0, - 0, 666, 176, 1, 0, 0, 0, 667, 668, 7, 0, 0, 0, 668, 669, 7, 9, 0, 0, 669, - 670, 7, 4, 0, 0, 670, 671, 7, 2, 0, 0, 671, 672, 7, 9, 0, 0, 672, 673, - 7, 11, 0, 0, 673, 674, 7, 8, 0, 0, 674, 675, 7, 2, 0, 0, 675, 178, 1, 0, - 0, 0, 676, 677, 7, 16, 0, 0, 677, 678, 7, 13, 0, 0, 678, 679, 7, 10, 0, - 0, 679, 680, 7, 18, 0, 0, 680, 180, 1, 0, 0, 0, 681, 682, 7, 15, 0, 0, - 682, 683, 7, 24, 0, 0, 683, 684, 7, 5, 0, 0, 684, 685, 7, 13, 0, 0, 685, - 686, 7, 5, 0, 0, 686, 182, 1, 0, 0, 0, 687, 688, 7, 8, 0, 0, 688, 689, - 7, 10, 0, 0, 689, 690, 7, 7, 0, 0, 690, 691, 7, 7, 0, 0, 691, 692, 7, 1, - 0, 0, 692, 693, 7, 2, 0, 0, 693, 694, 7, 5, 0, 0, 694, 184, 1, 0, 0, 0, - 695, 696, 7, 4, 0, 0, 696, 697, 7, 5, 0, 0, 697, 698, 7, 7, 0, 0, 698, - 699, 7, 5, 0, 0, 699, 700, 7, 8, 0, 0, 700, 701, 7, 2, 0, 0, 701, 186, - 1, 0, 0, 0, 702, 703, 7, 9, 0, 0, 703, 704, 7, 11, 0, 0, 704, 705, 7, 4, - 0, 0, 705, 706, 7, 5, 0, 0, 706, 707, 7, 13, 0, 0, 707, 708, 7, 2, 0, 0, - 708, 188, 1, 0, 0, 0, 709, 710, 7, 14, 0, 0, 710, 711, 7, 1, 0, 0, 711, - 712, 7, 7, 0, 0, 712, 713, 7, 6, 0, 0, 713, 714, 7, 5, 0, 0, 714, 715, - 7, 4, 0, 0, 715, 190, 1, 0, 0, 0, 716, 717, 7, 16, 0, 0, 717, 718, 7, 6, - 0, 0, 718, 719, 7, 7, 0, 0, 719, 720, 7, 7, 0, 0, 720, 192, 1, 0, 0, 0, - 721, 722, 7, 6, 0, 0, 722, 723, 7, 11, 0, 0, 723, 724, 7, 9, 0, 0, 724, - 725, 7, 10, 0, 0, 725, 726, 7, 11, 0, 0, 726, 194, 1, 0, 0, 0, 727, 728, - 7, 9, 0, 0, 728, 729, 7, 11, 0, 0, 729, 730, 7, 2, 0, 0, 730, 731, 7, 5, - 0, 0, 731, 732, 7, 13, 0, 0, 732, 733, 7, 4, 0, 0, 733, 734, 7, 5, 0, 0, - 734, 735, 7, 8, 0, 0, 735, 736, 7, 2, 0, 0, 736, 196, 1, 0, 0, 0, 737, - 738, 7, 5, 0, 0, 738, 739, 7, 22, 0, 0, 739, 740, 7, 8, 0, 0, 740, 741, - 7, 5, 0, 0, 741, 742, 7, 12, 0, 0, 742, 743, 7, 2, 0, 0, 743, 198, 1, 0, - 0, 0, 744, 745, 7, 11, 0, 0, 745, 746, 7, 6, 0, 0, 746, 747, 7, 7, 0, 0, - 747, 748, 7, 7, 0, 0, 748, 749, 7, 4, 0, 0, 749, 200, 1, 0, 0, 0, 750, - 751, 7, 16, 0, 0, 751, 752, 7, 9, 0, 0, 752, 753, 7, 13, 0, 0, 753, 754, - 7, 4, 0, 0, 754, 755, 7, 2, 0, 0, 755, 202, 1, 0, 0, 0, 756, 757, 7, 7, - 0, 0, 757, 758, 7, 1, 0, 0, 758, 759, 7, 4, 0, 0, 759, 760, 7, 2, 0, 0, - 760, 204, 1, 0, 0, 0, 761, 762, 7, 13, 0, 0, 762, 763, 7, 5, 0, 0, 763, - 764, 7, 2, 0, 0, 764, 765, 7, 6, 0, 0, 765, 766, 7, 13, 0, 0, 766, 767, - 7, 11, 0, 0, 767, 768, 7, 9, 0, 0, 768, 769, 7, 11, 0, 0, 769, 770, 7, - 17, 0, 0, 770, 206, 1, 0, 0, 0, 771, 772, 7, 9, 0, 0, 772, 773, 7, 11, - 0, 0, 773, 774, 7, 2, 0, 0, 774, 775, 7, 10, 0, 0, 775, 208, 1, 0, 0, 0, - 776, 777, 7, 8, 0, 0, 777, 778, 7, 10, 0, 0, 778, 779, 7, 11, 0, 0, 779, - 780, 7, 16, 0, 0, 780, 781, 7, 7, 0, 0, 781, 782, 7, 9, 0, 0, 782, 783, - 7, 8, 0, 0, 783, 784, 7, 2, 0, 0, 784, 210, 1, 0, 0, 0, 785, 786, 7, 11, - 0, 0, 786, 787, 7, 10, 0, 0, 787, 788, 7, 2, 0, 0, 788, 789, 7, 24, 0, - 0, 789, 790, 7, 9, 0, 0, 790, 791, 7, 11, 0, 0, 791, 792, 7, 17, 0, 0, - 792, 212, 1, 0, 0, 0, 793, 794, 7, 16, 0, 0, 794, 795, 7, 10, 0, 0, 795, - 796, 7, 13, 0, 0, 796, 214, 1, 0, 0, 0, 797, 798, 7, 9, 0, 0, 798, 799, - 7, 16, 0, 0, 799, 216, 1, 0, 0, 0, 800, 801, 7, 5, 0, 0, 801, 802, 7, 7, - 0, 0, 802, 803, 7, 4, 0, 0, 803, 804, 7, 5, 0, 0, 804, 805, 7, 9, 0, 0, - 805, 806, 7, 16, 0, 0, 806, 218, 1, 0, 0, 0, 807, 808, 7, 5, 0, 0, 808, - 809, 7, 7, 0, 0, 809, 810, 7, 4, 0, 0, 810, 811, 7, 5, 0, 0, 811, 220, - 1, 0, 0, 0, 812, 813, 7, 3, 0, 0, 813, 814, 7, 13, 0, 0, 814, 815, 7, 5, - 0, 0, 815, 816, 7, 1, 0, 0, 816, 817, 7, 20, 0, 0, 817, 222, 1, 0, 0, 0, - 818, 819, 7, 13, 0, 0, 819, 820, 7, 5, 0, 0, 820, 821, 7, 2, 0, 0, 821, - 822, 7, 6, 0, 0, 822, 823, 7, 13, 0, 0, 823, 824, 7, 11, 0, 0, 824, 224, - 1, 0, 0, 0, 825, 826, 7, 11, 0, 0, 826, 827, 7, 5, 0, 0, 827, 828, 7, 22, - 0, 0, 828, 829, 7, 2, 0, 0, 829, 226, 1, 0, 0, 0, 830, 831, 7, 10, 0, 0, - 831, 832, 7, 14, 0, 0, 832, 833, 7, 5, 0, 0, 833, 834, 7, 13, 0, 0, 834, - 228, 1, 0, 0, 0, 835, 836, 7, 12, 0, 0, 836, 837, 7, 1, 0, 0, 837, 838, - 7, 13, 0, 0, 838, 839, 7, 2, 0, 0, 839, 840, 7, 9, 0, 0, 840, 841, 7, 2, - 0, 0, 841, 842, 7, 9, 0, 0, 842, 843, 7, 10, 0, 0, 843, 844, 7, 11, 0, - 0, 844, 230, 1, 0, 0, 0, 845, 846, 7, 15, 0, 0, 846, 847, 7, 9, 0, 0, 847, - 848, 7, 11, 0, 0, 848, 849, 7, 0, 0, 0, 849, 850, 7, 10, 0, 0, 850, 851, - 7, 15, 0, 0, 851, 232, 1, 0, 0, 0, 852, 853, 7, 16, 0, 0, 853, 854, 7, - 9, 0, 0, 854, 855, 7, 7, 0, 0, 855, 856, 7, 2, 0, 0, 856, 857, 7, 5, 0, - 0, 857, 858, 7, 13, 0, 0, 858, 234, 1, 0, 0, 0, 859, 860, 7, 13, 0, 0, - 860, 861, 7, 5, 0, 0, 861, 862, 7, 8, 0, 0, 862, 863, 7, 6, 0, 0, 863, - 864, 7, 13, 0, 0, 864, 865, 7, 4, 0, 0, 865, 866, 7, 9, 0, 0, 866, 867, - 7, 14, 0, 0, 867, 868, 7, 5, 0, 0, 868, 236, 1, 0, 0, 0, 869, 875, 5, 39, - 0, 0, 870, 874, 8, 25, 0, 0, 871, 872, 5, 92, 0, 0, 872, 874, 9, 0, 0, - 0, 873, 870, 1, 0, 0, 0, 873, 871, 1, 0, 0, 0, 874, 877, 1, 0, 0, 0, 875, - 873, 1, 0, 0, 0, 875, 876, 1, 0, 0, 0, 876, 878, 1, 0, 0, 0, 877, 875, - 1, 0, 0, 0, 878, 879, 5, 39, 0, 0, 879, 238, 1, 0, 0, 0, 880, 881, 7, 2, - 0, 0, 881, 882, 7, 13, 0, 0, 882, 883, 7, 6, 0, 0, 883, 884, 7, 5, 0, 0, - 884, 240, 1, 0, 0, 0, 885, 886, 7, 16, 0, 0, 886, 887, 7, 1, 0, 0, 887, - 888, 7, 7, 0, 0, 888, 889, 7, 4, 0, 0, 889, 890, 7, 5, 0, 0, 890, 242, - 1, 0, 0, 0, 891, 893, 7, 26, 0, 0, 892, 891, 1, 0, 0, 0, 893, 894, 1, 0, - 0, 0, 894, 892, 1, 0, 0, 0, 894, 895, 1, 0, 0, 0, 895, 244, 1, 0, 0, 0, - 896, 897, 5, 48, 0, 0, 897, 898, 7, 22, 0, 0, 898, 900, 1, 0, 0, 0, 899, - 901, 7, 27, 0, 0, 900, 899, 1, 0, 0, 0, 901, 902, 1, 0, 0, 0, 902, 900, - 1, 0, 0, 0, 902, 903, 1, 0, 0, 0, 903, 246, 1, 0, 0, 0, 904, 905, 7, 16, - 0, 0, 905, 906, 7, 10, 0, 0, 906, 907, 7, 13, 0, 0, 907, 908, 7, 5, 0, - 0, 908, 909, 7, 9, 0, 0, 909, 910, 7, 17, 0, 0, 910, 911, 7, 11, 0, 0, - 911, 912, 5, 95, 0, 0, 912, 913, 7, 20, 0, 0, 913, 914, 7, 5, 0, 0, 914, - 918, 7, 19, 0, 0, 915, 916, 7, 16, 0, 0, 916, 918, 7, 20, 0, 0, 917, 904, - 1, 0, 0, 0, 917, 915, 1, 0, 0, 0, 918, 248, 1, 0, 0, 0, 919, 920, 7, 10, - 0, 0, 920, 921, 7, 11, 0, 0, 921, 922, 5, 95, 0, 0, 922, 923, 7, 6, 0, - 0, 923, 924, 7, 12, 0, 0, 924, 925, 7, 0, 0, 0, 925, 926, 7, 1, 0, 0, 926, - 927, 7, 2, 0, 0, 927, 928, 7, 5, 0, 0, 928, 250, 1, 0, 0, 0, 929, 930, - 7, 10, 0, 0, 930, 931, 7, 11, 0, 0, 931, 932, 5, 95, 0, 0, 932, 933, 7, - 0, 0, 0, 933, 934, 7, 5, 0, 0, 934, 935, 7, 7, 0, 0, 935, 936, 7, 5, 0, - 0, 936, 937, 7, 2, 0, 0, 937, 938, 7, 5, 0, 0, 938, 252, 1, 0, 0, 0, 939, - 940, 7, 4, 0, 0, 940, 941, 7, 5, 0, 0, 941, 942, 7, 2, 0, 0, 942, 943, - 5, 95, 0, 0, 943, 944, 7, 0, 0, 0, 944, 945, 7, 5, 0, 0, 945, 946, 7, 16, - 0, 0, 946, 947, 7, 1, 0, 0, 947, 948, 7, 6, 0, 0, 948, 949, 7, 7, 0, 0, - 949, 950, 7, 2, 0, 0, 950, 254, 1, 0, 0, 0, 951, 952, 7, 4, 0, 0, 952, - 953, 7, 5, 0, 0, 953, 954, 7, 2, 0, 0, 954, 955, 5, 95, 0, 0, 955, 956, - 7, 11, 0, 0, 956, 957, 7, 6, 0, 0, 957, 958, 7, 7, 0, 0, 958, 959, 7, 7, - 0, 0, 959, 256, 1, 0, 0, 0, 960, 961, 7, 11, 0, 0, 961, 962, 7, 10, 0, - 0, 962, 963, 5, 95, 0, 0, 963, 964, 7, 1, 0, 0, 964, 965, 7, 8, 0, 0, 965, - 966, 7, 2, 0, 0, 966, 967, 7, 9, 0, 0, 967, 968, 7, 10, 0, 0, 968, 969, - 7, 11, 0, 0, 969, 258, 1, 0, 0, 0, 970, 974, 7, 28, 0, 0, 971, 973, 7, - 29, 0, 0, 972, 971, 1, 0, 0, 0, 973, 976, 1, 0, 0, 0, 974, 972, 1, 0, 0, - 0, 974, 975, 1, 0, 0, 0, 975, 260, 1, 0, 0, 0, 976, 974, 1, 0, 0, 0, 977, - 978, 3, 35, 17, 0, 978, 979, 3, 259, 129, 0, 979, 262, 1, 0, 0, 0, 980, - 981, 3, 19, 9, 0, 981, 982, 3, 259, 129, 0, 982, 264, 1, 0, 0, 0, 983, - 984, 3, 33, 16, 0, 984, 985, 3, 259, 129, 0, 985, 266, 1, 0, 0, 0, 986, - 987, 7, 30, 0, 0, 987, 988, 1, 0, 0, 0, 988, 989, 6, 133, 0, 0, 989, 268, - 1, 0, 0, 0, 990, 991, 5, 47, 0, 0, 991, 992, 5, 42, 0, 0, 992, 996, 1, - 0, 0, 0, 993, 995, 9, 0, 0, 0, 994, 993, 1, 0, 0, 0, 995, 998, 1, 0, 0, - 0, 996, 997, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 997, 999, 1, 0, 0, 0, 998, - 996, 1, 0, 0, 0, 999, 1000, 5, 42, 0, 0, 1000, 1001, 5, 47, 0, 0, 1001, - 1002, 1, 0, 0, 0, 1002, 1003, 6, 134, 0, 0, 1003, 270, 1, 0, 0, 0, 1004, - 1005, 5, 47, 0, 0, 1005, 1006, 5, 47, 0, 0, 1006, 1010, 1, 0, 0, 0, 1007, - 1009, 8, 31, 0, 0, 1008, 1007, 1, 0, 0, 0, 1009, 1012, 1, 0, 0, 0, 1010, - 1008, 1, 0, 0, 0, 1010, 1011, 1, 0, 0, 0, 1011, 1013, 1, 0, 0, 0, 1012, - 1010, 1, 0, 0, 0, 1013, 1014, 6, 135, 0, 0, 1014, 272, 1, 0, 0, 0, 10, - 0, 323, 873, 875, 894, 902, 917, 974, 996, 1010, 1, 0, 1, 0, + 1, 127, 1, 127, 1, 127, 1, 127, 5, 127, 948, 8, 127, 10, 127, 12, 127, + 951, 9, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, + 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 4, 130, 967, 8, 130, + 11, 130, 12, 130, 968, 1, 131, 1, 131, 1, 131, 1, 131, 4, 131, 975, 8, + 131, 11, 131, 12, 131, 976, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, + 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 3, 132, 992, + 8, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, + 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, + 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, + 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, + 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, + 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, + 5, 138, 1047, 8, 138, 10, 138, 12, 138, 1050, 9, 138, 1, 139, 1, 139, 1, + 139, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, + 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 5, 143, 1069, 8, 143, 10, + 143, 12, 143, 1072, 9, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, + 144, 1, 144, 1, 144, 1, 144, 5, 144, 1083, 8, 144, 10, 144, 12, 144, 1086, + 9, 144, 1, 144, 1, 144, 1, 1070, 0, 145, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, + 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, + 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, + 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, + 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, + 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, + 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, + 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, + 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, + 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, + 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, + 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, + 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, + 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, + 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, + 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, + 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, + 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, + 144, 289, 145, 1, 0, 32, 2, 0, 68, 68, 100, 100, 2, 0, 65, 65, 97, 97, + 2, 0, 84, 84, 116, 116, 2, 0, 66, 66, 98, 98, 2, 0, 83, 83, 115, 115, 2, + 0, 69, 69, 101, 101, 2, 0, 85, 85, 117, 117, 2, 0, 76, 76, 108, 108, 2, + 0, 67, 67, 99, 99, 2, 0, 73, 73, 105, 105, 2, 0, 79, 79, 111, 111, 2, 0, + 78, 78, 110, 110, 2, 0, 80, 80, 112, 112, 2, 0, 82, 82, 114, 114, 2, 0, + 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 77, 77, 109, 109, 2, 0, + 72, 72, 104, 104, 2, 0, 75, 75, 107, 107, 2, 0, 70, 70, 102, 102, 2, 0, + 71, 71, 103, 103, 2, 0, 89, 89, 121, 121, 2, 0, 81, 81, 113, 113, 2, 0, + 88, 88, 120, 120, 2, 0, 74, 74, 106, 106, 2, 0, 39, 39, 92, 92, 1, 0, 48, + 57, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 65, 90, 97, 122, 4, 0, 48, 57, + 65, 90, 95, 95, 97, 122, 3, 0, 9, 11, 13, 13, 32, 32, 2, 0, 10, 10, 13, + 13, 1097, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, + 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, + 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, + 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, + 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, + 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, + 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, + 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, + 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, + 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, + 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, + 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, + 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, + 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, + 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, + 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, + 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, + 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, + 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, + 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, + 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, + 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, + 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, + 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, + 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, + 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, + 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, + 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, + 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, + 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, + 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, + 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, + 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, + 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, + 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, + 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, + 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, + 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, + 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, + 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 1, 291, 1, 0, 0, 0, 3, 293, 1, 0, + 0, 0, 5, 295, 1, 0, 0, 0, 7, 297, 1, 0, 0, 0, 9, 299, 1, 0, 0, 0, 11, 301, + 1, 0, 0, 0, 13, 303, 1, 0, 0, 0, 15, 305, 1, 0, 0, 0, 17, 307, 1, 0, 0, + 0, 19, 309, 1, 0, 0, 0, 21, 311, 1, 0, 0, 0, 23, 313, 1, 0, 0, 0, 25, 315, + 1, 0, 0, 0, 27, 318, 1, 0, 0, 0, 29, 320, 1, 0, 0, 0, 31, 322, 1, 0, 0, + 0, 33, 325, 1, 0, 0, 0, 35, 327, 1, 0, 0, 0, 37, 329, 1, 0, 0, 0, 39, 331, + 1, 0, 0, 0, 41, 333, 1, 0, 0, 0, 43, 335, 1, 0, 0, 0, 45, 341, 1, 0, 0, + 0, 47, 343, 1, 0, 0, 0, 49, 345, 1, 0, 0, 0, 51, 348, 1, 0, 0, 0, 53, 350, + 1, 0, 0, 0, 55, 353, 1, 0, 0, 0, 57, 356, 1, 0, 0, 0, 59, 358, 1, 0, 0, + 0, 61, 361, 1, 0, 0, 0, 63, 364, 1, 0, 0, 0, 65, 366, 1, 0, 0, 0, 67, 375, + 1, 0, 0, 0, 69, 379, 1, 0, 0, 0, 71, 385, 1, 0, 0, 0, 73, 392, 1, 0, 0, + 0, 75, 402, 1, 0, 0, 0, 77, 409, 1, 0, 0, 0, 79, 417, 1, 0, 0, 0, 81, 422, + 1, 0, 0, 0, 83, 428, 1, 0, 0, 0, 85, 435, 1, 0, 0, 0, 87, 441, 1, 0, 0, + 0, 89, 448, 1, 0, 0, 0, 91, 452, 1, 0, 0, 0, 93, 457, 1, 0, 0, 0, 95, 464, + 1, 0, 0, 0, 97, 467, 1, 0, 0, 0, 99, 478, 1, 0, 0, 0, 101, 484, 1, 0, 0, + 0, 103, 492, 1, 0, 0, 0, 105, 500, 1, 0, 0, 0, 107, 504, 1, 0, 0, 0, 109, + 507, 1, 0, 0, 0, 111, 510, 1, 0, 0, 0, 113, 517, 1, 0, 0, 0, 115, 525, + 1, 0, 0, 0, 117, 534, 1, 0, 0, 0, 119, 538, 1, 0, 0, 0, 121, 546, 1, 0, + 0, 0, 123, 551, 1, 0, 0, 0, 125, 558, 1, 0, 0, 0, 127, 565, 1, 0, 0, 0, + 129, 576, 1, 0, 0, 0, 131, 580, 1, 0, 0, 0, 133, 584, 1, 0, 0, 0, 135, + 590, 1, 0, 0, 0, 137, 594, 1, 0, 0, 0, 139, 597, 1, 0, 0, 0, 141, 602, + 1, 0, 0, 0, 143, 608, 1, 0, 0, 0, 145, 611, 1, 0, 0, 0, 147, 619, 1, 0, + 0, 0, 149, 622, 1, 0, 0, 0, 151, 629, 1, 0, 0, 0, 153, 633, 1, 0, 0, 0, + 155, 637, 1, 0, 0, 0, 157, 642, 1, 0, 0, 0, 159, 647, 1, 0, 0, 0, 161, + 653, 1, 0, 0, 0, 163, 659, 1, 0, 0, 0, 165, 662, 1, 0, 0, 0, 167, 666, + 1, 0, 0, 0, 169, 671, 1, 0, 0, 0, 171, 677, 1, 0, 0, 0, 173, 684, 1, 0, + 0, 0, 175, 690, 1, 0, 0, 0, 177, 693, 1, 0, 0, 0, 179, 699, 1, 0, 0, 0, + 181, 706, 1, 0, 0, 0, 183, 714, 1, 0, 0, 0, 185, 717, 1, 0, 0, 0, 187, + 722, 1, 0, 0, 0, 189, 727, 1, 0, 0, 0, 191, 732, 1, 0, 0, 0, 193, 737, + 1, 0, 0, 0, 195, 741, 1, 0, 0, 0, 197, 750, 1, 0, 0, 0, 199, 755, 1, 0, + 0, 0, 201, 761, 1, 0, 0, 0, 203, 769, 1, 0, 0, 0, 205, 776, 1, 0, 0, 0, + 207, 783, 1, 0, 0, 0, 209, 790, 1, 0, 0, 0, 211, 795, 1, 0, 0, 0, 213, + 801, 1, 0, 0, 0, 215, 811, 1, 0, 0, 0, 217, 818, 1, 0, 0, 0, 219, 824, + 1, 0, 0, 0, 221, 830, 1, 0, 0, 0, 223, 835, 1, 0, 0, 0, 225, 845, 1, 0, + 0, 0, 227, 850, 1, 0, 0, 0, 229, 859, 1, 0, 0, 0, 231, 867, 1, 0, 0, 0, + 233, 871, 1, 0, 0, 0, 235, 874, 1, 0, 0, 0, 237, 881, 1, 0, 0, 0, 239, + 886, 1, 0, 0, 0, 241, 892, 1, 0, 0, 0, 243, 899, 1, 0, 0, 0, 245, 904, + 1, 0, 0, 0, 247, 909, 1, 0, 0, 0, 249, 919, 1, 0, 0, 0, 251, 926, 1, 0, + 0, 0, 253, 933, 1, 0, 0, 0, 255, 943, 1, 0, 0, 0, 257, 954, 1, 0, 0, 0, + 259, 959, 1, 0, 0, 0, 261, 966, 1, 0, 0, 0, 263, 970, 1, 0, 0, 0, 265, + 991, 1, 0, 0, 0, 267, 993, 1, 0, 0, 0, 269, 1003, 1, 0, 0, 0, 271, 1013, + 1, 0, 0, 0, 273, 1025, 1, 0, 0, 0, 275, 1034, 1, 0, 0, 0, 277, 1044, 1, + 0, 0, 0, 279, 1051, 1, 0, 0, 0, 281, 1054, 1, 0, 0, 0, 283, 1057, 1, 0, + 0, 0, 285, 1060, 1, 0, 0, 0, 287, 1064, 1, 0, 0, 0, 289, 1078, 1, 0, 0, + 0, 291, 292, 5, 123, 0, 0, 292, 2, 1, 0, 0, 0, 293, 294, 5, 125, 0, 0, + 294, 4, 1, 0, 0, 0, 295, 296, 5, 91, 0, 0, 296, 6, 1, 0, 0, 0, 297, 298, + 5, 93, 0, 0, 298, 8, 1, 0, 0, 0, 299, 300, 5, 58, 0, 0, 300, 10, 1, 0, + 0, 0, 301, 302, 5, 59, 0, 0, 302, 12, 1, 0, 0, 0, 303, 304, 5, 40, 0, 0, + 304, 14, 1, 0, 0, 0, 305, 306, 5, 41, 0, 0, 306, 16, 1, 0, 0, 0, 307, 308, + 5, 44, 0, 0, 308, 18, 1, 0, 0, 0, 309, 310, 5, 64, 0, 0, 310, 20, 1, 0, + 0, 0, 311, 312, 5, 33, 0, 0, 312, 22, 1, 0, 0, 0, 313, 314, 5, 46, 0, 0, + 314, 24, 1, 0, 0, 0, 315, 316, 5, 124, 0, 0, 316, 317, 5, 124, 0, 0, 317, + 26, 1, 0, 0, 0, 318, 319, 5, 42, 0, 0, 319, 28, 1, 0, 0, 0, 320, 321, 5, + 61, 0, 0, 321, 30, 1, 0, 0, 0, 322, 323, 5, 61, 0, 0, 323, 324, 5, 61, + 0, 0, 324, 32, 1, 0, 0, 0, 325, 326, 5, 35, 0, 0, 326, 34, 1, 0, 0, 0, + 327, 328, 5, 36, 0, 0, 328, 36, 1, 0, 0, 0, 329, 330, 5, 37, 0, 0, 330, + 38, 1, 0, 0, 0, 331, 332, 5, 43, 0, 0, 332, 40, 1, 0, 0, 0, 333, 334, 5, + 45, 0, 0, 334, 42, 1, 0, 0, 0, 335, 336, 5, 47, 0, 0, 336, 44, 1, 0, 0, + 0, 337, 338, 5, 33, 0, 0, 338, 342, 5, 61, 0, 0, 339, 340, 5, 60, 0, 0, + 340, 342, 5, 62, 0, 0, 341, 337, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 342, + 46, 1, 0, 0, 0, 343, 344, 5, 60, 0, 0, 344, 48, 1, 0, 0, 0, 345, 346, 5, + 60, 0, 0, 346, 347, 5, 61, 0, 0, 347, 50, 1, 0, 0, 0, 348, 349, 5, 62, + 0, 0, 349, 52, 1, 0, 0, 0, 350, 351, 5, 62, 0, 0, 351, 352, 5, 61, 0, 0, + 352, 54, 1, 0, 0, 0, 353, 354, 5, 58, 0, 0, 354, 355, 5, 58, 0, 0, 355, + 56, 1, 0, 0, 0, 356, 357, 5, 95, 0, 0, 357, 58, 1, 0, 0, 0, 358, 359, 5, + 58, 0, 0, 359, 360, 5, 61, 0, 0, 360, 60, 1, 0, 0, 0, 361, 362, 5, 46, + 0, 0, 362, 363, 5, 46, 0, 0, 363, 62, 1, 0, 0, 0, 364, 365, 5, 34, 0, 0, + 365, 64, 1, 0, 0, 0, 366, 367, 7, 0, 0, 0, 367, 368, 7, 1, 0, 0, 368, 369, + 7, 2, 0, 0, 369, 370, 7, 1, 0, 0, 370, 371, 7, 3, 0, 0, 371, 372, 7, 1, + 0, 0, 372, 373, 7, 4, 0, 0, 373, 374, 7, 5, 0, 0, 374, 66, 1, 0, 0, 0, + 375, 376, 7, 6, 0, 0, 376, 377, 7, 4, 0, 0, 377, 378, 7, 5, 0, 0, 378, + 68, 1, 0, 0, 0, 379, 380, 7, 2, 0, 0, 380, 381, 7, 1, 0, 0, 381, 382, 7, + 3, 0, 0, 382, 383, 7, 7, 0, 0, 383, 384, 7, 5, 0, 0, 384, 70, 1, 0, 0, + 0, 385, 386, 7, 1, 0, 0, 386, 387, 7, 8, 0, 0, 387, 388, 7, 2, 0, 0, 388, + 389, 7, 9, 0, 0, 389, 390, 7, 10, 0, 0, 390, 391, 7, 11, 0, 0, 391, 72, + 1, 0, 0, 0, 392, 393, 7, 12, 0, 0, 393, 394, 7, 13, 0, 0, 394, 395, 7, + 10, 0, 0, 395, 396, 7, 8, 0, 0, 396, 397, 7, 5, 0, 0, 397, 398, 7, 0, 0, + 0, 398, 399, 7, 6, 0, 0, 399, 400, 7, 13, 0, 0, 400, 401, 7, 5, 0, 0, 401, + 74, 1, 0, 0, 0, 402, 403, 7, 12, 0, 0, 403, 404, 7, 6, 0, 0, 404, 405, + 7, 3, 0, 0, 405, 406, 7, 7, 0, 0, 406, 407, 7, 9, 0, 0, 407, 408, 7, 8, + 0, 0, 408, 76, 1, 0, 0, 0, 409, 410, 7, 12, 0, 0, 410, 411, 7, 13, 0, 0, + 411, 412, 7, 9, 0, 0, 412, 413, 7, 14, 0, 0, 413, 414, 7, 1, 0, 0, 414, + 415, 7, 2, 0, 0, 415, 416, 7, 5, 0, 0, 416, 78, 1, 0, 0, 0, 417, 418, 7, + 14, 0, 0, 418, 419, 7, 9, 0, 0, 419, 420, 7, 5, 0, 0, 420, 421, 7, 15, + 0, 0, 421, 80, 1, 0, 0, 0, 422, 423, 7, 10, 0, 0, 423, 424, 7, 15, 0, 0, + 424, 425, 7, 11, 0, 0, 425, 426, 7, 5, 0, 0, 426, 427, 7, 13, 0, 0, 427, + 82, 1, 0, 0, 0, 428, 429, 7, 8, 0, 0, 429, 430, 7, 13, 0, 0, 430, 431, + 7, 5, 0, 0, 431, 432, 7, 1, 0, 0, 432, 433, 7, 2, 0, 0, 433, 434, 7, 5, + 0, 0, 434, 84, 1, 0, 0, 0, 435, 436, 7, 1, 0, 0, 436, 437, 7, 7, 0, 0, + 437, 438, 7, 2, 0, 0, 438, 439, 7, 5, 0, 0, 439, 440, 7, 13, 0, 0, 440, + 86, 1, 0, 0, 0, 441, 442, 7, 8, 0, 0, 442, 443, 7, 10, 0, 0, 443, 444, + 7, 7, 0, 0, 444, 445, 7, 6, 0, 0, 445, 446, 7, 16, 0, 0, 446, 447, 7, 11, + 0, 0, 447, 88, 1, 0, 0, 0, 448, 449, 7, 1, 0, 0, 449, 450, 7, 0, 0, 0, + 450, 451, 7, 0, 0, 0, 451, 90, 1, 0, 0, 0, 452, 453, 7, 0, 0, 0, 453, 454, + 7, 13, 0, 0, 454, 455, 7, 10, 0, 0, 455, 456, 7, 12, 0, 0, 456, 92, 1, + 0, 0, 0, 457, 458, 7, 13, 0, 0, 458, 459, 7, 5, 0, 0, 459, 460, 7, 11, + 0, 0, 460, 461, 7, 1, 0, 0, 461, 462, 7, 16, 0, 0, 462, 463, 7, 5, 0, 0, + 463, 94, 1, 0, 0, 0, 464, 465, 7, 2, 0, 0, 465, 466, 7, 10, 0, 0, 466, + 96, 1, 0, 0, 0, 467, 468, 7, 8, 0, 0, 468, 469, 7, 10, 0, 0, 469, 470, + 7, 11, 0, 0, 470, 471, 7, 4, 0, 0, 471, 472, 7, 2, 0, 0, 472, 473, 7, 13, + 0, 0, 473, 474, 7, 1, 0, 0, 474, 475, 7, 9, 0, 0, 475, 476, 7, 11, 0, 0, + 476, 477, 7, 2, 0, 0, 477, 98, 1, 0, 0, 0, 478, 479, 7, 8, 0, 0, 479, 480, + 7, 17, 0, 0, 480, 481, 7, 5, 0, 0, 481, 482, 7, 8, 0, 0, 482, 483, 7, 18, + 0, 0, 483, 100, 1, 0, 0, 0, 484, 485, 7, 19, 0, 0, 485, 486, 7, 10, 0, + 0, 486, 487, 7, 13, 0, 0, 487, 488, 7, 5, 0, 0, 488, 489, 7, 9, 0, 0, 489, + 490, 7, 20, 0, 0, 490, 491, 7, 11, 0, 0, 491, 102, 1, 0, 0, 0, 492, 493, + 7, 12, 0, 0, 493, 494, 7, 13, 0, 0, 494, 495, 7, 9, 0, 0, 495, 496, 7, + 16, 0, 0, 496, 497, 7, 1, 0, 0, 497, 498, 7, 13, 0, 0, 498, 499, 7, 21, + 0, 0, 499, 104, 1, 0, 0, 0, 500, 501, 7, 18, 0, 0, 501, 502, 7, 5, 0, 0, + 502, 503, 7, 21, 0, 0, 503, 106, 1, 0, 0, 0, 504, 505, 7, 10, 0, 0, 505, + 506, 7, 11, 0, 0, 506, 108, 1, 0, 0, 0, 507, 508, 7, 0, 0, 0, 508, 509, + 7, 10, 0, 0, 509, 110, 1, 0, 0, 0, 510, 511, 7, 6, 0, 0, 511, 512, 7, 11, + 0, 0, 512, 513, 7, 9, 0, 0, 513, 514, 7, 22, 0, 0, 514, 515, 7, 6, 0, 0, + 515, 516, 7, 5, 0, 0, 516, 112, 1, 0, 0, 0, 517, 518, 7, 8, 0, 0, 518, + 519, 7, 1, 0, 0, 519, 520, 7, 4, 0, 0, 520, 521, 7, 8, 0, 0, 521, 522, + 7, 1, 0, 0, 522, 523, 7, 0, 0, 0, 523, 524, 7, 5, 0, 0, 524, 114, 1, 0, + 0, 0, 525, 526, 7, 13, 0, 0, 526, 527, 7, 5, 0, 0, 527, 528, 7, 4, 0, 0, + 528, 529, 7, 2, 0, 0, 529, 530, 7, 13, 0, 0, 530, 531, 7, 9, 0, 0, 531, + 532, 7, 8, 0, 0, 532, 533, 7, 2, 0, 0, 533, 116, 1, 0, 0, 0, 534, 535, + 7, 4, 0, 0, 535, 536, 7, 5, 0, 0, 536, 537, 7, 2, 0, 0, 537, 118, 1, 0, + 0, 0, 538, 539, 7, 0, 0, 0, 539, 540, 7, 5, 0, 0, 540, 541, 7, 19, 0, 0, + 541, 542, 7, 1, 0, 0, 542, 543, 7, 6, 0, 0, 543, 544, 7, 7, 0, 0, 544, + 545, 7, 2, 0, 0, 545, 120, 1, 0, 0, 0, 546, 547, 7, 11, 0, 0, 547, 548, + 7, 6, 0, 0, 548, 549, 7, 7, 0, 0, 549, 550, 7, 7, 0, 0, 550, 122, 1, 0, + 0, 0, 551, 552, 7, 0, 0, 0, 552, 553, 7, 5, 0, 0, 553, 554, 7, 7, 0, 0, + 554, 555, 7, 5, 0, 0, 555, 556, 7, 2, 0, 0, 556, 557, 7, 5, 0, 0, 557, + 124, 1, 0, 0, 0, 558, 559, 7, 6, 0, 0, 559, 560, 7, 12, 0, 0, 560, 561, + 7, 0, 0, 0, 561, 562, 7, 1, 0, 0, 562, 563, 7, 2, 0, 0, 563, 564, 7, 5, + 0, 0, 564, 126, 1, 0, 0, 0, 565, 566, 7, 13, 0, 0, 566, 567, 7, 5, 0, 0, + 567, 568, 7, 19, 0, 0, 568, 569, 7, 5, 0, 0, 569, 570, 7, 13, 0, 0, 570, + 571, 7, 5, 0, 0, 571, 572, 7, 11, 0, 0, 572, 573, 7, 8, 0, 0, 573, 574, + 7, 5, 0, 0, 574, 575, 7, 4, 0, 0, 575, 128, 1, 0, 0, 0, 576, 577, 7, 13, + 0, 0, 577, 578, 7, 5, 0, 0, 578, 579, 7, 19, 0, 0, 579, 130, 1, 0, 0, 0, + 580, 581, 7, 11, 0, 0, 581, 582, 7, 10, 0, 0, 582, 583, 7, 2, 0, 0, 583, + 132, 1, 0, 0, 0, 584, 585, 7, 9, 0, 0, 585, 586, 7, 11, 0, 0, 586, 587, + 7, 0, 0, 0, 587, 588, 7, 5, 0, 0, 588, 589, 7, 23, 0, 0, 589, 134, 1, 0, + 0, 0, 590, 591, 7, 1, 0, 0, 591, 592, 7, 11, 0, 0, 592, 593, 7, 0, 0, 0, + 593, 136, 1, 0, 0, 0, 594, 595, 7, 10, 0, 0, 595, 596, 7, 13, 0, 0, 596, + 138, 1, 0, 0, 0, 597, 598, 7, 7, 0, 0, 598, 599, 7, 9, 0, 0, 599, 600, + 7, 18, 0, 0, 600, 601, 7, 5, 0, 0, 601, 140, 1, 0, 0, 0, 602, 603, 7, 9, + 0, 0, 603, 604, 7, 7, 0, 0, 604, 605, 7, 9, 0, 0, 605, 606, 7, 18, 0, 0, + 606, 607, 7, 5, 0, 0, 607, 142, 1, 0, 0, 0, 608, 609, 7, 9, 0, 0, 609, + 610, 7, 11, 0, 0, 610, 144, 1, 0, 0, 0, 611, 612, 7, 3, 0, 0, 612, 613, + 7, 5, 0, 0, 613, 614, 7, 2, 0, 0, 614, 615, 7, 15, 0, 0, 615, 616, 7, 5, + 0, 0, 616, 617, 7, 5, 0, 0, 617, 618, 7, 11, 0, 0, 618, 146, 1, 0, 0, 0, + 619, 620, 7, 9, 0, 0, 620, 621, 7, 4, 0, 0, 621, 148, 1, 0, 0, 0, 622, + 623, 7, 5, 0, 0, 623, 624, 7, 23, 0, 0, 624, 625, 7, 9, 0, 0, 625, 626, + 7, 4, 0, 0, 626, 627, 7, 2, 0, 0, 627, 628, 7, 4, 0, 0, 628, 150, 1, 0, + 0, 0, 629, 630, 7, 1, 0, 0, 630, 631, 7, 7, 0, 0, 631, 632, 7, 7, 0, 0, + 632, 152, 1, 0, 0, 0, 633, 634, 7, 1, 0, 0, 634, 635, 7, 11, 0, 0, 635, + 636, 7, 21, 0, 0, 636, 154, 1, 0, 0, 0, 637, 638, 7, 24, 0, 0, 638, 639, + 7, 10, 0, 0, 639, 640, 7, 9, 0, 0, 640, 641, 7, 11, 0, 0, 641, 156, 1, + 0, 0, 0, 642, 643, 7, 7, 0, 0, 643, 644, 7, 5, 0, 0, 644, 645, 7, 19, 0, + 0, 645, 646, 7, 2, 0, 0, 646, 158, 1, 0, 0, 0, 647, 648, 7, 13, 0, 0, 648, + 649, 7, 9, 0, 0, 649, 650, 7, 20, 0, 0, 650, 651, 7, 17, 0, 0, 651, 652, + 7, 2, 0, 0, 652, 160, 1, 0, 0, 0, 653, 654, 7, 9, 0, 0, 654, 655, 7, 11, + 0, 0, 655, 656, 7, 11, 0, 0, 656, 657, 7, 5, 0, 0, 657, 658, 7, 13, 0, + 0, 658, 162, 1, 0, 0, 0, 659, 660, 7, 1, 0, 0, 660, 661, 7, 4, 0, 0, 661, + 164, 1, 0, 0, 0, 662, 663, 7, 1, 0, 0, 663, 664, 7, 4, 0, 0, 664, 665, + 7, 8, 0, 0, 665, 166, 1, 0, 0, 0, 666, 667, 7, 0, 0, 0, 667, 668, 7, 5, + 0, 0, 668, 669, 7, 4, 0, 0, 669, 670, 7, 8, 0, 0, 670, 168, 1, 0, 0, 0, + 671, 672, 7, 7, 0, 0, 672, 673, 7, 9, 0, 0, 673, 674, 7, 16, 0, 0, 674, + 675, 7, 9, 0, 0, 675, 676, 7, 2, 0, 0, 676, 170, 1, 0, 0, 0, 677, 678, + 7, 10, 0, 0, 678, 679, 7, 19, 0, 0, 679, 680, 7, 19, 0, 0, 680, 681, 7, + 4, 0, 0, 681, 682, 7, 5, 0, 0, 682, 683, 7, 2, 0, 0, 683, 172, 1, 0, 0, + 0, 684, 685, 7, 10, 0, 0, 685, 686, 7, 13, 0, 0, 686, 687, 7, 0, 0, 0, + 687, 688, 7, 5, 0, 0, 688, 689, 7, 13, 0, 0, 689, 174, 1, 0, 0, 0, 690, + 691, 7, 3, 0, 0, 691, 692, 7, 21, 0, 0, 692, 176, 1, 0, 0, 0, 693, 694, + 7, 20, 0, 0, 694, 695, 7, 13, 0, 0, 695, 696, 7, 10, 0, 0, 696, 697, 7, + 6, 0, 0, 697, 698, 7, 12, 0, 0, 698, 178, 1, 0, 0, 0, 699, 700, 7, 17, + 0, 0, 700, 701, 7, 1, 0, 0, 701, 702, 7, 14, 0, 0, 702, 703, 7, 9, 0, 0, + 703, 704, 7, 11, 0, 0, 704, 705, 7, 20, 0, 0, 705, 180, 1, 0, 0, 0, 706, + 707, 7, 13, 0, 0, 707, 708, 7, 5, 0, 0, 708, 709, 7, 2, 0, 0, 709, 710, + 7, 6, 0, 0, 710, 711, 7, 13, 0, 0, 711, 712, 7, 11, 0, 0, 712, 713, 7, + 4, 0, 0, 713, 182, 1, 0, 0, 0, 714, 715, 7, 11, 0, 0, 715, 716, 7, 10, + 0, 0, 716, 184, 1, 0, 0, 0, 717, 718, 7, 15, 0, 0, 718, 719, 7, 9, 0, 0, + 719, 720, 7, 2, 0, 0, 720, 721, 7, 17, 0, 0, 721, 186, 1, 0, 0, 0, 722, + 723, 7, 8, 0, 0, 723, 724, 7, 1, 0, 0, 724, 725, 7, 4, 0, 0, 725, 726, + 7, 5, 0, 0, 726, 188, 1, 0, 0, 0, 727, 728, 7, 15, 0, 0, 728, 729, 7, 17, + 0, 0, 729, 730, 7, 5, 0, 0, 730, 731, 7, 11, 0, 0, 731, 190, 1, 0, 0, 0, + 732, 733, 7, 2, 0, 0, 733, 734, 7, 17, 0, 0, 734, 735, 7, 5, 0, 0, 735, + 736, 7, 11, 0, 0, 736, 192, 1, 0, 0, 0, 737, 738, 7, 5, 0, 0, 738, 739, + 7, 11, 0, 0, 739, 740, 7, 0, 0, 0, 740, 194, 1, 0, 0, 0, 741, 742, 7, 0, + 0, 0, 742, 743, 7, 9, 0, 0, 743, 744, 7, 4, 0, 0, 744, 745, 7, 2, 0, 0, + 745, 746, 7, 9, 0, 0, 746, 747, 7, 11, 0, 0, 747, 748, 7, 8, 0, 0, 748, + 749, 7, 2, 0, 0, 749, 196, 1, 0, 0, 0, 750, 751, 7, 19, 0, 0, 751, 752, + 7, 13, 0, 0, 752, 753, 7, 10, 0, 0, 753, 754, 7, 16, 0, 0, 754, 198, 1, + 0, 0, 0, 755, 756, 7, 15, 0, 0, 756, 757, 7, 17, 0, 0, 757, 758, 7, 5, + 0, 0, 758, 759, 7, 13, 0, 0, 759, 760, 7, 5, 0, 0, 760, 200, 1, 0, 0, 0, + 761, 762, 7, 8, 0, 0, 762, 763, 7, 10, 0, 0, 763, 764, 7, 7, 0, 0, 764, + 765, 7, 7, 0, 0, 765, 766, 7, 1, 0, 0, 766, 767, 7, 2, 0, 0, 767, 768, + 7, 5, 0, 0, 768, 202, 1, 0, 0, 0, 769, 770, 7, 4, 0, 0, 770, 771, 7, 5, + 0, 0, 771, 772, 7, 7, 0, 0, 772, 773, 7, 5, 0, 0, 773, 774, 7, 8, 0, 0, + 774, 775, 7, 2, 0, 0, 775, 204, 1, 0, 0, 0, 776, 777, 7, 9, 0, 0, 777, + 778, 7, 11, 0, 0, 778, 779, 7, 4, 0, 0, 779, 780, 7, 5, 0, 0, 780, 781, + 7, 13, 0, 0, 781, 782, 7, 2, 0, 0, 782, 206, 1, 0, 0, 0, 783, 784, 7, 14, + 0, 0, 784, 785, 7, 1, 0, 0, 785, 786, 7, 7, 0, 0, 786, 787, 7, 6, 0, 0, + 787, 788, 7, 5, 0, 0, 788, 789, 7, 4, 0, 0, 789, 208, 1, 0, 0, 0, 790, + 791, 7, 19, 0, 0, 791, 792, 7, 6, 0, 0, 792, 793, 7, 7, 0, 0, 793, 794, + 7, 7, 0, 0, 794, 210, 1, 0, 0, 0, 795, 796, 7, 6, 0, 0, 796, 797, 7, 11, + 0, 0, 797, 798, 7, 9, 0, 0, 798, 799, 7, 10, 0, 0, 799, 800, 7, 11, 0, + 0, 800, 212, 1, 0, 0, 0, 801, 802, 7, 9, 0, 0, 802, 803, 7, 11, 0, 0, 803, + 804, 7, 2, 0, 0, 804, 805, 7, 5, 0, 0, 805, 806, 7, 13, 0, 0, 806, 807, + 7, 4, 0, 0, 807, 808, 7, 5, 0, 0, 808, 809, 7, 8, 0, 0, 809, 810, 7, 2, + 0, 0, 810, 214, 1, 0, 0, 0, 811, 812, 7, 5, 0, 0, 812, 813, 7, 23, 0, 0, + 813, 814, 7, 8, 0, 0, 814, 815, 7, 5, 0, 0, 815, 816, 7, 12, 0, 0, 816, + 817, 7, 2, 0, 0, 817, 216, 1, 0, 0, 0, 818, 819, 7, 11, 0, 0, 819, 820, + 7, 6, 0, 0, 820, 821, 7, 7, 0, 0, 821, 822, 7, 7, 0, 0, 822, 823, 7, 4, + 0, 0, 823, 218, 1, 0, 0, 0, 824, 825, 7, 19, 0, 0, 825, 826, 7, 9, 0, 0, + 826, 827, 7, 13, 0, 0, 827, 828, 7, 4, 0, 0, 828, 829, 7, 2, 0, 0, 829, + 220, 1, 0, 0, 0, 830, 831, 7, 7, 0, 0, 831, 832, 7, 1, 0, 0, 832, 833, + 7, 4, 0, 0, 833, 834, 7, 2, 0, 0, 834, 222, 1, 0, 0, 0, 835, 836, 7, 13, + 0, 0, 836, 837, 7, 5, 0, 0, 837, 838, 7, 2, 0, 0, 838, 839, 7, 6, 0, 0, + 839, 840, 7, 13, 0, 0, 840, 841, 7, 11, 0, 0, 841, 842, 7, 9, 0, 0, 842, + 843, 7, 11, 0, 0, 843, 844, 7, 20, 0, 0, 844, 224, 1, 0, 0, 0, 845, 846, + 7, 9, 0, 0, 846, 847, 7, 11, 0, 0, 847, 848, 7, 2, 0, 0, 848, 849, 7, 10, + 0, 0, 849, 226, 1, 0, 0, 0, 850, 851, 7, 8, 0, 0, 851, 852, 7, 10, 0, 0, + 852, 853, 7, 11, 0, 0, 853, 854, 7, 19, 0, 0, 854, 855, 7, 7, 0, 0, 855, + 856, 7, 9, 0, 0, 856, 857, 7, 8, 0, 0, 857, 858, 7, 2, 0, 0, 858, 228, + 1, 0, 0, 0, 859, 860, 7, 11, 0, 0, 860, 861, 7, 10, 0, 0, 861, 862, 7, + 2, 0, 0, 862, 863, 7, 17, 0, 0, 863, 864, 7, 9, 0, 0, 864, 865, 7, 11, + 0, 0, 865, 866, 7, 20, 0, 0, 866, 230, 1, 0, 0, 0, 867, 868, 7, 19, 0, + 0, 868, 869, 7, 10, 0, 0, 869, 870, 7, 13, 0, 0, 870, 232, 1, 0, 0, 0, + 871, 872, 7, 9, 0, 0, 872, 873, 7, 19, 0, 0, 873, 234, 1, 0, 0, 0, 874, + 875, 7, 5, 0, 0, 875, 876, 7, 7, 0, 0, 876, 877, 7, 4, 0, 0, 877, 878, + 7, 5, 0, 0, 878, 879, 7, 9, 0, 0, 879, 880, 7, 19, 0, 0, 880, 236, 1, 0, + 0, 0, 881, 882, 7, 5, 0, 0, 882, 883, 7, 7, 0, 0, 883, 884, 7, 4, 0, 0, + 884, 885, 7, 5, 0, 0, 885, 238, 1, 0, 0, 0, 886, 887, 7, 3, 0, 0, 887, + 888, 7, 13, 0, 0, 888, 889, 7, 5, 0, 0, 889, 890, 7, 1, 0, 0, 890, 891, + 7, 18, 0, 0, 891, 240, 1, 0, 0, 0, 892, 893, 7, 13, 0, 0, 893, 894, 7, + 5, 0, 0, 894, 895, 7, 2, 0, 0, 895, 896, 7, 6, 0, 0, 896, 897, 7, 13, 0, + 0, 897, 898, 7, 11, 0, 0, 898, 242, 1, 0, 0, 0, 899, 900, 7, 11, 0, 0, + 900, 901, 7, 5, 0, 0, 901, 902, 7, 23, 0, 0, 902, 903, 7, 2, 0, 0, 903, + 244, 1, 0, 0, 0, 904, 905, 7, 10, 0, 0, 905, 906, 7, 14, 0, 0, 906, 907, + 7, 5, 0, 0, 907, 908, 7, 13, 0, 0, 908, 246, 1, 0, 0, 0, 909, 910, 7, 12, + 0, 0, 910, 911, 7, 1, 0, 0, 911, 912, 7, 13, 0, 0, 912, 913, 7, 2, 0, 0, + 913, 914, 7, 9, 0, 0, 914, 915, 7, 2, 0, 0, 915, 916, 7, 9, 0, 0, 916, + 917, 7, 10, 0, 0, 917, 918, 7, 11, 0, 0, 918, 248, 1, 0, 0, 0, 919, 920, + 7, 15, 0, 0, 920, 921, 7, 9, 0, 0, 921, 922, 7, 11, 0, 0, 922, 923, 7, + 0, 0, 0, 923, 924, 7, 10, 0, 0, 924, 925, 7, 15, 0, 0, 925, 250, 1, 0, + 0, 0, 926, 927, 7, 19, 0, 0, 927, 928, 7, 9, 0, 0, 928, 929, 7, 7, 0, 0, + 929, 930, 7, 2, 0, 0, 930, 931, 7, 5, 0, 0, 931, 932, 7, 13, 0, 0, 932, + 252, 1, 0, 0, 0, 933, 934, 7, 13, 0, 0, 934, 935, 7, 5, 0, 0, 935, 936, + 7, 8, 0, 0, 936, 937, 7, 6, 0, 0, 937, 938, 7, 13, 0, 0, 938, 939, 7, 4, + 0, 0, 939, 940, 7, 9, 0, 0, 940, 941, 7, 14, 0, 0, 941, 942, 7, 5, 0, 0, + 942, 254, 1, 0, 0, 0, 943, 949, 5, 39, 0, 0, 944, 948, 8, 25, 0, 0, 945, + 946, 5, 92, 0, 0, 946, 948, 9, 0, 0, 0, 947, 944, 1, 0, 0, 0, 947, 945, + 1, 0, 0, 0, 948, 951, 1, 0, 0, 0, 949, 947, 1, 0, 0, 0, 949, 950, 1, 0, + 0, 0, 950, 952, 1, 0, 0, 0, 951, 949, 1, 0, 0, 0, 952, 953, 5, 39, 0, 0, + 953, 256, 1, 0, 0, 0, 954, 955, 7, 2, 0, 0, 955, 956, 7, 13, 0, 0, 956, + 957, 7, 6, 0, 0, 957, 958, 7, 5, 0, 0, 958, 258, 1, 0, 0, 0, 959, 960, + 7, 19, 0, 0, 960, 961, 7, 1, 0, 0, 961, 962, 7, 7, 0, 0, 962, 963, 7, 4, + 0, 0, 963, 964, 7, 5, 0, 0, 964, 260, 1, 0, 0, 0, 965, 967, 7, 26, 0, 0, + 966, 965, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 966, 1, 0, 0, 0, 968, + 969, 1, 0, 0, 0, 969, 262, 1, 0, 0, 0, 970, 971, 5, 48, 0, 0, 971, 972, + 7, 23, 0, 0, 972, 974, 1, 0, 0, 0, 973, 975, 7, 27, 0, 0, 974, 973, 1, + 0, 0, 0, 975, 976, 1, 0, 0, 0, 976, 974, 1, 0, 0, 0, 976, 977, 1, 0, 0, + 0, 977, 264, 1, 0, 0, 0, 978, 979, 7, 19, 0, 0, 979, 980, 7, 10, 0, 0, + 980, 981, 7, 13, 0, 0, 981, 982, 7, 5, 0, 0, 982, 983, 7, 9, 0, 0, 983, + 984, 7, 20, 0, 0, 984, 985, 7, 11, 0, 0, 985, 986, 5, 95, 0, 0, 986, 987, + 7, 18, 0, 0, 987, 988, 7, 5, 0, 0, 988, 992, 7, 21, 0, 0, 989, 990, 7, + 19, 0, 0, 990, 992, 7, 18, 0, 0, 991, 978, 1, 0, 0, 0, 991, 989, 1, 0, + 0, 0, 992, 266, 1, 0, 0, 0, 993, 994, 7, 10, 0, 0, 994, 995, 7, 11, 0, + 0, 995, 996, 5, 95, 0, 0, 996, 997, 7, 6, 0, 0, 997, 998, 7, 12, 0, 0, + 998, 999, 7, 0, 0, 0, 999, 1000, 7, 1, 0, 0, 1000, 1001, 7, 2, 0, 0, 1001, + 1002, 7, 5, 0, 0, 1002, 268, 1, 0, 0, 0, 1003, 1004, 7, 10, 0, 0, 1004, + 1005, 7, 11, 0, 0, 1005, 1006, 5, 95, 0, 0, 1006, 1007, 7, 0, 0, 0, 1007, + 1008, 7, 5, 0, 0, 1008, 1009, 7, 7, 0, 0, 1009, 1010, 7, 5, 0, 0, 1010, + 1011, 7, 2, 0, 0, 1011, 1012, 7, 5, 0, 0, 1012, 270, 1, 0, 0, 0, 1013, + 1014, 7, 4, 0, 0, 1014, 1015, 7, 5, 0, 0, 1015, 1016, 7, 2, 0, 0, 1016, + 1017, 5, 95, 0, 0, 1017, 1018, 7, 0, 0, 0, 1018, 1019, 7, 5, 0, 0, 1019, + 1020, 7, 19, 0, 0, 1020, 1021, 7, 1, 0, 0, 1021, 1022, 7, 6, 0, 0, 1022, + 1023, 7, 7, 0, 0, 1023, 1024, 7, 2, 0, 0, 1024, 272, 1, 0, 0, 0, 1025, + 1026, 7, 4, 0, 0, 1026, 1027, 7, 5, 0, 0, 1027, 1028, 7, 2, 0, 0, 1028, + 1029, 5, 95, 0, 0, 1029, 1030, 7, 11, 0, 0, 1030, 1031, 7, 6, 0, 0, 1031, + 1032, 7, 7, 0, 0, 1032, 1033, 7, 7, 0, 0, 1033, 274, 1, 0, 0, 0, 1034, + 1035, 7, 11, 0, 0, 1035, 1036, 7, 10, 0, 0, 1036, 1037, 5, 95, 0, 0, 1037, + 1038, 7, 1, 0, 0, 1038, 1039, 7, 8, 0, 0, 1039, 1040, 7, 2, 0, 0, 1040, + 1041, 7, 9, 0, 0, 1041, 1042, 7, 10, 0, 0, 1042, 1043, 7, 11, 0, 0, 1043, + 276, 1, 0, 0, 0, 1044, 1048, 7, 28, 0, 0, 1045, 1047, 7, 29, 0, 0, 1046, + 1045, 1, 0, 0, 0, 1047, 1050, 1, 0, 0, 0, 1048, 1046, 1, 0, 0, 0, 1048, + 1049, 1, 0, 0, 0, 1049, 278, 1, 0, 0, 0, 1050, 1048, 1, 0, 0, 0, 1051, + 1052, 3, 35, 17, 0, 1052, 1053, 3, 277, 138, 0, 1053, 280, 1, 0, 0, 0, + 1054, 1055, 3, 19, 9, 0, 1055, 1056, 3, 277, 138, 0, 1056, 282, 1, 0, 0, + 0, 1057, 1058, 3, 33, 16, 0, 1058, 1059, 3, 277, 138, 0, 1059, 284, 1, + 0, 0, 0, 1060, 1061, 7, 30, 0, 0, 1061, 1062, 1, 0, 0, 0, 1062, 1063, 6, + 142, 0, 0, 1063, 286, 1, 0, 0, 0, 1064, 1065, 5, 47, 0, 0, 1065, 1066, + 5, 42, 0, 0, 1066, 1070, 1, 0, 0, 0, 1067, 1069, 9, 0, 0, 0, 1068, 1067, + 1, 0, 0, 0, 1069, 1072, 1, 0, 0, 0, 1070, 1071, 1, 0, 0, 0, 1070, 1068, + 1, 0, 0, 0, 1071, 1073, 1, 0, 0, 0, 1072, 1070, 1, 0, 0, 0, 1073, 1074, + 5, 42, 0, 0, 1074, 1075, 5, 47, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1077, + 6, 143, 0, 0, 1077, 288, 1, 0, 0, 0, 1078, 1079, 5, 47, 0, 0, 1079, 1080, + 5, 47, 0, 0, 1080, 1084, 1, 0, 0, 0, 1081, 1083, 8, 31, 0, 0, 1082, 1081, + 1, 0, 0, 0, 1083, 1086, 1, 0, 0, 0, 1084, 1082, 1, 0, 0, 0, 1084, 1085, + 1, 0, 0, 0, 1085, 1087, 1, 0, 0, 0, 1086, 1084, 1, 0, 0, 0, 1087, 1088, + 6, 144, 0, 0, 1088, 290, 1, 0, 0, 0, 10, 0, 341, 947, 949, 968, 976, 991, + 1048, 1070, 1084, 1, 0, 1, 0, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -628,99 +667,108 @@ const ( KuneiformLexerPRIVATE = 39 KuneiformLexerVIEW = 40 KuneiformLexerOWNER = 41 - KuneiformLexerFOREIGN = 42 - KuneiformLexerPRIMARY = 43 - KuneiformLexerKEY = 44 - KuneiformLexerON = 45 - KuneiformLexerDO = 46 - KuneiformLexerUNIQUE = 47 - KuneiformLexerCASCADE = 48 - KuneiformLexerRESTRICT = 49 - KuneiformLexerSET = 50 - KuneiformLexerDEFAULT = 51 - KuneiformLexerNULL = 52 - KuneiformLexerDELETE = 53 - KuneiformLexerUPDATE = 54 - KuneiformLexerREFERENCES = 55 - KuneiformLexerREF = 56 - KuneiformLexerNOT = 57 - KuneiformLexerINDEX = 58 - KuneiformLexerAND = 59 - KuneiformLexerOR = 60 - KuneiformLexerLIKE = 61 - KuneiformLexerILIKE = 62 - KuneiformLexerIN = 63 - KuneiformLexerBETWEEN = 64 - KuneiformLexerIS = 65 - KuneiformLexerEXISTS = 66 - KuneiformLexerALL = 67 - KuneiformLexerANY = 68 - KuneiformLexerJOIN = 69 - KuneiformLexerLEFT = 70 - KuneiformLexerRIGHT = 71 - KuneiformLexerINNER = 72 - KuneiformLexerAS = 73 - KuneiformLexerASC = 74 - KuneiformLexerDESC = 75 - KuneiformLexerLIMIT = 76 - KuneiformLexerOFFSET = 77 - KuneiformLexerORDER = 78 - KuneiformLexerBY = 79 - KuneiformLexerGROUP = 80 - KuneiformLexerHAVING = 81 - KuneiformLexerRETURNS = 82 - KuneiformLexerNO = 83 - KuneiformLexerWITH = 84 - KuneiformLexerCASE = 85 - KuneiformLexerWHEN = 86 - KuneiformLexerTHEN = 87 - KuneiformLexerEND = 88 - KuneiformLexerDISTINCT = 89 - KuneiformLexerFROM = 90 - KuneiformLexerWHERE = 91 - KuneiformLexerCOLLATE = 92 - KuneiformLexerSELECT = 93 - KuneiformLexerINSERT = 94 - KuneiformLexerVALUES = 95 - KuneiformLexerFULL = 96 - KuneiformLexerUNION = 97 - KuneiformLexerINTERSECT = 98 - KuneiformLexerEXCEPT = 99 - KuneiformLexerNULLS = 100 - KuneiformLexerFIRST = 101 - KuneiformLexerLAST = 102 - KuneiformLexerRETURNING = 103 - KuneiformLexerINTO = 104 - KuneiformLexerCONFLICT = 105 - KuneiformLexerNOTHING = 106 - KuneiformLexerFOR = 107 - KuneiformLexerIF = 108 - KuneiformLexerELSEIF = 109 - KuneiformLexerELSE = 110 - KuneiformLexerBREAK = 111 - KuneiformLexerRETURN = 112 - KuneiformLexerNEXT = 113 - KuneiformLexerOVER = 114 - KuneiformLexerPARTITION = 115 - KuneiformLexerWINDOW = 116 - KuneiformLexerFILTER = 117 - KuneiformLexerRECURSIVE = 118 - KuneiformLexerSTRING_ = 119 - KuneiformLexerTRUE = 120 - KuneiformLexerFALSE = 121 - KuneiformLexerDIGITS_ = 122 - KuneiformLexerBINARY_ = 123 - KuneiformLexerLEGACY_FOREIGN_KEY = 124 - KuneiformLexerLEGACY_ON_UPDATE = 125 - KuneiformLexerLEGACY_ON_DELETE = 126 - KuneiformLexerLEGACY_SET_DEFAULT = 127 - KuneiformLexerLEGACY_SET_NULL = 128 - KuneiformLexerLEGACY_NO_ACTION = 129 - KuneiformLexerIDENTIFIER = 130 - KuneiformLexerVARIABLE = 131 - KuneiformLexerCONTEXTUAL_VARIABLE = 132 - KuneiformLexerHASH_IDENTIFIER = 133 - KuneiformLexerWS = 134 - KuneiformLexerBLOCK_COMMENT = 135 - KuneiformLexerLINE_COMMENT = 136 + KuneiformLexerCREATE = 42 + KuneiformLexerALTER = 43 + KuneiformLexerCOLUMN = 44 + KuneiformLexerADD = 45 + KuneiformLexerDROP = 46 + KuneiformLexerRENAME = 47 + KuneiformLexerTO = 48 + KuneiformLexerCONSTRAINT = 49 + KuneiformLexerCHECK = 50 + KuneiformLexerFOREIGN = 51 + KuneiformLexerPRIMARY = 52 + KuneiformLexerKEY = 53 + KuneiformLexerON = 54 + KuneiformLexerDO = 55 + KuneiformLexerUNIQUE = 56 + KuneiformLexerCASCADE = 57 + KuneiformLexerRESTRICT = 58 + KuneiformLexerSET = 59 + KuneiformLexerDEFAULT = 60 + KuneiformLexerNULL = 61 + KuneiformLexerDELETE = 62 + KuneiformLexerUPDATE = 63 + KuneiformLexerREFERENCES = 64 + KuneiformLexerREF = 65 + KuneiformLexerNOT = 66 + KuneiformLexerINDEX = 67 + KuneiformLexerAND = 68 + KuneiformLexerOR = 69 + KuneiformLexerLIKE = 70 + KuneiformLexerILIKE = 71 + KuneiformLexerIN = 72 + KuneiformLexerBETWEEN = 73 + KuneiformLexerIS = 74 + KuneiformLexerEXISTS = 75 + KuneiformLexerALL = 76 + KuneiformLexerANY = 77 + KuneiformLexerJOIN = 78 + KuneiformLexerLEFT = 79 + KuneiformLexerRIGHT = 80 + KuneiformLexerINNER = 81 + KuneiformLexerAS = 82 + KuneiformLexerASC = 83 + KuneiformLexerDESC = 84 + KuneiformLexerLIMIT = 85 + KuneiformLexerOFFSET = 86 + KuneiformLexerORDER = 87 + KuneiformLexerBY = 88 + KuneiformLexerGROUP = 89 + KuneiformLexerHAVING = 90 + KuneiformLexerRETURNS = 91 + KuneiformLexerNO = 92 + KuneiformLexerWITH = 93 + KuneiformLexerCASE = 94 + KuneiformLexerWHEN = 95 + KuneiformLexerTHEN = 96 + KuneiformLexerEND = 97 + KuneiformLexerDISTINCT = 98 + KuneiformLexerFROM = 99 + KuneiformLexerWHERE = 100 + KuneiformLexerCOLLATE = 101 + KuneiformLexerSELECT = 102 + KuneiformLexerINSERT = 103 + KuneiformLexerVALUES = 104 + KuneiformLexerFULL = 105 + KuneiformLexerUNION = 106 + KuneiformLexerINTERSECT = 107 + KuneiformLexerEXCEPT = 108 + KuneiformLexerNULLS = 109 + KuneiformLexerFIRST = 110 + KuneiformLexerLAST = 111 + KuneiformLexerRETURNING = 112 + KuneiformLexerINTO = 113 + KuneiformLexerCONFLICT = 114 + KuneiformLexerNOTHING = 115 + KuneiformLexerFOR = 116 + KuneiformLexerIF = 117 + KuneiformLexerELSEIF = 118 + KuneiformLexerELSE = 119 + KuneiformLexerBREAK = 120 + KuneiformLexerRETURN = 121 + KuneiformLexerNEXT = 122 + KuneiformLexerOVER = 123 + KuneiformLexerPARTITION = 124 + KuneiformLexerWINDOW = 125 + KuneiformLexerFILTER = 126 + KuneiformLexerRECURSIVE = 127 + KuneiformLexerSTRING_ = 128 + KuneiformLexerTRUE = 129 + KuneiformLexerFALSE = 130 + KuneiformLexerDIGITS_ = 131 + KuneiformLexerBINARY_ = 132 + KuneiformLexerLEGACY_FOREIGN_KEY = 133 + KuneiformLexerLEGACY_ON_UPDATE = 134 + KuneiformLexerLEGACY_ON_DELETE = 135 + KuneiformLexerLEGACY_SET_DEFAULT = 136 + KuneiformLexerLEGACY_SET_NULL = 137 + KuneiformLexerLEGACY_NO_ACTION = 138 + KuneiformLexerIDENTIFIER = 139 + KuneiformLexerVARIABLE = 140 + KuneiformLexerCONTEXTUAL_VARIABLE = 141 + KuneiformLexerHASH_IDENTIFIER = 142 + KuneiformLexerWS = 143 + KuneiformLexerBLOCK_COMMENT = 144 + KuneiformLexerLINE_COMMENT = 145 ) diff --git a/parse/gen/kuneiform_parser.go b/parse/gen/kuneiform_parser.go index 9a2de3700..e2f9e72ca 100644 --- a/parse/gen/kuneiform_parser.go +++ b/parse/gen/kuneiform_parser.go @@ -36,20 +36,22 @@ func kuneiformparserParserInit() { "'!'", "'.'", "'||'", "'*'", "'='", "'=='", "'#'", "'$'", "'%'", "'+'", "'-'", "'/'", "", "'<'", "'<='", "'>'", "'>='", "'::'", "'_'", "':='", "'..'", "'\"'", "'database'", "'use'", "'table'", "'action'", "'procedure'", - "'public'", "'private'", "'view'", "'owner'", "'foreign'", "'primary'", - "'key'", "'on'", "'do'", "'unique'", "'cascade'", "'restrict'", "'set'", - "'default'", "'null'", "'delete'", "'update'", "'references'", "'ref'", - "'not'", "'index'", "'and'", "'or'", "'like'", "'ilike'", "'in'", "'between'", - "'is'", "'exists'", "'all'", "'any'", "'join'", "'left'", "'right'", - "'inner'", "'as'", "'asc'", "'desc'", "'limit'", "'offset'", "'order'", - "'by'", "'group'", "'having'", "'returns'", "'no'", "'with'", "'case'", - "'when'", "'then'", "'end'", "'distinct'", "'from'", "'where'", "'collate'", - "'select'", "'insert'", "'values'", "'full'", "'union'", "'intersect'", - "'except'", "'nulls'", "'first'", "'last'", "'returning'", "'into'", - "'conflict'", "'nothing'", "'for'", "'if'", "'elseif'", "'else'", "'break'", - "'return'", "'next'", "'over'", "'partition'", "'window'", "'filter'", - "'recursive'", "", "'true'", "'false'", "", "", "", "'on_update'", "'on_delete'", - "'set_default'", "'set_null'", "'no_action'", + "'public'", "'private'", "'view'", "'owner'", "'create'", "'alter'", + "'column'", "'add'", "'drop'", "'rename'", "'to'", "'constraint'", "'check'", + "'foreign'", "'primary'", "'key'", "'on'", "'do'", "'unique'", "'cascade'", + "'restrict'", "'set'", "'default'", "'null'", "'delete'", "'update'", + "'references'", "'ref'", "'not'", "'index'", "'and'", "'or'", "'like'", + "'ilike'", "'in'", "'between'", "'is'", "'exists'", "'all'", "'any'", + "'join'", "'left'", "'right'", "'inner'", "'as'", "'asc'", "'desc'", + "'limit'", "'offset'", "'order'", "'by'", "'group'", "'having'", "'returns'", + "'no'", "'with'", "'case'", "'when'", "'then'", "'end'", "'distinct'", + "'from'", "'where'", "'collate'", "'select'", "'insert'", "'values'", + "'full'", "'union'", "'intersect'", "'except'", "'nulls'", "'first'", + "'last'", "'returning'", "'into'", "'conflict'", "'nothing'", "'for'", + "'if'", "'elseif'", "'else'", "'break'", "'return'", "'next'", "'over'", + "'partition'", "'window'", "'filter'", "'recursive'", "", "'true'", + "'false'", "", "", "", "'on_update'", "'on_delete'", "'set_default'", + "'set_null'", "'no_action'", } staticData.SymbolicNames = []string{ "", "LBRACE", "RBRACE", "LBRACKET", "RBRACKET", "COL", "SCOL", "LPAREN", @@ -57,40 +59,44 @@ func kuneiformparserParserInit() { "EQUATE", "HASH", "DOLLAR", "MOD", "PLUS", "MINUS", "DIV", "NEQ", "LT", "LTE", "GT", "GTE", "TYPE_CAST", "UNDERSCORE", "ASSIGN", "RANGE", "DOUBLE_QUOTE", "DATABASE", "USE", "TABLE", "ACTION", "PROCEDURE", "PUBLIC", "PRIVATE", - "VIEW", "OWNER", "FOREIGN", "PRIMARY", "KEY", "ON", "DO", "UNIQUE", - "CASCADE", "RESTRICT", "SET", "DEFAULT", "NULL", "DELETE", "UPDATE", - "REFERENCES", "REF", "NOT", "INDEX", "AND", "OR", "LIKE", "ILIKE", "IN", - "BETWEEN", "IS", "EXISTS", "ALL", "ANY", "JOIN", "LEFT", "RIGHT", "INNER", - "AS", "ASC", "DESC", "LIMIT", "OFFSET", "ORDER", "BY", "GROUP", "HAVING", - "RETURNS", "NO", "WITH", "CASE", "WHEN", "THEN", "END", "DISTINCT", - "FROM", "WHERE", "COLLATE", "SELECT", "INSERT", "VALUES", "FULL", "UNION", - "INTERSECT", "EXCEPT", "NULLS", "FIRST", "LAST", "RETURNING", "INTO", - "CONFLICT", "NOTHING", "FOR", "IF", "ELSEIF", "ELSE", "BREAK", "RETURN", - "NEXT", "OVER", "PARTITION", "WINDOW", "FILTER", "RECURSIVE", "STRING_", - "TRUE", "FALSE", "DIGITS_", "BINARY_", "LEGACY_FOREIGN_KEY", "LEGACY_ON_UPDATE", - "LEGACY_ON_DELETE", "LEGACY_SET_DEFAULT", "LEGACY_SET_NULL", "LEGACY_NO_ACTION", - "IDENTIFIER", "VARIABLE", "CONTEXTUAL_VARIABLE", "HASH_IDENTIFIER", - "WS", "BLOCK_COMMENT", "LINE_COMMENT", + "VIEW", "OWNER", "CREATE", "ALTER", "COLUMN", "ADD", "DROP", "RENAME", + "TO", "CONSTRAINT", "CHECK", "FOREIGN", "PRIMARY", "KEY", "ON", "DO", + "UNIQUE", "CASCADE", "RESTRICT", "SET", "DEFAULT", "NULL", "DELETE", + "UPDATE", "REFERENCES", "REF", "NOT", "INDEX", "AND", "OR", "LIKE", + "ILIKE", "IN", "BETWEEN", "IS", "EXISTS", "ALL", "ANY", "JOIN", "LEFT", + "RIGHT", "INNER", "AS", "ASC", "DESC", "LIMIT", "OFFSET", "ORDER", "BY", + "GROUP", "HAVING", "RETURNS", "NO", "WITH", "CASE", "WHEN", "THEN", + "END", "DISTINCT", "FROM", "WHERE", "COLLATE", "SELECT", "INSERT", "VALUES", + "FULL", "UNION", "INTERSECT", "EXCEPT", "NULLS", "FIRST", "LAST", "RETURNING", + "INTO", "CONFLICT", "NOTHING", "FOR", "IF", "ELSEIF", "ELSE", "BREAK", + "RETURN", "NEXT", "OVER", "PARTITION", "WINDOW", "FILTER", "RECURSIVE", + "STRING_", "TRUE", "FALSE", "DIGITS_", "BINARY_", "LEGACY_FOREIGN_KEY", + "LEGACY_ON_UPDATE", "LEGACY_ON_DELETE", "LEGACY_SET_DEFAULT", "LEGACY_SET_NULL", + "LEGACY_NO_ACTION", "IDENTIFIER", "VARIABLE", "CONTEXTUAL_VARIABLE", + "HASH_IDENTIFIER", "WS", "BLOCK_COMMENT", "LINE_COMMENT", } staticData.RuleNames = []string{ "schema_entry", "sql_entry", "action_entry", "procedure_entry", "literal", "identifier", "identifier_list", "type", "type_cast", "variable", "variable_list", "schema", "annotation", "database_declaration", "use_declaration", "table_declaration", - "column_def", "index_def", "foreign_key_def", "foreign_key_action", - "type_list", "named_type_list", "typed_variable_list", "constraint", - "access_modifier", "action_declaration", "procedure_declaration", "procedure_return", - "sql", "sql_statement", "common_table_expression", "select_statement", - "compound_operator", "ordering_term", "select_core", "relation", "join", - "result_column", "update_statement", "update_set_clause", "insert_statement", - "upsert_clause", "delete_statement", "sql_expr", "window", "when_then_clause", - "sql_expr_list", "sql_function_call", "action_block", "action_statement", - "procedure_block", "procedure_expr", "procedure_expr_list", "proc_statement", - "variable_or_underscore", "procedure_function_call", "if_then_block", - "range", + "column_def", "table_column_def", "index_def", "table_index_def", "foreign_key_def", + "foreign_key_action", "type_list", "named_type_list", "typed_variable_list", + "constraint", "inline_constraint", "fk_action", "fk_constraint", "access_modifier", + "action_declaration", "procedure_declaration", "procedure_return", "sql_stmt", + "ddl_stmt", "sql_statement", "common_table_expression", "create_table_statement", + "table_constraint_def", "opt_drop_behavior", "drop_table_statement", + "alter_table_statement", "alter_table_action", "create_index_statement", + "drop_index_statement", "select_statement", "compound_operator", "ordering_term", + "select_core", "relation", "join", "result_column", "update_statement", + "update_set_clause", "insert_statement", "upsert_clause", "delete_statement", + "sql_expr", "window", "when_then_clause", "sql_expr_list", "sql_function_call", + "action_block", "action_statement", "procedure_block", "procedure_expr", + "procedure_expr_list", "proc_statement", "variable_or_underscore", "procedure_function_call", + "if_then_block", "range", } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 136, 1171, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, + 4, 1, 145, 1412, 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, @@ -101,562 +107,686 @@ func kuneiformparserParserInit() { 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, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, - 3, 1, 4, 1, 4, 3, 4, 131, 8, 4, 1, 4, 1, 4, 3, 4, 135, 8, 4, 1, 4, 1, 4, - 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 143, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, - 149, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 154, 8, 6, 10, 6, 12, 6, 157, 9, 6, - 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 165, 8, 7, 1, 7, 1, 7, 3, 7, - 169, 8, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 5, 10, 179, - 8, 10, 10, 10, 12, 10, 182, 9, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, - 11, 189, 8, 11, 10, 11, 12, 11, 192, 9, 11, 1, 12, 1, 12, 1, 12, 1, 12, - 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 203, 8, 12, 10, 12, 12, 12, 206, - 9, 12, 3, 12, 208, 8, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, - 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, - 226, 8, 14, 10, 14, 12, 14, 229, 9, 14, 1, 14, 1, 14, 3, 14, 233, 8, 14, - 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, - 15, 1, 15, 3, 15, 247, 8, 15, 5, 15, 249, 8, 15, 10, 15, 12, 15, 252, 9, - 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 5, 16, 259, 8, 16, 10, 16, 12, 16, - 262, 9, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, - 18, 3, 18, 273, 8, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, - 1, 18, 1, 18, 5, 18, 284, 8, 18, 10, 18, 12, 18, 287, 9, 18, 1, 19, 1, - 19, 1, 19, 3, 19, 292, 8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 297, 8, 19, 3, - 19, 299, 8, 19, 1, 19, 3, 19, 302, 8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 307, - 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 313, 8, 19, 1, 19, 1, 19, 1, - 19, 3, 19, 318, 8, 19, 1, 19, 3, 19, 321, 8, 19, 1, 20, 1, 20, 1, 20, 5, - 20, 326, 8, 20, 10, 20, 12, 20, 329, 9, 20, 1, 21, 1, 21, 1, 21, 1, 21, - 1, 21, 5, 21, 336, 8, 21, 10, 21, 12, 21, 339, 9, 21, 1, 22, 1, 22, 1, - 22, 1, 22, 1, 22, 1, 22, 5, 22, 347, 8, 22, 10, 22, 12, 22, 350, 9, 22, - 1, 23, 1, 23, 1, 23, 3, 23, 355, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, - 23, 361, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 367, 8, 23, 1, 24, 1, - 24, 1, 25, 5, 25, 372, 8, 25, 10, 25, 12, 25, 375, 9, 25, 1, 25, 1, 25, - 1, 25, 1, 25, 3, 25, 381, 8, 25, 1, 25, 1, 25, 4, 25, 385, 8, 25, 11, 25, - 12, 25, 386, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 5, 26, 394, 8, 26, 10, - 26, 12, 26, 397, 9, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 403, 8, 26, - 1, 26, 1, 26, 4, 26, 407, 8, 26, 11, 26, 12, 26, 408, 1, 26, 3, 26, 412, - 8, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 3, 27, 420, 8, 27, 1, - 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 430, 8, 27, - 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 437, 8, 29, 1, 29, 1, 29, 1, - 29, 5, 29, 442, 8, 29, 10, 29, 12, 29, 445, 9, 29, 3, 29, 447, 8, 29, 1, - 29, 1, 29, 1, 29, 1, 29, 3, 29, 453, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, - 1, 30, 5, 30, 460, 8, 30, 10, 30, 12, 30, 463, 9, 30, 3, 30, 465, 8, 30, - 1, 30, 3, 30, 468, 8, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, - 31, 1, 31, 1, 31, 5, 31, 479, 8, 31, 10, 31, 12, 31, 482, 9, 31, 1, 31, - 1, 31, 1, 31, 1, 31, 1, 31, 5, 31, 489, 8, 31, 10, 31, 12, 31, 492, 9, - 31, 3, 31, 494, 8, 31, 1, 31, 1, 31, 3, 31, 498, 8, 31, 1, 31, 1, 31, 3, - 31, 502, 8, 31, 1, 32, 1, 32, 3, 32, 506, 8, 32, 1, 32, 1, 32, 3, 32, 510, - 8, 32, 1, 33, 1, 33, 3, 33, 514, 8, 33, 1, 33, 1, 33, 3, 33, 518, 8, 33, - 1, 34, 1, 34, 3, 34, 522, 8, 34, 1, 34, 1, 34, 1, 34, 5, 34, 527, 8, 34, - 10, 34, 12, 34, 530, 9, 34, 1, 34, 1, 34, 1, 34, 5, 34, 535, 8, 34, 10, - 34, 12, 34, 538, 9, 34, 3, 34, 540, 8, 34, 1, 34, 1, 34, 3, 34, 544, 8, - 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 551, 8, 34, 3, 34, 553, 8, - 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, - 564, 8, 34, 10, 34, 12, 34, 567, 9, 34, 3, 34, 569, 8, 34, 1, 35, 1, 35, - 3, 35, 573, 8, 35, 1, 35, 3, 35, 576, 8, 35, 1, 35, 1, 35, 1, 35, 1, 35, - 3, 35, 582, 8, 35, 1, 35, 3, 35, 585, 8, 35, 3, 35, 587, 8, 35, 1, 36, - 3, 36, 590, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 3, - 37, 599, 8, 37, 1, 37, 3, 37, 602, 8, 37, 1, 37, 1, 37, 1, 37, 3, 37, 607, - 8, 37, 1, 37, 3, 37, 610, 8, 37, 1, 38, 1, 38, 1, 38, 3, 38, 615, 8, 38, - 1, 38, 3, 38, 618, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 624, 8, 38, - 10, 38, 12, 38, 627, 9, 38, 1, 38, 1, 38, 1, 38, 5, 38, 632, 8, 38, 10, - 38, 12, 38, 635, 9, 38, 3, 38, 637, 8, 38, 1, 38, 1, 38, 3, 38, 641, 8, - 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 651, - 8, 40, 1, 40, 3, 40, 654, 8, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 660, - 8, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 5, - 40, 671, 8, 40, 10, 40, 12, 40, 674, 9, 40, 1, 40, 3, 40, 677, 8, 40, 1, - 40, 3, 40, 680, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, - 3, 41, 689, 8, 41, 3, 41, 691, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, - 1, 41, 1, 41, 5, 41, 700, 8, 41, 10, 41, 12, 41, 703, 9, 41, 1, 41, 1, - 41, 3, 41, 707, 8, 41, 3, 41, 709, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 3, - 42, 715, 8, 42, 1, 42, 3, 42, 718, 8, 42, 1, 42, 1, 42, 3, 42, 722, 8, - 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 729, 8, 43, 1, 43, 1, 43, - 1, 43, 1, 43, 3, 43, 735, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, - 43, 1, 43, 3, 43, 744, 8, 43, 1, 43, 1, 43, 1, 43, 3, 43, 749, 8, 43, 1, - 43, 1, 43, 3, 43, 753, 8, 43, 1, 43, 1, 43, 3, 43, 757, 8, 43, 1, 43, 1, - 43, 1, 43, 3, 43, 762, 8, 43, 1, 43, 1, 43, 3, 43, 766, 8, 43, 1, 43, 1, - 43, 3, 43, 770, 8, 43, 1, 43, 4, 43, 773, 8, 43, 11, 43, 12, 43, 774, 1, - 43, 1, 43, 3, 43, 779, 8, 43, 1, 43, 1, 43, 1, 43, 3, 43, 784, 8, 43, 1, - 43, 3, 43, 787, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 793, 8, 43, 1, - 43, 1, 43, 3, 43, 797, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, - 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 810, 8, 43, 1, 43, 1, 43, 1, - 43, 1, 43, 3, 43, 816, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, - 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, - 43, 1, 43, 3, 43, 836, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 842, 8, - 43, 1, 43, 1, 43, 3, 43, 846, 8, 43, 3, 43, 848, 8, 43, 1, 43, 1, 43, 3, - 43, 852, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 859, 8, 43, 1, - 43, 1, 43, 1, 43, 1, 43, 3, 43, 865, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, - 1, 43, 3, 43, 872, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, - 43, 880, 8, 43, 5, 43, 882, 8, 43, 10, 43, 12, 43, 885, 9, 43, 1, 44, 1, - 44, 1, 44, 1, 44, 3, 44, 891, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, - 5, 44, 898, 8, 44, 10, 44, 12, 44, 901, 9, 44, 3, 44, 903, 8, 44, 1, 44, - 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 5, 46, 915, - 8, 46, 10, 46, 12, 46, 918, 9, 46, 1, 47, 1, 47, 1, 47, 3, 47, 923, 8, - 47, 1, 47, 1, 47, 3, 47, 927, 8, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, - 5, 48, 934, 8, 48, 10, 48, 12, 48, 937, 9, 48, 1, 49, 1, 49, 1, 49, 1, - 49, 3, 49, 943, 8, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 949, 8, 49, 1, - 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 956, 8, 49, 1, 49, 3, 49, 959, 8, - 49, 1, 50, 5, 50, 962, 8, 50, 10, 50, 12, 50, 965, 9, 50, 1, 51, 1, 51, - 1, 51, 1, 51, 1, 51, 3, 51, 972, 8, 51, 1, 51, 1, 51, 1, 51, 1, 51, 3, - 51, 978, 8, 51, 1, 51, 1, 51, 3, 51, 982, 8, 51, 1, 51, 1, 51, 3, 51, 986, - 8, 51, 1, 51, 1, 51, 3, 51, 990, 8, 51, 1, 51, 1, 51, 3, 51, 994, 8, 51, - 1, 51, 1, 51, 3, 51, 998, 8, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, - 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, - 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 1022, 8, 51, 1, 51, 1, - 51, 1, 51, 1, 51, 3, 51, 1028, 8, 51, 1, 51, 1, 51, 3, 51, 1032, 8, 51, - 3, 51, 1034, 8, 51, 1, 51, 1, 51, 3, 51, 1038, 8, 51, 1, 51, 1, 51, 1, - 51, 3, 51, 1043, 8, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, - 1051, 8, 51, 5, 51, 1053, 8, 51, 10, 51, 12, 51, 1056, 9, 51, 1, 52, 1, - 52, 1, 52, 5, 52, 1061, 8, 52, 10, 52, 12, 52, 1064, 9, 52, 1, 53, 1, 53, - 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 1073, 8, 53, 10, 53, 12, 53, - 1076, 9, 53, 1, 53, 1, 53, 3, 53, 1080, 8, 53, 1, 53, 1, 53, 1, 53, 1, - 53, 1, 53, 3, 53, 1087, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, - 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1099, 8, 53, 1, 53, 1, 53, 5, 53, 1103, - 8, 53, 10, 53, 12, 53, 1106, 9, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, - 1, 53, 5, 53, 1114, 8, 53, 10, 53, 12, 53, 1117, 9, 53, 1, 53, 1, 53, 1, - 53, 5, 53, 1122, 8, 53, 10, 53, 12, 53, 1125, 9, 53, 1, 53, 3, 53, 1128, - 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1138, - 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1146, 8, 53, 1, - 54, 1, 54, 1, 55, 1, 55, 1, 55, 3, 55, 1153, 8, 55, 1, 55, 1, 55, 1, 56, - 1, 56, 1, 56, 5, 56, 1160, 8, 56, 10, 56, 12, 56, 1163, 9, 56, 1, 56, 1, - 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 0, 2, 86, 102, 58, 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, 0, 14, 1, 0, 20, 21, 1, 0, 120, 121, 1, 0, 131, 132, 3, 0, 43, 43, - 47, 47, 58, 58, 1, 0, 55, 56, 1, 0, 38, 41, 1, 0, 74, 75, 1, 0, 101, 102, - 2, 0, 70, 72, 96, 96, 3, 0, 14, 14, 19, 19, 22, 22, 1, 0, 61, 62, 2, 0, - 15, 16, 23, 27, 2, 0, 11, 11, 20, 21, 2, 0, 29, 29, 131, 131, 1340, 0, - 116, 1, 0, 0, 0, 2, 119, 1, 0, 0, 0, 4, 122, 1, 0, 0, 0, 6, 125, 1, 0, - 0, 0, 8, 142, 1, 0, 0, 0, 10, 148, 1, 0, 0, 0, 12, 150, 1, 0, 0, 0, 14, - 158, 1, 0, 0, 0, 16, 170, 1, 0, 0, 0, 18, 173, 1, 0, 0, 0, 20, 175, 1, - 0, 0, 0, 22, 183, 1, 0, 0, 0, 24, 193, 1, 0, 0, 0, 26, 211, 1, 0, 0, 0, - 28, 215, 1, 0, 0, 0, 30, 238, 1, 0, 0, 0, 32, 255, 1, 0, 0, 0, 34, 263, - 1, 0, 0, 0, 36, 272, 1, 0, 0, 0, 38, 298, 1, 0, 0, 0, 40, 322, 1, 0, 0, - 0, 42, 330, 1, 0, 0, 0, 44, 340, 1, 0, 0, 0, 46, 360, 1, 0, 0, 0, 48, 368, - 1, 0, 0, 0, 50, 373, 1, 0, 0, 0, 52, 395, 1, 0, 0, 0, 54, 417, 1, 0, 0, - 0, 56, 431, 1, 0, 0, 0, 58, 446, 1, 0, 0, 0, 60, 454, 1, 0, 0, 0, 62, 474, - 1, 0, 0, 0, 64, 509, 1, 0, 0, 0, 66, 511, 1, 0, 0, 0, 68, 519, 1, 0, 0, - 0, 70, 586, 1, 0, 0, 0, 72, 589, 1, 0, 0, 0, 74, 609, 1, 0, 0, 0, 76, 611, - 1, 0, 0, 0, 78, 642, 1, 0, 0, 0, 80, 646, 1, 0, 0, 0, 82, 681, 1, 0, 0, - 0, 84, 710, 1, 0, 0, 0, 86, 796, 1, 0, 0, 0, 88, 886, 1, 0, 0, 0, 90, 906, - 1, 0, 0, 0, 92, 911, 1, 0, 0, 0, 94, 919, 1, 0, 0, 0, 96, 935, 1, 0, 0, - 0, 98, 958, 1, 0, 0, 0, 100, 963, 1, 0, 0, 0, 102, 997, 1, 0, 0, 0, 104, - 1057, 1, 0, 0, 0, 106, 1145, 1, 0, 0, 0, 108, 1147, 1, 0, 0, 0, 110, 1149, - 1, 0, 0, 0, 112, 1156, 1, 0, 0, 0, 114, 1166, 1, 0, 0, 0, 116, 117, 3, - 22, 11, 0, 117, 118, 5, 0, 0, 1, 118, 1, 1, 0, 0, 0, 119, 120, 3, 56, 28, - 0, 120, 121, 5, 0, 0, 1, 121, 3, 1, 0, 0, 0, 122, 123, 3, 96, 48, 0, 123, - 124, 5, 0, 0, 1, 124, 5, 1, 0, 0, 0, 125, 126, 3, 100, 50, 0, 126, 127, - 5, 0, 0, 1, 127, 7, 1, 0, 0, 0, 128, 143, 5, 119, 0, 0, 129, 131, 7, 0, - 0, 0, 130, 129, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, - 132, 143, 5, 122, 0, 0, 133, 135, 7, 0, 0, 0, 134, 133, 1, 0, 0, 0, 134, - 135, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 5, 122, 0, 0, 137, 138, - 5, 12, 0, 0, 138, 143, 5, 122, 0, 0, 139, 143, 7, 1, 0, 0, 140, 143, 5, - 52, 0, 0, 141, 143, 5, 123, 0, 0, 142, 128, 1, 0, 0, 0, 142, 130, 1, 0, - 0, 0, 142, 134, 1, 0, 0, 0, 142, 139, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, - 142, 141, 1, 0, 0, 0, 143, 9, 1, 0, 0, 0, 144, 145, 5, 32, 0, 0, 145, 146, - 5, 130, 0, 0, 146, 149, 5, 32, 0, 0, 147, 149, 5, 130, 0, 0, 148, 144, - 1, 0, 0, 0, 148, 147, 1, 0, 0, 0, 149, 11, 1, 0, 0, 0, 150, 155, 3, 10, - 5, 0, 151, 152, 5, 9, 0, 0, 152, 154, 3, 10, 5, 0, 153, 151, 1, 0, 0, 0, - 154, 157, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, - 13, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 158, 164, 5, 130, 0, 0, 159, 160, - 5, 7, 0, 0, 160, 161, 5, 122, 0, 0, 161, 162, 5, 9, 0, 0, 162, 163, 5, - 122, 0, 0, 163, 165, 5, 8, 0, 0, 164, 159, 1, 0, 0, 0, 164, 165, 1, 0, - 0, 0, 165, 168, 1, 0, 0, 0, 166, 167, 5, 3, 0, 0, 167, 169, 5, 4, 0, 0, - 168, 166, 1, 0, 0, 0, 168, 169, 1, 0, 0, 0, 169, 15, 1, 0, 0, 0, 170, 171, - 5, 28, 0, 0, 171, 172, 3, 14, 7, 0, 172, 17, 1, 0, 0, 0, 173, 174, 7, 2, - 0, 0, 174, 19, 1, 0, 0, 0, 175, 180, 3, 18, 9, 0, 176, 177, 5, 9, 0, 0, - 177, 179, 3, 18, 9, 0, 178, 176, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, - 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 21, 1, 0, 0, 0, 182, 180, 1, - 0, 0, 0, 183, 190, 3, 26, 13, 0, 184, 189, 3, 28, 14, 0, 185, 189, 3, 30, - 15, 0, 186, 189, 3, 50, 25, 0, 187, 189, 3, 52, 26, 0, 188, 184, 1, 0, - 0, 0, 188, 185, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 188, 187, 1, 0, 0, 0, - 189, 192, 1, 0, 0, 0, 190, 188, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, - 23, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 193, 194, 5, 132, 0, 0, 194, 207, - 5, 7, 0, 0, 195, 196, 5, 130, 0, 0, 196, 197, 5, 15, 0, 0, 197, 204, 3, - 8, 4, 0, 198, 199, 5, 9, 0, 0, 199, 200, 5, 130, 0, 0, 200, 201, 5, 15, - 0, 0, 201, 203, 3, 8, 4, 0, 202, 198, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, - 204, 202, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 208, 1, 0, 0, 0, 206, - 204, 1, 0, 0, 0, 207, 195, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, - 1, 0, 0, 0, 209, 210, 5, 8, 0, 0, 210, 25, 1, 0, 0, 0, 211, 212, 5, 33, - 0, 0, 212, 213, 5, 130, 0, 0, 213, 214, 5, 6, 0, 0, 214, 27, 1, 0, 0, 0, - 215, 216, 5, 34, 0, 0, 216, 232, 5, 130, 0, 0, 217, 218, 5, 1, 0, 0, 218, - 219, 5, 130, 0, 0, 219, 220, 5, 5, 0, 0, 220, 227, 3, 8, 4, 0, 221, 222, - 5, 9, 0, 0, 222, 223, 5, 130, 0, 0, 223, 224, 5, 5, 0, 0, 224, 226, 3, - 8, 4, 0, 225, 221, 1, 0, 0, 0, 226, 229, 1, 0, 0, 0, 227, 225, 1, 0, 0, - 0, 227, 228, 1, 0, 0, 0, 228, 230, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 230, - 231, 5, 2, 0, 0, 231, 233, 1, 0, 0, 0, 232, 217, 1, 0, 0, 0, 232, 233, - 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 235, 5, 73, 0, 0, 235, 236, 5, 130, - 0, 0, 236, 237, 5, 6, 0, 0, 237, 29, 1, 0, 0, 0, 238, 239, 5, 35, 0, 0, - 239, 240, 5, 130, 0, 0, 240, 241, 5, 1, 0, 0, 241, 250, 3, 32, 16, 0, 242, - 246, 5, 9, 0, 0, 243, 247, 3, 32, 16, 0, 244, 247, 3, 34, 17, 0, 245, 247, - 3, 36, 18, 0, 246, 243, 1, 0, 0, 0, 246, 244, 1, 0, 0, 0, 246, 245, 1, - 0, 0, 0, 247, 249, 1, 0, 0, 0, 248, 242, 1, 0, 0, 0, 249, 252, 1, 0, 0, - 0, 250, 248, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 253, 1, 0, 0, 0, 252, - 250, 1, 0, 0, 0, 253, 254, 5, 2, 0, 0, 254, 31, 1, 0, 0, 0, 255, 256, 5, - 130, 0, 0, 256, 260, 3, 14, 7, 0, 257, 259, 3, 46, 23, 0, 258, 257, 1, - 0, 0, 0, 259, 262, 1, 0, 0, 0, 260, 258, 1, 0, 0, 0, 260, 261, 1, 0, 0, - 0, 261, 33, 1, 0, 0, 0, 262, 260, 1, 0, 0, 0, 263, 264, 5, 133, 0, 0, 264, - 265, 7, 3, 0, 0, 265, 266, 5, 7, 0, 0, 266, 267, 3, 12, 6, 0, 267, 268, - 5, 8, 0, 0, 268, 35, 1, 0, 0, 0, 269, 270, 5, 42, 0, 0, 270, 273, 5, 44, - 0, 0, 271, 273, 5, 124, 0, 0, 272, 269, 1, 0, 0, 0, 272, 271, 1, 0, 0, - 0, 273, 274, 1, 0, 0, 0, 274, 275, 5, 7, 0, 0, 275, 276, 3, 12, 6, 0, 276, - 277, 5, 8, 0, 0, 277, 278, 7, 4, 0, 0, 278, 279, 5, 130, 0, 0, 279, 280, - 5, 7, 0, 0, 280, 281, 3, 12, 6, 0, 281, 285, 5, 8, 0, 0, 282, 284, 3, 38, - 19, 0, 283, 282, 1, 0, 0, 0, 284, 287, 1, 0, 0, 0, 285, 283, 1, 0, 0, 0, - 285, 286, 1, 0, 0, 0, 286, 37, 1, 0, 0, 0, 287, 285, 1, 0, 0, 0, 288, 289, - 5, 45, 0, 0, 289, 292, 5, 54, 0, 0, 290, 292, 5, 125, 0, 0, 291, 288, 1, - 0, 0, 0, 291, 290, 1, 0, 0, 0, 292, 299, 1, 0, 0, 0, 293, 294, 5, 45, 0, - 0, 294, 297, 5, 53, 0, 0, 295, 297, 5, 126, 0, 0, 296, 293, 1, 0, 0, 0, - 296, 295, 1, 0, 0, 0, 297, 299, 1, 0, 0, 0, 298, 291, 1, 0, 0, 0, 298, - 296, 1, 0, 0, 0, 299, 301, 1, 0, 0, 0, 300, 302, 5, 46, 0, 0, 301, 300, - 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 320, 1, 0, 0, 0, 303, 304, 5, 83, - 0, 0, 304, 307, 5, 36, 0, 0, 305, 307, 5, 129, 0, 0, 306, 303, 1, 0, 0, - 0, 306, 305, 1, 0, 0, 0, 307, 321, 1, 0, 0, 0, 308, 321, 5, 48, 0, 0, 309, - 310, 5, 50, 0, 0, 310, 313, 5, 52, 0, 0, 311, 313, 5, 128, 0, 0, 312, 309, - 1, 0, 0, 0, 312, 311, 1, 0, 0, 0, 313, 321, 1, 0, 0, 0, 314, 315, 5, 50, - 0, 0, 315, 318, 5, 51, 0, 0, 316, 318, 5, 127, 0, 0, 317, 314, 1, 0, 0, - 0, 317, 316, 1, 0, 0, 0, 318, 321, 1, 0, 0, 0, 319, 321, 5, 49, 0, 0, 320, - 306, 1, 0, 0, 0, 320, 308, 1, 0, 0, 0, 320, 312, 1, 0, 0, 0, 320, 317, - 1, 0, 0, 0, 320, 319, 1, 0, 0, 0, 321, 39, 1, 0, 0, 0, 322, 327, 3, 14, - 7, 0, 323, 324, 5, 9, 0, 0, 324, 326, 3, 14, 7, 0, 325, 323, 1, 0, 0, 0, - 326, 329, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 327, 328, 1, 0, 0, 0, 328, - 41, 1, 0, 0, 0, 329, 327, 1, 0, 0, 0, 330, 331, 5, 130, 0, 0, 331, 337, - 3, 14, 7, 0, 332, 333, 5, 9, 0, 0, 333, 334, 5, 130, 0, 0, 334, 336, 3, - 14, 7, 0, 335, 332, 1, 0, 0, 0, 336, 339, 1, 0, 0, 0, 337, 335, 1, 0, 0, - 0, 337, 338, 1, 0, 0, 0, 338, 43, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 340, - 341, 3, 18, 9, 0, 341, 348, 3, 14, 7, 0, 342, 343, 5, 9, 0, 0, 343, 344, - 3, 18, 9, 0, 344, 345, 3, 14, 7, 0, 345, 347, 1, 0, 0, 0, 346, 342, 1, - 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 348, 349, 1, 0, 0, - 0, 349, 45, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 351, 361, 5, 130, 0, 0, 352, - 354, 5, 43, 0, 0, 353, 355, 5, 44, 0, 0, 354, 353, 1, 0, 0, 0, 354, 355, - 1, 0, 0, 0, 355, 361, 1, 0, 0, 0, 356, 357, 5, 57, 0, 0, 357, 361, 5, 52, - 0, 0, 358, 361, 5, 51, 0, 0, 359, 361, 5, 47, 0, 0, 360, 351, 1, 0, 0, - 0, 360, 352, 1, 0, 0, 0, 360, 356, 1, 0, 0, 0, 360, 358, 1, 0, 0, 0, 360, - 359, 1, 0, 0, 0, 361, 366, 1, 0, 0, 0, 362, 363, 5, 7, 0, 0, 363, 364, - 3, 8, 4, 0, 364, 365, 5, 8, 0, 0, 365, 367, 1, 0, 0, 0, 366, 362, 1, 0, - 0, 0, 366, 367, 1, 0, 0, 0, 367, 47, 1, 0, 0, 0, 368, 369, 7, 5, 0, 0, - 369, 49, 1, 0, 0, 0, 370, 372, 3, 24, 12, 0, 371, 370, 1, 0, 0, 0, 372, - 375, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 373, 374, 1, 0, 0, 0, 374, 376, - 1, 0, 0, 0, 375, 373, 1, 0, 0, 0, 376, 377, 5, 36, 0, 0, 377, 378, 5, 130, - 0, 0, 378, 380, 5, 7, 0, 0, 379, 381, 3, 20, 10, 0, 380, 379, 1, 0, 0, - 0, 380, 381, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 384, 5, 8, 0, 0, 383, - 385, 3, 48, 24, 0, 384, 383, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 384, - 1, 0, 0, 0, 386, 387, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 389, 5, 1, - 0, 0, 389, 390, 3, 96, 48, 0, 390, 391, 5, 2, 0, 0, 391, 51, 1, 0, 0, 0, - 392, 394, 3, 24, 12, 0, 393, 392, 1, 0, 0, 0, 394, 397, 1, 0, 0, 0, 395, - 393, 1, 0, 0, 0, 395, 396, 1, 0, 0, 0, 396, 398, 1, 0, 0, 0, 397, 395, - 1, 0, 0, 0, 398, 399, 5, 37, 0, 0, 399, 400, 5, 130, 0, 0, 400, 402, 5, - 7, 0, 0, 401, 403, 3, 44, 22, 0, 402, 401, 1, 0, 0, 0, 402, 403, 1, 0, - 0, 0, 403, 404, 1, 0, 0, 0, 404, 406, 5, 8, 0, 0, 405, 407, 3, 48, 24, - 0, 406, 405, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, - 409, 1, 0, 0, 0, 409, 411, 1, 0, 0, 0, 410, 412, 3, 54, 27, 0, 411, 410, - 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 414, 5, 1, - 0, 0, 414, 415, 3, 100, 50, 0, 415, 416, 5, 2, 0, 0, 416, 53, 1, 0, 0, - 0, 417, 429, 5, 82, 0, 0, 418, 420, 5, 35, 0, 0, 419, 418, 1, 0, 0, 0, - 419, 420, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 422, 5, 7, 0, 0, 422, - 423, 3, 42, 21, 0, 423, 424, 5, 8, 0, 0, 424, 430, 1, 0, 0, 0, 425, 426, - 5, 7, 0, 0, 426, 427, 3, 40, 20, 0, 427, 428, 5, 8, 0, 0, 428, 430, 1, - 0, 0, 0, 429, 419, 1, 0, 0, 0, 429, 425, 1, 0, 0, 0, 430, 55, 1, 0, 0, - 0, 431, 432, 3, 58, 29, 0, 432, 433, 5, 6, 0, 0, 433, 57, 1, 0, 0, 0, 434, - 436, 5, 84, 0, 0, 435, 437, 5, 118, 0, 0, 436, 435, 1, 0, 0, 0, 436, 437, - 1, 0, 0, 0, 437, 438, 1, 0, 0, 0, 438, 443, 3, 60, 30, 0, 439, 440, 5, - 9, 0, 0, 440, 442, 3, 60, 30, 0, 441, 439, 1, 0, 0, 0, 442, 445, 1, 0, - 0, 0, 443, 441, 1, 0, 0, 0, 443, 444, 1, 0, 0, 0, 444, 447, 1, 0, 0, 0, - 445, 443, 1, 0, 0, 0, 446, 434, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, - 452, 1, 0, 0, 0, 448, 453, 3, 62, 31, 0, 449, 453, 3, 76, 38, 0, 450, 453, - 3, 80, 40, 0, 451, 453, 3, 84, 42, 0, 452, 448, 1, 0, 0, 0, 452, 449, 1, - 0, 0, 0, 452, 450, 1, 0, 0, 0, 452, 451, 1, 0, 0, 0, 453, 59, 1, 0, 0, - 0, 454, 467, 3, 10, 5, 0, 455, 464, 5, 7, 0, 0, 456, 461, 3, 10, 5, 0, - 457, 458, 5, 9, 0, 0, 458, 460, 3, 10, 5, 0, 459, 457, 1, 0, 0, 0, 460, - 463, 1, 0, 0, 0, 461, 459, 1, 0, 0, 0, 461, 462, 1, 0, 0, 0, 462, 465, - 1, 0, 0, 0, 463, 461, 1, 0, 0, 0, 464, 456, 1, 0, 0, 0, 464, 465, 1, 0, - 0, 0, 465, 466, 1, 0, 0, 0, 466, 468, 5, 8, 0, 0, 467, 455, 1, 0, 0, 0, - 467, 468, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 470, 5, 73, 0, 0, 470, - 471, 5, 7, 0, 0, 471, 472, 3, 62, 31, 0, 472, 473, 5, 8, 0, 0, 473, 61, - 1, 0, 0, 0, 474, 480, 3, 68, 34, 0, 475, 476, 3, 64, 32, 0, 476, 477, 3, - 68, 34, 0, 477, 479, 1, 0, 0, 0, 478, 475, 1, 0, 0, 0, 479, 482, 1, 0, - 0, 0, 480, 478, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 493, 1, 0, 0, 0, - 482, 480, 1, 0, 0, 0, 483, 484, 5, 78, 0, 0, 484, 485, 5, 79, 0, 0, 485, - 490, 3, 66, 33, 0, 486, 487, 5, 9, 0, 0, 487, 489, 3, 66, 33, 0, 488, 486, - 1, 0, 0, 0, 489, 492, 1, 0, 0, 0, 490, 488, 1, 0, 0, 0, 490, 491, 1, 0, - 0, 0, 491, 494, 1, 0, 0, 0, 492, 490, 1, 0, 0, 0, 493, 483, 1, 0, 0, 0, - 493, 494, 1, 0, 0, 0, 494, 497, 1, 0, 0, 0, 495, 496, 5, 76, 0, 0, 496, - 498, 3, 86, 43, 0, 497, 495, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 501, - 1, 0, 0, 0, 499, 500, 5, 77, 0, 0, 500, 502, 3, 86, 43, 0, 501, 499, 1, - 0, 0, 0, 501, 502, 1, 0, 0, 0, 502, 63, 1, 0, 0, 0, 503, 505, 5, 97, 0, - 0, 504, 506, 5, 67, 0, 0, 505, 504, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, - 510, 1, 0, 0, 0, 507, 510, 5, 98, 0, 0, 508, 510, 5, 99, 0, 0, 509, 503, - 1, 0, 0, 0, 509, 507, 1, 0, 0, 0, 509, 508, 1, 0, 0, 0, 510, 65, 1, 0, - 0, 0, 511, 513, 3, 86, 43, 0, 512, 514, 7, 6, 0, 0, 513, 512, 1, 0, 0, - 0, 513, 514, 1, 0, 0, 0, 514, 517, 1, 0, 0, 0, 515, 516, 5, 100, 0, 0, - 516, 518, 7, 7, 0, 0, 517, 515, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, - 67, 1, 0, 0, 0, 519, 521, 5, 93, 0, 0, 520, 522, 5, 89, 0, 0, 521, 520, - 1, 0, 0, 0, 521, 522, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 528, 3, 74, - 37, 0, 524, 525, 5, 9, 0, 0, 525, 527, 3, 74, 37, 0, 526, 524, 1, 0, 0, - 0, 527, 530, 1, 0, 0, 0, 528, 526, 1, 0, 0, 0, 528, 529, 1, 0, 0, 0, 529, - 539, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 532, 5, 90, 0, 0, 532, 536, - 3, 70, 35, 0, 533, 535, 3, 72, 36, 0, 534, 533, 1, 0, 0, 0, 535, 538, 1, - 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 540, 1, 0, 0, - 0, 538, 536, 1, 0, 0, 0, 539, 531, 1, 0, 0, 0, 539, 540, 1, 0, 0, 0, 540, - 543, 1, 0, 0, 0, 541, 542, 5, 91, 0, 0, 542, 544, 3, 86, 43, 0, 543, 541, - 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 552, 1, 0, 0, 0, 545, 546, 5, 80, - 0, 0, 546, 547, 5, 79, 0, 0, 547, 550, 3, 92, 46, 0, 548, 549, 5, 81, 0, - 0, 549, 551, 3, 86, 43, 0, 550, 548, 1, 0, 0, 0, 550, 551, 1, 0, 0, 0, - 551, 553, 1, 0, 0, 0, 552, 545, 1, 0, 0, 0, 552, 553, 1, 0, 0, 0, 553, - 568, 1, 0, 0, 0, 554, 555, 5, 116, 0, 0, 555, 556, 3, 10, 5, 0, 556, 557, - 5, 73, 0, 0, 557, 565, 3, 88, 44, 0, 558, 559, 5, 9, 0, 0, 559, 560, 3, - 10, 5, 0, 560, 561, 5, 73, 0, 0, 561, 562, 3, 88, 44, 0, 562, 564, 1, 0, - 0, 0, 563, 558, 1, 0, 0, 0, 564, 567, 1, 0, 0, 0, 565, 563, 1, 0, 0, 0, - 565, 566, 1, 0, 0, 0, 566, 569, 1, 0, 0, 0, 567, 565, 1, 0, 0, 0, 568, - 554, 1, 0, 0, 0, 568, 569, 1, 0, 0, 0, 569, 69, 1, 0, 0, 0, 570, 575, 3, - 10, 5, 0, 571, 573, 5, 73, 0, 0, 572, 571, 1, 0, 0, 0, 572, 573, 1, 0, - 0, 0, 573, 574, 1, 0, 0, 0, 574, 576, 3, 10, 5, 0, 575, 572, 1, 0, 0, 0, - 575, 576, 1, 0, 0, 0, 576, 587, 1, 0, 0, 0, 577, 578, 5, 7, 0, 0, 578, - 579, 3, 62, 31, 0, 579, 584, 5, 8, 0, 0, 580, 582, 5, 73, 0, 0, 581, 580, - 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 583, 1, 0, 0, 0, 583, 585, 3, 10, - 5, 0, 584, 581, 1, 0, 0, 0, 584, 585, 1, 0, 0, 0, 585, 587, 1, 0, 0, 0, - 586, 570, 1, 0, 0, 0, 586, 577, 1, 0, 0, 0, 587, 71, 1, 0, 0, 0, 588, 590, - 7, 8, 0, 0, 589, 588, 1, 0, 0, 0, 589, 590, 1, 0, 0, 0, 590, 591, 1, 0, - 0, 0, 591, 592, 5, 69, 0, 0, 592, 593, 3, 70, 35, 0, 593, 594, 5, 45, 0, - 0, 594, 595, 3, 86, 43, 0, 595, 73, 1, 0, 0, 0, 596, 601, 3, 86, 43, 0, - 597, 599, 5, 73, 0, 0, 598, 597, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, - 600, 1, 0, 0, 0, 600, 602, 3, 10, 5, 0, 601, 598, 1, 0, 0, 0, 601, 602, - 1, 0, 0, 0, 602, 610, 1, 0, 0, 0, 603, 604, 3, 10, 5, 0, 604, 605, 5, 12, - 0, 0, 605, 607, 1, 0, 0, 0, 606, 603, 1, 0, 0, 0, 606, 607, 1, 0, 0, 0, - 607, 608, 1, 0, 0, 0, 608, 610, 5, 14, 0, 0, 609, 596, 1, 0, 0, 0, 609, - 606, 1, 0, 0, 0, 610, 75, 1, 0, 0, 0, 611, 612, 5, 54, 0, 0, 612, 617, - 3, 10, 5, 0, 613, 615, 5, 73, 0, 0, 614, 613, 1, 0, 0, 0, 614, 615, 1, - 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 618, 3, 10, 5, 0, 617, 614, 1, 0, 0, - 0, 617, 618, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, 620, 5, 50, 0, 0, 620, - 625, 3, 78, 39, 0, 621, 622, 5, 9, 0, 0, 622, 624, 3, 78, 39, 0, 623, 621, - 1, 0, 0, 0, 624, 627, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, - 0, 0, 626, 636, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 628, 629, 5, 90, 0, 0, - 629, 633, 3, 70, 35, 0, 630, 632, 3, 72, 36, 0, 631, 630, 1, 0, 0, 0, 632, - 635, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 637, - 1, 0, 0, 0, 635, 633, 1, 0, 0, 0, 636, 628, 1, 0, 0, 0, 636, 637, 1, 0, - 0, 0, 637, 640, 1, 0, 0, 0, 638, 639, 5, 91, 0, 0, 639, 641, 3, 86, 43, - 0, 640, 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 77, 1, 0, 0, 0, 642, - 643, 3, 10, 5, 0, 643, 644, 5, 15, 0, 0, 644, 645, 3, 86, 43, 0, 645, 79, - 1, 0, 0, 0, 646, 647, 5, 94, 0, 0, 647, 648, 5, 104, 0, 0, 648, 653, 3, - 10, 5, 0, 649, 651, 5, 73, 0, 0, 650, 649, 1, 0, 0, 0, 650, 651, 1, 0, - 0, 0, 651, 652, 1, 0, 0, 0, 652, 654, 3, 10, 5, 0, 653, 650, 1, 0, 0, 0, - 653, 654, 1, 0, 0, 0, 654, 659, 1, 0, 0, 0, 655, 656, 5, 7, 0, 0, 656, - 657, 3, 12, 6, 0, 657, 658, 5, 8, 0, 0, 658, 660, 1, 0, 0, 0, 659, 655, - 1, 0, 0, 0, 659, 660, 1, 0, 0, 0, 660, 676, 1, 0, 0, 0, 661, 662, 5, 95, - 0, 0, 662, 663, 5, 7, 0, 0, 663, 664, 3, 92, 46, 0, 664, 672, 5, 8, 0, - 0, 665, 666, 5, 9, 0, 0, 666, 667, 5, 7, 0, 0, 667, 668, 3, 92, 46, 0, - 668, 669, 5, 8, 0, 0, 669, 671, 1, 0, 0, 0, 670, 665, 1, 0, 0, 0, 671, - 674, 1, 0, 0, 0, 672, 670, 1, 0, 0, 0, 672, 673, 1, 0, 0, 0, 673, 677, - 1, 0, 0, 0, 674, 672, 1, 0, 0, 0, 675, 677, 3, 62, 31, 0, 676, 661, 1, - 0, 0, 0, 676, 675, 1, 0, 0, 0, 677, 679, 1, 0, 0, 0, 678, 680, 3, 82, 41, - 0, 679, 678, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 81, 1, 0, 0, 0, 681, - 682, 5, 45, 0, 0, 682, 690, 5, 105, 0, 0, 683, 684, 5, 7, 0, 0, 684, 685, - 3, 12, 6, 0, 685, 688, 5, 8, 0, 0, 686, 687, 5, 91, 0, 0, 687, 689, 3, - 86, 43, 0, 688, 686, 1, 0, 0, 0, 688, 689, 1, 0, 0, 0, 689, 691, 1, 0, - 0, 0, 690, 683, 1, 0, 0, 0, 690, 691, 1, 0, 0, 0, 691, 692, 1, 0, 0, 0, - 692, 708, 5, 46, 0, 0, 693, 709, 5, 106, 0, 0, 694, 695, 5, 54, 0, 0, 695, - 696, 5, 50, 0, 0, 696, 701, 3, 78, 39, 0, 697, 698, 5, 9, 0, 0, 698, 700, - 3, 78, 39, 0, 699, 697, 1, 0, 0, 0, 700, 703, 1, 0, 0, 0, 701, 699, 1, - 0, 0, 0, 701, 702, 1, 0, 0, 0, 702, 706, 1, 0, 0, 0, 703, 701, 1, 0, 0, - 0, 704, 705, 5, 91, 0, 0, 705, 707, 3, 86, 43, 0, 706, 704, 1, 0, 0, 0, - 706, 707, 1, 0, 0, 0, 707, 709, 1, 0, 0, 0, 708, 693, 1, 0, 0, 0, 708, - 694, 1, 0, 0, 0, 709, 83, 1, 0, 0, 0, 710, 711, 5, 53, 0, 0, 711, 712, - 5, 90, 0, 0, 712, 717, 3, 10, 5, 0, 713, 715, 5, 73, 0, 0, 714, 713, 1, - 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 718, 3, 10, 5, - 0, 717, 714, 1, 0, 0, 0, 717, 718, 1, 0, 0, 0, 718, 721, 1, 0, 0, 0, 719, - 720, 5, 91, 0, 0, 720, 722, 3, 86, 43, 0, 721, 719, 1, 0, 0, 0, 721, 722, - 1, 0, 0, 0, 722, 85, 1, 0, 0, 0, 723, 724, 6, 43, -1, 0, 724, 725, 5, 7, - 0, 0, 725, 726, 3, 86, 43, 0, 726, 728, 5, 8, 0, 0, 727, 729, 3, 16, 8, - 0, 728, 727, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 797, 1, 0, 0, 0, 730, - 731, 7, 0, 0, 0, 731, 797, 3, 86, 43, 20, 732, 734, 3, 8, 4, 0, 733, 735, - 3, 16, 8, 0, 734, 733, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 797, 1, 0, - 0, 0, 736, 743, 3, 94, 47, 0, 737, 738, 5, 117, 0, 0, 738, 739, 5, 7, 0, - 0, 739, 740, 5, 91, 0, 0, 740, 741, 3, 86, 43, 0, 741, 742, 5, 8, 0, 0, - 742, 744, 1, 0, 0, 0, 743, 737, 1, 0, 0, 0, 743, 744, 1, 0, 0, 0, 744, - 745, 1, 0, 0, 0, 745, 748, 5, 114, 0, 0, 746, 749, 3, 88, 44, 0, 747, 749, - 5, 130, 0, 0, 748, 746, 1, 0, 0, 0, 748, 747, 1, 0, 0, 0, 749, 797, 1, - 0, 0, 0, 750, 752, 3, 94, 47, 0, 751, 753, 3, 16, 8, 0, 752, 751, 1, 0, - 0, 0, 752, 753, 1, 0, 0, 0, 753, 797, 1, 0, 0, 0, 754, 756, 3, 18, 9, 0, - 755, 757, 3, 16, 8, 0, 756, 755, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, - 797, 1, 0, 0, 0, 758, 759, 3, 10, 5, 0, 759, 760, 5, 12, 0, 0, 760, 762, - 1, 0, 0, 0, 761, 758, 1, 0, 0, 0, 761, 762, 1, 0, 0, 0, 762, 763, 1, 0, - 0, 0, 763, 765, 3, 10, 5, 0, 764, 766, 3, 16, 8, 0, 765, 764, 1, 0, 0, - 0, 765, 766, 1, 0, 0, 0, 766, 797, 1, 0, 0, 0, 767, 769, 5, 85, 0, 0, 768, - 770, 3, 86, 43, 0, 769, 768, 1, 0, 0, 0, 769, 770, 1, 0, 0, 0, 770, 772, - 1, 0, 0, 0, 771, 773, 3, 90, 45, 0, 772, 771, 1, 0, 0, 0, 773, 774, 1, - 0, 0, 0, 774, 772, 1, 0, 0, 0, 774, 775, 1, 0, 0, 0, 775, 778, 1, 0, 0, - 0, 776, 777, 5, 110, 0, 0, 777, 779, 3, 86, 43, 0, 778, 776, 1, 0, 0, 0, - 778, 779, 1, 0, 0, 0, 779, 780, 1, 0, 0, 0, 780, 781, 5, 88, 0, 0, 781, - 797, 1, 0, 0, 0, 782, 784, 5, 57, 0, 0, 783, 782, 1, 0, 0, 0, 783, 784, - 1, 0, 0, 0, 784, 785, 1, 0, 0, 0, 785, 787, 5, 66, 0, 0, 786, 783, 1, 0, - 0, 0, 786, 787, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 789, 5, 7, 0, 0, - 789, 790, 3, 62, 31, 0, 790, 792, 5, 8, 0, 0, 791, 793, 3, 16, 8, 0, 792, - 791, 1, 0, 0, 0, 792, 793, 1, 0, 0, 0, 793, 797, 1, 0, 0, 0, 794, 795, - 5, 57, 0, 0, 795, 797, 3, 86, 43, 3, 796, 723, 1, 0, 0, 0, 796, 730, 1, - 0, 0, 0, 796, 732, 1, 0, 0, 0, 796, 736, 1, 0, 0, 0, 796, 750, 1, 0, 0, - 0, 796, 754, 1, 0, 0, 0, 796, 761, 1, 0, 0, 0, 796, 767, 1, 0, 0, 0, 796, - 786, 1, 0, 0, 0, 796, 794, 1, 0, 0, 0, 797, 883, 1, 0, 0, 0, 798, 799, - 10, 18, 0, 0, 799, 800, 7, 9, 0, 0, 800, 882, 3, 86, 43, 19, 801, 802, - 10, 17, 0, 0, 802, 803, 7, 0, 0, 0, 803, 882, 3, 86, 43, 18, 804, 805, - 10, 9, 0, 0, 805, 806, 5, 13, 0, 0, 806, 882, 3, 86, 43, 10, 807, 809, - 10, 7, 0, 0, 808, 810, 5, 57, 0, 0, 809, 808, 1, 0, 0, 0, 809, 810, 1, - 0, 0, 0, 810, 811, 1, 0, 0, 0, 811, 812, 7, 10, 0, 0, 812, 882, 3, 86, - 43, 8, 813, 815, 10, 6, 0, 0, 814, 816, 5, 57, 0, 0, 815, 814, 1, 0, 0, - 0, 815, 816, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 818, 5, 64, 0, 0, 818, - 819, 3, 86, 43, 0, 819, 820, 5, 59, 0, 0, 820, 821, 3, 86, 43, 7, 821, - 882, 1, 0, 0, 0, 822, 823, 10, 5, 0, 0, 823, 824, 7, 11, 0, 0, 824, 882, - 3, 86, 43, 6, 825, 826, 10, 2, 0, 0, 826, 827, 5, 59, 0, 0, 827, 882, 3, - 86, 43, 3, 828, 829, 10, 1, 0, 0, 829, 830, 5, 60, 0, 0, 830, 882, 3, 86, - 43, 2, 831, 832, 10, 22, 0, 0, 832, 833, 5, 12, 0, 0, 833, 835, 3, 10, - 5, 0, 834, 836, 3, 16, 8, 0, 835, 834, 1, 0, 0, 0, 835, 836, 1, 0, 0, 0, - 836, 882, 1, 0, 0, 0, 837, 838, 10, 21, 0, 0, 838, 847, 5, 3, 0, 0, 839, - 848, 3, 86, 43, 0, 840, 842, 3, 86, 43, 0, 841, 840, 1, 0, 0, 0, 841, 842, - 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, 845, 5, 5, 0, 0, 844, 846, 3, 86, - 43, 0, 845, 844, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, - 847, 839, 1, 0, 0, 0, 847, 841, 1, 0, 0, 0, 848, 849, 1, 0, 0, 0, 849, - 851, 5, 4, 0, 0, 850, 852, 3, 16, 8, 0, 851, 850, 1, 0, 0, 0, 851, 852, - 1, 0, 0, 0, 852, 882, 1, 0, 0, 0, 853, 854, 10, 19, 0, 0, 854, 855, 5, - 92, 0, 0, 855, 882, 3, 10, 5, 0, 856, 858, 10, 8, 0, 0, 857, 859, 5, 57, - 0, 0, 858, 857, 1, 0, 0, 0, 858, 859, 1, 0, 0, 0, 859, 860, 1, 0, 0, 0, - 860, 861, 5, 63, 0, 0, 861, 864, 5, 7, 0, 0, 862, 865, 3, 92, 46, 0, 863, - 865, 3, 62, 31, 0, 864, 862, 1, 0, 0, 0, 864, 863, 1, 0, 0, 0, 865, 866, - 1, 0, 0, 0, 866, 867, 5, 8, 0, 0, 867, 882, 1, 0, 0, 0, 868, 869, 10, 4, - 0, 0, 869, 871, 5, 65, 0, 0, 870, 872, 5, 57, 0, 0, 871, 870, 1, 0, 0, - 0, 871, 872, 1, 0, 0, 0, 872, 879, 1, 0, 0, 0, 873, 874, 5, 89, 0, 0, 874, - 875, 5, 90, 0, 0, 875, 880, 3, 86, 43, 0, 876, 880, 5, 52, 0, 0, 877, 880, - 5, 120, 0, 0, 878, 880, 5, 121, 0, 0, 879, 873, 1, 0, 0, 0, 879, 876, 1, - 0, 0, 0, 879, 877, 1, 0, 0, 0, 879, 878, 1, 0, 0, 0, 880, 882, 1, 0, 0, - 0, 881, 798, 1, 0, 0, 0, 881, 801, 1, 0, 0, 0, 881, 804, 1, 0, 0, 0, 881, - 807, 1, 0, 0, 0, 881, 813, 1, 0, 0, 0, 881, 822, 1, 0, 0, 0, 881, 825, - 1, 0, 0, 0, 881, 828, 1, 0, 0, 0, 881, 831, 1, 0, 0, 0, 881, 837, 1, 0, - 0, 0, 881, 853, 1, 0, 0, 0, 881, 856, 1, 0, 0, 0, 881, 868, 1, 0, 0, 0, - 882, 885, 1, 0, 0, 0, 883, 881, 1, 0, 0, 0, 883, 884, 1, 0, 0, 0, 884, - 87, 1, 0, 0, 0, 885, 883, 1, 0, 0, 0, 886, 890, 5, 7, 0, 0, 887, 888, 5, - 115, 0, 0, 888, 889, 5, 79, 0, 0, 889, 891, 3, 92, 46, 0, 890, 887, 1, - 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 902, 1, 0, 0, 0, 892, 893, 5, 78, 0, - 0, 893, 894, 5, 79, 0, 0, 894, 899, 3, 66, 33, 0, 895, 896, 5, 9, 0, 0, - 896, 898, 3, 66, 33, 0, 897, 895, 1, 0, 0, 0, 898, 901, 1, 0, 0, 0, 899, - 897, 1, 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 903, 1, 0, 0, 0, 901, 899, - 1, 0, 0, 0, 902, 892, 1, 0, 0, 0, 902, 903, 1, 0, 0, 0, 903, 904, 1, 0, - 0, 0, 904, 905, 5, 8, 0, 0, 905, 89, 1, 0, 0, 0, 906, 907, 5, 86, 0, 0, - 907, 908, 3, 86, 43, 0, 908, 909, 5, 87, 0, 0, 909, 910, 3, 86, 43, 0, - 910, 91, 1, 0, 0, 0, 911, 916, 3, 86, 43, 0, 912, 913, 5, 9, 0, 0, 913, - 915, 3, 86, 43, 0, 914, 912, 1, 0, 0, 0, 915, 918, 1, 0, 0, 0, 916, 914, - 1, 0, 0, 0, 916, 917, 1, 0, 0, 0, 917, 93, 1, 0, 0, 0, 918, 916, 1, 0, - 0, 0, 919, 920, 3, 10, 5, 0, 920, 926, 5, 7, 0, 0, 921, 923, 5, 89, 0, - 0, 922, 921, 1, 0, 0, 0, 922, 923, 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, 924, - 927, 3, 92, 46, 0, 925, 927, 5, 14, 0, 0, 926, 922, 1, 0, 0, 0, 926, 925, - 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 929, 5, 8, - 0, 0, 929, 95, 1, 0, 0, 0, 930, 931, 3, 98, 49, 0, 931, 932, 5, 6, 0, 0, - 932, 934, 1, 0, 0, 0, 933, 930, 1, 0, 0, 0, 934, 937, 1, 0, 0, 0, 935, - 933, 1, 0, 0, 0, 935, 936, 1, 0, 0, 0, 936, 97, 1, 0, 0, 0, 937, 935, 1, - 0, 0, 0, 938, 959, 3, 58, 29, 0, 939, 940, 5, 130, 0, 0, 940, 942, 5, 7, - 0, 0, 941, 943, 3, 104, 52, 0, 942, 941, 1, 0, 0, 0, 942, 943, 1, 0, 0, - 0, 943, 944, 1, 0, 0, 0, 944, 959, 5, 8, 0, 0, 945, 946, 3, 20, 10, 0, - 946, 947, 5, 15, 0, 0, 947, 949, 1, 0, 0, 0, 948, 945, 1, 0, 0, 0, 948, - 949, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 951, 5, 130, 0, 0, 951, 952, - 5, 12, 0, 0, 952, 953, 5, 130, 0, 0, 953, 955, 5, 7, 0, 0, 954, 956, 3, - 104, 52, 0, 955, 954, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 956, 957, 1, 0, - 0, 0, 957, 959, 5, 8, 0, 0, 958, 938, 1, 0, 0, 0, 958, 939, 1, 0, 0, 0, - 958, 948, 1, 0, 0, 0, 959, 99, 1, 0, 0, 0, 960, 962, 3, 106, 53, 0, 961, - 960, 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, - 1, 0, 0, 0, 964, 101, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 967, 6, 51, - -1, 0, 967, 968, 5, 7, 0, 0, 968, 969, 3, 102, 51, 0, 969, 971, 5, 8, 0, - 0, 970, 972, 3, 16, 8, 0, 971, 970, 1, 0, 0, 0, 971, 972, 1, 0, 0, 0, 972, - 998, 1, 0, 0, 0, 973, 974, 7, 12, 0, 0, 974, 998, 3, 102, 51, 13, 975, - 977, 3, 8, 4, 0, 976, 978, 3, 16, 8, 0, 977, 976, 1, 0, 0, 0, 977, 978, - 1, 0, 0, 0, 978, 998, 1, 0, 0, 0, 979, 981, 3, 110, 55, 0, 980, 982, 3, - 16, 8, 0, 981, 980, 1, 0, 0, 0, 981, 982, 1, 0, 0, 0, 982, 998, 1, 0, 0, - 0, 983, 985, 3, 18, 9, 0, 984, 986, 3, 16, 8, 0, 985, 984, 1, 0, 0, 0, - 985, 986, 1, 0, 0, 0, 986, 998, 1, 0, 0, 0, 987, 989, 5, 3, 0, 0, 988, - 990, 3, 104, 52, 0, 989, 988, 1, 0, 0, 0, 989, 990, 1, 0, 0, 0, 990, 991, - 1, 0, 0, 0, 991, 993, 5, 4, 0, 0, 992, 994, 3, 16, 8, 0, 993, 992, 1, 0, - 0, 0, 993, 994, 1, 0, 0, 0, 994, 998, 1, 0, 0, 0, 995, 996, 5, 57, 0, 0, - 996, 998, 3, 102, 51, 3, 997, 966, 1, 0, 0, 0, 997, 973, 1, 0, 0, 0, 997, - 975, 1, 0, 0, 0, 997, 979, 1, 0, 0, 0, 997, 983, 1, 0, 0, 0, 997, 987, - 1, 0, 0, 0, 997, 995, 1, 0, 0, 0, 998, 1054, 1, 0, 0, 0, 999, 1000, 10, - 12, 0, 0, 1000, 1001, 7, 9, 0, 0, 1001, 1053, 3, 102, 51, 13, 1002, 1003, - 10, 11, 0, 0, 1003, 1004, 7, 0, 0, 0, 1004, 1053, 3, 102, 51, 12, 1005, - 1006, 10, 6, 0, 0, 1006, 1007, 5, 13, 0, 0, 1007, 1053, 3, 102, 51, 7, - 1008, 1009, 10, 5, 0, 0, 1009, 1010, 7, 11, 0, 0, 1010, 1053, 3, 102, 51, - 6, 1011, 1012, 10, 2, 0, 0, 1012, 1013, 5, 59, 0, 0, 1013, 1053, 3, 102, - 51, 3, 1014, 1015, 10, 1, 0, 0, 1015, 1016, 5, 60, 0, 0, 1016, 1053, 3, - 102, 51, 2, 1017, 1018, 10, 15, 0, 0, 1018, 1019, 5, 12, 0, 0, 1019, 1021, - 5, 130, 0, 0, 1020, 1022, 3, 16, 8, 0, 1021, 1020, 1, 0, 0, 0, 1021, 1022, - 1, 0, 0, 0, 1022, 1053, 1, 0, 0, 0, 1023, 1024, 10, 14, 0, 0, 1024, 1033, - 5, 3, 0, 0, 1025, 1034, 3, 102, 51, 0, 1026, 1028, 3, 102, 51, 0, 1027, - 1026, 1, 0, 0, 0, 1027, 1028, 1, 0, 0, 0, 1028, 1029, 1, 0, 0, 0, 1029, - 1031, 5, 5, 0, 0, 1030, 1032, 3, 102, 51, 0, 1031, 1030, 1, 0, 0, 0, 1031, - 1032, 1, 0, 0, 0, 1032, 1034, 1, 0, 0, 0, 1033, 1025, 1, 0, 0, 0, 1033, - 1027, 1, 0, 0, 0, 1034, 1035, 1, 0, 0, 0, 1035, 1037, 5, 4, 0, 0, 1036, - 1038, 3, 16, 8, 0, 1037, 1036, 1, 0, 0, 0, 1037, 1038, 1, 0, 0, 0, 1038, - 1053, 1, 0, 0, 0, 1039, 1040, 10, 4, 0, 0, 1040, 1042, 5, 65, 0, 0, 1041, - 1043, 5, 57, 0, 0, 1042, 1041, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, - 1050, 1, 0, 0, 0, 1044, 1045, 5, 89, 0, 0, 1045, 1046, 5, 90, 0, 0, 1046, - 1051, 3, 102, 51, 0, 1047, 1051, 5, 52, 0, 0, 1048, 1051, 5, 120, 0, 0, - 1049, 1051, 5, 121, 0, 0, 1050, 1044, 1, 0, 0, 0, 1050, 1047, 1, 0, 0, - 0, 1050, 1048, 1, 0, 0, 0, 1050, 1049, 1, 0, 0, 0, 1051, 1053, 1, 0, 0, - 0, 1052, 999, 1, 0, 0, 0, 1052, 1002, 1, 0, 0, 0, 1052, 1005, 1, 0, 0, - 0, 1052, 1008, 1, 0, 0, 0, 1052, 1011, 1, 0, 0, 0, 1052, 1014, 1, 0, 0, - 0, 1052, 1017, 1, 0, 0, 0, 1052, 1023, 1, 0, 0, 0, 1052, 1039, 1, 0, 0, - 0, 1053, 1056, 1, 0, 0, 0, 1054, 1052, 1, 0, 0, 0, 1054, 1055, 1, 0, 0, - 0, 1055, 103, 1, 0, 0, 0, 1056, 1054, 1, 0, 0, 0, 1057, 1062, 3, 102, 51, - 0, 1058, 1059, 5, 9, 0, 0, 1059, 1061, 3, 102, 51, 0, 1060, 1058, 1, 0, - 0, 0, 1061, 1064, 1, 0, 0, 0, 1062, 1060, 1, 0, 0, 0, 1062, 1063, 1, 0, - 0, 0, 1063, 105, 1, 0, 0, 0, 1064, 1062, 1, 0, 0, 0, 1065, 1066, 5, 131, - 0, 0, 1066, 1067, 3, 14, 7, 0, 1067, 1068, 5, 6, 0, 0, 1068, 1146, 1, 0, - 0, 0, 1069, 1074, 3, 108, 54, 0, 1070, 1071, 5, 9, 0, 0, 1071, 1073, 3, - 108, 54, 0, 1072, 1070, 1, 0, 0, 0, 1073, 1076, 1, 0, 0, 0, 1074, 1072, - 1, 0, 0, 0, 1074, 1075, 1, 0, 0, 0, 1075, 1077, 1, 0, 0, 0, 1076, 1074, - 1, 0, 0, 0, 1077, 1078, 5, 30, 0, 0, 1078, 1080, 1, 0, 0, 0, 1079, 1069, - 1, 0, 0, 0, 1079, 1080, 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1082, - 3, 110, 55, 0, 1082, 1083, 5, 6, 0, 0, 1083, 1146, 1, 0, 0, 0, 1084, 1086, - 3, 102, 51, 0, 1085, 1087, 3, 14, 7, 0, 1086, 1085, 1, 0, 0, 0, 1086, 1087, - 1, 0, 0, 0, 1087, 1088, 1, 0, 0, 0, 1088, 1089, 5, 30, 0, 0, 1089, 1090, - 3, 102, 51, 0, 1090, 1091, 5, 6, 0, 0, 1091, 1146, 1, 0, 0, 0, 1092, 1093, - 5, 107, 0, 0, 1093, 1094, 5, 131, 0, 0, 1094, 1098, 5, 63, 0, 0, 1095, - 1099, 3, 114, 57, 0, 1096, 1099, 3, 18, 9, 0, 1097, 1099, 3, 58, 29, 0, - 1098, 1095, 1, 0, 0, 0, 1098, 1096, 1, 0, 0, 0, 1098, 1097, 1, 0, 0, 0, - 1099, 1100, 1, 0, 0, 0, 1100, 1104, 5, 1, 0, 0, 1101, 1103, 3, 106, 53, - 0, 1102, 1101, 1, 0, 0, 0, 1103, 1106, 1, 0, 0, 0, 1104, 1102, 1, 0, 0, - 0, 1104, 1105, 1, 0, 0, 0, 1105, 1107, 1, 0, 0, 0, 1106, 1104, 1, 0, 0, - 0, 1107, 1108, 5, 2, 0, 0, 1108, 1146, 1, 0, 0, 0, 1109, 1110, 5, 108, - 0, 0, 1110, 1115, 3, 112, 56, 0, 1111, 1112, 5, 109, 0, 0, 1112, 1114, - 3, 112, 56, 0, 1113, 1111, 1, 0, 0, 0, 1114, 1117, 1, 0, 0, 0, 1115, 1113, - 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1127, 1, 0, 0, 0, 1117, 1115, - 1, 0, 0, 0, 1118, 1119, 5, 110, 0, 0, 1119, 1123, 5, 1, 0, 0, 1120, 1122, - 3, 106, 53, 0, 1121, 1120, 1, 0, 0, 0, 1122, 1125, 1, 0, 0, 0, 1123, 1121, - 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 1126, 1, 0, 0, 0, 1125, 1123, - 1, 0, 0, 0, 1126, 1128, 5, 2, 0, 0, 1127, 1118, 1, 0, 0, 0, 1127, 1128, - 1, 0, 0, 0, 1128, 1146, 1, 0, 0, 0, 1129, 1130, 3, 58, 29, 0, 1130, 1131, - 5, 6, 0, 0, 1131, 1146, 1, 0, 0, 0, 1132, 1133, 5, 111, 0, 0, 1133, 1146, - 5, 6, 0, 0, 1134, 1137, 5, 112, 0, 0, 1135, 1138, 3, 104, 52, 0, 1136, - 1138, 3, 58, 29, 0, 1137, 1135, 1, 0, 0, 0, 1137, 1136, 1, 0, 0, 0, 1137, - 1138, 1, 0, 0, 0, 1138, 1139, 1, 0, 0, 0, 1139, 1146, 5, 6, 0, 0, 1140, - 1141, 5, 112, 0, 0, 1141, 1142, 5, 113, 0, 0, 1142, 1143, 3, 104, 52, 0, - 1143, 1144, 5, 6, 0, 0, 1144, 1146, 1, 0, 0, 0, 1145, 1065, 1, 0, 0, 0, - 1145, 1079, 1, 0, 0, 0, 1145, 1084, 1, 0, 0, 0, 1145, 1092, 1, 0, 0, 0, - 1145, 1109, 1, 0, 0, 0, 1145, 1129, 1, 0, 0, 0, 1145, 1132, 1, 0, 0, 0, - 1145, 1134, 1, 0, 0, 0, 1145, 1140, 1, 0, 0, 0, 1146, 107, 1, 0, 0, 0, - 1147, 1148, 7, 13, 0, 0, 1148, 109, 1, 0, 0, 0, 1149, 1150, 5, 130, 0, - 0, 1150, 1152, 5, 7, 0, 0, 1151, 1153, 3, 104, 52, 0, 1152, 1151, 1, 0, - 0, 0, 1152, 1153, 1, 0, 0, 0, 1153, 1154, 1, 0, 0, 0, 1154, 1155, 5, 8, - 0, 0, 1155, 111, 1, 0, 0, 0, 1156, 1157, 3, 102, 51, 0, 1157, 1161, 5, - 1, 0, 0, 1158, 1160, 3, 106, 53, 0, 1159, 1158, 1, 0, 0, 0, 1160, 1163, - 1, 0, 0, 0, 1161, 1159, 1, 0, 0, 0, 1161, 1162, 1, 0, 0, 0, 1162, 1164, - 1, 0, 0, 0, 1163, 1161, 1, 0, 0, 0, 1164, 1165, 5, 2, 0, 0, 1165, 113, - 1, 0, 0, 0, 1166, 1167, 3, 102, 51, 0, 1167, 1168, 5, 31, 0, 0, 1168, 1169, - 3, 102, 51, 0, 1169, 115, 1, 0, 0, 0, 166, 130, 134, 142, 148, 155, 164, - 168, 180, 188, 190, 204, 207, 227, 232, 246, 250, 260, 272, 285, 291, 296, - 298, 301, 306, 312, 317, 320, 327, 337, 348, 354, 360, 366, 373, 380, 386, - 395, 402, 408, 411, 419, 429, 436, 443, 446, 452, 461, 464, 467, 480, 490, - 493, 497, 501, 505, 509, 513, 517, 521, 528, 536, 539, 543, 550, 552, 565, - 568, 572, 575, 581, 584, 586, 589, 598, 601, 606, 609, 614, 617, 625, 633, - 636, 640, 650, 653, 659, 672, 676, 679, 688, 690, 701, 706, 708, 714, 717, - 721, 728, 734, 743, 748, 752, 756, 761, 765, 769, 774, 778, 783, 786, 792, - 796, 809, 815, 835, 841, 845, 847, 851, 858, 864, 871, 879, 881, 883, 890, - 899, 902, 916, 922, 926, 935, 942, 948, 955, 958, 963, 971, 977, 981, 985, - 989, 993, 997, 1021, 1027, 1031, 1033, 1037, 1042, 1050, 1052, 1054, 1062, - 1074, 1079, 1086, 1098, 1104, 1115, 1123, 1127, 1137, 1145, 1152, 1161, + 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, 1, 0, 1, 0, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 3, 4, + 159, 8, 4, 1, 4, 1, 4, 3, 4, 163, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, + 4, 3, 4, 171, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 177, 8, 5, 1, 6, 1, 6, + 1, 6, 5, 6, 182, 8, 6, 10, 6, 12, 6, 185, 9, 6, 1, 7, 1, 7, 1, 7, 1, 7, + 1, 7, 1, 7, 3, 7, 193, 8, 7, 1, 7, 1, 7, 3, 7, 197, 8, 7, 1, 8, 1, 8, 1, + 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 5, 10, 207, 8, 10, 10, 10, 12, 10, + 210, 9, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 217, 8, 11, 10, 11, + 12, 11, 220, 9, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, + 12, 1, 12, 5, 12, 231, 8, 12, 10, 12, 12, 12, 234, 9, 12, 3, 12, 236, 8, + 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, + 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 254, 8, 14, 10, 14, 12, + 14, 257, 9, 14, 1, 14, 1, 14, 3, 14, 261, 8, 14, 1, 14, 1, 14, 1, 14, 1, + 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 275, + 8, 15, 5, 15, 277, 8, 15, 10, 15, 12, 15, 280, 9, 15, 1, 15, 1, 15, 1, + 16, 1, 16, 1, 16, 5, 16, 287, 8, 16, 10, 16, 12, 16, 290, 9, 16, 1, 17, + 1, 17, 1, 17, 5, 17, 295, 8, 17, 10, 17, 12, 17, 298, 9, 17, 1, 18, 1, + 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 3, 19, 307, 8, 19, 1, 19, 1, 19, + 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 3, 20, 318, 8, 20, 1, + 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 329, + 8, 20, 10, 20, 12, 20, 332, 9, 20, 1, 21, 1, 21, 1, 21, 3, 21, 337, 8, + 21, 1, 21, 1, 21, 1, 21, 3, 21, 342, 8, 21, 3, 21, 344, 8, 21, 1, 21, 3, + 21, 347, 8, 21, 1, 21, 1, 21, 1, 21, 3, 21, 352, 8, 21, 1, 21, 1, 21, 1, + 21, 1, 21, 3, 21, 358, 8, 21, 1, 21, 1, 21, 1, 21, 3, 21, 363, 8, 21, 1, + 21, 3, 21, 366, 8, 21, 1, 22, 1, 22, 1, 22, 5, 22, 371, 8, 22, 10, 22, + 12, 22, 374, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 381, 8, 23, + 10, 23, 12, 23, 384, 9, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, + 24, 392, 8, 24, 10, 24, 12, 24, 395, 9, 24, 1, 25, 1, 25, 1, 25, 3, 25, + 400, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 406, 8, 25, 1, 25, 1, 25, + 1, 25, 1, 25, 3, 25, 412, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, + 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 427, 8, 26, + 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, + 27, 439, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, + 3, 28, 449, 8, 28, 3, 28, 451, 8, 28, 1, 29, 1, 29, 1, 30, 5, 30, 456, + 8, 30, 10, 30, 12, 30, 459, 9, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 465, + 8, 30, 1, 30, 1, 30, 4, 30, 469, 8, 30, 11, 30, 12, 30, 470, 1, 30, 1, + 30, 1, 30, 1, 30, 1, 31, 5, 31, 478, 8, 31, 10, 31, 12, 31, 481, 9, 31, + 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 487, 8, 31, 1, 31, 1, 31, 4, 31, 491, + 8, 31, 11, 31, 12, 31, 492, 1, 31, 3, 31, 496, 8, 31, 1, 31, 1, 31, 1, + 31, 1, 31, 1, 32, 1, 32, 3, 32, 504, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, + 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 514, 8, 32, 1, 33, 1, 33, 3, 33, 518, + 8, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 527, 8, + 34, 1, 35, 1, 35, 3, 35, 531, 8, 35, 1, 35, 1, 35, 1, 35, 5, 35, 536, 8, + 35, 10, 35, 12, 35, 539, 9, 35, 3, 35, 541, 8, 35, 1, 35, 1, 35, 1, 35, + 1, 35, 3, 35, 547, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 554, + 8, 36, 10, 36, 12, 36, 557, 9, 36, 3, 36, 559, 8, 36, 1, 36, 3, 36, 562, + 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, + 37, 3, 37, 574, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 581, 8, + 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 587, 8, 37, 5, 37, 589, 8, 37, 10, + 37, 12, 37, 592, 9, 37, 1, 37, 1, 37, 1, 38, 1, 38, 3, 38, 598, 8, 38, + 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, + 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, + 1, 38, 1, 38, 3, 38, 623, 8, 38, 1, 39, 1, 39, 1, 39, 3, 39, 628, 8, 39, + 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 634, 8, 40, 1, 40, 1, 40, 1, 40, 1, + 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, + 1, 42, 1, 42, 3, 42, 652, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, + 42, 1, 42, 1, 42, 1, 42, 3, 42, 663, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, + 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, + 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 687, 8, 42, + 1, 43, 1, 43, 3, 43, 691, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 697, + 8, 43, 1, 43, 3, 43, 700, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, + 43, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 712, 8, 44, 1, 44, 1, 44, 1, 45, + 1, 45, 1, 45, 1, 45, 5, 45, 720, 8, 45, 10, 45, 12, 45, 723, 9, 45, 1, + 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 730, 8, 45, 10, 45, 12, 45, 733, + 9, 45, 3, 45, 735, 8, 45, 1, 45, 1, 45, 3, 45, 739, 8, 45, 1, 45, 1, 45, + 3, 45, 743, 8, 45, 1, 46, 1, 46, 3, 46, 747, 8, 46, 1, 46, 1, 46, 3, 46, + 751, 8, 46, 1, 47, 1, 47, 3, 47, 755, 8, 47, 1, 47, 1, 47, 3, 47, 759, + 8, 47, 1, 48, 1, 48, 3, 48, 763, 8, 48, 1, 48, 1, 48, 1, 48, 5, 48, 768, + 8, 48, 10, 48, 12, 48, 771, 9, 48, 1, 48, 1, 48, 1, 48, 5, 48, 776, 8, + 48, 10, 48, 12, 48, 779, 9, 48, 3, 48, 781, 8, 48, 1, 48, 1, 48, 3, 48, + 785, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 792, 8, 48, 3, 48, + 794, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, + 48, 5, 48, 805, 8, 48, 10, 48, 12, 48, 808, 9, 48, 3, 48, 810, 8, 48, 1, + 49, 1, 49, 3, 49, 814, 8, 49, 1, 49, 3, 49, 817, 8, 49, 1, 49, 1, 49, 1, + 49, 1, 49, 3, 49, 823, 8, 49, 1, 49, 3, 49, 826, 8, 49, 3, 49, 828, 8, + 49, 1, 50, 3, 50, 831, 8, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, + 1, 51, 3, 51, 840, 8, 51, 1, 51, 3, 51, 843, 8, 51, 1, 51, 1, 51, 1, 51, + 3, 51, 848, 8, 51, 1, 51, 3, 51, 851, 8, 51, 1, 52, 1, 52, 1, 52, 3, 52, + 856, 8, 52, 1, 52, 3, 52, 859, 8, 52, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, + 865, 8, 52, 10, 52, 12, 52, 868, 9, 52, 1, 52, 1, 52, 1, 52, 5, 52, 873, + 8, 52, 10, 52, 12, 52, 876, 9, 52, 3, 52, 878, 8, 52, 1, 52, 1, 52, 3, + 52, 882, 8, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, + 3, 54, 892, 8, 54, 1, 54, 3, 54, 895, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, + 3, 54, 901, 8, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, + 54, 1, 54, 5, 54, 912, 8, 54, 10, 54, 12, 54, 915, 9, 54, 1, 54, 3, 54, + 918, 8, 54, 1, 54, 3, 54, 921, 8, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, + 1, 55, 1, 55, 3, 55, 930, 8, 55, 3, 55, 932, 8, 55, 1, 55, 1, 55, 1, 55, + 1, 55, 1, 55, 1, 55, 1, 55, 5, 55, 941, 8, 55, 10, 55, 12, 55, 944, 9, + 55, 1, 55, 1, 55, 3, 55, 948, 8, 55, 3, 55, 950, 8, 55, 1, 56, 1, 56, 1, + 56, 1, 56, 3, 56, 956, 8, 56, 1, 56, 3, 56, 959, 8, 56, 1, 56, 1, 56, 3, + 56, 963, 8, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 970, 8, 57, 1, + 57, 1, 57, 1, 57, 1, 57, 3, 57, 976, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, + 1, 57, 1, 57, 1, 57, 3, 57, 985, 8, 57, 1, 57, 1, 57, 1, 57, 3, 57, 990, + 8, 57, 1, 57, 1, 57, 3, 57, 994, 8, 57, 1, 57, 1, 57, 3, 57, 998, 8, 57, + 1, 57, 1, 57, 1, 57, 3, 57, 1003, 8, 57, 1, 57, 1, 57, 3, 57, 1007, 8, + 57, 1, 57, 1, 57, 3, 57, 1011, 8, 57, 1, 57, 4, 57, 1014, 8, 57, 11, 57, + 12, 57, 1015, 1, 57, 1, 57, 3, 57, 1020, 8, 57, 1, 57, 1, 57, 1, 57, 3, + 57, 1025, 8, 57, 1, 57, 3, 57, 1028, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, + 3, 57, 1034, 8, 57, 1, 57, 1, 57, 3, 57, 1038, 8, 57, 1, 57, 1, 57, 1, + 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1051, + 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1057, 8, 57, 1, 57, 1, 57, 1, + 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, + 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1077, 8, 57, 1, 57, 1, 57, 1, + 57, 1, 57, 3, 57, 1083, 8, 57, 1, 57, 1, 57, 3, 57, 1087, 8, 57, 3, 57, + 1089, 8, 57, 1, 57, 1, 57, 3, 57, 1093, 8, 57, 1, 57, 1, 57, 1, 57, 1, + 57, 1, 57, 3, 57, 1100, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1106, + 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1113, 8, 57, 1, 57, 1, + 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1121, 8, 57, 5, 57, 1123, 8, 57, + 10, 57, 12, 57, 1126, 9, 57, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 1132, 8, + 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 5, 58, 1139, 8, 58, 10, 58, 12, + 58, 1142, 9, 58, 3, 58, 1144, 8, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, + 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 5, 60, 1156, 8, 60, 10, 60, 12, 60, + 1159, 9, 60, 1, 61, 1, 61, 1, 61, 3, 61, 1164, 8, 61, 1, 61, 1, 61, 3, + 61, 1168, 8, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 5, 62, 1175, 8, 62, + 10, 62, 12, 62, 1178, 9, 62, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1184, 8, + 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1190, 8, 63, 1, 63, 1, 63, 1, 63, + 1, 63, 1, 63, 3, 63, 1197, 8, 63, 1, 63, 3, 63, 1200, 8, 63, 1, 64, 5, + 64, 1203, 8, 64, 10, 64, 12, 64, 1206, 9, 64, 1, 65, 1, 65, 1, 65, 1, 65, + 1, 65, 3, 65, 1213, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1219, 8, + 65, 1, 65, 1, 65, 3, 65, 1223, 8, 65, 1, 65, 1, 65, 3, 65, 1227, 8, 65, + 1, 65, 1, 65, 3, 65, 1231, 8, 65, 1, 65, 1, 65, 3, 65, 1235, 8, 65, 1, + 65, 1, 65, 3, 65, 1239, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, + 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, + 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1263, 8, 65, 1, 65, 1, 65, + 1, 65, 1, 65, 3, 65, 1269, 8, 65, 1, 65, 1, 65, 3, 65, 1273, 8, 65, 3, + 65, 1275, 8, 65, 1, 65, 1, 65, 3, 65, 1279, 8, 65, 1, 65, 1, 65, 1, 65, + 3, 65, 1284, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1292, + 8, 65, 5, 65, 1294, 8, 65, 10, 65, 12, 65, 1297, 9, 65, 1, 66, 1, 66, 1, + 66, 5, 66, 1302, 8, 66, 10, 66, 12, 66, 1305, 9, 66, 1, 67, 1, 67, 1, 67, + 1, 67, 1, 67, 1, 67, 1, 67, 5, 67, 1314, 8, 67, 10, 67, 12, 67, 1317, 9, + 67, 1, 67, 1, 67, 3, 67, 1321, 8, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, + 3, 67, 1328, 8, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, + 67, 1, 67, 1, 67, 3, 67, 1340, 8, 67, 1, 67, 1, 67, 5, 67, 1344, 8, 67, + 10, 67, 12, 67, 1347, 9, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, + 5, 67, 1355, 8, 67, 10, 67, 12, 67, 1358, 9, 67, 1, 67, 1, 67, 1, 67, 5, + 67, 1363, 8, 67, 10, 67, 12, 67, 1366, 9, 67, 1, 67, 3, 67, 1369, 8, 67, + 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 1379, 8, + 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 1387, 8, 67, 1, 68, + 1, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1394, 8, 69, 1, 69, 1, 69, 1, 70, 1, + 70, 1, 70, 5, 70, 1401, 8, 70, 10, 70, 12, 70, 1404, 9, 70, 1, 70, 1, 70, + 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 0, 2, 114, 130, 72, 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, 0, + 15, 1, 0, 20, 21, 1, 0, 129, 130, 1, 0, 140, 141, 3, 0, 52, 52, 56, 56, + 67, 67, 1, 0, 64, 65, 1, 0, 62, 63, 1, 0, 38, 41, 1, 0, 83, 84, 1, 0, 110, + 111, 2, 0, 79, 81, 105, 105, 3, 0, 14, 14, 19, 19, 22, 22, 1, 0, 70, 71, + 2, 0, 15, 16, 23, 27, 2, 0, 11, 11, 20, 21, 2, 0, 29, 29, 140, 140, 1612, + 0, 144, 1, 0, 0, 0, 2, 147, 1, 0, 0, 0, 4, 150, 1, 0, 0, 0, 6, 153, 1, + 0, 0, 0, 8, 170, 1, 0, 0, 0, 10, 176, 1, 0, 0, 0, 12, 178, 1, 0, 0, 0, + 14, 186, 1, 0, 0, 0, 16, 198, 1, 0, 0, 0, 18, 201, 1, 0, 0, 0, 20, 203, + 1, 0, 0, 0, 22, 211, 1, 0, 0, 0, 24, 221, 1, 0, 0, 0, 26, 239, 1, 0, 0, + 0, 28, 243, 1, 0, 0, 0, 30, 266, 1, 0, 0, 0, 32, 283, 1, 0, 0, 0, 34, 291, + 1, 0, 0, 0, 36, 299, 1, 0, 0, 0, 38, 306, 1, 0, 0, 0, 40, 317, 1, 0, 0, + 0, 42, 343, 1, 0, 0, 0, 44, 367, 1, 0, 0, 0, 46, 375, 1, 0, 0, 0, 48, 385, + 1, 0, 0, 0, 50, 405, 1, 0, 0, 0, 52, 426, 1, 0, 0, 0, 54, 428, 1, 0, 0, + 0, 56, 440, 1, 0, 0, 0, 58, 452, 1, 0, 0, 0, 60, 457, 1, 0, 0, 0, 62, 479, + 1, 0, 0, 0, 64, 501, 1, 0, 0, 0, 66, 517, 1, 0, 0, 0, 68, 526, 1, 0, 0, + 0, 70, 540, 1, 0, 0, 0, 72, 548, 1, 0, 0, 0, 74, 568, 1, 0, 0, 0, 76, 597, + 1, 0, 0, 0, 78, 627, 1, 0, 0, 0, 80, 629, 1, 0, 0, 0, 82, 638, 1, 0, 0, + 0, 84, 686, 1, 0, 0, 0, 86, 688, 1, 0, 0, 0, 88, 707, 1, 0, 0, 0, 90, 715, + 1, 0, 0, 0, 92, 750, 1, 0, 0, 0, 94, 752, 1, 0, 0, 0, 96, 760, 1, 0, 0, + 0, 98, 827, 1, 0, 0, 0, 100, 830, 1, 0, 0, 0, 102, 850, 1, 0, 0, 0, 104, + 852, 1, 0, 0, 0, 106, 883, 1, 0, 0, 0, 108, 887, 1, 0, 0, 0, 110, 922, + 1, 0, 0, 0, 112, 951, 1, 0, 0, 0, 114, 1037, 1, 0, 0, 0, 116, 1127, 1, + 0, 0, 0, 118, 1147, 1, 0, 0, 0, 120, 1152, 1, 0, 0, 0, 122, 1160, 1, 0, + 0, 0, 124, 1176, 1, 0, 0, 0, 126, 1199, 1, 0, 0, 0, 128, 1204, 1, 0, 0, + 0, 130, 1238, 1, 0, 0, 0, 132, 1298, 1, 0, 0, 0, 134, 1386, 1, 0, 0, 0, + 136, 1388, 1, 0, 0, 0, 138, 1390, 1, 0, 0, 0, 140, 1397, 1, 0, 0, 0, 142, + 1407, 1, 0, 0, 0, 144, 145, 3, 22, 11, 0, 145, 146, 5, 0, 0, 1, 146, 1, + 1, 0, 0, 0, 147, 148, 3, 66, 33, 0, 148, 149, 5, 0, 0, 1, 149, 3, 1, 0, + 0, 0, 150, 151, 3, 124, 62, 0, 151, 152, 5, 0, 0, 1, 152, 5, 1, 0, 0, 0, + 153, 154, 3, 128, 64, 0, 154, 155, 5, 0, 0, 1, 155, 7, 1, 0, 0, 0, 156, + 171, 5, 128, 0, 0, 157, 159, 7, 0, 0, 0, 158, 157, 1, 0, 0, 0, 158, 159, + 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 171, 5, 131, 0, 0, 161, 163, 7, + 0, 0, 0, 162, 161, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 1, 0, 0, + 0, 164, 165, 5, 131, 0, 0, 165, 166, 5, 12, 0, 0, 166, 171, 5, 131, 0, + 0, 167, 171, 7, 1, 0, 0, 168, 171, 5, 61, 0, 0, 169, 171, 5, 132, 0, 0, + 170, 156, 1, 0, 0, 0, 170, 158, 1, 0, 0, 0, 170, 162, 1, 0, 0, 0, 170, + 167, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 169, 1, 0, 0, 0, 171, 9, 1, + 0, 0, 0, 172, 173, 5, 32, 0, 0, 173, 174, 5, 139, 0, 0, 174, 177, 5, 32, + 0, 0, 175, 177, 5, 139, 0, 0, 176, 172, 1, 0, 0, 0, 176, 175, 1, 0, 0, + 0, 177, 11, 1, 0, 0, 0, 178, 183, 3, 10, 5, 0, 179, 180, 5, 9, 0, 0, 180, + 182, 3, 10, 5, 0, 181, 179, 1, 0, 0, 0, 182, 185, 1, 0, 0, 0, 183, 181, + 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 13, 1, 0, 0, 0, 185, 183, 1, 0, + 0, 0, 186, 192, 5, 139, 0, 0, 187, 188, 5, 7, 0, 0, 188, 189, 5, 131, 0, + 0, 189, 190, 5, 9, 0, 0, 190, 191, 5, 131, 0, 0, 191, 193, 5, 8, 0, 0, + 192, 187, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 196, 1, 0, 0, 0, 194, + 195, 5, 3, 0, 0, 195, 197, 5, 4, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, + 1, 0, 0, 0, 197, 15, 1, 0, 0, 0, 198, 199, 5, 28, 0, 0, 199, 200, 3, 14, + 7, 0, 200, 17, 1, 0, 0, 0, 201, 202, 7, 2, 0, 0, 202, 19, 1, 0, 0, 0, 203, + 208, 3, 18, 9, 0, 204, 205, 5, 9, 0, 0, 205, 207, 3, 18, 9, 0, 206, 204, + 1, 0, 0, 0, 207, 210, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 208, 209, 1, 0, + 0, 0, 209, 21, 1, 0, 0, 0, 210, 208, 1, 0, 0, 0, 211, 218, 3, 26, 13, 0, + 212, 217, 3, 28, 14, 0, 213, 217, 3, 30, 15, 0, 214, 217, 3, 60, 30, 0, + 215, 217, 3, 62, 31, 0, 216, 212, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 216, + 214, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 220, 1, 0, 0, 0, 218, 216, + 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 23, 1, 0, 0, 0, 220, 218, 1, 0, + 0, 0, 221, 222, 5, 141, 0, 0, 222, 235, 5, 7, 0, 0, 223, 224, 5, 139, 0, + 0, 224, 225, 5, 15, 0, 0, 225, 232, 3, 8, 4, 0, 226, 227, 5, 9, 0, 0, 227, + 228, 5, 139, 0, 0, 228, 229, 5, 15, 0, 0, 229, 231, 3, 8, 4, 0, 230, 226, + 1, 0, 0, 0, 231, 234, 1, 0, 0, 0, 232, 230, 1, 0, 0, 0, 232, 233, 1, 0, + 0, 0, 233, 236, 1, 0, 0, 0, 234, 232, 1, 0, 0, 0, 235, 223, 1, 0, 0, 0, + 235, 236, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, 237, 238, 5, 8, 0, 0, 238, + 25, 1, 0, 0, 0, 239, 240, 5, 33, 0, 0, 240, 241, 5, 139, 0, 0, 241, 242, + 5, 6, 0, 0, 242, 27, 1, 0, 0, 0, 243, 244, 5, 34, 0, 0, 244, 260, 5, 139, + 0, 0, 245, 246, 5, 1, 0, 0, 246, 247, 5, 139, 0, 0, 247, 248, 5, 5, 0, + 0, 248, 255, 3, 8, 4, 0, 249, 250, 5, 9, 0, 0, 250, 251, 5, 139, 0, 0, + 251, 252, 5, 5, 0, 0, 252, 254, 3, 8, 4, 0, 253, 249, 1, 0, 0, 0, 254, + 257, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 258, + 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 258, 259, 5, 2, 0, 0, 259, 261, 1, 0, + 0, 0, 260, 245, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, + 262, 263, 5, 82, 0, 0, 263, 264, 5, 139, 0, 0, 264, 265, 5, 6, 0, 0, 265, + 29, 1, 0, 0, 0, 266, 267, 5, 35, 0, 0, 267, 268, 5, 139, 0, 0, 268, 269, + 5, 1, 0, 0, 269, 278, 3, 32, 16, 0, 270, 274, 5, 9, 0, 0, 271, 275, 3, + 32, 16, 0, 272, 275, 3, 36, 18, 0, 273, 275, 3, 40, 20, 0, 274, 271, 1, + 0, 0, 0, 274, 272, 1, 0, 0, 0, 274, 273, 1, 0, 0, 0, 275, 277, 1, 0, 0, + 0, 276, 270, 1, 0, 0, 0, 277, 280, 1, 0, 0, 0, 278, 276, 1, 0, 0, 0, 278, + 279, 1, 0, 0, 0, 279, 281, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 281, 282, + 5, 2, 0, 0, 282, 31, 1, 0, 0, 0, 283, 284, 5, 139, 0, 0, 284, 288, 3, 14, + 7, 0, 285, 287, 3, 50, 25, 0, 286, 285, 1, 0, 0, 0, 287, 290, 1, 0, 0, + 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 33, 1, 0, 0, 0, 290, + 288, 1, 0, 0, 0, 291, 292, 5, 139, 0, 0, 292, 296, 3, 14, 7, 0, 293, 295, + 3, 52, 26, 0, 294, 293, 1, 0, 0, 0, 295, 298, 1, 0, 0, 0, 296, 294, 1, + 0, 0, 0, 296, 297, 1, 0, 0, 0, 297, 35, 1, 0, 0, 0, 298, 296, 1, 0, 0, + 0, 299, 300, 5, 142, 0, 0, 300, 301, 7, 3, 0, 0, 301, 302, 5, 7, 0, 0, + 302, 303, 3, 12, 6, 0, 303, 304, 5, 8, 0, 0, 304, 37, 1, 0, 0, 0, 305, + 307, 5, 56, 0, 0, 306, 305, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, + 1, 0, 0, 0, 308, 309, 5, 67, 0, 0, 309, 310, 3, 10, 5, 0, 310, 311, 5, + 7, 0, 0, 311, 312, 3, 12, 6, 0, 312, 313, 5, 8, 0, 0, 313, 39, 1, 0, 0, + 0, 314, 315, 5, 51, 0, 0, 315, 318, 5, 53, 0, 0, 316, 318, 5, 133, 0, 0, + 317, 314, 1, 0, 0, 0, 317, 316, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, + 320, 5, 7, 0, 0, 320, 321, 3, 12, 6, 0, 321, 322, 5, 8, 0, 0, 322, 323, + 7, 4, 0, 0, 323, 324, 5, 139, 0, 0, 324, 325, 5, 7, 0, 0, 325, 326, 3, + 12, 6, 0, 326, 330, 5, 8, 0, 0, 327, 329, 3, 42, 21, 0, 328, 327, 1, 0, + 0, 0, 329, 332, 1, 0, 0, 0, 330, 328, 1, 0, 0, 0, 330, 331, 1, 0, 0, 0, + 331, 41, 1, 0, 0, 0, 332, 330, 1, 0, 0, 0, 333, 334, 5, 54, 0, 0, 334, + 337, 5, 63, 0, 0, 335, 337, 5, 134, 0, 0, 336, 333, 1, 0, 0, 0, 336, 335, + 1, 0, 0, 0, 337, 344, 1, 0, 0, 0, 338, 339, 5, 54, 0, 0, 339, 342, 5, 62, + 0, 0, 340, 342, 5, 135, 0, 0, 341, 338, 1, 0, 0, 0, 341, 340, 1, 0, 0, + 0, 342, 344, 1, 0, 0, 0, 343, 336, 1, 0, 0, 0, 343, 341, 1, 0, 0, 0, 344, + 346, 1, 0, 0, 0, 345, 347, 5, 55, 0, 0, 346, 345, 1, 0, 0, 0, 346, 347, + 1, 0, 0, 0, 347, 365, 1, 0, 0, 0, 348, 349, 5, 92, 0, 0, 349, 352, 5, 36, + 0, 0, 350, 352, 5, 138, 0, 0, 351, 348, 1, 0, 0, 0, 351, 350, 1, 0, 0, + 0, 352, 366, 1, 0, 0, 0, 353, 366, 5, 57, 0, 0, 354, 355, 5, 59, 0, 0, + 355, 358, 5, 61, 0, 0, 356, 358, 5, 137, 0, 0, 357, 354, 1, 0, 0, 0, 357, + 356, 1, 0, 0, 0, 358, 366, 1, 0, 0, 0, 359, 360, 5, 59, 0, 0, 360, 363, + 5, 60, 0, 0, 361, 363, 5, 136, 0, 0, 362, 359, 1, 0, 0, 0, 362, 361, 1, + 0, 0, 0, 363, 366, 1, 0, 0, 0, 364, 366, 5, 58, 0, 0, 365, 351, 1, 0, 0, + 0, 365, 353, 1, 0, 0, 0, 365, 357, 1, 0, 0, 0, 365, 362, 1, 0, 0, 0, 365, + 364, 1, 0, 0, 0, 366, 43, 1, 0, 0, 0, 367, 372, 3, 14, 7, 0, 368, 369, + 5, 9, 0, 0, 369, 371, 3, 14, 7, 0, 370, 368, 1, 0, 0, 0, 371, 374, 1, 0, + 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 45, 1, 0, 0, 0, + 374, 372, 1, 0, 0, 0, 375, 376, 5, 139, 0, 0, 376, 382, 3, 14, 7, 0, 377, + 378, 5, 9, 0, 0, 378, 379, 5, 139, 0, 0, 379, 381, 3, 14, 7, 0, 380, 377, + 1, 0, 0, 0, 381, 384, 1, 0, 0, 0, 382, 380, 1, 0, 0, 0, 382, 383, 1, 0, + 0, 0, 383, 47, 1, 0, 0, 0, 384, 382, 1, 0, 0, 0, 385, 386, 3, 18, 9, 0, + 386, 393, 3, 14, 7, 0, 387, 388, 5, 9, 0, 0, 388, 389, 3, 18, 9, 0, 389, + 390, 3, 14, 7, 0, 390, 392, 1, 0, 0, 0, 391, 387, 1, 0, 0, 0, 392, 395, + 1, 0, 0, 0, 393, 391, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, 49, 1, 0, + 0, 0, 395, 393, 1, 0, 0, 0, 396, 406, 5, 139, 0, 0, 397, 399, 5, 52, 0, + 0, 398, 400, 5, 53, 0, 0, 399, 398, 1, 0, 0, 0, 399, 400, 1, 0, 0, 0, 400, + 406, 1, 0, 0, 0, 401, 402, 5, 66, 0, 0, 402, 406, 5, 61, 0, 0, 403, 406, + 5, 60, 0, 0, 404, 406, 5, 56, 0, 0, 405, 396, 1, 0, 0, 0, 405, 397, 1, + 0, 0, 0, 405, 401, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 405, 404, 1, 0, 0, + 0, 406, 411, 1, 0, 0, 0, 407, 408, 5, 7, 0, 0, 408, 409, 3, 8, 4, 0, 409, + 410, 5, 8, 0, 0, 410, 412, 1, 0, 0, 0, 411, 407, 1, 0, 0, 0, 411, 412, + 1, 0, 0, 0, 412, 51, 1, 0, 0, 0, 413, 414, 5, 52, 0, 0, 414, 427, 5, 53, + 0, 0, 415, 427, 5, 56, 0, 0, 416, 417, 5, 66, 0, 0, 417, 427, 5, 61, 0, + 0, 418, 419, 5, 60, 0, 0, 419, 427, 3, 8, 4, 0, 420, 427, 3, 56, 28, 0, + 421, 422, 5, 50, 0, 0, 422, 423, 5, 7, 0, 0, 423, 424, 3, 114, 57, 0, 424, + 425, 5, 8, 0, 0, 425, 427, 1, 0, 0, 0, 426, 413, 1, 0, 0, 0, 426, 415, + 1, 0, 0, 0, 426, 416, 1, 0, 0, 0, 426, 418, 1, 0, 0, 0, 426, 420, 1, 0, + 0, 0, 426, 421, 1, 0, 0, 0, 427, 53, 1, 0, 0, 0, 428, 429, 5, 54, 0, 0, + 429, 438, 7, 5, 0, 0, 430, 431, 5, 59, 0, 0, 431, 439, 5, 61, 0, 0, 432, + 433, 5, 59, 0, 0, 433, 439, 5, 60, 0, 0, 434, 439, 5, 58, 0, 0, 435, 436, + 5, 92, 0, 0, 436, 439, 5, 36, 0, 0, 437, 439, 5, 57, 0, 0, 438, 430, 1, + 0, 0, 0, 438, 432, 1, 0, 0, 0, 438, 434, 1, 0, 0, 0, 438, 435, 1, 0, 0, + 0, 438, 437, 1, 0, 0, 0, 439, 55, 1, 0, 0, 0, 440, 441, 5, 64, 0, 0, 441, + 442, 3, 10, 5, 0, 442, 443, 5, 7, 0, 0, 443, 444, 3, 10, 5, 0, 444, 445, + 5, 8, 0, 0, 445, 450, 1, 0, 0, 0, 446, 448, 3, 54, 27, 0, 447, 449, 3, + 54, 27, 0, 448, 447, 1, 0, 0, 0, 448, 449, 1, 0, 0, 0, 449, 451, 1, 0, + 0, 0, 450, 446, 1, 0, 0, 0, 450, 451, 1, 0, 0, 0, 451, 57, 1, 0, 0, 0, + 452, 453, 7, 6, 0, 0, 453, 59, 1, 0, 0, 0, 454, 456, 3, 24, 12, 0, 455, + 454, 1, 0, 0, 0, 456, 459, 1, 0, 0, 0, 457, 455, 1, 0, 0, 0, 457, 458, + 1, 0, 0, 0, 458, 460, 1, 0, 0, 0, 459, 457, 1, 0, 0, 0, 460, 461, 5, 36, + 0, 0, 461, 462, 5, 139, 0, 0, 462, 464, 5, 7, 0, 0, 463, 465, 3, 20, 10, + 0, 464, 463, 1, 0, 0, 0, 464, 465, 1, 0, 0, 0, 465, 466, 1, 0, 0, 0, 466, + 468, 5, 8, 0, 0, 467, 469, 3, 58, 29, 0, 468, 467, 1, 0, 0, 0, 469, 470, + 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 470, 471, 1, 0, 0, 0, 471, 472, 1, 0, + 0, 0, 472, 473, 5, 1, 0, 0, 473, 474, 3, 124, 62, 0, 474, 475, 5, 2, 0, + 0, 475, 61, 1, 0, 0, 0, 476, 478, 3, 24, 12, 0, 477, 476, 1, 0, 0, 0, 478, + 481, 1, 0, 0, 0, 479, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 482, + 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 482, 483, 5, 37, 0, 0, 483, 484, 5, 139, + 0, 0, 484, 486, 5, 7, 0, 0, 485, 487, 3, 48, 24, 0, 486, 485, 1, 0, 0, + 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 490, 5, 8, 0, 0, 489, + 491, 3, 58, 29, 0, 490, 489, 1, 0, 0, 0, 491, 492, 1, 0, 0, 0, 492, 490, + 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 495, 1, 0, 0, 0, 494, 496, 3, 64, + 32, 0, 495, 494, 1, 0, 0, 0, 495, 496, 1, 0, 0, 0, 496, 497, 1, 0, 0, 0, + 497, 498, 5, 1, 0, 0, 498, 499, 3, 128, 64, 0, 499, 500, 5, 2, 0, 0, 500, + 63, 1, 0, 0, 0, 501, 513, 5, 91, 0, 0, 502, 504, 5, 35, 0, 0, 503, 502, + 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 505, 1, 0, 0, 0, 505, 506, 5, 7, + 0, 0, 506, 507, 3, 46, 23, 0, 507, 508, 5, 8, 0, 0, 508, 514, 1, 0, 0, + 0, 509, 510, 5, 7, 0, 0, 510, 511, 3, 44, 22, 0, 511, 512, 5, 8, 0, 0, + 512, 514, 1, 0, 0, 0, 513, 503, 1, 0, 0, 0, 513, 509, 1, 0, 0, 0, 514, + 65, 1, 0, 0, 0, 515, 518, 3, 70, 35, 0, 516, 518, 3, 68, 34, 0, 517, 515, + 1, 0, 0, 0, 517, 516, 1, 0, 0, 0, 518, 519, 1, 0, 0, 0, 519, 520, 5, 6, + 0, 0, 520, 67, 1, 0, 0, 0, 521, 527, 3, 74, 37, 0, 522, 527, 3, 82, 41, + 0, 523, 527, 3, 80, 40, 0, 524, 527, 3, 86, 43, 0, 525, 527, 3, 88, 44, + 0, 526, 521, 1, 0, 0, 0, 526, 522, 1, 0, 0, 0, 526, 523, 1, 0, 0, 0, 526, + 524, 1, 0, 0, 0, 526, 525, 1, 0, 0, 0, 527, 69, 1, 0, 0, 0, 528, 530, 5, + 93, 0, 0, 529, 531, 5, 127, 0, 0, 530, 529, 1, 0, 0, 0, 530, 531, 1, 0, + 0, 0, 531, 532, 1, 0, 0, 0, 532, 537, 3, 72, 36, 0, 533, 534, 5, 9, 0, + 0, 534, 536, 3, 72, 36, 0, 535, 533, 1, 0, 0, 0, 536, 539, 1, 0, 0, 0, + 537, 535, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 541, 1, 0, 0, 0, 539, + 537, 1, 0, 0, 0, 540, 528, 1, 0, 0, 0, 540, 541, 1, 0, 0, 0, 541, 546, + 1, 0, 0, 0, 542, 547, 3, 90, 45, 0, 543, 547, 3, 104, 52, 0, 544, 547, + 3, 108, 54, 0, 545, 547, 3, 112, 56, 0, 546, 542, 1, 0, 0, 0, 546, 543, + 1, 0, 0, 0, 546, 544, 1, 0, 0, 0, 546, 545, 1, 0, 0, 0, 547, 71, 1, 0, + 0, 0, 548, 561, 3, 10, 5, 0, 549, 558, 5, 7, 0, 0, 550, 555, 3, 10, 5, + 0, 551, 552, 5, 9, 0, 0, 552, 554, 3, 10, 5, 0, 553, 551, 1, 0, 0, 0, 554, + 557, 1, 0, 0, 0, 555, 553, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 559, + 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 558, 550, 1, 0, 0, 0, 558, 559, 1, 0, + 0, 0, 559, 560, 1, 0, 0, 0, 560, 562, 5, 8, 0, 0, 561, 549, 1, 0, 0, 0, + 561, 562, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 564, 5, 82, 0, 0, 564, + 565, 5, 7, 0, 0, 565, 566, 3, 90, 45, 0, 566, 567, 5, 8, 0, 0, 567, 73, + 1, 0, 0, 0, 568, 569, 5, 42, 0, 0, 569, 573, 5, 35, 0, 0, 570, 571, 5, + 117, 0, 0, 571, 572, 5, 66, 0, 0, 572, 574, 5, 75, 0, 0, 573, 570, 1, 0, + 0, 0, 573, 574, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 576, 3, 10, 5, 0, + 576, 580, 5, 7, 0, 0, 577, 581, 3, 34, 17, 0, 578, 581, 3, 76, 38, 0, 579, + 581, 3, 38, 19, 0, 580, 577, 1, 0, 0, 0, 580, 578, 1, 0, 0, 0, 580, 579, + 1, 0, 0, 0, 581, 590, 1, 0, 0, 0, 582, 586, 5, 9, 0, 0, 583, 587, 3, 34, + 17, 0, 584, 587, 3, 76, 38, 0, 585, 587, 3, 38, 19, 0, 586, 583, 1, 0, + 0, 0, 586, 584, 1, 0, 0, 0, 586, 585, 1, 0, 0, 0, 587, 589, 1, 0, 0, 0, + 588, 582, 1, 0, 0, 0, 589, 592, 1, 0, 0, 0, 590, 588, 1, 0, 0, 0, 590, + 591, 1, 0, 0, 0, 591, 593, 1, 0, 0, 0, 592, 590, 1, 0, 0, 0, 593, 594, + 5, 8, 0, 0, 594, 75, 1, 0, 0, 0, 595, 596, 5, 49, 0, 0, 596, 598, 3, 10, + 5, 0, 597, 595, 1, 0, 0, 0, 597, 598, 1, 0, 0, 0, 598, 622, 1, 0, 0, 0, + 599, 600, 5, 52, 0, 0, 600, 601, 5, 53, 0, 0, 601, 602, 5, 7, 0, 0, 602, + 603, 3, 12, 6, 0, 603, 604, 5, 8, 0, 0, 604, 623, 1, 0, 0, 0, 605, 606, + 5, 56, 0, 0, 606, 607, 5, 7, 0, 0, 607, 608, 3, 12, 6, 0, 608, 609, 5, + 8, 0, 0, 609, 623, 1, 0, 0, 0, 610, 611, 5, 50, 0, 0, 611, 612, 5, 7, 0, + 0, 612, 613, 3, 114, 57, 0, 613, 614, 5, 8, 0, 0, 614, 623, 1, 0, 0, 0, + 615, 616, 5, 51, 0, 0, 616, 617, 5, 53, 0, 0, 617, 618, 5, 7, 0, 0, 618, + 619, 3, 10, 5, 0, 619, 620, 5, 8, 0, 0, 620, 621, 3, 56, 28, 0, 621, 623, + 1, 0, 0, 0, 622, 599, 1, 0, 0, 0, 622, 605, 1, 0, 0, 0, 622, 610, 1, 0, + 0, 0, 622, 615, 1, 0, 0, 0, 623, 77, 1, 0, 0, 0, 624, 628, 5, 57, 0, 0, + 625, 628, 5, 58, 0, 0, 626, 628, 1, 0, 0, 0, 627, 624, 1, 0, 0, 0, 627, + 625, 1, 0, 0, 0, 627, 626, 1, 0, 0, 0, 628, 79, 1, 0, 0, 0, 629, 630, 5, + 46, 0, 0, 630, 633, 5, 35, 0, 0, 631, 632, 5, 117, 0, 0, 632, 634, 5, 75, + 0, 0, 633, 631, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, + 635, 636, 3, 12, 6, 0, 636, 637, 3, 78, 39, 0, 637, 81, 1, 0, 0, 0, 638, + 639, 5, 43, 0, 0, 639, 640, 5, 35, 0, 0, 640, 641, 3, 10, 5, 0, 641, 642, + 3, 84, 42, 0, 642, 83, 1, 0, 0, 0, 643, 644, 5, 43, 0, 0, 644, 645, 5, + 44, 0, 0, 645, 646, 3, 10, 5, 0, 646, 651, 5, 59, 0, 0, 647, 648, 5, 66, + 0, 0, 648, 652, 5, 61, 0, 0, 649, 650, 5, 60, 0, 0, 650, 652, 3, 8, 4, + 0, 651, 647, 1, 0, 0, 0, 651, 649, 1, 0, 0, 0, 652, 687, 1, 0, 0, 0, 653, + 654, 5, 43, 0, 0, 654, 655, 5, 44, 0, 0, 655, 656, 3, 10, 5, 0, 656, 662, + 5, 46, 0, 0, 657, 658, 5, 66, 0, 0, 658, 663, 5, 61, 0, 0, 659, 663, 5, + 60, 0, 0, 660, 661, 5, 49, 0, 0, 661, 663, 3, 10, 5, 0, 662, 657, 1, 0, + 0, 0, 662, 659, 1, 0, 0, 0, 662, 660, 1, 0, 0, 0, 663, 687, 1, 0, 0, 0, + 664, 665, 5, 45, 0, 0, 665, 666, 5, 44, 0, 0, 666, 667, 3, 10, 5, 0, 667, + 668, 3, 14, 7, 0, 668, 687, 1, 0, 0, 0, 669, 670, 5, 46, 0, 0, 670, 671, + 5, 44, 0, 0, 671, 687, 3, 10, 5, 0, 672, 673, 5, 47, 0, 0, 673, 674, 5, + 44, 0, 0, 674, 675, 3, 10, 5, 0, 675, 676, 5, 48, 0, 0, 676, 677, 3, 10, + 5, 0, 677, 687, 1, 0, 0, 0, 678, 679, 5, 47, 0, 0, 679, 680, 5, 48, 0, + 0, 680, 687, 3, 10, 5, 0, 681, 682, 5, 45, 0, 0, 682, 687, 3, 76, 38, 0, + 683, 684, 5, 46, 0, 0, 684, 685, 5, 49, 0, 0, 685, 687, 3, 10, 5, 0, 686, + 643, 1, 0, 0, 0, 686, 653, 1, 0, 0, 0, 686, 664, 1, 0, 0, 0, 686, 669, + 1, 0, 0, 0, 686, 672, 1, 0, 0, 0, 686, 678, 1, 0, 0, 0, 686, 681, 1, 0, + 0, 0, 686, 683, 1, 0, 0, 0, 687, 85, 1, 0, 0, 0, 688, 690, 5, 42, 0, 0, + 689, 691, 5, 56, 0, 0, 690, 689, 1, 0, 0, 0, 690, 691, 1, 0, 0, 0, 691, + 692, 1, 0, 0, 0, 692, 696, 5, 67, 0, 0, 693, 694, 5, 117, 0, 0, 694, 695, + 5, 66, 0, 0, 695, 697, 5, 75, 0, 0, 696, 693, 1, 0, 0, 0, 696, 697, 1, + 0, 0, 0, 697, 699, 1, 0, 0, 0, 698, 700, 3, 10, 5, 0, 699, 698, 1, 0, 0, + 0, 699, 700, 1, 0, 0, 0, 700, 701, 1, 0, 0, 0, 701, 702, 5, 54, 0, 0, 702, + 703, 3, 10, 5, 0, 703, 704, 5, 7, 0, 0, 704, 705, 3, 12, 6, 0, 705, 706, + 5, 8, 0, 0, 706, 87, 1, 0, 0, 0, 707, 708, 5, 46, 0, 0, 708, 711, 5, 67, + 0, 0, 709, 710, 5, 117, 0, 0, 710, 712, 5, 75, 0, 0, 711, 709, 1, 0, 0, + 0, 711, 712, 1, 0, 0, 0, 712, 713, 1, 0, 0, 0, 713, 714, 3, 10, 5, 0, 714, + 89, 1, 0, 0, 0, 715, 721, 3, 96, 48, 0, 716, 717, 3, 92, 46, 0, 717, 718, + 3, 96, 48, 0, 718, 720, 1, 0, 0, 0, 719, 716, 1, 0, 0, 0, 720, 723, 1, + 0, 0, 0, 721, 719, 1, 0, 0, 0, 721, 722, 1, 0, 0, 0, 722, 734, 1, 0, 0, + 0, 723, 721, 1, 0, 0, 0, 724, 725, 5, 87, 0, 0, 725, 726, 5, 88, 0, 0, + 726, 731, 3, 94, 47, 0, 727, 728, 5, 9, 0, 0, 728, 730, 3, 94, 47, 0, 729, + 727, 1, 0, 0, 0, 730, 733, 1, 0, 0, 0, 731, 729, 1, 0, 0, 0, 731, 732, + 1, 0, 0, 0, 732, 735, 1, 0, 0, 0, 733, 731, 1, 0, 0, 0, 734, 724, 1, 0, + 0, 0, 734, 735, 1, 0, 0, 0, 735, 738, 1, 0, 0, 0, 736, 737, 5, 85, 0, 0, + 737, 739, 3, 114, 57, 0, 738, 736, 1, 0, 0, 0, 738, 739, 1, 0, 0, 0, 739, + 742, 1, 0, 0, 0, 740, 741, 5, 86, 0, 0, 741, 743, 3, 114, 57, 0, 742, 740, + 1, 0, 0, 0, 742, 743, 1, 0, 0, 0, 743, 91, 1, 0, 0, 0, 744, 746, 5, 106, + 0, 0, 745, 747, 5, 76, 0, 0, 746, 745, 1, 0, 0, 0, 746, 747, 1, 0, 0, 0, + 747, 751, 1, 0, 0, 0, 748, 751, 5, 107, 0, 0, 749, 751, 5, 108, 0, 0, 750, + 744, 1, 0, 0, 0, 750, 748, 1, 0, 0, 0, 750, 749, 1, 0, 0, 0, 751, 93, 1, + 0, 0, 0, 752, 754, 3, 114, 57, 0, 753, 755, 7, 7, 0, 0, 754, 753, 1, 0, + 0, 0, 754, 755, 1, 0, 0, 0, 755, 758, 1, 0, 0, 0, 756, 757, 5, 109, 0, + 0, 757, 759, 7, 8, 0, 0, 758, 756, 1, 0, 0, 0, 758, 759, 1, 0, 0, 0, 759, + 95, 1, 0, 0, 0, 760, 762, 5, 102, 0, 0, 761, 763, 5, 98, 0, 0, 762, 761, + 1, 0, 0, 0, 762, 763, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 769, 3, 102, + 51, 0, 765, 766, 5, 9, 0, 0, 766, 768, 3, 102, 51, 0, 767, 765, 1, 0, 0, + 0, 768, 771, 1, 0, 0, 0, 769, 767, 1, 0, 0, 0, 769, 770, 1, 0, 0, 0, 770, + 780, 1, 0, 0, 0, 771, 769, 1, 0, 0, 0, 772, 773, 5, 99, 0, 0, 773, 777, + 3, 98, 49, 0, 774, 776, 3, 100, 50, 0, 775, 774, 1, 0, 0, 0, 776, 779, + 1, 0, 0, 0, 777, 775, 1, 0, 0, 0, 777, 778, 1, 0, 0, 0, 778, 781, 1, 0, + 0, 0, 779, 777, 1, 0, 0, 0, 780, 772, 1, 0, 0, 0, 780, 781, 1, 0, 0, 0, + 781, 784, 1, 0, 0, 0, 782, 783, 5, 100, 0, 0, 783, 785, 3, 114, 57, 0, + 784, 782, 1, 0, 0, 0, 784, 785, 1, 0, 0, 0, 785, 793, 1, 0, 0, 0, 786, + 787, 5, 89, 0, 0, 787, 788, 5, 88, 0, 0, 788, 791, 3, 120, 60, 0, 789, + 790, 5, 90, 0, 0, 790, 792, 3, 114, 57, 0, 791, 789, 1, 0, 0, 0, 791, 792, + 1, 0, 0, 0, 792, 794, 1, 0, 0, 0, 793, 786, 1, 0, 0, 0, 793, 794, 1, 0, + 0, 0, 794, 809, 1, 0, 0, 0, 795, 796, 5, 125, 0, 0, 796, 797, 3, 10, 5, + 0, 797, 798, 5, 82, 0, 0, 798, 806, 3, 116, 58, 0, 799, 800, 5, 9, 0, 0, + 800, 801, 3, 10, 5, 0, 801, 802, 5, 82, 0, 0, 802, 803, 3, 116, 58, 0, + 803, 805, 1, 0, 0, 0, 804, 799, 1, 0, 0, 0, 805, 808, 1, 0, 0, 0, 806, + 804, 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 810, 1, 0, 0, 0, 808, 806, + 1, 0, 0, 0, 809, 795, 1, 0, 0, 0, 809, 810, 1, 0, 0, 0, 810, 97, 1, 0, + 0, 0, 811, 816, 3, 10, 5, 0, 812, 814, 5, 82, 0, 0, 813, 812, 1, 0, 0, + 0, 813, 814, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0, 815, 817, 3, 10, 5, 0, 816, + 813, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 828, 1, 0, 0, 0, 818, 819, + 5, 7, 0, 0, 819, 820, 3, 90, 45, 0, 820, 825, 5, 8, 0, 0, 821, 823, 5, + 82, 0, 0, 822, 821, 1, 0, 0, 0, 822, 823, 1, 0, 0, 0, 823, 824, 1, 0, 0, + 0, 824, 826, 3, 10, 5, 0, 825, 822, 1, 0, 0, 0, 825, 826, 1, 0, 0, 0, 826, + 828, 1, 0, 0, 0, 827, 811, 1, 0, 0, 0, 827, 818, 1, 0, 0, 0, 828, 99, 1, + 0, 0, 0, 829, 831, 7, 9, 0, 0, 830, 829, 1, 0, 0, 0, 830, 831, 1, 0, 0, + 0, 831, 832, 1, 0, 0, 0, 832, 833, 5, 78, 0, 0, 833, 834, 3, 98, 49, 0, + 834, 835, 5, 54, 0, 0, 835, 836, 3, 114, 57, 0, 836, 101, 1, 0, 0, 0, 837, + 842, 3, 114, 57, 0, 838, 840, 5, 82, 0, 0, 839, 838, 1, 0, 0, 0, 839, 840, + 1, 0, 0, 0, 840, 841, 1, 0, 0, 0, 841, 843, 3, 10, 5, 0, 842, 839, 1, 0, + 0, 0, 842, 843, 1, 0, 0, 0, 843, 851, 1, 0, 0, 0, 844, 845, 3, 10, 5, 0, + 845, 846, 5, 12, 0, 0, 846, 848, 1, 0, 0, 0, 847, 844, 1, 0, 0, 0, 847, + 848, 1, 0, 0, 0, 848, 849, 1, 0, 0, 0, 849, 851, 5, 14, 0, 0, 850, 837, + 1, 0, 0, 0, 850, 847, 1, 0, 0, 0, 851, 103, 1, 0, 0, 0, 852, 853, 5, 63, + 0, 0, 853, 858, 3, 10, 5, 0, 854, 856, 5, 82, 0, 0, 855, 854, 1, 0, 0, + 0, 855, 856, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 859, 3, 10, 5, 0, 858, + 855, 1, 0, 0, 0, 858, 859, 1, 0, 0, 0, 859, 860, 1, 0, 0, 0, 860, 861, + 5, 59, 0, 0, 861, 866, 3, 106, 53, 0, 862, 863, 5, 9, 0, 0, 863, 865, 3, + 106, 53, 0, 864, 862, 1, 0, 0, 0, 865, 868, 1, 0, 0, 0, 866, 864, 1, 0, + 0, 0, 866, 867, 1, 0, 0, 0, 867, 877, 1, 0, 0, 0, 868, 866, 1, 0, 0, 0, + 869, 870, 5, 99, 0, 0, 870, 874, 3, 98, 49, 0, 871, 873, 3, 100, 50, 0, + 872, 871, 1, 0, 0, 0, 873, 876, 1, 0, 0, 0, 874, 872, 1, 0, 0, 0, 874, + 875, 1, 0, 0, 0, 875, 878, 1, 0, 0, 0, 876, 874, 1, 0, 0, 0, 877, 869, + 1, 0, 0, 0, 877, 878, 1, 0, 0, 0, 878, 881, 1, 0, 0, 0, 879, 880, 5, 100, + 0, 0, 880, 882, 3, 114, 57, 0, 881, 879, 1, 0, 0, 0, 881, 882, 1, 0, 0, + 0, 882, 105, 1, 0, 0, 0, 883, 884, 3, 10, 5, 0, 884, 885, 5, 15, 0, 0, + 885, 886, 3, 114, 57, 0, 886, 107, 1, 0, 0, 0, 887, 888, 5, 103, 0, 0, + 888, 889, 5, 113, 0, 0, 889, 894, 3, 10, 5, 0, 890, 892, 5, 82, 0, 0, 891, + 890, 1, 0, 0, 0, 891, 892, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, + 3, 10, 5, 0, 894, 891, 1, 0, 0, 0, 894, 895, 1, 0, 0, 0, 895, 900, 1, 0, + 0, 0, 896, 897, 5, 7, 0, 0, 897, 898, 3, 12, 6, 0, 898, 899, 5, 8, 0, 0, + 899, 901, 1, 0, 0, 0, 900, 896, 1, 0, 0, 0, 900, 901, 1, 0, 0, 0, 901, + 917, 1, 0, 0, 0, 902, 903, 5, 104, 0, 0, 903, 904, 5, 7, 0, 0, 904, 905, + 3, 120, 60, 0, 905, 913, 5, 8, 0, 0, 906, 907, 5, 9, 0, 0, 907, 908, 5, + 7, 0, 0, 908, 909, 3, 120, 60, 0, 909, 910, 5, 8, 0, 0, 910, 912, 1, 0, + 0, 0, 911, 906, 1, 0, 0, 0, 912, 915, 1, 0, 0, 0, 913, 911, 1, 0, 0, 0, + 913, 914, 1, 0, 0, 0, 914, 918, 1, 0, 0, 0, 915, 913, 1, 0, 0, 0, 916, + 918, 3, 90, 45, 0, 917, 902, 1, 0, 0, 0, 917, 916, 1, 0, 0, 0, 918, 920, + 1, 0, 0, 0, 919, 921, 3, 110, 55, 0, 920, 919, 1, 0, 0, 0, 920, 921, 1, + 0, 0, 0, 921, 109, 1, 0, 0, 0, 922, 923, 5, 54, 0, 0, 923, 931, 5, 114, + 0, 0, 924, 925, 5, 7, 0, 0, 925, 926, 3, 12, 6, 0, 926, 929, 5, 8, 0, 0, + 927, 928, 5, 100, 0, 0, 928, 930, 3, 114, 57, 0, 929, 927, 1, 0, 0, 0, + 929, 930, 1, 0, 0, 0, 930, 932, 1, 0, 0, 0, 931, 924, 1, 0, 0, 0, 931, + 932, 1, 0, 0, 0, 932, 933, 1, 0, 0, 0, 933, 949, 5, 55, 0, 0, 934, 950, + 5, 115, 0, 0, 935, 936, 5, 63, 0, 0, 936, 937, 5, 59, 0, 0, 937, 942, 3, + 106, 53, 0, 938, 939, 5, 9, 0, 0, 939, 941, 3, 106, 53, 0, 940, 938, 1, + 0, 0, 0, 941, 944, 1, 0, 0, 0, 942, 940, 1, 0, 0, 0, 942, 943, 1, 0, 0, + 0, 943, 947, 1, 0, 0, 0, 944, 942, 1, 0, 0, 0, 945, 946, 5, 100, 0, 0, + 946, 948, 3, 114, 57, 0, 947, 945, 1, 0, 0, 0, 947, 948, 1, 0, 0, 0, 948, + 950, 1, 0, 0, 0, 949, 934, 1, 0, 0, 0, 949, 935, 1, 0, 0, 0, 950, 111, + 1, 0, 0, 0, 951, 952, 5, 62, 0, 0, 952, 953, 5, 99, 0, 0, 953, 958, 3, + 10, 5, 0, 954, 956, 5, 82, 0, 0, 955, 954, 1, 0, 0, 0, 955, 956, 1, 0, + 0, 0, 956, 957, 1, 0, 0, 0, 957, 959, 3, 10, 5, 0, 958, 955, 1, 0, 0, 0, + 958, 959, 1, 0, 0, 0, 959, 962, 1, 0, 0, 0, 960, 961, 5, 100, 0, 0, 961, + 963, 3, 114, 57, 0, 962, 960, 1, 0, 0, 0, 962, 963, 1, 0, 0, 0, 963, 113, + 1, 0, 0, 0, 964, 965, 6, 57, -1, 0, 965, 966, 5, 7, 0, 0, 966, 967, 3, + 114, 57, 0, 967, 969, 5, 8, 0, 0, 968, 970, 3, 16, 8, 0, 969, 968, 1, 0, + 0, 0, 969, 970, 1, 0, 0, 0, 970, 1038, 1, 0, 0, 0, 971, 972, 7, 0, 0, 0, + 972, 1038, 3, 114, 57, 20, 973, 975, 3, 8, 4, 0, 974, 976, 3, 16, 8, 0, + 975, 974, 1, 0, 0, 0, 975, 976, 1, 0, 0, 0, 976, 1038, 1, 0, 0, 0, 977, + 984, 3, 122, 61, 0, 978, 979, 5, 126, 0, 0, 979, 980, 5, 7, 0, 0, 980, + 981, 5, 100, 0, 0, 981, 982, 3, 114, 57, 0, 982, 983, 5, 8, 0, 0, 983, + 985, 1, 0, 0, 0, 984, 978, 1, 0, 0, 0, 984, 985, 1, 0, 0, 0, 985, 986, + 1, 0, 0, 0, 986, 989, 5, 123, 0, 0, 987, 990, 3, 116, 58, 0, 988, 990, + 5, 139, 0, 0, 989, 987, 1, 0, 0, 0, 989, 988, 1, 0, 0, 0, 990, 1038, 1, + 0, 0, 0, 991, 993, 3, 122, 61, 0, 992, 994, 3, 16, 8, 0, 993, 992, 1, 0, + 0, 0, 993, 994, 1, 0, 0, 0, 994, 1038, 1, 0, 0, 0, 995, 997, 3, 18, 9, + 0, 996, 998, 3, 16, 8, 0, 997, 996, 1, 0, 0, 0, 997, 998, 1, 0, 0, 0, 998, + 1038, 1, 0, 0, 0, 999, 1000, 3, 10, 5, 0, 1000, 1001, 5, 12, 0, 0, 1001, + 1003, 1, 0, 0, 0, 1002, 999, 1, 0, 0, 0, 1002, 1003, 1, 0, 0, 0, 1003, + 1004, 1, 0, 0, 0, 1004, 1006, 3, 10, 5, 0, 1005, 1007, 3, 16, 8, 0, 1006, + 1005, 1, 0, 0, 0, 1006, 1007, 1, 0, 0, 0, 1007, 1038, 1, 0, 0, 0, 1008, + 1010, 5, 94, 0, 0, 1009, 1011, 3, 114, 57, 0, 1010, 1009, 1, 0, 0, 0, 1010, + 1011, 1, 0, 0, 0, 1011, 1013, 1, 0, 0, 0, 1012, 1014, 3, 118, 59, 0, 1013, + 1012, 1, 0, 0, 0, 1014, 1015, 1, 0, 0, 0, 1015, 1013, 1, 0, 0, 0, 1015, + 1016, 1, 0, 0, 0, 1016, 1019, 1, 0, 0, 0, 1017, 1018, 5, 119, 0, 0, 1018, + 1020, 3, 114, 57, 0, 1019, 1017, 1, 0, 0, 0, 1019, 1020, 1, 0, 0, 0, 1020, + 1021, 1, 0, 0, 0, 1021, 1022, 5, 97, 0, 0, 1022, 1038, 1, 0, 0, 0, 1023, + 1025, 5, 66, 0, 0, 1024, 1023, 1, 0, 0, 0, 1024, 1025, 1, 0, 0, 0, 1025, + 1026, 1, 0, 0, 0, 1026, 1028, 5, 75, 0, 0, 1027, 1024, 1, 0, 0, 0, 1027, + 1028, 1, 0, 0, 0, 1028, 1029, 1, 0, 0, 0, 1029, 1030, 5, 7, 0, 0, 1030, + 1031, 3, 90, 45, 0, 1031, 1033, 5, 8, 0, 0, 1032, 1034, 3, 16, 8, 0, 1033, + 1032, 1, 0, 0, 0, 1033, 1034, 1, 0, 0, 0, 1034, 1038, 1, 0, 0, 0, 1035, + 1036, 5, 66, 0, 0, 1036, 1038, 3, 114, 57, 3, 1037, 964, 1, 0, 0, 0, 1037, + 971, 1, 0, 0, 0, 1037, 973, 1, 0, 0, 0, 1037, 977, 1, 0, 0, 0, 1037, 991, + 1, 0, 0, 0, 1037, 995, 1, 0, 0, 0, 1037, 1002, 1, 0, 0, 0, 1037, 1008, + 1, 0, 0, 0, 1037, 1027, 1, 0, 0, 0, 1037, 1035, 1, 0, 0, 0, 1038, 1124, + 1, 0, 0, 0, 1039, 1040, 10, 18, 0, 0, 1040, 1041, 7, 10, 0, 0, 1041, 1123, + 3, 114, 57, 19, 1042, 1043, 10, 17, 0, 0, 1043, 1044, 7, 0, 0, 0, 1044, + 1123, 3, 114, 57, 18, 1045, 1046, 10, 9, 0, 0, 1046, 1047, 5, 13, 0, 0, + 1047, 1123, 3, 114, 57, 10, 1048, 1050, 10, 7, 0, 0, 1049, 1051, 5, 66, + 0, 0, 1050, 1049, 1, 0, 0, 0, 1050, 1051, 1, 0, 0, 0, 1051, 1052, 1, 0, + 0, 0, 1052, 1053, 7, 11, 0, 0, 1053, 1123, 3, 114, 57, 8, 1054, 1056, 10, + 6, 0, 0, 1055, 1057, 5, 66, 0, 0, 1056, 1055, 1, 0, 0, 0, 1056, 1057, 1, + 0, 0, 0, 1057, 1058, 1, 0, 0, 0, 1058, 1059, 5, 73, 0, 0, 1059, 1060, 3, + 114, 57, 0, 1060, 1061, 5, 68, 0, 0, 1061, 1062, 3, 114, 57, 7, 1062, 1123, + 1, 0, 0, 0, 1063, 1064, 10, 5, 0, 0, 1064, 1065, 7, 12, 0, 0, 1065, 1123, + 3, 114, 57, 6, 1066, 1067, 10, 2, 0, 0, 1067, 1068, 5, 68, 0, 0, 1068, + 1123, 3, 114, 57, 3, 1069, 1070, 10, 1, 0, 0, 1070, 1071, 5, 69, 0, 0, + 1071, 1123, 3, 114, 57, 2, 1072, 1073, 10, 22, 0, 0, 1073, 1074, 5, 12, + 0, 0, 1074, 1076, 3, 10, 5, 0, 1075, 1077, 3, 16, 8, 0, 1076, 1075, 1, + 0, 0, 0, 1076, 1077, 1, 0, 0, 0, 1077, 1123, 1, 0, 0, 0, 1078, 1079, 10, + 21, 0, 0, 1079, 1088, 5, 3, 0, 0, 1080, 1089, 3, 114, 57, 0, 1081, 1083, + 3, 114, 57, 0, 1082, 1081, 1, 0, 0, 0, 1082, 1083, 1, 0, 0, 0, 1083, 1084, + 1, 0, 0, 0, 1084, 1086, 5, 5, 0, 0, 1085, 1087, 3, 114, 57, 0, 1086, 1085, + 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, 1089, 1, 0, 0, 0, 1088, 1080, + 1, 0, 0, 0, 1088, 1082, 1, 0, 0, 0, 1089, 1090, 1, 0, 0, 0, 1090, 1092, + 5, 4, 0, 0, 1091, 1093, 3, 16, 8, 0, 1092, 1091, 1, 0, 0, 0, 1092, 1093, + 1, 0, 0, 0, 1093, 1123, 1, 0, 0, 0, 1094, 1095, 10, 19, 0, 0, 1095, 1096, + 5, 101, 0, 0, 1096, 1123, 3, 10, 5, 0, 1097, 1099, 10, 8, 0, 0, 1098, 1100, + 5, 66, 0, 0, 1099, 1098, 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, 1101, + 1, 0, 0, 0, 1101, 1102, 5, 72, 0, 0, 1102, 1105, 5, 7, 0, 0, 1103, 1106, + 3, 120, 60, 0, 1104, 1106, 3, 90, 45, 0, 1105, 1103, 1, 0, 0, 0, 1105, + 1104, 1, 0, 0, 0, 1106, 1107, 1, 0, 0, 0, 1107, 1108, 5, 8, 0, 0, 1108, + 1123, 1, 0, 0, 0, 1109, 1110, 10, 4, 0, 0, 1110, 1112, 5, 74, 0, 0, 1111, + 1113, 5, 66, 0, 0, 1112, 1111, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, + 1120, 1, 0, 0, 0, 1114, 1115, 5, 98, 0, 0, 1115, 1116, 5, 99, 0, 0, 1116, + 1121, 3, 114, 57, 0, 1117, 1121, 5, 61, 0, 0, 1118, 1121, 5, 129, 0, 0, + 1119, 1121, 5, 130, 0, 0, 1120, 1114, 1, 0, 0, 0, 1120, 1117, 1, 0, 0, + 0, 1120, 1118, 1, 0, 0, 0, 1120, 1119, 1, 0, 0, 0, 1121, 1123, 1, 0, 0, + 0, 1122, 1039, 1, 0, 0, 0, 1122, 1042, 1, 0, 0, 0, 1122, 1045, 1, 0, 0, + 0, 1122, 1048, 1, 0, 0, 0, 1122, 1054, 1, 0, 0, 0, 1122, 1063, 1, 0, 0, + 0, 1122, 1066, 1, 0, 0, 0, 1122, 1069, 1, 0, 0, 0, 1122, 1072, 1, 0, 0, + 0, 1122, 1078, 1, 0, 0, 0, 1122, 1094, 1, 0, 0, 0, 1122, 1097, 1, 0, 0, + 0, 1122, 1109, 1, 0, 0, 0, 1123, 1126, 1, 0, 0, 0, 1124, 1122, 1, 0, 0, + 0, 1124, 1125, 1, 0, 0, 0, 1125, 115, 1, 0, 0, 0, 1126, 1124, 1, 0, 0, + 0, 1127, 1131, 5, 7, 0, 0, 1128, 1129, 5, 124, 0, 0, 1129, 1130, 5, 88, + 0, 0, 1130, 1132, 3, 120, 60, 0, 1131, 1128, 1, 0, 0, 0, 1131, 1132, 1, + 0, 0, 0, 1132, 1143, 1, 0, 0, 0, 1133, 1134, 5, 87, 0, 0, 1134, 1135, 5, + 88, 0, 0, 1135, 1140, 3, 94, 47, 0, 1136, 1137, 5, 9, 0, 0, 1137, 1139, + 3, 94, 47, 0, 1138, 1136, 1, 0, 0, 0, 1139, 1142, 1, 0, 0, 0, 1140, 1138, + 1, 0, 0, 0, 1140, 1141, 1, 0, 0, 0, 1141, 1144, 1, 0, 0, 0, 1142, 1140, + 1, 0, 0, 0, 1143, 1133, 1, 0, 0, 0, 1143, 1144, 1, 0, 0, 0, 1144, 1145, + 1, 0, 0, 0, 1145, 1146, 5, 8, 0, 0, 1146, 117, 1, 0, 0, 0, 1147, 1148, + 5, 95, 0, 0, 1148, 1149, 3, 114, 57, 0, 1149, 1150, 5, 96, 0, 0, 1150, + 1151, 3, 114, 57, 0, 1151, 119, 1, 0, 0, 0, 1152, 1157, 3, 114, 57, 0, + 1153, 1154, 5, 9, 0, 0, 1154, 1156, 3, 114, 57, 0, 1155, 1153, 1, 0, 0, + 0, 1156, 1159, 1, 0, 0, 0, 1157, 1155, 1, 0, 0, 0, 1157, 1158, 1, 0, 0, + 0, 1158, 121, 1, 0, 0, 0, 1159, 1157, 1, 0, 0, 0, 1160, 1161, 3, 10, 5, + 0, 1161, 1167, 5, 7, 0, 0, 1162, 1164, 5, 98, 0, 0, 1163, 1162, 1, 0, 0, + 0, 1163, 1164, 1, 0, 0, 0, 1164, 1165, 1, 0, 0, 0, 1165, 1168, 3, 120, + 60, 0, 1166, 1168, 5, 14, 0, 0, 1167, 1163, 1, 0, 0, 0, 1167, 1166, 1, + 0, 0, 0, 1167, 1168, 1, 0, 0, 0, 1168, 1169, 1, 0, 0, 0, 1169, 1170, 5, + 8, 0, 0, 1170, 123, 1, 0, 0, 0, 1171, 1172, 3, 126, 63, 0, 1172, 1173, + 5, 6, 0, 0, 1173, 1175, 1, 0, 0, 0, 1174, 1171, 1, 0, 0, 0, 1175, 1178, + 1, 0, 0, 0, 1176, 1174, 1, 0, 0, 0, 1176, 1177, 1, 0, 0, 0, 1177, 125, + 1, 0, 0, 0, 1178, 1176, 1, 0, 0, 0, 1179, 1200, 3, 70, 35, 0, 1180, 1181, + 5, 139, 0, 0, 1181, 1183, 5, 7, 0, 0, 1182, 1184, 3, 132, 66, 0, 1183, + 1182, 1, 0, 0, 0, 1183, 1184, 1, 0, 0, 0, 1184, 1185, 1, 0, 0, 0, 1185, + 1200, 5, 8, 0, 0, 1186, 1187, 3, 20, 10, 0, 1187, 1188, 5, 15, 0, 0, 1188, + 1190, 1, 0, 0, 0, 1189, 1186, 1, 0, 0, 0, 1189, 1190, 1, 0, 0, 0, 1190, + 1191, 1, 0, 0, 0, 1191, 1192, 5, 139, 0, 0, 1192, 1193, 5, 12, 0, 0, 1193, + 1194, 5, 139, 0, 0, 1194, 1196, 5, 7, 0, 0, 1195, 1197, 3, 132, 66, 0, + 1196, 1195, 1, 0, 0, 0, 1196, 1197, 1, 0, 0, 0, 1197, 1198, 1, 0, 0, 0, + 1198, 1200, 5, 8, 0, 0, 1199, 1179, 1, 0, 0, 0, 1199, 1180, 1, 0, 0, 0, + 1199, 1189, 1, 0, 0, 0, 1200, 127, 1, 0, 0, 0, 1201, 1203, 3, 134, 67, + 0, 1202, 1201, 1, 0, 0, 0, 1203, 1206, 1, 0, 0, 0, 1204, 1202, 1, 0, 0, + 0, 1204, 1205, 1, 0, 0, 0, 1205, 129, 1, 0, 0, 0, 1206, 1204, 1, 0, 0, + 0, 1207, 1208, 6, 65, -1, 0, 1208, 1209, 5, 7, 0, 0, 1209, 1210, 3, 130, + 65, 0, 1210, 1212, 5, 8, 0, 0, 1211, 1213, 3, 16, 8, 0, 1212, 1211, 1, + 0, 0, 0, 1212, 1213, 1, 0, 0, 0, 1213, 1239, 1, 0, 0, 0, 1214, 1215, 7, + 13, 0, 0, 1215, 1239, 3, 130, 65, 13, 1216, 1218, 3, 8, 4, 0, 1217, 1219, + 3, 16, 8, 0, 1218, 1217, 1, 0, 0, 0, 1218, 1219, 1, 0, 0, 0, 1219, 1239, + 1, 0, 0, 0, 1220, 1222, 3, 138, 69, 0, 1221, 1223, 3, 16, 8, 0, 1222, 1221, + 1, 0, 0, 0, 1222, 1223, 1, 0, 0, 0, 1223, 1239, 1, 0, 0, 0, 1224, 1226, + 3, 18, 9, 0, 1225, 1227, 3, 16, 8, 0, 1226, 1225, 1, 0, 0, 0, 1226, 1227, + 1, 0, 0, 0, 1227, 1239, 1, 0, 0, 0, 1228, 1230, 5, 3, 0, 0, 1229, 1231, + 3, 132, 66, 0, 1230, 1229, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1232, + 1, 0, 0, 0, 1232, 1234, 5, 4, 0, 0, 1233, 1235, 3, 16, 8, 0, 1234, 1233, + 1, 0, 0, 0, 1234, 1235, 1, 0, 0, 0, 1235, 1239, 1, 0, 0, 0, 1236, 1237, + 5, 66, 0, 0, 1237, 1239, 3, 130, 65, 3, 1238, 1207, 1, 0, 0, 0, 1238, 1214, + 1, 0, 0, 0, 1238, 1216, 1, 0, 0, 0, 1238, 1220, 1, 0, 0, 0, 1238, 1224, + 1, 0, 0, 0, 1238, 1228, 1, 0, 0, 0, 1238, 1236, 1, 0, 0, 0, 1239, 1295, + 1, 0, 0, 0, 1240, 1241, 10, 12, 0, 0, 1241, 1242, 7, 10, 0, 0, 1242, 1294, + 3, 130, 65, 13, 1243, 1244, 10, 11, 0, 0, 1244, 1245, 7, 0, 0, 0, 1245, + 1294, 3, 130, 65, 12, 1246, 1247, 10, 6, 0, 0, 1247, 1248, 5, 13, 0, 0, + 1248, 1294, 3, 130, 65, 7, 1249, 1250, 10, 5, 0, 0, 1250, 1251, 7, 12, + 0, 0, 1251, 1294, 3, 130, 65, 6, 1252, 1253, 10, 2, 0, 0, 1253, 1254, 5, + 68, 0, 0, 1254, 1294, 3, 130, 65, 3, 1255, 1256, 10, 1, 0, 0, 1256, 1257, + 5, 69, 0, 0, 1257, 1294, 3, 130, 65, 2, 1258, 1259, 10, 15, 0, 0, 1259, + 1260, 5, 12, 0, 0, 1260, 1262, 5, 139, 0, 0, 1261, 1263, 3, 16, 8, 0, 1262, + 1261, 1, 0, 0, 0, 1262, 1263, 1, 0, 0, 0, 1263, 1294, 1, 0, 0, 0, 1264, + 1265, 10, 14, 0, 0, 1265, 1274, 5, 3, 0, 0, 1266, 1275, 3, 130, 65, 0, + 1267, 1269, 3, 130, 65, 0, 1268, 1267, 1, 0, 0, 0, 1268, 1269, 1, 0, 0, + 0, 1269, 1270, 1, 0, 0, 0, 1270, 1272, 5, 5, 0, 0, 1271, 1273, 3, 130, + 65, 0, 1272, 1271, 1, 0, 0, 0, 1272, 1273, 1, 0, 0, 0, 1273, 1275, 1, 0, + 0, 0, 1274, 1266, 1, 0, 0, 0, 1274, 1268, 1, 0, 0, 0, 1275, 1276, 1, 0, + 0, 0, 1276, 1278, 5, 4, 0, 0, 1277, 1279, 3, 16, 8, 0, 1278, 1277, 1, 0, + 0, 0, 1278, 1279, 1, 0, 0, 0, 1279, 1294, 1, 0, 0, 0, 1280, 1281, 10, 4, + 0, 0, 1281, 1283, 5, 74, 0, 0, 1282, 1284, 5, 66, 0, 0, 1283, 1282, 1, + 0, 0, 0, 1283, 1284, 1, 0, 0, 0, 1284, 1291, 1, 0, 0, 0, 1285, 1286, 5, + 98, 0, 0, 1286, 1287, 5, 99, 0, 0, 1287, 1292, 3, 130, 65, 0, 1288, 1292, + 5, 61, 0, 0, 1289, 1292, 5, 129, 0, 0, 1290, 1292, 5, 130, 0, 0, 1291, + 1285, 1, 0, 0, 0, 1291, 1288, 1, 0, 0, 0, 1291, 1289, 1, 0, 0, 0, 1291, + 1290, 1, 0, 0, 0, 1292, 1294, 1, 0, 0, 0, 1293, 1240, 1, 0, 0, 0, 1293, + 1243, 1, 0, 0, 0, 1293, 1246, 1, 0, 0, 0, 1293, 1249, 1, 0, 0, 0, 1293, + 1252, 1, 0, 0, 0, 1293, 1255, 1, 0, 0, 0, 1293, 1258, 1, 0, 0, 0, 1293, + 1264, 1, 0, 0, 0, 1293, 1280, 1, 0, 0, 0, 1294, 1297, 1, 0, 0, 0, 1295, + 1293, 1, 0, 0, 0, 1295, 1296, 1, 0, 0, 0, 1296, 131, 1, 0, 0, 0, 1297, + 1295, 1, 0, 0, 0, 1298, 1303, 3, 130, 65, 0, 1299, 1300, 5, 9, 0, 0, 1300, + 1302, 3, 130, 65, 0, 1301, 1299, 1, 0, 0, 0, 1302, 1305, 1, 0, 0, 0, 1303, + 1301, 1, 0, 0, 0, 1303, 1304, 1, 0, 0, 0, 1304, 133, 1, 0, 0, 0, 1305, + 1303, 1, 0, 0, 0, 1306, 1307, 5, 140, 0, 0, 1307, 1308, 3, 14, 7, 0, 1308, + 1309, 5, 6, 0, 0, 1309, 1387, 1, 0, 0, 0, 1310, 1315, 3, 136, 68, 0, 1311, + 1312, 5, 9, 0, 0, 1312, 1314, 3, 136, 68, 0, 1313, 1311, 1, 0, 0, 0, 1314, + 1317, 1, 0, 0, 0, 1315, 1313, 1, 0, 0, 0, 1315, 1316, 1, 0, 0, 0, 1316, + 1318, 1, 0, 0, 0, 1317, 1315, 1, 0, 0, 0, 1318, 1319, 5, 30, 0, 0, 1319, + 1321, 1, 0, 0, 0, 1320, 1310, 1, 0, 0, 0, 1320, 1321, 1, 0, 0, 0, 1321, + 1322, 1, 0, 0, 0, 1322, 1323, 3, 138, 69, 0, 1323, 1324, 5, 6, 0, 0, 1324, + 1387, 1, 0, 0, 0, 1325, 1327, 3, 130, 65, 0, 1326, 1328, 3, 14, 7, 0, 1327, + 1326, 1, 0, 0, 0, 1327, 1328, 1, 0, 0, 0, 1328, 1329, 1, 0, 0, 0, 1329, + 1330, 5, 30, 0, 0, 1330, 1331, 3, 130, 65, 0, 1331, 1332, 5, 6, 0, 0, 1332, + 1387, 1, 0, 0, 0, 1333, 1334, 5, 116, 0, 0, 1334, 1335, 5, 140, 0, 0, 1335, + 1339, 5, 72, 0, 0, 1336, 1340, 3, 142, 71, 0, 1337, 1340, 3, 18, 9, 0, + 1338, 1340, 3, 70, 35, 0, 1339, 1336, 1, 0, 0, 0, 1339, 1337, 1, 0, 0, + 0, 1339, 1338, 1, 0, 0, 0, 1340, 1341, 1, 0, 0, 0, 1341, 1345, 5, 1, 0, + 0, 1342, 1344, 3, 134, 67, 0, 1343, 1342, 1, 0, 0, 0, 1344, 1347, 1, 0, + 0, 0, 1345, 1343, 1, 0, 0, 0, 1345, 1346, 1, 0, 0, 0, 1346, 1348, 1, 0, + 0, 0, 1347, 1345, 1, 0, 0, 0, 1348, 1349, 5, 2, 0, 0, 1349, 1387, 1, 0, + 0, 0, 1350, 1351, 5, 117, 0, 0, 1351, 1356, 3, 140, 70, 0, 1352, 1353, + 5, 118, 0, 0, 1353, 1355, 3, 140, 70, 0, 1354, 1352, 1, 0, 0, 0, 1355, + 1358, 1, 0, 0, 0, 1356, 1354, 1, 0, 0, 0, 1356, 1357, 1, 0, 0, 0, 1357, + 1368, 1, 0, 0, 0, 1358, 1356, 1, 0, 0, 0, 1359, 1360, 5, 119, 0, 0, 1360, + 1364, 5, 1, 0, 0, 1361, 1363, 3, 134, 67, 0, 1362, 1361, 1, 0, 0, 0, 1363, + 1366, 1, 0, 0, 0, 1364, 1362, 1, 0, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, + 1367, 1, 0, 0, 0, 1366, 1364, 1, 0, 0, 0, 1367, 1369, 5, 2, 0, 0, 1368, + 1359, 1, 0, 0, 0, 1368, 1369, 1, 0, 0, 0, 1369, 1387, 1, 0, 0, 0, 1370, + 1371, 3, 70, 35, 0, 1371, 1372, 5, 6, 0, 0, 1372, 1387, 1, 0, 0, 0, 1373, + 1374, 5, 120, 0, 0, 1374, 1387, 5, 6, 0, 0, 1375, 1378, 5, 121, 0, 0, 1376, + 1379, 3, 132, 66, 0, 1377, 1379, 3, 70, 35, 0, 1378, 1376, 1, 0, 0, 0, + 1378, 1377, 1, 0, 0, 0, 1378, 1379, 1, 0, 0, 0, 1379, 1380, 1, 0, 0, 0, + 1380, 1387, 5, 6, 0, 0, 1381, 1382, 5, 121, 0, 0, 1382, 1383, 5, 122, 0, + 0, 1383, 1384, 3, 132, 66, 0, 1384, 1385, 5, 6, 0, 0, 1385, 1387, 1, 0, + 0, 0, 1386, 1306, 1, 0, 0, 0, 1386, 1320, 1, 0, 0, 0, 1386, 1325, 1, 0, + 0, 0, 1386, 1333, 1, 0, 0, 0, 1386, 1350, 1, 0, 0, 0, 1386, 1370, 1, 0, + 0, 0, 1386, 1373, 1, 0, 0, 0, 1386, 1375, 1, 0, 0, 0, 1386, 1381, 1, 0, + 0, 0, 1387, 135, 1, 0, 0, 0, 1388, 1389, 7, 14, 0, 0, 1389, 137, 1, 0, + 0, 0, 1390, 1391, 5, 139, 0, 0, 1391, 1393, 5, 7, 0, 0, 1392, 1394, 3, + 132, 66, 0, 1393, 1392, 1, 0, 0, 0, 1393, 1394, 1, 0, 0, 0, 1394, 1395, + 1, 0, 0, 0, 1395, 1396, 5, 8, 0, 0, 1396, 139, 1, 0, 0, 0, 1397, 1398, + 3, 130, 65, 0, 1398, 1402, 5, 1, 0, 0, 1399, 1401, 3, 134, 67, 0, 1400, + 1399, 1, 0, 0, 0, 1401, 1404, 1, 0, 0, 0, 1402, 1400, 1, 0, 0, 0, 1402, + 1403, 1, 0, 0, 0, 1403, 1405, 1, 0, 0, 0, 1404, 1402, 1, 0, 0, 0, 1405, + 1406, 5, 2, 0, 0, 1406, 141, 1, 0, 0, 0, 1407, 1408, 3, 130, 65, 0, 1408, + 1409, 5, 31, 0, 0, 1409, 1410, 3, 130, 65, 0, 1410, 143, 1, 0, 0, 0, 189, + 158, 162, 170, 176, 183, 192, 196, 208, 216, 218, 232, 235, 255, 260, 274, + 278, 288, 296, 306, 317, 330, 336, 341, 343, 346, 351, 357, 362, 365, 372, + 382, 393, 399, 405, 411, 426, 438, 448, 450, 457, 464, 470, 479, 486, 492, + 495, 503, 513, 517, 526, 530, 537, 540, 546, 555, 558, 561, 573, 580, 586, + 590, 597, 622, 627, 633, 651, 662, 686, 690, 696, 699, 711, 721, 731, 734, + 738, 742, 746, 750, 754, 758, 762, 769, 777, 780, 784, 791, 793, 806, 809, + 813, 816, 822, 825, 827, 830, 839, 842, 847, 850, 855, 858, 866, 874, 877, + 881, 891, 894, 900, 913, 917, 920, 929, 931, 942, 947, 949, 955, 958, 962, + 969, 975, 984, 989, 993, 997, 1002, 1006, 1010, 1015, 1019, 1024, 1027, + 1033, 1037, 1050, 1056, 1076, 1082, 1086, 1088, 1092, 1099, 1105, 1112, + 1120, 1122, 1124, 1131, 1140, 1143, 1157, 1163, 1167, 1176, 1183, 1189, + 1196, 1199, 1204, 1212, 1218, 1222, 1226, 1230, 1234, 1238, 1262, 1268, + 1272, 1274, 1278, 1283, 1291, 1293, 1295, 1303, 1315, 1320, 1327, 1339, + 1345, 1356, 1364, 1368, 1378, 1386, 1393, 1402, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -736,101 +866,110 @@ const ( KuneiformParserPRIVATE = 39 KuneiformParserVIEW = 40 KuneiformParserOWNER = 41 - KuneiformParserFOREIGN = 42 - KuneiformParserPRIMARY = 43 - KuneiformParserKEY = 44 - KuneiformParserON = 45 - KuneiformParserDO = 46 - KuneiformParserUNIQUE = 47 - KuneiformParserCASCADE = 48 - KuneiformParserRESTRICT = 49 - KuneiformParserSET = 50 - KuneiformParserDEFAULT = 51 - KuneiformParserNULL = 52 - KuneiformParserDELETE = 53 - KuneiformParserUPDATE = 54 - KuneiformParserREFERENCES = 55 - KuneiformParserREF = 56 - KuneiformParserNOT = 57 - KuneiformParserINDEX = 58 - KuneiformParserAND = 59 - KuneiformParserOR = 60 - KuneiformParserLIKE = 61 - KuneiformParserILIKE = 62 - KuneiformParserIN = 63 - KuneiformParserBETWEEN = 64 - KuneiformParserIS = 65 - KuneiformParserEXISTS = 66 - KuneiformParserALL = 67 - KuneiformParserANY = 68 - KuneiformParserJOIN = 69 - KuneiformParserLEFT = 70 - KuneiformParserRIGHT = 71 - KuneiformParserINNER = 72 - KuneiformParserAS = 73 - KuneiformParserASC = 74 - KuneiformParserDESC = 75 - KuneiformParserLIMIT = 76 - KuneiformParserOFFSET = 77 - KuneiformParserORDER = 78 - KuneiformParserBY = 79 - KuneiformParserGROUP = 80 - KuneiformParserHAVING = 81 - KuneiformParserRETURNS = 82 - KuneiformParserNO = 83 - KuneiformParserWITH = 84 - KuneiformParserCASE = 85 - KuneiformParserWHEN = 86 - KuneiformParserTHEN = 87 - KuneiformParserEND = 88 - KuneiformParserDISTINCT = 89 - KuneiformParserFROM = 90 - KuneiformParserWHERE = 91 - KuneiformParserCOLLATE = 92 - KuneiformParserSELECT = 93 - KuneiformParserINSERT = 94 - KuneiformParserVALUES = 95 - KuneiformParserFULL = 96 - KuneiformParserUNION = 97 - KuneiformParserINTERSECT = 98 - KuneiformParserEXCEPT = 99 - KuneiformParserNULLS = 100 - KuneiformParserFIRST = 101 - KuneiformParserLAST = 102 - KuneiformParserRETURNING = 103 - KuneiformParserINTO = 104 - KuneiformParserCONFLICT = 105 - KuneiformParserNOTHING = 106 - KuneiformParserFOR = 107 - KuneiformParserIF = 108 - KuneiformParserELSEIF = 109 - KuneiformParserELSE = 110 - KuneiformParserBREAK = 111 - KuneiformParserRETURN = 112 - KuneiformParserNEXT = 113 - KuneiformParserOVER = 114 - KuneiformParserPARTITION = 115 - KuneiformParserWINDOW = 116 - KuneiformParserFILTER = 117 - KuneiformParserRECURSIVE = 118 - KuneiformParserSTRING_ = 119 - KuneiformParserTRUE = 120 - KuneiformParserFALSE = 121 - KuneiformParserDIGITS_ = 122 - KuneiformParserBINARY_ = 123 - KuneiformParserLEGACY_FOREIGN_KEY = 124 - KuneiformParserLEGACY_ON_UPDATE = 125 - KuneiformParserLEGACY_ON_DELETE = 126 - KuneiformParserLEGACY_SET_DEFAULT = 127 - KuneiformParserLEGACY_SET_NULL = 128 - KuneiformParserLEGACY_NO_ACTION = 129 - KuneiformParserIDENTIFIER = 130 - KuneiformParserVARIABLE = 131 - KuneiformParserCONTEXTUAL_VARIABLE = 132 - KuneiformParserHASH_IDENTIFIER = 133 - KuneiformParserWS = 134 - KuneiformParserBLOCK_COMMENT = 135 - KuneiformParserLINE_COMMENT = 136 + KuneiformParserCREATE = 42 + KuneiformParserALTER = 43 + KuneiformParserCOLUMN = 44 + KuneiformParserADD = 45 + KuneiformParserDROP = 46 + KuneiformParserRENAME = 47 + KuneiformParserTO = 48 + KuneiformParserCONSTRAINT = 49 + KuneiformParserCHECK = 50 + KuneiformParserFOREIGN = 51 + KuneiformParserPRIMARY = 52 + KuneiformParserKEY = 53 + KuneiformParserON = 54 + KuneiformParserDO = 55 + KuneiformParserUNIQUE = 56 + KuneiformParserCASCADE = 57 + KuneiformParserRESTRICT = 58 + KuneiformParserSET = 59 + KuneiformParserDEFAULT = 60 + KuneiformParserNULL = 61 + KuneiformParserDELETE = 62 + KuneiformParserUPDATE = 63 + KuneiformParserREFERENCES = 64 + KuneiformParserREF = 65 + KuneiformParserNOT = 66 + KuneiformParserINDEX = 67 + KuneiformParserAND = 68 + KuneiformParserOR = 69 + KuneiformParserLIKE = 70 + KuneiformParserILIKE = 71 + KuneiformParserIN = 72 + KuneiformParserBETWEEN = 73 + KuneiformParserIS = 74 + KuneiformParserEXISTS = 75 + KuneiformParserALL = 76 + KuneiformParserANY = 77 + KuneiformParserJOIN = 78 + KuneiformParserLEFT = 79 + KuneiformParserRIGHT = 80 + KuneiformParserINNER = 81 + KuneiformParserAS = 82 + KuneiformParserASC = 83 + KuneiformParserDESC = 84 + KuneiformParserLIMIT = 85 + KuneiformParserOFFSET = 86 + KuneiformParserORDER = 87 + KuneiformParserBY = 88 + KuneiformParserGROUP = 89 + KuneiformParserHAVING = 90 + KuneiformParserRETURNS = 91 + KuneiformParserNO = 92 + KuneiformParserWITH = 93 + KuneiformParserCASE = 94 + KuneiformParserWHEN = 95 + KuneiformParserTHEN = 96 + KuneiformParserEND = 97 + KuneiformParserDISTINCT = 98 + KuneiformParserFROM = 99 + KuneiformParserWHERE = 100 + KuneiformParserCOLLATE = 101 + KuneiformParserSELECT = 102 + KuneiformParserINSERT = 103 + KuneiformParserVALUES = 104 + KuneiformParserFULL = 105 + KuneiformParserUNION = 106 + KuneiformParserINTERSECT = 107 + KuneiformParserEXCEPT = 108 + KuneiformParserNULLS = 109 + KuneiformParserFIRST = 110 + KuneiformParserLAST = 111 + KuneiformParserRETURNING = 112 + KuneiformParserINTO = 113 + KuneiformParserCONFLICT = 114 + KuneiformParserNOTHING = 115 + KuneiformParserFOR = 116 + KuneiformParserIF = 117 + KuneiformParserELSEIF = 118 + KuneiformParserELSE = 119 + KuneiformParserBREAK = 120 + KuneiformParserRETURN = 121 + KuneiformParserNEXT = 122 + KuneiformParserOVER = 123 + KuneiformParserPARTITION = 124 + KuneiformParserWINDOW = 125 + KuneiformParserFILTER = 126 + KuneiformParserRECURSIVE = 127 + KuneiformParserSTRING_ = 128 + KuneiformParserTRUE = 129 + KuneiformParserFALSE = 130 + KuneiformParserDIGITS_ = 131 + KuneiformParserBINARY_ = 132 + KuneiformParserLEGACY_FOREIGN_KEY = 133 + KuneiformParserLEGACY_ON_UPDATE = 134 + KuneiformParserLEGACY_ON_DELETE = 135 + KuneiformParserLEGACY_SET_DEFAULT = 136 + KuneiformParserLEGACY_SET_NULL = 137 + KuneiformParserLEGACY_NO_ACTION = 138 + KuneiformParserIDENTIFIER = 139 + KuneiformParserVARIABLE = 140 + KuneiformParserCONTEXTUAL_VARIABLE = 141 + KuneiformParserHASH_IDENTIFIER = 142 + KuneiformParserWS = 143 + KuneiformParserBLOCK_COMMENT = 144 + KuneiformParserLINE_COMMENT = 145 ) // KuneiformParser rules. @@ -852,47 +991,61 @@ const ( KuneiformParserRULE_use_declaration = 14 KuneiformParserRULE_table_declaration = 15 KuneiformParserRULE_column_def = 16 - KuneiformParserRULE_index_def = 17 - KuneiformParserRULE_foreign_key_def = 18 - KuneiformParserRULE_foreign_key_action = 19 - KuneiformParserRULE_type_list = 20 - KuneiformParserRULE_named_type_list = 21 - KuneiformParserRULE_typed_variable_list = 22 - KuneiformParserRULE_constraint = 23 - KuneiformParserRULE_access_modifier = 24 - KuneiformParserRULE_action_declaration = 25 - KuneiformParserRULE_procedure_declaration = 26 - KuneiformParserRULE_procedure_return = 27 - KuneiformParserRULE_sql = 28 - KuneiformParserRULE_sql_statement = 29 - KuneiformParserRULE_common_table_expression = 30 - KuneiformParserRULE_select_statement = 31 - KuneiformParserRULE_compound_operator = 32 - KuneiformParserRULE_ordering_term = 33 - KuneiformParserRULE_select_core = 34 - KuneiformParserRULE_relation = 35 - KuneiformParserRULE_join = 36 - KuneiformParserRULE_result_column = 37 - KuneiformParserRULE_update_statement = 38 - KuneiformParserRULE_update_set_clause = 39 - KuneiformParserRULE_insert_statement = 40 - KuneiformParserRULE_upsert_clause = 41 - KuneiformParserRULE_delete_statement = 42 - KuneiformParserRULE_sql_expr = 43 - KuneiformParserRULE_window = 44 - KuneiformParserRULE_when_then_clause = 45 - KuneiformParserRULE_sql_expr_list = 46 - KuneiformParserRULE_sql_function_call = 47 - KuneiformParserRULE_action_block = 48 - KuneiformParserRULE_action_statement = 49 - KuneiformParserRULE_procedure_block = 50 - KuneiformParserRULE_procedure_expr = 51 - KuneiformParserRULE_procedure_expr_list = 52 - KuneiformParserRULE_proc_statement = 53 - KuneiformParserRULE_variable_or_underscore = 54 - KuneiformParserRULE_procedure_function_call = 55 - KuneiformParserRULE_if_then_block = 56 - KuneiformParserRULE_range = 57 + KuneiformParserRULE_table_column_def = 17 + KuneiformParserRULE_index_def = 18 + KuneiformParserRULE_table_index_def = 19 + KuneiformParserRULE_foreign_key_def = 20 + KuneiformParserRULE_foreign_key_action = 21 + KuneiformParserRULE_type_list = 22 + KuneiformParserRULE_named_type_list = 23 + KuneiformParserRULE_typed_variable_list = 24 + KuneiformParserRULE_constraint = 25 + KuneiformParserRULE_inline_constraint = 26 + KuneiformParserRULE_fk_action = 27 + KuneiformParserRULE_fk_constraint = 28 + KuneiformParserRULE_access_modifier = 29 + KuneiformParserRULE_action_declaration = 30 + KuneiformParserRULE_procedure_declaration = 31 + KuneiformParserRULE_procedure_return = 32 + KuneiformParserRULE_sql_stmt = 33 + KuneiformParserRULE_ddl_stmt = 34 + KuneiformParserRULE_sql_statement = 35 + KuneiformParserRULE_common_table_expression = 36 + KuneiformParserRULE_create_table_statement = 37 + KuneiformParserRULE_table_constraint_def = 38 + KuneiformParserRULE_opt_drop_behavior = 39 + KuneiformParserRULE_drop_table_statement = 40 + KuneiformParserRULE_alter_table_statement = 41 + KuneiformParserRULE_alter_table_action = 42 + KuneiformParserRULE_create_index_statement = 43 + KuneiformParserRULE_drop_index_statement = 44 + KuneiformParserRULE_select_statement = 45 + KuneiformParserRULE_compound_operator = 46 + KuneiformParserRULE_ordering_term = 47 + KuneiformParserRULE_select_core = 48 + KuneiformParserRULE_relation = 49 + KuneiformParserRULE_join = 50 + KuneiformParserRULE_result_column = 51 + KuneiformParserRULE_update_statement = 52 + KuneiformParserRULE_update_set_clause = 53 + KuneiformParserRULE_insert_statement = 54 + KuneiformParserRULE_upsert_clause = 55 + KuneiformParserRULE_delete_statement = 56 + KuneiformParserRULE_sql_expr = 57 + KuneiformParserRULE_window = 58 + KuneiformParserRULE_when_then_clause = 59 + KuneiformParserRULE_sql_expr_list = 60 + KuneiformParserRULE_sql_function_call = 61 + KuneiformParserRULE_action_block = 62 + KuneiformParserRULE_action_statement = 63 + KuneiformParserRULE_procedure_block = 64 + KuneiformParserRULE_procedure_expr = 65 + KuneiformParserRULE_procedure_expr_list = 66 + KuneiformParserRULE_proc_statement = 67 + KuneiformParserRULE_variable_or_underscore = 68 + KuneiformParserRULE_procedure_function_call = 69 + KuneiformParserRULE_if_then_block = 70 + KuneiformParserRULE_range = 71 ) // ISchema_entryContext is an interface to support dynamic dispatch. @@ -985,11 +1138,11 @@ func (p *KuneiformParser) Schema_entry() (localctx ISchema_entryContext) { p.EnterRule(localctx, 0, KuneiformParserRULE_schema_entry) p.EnterOuterAlt(localctx, 1) { - p.SetState(116) + p.SetState(144) p.Schema() } { - p.SetState(117) + p.SetState(145) p.Match(KuneiformParserEOF) if p.HasError() { // Recognition error - abort rule @@ -1018,7 +1171,7 @@ type ISql_entryContext interface { GetParser() antlr.Parser // Getter signatures - Sql() ISqlContext + Sql_stmt() ISql_stmtContext EOF() antlr.TerminalNode // IsSql_entryContext differentiates from other interfaces. @@ -1057,10 +1210,10 @@ func NewSql_entryContext(parser antlr.Parser, parent antlr.ParserRuleContext, in func (s *Sql_entryContext) GetParser() antlr.Parser { return s.parser } -func (s *Sql_entryContext) Sql() ISqlContext { +func (s *Sql_entryContext) Sql_stmt() ISql_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISqlContext); ok { + if _, ok := ctx.(ISql_stmtContext); ok { t = ctx.(antlr.RuleContext) break } @@ -1070,7 +1223,7 @@ func (s *Sql_entryContext) Sql() ISqlContext { return nil } - return t.(ISqlContext) + return t.(ISql_stmtContext) } func (s *Sql_entryContext) EOF() antlr.TerminalNode { @@ -1100,11 +1253,11 @@ func (p *KuneiformParser) Sql_entry() (localctx ISql_entryContext) { p.EnterRule(localctx, 2, KuneiformParserRULE_sql_entry) p.EnterOuterAlt(localctx, 1) { - p.SetState(119) - p.Sql() + p.SetState(147) + p.Sql_stmt() } { - p.SetState(120) + p.SetState(148) p.Match(KuneiformParserEOF) if p.HasError() { // Recognition error - abort rule @@ -1215,11 +1368,11 @@ func (p *KuneiformParser) Action_entry() (localctx IAction_entryContext) { p.EnterRule(localctx, 4, KuneiformParserRULE_action_entry) p.EnterOuterAlt(localctx, 1) { - p.SetState(122) + p.SetState(150) p.Action_block() } { - p.SetState(123) + p.SetState(151) p.Match(KuneiformParserEOF) if p.HasError() { // Recognition error - abort rule @@ -1330,11 +1483,11 @@ func (p *KuneiformParser) Procedure_entry() (localctx IProcedure_entryContext) { p.EnterRule(localctx, 6, KuneiformParserRULE_procedure_entry) p.EnterOuterAlt(localctx, 1) { - p.SetState(125) + p.SetState(153) p.Procedure_block() } { - p.SetState(126) + p.SetState(154) p.Match(KuneiformParserEOF) if p.HasError() { // Recognition error - abort rule @@ -1634,7 +1787,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { p.EnterRule(localctx, 8, KuneiformParserRULE_literal) var _la int - p.SetState(142) + p.SetState(170) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -1645,7 +1798,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { localctx = NewString_literalContext(p, localctx) p.EnterOuterAlt(localctx, 1) { - p.SetState(128) + p.SetState(156) p.Match(KuneiformParserSTRING_) if p.HasError() { // Recognition error - abort rule @@ -1656,7 +1809,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { case 2: localctx = NewInteger_literalContext(p, localctx) p.EnterOuterAlt(localctx, 2) - p.SetState(130) + p.SetState(158) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -1665,7 +1818,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { if _la == KuneiformParserPLUS || _la == KuneiformParserMINUS { { - p.SetState(129) + p.SetState(157) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserPLUS || _la == KuneiformParserMINUS) { @@ -1678,7 +1831,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { } { - p.SetState(132) + p.SetState(160) p.Match(KuneiformParserDIGITS_) if p.HasError() { // Recognition error - abort rule @@ -1689,7 +1842,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { case 3: localctx = NewDecimal_literalContext(p, localctx) p.EnterOuterAlt(localctx, 3) - p.SetState(134) + p.SetState(162) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -1698,7 +1851,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { if _la == KuneiformParserPLUS || _la == KuneiformParserMINUS { { - p.SetState(133) + p.SetState(161) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserPLUS || _la == KuneiformParserMINUS) { @@ -1711,7 +1864,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { } { - p.SetState(136) + p.SetState(164) p.Match(KuneiformParserDIGITS_) if p.HasError() { // Recognition error - abort rule @@ -1719,7 +1872,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { } } { - p.SetState(137) + p.SetState(165) p.Match(KuneiformParserPERIOD) if p.HasError() { // Recognition error - abort rule @@ -1727,7 +1880,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { } } { - p.SetState(138) + p.SetState(166) p.Match(KuneiformParserDIGITS_) if p.HasError() { // Recognition error - abort rule @@ -1739,7 +1892,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { localctx = NewBoolean_literalContext(p, localctx) p.EnterOuterAlt(localctx, 4) { - p.SetState(139) + p.SetState(167) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserTRUE || _la == KuneiformParserFALSE) { @@ -1754,7 +1907,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { localctx = NewNull_literalContext(p, localctx) p.EnterOuterAlt(localctx, 5) { - p.SetState(140) + p.SetState(168) p.Match(KuneiformParserNULL) if p.HasError() { // Recognition error - abort rule @@ -1766,7 +1919,7 @@ func (p *KuneiformParser) Literal() (localctx ILiteralContext) { localctx = NewBinary_literalContext(p, localctx) p.EnterOuterAlt(localctx, 6) { - p.SetState(141) + p.SetState(169) p.Match(KuneiformParserBINARY_) if p.HasError() { // Recognition error - abort rule @@ -1872,7 +2025,7 @@ func (s *IdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Identifier() (localctx IIdentifierContext) { localctx = NewIdentifierContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 10, KuneiformParserRULE_identifier) - p.SetState(148) + p.SetState(176) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -1882,7 +2035,7 @@ func (p *KuneiformParser) Identifier() (localctx IIdentifierContext) { case KuneiformParserDOUBLE_QUOTE: p.EnterOuterAlt(localctx, 1) { - p.SetState(144) + p.SetState(172) p.Match(KuneiformParserDOUBLE_QUOTE) if p.HasError() { // Recognition error - abort rule @@ -1890,7 +2043,7 @@ func (p *KuneiformParser) Identifier() (localctx IIdentifierContext) { } } { - p.SetState(145) + p.SetState(173) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -1898,7 +2051,7 @@ func (p *KuneiformParser) Identifier() (localctx IIdentifierContext) { } } { - p.SetState(146) + p.SetState(174) p.Match(KuneiformParserDOUBLE_QUOTE) if p.HasError() { // Recognition error - abort rule @@ -1909,7 +2062,7 @@ func (p *KuneiformParser) Identifier() (localctx IIdentifierContext) { case KuneiformParserIDENTIFIER: p.EnterOuterAlt(localctx, 2) { - p.SetState(147) + p.SetState(175) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -2058,10 +2211,10 @@ func (p *KuneiformParser) Identifier_list() (localctx IIdentifier_listContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(150) + p.SetState(178) p.Identifier() } - p.SetState(155) + p.SetState(183) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2070,7 +2223,7 @@ func (p *KuneiformParser) Identifier_list() (localctx IIdentifier_listContext) { for _la == KuneiformParserCOMMA { { - p.SetState(151) + p.SetState(179) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -2078,11 +2231,11 @@ func (p *KuneiformParser) Identifier_list() (localctx IIdentifier_listContext) { } } { - p.SetState(152) + p.SetState(180) p.Identifier() } - p.SetState(157) + p.SetState(185) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2211,19 +2364,19 @@ func (p *KuneiformParser) Type_() (localctx ITypeContext) { p.EnterRule(localctx, 14, KuneiformParserRULE_type) p.EnterOuterAlt(localctx, 1) { - p.SetState(158) + p.SetState(186) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(164) + p.SetState(192) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 5, p.GetParserRuleContext()) == 1 { { - p.SetState(159) + p.SetState(187) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -2231,7 +2384,7 @@ func (p *KuneiformParser) Type_() (localctx ITypeContext) { } } { - p.SetState(160) + p.SetState(188) p.Match(KuneiformParserDIGITS_) if p.HasError() { // Recognition error - abort rule @@ -2239,7 +2392,7 @@ func (p *KuneiformParser) Type_() (localctx ITypeContext) { } } { - p.SetState(161) + p.SetState(189) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -2247,7 +2400,7 @@ func (p *KuneiformParser) Type_() (localctx ITypeContext) { } } { - p.SetState(162) + p.SetState(190) p.Match(KuneiformParserDIGITS_) if p.HasError() { // Recognition error - abort rule @@ -2255,7 +2408,7 @@ func (p *KuneiformParser) Type_() (localctx ITypeContext) { } } { - p.SetState(163) + p.SetState(191) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -2266,12 +2419,12 @@ func (p *KuneiformParser) Type_() (localctx ITypeContext) { } else if p.HasError() { // JIM goto errorExit } - p.SetState(168) + p.SetState(196) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 6, p.GetParserRuleContext()) == 1 { { - p.SetState(166) + p.SetState(194) p.Match(KuneiformParserLBRACKET) if p.HasError() { // Recognition error - abort rule @@ -2279,7 +2432,7 @@ func (p *KuneiformParser) Type_() (localctx ITypeContext) { } } { - p.SetState(167) + p.SetState(195) p.Match(KuneiformParserRBRACKET) if p.HasError() { // Recognition error - abort rule @@ -2394,7 +2547,7 @@ func (p *KuneiformParser) Type_cast() (localctx IType_castContext) { p.EnterRule(localctx, 16, KuneiformParserRULE_type_cast) p.EnterOuterAlt(localctx, 1) { - p.SetState(170) + p.SetState(198) p.Match(KuneiformParserTYPE_CAST) if p.HasError() { // Recognition error - abort rule @@ -2402,7 +2555,7 @@ func (p *KuneiformParser) Type_cast() (localctx IType_castContext) { } } { - p.SetState(171) + p.SetState(199) p.Type_() } @@ -2499,7 +2652,7 @@ func (p *KuneiformParser) Variable() (localctx IVariableContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(173) + p.SetState(201) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserVARIABLE || _la == KuneiformParserCONTEXTUAL_VARIABLE) { @@ -2646,10 +2799,10 @@ func (p *KuneiformParser) Variable_list() (localctx IVariable_listContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(175) + p.SetState(203) p.Variable() } - p.SetState(180) + p.SetState(208) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2658,7 +2811,7 @@ func (p *KuneiformParser) Variable_list() (localctx IVariable_listContext) { for _la == KuneiformParserCOMMA { { - p.SetState(176) + p.SetState(204) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -2666,11 +2819,11 @@ func (p *KuneiformParser) Variable_list() (localctx IVariable_listContext) { } } { - p.SetState(177) + p.SetState(205) p.Variable() } - p.SetState(182) + p.SetState(210) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2950,10 +3103,10 @@ func (p *KuneiformParser) Schema() (localctx ISchemaContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(183) + p.SetState(211) p.Database_declaration() } - p.SetState(190) + p.SetState(218) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2961,7 +3114,7 @@ func (p *KuneiformParser) Schema() (localctx ISchemaContext) { _la = p.GetTokenStream().LA(1) for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&257698037760) != 0) || _la == KuneiformParserCONTEXTUAL_VARIABLE { - p.SetState(188) + p.SetState(216) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2970,25 +3123,25 @@ func (p *KuneiformParser) Schema() (localctx ISchemaContext) { switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) { case 1: { - p.SetState(184) + p.SetState(212) p.Use_declaration() } case 2: { - p.SetState(185) + p.SetState(213) p.Table_declaration() } case 3: { - p.SetState(186) + p.SetState(214) p.Action_declaration() } case 4: { - p.SetState(187) + p.SetState(215) p.Procedure_declaration() } @@ -2996,7 +3149,7 @@ func (p *KuneiformParser) Schema() (localctx ISchemaContext) { goto errorExit } - p.SetState(192) + p.SetState(220) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3175,7 +3328,7 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(193) + p.SetState(221) p.Match(KuneiformParserCONTEXTUAL_VARIABLE) if p.HasError() { // Recognition error - abort rule @@ -3183,14 +3336,14 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { } } { - p.SetState(194) + p.SetState(222) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(207) + p.SetState(235) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3199,7 +3352,7 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { if _la == KuneiformParserIDENTIFIER { { - p.SetState(195) + p.SetState(223) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -3207,7 +3360,7 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { } } { - p.SetState(196) + p.SetState(224) p.Match(KuneiformParserEQUALS) if p.HasError() { // Recognition error - abort rule @@ -3215,10 +3368,10 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { } } { - p.SetState(197) + p.SetState(225) p.Literal() } - p.SetState(204) + p.SetState(232) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3227,7 +3380,7 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { for _la == KuneiformParserCOMMA { { - p.SetState(198) + p.SetState(226) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -3235,7 +3388,7 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { } } { - p.SetState(199) + p.SetState(227) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -3243,7 +3396,7 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { } } { - p.SetState(200) + p.SetState(228) p.Match(KuneiformParserEQUALS) if p.HasError() { // Recognition error - abort rule @@ -3251,11 +3404,11 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { } } { - p.SetState(201) + p.SetState(229) p.Literal() } - p.SetState(206) + p.SetState(234) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3265,7 +3418,7 @@ func (p *KuneiformParser) Annotation() (localctx IAnnotationContext) { } { - p.SetState(209) + p.SetState(237) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -3369,7 +3522,7 @@ func (p *KuneiformParser) Database_declaration() (localctx IDatabase_declaration p.EnterRule(localctx, 26, KuneiformParserRULE_database_declaration) p.EnterOuterAlt(localctx, 1) { - p.SetState(211) + p.SetState(239) p.Match(KuneiformParserDATABASE) if p.HasError() { // Recognition error - abort rule @@ -3377,7 +3530,7 @@ func (p *KuneiformParser) Database_declaration() (localctx IDatabase_declaration } } { - p.SetState(212) + p.SetState(240) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -3385,7 +3538,7 @@ func (p *KuneiformParser) Database_declaration() (localctx IDatabase_declaration } } { - p.SetState(213) + p.SetState(241) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -3574,7 +3727,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(215) + p.SetState(243) p.Match(KuneiformParserUSE) if p.HasError() { // Recognition error - abort rule @@ -3582,14 +3735,14 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(216) + p.SetState(244) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(232) + p.SetState(260) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3598,7 +3751,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { if _la == KuneiformParserLBRACE { { - p.SetState(217) + p.SetState(245) p.Match(KuneiformParserLBRACE) if p.HasError() { // Recognition error - abort rule @@ -3606,7 +3759,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(218) + p.SetState(246) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -3614,7 +3767,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(219) + p.SetState(247) p.Match(KuneiformParserCOL) if p.HasError() { // Recognition error - abort rule @@ -3622,10 +3775,10 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(220) + p.SetState(248) p.Literal() } - p.SetState(227) + p.SetState(255) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3634,7 +3787,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { for _la == KuneiformParserCOMMA { { - p.SetState(221) + p.SetState(249) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -3642,7 +3795,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(222) + p.SetState(250) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -3650,7 +3803,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(223) + p.SetState(251) p.Match(KuneiformParserCOL) if p.HasError() { // Recognition error - abort rule @@ -3658,11 +3811,11 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(224) + p.SetState(252) p.Literal() } - p.SetState(229) + p.SetState(257) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3670,7 +3823,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { _la = p.GetTokenStream().LA(1) } { - p.SetState(230) + p.SetState(258) p.Match(KuneiformParserRBRACE) if p.HasError() { // Recognition error - abort rule @@ -3680,7 +3833,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } { - p.SetState(234) + p.SetState(262) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -3688,7 +3841,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(235) + p.SetState(263) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -3696,7 +3849,7 @@ func (p *KuneiformParser) Use_declaration() (localctx IUse_declarationContext) { } } { - p.SetState(236) + p.SetState(264) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -3946,7 +4099,7 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex p.EnterOuterAlt(localctx, 1) { - p.SetState(238) + p.SetState(266) p.Match(KuneiformParserTABLE) if p.HasError() { // Recognition error - abort rule @@ -3954,7 +4107,7 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex } } { - p.SetState(239) + p.SetState(267) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -3962,7 +4115,7 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex } } { - p.SetState(240) + p.SetState(268) p.Match(KuneiformParserLBRACE) if p.HasError() { // Recognition error - abort rule @@ -3970,10 +4123,10 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex } } { - p.SetState(241) + p.SetState(269) p.Column_def() } - p.SetState(250) + p.SetState(278) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3982,14 +4135,14 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex for _la == KuneiformParserCOMMA { { - p.SetState(242) + p.SetState(270) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(246) + p.SetState(274) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3998,19 +4151,19 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex switch p.GetTokenStream().LA(1) { case KuneiformParserIDENTIFIER: { - p.SetState(243) + p.SetState(271) p.Column_def() } case KuneiformParserHASH_IDENTIFIER: { - p.SetState(244) + p.SetState(272) p.Index_def() } case KuneiformParserFOREIGN, KuneiformParserLEGACY_FOREIGN_KEY: { - p.SetState(245) + p.SetState(273) p.Foreign_key_def() } @@ -4019,7 +4172,7 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex goto errorExit } - p.SetState(252) + p.SetState(280) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4027,7 +4180,7 @@ func (p *KuneiformParser) Table_declaration() (localctx ITable_declarationContex _la = p.GetTokenStream().LA(1) } { - p.SetState(253) + p.SetState(281) p.Match(KuneiformParserRBRACE) if p.HasError() { // Recognition error - abort rule @@ -4194,7 +4347,7 @@ func (p *KuneiformParser) Column_def() (localctx IColumn_defContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(255) + p.SetState(283) var _m = p.Match(KuneiformParserIDENTIFIER) @@ -4205,23 +4358,217 @@ func (p *KuneiformParser) Column_def() (localctx IColumn_defContext) { } } { - p.SetState(256) + p.SetState(284) p.Type_() } - p.SetState(260) + p.SetState(288) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&146516521470918656) != 0) || _la == KuneiformParserIDENTIFIER { + for ((int64((_la-52)) & ^0x3f) == 0 && ((int64(1)<<(_la-52))&16657) != 0) || _la == KuneiformParserIDENTIFIER { { - p.SetState(257) + p.SetState(285) p.Constraint() } - p.SetState(262) + p.SetState(290) + 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 +} + +// ITable_column_defContext is an interface to support dynamic dispatch. +type ITable_column_defContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetName returns the name token. + GetName() antlr.Token + + // SetName sets the name token. + SetName(antlr.Token) + + // Getter signatures + Type_() ITypeContext + IDENTIFIER() antlr.TerminalNode + AllInline_constraint() []IInline_constraintContext + Inline_constraint(i int) IInline_constraintContext + + // IsTable_column_defContext differentiates from other interfaces. + IsTable_column_defContext() +} + +type Table_column_defContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + name antlr.Token +} + +func NewEmptyTable_column_defContext() *Table_column_defContext { + var p = new(Table_column_defContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_table_column_def + return p +} + +func InitEmptyTable_column_defContext(p *Table_column_defContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_table_column_def +} + +func (*Table_column_defContext) IsTable_column_defContext() {} + +func NewTable_column_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_column_defContext { + var p = new(Table_column_defContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_table_column_def + + return p +} + +func (s *Table_column_defContext) GetParser() antlr.Parser { return s.parser } + +func (s *Table_column_defContext) GetName() antlr.Token { return s.name } + +func (s *Table_column_defContext) SetName(v antlr.Token) { s.name = v } + +func (s *Table_column_defContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *Table_column_defContext) IDENTIFIER() antlr.TerminalNode { + return s.GetToken(KuneiformParserIDENTIFIER, 0) +} + +func (s *Table_column_defContext) AllInline_constraint() []IInline_constraintContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IInline_constraintContext); ok { + len++ + } + } + + tst := make([]IInline_constraintContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IInline_constraintContext); ok { + tst[i] = t.(IInline_constraintContext) + i++ + } + } + + return tst +} + +func (s *Table_column_defContext) Inline_constraint(i int) IInline_constraintContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IInline_constraintContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IInline_constraintContext) +} + +func (s *Table_column_defContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Table_column_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Table_column_defContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitTable_column_def(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Table_column_def() (localctx ITable_column_defContext) { + localctx = NewTable_column_defContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 34, KuneiformParserRULE_table_column_def) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(291) + + var _m = p.Match(KuneiformParserIDENTIFIER) + + localctx.(*Table_column_defContext).name = _m + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(292) + p.Type_() + } + p.SetState(296) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for (int64((_la-50)) & ^0x3f) == 0 && ((int64(1)<<(_la-50))&83013) != 0 { + { + p.SetState(293) + p.Inline_constraint() + } + + p.SetState(298) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4365,12 +4712,12 @@ func (s *Index_defContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Index_def() (localctx IIndex_defContext) { localctx = NewIndex_defContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 34, KuneiformParserRULE_index_def) + p.EnterRule(localctx, 36, KuneiformParserRULE_index_def) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(263) + p.SetState(299) p.Match(KuneiformParserHASH_IDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -4378,10 +4725,10 @@ func (p *KuneiformParser) Index_def() (localctx IIndex_defContext) { } } { - p.SetState(264) + p.SetState(300) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&288379909733089280) != 0) { + if !((int64((_la-52)) & ^0x3f) == 0 && ((int64(1)<<(_la-52))&32785) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -4389,7 +4736,7 @@ func (p *KuneiformParser) Index_def() (localctx IIndex_defContext) { } } { - p.SetState(265) + p.SetState(301) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -4397,14 +4744,14 @@ func (p *KuneiformParser) Index_def() (localctx IIndex_defContext) { } } { - p.SetState(266) + p.SetState(302) var _x = p.Identifier_list() localctx.(*Index_defContext).columns = _x } { - p.SetState(267) + p.SetState(303) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -4425,89 +4772,290 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// IForeign_key_defContext is an interface to support dynamic dispatch. -type IForeign_key_defContext interface { +// ITable_index_defContext is an interface to support dynamic dispatch. +type ITable_index_defContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser - // GetParent_table returns the parent_table token. - GetParent_table() antlr.Token - - // SetParent_table sets the parent_table token. - SetParent_table(antlr.Token) - - // GetChild_keys returns the child_keys rule contexts. - GetChild_keys() IIdentifier_listContext - - // GetParent_keys returns the parent_keys rule contexts. - GetParent_keys() IIdentifier_listContext - - // SetChild_keys sets the child_keys rule contexts. - SetChild_keys(IIdentifier_listContext) + // GetColumns returns the columns rule contexts. + GetColumns() IIdentifier_listContext - // SetParent_keys sets the parent_keys rule contexts. - SetParent_keys(IIdentifier_listContext) + // SetColumns sets the columns rule contexts. + SetColumns(IIdentifier_listContext) // Getter signatures - AllLPAREN() []antlr.TerminalNode - LPAREN(i int) antlr.TerminalNode - AllRPAREN() []antlr.TerminalNode - RPAREN(i int) antlr.TerminalNode - AllIdentifier_list() []IIdentifier_listContext - Identifier_list(i int) IIdentifier_listContext - REFERENCES() antlr.TerminalNode - REF() antlr.TerminalNode - IDENTIFIER() antlr.TerminalNode - FOREIGN() antlr.TerminalNode - KEY() antlr.TerminalNode - LEGACY_FOREIGN_KEY() antlr.TerminalNode - AllForeign_key_action() []IForeign_key_actionContext - Foreign_key_action(i int) IForeign_key_actionContext + INDEX() antlr.TerminalNode + Identifier() IIdentifierContext + LPAREN() antlr.TerminalNode + RPAREN() antlr.TerminalNode + Identifier_list() IIdentifier_listContext + UNIQUE() antlr.TerminalNode - // IsForeign_key_defContext differentiates from other interfaces. - IsForeign_key_defContext() + // IsTable_index_defContext differentiates from other interfaces. + IsTable_index_defContext() } -type Foreign_key_defContext struct { +type Table_index_defContext struct { antlr.BaseParserRuleContext - parser antlr.Parser - child_keys IIdentifier_listContext - parent_table antlr.Token - parent_keys IIdentifier_listContext + parser antlr.Parser + columns IIdentifier_listContext } -func NewEmptyForeign_key_defContext() *Foreign_key_defContext { - var p = new(Foreign_key_defContext) +func NewEmptyTable_index_defContext() *Table_index_defContext { + var p = new(Table_index_defContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_foreign_key_def + p.RuleIndex = KuneiformParserRULE_table_index_def return p } -func InitEmptyForeign_key_defContext(p *Foreign_key_defContext) { +func InitEmptyTable_index_defContext(p *Table_index_defContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_foreign_key_def + p.RuleIndex = KuneiformParserRULE_table_index_def } -func (*Foreign_key_defContext) IsForeign_key_defContext() {} +func (*Table_index_defContext) IsTable_index_defContext() {} -func NewForeign_key_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_key_defContext { - var p = new(Foreign_key_defContext) +func NewTable_index_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_index_defContext { + var p = new(Table_index_defContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = KuneiformParserRULE_foreign_key_def + p.RuleIndex = KuneiformParserRULE_table_index_def return p } -func (s *Foreign_key_defContext) GetParser() antlr.Parser { return s.parser } +func (s *Table_index_defContext) GetParser() antlr.Parser { return s.parser } -func (s *Foreign_key_defContext) GetParent_table() antlr.Token { return s.parent_table } +func (s *Table_index_defContext) GetColumns() IIdentifier_listContext { return s.columns } -func (s *Foreign_key_defContext) SetParent_table(v antlr.Token) { s.parent_table = v } +func (s *Table_index_defContext) SetColumns(v IIdentifier_listContext) { s.columns = v } + +func (s *Table_index_defContext) INDEX() antlr.TerminalNode { + return s.GetToken(KuneiformParserINDEX, 0) +} + +func (s *Table_index_defContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Table_index_defContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) +} + +func (s *Table_index_defContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) +} + +func (s *Table_index_defContext) Identifier_list() IIdentifier_listContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifier_listContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifier_listContext) +} + +func (s *Table_index_defContext) UNIQUE() antlr.TerminalNode { + return s.GetToken(KuneiformParserUNIQUE, 0) +} + +func (s *Table_index_defContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Table_index_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Table_index_defContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitTable_index_def(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Table_index_def() (localctx ITable_index_defContext) { + localctx = NewTable_index_defContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 38, KuneiformParserRULE_table_index_def) + var _la int + + p.EnterOuterAlt(localctx, 1) + p.SetState(306) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserUNIQUE { + { + p.SetState(305) + p.Match(KuneiformParserUNIQUE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(308) + p.Match(KuneiformParserINDEX) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(309) + p.Identifier() + } + { + p.SetState(310) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(311) + + var _x = p.Identifier_list() + + localctx.(*Table_index_defContext).columns = _x + } + { + p.SetState(312) + p.Match(KuneiformParserRPAREN) + 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 +} + +// IForeign_key_defContext is an interface to support dynamic dispatch. +type IForeign_key_defContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetParent_table returns the parent_table token. + GetParent_table() antlr.Token + + // SetParent_table sets the parent_table token. + SetParent_table(antlr.Token) + + // GetChild_keys returns the child_keys rule contexts. + GetChild_keys() IIdentifier_listContext + + // GetParent_keys returns the parent_keys rule contexts. + GetParent_keys() IIdentifier_listContext + + // SetChild_keys sets the child_keys rule contexts. + SetChild_keys(IIdentifier_listContext) + + // SetParent_keys sets the parent_keys rule contexts. + SetParent_keys(IIdentifier_listContext) + + // Getter signatures + AllLPAREN() []antlr.TerminalNode + LPAREN(i int) antlr.TerminalNode + AllRPAREN() []antlr.TerminalNode + RPAREN(i int) antlr.TerminalNode + AllIdentifier_list() []IIdentifier_listContext + Identifier_list(i int) IIdentifier_listContext + REFERENCES() antlr.TerminalNode + REF() antlr.TerminalNode + IDENTIFIER() antlr.TerminalNode + FOREIGN() antlr.TerminalNode + KEY() antlr.TerminalNode + LEGACY_FOREIGN_KEY() antlr.TerminalNode + AllForeign_key_action() []IForeign_key_actionContext + Foreign_key_action(i int) IForeign_key_actionContext + + // IsForeign_key_defContext differentiates from other interfaces. + IsForeign_key_defContext() +} + +type Foreign_key_defContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + child_keys IIdentifier_listContext + parent_table antlr.Token + parent_keys IIdentifier_listContext +} + +func NewEmptyForeign_key_defContext() *Foreign_key_defContext { + var p = new(Foreign_key_defContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_foreign_key_def + return p +} + +func InitEmptyForeign_key_defContext(p *Foreign_key_defContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_foreign_key_def +} + +func (*Foreign_key_defContext) IsForeign_key_defContext() {} + +func NewForeign_key_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_key_defContext { + var p = new(Foreign_key_defContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_foreign_key_def + + return p +} + +func (s *Foreign_key_defContext) GetParser() antlr.Parser { return s.parser } + +func (s *Foreign_key_defContext) GetParent_table() antlr.Token { return s.parent_table } + +func (s *Foreign_key_defContext) SetParent_table(v antlr.Token) { s.parent_table = v } func (s *Foreign_key_defContext) GetChild_keys() IIdentifier_listContext { return s.child_keys } @@ -4659,11 +5207,11 @@ func (s *Foreign_key_defContext) Accept(visitor antlr.ParseTreeVisitor) interfac func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { localctx = NewForeign_key_defContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 36, KuneiformParserRULE_foreign_key_def) + p.EnterRule(localctx, 40, KuneiformParserRULE_foreign_key_def) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(272) + p.SetState(317) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4672,7 +5220,7 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { switch p.GetTokenStream().LA(1) { case KuneiformParserFOREIGN: { - p.SetState(269) + p.SetState(314) p.Match(KuneiformParserFOREIGN) if p.HasError() { // Recognition error - abort rule @@ -4680,7 +5228,7 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { } } { - p.SetState(270) + p.SetState(315) p.Match(KuneiformParserKEY) if p.HasError() { // Recognition error - abort rule @@ -4690,7 +5238,7 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { case KuneiformParserLEGACY_FOREIGN_KEY: { - p.SetState(271) + p.SetState(316) p.Match(KuneiformParserLEGACY_FOREIGN_KEY) if p.HasError() { // Recognition error - abort rule @@ -4703,7 +5251,7 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { goto errorExit } { - p.SetState(274) + p.SetState(319) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -4711,14 +5259,14 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { } } { - p.SetState(275) + p.SetState(320) var _x = p.Identifier_list() localctx.(*Foreign_key_defContext).child_keys = _x } { - p.SetState(276) + p.SetState(321) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -4726,7 +5274,7 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { } } { - p.SetState(277) + p.SetState(322) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserREFERENCES || _la == KuneiformParserREF) { @@ -4737,7 +5285,7 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { } } { - p.SetState(278) + p.SetState(323) var _m = p.Match(KuneiformParserIDENTIFIER) @@ -4748,7 +5296,7 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { } } { - p.SetState(279) + p.SetState(324) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -4756,21 +5304,21 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { } } { - p.SetState(280) + p.SetState(325) var _x = p.Identifier_list() localctx.(*Foreign_key_defContext).parent_keys = _x } { - p.SetState(281) + p.SetState(326) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(285) + p.SetState(330) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4779,11 +5327,11 @@ func (p *KuneiformParser) Foreign_key_def() (localctx IForeign_key_defContext) { for _la == KuneiformParserON || _la == KuneiformParserLEGACY_ON_UPDATE || _la == KuneiformParserLEGACY_ON_DELETE { { - p.SetState(282) + p.SetState(327) p.Foreign_key_action() } - p.SetState(287) + p.SetState(332) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4949,19 +5497,19 @@ func (s *Foreign_key_actionContext) Accept(visitor antlr.ParseTreeVisitor) inter func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionContext) { localctx = NewForeign_key_actionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 38, KuneiformParserRULE_foreign_key_action) + p.EnterRule(localctx, 42, KuneiformParserRULE_foreign_key_action) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(298) + p.SetState(343) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 21, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 23, p.GetParserRuleContext()) { case 1: - p.SetState(291) + p.SetState(336) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4970,7 +5518,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont switch p.GetTokenStream().LA(1) { case KuneiformParserON: { - p.SetState(288) + p.SetState(333) p.Match(KuneiformParserON) if p.HasError() { // Recognition error - abort rule @@ -4978,7 +5526,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } } { - p.SetState(289) + p.SetState(334) p.Match(KuneiformParserUPDATE) if p.HasError() { // Recognition error - abort rule @@ -4988,7 +5536,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case KuneiformParserLEGACY_ON_UPDATE: { - p.SetState(290) + p.SetState(335) p.Match(KuneiformParserLEGACY_ON_UPDATE) if p.HasError() { // Recognition error - abort rule @@ -5002,7 +5550,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } case 2: - p.SetState(296) + p.SetState(341) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5011,7 +5559,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont switch p.GetTokenStream().LA(1) { case KuneiformParserON: { - p.SetState(293) + p.SetState(338) p.Match(KuneiformParserON) if p.HasError() { // Recognition error - abort rule @@ -5019,7 +5567,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } } { - p.SetState(294) + p.SetState(339) p.Match(KuneiformParserDELETE) if p.HasError() { // Recognition error - abort rule @@ -5029,7 +5577,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case KuneiformParserLEGACY_ON_DELETE: { - p.SetState(295) + p.SetState(340) p.Match(KuneiformParserLEGACY_ON_DELETE) if p.HasError() { // Recognition error - abort rule @@ -5045,7 +5593,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case antlr.ATNInvalidAltNumber: goto errorExit } - p.SetState(301) + p.SetState(346) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5054,7 +5602,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont if _la == KuneiformParserDO { { - p.SetState(300) + p.SetState(345) p.Match(KuneiformParserDO) if p.HasError() { // Recognition error - abort rule @@ -5063,15 +5611,15 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } } - p.SetState(320) + p.SetState(365) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 28, p.GetParserRuleContext()) { case 1: - p.SetState(306) + p.SetState(351) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5080,7 +5628,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont switch p.GetTokenStream().LA(1) { case KuneiformParserNO: { - p.SetState(303) + p.SetState(348) p.Match(KuneiformParserNO) if p.HasError() { // Recognition error - abort rule @@ -5088,7 +5636,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } } { - p.SetState(304) + p.SetState(349) p.Match(KuneiformParserACTION) if p.HasError() { // Recognition error - abort rule @@ -5098,7 +5646,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case KuneiformParserLEGACY_NO_ACTION: { - p.SetState(305) + p.SetState(350) p.Match(KuneiformParserLEGACY_NO_ACTION) if p.HasError() { // Recognition error - abort rule @@ -5113,7 +5661,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case 2: { - p.SetState(308) + p.SetState(353) p.Match(KuneiformParserCASCADE) if p.HasError() { // Recognition error - abort rule @@ -5122,7 +5670,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } case 3: - p.SetState(312) + p.SetState(357) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5131,7 +5679,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont switch p.GetTokenStream().LA(1) { case KuneiformParserSET: { - p.SetState(309) + p.SetState(354) p.Match(KuneiformParserSET) if p.HasError() { // Recognition error - abort rule @@ -5139,7 +5687,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } } { - p.SetState(310) + p.SetState(355) p.Match(KuneiformParserNULL) if p.HasError() { // Recognition error - abort rule @@ -5149,7 +5697,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case KuneiformParserLEGACY_SET_NULL: { - p.SetState(311) + p.SetState(356) p.Match(KuneiformParserLEGACY_SET_NULL) if p.HasError() { // Recognition error - abort rule @@ -5163,7 +5711,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } case 4: - p.SetState(317) + p.SetState(362) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5172,7 +5720,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont switch p.GetTokenStream().LA(1) { case KuneiformParserSET: { - p.SetState(314) + p.SetState(359) p.Match(KuneiformParserSET) if p.HasError() { // Recognition error - abort rule @@ -5180,7 +5728,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont } } { - p.SetState(315) + p.SetState(360) p.Match(KuneiformParserDEFAULT) if p.HasError() { // Recognition error - abort rule @@ -5190,7 +5738,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case KuneiformParserLEGACY_SET_DEFAULT: { - p.SetState(316) + p.SetState(361) p.Match(KuneiformParserLEGACY_SET_DEFAULT) if p.HasError() { // Recognition error - abort rule @@ -5205,7 +5753,7 @@ func (p *KuneiformParser) Foreign_key_action() (localctx IForeign_key_actionCont case 5: { - p.SetState(319) + p.SetState(364) p.Match(KuneiformParserRESTRICT) if p.HasError() { // Recognition error - abort rule @@ -5348,15 +5896,15 @@ func (s *Type_listContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Type_list() (localctx IType_listContext) { localctx = NewType_listContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 40, KuneiformParserRULE_type_list) + p.EnterRule(localctx, 44, KuneiformParserRULE_type_list) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(322) + p.SetState(367) p.Type_() } - p.SetState(327) + p.SetState(372) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5365,7 +5913,7 @@ func (p *KuneiformParser) Type_list() (localctx IType_listContext) { for _la == KuneiformParserCOMMA { { - p.SetState(323) + p.SetState(368) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -5373,11 +5921,11 @@ func (p *KuneiformParser) Type_list() (localctx IType_listContext) { } } { - p.SetState(324) + p.SetState(369) p.Type_() } - p.SetState(329) + p.SetState(374) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5526,12 +6074,12 @@ func (s *Named_type_listContext) Accept(visitor antlr.ParseTreeVisitor) interfac func (p *KuneiformParser) Named_type_list() (localctx INamed_type_listContext) { localctx = NewNamed_type_listContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 42, KuneiformParserRULE_named_type_list) + p.EnterRule(localctx, 46, KuneiformParserRULE_named_type_list) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(330) + p.SetState(375) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -5539,10 +6087,10 @@ func (p *KuneiformParser) Named_type_list() (localctx INamed_type_listContext) { } } { - p.SetState(331) + p.SetState(376) p.Type_() } - p.SetState(337) + p.SetState(382) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5551,7 +6099,7 @@ func (p *KuneiformParser) Named_type_list() (localctx INamed_type_listContext) { for _la == KuneiformParserCOMMA { { - p.SetState(332) + p.SetState(377) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -5559,7 +6107,7 @@ func (p *KuneiformParser) Named_type_list() (localctx INamed_type_listContext) { } } { - p.SetState(333) + p.SetState(378) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -5567,11 +6115,11 @@ func (p *KuneiformParser) Named_type_list() (localctx INamed_type_listContext) { } } { - p.SetState(334) + p.SetState(379) p.Type_() } - p.SetState(339) + p.SetState(384) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5753,19 +6301,19 @@ func (s *Typed_variable_listContext) Accept(visitor antlr.ParseTreeVisitor) inte func (p *KuneiformParser) Typed_variable_list() (localctx ITyped_variable_listContext) { localctx = NewTyped_variable_listContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 44, KuneiformParserRULE_typed_variable_list) + p.EnterRule(localctx, 48, KuneiformParserRULE_typed_variable_list) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(340) + p.SetState(385) p.Variable() } { - p.SetState(341) + p.SetState(386) p.Type_() } - p.SetState(348) + p.SetState(393) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5774,7 +6322,7 @@ func (p *KuneiformParser) Typed_variable_list() (localctx ITyped_variable_listCo for _la == KuneiformParserCOMMA { { - p.SetState(342) + p.SetState(387) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -5782,15 +6330,15 @@ func (p *KuneiformParser) Typed_variable_list() (localctx ITyped_variable_listCo } } { - p.SetState(343) + p.SetState(388) p.Variable() } { - p.SetState(344) + p.SetState(389) p.Type_() } - p.SetState(350) + p.SetState(395) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5938,11 +6486,11 @@ func (s *ConstraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { localctx = NewConstraintContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 46, KuneiformParserRULE_constraint) + p.EnterRule(localctx, 50, KuneiformParserRULE_constraint) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(360) + p.SetState(405) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5951,7 +6499,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { switch p.GetTokenStream().LA(1) { case KuneiformParserIDENTIFIER: { - p.SetState(351) + p.SetState(396) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -5961,14 +6509,14 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { case KuneiformParserPRIMARY: { - p.SetState(352) + p.SetState(397) p.Match(KuneiformParserPRIMARY) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(354) + p.SetState(399) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5977,7 +6525,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { if _la == KuneiformParserKEY { { - p.SetState(353) + p.SetState(398) p.Match(KuneiformParserKEY) if p.HasError() { // Recognition error - abort rule @@ -5989,7 +6537,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { case KuneiformParserNOT: { - p.SetState(356) + p.SetState(401) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -5997,7 +6545,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { } } { - p.SetState(357) + p.SetState(402) p.Match(KuneiformParserNULL) if p.HasError() { // Recognition error - abort rule @@ -6007,7 +6555,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { case KuneiformParserDEFAULT: { - p.SetState(358) + p.SetState(403) p.Match(KuneiformParserDEFAULT) if p.HasError() { // Recognition error - abort rule @@ -6017,7 +6565,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { case KuneiformParserUNIQUE: { - p.SetState(359) + p.SetState(404) p.Match(KuneiformParserUNIQUE) if p.HasError() { // Recognition error - abort rule @@ -6029,7 +6577,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } - p.SetState(366) + p.SetState(411) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6038,7 +6586,7 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { if _la == KuneiformParserLPAREN { { - p.SetState(362) + p.SetState(407) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -6046,11 +6594,11 @@ func (p *KuneiformParser) Constraint() (localctx IConstraintContext) { } } { - p.SetState(363) + p.SetState(408) p.Literal() } { - p.SetState(364) + p.SetState(409) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -6073,105 +6621,281 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// IAccess_modifierContext is an interface to support dynamic dispatch. -type IAccess_modifierContext interface { +// IInline_constraintContext is an interface to support dynamic dispatch. +type IInline_constraintContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures - PUBLIC() antlr.TerminalNode - PRIVATE() antlr.TerminalNode - VIEW() antlr.TerminalNode - OWNER() antlr.TerminalNode + PRIMARY() antlr.TerminalNode + KEY() antlr.TerminalNode + UNIQUE() antlr.TerminalNode + NOT() antlr.TerminalNode + NULL() antlr.TerminalNode + DEFAULT() antlr.TerminalNode + Literal() ILiteralContext + Fk_constraint() IFk_constraintContext + CHECK() antlr.TerminalNode + LPAREN() antlr.TerminalNode + Sql_expr() ISql_exprContext + RPAREN() antlr.TerminalNode - // IsAccess_modifierContext differentiates from other interfaces. - IsAccess_modifierContext() + // IsInline_constraintContext differentiates from other interfaces. + IsInline_constraintContext() } -type Access_modifierContext struct { +type Inline_constraintContext struct { antlr.BaseParserRuleContext parser antlr.Parser } -func NewEmptyAccess_modifierContext() *Access_modifierContext { - var p = new(Access_modifierContext) +func NewEmptyInline_constraintContext() *Inline_constraintContext { + var p = new(Inline_constraintContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_access_modifier + p.RuleIndex = KuneiformParserRULE_inline_constraint return p } -func InitEmptyAccess_modifierContext(p *Access_modifierContext) { +func InitEmptyInline_constraintContext(p *Inline_constraintContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_access_modifier + p.RuleIndex = KuneiformParserRULE_inline_constraint } -func (*Access_modifierContext) IsAccess_modifierContext() {} +func (*Inline_constraintContext) IsInline_constraintContext() {} -func NewAccess_modifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Access_modifierContext { - var p = new(Access_modifierContext) +func NewInline_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Inline_constraintContext { + var p = new(Inline_constraintContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = KuneiformParserRULE_access_modifier + p.RuleIndex = KuneiformParserRULE_inline_constraint return p } -func (s *Access_modifierContext) GetParser() antlr.Parser { return s.parser } +func (s *Inline_constraintContext) GetParser() antlr.Parser { return s.parser } -func (s *Access_modifierContext) PUBLIC() antlr.TerminalNode { - return s.GetToken(KuneiformParserPUBLIC, 0) +func (s *Inline_constraintContext) PRIMARY() antlr.TerminalNode { + return s.GetToken(KuneiformParserPRIMARY, 0) } -func (s *Access_modifierContext) PRIVATE() antlr.TerminalNode { - return s.GetToken(KuneiformParserPRIVATE, 0) +func (s *Inline_constraintContext) KEY() antlr.TerminalNode { + return s.GetToken(KuneiformParserKEY, 0) } -func (s *Access_modifierContext) VIEW() antlr.TerminalNode { - return s.GetToken(KuneiformParserVIEW, 0) +func (s *Inline_constraintContext) UNIQUE() antlr.TerminalNode { + return s.GetToken(KuneiformParserUNIQUE, 0) } -func (s *Access_modifierContext) OWNER() antlr.TerminalNode { - return s.GetToken(KuneiformParserOWNER, 0) +func (s *Inline_constraintContext) NOT() antlr.TerminalNode { + return s.GetToken(KuneiformParserNOT, 0) } -func (s *Access_modifierContext) GetRuleContext() antlr.RuleContext { +func (s *Inline_constraintContext) NULL() antlr.TerminalNode { + return s.GetToken(KuneiformParserNULL, 0) +} + +func (s *Inline_constraintContext) DEFAULT() antlr.TerminalNode { + return s.GetToken(KuneiformParserDEFAULT, 0) +} + +func (s *Inline_constraintContext) Literal() ILiteralContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ILiteralContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ILiteralContext) +} + +func (s *Inline_constraintContext) Fk_constraint() IFk_constraintContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFk_constraintContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFk_constraintContext) +} + +func (s *Inline_constraintContext) CHECK() antlr.TerminalNode { + return s.GetToken(KuneiformParserCHECK, 0) +} + +func (s *Inline_constraintContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) +} + +func (s *Inline_constraintContext) Sql_expr() ISql_exprContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISql_exprContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISql_exprContext) +} + +func (s *Inline_constraintContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) +} + +func (s *Inline_constraintContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Access_modifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *Inline_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *Access_modifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *Inline_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case KuneiformParserVisitor: - return t.VisitAccess_modifier(s) + return t.VisitInline_constraint(s) default: return t.VisitChildren(s) } } -func (p *KuneiformParser) Access_modifier() (localctx IAccess_modifierContext) { - localctx = NewAccess_modifierContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 48, KuneiformParserRULE_access_modifier) - var _la int +func (p *KuneiformParser) Inline_constraint() (localctx IInline_constraintContext) { + localctx = NewInline_constraintContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 52, KuneiformParserRULE_inline_constraint) + p.SetState(426) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } - p.EnterOuterAlt(localctx, 1) - { - p.SetState(368) - _la = p.GetTokenStream().LA(1) + switch p.GetTokenStream().LA(1) { + case KuneiformParserPRIMARY: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(413) + p.Match(KuneiformParserPRIMARY) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(414) + p.Match(KuneiformParserKEY) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&4123168604160) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() + case KuneiformParserUNIQUE: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(415) + p.Match(KuneiformParserUNIQUE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserNOT: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(416) + p.Match(KuneiformParserNOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(417) + p.Match(KuneiformParserNULL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserDEFAULT: + p.EnterOuterAlt(localctx, 4) + { + p.SetState(418) + p.Match(KuneiformParserDEFAULT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(419) + p.Literal() + } + + case KuneiformParserREFERENCES: + p.EnterOuterAlt(localctx, 5) + { + p.SetState(420) + p.Fk_constraint() + } + + case KuneiformParserCHECK: + p.EnterOuterAlt(localctx, 6) + { + p.SetState(421) + p.Match(KuneiformParserCHECK) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + { + p.SetState(422) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(423) + p.sql_expr(0) + } + { + p.SetState(424) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit } errorExit: @@ -6187,117 +6911,334 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// IAction_declarationContext is an interface to support dynamic dispatch. -type IAction_declarationContext interface { +// IFk_actionContext is an interface to support dynamic dispatch. +type IFk_actionContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures + ON() antlr.TerminalNode + UPDATE() antlr.TerminalNode + DELETE() antlr.TerminalNode + SET() antlr.TerminalNode + NULL() antlr.TerminalNode + DEFAULT() antlr.TerminalNode + RESTRICT() antlr.TerminalNode + NO() antlr.TerminalNode ACTION() antlr.TerminalNode - IDENTIFIER() antlr.TerminalNode - LPAREN() antlr.TerminalNode - RPAREN() antlr.TerminalNode - LBRACE() antlr.TerminalNode - Action_block() IAction_blockContext - RBRACE() antlr.TerminalNode - AllAnnotation() []IAnnotationContext - Annotation(i int) IAnnotationContext - Variable_list() IVariable_listContext - AllAccess_modifier() []IAccess_modifierContext - Access_modifier(i int) IAccess_modifierContext + CASCADE() antlr.TerminalNode - // IsAction_declarationContext differentiates from other interfaces. - IsAction_declarationContext() + // IsFk_actionContext differentiates from other interfaces. + IsFk_actionContext() } -type Action_declarationContext struct { +type Fk_actionContext struct { antlr.BaseParserRuleContext parser antlr.Parser } -func NewEmptyAction_declarationContext() *Action_declarationContext { - var p = new(Action_declarationContext) +func NewEmptyFk_actionContext() *Fk_actionContext { + var p = new(Fk_actionContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_action_declaration + p.RuleIndex = KuneiformParserRULE_fk_action return p } -func InitEmptyAction_declarationContext(p *Action_declarationContext) { +func InitEmptyFk_actionContext(p *Fk_actionContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_action_declaration + p.RuleIndex = KuneiformParserRULE_fk_action } -func (*Action_declarationContext) IsAction_declarationContext() {} +func (*Fk_actionContext) IsFk_actionContext() {} -func NewAction_declarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Action_declarationContext { - var p = new(Action_declarationContext) +func NewFk_actionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Fk_actionContext { + var p = new(Fk_actionContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = KuneiformParserRULE_action_declaration + p.RuleIndex = KuneiformParserRULE_fk_action return p } -func (s *Action_declarationContext) GetParser() antlr.Parser { return s.parser } +func (s *Fk_actionContext) GetParser() antlr.Parser { return s.parser } -func (s *Action_declarationContext) ACTION() antlr.TerminalNode { - return s.GetToken(KuneiformParserACTION, 0) +func (s *Fk_actionContext) ON() antlr.TerminalNode { + return s.GetToken(KuneiformParserON, 0) } -func (s *Action_declarationContext) IDENTIFIER() antlr.TerminalNode { - return s.GetToken(KuneiformParserIDENTIFIER, 0) +func (s *Fk_actionContext) UPDATE() antlr.TerminalNode { + return s.GetToken(KuneiformParserUPDATE, 0) } -func (s *Action_declarationContext) LPAREN() antlr.TerminalNode { - return s.GetToken(KuneiformParserLPAREN, 0) +func (s *Fk_actionContext) DELETE() antlr.TerminalNode { + return s.GetToken(KuneiformParserDELETE, 0) } -func (s *Action_declarationContext) RPAREN() antlr.TerminalNode { - return s.GetToken(KuneiformParserRPAREN, 0) +func (s *Fk_actionContext) SET() antlr.TerminalNode { + return s.GetToken(KuneiformParserSET, 0) } -func (s *Action_declarationContext) LBRACE() antlr.TerminalNode { - return s.GetToken(KuneiformParserLBRACE, 0) +func (s *Fk_actionContext) NULL() antlr.TerminalNode { + return s.GetToken(KuneiformParserNULL, 0) } -func (s *Action_declarationContext) Action_block() IAction_blockContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAction_blockContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } +func (s *Fk_actionContext) DEFAULT() antlr.TerminalNode { + return s.GetToken(KuneiformParserDEFAULT, 0) +} - if t == nil { - return nil - } +func (s *Fk_actionContext) RESTRICT() antlr.TerminalNode { + return s.GetToken(KuneiformParserRESTRICT, 0) +} - return t.(IAction_blockContext) +func (s *Fk_actionContext) NO() antlr.TerminalNode { + return s.GetToken(KuneiformParserNO, 0) } -func (s *Action_declarationContext) RBRACE() antlr.TerminalNode { - return s.GetToken(KuneiformParserRBRACE, 0) +func (s *Fk_actionContext) ACTION() antlr.TerminalNode { + return s.GetToken(KuneiformParserACTION, 0) } -func (s *Action_declarationContext) AllAnnotation() []IAnnotationContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IAnnotationContext); ok { - len++ - } - } +func (s *Fk_actionContext) CASCADE() antlr.TerminalNode { + return s.GetToken(KuneiformParserCASCADE, 0) +} - tst := make([]IAnnotationContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IAnnotationContext); ok { - tst[i] = t.(IAnnotationContext) +func (s *Fk_actionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Fk_actionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Fk_actionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitFk_action(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Fk_action() (localctx IFk_actionContext) { + localctx = NewFk_actionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 54, KuneiformParserRULE_fk_action) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(428) + p.Match(KuneiformParserON) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(429) + _la = p.GetTokenStream().LA(1) + + if !(_la == KuneiformParserDELETE || _la == KuneiformParserUPDATE) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + p.SetState(438) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext()) { + case 1: + { + p.SetState(430) + p.Match(KuneiformParserSET) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(431) + p.Match(KuneiformParserNULL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + { + p.SetState(432) + p.Match(KuneiformParserSET) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(433) + p.Match(KuneiformParserDEFAULT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + { + p.SetState(434) + p.Match(KuneiformParserRESTRICT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 4: + { + p.SetState(435) + p.Match(KuneiformParserNO) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(436) + p.Match(KuneiformParserACTION) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 5: + { + p.SetState(437) + p.Match(KuneiformParserCASCADE) + 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 +} + +// IFk_constraintContext is an interface to support dynamic dispatch. +type IFk_constraintContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetTable returns the table rule contexts. + GetTable() IIdentifierContext + + // GetColumn returns the column rule contexts. + GetColumn() IIdentifierContext + + // SetTable sets the table rule contexts. + SetTable(IIdentifierContext) + + // SetColumn sets the column rule contexts. + SetColumn(IIdentifierContext) + + // Getter signatures + REFERENCES() antlr.TerminalNode + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + LPAREN() antlr.TerminalNode + RPAREN() antlr.TerminalNode + AllFk_action() []IFk_actionContext + Fk_action(i int) IFk_actionContext + + // IsFk_constraintContext differentiates from other interfaces. + IsFk_constraintContext() +} + +type Fk_constraintContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + table IIdentifierContext + column IIdentifierContext +} + +func NewEmptyFk_constraintContext() *Fk_constraintContext { + var p = new(Fk_constraintContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_fk_constraint + return p +} + +func InitEmptyFk_constraintContext(p *Fk_constraintContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_fk_constraint +} + +func (*Fk_constraintContext) IsFk_constraintContext() {} + +func NewFk_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Fk_constraintContext { + var p = new(Fk_constraintContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_fk_constraint + + return p +} + +func (s *Fk_constraintContext) GetParser() antlr.Parser { return s.parser } + +func (s *Fk_constraintContext) GetTable() IIdentifierContext { return s.table } + +func (s *Fk_constraintContext) GetColumn() IIdentifierContext { return s.column } + +func (s *Fk_constraintContext) SetTable(v IIdentifierContext) { s.table = v } + +func (s *Fk_constraintContext) SetColumn(v IIdentifierContext) { s.column = v } + +func (s *Fk_constraintContext) REFERENCES() antlr.TerminalNode { + return s.GetToken(KuneiformParserREFERENCES, 0) +} + +func (s *Fk_constraintContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) i++ } } @@ -6305,11 +7246,11 @@ func (s *Action_declarationContext) AllAnnotation() []IAnnotationContext { return tst } -func (s *Action_declarationContext) Annotation(i int) IAnnotationContext { +func (s *Fk_constraintContext) Identifier(i int) IIdentifierContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAnnotationContext); ok { + if _, ok := ctx.(IIdentifierContext); ok { if j == i { t = ctx.(antlr.RuleContext) break @@ -6322,39 +7263,31 @@ func (s *Action_declarationContext) Annotation(i int) IAnnotationContext { return nil } - return t.(IAnnotationContext) + return t.(IIdentifierContext) } -func (s *Action_declarationContext) Variable_list() IVariable_listContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IVariable_listContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } +func (s *Fk_constraintContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) +} - return t.(IVariable_listContext) +func (s *Fk_constraintContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) } -func (s *Action_declarationContext) AllAccess_modifier() []IAccess_modifierContext { +func (s *Fk_constraintContext) AllFk_action() []IFk_actionContext { children := s.GetChildren() len := 0 for _, ctx := range children { - if _, ok := ctx.(IAccess_modifierContext); ok { + if _, ok := ctx.(IFk_actionContext); ok { len++ } } - tst := make([]IAccess_modifierContext, len) + tst := make([]IFk_actionContext, len) i := 0 for _, ctx := range children { - if t, ok := ctx.(IAccess_modifierContext); ok { - tst[i] = t.(IAccess_modifierContext) + if t, ok := ctx.(IFk_actionContext); ok { + tst[i] = t.(IFk_actionContext) i++ } } @@ -6362,11 +7295,11 @@ func (s *Action_declarationContext) AllAccess_modifier() []IAccess_modifierConte return tst } -func (s *Action_declarationContext) Access_modifier(i int) IAccess_modifierContext { +func (s *Fk_constraintContext) Fk_action(i int) IFk_actionContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAccess_modifierContext); ok { + if _, ok := ctx.(IFk_actionContext); ok { if j == i { t = ctx.(antlr.RuleContext) break @@ -6379,137 +7312,213 @@ func (s *Action_declarationContext) Access_modifier(i int) IAccess_modifierConte return nil } - return t.(IAccess_modifierContext) + return t.(IFk_actionContext) } -func (s *Action_declarationContext) GetRuleContext() antlr.RuleContext { +func (s *Fk_constraintContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Action_declarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *Fk_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *Action_declarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *Fk_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case KuneiformParserVisitor: - return t.VisitAction_declaration(s) + return t.VisitFk_constraint(s) default: return t.VisitChildren(s) } } -func (p *KuneiformParser) Action_declaration() (localctx IAction_declarationContext) { - localctx = NewAction_declarationContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 50, KuneiformParserRULE_action_declaration) +func (p *KuneiformParser) Fk_constraint() (localctx IFk_constraintContext) { + localctx = NewFk_constraintContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 56, KuneiformParserRULE_fk_constraint) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(373) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == KuneiformParserCONTEXTUAL_VARIABLE { - { - p.SetState(370) - p.Annotation() - } - - p.SetState(375) - p.GetErrorHandler().Sync(p) + { + p.SetState(440) + p.Match(KuneiformParserREFERENCES) if p.HasError() { + // Recognition error - abort rule goto errorExit } - _la = p.GetTokenStream().LA(1) } { - p.SetState(376) - p.Match(KuneiformParserACTION) + p.SetState(441) + + var _x = p.Identifier() + + localctx.(*Fk_constraintContext).table = _x + } + + { + p.SetState(442) + p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { - p.SetState(377) - p.Match(KuneiformParserIDENTIFIER) + p.SetState(443) + + var _x = p.Identifier() + + localctx.(*Fk_constraintContext).column = _x + } + { + p.SetState(444) + p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - { - p.SetState(378) - p.Match(KuneiformParserLPAREN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(380) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == KuneiformParserVARIABLE || _la == KuneiformParserCONTEXTUAL_VARIABLE { - { - p.SetState(379) - p.Variable_list() - } - } - { - p.SetState(382) - p.Match(KuneiformParserRPAREN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(384) + p.SetState(450) 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)&4123168604160) != 0) { + if _la == KuneiformParserON { { - p.SetState(383) - p.Access_modifier() + p.SetState(446) + p.Fk_action() } - - p.SetState(386) + p.SetState(448) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - } - { - p.SetState(388) - p.Match(KuneiformParserLBRACE) - if p.HasError() { - // Recognition error - abort rule - goto errorExit + + if _la == KuneiformParserON { + { + p.SetState(447) + p.Fk_action() + } + } + } - { - p.SetState(389) - p.Action_block() + +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 +} + +// IAccess_modifierContext is an interface to support dynamic dispatch. +type IAccess_modifierContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + PUBLIC() antlr.TerminalNode + PRIVATE() antlr.TerminalNode + VIEW() antlr.TerminalNode + OWNER() antlr.TerminalNode + + // IsAccess_modifierContext differentiates from other interfaces. + IsAccess_modifierContext() +} + +type Access_modifierContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyAccess_modifierContext() *Access_modifierContext { + var p = new(Access_modifierContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_access_modifier + return p +} + +func InitEmptyAccess_modifierContext(p *Access_modifierContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_access_modifier +} + +func (*Access_modifierContext) IsAccess_modifierContext() {} + +func NewAccess_modifierContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Access_modifierContext { + var p = new(Access_modifierContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_access_modifier + + return p +} + +func (s *Access_modifierContext) GetParser() antlr.Parser { return s.parser } + +func (s *Access_modifierContext) PUBLIC() antlr.TerminalNode { + return s.GetToken(KuneiformParserPUBLIC, 0) +} + +func (s *Access_modifierContext) PRIVATE() antlr.TerminalNode { + return s.GetToken(KuneiformParserPRIVATE, 0) +} + +func (s *Access_modifierContext) VIEW() antlr.TerminalNode { + return s.GetToken(KuneiformParserVIEW, 0) +} + +func (s *Access_modifierContext) OWNER() antlr.TerminalNode { + return s.GetToken(KuneiformParserOWNER, 0) +} + +func (s *Access_modifierContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Access_modifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Access_modifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitAccess_modifier(s) + + default: + return t.VisitChildren(s) } +} + +func (p *KuneiformParser) Access_modifier() (localctx IAccess_modifierContext) { + localctx = NewAccess_modifierContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 58, KuneiformParserRULE_access_modifier) + var _la int + + p.EnterOuterAlt(localctx, 1) { - p.SetState(390) - p.Match(KuneiformParserRBRACE) - if p.HasError() { - // Recognition error - abort rule - goto errorExit + p.SetState(452) + _la = p.GetTokenStream().LA(1) + + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&4123168604160) != 0) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() } } @@ -6526,88 +7535,87 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// IProcedure_declarationContext is an interface to support dynamic dispatch. -type IProcedure_declarationContext interface { +// IAction_declarationContext is an interface to support dynamic dispatch. +type IAction_declarationContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures - PROCEDURE() antlr.TerminalNode + ACTION() antlr.TerminalNode IDENTIFIER() antlr.TerminalNode LPAREN() antlr.TerminalNode RPAREN() antlr.TerminalNode LBRACE() antlr.TerminalNode - Procedure_block() IProcedure_blockContext + Action_block() IAction_blockContext RBRACE() antlr.TerminalNode AllAnnotation() []IAnnotationContext Annotation(i int) IAnnotationContext - Typed_variable_list() ITyped_variable_listContext + Variable_list() IVariable_listContext AllAccess_modifier() []IAccess_modifierContext Access_modifier(i int) IAccess_modifierContext - Procedure_return() IProcedure_returnContext - // IsProcedure_declarationContext differentiates from other interfaces. - IsProcedure_declarationContext() + // IsAction_declarationContext differentiates from other interfaces. + IsAction_declarationContext() } -type Procedure_declarationContext struct { +type Action_declarationContext struct { antlr.BaseParserRuleContext parser antlr.Parser } -func NewEmptyProcedure_declarationContext() *Procedure_declarationContext { - var p = new(Procedure_declarationContext) +func NewEmptyAction_declarationContext() *Action_declarationContext { + var p = new(Action_declarationContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_procedure_declaration + p.RuleIndex = KuneiformParserRULE_action_declaration return p } -func InitEmptyProcedure_declarationContext(p *Procedure_declarationContext) { +func InitEmptyAction_declarationContext(p *Action_declarationContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_procedure_declaration + p.RuleIndex = KuneiformParserRULE_action_declaration } -func (*Procedure_declarationContext) IsProcedure_declarationContext() {} +func (*Action_declarationContext) IsAction_declarationContext() {} -func NewProcedure_declarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Procedure_declarationContext { - var p = new(Procedure_declarationContext) +func NewAction_declarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Action_declarationContext { + var p = new(Action_declarationContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = KuneiformParserRULE_procedure_declaration + p.RuleIndex = KuneiformParserRULE_action_declaration return p } -func (s *Procedure_declarationContext) GetParser() antlr.Parser { return s.parser } +func (s *Action_declarationContext) GetParser() antlr.Parser { return s.parser } -func (s *Procedure_declarationContext) PROCEDURE() antlr.TerminalNode { - return s.GetToken(KuneiformParserPROCEDURE, 0) +func (s *Action_declarationContext) ACTION() antlr.TerminalNode { + return s.GetToken(KuneiformParserACTION, 0) } -func (s *Procedure_declarationContext) IDENTIFIER() antlr.TerminalNode { +func (s *Action_declarationContext) IDENTIFIER() antlr.TerminalNode { return s.GetToken(KuneiformParserIDENTIFIER, 0) } -func (s *Procedure_declarationContext) LPAREN() antlr.TerminalNode { +func (s *Action_declarationContext) LPAREN() antlr.TerminalNode { return s.GetToken(KuneiformParserLPAREN, 0) } -func (s *Procedure_declarationContext) RPAREN() antlr.TerminalNode { +func (s *Action_declarationContext) RPAREN() antlr.TerminalNode { return s.GetToken(KuneiformParserRPAREN, 0) } -func (s *Procedure_declarationContext) LBRACE() antlr.TerminalNode { +func (s *Action_declarationContext) LBRACE() antlr.TerminalNode { return s.GetToken(KuneiformParserLBRACE, 0) } -func (s *Procedure_declarationContext) Procedure_block() IProcedure_blockContext { +func (s *Action_declarationContext) Action_block() IAction_blockContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IProcedure_blockContext); ok { + if _, ok := ctx.(IAction_blockContext); ok { t = ctx.(antlr.RuleContext) break } @@ -6617,14 +7625,14 @@ func (s *Procedure_declarationContext) Procedure_block() IProcedure_blockContext return nil } - return t.(IProcedure_blockContext) + return t.(IAction_blockContext) } -func (s *Procedure_declarationContext) RBRACE() antlr.TerminalNode { +func (s *Action_declarationContext) RBRACE() antlr.TerminalNode { return s.GetToken(KuneiformParserRBRACE, 0) } -func (s *Procedure_declarationContext) AllAnnotation() []IAnnotationContext { +func (s *Action_declarationContext) AllAnnotation() []IAnnotationContext { children := s.GetChildren() len := 0 for _, ctx := range children { @@ -6645,7 +7653,7 @@ func (s *Procedure_declarationContext) AllAnnotation() []IAnnotationContext { return tst } -func (s *Procedure_declarationContext) Annotation(i int) IAnnotationContext { +func (s *Action_declarationContext) Annotation(i int) IAnnotationContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { @@ -6665,10 +7673,10 @@ func (s *Procedure_declarationContext) Annotation(i int) IAnnotationContext { return t.(IAnnotationContext) } -func (s *Procedure_declarationContext) Typed_variable_list() ITyped_variable_listContext { +func (s *Action_declarationContext) Variable_list() IVariable_listContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITyped_variable_listContext); ok { + if _, ok := ctx.(IVariable_listContext); ok { t = ctx.(antlr.RuleContext) break } @@ -6678,10 +7686,10 @@ func (s *Procedure_declarationContext) Typed_variable_list() ITyped_variable_lis return nil } - return t.(ITyped_variable_listContext) + return t.(IVariable_listContext) } -func (s *Procedure_declarationContext) AllAccess_modifier() []IAccess_modifierContext { +func (s *Action_declarationContext) AllAccess_modifier() []IAccess_modifierContext { children := s.GetChildren() len := 0 for _, ctx := range children { @@ -6702,7 +7710,7 @@ func (s *Procedure_declarationContext) AllAccess_modifier() []IAccess_modifierCo return tst } -func (s *Procedure_declarationContext) Access_modifier(i int) IAccess_modifierContext { +func (s *Action_declarationContext) Access_modifier(i int) IAccess_modifierContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { @@ -6722,47 +7730,31 @@ func (s *Procedure_declarationContext) Access_modifier(i int) IAccess_modifierCo return t.(IAccess_modifierContext) } -func (s *Procedure_declarationContext) Procedure_return() IProcedure_returnContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IProcedure_returnContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IProcedure_returnContext) -} - -func (s *Procedure_declarationContext) GetRuleContext() antlr.RuleContext { +func (s *Action_declarationContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Procedure_declarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *Action_declarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *Procedure_declarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *Action_declarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case KuneiformParserVisitor: - return t.VisitProcedure_declaration(s) + return t.VisitAction_declaration(s) default: return t.VisitChildren(s) } } -func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarationContext) { - localctx = NewProcedure_declarationContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 52, KuneiformParserRULE_procedure_declaration) +func (p *KuneiformParser) Action_declaration() (localctx IAction_declarationContext) { + localctx = NewAction_declarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 60, KuneiformParserRULE_action_declaration) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(395) + p.SetState(457) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6771,11 +7763,11 @@ func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarati for _la == KuneiformParserCONTEXTUAL_VARIABLE { { - p.SetState(392) + p.SetState(454) p.Annotation() } - p.SetState(397) + p.SetState(459) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6783,15 +7775,15 @@ func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarati _la = p.GetTokenStream().LA(1) } { - p.SetState(398) - p.Match(KuneiformParserPROCEDURE) + p.SetState(460) + p.Match(KuneiformParserACTION) if p.HasError() { // Recognition error - abort rule goto errorExit } } { - p.SetState(399) + p.SetState(461) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -6799,14 +7791,14 @@ func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarati } } { - p.SetState(400) + p.SetState(462) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(402) + p.SetState(464) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6815,20 +7807,20 @@ func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarati if _la == KuneiformParserVARIABLE || _la == KuneiformParserCONTEXTUAL_VARIABLE { { - p.SetState(401) - p.Typed_variable_list() + p.SetState(463) + p.Variable_list() } } { - p.SetState(404) + p.SetState(466) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(406) + p.SetState(468) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6837,33 +7829,19 @@ func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarati for ok := true; ok; ok = ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&4123168604160) != 0) { { - p.SetState(405) + p.SetState(467) p.Access_modifier() } - p.SetState(408) + p.SetState(470) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } - p.SetState(411) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == KuneiformParserRETURNS { - { - p.SetState(410) - p.Procedure_return() - } - - } { - p.SetState(413) + p.SetState(472) p.Match(KuneiformParserLBRACE) if p.HasError() { // Recognition error - abort rule @@ -6871,11 +7849,11 @@ func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarati } } { - p.SetState(414) - p.Procedure_block() + p.SetState(473) + p.Action_block() } { - p.SetState(415) + p.SetState(474) p.Match(KuneiformParserRBRACE) if p.HasError() { // Recognition error - abort rule @@ -6896,103 +7874,135 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// IProcedure_returnContext is an interface to support dynamic dispatch. -type IProcedure_returnContext interface { +// IProcedure_declarationContext is an interface to support dynamic dispatch. +type IProcedure_declarationContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser - // GetReturn_columns returns the return_columns rule contexts. - GetReturn_columns() INamed_type_listContext - - // GetUnnamed_return_types returns the unnamed_return_types rule contexts. - GetUnnamed_return_types() IType_listContext - - // SetReturn_columns sets the return_columns rule contexts. - SetReturn_columns(INamed_type_listContext) - - // SetUnnamed_return_types sets the unnamed_return_types rule contexts. - SetUnnamed_return_types(IType_listContext) - // Getter signatures - RETURNS() antlr.TerminalNode + PROCEDURE() antlr.TerminalNode + IDENTIFIER() antlr.TerminalNode LPAREN() antlr.TerminalNode RPAREN() antlr.TerminalNode - Named_type_list() INamed_type_listContext - Type_list() IType_listContext - TABLE() antlr.TerminalNode + LBRACE() antlr.TerminalNode + Procedure_block() IProcedure_blockContext + RBRACE() antlr.TerminalNode + AllAnnotation() []IAnnotationContext + Annotation(i int) IAnnotationContext + Typed_variable_list() ITyped_variable_listContext + AllAccess_modifier() []IAccess_modifierContext + Access_modifier(i int) IAccess_modifierContext + Procedure_return() IProcedure_returnContext - // IsProcedure_returnContext differentiates from other interfaces. - IsProcedure_returnContext() + // IsProcedure_declarationContext differentiates from other interfaces. + IsProcedure_declarationContext() } -type Procedure_returnContext struct { +type Procedure_declarationContext struct { antlr.BaseParserRuleContext - parser antlr.Parser - return_columns INamed_type_listContext - unnamed_return_types IType_listContext + parser antlr.Parser } -func NewEmptyProcedure_returnContext() *Procedure_returnContext { - var p = new(Procedure_returnContext) +func NewEmptyProcedure_declarationContext() *Procedure_declarationContext { + var p = new(Procedure_declarationContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_procedure_return + p.RuleIndex = KuneiformParserRULE_procedure_declaration return p } -func InitEmptyProcedure_returnContext(p *Procedure_returnContext) { +func InitEmptyProcedure_declarationContext(p *Procedure_declarationContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_procedure_return + p.RuleIndex = KuneiformParserRULE_procedure_declaration } -func (*Procedure_returnContext) IsProcedure_returnContext() {} +func (*Procedure_declarationContext) IsProcedure_declarationContext() {} -func NewProcedure_returnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Procedure_returnContext { - var p = new(Procedure_returnContext) +func NewProcedure_declarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Procedure_declarationContext { + var p = new(Procedure_declarationContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = KuneiformParserRULE_procedure_return + p.RuleIndex = KuneiformParserRULE_procedure_declaration return p } -func (s *Procedure_returnContext) GetParser() antlr.Parser { return s.parser } +func (s *Procedure_declarationContext) GetParser() antlr.Parser { return s.parser } -func (s *Procedure_returnContext) GetReturn_columns() INamed_type_listContext { - return s.return_columns +func (s *Procedure_declarationContext) PROCEDURE() antlr.TerminalNode { + return s.GetToken(KuneiformParserPROCEDURE, 0) } -func (s *Procedure_returnContext) GetUnnamed_return_types() IType_listContext { - return s.unnamed_return_types +func (s *Procedure_declarationContext) IDENTIFIER() antlr.TerminalNode { + return s.GetToken(KuneiformParserIDENTIFIER, 0) } -func (s *Procedure_returnContext) SetReturn_columns(v INamed_type_listContext) { s.return_columns = v } +func (s *Procedure_declarationContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) +} -func (s *Procedure_returnContext) SetUnnamed_return_types(v IType_listContext) { - s.unnamed_return_types = v +func (s *Procedure_declarationContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) } -func (s *Procedure_returnContext) RETURNS() antlr.TerminalNode { - return s.GetToken(KuneiformParserRETURNS, 0) +func (s *Procedure_declarationContext) LBRACE() antlr.TerminalNode { + return s.GetToken(KuneiformParserLBRACE, 0) } -func (s *Procedure_returnContext) LPAREN() antlr.TerminalNode { - return s.GetToken(KuneiformParserLPAREN, 0) +func (s *Procedure_declarationContext) Procedure_block() IProcedure_blockContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IProcedure_blockContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IProcedure_blockContext) } -func (s *Procedure_returnContext) RPAREN() antlr.TerminalNode { - return s.GetToken(KuneiformParserRPAREN, 0) +func (s *Procedure_declarationContext) RBRACE() antlr.TerminalNode { + return s.GetToken(KuneiformParserRBRACE, 0) } -func (s *Procedure_returnContext) Named_type_list() INamed_type_listContext { +func (s *Procedure_declarationContext) AllAnnotation() []IAnnotationContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IAnnotationContext); ok { + len++ + } + } + + tst := make([]IAnnotationContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IAnnotationContext); ok { + tst[i] = t.(IAnnotationContext) + i++ + } + } + + return tst +} + +func (s *Procedure_declarationContext) Annotation(i int) IAnnotationContext { var t antlr.RuleContext + j := 0 for _, ctx := range s.GetChildren() { - if _, ok := ctx.(INamed_type_listContext); ok { - t = ctx.(antlr.RuleContext) - break + if _, ok := ctx.(IAnnotationContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ } } @@ -7000,13 +8010,13 @@ func (s *Procedure_returnContext) Named_type_list() INamed_type_listContext { return nil } - return t.(INamed_type_listContext) + return t.(IAnnotationContext) } -func (s *Procedure_returnContext) Type_list() IType_listContext { +func (s *Procedure_declarationContext) Typed_variable_list() ITyped_variable_listContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IType_listContext); ok { + if _, ok := ctx.(ITyped_variable_listContext); ok { t = ctx.(antlr.RuleContext) break } @@ -7016,119 +8026,3742 @@ func (s *Procedure_returnContext) Type_list() IType_listContext { return nil } - return t.(IType_listContext) + return t.(ITyped_variable_listContext) } -func (s *Procedure_returnContext) TABLE() antlr.TerminalNode { - return s.GetToken(KuneiformParserTABLE, 0) +func (s *Procedure_declarationContext) AllAccess_modifier() []IAccess_modifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IAccess_modifierContext); ok { + len++ + } + } + + tst := make([]IAccess_modifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IAccess_modifierContext); ok { + tst[i] = t.(IAccess_modifierContext) + i++ + } + } + + return tst } -func (s *Procedure_returnContext) GetRuleContext() antlr.RuleContext { +func (s *Procedure_declarationContext) Access_modifier(i int) IAccess_modifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IAccess_modifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IAccess_modifierContext) +} + +func (s *Procedure_declarationContext) Procedure_return() IProcedure_returnContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IProcedure_returnContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IProcedure_returnContext) +} + +func (s *Procedure_declarationContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Procedure_returnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *Procedure_declarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *Procedure_returnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *Procedure_declarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case KuneiformParserVisitor: - return t.VisitProcedure_return(s) + return t.VisitProcedure_declaration(s) default: return t.VisitChildren(s) } } -func (p *KuneiformParser) Procedure_return() (localctx IProcedure_returnContext) { - localctx = NewProcedure_returnContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 54, KuneiformParserRULE_procedure_return) +func (p *KuneiformParser) Procedure_declaration() (localctx IProcedure_declarationContext) { + localctx = NewProcedure_declarationContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 62, KuneiformParserRULE_procedure_declaration) var _la int p.EnterOuterAlt(localctx, 1) - { - p.SetState(417) - p.Match(KuneiformParserRETURNS) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(429) + p.SetState(479) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } + _la = p.GetTokenStream().LA(1) - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 41, p.GetParserRuleContext()) { - case 1: - p.SetState(419) + for _la == KuneiformParserCONTEXTUAL_VARIABLE { + { + p.SetState(476) + p.Annotation() + } + + p.SetState(481) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _la = p.GetTokenStream().LA(1) - - if _la == KuneiformParserTABLE { - { - p.SetState(418) - p.Match(KuneiformParserTABLE) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(482) + p.Match(KuneiformParserPROCEDURE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(483) + p.Match(KuneiformParserIDENTIFIER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(484) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(486) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserVARIABLE || _la == KuneiformParserCONTEXTUAL_VARIABLE { + { + p.SetState(485) + p.Typed_variable_list() + } + + } + { + p.SetState(488) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(490) + 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)&4123168604160) != 0) { + { + p.SetState(489) + p.Access_modifier() + } + + p.SetState(492) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + p.SetState(495) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserRETURNS { + { + p.SetState(494) + p.Procedure_return() + } + + } + { + p.SetState(497) + p.Match(KuneiformParserLBRACE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(498) + p.Procedure_block() + } + { + p.SetState(499) + p.Match(KuneiformParserRBRACE) + 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 +} + +// IProcedure_returnContext is an interface to support dynamic dispatch. +type IProcedure_returnContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetReturn_columns returns the return_columns rule contexts. + GetReturn_columns() INamed_type_listContext + + // GetUnnamed_return_types returns the unnamed_return_types rule contexts. + GetUnnamed_return_types() IType_listContext + + // SetReturn_columns sets the return_columns rule contexts. + SetReturn_columns(INamed_type_listContext) + + // SetUnnamed_return_types sets the unnamed_return_types rule contexts. + SetUnnamed_return_types(IType_listContext) + + // Getter signatures + RETURNS() antlr.TerminalNode + LPAREN() antlr.TerminalNode + RPAREN() antlr.TerminalNode + Named_type_list() INamed_type_listContext + Type_list() IType_listContext + TABLE() antlr.TerminalNode + + // IsProcedure_returnContext differentiates from other interfaces. + IsProcedure_returnContext() +} + +type Procedure_returnContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + return_columns INamed_type_listContext + unnamed_return_types IType_listContext +} + +func NewEmptyProcedure_returnContext() *Procedure_returnContext { + var p = new(Procedure_returnContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_procedure_return + return p +} + +func InitEmptyProcedure_returnContext(p *Procedure_returnContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_procedure_return +} + +func (*Procedure_returnContext) IsProcedure_returnContext() {} + +func NewProcedure_returnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Procedure_returnContext { + var p = new(Procedure_returnContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_procedure_return + + return p +} + +func (s *Procedure_returnContext) GetParser() antlr.Parser { return s.parser } + +func (s *Procedure_returnContext) GetReturn_columns() INamed_type_listContext { + return s.return_columns +} + +func (s *Procedure_returnContext) GetUnnamed_return_types() IType_listContext { + return s.unnamed_return_types +} + +func (s *Procedure_returnContext) SetReturn_columns(v INamed_type_listContext) { s.return_columns = v } + +func (s *Procedure_returnContext) SetUnnamed_return_types(v IType_listContext) { + s.unnamed_return_types = v +} + +func (s *Procedure_returnContext) RETURNS() antlr.TerminalNode { + return s.GetToken(KuneiformParserRETURNS, 0) +} + +func (s *Procedure_returnContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) +} + +func (s *Procedure_returnContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) +} + +func (s *Procedure_returnContext) Named_type_list() INamed_type_listContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(INamed_type_listContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(INamed_type_listContext) +} + +func (s *Procedure_returnContext) Type_list() IType_listContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IType_listContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IType_listContext) +} + +func (s *Procedure_returnContext) TABLE() antlr.TerminalNode { + return s.GetToken(KuneiformParserTABLE, 0) +} + +func (s *Procedure_returnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Procedure_returnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Procedure_returnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitProcedure_return(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Procedure_return() (localctx IProcedure_returnContext) { + localctx = NewProcedure_returnContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 64, KuneiformParserRULE_procedure_return) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(501) + p.Match(KuneiformParserRETURNS) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(513) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 47, p.GetParserRuleContext()) { + case 1: + p.SetState(503) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserTABLE { + { + p.SetState(502) + p.Match(KuneiformParserTABLE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(505) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(506) + + var _x = p.Named_type_list() + + localctx.(*Procedure_returnContext).return_columns = _x + } + { + p.SetState(507) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 2: + { + p.SetState(509) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(510) + + var _x = p.Type_list() + + localctx.(*Procedure_returnContext).unnamed_return_types = _x + } + { + p.SetState(511) + p.Match(KuneiformParserRPAREN) + 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 +} + +// ISql_stmtContext is an interface to support dynamic dispatch. +type ISql_stmtContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + SCOL() antlr.TerminalNode + Sql_statement() ISql_statementContext + Ddl_stmt() IDdl_stmtContext + + // 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 = KuneiformParserRULE_sql_stmt + return p +} + +func InitEmptySql_stmtContext(p *Sql_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_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 = KuneiformParserRULE_sql_stmt + + return p +} + +func (s *Sql_stmtContext) GetParser() antlr.Parser { return s.parser } + +func (s *Sql_stmtContext) SCOL() antlr.TerminalNode { + return s.GetToken(KuneiformParserSCOL, 0) +} + +func (s *Sql_stmtContext) Sql_statement() ISql_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISql_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISql_statementContext) +} + +func (s *Sql_stmtContext) Ddl_stmt() IDdl_stmtContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IDdl_stmtContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IDdl_stmtContext) +} + +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) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitSql_stmt(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Sql_stmt() (localctx ISql_stmtContext) { + localctx = NewSql_stmtContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 66, KuneiformParserRULE_sql_stmt) + p.EnterOuterAlt(localctx, 1) + p.SetState(517) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case KuneiformParserDELETE, KuneiformParserUPDATE, KuneiformParserWITH, KuneiformParserSELECT, KuneiformParserINSERT: + { + p.SetState(515) + p.Sql_statement() + } + + case KuneiformParserCREATE, KuneiformParserALTER, KuneiformParserDROP: + { + p.SetState(516) + p.Ddl_stmt() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + { + p.SetState(519) + p.Match(KuneiformParserSCOL) + 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 +} + +// IDdl_stmtContext is an interface to support dynamic dispatch. +type IDdl_stmtContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Create_table_statement() ICreate_table_statementContext + Alter_table_statement() IAlter_table_statementContext + Drop_table_statement() IDrop_table_statementContext + Create_index_statement() ICreate_index_statementContext + Drop_index_statement() IDrop_index_statementContext + + // IsDdl_stmtContext differentiates from other interfaces. + IsDdl_stmtContext() +} + +type Ddl_stmtContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyDdl_stmtContext() *Ddl_stmtContext { + var p = new(Ddl_stmtContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_ddl_stmt + return p +} + +func InitEmptyDdl_stmtContext(p *Ddl_stmtContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_ddl_stmt +} + +func (*Ddl_stmtContext) IsDdl_stmtContext() {} + +func NewDdl_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ddl_stmtContext { + var p = new(Ddl_stmtContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_ddl_stmt + + return p +} + +func (s *Ddl_stmtContext) GetParser() antlr.Parser { return s.parser } + +func (s *Ddl_stmtContext) Create_table_statement() ICreate_table_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICreate_table_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ICreate_table_statementContext) +} + +func (s *Ddl_stmtContext) Alter_table_statement() IAlter_table_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IAlter_table_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IAlter_table_statementContext) +} + +func (s *Ddl_stmtContext) Drop_table_statement() IDrop_table_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IDrop_table_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IDrop_table_statementContext) +} + +func (s *Ddl_stmtContext) Create_index_statement() ICreate_index_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ICreate_index_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ICreate_index_statementContext) +} + +func (s *Ddl_stmtContext) Drop_index_statement() IDrop_index_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IDrop_index_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IDrop_index_statementContext) +} + +func (s *Ddl_stmtContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Ddl_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Ddl_stmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitDdl_stmt(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Ddl_stmt() (localctx IDdl_stmtContext) { + localctx = NewDdl_stmtContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 68, KuneiformParserRULE_ddl_stmt) + p.SetState(526) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 49, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(521) + p.Create_table_statement() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(522) + p.Alter_table_statement() + } + + case 3: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(523) + p.Drop_table_statement() + } + + case 4: + p.EnterOuterAlt(localctx, 4) + { + p.SetState(524) + p.Create_index_statement() + } + + case 5: + p.EnterOuterAlt(localctx, 5) + { + p.SetState(525) + p.Drop_index_statement() + } + + 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 +} + +// ISql_statementContext is an interface to support dynamic dispatch. +type ISql_statementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + Select_statement() ISelect_statementContext + Update_statement() IUpdate_statementContext + Insert_statement() IInsert_statementContext + Delete_statement() IDelete_statementContext + 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 + + // IsSql_statementContext differentiates from other interfaces. + IsSql_statementContext() +} + +type Sql_statementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptySql_statementContext() *Sql_statementContext { + var p = new(Sql_statementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_sql_statement + return p +} + +func InitEmptySql_statementContext(p *Sql_statementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_sql_statement +} + +func (*Sql_statementContext) IsSql_statementContext() {} + +func NewSql_statementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_statementContext { + var p = new(Sql_statementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_sql_statement + + return p +} + +func (s *Sql_statementContext) GetParser() antlr.Parser { return s.parser } + +func (s *Sql_statementContext) Select_statement() ISelect_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISelect_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISelect_statementContext) +} + +func (s *Sql_statementContext) Update_statement() IUpdate_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IUpdate_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IUpdate_statementContext) +} + +func (s *Sql_statementContext) Insert_statement() IInsert_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IInsert_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IInsert_statementContext) +} + +func (s *Sql_statementContext) Delete_statement() IDelete_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IDelete_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IDelete_statementContext) +} + +func (s *Sql_statementContext) WITH() antlr.TerminalNode { + return s.GetToken(KuneiformParserWITH, 0) +} + +func (s *Sql_statementContext) 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 *Sql_statementContext) 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 *Sql_statementContext) RECURSIVE() antlr.TerminalNode { + return s.GetToken(KuneiformParserRECURSIVE, 0) +} + +func (s *Sql_statementContext) AllCOMMA() []antlr.TerminalNode { + return s.GetTokens(KuneiformParserCOMMA) +} + +func (s *Sql_statementContext) COMMA(i int) antlr.TerminalNode { + return s.GetToken(KuneiformParserCOMMA, i) +} + +func (s *Sql_statementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Sql_statementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Sql_statementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitSql_statement(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Sql_statement() (localctx ISql_statementContext) { + localctx = NewSql_statementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 70, KuneiformParserRULE_sql_statement) + 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 == KuneiformParserWITH { + { + p.SetState(528) + p.Match(KuneiformParserWITH) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(530) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserRECURSIVE { + { + p.SetState(529) + p.Match(KuneiformParserRECURSIVE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(532) + p.Common_table_expression() + } + p.SetState(537) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == KuneiformParserCOMMA { + { + p.SetState(533) + p.Match(KuneiformParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(534) + p.Common_table_expression() + } + + p.SetState(539) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + p.SetState(546) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case KuneiformParserSELECT: + { + p.SetState(542) + p.Select_statement() + } + + case KuneiformParserUPDATE: + { + p.SetState(543) + p.Update_statement() + } + + case KuneiformParserINSERT: + { + p.SetState(544) + p.Insert_statement() + } + + case KuneiformParserDELETE: + { + p.SetState(545) + p.Delete_statement() + } + + 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 +} + +// 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 + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + AS() antlr.TerminalNode + AllLPAREN() []antlr.TerminalNode + LPAREN(i int) antlr.TerminalNode + Select_statement() ISelect_statementContext + AllRPAREN() []antlr.TerminalNode + RPAREN(i int) antlr.TerminalNode + 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 = KuneiformParserRULE_common_table_expression + return p +} + +func InitEmptyCommon_table_expressionContext(p *Common_table_expressionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_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 = KuneiformParserRULE_common_table_expression + + return p +} + +func (s *Common_table_expressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *Common_table_expressionContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *Common_table_expressionContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Common_table_expressionContext) AS() antlr.TerminalNode { + return s.GetToken(KuneiformParserAS, 0) +} + +func (s *Common_table_expressionContext) AllLPAREN() []antlr.TerminalNode { + return s.GetTokens(KuneiformParserLPAREN) +} + +func (s *Common_table_expressionContext) LPAREN(i int) antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, i) +} + +func (s *Common_table_expressionContext) Select_statement() ISelect_statementContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISelect_statementContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISelect_statementContext) +} + +func (s *Common_table_expressionContext) AllRPAREN() []antlr.TerminalNode { + return s.GetTokens(KuneiformParserRPAREN) +} + +func (s *Common_table_expressionContext) RPAREN(i int) antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, i) +} + +func (s *Common_table_expressionContext) AllCOMMA() []antlr.TerminalNode { + return s.GetTokens(KuneiformParserCOMMA) +} + +func (s *Common_table_expressionContext) COMMA(i int) antlr.TerminalNode { + return s.GetToken(KuneiformParserCOMMA, 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) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitCommon_table_expression(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Common_table_expression() (localctx ICommon_table_expressionContext) { + localctx = NewCommon_table_expressionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 72, KuneiformParserRULE_common_table_expression) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(548) + p.Identifier() + } + p.SetState(561) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserLPAREN { + { + p.SetState(549) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(558) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserIDENTIFIER { + { + p.SetState(550) + p.Identifier() + } + p.SetState(555) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == KuneiformParserCOMMA { + { + p.SetState(551) + p.Match(KuneiformParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(552) + p.Identifier() + } + + p.SetState(557) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + + } + { + p.SetState(560) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(563) + p.Match(KuneiformParserAS) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(564) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(565) + p.Select_statement() + } + { + p.SetState(566) + p.Match(KuneiformParserRPAREN) + 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_table_statementContext is an interface to support dynamic dispatch. +type ICreate_table_statementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetName returns the name rule contexts. + GetName() IIdentifierContext + + // SetName sets the name rule contexts. + SetName(IIdentifierContext) + + // Getter signatures + CREATE() antlr.TerminalNode + TABLE() antlr.TerminalNode + LPAREN() antlr.TerminalNode + RPAREN() antlr.TerminalNode + Identifier() IIdentifierContext + AllTable_column_def() []ITable_column_defContext + Table_column_def(i int) ITable_column_defContext + AllTable_constraint_def() []ITable_constraint_defContext + Table_constraint_def(i int) ITable_constraint_defContext + AllTable_index_def() []ITable_index_defContext + Table_index_def(i int) ITable_index_defContext + IF() antlr.TerminalNode + NOT() antlr.TerminalNode + EXISTS() antlr.TerminalNode + AllCOMMA() []antlr.TerminalNode + COMMA(i int) antlr.TerminalNode + + // IsCreate_table_statementContext differentiates from other interfaces. + IsCreate_table_statementContext() +} + +type Create_table_statementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + name IIdentifierContext +} + +func NewEmptyCreate_table_statementContext() *Create_table_statementContext { + var p = new(Create_table_statementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_create_table_statement + return p +} + +func InitEmptyCreate_table_statementContext(p *Create_table_statementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_create_table_statement +} + +func (*Create_table_statementContext) IsCreate_table_statementContext() {} + +func NewCreate_table_statementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_table_statementContext { + var p = new(Create_table_statementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_create_table_statement + + return p +} + +func (s *Create_table_statementContext) GetParser() antlr.Parser { return s.parser } + +func (s *Create_table_statementContext) GetName() IIdentifierContext { return s.name } + +func (s *Create_table_statementContext) SetName(v IIdentifierContext) { s.name = v } + +func (s *Create_table_statementContext) CREATE() antlr.TerminalNode { + return s.GetToken(KuneiformParserCREATE, 0) +} + +func (s *Create_table_statementContext) TABLE() antlr.TerminalNode { + return s.GetToken(KuneiformParserTABLE, 0) +} + +func (s *Create_table_statementContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) +} + +func (s *Create_table_statementContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) +} + +func (s *Create_table_statementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Create_table_statementContext) AllTable_column_def() []ITable_column_defContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITable_column_defContext); ok { + len++ + } + } + + tst := make([]ITable_column_defContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITable_column_defContext); ok { + tst[i] = t.(ITable_column_defContext) + i++ + } + } + + return tst +} + +func (s *Create_table_statementContext) Table_column_def(i int) ITable_column_defContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITable_column_defContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITable_column_defContext) +} + +func (s *Create_table_statementContext) AllTable_constraint_def() []ITable_constraint_defContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITable_constraint_defContext); ok { + len++ + } + } + + tst := make([]ITable_constraint_defContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITable_constraint_defContext); ok { + tst[i] = t.(ITable_constraint_defContext) + i++ + } + } + + return tst +} + +func (s *Create_table_statementContext) Table_constraint_def(i int) ITable_constraint_defContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITable_constraint_defContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITable_constraint_defContext) +} + +func (s *Create_table_statementContext) AllTable_index_def() []ITable_index_defContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(ITable_index_defContext); ok { + len++ + } + } + + tst := make([]ITable_index_defContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(ITable_index_defContext); ok { + tst[i] = t.(ITable_index_defContext) + i++ + } + } + + return tst +} + +func (s *Create_table_statementContext) Table_index_def(i int) ITable_index_defContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITable_index_defContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(ITable_index_defContext) +} + +func (s *Create_table_statementContext) IF() antlr.TerminalNode { + return s.GetToken(KuneiformParserIF, 0) +} + +func (s *Create_table_statementContext) NOT() antlr.TerminalNode { + return s.GetToken(KuneiformParserNOT, 0) +} + +func (s *Create_table_statementContext) EXISTS() antlr.TerminalNode { + return s.GetToken(KuneiformParserEXISTS, 0) +} + +func (s *Create_table_statementContext) AllCOMMA() []antlr.TerminalNode { + return s.GetTokens(KuneiformParserCOMMA) +} + +func (s *Create_table_statementContext) COMMA(i int) antlr.TerminalNode { + return s.GetToken(KuneiformParserCOMMA, i) +} + +func (s *Create_table_statementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Create_table_statementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Create_table_statementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitCreate_table_statement(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Create_table_statement() (localctx ICreate_table_statementContext) { + localctx = NewCreate_table_statementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 74, KuneiformParserRULE_create_table_statement) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(568) + p.Match(KuneiformParserCREATE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(569) + p.Match(KuneiformParserTABLE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(573) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserIF { + { + p.SetState(570) + p.Match(KuneiformParserIF) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(571) + p.Match(KuneiformParserNOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(572) + p.Match(KuneiformParserEXISTS) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(575) + + var _x = p.Identifier() + + localctx.(*Create_table_statementContext).name = _x + } + { + p.SetState(576) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(580) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 58, p.GetParserRuleContext()) { + case 1: + { + p.SetState(577) + p.Table_column_def() + } + + case 2: + { + p.SetState(578) + p.Table_constraint_def() + } + + case 3: + { + p.SetState(579) + p.Table_index_def() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.SetState(590) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == KuneiformParserCOMMA { + { + p.SetState(582) + p.Match(KuneiformParserCOMMA) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(586) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 59, p.GetParserRuleContext()) { + case 1: + { + p.SetState(583) + p.Table_column_def() + } + + case 2: + { + p.SetState(584) + p.Table_constraint_def() + } + + case 3: + { + p.SetState(585) + p.Table_index_def() + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + + p.SetState(592) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } + { + p.SetState(593) + p.Match(KuneiformParserRPAREN) + 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_constraint_defContext is an interface to support dynamic dispatch. +type ITable_constraint_defContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetName returns the name rule contexts. + GetName() IIdentifierContext + + // GetColumn returns the column rule contexts. + GetColumn() IIdentifierContext + + // SetName sets the name rule contexts. + SetName(IIdentifierContext) + + // SetColumn sets the column rule contexts. + SetColumn(IIdentifierContext) + + // Getter signatures + PRIMARY() antlr.TerminalNode + KEY() antlr.TerminalNode + LPAREN() antlr.TerminalNode + Identifier_list() IIdentifier_listContext + RPAREN() antlr.TerminalNode + UNIQUE() antlr.TerminalNode + CHECK() antlr.TerminalNode + Sql_expr() ISql_exprContext + FOREIGN() antlr.TerminalNode + Fk_constraint() IFk_constraintContext + CONSTRAINT() antlr.TerminalNode + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + + // IsTable_constraint_defContext differentiates from other interfaces. + IsTable_constraint_defContext() +} + +type Table_constraint_defContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + name IIdentifierContext + column IIdentifierContext +} + +func NewEmptyTable_constraint_defContext() *Table_constraint_defContext { + var p = new(Table_constraint_defContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_table_constraint_def + return p +} + +func InitEmptyTable_constraint_defContext(p *Table_constraint_defContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_table_constraint_def +} + +func (*Table_constraint_defContext) IsTable_constraint_defContext() {} + +func NewTable_constraint_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_constraint_defContext { + var p = new(Table_constraint_defContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_table_constraint_def + + return p +} + +func (s *Table_constraint_defContext) GetParser() antlr.Parser { return s.parser } + +func (s *Table_constraint_defContext) GetName() IIdentifierContext { return s.name } + +func (s *Table_constraint_defContext) GetColumn() IIdentifierContext { return s.column } + +func (s *Table_constraint_defContext) SetName(v IIdentifierContext) { s.name = v } + +func (s *Table_constraint_defContext) SetColumn(v IIdentifierContext) { s.column = v } + +func (s *Table_constraint_defContext) PRIMARY() antlr.TerminalNode { + return s.GetToken(KuneiformParserPRIMARY, 0) +} + +func (s *Table_constraint_defContext) KEY() antlr.TerminalNode { + return s.GetToken(KuneiformParserKEY, 0) +} + +func (s *Table_constraint_defContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) +} + +func (s *Table_constraint_defContext) Identifier_list() IIdentifier_listContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifier_listContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifier_listContext) +} + +func (s *Table_constraint_defContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) +} + +func (s *Table_constraint_defContext) UNIQUE() antlr.TerminalNode { + return s.GetToken(KuneiformParserUNIQUE, 0) +} + +func (s *Table_constraint_defContext) CHECK() antlr.TerminalNode { + return s.GetToken(KuneiformParserCHECK, 0) +} + +func (s *Table_constraint_defContext) Sql_expr() ISql_exprContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ISql_exprContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ISql_exprContext) +} + +func (s *Table_constraint_defContext) FOREIGN() antlr.TerminalNode { + return s.GetToken(KuneiformParserFOREIGN, 0) +} + +func (s *Table_constraint_defContext) Fk_constraint() IFk_constraintContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IFk_constraintContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IFk_constraintContext) +} + +func (s *Table_constraint_defContext) CONSTRAINT() antlr.TerminalNode { + return s.GetToken(KuneiformParserCONSTRAINT, 0) +} + +func (s *Table_constraint_defContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *Table_constraint_defContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Table_constraint_defContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Table_constraint_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Table_constraint_defContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitTable_constraint_def(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Table_constraint_def() (localctx ITable_constraint_defContext) { + localctx = NewTable_constraint_defContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 76, KuneiformParserRULE_table_constraint_def) + var _la int + + p.EnterOuterAlt(localctx, 1) + p.SetState(597) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserCONSTRAINT { + { + p.SetState(595) + p.Match(KuneiformParserCONSTRAINT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(596) + + var _x = p.Identifier() + + localctx.(*Table_constraint_defContext).name = _x + } + + } + p.SetState(622) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case KuneiformParserPRIMARY: + { + p.SetState(599) + p.Match(KuneiformParserPRIMARY) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(600) + p.Match(KuneiformParserKEY) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(601) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(602) + p.Identifier_list() + } + { + p.SetState(603) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserUNIQUE: + { + p.SetState(605) + p.Match(KuneiformParserUNIQUE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(606) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(607) + p.Identifier_list() + } + { + p.SetState(608) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserCHECK: + { + p.SetState(610) + p.Match(KuneiformParserCHECK) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(611) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(612) + p.sql_expr(0) + } + { + p.SetState(613) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserFOREIGN: + { + p.SetState(615) + p.Match(KuneiformParserFOREIGN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(616) + p.Match(KuneiformParserKEY) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(617) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(618) + + var _x = p.Identifier() + + localctx.(*Table_constraint_defContext).column = _x + } + { + p.SetState(619) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(620) + p.Fk_constraint() + } + + 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 +} + +// IOpt_drop_behaviorContext is an interface to support dynamic dispatch. +type IOpt_drop_behaviorContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // Getter signatures + CASCADE() antlr.TerminalNode + RESTRICT() antlr.TerminalNode + + // IsOpt_drop_behaviorContext differentiates from other interfaces. + IsOpt_drop_behaviorContext() +} + +type Opt_drop_behaviorContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyOpt_drop_behaviorContext() *Opt_drop_behaviorContext { + var p = new(Opt_drop_behaviorContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_opt_drop_behavior + return p +} + +func InitEmptyOpt_drop_behaviorContext(p *Opt_drop_behaviorContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_opt_drop_behavior +} + +func (*Opt_drop_behaviorContext) IsOpt_drop_behaviorContext() {} + +func NewOpt_drop_behaviorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Opt_drop_behaviorContext { + var p = new(Opt_drop_behaviorContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_opt_drop_behavior + + return p +} + +func (s *Opt_drop_behaviorContext) GetParser() antlr.Parser { return s.parser } + +func (s *Opt_drop_behaviorContext) CASCADE() antlr.TerminalNode { + return s.GetToken(KuneiformParserCASCADE, 0) +} + +func (s *Opt_drop_behaviorContext) RESTRICT() antlr.TerminalNode { + return s.GetToken(KuneiformParserRESTRICT, 0) +} + +func (s *Opt_drop_behaviorContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Opt_drop_behaviorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Opt_drop_behaviorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitOpt_drop_behavior(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Opt_drop_behavior() (localctx IOpt_drop_behaviorContext) { + localctx = NewOpt_drop_behaviorContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 78, KuneiformParserRULE_opt_drop_behavior) + p.SetState(627) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case KuneiformParserCASCADE: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(624) + p.Match(KuneiformParserCASCADE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserRESTRICT: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(625) + p.Match(KuneiformParserRESTRICT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserSCOL: + p.EnterOuterAlt(localctx, 3) + + 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 +} + +// IDrop_table_statementContext is an interface to support dynamic dispatch. +type IDrop_table_statementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetTables returns the tables rule contexts. + GetTables() IIdentifier_listContext + + // SetTables sets the tables rule contexts. + SetTables(IIdentifier_listContext) + + // Getter signatures + DROP() antlr.TerminalNode + TABLE() antlr.TerminalNode + Opt_drop_behavior() IOpt_drop_behaviorContext + Identifier_list() IIdentifier_listContext + IF() antlr.TerminalNode + EXISTS() antlr.TerminalNode + + // IsDrop_table_statementContext differentiates from other interfaces. + IsDrop_table_statementContext() +} + +type Drop_table_statementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + tables IIdentifier_listContext +} + +func NewEmptyDrop_table_statementContext() *Drop_table_statementContext { + var p = new(Drop_table_statementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_drop_table_statement + return p +} + +func InitEmptyDrop_table_statementContext(p *Drop_table_statementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_drop_table_statement +} + +func (*Drop_table_statementContext) IsDrop_table_statementContext() {} + +func NewDrop_table_statementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Drop_table_statementContext { + var p = new(Drop_table_statementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_drop_table_statement + + return p +} + +func (s *Drop_table_statementContext) GetParser() antlr.Parser { return s.parser } + +func (s *Drop_table_statementContext) GetTables() IIdentifier_listContext { return s.tables } + +func (s *Drop_table_statementContext) SetTables(v IIdentifier_listContext) { s.tables = v } + +func (s *Drop_table_statementContext) DROP() antlr.TerminalNode { + return s.GetToken(KuneiformParserDROP, 0) +} + +func (s *Drop_table_statementContext) TABLE() antlr.TerminalNode { + return s.GetToken(KuneiformParserTABLE, 0) +} + +func (s *Drop_table_statementContext) Opt_drop_behavior() IOpt_drop_behaviorContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IOpt_drop_behaviorContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IOpt_drop_behaviorContext) +} + +func (s *Drop_table_statementContext) Identifier_list() IIdentifier_listContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifier_listContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifier_listContext) +} + +func (s *Drop_table_statementContext) IF() antlr.TerminalNode { + return s.GetToken(KuneiformParserIF, 0) +} + +func (s *Drop_table_statementContext) EXISTS() antlr.TerminalNode { + return s.GetToken(KuneiformParserEXISTS, 0) +} + +func (s *Drop_table_statementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Drop_table_statementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Drop_table_statementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitDrop_table_statement(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Drop_table_statement() (localctx IDrop_table_statementContext) { + localctx = NewDrop_table_statementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 80, KuneiformParserRULE_drop_table_statement) + var _la int + + p.EnterOuterAlt(localctx, 1) + { + p.SetState(629) + p.Match(KuneiformParserDROP) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(630) + p.Match(KuneiformParserTABLE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(633) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == KuneiformParserIF { + { + p.SetState(631) + p.Match(KuneiformParserIF) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(632) + p.Match(KuneiformParserEXISTS) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(635) + + var _x = p.Identifier_list() + + localctx.(*Drop_table_statementContext).tables = _x + } + { + p.SetState(636) + p.Opt_drop_behavior() + } + +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_statementContext is an interface to support dynamic dispatch. +type IAlter_table_statementContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // GetTable returns the table rule contexts. + GetTable() IIdentifierContext + + // SetTable sets the table rule contexts. + SetTable(IIdentifierContext) + + // Getter signatures + ALTER() antlr.TerminalNode + TABLE() antlr.TerminalNode + Alter_table_action() IAlter_table_actionContext + Identifier() IIdentifierContext + + // IsAlter_table_statementContext differentiates from other interfaces. + IsAlter_table_statementContext() +} + +type Alter_table_statementContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser + table IIdentifierContext +} + +func NewEmptyAlter_table_statementContext() *Alter_table_statementContext { + var p = new(Alter_table_statementContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_alter_table_statement + return p +} + +func InitEmptyAlter_table_statementContext(p *Alter_table_statementContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_alter_table_statement +} + +func (*Alter_table_statementContext) IsAlter_table_statementContext() {} + +func NewAlter_table_statementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Alter_table_statementContext { + var p = new(Alter_table_statementContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_alter_table_statement + + return p +} + +func (s *Alter_table_statementContext) GetParser() antlr.Parser { return s.parser } + +func (s *Alter_table_statementContext) GetTable() IIdentifierContext { return s.table } + +func (s *Alter_table_statementContext) SetTable(v IIdentifierContext) { s.table = v } + +func (s *Alter_table_statementContext) ALTER() antlr.TerminalNode { + return s.GetToken(KuneiformParserALTER, 0) +} + +func (s *Alter_table_statementContext) TABLE() antlr.TerminalNode { + return s.GetToken(KuneiformParserTABLE, 0) +} + +func (s *Alter_table_statementContext) Alter_table_action() IAlter_table_actionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IAlter_table_actionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IAlter_table_actionContext) +} + +func (s *Alter_table_statementContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Alter_table_statementContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Alter_table_statementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Alter_table_statementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitAlter_table_statement(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Alter_table_statement() (localctx IAlter_table_statementContext) { + localctx = NewAlter_table_statementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 82, KuneiformParserRULE_alter_table_statement) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(638) + p.Match(KuneiformParserALTER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(639) + p.Match(KuneiformParserTABLE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(640) + + var _x = p.Identifier() + + localctx.(*Alter_table_statementContext).table = _x + } + { + p.SetState(641) + p.Alter_table_action() + } + +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_actionContext is an interface to support dynamic dispatch. +type IAlter_table_actionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + // IsAlter_table_actionContext differentiates from other interfaces. + IsAlter_table_actionContext() +} + +type Alter_table_actionContext struct { + antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyAlter_table_actionContext() *Alter_table_actionContext { + var p = new(Alter_table_actionContext) + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_alter_table_action + return p +} + +func InitEmptyAlter_table_actionContext(p *Alter_table_actionContext) { + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) + p.RuleIndex = KuneiformParserRULE_alter_table_action +} + +func (*Alter_table_actionContext) IsAlter_table_actionContext() {} + +func NewAlter_table_actionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Alter_table_actionContext { + var p = new(Alter_table_actionContext) + + antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) + + p.parser = parser + p.RuleIndex = KuneiformParserRULE_alter_table_action + + return p +} + +func (s *Alter_table_actionContext) GetParser() antlr.Parser { return s.parser } + +func (s *Alter_table_actionContext) CopyAll(ctx *Alter_table_actionContext) { + s.CopyFrom(&ctx.BaseParserRuleContext) +} + +func (s *Alter_table_actionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Alter_table_actionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +type Drop_column_constraintContext struct { + Alter_table_actionContext + column IIdentifierContext +} + +func NewDrop_column_constraintContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Drop_column_constraintContext { + var p = new(Drop_column_constraintContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Drop_column_constraintContext) GetColumn() IIdentifierContext { return s.column } + +func (s *Drop_column_constraintContext) SetColumn(v IIdentifierContext) { s.column = v } + +func (s *Drop_column_constraintContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Drop_column_constraintContext) ALTER() antlr.TerminalNode { + return s.GetToken(KuneiformParserALTER, 0) +} + +func (s *Drop_column_constraintContext) COLUMN() antlr.TerminalNode { + return s.GetToken(KuneiformParserCOLUMN, 0) +} + +func (s *Drop_column_constraintContext) DROP() antlr.TerminalNode { + return s.GetToken(KuneiformParserDROP, 0) +} + +func (s *Drop_column_constraintContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *Drop_column_constraintContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Drop_column_constraintContext) NOT() antlr.TerminalNode { + return s.GetToken(KuneiformParserNOT, 0) +} + +func (s *Drop_column_constraintContext) NULL() antlr.TerminalNode { + return s.GetToken(KuneiformParserNULL, 0) +} + +func (s *Drop_column_constraintContext) DEFAULT() antlr.TerminalNode { + return s.GetToken(KuneiformParserDEFAULT, 0) +} + +func (s *Drop_column_constraintContext) CONSTRAINT() antlr.TerminalNode { + return s.GetToken(KuneiformParserCONSTRAINT, 0) +} + +func (s *Drop_column_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitDrop_column_constraint(s) + + default: + return t.VisitChildren(s) + } +} + +type Add_columnContext struct { + Alter_table_actionContext + column IIdentifierContext +} + +func NewAdd_columnContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Add_columnContext { + var p = new(Add_columnContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Add_columnContext) GetColumn() IIdentifierContext { return s.column } + +func (s *Add_columnContext) SetColumn(v IIdentifierContext) { s.column = v } + +func (s *Add_columnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Add_columnContext) ADD() antlr.TerminalNode { + return s.GetToken(KuneiformParserADD, 0) +} + +func (s *Add_columnContext) COLUMN() antlr.TerminalNode { + return s.GetToken(KuneiformParserCOLUMN, 0) +} + +func (s *Add_columnContext) Type_() ITypeContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITypeContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITypeContext) +} + +func (s *Add_columnContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Add_columnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitAdd_column(s) + + default: + return t.VisitChildren(s) + } +} + +type Rename_columnContext struct { + Alter_table_actionContext + old_column IIdentifierContext + new_column IIdentifierContext +} + +func NewRename_columnContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Rename_columnContext { + var p = new(Rename_columnContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Rename_columnContext) GetOld_column() IIdentifierContext { return s.old_column } + +func (s *Rename_columnContext) GetNew_column() IIdentifierContext { return s.new_column } + +func (s *Rename_columnContext) SetOld_column(v IIdentifierContext) { s.old_column = v } + +func (s *Rename_columnContext) SetNew_column(v IIdentifierContext) { s.new_column = v } + +func (s *Rename_columnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Rename_columnContext) RENAME() antlr.TerminalNode { + return s.GetToken(KuneiformParserRENAME, 0) +} + +func (s *Rename_columnContext) COLUMN() antlr.TerminalNode { + return s.GetToken(KuneiformParserCOLUMN, 0) +} + +func (s *Rename_columnContext) TO() antlr.TerminalNode { + return s.GetToken(KuneiformParserTO, 0) +} + +func (s *Rename_columnContext) AllIdentifier() []IIdentifierContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IIdentifierContext); ok { + len++ + } + } + + tst := make([]IIdentifierContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) + i++ + } + } + + return tst +} + +func (s *Rename_columnContext) Identifier(i int) IIdentifierContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Rename_columnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitRename_column(s) + + default: + return t.VisitChildren(s) + } +} + +type Add_table_constraintContext struct { + Alter_table_actionContext +} + +func NewAdd_table_constraintContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Add_table_constraintContext { + var p = new(Add_table_constraintContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Add_table_constraintContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Add_table_constraintContext) ADD() antlr.TerminalNode { + return s.GetToken(KuneiformParserADD, 0) +} + +func (s *Add_table_constraintContext) Table_constraint_def() ITable_constraint_defContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ITable_constraint_defContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ITable_constraint_defContext) +} + +func (s *Add_table_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitAdd_table_constraint(s) + + default: + return t.VisitChildren(s) + } +} + +type Add_column_constraintContext struct { + Alter_table_actionContext + column IIdentifierContext +} + +func NewAdd_column_constraintContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Add_column_constraintContext { + var p = new(Add_column_constraintContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Add_column_constraintContext) GetColumn() IIdentifierContext { return s.column } + +func (s *Add_column_constraintContext) SetColumn(v IIdentifierContext) { s.column = v } + +func (s *Add_column_constraintContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Add_column_constraintContext) ALTER() antlr.TerminalNode { + return s.GetToken(KuneiformParserALTER, 0) +} + +func (s *Add_column_constraintContext) COLUMN() antlr.TerminalNode { + return s.GetToken(KuneiformParserCOLUMN, 0) +} + +func (s *Add_column_constraintContext) SET() antlr.TerminalNode { + return s.GetToken(KuneiformParserSET, 0) +} + +func (s *Add_column_constraintContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Add_column_constraintContext) NOT() antlr.TerminalNode { + return s.GetToken(KuneiformParserNOT, 0) +} + +func (s *Add_column_constraintContext) NULL() antlr.TerminalNode { + return s.GetToken(KuneiformParserNULL, 0) +} + +func (s *Add_column_constraintContext) DEFAULT() antlr.TerminalNode { + return s.GetToken(KuneiformParserDEFAULT, 0) +} + +func (s *Add_column_constraintContext) Literal() ILiteralContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(ILiteralContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(ILiteralContext) +} + +func (s *Add_column_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitAdd_column_constraint(s) + + default: + return t.VisitChildren(s) + } +} + +type Rename_tableContext struct { + Alter_table_actionContext + new_table IIdentifierContext +} + +func NewRename_tableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Rename_tableContext { + var p = new(Rename_tableContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Rename_tableContext) GetNew_table() IIdentifierContext { return s.new_table } + +func (s *Rename_tableContext) SetNew_table(v IIdentifierContext) { s.new_table = v } + +func (s *Rename_tableContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Rename_tableContext) RENAME() antlr.TerminalNode { + return s.GetToken(KuneiformParserRENAME, 0) +} + +func (s *Rename_tableContext) TO() antlr.TerminalNode { + return s.GetToken(KuneiformParserTO, 0) +} + +func (s *Rename_tableContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Rename_tableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitRename_table(s) + + default: + return t.VisitChildren(s) + } +} + +type Drop_table_constraintContext struct { + Alter_table_actionContext +} + +func NewDrop_table_constraintContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Drop_table_constraintContext { + var p = new(Drop_table_constraintContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Drop_table_constraintContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Drop_table_constraintContext) DROP() antlr.TerminalNode { + return s.GetToken(KuneiformParserDROP, 0) +} + +func (s *Drop_table_constraintContext) CONSTRAINT() antlr.TerminalNode { + return s.GetToken(KuneiformParserCONSTRAINT, 0) +} + +func (s *Drop_table_constraintContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Drop_table_constraintContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitDrop_table_constraint(s) + + default: + return t.VisitChildren(s) + } +} + +type Drop_columnContext struct { + Alter_table_actionContext + column IIdentifierContext +} + +func NewDrop_columnContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Drop_columnContext { + var p = new(Drop_columnContext) + + InitEmptyAlter_table_actionContext(&p.Alter_table_actionContext) + p.parser = parser + p.CopyAll(ctx.(*Alter_table_actionContext)) + + return p +} + +func (s *Drop_columnContext) GetColumn() IIdentifierContext { return s.column } + +func (s *Drop_columnContext) SetColumn(v IIdentifierContext) { s.column = v } + +func (s *Drop_columnContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Drop_columnContext) DROP() antlr.TerminalNode { + return s.GetToken(KuneiformParserDROP, 0) +} + +func (s *Drop_columnContext) COLUMN() antlr.TerminalNode { + return s.GetToken(KuneiformParserCOLUMN, 0) +} + +func (s *Drop_columnContext) Identifier() IIdentifierContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifierContext) +} + +func (s *Drop_columnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case KuneiformParserVisitor: + return t.VisitDrop_column(s) + + default: + return t.VisitChildren(s) + } +} + +func (p *KuneiformParser) Alter_table_action() (localctx IAlter_table_actionContext) { + localctx = NewAlter_table_actionContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 84, KuneiformParserRULE_alter_table_action) + p.SetState(686) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 67, p.GetParserRuleContext()) { + case 1: + localctx = NewAdd_column_constraintContext(p, localctx) + p.EnterOuterAlt(localctx, 1) + { + p.SetState(643) + p.Match(KuneiformParserALTER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(644) + p.Match(KuneiformParserCOLUMN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(645) + + var _x = p.Identifier() + + localctx.(*Add_column_constraintContext).column = _x + } + { + p.SetState(646) + p.Match(KuneiformParserSET) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(651) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case KuneiformParserNOT: + { + p.SetState(647) + p.Match(KuneiformParserNOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(648) + p.Match(KuneiformParserNULL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserDEFAULT: + { + p.SetState(649) + p.Match(KuneiformParserDEFAULT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(650) + p.Literal() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + case 2: + localctx = NewDrop_column_constraintContext(p, localctx) + p.EnterOuterAlt(localctx, 2) + { + p.SetState(653) + p.Match(KuneiformParserALTER) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(654) + p.Match(KuneiformParserCOLUMN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(655) + + var _x = p.Identifier() + + localctx.(*Drop_column_constraintContext).column = _x + } + { + p.SetState(656) + p.Match(KuneiformParserDROP) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(662) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetTokenStream().LA(1) { + case KuneiformParserNOT: + { + p.SetState(657) + p.Match(KuneiformParserNOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(658) + p.Match(KuneiformParserNULL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserDEFAULT: + { + p.SetState(659) + p.Match(KuneiformParserDEFAULT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case KuneiformParserCONSTRAINT: + { + p.SetState(660) + p.Match(KuneiformParserCONSTRAINT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(661) + p.Identifier() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + + case 3: + localctx = NewAdd_columnContext(p, localctx) + p.EnterOuterAlt(localctx, 3) + { + p.SetState(664) + p.Match(KuneiformParserADD) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(665) + p.Match(KuneiformParserCOLUMN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(666) + + var _x = p.Identifier() + + localctx.(*Add_columnContext).column = _x + } + { + p.SetState(667) + p.Type_() + } + + case 4: + localctx = NewDrop_columnContext(p, localctx) + p.EnterOuterAlt(localctx, 4) + { + p.SetState(669) + p.Match(KuneiformParserDROP) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(670) + p.Match(KuneiformParserCOLUMN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(671) + + var _x = p.Identifier() + + localctx.(*Drop_columnContext).column = _x + } + + case 5: + localctx = NewRename_columnContext(p, localctx) + p.EnterOuterAlt(localctx, 5) + { + p.SetState(672) + p.Match(KuneiformParserRENAME) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(673) + p.Match(KuneiformParserCOLUMN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } + } + { + p.SetState(674) + + var _x = p.Identifier() + localctx.(*Rename_columnContext).old_column = _x } { - p.SetState(421) - p.Match(KuneiformParserLPAREN) + p.SetState(675) + p.Match(KuneiformParserTO) if p.HasError() { // Recognition error - abort rule goto errorExit } } { - p.SetState(422) + p.SetState(676) - var _x = p.Named_type_list() + var _x = p.Identifier() - localctx.(*Procedure_returnContext).return_columns = _x + localctx.(*Rename_columnContext).new_column = _x } + + case 6: + localctx = NewRename_tableContext(p, localctx) + p.EnterOuterAlt(localctx, 6) { - p.SetState(423) - p.Match(KuneiformParserRPAREN) + p.SetState(678) + p.Match(KuneiformParserRENAME) if p.HasError() { // Recognition error - abort rule goto errorExit } } - - case 2: { - p.SetState(425) - p.Match(KuneiformParserLPAREN) + p.SetState(679) + p.Match(KuneiformParserTO) if p.HasError() { // Recognition error - abort rule goto errorExit } } { - p.SetState(426) + p.SetState(680) - var _x = p.Type_list() + var _x = p.Identifier() - localctx.(*Procedure_returnContext).unnamed_return_types = _x + localctx.(*Rename_tableContext).new_table = _x + } + + case 7: + localctx = NewAdd_table_constraintContext(p, localctx) + p.EnterOuterAlt(localctx, 7) + { + p.SetState(681) + p.Match(KuneiformParserADD) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(427) - p.Match(KuneiformParserRPAREN) + p.SetState(682) + p.Table_constraint_def() + } + + case 8: + localctx = NewDrop_table_constraintContext(p, localctx) + p.EnterOuterAlt(localctx, 8) + { + p.SetState(683) + p.Match(KuneiformParserDROP) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(684) + p.Match(KuneiformParserCONSTRAINT) if p.HasError() { // Recognition error - abort rule goto errorExit } } + { + p.SetState(685) + p.Identifier() + } case antlr.ATNInvalidAltNumber: goto errorExit @@ -7147,258 +11780,130 @@ errorExit: goto errorExit // Trick to prevent compiler error if the label is not used } -// ISqlContext is an interface to support dynamic dispatch. -type ISqlContext interface { +// ICreate_index_statementContext is an interface to support dynamic dispatch. +type ICreate_index_statementContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser - // Getter signatures - Sql_statement() ISql_statementContext - SCOL() antlr.TerminalNode - - // IsSqlContext differentiates from other interfaces. - IsSqlContext() -} - -type SqlContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySqlContext() *SqlContext { - var p = new(SqlContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_sql - return p -} - -func InitEmptySqlContext(p *SqlContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_sql -} - -func (*SqlContext) IsSqlContext() {} - -func NewSqlContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SqlContext { - var p = new(SqlContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = KuneiformParserRULE_sql - - return p -} - -func (s *SqlContext) GetParser() antlr.Parser { return s.parser } - -func (s *SqlContext) Sql_statement() ISql_statementContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISql_statementContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISql_statementContext) -} - -func (s *SqlContext) SCOL() antlr.TerminalNode { - return s.GetToken(KuneiformParserSCOL, 0) -} - -func (s *SqlContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *SqlContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *SqlContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { - switch t := visitor.(type) { - case KuneiformParserVisitor: - return t.VisitSql(s) + // GetName returns the name rule contexts. + GetName() IIdentifierContext - default: - return t.VisitChildren(s) - } -} + // GetTable returns the table rule contexts. + GetTable() IIdentifierContext -func (p *KuneiformParser) Sql() (localctx ISqlContext) { - localctx = NewSqlContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 56, KuneiformParserRULE_sql) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(431) - p.Sql_statement() - } - { - p.SetState(432) - p.Match(KuneiformParserSCOL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } + // GetColumns returns the columns rule contexts. + GetColumns() IIdentifier_listContext -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 -} + // SetName sets the name rule contexts. + SetName(IIdentifierContext) -// ISql_statementContext is an interface to support dynamic dispatch. -type ISql_statementContext interface { - antlr.ParserRuleContext + // SetTable sets the table rule contexts. + SetTable(IIdentifierContext) - // GetParser returns the parser. - GetParser() antlr.Parser + // SetColumns sets the columns rule contexts. + SetColumns(IIdentifier_listContext) // Getter signatures - Select_statement() ISelect_statementContext - Update_statement() IUpdate_statementContext - Insert_statement() IInsert_statementContext - Delete_statement() IDelete_statementContext - 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 + CREATE() antlr.TerminalNode + INDEX() antlr.TerminalNode + ON() antlr.TerminalNode + LPAREN() antlr.TerminalNode + RPAREN() antlr.TerminalNode + AllIdentifier() []IIdentifierContext + Identifier(i int) IIdentifierContext + Identifier_list() IIdentifier_listContext + UNIQUE() antlr.TerminalNode + IF() antlr.TerminalNode + NOT() antlr.TerminalNode + EXISTS() antlr.TerminalNode - // IsSql_statementContext differentiates from other interfaces. - IsSql_statementContext() + // IsCreate_index_statementContext differentiates from other interfaces. + IsCreate_index_statementContext() } -type Sql_statementContext struct { +type Create_index_statementContext struct { antlr.BaseParserRuleContext - parser antlr.Parser + parser antlr.Parser + name IIdentifierContext + table IIdentifierContext + columns IIdentifier_listContext } -func NewEmptySql_statementContext() *Sql_statementContext { - var p = new(Sql_statementContext) +func NewEmptyCreate_index_statementContext() *Create_index_statementContext { + var p = new(Create_index_statementContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_sql_statement + p.RuleIndex = KuneiformParserRULE_create_index_statement return p } -func InitEmptySql_statementContext(p *Sql_statementContext) { +func InitEmptyCreate_index_statementContext(p *Create_index_statementContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_sql_statement + p.RuleIndex = KuneiformParserRULE_create_index_statement } -func (*Sql_statementContext) IsSql_statementContext() {} +func (*Create_index_statementContext) IsCreate_index_statementContext() {} -func NewSql_statementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_statementContext { - var p = new(Sql_statementContext) +func NewCreate_index_statementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_index_statementContext { + var p = new(Create_index_statementContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = KuneiformParserRULE_sql_statement + p.RuleIndex = KuneiformParserRULE_create_index_statement return p } -func (s *Sql_statementContext) GetParser() antlr.Parser { return s.parser } - -func (s *Sql_statementContext) Select_statement() ISelect_statementContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_statementContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } +func (s *Create_index_statementContext) GetParser() antlr.Parser { return s.parser } - return t.(ISelect_statementContext) -} +func (s *Create_index_statementContext) GetName() IIdentifierContext { return s.name } -func (s *Sql_statementContext) Update_statement() IUpdate_statementContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IUpdate_statementContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } +func (s *Create_index_statementContext) GetTable() IIdentifierContext { return s.table } - if t == nil { - return nil - } +func (s *Create_index_statementContext) GetColumns() IIdentifier_listContext { return s.columns } - return t.(IUpdate_statementContext) -} +func (s *Create_index_statementContext) SetName(v IIdentifierContext) { s.name = v } -func (s *Sql_statementContext) Insert_statement() IInsert_statementContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IInsert_statementContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } +func (s *Create_index_statementContext) SetTable(v IIdentifierContext) { s.table = v } - if t == nil { - return nil - } +func (s *Create_index_statementContext) SetColumns(v IIdentifier_listContext) { s.columns = v } - return t.(IInsert_statementContext) +func (s *Create_index_statementContext) CREATE() antlr.TerminalNode { + return s.GetToken(KuneiformParserCREATE, 0) } -func (s *Sql_statementContext) Delete_statement() IDelete_statementContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IDelete_statementContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } +func (s *Create_index_statementContext) INDEX() antlr.TerminalNode { + return s.GetToken(KuneiformParserINDEX, 0) +} - if t == nil { - return nil - } +func (s *Create_index_statementContext) ON() antlr.TerminalNode { + return s.GetToken(KuneiformParserON, 0) +} - return t.(IDelete_statementContext) +func (s *Create_index_statementContext) LPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserLPAREN, 0) } -func (s *Sql_statementContext) WITH() antlr.TerminalNode { - return s.GetToken(KuneiformParserWITH, 0) +func (s *Create_index_statementContext) RPAREN() antlr.TerminalNode { + return s.GetToken(KuneiformParserRPAREN, 0) } -func (s *Sql_statementContext) AllCommon_table_expression() []ICommon_table_expressionContext { +func (s *Create_index_statementContext) AllIdentifier() []IIdentifierContext { children := s.GetChildren() len := 0 for _, ctx := range children { - if _, ok := ctx.(ICommon_table_expressionContext); ok { + if _, ok := ctx.(IIdentifierContext); ok { len++ } } - tst := make([]ICommon_table_expressionContext, len) + tst := make([]IIdentifierContext, len) i := 0 for _, ctx := range children { - if t, ok := ctx.(ICommon_table_expressionContext); ok { - tst[i] = t.(ICommon_table_expressionContext) + if t, ok := ctx.(IIdentifierContext); ok { + tst[i] = t.(IIdentifierContext) i++ } } @@ -7406,11 +11911,11 @@ func (s *Sql_statementContext) AllCommon_table_expression() []ICommon_table_expr return tst } -func (s *Sql_statementContext) Common_table_expression(i int) ICommon_table_expressionContext { +func (s *Create_index_statementContext) Identifier(i int) IIdentifierContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICommon_table_expressionContext); ok { + if _, ok := ctx.(IIdentifierContext); ok { if j == i { t = ctx.(antlr.RuleContext) break @@ -7423,147 +11928,187 @@ func (s *Sql_statementContext) Common_table_expression(i int) ICommon_table_expr return nil } - return t.(ICommon_table_expressionContext) + return t.(IIdentifierContext) } -func (s *Sql_statementContext) RECURSIVE() antlr.TerminalNode { - return s.GetToken(KuneiformParserRECURSIVE, 0) +func (s *Create_index_statementContext) Identifier_list() IIdentifier_listContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IIdentifier_listContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IIdentifier_listContext) } -func (s *Sql_statementContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(KuneiformParserCOMMA) +func (s *Create_index_statementContext) UNIQUE() antlr.TerminalNode { + return s.GetToken(KuneiformParserUNIQUE, 0) } -func (s *Sql_statementContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(KuneiformParserCOMMA, i) +func (s *Create_index_statementContext) IF() antlr.TerminalNode { + return s.GetToken(KuneiformParserIF, 0) } -func (s *Sql_statementContext) GetRuleContext() antlr.RuleContext { +func (s *Create_index_statementContext) NOT() antlr.TerminalNode { + return s.GetToken(KuneiformParserNOT, 0) +} + +func (s *Create_index_statementContext) EXISTS() antlr.TerminalNode { + return s.GetToken(KuneiformParserEXISTS, 0) +} + +func (s *Create_index_statementContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Sql_statementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *Create_index_statementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *Sql_statementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *Create_index_statementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case KuneiformParserVisitor: - return t.VisitSql_statement(s) + return t.VisitCreate_index_statement(s) default: return t.VisitChildren(s) } } -func (p *KuneiformParser) Sql_statement() (localctx ISql_statementContext) { - localctx = NewSql_statementContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 58, KuneiformParserRULE_sql_statement) +func (p *KuneiformParser) Create_index_statement() (localctx ICreate_index_statementContext) { + localctx = NewCreate_index_statementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 86, KuneiformParserRULE_create_index_statement) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(446) + { + p.SetState(688) + p.Match(KuneiformParserCREATE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(690) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if _la == KuneiformParserWITH { + if _la == KuneiformParserUNIQUE { { - p.SetState(434) - p.Match(KuneiformParserWITH) + p.SetState(689) + p.Match(KuneiformParserUNIQUE) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(436) - p.GetErrorHandler().Sync(p) + + } + { + p.SetState(692) + p.Match(KuneiformParserINDEX) if p.HasError() { + // Recognition error - abort rule goto errorExit } - _la = p.GetTokenStream().LA(1) + } + p.SetState(696) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) - if _la == KuneiformParserRECURSIVE { - { - p.SetState(435) - p.Match(KuneiformParserRECURSIVE) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } + if _la == KuneiformParserIF { + { + p.SetState(693) + p.Match(KuneiformParserIF) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - } { - p.SetState(438) - p.Common_table_expression() - } - p.SetState(443) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == KuneiformParserCOMMA { - { - p.SetState(439) - p.Match(KuneiformParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(440) - p.Common_table_expression() + p.SetState(694) + p.Match(KuneiformParserNOT) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } - - p.SetState(445) - p.GetErrorHandler().Sync(p) + } + { + p.SetState(695) + p.Match(KuneiformParserEXISTS) if p.HasError() { + // Recognition error - abort rule goto errorExit } - _la = p.GetTokenStream().LA(1) } } - p.SetState(452) + p.SetState(699) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } + _la = p.GetTokenStream().LA(1) - switch p.GetTokenStream().LA(1) { - case KuneiformParserSELECT: + if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserIDENTIFIER { { - p.SetState(448) - p.Select_statement() - } + p.SetState(698) - case KuneiformParserUPDATE: - { - p.SetState(449) - p.Update_statement() + var _x = p.Identifier() + + localctx.(*Create_index_statementContext).name = _x } - case KuneiformParserINSERT: - { - p.SetState(450) - p.Insert_statement() + } + { + p.SetState(701) + p.Match(KuneiformParserON) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } + } + { + p.SetState(702) - case KuneiformParserDELETE: - { - p.SetState(451) - p.Delete_statement() + var _x = p.Identifier() + + localctx.(*Create_index_statementContext).table = _x + } + { + p.SetState(703) + p.Match(KuneiformParserLPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } + } + { + p.SetState(704) - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit + var _x = p.Identifier_list() + + localctx.(*Create_index_statementContext).columns = _x + } + { + p.SetState(705) + p.Match(KuneiformParserRPAREN) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } errorExit: @@ -7579,118 +12124,79 @@ errorExit: 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 { +// IDrop_index_statementContext is an interface to support dynamic dispatch. +type IDrop_index_statementContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser + // GetName returns the name rule contexts. + GetName() IIdentifierContext + + // SetName sets the name rule contexts. + SetName(IIdentifierContext) + // Getter signatures - AllIdentifier() []IIdentifierContext - Identifier(i int) IIdentifierContext - AS() antlr.TerminalNode - AllLPAREN() []antlr.TerminalNode - LPAREN(i int) antlr.TerminalNode - Select_statement() ISelect_statementContext - AllRPAREN() []antlr.TerminalNode - RPAREN(i int) antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode + DROP() antlr.TerminalNode + INDEX() antlr.TerminalNode + Identifier() IIdentifierContext + IF() antlr.TerminalNode + EXISTS() antlr.TerminalNode - // IsCommon_table_expressionContext differentiates from other interfaces. - IsCommon_table_expressionContext() + // IsDrop_index_statementContext differentiates from other interfaces. + IsDrop_index_statementContext() } -type Common_table_expressionContext struct { +type Drop_index_statementContext struct { antlr.BaseParserRuleContext parser antlr.Parser + name IIdentifierContext } -func NewEmptyCommon_table_expressionContext() *Common_table_expressionContext { - var p = new(Common_table_expressionContext) +func NewEmptyDrop_index_statementContext() *Drop_index_statementContext { + var p = new(Drop_index_statementContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_common_table_expression + p.RuleIndex = KuneiformParserRULE_drop_index_statement return p } -func InitEmptyCommon_table_expressionContext(p *Common_table_expressionContext) { +func InitEmptyDrop_index_statementContext(p *Drop_index_statementContext) { antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = KuneiformParserRULE_common_table_expression + p.RuleIndex = KuneiformParserRULE_drop_index_statement } -func (*Common_table_expressionContext) IsCommon_table_expressionContext() {} +func (*Drop_index_statementContext) IsDrop_index_statementContext() {} -func NewCommon_table_expressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_expressionContext { - var p = new(Common_table_expressionContext) +func NewDrop_index_statementContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Drop_index_statementContext { + var p = new(Drop_index_statementContext) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser - p.RuleIndex = KuneiformParserRULE_common_table_expression + p.RuleIndex = KuneiformParserRULE_drop_index_statement return p } -func (s *Common_table_expressionContext) GetParser() antlr.Parser { return s.parser } - -func (s *Common_table_expressionContext) AllIdentifier() []IIdentifierContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IIdentifierContext); ok { - len++ - } - } - - tst := make([]IIdentifierContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IIdentifierContext); ok { - tst[i] = t.(IIdentifierContext) - i++ - } - } - - return tst -} - -func (s *Common_table_expressionContext) Identifier(i int) IIdentifierContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIdentifierContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } +func (s *Drop_index_statementContext) GetParser() antlr.Parser { return s.parser } - return t.(IIdentifierContext) -} +func (s *Drop_index_statementContext) GetName() IIdentifierContext { return s.name } -func (s *Common_table_expressionContext) AS() antlr.TerminalNode { - return s.GetToken(KuneiformParserAS, 0) -} +func (s *Drop_index_statementContext) SetName(v IIdentifierContext) { s.name = v } -func (s *Common_table_expressionContext) AllLPAREN() []antlr.TerminalNode { - return s.GetTokens(KuneiformParserLPAREN) +func (s *Drop_index_statementContext) DROP() antlr.TerminalNode { + return s.GetToken(KuneiformParserDROP, 0) } -func (s *Common_table_expressionContext) LPAREN(i int) antlr.TerminalNode { - return s.GetToken(KuneiformParserLPAREN, i) +func (s *Drop_index_statementContext) INDEX() antlr.TerminalNode { + return s.GetToken(KuneiformParserINDEX, 0) } -func (s *Common_table_expressionContext) Select_statement() ISelect_statementContext { +func (s *Drop_index_statementContext) Identifier() IIdentifierContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_statementContext); ok { + if _, ok := ctx.(IIdentifierContext); ok { t = ctx.(antlr.RuleContext) break } @@ -7700,114 +12206,76 @@ func (s *Common_table_expressionContext) Select_statement() ISelect_statementCon return nil } - return t.(ISelect_statementContext) -} - -func (s *Common_table_expressionContext) AllRPAREN() []antlr.TerminalNode { - return s.GetTokens(KuneiformParserRPAREN) -} - -func (s *Common_table_expressionContext) RPAREN(i int) antlr.TerminalNode { - return s.GetToken(KuneiformParserRPAREN, i) + return t.(IIdentifierContext) } -func (s *Common_table_expressionContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(KuneiformParserCOMMA) +func (s *Drop_index_statementContext) IF() antlr.TerminalNode { + return s.GetToken(KuneiformParserIF, 0) } -func (s *Common_table_expressionContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(KuneiformParserCOMMA, i) +func (s *Drop_index_statementContext) EXISTS() antlr.TerminalNode { + return s.GetToken(KuneiformParserEXISTS, 0) } -func (s *Common_table_expressionContext) GetRuleContext() antlr.RuleContext { +func (s *Drop_index_statementContext) GetRuleContext() antlr.RuleContext { return s } -func (s *Common_table_expressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *Drop_index_statementContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *Common_table_expressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *Drop_index_statementContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case KuneiformParserVisitor: - return t.VisitCommon_table_expression(s) + return t.VisitDrop_index_statement(s) default: return t.VisitChildren(s) } } -func (p *KuneiformParser) Common_table_expression() (localctx ICommon_table_expressionContext) { - localctx = NewCommon_table_expressionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 60, KuneiformParserRULE_common_table_expression) +func (p *KuneiformParser) Drop_index_statement() (localctx IDrop_index_statementContext) { + localctx = NewDrop_index_statementContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 88, KuneiformParserRULE_drop_index_statement) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(454) - p.Identifier() + p.SetState(707) + p.Match(KuneiformParserDROP) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(708) + p.Match(KuneiformParserINDEX) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - p.SetState(467) + p.SetState(711) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if _la == KuneiformParserLPAREN { + if _la == KuneiformParserIF { { - p.SetState(455) - p.Match(KuneiformParserLPAREN) + p.SetState(709) + p.Match(KuneiformParserIF) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(464) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserIDENTIFIER { - { - p.SetState(456) - p.Identifier() - } - p.SetState(461) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == KuneiformParserCOMMA { - { - p.SetState(457) - p.Match(KuneiformParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(458) - p.Identifier() - } - - p.SetState(463) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } { - p.SetState(466) - p.Match(KuneiformParserRPAREN) + p.SetState(710) + p.Match(KuneiformParserEXISTS) if p.HasError() { // Recognition error - abort rule goto errorExit @@ -7816,32 +12284,11 @@ func (p *KuneiformParser) Common_table_expression() (localctx ICommon_table_expr } { - p.SetState(469) - p.Match(KuneiformParserAS) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(470) - p.Match(KuneiformParserLPAREN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(471) - p.Select_statement() - } - { - p.SetState(472) - p.Match(KuneiformParserRPAREN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } + p.SetState(713) + + var _x = p.Identifier() + + localctx.(*Drop_index_statementContext).name = _x } errorExit: @@ -8146,39 +12593,39 @@ func (s *Select_statementContext) Accept(visitor antlr.ParseTreeVisitor) interfa func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) { localctx = NewSelect_statementContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 62, KuneiformParserRULE_select_statement) + p.EnterRule(localctx, 90, KuneiformParserRULE_select_statement) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(474) + p.SetState(715) p.Select_core() } - p.SetState(480) + p.SetState(721) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for (int64((_la-97)) & ^0x3f) == 0 && ((int64(1)<<(_la-97))&7) != 0 { + for (int64((_la-106)) & ^0x3f) == 0 && ((int64(1)<<(_la-106))&7) != 0 { { - p.SetState(475) + p.SetState(716) p.Compound_operator() } { - p.SetState(476) + p.SetState(717) p.Select_core() } - p.SetState(482) + p.SetState(723) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } - p.SetState(493) + p.SetState(734) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8187,7 +12634,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) if _la == KuneiformParserORDER { { - p.SetState(483) + p.SetState(724) p.Match(KuneiformParserORDER) if p.HasError() { // Recognition error - abort rule @@ -8195,7 +12642,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) } } { - p.SetState(484) + p.SetState(725) p.Match(KuneiformParserBY) if p.HasError() { // Recognition error - abort rule @@ -8203,10 +12650,10 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) } } { - p.SetState(485) + p.SetState(726) p.Ordering_term() } - p.SetState(490) + p.SetState(731) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8215,7 +12662,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) for _la == KuneiformParserCOMMA { { - p.SetState(486) + p.SetState(727) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -8223,11 +12670,11 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) } } { - p.SetState(487) + p.SetState(728) p.Ordering_term() } - p.SetState(492) + p.SetState(733) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8236,7 +12683,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) } } - p.SetState(497) + p.SetState(738) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8245,7 +12692,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) if _la == KuneiformParserLIMIT { { - p.SetState(495) + p.SetState(736) p.Match(KuneiformParserLIMIT) if p.HasError() { // Recognition error - abort rule @@ -8253,7 +12700,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) } } { - p.SetState(496) + p.SetState(737) var _x = p.sql_expr(0) @@ -8261,7 +12708,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) } } - p.SetState(501) + p.SetState(742) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8270,7 +12717,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) if _la == KuneiformParserOFFSET { { - p.SetState(499) + p.SetState(740) p.Match(KuneiformParserOFFSET) if p.HasError() { // Recognition error - abort rule @@ -8278,7 +12725,7 @@ func (p *KuneiformParser) Select_statement() (localctx ISelect_statementContext) } } { - p.SetState(500) + p.SetState(741) var _x = p.sql_expr(0) @@ -8385,10 +12832,10 @@ func (s *Compound_operatorContext) Accept(visitor antlr.ParseTreeVisitor) interf func (p *KuneiformParser) Compound_operator() (localctx ICompound_operatorContext) { localctx = NewCompound_operatorContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 64, KuneiformParserRULE_compound_operator) + p.EnterRule(localctx, 92, KuneiformParserRULE_compound_operator) var _la int - p.SetState(509) + p.SetState(750) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8398,14 +12845,14 @@ func (p *KuneiformParser) Compound_operator() (localctx ICompound_operatorContex case KuneiformParserUNION: p.EnterOuterAlt(localctx, 1) { - p.SetState(503) + p.SetState(744) p.Match(KuneiformParserUNION) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(505) + p.SetState(746) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8414,7 +12861,7 @@ func (p *KuneiformParser) Compound_operator() (localctx ICompound_operatorContex if _la == KuneiformParserALL { { - p.SetState(504) + p.SetState(745) p.Match(KuneiformParserALL) if p.HasError() { // Recognition error - abort rule @@ -8427,7 +12874,7 @@ func (p *KuneiformParser) Compound_operator() (localctx ICompound_operatorContex case KuneiformParserINTERSECT: p.EnterOuterAlt(localctx, 2) { - p.SetState(507) + p.SetState(748) p.Match(KuneiformParserINTERSECT) if p.HasError() { // Recognition error - abort rule @@ -8438,7 +12885,7 @@ func (p *KuneiformParser) Compound_operator() (localctx ICompound_operatorContex case KuneiformParserEXCEPT: p.EnterOuterAlt(localctx, 3) { - p.SetState(508) + p.SetState(749) p.Match(KuneiformParserEXCEPT) if p.HasError() { // Recognition error - abort rule @@ -8571,15 +13018,15 @@ func (s *Ordering_termContext) Accept(visitor antlr.ParseTreeVisitor) interface{ func (p *KuneiformParser) Ordering_term() (localctx IOrdering_termContext) { localctx = NewOrdering_termContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 66, KuneiformParserRULE_ordering_term) + p.EnterRule(localctx, 94, KuneiformParserRULE_ordering_term) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(511) + p.SetState(752) p.sql_expr(0) } - p.SetState(513) + p.SetState(754) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8588,7 +13035,7 @@ func (p *KuneiformParser) Ordering_term() (localctx IOrdering_termContext) { if _la == KuneiformParserASC || _la == KuneiformParserDESC { { - p.SetState(512) + p.SetState(753) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserASC || _la == KuneiformParserDESC) { @@ -8600,7 +13047,7 @@ func (p *KuneiformParser) Ordering_term() (localctx IOrdering_termContext) { } } - p.SetState(517) + p.SetState(758) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -8609,7 +13056,7 @@ func (p *KuneiformParser) Ordering_term() (localctx IOrdering_termContext) { if _la == KuneiformParserNULLS { { - p.SetState(515) + p.SetState(756) p.Match(KuneiformParserNULLS) if p.HasError() { // Recognition error - abort rule @@ -8617,7 +13064,7 @@ func (p *KuneiformParser) Ordering_term() (localctx IOrdering_termContext) { } } { - p.SetState(516) + p.SetState(757) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserFIRST || _la == KuneiformParserLAST) { @@ -9050,19 +13497,19 @@ func (s *Select_coreContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { localctx = NewSelect_coreContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 68, KuneiformParserRULE_select_core) + p.EnterRule(localctx, 96, KuneiformParserRULE_select_core) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(519) + p.SetState(760) p.Match(KuneiformParserSELECT) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(521) + p.SetState(762) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9071,7 +13518,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { if _la == KuneiformParserDISTINCT { { - p.SetState(520) + p.SetState(761) p.Match(KuneiformParserDISTINCT) if p.HasError() { // Recognition error - abort rule @@ -9081,10 +13528,10 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } { - p.SetState(523) + p.SetState(764) p.Result_column() } - p.SetState(528) + p.SetState(769) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9093,7 +13540,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { for _la == KuneiformParserCOMMA { { - p.SetState(524) + p.SetState(765) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -9101,18 +13548,18 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(525) + p.SetState(766) p.Result_column() } - p.SetState(530) + p.SetState(771) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } - p.SetState(539) + p.SetState(780) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9121,7 +13568,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { if _la == KuneiformParserFROM { { - p.SetState(531) + p.SetState(772) p.Match(KuneiformParserFROM) if p.HasError() { // Recognition error - abort rule @@ -9129,23 +13576,23 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(532) + p.SetState(773) p.Relation() } - p.SetState(536) + p.SetState(777) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for (int64((_la-69)) & ^0x3f) == 0 && ((int64(1)<<(_la-69))&134217743) != 0 { + for (int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&134217743) != 0 { { - p.SetState(533) + p.SetState(774) p.Join() } - p.SetState(538) + p.SetState(779) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9154,7 +13601,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } - p.SetState(543) + p.SetState(784) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9163,7 +13610,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { if _la == KuneiformParserWHERE { { - p.SetState(541) + p.SetState(782) p.Match(KuneiformParserWHERE) if p.HasError() { // Recognition error - abort rule @@ -9171,7 +13618,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(542) + p.SetState(783) var _x = p.sql_expr(0) @@ -9179,7 +13626,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } - p.SetState(552) + p.SetState(793) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9188,7 +13635,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { if _la == KuneiformParserGROUP { { - p.SetState(545) + p.SetState(786) p.Match(KuneiformParserGROUP) if p.HasError() { // Recognition error - abort rule @@ -9196,7 +13643,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(546) + p.SetState(787) p.Match(KuneiformParserBY) if p.HasError() { // Recognition error - abort rule @@ -9204,13 +13651,13 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(547) + p.SetState(788) var _x = p.Sql_expr_list() localctx.(*Select_coreContext).group_by = _x } - p.SetState(550) + p.SetState(791) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9219,7 +13666,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { if _la == KuneiformParserHAVING { { - p.SetState(548) + p.SetState(789) p.Match(KuneiformParserHAVING) if p.HasError() { // Recognition error - abort rule @@ -9227,7 +13674,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(549) + p.SetState(790) var _x = p.sql_expr(0) @@ -9237,7 +13684,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } - p.SetState(568) + p.SetState(809) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9246,7 +13693,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { if _la == KuneiformParserWINDOW { { - p.SetState(554) + p.SetState(795) p.Match(KuneiformParserWINDOW) if p.HasError() { // Recognition error - abort rule @@ -9254,11 +13701,11 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(555) + p.SetState(796) p.Identifier() } { - p.SetState(556) + p.SetState(797) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -9266,10 +13713,10 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(557) + p.SetState(798) p.Window() } - p.SetState(565) + p.SetState(806) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9278,7 +13725,7 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { for _la == KuneiformParserCOMMA { { - p.SetState(558) + p.SetState(799) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -9286,11 +13733,11 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(559) + p.SetState(800) p.Identifier() } { - p.SetState(560) + p.SetState(801) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -9298,11 +13745,11 @@ func (p *KuneiformParser) Select_core() (localctx ISelect_coreContext) { } } { - p.SetState(561) + p.SetState(802) p.Window() } - p.SetState(567) + p.SetState(808) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9541,10 +13988,10 @@ func (s *Subquery_relationContext) Accept(visitor antlr.ParseTreeVisitor) interf func (p *KuneiformParser) Relation() (localctx IRelationContext) { localctx = NewRelationContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 70, KuneiformParserRULE_relation) + p.EnterRule(localctx, 98, KuneiformParserRULE_relation) var _la int - p.SetState(586) + p.SetState(827) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9555,13 +14002,13 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { localctx = NewTable_relationContext(p, localctx) p.EnterOuterAlt(localctx, 1) { - p.SetState(570) + p.SetState(811) var _x = p.Identifier() localctx.(*Table_relationContext).table_name = _x } - p.SetState(575) + p.SetState(816) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9569,7 +14016,7 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { _la = p.GetTokenStream().LA(1) if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserAS || _la == KuneiformParserIDENTIFIER { - p.SetState(572) + p.SetState(813) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9578,7 +14025,7 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { if _la == KuneiformParserAS { { - p.SetState(571) + p.SetState(812) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -9588,7 +14035,7 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { } { - p.SetState(574) + p.SetState(815) var _x = p.Identifier() @@ -9601,7 +14048,7 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { localctx = NewSubquery_relationContext(p, localctx) p.EnterOuterAlt(localctx, 2) { - p.SetState(577) + p.SetState(818) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -9609,18 +14056,18 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { } } { - p.SetState(578) + p.SetState(819) p.Select_statement() } { - p.SetState(579) + p.SetState(820) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(584) + p.SetState(825) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9628,7 +14075,7 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { _la = p.GetTokenStream().LA(1) if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserAS || _la == KuneiformParserIDENTIFIER { - p.SetState(581) + p.SetState(822) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -9637,7 +14084,7 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { if _la == KuneiformParserAS { { - p.SetState(580) + p.SetState(821) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -9647,7 +14094,7 @@ func (p *KuneiformParser) Relation() (localctx IRelationContext) { } { - p.SetState(583) + p.SetState(824) var _x = p.Identifier() @@ -9803,23 +14250,23 @@ func (s *JoinContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Join() (localctx IJoinContext) { localctx = NewJoinContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 72, KuneiformParserRULE_join) + p.EnterRule(localctx, 100, KuneiformParserRULE_join) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(589) + p.SetState(830) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if (int64((_la-70)) & ^0x3f) == 0 && ((int64(1)<<(_la-70))&67108871) != 0 { + if (int64((_la-79)) & ^0x3f) == 0 && ((int64(1)<<(_la-79))&67108871) != 0 { { - p.SetState(588) + p.SetState(829) _la = p.GetTokenStream().LA(1) - if !((int64((_la-70)) & ^0x3f) == 0 && ((int64(1)<<(_la-70))&67108871) != 0) { + if !((int64((_la-79)) & ^0x3f) == 0 && ((int64(1)<<(_la-79))&67108871) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -9829,7 +14276,7 @@ func (p *KuneiformParser) Join() (localctx IJoinContext) { } { - p.SetState(591) + p.SetState(832) p.Match(KuneiformParserJOIN) if p.HasError() { // Recognition error - abort rule @@ -9837,11 +14284,11 @@ func (p *KuneiformParser) Join() (localctx IJoinContext) { } } { - p.SetState(592) + p.SetState(833) p.Relation() } { - p.SetState(593) + p.SetState(834) p.Match(KuneiformParserON) if p.HasError() { // Recognition error - abort rule @@ -9849,7 +14296,7 @@ func (p *KuneiformParser) Join() (localctx IJoinContext) { } } { - p.SetState(594) + p.SetState(835) p.sql_expr(0) } @@ -10043,24 +14490,24 @@ func (s *Wildcard_result_columnContext) Accept(visitor antlr.ParseTreeVisitor) i func (p *KuneiformParser) Result_column() (localctx IResult_columnContext) { localctx = NewResult_columnContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 74, KuneiformParserRULE_result_column) + p.EnterRule(localctx, 102, KuneiformParserRULE_result_column) var _la int - p.SetState(609) + p.SetState(850) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 76, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 99, p.GetParserRuleContext()) { case 1: localctx = NewExpression_result_columnContext(p, localctx) p.EnterOuterAlt(localctx, 1) { - p.SetState(596) + p.SetState(837) p.sql_expr(0) } - p.SetState(601) + p.SetState(842) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10068,7 +14515,7 @@ func (p *KuneiformParser) Result_column() (localctx IResult_columnContext) { _la = p.GetTokenStream().LA(1) if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserAS || _la == KuneiformParserIDENTIFIER { - p.SetState(598) + p.SetState(839) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10077,7 +14524,7 @@ func (p *KuneiformParser) Result_column() (localctx IResult_columnContext) { if _la == KuneiformParserAS { { - p.SetState(597) + p.SetState(838) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -10087,7 +14534,7 @@ func (p *KuneiformParser) Result_column() (localctx IResult_columnContext) { } { - p.SetState(600) + p.SetState(841) p.Identifier() } @@ -10096,7 +14543,7 @@ func (p *KuneiformParser) Result_column() (localctx IResult_columnContext) { case 2: localctx = NewWildcard_result_columnContext(p, localctx) p.EnterOuterAlt(localctx, 2) - p.SetState(606) + p.SetState(847) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10105,14 +14552,14 @@ func (p *KuneiformParser) Result_column() (localctx IResult_columnContext) { if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserIDENTIFIER { { - p.SetState(603) + p.SetState(844) var _x = p.Identifier() localctx.(*Wildcard_result_columnContext).table_name = _x } { - p.SetState(604) + p.SetState(845) p.Match(KuneiformParserPERIOD) if p.HasError() { // Recognition error - abort rule @@ -10122,7 +14569,7 @@ func (p *KuneiformParser) Result_column() (localctx IResult_columnContext) { } { - p.SetState(608) + p.SetState(849) p.Match(KuneiformParserSTAR) if p.HasError() { // Recognition error - abort rule @@ -10443,12 +14890,12 @@ func (s *Update_statementContext) Accept(visitor antlr.ParseTreeVisitor) interfa func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) { localctx = NewUpdate_statementContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 76, KuneiformParserRULE_update_statement) + p.EnterRule(localctx, 104, KuneiformParserRULE_update_statement) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(611) + p.SetState(852) p.Match(KuneiformParserUPDATE) if p.HasError() { // Recognition error - abort rule @@ -10456,13 +14903,13 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } } { - p.SetState(612) + p.SetState(853) var _x = p.Identifier() localctx.(*Update_statementContext).table_name = _x } - p.SetState(617) + p.SetState(858) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10470,7 +14917,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) _la = p.GetTokenStream().LA(1) if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserAS || _la == KuneiformParserIDENTIFIER { - p.SetState(614) + p.SetState(855) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10479,7 +14926,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) if _la == KuneiformParserAS { { - p.SetState(613) + p.SetState(854) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -10489,7 +14936,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } { - p.SetState(616) + p.SetState(857) var _x = p.Identifier() @@ -10498,7 +14945,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } { - p.SetState(619) + p.SetState(860) p.Match(KuneiformParserSET) if p.HasError() { // Recognition error - abort rule @@ -10506,10 +14953,10 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } } { - p.SetState(620) + p.SetState(861) p.Update_set_clause() } - p.SetState(625) + p.SetState(866) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10518,7 +14965,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) for _la == KuneiformParserCOMMA { { - p.SetState(621) + p.SetState(862) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -10526,18 +14973,18 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } } { - p.SetState(622) + p.SetState(863) p.Update_set_clause() } - p.SetState(627) + p.SetState(868) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } - p.SetState(636) + p.SetState(877) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10546,7 +14993,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) if _la == KuneiformParserFROM { { - p.SetState(628) + p.SetState(869) p.Match(KuneiformParserFROM) if p.HasError() { // Recognition error - abort rule @@ -10554,23 +15001,23 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } } { - p.SetState(629) + p.SetState(870) p.Relation() } - p.SetState(633) + p.SetState(874) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for (int64((_la-69)) & ^0x3f) == 0 && ((int64(1)<<(_la-69))&134217743) != 0 { + for (int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&134217743) != 0 { { - p.SetState(630) + p.SetState(871) p.Join() } - p.SetState(635) + p.SetState(876) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10579,7 +15026,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } } - p.SetState(640) + p.SetState(881) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -10588,7 +15035,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) if _la == KuneiformParserWHERE { { - p.SetState(638) + p.SetState(879) p.Match(KuneiformParserWHERE) if p.HasError() { // Recognition error - abort rule @@ -10596,7 +15043,7 @@ func (p *KuneiformParser) Update_statement() (localctx IUpdate_statementContext) } } { - p.SetState(639) + p.SetState(880) var _x = p.sql_expr(0) @@ -10733,17 +15180,17 @@ func (s *Update_set_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interf func (p *KuneiformParser) Update_set_clause() (localctx IUpdate_set_clauseContext) { localctx = NewUpdate_set_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 78, KuneiformParserRULE_update_set_clause) + p.EnterRule(localctx, 106, KuneiformParserRULE_update_set_clause) p.EnterOuterAlt(localctx, 1) { - p.SetState(642) + p.SetState(883) var _x = p.Identifier() localctx.(*Update_set_clauseContext).column = _x } { - p.SetState(643) + p.SetState(884) p.Match(KuneiformParserEQUALS) if p.HasError() { // Recognition error - abort rule @@ -10751,7 +15198,7 @@ func (p *KuneiformParser) Update_set_clause() (localctx IUpdate_set_clauseContex } } { - p.SetState(644) + p.SetState(885) p.sql_expr(0) } @@ -11055,12 +15502,12 @@ func (s *Insert_statementContext) Accept(visitor antlr.ParseTreeVisitor) interfa func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) { localctx = NewInsert_statementContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 80, KuneiformParserRULE_insert_statement) + p.EnterRule(localctx, 108, KuneiformParserRULE_insert_statement) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(646) + p.SetState(887) p.Match(KuneiformParserINSERT) if p.HasError() { // Recognition error - abort rule @@ -11068,7 +15515,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } { - p.SetState(647) + p.SetState(888) p.Match(KuneiformParserINTO) if p.HasError() { // Recognition error - abort rule @@ -11076,13 +15523,13 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } { - p.SetState(648) + p.SetState(889) var _x = p.Identifier() localctx.(*Insert_statementContext).table_name = _x } - p.SetState(653) + p.SetState(894) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11090,7 +15537,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) _la = p.GetTokenStream().LA(1) if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserAS || _la == KuneiformParserIDENTIFIER { - p.SetState(650) + p.SetState(891) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11099,7 +15546,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) if _la == KuneiformParserAS { { - p.SetState(649) + p.SetState(890) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -11109,7 +15556,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } { - p.SetState(652) + p.SetState(893) var _x = p.Identifier() @@ -11117,7 +15564,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } - p.SetState(659) + p.SetState(900) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11126,7 +15573,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) if _la == KuneiformParserLPAREN { { - p.SetState(655) + p.SetState(896) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -11134,14 +15581,14 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } { - p.SetState(656) + p.SetState(897) var _x = p.Identifier_list() localctx.(*Insert_statementContext).target_columns = _x } { - p.SetState(657) + p.SetState(898) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -11150,7 +15597,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } - p.SetState(676) + p.SetState(917) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11159,7 +15606,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) switch p.GetTokenStream().LA(1) { case KuneiformParserVALUES: { - p.SetState(661) + p.SetState(902) p.Match(KuneiformParserVALUES) if p.HasError() { // Recognition error - abort rule @@ -11167,7 +15614,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } { - p.SetState(662) + p.SetState(903) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -11175,18 +15622,18 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } { - p.SetState(663) + p.SetState(904) p.Sql_expr_list() } { - p.SetState(664) + p.SetState(905) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(672) + p.SetState(913) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11195,7 +15642,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) for _la == KuneiformParserCOMMA { { - p.SetState(665) + p.SetState(906) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -11203,7 +15650,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } { - p.SetState(666) + p.SetState(907) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -11211,11 +15658,11 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } { - p.SetState(667) + p.SetState(908) p.Sql_expr_list() } { - p.SetState(668) + p.SetState(909) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -11223,7 +15670,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) } } - p.SetState(674) + p.SetState(915) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11233,7 +15680,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) case KuneiformParserSELECT: { - p.SetState(675) + p.SetState(916) p.Select_statement() } @@ -11241,7 +15688,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } - p.SetState(679) + p.SetState(920) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11250,7 +15697,7 @@ func (p *KuneiformParser) Insert_statement() (localctx IInsert_statementContext) if _la == KuneiformParserON { { - p.SetState(678) + p.SetState(919) p.Upsert_clause() } @@ -11532,12 +15979,12 @@ func (s *Upsert_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { localctx = NewUpsert_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 82, KuneiformParserRULE_upsert_clause) + p.EnterRule(localctx, 110, KuneiformParserRULE_upsert_clause) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(681) + p.SetState(922) p.Match(KuneiformParserON) if p.HasError() { // Recognition error - abort rule @@ -11545,14 +15992,14 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } } { - p.SetState(682) + p.SetState(923) p.Match(KuneiformParserCONFLICT) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(690) + p.SetState(931) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11561,7 +16008,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { if _la == KuneiformParserLPAREN { { - p.SetState(683) + p.SetState(924) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -11569,21 +16016,21 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } } { - p.SetState(684) + p.SetState(925) var _x = p.Identifier_list() localctx.(*Upsert_clauseContext).conflict_columns = _x } { - p.SetState(685) + p.SetState(926) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(688) + p.SetState(929) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11592,7 +16039,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { if _la == KuneiformParserWHERE { { - p.SetState(686) + p.SetState(927) p.Match(KuneiformParserWHERE) if p.HasError() { // Recognition error - abort rule @@ -11600,7 +16047,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } } { - p.SetState(687) + p.SetState(928) var _x = p.sql_expr(0) @@ -11611,14 +16058,14 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } { - p.SetState(692) + p.SetState(933) p.Match(KuneiformParserDO) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(708) + p.SetState(949) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11627,7 +16074,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { switch p.GetTokenStream().LA(1) { case KuneiformParserNOTHING: { - p.SetState(693) + p.SetState(934) p.Match(KuneiformParserNOTHING) if p.HasError() { // Recognition error - abort rule @@ -11637,7 +16084,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { case KuneiformParserUPDATE: { - p.SetState(694) + p.SetState(935) p.Match(KuneiformParserUPDATE) if p.HasError() { // Recognition error - abort rule @@ -11645,7 +16092,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } } { - p.SetState(695) + p.SetState(936) p.Match(KuneiformParserSET) if p.HasError() { // Recognition error - abort rule @@ -11653,10 +16100,10 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } } { - p.SetState(696) + p.SetState(937) p.Update_set_clause() } - p.SetState(701) + p.SetState(942) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11665,7 +16112,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { for _la == KuneiformParserCOMMA { { - p.SetState(697) + p.SetState(938) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -11673,18 +16120,18 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } } { - p.SetState(698) + p.SetState(939) p.Update_set_clause() } - p.SetState(703) + p.SetState(944) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } - p.SetState(706) + p.SetState(947) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11693,7 +16140,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { if _la == KuneiformParserWHERE { { - p.SetState(704) + p.SetState(945) p.Match(KuneiformParserWHERE) if p.HasError() { // Recognition error - abort rule @@ -11701,7 +16148,7 @@ func (p *KuneiformParser) Upsert_clause() (localctx IUpsert_clauseContext) { } } { - p.SetState(705) + p.SetState(946) var _x = p.sql_expr(0) @@ -11906,12 +16353,12 @@ func (s *Delete_statementContext) Accept(visitor antlr.ParseTreeVisitor) interfa func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) { localctx = NewDelete_statementContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 84, KuneiformParserRULE_delete_statement) + p.EnterRule(localctx, 112, KuneiformParserRULE_delete_statement) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(710) + p.SetState(951) p.Match(KuneiformParserDELETE) if p.HasError() { // Recognition error - abort rule @@ -11919,7 +16366,7 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) } } { - p.SetState(711) + p.SetState(952) p.Match(KuneiformParserFROM) if p.HasError() { // Recognition error - abort rule @@ -11927,13 +16374,13 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) } } { - p.SetState(712) + p.SetState(953) var _x = p.Identifier() localctx.(*Delete_statementContext).table_name = _x } - p.SetState(717) + p.SetState(958) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11941,7 +16388,7 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) _la = p.GetTokenStream().LA(1) if _la == KuneiformParserDOUBLE_QUOTE || _la == KuneiformParserAS || _la == KuneiformParserIDENTIFIER { - p.SetState(714) + p.SetState(955) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11950,7 +16397,7 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) if _la == KuneiformParserAS { { - p.SetState(713) + p.SetState(954) p.Match(KuneiformParserAS) if p.HasError() { // Recognition error - abort rule @@ -11960,7 +16407,7 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) } { - p.SetState(716) + p.SetState(957) var _x = p.Identifier() @@ -11968,7 +16415,7 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) } } - p.SetState(721) + p.SetState(962) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -11977,7 +16424,7 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) if _la == KuneiformParserWHERE { { - p.SetState(719) + p.SetState(960) p.Match(KuneiformParserWHERE) if p.HasError() { // Recognition error - abort rule @@ -11985,7 +16432,7 @@ func (p *KuneiformParser) Delete_statement() (localctx IDelete_statementContext) } } { - p.SetState(720) + p.SetState(961) var _x = p.sql_expr(0) @@ -13727,27 +18174,27 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx = NewSql_exprContext(p, p.GetParserRuleContext(), _parentState) var _prevctx ISql_exprContext = localctx var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. - _startState := 86 - p.EnterRecursionRule(localctx, 86, KuneiformParserRULE_sql_expr, _p) + _startState := 114 + p.EnterRecursionRule(localctx, 114, KuneiformParserRULE_sql_expr, _p) var _la int var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(796) + p.SetState(1037) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 111, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 134, p.GetParserRuleContext()) { case 1: localctx = NewParen_sql_exprContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(724) + p.SetState(965) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -13755,23 +18202,23 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(725) + p.SetState(966) p.sql_expr(0) } { - p.SetState(726) + p.SetState(967) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(728) + p.SetState(969) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 97, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 120, p.GetParserRuleContext()) == 1 { { - p.SetState(727) + p.SetState(968) p.Type_cast() } @@ -13784,7 +18231,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(730) + p.SetState(971) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserPLUS || _la == KuneiformParserMINUS) { @@ -13795,7 +18242,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(731) + p.SetState(972) p.sql_expr(20) } @@ -13804,15 +18251,15 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(732) + p.SetState(973) p.Literal() } - p.SetState(734) + p.SetState(975) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 98, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 121, p.GetParserRuleContext()) == 1 { { - p.SetState(733) + p.SetState(974) p.Type_cast() } @@ -13825,10 +18272,10 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(736) + p.SetState(977) p.Sql_function_call() } - p.SetState(743) + p.SetState(984) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -13837,7 +18284,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { if _la == KuneiformParserFILTER { { - p.SetState(737) + p.SetState(978) p.Match(KuneiformParserFILTER) if p.HasError() { // Recognition error - abort rule @@ -13845,7 +18292,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(738) + p.SetState(979) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -13853,7 +18300,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(739) + p.SetState(980) p.Match(KuneiformParserWHERE) if p.HasError() { // Recognition error - abort rule @@ -13861,11 +18308,11 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(740) + p.SetState(981) p.sql_expr(0) } { - p.SetState(741) + p.SetState(982) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -13875,14 +18322,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(745) + p.SetState(986) p.Match(KuneiformParserOVER) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(748) + p.SetState(989) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -13891,13 +18338,13 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { switch p.GetTokenStream().LA(1) { case KuneiformParserLPAREN: { - p.SetState(746) + p.SetState(987) p.Window() } case KuneiformParserIDENTIFIER: { - p.SetState(747) + p.SetState(988) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -13915,15 +18362,15 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(750) + p.SetState(991) p.Sql_function_call() } - p.SetState(752) + p.SetState(993) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 101, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 124, p.GetParserRuleContext()) == 1 { { - p.SetState(751) + p.SetState(992) p.Type_cast() } @@ -13936,15 +18383,15 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(754) + p.SetState(995) p.Variable() } - p.SetState(756) + p.SetState(997) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 102, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 125, p.GetParserRuleContext()) == 1 { { - p.SetState(755) + p.SetState(996) p.Type_cast() } @@ -13956,19 +18403,19 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx = NewColumn_sql_exprContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx - p.SetState(761) + p.SetState(1002) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 103, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 126, p.GetParserRuleContext()) == 1 { { - p.SetState(758) + p.SetState(999) var _x = p.Identifier() localctx.(*Column_sql_exprContext).table = _x } { - p.SetState(759) + p.SetState(1000) p.Match(KuneiformParserPERIOD) if p.HasError() { // Recognition error - abort rule @@ -13980,18 +18427,18 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { goto errorExit } { - p.SetState(763) + p.SetState(1004) var _x = p.Identifier() localctx.(*Column_sql_exprContext).column = _x } - p.SetState(765) + p.SetState(1006) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 104, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 127, p.GetParserRuleContext()) == 1 { { - p.SetState(764) + p.SetState(1005) p.Type_cast() } @@ -14004,23 +18451,23 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(767) + p.SetState(1008) p.Match(KuneiformParserCASE) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(769) + p.SetState(1010) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64((_la-7)) & ^0x3f) == 0 && ((int64(1)<<(_la-7))&577621836615933953) != 0) || ((int64((_la-85)) & ^0x3f) == 0 && ((int64(1)<<(_la-85))&246823180566529) != 0) { + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2305843013511807104) != 0) || ((int64((_la-66)) & ^0x3f) == 0 && ((int64(1)<<(_la-66))&-4611686018158951935) != 0) || ((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&3591) != 0) { { - p.SetState(768) + p.SetState(1009) var _x = p.sql_expr(0) @@ -14028,7 +18475,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } - p.SetState(772) + p.SetState(1013) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14037,18 +18484,18 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { for ok := true; ok; ok = _la == KuneiformParserWHEN { { - p.SetState(771) + p.SetState(1012) p.When_then_clause() } - p.SetState(774) + p.SetState(1015) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } - p.SetState(778) + p.SetState(1019) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14057,7 +18504,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { if _la == KuneiformParserELSE { { - p.SetState(776) + p.SetState(1017) p.Match(KuneiformParserELSE) if p.HasError() { // Recognition error - abort rule @@ -14065,7 +18512,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(777) + p.SetState(1018) var _x = p.sql_expr(0) @@ -14074,7 +18521,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(780) + p.SetState(1021) p.Match(KuneiformParserEND) if p.HasError() { // Recognition error - abort rule @@ -14086,7 +18533,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx = NewSubquery_sql_exprContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx - p.SetState(786) + p.SetState(1027) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14094,7 +18541,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { _la = p.GetTokenStream().LA(1) if _la == KuneiformParserNOT || _la == KuneiformParserEXISTS { - p.SetState(783) + p.SetState(1024) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14103,7 +18550,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { if _la == KuneiformParserNOT { { - p.SetState(782) + p.SetState(1023) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -14113,7 +18560,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(785) + p.SetState(1026) p.Match(KuneiformParserEXISTS) if p.HasError() { // Recognition error - abort rule @@ -14123,7 +18570,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(788) + p.SetState(1029) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -14131,23 +18578,23 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(789) + p.SetState(1030) p.Select_statement() } { - p.SetState(790) + p.SetState(1031) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(792) + p.SetState(1033) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 110, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 133, p.GetParserRuleContext()) == 1 { { - p.SetState(791) + p.SetState(1032) p.Type_cast() } @@ -14161,7 +18608,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { _prevctx = localctx { - p.SetState(794) + p.SetState(1035) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -14170,7 +18617,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(795) + p.SetState(1036) p.sql_expr(3) } @@ -14178,12 +18625,12 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(883) + p.SetState(1124) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 124, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 147, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -14193,26 +18640,26 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(881) + p.SetState(1122) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 123, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 146, p.GetParserRuleContext()) { case 1: localctx = NewArithmetic_sql_exprContext(p, NewSql_exprContext(p, _parentctx, _parentState)) localctx.(*Arithmetic_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(798) + p.SetState(1039) if !(p.Precpred(p.GetParserRuleContext(), 18)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) goto errorExit } { - p.SetState(799) + p.SetState(1040) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&4734976) != 0) { @@ -14223,7 +18670,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(800) + p.SetState(1041) var _x = p.sql_expr(19) @@ -14235,14 +18682,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Arithmetic_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(801) + p.SetState(1042) if !(p.Precpred(p.GetParserRuleContext(), 17)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) goto errorExit } { - p.SetState(802) + p.SetState(1043) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserPLUS || _la == KuneiformParserMINUS) { @@ -14253,7 +18700,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(803) + p.SetState(1044) var _x = p.sql_expr(18) @@ -14265,14 +18712,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Arithmetic_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(804) + p.SetState(1045) if !(p.Precpred(p.GetParserRuleContext(), 9)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", "")) goto errorExit } { - p.SetState(805) + p.SetState(1046) p.Match(KuneiformParserCONCAT) if p.HasError() { // Recognition error - abort rule @@ -14280,7 +18727,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(806) + p.SetState(1047) var _x = p.sql_expr(10) @@ -14292,13 +18739,13 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Like_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(807) + p.SetState(1048) if !(p.Precpred(p.GetParserRuleContext(), 7)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) goto errorExit } - p.SetState(809) + p.SetState(1050) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14307,7 +18754,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { if _la == KuneiformParserNOT { { - p.SetState(808) + p.SetState(1049) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -14317,7 +18764,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(811) + p.SetState(1052) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserLIKE || _la == KuneiformParserILIKE) { @@ -14328,7 +18775,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(812) + p.SetState(1053) var _x = p.sql_expr(8) @@ -14340,13 +18787,13 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Between_sql_exprContext).element = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(813) + p.SetState(1054) if !(p.Precpred(p.GetParserRuleContext(), 6)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) goto errorExit } - p.SetState(815) + p.SetState(1056) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14355,7 +18802,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { if _la == KuneiformParserNOT { { - p.SetState(814) + p.SetState(1055) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -14365,7 +18812,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(817) + p.SetState(1058) p.Match(KuneiformParserBETWEEN) if p.HasError() { // Recognition error - abort rule @@ -14373,14 +18820,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(818) + p.SetState(1059) var _x = p.sql_expr(0) localctx.(*Between_sql_exprContext).lower = _x } { - p.SetState(819) + p.SetState(1060) p.Match(KuneiformParserAND) if p.HasError() { // Recognition error - abort rule @@ -14388,7 +18835,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(820) + p.SetState(1061) var _x = p.sql_expr(7) @@ -14400,14 +18847,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Comparison_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(822) + p.SetState(1063) if !(p.Precpred(p.GetParserRuleContext(), 5)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) goto errorExit } { - p.SetState(823) + p.SetState(1064) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&260145152) != 0) { @@ -14418,7 +18865,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(824) + p.SetState(1065) var _x = p.sql_expr(6) @@ -14430,14 +18877,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Logical_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(825) + p.SetState(1066) if !(p.Precpred(p.GetParserRuleContext(), 2)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) goto errorExit } { - p.SetState(826) + p.SetState(1067) p.Match(KuneiformParserAND) if p.HasError() { // Recognition error - abort rule @@ -14445,7 +18892,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(827) + p.SetState(1068) var _x = p.sql_expr(3) @@ -14457,14 +18904,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Logical_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(828) + p.SetState(1069) if !(p.Precpred(p.GetParserRuleContext(), 1)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) goto errorExit } { - p.SetState(829) + p.SetState(1070) p.Match(KuneiformParserOR) if p.HasError() { // Recognition error - abort rule @@ -14472,7 +18919,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(830) + p.SetState(1071) var _x = p.sql_expr(2) @@ -14482,14 +18929,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { case 9: localctx = NewField_access_sql_exprContext(p, NewSql_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(831) + p.SetState(1072) if !(p.Precpred(p.GetParserRuleContext(), 22)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 22)", "")) goto errorExit } { - p.SetState(832) + p.SetState(1073) p.Match(KuneiformParserPERIOD) if p.HasError() { // Recognition error - abort rule @@ -14497,15 +18944,15 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(833) + p.SetState(1074) p.Identifier() } - p.SetState(835) + p.SetState(1076) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 114, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 137, p.GetParserRuleContext()) == 1 { { - p.SetState(834) + p.SetState(1075) p.Type_cast() } @@ -14518,30 +18965,30 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Array_access_sql_exprContext).array_element = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(837) + p.SetState(1078) if !(p.Precpred(p.GetParserRuleContext(), 21)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 21)", "")) goto errorExit } { - p.SetState(838) + p.SetState(1079) p.Match(KuneiformParserLBRACKET) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(847) + p.SetState(1088) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 117, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 140, p.GetParserRuleContext()) { case 1: { - p.SetState(839) + p.SetState(1080) var _x = p.sql_expr(0) @@ -14549,16 +18996,16 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } case 2: - p.SetState(841) + p.SetState(1082) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64((_la-7)) & ^0x3f) == 0 && ((int64(1)<<(_la-7))&577621836615933953) != 0) || ((int64((_la-85)) & ^0x3f) == 0 && ((int64(1)<<(_la-85))&246823180566529) != 0) { + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2305843013511807104) != 0) || ((int64((_la-66)) & ^0x3f) == 0 && ((int64(1)<<(_la-66))&-4611686018158951935) != 0) || ((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&3591) != 0) { { - p.SetState(840) + p.SetState(1081) var _x = p.sql_expr(0) @@ -14567,23 +19014,23 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(843) + p.SetState(1084) p.Match(KuneiformParserCOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(845) + p.SetState(1086) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64((_la-7)) & ^0x3f) == 0 && ((int64(1)<<(_la-7))&577621836615933953) != 0) || ((int64((_la-85)) & ^0x3f) == 0 && ((int64(1)<<(_la-85))&246823180566529) != 0) { + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2305843013511807104) != 0) || ((int64((_la-66)) & ^0x3f) == 0 && ((int64(1)<<(_la-66))&-4611686018158951935) != 0) || ((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&3591) != 0) { { - p.SetState(844) + p.SetState(1085) var _x = p.sql_expr(0) @@ -14596,19 +19043,19 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { goto errorExit } { - p.SetState(849) + p.SetState(1090) p.Match(KuneiformParserRBRACKET) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(851) + p.SetState(1092) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 118, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 141, p.GetParserRuleContext()) == 1 { { - p.SetState(850) + p.SetState(1091) p.Type_cast() } @@ -14619,14 +19066,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { case 11: localctx = NewCollate_sql_exprContext(p, NewSql_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(853) + p.SetState(1094) if !(p.Precpred(p.GetParserRuleContext(), 19)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", "")) goto errorExit } { - p.SetState(854) + p.SetState(1095) p.Match(KuneiformParserCOLLATE) if p.HasError() { // Recognition error - abort rule @@ -14634,20 +19081,20 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(855) + p.SetState(1096) p.Identifier() } case 12: localctx = NewIn_sql_exprContext(p, NewSql_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(856) + p.SetState(1097) if !(p.Precpred(p.GetParserRuleContext(), 8)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", "")) goto errorExit } - p.SetState(858) + p.SetState(1099) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14656,7 +19103,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { if _la == KuneiformParserNOT { { - p.SetState(857) + p.SetState(1098) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -14666,7 +19113,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } { - p.SetState(860) + p.SetState(1101) p.Match(KuneiformParserIN) if p.HasError() { // Recognition error - abort rule @@ -14674,14 +19121,14 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(861) + p.SetState(1102) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(864) + p.SetState(1105) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14690,13 +19137,13 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { switch p.GetTokenStream().LA(1) { case KuneiformParserLPAREN, KuneiformParserPLUS, KuneiformParserMINUS, KuneiformParserDOUBLE_QUOTE, KuneiformParserNULL, KuneiformParserNOT, KuneiformParserEXISTS, KuneiformParserCASE, KuneiformParserSTRING_, KuneiformParserTRUE, KuneiformParserFALSE, KuneiformParserDIGITS_, KuneiformParserBINARY_, KuneiformParserIDENTIFIER, KuneiformParserVARIABLE, KuneiformParserCONTEXTUAL_VARIABLE: { - p.SetState(862) + p.SetState(1103) p.Sql_expr_list() } case KuneiformParserSELECT: { - p.SetState(863) + p.SetState(1104) p.Select_statement() } @@ -14705,7 +19152,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { goto errorExit } { - p.SetState(866) + p.SetState(1107) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -14718,21 +19165,21 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { localctx.(*Is_sql_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_sql_expr) - p.SetState(868) + p.SetState(1109) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } { - p.SetState(869) + p.SetState(1110) p.Match(KuneiformParserIS) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(871) + p.SetState(1112) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14741,7 +19188,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { if _la == KuneiformParserNOT { { - p.SetState(870) + p.SetState(1111) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -14750,7 +19197,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } - p.SetState(879) + p.SetState(1120) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -14759,7 +19206,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { switch p.GetTokenStream().LA(1) { case KuneiformParserDISTINCT: { - p.SetState(873) + p.SetState(1114) p.Match(KuneiformParserDISTINCT) if p.HasError() { // Recognition error - abort rule @@ -14767,7 +19214,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(874) + p.SetState(1115) p.Match(KuneiformParserFROM) if p.HasError() { // Recognition error - abort rule @@ -14775,7 +19222,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } { - p.SetState(875) + p.SetState(1116) var _x = p.sql_expr(0) @@ -14784,7 +19231,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { case KuneiformParserNULL: { - p.SetState(876) + p.SetState(1117) p.Match(KuneiformParserNULL) if p.HasError() { // Recognition error - abort rule @@ -14794,7 +19241,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { case KuneiformParserTRUE: { - p.SetState(877) + p.SetState(1118) p.Match(KuneiformParserTRUE) if p.HasError() { // Recognition error - abort rule @@ -14804,7 +19251,7 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { case KuneiformParserFALSE: { - p.SetState(878) + p.SetState(1119) p.Match(KuneiformParserFALSE) if p.HasError() { // Recognition error - abort rule @@ -14822,12 +19269,12 @@ func (p *KuneiformParser) sql_expr(_p int) (localctx ISql_exprContext) { } } - p.SetState(885) + p.SetState(1126) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 124, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 147, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -15022,19 +19469,19 @@ func (s *WindowContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Window() (localctx IWindowContext) { localctx = NewWindowContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 88, KuneiformParserRULE_window) + p.EnterRule(localctx, 116, KuneiformParserRULE_window) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(886) + p.SetState(1127) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(890) + p.SetState(1131) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -15043,7 +19490,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { if _la == KuneiformParserPARTITION { { - p.SetState(887) + p.SetState(1128) p.Match(KuneiformParserPARTITION) if p.HasError() { // Recognition error - abort rule @@ -15051,7 +19498,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { } } { - p.SetState(888) + p.SetState(1129) p.Match(KuneiformParserBY) if p.HasError() { // Recognition error - abort rule @@ -15059,7 +19506,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { } } { - p.SetState(889) + p.SetState(1130) var _x = p.Sql_expr_list() @@ -15067,7 +19514,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { } } - p.SetState(902) + p.SetState(1143) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -15076,7 +19523,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { if _la == KuneiformParserORDER { { - p.SetState(892) + p.SetState(1133) p.Match(KuneiformParserORDER) if p.HasError() { // Recognition error - abort rule @@ -15084,7 +19531,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { } } { - p.SetState(893) + p.SetState(1134) p.Match(KuneiformParserBY) if p.HasError() { // Recognition error - abort rule @@ -15092,10 +19539,10 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { } } { - p.SetState(894) + p.SetState(1135) p.Ordering_term() } - p.SetState(899) + p.SetState(1140) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -15104,7 +19551,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { for _la == KuneiformParserCOMMA { { - p.SetState(895) + p.SetState(1136) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -15112,11 +19559,11 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { } } { - p.SetState(896) + p.SetState(1137) p.Ordering_term() } - p.SetState(901) + p.SetState(1142) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -15126,7 +19573,7 @@ func (p *KuneiformParser) Window() (localctx IWindowContext) { } { - p.SetState(904) + p.SetState(1145) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -15287,10 +19734,10 @@ func (s *When_then_clauseContext) Accept(visitor antlr.ParseTreeVisitor) interfa func (p *KuneiformParser) When_then_clause() (localctx IWhen_then_clauseContext) { localctx = NewWhen_then_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 90, KuneiformParserRULE_when_then_clause) + p.EnterRule(localctx, 118, KuneiformParserRULE_when_then_clause) p.EnterOuterAlt(localctx, 1) { - p.SetState(906) + p.SetState(1147) p.Match(KuneiformParserWHEN) if p.HasError() { // Recognition error - abort rule @@ -15298,14 +19745,14 @@ func (p *KuneiformParser) When_then_clause() (localctx IWhen_then_clauseContext) } } { - p.SetState(907) + p.SetState(1148) var _x = p.sql_expr(0) localctx.(*When_then_clauseContext).when_condition = _x } { - p.SetState(908) + p.SetState(1149) p.Match(KuneiformParserTHEN) if p.HasError() { // Recognition error - abort rule @@ -15313,7 +19760,7 @@ func (p *KuneiformParser) When_then_clause() (localctx IWhen_then_clauseContext) } } { - p.SetState(909) + p.SetState(1150) var _x = p.sql_expr(0) @@ -15451,15 +19898,15 @@ func (s *Sql_expr_listContext) Accept(visitor antlr.ParseTreeVisitor) interface{ func (p *KuneiformParser) Sql_expr_list() (localctx ISql_expr_listContext) { localctx = NewSql_expr_listContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 92, KuneiformParserRULE_sql_expr_list) + p.EnterRule(localctx, 120, KuneiformParserRULE_sql_expr_list) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(911) + p.SetState(1152) p.sql_expr(0) } - p.SetState(916) + p.SetState(1157) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -15468,7 +19915,7 @@ func (p *KuneiformParser) Sql_expr_list() (localctx ISql_expr_listContext) { for _la == KuneiformParserCOMMA { { - p.SetState(912) + p.SetState(1153) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -15476,11 +19923,11 @@ func (p *KuneiformParser) Sql_expr_list() (localctx ISql_expr_listContext) { } } { - p.SetState(913) + p.SetState(1154) p.sql_expr(0) } - p.SetState(918) + p.SetState(1159) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -15633,31 +20080,31 @@ func (s *Normal_call_sqlContext) Accept(visitor antlr.ParseTreeVisitor) interfac func (p *KuneiformParser) Sql_function_call() (localctx ISql_function_callContext) { localctx = NewSql_function_callContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 94, KuneiformParserRULE_sql_function_call) + p.EnterRule(localctx, 122, KuneiformParserRULE_sql_function_call) var _la int localctx = NewNormal_call_sqlContext(p, localctx) p.EnterOuterAlt(localctx, 1) { - p.SetState(919) + p.SetState(1160) p.Identifier() } { - p.SetState(920) + p.SetState(1161) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(926) + p.SetState(1167) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case KuneiformParserLPAREN, KuneiformParserPLUS, KuneiformParserMINUS, KuneiformParserDOUBLE_QUOTE, KuneiformParserNULL, KuneiformParserNOT, KuneiformParserEXISTS, KuneiformParserCASE, KuneiformParserDISTINCT, KuneiformParserSTRING_, KuneiformParserTRUE, KuneiformParserFALSE, KuneiformParserDIGITS_, KuneiformParserBINARY_, KuneiformParserIDENTIFIER, KuneiformParserVARIABLE, KuneiformParserCONTEXTUAL_VARIABLE: - p.SetState(922) + p.SetState(1163) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -15666,7 +20113,7 @@ func (p *KuneiformParser) Sql_function_call() (localctx ISql_function_callContex if _la == KuneiformParserDISTINCT { { - p.SetState(921) + p.SetState(1162) p.Match(KuneiformParserDISTINCT) if p.HasError() { // Recognition error - abort rule @@ -15676,13 +20123,13 @@ func (p *KuneiformParser) Sql_function_call() (localctx ISql_function_callContex } { - p.SetState(924) + p.SetState(1165) p.Sql_expr_list() } case KuneiformParserSTAR: { - p.SetState(925) + p.SetState(1166) p.Match(KuneiformParserSTAR) if p.HasError() { // Recognition error - abort rule @@ -15695,7 +20142,7 @@ func (p *KuneiformParser) Sql_function_call() (localctx ISql_function_callContex default: } { - p.SetState(928) + p.SetState(1169) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -15834,24 +20281,24 @@ func (s *Action_blockContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (p *KuneiformParser) Action_block() (localctx IAction_blockContext) { localctx = NewAction_blockContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 96, KuneiformParserRULE_action_block) + p.EnterRule(localctx, 124, KuneiformParserRULE_action_block) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(935) + p.SetState(1176) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for _la == KuneiformParserDELETE || _la == KuneiformParserUPDATE || ((int64((_la-84)) & ^0x3f) == 0 && ((int64(1)<<(_la-84))&492581209245185) != 0) { + for _la == KuneiformParserDELETE || _la == KuneiformParserUPDATE || ((int64((_la-93)) & ^0x3f) == 0 && ((int64(1)<<(_la-93))&492581209245185) != 0) { { - p.SetState(930) + p.SetState(1171) p.Action_statement() } { - p.SetState(931) + p.SetState(1172) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -15859,7 +20306,7 @@ func (p *KuneiformParser) Action_block() (localctx IAction_blockContext) { } } - p.SetState(937) + p.SetState(1178) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -16120,21 +20567,21 @@ func (s *Sql_actionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) { localctx = NewAction_statementContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 98, KuneiformParserRULE_action_statement) + p.EnterRule(localctx, 126, KuneiformParserRULE_action_statement) var _la int - p.SetState(958) + p.SetState(1199) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 158, p.GetParserRuleContext()) { case 1: localctx = NewSql_actionContext(p, localctx) p.EnterOuterAlt(localctx, 1) { - p.SetState(938) + p.SetState(1179) p.Sql_statement() } @@ -16142,7 +20589,7 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) localctx = NewLocal_actionContext(p, localctx) p.EnterOuterAlt(localctx, 2) { - p.SetState(939) + p.SetState(1180) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -16150,29 +20597,29 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) } } { - p.SetState(940) + p.SetState(1181) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(942) + p.SetState(1183) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&148618787706374280) != 0) || ((int64((_la-119)) & ^0x3f) == 0 && ((int64(1)<<(_la-119))&14367) != 0) { + if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-8935141660702670575) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&14367) != 0) { { - p.SetState(941) + p.SetState(1182) p.Procedure_expr_list() } } { - p.SetState(944) + p.SetState(1185) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -16183,7 +20630,7 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) case 3: localctx = NewExtension_actionContext(p, localctx) p.EnterOuterAlt(localctx, 3) - p.SetState(948) + p.SetState(1189) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -16192,11 +20639,11 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) if _la == KuneiformParserVARIABLE || _la == KuneiformParserCONTEXTUAL_VARIABLE { { - p.SetState(945) + p.SetState(1186) p.Variable_list() } { - p.SetState(946) + p.SetState(1187) p.Match(KuneiformParserEQUALS) if p.HasError() { // Recognition error - abort rule @@ -16206,7 +20653,7 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) } { - p.SetState(950) + p.SetState(1191) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -16214,7 +20661,7 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) } } { - p.SetState(951) + p.SetState(1192) p.Match(KuneiformParserPERIOD) if p.HasError() { // Recognition error - abort rule @@ -16222,7 +20669,7 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) } } { - p.SetState(952) + p.SetState(1193) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -16230,29 +20677,29 @@ func (p *KuneiformParser) Action_statement() (localctx IAction_statementContext) } } { - p.SetState(953) + p.SetState(1194) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(955) + p.SetState(1196) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&148618787706374280) != 0) || ((int64((_la-119)) & ^0x3f) == 0 && ((int64(1)<<(_la-119))&14367) != 0) { + if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-8935141660702670575) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&14367) != 0) { { - p.SetState(954) + p.SetState(1195) p.Procedure_expr_list() } } { - p.SetState(957) + p.SetState(1198) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -16385,24 +20832,24 @@ func (s *Procedure_blockContext) Accept(visitor antlr.ParseTreeVisitor) interfac func (p *KuneiformParser) Procedure_block() (localctx IProcedure_blockContext) { localctx = NewProcedure_blockContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 100, KuneiformParserRULE_procedure_block) + p.EnterRule(localctx, 128, KuneiformParserRULE_procedure_block) var _la int p.EnterOuterAlt(localctx, 1) - p.SetState(963) + p.SetState(1204) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&175640386007468168) != 0) || ((int64((_la-84)) & ^0x3f) == 0 && ((int64(1)<<(_la-84))&493646788953601) != 0) { + for ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-7205759403725291247) != 0) || ((int64((_la-93)) & ^0x3f) == 0 && ((int64(1)<<(_la-93))&493646788953601) != 0) { { - p.SetState(960) + p.SetState(1201) p.Proc_statement() } - p.SetState(965) + p.SetState(1206) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -17427,27 +21874,27 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex localctx = NewProcedure_exprContext(p, p.GetParserRuleContext(), _parentState) var _prevctx IProcedure_exprContext = localctx var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. - _startState := 102 - p.EnterRecursionRule(localctx, 102, KuneiformParserRULE_procedure_expr, _p) + _startState := 130 + p.EnterRecursionRule(localctx, 130, KuneiformParserRULE_procedure_expr, _p) var _la int var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(997) + p.SetState(1238) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 143, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 166, p.GetParserRuleContext()) { case 1: localctx = NewParen_procedure_exprContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(967) + p.SetState(1208) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule @@ -17455,23 +21902,23 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(968) + p.SetState(1209) p.procedure_expr(0) } { - p.SetState(969) + p.SetState(1210) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(971) + p.SetState(1212) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 137, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 160, p.GetParserRuleContext()) == 1 { { - p.SetState(970) + p.SetState(1211) p.Type_cast() } @@ -17484,7 +21931,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(973) + p.SetState(1214) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&3147776) != 0) { @@ -17495,7 +21942,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(974) + p.SetState(1215) p.procedure_expr(13) } @@ -17504,15 +21951,15 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(975) + p.SetState(1216) p.Literal() } - p.SetState(977) + p.SetState(1218) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 138, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 161, p.GetParserRuleContext()) == 1 { { - p.SetState(976) + p.SetState(1217) p.Type_cast() } @@ -17525,15 +21972,15 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(979) + p.SetState(1220) p.Procedure_function_call() } - p.SetState(981) + p.SetState(1222) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 139, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 162, p.GetParserRuleContext()) == 1 { { - p.SetState(980) + p.SetState(1221) p.Type_cast() } @@ -17546,15 +21993,15 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(983) + p.SetState(1224) p.Variable() } - p.SetState(985) + p.SetState(1226) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 140, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 163, p.GetParserRuleContext()) == 1 { { - p.SetState(984) + p.SetState(1225) p.Type_cast() } @@ -17567,41 +22014,41 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(987) + p.SetState(1228) p.Match(KuneiformParserLBRACKET) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(989) + p.SetState(1230) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&148618787706374280) != 0) || ((int64((_la-119)) & ^0x3f) == 0 && ((int64(1)<<(_la-119))&14367) != 0) { + if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-8935141660702670575) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&14367) != 0) { { - p.SetState(988) + p.SetState(1229) p.Procedure_expr_list() } } { - p.SetState(991) + p.SetState(1232) p.Match(KuneiformParserRBRACKET) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(993) + p.SetState(1234) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 142, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 165, p.GetParserRuleContext()) == 1 { { - p.SetState(992) + p.SetState(1233) p.Type_cast() } @@ -17615,7 +22062,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex _prevctx = localctx { - p.SetState(995) + p.SetState(1236) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -17624,7 +22071,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } { - p.SetState(996) + p.SetState(1237) p.procedure_expr(3) } @@ -17632,12 +22079,12 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(1054) + p.SetState(1295) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 152, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 175, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -17647,24 +22094,24 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(1052) + p.SetState(1293) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 151, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 174, p.GetParserRuleContext()) { case 1: localctx = NewProcedure_expr_arithmeticContext(p, NewProcedure_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(999) + p.SetState(1240) if !(p.Precpred(p.GetParserRuleContext(), 12)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) goto errorExit } { - p.SetState(1000) + p.SetState(1241) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&4734976) != 0) { @@ -17675,21 +22122,21 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1001) + p.SetState(1242) p.procedure_expr(13) } case 2: localctx = NewProcedure_expr_arithmeticContext(p, NewProcedure_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1002) + p.SetState(1243) if !(p.Precpred(p.GetParserRuleContext(), 11)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) goto errorExit } { - p.SetState(1003) + p.SetState(1244) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserPLUS || _la == KuneiformParserMINUS) { @@ -17700,21 +22147,21 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1004) + p.SetState(1245) p.procedure_expr(12) } case 3: localctx = NewProcedure_expr_arithmeticContext(p, NewProcedure_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1005) + p.SetState(1246) if !(p.Precpred(p.GetParserRuleContext(), 6)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) goto errorExit } { - p.SetState(1006) + p.SetState(1247) p.Match(KuneiformParserCONCAT) if p.HasError() { // Recognition error - abort rule @@ -17722,21 +22169,21 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1007) + p.SetState(1248) p.procedure_expr(7) } case 4: localctx = NewComparison_procedure_exprContext(p, NewProcedure_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1008) + p.SetState(1249) if !(p.Precpred(p.GetParserRuleContext(), 5)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) goto errorExit } { - p.SetState(1009) + p.SetState(1250) _la = p.GetTokenStream().LA(1) if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&260145152) != 0) { @@ -17747,21 +22194,21 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1010) + p.SetState(1251) p.procedure_expr(6) } case 5: localctx = NewLogical_procedure_exprContext(p, NewProcedure_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1011) + p.SetState(1252) if !(p.Precpred(p.GetParserRuleContext(), 2)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) goto errorExit } { - p.SetState(1012) + p.SetState(1253) p.Match(KuneiformParserAND) if p.HasError() { // Recognition error - abort rule @@ -17769,21 +22216,21 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1013) + p.SetState(1254) p.procedure_expr(3) } case 6: localctx = NewLogical_procedure_exprContext(p, NewProcedure_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1014) + p.SetState(1255) if !(p.Precpred(p.GetParserRuleContext(), 1)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) goto errorExit } { - p.SetState(1015) + p.SetState(1256) p.Match(KuneiformParserOR) if p.HasError() { // Recognition error - abort rule @@ -17791,21 +22238,21 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1016) + p.SetState(1257) p.procedure_expr(2) } case 7: localctx = NewField_access_procedure_exprContext(p, NewProcedure_exprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1017) + p.SetState(1258) if !(p.Precpred(p.GetParserRuleContext(), 15)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) goto errorExit } { - p.SetState(1018) + p.SetState(1259) p.Match(KuneiformParserPERIOD) if p.HasError() { // Recognition error - abort rule @@ -17813,19 +22260,19 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1019) + p.SetState(1260) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1021) + p.SetState(1262) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 144, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 167, p.GetParserRuleContext()) == 1 { { - p.SetState(1020) + p.SetState(1261) p.Type_cast() } @@ -17838,30 +22285,30 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex localctx.(*Array_access_procedure_exprContext).array_element = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1023) + p.SetState(1264) if !(p.Precpred(p.GetParserRuleContext(), 14)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) goto errorExit } { - p.SetState(1024) + p.SetState(1265) p.Match(KuneiformParserLBRACKET) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1033) + p.SetState(1274) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 147, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 170, p.GetParserRuleContext()) { case 1: { - p.SetState(1025) + p.SetState(1266) var _x = p.procedure_expr(0) @@ -17869,16 +22316,16 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } case 2: - p.SetState(1027) + p.SetState(1268) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&148618787706374280) != 0) || ((int64((_la-119)) & ^0x3f) == 0 && ((int64(1)<<(_la-119))&14367) != 0) { + if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-8935141660702670575) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&14367) != 0) { { - p.SetState(1026) + p.SetState(1267) var _x = p.procedure_expr(0) @@ -17887,23 +22334,23 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } { - p.SetState(1029) + p.SetState(1270) p.Match(KuneiformParserCOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1031) + p.SetState(1272) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&148618787706374280) != 0) || ((int64((_la-119)) & ^0x3f) == 0 && ((int64(1)<<(_la-119))&14367) != 0) { + if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-8935141660702670575) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&14367) != 0) { { - p.SetState(1030) + p.SetState(1271) var _x = p.procedure_expr(0) @@ -17916,19 +22363,19 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex goto errorExit } { - p.SetState(1035) + p.SetState(1276) p.Match(KuneiformParserRBRACKET) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1037) + p.SetState(1278) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 148, p.GetParserRuleContext()) == 1 { + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 171, p.GetParserRuleContext()) == 1 { { - p.SetState(1036) + p.SetState(1277) p.Type_cast() } @@ -17941,21 +22388,21 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex localctx.(*Is_procedure_exprContext).left = _prevctx p.PushNewRecursionContext(localctx, _startState, KuneiformParserRULE_procedure_expr) - p.SetState(1039) + p.SetState(1280) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } { - p.SetState(1040) + p.SetState(1281) p.Match(KuneiformParserIS) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1042) + p.SetState(1283) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -17964,7 +22411,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex if _la == KuneiformParserNOT { { - p.SetState(1041) + p.SetState(1282) p.Match(KuneiformParserNOT) if p.HasError() { // Recognition error - abort rule @@ -17973,7 +22420,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } - p.SetState(1050) + p.SetState(1291) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -17982,7 +22429,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex switch p.GetTokenStream().LA(1) { case KuneiformParserDISTINCT: { - p.SetState(1044) + p.SetState(1285) p.Match(KuneiformParserDISTINCT) if p.HasError() { // Recognition error - abort rule @@ -17990,7 +22437,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1045) + p.SetState(1286) p.Match(KuneiformParserFROM) if p.HasError() { // Recognition error - abort rule @@ -17998,7 +22445,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } { - p.SetState(1046) + p.SetState(1287) var _x = p.procedure_expr(0) @@ -18007,7 +22454,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex case KuneiformParserNULL: { - p.SetState(1047) + p.SetState(1288) p.Match(KuneiformParserNULL) if p.HasError() { // Recognition error - abort rule @@ -18017,7 +22464,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex case KuneiformParserTRUE: { - p.SetState(1048) + p.SetState(1289) p.Match(KuneiformParserTRUE) if p.HasError() { // Recognition error - abort rule @@ -18027,7 +22474,7 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex case KuneiformParserFALSE: { - p.SetState(1049) + p.SetState(1290) p.Match(KuneiformParserFALSE) if p.HasError() { // Recognition error - abort rule @@ -18045,12 +22492,12 @@ func (p *KuneiformParser) procedure_expr(_p int) (localctx IProcedure_exprContex } } - p.SetState(1056) + p.SetState(1297) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 152, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 175, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -18187,15 +22634,15 @@ func (s *Procedure_expr_listContext) Accept(visitor antlr.ParseTreeVisitor) inte func (p *KuneiformParser) Procedure_expr_list() (localctx IProcedure_expr_listContext) { localctx = NewProcedure_expr_listContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 104, KuneiformParserRULE_procedure_expr_list) + p.EnterRule(localctx, 132, KuneiformParserRULE_procedure_expr_list) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(1057) + p.SetState(1298) p.procedure_expr(0) } - p.SetState(1062) + p.SetState(1303) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -18204,7 +22651,7 @@ func (p *KuneiformParser) Procedure_expr_list() (localctx IProcedure_expr_listCo for _la == KuneiformParserCOMMA { { - p.SetState(1058) + p.SetState(1299) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -18212,11 +22659,11 @@ func (p *KuneiformParser) Procedure_expr_list() (localctx IProcedure_expr_listCo } } { - p.SetState(1059) + p.SetState(1300) p.procedure_expr(0) } - p.SetState(1064) + p.SetState(1305) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19028,21 +23475,21 @@ func (s *Stmt_sqlContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewProc_statementContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 106, KuneiformParserRULE_proc_statement) + p.EnterRule(localctx, 134, KuneiformParserRULE_proc_statement) var _la int - p.SetState(1145) + p.SetState(1386) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 163, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 186, p.GetParserRuleContext()) { case 1: localctx = NewStmt_variable_declarationContext(p, localctx) p.EnterOuterAlt(localctx, 1) { - p.SetState(1065) + p.SetState(1306) p.Match(KuneiformParserVARIABLE) if p.HasError() { // Recognition error - abort rule @@ -19050,11 +23497,11 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1066) + p.SetState(1307) p.Type_() } { - p.SetState(1067) + p.SetState(1308) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -19065,7 +23512,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { case 2: localctx = NewStmt_procedure_callContext(p, localctx) p.EnterOuterAlt(localctx, 2) - p.SetState(1079) + p.SetState(1320) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19074,11 +23521,11 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { if _la == KuneiformParserUNDERSCORE || _la == KuneiformParserVARIABLE { { - p.SetState(1069) + p.SetState(1310) p.Variable_or_underscore() } - p.SetState(1074) + p.SetState(1315) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19087,7 +23534,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { for _la == KuneiformParserCOMMA { { - p.SetState(1070) + p.SetState(1311) p.Match(KuneiformParserCOMMA) if p.HasError() { // Recognition error - abort rule @@ -19096,11 +23543,11 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } { - p.SetState(1071) + p.SetState(1312) p.Variable_or_underscore() } - p.SetState(1076) + p.SetState(1317) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19108,7 +23555,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { _la = p.GetTokenStream().LA(1) } { - p.SetState(1077) + p.SetState(1318) p.Match(KuneiformParserASSIGN) if p.HasError() { // Recognition error - abort rule @@ -19118,11 +23565,11 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } { - p.SetState(1081) + p.SetState(1322) p.Procedure_function_call() } { - p.SetState(1082) + p.SetState(1323) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -19134,10 +23581,10 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewStmt_variable_assignmentContext(p, localctx) p.EnterOuterAlt(localctx, 3) { - p.SetState(1084) + p.SetState(1325) p.procedure_expr(0) } - p.SetState(1086) + p.SetState(1327) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19146,13 +23593,13 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { if _la == KuneiformParserIDENTIFIER { { - p.SetState(1085) + p.SetState(1326) p.Type_() } } { - p.SetState(1088) + p.SetState(1329) p.Match(KuneiformParserASSIGN) if p.HasError() { // Recognition error - abort rule @@ -19160,11 +23607,11 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1089) + p.SetState(1330) p.procedure_expr(0) } { - p.SetState(1090) + p.SetState(1331) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -19176,7 +23623,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewStmt_for_loopContext(p, localctx) p.EnterOuterAlt(localctx, 4) { - p.SetState(1092) + p.SetState(1333) p.Match(KuneiformParserFOR) if p.HasError() { // Recognition error - abort rule @@ -19184,7 +23631,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1093) + p.SetState(1334) var _m = p.Match(KuneiformParserVARIABLE) @@ -19195,29 +23642,29 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1094) + p.SetState(1335) p.Match(KuneiformParserIN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1098) + p.SetState(1339) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 157, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 180, p.GetParserRuleContext()) { case 1: { - p.SetState(1095) + p.SetState(1336) p.Range_() } case 2: { - p.SetState(1096) + p.SetState(1337) var _x = p.Variable() @@ -19226,7 +23673,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { case 3: { - p.SetState(1097) + p.SetState(1338) p.Sql_statement() } @@ -19234,27 +23681,27 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { goto errorExit } { - p.SetState(1100) + p.SetState(1341) p.Match(KuneiformParserLBRACE) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1104) + p.SetState(1345) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&175640386007468168) != 0) || ((int64((_la-84)) & ^0x3f) == 0 && ((int64(1)<<(_la-84))&493646788953601) != 0) { + for ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-7205759403725291247) != 0) || ((int64((_la-93)) & ^0x3f) == 0 && ((int64(1)<<(_la-93))&493646788953601) != 0) { { - p.SetState(1101) + p.SetState(1342) p.Proc_statement() } - p.SetState(1106) + p.SetState(1347) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19262,7 +23709,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { _la = p.GetTokenStream().LA(1) } { - p.SetState(1107) + p.SetState(1348) p.Match(KuneiformParserRBRACE) if p.HasError() { // Recognition error - abort rule @@ -19274,7 +23721,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewStmt_ifContext(p, localctx) p.EnterOuterAlt(localctx, 5) { - p.SetState(1109) + p.SetState(1350) p.Match(KuneiformParserIF) if p.HasError() { // Recognition error - abort rule @@ -19282,10 +23729,10 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1110) + p.SetState(1351) p.If_then_block() } - p.SetState(1115) + p.SetState(1356) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19294,7 +23741,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { for _la == KuneiformParserELSEIF { { - p.SetState(1111) + p.SetState(1352) p.Match(KuneiformParserELSEIF) if p.HasError() { // Recognition error - abort rule @@ -19302,18 +23749,18 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1112) + p.SetState(1353) p.If_then_block() } - p.SetState(1117) + p.SetState(1358) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } - p.SetState(1127) + p.SetState(1368) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19322,7 +23769,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { if _la == KuneiformParserELSE { { - p.SetState(1118) + p.SetState(1359) p.Match(KuneiformParserELSE) if p.HasError() { // Recognition error - abort rule @@ -19330,27 +23777,27 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1119) + p.SetState(1360) p.Match(KuneiformParserLBRACE) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1123) + p.SetState(1364) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&175640386007468168) != 0) || ((int64((_la-84)) & ^0x3f) == 0 && ((int64(1)<<(_la-84))&493646788953601) != 0) { + for ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-7205759403725291247) != 0) || ((int64((_la-93)) & ^0x3f) == 0 && ((int64(1)<<(_la-93))&493646788953601) != 0) { { - p.SetState(1120) + p.SetState(1361) p.Proc_statement() } - p.SetState(1125) + p.SetState(1366) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19358,7 +23805,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { _la = p.GetTokenStream().LA(1) } { - p.SetState(1126) + p.SetState(1367) p.Match(KuneiformParserRBRACE) if p.HasError() { // Recognition error - abort rule @@ -19372,11 +23819,11 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewStmt_sqlContext(p, localctx) p.EnterOuterAlt(localctx, 6) { - p.SetState(1129) + p.SetState(1370) p.Sql_statement() } { - p.SetState(1130) + p.SetState(1371) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -19388,7 +23835,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewStmt_breakContext(p, localctx) p.EnterOuterAlt(localctx, 7) { - p.SetState(1132) + p.SetState(1373) p.Match(KuneiformParserBREAK) if p.HasError() { // Recognition error - abort rule @@ -19396,7 +23843,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1133) + p.SetState(1374) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -19408,14 +23855,14 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewStmt_returnContext(p, localctx) p.EnterOuterAlt(localctx, 8) { - p.SetState(1134) + p.SetState(1375) p.Match(KuneiformParserRETURN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1137) + p.SetState(1378) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19423,13 +23870,13 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { switch p.GetTokenStream().LA(1) { case KuneiformParserLBRACKET, KuneiformParserLPAREN, KuneiformParserEXCL, KuneiformParserPLUS, KuneiformParserMINUS, KuneiformParserNULL, KuneiformParserNOT, KuneiformParserSTRING_, KuneiformParserTRUE, KuneiformParserFALSE, KuneiformParserDIGITS_, KuneiformParserBINARY_, KuneiformParserIDENTIFIER, KuneiformParserVARIABLE, KuneiformParserCONTEXTUAL_VARIABLE: { - p.SetState(1135) + p.SetState(1376) p.Procedure_expr_list() } case KuneiformParserDELETE, KuneiformParserUPDATE, KuneiformParserWITH, KuneiformParserSELECT, KuneiformParserINSERT: { - p.SetState(1136) + p.SetState(1377) p.Sql_statement() } @@ -19438,7 +23885,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { default: } { - p.SetState(1139) + p.SetState(1380) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -19450,7 +23897,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { localctx = NewStmt_return_nextContext(p, localctx) p.EnterOuterAlt(localctx, 9) { - p.SetState(1140) + p.SetState(1381) p.Match(KuneiformParserRETURN) if p.HasError() { // Recognition error - abort rule @@ -19458,7 +23905,7 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1141) + p.SetState(1382) p.Match(KuneiformParserNEXT) if p.HasError() { // Recognition error - abort rule @@ -19466,11 +23913,11 @@ func (p *KuneiformParser) Proc_statement() (localctx IProc_statementContext) { } } { - p.SetState(1142) + p.SetState(1383) p.Procedure_expr_list() } { - p.SetState(1143) + p.SetState(1384) p.Match(KuneiformParserSCOL) if p.HasError() { // Recognition error - abort rule @@ -19570,12 +24017,12 @@ func (s *Variable_or_underscoreContext) Accept(visitor antlr.ParseTreeVisitor) i func (p *KuneiformParser) Variable_or_underscore() (localctx IVariable_or_underscoreContext) { localctx = NewVariable_or_underscoreContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 108, KuneiformParserRULE_variable_or_underscore) + p.EnterRule(localctx, 136, KuneiformParserRULE_variable_or_underscore) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(1147) + p.SetState(1388) _la = p.GetTokenStream().LA(1) if !(_la == KuneiformParserUNDERSCORE || _la == KuneiformParserVARIABLE) { @@ -19711,13 +24158,13 @@ func (s *Normal_call_procedureContext) Accept(visitor antlr.ParseTreeVisitor) in func (p *KuneiformParser) Procedure_function_call() (localctx IProcedure_function_callContext) { localctx = NewProcedure_function_callContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 110, KuneiformParserRULE_procedure_function_call) + p.EnterRule(localctx, 138, KuneiformParserRULE_procedure_function_call) var _la int localctx = NewNormal_call_procedureContext(p, localctx) p.EnterOuterAlt(localctx, 1) { - p.SetState(1149) + p.SetState(1390) p.Match(KuneiformParserIDENTIFIER) if p.HasError() { // Recognition error - abort rule @@ -19725,29 +24172,29 @@ func (p *KuneiformParser) Procedure_function_call() (localctx IProcedure_functio } } { - p.SetState(1150) + p.SetState(1391) p.Match(KuneiformParserLPAREN) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1152) + p.SetState(1393) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&148618787706374280) != 0) || ((int64((_la-119)) & ^0x3f) == 0 && ((int64(1)<<(_la-119))&14367) != 0) { + if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-8935141660702670575) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&14367) != 0) { { - p.SetState(1151) + p.SetState(1392) p.Procedure_expr_list() } } { - p.SetState(1154) + p.SetState(1395) p.Match(KuneiformParserRPAREN) if p.HasError() { // Recognition error - abort rule @@ -19903,36 +24350,36 @@ func (s *If_then_blockContext) Accept(visitor antlr.ParseTreeVisitor) interface{ func (p *KuneiformParser) If_then_block() (localctx IIf_then_blockContext) { localctx = NewIf_then_blockContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 112, KuneiformParserRULE_if_then_block) + p.EnterRule(localctx, 140, KuneiformParserRULE_if_then_block) var _la int p.EnterOuterAlt(localctx, 1) { - p.SetState(1156) + p.SetState(1397) p.procedure_expr(0) } { - p.SetState(1157) + p.SetState(1398) p.Match(KuneiformParserLBRACE) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(1161) + p.SetState(1402) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&175640386007468168) != 0) || ((int64((_la-84)) & ^0x3f) == 0 && ((int64(1)<<(_la-84))&493646788953601) != 0) { + for ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-7205759403725291247) != 0) || ((int64((_la-93)) & ^0x3f) == 0 && ((int64(1)<<(_la-93))&493646788953601) != 0) { { - p.SetState(1158) + p.SetState(1399) p.Proc_statement() } - p.SetState(1163) + p.SetState(1404) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -19940,7 +24387,7 @@ func (p *KuneiformParser) If_then_block() (localctx IIf_then_blockContext) { _la = p.GetTokenStream().LA(1) } { - p.SetState(1164) + p.SetState(1405) p.Match(KuneiformParserRBRACE) if p.HasError() { // Recognition error - abort rule @@ -20074,14 +24521,14 @@ func (s *RangeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *KuneiformParser) Range_() (localctx IRangeContext) { localctx = NewRangeContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 114, KuneiformParserRULE_range) + p.EnterRule(localctx, 142, KuneiformParserRULE_range) p.EnterOuterAlt(localctx, 1) { - p.SetState(1166) + p.SetState(1407) p.procedure_expr(0) } { - p.SetState(1167) + p.SetState(1408) p.Match(KuneiformParserRANGE) if p.HasError() { // Recognition error - abort rule @@ -20089,7 +24536,7 @@ func (p *KuneiformParser) Range_() (localctx IRangeContext) { } } { - p.SetState(1168) + p.SetState(1409) p.procedure_expr(0) } @@ -20108,14 +24555,14 @@ errorExit: func (p *KuneiformParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { switch ruleIndex { - case 43: + case 57: var t *Sql_exprContext = nil if localctx != nil { t = localctx.(*Sql_exprContext) } return p.Sql_expr_Sempred(t, predIndex) - case 51: + case 65: var t *Procedure_exprContext = nil if localctx != nil { t = localctx.(*Procedure_exprContext) diff --git a/parse/gen/kuneiformparser_base_visitor.go b/parse/gen/kuneiformparser_base_visitor.go index 6890df882..54fb1b8da 100644 --- a/parse/gen/kuneiformparser_base_visitor.go +++ b/parse/gen/kuneiformparser_base_visitor.go @@ -95,10 +95,18 @@ func (v *BaseKuneiformParserVisitor) VisitColumn_def(ctx *Column_defContext) int return v.VisitChildren(ctx) } +func (v *BaseKuneiformParserVisitor) VisitTable_column_def(ctx *Table_column_defContext) interface{} { + return v.VisitChildren(ctx) +} + func (v *BaseKuneiformParserVisitor) VisitIndex_def(ctx *Index_defContext) interface{} { return v.VisitChildren(ctx) } +func (v *BaseKuneiformParserVisitor) VisitTable_index_def(ctx *Table_index_defContext) interface{} { + return v.VisitChildren(ctx) +} + func (v *BaseKuneiformParserVisitor) VisitForeign_key_def(ctx *Foreign_key_defContext) interface{} { return v.VisitChildren(ctx) } @@ -123,6 +131,18 @@ func (v *BaseKuneiformParserVisitor) VisitConstraint(ctx *ConstraintContext) int return v.VisitChildren(ctx) } +func (v *BaseKuneiformParserVisitor) VisitInline_constraint(ctx *Inline_constraintContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitFk_action(ctx *Fk_actionContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitFk_constraint(ctx *Fk_constraintContext) interface{} { + return v.VisitChildren(ctx) +} + func (v *BaseKuneiformParserVisitor) VisitAccess_modifier(ctx *Access_modifierContext) interface{} { return v.VisitChildren(ctx) } @@ -139,7 +159,11 @@ func (v *BaseKuneiformParserVisitor) VisitProcedure_return(ctx *Procedure_return return v.VisitChildren(ctx) } -func (v *BaseKuneiformParserVisitor) VisitSql(ctx *SqlContext) interface{} { +func (v *BaseKuneiformParserVisitor) VisitSql_stmt(ctx *Sql_stmtContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitDdl_stmt(ctx *Ddl_stmtContext) interface{} { return v.VisitChildren(ctx) } @@ -151,6 +175,66 @@ func (v *BaseKuneiformParserVisitor) VisitCommon_table_expression(ctx *Common_ta return v.VisitChildren(ctx) } +func (v *BaseKuneiformParserVisitor) VisitCreate_table_statement(ctx *Create_table_statementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitTable_constraint_def(ctx *Table_constraint_defContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitOpt_drop_behavior(ctx *Opt_drop_behaviorContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitDrop_table_statement(ctx *Drop_table_statementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitAlter_table_statement(ctx *Alter_table_statementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitAdd_column_constraint(ctx *Add_column_constraintContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitDrop_column_constraint(ctx *Drop_column_constraintContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitAdd_column(ctx *Add_columnContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitDrop_column(ctx *Drop_columnContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitRename_column(ctx *Rename_columnContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitRename_table(ctx *Rename_tableContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitAdd_table_constraint(ctx *Add_table_constraintContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitDrop_table_constraint(ctx *Drop_table_constraintContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitCreate_index_statement(ctx *Create_index_statementContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BaseKuneiformParserVisitor) VisitDrop_index_statement(ctx *Drop_index_statementContext) interface{} { + return v.VisitChildren(ctx) +} + func (v *BaseKuneiformParserVisitor) VisitSelect_statement(ctx *Select_statementContext) interface{} { return v.VisitChildren(ctx) } diff --git a/parse/gen/kuneiformparser_visitor.go b/parse/gen/kuneiformparser_visitor.go index 295e1494a..20943c244 100644 --- a/parse/gen/kuneiformparser_visitor.go +++ b/parse/gen/kuneiformparser_visitor.go @@ -73,9 +73,15 @@ type KuneiformParserVisitor interface { // Visit a parse tree produced by KuneiformParser#column_def. VisitColumn_def(ctx *Column_defContext) interface{} + // Visit a parse tree produced by KuneiformParser#table_column_def. + VisitTable_column_def(ctx *Table_column_defContext) interface{} + // Visit a parse tree produced by KuneiformParser#index_def. VisitIndex_def(ctx *Index_defContext) interface{} + // Visit a parse tree produced by KuneiformParser#table_index_def. + VisitTable_index_def(ctx *Table_index_defContext) interface{} + // Visit a parse tree produced by KuneiformParser#foreign_key_def. VisitForeign_key_def(ctx *Foreign_key_defContext) interface{} @@ -94,6 +100,15 @@ type KuneiformParserVisitor interface { // Visit a parse tree produced by KuneiformParser#constraint. VisitConstraint(ctx *ConstraintContext) interface{} + // Visit a parse tree produced by KuneiformParser#inline_constraint. + VisitInline_constraint(ctx *Inline_constraintContext) interface{} + + // Visit a parse tree produced by KuneiformParser#fk_action. + VisitFk_action(ctx *Fk_actionContext) interface{} + + // Visit a parse tree produced by KuneiformParser#fk_constraint. + VisitFk_constraint(ctx *Fk_constraintContext) interface{} + // Visit a parse tree produced by KuneiformParser#access_modifier. VisitAccess_modifier(ctx *Access_modifierContext) interface{} @@ -106,8 +121,11 @@ type KuneiformParserVisitor interface { // Visit a parse tree produced by KuneiformParser#procedure_return. VisitProcedure_return(ctx *Procedure_returnContext) interface{} - // Visit a parse tree produced by KuneiformParser#sql. - VisitSql(ctx *SqlContext) interface{} + // Visit a parse tree produced by KuneiformParser#sql_stmt. + VisitSql_stmt(ctx *Sql_stmtContext) interface{} + + // Visit a parse tree produced by KuneiformParser#ddl_stmt. + VisitDdl_stmt(ctx *Ddl_stmtContext) interface{} // Visit a parse tree produced by KuneiformParser#sql_statement. VisitSql_statement(ctx *Sql_statementContext) interface{} @@ -115,6 +133,51 @@ type KuneiformParserVisitor interface { // Visit a parse tree produced by KuneiformParser#common_table_expression. VisitCommon_table_expression(ctx *Common_table_expressionContext) interface{} + // Visit a parse tree produced by KuneiformParser#create_table_statement. + VisitCreate_table_statement(ctx *Create_table_statementContext) interface{} + + // Visit a parse tree produced by KuneiformParser#table_constraint_def. + VisitTable_constraint_def(ctx *Table_constraint_defContext) interface{} + + // Visit a parse tree produced by KuneiformParser#opt_drop_behavior. + VisitOpt_drop_behavior(ctx *Opt_drop_behaviorContext) interface{} + + // Visit a parse tree produced by KuneiformParser#drop_table_statement. + VisitDrop_table_statement(ctx *Drop_table_statementContext) interface{} + + // Visit a parse tree produced by KuneiformParser#alter_table_statement. + VisitAlter_table_statement(ctx *Alter_table_statementContext) interface{} + + // Visit a parse tree produced by KuneiformParser#add_column_constraint. + VisitAdd_column_constraint(ctx *Add_column_constraintContext) interface{} + + // Visit a parse tree produced by KuneiformParser#drop_column_constraint. + VisitDrop_column_constraint(ctx *Drop_column_constraintContext) interface{} + + // Visit a parse tree produced by KuneiformParser#add_column. + VisitAdd_column(ctx *Add_columnContext) interface{} + + // Visit a parse tree produced by KuneiformParser#drop_column. + VisitDrop_column(ctx *Drop_columnContext) interface{} + + // Visit a parse tree produced by KuneiformParser#rename_column. + VisitRename_column(ctx *Rename_columnContext) interface{} + + // Visit a parse tree produced by KuneiformParser#rename_table. + VisitRename_table(ctx *Rename_tableContext) interface{} + + // Visit a parse tree produced by KuneiformParser#add_table_constraint. + VisitAdd_table_constraint(ctx *Add_table_constraintContext) interface{} + + // Visit a parse tree produced by KuneiformParser#drop_table_constraint. + VisitDrop_table_constraint(ctx *Drop_table_constraintContext) interface{} + + // Visit a parse tree produced by KuneiformParser#create_index_statement. + VisitCreate_index_statement(ctx *Create_index_statementContext) interface{} + + // Visit a parse tree produced by KuneiformParser#drop_index_statement. + VisitDrop_index_statement(ctx *Drop_index_statementContext) interface{} + // Visit a parse tree produced by KuneiformParser#select_statement. VisitSelect_statement(ctx *Select_statementContext) interface{} diff --git a/parse/grammar/KuneiformLexer.g4 b/parse/grammar/KuneiformLexer.g4 index 496c6ccb7..af96e7972 100644 --- a/parse/grammar/KuneiformLexer.g4 +++ b/parse/grammar/KuneiformLexer.g4 @@ -55,6 +55,15 @@ VIEW: 'view'; OWNER: 'owner'; // keywords +CREATE: 'create'; +ALTER: 'alter'; +COLUMN: 'column'; +ADD: 'add'; +DROP: 'drop'; +RENAME: 'rename'; +TO: 'to'; +CONSTRAINT: 'constraint'; +CHECK: 'check'; FOREIGN: 'foreign'; PRIMARY: 'primary'; KEY: 'key'; diff --git a/parse/grammar/KuneiformParser.g4 b/parse/grammar/KuneiformParser.g4 index 276c10df5..f9e6953ab 100644 --- a/parse/grammar/KuneiformParser.g4 +++ b/parse/grammar/KuneiformParser.g4 @@ -22,7 +22,7 @@ schema_entry: ; sql_entry: - sql EOF + sql_stmt EOF ; action_entry: @@ -112,12 +112,20 @@ column_def: name=IDENTIFIER type constraint* ; +table_column_def: + name=IDENTIFIER type inline_constraint* +; + index_def: HASH_IDENTIFIER (UNIQUE | INDEX | PRIMARY) LPAREN columns=identifier_list RPAREN ; +table_index_def: + UNIQUE? INDEX identifier LPAREN columns=identifier_list RPAREN +; + foreign_key_def: (FOREIGN KEY|LEGACY_FOREIGN_KEY) // for backwards compatibility LPAREN child_keys=identifier_list RPAREN @@ -147,6 +155,24 @@ constraint: (IDENTIFIER| PRIMARY KEY? | NOT NULL | DEFAULT | UNIQUE) (LPAREN literal RPAREN)? ; +inline_constraint: + PRIMARY KEY + | UNIQUE + | NOT NULL + | DEFAULT literal + | fk_constraint + | CHECK (LPAREN sql_expr RPAREN) +; + +fk_action: + ON (UPDATE|DELETE) + (SET NULL | SET DEFAULT | RESTRICT | NO ACTION | CASCADE) +; + +fk_constraint: + REFERENCES table=identifier (LPAREN column=identifier RPAREN) (fk_action (fk_action)?)? +; + access_modifier: PUBLIC | PRIVATE | VIEW | OWNER ; @@ -177,12 +203,20 @@ procedure_return: The following section includes parser rules for SQL. */ -// sql is a top-level SQL statement. -sql: - sql_statement SCOL +// sql_stmt is a top-level SQL statement, it maps to SQLStmt interface in AST. +sql_stmt: + (sql_statement | ddl_stmt) SCOL +; + +ddl_stmt: + create_table_statement + | alter_table_statement + | drop_table_statement + | create_index_statement + | drop_index_statement ; -sql_statement: +sql_statement: // NOTE: This is only DDL. We should combine ddl and dml into sql_stmt in the future. (WITH RECURSIVE? common_table_expression (COMMA common_table_expression)*)? (select_statement | update_statement | insert_statement | delete_statement) ; @@ -191,6 +225,57 @@ common_table_expression: identifier (LPAREN (identifier (COMMA identifier)*)? RPAREN)? AS LPAREN select_statement RPAREN ; +create_table_statement: + CREATE TABLE (IF NOT EXISTS)? name=identifier + LPAREN + (table_column_def | table_constraint_def | table_index_def) + (COMMA (table_column_def | table_constraint_def | table_index_def))* + RPAREN +; + +table_constraint_def: + (CONSTRAINT name=identifier)? + (PRIMARY KEY LPAREN identifier_list RPAREN + | UNIQUE LPAREN identifier_list RPAREN + | CHECK LPAREN sql_expr RPAREN + | FOREIGN KEY LPAREN column=identifier RPAREN fk_constraint) +; + +opt_drop_behavior: + CASCADE + | RESTRICT + | +; + +drop_table_statement: + DROP TABLE (IF EXISTS)? tables=identifier_list opt_drop_behavior +; + +alter_table_statement: + ALTER TABLE table=identifier + alter_table_action +; + +alter_table_action: + ALTER COLUMN column=identifier SET (NOT NULL | DEFAULT literal) # add_column_constraint + | ALTER COLUMN column=identifier DROP (NOT NULL | DEFAULT | CONSTRAINT identifier) # drop_column_constraint + | ADD COLUMN column=identifier type # add_column + | DROP COLUMN column=identifier # drop_column + | RENAME COLUMN old_column=identifier TO new_column=identifier # rename_column + | RENAME TO new_table=identifier # rename_table + | ADD table_constraint_def # add_table_constraint + | DROP CONSTRAINT identifier # drop_table_constraint +; + +create_index_statement: + CREATE UNIQUE? INDEX (IF NOT EXISTS)? name=identifier? + ON table=identifier LPAREN columns=identifier_list RPAREN +; + +drop_index_statement: + DROP INDEX (IF EXISTS)? name=identifier +; + select_statement: select_core (compound_operator select_core)* @@ -279,31 +364,31 @@ sql_expr: // highest precedence: LPAREN sql_expr RPAREN type_cast? # paren_sql_expr | sql_expr PERIOD identifier type_cast? # field_access_sql_expr - | array_element=sql_expr LBRACKET ( - // can be arr[1], arr[1:2], arr[1:], arr[:2], arr[:] - single=sql_expr - | (left=sql_expr? COL right=sql_expr?) + | array_element=sql_expr LBRACKET ( + // can be arr[1], arr[1:2], arr[1:], arr[:2], arr[:] + single=sql_expr + | (left=sql_expr? COL right=sql_expr?) ) RBRACKET type_cast? # array_access_sql_expr | (PLUS|MINUS) sql_expr # unary_sql_expr | sql_expr COLLATE identifier # collate_sql_expr | left=sql_expr (STAR | DIV | MOD) right=sql_expr # arithmetic_sql_expr | left=sql_expr (PLUS | MINUS) right=sql_expr # arithmetic_sql_expr - // any unspecified operator: + // any unspecified operator: | literal type_cast? # literal_sql_expr // direct function calls can have a type cast, but window functions cannot | sql_function_call (FILTER LPAREN WHERE sql_expr RPAREN)? OVER (window|IDENTIFIER) # window_function_call_sql_expr | sql_function_call type_cast? # function_call_sql_expr | variable type_cast? # variable_sql_expr - | (table=identifier PERIOD)? column=identifier type_cast? # column_sql_expr - | CASE case_clause=sql_expr? - (when_then_clause)+ + | (table=identifier PERIOD)? column=identifier type_cast? # column_sql_expr + | CASE case_clause=sql_expr? + (when_then_clause)+ (ELSE else_clause=sql_expr)? END # case_expr | (NOT? EXISTS)? LPAREN select_statement RPAREN type_cast? # subquery_sql_expr - // setting precedence for arithmetic operations: + // setting precedence for arithmetic operations: | left=sql_expr CONCAT right=sql_expr # arithmetic_sql_expr - // the rest: + // the rest: | sql_expr NOT? IN LPAREN (sql_expr_list|select_statement) RPAREN # in_sql_expr | left=sql_expr NOT? (LIKE|ILIKE) right=sql_expr # like_sql_expr | element=sql_expr (NOT)? BETWEEN lower=sql_expr AND upper=sql_expr # between_sql_expr @@ -315,10 +400,10 @@ sql_expr: ; window: - LPAREN + LPAREN (PARTITION BY partition=sql_expr_list)? (ORDER BY ordering_term (COMMA ordering_term)*)? - RPAREN + RPAREN ; @@ -369,7 +454,7 @@ procedure_expr: | array_element=procedure_expr LBRACKET ( // can be arr[1], arr[1:2], arr[1:], arr[:2], arr[:] single=procedure_expr - | (left=procedure_expr? COL right=procedure_expr?) + | (left=procedure_expr? COL right=procedure_expr?) ) RBRACKET type_cast? # array_access_procedure_expr | (PLUS|MINUS|EXCL) procedure_expr # unary_procedure_expr | procedure_expr (STAR | DIV | MOD) procedure_expr # procedure_expr_arithmetic diff --git a/parse/parse.go b/parse/parse.go index 6e0c0904e..9a3a74636 100644 --- a/parse/parse.go +++ b/parse/parse.go @@ -275,6 +275,38 @@ type SQLParseResult struct { Mutative bool } +// DDLParseResult is the result of parsing an DDL statement. +// NOTE: THIS is only temporary. +type DDLParseResult struct { + // AST is the abstract syntax tree of the SQL statement. + AST SQLStmt + // Errs are the errors that occurred during parsing and analysis. + // These include syntax errors, type errors, etc. + ParseErrs ParseErrs +} + +// ParseDDL parses an SQL DDL statement. +// NOTE: THIS is only temporary so that I can write tests. After we shift from +// *SQLStatement to SQLStmt we can delete this. +func ParseDDL(sql string) (res *DDLParseResult, err error) { + parser, errLis, visitor, deferFn, err := setupParser2(sql) + if err != nil { + return nil, err + } + + defer func() { + err2 := deferFn(recover()) + if err2 != nil { + err = err2 + } + }() + + return &DDLParseResult{ + AST: parser.Sql_entry().Accept(visitor).(SQLStmt), + ParseErrs: errLis, + }, nil +} + // ParseSQL parses an SQL statement. // It requires a schema to be passed in, since SQL statements may reference // schema objects. diff --git a/parse/parse_test.go b/parse/parse_test.go index 1928c0d17..3eeea08c3 100644 --- a/parse/parse_test.go +++ b/parse/parse_test.go @@ -2015,6 +2015,423 @@ func exprFunctionCall(name string, args ...parse.Expression) *parse.ExpressionFu } } +func Test_DDL(t *testing.T) { + type testCase struct { + name string + sql string + want parse.SQLStmt + err error + } + + tests := []testCase{ + { + name: "create table", + sql: `CREATE TABLE users ( +id int PRIMARY KEY, +name text CHECK(LENGTH(name) > 10), +address text NOT NULL DEFAULT 'usa', +email text NOT NULL UNIQUE , +city_id int, +group_id int REFERENCES groups(id) ON DELETE CASCADE, +CONSTRAINT city_fk FOREIGN KEY (city_id) REFERENCES cities(id) ON UPDATE NO ACTION , +CHECK(LENGTH(email) > 1), +UNIQUE (city_id, address), +UNIQUE INDEX group_name_unique (group_id, name), +INDEX ithome (name, address) +);`, + want: &parse.CreateTableStatement{ + Name: "users", + Columns: []*parse.Column{ + { + Name: "id", + Type: types.IntType, + Constraints: []parse.Constraint{ + &parse.ConstraintPrimaryKey{}, + }, + }, + { + Name: "name", + Type: types.TextType, + Constraints: []parse.Constraint{ + &parse.ConstraintCheck{ + Param: &parse.ExpressionComparison{ + Left: exprFunctionCall("length", exprColumn("", "name")), + Right: exprLit(10), + Operator: parse.ComparisonOperatorGreaterThan, + }, + }, + }, + }, + { + Name: "address", + Type: types.TextType, + Constraints: []parse.Constraint{ + &parse.ConstraintNotNull{}, + &parse.ConstraintDefault{ + Value: &parse.ExpressionLiteral{ + Type: types.TextType, + Value: "usa", + Typecastable: parse.Typecastable{ + TypeCast: types.TextType, + }, + }, + }, + }, + }, + { + Name: "email", + Type: types.TextType, + Constraints: []parse.Constraint{ + &parse.ConstraintNotNull{}, + &parse.ConstraintUnique{}, + }, + }, + { + Name: "city_id", + Type: types.IntType, + }, + { + Name: "group_id", + Type: types.IntType, + Constraints: []parse.Constraint{ + &parse.ConstraintForeignKey{ + RefTable: "groups", + RefColumn: "id", + Ons: []parse.ForeignKeyActionOn{parse.ON_DELETE}, + Dos: []parse.ForeignKeyActionDo{parse.DO_CASCADE}, + }, + }, + }, + }, + Indexes: []*parse.TableIndex{ + { + Name: "group_name_unique", + Columns: []string{"group_id", "name"}, + Type: parse.IndexTypeUnique, + }, + { + Name: "ithome", + Columns: []string{"name", "address"}, + Type: parse.IndexTypeBTree, + }, + }, + Constraints: []parse.Constraint{ + &parse.ConstraintForeignKey{ + Name: "city_fk", + RefTable: "cities", + RefColumn: "id", + Column: "city_id", + Ons: []parse.ForeignKeyActionOn{parse.ON_UPDATE}, + Dos: []parse.ForeignKeyActionDo{parse.DO_NO_ACTION}, + }, + &parse.ConstraintCheck{ + Param: &parse.ExpressionComparison{ + Left: exprFunctionCall("length", exprColumn("", "email")), + Right: exprLit(1), + Operator: parse.ComparisonOperatorGreaterThan, + }, + }, + &parse.ConstraintUnique{ + Columns: []string{ + "city_id", + "address", + }, + }, + }, + }, + }, + { + name: "create table if not exists", + sql: `CREATE TABLE IF NOT EXISTS users (id int primary key)`, + want: &parse.CreateTableStatement{ + Name: "users", + IfNotExists: true, + Columns: []*parse.Column{ + { + Name: "id", + Type: types.IntType, + Constraints: []parse.Constraint{ + &parse.ConstraintPrimaryKey{}, + }, + }, + }, + }, + }, + { + name: "create table with no column", + sql: `CREATE TABLE users ();`, + err: parse.ErrSyntax, + }, + { + name: "create table with redeclare primary", + sql: `CREATE TABLE users (id int primary key, +name text check(length(name) > 10), +primary key (name) +);`, + err: parse.ErrRedeclarePrimaryKey, + }, + { + name: "create table with redeclare constraint", + sql: `CREATE TABLE users (id int primary key, name text, address text, constraint aa unique(name), constraint aa unique(address))`, + err: parse.ErrCollation, + }, + { + name: "create table with constraint on unknown column", + sql: `CREATE TABLE users (id int primary key, name text, address text, constraint aa unique(not_exist))`, + err: parse.ErrUnknownColumn, + }, + { + name: "alter table add column constraint NOT NULL", + sql: `ALTER TABLE user ALTER COLUMN name SET NOT NULL;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddColumnConstraint{ + Column: "name", + Type: parse.NOT_NULL, + }, + }, + }, + { + name: "alter table add column constraint DEFAULT", + sql: `ALTER TABLE user ALTER COLUMN name SET DEFAULT 10;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddColumnConstraint{ + Column: "name", + Type: parse.DEFAULT, + Value: &parse.ExpressionLiteral{ + Type: types.IntType, + Value: int64(10), + }, + }, + }, + }, + { + name: "alter table drop column constraint NOT NULL", + sql: `ALTER TABLE user ALTER COLUMN name DROP NOT NULL;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumnConstraint{ + Column: "name", + Type: parse.NOT_NULL, + }, + }, + }, + { + name: "alter table drop column constraint DEFAULT", + sql: `ALTER TABLE user ALTER COLUMN name DROP DEFAULT;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumnConstraint{ + Column: "name", + Type: parse.DEFAULT, + }, + }, + }, + { + name: "alter table drop column constraint named", + sql: `ALTER TABLE user ALTER COLUMN name DROP CONSTRAINT abc;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumnConstraint{ + Column: "name", + Name: "abc", + }, + }, + }, + { + name: "alter table add column", + sql: `ALTER TABLE user ADD COLUMN abc int;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddColumn{ + Name: "abc", + Type: types.IntType, + }, + }, + }, + { + name: "alter table drop column", + sql: `ALTER TABLE user DROP COLUMN abc;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropColumn{ + Name: "abc", + }, + }, + }, + { + name: "alter table rename column", + sql: `ALTER TABLE user RENAME COLUMN abc TO def;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.RenameColumn{ + OldName: "abc", + NewName: "def", + }, + }, + }, + { + name: "alter table rename table", + sql: `ALTER TABLE user RENAME TO account;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.RenameTable{ + Name: "account", + }, + }, + }, + { + name: "alter table add constraint fk", + sql: `ALTER TABLE user ADD constraint new_fk FOREIGN KEY (city_id) REFERENCES cities(id) ON DELETE CASCADE;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.AddTableConstraint{ + Cons: &parse.ConstraintForeignKey{ + Name: "new_fk", + RefTable: "cities", + RefColumn: "id", + Column: "city_id", + Ons: []parse.ForeignKeyActionOn{parse.ON_DELETE}, + Dos: []parse.ForeignKeyActionDo{parse.DO_CASCADE}, + }, + }, + }, + }, + { + name: "alter table drop constraint", + sql: `ALTER TABLE user DROP CONSTRAINT abc;`, + want: &parse.AlterTableStatement{ + Table: "user", + Action: &parse.DropTableConstraint{ + Name: "abc", + }, + }, + }, + { + name: "drop table", + sql: `DROP TABLE users, posts;`, + want: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + Behavior: parse.DropBehaviorNon, + }, + }, + { + name: "drop table single table", + sql: `DROP TABLE users;`, + want: &parse.DropTableStatement{ + Tables: []string{"users"}, + Behavior: parse.DropBehaviorNon, + }, + }, + { + name: "drop table if exists", + sql: `DROP TABLE IF EXISTS users, posts;`, + want: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + IfExists: true, + Behavior: parse.DropBehaviorNon, + }, + }, + { + name: "drop table CASCADE", + sql: `DROP TABLE IF EXISTS users, posts CASCADE;`, + want: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + Behavior: parse.DropBehaviorCascade, + IfExists: true, + }, + }, + { + name: "drop table RESTRICT ", + sql: `DROP TABLE users, posts RESTRICT;`, + want: &parse.DropTableStatement{ + Tables: []string{"users", "posts"}, + Behavior: parse.DropBehaviorRestrict, + }, + }, + { + name: "create index", + sql: `CREATE INDEX abc ON user(name);`, + want: &parse.CreateIndexStatement{ + Name: "abc", + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeBTree, + }, + }, + { + name: "create unique index", + sql: `CREATE UNIQUE INDEX abc ON user(name);`, + want: &parse.CreateIndexStatement{ + Name: "abc", + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeUnique, + }, + }, + { + name: "create index with no name", + sql: `CREATE INDEX ON user(name);`, + want: &parse.CreateIndexStatement{ + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeBTree, + }, + }, + { + name: "create index if not exist", + sql: `CREATE INDEX IF NOT EXISTS abc ON user(name);`, + want: &parse.CreateIndexStatement{ + IfNotExists: true, + Name: "abc", + On: "user", + Columns: []string{"name"}, + Type: parse.IndexTypeBTree, + }, + }, + { + name: "drop index", + sql: `DROP INDEX abc;`, + want: &parse.DropIndexStatement{ + Name: "abc", + }, + }, + + { + name: "drop index check exist", + sql: `DROP INDEX IF EXISTS abc;`, + want: &parse.DropIndexStatement{ + Name: "abc", + CheckExist: true, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res, err := parse.ParseDDL(tt.sql) + require.NoError(t, err) + + if res.ParseErrs.Err() != nil { + if tt.err == nil { + t.Errorf("unexpected error: %v", res.ParseErrs.Err()) + } else { + require.ErrorIs(t, res.ParseErrs.Err(), tt.err) + } + + return + } + + assertPositionsAreSet(t, res.AST) + + if !deepCompare(tt.want, res.AST) { + t.Errorf("unexpected AST:%s", diff(tt.want, res.AST)) + } + }) + } +} + func Test_SQL(t *testing.T) { type testCase struct { name string diff --git a/parse/postgres/parse.go b/parse/postgres/parse.go index c6016e253..29f66c206 100644 --- a/parse/postgres/parse.go +++ b/parse/postgres/parse.go @@ -15,7 +15,7 @@ func doNothing(_ string) error { // CheckSyntaxReplaceDollar replaces all bind parameters($x) with 1 to bypass // syntax check errors. -// ToSQL() method doesn't convert bind parameters to $1, $2, etc. so we need to +// () method doesn't convert bind parameters to $1, $2, etc. so we need to // replace them manually, just so we can do the syntax check. func CheckSyntaxReplaceDollar(query string) error { // Replace all bind parameters($x) with 1 to bypass syntax check errors