diff --git a/go.mod b/go.mod index 3cfd2ea28f..c7af41a33f 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.26.0 toolchain go1.26.5 require ( - github.com/antlr4-go/antlr/v4 v4.13.1 github.com/cubicdaiya/gonp v1.0.4 github.com/davecgh/go-spew v1.1.1 github.com/fatih/structtag v1.2.0 @@ -22,6 +21,7 @@ require ( github.com/spf13/pflag v1.0.10 github.com/sqlc-dev/doubleclick v1.0.0 github.com/sqlc-dev/marino v0.1.0 + github.com/sqlc-dev/meyer v0.1.1 github.com/sqlc-dev/zetajones v0.1.0 github.com/tetratelabs/wazero v1.12.0 github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07 @@ -36,6 +36,7 @@ require ( require ( cel.dev/expr v0.25.2 // indirect filippo.io/edwards25519 v1.2.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/google/uuid v1.6.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index bd7f31b49b..5c65f8e522 100644 --- a/go.sum +++ b/go.sum @@ -83,6 +83,8 @@ github.com/sqlc-dev/doubleclick v1.0.0 h1:2/OApfQ2eLgcfa/Fqs8WSMA6atH0G8j9hHbQIg github.com/sqlc-dev/doubleclick v1.0.0/go.mod h1:ODHRroSrk/rr5neRHlWMSRijqOak8YmNaO3VAZCNl5Y= github.com/sqlc-dev/marino v0.1.0 h1:8Fn13vFhx7OUcmDFfRZdf3zARAbNl04Lcy74211ZpIw= github.com/sqlc-dev/marino v0.1.0/go.mod h1:mQxC2dgDE0DWHMb2B5jZNk7KToJuS6wnxnffBfYnq08= +github.com/sqlc-dev/meyer v0.1.1 h1:BAeZcfgLyTnk9f90DyGEKXPrHxtgvVD/DTM6awq2kUY= +github.com/sqlc-dev/meyer v0.1.1/go.mod h1:pS4USCRf/SLjWtaMcnTo4YrEEFKBj8CyyqlxcVUJQH8= github.com/sqlc-dev/zetajones v0.1.0 h1:VeG0atx6lNABr9V2bSI5vL9DvOKTHX0XjMqWUE/rv40= github.com/sqlc-dev/zetajones v0.1.0/go.mod h1:dU1DxwqC6Cahbpnw16KpH1J2waWRDMdwyDSvovMZR4I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/internal/compiler/compile.go b/internal/compiler/compile.go index 11e67f91fb..834e6b0bc8 100644 --- a/internal/compiler/compile.go +++ b/internal/compiler/compile.go @@ -48,7 +48,12 @@ func (c *Compiler) parseCatalog(schemas []string) error { // but don't update the catalog - the database will be the source of truth stmts, err := c.parser.Parse(strings.NewReader(contents)) if err != nil { - merr.Add(filename, contents, 0, err) + // A schema file and a query file are often the same file, so a + // query's sqlc syntax can fail here. Look for an explanation + // before reporting the syntax error it caused. + if reported := addSyntaxErrors(merr, filename, contents, preprocess.File(c.conf.Engine, contents)); !reported { + merr.Add(filename, contents, 0, err) + } continue } @@ -111,7 +116,9 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { stmts, err := c.parser.Parse(strings.NewReader(pp.Text)) if err != nil { - merr.Add(filename, src, 0, err) + if reported := addSyntaxErrors(merr, filename, src, pp); !reported { + merr.Add(filename, src, 0, err) + } continue } for _, stmt := range stmts { @@ -162,3 +169,32 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { Queries: q, }, nil } + +// addSyntaxErrors reports every sqlc syntax error the preprocessor recorded +// for a file, in source order, and says whether there were any. Locations come +// back in the rewritten text's coordinates, so they are mapped through Origin +// to point at what the user wrote. +// +// A statement whose sqlc syntax did not validate is copied through for the +// engine to parse, which assumes the engine can parse it. SQLite cannot: it +// has no schema-qualified function call, so a bad sqlc.arg() is a syntax error +// there rather than a call the preprocessor's message can be attached to. +// These messages name the cause, so they are reported in place of the failure +// they produced; anything else wrong with the file surfaces on the next run. +func addSyntaxErrors(merr *multierr.Error, filename, src string, pp *preprocess.Result) bool { + var found bool + for _, stmt := range pp.Statements() { + if stmt.Err == nil { + continue + } + found = true + loc := pp.Origin(stmt.Start) + var e *sqlerr.Error + if errors.As(stmt.Err, &e) && e.Location != 0 { + loc = pp.Origin(e.Location) + e.Location = loc + } + merr.Add(filename, src, loc, stmt.Err) + } + return found +} diff --git a/internal/compiler/output_columns.go b/internal/compiler/output_columns.go index ef3d662057..77c58852cd 100644 --- a/internal/compiler/output_columns.go +++ b/internal/compiler/output_columns.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/catalog" @@ -69,7 +70,7 @@ func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, er if n.GroupClause != nil { for _, item := range n.GroupClause.Items { - if err := findColumnForNode(item, tables, targets); err != nil { + if err := c.findColumnForNode(item, tables, targets); err != nil { return nil, err } } @@ -85,7 +86,7 @@ func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, er if !ok { continue } - if err := findColumnForNode(sb.Node, tables, targets); err != nil { + if err := c.findColumnForNode(sb.Node, tables, targets); err != nil { return nil, fmt.Errorf("%v: if you want to skip this validation, set 'strict_order_by' to false", err) } } @@ -101,7 +102,7 @@ func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, er if !ok { continue } - if err := findColumnForNode(caseExpr.Xpr, tables, targets); err != nil { + if err := c.findColumnForNode(caseExpr.Xpr, tables, targets); err != nil { return nil, fmt.Errorf("%v: if you want to skip this validation, set 'strict_order_by' to false", err) } } @@ -713,14 +714,36 @@ func outputColumnRefs(res *ast.ResTarget, tables []*Table, node *ast.ColumnRef) return cols, nil } -func findColumnForNode(item ast.Node, tables []*Table, targetList *ast.List) error { +func (c *Compiler) findColumnForNode(item ast.Node, tables []*Table, targetList *ast.List) error { ref, ok := item.(*ast.ColumnRef) if !ok { return nil } + if c.isImplicitColumnRef(ref) { + return nil + } return findColumnForRef(ref, tables, targetList) } +// isImplicitColumnRef reports whether ref names a column that every table in +// the dialect has without declaring it, and which therefore never appears in +// a catalog built from the schema. SQLite gives each ordinary table a rowid, +// reachable under three spellings. +func (c *Compiler) isImplicitColumnRef(ref *ast.ColumnRef) bool { + if c.conf.Engine != config.EngineSQLite { + return false + } + parts := stringSlice(ref.Fields) + if len(parts) == 0 { + return false + } + switch parts[len(parts)-1] { + case "rowid", "_rowid_", "oid": + return true + } + return false +} + func findColumnForRef(ref *ast.ColumnRef, tables []*Table, targetList *ast.List) error { parts := stringSlice(ref.Fields) var alias, name string diff --git a/internal/endtoend/testdata/case_named_params/sqlite/go/models.go b/internal/endtoend/testdata/case_named_params/sqlite/go/models.go index 40c7021db4..9fa3edb9da 100644 --- a/internal/endtoend/testdata/case_named_params/sqlite/go/models.go +++ b/internal/endtoend/testdata/case_named_params/sqlite/go/models.go @@ -10,8 +10,8 @@ import ( type Author struct { ID int64 - Username interface{} - Email interface{} + Username sql.NullString + Email sql.NullString Name string Bio sql.NullString } diff --git a/internal/engine/sqlite/analyzer/analyze_test.go b/internal/engine/sqlite/analyzer/analyze_test.go deleted file mode 100644 index 467f2518bb..0000000000 --- a/internal/engine/sqlite/analyzer/analyze_test.go +++ /dev/null @@ -1,123 +0,0 @@ -package analyzer - -import ( - "context" - "testing" - - "github.com/sqlc-dev/sqlc/internal/config" - "github.com/sqlc-dev/sqlc/internal/sql/ast" -) - -func TestAnalyzer_Analyze(t *testing.T) { - db := config.Database{ - Managed: true, - } - a := New(db) - defer a.Close(context.Background()) - - ctx := context.Background() - - migrations := []string{ - `CREATE TABLE users ( - id INTEGER PRIMARY KEY, - name TEXT NOT NULL, - email TEXT - )`, - } - - query := `SELECT id, name, email FROM users WHERE id = ?` - node := &ast.TODO{} - - result, err := a.Analyze(ctx, node, query, migrations, nil) - if err != nil { - t.Fatalf("Analyze failed: %v", err) - } - - if len(result.Columns) != 3 { - t.Errorf("Expected 3 columns, got %d", len(result.Columns)) - } - - expectedCols := []struct { - name string - dataType string - notNull bool - }{ - {"id", "integer", false}, - {"name", "text", true}, - {"email", "text", false}, - } - - for i, expected := range expectedCols { - if i >= len(result.Columns) { - break - } - col := result.Columns[i] - if col.Name != expected.name { - t.Errorf("Column %d: expected name %q, got %q", i, expected.name, col.Name) - } - if col.DataType != expected.dataType { - t.Errorf("Column %d: expected dataType %q, got %q", i, expected.dataType, col.DataType) - } - if col.NotNull != expected.notNull { - t.Errorf("Column %d: expected notNull %v, got %v", i, expected.notNull, col.NotNull) - } - if col.Table == nil || col.Table.Name != "users" { - t.Errorf("Column %d: expected table 'users', got %v", i, col.Table) - } - } - - if len(result.Params) != 1 { - t.Errorf("Expected 1 parameter, got %d", len(result.Params)) - } -} - -func TestAnalyzer_InvalidQuery(t *testing.T) { - db := config.Database{ - Managed: true, - } - a := New(db) - defer a.Close(context.Background()) - - ctx := context.Background() - - migrations := []string{ - `CREATE TABLE users (id INTEGER PRIMARY KEY)`, - } - - query := `SELECT * FROM nonexistent` - node := &ast.TODO{} - - _, err := a.Analyze(ctx, node, query, migrations, nil) - if err == nil { - t.Error("Expected error for invalid query, got nil") - } -} - -func TestNormalizeType(t *testing.T) { - tests := []struct { - input string - expected string - }{ - {"INTEGER", "integer"}, - {"INT", "integer"}, - {"BIGINT", "integer"}, - {"TEXT", "text"}, - {"VARCHAR(255)", "text"}, - {"BLOB", "blob"}, - {"REAL", "real"}, - {"FLOAT", "real"}, - {"DOUBLE", "real"}, - {"BOOLEAN", "boolean"}, - {"DATETIME", "datetime"}, - {"", "any"}, - } - - for _, tt := range tests { - t.Run(tt.input, func(t *testing.T) { - result := normalizeType(tt.input) - if result != tt.expected { - t.Errorf("normalizeType(%q) = %q, want %q", tt.input, result, tt.expected) - } - }) - } -} diff --git a/internal/engine/sqlite/catalog.go b/internal/engine/sqlite/catalog.go index d7d27489a9..1eee9def79 100644 --- a/internal/engine/sqlite/catalog.go +++ b/internal/engine/sqlite/catalog.go @@ -12,7 +12,3 @@ func NewCatalog() *catalog.Catalog { Extensions: map[string]struct{}{}, } } - -func newTestCatalog() *catalog.Catalog { - return catalog.New("main") -} diff --git a/internal/engine/sqlite/catalog_test.go b/internal/engine/sqlite/catalog_test.go deleted file mode 100644 index bf6dcd8316..0000000000 --- a/internal/engine/sqlite/catalog_test.go +++ /dev/null @@ -1,269 +0,0 @@ -package sqlite - -import ( - "strconv" - "strings" - "testing" - - "github.com/sqlc-dev/sqlc/internal/sql/ast" - "github.com/sqlc-dev/sqlc/internal/sql/catalog" - - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" -) - -func TestUpdate(t *testing.T) { - p := NewParser() - - for i, tc := range []struct { - stmt string - s *catalog.Schema - }{ - { - ` - CREATE TABLE foo (bar text); - `, - &catalog.Schema{ - Name: "main", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "bar", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - { - ` - CREATE TABLE foo (bar text); - ALTER TABLE foo RENAME TO baz; - `, - &catalog.Schema{ - Name: "main", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Name: "baz"}, - Columns: []*catalog.Column{ - { - Name: "bar", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - { - ` - CREATE TABLE foo (bar text); - ALTER TABLE foo ADD COLUMN baz bool; - `, - &catalog.Schema{ - Name: "main", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "bar", - Type: ast.TypeName{Name: "text"}, - }, - { - Name: "baz", - Type: ast.TypeName{Name: "bool"}, - }, - }, - }, - }, - }, - }, - { - ` - CREATE TABLE foo (bar text); - ALTER TABLE foo RENAME COLUMN bar TO baz; - `, - &catalog.Schema{ - Name: "main", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "baz", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - { - ` - CREATE TABLE foo (bar text); - ALTER TABLE foo RENAME bar TO baz; - `, - &catalog.Schema{ - Name: "main", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "baz", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - { - ` - ATTACH ':memory:' as ns; - CREATE TABLE ns.foo (bar text); - `, - &catalog.Schema{ - Name: "ns", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Schema: "ns", Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "bar", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - { - ` - ATTACH ':memory:' as ns; - CREATE TABLE ns.foo (bar text); - ALTER TABLE ns.foo RENAME TO baz; - `, - &catalog.Schema{ - Name: "ns", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Schema: "ns", Name: "baz"}, - Columns: []*catalog.Column{ - { - Name: "bar", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - { - ` - ATTACH ':memory:' as ns; - CREATE TABLE ns.foo (bar text); - ALTER TABLE ns.foo ADD COLUMN baz bool; - `, - &catalog.Schema{ - Name: "ns", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Schema: "ns", Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "bar", - Type: ast.TypeName{Name: "text"}, - }, - { - Name: "baz", - Type: ast.TypeName{Name: "bool"}, - }, - }, - }, - }, - }, - }, - { - ` - ATTACH ':memory:' as ns; - CREATE TABLE ns.foo (bar text); - ALTER TABLE ns.foo RENAME COLUMN bar TO baz; - `, - &catalog.Schema{ - Name: "ns", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Schema: "ns", Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "baz", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - { - ` - ATTACH ':memory:' as ns; - CREATE TABLE ns.foo (bar text); - ALTER TABLE ns.foo RENAME bar TO baz; - `, - &catalog.Schema{ - Name: "ns", - Tables: []*catalog.Table{ - { - Rel: &ast.TableName{Schema: "ns", Name: "foo"}, - Columns: []*catalog.Column{ - { - Name: "baz", - Type: ast.TypeName{Name: "text"}, - }, - }, - }, - }, - }, - }, - } { - test := tc - t.Run(strconv.Itoa(i), func(t *testing.T) { - stmts, err := p.Parse(strings.NewReader(test.stmt)) - if err != nil { - t.Log(test.stmt) - t.Fatal(err) - } - - c := newTestCatalog() - if err := c.Build(stmts); err != nil { - t.Log(test.stmt) - t.Fatal(err) - } - - e := newTestCatalog() - if test.s != nil { - var replaced bool - for i := range e.Schemas { - if e.Schemas[i].Name == test.s.Name { - e.Schemas[i] = test.s - replaced = true - break - } - } - if !replaced { - e.Schemas = append(e.Schemas, test.s) - } - } - - if diff := cmp.Diff(e, c, cmpopts.EquateEmpty(), cmpopts.IgnoreUnexported(catalog.Column{})); diff != "" { - t.Log(test.stmt) - t.Errorf("catalog mismatch:\n%s", diff) - } - }) - } -} diff --git a/internal/engine/sqlite/convert.go b/internal/engine/sqlite/convert.go index e9868f5be6..7916125e0e 100644 --- a/internal/engine/sqlite/convert.go +++ b/internal/engine/sqlite/convert.go @@ -6,132 +6,294 @@ import ( "strconv" "strings" - "github.com/antlr4-go/antlr/v4" + meyer "github.com/sqlc-dev/meyer/ast" + "github.com/sqlc-dev/sqlc/internal/debug" - "github.com/sqlc-dev/sqlc/internal/engine/sqlite/parser" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) +// cc converts a meyer syntax tree into sqlc's engine-independent AST. One +// converter is used per statement; paramCount numbers the anonymous "?" +// markers within it. type cc struct { paramCount int } -type node interface { - GetParser() antlr.Parser -} - -func todo(funcname string, n node) *ast.TODO { +func todo(funcname string, n meyer.Node) *ast.TODO { if debug.Active { log.Printf("sqlite.%s: Unknown node type %T\n", funcname, n) } return &ast.TODO{} } -func identifier(id string) string { - if len(id) >= 2 && id[0] == '"' && id[len(id)-1] == '"' { - unquoted, _ := strconv.Unquote(id) - return unquoted +func (c *cc) convert(node meyer.Node) ast.Node { + switch n := node.(type) { + + // Statements + + case *meyer.AlterTableStmt: + return c.convertAlterTableStmt(n) + + case *meyer.AttachStmt: + return c.convertAttachStmt(n) + + case *meyer.CreateTableStmt: + return c.convertCreateTableStmt(n) + + case *meyer.CreateViewStmt: + return c.convertCreateViewStmt(n) + + case *meyer.CreateVirtualTableStmt: + return c.convertCreateVirtualTableStmt(n) + + case *meyer.DeleteStmt: + return c.convertDeleteStmt(n) + + case *meyer.DropTableStmt: + return c.convertDropStmt(n.Name, n.IfExists) + + case *meyer.DropViewStmt: + return c.convertDropStmt(n.Name, n.IfExists) + + case *meyer.ExplainStmt: + return c.convert(n.Stmt) + + case *meyer.InsertStmt: + return c.convertInsertStmt(n) + + case *meyer.SelectStmt: + return c.convertSelectStmt(n) + + case *meyer.UpdateStmt: + return c.convertUpdateStmt(n) + + // Expressions + + case *meyer.BetweenExpr: + return c.convertBetweenExpr(n) + + case *meyer.BinaryExpr: + return c.convertBinaryExpr(n) + + case *meyer.BindParam: + return c.convertBindParam(n) + + case *meyer.CaseExpr: + return c.convertCaseExpr(n) + + case *meyer.CastExpr: + return c.convertCastExpr(n) + + case *meyer.CollateExpr: + return c.convertCollateExpr(n) + + case *meyer.ExistsExpr: + return &ast.SubLink{ + SubLinkType: ast.EXISTS_SUBLINK, + Subselect: c.convert(n.Select), + Location: n.Pos(), + } + + case *meyer.FuncCall: + return c.convertFuncCall(n) + + case *meyer.Ident: + return c.columnRef(n.Pos(), n) + + case *meyer.InExpr: + return c.convertInExpr(n) + + case *meyer.IsExpr: + return c.convertIsExpr(n) + + case *meyer.LikeExpr: + return c.convertLikeExpr(n) + + case *meyer.Literal: + return c.convertLiteral(n) + + case *meyer.NullCheckExpr: + return c.convertNullCheckExpr(n) + + case *meyer.ParenExpr: + return c.convert(n.X) + + case *meyer.QualifiedRef: + return c.columnRef(n.Pos(), n.Parts...) + + case *meyer.Star: + return c.convertStar(n) + + case *meyer.SubqueryExpr: + return &ast.SubLink{ + SubLinkType: ast.EXPR_SUBLINK, + Subselect: c.convert(n.Select), + Location: n.Pos(), + } + + case *meyer.UnaryExpr: + return c.convertUnaryExpr(n) + + case *meyer.VectorExpr: + return c.convertExprList(n.List) + + default: + return todo("convert(case=default)", node) + } +} + +// convertExpr converts an optional expression, mapping an absent one to a +// nil node rather than to a TODO. +func (c *cc) convertExpr(e meyer.Expr) ast.Node { + if e == nil { + return nil } - return strings.ToLower(id) + return c.convert(e) } -func NewIdentifier(t string) *ast.String { - return &ast.String{Str: identifier(t)} +func (c *cc) convertExprList(exprs []meyer.Expr) *ast.List { + list := &ast.List{Items: []ast.Node{}} + for _, e := range exprs { + list.Items = append(list.Items, c.convert(e)) + } + return list } -func (c *cc) convertAlter_table_stmtContext(n *parser.Alter_table_stmtContext) ast.Node { - if n.RENAME_() != nil { - if newTable, ok := n.New_table_name().(*parser.New_table_nameContext); ok { - name := identifier(newTable.Any_name().GetText()) - return &ast.RenameTableStmt{ - Table: parseTableName(n), - NewName: &name, - } +// columnRef builds the dotted reference sqlc uses for a column: a one, two +// or three part name of the form [[schema.]table.]column. +func (c *cc) columnRef(loc int, parts ...*meyer.Ident) *ast.ColumnRef { + items := make([]ast.Node, 0, len(parts)) + for _, p := range parts { + items = append(items, NewIdentifier(p)) + } + return &ast.ColumnRef{ + Fields: &ast.List{Items: items}, + Location: loc, + } +} + +func (c *cc) convertStar(n *meyer.Star) *ast.ColumnRef { + items := []ast.Node{} + if n.Table != nil { + items = append(items, NewIdentifier(n.Table)) + } + items = append(items, &ast.A_Star{}) + return &ast.ColumnRef{ + Fields: &ast.List{Items: items}, + Location: n.Pos(), + } +} + +// +// Statements +// + +func (c *cc) convertAlterTableStmt(n *meyer.AlterTableStmt) ast.Node { + switch n.Action { + case meyer.AlterRenameTable: + name := identifier(n.NewName) + return &ast.RenameTableStmt{ + Table: parseTableName(n.Table), + NewName: &name, } - if newCol, ok := n.GetNew_column_name().(*parser.Column_nameContext); ok { - name := identifier(newCol.Any_name().GetText()) - return &ast.RenameColumnStmt{ - Table: parseTableName(n), - Col: &ast.ColumnRef{ - Name: identifier(n.GetOld_column_name().GetText()), - }, - NewName: &name, - } + case meyer.AlterRenameColumn: + name := identifier(n.NewName) + return &ast.RenameColumnStmt{ + Table: parseTableName(n.Table), + Col: &ast.ColumnRef{ + Name: identifier(n.Column), + }, + NewName: &name, } - } - if n.ADD_() != nil { - if def, ok := n.Column_def().(*parser.Column_defContext); ok { - stmt := &ast.AlterTableStmt{ - Table: parseTableName(n), - Cmds: &ast.List{}, - } - name := def.Column_name().GetText() - stmt.Cmds.Items = append(stmt.Cmds.Items, &ast.AlterTableCmd{ - Name: &name, - Subtype: ast.AT_AddColumn, - Def: &ast.ColumnDef{ - Colname: name, - TypeName: &ast.TypeName{ - Name: def.Type_name().GetText(), + case meyer.AlterAddColumn: + def := n.ColumnDef + if def == nil { + break + } + name := identifier(def.Name) + return &ast.AlterTableStmt{ + Table: parseTableName(n.Table), + Cmds: &ast.List{Items: []ast.Node{ + &ast.AlterTableCmd{ + Name: &name, + Subtype: ast.AT_AddColumn, + Def: &ast.ColumnDef{ + Colname: name, + TypeName: &ast.TypeName{Name: columnTypeName(def.Type)}, + IsNotNull: hasNotNullConstraint(def.Constraints), }, - IsNotNull: hasNotNullConstraint(def.AllColumn_constraint()), }, - }) - return stmt + }}, } - } - if n.DROP_() != nil { - stmt := &ast.AlterTableStmt{ - Table: parseTableName(n), - Cmds: &ast.List{}, + case meyer.AlterDropColumn: + name := identifier(n.Column) + return &ast.AlterTableStmt{ + Table: parseTableName(n.Table), + Cmds: &ast.List{Items: []ast.Node{ + &ast.AlterTableCmd{ + Name: &name, + Subtype: ast.AT_DropColumn, + }, + }}, } - name := n.Column_name(0).GetText() - stmt.Cmds.Items = append(stmt.Cmds.Items, &ast.AlterTableCmd{ - Name: &name, - Subtype: ast.AT_DropColumn, - }) - return stmt } - - return todo("convertAlter_table_stmtContext", n) + return todo("convertAlterTableStmt", n) } -func (c *cc) convertAttach_stmtContext(n *parser.Attach_stmtContext) ast.Node { - name := n.Schema_name().GetText() +// convertAttachStmt records an attached database as a schema. Only the name +// matters to sqlc; the file expression is a runtime concern. +func (c *cc) convertAttachStmt(n *meyer.AttachStmt) ast.Node { + name := schemaName(n.Name) return &ast.CreateSchemaStmt{ Name: &name, } } -func (c *cc) convertCreate_table_stmtContext(n *parser.Create_table_stmtContext) ast.Node { +// schemaName reads the schema out of the "AS " operand of ATTACH, +// which the grammar accepts as an arbitrary expression. +func schemaName(e meyer.Expr) string { + switch n := e.(type) { + case *meyer.Ident: + return identifier(n) + case *meyer.Literal: + return n.Value + default: + return "" + } +} + +// columnTypeName returns the declared type of a column, defaulting to +// SQLite's untyped "any" when the declaration omits one. +func columnTypeName(t *meyer.TypeName) string { + if t == nil { + return "any" + } + return typeName(t) +} + +func (c *cc) convertCreateTableStmt(n *meyer.CreateTableStmt) ast.Node { stmt := &ast.CreateTableStmt{ - Name: parseTableName(n), - IfNotExists: n.EXISTS_() != nil, - } - for _, idef := range n.AllColumn_def() { - if def, ok := idef.(*parser.Column_defContext); ok { - typeName := "any" - if def.Type_name() != nil { - typeName = def.Type_name().GetText() - } - stmt.Cols = append(stmt.Cols, &ast.ColumnDef{ - Colname: identifier(def.Column_name().GetText()), - IsNotNull: hasNotNullConstraint(def.AllColumn_constraint()), - TypeName: &ast.TypeName{Name: typeName}, - }) - } + Name: parseTableName(n.Name), + IfNotExists: n.IfNotExists, + } + for _, def := range n.Columns { + stmt.Cols = append(stmt.Cols, &ast.ColumnDef{ + Colname: identifier(def.Name), + IsNotNull: hasNotNullConstraint(def.Constraints), + TypeName: &ast.TypeName{Name: columnTypeName(def.Type)}, + }) } return stmt } -func (c *cc) convertCreate_virtual_table_stmtContext(n *parser.Create_virtual_table_stmtContext) ast.Node { - switch moduleName := n.Module_name().GetText(); moduleName { +func (c *cc) convertCreateVirtualTableStmt(n *meyer.CreateVirtualTableStmt) ast.Node { + switch moduleName := identifier(n.Module); moduleName { case "fts5": // https://www.sqlite.org/fts5.html - return c.convertCreate_virtual_table_fts5(n) + return c.convertCreateVirtualTableFTS5(n) default: return todo( fmt.Sprintf("create_virtual_table. unsupported module name: %q", moduleName), @@ -140,1201 +302,786 @@ func (c *cc) convertCreate_virtual_table_stmtContext(n *parser.Create_virtual_ta } } -func (c *cc) convertCreate_virtual_table_fts5(n *parser.Create_virtual_table_stmtContext) ast.Node { +func (c *cc) convertCreateVirtualTableFTS5(n *meyer.CreateVirtualTableStmt) ast.Node { stmt := &ast.CreateTableStmt{ - Name: parseTableName(n), - IfNotExists: n.EXISTS_() != nil, + Name: parseTableName(n.Name), + IfNotExists: n.IfNotExists, } - for _, arg := range n.AllModule_argument() { - var columnName string - - // For example: CREATE VIRTUAL TABLE tbl_ft USING fts5(b, c UNINDEXED) - // * the 'b' column is parsed like Expr_qualified_column_nameContext - // * the 'c' column is parsed like Column_defContext - if columnExpr, ok := arg.Expr().(*parser.Expr_qualified_column_nameContext); ok { - columnName = columnExpr.Column_name().GetText() - } else if columnDef, ok := arg.Column_def().(*parser.Column_defContext); ok { - columnName = columnDef.Column_name().GetText() - } - - if columnName != "" { - stmt.Cols = append(stmt.Cols, &ast.ColumnDef{ - Colname: identifier(columnName), - // you can not specify any column constraints in fts5, so we pass them manually - IsNotNull: true, - TypeName: &ast.TypeName{Name: "text"}, - }) + // The module arguments of a virtual table are an arbitrary token + // sequence, so meyer hands them back as source text. For fts5 an + // argument is either a column ("b", or "c UNINDEXED") or one of the + // module's own options, which are always written as "key = value". + for _, arg := range n.Args { + name := fts5ColumnName(arg) + if name == "" { + continue } + stmt.Cols = append(stmt.Cols, &ast.ColumnDef{ + Colname: name, + // fts5 accepts no column constraints, so we supply them here + IsNotNull: true, + TypeName: &ast.TypeName{Name: "text"}, + }) } return stmt } -func (c *cc) convertCreate_view_stmtContext(n *parser.Create_view_stmtContext) ast.Node { - viewName := n.View_name().GetText() - relation := &ast.RangeVar{ - Relname: &viewName, +// fts5ColumnName returns the column an fts5 module argument declares, or the +// empty string when the argument configures the module instead. +func fts5ColumnName(arg string) string { + if strings.ContainsRune(arg, '=') { + return "" } + name, _, _ := strings.Cut(strings.TrimSpace(arg), " ") + return unquoteIdent(name) +} - if n.Schema_name() != nil { - schemaName := n.Schema_name().GetText() - relation.Schemaname = &schemaName +// unquoteIdent folds a name that has not been through the lexer, as happens +// for the raw module arguments of a virtual table. +func unquoteIdent(s string) string { + if len(s) >= 2 { + switch { + case s[0] == '"' && s[len(s)-1] == '"': + return strings.ReplaceAll(s[1:len(s)-1], `""`, `"`) + case s[0] == '`' && s[len(s)-1] == '`': + return strings.ReplaceAll(s[1:len(s)-1], "``", "`") + case s[0] == '[' && s[len(s)-1] == ']': + return s[1 : len(s)-1] + case s[0] == '\'' && s[len(s)-1] == '\'': + return strings.ReplaceAll(s[1:len(s)-1], `''`, `'`) + } } + return strings.ToLower(s) +} +func (c *cc) convertCreateViewStmt(n *meyer.CreateViewStmt) ast.Node { return &ast.ViewStmt{ - View: relation, + View: parseRangeVar(n.Name, nil), Aliases: &ast.List{}, - Query: c.convert(n.Select_stmt()), + Query: c.convert(n.Select), Replace: false, Options: &ast.List{}, WithCheckOption: ast.ViewCheckOption(0), } } -type Delete_stmt interface { - node - - Qualified_table_name() parser.IQualified_table_nameContext - WHERE_() antlr.TerminalNode - Expr() parser.IExprContext +func (c *cc) convertDropStmt(name *meyer.QualifiedName, ifExists bool) ast.Node { + return &ast.DropTableStmt{ + IfExists: ifExists, + Tables: []*ast.TableName{parseTableName(name)}, + } } -func (c *cc) convertDelete_stmtContext(n Delete_stmt) ast.Node { - if qualifiedName, ok := n.Qualified_table_name().(*parser.Qualified_table_nameContext); ok { - - tableName := identifier(qualifiedName.Table_name().GetText()) - relation := &ast.RangeVar{ - Relname: &tableName, - } - - if qualifiedName.Schema_name() != nil { - schemaName := qualifiedName.Schema_name().GetText() - relation.Schemaname = &schemaName - } - - if qualifiedName.Alias() != nil { - alias := qualifiedName.Alias().GetText() - relation.Alias = &ast.Alias{Aliasname: &alias} - } - - relations := &ast.List{} - - relations.Items = append(relations.Items, relation) - - delete := &ast.DeleteStmt{ - Relations: relations, - WithClause: nil, - } - - if n.WHERE_() != nil && n.Expr() != nil { - delete.WhereClause = c.convert(n.Expr()) - } - - if n, ok := n.(interface { - Returning_clause() parser.IReturning_clauseContext - }); ok { - delete.ReturningList = c.convertReturning_caluseContext(n.Returning_clause()) - } else { - delete.ReturningList = c.convertReturning_caluseContext(nil) - } - if n, ok := n.(interface { - Limit_stmt() parser.ILimit_stmtContext - }); ok { - limitCount, _ := c.convertLimit_stmtContext(n.Limit_stmt()) - delete.LimitCount = limitCount - } - - return delete +func (c *cc) convertDeleteStmt(n *meyer.DeleteStmt) ast.Node { + return &ast.DeleteStmt{ + Relations: &ast.List{Items: []ast.Node{parseRangeVar(n.Table, n.Alias)}}, + WhereClause: c.convertExpr(n.Where), + LimitCount: c.limitCount(n.Limit), + ReturningList: c.convertReturning(n.Returning), + WithClause: c.convertWith(n.With), } - - return todo("convertDelete_stmtContext", n) } -func (c *cc) convertDrop_stmtContext(n *parser.Drop_stmtContext) ast.Node { - if n.TABLE_() != nil || n.VIEW_() != nil { - name := ast.TableName{ - Name: identifier(n.Any_name().GetText()), - } - if n.Schema_name() != nil { - name.Schema = n.Schema_name().GetText() - } - - return &ast.DropTableStmt{ - IfExists: n.EXISTS_() != nil, - Tables: []*ast.TableName{&name}, - } +// limitCount converts the LIMIT of an UPDATE or DELETE. sqlc has no place to +// put the OFFSET or the ORDER BY that can accompany it, so they are dropped. +func (c *cc) limitCount(n *meyer.Limit) ast.Node { + if n == nil { + return nil } - return todo("convertDrop_stmtContext", n) + return c.convertExpr(n.Count) } -func (c *cc) convertFuncContext(n *parser.Expr_functionContext) ast.Node { - if name, ok := n.Qualified_function_name().(*parser.Qualified_function_nameContext); ok { - funcName := strings.ToLower(name.Function_name().GetText()) - - schema := "" - if name.Schema_name() != nil { - schema = name.Schema_name().GetText() - } - - var argNodes []ast.Node - for _, exp := range n.AllExpr() { - argNodes = append(argNodes, c.convert(exp)) - } - args := &ast.List{Items: argNodes} - - if funcName == "coalesce" { - return &ast.CoalesceExpr{ - Args: args, - Location: name.GetStart().GetStart(), - } - } else { - return &ast.FuncCall{ - Func: &ast.FuncName{ - Schema: schema, - Name: funcName, - }, - Funcname: &ast.List{ - Items: []ast.Node{ - NewIdentifier(funcName), - }, - }, - AggStar: n.STAR() != nil, - Args: args, - AggOrder: &ast.List{}, - AggDistinct: n.DISTINCT_() != nil, - Location: name.GetStart().GetStart(), - } +func (c *cc) convertInsertStmt(n *meyer.InsertStmt) ast.Node { + insert := &ast.InsertStmt{ + Relation: parseRangeVar(n.Table, n.Alias), + Cols: c.convertColumnNames(n.Columns), + ReturningList: c.convertReturning(n.Returning), + WithClause: c.convertWith(n.With), + DefaultValues: n.DefaultValues, + } + if n.Select != nil { + if sel, ok := c.convertSelectStmt(n.Select).(*ast.SelectStmt); ok { + insert.SelectStmt = sel } } - - return todo("convertFuncContext", n) -} - -func (c *cc) convertExprContext(n *parser.ExprContext) ast.Node { - return &ast.Expr{} + if len(n.Upserts) > 0 { + insert.OnConflictClause = c.convertUpsert(n.Upserts[0]) + } + return insert } -func (c *cc) convertColumnNameExpr(n *parser.Expr_qualified_column_nameContext) *ast.ColumnRef { - var items []ast.Node - if schema, ok := n.Schema_name().(*parser.Schema_nameContext); ok { - schemaText := schema.GetText() - if schemaText != "" { - items = append(items, NewIdentifier(schemaText)) - } +func (c *cc) convertUpsert(n *meyer.Upsert) *ast.OnConflictClause { + clause := &ast.OnConflictClause{ + Action: ast.OnConflictActionNothing, + Location: n.Pos(), } - if table, ok := n.Table_name().(*parser.Table_nameContext); ok { - tableName := table.GetText() - if tableName != "" { - items = append(items, NewIdentifier(tableName)) + if len(n.Target) > 0 || n.TargetWhere != nil { + clause.Infer = &ast.InferClause{ + IndexElems: &ast.List{Items: c.convertOrderBy(n.Target)}, + WhereClause: c.convertExpr(n.TargetWhere), } } - items = append(items, NewIdentifier(n.Column_name().GetText())) - return &ast.ColumnRef{ - Fields: &ast.List{ - Items: items, - }, - Location: n.GetStart().GetStart(), + if n.DoNothing { + return clause } + clause.Action = ast.OnConflictActionUpdate + clause.TargetList = c.convertSetPairs(n.Set) + clause.WhereClause = c.convertExpr(n.Where) + return clause } -func (c *cc) convertComparison(n *parser.Expr_comparisonContext) ast.Node { - lexpr := c.convert(n.Expr(0)) - - if n.IN_() != nil { - rexprs := []ast.Node{} - for _, expr := range n.AllExpr()[1:] { - e := c.convert(expr) - switch t := e.(type) { - case *ast.List: - rexprs = append(rexprs, t.Items...) - default: - rexprs = append(rexprs, t) - } - } +func (c *cc) convertColumnNames(cols []*meyer.Ident) *ast.List { + list := &ast.List{Items: []ast.Node{}} + for _, col := range cols { + name := identifier(col) + list.Items = append(list.Items, &ast.ResTarget{ + Name: &name, + }) + } + return list +} - return &ast.In{ - Expr: lexpr, - List: rexprs, - Not: false, - Sel: nil, - Location: n.GetStart().GetStart(), +// convertSetPairs converts the assignment list of an UPDATE or of an upsert's +// DO UPDATE. SQLite allows "(a, b) = expr"; sqlc has no node for a +// multi-column assignment, so each name is given the same value expression. +func (c *cc) convertSetPairs(pairs []*meyer.SetPair) *ast.List { + list := &ast.List{} + for _, pair := range pairs { + val := c.convertExpr(pair.Value) + for _, col := range pair.Columns { + name := identifier(col) + list.Items = append(list.Items, &ast.ResTarget{ + Name: &name, + Val: val, + Location: col.Pos(), + }) } } + return list +} - return &ast.A_Expr{ - Name: &ast.List{ - Items: []ast.Node{ - &ast.String{Str: "="}, // TODO: add actual comparison - }, - }, - Lexpr: lexpr, - Rexpr: c.convert(n.Expr(1)), +func (c *cc) convertUpdateStmt(n *meyer.UpdateStmt) ast.Node { + return &ast.UpdateStmt{ + Relations: &ast.List{Items: []ast.Node{parseRangeVar(n.Table, n.Alias)}}, + TargetList: c.convertSetPairs(n.Set), + FromClause: &ast.List{Items: c.convertFrom(n.From)}, + WhereClause: c.convertExpr(n.Where), + LimitCount: c.limitCount(n.Limit), + ReturningList: c.convertReturning(n.Returning), + WithClause: c.convertWith(n.With), } } -func (c *cc) convertMultiSelect_stmtContext(n *parser.Select_stmtContext) ast.Node { - var ctes ast.List - if ct := n.Common_table_stmt(); ct != nil { - recursive := ct.RECURSIVE_() != nil - for _, cte := range ct.AllCommon_table_expression() { - tableName := identifier(cte.Table_name().GetText()) - var cteCols ast.List - for _, col := range cte.AllColumn_name() { - cteCols.Items = append(cteCols.Items, NewIdentifier(col.GetText())) - } - ctes.Items = append(ctes.Items, &ast.CommonTableExpr{ - Ctename: &tableName, - Ctequery: c.convert(cte.Select_stmt()), - Location: cte.GetStart().GetStart(), - Cterecursive: recursive, - Ctecolnames: &cteCols, - }) - } +func (c *cc) convertReturning(cols []*meyer.ResultColumn) *ast.List { + list := &ast.List{Items: []ast.Node{}} + for _, col := range cols { + list.Items = append(list.Items, &ast.ResTarget{ + Indirection: &ast.List{}, + Val: c.convertExpr(col.Expr), + Location: col.Pos(), + }) } + return list +} - var selectStmt *ast.SelectStmt - for s, icore := range n.AllSelect_core() { - core, ok := icore.(*parser.Select_coreContext) - if !ok { - continue - } - cols := c.getCols(core) - tables := c.getTables(core) - - var where ast.Node - i := 0 - if core.WHERE_() != nil { - where = c.convert(core.Expr(i)) - i++ - } - - var groups ast.List - var having ast.Node - if core.GROUP_() != nil { - l := len(core.AllExpr()) - i - if core.HAVING_() != nil { - having = c.convert(core.Expr(l)) - l-- - } +// +// SELECT +// - for i < l { - groups.Items = append(groups.Items, c.convert(core.Expr(i))) - i++ - } +func (c *cc) convertSelectStmt(n *meyer.SelectStmt) ast.Node { + var stmt *ast.SelectStmt + for i, core := range n.Cores { + sel := c.convertSelectCore(core) + if stmt == nil { + stmt = sel + continue } - var window ast.List - if core.WINDOW_() != nil { - for w, windowNameCtx := range core.AllWindow_name() { - windowName := identifier(windowNameCtx.GetText()) - windowDef := core.Window_defn(w) - - _ = windowDef.Base_window_name() - var partitionBy ast.List - if windowDef.PARTITION_() != nil { - for _, e := range windowDef.AllExpr() { - partitionBy.Items = append(partitionBy.Items, c.convert(e)) - } - } - var orderBy ast.List - if windowDef.ORDER_() != nil { - for _, e := range windowDef.AllOrdering_term() { - oterm := e.(*parser.Ordering_termContext) - sortByDir := ast.SortByDirDefault - if ad := oterm.Asc_desc(); ad != nil { - if ad.ASC_() != nil { - sortByDir = ast.SortByDirAsc - } else { - sortByDir = ast.SortByDirDesc - } - } - sortByNulls := ast.SortByNullsDefault - if oterm.NULLS_() != nil { - if oterm.FIRST_() != nil { - sortByNulls = ast.SortByNullsFirst - } else { - sortByNulls = ast.SortByNullsLast - } - } - - orderBy.Items = append(orderBy.Items, &ast.SortBy{ - Node: c.convert(oterm.Expr()), - SortbyDir: sortByDir, - SortbyNulls: sortByNulls, - UseOp: &ast.List{}, - }) - } - } - window.Items = append(window.Items, &ast.WindowDef{ - Name: &windowName, - PartitionClause: &partitionBy, - OrderClause: &orderBy, - FrameOptions: 0, // todo - StartOffset: &ast.TODO{}, - EndOffset: &ast.TODO{}, - Location: windowNameCtx.GetStart().GetStart(), - }) + op, all := ast.None, false + if i-1 < len(n.Ops) { + switch n.Ops[i-1].Op { + case "UNION": + op = ast.Union + all = n.Ops[i-1].All + case "INTERSECT": + op = ast.Intersect + case "EXCEPT": + op = ast.Except } } - sel := &ast.SelectStmt{ - FromClause: &ast.List{Items: tables}, - TargetList: &ast.List{Items: cols}, - WhereClause: where, - GroupClause: &groups, - HavingClause: having, - WindowClause: &window, - ValuesLists: &ast.List{}, - } - if selectStmt == nil { - selectStmt = sel - } else { - co := n.Compound_operator(s - 1) - so := ast.None - all := false - switch { - case co.UNION_() != nil: - so = ast.Union - all = co.ALL_() != nil - case co.INTERSECT_() != nil: - so = ast.Intersect - case co.EXCEPT_() != nil: - so = ast.Except - } - selectStmt = &ast.SelectStmt{ - TargetList: &ast.List{}, - FromClause: &ast.List{}, - Op: so, - All: all, - Larg: selectStmt, - Rarg: sel, - } + stmt = &ast.SelectStmt{ + TargetList: &ast.List{}, + FromClause: &ast.List{}, + Op: op, + All: all, + Larg: stmt, + Rarg: sel, } + // ORDER BY and LIMIT are written on the last core of a compound + // select but apply to the compound as a whole. + hoistTail(stmt, stmt.Rarg) } - - limitCount, limitOffset := c.convertLimit_stmtContext(n.Limit_stmt()) - selectStmt.LimitCount = limitCount - selectStmt.LimitOffset = limitOffset - // Only set WithClause if there are CTEs - if len(ctes.Items) > 0 { - selectStmt.WithClause = &ast.WithClause{Ctes: &ctes} + if stmt == nil { + return todo("convertSelectStmt", n) } - return selectStmt + stmt.WithClause = c.convertWith(n.With) + return stmt } -func (c *cc) convertExprListContext(n *parser.Expr_listContext) ast.Node { - list := &ast.List{Items: []ast.Node{}} - for _, e := range n.AllExpr() { - list.Items = append(list.Items, c.convert(e)) - } - return list +// hoistTail moves the sort and limit clauses of a compound select's final +// core up onto the compound itself. +func hoistTail(outer, inner *ast.SelectStmt) { + outer.SortClause, inner.SortClause = inner.SortClause, nil + outer.LimitCount, inner.LimitCount = inner.LimitCount, nil + outer.LimitOffset, inner.LimitOffset = inner.LimitOffset, nil } -func (c *cc) getTables(core *parser.Select_coreContext) []ast.Node { - if core.Join_clause() != nil { - join := core.Join_clause().(*parser.Join_clauseContext) - tables := c.convertTablesOrSubquery(join.AllTable_or_subquery()) - table := tables[0] - for i, t := range tables[1:] { - joinExpr := &ast.JoinExpr{ - Larg: table, - Rarg: t, - } - jo := join.Join_operator(i) - if jo.NATURAL_() != nil { - joinExpr.IsNatural = true - } - switch { - case jo.CROSS_() != nil || jo.INNER_() != nil: - joinExpr.Jointype = ast.JoinTypeInner - case jo.LEFT_() != nil: - joinExpr.Jointype = ast.JoinTypeLeft - case jo.RIGHT_() != nil: - joinExpr.Jointype = ast.JoinTypeRight - case jo.FULL_() != nil: - joinExpr.Jointype = ast.JoinTypeFull - } - jc := join.Join_constraint(i) - switch { - case jc.ON_() != nil: - joinExpr.Quals = c.convert(jc.Expr()) - case jc.USING_() != nil: - var using ast.List - for _, cn := range jc.AllColumn_name() { - using.Items = append(using.Items, NewIdentifier(cn.GetText())) - } - joinExpr.UsingClause = &using - } - table = joinExpr +func (c *cc) convertSelectCore(core meyer.SelectCore) *ast.SelectStmt { + switch n := core.(type) { + case *meyer.SelectQuery: + stmt := &ast.SelectStmt{ + TargetList: &ast.List{Items: c.convertResultColumns(n.Columns)}, + FromClause: &ast.List{Items: c.convertFrom(n.From)}, + WhereClause: c.convertExpr(n.Where), + GroupClause: &ast.List{}, + HavingClause: c.convertExpr(n.Having), + WindowClause: &ast.List{}, + ValuesLists: &ast.List{}, } - return []ast.Node{table} - } else { - return c.convertTablesOrSubquery(core.AllTable_or_subquery()) - } -} - -func (c *cc) getCols(core *parser.Select_coreContext) []ast.Node { - var cols []ast.Node - for _, icol := range core.AllResult_column() { - col, ok := icol.(*parser.Result_columnContext) - if !ok { - continue + for _, g := range n.GroupBy { + stmt.GroupClause.Items = append(stmt.GroupClause.Items, c.convert(g)) } - target := &ast.ResTarget{ - Location: col.GetStart().GetStart(), + if n.Distinct == meyer.DistinctDistinct { + // SQLite has no DISTINCT ON, so the clause carries no columns. + stmt.DistinctClause = &ast.List{Items: []ast.Node{&ast.TODO{}}} } - var val ast.Node - iexpr := col.Expr() - switch { - case col.STAR() != nil: - val = c.convertWildCardField(col) - case iexpr != nil: - val = c.convert(iexpr) + for _, w := range n.Windows { + stmt.WindowClause.Items = append(stmt.WindowClause.Items, c.convertWindowDef(w)) } - - if val == nil { - continue + if len(n.OrderBy) > 0 { + stmt.SortClause = &ast.List{Items: c.convertOrderBy(n.OrderBy)} } - - if col.Column_alias() != nil { - name := identifier(col.Column_alias().GetText()) - target.Name = &name + if n.Limit != nil { + stmt.LimitCount = c.convertExpr(n.Limit.Count) + stmt.LimitOffset = c.convertExpr(n.Limit.Offset) } + return stmt - target.Val = val - cols = append(cols, target) - } - return cols -} - -func (c *cc) convertWildCardField(n *parser.Result_columnContext) *ast.ColumnRef { - items := []ast.Node{} - if n.Table_name() != nil { - items = append(items, NewIdentifier(n.Table_name().GetText())) - } - items = append(items, &ast.A_Star{}) + case *meyer.ValuesClause: + values := &ast.List{} + for _, row := range n.Rows { + values.Items = append(values.Items, c.convertExprList(row)) + } + return &ast.SelectStmt{ + TargetList: &ast.List{}, + FromClause: &ast.List{}, + ValuesLists: values, + } - return &ast.ColumnRef{ - Fields: &ast.List{ - Items: items, - }, - Location: n.GetStart().GetStart(), + default: + return &ast.SelectStmt{ + TargetList: &ast.List{}, + FromClause: &ast.List{}, + ValuesLists: &ast.List{}, + } } } -func (c *cc) convertOrderby_stmtContext(n parser.IOrder_by_stmtContext) ast.Node { - if orderBy, ok := n.(*parser.Order_by_stmtContext); ok { - list := &ast.List{Items: []ast.Node{}} - for _, o := range orderBy.AllOrdering_term() { - term, ok := o.(*parser.Ordering_termContext) - if !ok { - continue - } - list.Items = append(list.Items, &ast.CaseExpr{ - Xpr: c.convert(term.Expr()), - Location: term.Expr().GetStart().GetStart(), - }) +func (c *cc) convertResultColumns(cols []*meyer.ResultColumn) []ast.Node { + var out []ast.Node + for _, col := range cols { + val := c.convertExpr(col.Expr) + if val == nil { + continue } - return list + target := &ast.ResTarget{ + Val: val, + Location: col.Pos(), + } + if col.Alias != nil { + name := identifier(col.Alias) + target.Name = &name + } + out = append(out, target) } - return todo("convertOrderby_stmtContext", n) + return out } -func (c *cc) convertLimit_stmtContext(n parser.ILimit_stmtContext) (ast.Node, ast.Node) { - if n == nil { - return nil, nil - } - - var limitCount, limitOffset ast.Node - if limit, ok := n.(*parser.Limit_stmtContext); ok { - limitCount = c.convert(limit.Expr(0)) - if limit.OFFSET_() != nil { - limitOffset = c.convert(limit.Expr(1)) +func (c *cc) convertOrderBy(terms []*meyer.OrderingTerm) []ast.Node { + var out []ast.Node + for _, term := range terms { + sortBy := &ast.SortBy{ + Node: c.convertExpr(term.Expr), + UseOp: &ast.List{}, + Location: term.Pos(), + } + switch term.Order { + case meyer.SortAsc: + sortBy.SortbyDir = ast.SortByDirAsc + case meyer.SortDesc: + sortBy.SortbyDir = ast.SortByDirDesc + default: + sortBy.SortbyDir = ast.SortByDirDefault + } + switch term.Nulls { + case meyer.NullsFirst: + sortBy.SortbyNulls = ast.SortByNullsFirst + case meyer.NullsLast: + sortBy.SortbyNulls = ast.SortByNullsLast + default: + sortBy.SortbyNulls = ast.SortByNullsDefault } + out = append(out, sortBy) } - - return limitCount, limitOffset + return out } -func (c *cc) convertSql_stmtContext(n *parser.Sql_stmtContext) ast.Node { - if stmt := n.Alter_table_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Analyze_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Attach_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Begin_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Commit_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Create_index_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Create_table_stmt(); stmt != nil { - return c.convert(stmt) +func (c *cc) convertWindowDef(n *meyer.WindowDef) ast.Node { + def := &ast.WindowDef{ + PartitionClause: c.convertExprList(n.Partition), + OrderClause: &ast.List{Items: c.convertOrderBy(n.OrderBy)}, + Location: n.Pos(), } - if stmt := n.Create_trigger_stmt(); stmt != nil { - return c.convert(stmt) + if n.Name != nil { + name := identifier(n.Name) + def.Name = &name } - if stmt := n.Create_view_stmt(); stmt != nil { - return c.convert(stmt) + if n.Base != nil { + base := identifier(n.Base) + def.Refname = &base } - if stmt := n.Create_virtual_table_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Delete_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Delete_stmt_limited(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Detach_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Drop_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Insert_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Pragma_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Reindex_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Release_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Rollback_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Savepoint_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Select_stmt(); stmt != nil { - return c.convert(stmt) - } - if stmt := n.Update_stmt(); stmt != nil { - return c.convert(stmt) + return def +} + +func (c *cc) convertWith(n *meyer.With) *ast.WithClause { + if n == nil || len(n.CTEs) == 0 { + return nil } - if stmt := n.Update_stmt_limited(); stmt != nil { - return c.convert(stmt) + ctes := &ast.List{} + for _, cte := range n.CTEs { + name := identifier(cte.Name) + cols := &ast.List{} + for _, col := range cte.Columns { + cols.Items = append(cols.Items, NewIdentifier(col)) + } + ctes.Items = append(ctes.Items, &ast.CommonTableExpr{ + Ctename: &name, + Ctequery: c.convert(cte.Select), + Location: cte.Pos(), + Cterecursive: n.Recursive, + Ctecolnames: cols, + }) } - if stmt := n.Vacuum_stmt(); stmt != nil { - return c.convert(stmt) + return &ast.WithClause{ + Ctes: ctes, + Recursive: n.Recursive, + Location: n.Pos(), } - return nil } -func (c *cc) convertLiteral(n *parser.Expr_literalContext) ast.Node { - if literal, ok := n.Literal_value().(*parser.Literal_valueContext); ok { - - if literal.NUMERIC_LITERAL() != nil { - i, _ := strconv.ParseInt(literal.GetText(), 10, 64) - return &ast.A_Const{ - Val: &ast.Integer{Ival: i}, - Location: n.GetStart().GetStart(), - } +// convertFrom converts a SQLite source list. The list is flat, with each +// item recording how it attaches to the one before it, so a chain of joins +// is rebuilt here as a left-leaning tree. A list joined only by commas has +// no join conditions to carry and stays flat. +func (c *cc) convertFrom(refs []*meyer.TableRef) []ast.Node { + if len(refs) == 0 { + return nil + } + if commaOnly(refs) { + out := make([]ast.Node, 0, len(refs)) + for _, ref := range refs { + out = append(out, c.convertTableRef(ref)) } - - if literal.STRING_LITERAL() != nil { - // remove surrounding single quote - text := literal.GetText() - return &ast.A_Const{ - Val: &ast.String{Str: text[1 : len(text)-1]}, - Location: n.GetStart().GetStart(), - } + return out + } + table := c.convertTableRef(refs[0]) + for _, ref := range refs[1:] { + join := &ast.JoinExpr{ + Larg: table, + Rarg: c.convertTableRef(ref), } - - if literal.TRUE_() != nil || literal.FALSE_() != nil { - var i int64 - if literal.TRUE_() != nil { - i = 1 - } - - return &ast.A_Const{ - Val: &ast.Integer{Ival: i}, - Location: n.GetStart().GetStart(), + if op := ref.Join; op != nil { + join.IsNatural = op.Type&meyer.JoinNatural != 0 + left := op.Type&meyer.JoinLeft != 0 + right := op.Type&meyer.JoinRight != 0 + switch { + case left && right: + join.Jointype = ast.JoinTypeFull + case left: + join.Jointype = ast.JoinTypeLeft + case right: + join.Jointype = ast.JoinTypeRight + case op.Type&meyer.JoinComma == 0: + join.Jointype = ast.JoinTypeInner } } - - if literal.NULL_() != nil { - return &ast.A_Const{ - Val: &ast.Null{}, - Location: n.GetStart().GetStart(), + if ref.On != nil { + join.Quals = c.convert(ref.On) + } + if len(ref.Using) > 0 { + using := &ast.List{} + for _, col := range ref.Using { + using.Items = append(using.Items, NewIdentifier(col)) } + join.UsingClause = using } + table = join } - return todo("convertLiteral", n) + return []ast.Node{table} } -func (c *cc) convertBinaryNode(n *parser.Expr_binaryContext) ast.Node { - return &ast.A_Expr{ - Name: &ast.List{ - Items: []ast.Node{ - &ast.String{Str: n.GetChild(1).(antlr.TerminalNode).GetText()}, - }, - }, - Lexpr: c.convert(n.Expr(0)), - Rexpr: c.convert(n.Expr(1)), - } -} - -func (c *cc) convertBoolNode(n *parser.Expr_boolContext) ast.Node { - var op ast.BoolExprType - if n.AND_() != nil { - op = ast.BoolExprTypeAnd - } else if n.OR_() != nil { - op = ast.BoolExprTypeOr - } - return &ast.BoolExpr{ - Boolop: op, - Args: &ast.List{ - Items: []ast.Node{ - c.convert(n.Expr(0)), - c.convert(n.Expr(1)), - }, - }, +func commaOnly(refs []*meyer.TableRef) bool { + for _, ref := range refs[1:] { + if ref.Join == nil || ref.Join.Type&meyer.JoinComma == 0 { + return false + } } + return true } -func (c *cc) convertUnaryExpr(n *parser.Expr_unaryContext) ast.Node { - op := n.Unary_operator() - if op == nil { - return c.convert(n.Expr()) - } - - // Get the inner expression - expr := c.convert(n.Expr()) - - // Check the operator type - if opCtx, ok := op.(*parser.Unary_operatorContext); ok { - if opCtx.NOT_() != nil { - // NOT expression - return &ast.BoolExpr{ - Boolop: ast.BoolExprTypeNot, - Args: &ast.List{ - Items: []ast.Node{expr}, - }, - } +func (c *cc) convertTableRef(n *meyer.TableRef) ast.Node { + switch { + case n.Name != nil && n.HasArgs: + // A table-valued function, such as generate_series(1, 10). + fn := &ast.FuncCall{ + Func: &ast.FuncName{Name: identifier(n.Name.Name)}, + Funcname: &ast.List{Items: []ast.Node{NewIdentifier(n.Name.Name)}}, + Args: c.convertExprList(n.Args), + Location: n.Pos(), } - if opCtx.MINUS() != nil { - // Negative number: -expr - return &ast.A_Expr{ - Name: &ast.List{Items: []ast.Node{&ast.String{Str: "-"}}}, - Rexpr: expr, - } + if n.Name.Schema != nil { + fn.Func.Schema = identifier(n.Name.Schema) } - if opCtx.PLUS() != nil { - // Positive number: +expr (just return expr) - return expr + rf := &ast.RangeFunction{ + Functions: &ast.List{Items: []ast.Node{fn}}, } - if opCtx.TILDE() != nil { - // Bitwise NOT: ~expr - return &ast.A_Expr{ - Name: &ast.List{Items: []ast.Node{&ast.String{Str: "~"}}}, - Rexpr: expr, - } + if n.Alias != nil { + alias := identifier(n.Alias) + rf.Alias = &ast.Alias{Aliasname: &alias} } - } + return rf - return expr -} + case n.Name != nil: + rv := parseRangeVar(n.Name, n.Alias) + rv.Location = n.Pos() + return rv -func (c *cc) convertParam(n *parser.Expr_bindContext) ast.Node { - if n.NUMBERED_BIND_PARAMETER() != nil { - // Parameter numbers start at one - c.paramCount += 1 - - text := n.GetText() - number := c.paramCount - if len(text) > 1 { - number, _ = strconv.Atoi(text[1:]) + case n.Select != nil: + rs := &ast.RangeSubselect{ + Subquery: c.convert(n.Select), } - return &ast.ParamRef{ - Number: number, - Location: n.GetStart().GetStart(), - Dollar: len(text) > 1, + if n.Alias != nil { + alias := identifier(n.Alias) + rs.Alias = &ast.Alias{Aliasname: &alias} } - } + return rs - if n.NAMED_BIND_PARAMETER() != nil { - return &ast.A_Expr{ - Name: &ast.List{Items: []ast.Node{&ast.String{Str: "@"}}}, - Rexpr: &ast.String{Str: n.GetText()[1:]}, - Location: n.GetStart().GetStart(), + case len(n.List) > 0: + // A parenthesized source list, as in "FROM (a JOIN b ON ...)". + nested := c.convertFrom(n.List) + if len(nested) == 1 { + return nested[0] } + return &ast.List{Items: nested} } - - return todo("convertParam", n) + return todo("convertTableRef", n) } -func (c *cc) convertInSelectNode(n *parser.Expr_in_selectContext) ast.Node { - // Check if this is EXISTS or NOT EXISTS - if n.EXISTS_() != nil { - linkType := ast.EXISTS_SUBLINK - sublink := &ast.SubLink{ - SubLinkType: linkType, - Subselect: c.convert(n.Select_stmt()), - } - if n.NOT_() != nil { - // NOT EXISTS is represented as a BoolExpr NOT wrapping the EXISTS - return &ast.BoolExpr{ - Boolop: ast.BoolExprTypeNot, - Args: &ast.List{ - Items: []ast.Node{sublink}, - }, - } - } - return sublink - } +// +// Expressions +// - // Check if this is an IN/NOT IN expression: expr IN (SELECT ...) - if n.IN_() != nil && len(n.AllExpr()) > 0 { - linkType := ast.ANY_SUBLINK - sublink := &ast.SubLink{ - SubLinkType: linkType, - Testexpr: c.convert(n.Expr(0)), - Subselect: c.convert(n.Select_stmt()), - } - if n.NOT_() != nil { - return &ast.A_Expr{ - Kind: ast.A_Expr_Kind_OP, - Name: &ast.List{Items: []ast.Node{&ast.String{Str: "NOT IN"}}}, - Lexpr: c.convert(n.Expr(0)), - Rexpr: &ast.SubLink{ - SubLinkType: ast.EXPR_SUBLINK, - Subselect: c.convert(n.Select_stmt()), - }, +func (c *cc) convertLiteral(n *meyer.Literal) ast.Node { + switch n.Kind { + case meyer.LitInteger: + if i, ok := parseInteger(n.Value); ok { + return &ast.A_Const{ + Val: &ast.Integer{Ival: i}, + Location: n.Pos(), } } - return sublink - } + // Too wide for an int64, or written with the digit separators + // SQLite accepts. Either way the value is still numeric. + return &ast.A_Const{ + Val: &ast.Float{Str: n.Value}, + Location: n.Pos(), + } - // Plain subquery in parentheses (SELECT ...) - return &ast.SubLink{ - SubLinkType: ast.EXPR_SUBLINK, - Subselect: c.convert(n.Select_stmt()), - } -} + case meyer.LitFloat: + return &ast.A_Const{ + Val: &ast.Float{Str: n.Value}, + Location: n.Pos(), + } -func (c *cc) convertReturning_caluseContext(n parser.IReturning_clauseContext) *ast.List { - list := &ast.List{Items: []ast.Node{}} - if n == nil { - return list - } + case meyer.LitString, meyer.LitBlob: + return &ast.A_Const{ + Val: &ast.String{Str: n.Value}, + Location: n.Pos(), + } - r, ok := n.(*parser.Returning_clauseContext) - if !ok { - return list + case meyer.LitNull: + return &ast.A_Const{ + Val: &ast.Null{}, + Location: n.Pos(), + } } - - for _, exp := range r.AllExpr() { - list.Items = append(list.Items, &ast.ResTarget{ - Indirection: &ast.List{}, - Val: c.convert(exp), - }) + // CURRENT_DATE, CURRENT_TIME and CURRENT_TIMESTAMP are keywords rather + // than function calls, but behave like niladic functions. + name := strings.ToLower(n.Raw) + return &ast.FuncCall{ + Func: &ast.FuncName{Name: name}, + Funcname: &ast.List{Items: []ast.Node{&ast.String{Str: name}}}, + Args: &ast.List{}, + AggOrder: &ast.List{}, + Location: n.Pos(), } +} - for _, star := range r.AllSTAR() { - list.Items = append(list.Items, &ast.ResTarget{ - Indirection: &ast.List{}, - Val: &ast.ColumnRef{ - Fields: &ast.List{ - Items: []ast.Node{&ast.A_Star{}}, - }, - Location: star.GetSymbol().GetStart(), - }, - Location: star.GetSymbol().GetStart(), - }) +// parseInteger reads an integer literal in either of the two forms SQLite +// writes: decimal, where a leading zero is not an octal prefix, and +// hexadecimal. +func parseInteger(s string) (int64, bool) { + if len(s) > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X') { + i, err := strconv.ParseInt(s[2:], 16, 64) + return i, err == nil } - - return list + i, err := strconv.ParseInt(s, 10, 64) + return i, err == nil } -func (c *cc) convertInsert_stmtContext(n *parser.Insert_stmtContext) ast.Node { - tableName := identifier(n.Table_name().GetText()) - rel := &ast.RangeVar{ - Relname: &tableName, - } - if n.Schema_name() != nil { - schemaName := n.Schema_name().GetText() - rel.Schemaname = &schemaName - } - if n.Table_alias() != nil { - tableAlias := identifier(n.Table_alias().GetText()) - rel.Alias = &ast.Alias{ - Aliasname: &tableAlias, +func (c *cc) convertBindParam(n *meyer.BindParam) ast.Node { + switch n.Kind { + case meyer.ParamAnon, meyer.ParamNumber: + // Parameter numbers start at one. + c.paramCount += 1 + number := c.paramCount + if n.Kind == meyer.ParamNumber { + number = n.Number } - } - - insert := &ast.InsertStmt{ - Relation: rel, - Cols: c.convertColumnNames(n.AllColumn_name()), - ReturningList: c.convertReturning_caluseContext(n.Returning_clause()), - } - - // Check if this is a DEFAULT VALUES insert - hasDefaultValues := false - for _, child := range n.GetChildren() { - if term, ok := child.(antlr.TerminalNode); ok { - if term.GetSymbol().GetTokenType() == parser.SQLiteParserDEFAULT_ { - hasDefaultValues = true - break - } + return &ast.ParamRef{ + Number: number, + Location: n.Pos(), + Dollar: n.Kind == meyer.ParamNumber, + } + default: + // A named parameter. sqlc carries the name through as the operand of + // a pseudo-operator and resolves it later. + return &ast.A_Expr{ + Name: &ast.List{Items: []ast.Node{&ast.String{Str: "@"}}}, + Rexpr: &ast.String{Str: n.Name}, + Location: n.Pos(), } } +} - if hasDefaultValues { - // For DEFAULT VALUES, set the flag instead of creating an empty values list - insert.DefaultValues = true - } else if n.Select_stmt() != nil { - if ss, ok := c.convert(n.Select_stmt()).(*ast.SelectStmt); ok { - ss.ValuesLists = &ast.List{} - insert.SelectStmt = ss +func (c *cc) convertBinaryExpr(n *meyer.BinaryExpr) ast.Node { + switch n.Op { + case meyer.OpAnd, meyer.OpOr: + op := ast.BoolExprTypeAnd + if n.Op == meyer.OpOr { + op = ast.BoolExprTypeOr } - } else { - var valuesLists ast.List - var values *ast.List - for _, cn := range n.GetChildren() { - switch cn := cn.(type) { - case antlr.TerminalNode: - switch cn.GetSymbol().GetTokenType() { - case parser.SQLiteParserVALUES_: - values = &ast.List{} - case parser.SQLiteParserOPEN_PAR: - if values != nil { - values = &ast.List{} - } - case parser.SQLiteParserCOMMA: - case parser.SQLiteParserCLOSE_PAR: - if values != nil { - valuesLists.Items = append(valuesLists.Items, values) - } - } - case parser.IExprContext: - if values != nil { - values.Items = append(values.Items, c.convert(cn)) - } - } - } - - insert.SelectStmt = &ast.SelectStmt{ - FromClause: &ast.List{}, - TargetList: &ast.List{}, - ValuesLists: &valuesLists, + return &ast.BoolExpr{ + Boolop: op, + Args: &ast.List{Items: []ast.Node{ + c.convert(n.X), + c.convert(n.Y), + }}, + Location: n.Pos(), } } - - return insert -} - -func (c *cc) convertColumnNames(cols []parser.IColumn_nameContext) *ast.List { - list := &ast.List{Items: []ast.Node{}} - for _, c := range cols { - name := identifier(c.GetText()) - list.Items = append(list.Items, &ast.ResTarget{ - Name: &name, - }) + return &ast.A_Expr{ + Name: &ast.List{Items: []ast.Node{&ast.String{Str: n.Op.String()}}}, + Lexpr: c.convert(n.X), + Rexpr: c.convert(n.Y), + Location: n.Pos(), } - return list } -func (c *cc) convertTablesOrSubquery(n []parser.ITable_or_subqueryContext) []ast.Node { - var tables []ast.Node - for _, ifrom := range n { - from, ok := ifrom.(*parser.Table_or_subqueryContext) - if !ok { - continue +func (c *cc) convertUnaryExpr(n *meyer.UnaryExpr) ast.Node { + expr := c.convert(n.X) + switch n.Op { + case meyer.OpNot: + return &ast.BoolExpr{ + Boolop: ast.BoolExprTypeNot, + Args: &ast.List{Items: []ast.Node{expr}}, + Location: n.Pos(), } - - if from.Table_name() != nil { - rel := identifier(from.Table_name().GetText()) - rv := &ast.RangeVar{ - Relname: &rel, - Location: from.GetStart().GetStart(), - } - - if from.Schema_name() != nil { - schema := from.Schema_name().GetText() - rv.Schemaname = &schema - } - if from.Table_alias() != nil { - alias := identifier(from.Table_alias().GetText()) - rv.Alias = &ast.Alias{Aliasname: &alias} - } - if from.Table_alias_fallback() != nil { - alias := identifier(from.Table_alias_fallback().GetText()) - rv.Alias = &ast.Alias{Aliasname: &alias} - } - - tables = append(tables, rv) - } else if from.Table_function_name() != nil { - rel := from.Table_function_name().GetText() - // Convert function arguments - var args []ast.Node - for _, expr := range from.AllExpr() { - args = append(args, c.convert(expr)) - } - rf := &ast.RangeFunction{ - Functions: &ast.List{ - Items: []ast.Node{ - &ast.FuncCall{ - Func: &ast.FuncName{ - Name: rel, - }, - Funcname: &ast.List{ - Items: []ast.Node{ - NewIdentifier(rel), - }, - }, - Args: &ast.List{ - Items: args, - }, - Location: from.GetStart().GetStart(), - }, - }, - }, - } - - if from.Table_alias() != nil { - alias := identifier(from.Table_alias().GetText()) - rf.Alias = &ast.Alias{Aliasname: &alias} - } - - tables = append(tables, rf) - } else if from.Select_stmt() != nil { - rs := &ast.RangeSubselect{ - Subquery: c.convert(from.Select_stmt()), - } - - if from.Table_alias() != nil { - alias := identifier(from.Table_alias().GetText()) - rs.Alias = &ast.Alias{Aliasname: &alias} - } - - tables = append(tables, rs) + case meyer.OpPlus: + // A unary plus is a no-op on every operand SQLite accepts. + return expr + default: + return &ast.A_Expr{ + Name: &ast.List{Items: []ast.Node{&ast.String{Str: n.Op.String()}}}, + Rexpr: expr, + Location: n.Pos(), } } - - return tables } -type Update_stmt interface { - Qualified_table_name() parser.IQualified_table_nameContext - GetStart() antlr.Token - AllColumn_name() []parser.IColumn_nameContext - WHERE_() antlr.TerminalNode - Expr(i int) parser.IExprContext - AllExpr() []parser.IExprContext +func (c *cc) convertIsExpr(n *meyer.IsExpr) ast.Node { + expr := &ast.A_Expr{ + Lexpr: c.convert(n.X), + Rexpr: c.convert(n.Y), + Location: n.Pos(), + } + var name string + switch { + case n.Distinct && n.Not: + expr.Kind = ast.A_Expr_Kind_NOT_DISTINCT + name = "IS NOT DISTINCT FROM" + case n.Distinct: + expr.Kind = ast.A_Expr_Kind_DISTINCT + name = "IS DISTINCT FROM" + case n.Not: + name = "IS NOT" + default: + name = "IS" + } + expr.Name = &ast.List{Items: []ast.Node{&ast.String{Str: name}}} + return expr } -func (c *cc) convertUpdate_stmtContext(n Update_stmt) ast.Node { - if n == nil { - return nil +func (c *cc) convertNullCheckExpr(n *meyer.NullCheckExpr) ast.Node { + name := "NOT NULL" + switch n.Test { + case meyer.TestIsNull: + name = "ISNULL" + case meyer.TestNotNull: + name = "NOTNULL" } - - relations := &ast.List{} - tableName := identifier(n.Qualified_table_name().GetText()) - rel := ast.RangeVar{ - Relname: &tableName, - Location: n.GetStart().GetStart(), + return &ast.A_Expr{ + Name: &ast.List{Items: []ast.Node{&ast.String{Str: name}}}, + Lexpr: c.convert(n.X), + Location: n.Pos(), } - relations.Items = append(relations.Items, &rel) +} - list := &ast.List{} - for i, col := range n.AllColumn_name() { - colName := identifier(col.GetText()) - target := &ast.ResTarget{ - Name: &colName, - Val: c.convert(n.Expr(i)), - } - list.Items = append(list.Items, target) +func (c *cc) convertLikeExpr(n *meyer.LikeExpr) ast.Node { + name := strings.ToUpper(n.Op.Name) + if n.Not { + name = "NOT " + name } + return &ast.A_Expr{ + Name: &ast.List{Items: []ast.Node{&ast.String{Str: name}}}, + Lexpr: c.convert(n.X), + Rexpr: c.convert(n.Y), + Location: n.Pos(), + } +} - var where ast.Node = nil - if n.WHERE_() != nil { - where = c.convert(n.Expr(len(n.AllExpr()) - 1)) +func (c *cc) convertInExpr(n *meyer.InExpr) ast.Node { + if n.Select != nil { + sublink := &ast.SubLink{ + SubLinkType: ast.ANY_SUBLINK, + Testexpr: c.convert(n.X), + Subselect: c.convertSelectStmt(n.Select), + Location: n.Pos(), + } + if !n.Not { + return sublink + } + return &ast.BoolExpr{ + Boolop: ast.BoolExprTypeNot, + Args: &ast.List{Items: []ast.Node{sublink}}, + Location: n.Pos(), + } } - stmt := &ast.UpdateStmt{ - Relations: relations, - TargetList: list, - WhereClause: where, - FromClause: &ast.List{}, - WithClause: nil, // TODO: support with clause + in := &ast.In{ + Expr: c.convert(n.X), + Not: n.Not, + Location: n.Pos(), } - if n, ok := n.(interface { - Returning_clause() parser.IReturning_clauseContext - }); ok { - stmt.ReturningList = c.convertReturning_caluseContext(n.Returning_clause()) - } else { - stmt.ReturningList = c.convertReturning_caluseContext(nil) + if n.Table != nil { + // "expr IN table" tests membership in the table's single column. + in.Sel = parseRangeVar(n.Table, nil) + return in } - if n, ok := n.(interface { - Limit_stmt() parser.ILimit_stmtContext - }); ok { - limitCount, _ := c.convertLimit_stmtContext(n.Limit_stmt()) - stmt.LimitCount = limitCount + for _, e := range n.List { + in.List = append(in.List, c.convert(e)) } - return stmt + return in } -func (c *cc) convertBetweenExpr(n *parser.Expr_betweenContext) ast.Node { +func (c *cc) convertBetweenExpr(n *meyer.BetweenExpr) ast.Node { return &ast.BetweenExpr{ - Expr: c.convert(n.Expr(0)), - Left: c.convert(n.Expr(1)), - Right: c.convert(n.Expr(2)), - Location: n.GetStart().GetStart(), - Not: n.NOT_() != nil, + Expr: c.convert(n.X), + Left: c.convert(n.Lo), + Right: c.convert(n.Hi), + Not: n.Not, + Location: n.Pos(), } } -func (c *cc) convertCastExpr(n *parser.Expr_castContext) ast.Node { - name := n.Type_name().GetText() +func (c *cc) convertCastExpr(n *meyer.CastExpr) ast.Node { + name := typeName(n.Type) return &ast.TypeCast{ - Arg: c.convert(n.Expr()), + Arg: c.convert(n.X), TypeName: &ast.TypeName{ - Name: name, - Names: &ast.List{Items: []ast.Node{ - NewIdentifier(name), - }}, + Name: name, + Names: &ast.List{Items: []ast.Node{&ast.String{Str: strings.ToLower(name)}}}, ArrayBounds: &ast.List{}, }, - Location: n.GetStart().GetStart(), + Location: n.Pos(), } } -func (c *cc) convertCollateExpr(n *parser.Expr_collateContext) ast.Node { +func (c *cc) convertCollateExpr(n *meyer.CollateExpr) ast.Node { return &ast.CollateExpr{ - Xpr: c.convert(n.Expr()), - Arg: NewIdentifier(n.Collation_name().GetText()), - Location: n.GetStart().GetStart(), + Xpr: c.convert(n.X), + Arg: NewIdentifier(n.Name), + Location: n.Pos(), } } -func (c *cc) convertCase(n *parser.Expr_caseContext) ast.Node { - e := &ast.CaseExpr{ - Args: &ast.List{}, - } - es := n.AllExpr() - if n.ELSE_() != nil { - e.Defresult = c.convert(es[len(es)-1]) - es = es[:len(es)-1] - } - if len(es)%2 == 1 { - e.Arg = c.convert(es[0]) - es = es[1:] - } - for i := 0; i < len(es); i += 2 { - e.Args.Items = append(e.Args.Items, &ast.CaseWhen{ - Expr: c.convert(es[i+0]), - Result: c.convert(es[i+1]), +func (c *cc) convertCaseExpr(n *meyer.CaseExpr) ast.Node { + expr := &ast.CaseExpr{ + Arg: c.convertExpr(n.Operand), + Args: &ast.List{}, + Defresult: c.convertExpr(n.Else), + Location: n.Pos(), + } + for _, when := range n.Whens { + expr.Args.Items = append(expr.Args.Items, &ast.CaseWhen{ + Expr: c.convert(when.When), + Result: c.convert(when.Then), + Location: when.Pos(), }) } - return e + return expr } -func (c *cc) convert(node node) ast.Node { - switch n := node.(type) { - - case *parser.Alter_table_stmtContext: - return c.convertAlter_table_stmtContext(n) - - case *parser.Attach_stmtContext: - return c.convertAttach_stmtContext(n) - - case *parser.Create_table_stmtContext: - return c.convertCreate_table_stmtContext(n) - - case *parser.Create_virtual_table_stmtContext: - return c.convertCreate_virtual_table_stmtContext(n) - - case *parser.Create_view_stmtContext: - return c.convertCreate_view_stmtContext(n) - - case *parser.Drop_stmtContext: - return c.convertDrop_stmtContext(n) - - case *parser.Delete_stmtContext: - return c.convertDelete_stmtContext(n) - - case *parser.Delete_stmt_limitedContext: - return c.convertDelete_stmtContext(n) - - case *parser.ExprContext: - return c.convertExprContext(n) - - case *parser.Expr_functionContext: - return c.convertFuncContext(n) - - case *parser.Expr_qualified_column_nameContext: - return c.convertColumnNameExpr(n) +func (c *cc) convertFuncCall(n *meyer.FuncCall) ast.Node { + funcName := identifier(n.Name) + args := c.convertExprList(n.Args) - case *parser.Expr_comparisonContext: - return c.convertComparison(n) - - case *parser.Expr_bindContext: - return c.convertParam(n) - - case *parser.Expr_literalContext: - return c.convertLiteral(n) - - case *parser.Expr_boolContext: - return c.convertBoolNode(n) - - case *parser.Expr_listContext: - return c.convertExprListContext(n) - - case *parser.Expr_binaryContext: - return c.convertBinaryNode(n) - - case *parser.Expr_unaryContext: - return c.convertUnaryExpr(n) - - case *parser.Expr_in_selectContext: - return c.convertInSelectNode(n) - - case *parser.Expr_betweenContext: - return c.convertBetweenExpr(n) - - case *parser.Expr_collateContext: - return c.convertCollateExpr(n) - - case *parser.Factored_select_stmtContext: - // TODO: need to handle this - return todo("convert(case=parser.Factored_select_stmtContext)", n) - - case *parser.Insert_stmtContext: - return c.convertInsert_stmtContext(n) - - case *parser.Order_by_stmtContext: - return c.convertOrderby_stmtContext(n) - - case *parser.Select_stmtContext: - return c.convertMultiSelect_stmtContext(n) - - case *parser.Sql_stmtContext: - return c.convertSql_stmtContext(n) - - case *parser.Update_stmtContext: - return c.convertUpdate_stmtContext(n) - - case *parser.Update_stmt_limitedContext: - return c.convertUpdate_stmtContext(n) - - case *parser.Expr_castContext: - return c.convertCastExpr(n) - - case *parser.Expr_caseContext: - return c.convertCase(n) + if funcName == "coalesce" { + return &ast.CoalesceExpr{ + Args: args, + Location: n.Pos(), + } + } - default: - return todo("convert(case=default)", n) + call := &ast.FuncCall{ + Func: &ast.FuncName{ + Name: funcName, + }, + Funcname: &ast.List{Items: []ast.Node{ + &ast.String{Str: funcName}, + }}, + AggStar: n.Star, + Args: args, + AggOrder: &ast.List{Items: c.convertOrderBy(n.OrderBy)}, + AggDistinct: n.Distinct, + AggFilter: c.convertExpr(n.Filter), + Location: n.Pos(), + } + if n.Over != nil { + if over, ok := c.convertWindowDef(n.Over).(*ast.WindowDef); ok { + call.Over = over + } } + return call } diff --git a/internal/engine/sqlite/parse.go b/internal/engine/sqlite/parse.go index 5de4c3a69e..25acfd6896 100644 --- a/internal/engine/sqlite/parse.go +++ b/internal/engine/sqlite/parse.go @@ -2,34 +2,16 @@ package sqlite import ( "errors" - "fmt" "io" - "github.com/antlr4-go/antlr/v4" - "github.com/sqlc-dev/sqlc/internal/engine/sqlite/parser" + meyer "github.com/sqlc-dev/meyer/ast" + "github.com/sqlc-dev/meyer/parser" + "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" + "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) -type errorListener struct { - *antlr.DefaultErrorListener - - err string -} - -func (el *errorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol any, line, column int, msg string, e antlr.RecognitionException) { - el.err = msg -} - -// func (el *errorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet) { -// } -// -// func (el *errorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet) { -// } -// -// func (el *errorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet) { -// } - func NewParser() *Parser { return &Parser{} } @@ -37,55 +19,85 @@ func NewParser() *Parser { type Parser struct { } +// parseOptions accepts ORDER BY and LIMIT on UPDATE and DELETE. SQLite has +// them only when built with SQLITE_ENABLE_UPDATE_DELETE_LIMIT, which meyer +// cannot tell from the SQL, so the caller has to ask. sqlc has always +// accepted them. +var parseOptions = parser.Options{UpdateDeleteLimit: true} + func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { blob, err := io.ReadAll(r) if err != nil { return nil, err } - input := antlr.NewInputStream(string(blob)) - lexer := parser.NewSQLiteLexer(input) - stream := antlr.NewCommonTokenStream(lexer, 0) - pp := parser.NewSQLiteParser(stream) - el := &errorListener{} - pp.AddErrorListener(el) - // pp.BuildParseTrees = true - tree := pp.Parse() - if el.err != "" { - return nil, errors.New(el.err) - } - pctx, ok := tree.(*parser.ParseContext) - if !ok { - return nil, fmt.Errorf("expected ParserContext; got %T\n", tree) + src := string(blob) + parsed, err := parseOptions.ParseString(src) + if err != nil { + return nil, normalizeErr(err) } - var stmts []ast.Statement - for _, istmt := range pctx.AllSql_stmt_list() { - list, ok := istmt.(*parser.Sql_stmt_listContext) - if !ok { - return nil, fmt.Errorf("expected Sql_stmt_listContext; got %T\n", istmt) - } - loc := 0 - for _, stmt := range list.AllSql_stmt() { - converter := &cc{} - out := converter.convert(stmt) - if _, ok := out.(*ast.TODO); ok { - loc = stmt.GetStop().GetStop() + 2 - continue - } - len := (stmt.GetStop().GetStop() + 1) - loc + var stmts []ast.Statement + // loc tracks the first byte after the previous statement's terminator, so + // that a statement's extent covers the comments written above it. sqlc + // reads the "-- name:" annotation out of that range. + loc := 0 + for _, raw := range parsed { + converter := &cc{} + out := converter.convert(raw) + if _, ok := out.(*ast.TODO); !ok { stmts = append(stmts, ast.Statement{ Raw: &ast.RawStmt{ Stmt: out, StmtLocation: loc, - StmtLen: len, + StmtLen: trimTerminator(src, raw) - loc, }, }) - loc = stmt.GetStop().GetStop() + 2 } + loc = raw.End() } return stmts, nil } +// trimTerminator returns the end of stmt with its terminating semicolon, and +// any space before it, removed. A statement's span runs through the +// semicolon, but sqlc's statement text does not include it. +func trimTerminator(src string, stmt meyer.Stmt) int { + end := stmt.End() + if end > stmt.Pos() && end <= len(src) && src[end-1] == ';' { + end-- + } + for end > stmt.Pos() && isSpace(src[end-1]) { + end-- + } + return end +} + +func isSpace(b byte) bool { + switch b { + case ' ', '\t', '\n', '\r', '\f': + return true + } + return false +} + +// normalizeErr turns a meyer parse failure into the positioned error sqlc +// reports to the user. meyer's message and byte offset match SQLite's own. +func normalizeErr(err error) error { + var perr *parser.Error + if !errors.As(err, &perr) { + return err + } + line, column := parser.LineCol(perr.SQL, perr.Offset) + if line == 0 { + return errors.New(perr.Message) + } + return &sqlerr.Error{ + Message: perr.Message, + Line: line, + Column: column, + } +} + func (p *Parser) CommentSyntax() source.CommentSyntax { return source.CommentSyntax{ Dash: true, diff --git a/internal/engine/sqlite/parser/.gitignore b/internal/engine/sqlite/parser/.gitignore deleted file mode 100644 index 960048667f..0000000000 --- a/internal/engine/sqlite/parser/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -antlr-4.12.0-complete.jar diff --git a/internal/engine/sqlite/parser/Makefile b/internal/engine/sqlite/parser/Makefile deleted file mode 100644 index bacae8a36b..0000000000 --- a/internal/engine/sqlite/parser/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -sqlite_parser.go: SQLiteLexer.g4 SQLiteParser.g4 antlr-4.13.1-complete.jar - java -jar antlr-4.13.1-complete.jar -Dlanguage=Go SQLiteLexer.g4 SQLiteParser.g4 - -antlr-4.13.1-complete.jar: - curl -O https://www.antlr.org/download/antlr-4.13.1-complete.jar - - diff --git a/internal/engine/sqlite/parser/SQLiteLexer.g4 b/internal/engine/sqlite/parser/SQLiteLexer.g4 deleted file mode 100644 index 5110ed44c7..0000000000 --- a/internal/engine/sqlite/parser/SQLiteLexer.g4 +++ /dev/null @@ -1,273 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2020 by Martin Mirchev - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and - * associated documentation files (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, publish, distribute, - * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or - * substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT - * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Project : sqlite-parser; an ANTLR4 grammar for SQLite https://github.com/bkiers/sqlite-parser - * Developed by : Bart Kiers, bart@big-o.nl - */ - -// $antlr-format alignTrailingComments on, columnLimit 150, maxEmptyLinesToKeep 1, reflowComments off, useTab off -// $antlr-format allowShortRulesOnASingleLine on, alignSemicolons ownLine - -lexer grammar SQLiteLexer; - -SCOL: ';'; -DOT: '.'; -OPEN_PAR: '('; -CLOSE_PAR: ')'; -COMMA: ','; -ASSIGN: '='; -STAR: '*'; -PLUS: '+'; -PTR2: '->>'; -PTR: '->'; -MINUS: '-'; -TILDE: '~'; -PIPE2: '||'; -DIV: '/'; -MOD: '%'; -LT2: '<<'; -GT2: '>>'; -AMP: '&'; -PIPE: '|'; -LT: '<'; -LT_EQ: '<='; -GT: '>'; -GT_EQ: '>='; -EQ: '=='; -NOT_EQ1: '!='; -NOT_EQ2: '<>'; - -// http://www.sqlite.org/lang_keywords.html -ABORT_: A B O R T; -ACTION_: A C T I O N; -ADD_: A D D; -AFTER_: A F T E R; -ALL_: A L L; -ALTER_: A L T E R; -ANALYZE_: A N A L Y Z E; -AND_: A N D; -AS_: A S; -ASC_: A S C; -ATTACH_: A T T A C H; -AUTOINCREMENT_: A U T O I N C R E M E N T; -BEFORE_: B E F O R E; -BEGIN_: B E G I N; -BETWEEN_: B E T W E E N; -BY_: B Y; -CASCADE_: C A S C A D E; -CASE_: C A S E; -CAST_: C A S T; -CHECK_: C H E C K; -COLLATE_: C O L L A T E; -COLUMN_: C O L U M N; -COMMIT_: C O M M I T; -CONFLICT_: C O N F L I C T; -CONSTRAINT_: C O N S T R A I N T; -CREATE_: C R E A T E; -CROSS_: C R O S S; -CURRENT_DATE_: C U R R E N T '_' D A T E; -CURRENT_TIME_: C U R R E N T '_' T I M E; -CURRENT_TIMESTAMP_: C U R R E N T '_' T I M E S T A M P; -DATABASE_: D A T A B A S E; -DEFAULT_: D E F A U L T; -DEFERRABLE_: D E F E R R A B L E; -DEFERRED_: D E F E R R E D; -DELETE_: D E L E T E; -DESC_: D E S C; -DETACH_: D E T A C H; -DISTINCT_: D I S T I N C T; -DROP_: D R O P; -EACH_: E A C H; -ELSE_: E L S E; -END_: E N D; -ESCAPE_: E S C A P E; -EXCEPT_: E X C E P T; -EXCLUSIVE_: E X C L U S I V E; -EXISTS_: E X I S T S; -EXPLAIN_: E X P L A I N; -FAIL_: F A I L; -FOR_: F O R; -FOREIGN_: F O R E I G N; -FROM_: F R O M; -FULL_: F U L L; -GLOB_: G L O B; -GROUP_: G R O U P; -HAVING_: H A V I N G; -IF_: I F; -IGNORE_: I G N O R E; -IMMEDIATE_: I M M E D I A T E; -IN_: I N; -INDEX_: I N D E X; -INDEXED_: I N D E X E D; -INITIALLY_: I N I T I A L L Y; -INNER_: I N N E R; -INSERT_: I N S E R T; -INSTEAD_: I N S T E A D; -INTERSECT_: I N T E R S E C T; -INTO_: I N T O; -IS_: I S; -ISNULL_: I S N U L L; -JOIN_: J O I N; -KEY_: K E Y; -LEFT_: L E F T; -LIKE_: L I K E; -LIMIT_: L I M I T; -MATCH_: M A T C H; -NATURAL_: N A T U R A L; -NO_: N O; -NOT_: N O T; -NOTNULL_: N O T N U L L; -NULL_: N U L L; -OF_: O F; -OFFSET_: O F F S E T; -ON_: O N; -OR_: O R; -ORDER_: O R D E R; -OUTER_: O U T E R; -PLAN_: P L A N; -PRAGMA_: P R A G M A; -PRIMARY_: P R I M A R Y; -QUERY_: Q U E R Y; -RAISE_: R A I S E; -RECURSIVE_: R E C U R S I V E; -REFERENCES_: R E F E R E N C E S; -REGEXP_: R E G E X P; -REINDEX_: R E I N D E X; -RELEASE_: R E L E A S E; -RENAME_: R E N A M E; -REPLACE_: R E P L A C E; -RESTRICT_: R E S T R I C T; -RETURNING_: R E T U R N I N G; -RIGHT_: R I G H T; -ROLLBACK_: R O L L B A C K; -ROW_: R O W; -ROWS_: R O W S; -SAVEPOINT_: S A V E P O I N T; -SELECT_: S E L E C T; -SET_: S E T; -STRICT_: S T R I C T; -TABLE_: T A B L E; -TEMP_: T E M P; -TEMPORARY_: T E M P O R A R Y; -THEN_: T H E N; -TO_: T O; -TRANSACTION_: T R A N S A C T I O N; -TRIGGER_: T R I G G E R; -UNION_: U N I O N; -UNIQUE_: U N I Q U E; -UPDATE_: U P D A T E; -USING_: U S I N G; -VACUUM_: V A C U U M; -VALUES_: V A L U E S; -VIEW_: V I E W; -VIRTUAL_: V I R T U A L; -WHEN_: W H E N; -WHERE_: W H E R E; -WITH_: W I T H; -WITHOUT_: W I T H O U T; -FIRST_VALUE_: F I R S T '_' V A L U E; -OVER_: O V E R; -PARTITION_: P A R T I T I O N; -RANGE_: R A N G E; -PRECEDING_: P R E C E D I N G; -UNBOUNDED_: U N B O U N D E D; -CURRENT_: C U R R E N T; -FOLLOWING_: F O L L O W I N G; -CUME_DIST_: C U M E '_' D I S T; -DENSE_RANK_: D E N S E '_' R A N K; -LAG_: L A G; -LAST_VALUE_: L A S T '_' V A L U E; -LEAD_: L E A D; -NTH_VALUE_: N T H '_' V A L U E; -NTILE_: N T I L E; -PERCENT_RANK_: P E R C E N T '_' R A N K; -RANK_: R A N K; -ROW_NUMBER_: R O W '_' N U M B E R; -GENERATED_: G E N E R A T E D; -ALWAYS_: A L W A Y S; -STORED_: S T O R E D; -TRUE_: T R U E; -FALSE_: F A L S E; -WINDOW_: W I N D O W; -NULLS_: N U L L S; -FIRST_: F I R S T; -LAST_: L A S T; -FILTER_: F I L T E R; -GROUPS_: G R O U P S; -EXCLUDE_: E X C L U D E; -TIES_: T I E S; -OTHERS_: O T H E R S; -DO_: D O; -NOTHING_: N O T H I N G; - -IDENTIFIER: - '"' (~'"' | '""')* '"' - | '`' (~'`' | '``')* '`' - | '[' ~']'* ']' - | [a-zA-Z_] [a-zA-Z_0-9]* -; // TODO check: needs more chars in set - -NUMERIC_LITERAL: ((DIGIT+ ('.' DIGIT*)?) | ('.' DIGIT+)) (E [-+]? DIGIT+)? | '0x' HEX_DIGIT+; - -NUMBERED_BIND_PARAMETER: '?' DIGIT*; - -NAMED_BIND_PARAMETER: [:@$] IDENTIFIER; - -STRING_LITERAL: '\'' ( ~'\'' | '\'\'')* '\''; - -BLOB_LITERAL: X STRING_LITERAL; - -SINGLE_LINE_COMMENT: '--' ~[\r\n]* (('\r'? '\n') | EOF) -> channel(HIDDEN); - -MULTILINE_COMMENT: '/*' .*? '*/' -> channel(HIDDEN); - -SPACES: [ \u000B\t\r\n] -> channel(HIDDEN); - -UNEXPECTED_CHAR: .; - -fragment HEX_DIGIT: [0-9a-fA-F]; -fragment DIGIT: [0-9]; - -fragment A: [aA]; -fragment B: [bB]; -fragment C: [cC]; -fragment D: [dD]; -fragment E: [eE]; -fragment F: [fF]; -fragment G: [gG]; -fragment H: [hH]; -fragment I: [iI]; -fragment J: [jJ]; -fragment K: [kK]; -fragment L: [lL]; -fragment M: [mM]; -fragment N: [nN]; -fragment O: [oO]; -fragment P: [pP]; -fragment Q: [qQ]; -fragment R: [rR]; -fragment S: [sS]; -fragment T: [tT]; -fragment U: [uU]; -fragment V: [vV]; -fragment W: [wW]; -fragment X: [xX]; -fragment Y: [yY]; -fragment Z: [zZ]; diff --git a/internal/engine/sqlite/parser/SQLiteLexer.interp b/internal/engine/sqlite/parser/SQLiteLexer.interp deleted file mode 100644 index 329996c296..0000000000 --- a/internal/engine/sqlite/parser/SQLiteLexer.interp +++ /dev/null @@ -1,636 +0,0 @@ -token literal names: -null -';' -'.' -'(' -')' -',' -'=' -'*' -'+' -'->>' -'->' -'-' -'~' -'||' -'/' -'%' -'<<' -'>>' -'&' -'|' -'<' -'<=' -'>' -'>=' -'==' -'!=' -'<>' -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null - -token symbolic names: -null -SCOL -DOT -OPEN_PAR -CLOSE_PAR -COMMA -ASSIGN -STAR -PLUS -PTR2 -PTR -MINUS -TILDE -PIPE2 -DIV -MOD -LT2 -GT2 -AMP -PIPE -LT -LT_EQ -GT -GT_EQ -EQ -NOT_EQ1 -NOT_EQ2 -ABORT_ -ACTION_ -ADD_ -AFTER_ -ALL_ -ALTER_ -ANALYZE_ -AND_ -AS_ -ASC_ -ATTACH_ -AUTOINCREMENT_ -BEFORE_ -BEGIN_ -BETWEEN_ -BY_ -CASCADE_ -CASE_ -CAST_ -CHECK_ -COLLATE_ -COLUMN_ -COMMIT_ -CONFLICT_ -CONSTRAINT_ -CREATE_ -CROSS_ -CURRENT_DATE_ -CURRENT_TIME_ -CURRENT_TIMESTAMP_ -DATABASE_ -DEFAULT_ -DEFERRABLE_ -DEFERRED_ -DELETE_ -DESC_ -DETACH_ -DISTINCT_ -DROP_ -EACH_ -ELSE_ -END_ -ESCAPE_ -EXCEPT_ -EXCLUSIVE_ -EXISTS_ -EXPLAIN_ -FAIL_ -FOR_ -FOREIGN_ -FROM_ -FULL_ -GLOB_ -GROUP_ -HAVING_ -IF_ -IGNORE_ -IMMEDIATE_ -IN_ -INDEX_ -INDEXED_ -INITIALLY_ -INNER_ -INSERT_ -INSTEAD_ -INTERSECT_ -INTO_ -IS_ -ISNULL_ -JOIN_ -KEY_ -LEFT_ -LIKE_ -LIMIT_ -MATCH_ -NATURAL_ -NO_ -NOT_ -NOTNULL_ -NULL_ -OF_ -OFFSET_ -ON_ -OR_ -ORDER_ -OUTER_ -PLAN_ -PRAGMA_ -PRIMARY_ -QUERY_ -RAISE_ -RECURSIVE_ -REFERENCES_ -REGEXP_ -REINDEX_ -RELEASE_ -RENAME_ -REPLACE_ -RESTRICT_ -RETURNING_ -RIGHT_ -ROLLBACK_ -ROW_ -ROWS_ -SAVEPOINT_ -SELECT_ -SET_ -STRICT_ -TABLE_ -TEMP_ -TEMPORARY_ -THEN_ -TO_ -TRANSACTION_ -TRIGGER_ -UNION_ -UNIQUE_ -UPDATE_ -USING_ -VACUUM_ -VALUES_ -VIEW_ -VIRTUAL_ -WHEN_ -WHERE_ -WITH_ -WITHOUT_ -FIRST_VALUE_ -OVER_ -PARTITION_ -RANGE_ -PRECEDING_ -UNBOUNDED_ -CURRENT_ -FOLLOWING_ -CUME_DIST_ -DENSE_RANK_ -LAG_ -LAST_VALUE_ -LEAD_ -NTH_VALUE_ -NTILE_ -PERCENT_RANK_ -RANK_ -ROW_NUMBER_ -GENERATED_ -ALWAYS_ -STORED_ -TRUE_ -FALSE_ -WINDOW_ -NULLS_ -FIRST_ -LAST_ -FILTER_ -GROUPS_ -EXCLUDE_ -TIES_ -OTHERS_ -DO_ -NOTHING_ -IDENTIFIER -NUMERIC_LITERAL -NUMBERED_BIND_PARAMETER -NAMED_BIND_PARAMETER -STRING_LITERAL -BLOB_LITERAL -SINGLE_LINE_COMMENT -MULTILINE_COMMENT -SPACES -UNEXPECTED_CHAR - -rule names: -SCOL -DOT -OPEN_PAR -CLOSE_PAR -COMMA -ASSIGN -STAR -PLUS -PTR2 -PTR -MINUS -TILDE -PIPE2 -DIV -MOD -LT2 -GT2 -AMP -PIPE -LT -LT_EQ -GT -GT_EQ -EQ -NOT_EQ1 -NOT_EQ2 -ABORT_ -ACTION_ -ADD_ -AFTER_ -ALL_ -ALTER_ -ANALYZE_ -AND_ -AS_ -ASC_ -ATTACH_ -AUTOINCREMENT_ -BEFORE_ -BEGIN_ -BETWEEN_ -BY_ -CASCADE_ -CASE_ -CAST_ -CHECK_ -COLLATE_ -COLUMN_ -COMMIT_ -CONFLICT_ -CONSTRAINT_ -CREATE_ -CROSS_ -CURRENT_DATE_ -CURRENT_TIME_ -CURRENT_TIMESTAMP_ -DATABASE_ -DEFAULT_ -DEFERRABLE_ -DEFERRED_ -DELETE_ -DESC_ -DETACH_ -DISTINCT_ -DROP_ -EACH_ -ELSE_ -END_ -ESCAPE_ -EXCEPT_ -EXCLUSIVE_ -EXISTS_ -EXPLAIN_ -FAIL_ -FOR_ -FOREIGN_ -FROM_ -FULL_ -GLOB_ -GROUP_ -HAVING_ -IF_ -IGNORE_ -IMMEDIATE_ -IN_ -INDEX_ -INDEXED_ -INITIALLY_ -INNER_ -INSERT_ -INSTEAD_ -INTERSECT_ -INTO_ -IS_ -ISNULL_ -JOIN_ -KEY_ -LEFT_ -LIKE_ -LIMIT_ -MATCH_ -NATURAL_ -NO_ -NOT_ -NOTNULL_ -NULL_ -OF_ -OFFSET_ -ON_ -OR_ -ORDER_ -OUTER_ -PLAN_ -PRAGMA_ -PRIMARY_ -QUERY_ -RAISE_ -RECURSIVE_ -REFERENCES_ -REGEXP_ -REINDEX_ -RELEASE_ -RENAME_ -REPLACE_ -RESTRICT_ -RETURNING_ -RIGHT_ -ROLLBACK_ -ROW_ -ROWS_ -SAVEPOINT_ -SELECT_ -SET_ -STRICT_ -TABLE_ -TEMP_ -TEMPORARY_ -THEN_ -TO_ -TRANSACTION_ -TRIGGER_ -UNION_ -UNIQUE_ -UPDATE_ -USING_ -VACUUM_ -VALUES_ -VIEW_ -VIRTUAL_ -WHEN_ -WHERE_ -WITH_ -WITHOUT_ -FIRST_VALUE_ -OVER_ -PARTITION_ -RANGE_ -PRECEDING_ -UNBOUNDED_ -CURRENT_ -FOLLOWING_ -CUME_DIST_ -DENSE_RANK_ -LAG_ -LAST_VALUE_ -LEAD_ -NTH_VALUE_ -NTILE_ -PERCENT_RANK_ -RANK_ -ROW_NUMBER_ -GENERATED_ -ALWAYS_ -STORED_ -TRUE_ -FALSE_ -WINDOW_ -NULLS_ -FIRST_ -LAST_ -FILTER_ -GROUPS_ -EXCLUDE_ -TIES_ -OTHERS_ -DO_ -NOTHING_ -IDENTIFIER -NUMERIC_LITERAL -NUMBERED_BIND_PARAMETER -NAMED_BIND_PARAMETER -STRING_LITERAL -BLOB_LITERAL -SINGLE_LINE_COMMENT -MULTILINE_COMMENT -SPACES -UNEXPECTED_CHAR -HEX_DIGIT -DIGIT -A -B -C -D -E -F -G -H -I -J -K -L -M -N -O -P -Q -R -S -T -U -V -W -X -Y -Z - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[4, 0, 197, 1829, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 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, 8, 1, 8, 1, 9, 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, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 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, 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, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 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, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 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, 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, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 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, 56, 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, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 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, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 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, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 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, 80, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 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, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 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, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 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, 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, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 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, 105, 1, 105, 1, 105, 1, 105, 1, 105, 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, 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, 112, 1, 112, 1, 112, 1, 112, 1, 112, 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, 115, 1, 115, 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, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 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, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 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, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 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, 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, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1636, 8, 187, 10, 187, 12, 187, 1639, 9, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1646, 8, 187, 10, 187, 12, 187, 1649, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1654, 8, 187, 10, 187, 12, 187, 1657, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1662, 8, 187, 10, 187, 12, 187, 1665, 9, 187, 3, 187, 1667, 8, 187, 1, 188, 4, 188, 1670, 8, 188, 11, 188, 12, 188, 1671, 1, 188, 1, 188, 5, 188, 1676, 8, 188, 10, 188, 12, 188, 1679, 9, 188, 3, 188, 1681, 8, 188, 1, 188, 1, 188, 4, 188, 1685, 8, 188, 11, 188, 12, 188, 1686, 3, 188, 1689, 8, 188, 1, 188, 1, 188, 3, 188, 1693, 8, 188, 1, 188, 4, 188, 1696, 8, 188, 11, 188, 12, 188, 1697, 3, 188, 1700, 8, 188, 1, 188, 1, 188, 1, 188, 1, 188, 4, 188, 1706, 8, 188, 11, 188, 12, 188, 1707, 3, 188, 1710, 8, 188, 1, 189, 1, 189, 5, 189, 1714, 8, 189, 10, 189, 12, 189, 1717, 9, 189, 1, 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 191, 1, 191, 5, 191, 1726, 8, 191, 10, 191, 12, 191, 1729, 9, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 193, 5, 193, 1740, 8, 193, 10, 193, 12, 193, 1743, 9, 193, 1, 193, 3, 193, 1746, 8, 193, 1, 193, 1, 193, 3, 193, 1750, 8, 193, 1, 193, 1, 193, 1, 194, 1, 194, 1, 194, 1, 194, 5, 194, 1758, 8, 194, 10, 194, 12, 194, 1761, 9, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 195, 1, 195, 1, 195, 1, 195, 1, 196, 1, 196, 1, 197, 1, 197, 1, 198, 1, 198, 1, 199, 1, 199, 1, 200, 1, 200, 1, 201, 1, 201, 1, 202, 1, 202, 1, 203, 1, 203, 1, 204, 1, 204, 1, 205, 1, 205, 1, 206, 1, 206, 1, 207, 1, 207, 1, 208, 1, 208, 1, 209, 1, 209, 1, 210, 1, 210, 1, 211, 1, 211, 1, 212, 1, 212, 1, 213, 1, 213, 1, 214, 1, 214, 1, 215, 1, 215, 1, 216, 1, 216, 1, 217, 1, 217, 1, 218, 1, 218, 1, 219, 1, 219, 1, 220, 1, 220, 1, 221, 1, 221, 1, 222, 1, 222, 1, 223, 1, 223, 1, 224, 1, 224, 1, 1759, 0, 225, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 196, 393, 197, 395, 0, 397, 0, 399, 0, 401, 0, 403, 0, 405, 0, 407, 0, 409, 0, 411, 0, 413, 0, 415, 0, 417, 0, 419, 0, 421, 0, 423, 0, 425, 0, 427, 0, 429, 0, 431, 0, 433, 0, 435, 0, 437, 0, 439, 0, 441, 0, 443, 0, 445, 0, 447, 0, 449, 0, 1, 0, 38, 1, 0, 34, 34, 1, 0, 96, 96, 1, 0, 93, 93, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 43, 43, 45, 45, 3, 0, 36, 36, 58, 58, 64, 64, 1, 0, 39, 39, 2, 0, 10, 10, 13, 13, 3, 0, 9, 11, 13, 13, 32, 32, 3, 0, 48, 57, 65, 70, 97, 102, 1, 0, 48, 57, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, 1826, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 1, 451, 1, 0, 0, 0, 3, 453, 1, 0, 0, 0, 5, 455, 1, 0, 0, 0, 7, 457, 1, 0, 0, 0, 9, 459, 1, 0, 0, 0, 11, 461, 1, 0, 0, 0, 13, 463, 1, 0, 0, 0, 15, 465, 1, 0, 0, 0, 17, 467, 1, 0, 0, 0, 19, 471, 1, 0, 0, 0, 21, 474, 1, 0, 0, 0, 23, 476, 1, 0, 0, 0, 25, 478, 1, 0, 0, 0, 27, 481, 1, 0, 0, 0, 29, 483, 1, 0, 0, 0, 31, 485, 1, 0, 0, 0, 33, 488, 1, 0, 0, 0, 35, 491, 1, 0, 0, 0, 37, 493, 1, 0, 0, 0, 39, 495, 1, 0, 0, 0, 41, 497, 1, 0, 0, 0, 43, 500, 1, 0, 0, 0, 45, 502, 1, 0, 0, 0, 47, 505, 1, 0, 0, 0, 49, 508, 1, 0, 0, 0, 51, 511, 1, 0, 0, 0, 53, 514, 1, 0, 0, 0, 55, 520, 1, 0, 0, 0, 57, 527, 1, 0, 0, 0, 59, 531, 1, 0, 0, 0, 61, 537, 1, 0, 0, 0, 63, 541, 1, 0, 0, 0, 65, 547, 1, 0, 0, 0, 67, 555, 1, 0, 0, 0, 69, 559, 1, 0, 0, 0, 71, 562, 1, 0, 0, 0, 73, 566, 1, 0, 0, 0, 75, 573, 1, 0, 0, 0, 77, 587, 1, 0, 0, 0, 79, 594, 1, 0, 0, 0, 81, 600, 1, 0, 0, 0, 83, 608, 1, 0, 0, 0, 85, 611, 1, 0, 0, 0, 87, 619, 1, 0, 0, 0, 89, 624, 1, 0, 0, 0, 91, 629, 1, 0, 0, 0, 93, 635, 1, 0, 0, 0, 95, 643, 1, 0, 0, 0, 97, 650, 1, 0, 0, 0, 99, 657, 1, 0, 0, 0, 101, 666, 1, 0, 0, 0, 103, 677, 1, 0, 0, 0, 105, 684, 1, 0, 0, 0, 107, 690, 1, 0, 0, 0, 109, 703, 1, 0, 0, 0, 111, 716, 1, 0, 0, 0, 113, 734, 1, 0, 0, 0, 115, 743, 1, 0, 0, 0, 117, 751, 1, 0, 0, 0, 119, 762, 1, 0, 0, 0, 121, 771, 1, 0, 0, 0, 123, 778, 1, 0, 0, 0, 125, 783, 1, 0, 0, 0, 127, 790, 1, 0, 0, 0, 129, 799, 1, 0, 0, 0, 131, 804, 1, 0, 0, 0, 133, 809, 1, 0, 0, 0, 135, 814, 1, 0, 0, 0, 137, 818, 1, 0, 0, 0, 139, 825, 1, 0, 0, 0, 141, 832, 1, 0, 0, 0, 143, 842, 1, 0, 0, 0, 145, 849, 1, 0, 0, 0, 147, 857, 1, 0, 0, 0, 149, 862, 1, 0, 0, 0, 151, 866, 1, 0, 0, 0, 153, 874, 1, 0, 0, 0, 155, 879, 1, 0, 0, 0, 157, 884, 1, 0, 0, 0, 159, 889, 1, 0, 0, 0, 161, 895, 1, 0, 0, 0, 163, 902, 1, 0, 0, 0, 165, 905, 1, 0, 0, 0, 167, 912, 1, 0, 0, 0, 169, 922, 1, 0, 0, 0, 171, 925, 1, 0, 0, 0, 173, 931, 1, 0, 0, 0, 175, 939, 1, 0, 0, 0, 177, 949, 1, 0, 0, 0, 179, 955, 1, 0, 0, 0, 181, 962, 1, 0, 0, 0, 183, 970, 1, 0, 0, 0, 185, 980, 1, 0, 0, 0, 187, 985, 1, 0, 0, 0, 189, 988, 1, 0, 0, 0, 191, 995, 1, 0, 0, 0, 193, 1000, 1, 0, 0, 0, 195, 1004, 1, 0, 0, 0, 197, 1009, 1, 0, 0, 0, 199, 1014, 1, 0, 0, 0, 201, 1020, 1, 0, 0, 0, 203, 1026, 1, 0, 0, 0, 205, 1034, 1, 0, 0, 0, 207, 1037, 1, 0, 0, 0, 209, 1041, 1, 0, 0, 0, 211, 1049, 1, 0, 0, 0, 213, 1054, 1, 0, 0, 0, 215, 1057, 1, 0, 0, 0, 217, 1064, 1, 0, 0, 0, 219, 1067, 1, 0, 0, 0, 221, 1070, 1, 0, 0, 0, 223, 1076, 1, 0, 0, 0, 225, 1082, 1, 0, 0, 0, 227, 1087, 1, 0, 0, 0, 229, 1094, 1, 0, 0, 0, 231, 1102, 1, 0, 0, 0, 233, 1108, 1, 0, 0, 0, 235, 1114, 1, 0, 0, 0, 237, 1124, 1, 0, 0, 0, 239, 1135, 1, 0, 0, 0, 241, 1142, 1, 0, 0, 0, 243, 1150, 1, 0, 0, 0, 245, 1158, 1, 0, 0, 0, 247, 1165, 1, 0, 0, 0, 249, 1173, 1, 0, 0, 0, 251, 1182, 1, 0, 0, 0, 253, 1192, 1, 0, 0, 0, 255, 1198, 1, 0, 0, 0, 257, 1207, 1, 0, 0, 0, 259, 1211, 1, 0, 0, 0, 261, 1216, 1, 0, 0, 0, 263, 1226, 1, 0, 0, 0, 265, 1233, 1, 0, 0, 0, 267, 1237, 1, 0, 0, 0, 269, 1244, 1, 0, 0, 0, 271, 1250, 1, 0, 0, 0, 273, 1255, 1, 0, 0, 0, 275, 1265, 1, 0, 0, 0, 277, 1270, 1, 0, 0, 0, 279, 1273, 1, 0, 0, 0, 281, 1285, 1, 0, 0, 0, 283, 1293, 1, 0, 0, 0, 285, 1299, 1, 0, 0, 0, 287, 1306, 1, 0, 0, 0, 289, 1313, 1, 0, 0, 0, 291, 1319, 1, 0, 0, 0, 293, 1326, 1, 0, 0, 0, 295, 1333, 1, 0, 0, 0, 297, 1338, 1, 0, 0, 0, 299, 1346, 1, 0, 0, 0, 301, 1351, 1, 0, 0, 0, 303, 1357, 1, 0, 0, 0, 305, 1362, 1, 0, 0, 0, 307, 1370, 1, 0, 0, 0, 309, 1382, 1, 0, 0, 0, 311, 1387, 1, 0, 0, 0, 313, 1397, 1, 0, 0, 0, 315, 1403, 1, 0, 0, 0, 317, 1413, 1, 0, 0, 0, 319, 1423, 1, 0, 0, 0, 321, 1431, 1, 0, 0, 0, 323, 1441, 1, 0, 0, 0, 325, 1451, 1, 0, 0, 0, 327, 1462, 1, 0, 0, 0, 329, 1466, 1, 0, 0, 0, 331, 1477, 1, 0, 0, 0, 333, 1482, 1, 0, 0, 0, 335, 1492, 1, 0, 0, 0, 337, 1498, 1, 0, 0, 0, 339, 1511, 1, 0, 0, 0, 341, 1516, 1, 0, 0, 0, 343, 1527, 1, 0, 0, 0, 345, 1537, 1, 0, 0, 0, 347, 1544, 1, 0, 0, 0, 349, 1551, 1, 0, 0, 0, 351, 1556, 1, 0, 0, 0, 353, 1562, 1, 0, 0, 0, 355, 1569, 1, 0, 0, 0, 357, 1575, 1, 0, 0, 0, 359, 1581, 1, 0, 0, 0, 361, 1586, 1, 0, 0, 0, 363, 1593, 1, 0, 0, 0, 365, 1600, 1, 0, 0, 0, 367, 1608, 1, 0, 0, 0, 369, 1613, 1, 0, 0, 0, 371, 1620, 1, 0, 0, 0, 373, 1623, 1, 0, 0, 0, 375, 1666, 1, 0, 0, 0, 377, 1709, 1, 0, 0, 0, 379, 1711, 1, 0, 0, 0, 381, 1718, 1, 0, 0, 0, 383, 1721, 1, 0, 0, 0, 385, 1732, 1, 0, 0, 0, 387, 1735, 1, 0, 0, 0, 389, 1753, 1, 0, 0, 0, 391, 1767, 1, 0, 0, 0, 393, 1771, 1, 0, 0, 0, 395, 1773, 1, 0, 0, 0, 397, 1775, 1, 0, 0, 0, 399, 1777, 1, 0, 0, 0, 401, 1779, 1, 0, 0, 0, 403, 1781, 1, 0, 0, 0, 405, 1783, 1, 0, 0, 0, 407, 1785, 1, 0, 0, 0, 409, 1787, 1, 0, 0, 0, 411, 1789, 1, 0, 0, 0, 413, 1791, 1, 0, 0, 0, 415, 1793, 1, 0, 0, 0, 417, 1795, 1, 0, 0, 0, 419, 1797, 1, 0, 0, 0, 421, 1799, 1, 0, 0, 0, 423, 1801, 1, 0, 0, 0, 425, 1803, 1, 0, 0, 0, 427, 1805, 1, 0, 0, 0, 429, 1807, 1, 0, 0, 0, 431, 1809, 1, 0, 0, 0, 433, 1811, 1, 0, 0, 0, 435, 1813, 1, 0, 0, 0, 437, 1815, 1, 0, 0, 0, 439, 1817, 1, 0, 0, 0, 441, 1819, 1, 0, 0, 0, 443, 1821, 1, 0, 0, 0, 445, 1823, 1, 0, 0, 0, 447, 1825, 1, 0, 0, 0, 449, 1827, 1, 0, 0, 0, 451, 452, 5, 59, 0, 0, 452, 2, 1, 0, 0, 0, 453, 454, 5, 46, 0, 0, 454, 4, 1, 0, 0, 0, 455, 456, 5, 40, 0, 0, 456, 6, 1, 0, 0, 0, 457, 458, 5, 41, 0, 0, 458, 8, 1, 0, 0, 0, 459, 460, 5, 44, 0, 0, 460, 10, 1, 0, 0, 0, 461, 462, 5, 61, 0, 0, 462, 12, 1, 0, 0, 0, 463, 464, 5, 42, 0, 0, 464, 14, 1, 0, 0, 0, 465, 466, 5, 43, 0, 0, 466, 16, 1, 0, 0, 0, 467, 468, 5, 45, 0, 0, 468, 469, 5, 62, 0, 0, 469, 470, 5, 62, 0, 0, 470, 18, 1, 0, 0, 0, 471, 472, 5, 45, 0, 0, 472, 473, 5, 62, 0, 0, 473, 20, 1, 0, 0, 0, 474, 475, 5, 45, 0, 0, 475, 22, 1, 0, 0, 0, 476, 477, 5, 126, 0, 0, 477, 24, 1, 0, 0, 0, 478, 479, 5, 124, 0, 0, 479, 480, 5, 124, 0, 0, 480, 26, 1, 0, 0, 0, 481, 482, 5, 47, 0, 0, 482, 28, 1, 0, 0, 0, 483, 484, 5, 37, 0, 0, 484, 30, 1, 0, 0, 0, 485, 486, 5, 60, 0, 0, 486, 487, 5, 60, 0, 0, 487, 32, 1, 0, 0, 0, 488, 489, 5, 62, 0, 0, 489, 490, 5, 62, 0, 0, 490, 34, 1, 0, 0, 0, 491, 492, 5, 38, 0, 0, 492, 36, 1, 0, 0, 0, 493, 494, 5, 124, 0, 0, 494, 38, 1, 0, 0, 0, 495, 496, 5, 60, 0, 0, 496, 40, 1, 0, 0, 0, 497, 498, 5, 60, 0, 0, 498, 499, 5, 61, 0, 0, 499, 42, 1, 0, 0, 0, 500, 501, 5, 62, 0, 0, 501, 44, 1, 0, 0, 0, 502, 503, 5, 62, 0, 0, 503, 504, 5, 61, 0, 0, 504, 46, 1, 0, 0, 0, 505, 506, 5, 61, 0, 0, 506, 507, 5, 61, 0, 0, 507, 48, 1, 0, 0, 0, 508, 509, 5, 33, 0, 0, 509, 510, 5, 61, 0, 0, 510, 50, 1, 0, 0, 0, 511, 512, 5, 60, 0, 0, 512, 513, 5, 62, 0, 0, 513, 52, 1, 0, 0, 0, 514, 515, 3, 399, 199, 0, 515, 516, 3, 401, 200, 0, 516, 517, 3, 427, 213, 0, 517, 518, 3, 433, 216, 0, 518, 519, 3, 437, 218, 0, 519, 54, 1, 0, 0, 0, 520, 521, 3, 399, 199, 0, 521, 522, 3, 403, 201, 0, 522, 523, 3, 437, 218, 0, 523, 524, 3, 415, 207, 0, 524, 525, 3, 427, 213, 0, 525, 526, 3, 425, 212, 0, 526, 56, 1, 0, 0, 0, 527, 528, 3, 399, 199, 0, 528, 529, 3, 405, 202, 0, 529, 530, 3, 405, 202, 0, 530, 58, 1, 0, 0, 0, 531, 532, 3, 399, 199, 0, 532, 533, 3, 409, 204, 0, 533, 534, 3, 437, 218, 0, 534, 535, 3, 407, 203, 0, 535, 536, 3, 433, 216, 0, 536, 60, 1, 0, 0, 0, 537, 538, 3, 399, 199, 0, 538, 539, 3, 421, 210, 0, 539, 540, 3, 421, 210, 0, 540, 62, 1, 0, 0, 0, 541, 542, 3, 399, 199, 0, 542, 543, 3, 421, 210, 0, 543, 544, 3, 437, 218, 0, 544, 545, 3, 407, 203, 0, 545, 546, 3, 433, 216, 0, 546, 64, 1, 0, 0, 0, 547, 548, 3, 399, 199, 0, 548, 549, 3, 425, 212, 0, 549, 550, 3, 399, 199, 0, 550, 551, 3, 421, 210, 0, 551, 552, 3, 447, 223, 0, 552, 553, 3, 449, 224, 0, 553, 554, 3, 407, 203, 0, 554, 66, 1, 0, 0, 0, 555, 556, 3, 399, 199, 0, 556, 557, 3, 425, 212, 0, 557, 558, 3, 405, 202, 0, 558, 68, 1, 0, 0, 0, 559, 560, 3, 399, 199, 0, 560, 561, 3, 435, 217, 0, 561, 70, 1, 0, 0, 0, 562, 563, 3, 399, 199, 0, 563, 564, 3, 435, 217, 0, 564, 565, 3, 403, 201, 0, 565, 72, 1, 0, 0, 0, 566, 567, 3, 399, 199, 0, 567, 568, 3, 437, 218, 0, 568, 569, 3, 437, 218, 0, 569, 570, 3, 399, 199, 0, 570, 571, 3, 403, 201, 0, 571, 572, 3, 413, 206, 0, 572, 74, 1, 0, 0, 0, 573, 574, 3, 399, 199, 0, 574, 575, 3, 439, 219, 0, 575, 576, 3, 437, 218, 0, 576, 577, 3, 427, 213, 0, 577, 578, 3, 415, 207, 0, 578, 579, 3, 425, 212, 0, 579, 580, 3, 403, 201, 0, 580, 581, 3, 433, 216, 0, 581, 582, 3, 407, 203, 0, 582, 583, 3, 423, 211, 0, 583, 584, 3, 407, 203, 0, 584, 585, 3, 425, 212, 0, 585, 586, 3, 437, 218, 0, 586, 76, 1, 0, 0, 0, 587, 588, 3, 401, 200, 0, 588, 589, 3, 407, 203, 0, 589, 590, 3, 409, 204, 0, 590, 591, 3, 427, 213, 0, 591, 592, 3, 433, 216, 0, 592, 593, 3, 407, 203, 0, 593, 78, 1, 0, 0, 0, 594, 595, 3, 401, 200, 0, 595, 596, 3, 407, 203, 0, 596, 597, 3, 411, 205, 0, 597, 598, 3, 415, 207, 0, 598, 599, 3, 425, 212, 0, 599, 80, 1, 0, 0, 0, 600, 601, 3, 401, 200, 0, 601, 602, 3, 407, 203, 0, 602, 603, 3, 437, 218, 0, 603, 604, 3, 443, 221, 0, 604, 605, 3, 407, 203, 0, 605, 606, 3, 407, 203, 0, 606, 607, 3, 425, 212, 0, 607, 82, 1, 0, 0, 0, 608, 609, 3, 401, 200, 0, 609, 610, 3, 447, 223, 0, 610, 84, 1, 0, 0, 0, 611, 612, 3, 403, 201, 0, 612, 613, 3, 399, 199, 0, 613, 614, 3, 435, 217, 0, 614, 615, 3, 403, 201, 0, 615, 616, 3, 399, 199, 0, 616, 617, 3, 405, 202, 0, 617, 618, 3, 407, 203, 0, 618, 86, 1, 0, 0, 0, 619, 620, 3, 403, 201, 0, 620, 621, 3, 399, 199, 0, 621, 622, 3, 435, 217, 0, 622, 623, 3, 407, 203, 0, 623, 88, 1, 0, 0, 0, 624, 625, 3, 403, 201, 0, 625, 626, 3, 399, 199, 0, 626, 627, 3, 435, 217, 0, 627, 628, 3, 437, 218, 0, 628, 90, 1, 0, 0, 0, 629, 630, 3, 403, 201, 0, 630, 631, 3, 413, 206, 0, 631, 632, 3, 407, 203, 0, 632, 633, 3, 403, 201, 0, 633, 634, 3, 419, 209, 0, 634, 92, 1, 0, 0, 0, 635, 636, 3, 403, 201, 0, 636, 637, 3, 427, 213, 0, 637, 638, 3, 421, 210, 0, 638, 639, 3, 421, 210, 0, 639, 640, 3, 399, 199, 0, 640, 641, 3, 437, 218, 0, 641, 642, 3, 407, 203, 0, 642, 94, 1, 0, 0, 0, 643, 644, 3, 403, 201, 0, 644, 645, 3, 427, 213, 0, 645, 646, 3, 421, 210, 0, 646, 647, 3, 439, 219, 0, 647, 648, 3, 423, 211, 0, 648, 649, 3, 425, 212, 0, 649, 96, 1, 0, 0, 0, 650, 651, 3, 403, 201, 0, 651, 652, 3, 427, 213, 0, 652, 653, 3, 423, 211, 0, 653, 654, 3, 423, 211, 0, 654, 655, 3, 415, 207, 0, 655, 656, 3, 437, 218, 0, 656, 98, 1, 0, 0, 0, 657, 658, 3, 403, 201, 0, 658, 659, 3, 427, 213, 0, 659, 660, 3, 425, 212, 0, 660, 661, 3, 409, 204, 0, 661, 662, 3, 421, 210, 0, 662, 663, 3, 415, 207, 0, 663, 664, 3, 403, 201, 0, 664, 665, 3, 437, 218, 0, 665, 100, 1, 0, 0, 0, 666, 667, 3, 403, 201, 0, 667, 668, 3, 427, 213, 0, 668, 669, 3, 425, 212, 0, 669, 670, 3, 435, 217, 0, 670, 671, 3, 437, 218, 0, 671, 672, 3, 433, 216, 0, 672, 673, 3, 399, 199, 0, 673, 674, 3, 415, 207, 0, 674, 675, 3, 425, 212, 0, 675, 676, 3, 437, 218, 0, 676, 102, 1, 0, 0, 0, 677, 678, 3, 403, 201, 0, 678, 679, 3, 433, 216, 0, 679, 680, 3, 407, 203, 0, 680, 681, 3, 399, 199, 0, 681, 682, 3, 437, 218, 0, 682, 683, 3, 407, 203, 0, 683, 104, 1, 0, 0, 0, 684, 685, 3, 403, 201, 0, 685, 686, 3, 433, 216, 0, 686, 687, 3, 427, 213, 0, 687, 688, 3, 435, 217, 0, 688, 689, 3, 435, 217, 0, 689, 106, 1, 0, 0, 0, 690, 691, 3, 403, 201, 0, 691, 692, 3, 439, 219, 0, 692, 693, 3, 433, 216, 0, 693, 694, 3, 433, 216, 0, 694, 695, 3, 407, 203, 0, 695, 696, 3, 425, 212, 0, 696, 697, 3, 437, 218, 0, 697, 698, 5, 95, 0, 0, 698, 699, 3, 405, 202, 0, 699, 700, 3, 399, 199, 0, 700, 701, 3, 437, 218, 0, 701, 702, 3, 407, 203, 0, 702, 108, 1, 0, 0, 0, 703, 704, 3, 403, 201, 0, 704, 705, 3, 439, 219, 0, 705, 706, 3, 433, 216, 0, 706, 707, 3, 433, 216, 0, 707, 708, 3, 407, 203, 0, 708, 709, 3, 425, 212, 0, 709, 710, 3, 437, 218, 0, 710, 711, 5, 95, 0, 0, 711, 712, 3, 437, 218, 0, 712, 713, 3, 415, 207, 0, 713, 714, 3, 423, 211, 0, 714, 715, 3, 407, 203, 0, 715, 110, 1, 0, 0, 0, 716, 717, 3, 403, 201, 0, 717, 718, 3, 439, 219, 0, 718, 719, 3, 433, 216, 0, 719, 720, 3, 433, 216, 0, 720, 721, 3, 407, 203, 0, 721, 722, 3, 425, 212, 0, 722, 723, 3, 437, 218, 0, 723, 724, 5, 95, 0, 0, 724, 725, 3, 437, 218, 0, 725, 726, 3, 415, 207, 0, 726, 727, 3, 423, 211, 0, 727, 728, 3, 407, 203, 0, 728, 729, 3, 435, 217, 0, 729, 730, 3, 437, 218, 0, 730, 731, 3, 399, 199, 0, 731, 732, 3, 423, 211, 0, 732, 733, 3, 429, 214, 0, 733, 112, 1, 0, 0, 0, 734, 735, 3, 405, 202, 0, 735, 736, 3, 399, 199, 0, 736, 737, 3, 437, 218, 0, 737, 738, 3, 399, 199, 0, 738, 739, 3, 401, 200, 0, 739, 740, 3, 399, 199, 0, 740, 741, 3, 435, 217, 0, 741, 742, 3, 407, 203, 0, 742, 114, 1, 0, 0, 0, 743, 744, 3, 405, 202, 0, 744, 745, 3, 407, 203, 0, 745, 746, 3, 409, 204, 0, 746, 747, 3, 399, 199, 0, 747, 748, 3, 439, 219, 0, 748, 749, 3, 421, 210, 0, 749, 750, 3, 437, 218, 0, 750, 116, 1, 0, 0, 0, 751, 752, 3, 405, 202, 0, 752, 753, 3, 407, 203, 0, 753, 754, 3, 409, 204, 0, 754, 755, 3, 407, 203, 0, 755, 756, 3, 433, 216, 0, 756, 757, 3, 433, 216, 0, 757, 758, 3, 399, 199, 0, 758, 759, 3, 401, 200, 0, 759, 760, 3, 421, 210, 0, 760, 761, 3, 407, 203, 0, 761, 118, 1, 0, 0, 0, 762, 763, 3, 405, 202, 0, 763, 764, 3, 407, 203, 0, 764, 765, 3, 409, 204, 0, 765, 766, 3, 407, 203, 0, 766, 767, 3, 433, 216, 0, 767, 768, 3, 433, 216, 0, 768, 769, 3, 407, 203, 0, 769, 770, 3, 405, 202, 0, 770, 120, 1, 0, 0, 0, 771, 772, 3, 405, 202, 0, 772, 773, 3, 407, 203, 0, 773, 774, 3, 421, 210, 0, 774, 775, 3, 407, 203, 0, 775, 776, 3, 437, 218, 0, 776, 777, 3, 407, 203, 0, 777, 122, 1, 0, 0, 0, 778, 779, 3, 405, 202, 0, 779, 780, 3, 407, 203, 0, 780, 781, 3, 435, 217, 0, 781, 782, 3, 403, 201, 0, 782, 124, 1, 0, 0, 0, 783, 784, 3, 405, 202, 0, 784, 785, 3, 407, 203, 0, 785, 786, 3, 437, 218, 0, 786, 787, 3, 399, 199, 0, 787, 788, 3, 403, 201, 0, 788, 789, 3, 413, 206, 0, 789, 126, 1, 0, 0, 0, 790, 791, 3, 405, 202, 0, 791, 792, 3, 415, 207, 0, 792, 793, 3, 435, 217, 0, 793, 794, 3, 437, 218, 0, 794, 795, 3, 415, 207, 0, 795, 796, 3, 425, 212, 0, 796, 797, 3, 403, 201, 0, 797, 798, 3, 437, 218, 0, 798, 128, 1, 0, 0, 0, 799, 800, 3, 405, 202, 0, 800, 801, 3, 433, 216, 0, 801, 802, 3, 427, 213, 0, 802, 803, 3, 429, 214, 0, 803, 130, 1, 0, 0, 0, 804, 805, 3, 407, 203, 0, 805, 806, 3, 399, 199, 0, 806, 807, 3, 403, 201, 0, 807, 808, 3, 413, 206, 0, 808, 132, 1, 0, 0, 0, 809, 810, 3, 407, 203, 0, 810, 811, 3, 421, 210, 0, 811, 812, 3, 435, 217, 0, 812, 813, 3, 407, 203, 0, 813, 134, 1, 0, 0, 0, 814, 815, 3, 407, 203, 0, 815, 816, 3, 425, 212, 0, 816, 817, 3, 405, 202, 0, 817, 136, 1, 0, 0, 0, 818, 819, 3, 407, 203, 0, 819, 820, 3, 435, 217, 0, 820, 821, 3, 403, 201, 0, 821, 822, 3, 399, 199, 0, 822, 823, 3, 429, 214, 0, 823, 824, 3, 407, 203, 0, 824, 138, 1, 0, 0, 0, 825, 826, 3, 407, 203, 0, 826, 827, 3, 445, 222, 0, 827, 828, 3, 403, 201, 0, 828, 829, 3, 407, 203, 0, 829, 830, 3, 429, 214, 0, 830, 831, 3, 437, 218, 0, 831, 140, 1, 0, 0, 0, 832, 833, 3, 407, 203, 0, 833, 834, 3, 445, 222, 0, 834, 835, 3, 403, 201, 0, 835, 836, 3, 421, 210, 0, 836, 837, 3, 439, 219, 0, 837, 838, 3, 435, 217, 0, 838, 839, 3, 415, 207, 0, 839, 840, 3, 441, 220, 0, 840, 841, 3, 407, 203, 0, 841, 142, 1, 0, 0, 0, 842, 843, 3, 407, 203, 0, 843, 844, 3, 445, 222, 0, 844, 845, 3, 415, 207, 0, 845, 846, 3, 435, 217, 0, 846, 847, 3, 437, 218, 0, 847, 848, 3, 435, 217, 0, 848, 144, 1, 0, 0, 0, 849, 850, 3, 407, 203, 0, 850, 851, 3, 445, 222, 0, 851, 852, 3, 429, 214, 0, 852, 853, 3, 421, 210, 0, 853, 854, 3, 399, 199, 0, 854, 855, 3, 415, 207, 0, 855, 856, 3, 425, 212, 0, 856, 146, 1, 0, 0, 0, 857, 858, 3, 409, 204, 0, 858, 859, 3, 399, 199, 0, 859, 860, 3, 415, 207, 0, 860, 861, 3, 421, 210, 0, 861, 148, 1, 0, 0, 0, 862, 863, 3, 409, 204, 0, 863, 864, 3, 427, 213, 0, 864, 865, 3, 433, 216, 0, 865, 150, 1, 0, 0, 0, 866, 867, 3, 409, 204, 0, 867, 868, 3, 427, 213, 0, 868, 869, 3, 433, 216, 0, 869, 870, 3, 407, 203, 0, 870, 871, 3, 415, 207, 0, 871, 872, 3, 411, 205, 0, 872, 873, 3, 425, 212, 0, 873, 152, 1, 0, 0, 0, 874, 875, 3, 409, 204, 0, 875, 876, 3, 433, 216, 0, 876, 877, 3, 427, 213, 0, 877, 878, 3, 423, 211, 0, 878, 154, 1, 0, 0, 0, 879, 880, 3, 409, 204, 0, 880, 881, 3, 439, 219, 0, 881, 882, 3, 421, 210, 0, 882, 883, 3, 421, 210, 0, 883, 156, 1, 0, 0, 0, 884, 885, 3, 411, 205, 0, 885, 886, 3, 421, 210, 0, 886, 887, 3, 427, 213, 0, 887, 888, 3, 401, 200, 0, 888, 158, 1, 0, 0, 0, 889, 890, 3, 411, 205, 0, 890, 891, 3, 433, 216, 0, 891, 892, 3, 427, 213, 0, 892, 893, 3, 439, 219, 0, 893, 894, 3, 429, 214, 0, 894, 160, 1, 0, 0, 0, 895, 896, 3, 413, 206, 0, 896, 897, 3, 399, 199, 0, 897, 898, 3, 441, 220, 0, 898, 899, 3, 415, 207, 0, 899, 900, 3, 425, 212, 0, 900, 901, 3, 411, 205, 0, 901, 162, 1, 0, 0, 0, 902, 903, 3, 415, 207, 0, 903, 904, 3, 409, 204, 0, 904, 164, 1, 0, 0, 0, 905, 906, 3, 415, 207, 0, 906, 907, 3, 411, 205, 0, 907, 908, 3, 425, 212, 0, 908, 909, 3, 427, 213, 0, 909, 910, 3, 433, 216, 0, 910, 911, 3, 407, 203, 0, 911, 166, 1, 0, 0, 0, 912, 913, 3, 415, 207, 0, 913, 914, 3, 423, 211, 0, 914, 915, 3, 423, 211, 0, 915, 916, 3, 407, 203, 0, 916, 917, 3, 405, 202, 0, 917, 918, 3, 415, 207, 0, 918, 919, 3, 399, 199, 0, 919, 920, 3, 437, 218, 0, 920, 921, 3, 407, 203, 0, 921, 168, 1, 0, 0, 0, 922, 923, 3, 415, 207, 0, 923, 924, 3, 425, 212, 0, 924, 170, 1, 0, 0, 0, 925, 926, 3, 415, 207, 0, 926, 927, 3, 425, 212, 0, 927, 928, 3, 405, 202, 0, 928, 929, 3, 407, 203, 0, 929, 930, 3, 445, 222, 0, 930, 172, 1, 0, 0, 0, 931, 932, 3, 415, 207, 0, 932, 933, 3, 425, 212, 0, 933, 934, 3, 405, 202, 0, 934, 935, 3, 407, 203, 0, 935, 936, 3, 445, 222, 0, 936, 937, 3, 407, 203, 0, 937, 938, 3, 405, 202, 0, 938, 174, 1, 0, 0, 0, 939, 940, 3, 415, 207, 0, 940, 941, 3, 425, 212, 0, 941, 942, 3, 415, 207, 0, 942, 943, 3, 437, 218, 0, 943, 944, 3, 415, 207, 0, 944, 945, 3, 399, 199, 0, 945, 946, 3, 421, 210, 0, 946, 947, 3, 421, 210, 0, 947, 948, 3, 447, 223, 0, 948, 176, 1, 0, 0, 0, 949, 950, 3, 415, 207, 0, 950, 951, 3, 425, 212, 0, 951, 952, 3, 425, 212, 0, 952, 953, 3, 407, 203, 0, 953, 954, 3, 433, 216, 0, 954, 178, 1, 0, 0, 0, 955, 956, 3, 415, 207, 0, 956, 957, 3, 425, 212, 0, 957, 958, 3, 435, 217, 0, 958, 959, 3, 407, 203, 0, 959, 960, 3, 433, 216, 0, 960, 961, 3, 437, 218, 0, 961, 180, 1, 0, 0, 0, 962, 963, 3, 415, 207, 0, 963, 964, 3, 425, 212, 0, 964, 965, 3, 435, 217, 0, 965, 966, 3, 437, 218, 0, 966, 967, 3, 407, 203, 0, 967, 968, 3, 399, 199, 0, 968, 969, 3, 405, 202, 0, 969, 182, 1, 0, 0, 0, 970, 971, 3, 415, 207, 0, 971, 972, 3, 425, 212, 0, 972, 973, 3, 437, 218, 0, 973, 974, 3, 407, 203, 0, 974, 975, 3, 433, 216, 0, 975, 976, 3, 435, 217, 0, 976, 977, 3, 407, 203, 0, 977, 978, 3, 403, 201, 0, 978, 979, 3, 437, 218, 0, 979, 184, 1, 0, 0, 0, 980, 981, 3, 415, 207, 0, 981, 982, 3, 425, 212, 0, 982, 983, 3, 437, 218, 0, 983, 984, 3, 427, 213, 0, 984, 186, 1, 0, 0, 0, 985, 986, 3, 415, 207, 0, 986, 987, 3, 435, 217, 0, 987, 188, 1, 0, 0, 0, 988, 989, 3, 415, 207, 0, 989, 990, 3, 435, 217, 0, 990, 991, 3, 425, 212, 0, 991, 992, 3, 439, 219, 0, 992, 993, 3, 421, 210, 0, 993, 994, 3, 421, 210, 0, 994, 190, 1, 0, 0, 0, 995, 996, 3, 417, 208, 0, 996, 997, 3, 427, 213, 0, 997, 998, 3, 415, 207, 0, 998, 999, 3, 425, 212, 0, 999, 192, 1, 0, 0, 0, 1000, 1001, 3, 419, 209, 0, 1001, 1002, 3, 407, 203, 0, 1002, 1003, 3, 447, 223, 0, 1003, 194, 1, 0, 0, 0, 1004, 1005, 3, 421, 210, 0, 1005, 1006, 3, 407, 203, 0, 1006, 1007, 3, 409, 204, 0, 1007, 1008, 3, 437, 218, 0, 1008, 196, 1, 0, 0, 0, 1009, 1010, 3, 421, 210, 0, 1010, 1011, 3, 415, 207, 0, 1011, 1012, 3, 419, 209, 0, 1012, 1013, 3, 407, 203, 0, 1013, 198, 1, 0, 0, 0, 1014, 1015, 3, 421, 210, 0, 1015, 1016, 3, 415, 207, 0, 1016, 1017, 3, 423, 211, 0, 1017, 1018, 3, 415, 207, 0, 1018, 1019, 3, 437, 218, 0, 1019, 200, 1, 0, 0, 0, 1020, 1021, 3, 423, 211, 0, 1021, 1022, 3, 399, 199, 0, 1022, 1023, 3, 437, 218, 0, 1023, 1024, 3, 403, 201, 0, 1024, 1025, 3, 413, 206, 0, 1025, 202, 1, 0, 0, 0, 1026, 1027, 3, 425, 212, 0, 1027, 1028, 3, 399, 199, 0, 1028, 1029, 3, 437, 218, 0, 1029, 1030, 3, 439, 219, 0, 1030, 1031, 3, 433, 216, 0, 1031, 1032, 3, 399, 199, 0, 1032, 1033, 3, 421, 210, 0, 1033, 204, 1, 0, 0, 0, 1034, 1035, 3, 425, 212, 0, 1035, 1036, 3, 427, 213, 0, 1036, 206, 1, 0, 0, 0, 1037, 1038, 3, 425, 212, 0, 1038, 1039, 3, 427, 213, 0, 1039, 1040, 3, 437, 218, 0, 1040, 208, 1, 0, 0, 0, 1041, 1042, 3, 425, 212, 0, 1042, 1043, 3, 427, 213, 0, 1043, 1044, 3, 437, 218, 0, 1044, 1045, 3, 425, 212, 0, 1045, 1046, 3, 439, 219, 0, 1046, 1047, 3, 421, 210, 0, 1047, 1048, 3, 421, 210, 0, 1048, 210, 1, 0, 0, 0, 1049, 1050, 3, 425, 212, 0, 1050, 1051, 3, 439, 219, 0, 1051, 1052, 3, 421, 210, 0, 1052, 1053, 3, 421, 210, 0, 1053, 212, 1, 0, 0, 0, 1054, 1055, 3, 427, 213, 0, 1055, 1056, 3, 409, 204, 0, 1056, 214, 1, 0, 0, 0, 1057, 1058, 3, 427, 213, 0, 1058, 1059, 3, 409, 204, 0, 1059, 1060, 3, 409, 204, 0, 1060, 1061, 3, 435, 217, 0, 1061, 1062, 3, 407, 203, 0, 1062, 1063, 3, 437, 218, 0, 1063, 216, 1, 0, 0, 0, 1064, 1065, 3, 427, 213, 0, 1065, 1066, 3, 425, 212, 0, 1066, 218, 1, 0, 0, 0, 1067, 1068, 3, 427, 213, 0, 1068, 1069, 3, 433, 216, 0, 1069, 220, 1, 0, 0, 0, 1070, 1071, 3, 427, 213, 0, 1071, 1072, 3, 433, 216, 0, 1072, 1073, 3, 405, 202, 0, 1073, 1074, 3, 407, 203, 0, 1074, 1075, 3, 433, 216, 0, 1075, 222, 1, 0, 0, 0, 1076, 1077, 3, 427, 213, 0, 1077, 1078, 3, 439, 219, 0, 1078, 1079, 3, 437, 218, 0, 1079, 1080, 3, 407, 203, 0, 1080, 1081, 3, 433, 216, 0, 1081, 224, 1, 0, 0, 0, 1082, 1083, 3, 429, 214, 0, 1083, 1084, 3, 421, 210, 0, 1084, 1085, 3, 399, 199, 0, 1085, 1086, 3, 425, 212, 0, 1086, 226, 1, 0, 0, 0, 1087, 1088, 3, 429, 214, 0, 1088, 1089, 3, 433, 216, 0, 1089, 1090, 3, 399, 199, 0, 1090, 1091, 3, 411, 205, 0, 1091, 1092, 3, 423, 211, 0, 1092, 1093, 3, 399, 199, 0, 1093, 228, 1, 0, 0, 0, 1094, 1095, 3, 429, 214, 0, 1095, 1096, 3, 433, 216, 0, 1096, 1097, 3, 415, 207, 0, 1097, 1098, 3, 423, 211, 0, 1098, 1099, 3, 399, 199, 0, 1099, 1100, 3, 433, 216, 0, 1100, 1101, 3, 447, 223, 0, 1101, 230, 1, 0, 0, 0, 1102, 1103, 3, 431, 215, 0, 1103, 1104, 3, 439, 219, 0, 1104, 1105, 3, 407, 203, 0, 1105, 1106, 3, 433, 216, 0, 1106, 1107, 3, 447, 223, 0, 1107, 232, 1, 0, 0, 0, 1108, 1109, 3, 433, 216, 0, 1109, 1110, 3, 399, 199, 0, 1110, 1111, 3, 415, 207, 0, 1111, 1112, 3, 435, 217, 0, 1112, 1113, 3, 407, 203, 0, 1113, 234, 1, 0, 0, 0, 1114, 1115, 3, 433, 216, 0, 1115, 1116, 3, 407, 203, 0, 1116, 1117, 3, 403, 201, 0, 1117, 1118, 3, 439, 219, 0, 1118, 1119, 3, 433, 216, 0, 1119, 1120, 3, 435, 217, 0, 1120, 1121, 3, 415, 207, 0, 1121, 1122, 3, 441, 220, 0, 1122, 1123, 3, 407, 203, 0, 1123, 236, 1, 0, 0, 0, 1124, 1125, 3, 433, 216, 0, 1125, 1126, 3, 407, 203, 0, 1126, 1127, 3, 409, 204, 0, 1127, 1128, 3, 407, 203, 0, 1128, 1129, 3, 433, 216, 0, 1129, 1130, 3, 407, 203, 0, 1130, 1131, 3, 425, 212, 0, 1131, 1132, 3, 403, 201, 0, 1132, 1133, 3, 407, 203, 0, 1133, 1134, 3, 435, 217, 0, 1134, 238, 1, 0, 0, 0, 1135, 1136, 3, 433, 216, 0, 1136, 1137, 3, 407, 203, 0, 1137, 1138, 3, 411, 205, 0, 1138, 1139, 3, 407, 203, 0, 1139, 1140, 3, 445, 222, 0, 1140, 1141, 3, 429, 214, 0, 1141, 240, 1, 0, 0, 0, 1142, 1143, 3, 433, 216, 0, 1143, 1144, 3, 407, 203, 0, 1144, 1145, 3, 415, 207, 0, 1145, 1146, 3, 425, 212, 0, 1146, 1147, 3, 405, 202, 0, 1147, 1148, 3, 407, 203, 0, 1148, 1149, 3, 445, 222, 0, 1149, 242, 1, 0, 0, 0, 1150, 1151, 3, 433, 216, 0, 1151, 1152, 3, 407, 203, 0, 1152, 1153, 3, 421, 210, 0, 1153, 1154, 3, 407, 203, 0, 1154, 1155, 3, 399, 199, 0, 1155, 1156, 3, 435, 217, 0, 1156, 1157, 3, 407, 203, 0, 1157, 244, 1, 0, 0, 0, 1158, 1159, 3, 433, 216, 0, 1159, 1160, 3, 407, 203, 0, 1160, 1161, 3, 425, 212, 0, 1161, 1162, 3, 399, 199, 0, 1162, 1163, 3, 423, 211, 0, 1163, 1164, 3, 407, 203, 0, 1164, 246, 1, 0, 0, 0, 1165, 1166, 3, 433, 216, 0, 1166, 1167, 3, 407, 203, 0, 1167, 1168, 3, 429, 214, 0, 1168, 1169, 3, 421, 210, 0, 1169, 1170, 3, 399, 199, 0, 1170, 1171, 3, 403, 201, 0, 1171, 1172, 3, 407, 203, 0, 1172, 248, 1, 0, 0, 0, 1173, 1174, 3, 433, 216, 0, 1174, 1175, 3, 407, 203, 0, 1175, 1176, 3, 435, 217, 0, 1176, 1177, 3, 437, 218, 0, 1177, 1178, 3, 433, 216, 0, 1178, 1179, 3, 415, 207, 0, 1179, 1180, 3, 403, 201, 0, 1180, 1181, 3, 437, 218, 0, 1181, 250, 1, 0, 0, 0, 1182, 1183, 3, 433, 216, 0, 1183, 1184, 3, 407, 203, 0, 1184, 1185, 3, 437, 218, 0, 1185, 1186, 3, 439, 219, 0, 1186, 1187, 3, 433, 216, 0, 1187, 1188, 3, 425, 212, 0, 1188, 1189, 3, 415, 207, 0, 1189, 1190, 3, 425, 212, 0, 1190, 1191, 3, 411, 205, 0, 1191, 252, 1, 0, 0, 0, 1192, 1193, 3, 433, 216, 0, 1193, 1194, 3, 415, 207, 0, 1194, 1195, 3, 411, 205, 0, 1195, 1196, 3, 413, 206, 0, 1196, 1197, 3, 437, 218, 0, 1197, 254, 1, 0, 0, 0, 1198, 1199, 3, 433, 216, 0, 1199, 1200, 3, 427, 213, 0, 1200, 1201, 3, 421, 210, 0, 1201, 1202, 3, 421, 210, 0, 1202, 1203, 3, 401, 200, 0, 1203, 1204, 3, 399, 199, 0, 1204, 1205, 3, 403, 201, 0, 1205, 1206, 3, 419, 209, 0, 1206, 256, 1, 0, 0, 0, 1207, 1208, 3, 433, 216, 0, 1208, 1209, 3, 427, 213, 0, 1209, 1210, 3, 443, 221, 0, 1210, 258, 1, 0, 0, 0, 1211, 1212, 3, 433, 216, 0, 1212, 1213, 3, 427, 213, 0, 1213, 1214, 3, 443, 221, 0, 1214, 1215, 3, 435, 217, 0, 1215, 260, 1, 0, 0, 0, 1216, 1217, 3, 435, 217, 0, 1217, 1218, 3, 399, 199, 0, 1218, 1219, 3, 441, 220, 0, 1219, 1220, 3, 407, 203, 0, 1220, 1221, 3, 429, 214, 0, 1221, 1222, 3, 427, 213, 0, 1222, 1223, 3, 415, 207, 0, 1223, 1224, 3, 425, 212, 0, 1224, 1225, 3, 437, 218, 0, 1225, 262, 1, 0, 0, 0, 1226, 1227, 3, 435, 217, 0, 1227, 1228, 3, 407, 203, 0, 1228, 1229, 3, 421, 210, 0, 1229, 1230, 3, 407, 203, 0, 1230, 1231, 3, 403, 201, 0, 1231, 1232, 3, 437, 218, 0, 1232, 264, 1, 0, 0, 0, 1233, 1234, 3, 435, 217, 0, 1234, 1235, 3, 407, 203, 0, 1235, 1236, 3, 437, 218, 0, 1236, 266, 1, 0, 0, 0, 1237, 1238, 3, 435, 217, 0, 1238, 1239, 3, 437, 218, 0, 1239, 1240, 3, 433, 216, 0, 1240, 1241, 3, 415, 207, 0, 1241, 1242, 3, 403, 201, 0, 1242, 1243, 3, 437, 218, 0, 1243, 268, 1, 0, 0, 0, 1244, 1245, 3, 437, 218, 0, 1245, 1246, 3, 399, 199, 0, 1246, 1247, 3, 401, 200, 0, 1247, 1248, 3, 421, 210, 0, 1248, 1249, 3, 407, 203, 0, 1249, 270, 1, 0, 0, 0, 1250, 1251, 3, 437, 218, 0, 1251, 1252, 3, 407, 203, 0, 1252, 1253, 3, 423, 211, 0, 1253, 1254, 3, 429, 214, 0, 1254, 272, 1, 0, 0, 0, 1255, 1256, 3, 437, 218, 0, 1256, 1257, 3, 407, 203, 0, 1257, 1258, 3, 423, 211, 0, 1258, 1259, 3, 429, 214, 0, 1259, 1260, 3, 427, 213, 0, 1260, 1261, 3, 433, 216, 0, 1261, 1262, 3, 399, 199, 0, 1262, 1263, 3, 433, 216, 0, 1263, 1264, 3, 447, 223, 0, 1264, 274, 1, 0, 0, 0, 1265, 1266, 3, 437, 218, 0, 1266, 1267, 3, 413, 206, 0, 1267, 1268, 3, 407, 203, 0, 1268, 1269, 3, 425, 212, 0, 1269, 276, 1, 0, 0, 0, 1270, 1271, 3, 437, 218, 0, 1271, 1272, 3, 427, 213, 0, 1272, 278, 1, 0, 0, 0, 1273, 1274, 3, 437, 218, 0, 1274, 1275, 3, 433, 216, 0, 1275, 1276, 3, 399, 199, 0, 1276, 1277, 3, 425, 212, 0, 1277, 1278, 3, 435, 217, 0, 1278, 1279, 3, 399, 199, 0, 1279, 1280, 3, 403, 201, 0, 1280, 1281, 3, 437, 218, 0, 1281, 1282, 3, 415, 207, 0, 1282, 1283, 3, 427, 213, 0, 1283, 1284, 3, 425, 212, 0, 1284, 280, 1, 0, 0, 0, 1285, 1286, 3, 437, 218, 0, 1286, 1287, 3, 433, 216, 0, 1287, 1288, 3, 415, 207, 0, 1288, 1289, 3, 411, 205, 0, 1289, 1290, 3, 411, 205, 0, 1290, 1291, 3, 407, 203, 0, 1291, 1292, 3, 433, 216, 0, 1292, 282, 1, 0, 0, 0, 1293, 1294, 3, 439, 219, 0, 1294, 1295, 3, 425, 212, 0, 1295, 1296, 3, 415, 207, 0, 1296, 1297, 3, 427, 213, 0, 1297, 1298, 3, 425, 212, 0, 1298, 284, 1, 0, 0, 0, 1299, 1300, 3, 439, 219, 0, 1300, 1301, 3, 425, 212, 0, 1301, 1302, 3, 415, 207, 0, 1302, 1303, 3, 431, 215, 0, 1303, 1304, 3, 439, 219, 0, 1304, 1305, 3, 407, 203, 0, 1305, 286, 1, 0, 0, 0, 1306, 1307, 3, 439, 219, 0, 1307, 1308, 3, 429, 214, 0, 1308, 1309, 3, 405, 202, 0, 1309, 1310, 3, 399, 199, 0, 1310, 1311, 3, 437, 218, 0, 1311, 1312, 3, 407, 203, 0, 1312, 288, 1, 0, 0, 0, 1313, 1314, 3, 439, 219, 0, 1314, 1315, 3, 435, 217, 0, 1315, 1316, 3, 415, 207, 0, 1316, 1317, 3, 425, 212, 0, 1317, 1318, 3, 411, 205, 0, 1318, 290, 1, 0, 0, 0, 1319, 1320, 3, 441, 220, 0, 1320, 1321, 3, 399, 199, 0, 1321, 1322, 3, 403, 201, 0, 1322, 1323, 3, 439, 219, 0, 1323, 1324, 3, 439, 219, 0, 1324, 1325, 3, 423, 211, 0, 1325, 292, 1, 0, 0, 0, 1326, 1327, 3, 441, 220, 0, 1327, 1328, 3, 399, 199, 0, 1328, 1329, 3, 421, 210, 0, 1329, 1330, 3, 439, 219, 0, 1330, 1331, 3, 407, 203, 0, 1331, 1332, 3, 435, 217, 0, 1332, 294, 1, 0, 0, 0, 1333, 1334, 3, 441, 220, 0, 1334, 1335, 3, 415, 207, 0, 1335, 1336, 3, 407, 203, 0, 1336, 1337, 3, 443, 221, 0, 1337, 296, 1, 0, 0, 0, 1338, 1339, 3, 441, 220, 0, 1339, 1340, 3, 415, 207, 0, 1340, 1341, 3, 433, 216, 0, 1341, 1342, 3, 437, 218, 0, 1342, 1343, 3, 439, 219, 0, 1343, 1344, 3, 399, 199, 0, 1344, 1345, 3, 421, 210, 0, 1345, 298, 1, 0, 0, 0, 1346, 1347, 3, 443, 221, 0, 1347, 1348, 3, 413, 206, 0, 1348, 1349, 3, 407, 203, 0, 1349, 1350, 3, 425, 212, 0, 1350, 300, 1, 0, 0, 0, 1351, 1352, 3, 443, 221, 0, 1352, 1353, 3, 413, 206, 0, 1353, 1354, 3, 407, 203, 0, 1354, 1355, 3, 433, 216, 0, 1355, 1356, 3, 407, 203, 0, 1356, 302, 1, 0, 0, 0, 1357, 1358, 3, 443, 221, 0, 1358, 1359, 3, 415, 207, 0, 1359, 1360, 3, 437, 218, 0, 1360, 1361, 3, 413, 206, 0, 1361, 304, 1, 0, 0, 0, 1362, 1363, 3, 443, 221, 0, 1363, 1364, 3, 415, 207, 0, 1364, 1365, 3, 437, 218, 0, 1365, 1366, 3, 413, 206, 0, 1366, 1367, 3, 427, 213, 0, 1367, 1368, 3, 439, 219, 0, 1368, 1369, 3, 437, 218, 0, 1369, 306, 1, 0, 0, 0, 1370, 1371, 3, 409, 204, 0, 1371, 1372, 3, 415, 207, 0, 1372, 1373, 3, 433, 216, 0, 1373, 1374, 3, 435, 217, 0, 1374, 1375, 3, 437, 218, 0, 1375, 1376, 5, 95, 0, 0, 1376, 1377, 3, 441, 220, 0, 1377, 1378, 3, 399, 199, 0, 1378, 1379, 3, 421, 210, 0, 1379, 1380, 3, 439, 219, 0, 1380, 1381, 3, 407, 203, 0, 1381, 308, 1, 0, 0, 0, 1382, 1383, 3, 427, 213, 0, 1383, 1384, 3, 441, 220, 0, 1384, 1385, 3, 407, 203, 0, 1385, 1386, 3, 433, 216, 0, 1386, 310, 1, 0, 0, 0, 1387, 1388, 3, 429, 214, 0, 1388, 1389, 3, 399, 199, 0, 1389, 1390, 3, 433, 216, 0, 1390, 1391, 3, 437, 218, 0, 1391, 1392, 3, 415, 207, 0, 1392, 1393, 3, 437, 218, 0, 1393, 1394, 3, 415, 207, 0, 1394, 1395, 3, 427, 213, 0, 1395, 1396, 3, 425, 212, 0, 1396, 312, 1, 0, 0, 0, 1397, 1398, 3, 433, 216, 0, 1398, 1399, 3, 399, 199, 0, 1399, 1400, 3, 425, 212, 0, 1400, 1401, 3, 411, 205, 0, 1401, 1402, 3, 407, 203, 0, 1402, 314, 1, 0, 0, 0, 1403, 1404, 3, 429, 214, 0, 1404, 1405, 3, 433, 216, 0, 1405, 1406, 3, 407, 203, 0, 1406, 1407, 3, 403, 201, 0, 1407, 1408, 3, 407, 203, 0, 1408, 1409, 3, 405, 202, 0, 1409, 1410, 3, 415, 207, 0, 1410, 1411, 3, 425, 212, 0, 1411, 1412, 3, 411, 205, 0, 1412, 316, 1, 0, 0, 0, 1413, 1414, 3, 439, 219, 0, 1414, 1415, 3, 425, 212, 0, 1415, 1416, 3, 401, 200, 0, 1416, 1417, 3, 427, 213, 0, 1417, 1418, 3, 439, 219, 0, 1418, 1419, 3, 425, 212, 0, 1419, 1420, 3, 405, 202, 0, 1420, 1421, 3, 407, 203, 0, 1421, 1422, 3, 405, 202, 0, 1422, 318, 1, 0, 0, 0, 1423, 1424, 3, 403, 201, 0, 1424, 1425, 3, 439, 219, 0, 1425, 1426, 3, 433, 216, 0, 1426, 1427, 3, 433, 216, 0, 1427, 1428, 3, 407, 203, 0, 1428, 1429, 3, 425, 212, 0, 1429, 1430, 3, 437, 218, 0, 1430, 320, 1, 0, 0, 0, 1431, 1432, 3, 409, 204, 0, 1432, 1433, 3, 427, 213, 0, 1433, 1434, 3, 421, 210, 0, 1434, 1435, 3, 421, 210, 0, 1435, 1436, 3, 427, 213, 0, 1436, 1437, 3, 443, 221, 0, 1437, 1438, 3, 415, 207, 0, 1438, 1439, 3, 425, 212, 0, 1439, 1440, 3, 411, 205, 0, 1440, 322, 1, 0, 0, 0, 1441, 1442, 3, 403, 201, 0, 1442, 1443, 3, 439, 219, 0, 1443, 1444, 3, 423, 211, 0, 1444, 1445, 3, 407, 203, 0, 1445, 1446, 5, 95, 0, 0, 1446, 1447, 3, 405, 202, 0, 1447, 1448, 3, 415, 207, 0, 1448, 1449, 3, 435, 217, 0, 1449, 1450, 3, 437, 218, 0, 1450, 324, 1, 0, 0, 0, 1451, 1452, 3, 405, 202, 0, 1452, 1453, 3, 407, 203, 0, 1453, 1454, 3, 425, 212, 0, 1454, 1455, 3, 435, 217, 0, 1455, 1456, 3, 407, 203, 0, 1456, 1457, 5, 95, 0, 0, 1457, 1458, 3, 433, 216, 0, 1458, 1459, 3, 399, 199, 0, 1459, 1460, 3, 425, 212, 0, 1460, 1461, 3, 419, 209, 0, 1461, 326, 1, 0, 0, 0, 1462, 1463, 3, 421, 210, 0, 1463, 1464, 3, 399, 199, 0, 1464, 1465, 3, 411, 205, 0, 1465, 328, 1, 0, 0, 0, 1466, 1467, 3, 421, 210, 0, 1467, 1468, 3, 399, 199, 0, 1468, 1469, 3, 435, 217, 0, 1469, 1470, 3, 437, 218, 0, 1470, 1471, 5, 95, 0, 0, 1471, 1472, 3, 441, 220, 0, 1472, 1473, 3, 399, 199, 0, 1473, 1474, 3, 421, 210, 0, 1474, 1475, 3, 439, 219, 0, 1475, 1476, 3, 407, 203, 0, 1476, 330, 1, 0, 0, 0, 1477, 1478, 3, 421, 210, 0, 1478, 1479, 3, 407, 203, 0, 1479, 1480, 3, 399, 199, 0, 1480, 1481, 3, 405, 202, 0, 1481, 332, 1, 0, 0, 0, 1482, 1483, 3, 425, 212, 0, 1483, 1484, 3, 437, 218, 0, 1484, 1485, 3, 413, 206, 0, 1485, 1486, 5, 95, 0, 0, 1486, 1487, 3, 441, 220, 0, 1487, 1488, 3, 399, 199, 0, 1488, 1489, 3, 421, 210, 0, 1489, 1490, 3, 439, 219, 0, 1490, 1491, 3, 407, 203, 0, 1491, 334, 1, 0, 0, 0, 1492, 1493, 3, 425, 212, 0, 1493, 1494, 3, 437, 218, 0, 1494, 1495, 3, 415, 207, 0, 1495, 1496, 3, 421, 210, 0, 1496, 1497, 3, 407, 203, 0, 1497, 336, 1, 0, 0, 0, 1498, 1499, 3, 429, 214, 0, 1499, 1500, 3, 407, 203, 0, 1500, 1501, 3, 433, 216, 0, 1501, 1502, 3, 403, 201, 0, 1502, 1503, 3, 407, 203, 0, 1503, 1504, 3, 425, 212, 0, 1504, 1505, 3, 437, 218, 0, 1505, 1506, 5, 95, 0, 0, 1506, 1507, 3, 433, 216, 0, 1507, 1508, 3, 399, 199, 0, 1508, 1509, 3, 425, 212, 0, 1509, 1510, 3, 419, 209, 0, 1510, 338, 1, 0, 0, 0, 1511, 1512, 3, 433, 216, 0, 1512, 1513, 3, 399, 199, 0, 1513, 1514, 3, 425, 212, 0, 1514, 1515, 3, 419, 209, 0, 1515, 340, 1, 0, 0, 0, 1516, 1517, 3, 433, 216, 0, 1517, 1518, 3, 427, 213, 0, 1518, 1519, 3, 443, 221, 0, 1519, 1520, 5, 95, 0, 0, 1520, 1521, 3, 425, 212, 0, 1521, 1522, 3, 439, 219, 0, 1522, 1523, 3, 423, 211, 0, 1523, 1524, 3, 401, 200, 0, 1524, 1525, 3, 407, 203, 0, 1525, 1526, 3, 433, 216, 0, 1526, 342, 1, 0, 0, 0, 1527, 1528, 3, 411, 205, 0, 1528, 1529, 3, 407, 203, 0, 1529, 1530, 3, 425, 212, 0, 1530, 1531, 3, 407, 203, 0, 1531, 1532, 3, 433, 216, 0, 1532, 1533, 3, 399, 199, 0, 1533, 1534, 3, 437, 218, 0, 1534, 1535, 3, 407, 203, 0, 1535, 1536, 3, 405, 202, 0, 1536, 344, 1, 0, 0, 0, 1537, 1538, 3, 399, 199, 0, 1538, 1539, 3, 421, 210, 0, 1539, 1540, 3, 443, 221, 0, 1540, 1541, 3, 399, 199, 0, 1541, 1542, 3, 447, 223, 0, 1542, 1543, 3, 435, 217, 0, 1543, 346, 1, 0, 0, 0, 1544, 1545, 3, 435, 217, 0, 1545, 1546, 3, 437, 218, 0, 1546, 1547, 3, 427, 213, 0, 1547, 1548, 3, 433, 216, 0, 1548, 1549, 3, 407, 203, 0, 1549, 1550, 3, 405, 202, 0, 1550, 348, 1, 0, 0, 0, 1551, 1552, 3, 437, 218, 0, 1552, 1553, 3, 433, 216, 0, 1553, 1554, 3, 439, 219, 0, 1554, 1555, 3, 407, 203, 0, 1555, 350, 1, 0, 0, 0, 1556, 1557, 3, 409, 204, 0, 1557, 1558, 3, 399, 199, 0, 1558, 1559, 3, 421, 210, 0, 1559, 1560, 3, 435, 217, 0, 1560, 1561, 3, 407, 203, 0, 1561, 352, 1, 0, 0, 0, 1562, 1563, 3, 443, 221, 0, 1563, 1564, 3, 415, 207, 0, 1564, 1565, 3, 425, 212, 0, 1565, 1566, 3, 405, 202, 0, 1566, 1567, 3, 427, 213, 0, 1567, 1568, 3, 443, 221, 0, 1568, 354, 1, 0, 0, 0, 1569, 1570, 3, 425, 212, 0, 1570, 1571, 3, 439, 219, 0, 1571, 1572, 3, 421, 210, 0, 1572, 1573, 3, 421, 210, 0, 1573, 1574, 3, 435, 217, 0, 1574, 356, 1, 0, 0, 0, 1575, 1576, 3, 409, 204, 0, 1576, 1577, 3, 415, 207, 0, 1577, 1578, 3, 433, 216, 0, 1578, 1579, 3, 435, 217, 0, 1579, 1580, 3, 437, 218, 0, 1580, 358, 1, 0, 0, 0, 1581, 1582, 3, 421, 210, 0, 1582, 1583, 3, 399, 199, 0, 1583, 1584, 3, 435, 217, 0, 1584, 1585, 3, 437, 218, 0, 1585, 360, 1, 0, 0, 0, 1586, 1587, 3, 409, 204, 0, 1587, 1588, 3, 415, 207, 0, 1588, 1589, 3, 421, 210, 0, 1589, 1590, 3, 437, 218, 0, 1590, 1591, 3, 407, 203, 0, 1591, 1592, 3, 433, 216, 0, 1592, 362, 1, 0, 0, 0, 1593, 1594, 3, 411, 205, 0, 1594, 1595, 3, 433, 216, 0, 1595, 1596, 3, 427, 213, 0, 1596, 1597, 3, 439, 219, 0, 1597, 1598, 3, 429, 214, 0, 1598, 1599, 3, 435, 217, 0, 1599, 364, 1, 0, 0, 0, 1600, 1601, 3, 407, 203, 0, 1601, 1602, 3, 445, 222, 0, 1602, 1603, 3, 403, 201, 0, 1603, 1604, 3, 421, 210, 0, 1604, 1605, 3, 439, 219, 0, 1605, 1606, 3, 405, 202, 0, 1606, 1607, 3, 407, 203, 0, 1607, 366, 1, 0, 0, 0, 1608, 1609, 3, 437, 218, 0, 1609, 1610, 3, 415, 207, 0, 1610, 1611, 3, 407, 203, 0, 1611, 1612, 3, 435, 217, 0, 1612, 368, 1, 0, 0, 0, 1613, 1614, 3, 427, 213, 0, 1614, 1615, 3, 437, 218, 0, 1615, 1616, 3, 413, 206, 0, 1616, 1617, 3, 407, 203, 0, 1617, 1618, 3, 433, 216, 0, 1618, 1619, 3, 435, 217, 0, 1619, 370, 1, 0, 0, 0, 1620, 1621, 3, 405, 202, 0, 1621, 1622, 3, 427, 213, 0, 1622, 372, 1, 0, 0, 0, 1623, 1624, 3, 425, 212, 0, 1624, 1625, 3, 427, 213, 0, 1625, 1626, 3, 437, 218, 0, 1626, 1627, 3, 413, 206, 0, 1627, 1628, 3, 415, 207, 0, 1628, 1629, 3, 425, 212, 0, 1629, 1630, 3, 411, 205, 0, 1630, 374, 1, 0, 0, 0, 1631, 1637, 5, 34, 0, 0, 1632, 1636, 8, 0, 0, 0, 1633, 1634, 5, 34, 0, 0, 1634, 1636, 5, 34, 0, 0, 1635, 1632, 1, 0, 0, 0, 1635, 1633, 1, 0, 0, 0, 1636, 1639, 1, 0, 0, 0, 1637, 1635, 1, 0, 0, 0, 1637, 1638, 1, 0, 0, 0, 1638, 1640, 1, 0, 0, 0, 1639, 1637, 1, 0, 0, 0, 1640, 1667, 5, 34, 0, 0, 1641, 1647, 5, 96, 0, 0, 1642, 1646, 8, 1, 0, 0, 1643, 1644, 5, 96, 0, 0, 1644, 1646, 5, 96, 0, 0, 1645, 1642, 1, 0, 0, 0, 1645, 1643, 1, 0, 0, 0, 1646, 1649, 1, 0, 0, 0, 1647, 1645, 1, 0, 0, 0, 1647, 1648, 1, 0, 0, 0, 1648, 1650, 1, 0, 0, 0, 1649, 1647, 1, 0, 0, 0, 1650, 1667, 5, 96, 0, 0, 1651, 1655, 5, 91, 0, 0, 1652, 1654, 8, 2, 0, 0, 1653, 1652, 1, 0, 0, 0, 1654, 1657, 1, 0, 0, 0, 1655, 1653, 1, 0, 0, 0, 1655, 1656, 1, 0, 0, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1655, 1, 0, 0, 0, 1658, 1667, 5, 93, 0, 0, 1659, 1663, 7, 3, 0, 0, 1660, 1662, 7, 4, 0, 0, 1661, 1660, 1, 0, 0, 0, 1662, 1665, 1, 0, 0, 0, 1663, 1661, 1, 0, 0, 0, 1663, 1664, 1, 0, 0, 0, 1664, 1667, 1, 0, 0, 0, 1665, 1663, 1, 0, 0, 0, 1666, 1631, 1, 0, 0, 0, 1666, 1641, 1, 0, 0, 0, 1666, 1651, 1, 0, 0, 0, 1666, 1659, 1, 0, 0, 0, 1667, 376, 1, 0, 0, 0, 1668, 1670, 3, 397, 198, 0, 1669, 1668, 1, 0, 0, 0, 1670, 1671, 1, 0, 0, 0, 1671, 1669, 1, 0, 0, 0, 1671, 1672, 1, 0, 0, 0, 1672, 1680, 1, 0, 0, 0, 1673, 1677, 5, 46, 0, 0, 1674, 1676, 3, 397, 198, 0, 1675, 1674, 1, 0, 0, 0, 1676, 1679, 1, 0, 0, 0, 1677, 1675, 1, 0, 0, 0, 1677, 1678, 1, 0, 0, 0, 1678, 1681, 1, 0, 0, 0, 1679, 1677, 1, 0, 0, 0, 1680, 1673, 1, 0, 0, 0, 1680, 1681, 1, 0, 0, 0, 1681, 1689, 1, 0, 0, 0, 1682, 1684, 5, 46, 0, 0, 1683, 1685, 3, 397, 198, 0, 1684, 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1689, 1, 0, 0, 0, 1688, 1669, 1, 0, 0, 0, 1688, 1682, 1, 0, 0, 0, 1689, 1699, 1, 0, 0, 0, 1690, 1692, 3, 407, 203, 0, 1691, 1693, 7, 5, 0, 0, 1692, 1691, 1, 0, 0, 0, 1692, 1693, 1, 0, 0, 0, 1693, 1695, 1, 0, 0, 0, 1694, 1696, 3, 397, 198, 0, 1695, 1694, 1, 0, 0, 0, 1696, 1697, 1, 0, 0, 0, 1697, 1695, 1, 0, 0, 0, 1697, 1698, 1, 0, 0, 0, 1698, 1700, 1, 0, 0, 0, 1699, 1690, 1, 0, 0, 0, 1699, 1700, 1, 0, 0, 0, 1700, 1710, 1, 0, 0, 0, 1701, 1702, 5, 48, 0, 0, 1702, 1703, 5, 120, 0, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1706, 3, 395, 197, 0, 1705, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1705, 1, 0, 0, 0, 1707, 1708, 1, 0, 0, 0, 1708, 1710, 1, 0, 0, 0, 1709, 1688, 1, 0, 0, 0, 1709, 1701, 1, 0, 0, 0, 1710, 378, 1, 0, 0, 0, 1711, 1715, 5, 63, 0, 0, 1712, 1714, 3, 397, 198, 0, 1713, 1712, 1, 0, 0, 0, 1714, 1717, 1, 0, 0, 0, 1715, 1713, 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 380, 1, 0, 0, 0, 1717, 1715, 1, 0, 0, 0, 1718, 1719, 7, 6, 0, 0, 1719, 1720, 3, 375, 187, 0, 1720, 382, 1, 0, 0, 0, 1721, 1727, 5, 39, 0, 0, 1722, 1726, 8, 7, 0, 0, 1723, 1724, 5, 39, 0, 0, 1724, 1726, 5, 39, 0, 0, 1725, 1722, 1, 0, 0, 0, 1725, 1723, 1, 0, 0, 0, 1726, 1729, 1, 0, 0, 0, 1727, 1725, 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1730, 1, 0, 0, 0, 1729, 1727, 1, 0, 0, 0, 1730, 1731, 5, 39, 0, 0, 1731, 384, 1, 0, 0, 0, 1732, 1733, 3, 445, 222, 0, 1733, 1734, 3, 383, 191, 0, 1734, 386, 1, 0, 0, 0, 1735, 1736, 5, 45, 0, 0, 1736, 1737, 5, 45, 0, 0, 1737, 1741, 1, 0, 0, 0, 1738, 1740, 8, 8, 0, 0, 1739, 1738, 1, 0, 0, 0, 1740, 1743, 1, 0, 0, 0, 1741, 1739, 1, 0, 0, 0, 1741, 1742, 1, 0, 0, 0, 1742, 1749, 1, 0, 0, 0, 1743, 1741, 1, 0, 0, 0, 1744, 1746, 5, 13, 0, 0, 1745, 1744, 1, 0, 0, 0, 1745, 1746, 1, 0, 0, 0, 1746, 1747, 1, 0, 0, 0, 1747, 1750, 5, 10, 0, 0, 1748, 1750, 5, 0, 0, 1, 1749, 1745, 1, 0, 0, 0, 1749, 1748, 1, 0, 0, 0, 1750, 1751, 1, 0, 0, 0, 1751, 1752, 6, 193, 0, 0, 1752, 388, 1, 0, 0, 0, 1753, 1754, 5, 47, 0, 0, 1754, 1755, 5, 42, 0, 0, 1755, 1759, 1, 0, 0, 0, 1756, 1758, 9, 0, 0, 0, 1757, 1756, 1, 0, 0, 0, 1758, 1761, 1, 0, 0, 0, 1759, 1760, 1, 0, 0, 0, 1759, 1757, 1, 0, 0, 0, 1760, 1762, 1, 0, 0, 0, 1761, 1759, 1, 0, 0, 0, 1762, 1763, 5, 42, 0, 0, 1763, 1764, 5, 47, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, 6, 194, 0, 0, 1766, 390, 1, 0, 0, 0, 1767, 1768, 7, 9, 0, 0, 1768, 1769, 1, 0, 0, 0, 1769, 1770, 6, 195, 0, 0, 1770, 392, 1, 0, 0, 0, 1771, 1772, 9, 0, 0, 0, 1772, 394, 1, 0, 0, 0, 1773, 1774, 7, 10, 0, 0, 1774, 396, 1, 0, 0, 0, 1775, 1776, 7, 11, 0, 0, 1776, 398, 1, 0, 0, 0, 1777, 1778, 7, 12, 0, 0, 1778, 400, 1, 0, 0, 0, 1779, 1780, 7, 13, 0, 0, 1780, 402, 1, 0, 0, 0, 1781, 1782, 7, 14, 0, 0, 1782, 404, 1, 0, 0, 0, 1783, 1784, 7, 15, 0, 0, 1784, 406, 1, 0, 0, 0, 1785, 1786, 7, 16, 0, 0, 1786, 408, 1, 0, 0, 0, 1787, 1788, 7, 17, 0, 0, 1788, 410, 1, 0, 0, 0, 1789, 1790, 7, 18, 0, 0, 1790, 412, 1, 0, 0, 0, 1791, 1792, 7, 19, 0, 0, 1792, 414, 1, 0, 0, 0, 1793, 1794, 7, 20, 0, 0, 1794, 416, 1, 0, 0, 0, 1795, 1796, 7, 21, 0, 0, 1796, 418, 1, 0, 0, 0, 1797, 1798, 7, 22, 0, 0, 1798, 420, 1, 0, 0, 0, 1799, 1800, 7, 23, 0, 0, 1800, 422, 1, 0, 0, 0, 1801, 1802, 7, 24, 0, 0, 1802, 424, 1, 0, 0, 0, 1803, 1804, 7, 25, 0, 0, 1804, 426, 1, 0, 0, 0, 1805, 1806, 7, 26, 0, 0, 1806, 428, 1, 0, 0, 0, 1807, 1808, 7, 27, 0, 0, 1808, 430, 1, 0, 0, 0, 1809, 1810, 7, 28, 0, 0, 1810, 432, 1, 0, 0, 0, 1811, 1812, 7, 29, 0, 0, 1812, 434, 1, 0, 0, 0, 1813, 1814, 7, 30, 0, 0, 1814, 436, 1, 0, 0, 0, 1815, 1816, 7, 31, 0, 0, 1816, 438, 1, 0, 0, 0, 1817, 1818, 7, 32, 0, 0, 1818, 440, 1, 0, 0, 0, 1819, 1820, 7, 33, 0, 0, 1820, 442, 1, 0, 0, 0, 1821, 1822, 7, 34, 0, 0, 1822, 444, 1, 0, 0, 0, 1823, 1824, 7, 35, 0, 0, 1824, 446, 1, 0, 0, 0, 1825, 1826, 7, 36, 0, 0, 1826, 448, 1, 0, 0, 0, 1827, 1828, 7, 37, 0, 0, 1828, 450, 1, 0, 0, 0, 25, 0, 1635, 1637, 1645, 1647, 1655, 1663, 1666, 1671, 1677, 1680, 1686, 1688, 1692, 1697, 1699, 1707, 1709, 1715, 1725, 1727, 1741, 1745, 1749, 1759, 1, 0, 1, 0] \ No newline at end of file diff --git a/internal/engine/sqlite/parser/SQLiteLexer.tokens b/internal/engine/sqlite/parser/SQLiteLexer.tokens deleted file mode 100644 index 6777c57bdc..0000000000 --- a/internal/engine/sqlite/parser/SQLiteLexer.tokens +++ /dev/null @@ -1,223 +0,0 @@ -SCOL=1 -DOT=2 -OPEN_PAR=3 -CLOSE_PAR=4 -COMMA=5 -ASSIGN=6 -STAR=7 -PLUS=8 -PTR2=9 -PTR=10 -MINUS=11 -TILDE=12 -PIPE2=13 -DIV=14 -MOD=15 -LT2=16 -GT2=17 -AMP=18 -PIPE=19 -LT=20 -LT_EQ=21 -GT=22 -GT_EQ=23 -EQ=24 -NOT_EQ1=25 -NOT_EQ2=26 -ABORT_=27 -ACTION_=28 -ADD_=29 -AFTER_=30 -ALL_=31 -ALTER_=32 -ANALYZE_=33 -AND_=34 -AS_=35 -ASC_=36 -ATTACH_=37 -AUTOINCREMENT_=38 -BEFORE_=39 -BEGIN_=40 -BETWEEN_=41 -BY_=42 -CASCADE_=43 -CASE_=44 -CAST_=45 -CHECK_=46 -COLLATE_=47 -COLUMN_=48 -COMMIT_=49 -CONFLICT_=50 -CONSTRAINT_=51 -CREATE_=52 -CROSS_=53 -CURRENT_DATE_=54 -CURRENT_TIME_=55 -CURRENT_TIMESTAMP_=56 -DATABASE_=57 -DEFAULT_=58 -DEFERRABLE_=59 -DEFERRED_=60 -DELETE_=61 -DESC_=62 -DETACH_=63 -DISTINCT_=64 -DROP_=65 -EACH_=66 -ELSE_=67 -END_=68 -ESCAPE_=69 -EXCEPT_=70 -EXCLUSIVE_=71 -EXISTS_=72 -EXPLAIN_=73 -FAIL_=74 -FOR_=75 -FOREIGN_=76 -FROM_=77 -FULL_=78 -GLOB_=79 -GROUP_=80 -HAVING_=81 -IF_=82 -IGNORE_=83 -IMMEDIATE_=84 -IN_=85 -INDEX_=86 -INDEXED_=87 -INITIALLY_=88 -INNER_=89 -INSERT_=90 -INSTEAD_=91 -INTERSECT_=92 -INTO_=93 -IS_=94 -ISNULL_=95 -JOIN_=96 -KEY_=97 -LEFT_=98 -LIKE_=99 -LIMIT_=100 -MATCH_=101 -NATURAL_=102 -NO_=103 -NOT_=104 -NOTNULL_=105 -NULL_=106 -OF_=107 -OFFSET_=108 -ON_=109 -OR_=110 -ORDER_=111 -OUTER_=112 -PLAN_=113 -PRAGMA_=114 -PRIMARY_=115 -QUERY_=116 -RAISE_=117 -RECURSIVE_=118 -REFERENCES_=119 -REGEXP_=120 -REINDEX_=121 -RELEASE_=122 -RENAME_=123 -REPLACE_=124 -RESTRICT_=125 -RETURNING_=126 -RIGHT_=127 -ROLLBACK_=128 -ROW_=129 -ROWS_=130 -SAVEPOINT_=131 -SELECT_=132 -SET_=133 -STRICT_=134 -TABLE_=135 -TEMP_=136 -TEMPORARY_=137 -THEN_=138 -TO_=139 -TRANSACTION_=140 -TRIGGER_=141 -UNION_=142 -UNIQUE_=143 -UPDATE_=144 -USING_=145 -VACUUM_=146 -VALUES_=147 -VIEW_=148 -VIRTUAL_=149 -WHEN_=150 -WHERE_=151 -WITH_=152 -WITHOUT_=153 -FIRST_VALUE_=154 -OVER_=155 -PARTITION_=156 -RANGE_=157 -PRECEDING_=158 -UNBOUNDED_=159 -CURRENT_=160 -FOLLOWING_=161 -CUME_DIST_=162 -DENSE_RANK_=163 -LAG_=164 -LAST_VALUE_=165 -LEAD_=166 -NTH_VALUE_=167 -NTILE_=168 -PERCENT_RANK_=169 -RANK_=170 -ROW_NUMBER_=171 -GENERATED_=172 -ALWAYS_=173 -STORED_=174 -TRUE_=175 -FALSE_=176 -WINDOW_=177 -NULLS_=178 -FIRST_=179 -LAST_=180 -FILTER_=181 -GROUPS_=182 -EXCLUDE_=183 -TIES_=184 -OTHERS_=185 -DO_=186 -NOTHING_=187 -IDENTIFIER=188 -NUMERIC_LITERAL=189 -NUMBERED_BIND_PARAMETER=190 -NAMED_BIND_PARAMETER=191 -STRING_LITERAL=192 -BLOB_LITERAL=193 -SINGLE_LINE_COMMENT=194 -MULTILINE_COMMENT=195 -SPACES=196 -UNEXPECTED_CHAR=197 -';'=1 -'.'=2 -'('=3 -')'=4 -','=5 -'='=6 -'*'=7 -'+'=8 -'->>'=9 -'->'=10 -'-'=11 -'~'=12 -'||'=13 -'/'=14 -'%'=15 -'<<'=16 -'>>'=17 -'&'=18 -'|'=19 -'<'=20 -'<='=21 -'>'=22 -'>='=23 -'=='=24 -'!='=25 -'<>'=26 diff --git a/internal/engine/sqlite/parser/SQLiteParser.g4 b/internal/engine/sqlite/parser/SQLiteParser.g4 deleted file mode 100644 index 14ca873687..0000000000 --- a/internal/engine/sqlite/parser/SQLiteParser.g4 +++ /dev/null @@ -1,924 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2014 by Bart Kiers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and - * associated documentation files (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, publish, distribute, - * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or - * substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT - * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Project : sqlite-parser; an ANTLR4 grammar for SQLite https://github.com/bkiers/sqlite-parser - * Developed by: - * Bart Kiers, bart@big-o.nl - * Martin Mirchev, marti_2203@abv.bg - * Mike Lische, mike@lischke-online.de - */ - -// $antlr-format alignTrailingComments on, columnLimit 130, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments off -// $antlr-format useTab off, allowShortRulesOnASingleLine off, allowShortBlocksOnASingleLine on, alignSemicolons ownLine - -parser grammar SQLiteParser; - -options { - tokenVocab = SQLiteLexer; -} - -parse: (sql_stmt_list)* EOF -; - -sql_stmt_list: - SCOL* sql_stmt (SCOL+ sql_stmt)* SCOL* -; - -sql_stmt: (EXPLAIN_ (QUERY_ PLAN_)?)? ( - alter_table_stmt - | analyze_stmt - | attach_stmt - | begin_stmt - | commit_stmt - | create_index_stmt - | create_table_stmt - | create_trigger_stmt - | create_view_stmt - | create_virtual_table_stmt - | delete_stmt - | delete_stmt_limited - | detach_stmt - | drop_stmt - | insert_stmt - | pragma_stmt - | reindex_stmt - | release_stmt - | rollback_stmt - | savepoint_stmt - | select_stmt - | update_stmt - | update_stmt_limited - | vacuum_stmt - ) -; - -alter_table_stmt: - ALTER_ TABLE_ (schema_name DOT)? table_name ( - RENAME_ ( - TO_ new_table_name - | COLUMN_? old_column_name = column_name TO_ new_column_name = column_name - ) - | ADD_ COLUMN_? column_def - | DROP_ COLUMN_? column_name - ) -; - -analyze_stmt: - ANALYZE_ (schema_name | (schema_name DOT)? table_or_index_name)? -; - -attach_stmt: - ATTACH_ DATABASE_? expr AS_ schema_name -; - -begin_stmt: - BEGIN_ (DEFERRED_ | IMMEDIATE_ | EXCLUSIVE_)? ( - TRANSACTION_ transaction_name? - )? -; - -commit_stmt: (COMMIT_ | END_) TRANSACTION_? -; - -rollback_stmt: - ROLLBACK_ TRANSACTION_? (TO_ SAVEPOINT_? savepoint_name)? -; - -savepoint_stmt: - SAVEPOINT_ savepoint_name -; - -release_stmt: - RELEASE_ SAVEPOINT_? savepoint_name -; - -create_index_stmt: - CREATE_ UNIQUE_? INDEX_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? index_name ON_ table_name OPEN_PAR - indexed_column (COMMA indexed_column)* CLOSE_PAR (WHERE_ expr)? -; - -indexed_column: (column_name | expr) (COLLATE_ collation_name)? asc_desc? -; - -table_option: - WITHOUT_ row_ROW_ID = IDENTIFIER - | STRICT_ -; - -create_table_stmt: - CREATE_ (TEMP_ | TEMPORARY_)? TABLE_ (IF_ NOT_ EXISTS_)? ( - schema_name DOT - )? table_name ( - OPEN_PAR column_def (COMMA column_def)*? (COMMA table_constraint)* CLOSE_PAR ( - table_option (COMMA table_option)* - )? - | AS_ select_stmt - ) -; - -column_def: - column_name type_name? column_constraint* -; - -type_name: - name+? ( - OPEN_PAR signed_number CLOSE_PAR - | OPEN_PAR signed_number COMMA signed_number CLOSE_PAR - )? -; - -column_constraint: (CONSTRAINT_ name)? ( - (PRIMARY_ KEY_ asc_desc? conflict_clause? AUTOINCREMENT_?) - | (NOT_ NULL_ | UNIQUE_) conflict_clause? - | CHECK_ OPEN_PAR expr CLOSE_PAR - | DEFAULT_ (signed_number | literal_value | OPEN_PAR expr CLOSE_PAR) - | COLLATE_ collation_name - | foreign_key_clause - | (GENERATED_ ALWAYS_)? AS_ OPEN_PAR expr CLOSE_PAR ( - STORED_ - | VIRTUAL_ - )? - ) -; - -signed_number: (PLUS | MINUS)? NUMERIC_LITERAL -; - -table_constraint: (CONSTRAINT_ name)? ( - (PRIMARY_ KEY_ | UNIQUE_) OPEN_PAR indexed_column ( - COMMA indexed_column - )* CLOSE_PAR conflict_clause? - | CHECK_ OPEN_PAR expr CLOSE_PAR - | FOREIGN_ KEY_ OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR foreign_key_clause - ) -; - -foreign_key_clause: - REFERENCES_ foreign_table ( - OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR - )? ( - ON_ (DELETE_ | UPDATE_) ( - SET_ (NULL_ | DEFAULT_) - | CASCADE_ - | RESTRICT_ - | NO_ ACTION_ - ) - | MATCH_ name - )* (NOT_? DEFERRABLE_ (INITIALLY_ (DEFERRED_ | IMMEDIATE_))?)? -; - -conflict_clause: - ON_ CONFLICT_ ( - ROLLBACK_ - | ABORT_ - | FAIL_ - | IGNORE_ - | REPLACE_ - ) -; - -create_trigger_stmt: - CREATE_ (TEMP_ | TEMPORARY_)? TRIGGER_ (IF_ NOT_ EXISTS_)? ( - schema_name DOT - )? trigger_name (BEFORE_ | AFTER_ | INSTEAD_ OF_)? ( - DELETE_ - | INSERT_ - | UPDATE_ (OF_ column_name ( COMMA column_name)*)? - ) ON_ table_name (FOR_ EACH_ ROW_)? (WHEN_ expr)? BEGIN_ ( - (update_stmt | insert_stmt | delete_stmt | select_stmt) SCOL - )+ END_ -; - -create_view_stmt: - CREATE_ (TEMP_ | TEMPORARY_)? VIEW_ (IF_ NOT_ EXISTS_)? ( - schema_name DOT - )? view_name (OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR)? AS_ select_stmt -; - -create_virtual_table_stmt: - CREATE_ VIRTUAL_ TABLE_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? table_name USING_ module_name ( - OPEN_PAR module_argument (COMMA module_argument)* CLOSE_PAR - )? -; - -with_clause: - WITH_ RECURSIVE_? cte_table_name AS_ OPEN_PAR select_stmt CLOSE_PAR ( - COMMA cte_table_name AS_ OPEN_PAR select_stmt CLOSE_PAR - )* -; - -cte_table_name: - table_name (OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? -; - -recursive_cte: - cte_table_name AS_ OPEN_PAR initial_select UNION_ ALL_? recursive__select CLOSE_PAR -; - -common_table_expression: - table_name (OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? AS_ OPEN_PAR select_stmt CLOSE_PAR -; - -returning_clause: - RETURNING_ ( - (STAR | expr ( AS_? column_alias)?) ( - COMMA (STAR | expr ( AS_? column_alias)?) - )* - ) -; - -delete_stmt: - with_clause? DELETE_ FROM_ qualified_table_name (WHERE_ expr)? returning_clause? -; - -delete_stmt_limited: - with_clause? DELETE_ FROM_ qualified_table_name (WHERE_ expr)? ( - order_by_stmt? limit_stmt - )? returning_clause? -; - -detach_stmt: - DETACH_ DATABASE_? schema_name -; - -drop_stmt: - DROP_ object = (INDEX_ | TABLE_ | TRIGGER_ | VIEW_) ( - IF_ EXISTS_ - )? (schema_name DOT)? any_name -; - -/* - SQLite understands the following binary operators, in order from highest to lowest precedence: - || - * / % - + - - << >> & | - < <= > >= - = == != <> IS IS NOT IN LIKE GLOB MATCH REGEXP - AND - OR - */ -expr: - literal_value #expr_literal - | NUMBERED_BIND_PARAMETER #expr_bind - | NAMED_BIND_PARAMETER #expr_bind - | ((schema_name DOT)? table_name DOT)? column_name #expr_qualified_column_name - | unary_operator expr #expr_unary - | expr PIPE2 expr #expr_binary - | expr ( PTR | PTR2 ) expr #expr_binary - | expr ( STAR | DIV | MOD) expr #expr_binary - | expr ( PLUS | MINUS) expr #expr_binary - | expr ( LT2 | GT2 | AMP | PIPE) expr #expr_comparison - | expr ( LT | LT_EQ | GT | GT_EQ) expr #expr_comparison - | expr ( - ASSIGN - | EQ - | NOT_EQ1 - | NOT_EQ2 - | IS_ - | IS_ NOT_ - | NOT_? IN_ - | LIKE_ - | GLOB_ - | MATCH_ - | REGEXP_ - ) expr #expr_comparison - | expr NOT_? IN_ ( - OPEN_PAR (select_stmt | expr ( COMMA expr)*)? CLOSE_PAR - | ( schema_name DOT)? table_name - | (schema_name DOT)? table_function_name OPEN_PAR (expr (COMMA expr)*)? CLOSE_PAR - ) #expr_in_select - | expr AND_ expr #expr_bool - | expr OR_ expr #expr_bool - | qualified_function_name OPEN_PAR ((DISTINCT_? expr ( COMMA expr)*) | STAR)? CLOSE_PAR filter_clause? over_clause? #expr_function - | OPEN_PAR expr (COMMA expr)* CLOSE_PAR #expr_list - | CAST_ OPEN_PAR expr AS_ type_name CLOSE_PAR #expr_cast - | expr COLLATE_ collation_name #expr_collate - | expr NOT_? (LIKE_ | GLOB_ | REGEXP_ | MATCH_) expr ( - ESCAPE_ expr - )? #expr_comparison - | expr ( ISNULL_ | NOTNULL_ | NOT_ NULL_) #expr_null_comp - | expr NOT_? BETWEEN_ expr AND_ expr #expr_between - | ((NOT_)? EXISTS_)? OPEN_PAR select_stmt CLOSE_PAR #expr_in_select - | CASE_ expr? (WHEN_ expr THEN_ expr)+ (ELSE_ expr)? END_ #expr_case - | raise_function #expr_raise -; - -raise_function: - RAISE_ OPEN_PAR ( - IGNORE_ - | (ROLLBACK_ | ABORT_ | FAIL_) COMMA error_message - ) CLOSE_PAR -; - -literal_value: - NUMERIC_LITERAL - | STRING_LITERAL - | BLOB_LITERAL - | NULL_ - | TRUE_ - | FALSE_ - | CURRENT_TIME_ - | CURRENT_DATE_ - | CURRENT_TIMESTAMP_ -; - -insert_stmt: - with_clause? ( - INSERT_ - | REPLACE_ - | INSERT_ OR_ ( - REPLACE_ - | ROLLBACK_ - | ABORT_ - | FAIL_ - | IGNORE_ - ) - ) INTO_ (schema_name DOT)? table_name (AS_ table_alias)? ( - OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR - )? ( - ( - VALUES_ OPEN_PAR expr (COMMA expr)* CLOSE_PAR ( - COMMA OPEN_PAR expr ( COMMA expr)* CLOSE_PAR - )* - | select_stmt - | DEFAULT_ VALUES_ - ) upsert_clause? returning_clause? - ) -; - -upsert_clause: - ON_ CONFLICT_ ( - OPEN_PAR indexed_column (COMMA indexed_column)* CLOSE_PAR (WHERE_ expr)? - )? DO_ ( - NOTHING_ - | UPDATE_ SET_ ( - (column_name | column_name_list) ASSIGN expr ( - COMMA (column_name | column_name_list) ASSIGN expr - )* (WHERE_ expr)? - ) - ) -; - -pragma_stmt: - PRAGMA_ (schema_name DOT)? pragma_name ( - ASSIGN pragma_value - | OPEN_PAR pragma_value CLOSE_PAR - )? -; - -pragma_value: - signed_number - | name - | STRING_LITERAL -; - -reindex_stmt: - REINDEX_ (collation_name | (schema_name DOT)? (table_name | index_name))? -; - -select_stmt: - common_table_stmt? select_core (compound_operator select_core)* order_by_stmt? limit_stmt? -; - -join_clause: - table_or_subquery (join_operator table_or_subquery join_constraint)* -; - -select_core: - ( - SELECT_ (DISTINCT_ | ALL_)? result_column (COMMA result_column)* ( - FROM_ (table_or_subquery (COMMA table_or_subquery)* | join_clause) - )? (WHERE_ expr)? (GROUP_ BY_ expr (COMMA expr)* (HAVING_ expr)?)? ( - WINDOW_ window_name AS_ window_defn ( - COMMA window_name AS_ window_defn - )* - )? - ) - | VALUES_ OPEN_PAR expr (COMMA expr)* CLOSE_PAR ( - COMMA OPEN_PAR expr ( COMMA expr)* CLOSE_PAR - )* -; - -factored_select_stmt: - select_stmt -; - -simple_select_stmt: - common_table_stmt? select_core order_by_stmt? limit_stmt? -; - -compound_select_stmt: - common_table_stmt? select_core ( - (UNION_ ALL_? | INTERSECT_ | EXCEPT_) select_core - )+ order_by_stmt? limit_stmt? -; - -table_or_subquery: - (schema_name DOT)? table_name (AS_? table_alias)? (INDEXED_ BY_ index_name | NOT_ INDEXED_)? - | (schema_name DOT)? table_function_name OPEN_PAR expr (COMMA expr)* CLOSE_PAR (AS_? table_alias)? - | OPEN_PAR (table_or_subquery (COMMA table_or_subquery)* | join_clause) CLOSE_PAR - | OPEN_PAR select_stmt CLOSE_PAR (AS_? table_alias)? - | (schema_name DOT)? table_name (AS_? table_alias_fallback)? (INDEXED_ BY_ index_name | NOT_ INDEXED_)? - | (schema_name DOT)? table_function_name OPEN_PAR expr (COMMA expr)* CLOSE_PAR (AS_? table_alias_fallback)? - | OPEN_PAR (table_or_subquery (COMMA table_or_subquery)* | join_clause) CLOSE_PAR - | OPEN_PAR select_stmt CLOSE_PAR (AS_? table_alias_fallback)? -; - -result_column: - STAR - | table_name DOT STAR - | expr ( AS_? column_alias)? -; - -join_operator: - COMMA - | NATURAL_? (((LEFT_ | RIGHT_ | FULL_) OUTER_?) | INNER_)? JOIN_ - | CROSS_ JOIN_ -; - -join_constraint: - (ON_ expr - | USING_ OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? -; - -compound_operator: - UNION_ ALL_? - | INTERSECT_ - | EXCEPT_ -; - -update_stmt: - with_clause? UPDATE_ ( - OR_ (ROLLBACK_ | ABORT_ | REPLACE_ | FAIL_ | IGNORE_) - )? qualified_table_name SET_ (column_name | column_name_list) ASSIGN expr ( - COMMA (column_name | column_name_list) ASSIGN expr - )* (WHERE_ expr)? returning_clause? -; - -column_name_list: - OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR -; - -update_stmt_limited: - with_clause? UPDATE_ ( - OR_ (ROLLBACK_ | ABORT_ | REPLACE_ | FAIL_ | IGNORE_) - )? qualified_table_name SET_ (column_name | column_name_list) ASSIGN expr ( - COMMA (column_name | column_name_list) ASSIGN expr - )* (WHERE_ expr)? (order_by_stmt? limit_stmt)? -; - -qualified_table_name: (schema_name DOT)? table_name (AS_ alias)? ( - INDEXED_ BY_ index_name - | NOT_ INDEXED_ - )? -; - -vacuum_stmt: - VACUUM_ schema_name? (INTO_ filename)? -; - -filter_clause: - FILTER_ OPEN_PAR WHERE_ expr CLOSE_PAR -; - -window_defn: - OPEN_PAR base_window_name? (PARTITION_ BY_ expr (COMMA expr)*)? ( - ORDER_ BY_ ordering_term (COMMA ordering_term)* - ) frame_spec? CLOSE_PAR -; - -over_clause: - OVER_ ( - window_name - | OPEN_PAR base_window_name? (PARTITION_ BY_ expr (COMMA expr)*)? ( - ORDER_ BY_ ordering_term (COMMA ordering_term)* - )? frame_spec? CLOSE_PAR - ) -; - -frame_spec: - frame_clause ( - EXCLUDE_ (NO_ OTHERS_) - | CURRENT_ ROW_ - | GROUP_ - | TIES_ - )? -; - -frame_clause: (RANGE_ | ROWS_ | GROUPS_) ( - frame_single - | BETWEEN_ frame_left AND_ frame_right - ) -; - -simple_function_invocation: - simple_func OPEN_PAR (expr (COMMA expr)* | STAR) CLOSE_PAR -; - -aggregate_function_invocation: - aggregate_func OPEN_PAR (DISTINCT_? expr (COMMA expr)* | STAR)? CLOSE_PAR filter_clause? -; - -window_function_invocation: - window_function OPEN_PAR (expr (COMMA expr)* | STAR)? CLOSE_PAR filter_clause? OVER_ ( - window_defn - | window_name - ) -; - -common_table_stmt: //additional structures - WITH_ RECURSIVE_? common_table_expression (COMMA common_table_expression)* -; - -order_by_stmt: - ORDER_ BY_ ordering_term (COMMA ordering_term)* -; - -limit_stmt: - LIMIT_ expr ((OFFSET_ | COMMA) expr)? -; - -ordering_term: - expr (COLLATE_ collation_name)? asc_desc? (NULLS_ (FIRST_ | LAST_))? -; - -asc_desc: - ASC_ - | DESC_ -; - -frame_left: - expr PRECEDING_ - | expr FOLLOWING_ - | CURRENT_ ROW_ - | UNBOUNDED_ PRECEDING_ -; - -frame_right: - expr PRECEDING_ - | expr FOLLOWING_ - | CURRENT_ ROW_ - | UNBOUNDED_ FOLLOWING_ -; - -frame_single: - expr PRECEDING_ - | UNBOUNDED_ PRECEDING_ - | CURRENT_ ROW_ -; - -// unknown - -window_function: - (FIRST_VALUE_ | LAST_VALUE_) OPEN_PAR expr CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc frame_clause - ? CLOSE_PAR - | (CUME_DIST_ | PERCENT_RANK_) OPEN_PAR CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr? CLOSE_PAR - | (DENSE_RANK_ | RANK_ | ROW_NUMBER_) OPEN_PAR CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc - CLOSE_PAR - | (LAG_ | LEAD_) OPEN_PAR expr of_OF_fset? default_DEFAULT__value? CLOSE_PAR OVER_ OPEN_PAR partition_by? - order_by_expr_asc_desc CLOSE_PAR - | NTH_VALUE_ OPEN_PAR expr COMMA signed_number CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc - frame_clause? CLOSE_PAR - | NTILE_ OPEN_PAR expr CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc CLOSE_PAR -; - -of_OF_fset: - COMMA signed_number -; - -default_DEFAULT__value: - COMMA signed_number -; - -partition_by: - PARTITION_ BY_ expr+ -; - -order_by_expr: - ORDER_ BY_ expr+ -; - -order_by_expr_asc_desc: - ORDER_ BY_ order_by_expr_asc_desc -; - -expr_asc_desc: - expr asc_desc? (COMMA expr asc_desc?)* -; - -//TODO BOTH OF THESE HAVE TO BE REWORKED TO FOLLOW THE SPEC -initial_select: - select_stmt -; - -recursive__select: - select_stmt -; - -unary_operator: - MINUS - | PLUS - | TILDE - | NOT_ -; - -error_message: - STRING_LITERAL -; - -module_argument: // TODO check what exactly is permitted here - expr - | column_def -; - -column_alias: - IDENTIFIER - | STRING_LITERAL -; - -keyword: - ABORT_ - | ACTION_ - | ADD_ - | AFTER_ - | ALL_ - | ALTER_ - | ANALYZE_ - | AND_ - | AS_ - | ASC_ - | ATTACH_ - | AUTOINCREMENT_ - | BEFORE_ - | BEGIN_ - | BETWEEN_ - | BY_ - | CASCADE_ - | CASE_ - | CAST_ - | CHECK_ - | COLLATE_ - | COLUMN_ - | COMMIT_ - | CONFLICT_ - | CONSTRAINT_ - | CREATE_ - | CROSS_ - | CURRENT_DATE_ - | CURRENT_TIME_ - | CURRENT_TIMESTAMP_ - | DATABASE_ - | DEFAULT_ - | DEFERRABLE_ - | DEFERRED_ - | DELETE_ - | DESC_ - | DETACH_ - | DISTINCT_ - | DROP_ - | EACH_ - | ELSE_ - | END_ - | ESCAPE_ - | EXCEPT_ - | EXCLUSIVE_ - | EXISTS_ - | EXPLAIN_ - | FAIL_ - | FOR_ - | FOREIGN_ - | FROM_ - | FULL_ - | GLOB_ - | GROUP_ - | HAVING_ - | IF_ - | IGNORE_ - | IMMEDIATE_ - | IN_ - | INDEX_ - | INDEXED_ - | INITIALLY_ - | INNER_ - | INSERT_ - | INSTEAD_ - | INTERSECT_ - | INTO_ - | IS_ - | ISNULL_ - | JOIN_ - | KEY_ - | LEFT_ - | LIKE_ - | LIMIT_ - | MATCH_ - | NATURAL_ - | NO_ - | NOT_ - | NOTNULL_ - | NULL_ - | OF_ - | OFFSET_ - | ON_ - | OR_ - | ORDER_ - | OUTER_ - | PLAN_ - | PRAGMA_ - | PRIMARY_ - | QUERY_ - | RAISE_ - | RECURSIVE_ - | REFERENCES_ - | REGEXP_ - | REINDEX_ - | RELEASE_ - | RENAME_ - | REPLACE_ - | RESTRICT_ - | RETURNING_ - | RIGHT_ - | ROLLBACK_ - | ROW_ - | ROWS_ - | SAVEPOINT_ - | SELECT_ - | SET_ - | STRICT_ - | TABLE_ - | TEMP_ - | TEMPORARY_ - | THEN_ - | TO_ - | TRANSACTION_ - | TRIGGER_ - | UNION_ - | UNIQUE_ - | UPDATE_ - | USING_ - | VACUUM_ - | VALUES_ - | VIEW_ - | VIRTUAL_ - | WHEN_ - | WHERE_ - | WITH_ - | WITHOUT_ - | FIRST_VALUE_ - | OVER_ - | PARTITION_ - | RANGE_ - | PRECEDING_ - | UNBOUNDED_ - | CURRENT_ - | FOLLOWING_ - | CUME_DIST_ - | DENSE_RANK_ - | LAG_ - | LAST_VALUE_ - | LEAD_ - | NTH_VALUE_ - | NTILE_ - | PERCENT_RANK_ - | RANK_ - | ROW_NUMBER_ - | GENERATED_ - | ALWAYS_ - | STORED_ - | TRUE_ - | FALSE_ - | WINDOW_ - | NULLS_ - | FIRST_ - | LAST_ - | FILTER_ - | GROUPS_ - | EXCLUDE_ -; - -// TODO: check all names below - -name: - any_name -; - -function_name: - any_name -; - -qualified_function_name: - (schema_name DOT)? function_name -; - -schema_name: - any_name -; - -table_name: - any_name -; - -table_or_index_name: - any_name -; - -new_table_name: - any_name -; - -column_name: - any_name -; - -collation_name: - any_name -; - -foreign_table: - any_name -; - -index_name: - any_name -; - -trigger_name: - any_name -; - -view_name: - any_name -; - -module_name: - any_name -; - -pragma_name: - any_name -; - -savepoint_name: - any_name -; - -table_alias: IDENTIFIER | STRING_LITERAL; - -table_alias_fallback: any_name; - -transaction_name: - any_name -; - -window_name: - any_name -; - -alias: - any_name -; - -filename: - any_name -; - -base_window_name: - any_name -; - -simple_func: - any_name -; - -aggregate_func: - any_name -; - -table_function_name: - any_name -; - -any_name: - IDENTIFIER - | keyword - | STRING_LITERAL - | OPEN_PAR any_name CLOSE_PAR -; diff --git a/internal/engine/sqlite/parser/SQLiteParser.interp b/internal/engine/sqlite/parser/SQLiteParser.interp deleted file mode 100644 index 7a268aa1a8..0000000000 --- a/internal/engine/sqlite/parser/SQLiteParser.interp +++ /dev/null @@ -1,520 +0,0 @@ -token literal names: -null -';' -'.' -'(' -')' -',' -'=' -'*' -'+' -'->>' -'->' -'-' -'~' -'||' -'/' -'%' -'<<' -'>>' -'&' -'|' -'<' -'<=' -'>' -'>=' -'==' -'!=' -'<>' -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null -null - -token symbolic names: -null -SCOL -DOT -OPEN_PAR -CLOSE_PAR -COMMA -ASSIGN -STAR -PLUS -PTR2 -PTR -MINUS -TILDE -PIPE2 -DIV -MOD -LT2 -GT2 -AMP -PIPE -LT -LT_EQ -GT -GT_EQ -EQ -NOT_EQ1 -NOT_EQ2 -ABORT_ -ACTION_ -ADD_ -AFTER_ -ALL_ -ALTER_ -ANALYZE_ -AND_ -AS_ -ASC_ -ATTACH_ -AUTOINCREMENT_ -BEFORE_ -BEGIN_ -BETWEEN_ -BY_ -CASCADE_ -CASE_ -CAST_ -CHECK_ -COLLATE_ -COLUMN_ -COMMIT_ -CONFLICT_ -CONSTRAINT_ -CREATE_ -CROSS_ -CURRENT_DATE_ -CURRENT_TIME_ -CURRENT_TIMESTAMP_ -DATABASE_ -DEFAULT_ -DEFERRABLE_ -DEFERRED_ -DELETE_ -DESC_ -DETACH_ -DISTINCT_ -DROP_ -EACH_ -ELSE_ -END_ -ESCAPE_ -EXCEPT_ -EXCLUSIVE_ -EXISTS_ -EXPLAIN_ -FAIL_ -FOR_ -FOREIGN_ -FROM_ -FULL_ -GLOB_ -GROUP_ -HAVING_ -IF_ -IGNORE_ -IMMEDIATE_ -IN_ -INDEX_ -INDEXED_ -INITIALLY_ -INNER_ -INSERT_ -INSTEAD_ -INTERSECT_ -INTO_ -IS_ -ISNULL_ -JOIN_ -KEY_ -LEFT_ -LIKE_ -LIMIT_ -MATCH_ -NATURAL_ -NO_ -NOT_ -NOTNULL_ -NULL_ -OF_ -OFFSET_ -ON_ -OR_ -ORDER_ -OUTER_ -PLAN_ -PRAGMA_ -PRIMARY_ -QUERY_ -RAISE_ -RECURSIVE_ -REFERENCES_ -REGEXP_ -REINDEX_ -RELEASE_ -RENAME_ -REPLACE_ -RESTRICT_ -RETURNING_ -RIGHT_ -ROLLBACK_ -ROW_ -ROWS_ -SAVEPOINT_ -SELECT_ -SET_ -STRICT_ -TABLE_ -TEMP_ -TEMPORARY_ -THEN_ -TO_ -TRANSACTION_ -TRIGGER_ -UNION_ -UNIQUE_ -UPDATE_ -USING_ -VACUUM_ -VALUES_ -VIEW_ -VIRTUAL_ -WHEN_ -WHERE_ -WITH_ -WITHOUT_ -FIRST_VALUE_ -OVER_ -PARTITION_ -RANGE_ -PRECEDING_ -UNBOUNDED_ -CURRENT_ -FOLLOWING_ -CUME_DIST_ -DENSE_RANK_ -LAG_ -LAST_VALUE_ -LEAD_ -NTH_VALUE_ -NTILE_ -PERCENT_RANK_ -RANK_ -ROW_NUMBER_ -GENERATED_ -ALWAYS_ -STORED_ -TRUE_ -FALSE_ -WINDOW_ -NULLS_ -FIRST_ -LAST_ -FILTER_ -GROUPS_ -EXCLUDE_ -TIES_ -OTHERS_ -DO_ -NOTHING_ -IDENTIFIER -NUMERIC_LITERAL -NUMBERED_BIND_PARAMETER -NAMED_BIND_PARAMETER -STRING_LITERAL -BLOB_LITERAL -SINGLE_LINE_COMMENT -MULTILINE_COMMENT -SPACES -UNEXPECTED_CHAR - -rule names: -parse -sql_stmt_list -sql_stmt -alter_table_stmt -analyze_stmt -attach_stmt -begin_stmt -commit_stmt -rollback_stmt -savepoint_stmt -release_stmt -create_index_stmt -indexed_column -table_option -create_table_stmt -column_def -type_name -column_constraint -signed_number -table_constraint -foreign_key_clause -conflict_clause -create_trigger_stmt -create_view_stmt -create_virtual_table_stmt -with_clause -cte_table_name -recursive_cte -common_table_expression -returning_clause -delete_stmt -delete_stmt_limited -detach_stmt -drop_stmt -expr -raise_function -literal_value -insert_stmt -upsert_clause -pragma_stmt -pragma_value -reindex_stmt -select_stmt -join_clause -select_core -factored_select_stmt -simple_select_stmt -compound_select_stmt -table_or_subquery -result_column -join_operator -join_constraint -compound_operator -update_stmt -column_name_list -update_stmt_limited -qualified_table_name -vacuum_stmt -filter_clause -window_defn -over_clause -frame_spec -frame_clause -simple_function_invocation -aggregate_function_invocation -window_function_invocation -common_table_stmt -order_by_stmt -limit_stmt -ordering_term -asc_desc -frame_left -frame_right -frame_single -window_function -of_OF_fset -default_DEFAULT__value -partition_by -order_by_expr -order_by_expr_asc_desc -expr_asc_desc -initial_select -recursive__select -unary_operator -error_message -module_argument -column_alias -keyword -name -function_name -qualified_function_name -schema_name -table_name -table_or_index_name -new_table_name -column_name -collation_name -foreign_table -index_name -trigger_name -view_name -module_name -pragma_name -savepoint_name -table_alias -table_alias_fallback -transaction_name -window_name -alias -filename -base_window_name -simple_func -aggregate_func -table_function_name -any_name - - -atn: -[4, 1, 197, 2176, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 1, 0, 5, 0, 232, 8, 0, 10, 0, 12, 0, 235, 9, 0, 1, 0, 1, 0, 1, 1, 5, 1, 240, 8, 1, 10, 1, 12, 1, 243, 9, 1, 1, 1, 1, 1, 4, 1, 247, 8, 1, 11, 1, 12, 1, 248, 1, 1, 5, 1, 252, 8, 1, 10, 1, 12, 1, 255, 9, 1, 1, 1, 5, 1, 258, 8, 1, 10, 1, 12, 1, 261, 9, 1, 1, 2, 1, 2, 1, 2, 3, 2, 266, 8, 2, 3, 2, 268, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 294, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 301, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 308, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 314, 8, 3, 1, 3, 1, 3, 3, 3, 318, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 323, 8, 3, 1, 3, 3, 3, 326, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 333, 8, 4, 1, 4, 3, 4, 336, 8, 4, 1, 5, 1, 5, 3, 5, 340, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 3, 6, 348, 8, 6, 1, 6, 1, 6, 3, 6, 352, 8, 6, 3, 6, 354, 8, 6, 1, 7, 1, 7, 3, 7, 358, 8, 7, 1, 8, 1, 8, 3, 8, 362, 8, 8, 1, 8, 1, 8, 3, 8, 366, 8, 8, 1, 8, 3, 8, 369, 8, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 376, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 382, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 388, 8, 11, 1, 11, 1, 11, 1, 11, 3, 11, 393, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 402, 8, 11, 10, 11, 12, 11, 405, 9, 11, 1, 11, 1, 11, 1, 11, 3, 11, 410, 8, 11, 1, 12, 1, 12, 3, 12, 414, 8, 12, 1, 12, 1, 12, 3, 12, 418, 8, 12, 1, 12, 3, 12, 421, 8, 12, 1, 13, 1, 13, 1, 13, 3, 13, 426, 8, 13, 1, 14, 1, 14, 3, 14, 430, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 436, 8, 14, 1, 14, 1, 14, 1, 14, 3, 14, 441, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 448, 8, 14, 10, 14, 12, 14, 451, 9, 14, 1, 14, 1, 14, 5, 14, 455, 8, 14, 10, 14, 12, 14, 458, 9, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 464, 8, 14, 10, 14, 12, 14, 467, 9, 14, 3, 14, 469, 8, 14, 1, 14, 1, 14, 3, 14, 473, 8, 14, 1, 15, 1, 15, 3, 15, 477, 8, 15, 1, 15, 5, 15, 480, 8, 15, 10, 15, 12, 15, 483, 9, 15, 1, 16, 4, 16, 486, 8, 16, 11, 16, 12, 16, 487, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 500, 8, 16, 1, 17, 1, 17, 3, 17, 504, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 509, 8, 17, 1, 17, 3, 17, 512, 8, 17, 1, 17, 3, 17, 515, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 520, 8, 17, 1, 17, 3, 17, 523, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 537, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 544, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 551, 8, 17, 3, 17, 553, 8, 17, 1, 18, 3, 18, 556, 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 562, 8, 19, 1, 19, 1, 19, 1, 19, 3, 19, 567, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 573, 8, 19, 10, 19, 12, 19, 576, 9, 19, 1, 19, 1, 19, 3, 19, 580, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 593, 8, 19, 10, 19, 12, 19, 596, 9, 19, 1, 19, 1, 19, 1, 19, 3, 19, 601, 8, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 609, 8, 20, 10, 20, 12, 20, 612, 9, 20, 1, 20, 1, 20, 3, 20, 616, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 626, 8, 20, 1, 20, 1, 20, 5, 20, 630, 8, 20, 10, 20, 12, 20, 633, 9, 20, 1, 20, 3, 20, 636, 8, 20, 1, 20, 1, 20, 1, 20, 3, 20, 641, 8, 20, 3, 20, 643, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 651, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 657, 8, 22, 1, 22, 1, 22, 1, 22, 3, 22, 662, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 669, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 678, 8, 22, 10, 22, 12, 22, 681, 9, 22, 3, 22, 683, 8, 22, 3, 22, 685, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 692, 8, 22, 1, 22, 1, 22, 3, 22, 696, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 703, 8, 22, 1, 22, 1, 22, 4, 22, 707, 8, 22, 11, 22, 12, 22, 708, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 715, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 721, 8, 23, 1, 23, 1, 23, 1, 23, 3, 23, 726, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 733, 8, 23, 10, 23, 12, 23, 736, 9, 23, 1, 23, 1, 23, 3, 23, 740, 8, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 751, 8, 24, 1, 24, 1, 24, 1, 24, 3, 24, 756, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 765, 8, 24, 10, 24, 12, 24, 768, 9, 24, 1, 24, 1, 24, 3, 24, 772, 8, 24, 1, 25, 1, 25, 3, 25, 776, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 790, 8, 25, 10, 25, 12, 25, 793, 9, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 800, 8, 26, 10, 26, 12, 26, 803, 9, 26, 1, 26, 1, 26, 3, 26, 807, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 815, 8, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 825, 8, 28, 10, 28, 12, 28, 828, 9, 28, 1, 28, 1, 28, 3, 28, 832, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 843, 8, 29, 1, 29, 3, 29, 846, 8, 29, 3, 29, 848, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 854, 8, 29, 1, 29, 3, 29, 857, 8, 29, 3, 29, 859, 8, 29, 5, 29, 861, 8, 29, 10, 29, 12, 29, 864, 9, 29, 1, 30, 3, 30, 867, 8, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 874, 8, 30, 1, 30, 3, 30, 877, 8, 30, 1, 31, 3, 31, 880, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 887, 8, 31, 1, 31, 3, 31, 890, 8, 31, 1, 31, 3, 31, 893, 8, 31, 1, 31, 3, 31, 896, 8, 31, 1, 32, 1, 32, 3, 32, 900, 8, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 908, 8, 33, 1, 33, 1, 33, 1, 33, 3, 33, 913, 8, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 924, 8, 34, 1, 34, 1, 34, 1, 34, 3, 34, 929, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 938, 8, 34, 1, 34, 1, 34, 1, 34, 5, 34, 943, 8, 34, 10, 34, 12, 34, 946, 9, 34, 1, 34, 3, 34, 949, 8, 34, 1, 34, 1, 34, 3, 34, 953, 8, 34, 1, 34, 3, 34, 956, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 962, 8, 34, 10, 34, 12, 34, 965, 9, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 977, 8, 34, 1, 34, 3, 34, 980, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 988, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 4, 34, 995, 8, 34, 11, 34, 12, 34, 996, 1, 34, 1, 34, 3, 34, 1001, 8, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1006, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1035, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1042, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1053, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1062, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1070, 8, 34, 10, 34, 12, 34, 1073, 9, 34, 3, 34, 1075, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1081, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1087, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1094, 8, 34, 10, 34, 12, 34, 1097, 9, 34, 3, 34, 1099, 8, 34, 1, 34, 1, 34, 3, 34, 1103, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1110, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1116, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1123, 8, 34, 5, 34, 1125, 8, 34, 10, 34, 12, 34, 1128, 9, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 1136, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 3, 37, 1143, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1150, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1156, 8, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1161, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1167, 8, 37, 10, 37, 12, 37, 1170, 9, 37, 1, 37, 1, 37, 3, 37, 1174, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1181, 8, 37, 10, 37, 12, 37, 1184, 9, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1192, 8, 37, 10, 37, 12, 37, 1195, 9, 37, 1, 37, 1, 37, 5, 37, 1199, 8, 37, 10, 37, 12, 37, 1202, 9, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1207, 8, 37, 1, 37, 3, 37, 1210, 8, 37, 1, 37, 3, 37, 1213, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1221, 8, 38, 10, 38, 12, 38, 1224, 9, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1229, 8, 38, 3, 38, 1231, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1239, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1246, 8, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1251, 8, 38, 10, 38, 12, 38, 1254, 9, 38, 1, 38, 1, 38, 3, 38, 1258, 8, 38, 3, 38, 1260, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1266, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1275, 8, 39, 1, 40, 1, 40, 1, 40, 3, 40, 1280, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1287, 8, 41, 1, 41, 1, 41, 3, 41, 1291, 8, 41, 3, 41, 1293, 8, 41, 1, 42, 3, 42, 1296, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 1302, 8, 42, 10, 42, 12, 42, 1305, 9, 42, 1, 42, 3, 42, 1308, 8, 42, 1, 42, 3, 42, 1311, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1318, 8, 43, 10, 43, 12, 43, 1321, 9, 43, 1, 44, 1, 44, 3, 44, 1325, 8, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1330, 8, 44, 10, 44, 12, 44, 1333, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1339, 8, 44, 10, 44, 12, 44, 1342, 9, 44, 1, 44, 3, 44, 1345, 8, 44, 3, 44, 1347, 8, 44, 1, 44, 1, 44, 3, 44, 1351, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1358, 8, 44, 10, 44, 12, 44, 1361, 9, 44, 1, 44, 1, 44, 3, 44, 1365, 8, 44, 3, 44, 1367, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1378, 8, 44, 10, 44, 12, 44, 1381, 9, 44, 3, 44, 1383, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1390, 8, 44, 10, 44, 12, 44, 1393, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1401, 8, 44, 10, 44, 12, 44, 1404, 9, 44, 1, 44, 1, 44, 5, 44, 1408, 8, 44, 10, 44, 12, 44, 1411, 9, 44, 3, 44, 1413, 8, 44, 1, 45, 1, 45, 1, 46, 3, 46, 1418, 8, 46, 1, 46, 1, 46, 3, 46, 1422, 8, 46, 1, 46, 3, 46, 1425, 8, 46, 1, 47, 3, 47, 1428, 8, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1433, 8, 47, 1, 47, 1, 47, 3, 47, 1437, 8, 47, 1, 47, 4, 47, 1440, 8, 47, 11, 47, 12, 47, 1441, 1, 47, 3, 47, 1445, 8, 47, 1, 47, 3, 47, 1448, 8, 47, 1, 48, 1, 48, 1, 48, 3, 48, 1453, 8, 48, 1, 48, 1, 48, 3, 48, 1457, 8, 48, 1, 48, 3, 48, 1460, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1467, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1472, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1479, 8, 48, 10, 48, 12, 48, 1482, 9, 48, 1, 48, 1, 48, 3, 48, 1486, 8, 48, 1, 48, 3, 48, 1489, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1495, 8, 48, 10, 48, 12, 48, 1498, 9, 48, 1, 48, 3, 48, 1501, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1509, 8, 48, 1, 48, 3, 48, 1512, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1517, 8, 48, 1, 48, 1, 48, 3, 48, 1521, 8, 48, 1, 48, 3, 48, 1524, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1531, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1536, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1543, 8, 48, 10, 48, 12, 48, 1546, 9, 48, 1, 48, 1, 48, 3, 48, 1550, 8, 48, 1, 48, 3, 48, 1553, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1559, 8, 48, 10, 48, 12, 48, 1562, 9, 48, 1, 48, 3, 48, 1565, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1573, 8, 48, 1, 48, 3, 48, 1576, 8, 48, 3, 48, 1578, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1587, 8, 49, 1, 49, 3, 49, 1590, 8, 49, 3, 49, 1592, 8, 49, 1, 50, 1, 50, 3, 50, 1596, 8, 50, 1, 50, 1, 50, 3, 50, 1600, 8, 50, 1, 50, 3, 50, 1603, 8, 50, 1, 50, 1, 50, 1, 50, 3, 50, 1608, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 5, 51, 1617, 8, 51, 10, 51, 12, 51, 1620, 9, 51, 1, 51, 1, 51, 3, 51, 1624, 8, 51, 1, 52, 1, 52, 3, 52, 1628, 8, 52, 1, 52, 1, 52, 3, 52, 1632, 8, 52, 1, 53, 3, 53, 1635, 8, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1640, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1646, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1653, 8, 53, 1, 53, 1, 53, 1, 53, 5, 53, 1658, 8, 53, 10, 53, 12, 53, 1661, 9, 53, 1, 53, 1, 53, 3, 53, 1665, 8, 53, 1, 53, 3, 53, 1668, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1674, 8, 54, 10, 54, 12, 54, 1677, 9, 54, 1, 54, 1, 54, 1, 55, 3, 55, 1682, 8, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1687, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1693, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1700, 8, 55, 1, 55, 1, 55, 1, 55, 5, 55, 1705, 8, 55, 10, 55, 12, 55, 1708, 9, 55, 1, 55, 1, 55, 3, 55, 1712, 8, 55, 1, 55, 3, 55, 1715, 8, 55, 1, 55, 3, 55, 1718, 8, 55, 1, 56, 1, 56, 1, 56, 3, 56, 1723, 8, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1728, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1735, 8, 56, 1, 57, 1, 57, 3, 57, 1739, 8, 57, 1, 57, 1, 57, 3, 57, 1743, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 3, 59, 1753, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1760, 8, 59, 10, 59, 12, 59, 1763, 9, 59, 3, 59, 1765, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1772, 8, 59, 10, 59, 12, 59, 1775, 9, 59, 1, 59, 3, 59, 1778, 8, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1786, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1793, 8, 60, 10, 60, 12, 60, 1796, 9, 60, 3, 60, 1798, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1805, 8, 60, 10, 60, 12, 60, 1808, 9, 60, 3, 60, 1810, 8, 60, 1, 60, 3, 60, 1813, 8, 60, 1, 60, 3, 60, 1816, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 1826, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1835, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 1842, 8, 63, 10, 63, 12, 63, 1845, 9, 63, 1, 63, 3, 63, 1848, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 3, 64, 1855, 8, 64, 1, 64, 1, 64, 1, 64, 5, 64, 1860, 8, 64, 10, 64, 12, 64, 1863, 9, 64, 1, 64, 3, 64, 1866, 8, 64, 1, 64, 1, 64, 3, 64, 1870, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 5, 65, 1877, 8, 65, 10, 65, 12, 65, 1880, 9, 65, 1, 65, 3, 65, 1883, 8, 65, 1, 65, 1, 65, 3, 65, 1887, 8, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1892, 8, 65, 1, 66, 1, 66, 3, 66, 1896, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 1901, 8, 66, 10, 66, 12, 66, 1904, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 5, 67, 1911, 8, 67, 10, 67, 12, 67, 1914, 9, 67, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1920, 8, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1925, 8, 69, 1, 69, 3, 69, 1928, 8, 69, 1, 69, 1, 69, 3, 69, 1932, 8, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 1946, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 1958, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 3, 73, 1967, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1976, 8, 74, 1, 74, 1, 74, 3, 74, 1980, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1990, 8, 74, 1, 74, 3, 74, 1993, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2002, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2011, 8, 74, 1, 74, 3, 74, 2014, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2020, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2034, 8, 74, 1, 74, 1, 74, 3, 74, 2038, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2049, 8, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2054, 8, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 4, 77, 2065, 8, 77, 11, 77, 12, 77, 2066, 1, 78, 1, 78, 1, 78, 4, 78, 2072, 8, 78, 11, 78, 12, 78, 2073, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 2082, 8, 80, 1, 80, 1, 80, 1, 80, 3, 80, 2087, 8, 80, 5, 80, 2089, 8, 80, 10, 80, 12, 80, 2092, 9, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 3, 85, 2104, 8, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 3, 90, 2117, 8, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 101, 1, 101, 1, 102, 1, 102, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 3, 114, 2174, 8, 114, 1, 114, 2, 449, 487, 1, 68, 115, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 0, 30, 3, 0, 60, 60, 71, 71, 84, 84, 2, 0, 49, 49, 68, 68, 1, 0, 136, 137, 2, 0, 149, 149, 174, 174, 2, 0, 8, 8, 11, 11, 2, 0, 61, 61, 144, 144, 2, 0, 58, 58, 106, 106, 2, 0, 60, 60, 84, 84, 5, 0, 27, 27, 74, 74, 83, 83, 124, 124, 128, 128, 4, 0, 86, 86, 135, 135, 141, 141, 148, 148, 1, 0, 9, 10, 2, 0, 7, 7, 14, 15, 1, 0, 16, 19, 1, 0, 20, 23, 4, 0, 79, 79, 99, 99, 101, 101, 120, 120, 3, 0, 27, 27, 74, 74, 128, 128, 5, 0, 54, 56, 106, 106, 175, 176, 189, 189, 192, 193, 2, 0, 31, 31, 64, 64, 3, 0, 78, 78, 98, 98, 127, 127, 3, 0, 130, 130, 157, 157, 182, 182, 2, 0, 5, 5, 108, 108, 1, 0, 179, 180, 2, 0, 36, 36, 62, 62, 2, 0, 154, 154, 165, 165, 2, 0, 162, 162, 169, 169, 2, 0, 163, 163, 170, 171, 2, 0, 164, 164, 166, 166, 3, 0, 8, 8, 11, 12, 104, 104, 2, 0, 188, 188, 192, 192, 1, 0, 27, 183, 2482, 0, 233, 1, 0, 0, 0, 2, 241, 1, 0, 0, 0, 4, 267, 1, 0, 0, 0, 6, 295, 1, 0, 0, 0, 8, 327, 1, 0, 0, 0, 10, 337, 1, 0, 0, 0, 12, 345, 1, 0, 0, 0, 14, 355, 1, 0, 0, 0, 16, 359, 1, 0, 0, 0, 18, 370, 1, 0, 0, 0, 20, 373, 1, 0, 0, 0, 22, 379, 1, 0, 0, 0, 24, 413, 1, 0, 0, 0, 26, 425, 1, 0, 0, 0, 28, 427, 1, 0, 0, 0, 30, 474, 1, 0, 0, 0, 32, 485, 1, 0, 0, 0, 34, 503, 1, 0, 0, 0, 36, 555, 1, 0, 0, 0, 38, 561, 1, 0, 0, 0, 40, 602, 1, 0, 0, 0, 42, 644, 1, 0, 0, 0, 44, 648, 1, 0, 0, 0, 46, 712, 1, 0, 0, 0, 48, 744, 1, 0, 0, 0, 50, 773, 1, 0, 0, 0, 52, 794, 1, 0, 0, 0, 54, 808, 1, 0, 0, 0, 56, 819, 1, 0, 0, 0, 58, 838, 1, 0, 0, 0, 60, 866, 1, 0, 0, 0, 62, 879, 1, 0, 0, 0, 64, 897, 1, 0, 0, 0, 66, 903, 1, 0, 0, 0, 68, 1005, 1, 0, 0, 0, 70, 1129, 1, 0, 0, 0, 72, 1139, 1, 0, 0, 0, 74, 1142, 1, 0, 0, 0, 76, 1214, 1, 0, 0, 0, 78, 1261, 1, 0, 0, 0, 80, 1279, 1, 0, 0, 0, 82, 1281, 1, 0, 0, 0, 84, 1295, 1, 0, 0, 0, 86, 1312, 1, 0, 0, 0, 88, 1412, 1, 0, 0, 0, 90, 1414, 1, 0, 0, 0, 92, 1417, 1, 0, 0, 0, 94, 1427, 1, 0, 0, 0, 96, 1577, 1, 0, 0, 0, 98, 1591, 1, 0, 0, 0, 100, 1607, 1, 0, 0, 0, 102, 1623, 1, 0, 0, 0, 104, 1631, 1, 0, 0, 0, 106, 1634, 1, 0, 0, 0, 108, 1669, 1, 0, 0, 0, 110, 1681, 1, 0, 0, 0, 112, 1722, 1, 0, 0, 0, 114, 1736, 1, 0, 0, 0, 116, 1744, 1, 0, 0, 0, 118, 1750, 1, 0, 0, 0, 120, 1781, 1, 0, 0, 0, 122, 1817, 1, 0, 0, 0, 124, 1827, 1, 0, 0, 0, 126, 1836, 1, 0, 0, 0, 128, 1851, 1, 0, 0, 0, 130, 1871, 1, 0, 0, 0, 132, 1893, 1, 0, 0, 0, 134, 1905, 1, 0, 0, 0, 136, 1915, 1, 0, 0, 0, 138, 1921, 1, 0, 0, 0, 140, 1933, 1, 0, 0, 0, 142, 1945, 1, 0, 0, 0, 144, 1957, 1, 0, 0, 0, 146, 1966, 1, 0, 0, 0, 148, 2053, 1, 0, 0, 0, 150, 2055, 1, 0, 0, 0, 152, 2058, 1, 0, 0, 0, 154, 2061, 1, 0, 0, 0, 156, 2068, 1, 0, 0, 0, 158, 2075, 1, 0, 0, 0, 160, 2079, 1, 0, 0, 0, 162, 2093, 1, 0, 0, 0, 164, 2095, 1, 0, 0, 0, 166, 2097, 1, 0, 0, 0, 168, 2099, 1, 0, 0, 0, 170, 2103, 1, 0, 0, 0, 172, 2105, 1, 0, 0, 0, 174, 2107, 1, 0, 0, 0, 176, 2109, 1, 0, 0, 0, 178, 2111, 1, 0, 0, 0, 180, 2116, 1, 0, 0, 0, 182, 2120, 1, 0, 0, 0, 184, 2122, 1, 0, 0, 0, 186, 2124, 1, 0, 0, 0, 188, 2126, 1, 0, 0, 0, 190, 2128, 1, 0, 0, 0, 192, 2130, 1, 0, 0, 0, 194, 2132, 1, 0, 0, 0, 196, 2134, 1, 0, 0, 0, 198, 2136, 1, 0, 0, 0, 200, 2138, 1, 0, 0, 0, 202, 2140, 1, 0, 0, 0, 204, 2142, 1, 0, 0, 0, 206, 2144, 1, 0, 0, 0, 208, 2146, 1, 0, 0, 0, 210, 2148, 1, 0, 0, 0, 212, 2150, 1, 0, 0, 0, 214, 2152, 1, 0, 0, 0, 216, 2154, 1, 0, 0, 0, 218, 2156, 1, 0, 0, 0, 220, 2158, 1, 0, 0, 0, 222, 2160, 1, 0, 0, 0, 224, 2162, 1, 0, 0, 0, 226, 2164, 1, 0, 0, 0, 228, 2173, 1, 0, 0, 0, 230, 232, 3, 2, 1, 0, 231, 230, 1, 0, 0, 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 5, 0, 0, 1, 237, 1, 1, 0, 0, 0, 238, 240, 5, 1, 0, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 244, 253, 3, 4, 2, 0, 245, 247, 5, 1, 0, 0, 246, 245, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 252, 3, 4, 2, 0, 251, 246, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 259, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 258, 5, 1, 0, 0, 257, 256, 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 3, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 262, 265, 5, 73, 0, 0, 263, 264, 5, 116, 0, 0, 264, 266, 5, 113, 0, 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 268, 1, 0, 0, 0, 267, 262, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 293, 1, 0, 0, 0, 269, 294, 3, 6, 3, 0, 270, 294, 3, 8, 4, 0, 271, 294, 3, 10, 5, 0, 272, 294, 3, 12, 6, 0, 273, 294, 3, 14, 7, 0, 274, 294, 3, 22, 11, 0, 275, 294, 3, 28, 14, 0, 276, 294, 3, 44, 22, 0, 277, 294, 3, 46, 23, 0, 278, 294, 3, 48, 24, 0, 279, 294, 3, 60, 30, 0, 280, 294, 3, 62, 31, 0, 281, 294, 3, 64, 32, 0, 282, 294, 3, 66, 33, 0, 283, 294, 3, 74, 37, 0, 284, 294, 3, 78, 39, 0, 285, 294, 3, 82, 41, 0, 286, 294, 3, 20, 10, 0, 287, 294, 3, 16, 8, 0, 288, 294, 3, 18, 9, 0, 289, 294, 3, 84, 42, 0, 290, 294, 3, 106, 53, 0, 291, 294, 3, 110, 55, 0, 292, 294, 3, 114, 57, 0, 293, 269, 1, 0, 0, 0, 293, 270, 1, 0, 0, 0, 293, 271, 1, 0, 0, 0, 293, 272, 1, 0, 0, 0, 293, 273, 1, 0, 0, 0, 293, 274, 1, 0, 0, 0, 293, 275, 1, 0, 0, 0, 293, 276, 1, 0, 0, 0, 293, 277, 1, 0, 0, 0, 293, 278, 1, 0, 0, 0, 293, 279, 1, 0, 0, 0, 293, 280, 1, 0, 0, 0, 293, 281, 1, 0, 0, 0, 293, 282, 1, 0, 0, 0, 293, 283, 1, 0, 0, 0, 293, 284, 1, 0, 0, 0, 293, 285, 1, 0, 0, 0, 293, 286, 1, 0, 0, 0, 293, 287, 1, 0, 0, 0, 293, 288, 1, 0, 0, 0, 293, 289, 1, 0, 0, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 294, 5, 1, 0, 0, 0, 295, 296, 5, 32, 0, 0, 296, 300, 5, 135, 0, 0, 297, 298, 3, 182, 91, 0, 298, 299, 5, 2, 0, 0, 299, 301, 1, 0, 0, 0, 300, 297, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 325, 3, 184, 92, 0, 303, 313, 5, 123, 0, 0, 304, 305, 5, 139, 0, 0, 305, 314, 3, 188, 94, 0, 306, 308, 5, 48, 0, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 3, 190, 95, 0, 310, 311, 5, 139, 0, 0, 311, 312, 3, 190, 95, 0, 312, 314, 1, 0, 0, 0, 313, 304, 1, 0, 0, 0, 313, 307, 1, 0, 0, 0, 314, 326, 1, 0, 0, 0, 315, 317, 5, 29, 0, 0, 316, 318, 5, 48, 0, 0, 317, 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 326, 3, 30, 15, 0, 320, 322, 5, 65, 0, 0, 321, 323, 5, 48, 0, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 326, 3, 190, 95, 0, 325, 303, 1, 0, 0, 0, 325, 315, 1, 0, 0, 0, 325, 320, 1, 0, 0, 0, 326, 7, 1, 0, 0, 0, 327, 335, 5, 33, 0, 0, 328, 336, 3, 182, 91, 0, 329, 330, 3, 182, 91, 0, 330, 331, 5, 2, 0, 0, 331, 333, 1, 0, 0, 0, 332, 329, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 336, 3, 186, 93, 0, 335, 328, 1, 0, 0, 0, 335, 332, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 9, 1, 0, 0, 0, 337, 339, 5, 37, 0, 0, 338, 340, 5, 57, 0, 0, 339, 338, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, 3, 68, 34, 0, 342, 343, 5, 35, 0, 0, 343, 344, 3, 182, 91, 0, 344, 11, 1, 0, 0, 0, 345, 347, 5, 40, 0, 0, 346, 348, 7, 0, 0, 0, 347, 346, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 353, 1, 0, 0, 0, 349, 351, 5, 140, 0, 0, 350, 352, 3, 212, 106, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353, 349, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 13, 1, 0, 0, 0, 355, 357, 7, 1, 0, 0, 356, 358, 5, 140, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 15, 1, 0, 0, 0, 359, 361, 5, 128, 0, 0, 360, 362, 5, 140, 0, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 368, 1, 0, 0, 0, 363, 365, 5, 139, 0, 0, 364, 366, 5, 131, 0, 0, 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 369, 3, 206, 103, 0, 368, 363, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 17, 1, 0, 0, 0, 370, 371, 5, 131, 0, 0, 371, 372, 3, 206, 103, 0, 372, 19, 1, 0, 0, 0, 373, 375, 5, 122, 0, 0, 374, 376, 5, 131, 0, 0, 375, 374, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 378, 3, 206, 103, 0, 378, 21, 1, 0, 0, 0, 379, 381, 5, 52, 0, 0, 380, 382, 5, 143, 0, 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 387, 5, 86, 0, 0, 384, 385, 5, 82, 0, 0, 385, 386, 5, 104, 0, 0, 386, 388, 5, 72, 0, 0, 387, 384, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 392, 1, 0, 0, 0, 389, 390, 3, 182, 91, 0, 390, 391, 5, 2, 0, 0, 391, 393, 1, 0, 0, 0, 392, 389, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, 395, 3, 196, 98, 0, 395, 396, 5, 109, 0, 0, 396, 397, 3, 184, 92, 0, 397, 398, 5, 3, 0, 0, 398, 403, 3, 24, 12, 0, 399, 400, 5, 5, 0, 0, 400, 402, 3, 24, 12, 0, 401, 399, 1, 0, 0, 0, 402, 405, 1, 0, 0, 0, 403, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 409, 5, 4, 0, 0, 407, 408, 5, 151, 0, 0, 408, 410, 3, 68, 34, 0, 409, 407, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 23, 1, 0, 0, 0, 411, 414, 3, 190, 95, 0, 412, 414, 3, 68, 34, 0, 413, 411, 1, 0, 0, 0, 413, 412, 1, 0, 0, 0, 414, 417, 1, 0, 0, 0, 415, 416, 5, 47, 0, 0, 416, 418, 3, 192, 96, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, 419, 421, 3, 140, 70, 0, 420, 419, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 25, 1, 0, 0, 0, 422, 423, 5, 153, 0, 0, 423, 426, 5, 188, 0, 0, 424, 426, 5, 134, 0, 0, 425, 422, 1, 0, 0, 0, 425, 424, 1, 0, 0, 0, 426, 27, 1, 0, 0, 0, 427, 429, 5, 52, 0, 0, 428, 430, 7, 2, 0, 0, 429, 428, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 435, 5, 135, 0, 0, 432, 433, 5, 82, 0, 0, 433, 434, 5, 104, 0, 0, 434, 436, 5, 72, 0, 0, 435, 432, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 440, 1, 0, 0, 0, 437, 438, 3, 182, 91, 0, 438, 439, 5, 2, 0, 0, 439, 441, 1, 0, 0, 0, 440, 437, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 472, 3, 184, 92, 0, 443, 444, 5, 3, 0, 0, 444, 449, 3, 30, 15, 0, 445, 446, 5, 5, 0, 0, 446, 448, 3, 30, 15, 0, 447, 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 449, 447, 1, 0, 0, 0, 450, 456, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 453, 5, 5, 0, 0, 453, 455, 3, 38, 19, 0, 454, 452, 1, 0, 0, 0, 455, 458, 1, 0, 0, 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, 459, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 459, 468, 5, 4, 0, 0, 460, 465, 3, 26, 13, 0, 461, 462, 5, 5, 0, 0, 462, 464, 3, 26, 13, 0, 463, 461, 1, 0, 0, 0, 464, 467, 1, 0, 0, 0, 465, 463, 1, 0, 0, 0, 465, 466, 1, 0, 0, 0, 466, 469, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 468, 460, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 473, 1, 0, 0, 0, 470, 471, 5, 35, 0, 0, 471, 473, 3, 84, 42, 0, 472, 443, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 473, 29, 1, 0, 0, 0, 474, 476, 3, 190, 95, 0, 475, 477, 3, 32, 16, 0, 476, 475, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, 477, 481, 1, 0, 0, 0, 478, 480, 3, 34, 17, 0, 479, 478, 1, 0, 0, 0, 480, 483, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 481, 482, 1, 0, 0, 0, 482, 31, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 484, 486, 3, 176, 88, 0, 485, 484, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 487, 485, 1, 0, 0, 0, 488, 499, 1, 0, 0, 0, 489, 490, 5, 3, 0, 0, 490, 491, 3, 36, 18, 0, 491, 492, 5, 4, 0, 0, 492, 500, 1, 0, 0, 0, 493, 494, 5, 3, 0, 0, 494, 495, 3, 36, 18, 0, 495, 496, 5, 5, 0, 0, 496, 497, 3, 36, 18, 0, 497, 498, 5, 4, 0, 0, 498, 500, 1, 0, 0, 0, 499, 489, 1, 0, 0, 0, 499, 493, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 33, 1, 0, 0, 0, 501, 502, 5, 51, 0, 0, 502, 504, 3, 176, 88, 0, 503, 501, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 552, 1, 0, 0, 0, 505, 506, 5, 115, 0, 0, 506, 508, 5, 97, 0, 0, 507, 509, 3, 140, 70, 0, 508, 507, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 511, 1, 0, 0, 0, 510, 512, 3, 42, 21, 0, 511, 510, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 514, 1, 0, 0, 0, 513, 515, 5, 38, 0, 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 553, 1, 0, 0, 0, 516, 517, 5, 104, 0, 0, 517, 520, 5, 106, 0, 0, 518, 520, 5, 143, 0, 0, 519, 516, 1, 0, 0, 0, 519, 518, 1, 0, 0, 0, 520, 522, 1, 0, 0, 0, 521, 523, 3, 42, 21, 0, 522, 521, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 553, 1, 0, 0, 0, 524, 525, 5, 46, 0, 0, 525, 526, 5, 3, 0, 0, 526, 527, 3, 68, 34, 0, 527, 528, 5, 4, 0, 0, 528, 553, 1, 0, 0, 0, 529, 536, 5, 58, 0, 0, 530, 537, 3, 36, 18, 0, 531, 537, 3, 72, 36, 0, 532, 533, 5, 3, 0, 0, 533, 534, 3, 68, 34, 0, 534, 535, 5, 4, 0, 0, 535, 537, 1, 0, 0, 0, 536, 530, 1, 0, 0, 0, 536, 531, 1, 0, 0, 0, 536, 532, 1, 0, 0, 0, 537, 553, 1, 0, 0, 0, 538, 539, 5, 47, 0, 0, 539, 553, 3, 192, 96, 0, 540, 553, 3, 40, 20, 0, 541, 542, 5, 172, 0, 0, 542, 544, 5, 173, 0, 0, 543, 541, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 5, 35, 0, 0, 546, 547, 5, 3, 0, 0, 547, 548, 3, 68, 34, 0, 548, 550, 5, 4, 0, 0, 549, 551, 7, 3, 0, 0, 550, 549, 1, 0, 0, 0, 550, 551, 1, 0, 0, 0, 551, 553, 1, 0, 0, 0, 552, 505, 1, 0, 0, 0, 552, 519, 1, 0, 0, 0, 552, 524, 1, 0, 0, 0, 552, 529, 1, 0, 0, 0, 552, 538, 1, 0, 0, 0, 552, 540, 1, 0, 0, 0, 552, 543, 1, 0, 0, 0, 553, 35, 1, 0, 0, 0, 554, 556, 7, 4, 0, 0, 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, 558, 5, 189, 0, 0, 558, 37, 1, 0, 0, 0, 559, 560, 5, 51, 0, 0, 560, 562, 3, 176, 88, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 600, 1, 0, 0, 0, 563, 564, 5, 115, 0, 0, 564, 567, 5, 97, 0, 0, 565, 567, 5, 143, 0, 0, 566, 563, 1, 0, 0, 0, 566, 565, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 569, 5, 3, 0, 0, 569, 574, 3, 24, 12, 0, 570, 571, 5, 5, 0, 0, 571, 573, 3, 24, 12, 0, 572, 570, 1, 0, 0, 0, 573, 576, 1, 0, 0, 0, 574, 572, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 577, 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, 577, 579, 5, 4, 0, 0, 578, 580, 3, 42, 21, 0, 579, 578, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 601, 1, 0, 0, 0, 581, 582, 5, 46, 0, 0, 582, 583, 5, 3, 0, 0, 583, 584, 3, 68, 34, 0, 584, 585, 5, 4, 0, 0, 585, 601, 1, 0, 0, 0, 586, 587, 5, 76, 0, 0, 587, 588, 5, 97, 0, 0, 588, 589, 5, 3, 0, 0, 589, 594, 3, 190, 95, 0, 590, 591, 5, 5, 0, 0, 591, 593, 3, 190, 95, 0, 592, 590, 1, 0, 0, 0, 593, 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, 598, 5, 4, 0, 0, 598, 599, 3, 40, 20, 0, 599, 601, 1, 0, 0, 0, 600, 566, 1, 0, 0, 0, 600, 581, 1, 0, 0, 0, 600, 586, 1, 0, 0, 0, 601, 39, 1, 0, 0, 0, 602, 603, 5, 119, 0, 0, 603, 615, 3, 194, 97, 0, 604, 605, 5, 3, 0, 0, 605, 610, 3, 190, 95, 0, 606, 607, 5, 5, 0, 0, 607, 609, 3, 190, 95, 0, 608, 606, 1, 0, 0, 0, 609, 612, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 613, 1, 0, 0, 0, 612, 610, 1, 0, 0, 0, 613, 614, 5, 4, 0, 0, 614, 616, 1, 0, 0, 0, 615, 604, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 631, 1, 0, 0, 0, 617, 618, 5, 109, 0, 0, 618, 625, 7, 5, 0, 0, 619, 620, 5, 133, 0, 0, 620, 626, 7, 6, 0, 0, 621, 626, 5, 43, 0, 0, 622, 626, 5, 125, 0, 0, 623, 624, 5, 103, 0, 0, 624, 626, 5, 28, 0, 0, 625, 619, 1, 0, 0, 0, 625, 621, 1, 0, 0, 0, 625, 622, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 630, 1, 0, 0, 0, 627, 628, 5, 101, 0, 0, 628, 630, 3, 176, 88, 0, 629, 617, 1, 0, 0, 0, 629, 627, 1, 0, 0, 0, 630, 633, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 642, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 634, 636, 5, 104, 0, 0, 635, 634, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 640, 5, 59, 0, 0, 638, 639, 5, 88, 0, 0, 639, 641, 7, 7, 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 643, 1, 0, 0, 0, 642, 635, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 41, 1, 0, 0, 0, 644, 645, 5, 109, 0, 0, 645, 646, 5, 50, 0, 0, 646, 647, 7, 8, 0, 0, 647, 43, 1, 0, 0, 0, 648, 650, 5, 52, 0, 0, 649, 651, 7, 2, 0, 0, 650, 649, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 656, 5, 141, 0, 0, 653, 654, 5, 82, 0, 0, 654, 655, 5, 104, 0, 0, 655, 657, 5, 72, 0, 0, 656, 653, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 661, 1, 0, 0, 0, 658, 659, 3, 182, 91, 0, 659, 660, 5, 2, 0, 0, 660, 662, 1, 0, 0, 0, 661, 658, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 668, 3, 198, 99, 0, 664, 669, 5, 39, 0, 0, 665, 669, 5, 30, 0, 0, 666, 667, 5, 91, 0, 0, 667, 669, 5, 107, 0, 0, 668, 664, 1, 0, 0, 0, 668, 665, 1, 0, 0, 0, 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 684, 1, 0, 0, 0, 670, 685, 5, 61, 0, 0, 671, 685, 5, 90, 0, 0, 672, 682, 5, 144, 0, 0, 673, 674, 5, 107, 0, 0, 674, 679, 3, 190, 95, 0, 675, 676, 5, 5, 0, 0, 676, 678, 3, 190, 95, 0, 677, 675, 1, 0, 0, 0, 678, 681, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 683, 1, 0, 0, 0, 681, 679, 1, 0, 0, 0, 682, 673, 1, 0, 0, 0, 682, 683, 1, 0, 0, 0, 683, 685, 1, 0, 0, 0, 684, 670, 1, 0, 0, 0, 684, 671, 1, 0, 0, 0, 684, 672, 1, 0, 0, 0, 685, 686, 1, 0, 0, 0, 686, 687, 5, 109, 0, 0, 687, 691, 3, 184, 92, 0, 688, 689, 5, 75, 0, 0, 689, 690, 5, 66, 0, 0, 690, 692, 5, 129, 0, 0, 691, 688, 1, 0, 0, 0, 691, 692, 1, 0, 0, 0, 692, 695, 1, 0, 0, 0, 693, 694, 5, 150, 0, 0, 694, 696, 3, 68, 34, 0, 695, 693, 1, 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 697, 1, 0, 0, 0, 697, 706, 5, 40, 0, 0, 698, 703, 3, 106, 53, 0, 699, 703, 3, 74, 37, 0, 700, 703, 3, 60, 30, 0, 701, 703, 3, 84, 42, 0, 702, 698, 1, 0, 0, 0, 702, 699, 1, 0, 0, 0, 702, 700, 1, 0, 0, 0, 702, 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 705, 5, 1, 0, 0, 705, 707, 1, 0, 0, 0, 706, 702, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 706, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 1, 0, 0, 0, 710, 711, 5, 68, 0, 0, 711, 45, 1, 0, 0, 0, 712, 714, 5, 52, 0, 0, 713, 715, 7, 2, 0, 0, 714, 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 720, 5, 148, 0, 0, 717, 718, 5, 82, 0, 0, 718, 719, 5, 104, 0, 0, 719, 721, 5, 72, 0, 0, 720, 717, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 725, 1, 0, 0, 0, 722, 723, 3, 182, 91, 0, 723, 724, 5, 2, 0, 0, 724, 726, 1, 0, 0, 0, 725, 722, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, 726, 727, 1, 0, 0, 0, 727, 739, 3, 200, 100, 0, 728, 729, 5, 3, 0, 0, 729, 734, 3, 190, 95, 0, 730, 731, 5, 5, 0, 0, 731, 733, 3, 190, 95, 0, 732, 730, 1, 0, 0, 0, 733, 736, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 737, 1, 0, 0, 0, 736, 734, 1, 0, 0, 0, 737, 738, 5, 4, 0, 0, 738, 740, 1, 0, 0, 0, 739, 728, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 742, 5, 35, 0, 0, 742, 743, 3, 84, 42, 0, 743, 47, 1, 0, 0, 0, 744, 745, 5, 52, 0, 0, 745, 746, 5, 149, 0, 0, 746, 750, 5, 135, 0, 0, 747, 748, 5, 82, 0, 0, 748, 749, 5, 104, 0, 0, 749, 751, 5, 72, 0, 0, 750, 747, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 755, 1, 0, 0, 0, 752, 753, 3, 182, 91, 0, 753, 754, 5, 2, 0, 0, 754, 756, 1, 0, 0, 0, 755, 752, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, 758, 3, 184, 92, 0, 758, 759, 5, 145, 0, 0, 759, 771, 3, 202, 101, 0, 760, 761, 5, 3, 0, 0, 761, 766, 3, 170, 85, 0, 762, 763, 5, 5, 0, 0, 763, 765, 3, 170, 85, 0, 764, 762, 1, 0, 0, 0, 765, 768, 1, 0, 0, 0, 766, 764, 1, 0, 0, 0, 766, 767, 1, 0, 0, 0, 767, 769, 1, 0, 0, 0, 768, 766, 1, 0, 0, 0, 769, 770, 5, 4, 0, 0, 770, 772, 1, 0, 0, 0, 771, 760, 1, 0, 0, 0, 771, 772, 1, 0, 0, 0, 772, 49, 1, 0, 0, 0, 773, 775, 5, 152, 0, 0, 774, 776, 5, 118, 0, 0, 775, 774, 1, 0, 0, 0, 775, 776, 1, 0, 0, 0, 776, 777, 1, 0, 0, 0, 777, 778, 3, 52, 26, 0, 778, 779, 5, 35, 0, 0, 779, 780, 5, 3, 0, 0, 780, 781, 3, 84, 42, 0, 781, 791, 5, 4, 0, 0, 782, 783, 5, 5, 0, 0, 783, 784, 3, 52, 26, 0, 784, 785, 5, 35, 0, 0, 785, 786, 5, 3, 0, 0, 786, 787, 3, 84, 42, 0, 787, 788, 5, 4, 0, 0, 788, 790, 1, 0, 0, 0, 789, 782, 1, 0, 0, 0, 790, 793, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 51, 1, 0, 0, 0, 793, 791, 1, 0, 0, 0, 794, 806, 3, 184, 92, 0, 795, 796, 5, 3, 0, 0, 796, 801, 3, 190, 95, 0, 797, 798, 5, 5, 0, 0, 798, 800, 3, 190, 95, 0, 799, 797, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 804, 1, 0, 0, 0, 803, 801, 1, 0, 0, 0, 804, 805, 5, 4, 0, 0, 805, 807, 1, 0, 0, 0, 806, 795, 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 53, 1, 0, 0, 0, 808, 809, 3, 52, 26, 0, 809, 810, 5, 35, 0, 0, 810, 811, 5, 3, 0, 0, 811, 812, 3, 162, 81, 0, 812, 814, 5, 142, 0, 0, 813, 815, 5, 31, 0, 0, 814, 813, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 3, 164, 82, 0, 817, 818, 5, 4, 0, 0, 818, 55, 1, 0, 0, 0, 819, 831, 3, 184, 92, 0, 820, 821, 5, 3, 0, 0, 821, 826, 3, 190, 95, 0, 822, 823, 5, 5, 0, 0, 823, 825, 3, 190, 95, 0, 824, 822, 1, 0, 0, 0, 825, 828, 1, 0, 0, 0, 826, 824, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 829, 1, 0, 0, 0, 828, 826, 1, 0, 0, 0, 829, 830, 5, 4, 0, 0, 830, 832, 1, 0, 0, 0, 831, 820, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 833, 1, 0, 0, 0, 833, 834, 5, 35, 0, 0, 834, 835, 5, 3, 0, 0, 835, 836, 3, 84, 42, 0, 836, 837, 5, 4, 0, 0, 837, 57, 1, 0, 0, 0, 838, 847, 5, 126, 0, 0, 839, 848, 5, 7, 0, 0, 840, 845, 3, 68, 34, 0, 841, 843, 5, 35, 0, 0, 842, 841, 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844, 846, 3, 172, 86, 0, 845, 842, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, 847, 839, 1, 0, 0, 0, 847, 840, 1, 0, 0, 0, 848, 862, 1, 0, 0, 0, 849, 858, 5, 5, 0, 0, 850, 859, 5, 7, 0, 0, 851, 856, 3, 68, 34, 0, 852, 854, 5, 35, 0, 0, 853, 852, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854, 855, 1, 0, 0, 0, 855, 857, 3, 172, 86, 0, 856, 853, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 859, 1, 0, 0, 0, 858, 850, 1, 0, 0, 0, 858, 851, 1, 0, 0, 0, 859, 861, 1, 0, 0, 0, 860, 849, 1, 0, 0, 0, 861, 864, 1, 0, 0, 0, 862, 860, 1, 0, 0, 0, 862, 863, 1, 0, 0, 0, 863, 59, 1, 0, 0, 0, 864, 862, 1, 0, 0, 0, 865, 867, 3, 50, 25, 0, 866, 865, 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 1, 0, 0, 0, 868, 869, 5, 61, 0, 0, 869, 870, 5, 77, 0, 0, 870, 873, 3, 112, 56, 0, 871, 872, 5, 151, 0, 0, 872, 874, 3, 68, 34, 0, 873, 871, 1, 0, 0, 0, 873, 874, 1, 0, 0, 0, 874, 876, 1, 0, 0, 0, 875, 877, 3, 58, 29, 0, 876, 875, 1, 0, 0, 0, 876, 877, 1, 0, 0, 0, 877, 61, 1, 0, 0, 0, 878, 880, 3, 50, 25, 0, 879, 878, 1, 0, 0, 0, 879, 880, 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 881, 882, 5, 61, 0, 0, 882, 883, 5, 77, 0, 0, 883, 886, 3, 112, 56, 0, 884, 885, 5, 151, 0, 0, 885, 887, 3, 68, 34, 0, 886, 884, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 892, 1, 0, 0, 0, 888, 890, 3, 134, 67, 0, 889, 888, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 893, 3, 136, 68, 0, 892, 889, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, 896, 3, 58, 29, 0, 895, 894, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 63, 1, 0, 0, 0, 897, 899, 5, 63, 0, 0, 898, 900, 5, 57, 0, 0, 899, 898, 1, 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 901, 1, 0, 0, 0, 901, 902, 3, 182, 91, 0, 902, 65, 1, 0, 0, 0, 903, 904, 5, 65, 0, 0, 904, 907, 7, 9, 0, 0, 905, 906, 5, 82, 0, 0, 906, 908, 5, 72, 0, 0, 907, 905, 1, 0, 0, 0, 907, 908, 1, 0, 0, 0, 908, 912, 1, 0, 0, 0, 909, 910, 3, 182, 91, 0, 910, 911, 5, 2, 0, 0, 911, 913, 1, 0, 0, 0, 912, 909, 1, 0, 0, 0, 912, 913, 1, 0, 0, 0, 913, 914, 1, 0, 0, 0, 914, 915, 3, 228, 114, 0, 915, 67, 1, 0, 0, 0, 916, 917, 6, 34, -1, 0, 917, 1006, 3, 72, 36, 0, 918, 1006, 5, 190, 0, 0, 919, 1006, 5, 191, 0, 0, 920, 921, 3, 182, 91, 0, 921, 922, 5, 2, 0, 0, 922, 924, 1, 0, 0, 0, 923, 920, 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, 924, 925, 1, 0, 0, 0, 925, 926, 3, 184, 92, 0, 926, 927, 5, 2, 0, 0, 927, 929, 1, 0, 0, 0, 928, 923, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 930, 1, 0, 0, 0, 930, 1006, 3, 190, 95, 0, 931, 932, 3, 166, 83, 0, 932, 933, 3, 68, 34, 21, 933, 1006, 1, 0, 0, 0, 934, 935, 3, 180, 90, 0, 935, 948, 5, 3, 0, 0, 936, 938, 5, 64, 0, 0, 937, 936, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 944, 3, 68, 34, 0, 940, 941, 5, 5, 0, 0, 941, 943, 3, 68, 34, 0, 942, 940, 1, 0, 0, 0, 943, 946, 1, 0, 0, 0, 944, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 949, 1, 0, 0, 0, 946, 944, 1, 0, 0, 0, 947, 949, 5, 7, 0, 0, 948, 937, 1, 0, 0, 0, 948, 947, 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 952, 5, 4, 0, 0, 951, 953, 3, 116, 58, 0, 952, 951, 1, 0, 0, 0, 952, 953, 1, 0, 0, 0, 953, 955, 1, 0, 0, 0, 954, 956, 3, 120, 60, 0, 955, 954, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 956, 1006, 1, 0, 0, 0, 957, 958, 5, 3, 0, 0, 958, 963, 3, 68, 34, 0, 959, 960, 5, 5, 0, 0, 960, 962, 3, 68, 34, 0, 961, 959, 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, 1, 0, 0, 0, 964, 966, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 967, 5, 4, 0, 0, 967, 1006, 1, 0, 0, 0, 968, 969, 5, 45, 0, 0, 969, 970, 5, 3, 0, 0, 970, 971, 3, 68, 34, 0, 971, 972, 5, 35, 0, 0, 972, 973, 3, 32, 16, 0, 973, 974, 5, 4, 0, 0, 974, 1006, 1, 0, 0, 0, 975, 977, 5, 104, 0, 0, 976, 975, 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 980, 5, 72, 0, 0, 979, 976, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 981, 1, 0, 0, 0, 981, 982, 5, 3, 0, 0, 982, 983, 3, 84, 42, 0, 983, 984, 5, 4, 0, 0, 984, 1006, 1, 0, 0, 0, 985, 987, 5, 44, 0, 0, 986, 988, 3, 68, 34, 0, 987, 986, 1, 0, 0, 0, 987, 988, 1, 0, 0, 0, 988, 994, 1, 0, 0, 0, 989, 990, 5, 150, 0, 0, 990, 991, 3, 68, 34, 0, 991, 992, 5, 138, 0, 0, 992, 993, 3, 68, 34, 0, 993, 995, 1, 0, 0, 0, 994, 989, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 1000, 1, 0, 0, 0, 998, 999, 5, 67, 0, 0, 999, 1001, 3, 68, 34, 0, 1000, 998, 1, 0, 0, 0, 1000, 1001, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 1003, 5, 68, 0, 0, 1003, 1006, 1, 0, 0, 0, 1004, 1006, 3, 70, 35, 0, 1005, 916, 1, 0, 0, 0, 1005, 918, 1, 0, 0, 0, 1005, 919, 1, 0, 0, 0, 1005, 928, 1, 0, 0, 0, 1005, 931, 1, 0, 0, 0, 1005, 934, 1, 0, 0, 0, 1005, 957, 1, 0, 0, 0, 1005, 968, 1, 0, 0, 0, 1005, 979, 1, 0, 0, 0, 1005, 985, 1, 0, 0, 0, 1005, 1004, 1, 0, 0, 0, 1006, 1126, 1, 0, 0, 0, 1007, 1008, 10, 20, 0, 0, 1008, 1009, 5, 13, 0, 0, 1009, 1125, 3, 68, 34, 21, 1010, 1011, 10, 19, 0, 0, 1011, 1012, 7, 10, 0, 0, 1012, 1125, 3, 68, 34, 20, 1013, 1014, 10, 18, 0, 0, 1014, 1015, 7, 11, 0, 0, 1015, 1125, 3, 68, 34, 19, 1016, 1017, 10, 17, 0, 0, 1017, 1018, 7, 4, 0, 0, 1018, 1125, 3, 68, 34, 18, 1019, 1020, 10, 16, 0, 0, 1020, 1021, 7, 12, 0, 0, 1021, 1125, 3, 68, 34, 17, 1022, 1023, 10, 15, 0, 0, 1023, 1024, 7, 13, 0, 0, 1024, 1125, 3, 68, 34, 16, 1025, 1041, 10, 14, 0, 0, 1026, 1042, 5, 6, 0, 0, 1027, 1042, 5, 24, 0, 0, 1028, 1042, 5, 25, 0, 0, 1029, 1042, 5, 26, 0, 0, 1030, 1042, 5, 94, 0, 0, 1031, 1032, 5, 94, 0, 0, 1032, 1042, 5, 104, 0, 0, 1033, 1035, 5, 104, 0, 0, 1034, 1033, 1, 0, 0, 0, 1034, 1035, 1, 0, 0, 0, 1035, 1036, 1, 0, 0, 0, 1036, 1042, 5, 85, 0, 0, 1037, 1042, 5, 99, 0, 0, 1038, 1042, 5, 79, 0, 0, 1039, 1042, 5, 101, 0, 0, 1040, 1042, 5, 120, 0, 0, 1041, 1026, 1, 0, 0, 0, 1041, 1027, 1, 0, 0, 0, 1041, 1028, 1, 0, 0, 0, 1041, 1029, 1, 0, 0, 0, 1041, 1030, 1, 0, 0, 0, 1041, 1031, 1, 0, 0, 0, 1041, 1034, 1, 0, 0, 0, 1041, 1037, 1, 0, 0, 0, 1041, 1038, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, 1040, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1125, 3, 68, 34, 15, 1044, 1045, 10, 12, 0, 0, 1045, 1046, 5, 34, 0, 0, 1046, 1125, 3, 68, 34, 13, 1047, 1048, 10, 11, 0, 0, 1048, 1049, 5, 110, 0, 0, 1049, 1125, 3, 68, 34, 12, 1050, 1052, 10, 4, 0, 0, 1051, 1053, 5, 104, 0, 0, 1052, 1051, 1, 0, 0, 0, 1052, 1053, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, 5, 41, 0, 0, 1055, 1056, 3, 68, 34, 0, 1056, 1057, 5, 34, 0, 0, 1057, 1058, 3, 68, 34, 5, 1058, 1125, 1, 0, 0, 0, 1059, 1061, 10, 13, 0, 0, 1060, 1062, 5, 104, 0, 0, 1061, 1060, 1, 0, 0, 0, 1061, 1062, 1, 0, 0, 0, 1062, 1063, 1, 0, 0, 0, 1063, 1102, 5, 85, 0, 0, 1064, 1074, 5, 3, 0, 0, 1065, 1075, 3, 84, 42, 0, 1066, 1071, 3, 68, 34, 0, 1067, 1068, 5, 5, 0, 0, 1068, 1070, 3, 68, 34, 0, 1069, 1067, 1, 0, 0, 0, 1070, 1073, 1, 0, 0, 0, 1071, 1069, 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1071, 1, 0, 0, 0, 1074, 1065, 1, 0, 0, 0, 1074, 1066, 1, 0, 0, 0, 1074, 1075, 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1103, 5, 4, 0, 0, 1077, 1078, 3, 182, 91, 0, 1078, 1079, 5, 2, 0, 0, 1079, 1081, 1, 0, 0, 0, 1080, 1077, 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1082, 1, 0, 0, 0, 1082, 1103, 3, 184, 92, 0, 1083, 1084, 3, 182, 91, 0, 1084, 1085, 5, 2, 0, 0, 1085, 1087, 1, 0, 0, 0, 1086, 1083, 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, 1088, 1, 0, 0, 0, 1088, 1089, 3, 226, 113, 0, 1089, 1098, 5, 3, 0, 0, 1090, 1095, 3, 68, 34, 0, 1091, 1092, 5, 5, 0, 0, 1092, 1094, 3, 68, 34, 0, 1093, 1091, 1, 0, 0, 0, 1094, 1097, 1, 0, 0, 0, 1095, 1093, 1, 0, 0, 0, 1095, 1096, 1, 0, 0, 0, 1096, 1099, 1, 0, 0, 0, 1097, 1095, 1, 0, 0, 0, 1098, 1090, 1, 0, 0, 0, 1098, 1099, 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, 1101, 5, 4, 0, 0, 1101, 1103, 1, 0, 0, 0, 1102, 1064, 1, 0, 0, 0, 1102, 1080, 1, 0, 0, 0, 1102, 1086, 1, 0, 0, 0, 1103, 1125, 1, 0, 0, 0, 1104, 1105, 10, 7, 0, 0, 1105, 1106, 5, 47, 0, 0, 1106, 1125, 3, 192, 96, 0, 1107, 1109, 10, 6, 0, 0, 1108, 1110, 5, 104, 0, 0, 1109, 1108, 1, 0, 0, 0, 1109, 1110, 1, 0, 0, 0, 1110, 1111, 1, 0, 0, 0, 1111, 1112, 7, 14, 0, 0, 1112, 1115, 3, 68, 34, 0, 1113, 1114, 5, 69, 0, 0, 1114, 1116, 3, 68, 34, 0, 1115, 1113, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1125, 1, 0, 0, 0, 1117, 1122, 10, 5, 0, 0, 1118, 1123, 5, 95, 0, 0, 1119, 1123, 5, 105, 0, 0, 1120, 1121, 5, 104, 0, 0, 1121, 1123, 5, 106, 0, 0, 1122, 1118, 1, 0, 0, 0, 1122, 1119, 1, 0, 0, 0, 1122, 1120, 1, 0, 0, 0, 1123, 1125, 1, 0, 0, 0, 1124, 1007, 1, 0, 0, 0, 1124, 1010, 1, 0, 0, 0, 1124, 1013, 1, 0, 0, 0, 1124, 1016, 1, 0, 0, 0, 1124, 1019, 1, 0, 0, 0, 1124, 1022, 1, 0, 0, 0, 1124, 1025, 1, 0, 0, 0, 1124, 1044, 1, 0, 0, 0, 1124, 1047, 1, 0, 0, 0, 1124, 1050, 1, 0, 0, 0, 1124, 1059, 1, 0, 0, 0, 1124, 1104, 1, 0, 0, 0, 1124, 1107, 1, 0, 0, 0, 1124, 1117, 1, 0, 0, 0, 1125, 1128, 1, 0, 0, 0, 1126, 1124, 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 69, 1, 0, 0, 0, 1128, 1126, 1, 0, 0, 0, 1129, 1130, 5, 117, 0, 0, 1130, 1135, 5, 3, 0, 0, 1131, 1136, 5, 83, 0, 0, 1132, 1133, 7, 15, 0, 0, 1133, 1134, 5, 5, 0, 0, 1134, 1136, 3, 168, 84, 0, 1135, 1131, 1, 0, 0, 0, 1135, 1132, 1, 0, 0, 0, 1136, 1137, 1, 0, 0, 0, 1137, 1138, 5, 4, 0, 0, 1138, 71, 1, 0, 0, 0, 1139, 1140, 7, 16, 0, 0, 1140, 73, 1, 0, 0, 0, 1141, 1143, 3, 50, 25, 0, 1142, 1141, 1, 0, 0, 0, 1142, 1143, 1, 0, 0, 0, 1143, 1149, 1, 0, 0, 0, 1144, 1150, 5, 90, 0, 0, 1145, 1150, 5, 124, 0, 0, 1146, 1147, 5, 90, 0, 0, 1147, 1148, 5, 110, 0, 0, 1148, 1150, 7, 8, 0, 0, 1149, 1144, 1, 0, 0, 0, 1149, 1145, 1, 0, 0, 0, 1149, 1146, 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1155, 5, 93, 0, 0, 1152, 1153, 3, 182, 91, 0, 1153, 1154, 5, 2, 0, 0, 1154, 1156, 1, 0, 0, 0, 1155, 1152, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1157, 1, 0, 0, 0, 1157, 1160, 3, 184, 92, 0, 1158, 1159, 5, 35, 0, 0, 1159, 1161, 3, 208, 104, 0, 1160, 1158, 1, 0, 0, 0, 1160, 1161, 1, 0, 0, 0, 1161, 1173, 1, 0, 0, 0, 1162, 1163, 5, 3, 0, 0, 1163, 1168, 3, 190, 95, 0, 1164, 1165, 5, 5, 0, 0, 1165, 1167, 3, 190, 95, 0, 1166, 1164, 1, 0, 0, 0, 1167, 1170, 1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, 1168, 1169, 1, 0, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1168, 1, 0, 0, 0, 1171, 1172, 5, 4, 0, 0, 1172, 1174, 1, 0, 0, 0, 1173, 1162, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1206, 1, 0, 0, 0, 1175, 1176, 5, 147, 0, 0, 1176, 1177, 5, 3, 0, 0, 1177, 1182, 3, 68, 34, 0, 1178, 1179, 5, 5, 0, 0, 1179, 1181, 3, 68, 34, 0, 1180, 1178, 1, 0, 0, 0, 1181, 1184, 1, 0, 0, 0, 1182, 1180, 1, 0, 0, 0, 1182, 1183, 1, 0, 0, 0, 1183, 1185, 1, 0, 0, 0, 1184, 1182, 1, 0, 0, 0, 1185, 1200, 5, 4, 0, 0, 1186, 1187, 5, 5, 0, 0, 1187, 1188, 5, 3, 0, 0, 1188, 1193, 3, 68, 34, 0, 1189, 1190, 5, 5, 0, 0, 1190, 1192, 3, 68, 34, 0, 1191, 1189, 1, 0, 0, 0, 1192, 1195, 1, 0, 0, 0, 1193, 1191, 1, 0, 0, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1196, 1, 0, 0, 0, 1195, 1193, 1, 0, 0, 0, 1196, 1197, 5, 4, 0, 0, 1197, 1199, 1, 0, 0, 0, 1198, 1186, 1, 0, 0, 0, 1199, 1202, 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 1207, 1, 0, 0, 0, 1202, 1200, 1, 0, 0, 0, 1203, 1207, 3, 84, 42, 0, 1204, 1205, 5, 58, 0, 0, 1205, 1207, 5, 147, 0, 0, 1206, 1175, 1, 0, 0, 0, 1206, 1203, 1, 0, 0, 0, 1206, 1204, 1, 0, 0, 0, 1207, 1209, 1, 0, 0, 0, 1208, 1210, 3, 76, 38, 0, 1209, 1208, 1, 0, 0, 0, 1209, 1210, 1, 0, 0, 0, 1210, 1212, 1, 0, 0, 0, 1211, 1213, 3, 58, 29, 0, 1212, 1211, 1, 0, 0, 0, 1212, 1213, 1, 0, 0, 0, 1213, 75, 1, 0, 0, 0, 1214, 1215, 5, 109, 0, 0, 1215, 1230, 5, 50, 0, 0, 1216, 1217, 5, 3, 0, 0, 1217, 1222, 3, 24, 12, 0, 1218, 1219, 5, 5, 0, 0, 1219, 1221, 3, 24, 12, 0, 1220, 1218, 1, 0, 0, 0, 1221, 1224, 1, 0, 0, 0, 1222, 1220, 1, 0, 0, 0, 1222, 1223, 1, 0, 0, 0, 1223, 1225, 1, 0, 0, 0, 1224, 1222, 1, 0, 0, 0, 1225, 1228, 5, 4, 0, 0, 1226, 1227, 5, 151, 0, 0, 1227, 1229, 3, 68, 34, 0, 1228, 1226, 1, 0, 0, 0, 1228, 1229, 1, 0, 0, 0, 1229, 1231, 1, 0, 0, 0, 1230, 1216, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1232, 1, 0, 0, 0, 1232, 1259, 5, 186, 0, 0, 1233, 1260, 5, 187, 0, 0, 1234, 1235, 5, 144, 0, 0, 1235, 1238, 5, 133, 0, 0, 1236, 1239, 3, 190, 95, 0, 1237, 1239, 3, 108, 54, 0, 1238, 1236, 1, 0, 0, 0, 1238, 1237, 1, 0, 0, 0, 1239, 1240, 1, 0, 0, 0, 1240, 1241, 5, 6, 0, 0, 1241, 1252, 3, 68, 34, 0, 1242, 1245, 5, 5, 0, 0, 1243, 1246, 3, 190, 95, 0, 1244, 1246, 3, 108, 54, 0, 1245, 1243, 1, 0, 0, 0, 1245, 1244, 1, 0, 0, 0, 1246, 1247, 1, 0, 0, 0, 1247, 1248, 5, 6, 0, 0, 1248, 1249, 3, 68, 34, 0, 1249, 1251, 1, 0, 0, 0, 1250, 1242, 1, 0, 0, 0, 1251, 1254, 1, 0, 0, 0, 1252, 1250, 1, 0, 0, 0, 1252, 1253, 1, 0, 0, 0, 1253, 1257, 1, 0, 0, 0, 1254, 1252, 1, 0, 0, 0, 1255, 1256, 5, 151, 0, 0, 1256, 1258, 3, 68, 34, 0, 1257, 1255, 1, 0, 0, 0, 1257, 1258, 1, 0, 0, 0, 1258, 1260, 1, 0, 0, 0, 1259, 1233, 1, 0, 0, 0, 1259, 1234, 1, 0, 0, 0, 1260, 77, 1, 0, 0, 0, 1261, 1265, 5, 114, 0, 0, 1262, 1263, 3, 182, 91, 0, 1263, 1264, 5, 2, 0, 0, 1264, 1266, 1, 0, 0, 0, 1265, 1262, 1, 0, 0, 0, 1265, 1266, 1, 0, 0, 0, 1266, 1267, 1, 0, 0, 0, 1267, 1274, 3, 204, 102, 0, 1268, 1269, 5, 6, 0, 0, 1269, 1275, 3, 80, 40, 0, 1270, 1271, 5, 3, 0, 0, 1271, 1272, 3, 80, 40, 0, 1272, 1273, 5, 4, 0, 0, 1273, 1275, 1, 0, 0, 0, 1274, 1268, 1, 0, 0, 0, 1274, 1270, 1, 0, 0, 0, 1274, 1275, 1, 0, 0, 0, 1275, 79, 1, 0, 0, 0, 1276, 1280, 3, 36, 18, 0, 1277, 1280, 3, 176, 88, 0, 1278, 1280, 5, 192, 0, 0, 1279, 1276, 1, 0, 0, 0, 1279, 1277, 1, 0, 0, 0, 1279, 1278, 1, 0, 0, 0, 1280, 81, 1, 0, 0, 0, 1281, 1292, 5, 121, 0, 0, 1282, 1293, 3, 192, 96, 0, 1283, 1284, 3, 182, 91, 0, 1284, 1285, 5, 2, 0, 0, 1285, 1287, 1, 0, 0, 0, 1286, 1283, 1, 0, 0, 0, 1286, 1287, 1, 0, 0, 0, 1287, 1290, 1, 0, 0, 0, 1288, 1291, 3, 184, 92, 0, 1289, 1291, 3, 196, 98, 0, 1290, 1288, 1, 0, 0, 0, 1290, 1289, 1, 0, 0, 0, 1291, 1293, 1, 0, 0, 0, 1292, 1282, 1, 0, 0, 0, 1292, 1286, 1, 0, 0, 0, 1292, 1293, 1, 0, 0, 0, 1293, 83, 1, 0, 0, 0, 1294, 1296, 3, 132, 66, 0, 1295, 1294, 1, 0, 0, 0, 1295, 1296, 1, 0, 0, 0, 1296, 1297, 1, 0, 0, 0, 1297, 1303, 3, 88, 44, 0, 1298, 1299, 3, 104, 52, 0, 1299, 1300, 3, 88, 44, 0, 1300, 1302, 1, 0, 0, 0, 1301, 1298, 1, 0, 0, 0, 1302, 1305, 1, 0, 0, 0, 1303, 1301, 1, 0, 0, 0, 1303, 1304, 1, 0, 0, 0, 1304, 1307, 1, 0, 0, 0, 1305, 1303, 1, 0, 0, 0, 1306, 1308, 3, 134, 67, 0, 1307, 1306, 1, 0, 0, 0, 1307, 1308, 1, 0, 0, 0, 1308, 1310, 1, 0, 0, 0, 1309, 1311, 3, 136, 68, 0, 1310, 1309, 1, 0, 0, 0, 1310, 1311, 1, 0, 0, 0, 1311, 85, 1, 0, 0, 0, 1312, 1319, 3, 96, 48, 0, 1313, 1314, 3, 100, 50, 0, 1314, 1315, 3, 96, 48, 0, 1315, 1316, 3, 102, 51, 0, 1316, 1318, 1, 0, 0, 0, 1317, 1313, 1, 0, 0, 0, 1318, 1321, 1, 0, 0, 0, 1319, 1317, 1, 0, 0, 0, 1319, 1320, 1, 0, 0, 0, 1320, 87, 1, 0, 0, 0, 1321, 1319, 1, 0, 0, 0, 1322, 1324, 5, 132, 0, 0, 1323, 1325, 7, 17, 0, 0, 1324, 1323, 1, 0, 0, 0, 1324, 1325, 1, 0, 0, 0, 1325, 1326, 1, 0, 0, 0, 1326, 1331, 3, 98, 49, 0, 1327, 1328, 5, 5, 0, 0, 1328, 1330, 3, 98, 49, 0, 1329, 1327, 1, 0, 0, 0, 1330, 1333, 1, 0, 0, 0, 1331, 1329, 1, 0, 0, 0, 1331, 1332, 1, 0, 0, 0, 1332, 1346, 1, 0, 0, 0, 1333, 1331, 1, 0, 0, 0, 1334, 1344, 5, 77, 0, 0, 1335, 1340, 3, 96, 48, 0, 1336, 1337, 5, 5, 0, 0, 1337, 1339, 3, 96, 48, 0, 1338, 1336, 1, 0, 0, 0, 1339, 1342, 1, 0, 0, 0, 1340, 1338, 1, 0, 0, 0, 1340, 1341, 1, 0, 0, 0, 1341, 1345, 1, 0, 0, 0, 1342, 1340, 1, 0, 0, 0, 1343, 1345, 3, 86, 43, 0, 1344, 1335, 1, 0, 0, 0, 1344, 1343, 1, 0, 0, 0, 1345, 1347, 1, 0, 0, 0, 1346, 1334, 1, 0, 0, 0, 1346, 1347, 1, 0, 0, 0, 1347, 1350, 1, 0, 0, 0, 1348, 1349, 5, 151, 0, 0, 1349, 1351, 3, 68, 34, 0, 1350, 1348, 1, 0, 0, 0, 1350, 1351, 1, 0, 0, 0, 1351, 1366, 1, 0, 0, 0, 1352, 1353, 5, 80, 0, 0, 1353, 1354, 5, 42, 0, 0, 1354, 1359, 3, 68, 34, 0, 1355, 1356, 5, 5, 0, 0, 1356, 1358, 3, 68, 34, 0, 1357, 1355, 1, 0, 0, 0, 1358, 1361, 1, 0, 0, 0, 1359, 1357, 1, 0, 0, 0, 1359, 1360, 1, 0, 0, 0, 1360, 1364, 1, 0, 0, 0, 1361, 1359, 1, 0, 0, 0, 1362, 1363, 5, 81, 0, 0, 1363, 1365, 3, 68, 34, 0, 1364, 1362, 1, 0, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, 1367, 1, 0, 0, 0, 1366, 1352, 1, 0, 0, 0, 1366, 1367, 1, 0, 0, 0, 1367, 1382, 1, 0, 0, 0, 1368, 1369, 5, 177, 0, 0, 1369, 1370, 3, 214, 107, 0, 1370, 1371, 5, 35, 0, 0, 1371, 1379, 3, 118, 59, 0, 1372, 1373, 5, 5, 0, 0, 1373, 1374, 3, 214, 107, 0, 1374, 1375, 5, 35, 0, 0, 1375, 1376, 3, 118, 59, 0, 1376, 1378, 1, 0, 0, 0, 1377, 1372, 1, 0, 0, 0, 1378, 1381, 1, 0, 0, 0, 1379, 1377, 1, 0, 0, 0, 1379, 1380, 1, 0, 0, 0, 1380, 1383, 1, 0, 0, 0, 1381, 1379, 1, 0, 0, 0, 1382, 1368, 1, 0, 0, 0, 1382, 1383, 1, 0, 0, 0, 1383, 1413, 1, 0, 0, 0, 1384, 1385, 5, 147, 0, 0, 1385, 1386, 5, 3, 0, 0, 1386, 1391, 3, 68, 34, 0, 1387, 1388, 5, 5, 0, 0, 1388, 1390, 3, 68, 34, 0, 1389, 1387, 1, 0, 0, 0, 1390, 1393, 1, 0, 0, 0, 1391, 1389, 1, 0, 0, 0, 1391, 1392, 1, 0, 0, 0, 1392, 1394, 1, 0, 0, 0, 1393, 1391, 1, 0, 0, 0, 1394, 1409, 5, 4, 0, 0, 1395, 1396, 5, 5, 0, 0, 1396, 1397, 5, 3, 0, 0, 1397, 1402, 3, 68, 34, 0, 1398, 1399, 5, 5, 0, 0, 1399, 1401, 3, 68, 34, 0, 1400, 1398, 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, 4, 0, 0, 1406, 1408, 1, 0, 0, 0, 1407, 1395, 1, 0, 0, 0, 1408, 1411, 1, 0, 0, 0, 1409, 1407, 1, 0, 0, 0, 1409, 1410, 1, 0, 0, 0, 1410, 1413, 1, 0, 0, 0, 1411, 1409, 1, 0, 0, 0, 1412, 1322, 1, 0, 0, 0, 1412, 1384, 1, 0, 0, 0, 1413, 89, 1, 0, 0, 0, 1414, 1415, 3, 84, 42, 0, 1415, 91, 1, 0, 0, 0, 1416, 1418, 3, 132, 66, 0, 1417, 1416, 1, 0, 0, 0, 1417, 1418, 1, 0, 0, 0, 1418, 1419, 1, 0, 0, 0, 1419, 1421, 3, 88, 44, 0, 1420, 1422, 3, 134, 67, 0, 1421, 1420, 1, 0, 0, 0, 1421, 1422, 1, 0, 0, 0, 1422, 1424, 1, 0, 0, 0, 1423, 1425, 3, 136, 68, 0, 1424, 1423, 1, 0, 0, 0, 1424, 1425, 1, 0, 0, 0, 1425, 93, 1, 0, 0, 0, 1426, 1428, 3, 132, 66, 0, 1427, 1426, 1, 0, 0, 0, 1427, 1428, 1, 0, 0, 0, 1428, 1429, 1, 0, 0, 0, 1429, 1439, 3, 88, 44, 0, 1430, 1432, 5, 142, 0, 0, 1431, 1433, 5, 31, 0, 0, 1432, 1431, 1, 0, 0, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1437, 1, 0, 0, 0, 1434, 1437, 5, 92, 0, 0, 1435, 1437, 5, 70, 0, 0, 1436, 1430, 1, 0, 0, 0, 1436, 1434, 1, 0, 0, 0, 1436, 1435, 1, 0, 0, 0, 1437, 1438, 1, 0, 0, 0, 1438, 1440, 3, 88, 44, 0, 1439, 1436, 1, 0, 0, 0, 1440, 1441, 1, 0, 0, 0, 1441, 1439, 1, 0, 0, 0, 1441, 1442, 1, 0, 0, 0, 1442, 1444, 1, 0, 0, 0, 1443, 1445, 3, 134, 67, 0, 1444, 1443, 1, 0, 0, 0, 1444, 1445, 1, 0, 0, 0, 1445, 1447, 1, 0, 0, 0, 1446, 1448, 3, 136, 68, 0, 1447, 1446, 1, 0, 0, 0, 1447, 1448, 1, 0, 0, 0, 1448, 95, 1, 0, 0, 0, 1449, 1450, 3, 182, 91, 0, 1450, 1451, 5, 2, 0, 0, 1451, 1453, 1, 0, 0, 0, 1452, 1449, 1, 0, 0, 0, 1452, 1453, 1, 0, 0, 0, 1453, 1454, 1, 0, 0, 0, 1454, 1459, 3, 184, 92, 0, 1455, 1457, 5, 35, 0, 0, 1456, 1455, 1, 0, 0, 0, 1456, 1457, 1, 0, 0, 0, 1457, 1458, 1, 0, 0, 0, 1458, 1460, 3, 208, 104, 0, 1459, 1456, 1, 0, 0, 0, 1459, 1460, 1, 0, 0, 0, 1460, 1466, 1, 0, 0, 0, 1461, 1462, 5, 87, 0, 0, 1462, 1463, 5, 42, 0, 0, 1463, 1467, 3, 196, 98, 0, 1464, 1465, 5, 104, 0, 0, 1465, 1467, 5, 87, 0, 0, 1466, 1461, 1, 0, 0, 0, 1466, 1464, 1, 0, 0, 0, 1466, 1467, 1, 0, 0, 0, 1467, 1578, 1, 0, 0, 0, 1468, 1469, 3, 182, 91, 0, 1469, 1470, 5, 2, 0, 0, 1470, 1472, 1, 0, 0, 0, 1471, 1468, 1, 0, 0, 0, 1471, 1472, 1, 0, 0, 0, 1472, 1473, 1, 0, 0, 0, 1473, 1474, 3, 226, 113, 0, 1474, 1475, 5, 3, 0, 0, 1475, 1480, 3, 68, 34, 0, 1476, 1477, 5, 5, 0, 0, 1477, 1479, 3, 68, 34, 0, 1478, 1476, 1, 0, 0, 0, 1479, 1482, 1, 0, 0, 0, 1480, 1478, 1, 0, 0, 0, 1480, 1481, 1, 0, 0, 0, 1481, 1483, 1, 0, 0, 0, 1482, 1480, 1, 0, 0, 0, 1483, 1488, 5, 4, 0, 0, 1484, 1486, 5, 35, 0, 0, 1485, 1484, 1, 0, 0, 0, 1485, 1486, 1, 0, 0, 0, 1486, 1487, 1, 0, 0, 0, 1487, 1489, 3, 208, 104, 0, 1488, 1485, 1, 0, 0, 0, 1488, 1489, 1, 0, 0, 0, 1489, 1578, 1, 0, 0, 0, 1490, 1500, 5, 3, 0, 0, 1491, 1496, 3, 96, 48, 0, 1492, 1493, 5, 5, 0, 0, 1493, 1495, 3, 96, 48, 0, 1494, 1492, 1, 0, 0, 0, 1495, 1498, 1, 0, 0, 0, 1496, 1494, 1, 0, 0, 0, 1496, 1497, 1, 0, 0, 0, 1497, 1501, 1, 0, 0, 0, 1498, 1496, 1, 0, 0, 0, 1499, 1501, 3, 86, 43, 0, 1500, 1491, 1, 0, 0, 0, 1500, 1499, 1, 0, 0, 0, 1501, 1502, 1, 0, 0, 0, 1502, 1503, 5, 4, 0, 0, 1503, 1578, 1, 0, 0, 0, 1504, 1505, 5, 3, 0, 0, 1505, 1506, 3, 84, 42, 0, 1506, 1511, 5, 4, 0, 0, 1507, 1509, 5, 35, 0, 0, 1508, 1507, 1, 0, 0, 0, 1508, 1509, 1, 0, 0, 0, 1509, 1510, 1, 0, 0, 0, 1510, 1512, 3, 208, 104, 0, 1511, 1508, 1, 0, 0, 0, 1511, 1512, 1, 0, 0, 0, 1512, 1578, 1, 0, 0, 0, 1513, 1514, 3, 182, 91, 0, 1514, 1515, 5, 2, 0, 0, 1515, 1517, 1, 0, 0, 0, 1516, 1513, 1, 0, 0, 0, 1516, 1517, 1, 0, 0, 0, 1517, 1518, 1, 0, 0, 0, 1518, 1523, 3, 184, 92, 0, 1519, 1521, 5, 35, 0, 0, 1520, 1519, 1, 0, 0, 0, 1520, 1521, 1, 0, 0, 0, 1521, 1522, 1, 0, 0, 0, 1522, 1524, 3, 210, 105, 0, 1523, 1520, 1, 0, 0, 0, 1523, 1524, 1, 0, 0, 0, 1524, 1530, 1, 0, 0, 0, 1525, 1526, 5, 87, 0, 0, 1526, 1527, 5, 42, 0, 0, 1527, 1531, 3, 196, 98, 0, 1528, 1529, 5, 104, 0, 0, 1529, 1531, 5, 87, 0, 0, 1530, 1525, 1, 0, 0, 0, 1530, 1528, 1, 0, 0, 0, 1530, 1531, 1, 0, 0, 0, 1531, 1578, 1, 0, 0, 0, 1532, 1533, 3, 182, 91, 0, 1533, 1534, 5, 2, 0, 0, 1534, 1536, 1, 0, 0, 0, 1535, 1532, 1, 0, 0, 0, 1535, 1536, 1, 0, 0, 0, 1536, 1537, 1, 0, 0, 0, 1537, 1538, 3, 226, 113, 0, 1538, 1539, 5, 3, 0, 0, 1539, 1544, 3, 68, 34, 0, 1540, 1541, 5, 5, 0, 0, 1541, 1543, 3, 68, 34, 0, 1542, 1540, 1, 0, 0, 0, 1543, 1546, 1, 0, 0, 0, 1544, 1542, 1, 0, 0, 0, 1544, 1545, 1, 0, 0, 0, 1545, 1547, 1, 0, 0, 0, 1546, 1544, 1, 0, 0, 0, 1547, 1552, 5, 4, 0, 0, 1548, 1550, 5, 35, 0, 0, 1549, 1548, 1, 0, 0, 0, 1549, 1550, 1, 0, 0, 0, 1550, 1551, 1, 0, 0, 0, 1551, 1553, 3, 210, 105, 0, 1552, 1549, 1, 0, 0, 0, 1552, 1553, 1, 0, 0, 0, 1553, 1578, 1, 0, 0, 0, 1554, 1564, 5, 3, 0, 0, 1555, 1560, 3, 96, 48, 0, 1556, 1557, 5, 5, 0, 0, 1557, 1559, 3, 96, 48, 0, 1558, 1556, 1, 0, 0, 0, 1559, 1562, 1, 0, 0, 0, 1560, 1558, 1, 0, 0, 0, 1560, 1561, 1, 0, 0, 0, 1561, 1565, 1, 0, 0, 0, 1562, 1560, 1, 0, 0, 0, 1563, 1565, 3, 86, 43, 0, 1564, 1555, 1, 0, 0, 0, 1564, 1563, 1, 0, 0, 0, 1565, 1566, 1, 0, 0, 0, 1566, 1567, 5, 4, 0, 0, 1567, 1578, 1, 0, 0, 0, 1568, 1569, 5, 3, 0, 0, 1569, 1570, 3, 84, 42, 0, 1570, 1575, 5, 4, 0, 0, 1571, 1573, 5, 35, 0, 0, 1572, 1571, 1, 0, 0, 0, 1572, 1573, 1, 0, 0, 0, 1573, 1574, 1, 0, 0, 0, 1574, 1576, 3, 210, 105, 0, 1575, 1572, 1, 0, 0, 0, 1575, 1576, 1, 0, 0, 0, 1576, 1578, 1, 0, 0, 0, 1577, 1452, 1, 0, 0, 0, 1577, 1471, 1, 0, 0, 0, 1577, 1490, 1, 0, 0, 0, 1577, 1504, 1, 0, 0, 0, 1577, 1516, 1, 0, 0, 0, 1577, 1535, 1, 0, 0, 0, 1577, 1554, 1, 0, 0, 0, 1577, 1568, 1, 0, 0, 0, 1578, 97, 1, 0, 0, 0, 1579, 1592, 5, 7, 0, 0, 1580, 1581, 3, 184, 92, 0, 1581, 1582, 5, 2, 0, 0, 1582, 1583, 5, 7, 0, 0, 1583, 1592, 1, 0, 0, 0, 1584, 1589, 3, 68, 34, 0, 1585, 1587, 5, 35, 0, 0, 1586, 1585, 1, 0, 0, 0, 1586, 1587, 1, 0, 0, 0, 1587, 1588, 1, 0, 0, 0, 1588, 1590, 3, 172, 86, 0, 1589, 1586, 1, 0, 0, 0, 1589, 1590, 1, 0, 0, 0, 1590, 1592, 1, 0, 0, 0, 1591, 1579, 1, 0, 0, 0, 1591, 1580, 1, 0, 0, 0, 1591, 1584, 1, 0, 0, 0, 1592, 99, 1, 0, 0, 0, 1593, 1608, 5, 5, 0, 0, 1594, 1596, 5, 102, 0, 0, 1595, 1594, 1, 0, 0, 0, 1595, 1596, 1, 0, 0, 0, 1596, 1602, 1, 0, 0, 0, 1597, 1599, 7, 18, 0, 0, 1598, 1600, 5, 112, 0, 0, 1599, 1598, 1, 0, 0, 0, 1599, 1600, 1, 0, 0, 0, 1600, 1603, 1, 0, 0, 0, 1601, 1603, 5, 89, 0, 0, 1602, 1597, 1, 0, 0, 0, 1602, 1601, 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1604, 1, 0, 0, 0, 1604, 1608, 5, 96, 0, 0, 1605, 1606, 5, 53, 0, 0, 1606, 1608, 5, 96, 0, 0, 1607, 1593, 1, 0, 0, 0, 1607, 1595, 1, 0, 0, 0, 1607, 1605, 1, 0, 0, 0, 1608, 101, 1, 0, 0, 0, 1609, 1610, 5, 109, 0, 0, 1610, 1624, 3, 68, 34, 0, 1611, 1612, 5, 145, 0, 0, 1612, 1613, 5, 3, 0, 0, 1613, 1618, 3, 190, 95, 0, 1614, 1615, 5, 5, 0, 0, 1615, 1617, 3, 190, 95, 0, 1616, 1614, 1, 0, 0, 0, 1617, 1620, 1, 0, 0, 0, 1618, 1616, 1, 0, 0, 0, 1618, 1619, 1, 0, 0, 0, 1619, 1621, 1, 0, 0, 0, 1620, 1618, 1, 0, 0, 0, 1621, 1622, 5, 4, 0, 0, 1622, 1624, 1, 0, 0, 0, 1623, 1609, 1, 0, 0, 0, 1623, 1611, 1, 0, 0, 0, 1623, 1624, 1, 0, 0, 0, 1624, 103, 1, 0, 0, 0, 1625, 1627, 5, 142, 0, 0, 1626, 1628, 5, 31, 0, 0, 1627, 1626, 1, 0, 0, 0, 1627, 1628, 1, 0, 0, 0, 1628, 1632, 1, 0, 0, 0, 1629, 1632, 5, 92, 0, 0, 1630, 1632, 5, 70, 0, 0, 1631, 1625, 1, 0, 0, 0, 1631, 1629, 1, 0, 0, 0, 1631, 1630, 1, 0, 0, 0, 1632, 105, 1, 0, 0, 0, 1633, 1635, 3, 50, 25, 0, 1634, 1633, 1, 0, 0, 0, 1634, 1635, 1, 0, 0, 0, 1635, 1636, 1, 0, 0, 0, 1636, 1639, 5, 144, 0, 0, 1637, 1638, 5, 110, 0, 0, 1638, 1640, 7, 8, 0, 0, 1639, 1637, 1, 0, 0, 0, 1639, 1640, 1, 0, 0, 0, 1640, 1641, 1, 0, 0, 0, 1641, 1642, 3, 112, 56, 0, 1642, 1645, 5, 133, 0, 0, 1643, 1646, 3, 190, 95, 0, 1644, 1646, 3, 108, 54, 0, 1645, 1643, 1, 0, 0, 0, 1645, 1644, 1, 0, 0, 0, 1646, 1647, 1, 0, 0, 0, 1647, 1648, 5, 6, 0, 0, 1648, 1659, 3, 68, 34, 0, 1649, 1652, 5, 5, 0, 0, 1650, 1653, 3, 190, 95, 0, 1651, 1653, 3, 108, 54, 0, 1652, 1650, 1, 0, 0, 0, 1652, 1651, 1, 0, 0, 0, 1653, 1654, 1, 0, 0, 0, 1654, 1655, 5, 6, 0, 0, 1655, 1656, 3, 68, 34, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1649, 1, 0, 0, 0, 1658, 1661, 1, 0, 0, 0, 1659, 1657, 1, 0, 0, 0, 1659, 1660, 1, 0, 0, 0, 1660, 1664, 1, 0, 0, 0, 1661, 1659, 1, 0, 0, 0, 1662, 1663, 5, 151, 0, 0, 1663, 1665, 3, 68, 34, 0, 1664, 1662, 1, 0, 0, 0, 1664, 1665, 1, 0, 0, 0, 1665, 1667, 1, 0, 0, 0, 1666, 1668, 3, 58, 29, 0, 1667, 1666, 1, 0, 0, 0, 1667, 1668, 1, 0, 0, 0, 1668, 107, 1, 0, 0, 0, 1669, 1670, 5, 3, 0, 0, 1670, 1675, 3, 190, 95, 0, 1671, 1672, 5, 5, 0, 0, 1672, 1674, 3, 190, 95, 0, 1673, 1671, 1, 0, 0, 0, 1674, 1677, 1, 0, 0, 0, 1675, 1673, 1, 0, 0, 0, 1675, 1676, 1, 0, 0, 0, 1676, 1678, 1, 0, 0, 0, 1677, 1675, 1, 0, 0, 0, 1678, 1679, 5, 4, 0, 0, 1679, 109, 1, 0, 0, 0, 1680, 1682, 3, 50, 25, 0, 1681, 1680, 1, 0, 0, 0, 1681, 1682, 1, 0, 0, 0, 1682, 1683, 1, 0, 0, 0, 1683, 1686, 5, 144, 0, 0, 1684, 1685, 5, 110, 0, 0, 1685, 1687, 7, 8, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1688, 1, 0, 0, 0, 1688, 1689, 3, 112, 56, 0, 1689, 1692, 5, 133, 0, 0, 1690, 1693, 3, 190, 95, 0, 1691, 1693, 3, 108, 54, 0, 1692, 1690, 1, 0, 0, 0, 1692, 1691, 1, 0, 0, 0, 1693, 1694, 1, 0, 0, 0, 1694, 1695, 5, 6, 0, 0, 1695, 1706, 3, 68, 34, 0, 1696, 1699, 5, 5, 0, 0, 1697, 1700, 3, 190, 95, 0, 1698, 1700, 3, 108, 54, 0, 1699, 1697, 1, 0, 0, 0, 1699, 1698, 1, 0, 0, 0, 1700, 1701, 1, 0, 0, 0, 1701, 1702, 5, 6, 0, 0, 1702, 1703, 3, 68, 34, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1696, 1, 0, 0, 0, 1705, 1708, 1, 0, 0, 0, 1706, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1711, 1, 0, 0, 0, 1708, 1706, 1, 0, 0, 0, 1709, 1710, 5, 151, 0, 0, 1710, 1712, 3, 68, 34, 0, 1711, 1709, 1, 0, 0, 0, 1711, 1712, 1, 0, 0, 0, 1712, 1717, 1, 0, 0, 0, 1713, 1715, 3, 134, 67, 0, 1714, 1713, 1, 0, 0, 0, 1714, 1715, 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 1718, 3, 136, 68, 0, 1717, 1714, 1, 0, 0, 0, 1717, 1718, 1, 0, 0, 0, 1718, 111, 1, 0, 0, 0, 1719, 1720, 3, 182, 91, 0, 1720, 1721, 5, 2, 0, 0, 1721, 1723, 1, 0, 0, 0, 1722, 1719, 1, 0, 0, 0, 1722, 1723, 1, 0, 0, 0, 1723, 1724, 1, 0, 0, 0, 1724, 1727, 3, 184, 92, 0, 1725, 1726, 5, 35, 0, 0, 1726, 1728, 3, 216, 108, 0, 1727, 1725, 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1734, 1, 0, 0, 0, 1729, 1730, 5, 87, 0, 0, 1730, 1731, 5, 42, 0, 0, 1731, 1735, 3, 196, 98, 0, 1732, 1733, 5, 104, 0, 0, 1733, 1735, 5, 87, 0, 0, 1734, 1729, 1, 0, 0, 0, 1734, 1732, 1, 0, 0, 0, 1734, 1735, 1, 0, 0, 0, 1735, 113, 1, 0, 0, 0, 1736, 1738, 5, 146, 0, 0, 1737, 1739, 3, 182, 91, 0, 1738, 1737, 1, 0, 0, 0, 1738, 1739, 1, 0, 0, 0, 1739, 1742, 1, 0, 0, 0, 1740, 1741, 5, 93, 0, 0, 1741, 1743, 3, 218, 109, 0, 1742, 1740, 1, 0, 0, 0, 1742, 1743, 1, 0, 0, 0, 1743, 115, 1, 0, 0, 0, 1744, 1745, 5, 181, 0, 0, 1745, 1746, 5, 3, 0, 0, 1746, 1747, 5, 151, 0, 0, 1747, 1748, 3, 68, 34, 0, 1748, 1749, 5, 4, 0, 0, 1749, 117, 1, 0, 0, 0, 1750, 1752, 5, 3, 0, 0, 1751, 1753, 3, 220, 110, 0, 1752, 1751, 1, 0, 0, 0, 1752, 1753, 1, 0, 0, 0, 1753, 1764, 1, 0, 0, 0, 1754, 1755, 5, 156, 0, 0, 1755, 1756, 5, 42, 0, 0, 1756, 1761, 3, 68, 34, 0, 1757, 1758, 5, 5, 0, 0, 1758, 1760, 3, 68, 34, 0, 1759, 1757, 1, 0, 0, 0, 1760, 1763, 1, 0, 0, 0, 1761, 1759, 1, 0, 0, 0, 1761, 1762, 1, 0, 0, 0, 1762, 1765, 1, 0, 0, 0, 1763, 1761, 1, 0, 0, 0, 1764, 1754, 1, 0, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, 1, 0, 0, 0, 1766, 1767, 5, 111, 0, 0, 1767, 1768, 5, 42, 0, 0, 1768, 1773, 3, 138, 69, 0, 1769, 1770, 5, 5, 0, 0, 1770, 1772, 3, 138, 69, 0, 1771, 1769, 1, 0, 0, 0, 1772, 1775, 1, 0, 0, 0, 1773, 1771, 1, 0, 0, 0, 1773, 1774, 1, 0, 0, 0, 1774, 1777, 1, 0, 0, 0, 1775, 1773, 1, 0, 0, 0, 1776, 1778, 3, 122, 61, 0, 1777, 1776, 1, 0, 0, 0, 1777, 1778, 1, 0, 0, 0, 1778, 1779, 1, 0, 0, 0, 1779, 1780, 5, 4, 0, 0, 1780, 119, 1, 0, 0, 0, 1781, 1815, 5, 155, 0, 0, 1782, 1816, 3, 214, 107, 0, 1783, 1785, 5, 3, 0, 0, 1784, 1786, 3, 220, 110, 0, 1785, 1784, 1, 0, 0, 0, 1785, 1786, 1, 0, 0, 0, 1786, 1797, 1, 0, 0, 0, 1787, 1788, 5, 156, 0, 0, 1788, 1789, 5, 42, 0, 0, 1789, 1794, 3, 68, 34, 0, 1790, 1791, 5, 5, 0, 0, 1791, 1793, 3, 68, 34, 0, 1792, 1790, 1, 0, 0, 0, 1793, 1796, 1, 0, 0, 0, 1794, 1792, 1, 0, 0, 0, 1794, 1795, 1, 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1794, 1, 0, 0, 0, 1797, 1787, 1, 0, 0, 0, 1797, 1798, 1, 0, 0, 0, 1798, 1809, 1, 0, 0, 0, 1799, 1800, 5, 111, 0, 0, 1800, 1801, 5, 42, 0, 0, 1801, 1806, 3, 138, 69, 0, 1802, 1803, 5, 5, 0, 0, 1803, 1805, 3, 138, 69, 0, 1804, 1802, 1, 0, 0, 0, 1805, 1808, 1, 0, 0, 0, 1806, 1804, 1, 0, 0, 0, 1806, 1807, 1, 0, 0, 0, 1807, 1810, 1, 0, 0, 0, 1808, 1806, 1, 0, 0, 0, 1809, 1799, 1, 0, 0, 0, 1809, 1810, 1, 0, 0, 0, 1810, 1812, 1, 0, 0, 0, 1811, 1813, 3, 122, 61, 0, 1812, 1811, 1, 0, 0, 0, 1812, 1813, 1, 0, 0, 0, 1813, 1814, 1, 0, 0, 0, 1814, 1816, 5, 4, 0, 0, 1815, 1782, 1, 0, 0, 0, 1815, 1783, 1, 0, 0, 0, 1816, 121, 1, 0, 0, 0, 1817, 1825, 3, 124, 62, 0, 1818, 1819, 5, 183, 0, 0, 1819, 1820, 5, 103, 0, 0, 1820, 1826, 5, 185, 0, 0, 1821, 1822, 5, 160, 0, 0, 1822, 1826, 5, 129, 0, 0, 1823, 1826, 5, 80, 0, 0, 1824, 1826, 5, 184, 0, 0, 1825, 1818, 1, 0, 0, 0, 1825, 1821, 1, 0, 0, 0, 1825, 1823, 1, 0, 0, 0, 1825, 1824, 1, 0, 0, 0, 1825, 1826, 1, 0, 0, 0, 1826, 123, 1, 0, 0, 0, 1827, 1834, 7, 19, 0, 0, 1828, 1835, 3, 146, 73, 0, 1829, 1830, 5, 41, 0, 0, 1830, 1831, 3, 142, 71, 0, 1831, 1832, 5, 34, 0, 0, 1832, 1833, 3, 144, 72, 0, 1833, 1835, 1, 0, 0, 0, 1834, 1828, 1, 0, 0, 0, 1834, 1829, 1, 0, 0, 0, 1835, 125, 1, 0, 0, 0, 1836, 1837, 3, 222, 111, 0, 1837, 1847, 5, 3, 0, 0, 1838, 1843, 3, 68, 34, 0, 1839, 1840, 5, 5, 0, 0, 1840, 1842, 3, 68, 34, 0, 1841, 1839, 1, 0, 0, 0, 1842, 1845, 1, 0, 0, 0, 1843, 1841, 1, 0, 0, 0, 1843, 1844, 1, 0, 0, 0, 1844, 1848, 1, 0, 0, 0, 1845, 1843, 1, 0, 0, 0, 1846, 1848, 5, 7, 0, 0, 1847, 1838, 1, 0, 0, 0, 1847, 1846, 1, 0, 0, 0, 1848, 1849, 1, 0, 0, 0, 1849, 1850, 5, 4, 0, 0, 1850, 127, 1, 0, 0, 0, 1851, 1852, 3, 224, 112, 0, 1852, 1865, 5, 3, 0, 0, 1853, 1855, 5, 64, 0, 0, 1854, 1853, 1, 0, 0, 0, 1854, 1855, 1, 0, 0, 0, 1855, 1856, 1, 0, 0, 0, 1856, 1861, 3, 68, 34, 0, 1857, 1858, 5, 5, 0, 0, 1858, 1860, 3, 68, 34, 0, 1859, 1857, 1, 0, 0, 0, 1860, 1863, 1, 0, 0, 0, 1861, 1859, 1, 0, 0, 0, 1861, 1862, 1, 0, 0, 0, 1862, 1866, 1, 0, 0, 0, 1863, 1861, 1, 0, 0, 0, 1864, 1866, 5, 7, 0, 0, 1865, 1854, 1, 0, 0, 0, 1865, 1864, 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1867, 1, 0, 0, 0, 1867, 1869, 5, 4, 0, 0, 1868, 1870, 3, 116, 58, 0, 1869, 1868, 1, 0, 0, 0, 1869, 1870, 1, 0, 0, 0, 1870, 129, 1, 0, 0, 0, 1871, 1872, 3, 148, 74, 0, 1872, 1882, 5, 3, 0, 0, 1873, 1878, 3, 68, 34, 0, 1874, 1875, 5, 5, 0, 0, 1875, 1877, 3, 68, 34, 0, 1876, 1874, 1, 0, 0, 0, 1877, 1880, 1, 0, 0, 0, 1878, 1876, 1, 0, 0, 0, 1878, 1879, 1, 0, 0, 0, 1879, 1883, 1, 0, 0, 0, 1880, 1878, 1, 0, 0, 0, 1881, 1883, 5, 7, 0, 0, 1882, 1873, 1, 0, 0, 0, 1882, 1881, 1, 0, 0, 0, 1882, 1883, 1, 0, 0, 0, 1883, 1884, 1, 0, 0, 0, 1884, 1886, 5, 4, 0, 0, 1885, 1887, 3, 116, 58, 0, 1886, 1885, 1, 0, 0, 0, 1886, 1887, 1, 0, 0, 0, 1887, 1888, 1, 0, 0, 0, 1888, 1891, 5, 155, 0, 0, 1889, 1892, 3, 118, 59, 0, 1890, 1892, 3, 214, 107, 0, 1891, 1889, 1, 0, 0, 0, 1891, 1890, 1, 0, 0, 0, 1892, 131, 1, 0, 0, 0, 1893, 1895, 5, 152, 0, 0, 1894, 1896, 5, 118, 0, 0, 1895, 1894, 1, 0, 0, 0, 1895, 1896, 1, 0, 0, 0, 1896, 1897, 1, 0, 0, 0, 1897, 1902, 3, 56, 28, 0, 1898, 1899, 5, 5, 0, 0, 1899, 1901, 3, 56, 28, 0, 1900, 1898, 1, 0, 0, 0, 1901, 1904, 1, 0, 0, 0, 1902, 1900, 1, 0, 0, 0, 1902, 1903, 1, 0, 0, 0, 1903, 133, 1, 0, 0, 0, 1904, 1902, 1, 0, 0, 0, 1905, 1906, 5, 111, 0, 0, 1906, 1907, 5, 42, 0, 0, 1907, 1912, 3, 138, 69, 0, 1908, 1909, 5, 5, 0, 0, 1909, 1911, 3, 138, 69, 0, 1910, 1908, 1, 0, 0, 0, 1911, 1914, 1, 0, 0, 0, 1912, 1910, 1, 0, 0, 0, 1912, 1913, 1, 0, 0, 0, 1913, 135, 1, 0, 0, 0, 1914, 1912, 1, 0, 0, 0, 1915, 1916, 5, 100, 0, 0, 1916, 1919, 3, 68, 34, 0, 1917, 1918, 7, 20, 0, 0, 1918, 1920, 3, 68, 34, 0, 1919, 1917, 1, 0, 0, 0, 1919, 1920, 1, 0, 0, 0, 1920, 137, 1, 0, 0, 0, 1921, 1924, 3, 68, 34, 0, 1922, 1923, 5, 47, 0, 0, 1923, 1925, 3, 192, 96, 0, 1924, 1922, 1, 0, 0, 0, 1924, 1925, 1, 0, 0, 0, 1925, 1927, 1, 0, 0, 0, 1926, 1928, 3, 140, 70, 0, 1927, 1926, 1, 0, 0, 0, 1927, 1928, 1, 0, 0, 0, 1928, 1931, 1, 0, 0, 0, 1929, 1930, 5, 178, 0, 0, 1930, 1932, 7, 21, 0, 0, 1931, 1929, 1, 0, 0, 0, 1931, 1932, 1, 0, 0, 0, 1932, 139, 1, 0, 0, 0, 1933, 1934, 7, 22, 0, 0, 1934, 141, 1, 0, 0, 0, 1935, 1936, 3, 68, 34, 0, 1936, 1937, 5, 158, 0, 0, 1937, 1946, 1, 0, 0, 0, 1938, 1939, 3, 68, 34, 0, 1939, 1940, 5, 161, 0, 0, 1940, 1946, 1, 0, 0, 0, 1941, 1942, 5, 160, 0, 0, 1942, 1946, 5, 129, 0, 0, 1943, 1944, 5, 159, 0, 0, 1944, 1946, 5, 158, 0, 0, 1945, 1935, 1, 0, 0, 0, 1945, 1938, 1, 0, 0, 0, 1945, 1941, 1, 0, 0, 0, 1945, 1943, 1, 0, 0, 0, 1946, 143, 1, 0, 0, 0, 1947, 1948, 3, 68, 34, 0, 1948, 1949, 5, 158, 0, 0, 1949, 1958, 1, 0, 0, 0, 1950, 1951, 3, 68, 34, 0, 1951, 1952, 5, 161, 0, 0, 1952, 1958, 1, 0, 0, 0, 1953, 1954, 5, 160, 0, 0, 1954, 1958, 5, 129, 0, 0, 1955, 1956, 5, 159, 0, 0, 1956, 1958, 5, 161, 0, 0, 1957, 1947, 1, 0, 0, 0, 1957, 1950, 1, 0, 0, 0, 1957, 1953, 1, 0, 0, 0, 1957, 1955, 1, 0, 0, 0, 1958, 145, 1, 0, 0, 0, 1959, 1960, 3, 68, 34, 0, 1960, 1961, 5, 158, 0, 0, 1961, 1967, 1, 0, 0, 0, 1962, 1963, 5, 159, 0, 0, 1963, 1967, 5, 158, 0, 0, 1964, 1965, 5, 160, 0, 0, 1965, 1967, 5, 129, 0, 0, 1966, 1959, 1, 0, 0, 0, 1966, 1962, 1, 0, 0, 0, 1966, 1964, 1, 0, 0, 0, 1967, 147, 1, 0, 0, 0, 1968, 1969, 7, 23, 0, 0, 1969, 1970, 5, 3, 0, 0, 1970, 1971, 3, 68, 34, 0, 1971, 1972, 5, 4, 0, 0, 1972, 1973, 5, 155, 0, 0, 1973, 1975, 5, 3, 0, 0, 1974, 1976, 3, 154, 77, 0, 1975, 1974, 1, 0, 0, 0, 1975, 1976, 1, 0, 0, 0, 1976, 1977, 1, 0, 0, 0, 1977, 1979, 3, 158, 79, 0, 1978, 1980, 3, 124, 62, 0, 1979, 1978, 1, 0, 0, 0, 1979, 1980, 1, 0, 0, 0, 1980, 1981, 1, 0, 0, 0, 1981, 1982, 5, 4, 0, 0, 1982, 2054, 1, 0, 0, 0, 1983, 1984, 7, 24, 0, 0, 1984, 1985, 5, 3, 0, 0, 1985, 1986, 5, 4, 0, 0, 1986, 1987, 5, 155, 0, 0, 1987, 1989, 5, 3, 0, 0, 1988, 1990, 3, 154, 77, 0, 1989, 1988, 1, 0, 0, 0, 1989, 1990, 1, 0, 0, 0, 1990, 1992, 1, 0, 0, 0, 1991, 1993, 3, 156, 78, 0, 1992, 1991, 1, 0, 0, 0, 1992, 1993, 1, 0, 0, 0, 1993, 1994, 1, 0, 0, 0, 1994, 2054, 5, 4, 0, 0, 1995, 1996, 7, 25, 0, 0, 1996, 1997, 5, 3, 0, 0, 1997, 1998, 5, 4, 0, 0, 1998, 1999, 5, 155, 0, 0, 1999, 2001, 5, 3, 0, 0, 2000, 2002, 3, 154, 77, 0, 2001, 2000, 1, 0, 0, 0, 2001, 2002, 1, 0, 0, 0, 2002, 2003, 1, 0, 0, 0, 2003, 2004, 3, 158, 79, 0, 2004, 2005, 5, 4, 0, 0, 2005, 2054, 1, 0, 0, 0, 2006, 2007, 7, 26, 0, 0, 2007, 2008, 5, 3, 0, 0, 2008, 2010, 3, 68, 34, 0, 2009, 2011, 3, 150, 75, 0, 2010, 2009, 1, 0, 0, 0, 2010, 2011, 1, 0, 0, 0, 2011, 2013, 1, 0, 0, 0, 2012, 2014, 3, 152, 76, 0, 2013, 2012, 1, 0, 0, 0, 2013, 2014, 1, 0, 0, 0, 2014, 2015, 1, 0, 0, 0, 2015, 2016, 5, 4, 0, 0, 2016, 2017, 5, 155, 0, 0, 2017, 2019, 5, 3, 0, 0, 2018, 2020, 3, 154, 77, 0, 2019, 2018, 1, 0, 0, 0, 2019, 2020, 1, 0, 0, 0, 2020, 2021, 1, 0, 0, 0, 2021, 2022, 3, 158, 79, 0, 2022, 2023, 5, 4, 0, 0, 2023, 2054, 1, 0, 0, 0, 2024, 2025, 5, 167, 0, 0, 2025, 2026, 5, 3, 0, 0, 2026, 2027, 3, 68, 34, 0, 2027, 2028, 5, 5, 0, 0, 2028, 2029, 3, 36, 18, 0, 2029, 2030, 5, 4, 0, 0, 2030, 2031, 5, 155, 0, 0, 2031, 2033, 5, 3, 0, 0, 2032, 2034, 3, 154, 77, 0, 2033, 2032, 1, 0, 0, 0, 2033, 2034, 1, 0, 0, 0, 2034, 2035, 1, 0, 0, 0, 2035, 2037, 3, 158, 79, 0, 2036, 2038, 3, 124, 62, 0, 2037, 2036, 1, 0, 0, 0, 2037, 2038, 1, 0, 0, 0, 2038, 2039, 1, 0, 0, 0, 2039, 2040, 5, 4, 0, 0, 2040, 2054, 1, 0, 0, 0, 2041, 2042, 5, 168, 0, 0, 2042, 2043, 5, 3, 0, 0, 2043, 2044, 3, 68, 34, 0, 2044, 2045, 5, 4, 0, 0, 2045, 2046, 5, 155, 0, 0, 2046, 2048, 5, 3, 0, 0, 2047, 2049, 3, 154, 77, 0, 2048, 2047, 1, 0, 0, 0, 2048, 2049, 1, 0, 0, 0, 2049, 2050, 1, 0, 0, 0, 2050, 2051, 3, 158, 79, 0, 2051, 2052, 5, 4, 0, 0, 2052, 2054, 1, 0, 0, 0, 2053, 1968, 1, 0, 0, 0, 2053, 1983, 1, 0, 0, 0, 2053, 1995, 1, 0, 0, 0, 2053, 2006, 1, 0, 0, 0, 2053, 2024, 1, 0, 0, 0, 2053, 2041, 1, 0, 0, 0, 2054, 149, 1, 0, 0, 0, 2055, 2056, 5, 5, 0, 0, 2056, 2057, 3, 36, 18, 0, 2057, 151, 1, 0, 0, 0, 2058, 2059, 5, 5, 0, 0, 2059, 2060, 3, 36, 18, 0, 2060, 153, 1, 0, 0, 0, 2061, 2062, 5, 156, 0, 0, 2062, 2064, 5, 42, 0, 0, 2063, 2065, 3, 68, 34, 0, 2064, 2063, 1, 0, 0, 0, 2065, 2066, 1, 0, 0, 0, 2066, 2064, 1, 0, 0, 0, 2066, 2067, 1, 0, 0, 0, 2067, 155, 1, 0, 0, 0, 2068, 2069, 5, 111, 0, 0, 2069, 2071, 5, 42, 0, 0, 2070, 2072, 3, 68, 34, 0, 2071, 2070, 1, 0, 0, 0, 2072, 2073, 1, 0, 0, 0, 2073, 2071, 1, 0, 0, 0, 2073, 2074, 1, 0, 0, 0, 2074, 157, 1, 0, 0, 0, 2075, 2076, 5, 111, 0, 0, 2076, 2077, 5, 42, 0, 0, 2077, 2078, 3, 158, 79, 0, 2078, 159, 1, 0, 0, 0, 2079, 2081, 3, 68, 34, 0, 2080, 2082, 3, 140, 70, 0, 2081, 2080, 1, 0, 0, 0, 2081, 2082, 1, 0, 0, 0, 2082, 2090, 1, 0, 0, 0, 2083, 2084, 5, 5, 0, 0, 2084, 2086, 3, 68, 34, 0, 2085, 2087, 3, 140, 70, 0, 2086, 2085, 1, 0, 0, 0, 2086, 2087, 1, 0, 0, 0, 2087, 2089, 1, 0, 0, 0, 2088, 2083, 1, 0, 0, 0, 2089, 2092, 1, 0, 0, 0, 2090, 2088, 1, 0, 0, 0, 2090, 2091, 1, 0, 0, 0, 2091, 161, 1, 0, 0, 0, 2092, 2090, 1, 0, 0, 0, 2093, 2094, 3, 84, 42, 0, 2094, 163, 1, 0, 0, 0, 2095, 2096, 3, 84, 42, 0, 2096, 165, 1, 0, 0, 0, 2097, 2098, 7, 27, 0, 0, 2098, 167, 1, 0, 0, 0, 2099, 2100, 5, 192, 0, 0, 2100, 169, 1, 0, 0, 0, 2101, 2104, 3, 68, 34, 0, 2102, 2104, 3, 30, 15, 0, 2103, 2101, 1, 0, 0, 0, 2103, 2102, 1, 0, 0, 0, 2104, 171, 1, 0, 0, 0, 2105, 2106, 7, 28, 0, 0, 2106, 173, 1, 0, 0, 0, 2107, 2108, 7, 29, 0, 0, 2108, 175, 1, 0, 0, 0, 2109, 2110, 3, 228, 114, 0, 2110, 177, 1, 0, 0, 0, 2111, 2112, 3, 228, 114, 0, 2112, 179, 1, 0, 0, 0, 2113, 2114, 3, 182, 91, 0, 2114, 2115, 5, 2, 0, 0, 2115, 2117, 1, 0, 0, 0, 2116, 2113, 1, 0, 0, 0, 2116, 2117, 1, 0, 0, 0, 2117, 2118, 1, 0, 0, 0, 2118, 2119, 3, 178, 89, 0, 2119, 181, 1, 0, 0, 0, 2120, 2121, 3, 228, 114, 0, 2121, 183, 1, 0, 0, 0, 2122, 2123, 3, 228, 114, 0, 2123, 185, 1, 0, 0, 0, 2124, 2125, 3, 228, 114, 0, 2125, 187, 1, 0, 0, 0, 2126, 2127, 3, 228, 114, 0, 2127, 189, 1, 0, 0, 0, 2128, 2129, 3, 228, 114, 0, 2129, 191, 1, 0, 0, 0, 2130, 2131, 3, 228, 114, 0, 2131, 193, 1, 0, 0, 0, 2132, 2133, 3, 228, 114, 0, 2133, 195, 1, 0, 0, 0, 2134, 2135, 3, 228, 114, 0, 2135, 197, 1, 0, 0, 0, 2136, 2137, 3, 228, 114, 0, 2137, 199, 1, 0, 0, 0, 2138, 2139, 3, 228, 114, 0, 2139, 201, 1, 0, 0, 0, 2140, 2141, 3, 228, 114, 0, 2141, 203, 1, 0, 0, 0, 2142, 2143, 3, 228, 114, 0, 2143, 205, 1, 0, 0, 0, 2144, 2145, 3, 228, 114, 0, 2145, 207, 1, 0, 0, 0, 2146, 2147, 7, 28, 0, 0, 2147, 209, 1, 0, 0, 0, 2148, 2149, 3, 228, 114, 0, 2149, 211, 1, 0, 0, 0, 2150, 2151, 3, 228, 114, 0, 2151, 213, 1, 0, 0, 0, 2152, 2153, 3, 228, 114, 0, 2153, 215, 1, 0, 0, 0, 2154, 2155, 3, 228, 114, 0, 2155, 217, 1, 0, 0, 0, 2156, 2157, 3, 228, 114, 0, 2157, 219, 1, 0, 0, 0, 2158, 2159, 3, 228, 114, 0, 2159, 221, 1, 0, 0, 0, 2160, 2161, 3, 228, 114, 0, 2161, 223, 1, 0, 0, 0, 2162, 2163, 3, 228, 114, 0, 2163, 225, 1, 0, 0, 0, 2164, 2165, 3, 228, 114, 0, 2165, 227, 1, 0, 0, 0, 2166, 2174, 5, 188, 0, 0, 2167, 2174, 3, 174, 87, 0, 2168, 2174, 5, 192, 0, 0, 2169, 2170, 5, 3, 0, 0, 2170, 2171, 3, 228, 114, 0, 2171, 2172, 5, 4, 0, 0, 2172, 2174, 1, 0, 0, 0, 2173, 2166, 1, 0, 0, 0, 2173, 2167, 1, 0, 0, 0, 2173, 2168, 1, 0, 0, 0, 2173, 2169, 1, 0, 0, 0, 2174, 229, 1, 0, 0, 0, 313, 233, 241, 248, 253, 259, 265, 267, 293, 300, 307, 313, 317, 322, 325, 332, 335, 339, 347, 351, 353, 357, 361, 365, 368, 375, 381, 387, 392, 403, 409, 413, 417, 420, 425, 429, 435, 440, 449, 456, 465, 468, 472, 476, 481, 487, 499, 503, 508, 511, 514, 519, 522, 536, 543, 550, 552, 555, 561, 566, 574, 579, 594, 600, 610, 615, 625, 629, 631, 635, 640, 642, 650, 656, 661, 668, 679, 682, 684, 691, 695, 702, 708, 714, 720, 725, 734, 739, 750, 755, 766, 771, 775, 791, 801, 806, 814, 826, 831, 842, 845, 847, 853, 856, 858, 862, 866, 873, 876, 879, 886, 889, 892, 895, 899, 907, 912, 923, 928, 937, 944, 948, 952, 955, 963, 976, 979, 987, 996, 1000, 1005, 1034, 1041, 1052, 1061, 1071, 1074, 1080, 1086, 1095, 1098, 1102, 1109, 1115, 1122, 1124, 1126, 1135, 1142, 1149, 1155, 1160, 1168, 1173, 1182, 1193, 1200, 1206, 1209, 1212, 1222, 1228, 1230, 1238, 1245, 1252, 1257, 1259, 1265, 1274, 1279, 1286, 1290, 1292, 1295, 1303, 1307, 1310, 1319, 1324, 1331, 1340, 1344, 1346, 1350, 1359, 1364, 1366, 1379, 1382, 1391, 1402, 1409, 1412, 1417, 1421, 1424, 1427, 1432, 1436, 1441, 1444, 1447, 1452, 1456, 1459, 1466, 1471, 1480, 1485, 1488, 1496, 1500, 1508, 1511, 1516, 1520, 1523, 1530, 1535, 1544, 1549, 1552, 1560, 1564, 1572, 1575, 1577, 1586, 1589, 1591, 1595, 1599, 1602, 1607, 1618, 1623, 1627, 1631, 1634, 1639, 1645, 1652, 1659, 1664, 1667, 1675, 1681, 1686, 1692, 1699, 1706, 1711, 1714, 1717, 1722, 1727, 1734, 1738, 1742, 1752, 1761, 1764, 1773, 1777, 1785, 1794, 1797, 1806, 1809, 1812, 1815, 1825, 1834, 1843, 1847, 1854, 1861, 1865, 1869, 1878, 1882, 1886, 1891, 1895, 1902, 1912, 1919, 1924, 1927, 1931, 1945, 1957, 1966, 1975, 1979, 1989, 1992, 2001, 2010, 2013, 2019, 2033, 2037, 2048, 2053, 2066, 2073, 2081, 2086, 2090, 2103, 2116, 2173] \ No newline at end of file diff --git a/internal/engine/sqlite/parser/SQLiteParser.tokens b/internal/engine/sqlite/parser/SQLiteParser.tokens deleted file mode 100644 index 6777c57bdc..0000000000 --- a/internal/engine/sqlite/parser/SQLiteParser.tokens +++ /dev/null @@ -1,223 +0,0 @@ -SCOL=1 -DOT=2 -OPEN_PAR=3 -CLOSE_PAR=4 -COMMA=5 -ASSIGN=6 -STAR=7 -PLUS=8 -PTR2=9 -PTR=10 -MINUS=11 -TILDE=12 -PIPE2=13 -DIV=14 -MOD=15 -LT2=16 -GT2=17 -AMP=18 -PIPE=19 -LT=20 -LT_EQ=21 -GT=22 -GT_EQ=23 -EQ=24 -NOT_EQ1=25 -NOT_EQ2=26 -ABORT_=27 -ACTION_=28 -ADD_=29 -AFTER_=30 -ALL_=31 -ALTER_=32 -ANALYZE_=33 -AND_=34 -AS_=35 -ASC_=36 -ATTACH_=37 -AUTOINCREMENT_=38 -BEFORE_=39 -BEGIN_=40 -BETWEEN_=41 -BY_=42 -CASCADE_=43 -CASE_=44 -CAST_=45 -CHECK_=46 -COLLATE_=47 -COLUMN_=48 -COMMIT_=49 -CONFLICT_=50 -CONSTRAINT_=51 -CREATE_=52 -CROSS_=53 -CURRENT_DATE_=54 -CURRENT_TIME_=55 -CURRENT_TIMESTAMP_=56 -DATABASE_=57 -DEFAULT_=58 -DEFERRABLE_=59 -DEFERRED_=60 -DELETE_=61 -DESC_=62 -DETACH_=63 -DISTINCT_=64 -DROP_=65 -EACH_=66 -ELSE_=67 -END_=68 -ESCAPE_=69 -EXCEPT_=70 -EXCLUSIVE_=71 -EXISTS_=72 -EXPLAIN_=73 -FAIL_=74 -FOR_=75 -FOREIGN_=76 -FROM_=77 -FULL_=78 -GLOB_=79 -GROUP_=80 -HAVING_=81 -IF_=82 -IGNORE_=83 -IMMEDIATE_=84 -IN_=85 -INDEX_=86 -INDEXED_=87 -INITIALLY_=88 -INNER_=89 -INSERT_=90 -INSTEAD_=91 -INTERSECT_=92 -INTO_=93 -IS_=94 -ISNULL_=95 -JOIN_=96 -KEY_=97 -LEFT_=98 -LIKE_=99 -LIMIT_=100 -MATCH_=101 -NATURAL_=102 -NO_=103 -NOT_=104 -NOTNULL_=105 -NULL_=106 -OF_=107 -OFFSET_=108 -ON_=109 -OR_=110 -ORDER_=111 -OUTER_=112 -PLAN_=113 -PRAGMA_=114 -PRIMARY_=115 -QUERY_=116 -RAISE_=117 -RECURSIVE_=118 -REFERENCES_=119 -REGEXP_=120 -REINDEX_=121 -RELEASE_=122 -RENAME_=123 -REPLACE_=124 -RESTRICT_=125 -RETURNING_=126 -RIGHT_=127 -ROLLBACK_=128 -ROW_=129 -ROWS_=130 -SAVEPOINT_=131 -SELECT_=132 -SET_=133 -STRICT_=134 -TABLE_=135 -TEMP_=136 -TEMPORARY_=137 -THEN_=138 -TO_=139 -TRANSACTION_=140 -TRIGGER_=141 -UNION_=142 -UNIQUE_=143 -UPDATE_=144 -USING_=145 -VACUUM_=146 -VALUES_=147 -VIEW_=148 -VIRTUAL_=149 -WHEN_=150 -WHERE_=151 -WITH_=152 -WITHOUT_=153 -FIRST_VALUE_=154 -OVER_=155 -PARTITION_=156 -RANGE_=157 -PRECEDING_=158 -UNBOUNDED_=159 -CURRENT_=160 -FOLLOWING_=161 -CUME_DIST_=162 -DENSE_RANK_=163 -LAG_=164 -LAST_VALUE_=165 -LEAD_=166 -NTH_VALUE_=167 -NTILE_=168 -PERCENT_RANK_=169 -RANK_=170 -ROW_NUMBER_=171 -GENERATED_=172 -ALWAYS_=173 -STORED_=174 -TRUE_=175 -FALSE_=176 -WINDOW_=177 -NULLS_=178 -FIRST_=179 -LAST_=180 -FILTER_=181 -GROUPS_=182 -EXCLUDE_=183 -TIES_=184 -OTHERS_=185 -DO_=186 -NOTHING_=187 -IDENTIFIER=188 -NUMERIC_LITERAL=189 -NUMBERED_BIND_PARAMETER=190 -NAMED_BIND_PARAMETER=191 -STRING_LITERAL=192 -BLOB_LITERAL=193 -SINGLE_LINE_COMMENT=194 -MULTILINE_COMMENT=195 -SPACES=196 -UNEXPECTED_CHAR=197 -';'=1 -'.'=2 -'('=3 -')'=4 -','=5 -'='=6 -'*'=7 -'+'=8 -'->>'=9 -'->'=10 -'-'=11 -'~'=12 -'||'=13 -'/'=14 -'%'=15 -'<<'=16 -'>>'=17 -'&'=18 -'|'=19 -'<'=20 -'<='=21 -'>'=22 -'>='=23 -'=='=24 -'!='=25 -'<>'=26 diff --git a/internal/engine/sqlite/parser/sqlite_lexer.go b/internal/engine/sqlite/parser/sqlite_lexer.go deleted file mode 100644 index d3cfd14f1e..0000000000 --- a/internal/engine/sqlite/parser/sqlite_lexer.go +++ /dev/null @@ -1,1212 +0,0 @@ -// Code generated from SQLiteLexer.g4 by ANTLR 4.13.1. DO NOT EDIT. - -package parser - -import ( - "fmt" - "github.com/antlr4-go/antlr/v4" - "sync" - "unicode" -) - -// Suppress unused import error -var _ = fmt.Printf -var _ = sync.Once{} -var _ = unicode.IsLetter - -type SQLiteLexer struct { - *antlr.BaseLexer - channelNames []string - modeNames []string - // TODO: EOF string -} - -var SQLiteLexerLexerStaticData struct { - once sync.Once - serializedATN []int32 - ChannelNames []string - ModeNames []string - LiteralNames []string - SymbolicNames []string - RuleNames []string - PredictionContextCache *antlr.PredictionContextCache - atn *antlr.ATN - decisionToDFA []*antlr.DFA -} - -func sqlitelexerLexerInit() { - staticData := &SQLiteLexerLexerStaticData - staticData.ChannelNames = []string{ - "DEFAULT_TOKEN_CHANNEL", "HIDDEN", - } - staticData.ModeNames = []string{ - "DEFAULT_MODE", - } - staticData.LiteralNames = []string{ - "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'->>'", - "'->'", "'-'", "'~'", "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", - "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'<>'", - } - staticData.SymbolicNames = []string{ - "", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", - "PLUS", "PTR2", "PTR", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", - "GT2", "AMP", "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", - "NOT_EQ2", "ABORT_", "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", - "ANALYZE_", "AND_", "AS_", "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", - "BEGIN_", "BETWEEN_", "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", - "COLLATE_", "COLUMN_", "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", - "CROSS_", "CURRENT_DATE_", "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", - "DEFAULT_", "DEFERRABLE_", "DEFERRED_", "DELETE_", "DESC_", "DETACH_", - "DISTINCT_", "DROP_", "EACH_", "ELSE_", "END_", "ESCAPE_", "EXCEPT_", - "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", "FAIL_", "FOR_", "FOREIGN_", "FROM_", - "FULL_", "GLOB_", "GROUP_", "HAVING_", "IF_", "IGNORE_", "IMMEDIATE_", - "IN_", "INDEX_", "INDEXED_", "INITIALLY_", "INNER_", "INSERT_", "INSTEAD_", - "INTERSECT_", "INTO_", "IS_", "ISNULL_", "JOIN_", "KEY_", "LEFT_", "LIKE_", - "LIMIT_", "MATCH_", "NATURAL_", "NO_", "NOT_", "NOTNULL_", "NULL_", - "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", "OUTER_", "PLAN_", "PRAGMA_", - "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", "REFERENCES_", "REGEXP_", - "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", "RESTRICT_", "RETURNING_", - "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", "SELECT_", "SET_", - "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_", "TRANSACTION_", - "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", "VACUUM_", "VALUES_", - "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", "WITHOUT_", "FIRST_VALUE_", - "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", "UNBOUNDED_", "CURRENT_", - "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", "LAG_", "LAST_VALUE_", "LEAD_", - "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", "RANK_", "ROW_NUMBER_", "GENERATED_", - "ALWAYS_", "STORED_", "TRUE_", "FALSE_", "WINDOW_", "NULLS_", "FIRST_", - "LAST_", "FILTER_", "GROUPS_", "EXCLUDE_", "TIES_", "OTHERS_", "DO_", - "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", "NUMBERED_BIND_PARAMETER", - "NAMED_BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT", - "MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR", - } - staticData.RuleNames = []string{ - "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", "PLUS", - "PTR2", "PTR", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", "GT2", - "AMP", "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", "NOT_EQ2", - "ABORT_", "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", "ANALYZE_", - "AND_", "AS_", "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", "BEGIN_", - "BETWEEN_", "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", "COLLATE_", - "COLUMN_", "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", "CROSS_", - "CURRENT_DATE_", "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", - "DEFAULT_", "DEFERRABLE_", "DEFERRED_", "DELETE_", "DESC_", "DETACH_", - "DISTINCT_", "DROP_", "EACH_", "ELSE_", "END_", "ESCAPE_", "EXCEPT_", - "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", "FAIL_", "FOR_", "FOREIGN_", "FROM_", - "FULL_", "GLOB_", "GROUP_", "HAVING_", "IF_", "IGNORE_", "IMMEDIATE_", - "IN_", "INDEX_", "INDEXED_", "INITIALLY_", "INNER_", "INSERT_", "INSTEAD_", - "INTERSECT_", "INTO_", "IS_", "ISNULL_", "JOIN_", "KEY_", "LEFT_", "LIKE_", - "LIMIT_", "MATCH_", "NATURAL_", "NO_", "NOT_", "NOTNULL_", "NULL_", - "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", "OUTER_", "PLAN_", "PRAGMA_", - "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", "REFERENCES_", "REGEXP_", - "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", "RESTRICT_", "RETURNING_", - "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", "SELECT_", "SET_", - "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_", "TRANSACTION_", - "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", "VACUUM_", "VALUES_", - "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", "WITHOUT_", "FIRST_VALUE_", - "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", "UNBOUNDED_", "CURRENT_", - "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", "LAG_", "LAST_VALUE_", "LEAD_", - "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", "RANK_", "ROW_NUMBER_", "GENERATED_", - "ALWAYS_", "STORED_", "TRUE_", "FALSE_", "WINDOW_", "NULLS_", "FIRST_", - "LAST_", "FILTER_", "GROUPS_", "EXCLUDE_", "TIES_", "OTHERS_", "DO_", - "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", "NUMBERED_BIND_PARAMETER", - "NAMED_BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT", - "MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR", "HEX_DIGIT", "DIGIT", - "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", - "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", - } - staticData.PredictionContextCache = antlr.NewPredictionContextCache() - staticData.serializedATN = []int32{ - 4, 0, 197, 1829, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, - 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, - 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, - 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, - 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, - 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, - 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, - 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, - 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, - 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, - 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, - 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, - 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, - 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, - 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, - 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, - 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, - 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, - 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, - 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, - 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, - 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, - 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, - 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, - 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, - 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, - 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, - 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, - 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, - 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, - 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, - 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, - 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, - 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, - 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, - 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, - 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, - 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, - 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, - 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, - 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, - 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, - 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, - 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, - 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, - 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, - 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 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, 8, 1, 8, 1, 9, 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, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, - 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, - 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, - 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, - 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, - 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, - 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, - 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 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, 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, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, - 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 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, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, - 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, - 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, - 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, - 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, - 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 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, 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, 54, 1, 54, 1, 55, 1, - 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 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, 56, 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, 58, 1, 58, 1, 58, 1, 58, 1, - 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, - 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 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, 64, 1, 64, 1, - 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, - 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, - 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, - 1, 70, 1, 70, 1, 70, 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, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, - 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, - 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, - 1, 76, 1, 76, 1, 76, 1, 76, 1, 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, 80, 1, 81, 1, 81, 1, 81, 1, 82, 1, - 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, - 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 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, 86, - 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 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, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, - 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 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, 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, 101, 1, 101, 1, 101, 1, 101, 1, - 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 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, 105, 1, 105, 1, 105, 1, 105, 1, 105, 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, 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, 112, 1, 112, 1, - 112, 1, 112, 1, 112, 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, 115, 1, 115, 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, 1, 118, 1, - 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 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, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, - 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, - 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, - 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, - 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, - 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 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, 129, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, - 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, - 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 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, 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, - 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, - 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, - 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, - 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, - 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, - 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, - 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, - 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, - 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, - 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, - 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, - 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, - 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, - 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, - 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, - 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, - 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, - 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, - 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, - 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, - 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, - 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, - 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, - 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, - 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, - 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, - 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, - 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, - 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, - 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, - 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, - 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, - 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, - 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, - 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, - 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, - 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, - 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, - 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, - 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 186, 1, - 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, - 187, 1, 187, 5, 187, 1636, 8, 187, 10, 187, 12, 187, 1639, 9, 187, 1, 187, - 1, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1646, 8, 187, 10, 187, 12, 187, - 1649, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1654, 8, 187, 10, 187, 12, - 187, 1657, 9, 187, 1, 187, 1, 187, 1, 187, 5, 187, 1662, 8, 187, 10, 187, - 12, 187, 1665, 9, 187, 3, 187, 1667, 8, 187, 1, 188, 4, 188, 1670, 8, 188, - 11, 188, 12, 188, 1671, 1, 188, 1, 188, 5, 188, 1676, 8, 188, 10, 188, - 12, 188, 1679, 9, 188, 3, 188, 1681, 8, 188, 1, 188, 1, 188, 4, 188, 1685, - 8, 188, 11, 188, 12, 188, 1686, 3, 188, 1689, 8, 188, 1, 188, 1, 188, 3, - 188, 1693, 8, 188, 1, 188, 4, 188, 1696, 8, 188, 11, 188, 12, 188, 1697, - 3, 188, 1700, 8, 188, 1, 188, 1, 188, 1, 188, 1, 188, 4, 188, 1706, 8, - 188, 11, 188, 12, 188, 1707, 3, 188, 1710, 8, 188, 1, 189, 1, 189, 5, 189, - 1714, 8, 189, 10, 189, 12, 189, 1717, 9, 189, 1, 190, 1, 190, 1, 190, 1, - 191, 1, 191, 1, 191, 1, 191, 5, 191, 1726, 8, 191, 10, 191, 12, 191, 1729, - 9, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, - 1, 193, 5, 193, 1740, 8, 193, 10, 193, 12, 193, 1743, 9, 193, 1, 193, 3, - 193, 1746, 8, 193, 1, 193, 1, 193, 3, 193, 1750, 8, 193, 1, 193, 1, 193, - 1, 194, 1, 194, 1, 194, 1, 194, 5, 194, 1758, 8, 194, 10, 194, 12, 194, - 1761, 9, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 195, 1, 195, 1, - 195, 1, 195, 1, 196, 1, 196, 1, 197, 1, 197, 1, 198, 1, 198, 1, 199, 1, - 199, 1, 200, 1, 200, 1, 201, 1, 201, 1, 202, 1, 202, 1, 203, 1, 203, 1, - 204, 1, 204, 1, 205, 1, 205, 1, 206, 1, 206, 1, 207, 1, 207, 1, 208, 1, - 208, 1, 209, 1, 209, 1, 210, 1, 210, 1, 211, 1, 211, 1, 212, 1, 212, 1, - 213, 1, 213, 1, 214, 1, 214, 1, 215, 1, 215, 1, 216, 1, 216, 1, 217, 1, - 217, 1, 218, 1, 218, 1, 219, 1, 219, 1, 220, 1, 220, 1, 221, 1, 221, 1, - 222, 1, 222, 1, 223, 1, 223, 1, 224, 1, 224, 1, 1759, 0, 225, 1, 1, 3, - 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, - 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, - 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, - 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, - 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, - 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, - 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, - 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, - 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, - 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, - 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, - 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, - 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, - 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, - 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, - 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, - 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, - 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, - 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, - 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, - 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, - 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, - 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, - 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, - 389, 195, 391, 196, 393, 197, 395, 0, 397, 0, 399, 0, 401, 0, 403, 0, 405, - 0, 407, 0, 409, 0, 411, 0, 413, 0, 415, 0, 417, 0, 419, 0, 421, 0, 423, - 0, 425, 0, 427, 0, 429, 0, 431, 0, 433, 0, 435, 0, 437, 0, 439, 0, 441, - 0, 443, 0, 445, 0, 447, 0, 449, 0, 1, 0, 38, 1, 0, 34, 34, 1, 0, 96, 96, - 1, 0, 93, 93, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, - 95, 97, 122, 2, 0, 43, 43, 45, 45, 3, 0, 36, 36, 58, 58, 64, 64, 1, 0, - 39, 39, 2, 0, 10, 10, 13, 13, 3, 0, 9, 11, 13, 13, 32, 32, 3, 0, 48, 57, - 65, 70, 97, 102, 1, 0, 48, 57, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, - 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, - 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, - 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, - 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, - 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, - 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, - 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, - 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, - 1826, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, - 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, - 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, - 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, - 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, - 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, - 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, - 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, - 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, - 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, - 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, - 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, - 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, - 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, - 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, - 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, - 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, - 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, - 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, - 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, - 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, - 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, - 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, - 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, - 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, - 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, - 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, - 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, - 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, - 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, - 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, - 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, - 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, - 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, - 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, - 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, - 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, - 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, - 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, - 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, - 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, - 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, - 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, - 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, - 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, - 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, - 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, - 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, - 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, - 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, - 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, - 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, - 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, - 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 1, 451, - 1, 0, 0, 0, 3, 453, 1, 0, 0, 0, 5, 455, 1, 0, 0, 0, 7, 457, 1, 0, 0, 0, - 9, 459, 1, 0, 0, 0, 11, 461, 1, 0, 0, 0, 13, 463, 1, 0, 0, 0, 15, 465, - 1, 0, 0, 0, 17, 467, 1, 0, 0, 0, 19, 471, 1, 0, 0, 0, 21, 474, 1, 0, 0, - 0, 23, 476, 1, 0, 0, 0, 25, 478, 1, 0, 0, 0, 27, 481, 1, 0, 0, 0, 29, 483, - 1, 0, 0, 0, 31, 485, 1, 0, 0, 0, 33, 488, 1, 0, 0, 0, 35, 491, 1, 0, 0, - 0, 37, 493, 1, 0, 0, 0, 39, 495, 1, 0, 0, 0, 41, 497, 1, 0, 0, 0, 43, 500, - 1, 0, 0, 0, 45, 502, 1, 0, 0, 0, 47, 505, 1, 0, 0, 0, 49, 508, 1, 0, 0, - 0, 51, 511, 1, 0, 0, 0, 53, 514, 1, 0, 0, 0, 55, 520, 1, 0, 0, 0, 57, 527, - 1, 0, 0, 0, 59, 531, 1, 0, 0, 0, 61, 537, 1, 0, 0, 0, 63, 541, 1, 0, 0, - 0, 65, 547, 1, 0, 0, 0, 67, 555, 1, 0, 0, 0, 69, 559, 1, 0, 0, 0, 71, 562, - 1, 0, 0, 0, 73, 566, 1, 0, 0, 0, 75, 573, 1, 0, 0, 0, 77, 587, 1, 0, 0, - 0, 79, 594, 1, 0, 0, 0, 81, 600, 1, 0, 0, 0, 83, 608, 1, 0, 0, 0, 85, 611, - 1, 0, 0, 0, 87, 619, 1, 0, 0, 0, 89, 624, 1, 0, 0, 0, 91, 629, 1, 0, 0, - 0, 93, 635, 1, 0, 0, 0, 95, 643, 1, 0, 0, 0, 97, 650, 1, 0, 0, 0, 99, 657, - 1, 0, 0, 0, 101, 666, 1, 0, 0, 0, 103, 677, 1, 0, 0, 0, 105, 684, 1, 0, - 0, 0, 107, 690, 1, 0, 0, 0, 109, 703, 1, 0, 0, 0, 111, 716, 1, 0, 0, 0, - 113, 734, 1, 0, 0, 0, 115, 743, 1, 0, 0, 0, 117, 751, 1, 0, 0, 0, 119, - 762, 1, 0, 0, 0, 121, 771, 1, 0, 0, 0, 123, 778, 1, 0, 0, 0, 125, 783, - 1, 0, 0, 0, 127, 790, 1, 0, 0, 0, 129, 799, 1, 0, 0, 0, 131, 804, 1, 0, - 0, 0, 133, 809, 1, 0, 0, 0, 135, 814, 1, 0, 0, 0, 137, 818, 1, 0, 0, 0, - 139, 825, 1, 0, 0, 0, 141, 832, 1, 0, 0, 0, 143, 842, 1, 0, 0, 0, 145, - 849, 1, 0, 0, 0, 147, 857, 1, 0, 0, 0, 149, 862, 1, 0, 0, 0, 151, 866, - 1, 0, 0, 0, 153, 874, 1, 0, 0, 0, 155, 879, 1, 0, 0, 0, 157, 884, 1, 0, - 0, 0, 159, 889, 1, 0, 0, 0, 161, 895, 1, 0, 0, 0, 163, 902, 1, 0, 0, 0, - 165, 905, 1, 0, 0, 0, 167, 912, 1, 0, 0, 0, 169, 922, 1, 0, 0, 0, 171, - 925, 1, 0, 0, 0, 173, 931, 1, 0, 0, 0, 175, 939, 1, 0, 0, 0, 177, 949, - 1, 0, 0, 0, 179, 955, 1, 0, 0, 0, 181, 962, 1, 0, 0, 0, 183, 970, 1, 0, - 0, 0, 185, 980, 1, 0, 0, 0, 187, 985, 1, 0, 0, 0, 189, 988, 1, 0, 0, 0, - 191, 995, 1, 0, 0, 0, 193, 1000, 1, 0, 0, 0, 195, 1004, 1, 0, 0, 0, 197, - 1009, 1, 0, 0, 0, 199, 1014, 1, 0, 0, 0, 201, 1020, 1, 0, 0, 0, 203, 1026, - 1, 0, 0, 0, 205, 1034, 1, 0, 0, 0, 207, 1037, 1, 0, 0, 0, 209, 1041, 1, - 0, 0, 0, 211, 1049, 1, 0, 0, 0, 213, 1054, 1, 0, 0, 0, 215, 1057, 1, 0, - 0, 0, 217, 1064, 1, 0, 0, 0, 219, 1067, 1, 0, 0, 0, 221, 1070, 1, 0, 0, - 0, 223, 1076, 1, 0, 0, 0, 225, 1082, 1, 0, 0, 0, 227, 1087, 1, 0, 0, 0, - 229, 1094, 1, 0, 0, 0, 231, 1102, 1, 0, 0, 0, 233, 1108, 1, 0, 0, 0, 235, - 1114, 1, 0, 0, 0, 237, 1124, 1, 0, 0, 0, 239, 1135, 1, 0, 0, 0, 241, 1142, - 1, 0, 0, 0, 243, 1150, 1, 0, 0, 0, 245, 1158, 1, 0, 0, 0, 247, 1165, 1, - 0, 0, 0, 249, 1173, 1, 0, 0, 0, 251, 1182, 1, 0, 0, 0, 253, 1192, 1, 0, - 0, 0, 255, 1198, 1, 0, 0, 0, 257, 1207, 1, 0, 0, 0, 259, 1211, 1, 0, 0, - 0, 261, 1216, 1, 0, 0, 0, 263, 1226, 1, 0, 0, 0, 265, 1233, 1, 0, 0, 0, - 267, 1237, 1, 0, 0, 0, 269, 1244, 1, 0, 0, 0, 271, 1250, 1, 0, 0, 0, 273, - 1255, 1, 0, 0, 0, 275, 1265, 1, 0, 0, 0, 277, 1270, 1, 0, 0, 0, 279, 1273, - 1, 0, 0, 0, 281, 1285, 1, 0, 0, 0, 283, 1293, 1, 0, 0, 0, 285, 1299, 1, - 0, 0, 0, 287, 1306, 1, 0, 0, 0, 289, 1313, 1, 0, 0, 0, 291, 1319, 1, 0, - 0, 0, 293, 1326, 1, 0, 0, 0, 295, 1333, 1, 0, 0, 0, 297, 1338, 1, 0, 0, - 0, 299, 1346, 1, 0, 0, 0, 301, 1351, 1, 0, 0, 0, 303, 1357, 1, 0, 0, 0, - 305, 1362, 1, 0, 0, 0, 307, 1370, 1, 0, 0, 0, 309, 1382, 1, 0, 0, 0, 311, - 1387, 1, 0, 0, 0, 313, 1397, 1, 0, 0, 0, 315, 1403, 1, 0, 0, 0, 317, 1413, - 1, 0, 0, 0, 319, 1423, 1, 0, 0, 0, 321, 1431, 1, 0, 0, 0, 323, 1441, 1, - 0, 0, 0, 325, 1451, 1, 0, 0, 0, 327, 1462, 1, 0, 0, 0, 329, 1466, 1, 0, - 0, 0, 331, 1477, 1, 0, 0, 0, 333, 1482, 1, 0, 0, 0, 335, 1492, 1, 0, 0, - 0, 337, 1498, 1, 0, 0, 0, 339, 1511, 1, 0, 0, 0, 341, 1516, 1, 0, 0, 0, - 343, 1527, 1, 0, 0, 0, 345, 1537, 1, 0, 0, 0, 347, 1544, 1, 0, 0, 0, 349, - 1551, 1, 0, 0, 0, 351, 1556, 1, 0, 0, 0, 353, 1562, 1, 0, 0, 0, 355, 1569, - 1, 0, 0, 0, 357, 1575, 1, 0, 0, 0, 359, 1581, 1, 0, 0, 0, 361, 1586, 1, - 0, 0, 0, 363, 1593, 1, 0, 0, 0, 365, 1600, 1, 0, 0, 0, 367, 1608, 1, 0, - 0, 0, 369, 1613, 1, 0, 0, 0, 371, 1620, 1, 0, 0, 0, 373, 1623, 1, 0, 0, - 0, 375, 1666, 1, 0, 0, 0, 377, 1709, 1, 0, 0, 0, 379, 1711, 1, 0, 0, 0, - 381, 1718, 1, 0, 0, 0, 383, 1721, 1, 0, 0, 0, 385, 1732, 1, 0, 0, 0, 387, - 1735, 1, 0, 0, 0, 389, 1753, 1, 0, 0, 0, 391, 1767, 1, 0, 0, 0, 393, 1771, - 1, 0, 0, 0, 395, 1773, 1, 0, 0, 0, 397, 1775, 1, 0, 0, 0, 399, 1777, 1, - 0, 0, 0, 401, 1779, 1, 0, 0, 0, 403, 1781, 1, 0, 0, 0, 405, 1783, 1, 0, - 0, 0, 407, 1785, 1, 0, 0, 0, 409, 1787, 1, 0, 0, 0, 411, 1789, 1, 0, 0, - 0, 413, 1791, 1, 0, 0, 0, 415, 1793, 1, 0, 0, 0, 417, 1795, 1, 0, 0, 0, - 419, 1797, 1, 0, 0, 0, 421, 1799, 1, 0, 0, 0, 423, 1801, 1, 0, 0, 0, 425, - 1803, 1, 0, 0, 0, 427, 1805, 1, 0, 0, 0, 429, 1807, 1, 0, 0, 0, 431, 1809, - 1, 0, 0, 0, 433, 1811, 1, 0, 0, 0, 435, 1813, 1, 0, 0, 0, 437, 1815, 1, - 0, 0, 0, 439, 1817, 1, 0, 0, 0, 441, 1819, 1, 0, 0, 0, 443, 1821, 1, 0, - 0, 0, 445, 1823, 1, 0, 0, 0, 447, 1825, 1, 0, 0, 0, 449, 1827, 1, 0, 0, - 0, 451, 452, 5, 59, 0, 0, 452, 2, 1, 0, 0, 0, 453, 454, 5, 46, 0, 0, 454, - 4, 1, 0, 0, 0, 455, 456, 5, 40, 0, 0, 456, 6, 1, 0, 0, 0, 457, 458, 5, - 41, 0, 0, 458, 8, 1, 0, 0, 0, 459, 460, 5, 44, 0, 0, 460, 10, 1, 0, 0, - 0, 461, 462, 5, 61, 0, 0, 462, 12, 1, 0, 0, 0, 463, 464, 5, 42, 0, 0, 464, - 14, 1, 0, 0, 0, 465, 466, 5, 43, 0, 0, 466, 16, 1, 0, 0, 0, 467, 468, 5, - 45, 0, 0, 468, 469, 5, 62, 0, 0, 469, 470, 5, 62, 0, 0, 470, 18, 1, 0, - 0, 0, 471, 472, 5, 45, 0, 0, 472, 473, 5, 62, 0, 0, 473, 20, 1, 0, 0, 0, - 474, 475, 5, 45, 0, 0, 475, 22, 1, 0, 0, 0, 476, 477, 5, 126, 0, 0, 477, - 24, 1, 0, 0, 0, 478, 479, 5, 124, 0, 0, 479, 480, 5, 124, 0, 0, 480, 26, - 1, 0, 0, 0, 481, 482, 5, 47, 0, 0, 482, 28, 1, 0, 0, 0, 483, 484, 5, 37, - 0, 0, 484, 30, 1, 0, 0, 0, 485, 486, 5, 60, 0, 0, 486, 487, 5, 60, 0, 0, - 487, 32, 1, 0, 0, 0, 488, 489, 5, 62, 0, 0, 489, 490, 5, 62, 0, 0, 490, - 34, 1, 0, 0, 0, 491, 492, 5, 38, 0, 0, 492, 36, 1, 0, 0, 0, 493, 494, 5, - 124, 0, 0, 494, 38, 1, 0, 0, 0, 495, 496, 5, 60, 0, 0, 496, 40, 1, 0, 0, - 0, 497, 498, 5, 60, 0, 0, 498, 499, 5, 61, 0, 0, 499, 42, 1, 0, 0, 0, 500, - 501, 5, 62, 0, 0, 501, 44, 1, 0, 0, 0, 502, 503, 5, 62, 0, 0, 503, 504, - 5, 61, 0, 0, 504, 46, 1, 0, 0, 0, 505, 506, 5, 61, 0, 0, 506, 507, 5, 61, - 0, 0, 507, 48, 1, 0, 0, 0, 508, 509, 5, 33, 0, 0, 509, 510, 5, 61, 0, 0, - 510, 50, 1, 0, 0, 0, 511, 512, 5, 60, 0, 0, 512, 513, 5, 62, 0, 0, 513, - 52, 1, 0, 0, 0, 514, 515, 3, 399, 199, 0, 515, 516, 3, 401, 200, 0, 516, - 517, 3, 427, 213, 0, 517, 518, 3, 433, 216, 0, 518, 519, 3, 437, 218, 0, - 519, 54, 1, 0, 0, 0, 520, 521, 3, 399, 199, 0, 521, 522, 3, 403, 201, 0, - 522, 523, 3, 437, 218, 0, 523, 524, 3, 415, 207, 0, 524, 525, 3, 427, 213, - 0, 525, 526, 3, 425, 212, 0, 526, 56, 1, 0, 0, 0, 527, 528, 3, 399, 199, - 0, 528, 529, 3, 405, 202, 0, 529, 530, 3, 405, 202, 0, 530, 58, 1, 0, 0, - 0, 531, 532, 3, 399, 199, 0, 532, 533, 3, 409, 204, 0, 533, 534, 3, 437, - 218, 0, 534, 535, 3, 407, 203, 0, 535, 536, 3, 433, 216, 0, 536, 60, 1, - 0, 0, 0, 537, 538, 3, 399, 199, 0, 538, 539, 3, 421, 210, 0, 539, 540, - 3, 421, 210, 0, 540, 62, 1, 0, 0, 0, 541, 542, 3, 399, 199, 0, 542, 543, - 3, 421, 210, 0, 543, 544, 3, 437, 218, 0, 544, 545, 3, 407, 203, 0, 545, - 546, 3, 433, 216, 0, 546, 64, 1, 0, 0, 0, 547, 548, 3, 399, 199, 0, 548, - 549, 3, 425, 212, 0, 549, 550, 3, 399, 199, 0, 550, 551, 3, 421, 210, 0, - 551, 552, 3, 447, 223, 0, 552, 553, 3, 449, 224, 0, 553, 554, 3, 407, 203, - 0, 554, 66, 1, 0, 0, 0, 555, 556, 3, 399, 199, 0, 556, 557, 3, 425, 212, - 0, 557, 558, 3, 405, 202, 0, 558, 68, 1, 0, 0, 0, 559, 560, 3, 399, 199, - 0, 560, 561, 3, 435, 217, 0, 561, 70, 1, 0, 0, 0, 562, 563, 3, 399, 199, - 0, 563, 564, 3, 435, 217, 0, 564, 565, 3, 403, 201, 0, 565, 72, 1, 0, 0, - 0, 566, 567, 3, 399, 199, 0, 567, 568, 3, 437, 218, 0, 568, 569, 3, 437, - 218, 0, 569, 570, 3, 399, 199, 0, 570, 571, 3, 403, 201, 0, 571, 572, 3, - 413, 206, 0, 572, 74, 1, 0, 0, 0, 573, 574, 3, 399, 199, 0, 574, 575, 3, - 439, 219, 0, 575, 576, 3, 437, 218, 0, 576, 577, 3, 427, 213, 0, 577, 578, - 3, 415, 207, 0, 578, 579, 3, 425, 212, 0, 579, 580, 3, 403, 201, 0, 580, - 581, 3, 433, 216, 0, 581, 582, 3, 407, 203, 0, 582, 583, 3, 423, 211, 0, - 583, 584, 3, 407, 203, 0, 584, 585, 3, 425, 212, 0, 585, 586, 3, 437, 218, - 0, 586, 76, 1, 0, 0, 0, 587, 588, 3, 401, 200, 0, 588, 589, 3, 407, 203, - 0, 589, 590, 3, 409, 204, 0, 590, 591, 3, 427, 213, 0, 591, 592, 3, 433, - 216, 0, 592, 593, 3, 407, 203, 0, 593, 78, 1, 0, 0, 0, 594, 595, 3, 401, - 200, 0, 595, 596, 3, 407, 203, 0, 596, 597, 3, 411, 205, 0, 597, 598, 3, - 415, 207, 0, 598, 599, 3, 425, 212, 0, 599, 80, 1, 0, 0, 0, 600, 601, 3, - 401, 200, 0, 601, 602, 3, 407, 203, 0, 602, 603, 3, 437, 218, 0, 603, 604, - 3, 443, 221, 0, 604, 605, 3, 407, 203, 0, 605, 606, 3, 407, 203, 0, 606, - 607, 3, 425, 212, 0, 607, 82, 1, 0, 0, 0, 608, 609, 3, 401, 200, 0, 609, - 610, 3, 447, 223, 0, 610, 84, 1, 0, 0, 0, 611, 612, 3, 403, 201, 0, 612, - 613, 3, 399, 199, 0, 613, 614, 3, 435, 217, 0, 614, 615, 3, 403, 201, 0, - 615, 616, 3, 399, 199, 0, 616, 617, 3, 405, 202, 0, 617, 618, 3, 407, 203, - 0, 618, 86, 1, 0, 0, 0, 619, 620, 3, 403, 201, 0, 620, 621, 3, 399, 199, - 0, 621, 622, 3, 435, 217, 0, 622, 623, 3, 407, 203, 0, 623, 88, 1, 0, 0, - 0, 624, 625, 3, 403, 201, 0, 625, 626, 3, 399, 199, 0, 626, 627, 3, 435, - 217, 0, 627, 628, 3, 437, 218, 0, 628, 90, 1, 0, 0, 0, 629, 630, 3, 403, - 201, 0, 630, 631, 3, 413, 206, 0, 631, 632, 3, 407, 203, 0, 632, 633, 3, - 403, 201, 0, 633, 634, 3, 419, 209, 0, 634, 92, 1, 0, 0, 0, 635, 636, 3, - 403, 201, 0, 636, 637, 3, 427, 213, 0, 637, 638, 3, 421, 210, 0, 638, 639, - 3, 421, 210, 0, 639, 640, 3, 399, 199, 0, 640, 641, 3, 437, 218, 0, 641, - 642, 3, 407, 203, 0, 642, 94, 1, 0, 0, 0, 643, 644, 3, 403, 201, 0, 644, - 645, 3, 427, 213, 0, 645, 646, 3, 421, 210, 0, 646, 647, 3, 439, 219, 0, - 647, 648, 3, 423, 211, 0, 648, 649, 3, 425, 212, 0, 649, 96, 1, 0, 0, 0, - 650, 651, 3, 403, 201, 0, 651, 652, 3, 427, 213, 0, 652, 653, 3, 423, 211, - 0, 653, 654, 3, 423, 211, 0, 654, 655, 3, 415, 207, 0, 655, 656, 3, 437, - 218, 0, 656, 98, 1, 0, 0, 0, 657, 658, 3, 403, 201, 0, 658, 659, 3, 427, - 213, 0, 659, 660, 3, 425, 212, 0, 660, 661, 3, 409, 204, 0, 661, 662, 3, - 421, 210, 0, 662, 663, 3, 415, 207, 0, 663, 664, 3, 403, 201, 0, 664, 665, - 3, 437, 218, 0, 665, 100, 1, 0, 0, 0, 666, 667, 3, 403, 201, 0, 667, 668, - 3, 427, 213, 0, 668, 669, 3, 425, 212, 0, 669, 670, 3, 435, 217, 0, 670, - 671, 3, 437, 218, 0, 671, 672, 3, 433, 216, 0, 672, 673, 3, 399, 199, 0, - 673, 674, 3, 415, 207, 0, 674, 675, 3, 425, 212, 0, 675, 676, 3, 437, 218, - 0, 676, 102, 1, 0, 0, 0, 677, 678, 3, 403, 201, 0, 678, 679, 3, 433, 216, - 0, 679, 680, 3, 407, 203, 0, 680, 681, 3, 399, 199, 0, 681, 682, 3, 437, - 218, 0, 682, 683, 3, 407, 203, 0, 683, 104, 1, 0, 0, 0, 684, 685, 3, 403, - 201, 0, 685, 686, 3, 433, 216, 0, 686, 687, 3, 427, 213, 0, 687, 688, 3, - 435, 217, 0, 688, 689, 3, 435, 217, 0, 689, 106, 1, 0, 0, 0, 690, 691, - 3, 403, 201, 0, 691, 692, 3, 439, 219, 0, 692, 693, 3, 433, 216, 0, 693, - 694, 3, 433, 216, 0, 694, 695, 3, 407, 203, 0, 695, 696, 3, 425, 212, 0, - 696, 697, 3, 437, 218, 0, 697, 698, 5, 95, 0, 0, 698, 699, 3, 405, 202, - 0, 699, 700, 3, 399, 199, 0, 700, 701, 3, 437, 218, 0, 701, 702, 3, 407, - 203, 0, 702, 108, 1, 0, 0, 0, 703, 704, 3, 403, 201, 0, 704, 705, 3, 439, - 219, 0, 705, 706, 3, 433, 216, 0, 706, 707, 3, 433, 216, 0, 707, 708, 3, - 407, 203, 0, 708, 709, 3, 425, 212, 0, 709, 710, 3, 437, 218, 0, 710, 711, - 5, 95, 0, 0, 711, 712, 3, 437, 218, 0, 712, 713, 3, 415, 207, 0, 713, 714, - 3, 423, 211, 0, 714, 715, 3, 407, 203, 0, 715, 110, 1, 0, 0, 0, 716, 717, - 3, 403, 201, 0, 717, 718, 3, 439, 219, 0, 718, 719, 3, 433, 216, 0, 719, - 720, 3, 433, 216, 0, 720, 721, 3, 407, 203, 0, 721, 722, 3, 425, 212, 0, - 722, 723, 3, 437, 218, 0, 723, 724, 5, 95, 0, 0, 724, 725, 3, 437, 218, - 0, 725, 726, 3, 415, 207, 0, 726, 727, 3, 423, 211, 0, 727, 728, 3, 407, - 203, 0, 728, 729, 3, 435, 217, 0, 729, 730, 3, 437, 218, 0, 730, 731, 3, - 399, 199, 0, 731, 732, 3, 423, 211, 0, 732, 733, 3, 429, 214, 0, 733, 112, - 1, 0, 0, 0, 734, 735, 3, 405, 202, 0, 735, 736, 3, 399, 199, 0, 736, 737, - 3, 437, 218, 0, 737, 738, 3, 399, 199, 0, 738, 739, 3, 401, 200, 0, 739, - 740, 3, 399, 199, 0, 740, 741, 3, 435, 217, 0, 741, 742, 3, 407, 203, 0, - 742, 114, 1, 0, 0, 0, 743, 744, 3, 405, 202, 0, 744, 745, 3, 407, 203, - 0, 745, 746, 3, 409, 204, 0, 746, 747, 3, 399, 199, 0, 747, 748, 3, 439, - 219, 0, 748, 749, 3, 421, 210, 0, 749, 750, 3, 437, 218, 0, 750, 116, 1, - 0, 0, 0, 751, 752, 3, 405, 202, 0, 752, 753, 3, 407, 203, 0, 753, 754, - 3, 409, 204, 0, 754, 755, 3, 407, 203, 0, 755, 756, 3, 433, 216, 0, 756, - 757, 3, 433, 216, 0, 757, 758, 3, 399, 199, 0, 758, 759, 3, 401, 200, 0, - 759, 760, 3, 421, 210, 0, 760, 761, 3, 407, 203, 0, 761, 118, 1, 0, 0, - 0, 762, 763, 3, 405, 202, 0, 763, 764, 3, 407, 203, 0, 764, 765, 3, 409, - 204, 0, 765, 766, 3, 407, 203, 0, 766, 767, 3, 433, 216, 0, 767, 768, 3, - 433, 216, 0, 768, 769, 3, 407, 203, 0, 769, 770, 3, 405, 202, 0, 770, 120, - 1, 0, 0, 0, 771, 772, 3, 405, 202, 0, 772, 773, 3, 407, 203, 0, 773, 774, - 3, 421, 210, 0, 774, 775, 3, 407, 203, 0, 775, 776, 3, 437, 218, 0, 776, - 777, 3, 407, 203, 0, 777, 122, 1, 0, 0, 0, 778, 779, 3, 405, 202, 0, 779, - 780, 3, 407, 203, 0, 780, 781, 3, 435, 217, 0, 781, 782, 3, 403, 201, 0, - 782, 124, 1, 0, 0, 0, 783, 784, 3, 405, 202, 0, 784, 785, 3, 407, 203, - 0, 785, 786, 3, 437, 218, 0, 786, 787, 3, 399, 199, 0, 787, 788, 3, 403, - 201, 0, 788, 789, 3, 413, 206, 0, 789, 126, 1, 0, 0, 0, 790, 791, 3, 405, - 202, 0, 791, 792, 3, 415, 207, 0, 792, 793, 3, 435, 217, 0, 793, 794, 3, - 437, 218, 0, 794, 795, 3, 415, 207, 0, 795, 796, 3, 425, 212, 0, 796, 797, - 3, 403, 201, 0, 797, 798, 3, 437, 218, 0, 798, 128, 1, 0, 0, 0, 799, 800, - 3, 405, 202, 0, 800, 801, 3, 433, 216, 0, 801, 802, 3, 427, 213, 0, 802, - 803, 3, 429, 214, 0, 803, 130, 1, 0, 0, 0, 804, 805, 3, 407, 203, 0, 805, - 806, 3, 399, 199, 0, 806, 807, 3, 403, 201, 0, 807, 808, 3, 413, 206, 0, - 808, 132, 1, 0, 0, 0, 809, 810, 3, 407, 203, 0, 810, 811, 3, 421, 210, - 0, 811, 812, 3, 435, 217, 0, 812, 813, 3, 407, 203, 0, 813, 134, 1, 0, - 0, 0, 814, 815, 3, 407, 203, 0, 815, 816, 3, 425, 212, 0, 816, 817, 3, - 405, 202, 0, 817, 136, 1, 0, 0, 0, 818, 819, 3, 407, 203, 0, 819, 820, - 3, 435, 217, 0, 820, 821, 3, 403, 201, 0, 821, 822, 3, 399, 199, 0, 822, - 823, 3, 429, 214, 0, 823, 824, 3, 407, 203, 0, 824, 138, 1, 0, 0, 0, 825, - 826, 3, 407, 203, 0, 826, 827, 3, 445, 222, 0, 827, 828, 3, 403, 201, 0, - 828, 829, 3, 407, 203, 0, 829, 830, 3, 429, 214, 0, 830, 831, 3, 437, 218, - 0, 831, 140, 1, 0, 0, 0, 832, 833, 3, 407, 203, 0, 833, 834, 3, 445, 222, - 0, 834, 835, 3, 403, 201, 0, 835, 836, 3, 421, 210, 0, 836, 837, 3, 439, - 219, 0, 837, 838, 3, 435, 217, 0, 838, 839, 3, 415, 207, 0, 839, 840, 3, - 441, 220, 0, 840, 841, 3, 407, 203, 0, 841, 142, 1, 0, 0, 0, 842, 843, - 3, 407, 203, 0, 843, 844, 3, 445, 222, 0, 844, 845, 3, 415, 207, 0, 845, - 846, 3, 435, 217, 0, 846, 847, 3, 437, 218, 0, 847, 848, 3, 435, 217, 0, - 848, 144, 1, 0, 0, 0, 849, 850, 3, 407, 203, 0, 850, 851, 3, 445, 222, - 0, 851, 852, 3, 429, 214, 0, 852, 853, 3, 421, 210, 0, 853, 854, 3, 399, - 199, 0, 854, 855, 3, 415, 207, 0, 855, 856, 3, 425, 212, 0, 856, 146, 1, - 0, 0, 0, 857, 858, 3, 409, 204, 0, 858, 859, 3, 399, 199, 0, 859, 860, - 3, 415, 207, 0, 860, 861, 3, 421, 210, 0, 861, 148, 1, 0, 0, 0, 862, 863, - 3, 409, 204, 0, 863, 864, 3, 427, 213, 0, 864, 865, 3, 433, 216, 0, 865, - 150, 1, 0, 0, 0, 866, 867, 3, 409, 204, 0, 867, 868, 3, 427, 213, 0, 868, - 869, 3, 433, 216, 0, 869, 870, 3, 407, 203, 0, 870, 871, 3, 415, 207, 0, - 871, 872, 3, 411, 205, 0, 872, 873, 3, 425, 212, 0, 873, 152, 1, 0, 0, - 0, 874, 875, 3, 409, 204, 0, 875, 876, 3, 433, 216, 0, 876, 877, 3, 427, - 213, 0, 877, 878, 3, 423, 211, 0, 878, 154, 1, 0, 0, 0, 879, 880, 3, 409, - 204, 0, 880, 881, 3, 439, 219, 0, 881, 882, 3, 421, 210, 0, 882, 883, 3, - 421, 210, 0, 883, 156, 1, 0, 0, 0, 884, 885, 3, 411, 205, 0, 885, 886, - 3, 421, 210, 0, 886, 887, 3, 427, 213, 0, 887, 888, 3, 401, 200, 0, 888, - 158, 1, 0, 0, 0, 889, 890, 3, 411, 205, 0, 890, 891, 3, 433, 216, 0, 891, - 892, 3, 427, 213, 0, 892, 893, 3, 439, 219, 0, 893, 894, 3, 429, 214, 0, - 894, 160, 1, 0, 0, 0, 895, 896, 3, 413, 206, 0, 896, 897, 3, 399, 199, - 0, 897, 898, 3, 441, 220, 0, 898, 899, 3, 415, 207, 0, 899, 900, 3, 425, - 212, 0, 900, 901, 3, 411, 205, 0, 901, 162, 1, 0, 0, 0, 902, 903, 3, 415, - 207, 0, 903, 904, 3, 409, 204, 0, 904, 164, 1, 0, 0, 0, 905, 906, 3, 415, - 207, 0, 906, 907, 3, 411, 205, 0, 907, 908, 3, 425, 212, 0, 908, 909, 3, - 427, 213, 0, 909, 910, 3, 433, 216, 0, 910, 911, 3, 407, 203, 0, 911, 166, - 1, 0, 0, 0, 912, 913, 3, 415, 207, 0, 913, 914, 3, 423, 211, 0, 914, 915, - 3, 423, 211, 0, 915, 916, 3, 407, 203, 0, 916, 917, 3, 405, 202, 0, 917, - 918, 3, 415, 207, 0, 918, 919, 3, 399, 199, 0, 919, 920, 3, 437, 218, 0, - 920, 921, 3, 407, 203, 0, 921, 168, 1, 0, 0, 0, 922, 923, 3, 415, 207, - 0, 923, 924, 3, 425, 212, 0, 924, 170, 1, 0, 0, 0, 925, 926, 3, 415, 207, - 0, 926, 927, 3, 425, 212, 0, 927, 928, 3, 405, 202, 0, 928, 929, 3, 407, - 203, 0, 929, 930, 3, 445, 222, 0, 930, 172, 1, 0, 0, 0, 931, 932, 3, 415, - 207, 0, 932, 933, 3, 425, 212, 0, 933, 934, 3, 405, 202, 0, 934, 935, 3, - 407, 203, 0, 935, 936, 3, 445, 222, 0, 936, 937, 3, 407, 203, 0, 937, 938, - 3, 405, 202, 0, 938, 174, 1, 0, 0, 0, 939, 940, 3, 415, 207, 0, 940, 941, - 3, 425, 212, 0, 941, 942, 3, 415, 207, 0, 942, 943, 3, 437, 218, 0, 943, - 944, 3, 415, 207, 0, 944, 945, 3, 399, 199, 0, 945, 946, 3, 421, 210, 0, - 946, 947, 3, 421, 210, 0, 947, 948, 3, 447, 223, 0, 948, 176, 1, 0, 0, - 0, 949, 950, 3, 415, 207, 0, 950, 951, 3, 425, 212, 0, 951, 952, 3, 425, - 212, 0, 952, 953, 3, 407, 203, 0, 953, 954, 3, 433, 216, 0, 954, 178, 1, - 0, 0, 0, 955, 956, 3, 415, 207, 0, 956, 957, 3, 425, 212, 0, 957, 958, - 3, 435, 217, 0, 958, 959, 3, 407, 203, 0, 959, 960, 3, 433, 216, 0, 960, - 961, 3, 437, 218, 0, 961, 180, 1, 0, 0, 0, 962, 963, 3, 415, 207, 0, 963, - 964, 3, 425, 212, 0, 964, 965, 3, 435, 217, 0, 965, 966, 3, 437, 218, 0, - 966, 967, 3, 407, 203, 0, 967, 968, 3, 399, 199, 0, 968, 969, 3, 405, 202, - 0, 969, 182, 1, 0, 0, 0, 970, 971, 3, 415, 207, 0, 971, 972, 3, 425, 212, - 0, 972, 973, 3, 437, 218, 0, 973, 974, 3, 407, 203, 0, 974, 975, 3, 433, - 216, 0, 975, 976, 3, 435, 217, 0, 976, 977, 3, 407, 203, 0, 977, 978, 3, - 403, 201, 0, 978, 979, 3, 437, 218, 0, 979, 184, 1, 0, 0, 0, 980, 981, - 3, 415, 207, 0, 981, 982, 3, 425, 212, 0, 982, 983, 3, 437, 218, 0, 983, - 984, 3, 427, 213, 0, 984, 186, 1, 0, 0, 0, 985, 986, 3, 415, 207, 0, 986, - 987, 3, 435, 217, 0, 987, 188, 1, 0, 0, 0, 988, 989, 3, 415, 207, 0, 989, - 990, 3, 435, 217, 0, 990, 991, 3, 425, 212, 0, 991, 992, 3, 439, 219, 0, - 992, 993, 3, 421, 210, 0, 993, 994, 3, 421, 210, 0, 994, 190, 1, 0, 0, - 0, 995, 996, 3, 417, 208, 0, 996, 997, 3, 427, 213, 0, 997, 998, 3, 415, - 207, 0, 998, 999, 3, 425, 212, 0, 999, 192, 1, 0, 0, 0, 1000, 1001, 3, - 419, 209, 0, 1001, 1002, 3, 407, 203, 0, 1002, 1003, 3, 447, 223, 0, 1003, - 194, 1, 0, 0, 0, 1004, 1005, 3, 421, 210, 0, 1005, 1006, 3, 407, 203, 0, - 1006, 1007, 3, 409, 204, 0, 1007, 1008, 3, 437, 218, 0, 1008, 196, 1, 0, - 0, 0, 1009, 1010, 3, 421, 210, 0, 1010, 1011, 3, 415, 207, 0, 1011, 1012, - 3, 419, 209, 0, 1012, 1013, 3, 407, 203, 0, 1013, 198, 1, 0, 0, 0, 1014, - 1015, 3, 421, 210, 0, 1015, 1016, 3, 415, 207, 0, 1016, 1017, 3, 423, 211, - 0, 1017, 1018, 3, 415, 207, 0, 1018, 1019, 3, 437, 218, 0, 1019, 200, 1, - 0, 0, 0, 1020, 1021, 3, 423, 211, 0, 1021, 1022, 3, 399, 199, 0, 1022, - 1023, 3, 437, 218, 0, 1023, 1024, 3, 403, 201, 0, 1024, 1025, 3, 413, 206, - 0, 1025, 202, 1, 0, 0, 0, 1026, 1027, 3, 425, 212, 0, 1027, 1028, 3, 399, - 199, 0, 1028, 1029, 3, 437, 218, 0, 1029, 1030, 3, 439, 219, 0, 1030, 1031, - 3, 433, 216, 0, 1031, 1032, 3, 399, 199, 0, 1032, 1033, 3, 421, 210, 0, - 1033, 204, 1, 0, 0, 0, 1034, 1035, 3, 425, 212, 0, 1035, 1036, 3, 427, - 213, 0, 1036, 206, 1, 0, 0, 0, 1037, 1038, 3, 425, 212, 0, 1038, 1039, - 3, 427, 213, 0, 1039, 1040, 3, 437, 218, 0, 1040, 208, 1, 0, 0, 0, 1041, - 1042, 3, 425, 212, 0, 1042, 1043, 3, 427, 213, 0, 1043, 1044, 3, 437, 218, - 0, 1044, 1045, 3, 425, 212, 0, 1045, 1046, 3, 439, 219, 0, 1046, 1047, - 3, 421, 210, 0, 1047, 1048, 3, 421, 210, 0, 1048, 210, 1, 0, 0, 0, 1049, - 1050, 3, 425, 212, 0, 1050, 1051, 3, 439, 219, 0, 1051, 1052, 3, 421, 210, - 0, 1052, 1053, 3, 421, 210, 0, 1053, 212, 1, 0, 0, 0, 1054, 1055, 3, 427, - 213, 0, 1055, 1056, 3, 409, 204, 0, 1056, 214, 1, 0, 0, 0, 1057, 1058, - 3, 427, 213, 0, 1058, 1059, 3, 409, 204, 0, 1059, 1060, 3, 409, 204, 0, - 1060, 1061, 3, 435, 217, 0, 1061, 1062, 3, 407, 203, 0, 1062, 1063, 3, - 437, 218, 0, 1063, 216, 1, 0, 0, 0, 1064, 1065, 3, 427, 213, 0, 1065, 1066, - 3, 425, 212, 0, 1066, 218, 1, 0, 0, 0, 1067, 1068, 3, 427, 213, 0, 1068, - 1069, 3, 433, 216, 0, 1069, 220, 1, 0, 0, 0, 1070, 1071, 3, 427, 213, 0, - 1071, 1072, 3, 433, 216, 0, 1072, 1073, 3, 405, 202, 0, 1073, 1074, 3, - 407, 203, 0, 1074, 1075, 3, 433, 216, 0, 1075, 222, 1, 0, 0, 0, 1076, 1077, - 3, 427, 213, 0, 1077, 1078, 3, 439, 219, 0, 1078, 1079, 3, 437, 218, 0, - 1079, 1080, 3, 407, 203, 0, 1080, 1081, 3, 433, 216, 0, 1081, 224, 1, 0, - 0, 0, 1082, 1083, 3, 429, 214, 0, 1083, 1084, 3, 421, 210, 0, 1084, 1085, - 3, 399, 199, 0, 1085, 1086, 3, 425, 212, 0, 1086, 226, 1, 0, 0, 0, 1087, - 1088, 3, 429, 214, 0, 1088, 1089, 3, 433, 216, 0, 1089, 1090, 3, 399, 199, - 0, 1090, 1091, 3, 411, 205, 0, 1091, 1092, 3, 423, 211, 0, 1092, 1093, - 3, 399, 199, 0, 1093, 228, 1, 0, 0, 0, 1094, 1095, 3, 429, 214, 0, 1095, - 1096, 3, 433, 216, 0, 1096, 1097, 3, 415, 207, 0, 1097, 1098, 3, 423, 211, - 0, 1098, 1099, 3, 399, 199, 0, 1099, 1100, 3, 433, 216, 0, 1100, 1101, - 3, 447, 223, 0, 1101, 230, 1, 0, 0, 0, 1102, 1103, 3, 431, 215, 0, 1103, - 1104, 3, 439, 219, 0, 1104, 1105, 3, 407, 203, 0, 1105, 1106, 3, 433, 216, - 0, 1106, 1107, 3, 447, 223, 0, 1107, 232, 1, 0, 0, 0, 1108, 1109, 3, 433, - 216, 0, 1109, 1110, 3, 399, 199, 0, 1110, 1111, 3, 415, 207, 0, 1111, 1112, - 3, 435, 217, 0, 1112, 1113, 3, 407, 203, 0, 1113, 234, 1, 0, 0, 0, 1114, - 1115, 3, 433, 216, 0, 1115, 1116, 3, 407, 203, 0, 1116, 1117, 3, 403, 201, - 0, 1117, 1118, 3, 439, 219, 0, 1118, 1119, 3, 433, 216, 0, 1119, 1120, - 3, 435, 217, 0, 1120, 1121, 3, 415, 207, 0, 1121, 1122, 3, 441, 220, 0, - 1122, 1123, 3, 407, 203, 0, 1123, 236, 1, 0, 0, 0, 1124, 1125, 3, 433, - 216, 0, 1125, 1126, 3, 407, 203, 0, 1126, 1127, 3, 409, 204, 0, 1127, 1128, - 3, 407, 203, 0, 1128, 1129, 3, 433, 216, 0, 1129, 1130, 3, 407, 203, 0, - 1130, 1131, 3, 425, 212, 0, 1131, 1132, 3, 403, 201, 0, 1132, 1133, 3, - 407, 203, 0, 1133, 1134, 3, 435, 217, 0, 1134, 238, 1, 0, 0, 0, 1135, 1136, - 3, 433, 216, 0, 1136, 1137, 3, 407, 203, 0, 1137, 1138, 3, 411, 205, 0, - 1138, 1139, 3, 407, 203, 0, 1139, 1140, 3, 445, 222, 0, 1140, 1141, 3, - 429, 214, 0, 1141, 240, 1, 0, 0, 0, 1142, 1143, 3, 433, 216, 0, 1143, 1144, - 3, 407, 203, 0, 1144, 1145, 3, 415, 207, 0, 1145, 1146, 3, 425, 212, 0, - 1146, 1147, 3, 405, 202, 0, 1147, 1148, 3, 407, 203, 0, 1148, 1149, 3, - 445, 222, 0, 1149, 242, 1, 0, 0, 0, 1150, 1151, 3, 433, 216, 0, 1151, 1152, - 3, 407, 203, 0, 1152, 1153, 3, 421, 210, 0, 1153, 1154, 3, 407, 203, 0, - 1154, 1155, 3, 399, 199, 0, 1155, 1156, 3, 435, 217, 0, 1156, 1157, 3, - 407, 203, 0, 1157, 244, 1, 0, 0, 0, 1158, 1159, 3, 433, 216, 0, 1159, 1160, - 3, 407, 203, 0, 1160, 1161, 3, 425, 212, 0, 1161, 1162, 3, 399, 199, 0, - 1162, 1163, 3, 423, 211, 0, 1163, 1164, 3, 407, 203, 0, 1164, 246, 1, 0, - 0, 0, 1165, 1166, 3, 433, 216, 0, 1166, 1167, 3, 407, 203, 0, 1167, 1168, - 3, 429, 214, 0, 1168, 1169, 3, 421, 210, 0, 1169, 1170, 3, 399, 199, 0, - 1170, 1171, 3, 403, 201, 0, 1171, 1172, 3, 407, 203, 0, 1172, 248, 1, 0, - 0, 0, 1173, 1174, 3, 433, 216, 0, 1174, 1175, 3, 407, 203, 0, 1175, 1176, - 3, 435, 217, 0, 1176, 1177, 3, 437, 218, 0, 1177, 1178, 3, 433, 216, 0, - 1178, 1179, 3, 415, 207, 0, 1179, 1180, 3, 403, 201, 0, 1180, 1181, 3, - 437, 218, 0, 1181, 250, 1, 0, 0, 0, 1182, 1183, 3, 433, 216, 0, 1183, 1184, - 3, 407, 203, 0, 1184, 1185, 3, 437, 218, 0, 1185, 1186, 3, 439, 219, 0, - 1186, 1187, 3, 433, 216, 0, 1187, 1188, 3, 425, 212, 0, 1188, 1189, 3, - 415, 207, 0, 1189, 1190, 3, 425, 212, 0, 1190, 1191, 3, 411, 205, 0, 1191, - 252, 1, 0, 0, 0, 1192, 1193, 3, 433, 216, 0, 1193, 1194, 3, 415, 207, 0, - 1194, 1195, 3, 411, 205, 0, 1195, 1196, 3, 413, 206, 0, 1196, 1197, 3, - 437, 218, 0, 1197, 254, 1, 0, 0, 0, 1198, 1199, 3, 433, 216, 0, 1199, 1200, - 3, 427, 213, 0, 1200, 1201, 3, 421, 210, 0, 1201, 1202, 3, 421, 210, 0, - 1202, 1203, 3, 401, 200, 0, 1203, 1204, 3, 399, 199, 0, 1204, 1205, 3, - 403, 201, 0, 1205, 1206, 3, 419, 209, 0, 1206, 256, 1, 0, 0, 0, 1207, 1208, - 3, 433, 216, 0, 1208, 1209, 3, 427, 213, 0, 1209, 1210, 3, 443, 221, 0, - 1210, 258, 1, 0, 0, 0, 1211, 1212, 3, 433, 216, 0, 1212, 1213, 3, 427, - 213, 0, 1213, 1214, 3, 443, 221, 0, 1214, 1215, 3, 435, 217, 0, 1215, 260, - 1, 0, 0, 0, 1216, 1217, 3, 435, 217, 0, 1217, 1218, 3, 399, 199, 0, 1218, - 1219, 3, 441, 220, 0, 1219, 1220, 3, 407, 203, 0, 1220, 1221, 3, 429, 214, - 0, 1221, 1222, 3, 427, 213, 0, 1222, 1223, 3, 415, 207, 0, 1223, 1224, - 3, 425, 212, 0, 1224, 1225, 3, 437, 218, 0, 1225, 262, 1, 0, 0, 0, 1226, - 1227, 3, 435, 217, 0, 1227, 1228, 3, 407, 203, 0, 1228, 1229, 3, 421, 210, - 0, 1229, 1230, 3, 407, 203, 0, 1230, 1231, 3, 403, 201, 0, 1231, 1232, - 3, 437, 218, 0, 1232, 264, 1, 0, 0, 0, 1233, 1234, 3, 435, 217, 0, 1234, - 1235, 3, 407, 203, 0, 1235, 1236, 3, 437, 218, 0, 1236, 266, 1, 0, 0, 0, - 1237, 1238, 3, 435, 217, 0, 1238, 1239, 3, 437, 218, 0, 1239, 1240, 3, - 433, 216, 0, 1240, 1241, 3, 415, 207, 0, 1241, 1242, 3, 403, 201, 0, 1242, - 1243, 3, 437, 218, 0, 1243, 268, 1, 0, 0, 0, 1244, 1245, 3, 437, 218, 0, - 1245, 1246, 3, 399, 199, 0, 1246, 1247, 3, 401, 200, 0, 1247, 1248, 3, - 421, 210, 0, 1248, 1249, 3, 407, 203, 0, 1249, 270, 1, 0, 0, 0, 1250, 1251, - 3, 437, 218, 0, 1251, 1252, 3, 407, 203, 0, 1252, 1253, 3, 423, 211, 0, - 1253, 1254, 3, 429, 214, 0, 1254, 272, 1, 0, 0, 0, 1255, 1256, 3, 437, - 218, 0, 1256, 1257, 3, 407, 203, 0, 1257, 1258, 3, 423, 211, 0, 1258, 1259, - 3, 429, 214, 0, 1259, 1260, 3, 427, 213, 0, 1260, 1261, 3, 433, 216, 0, - 1261, 1262, 3, 399, 199, 0, 1262, 1263, 3, 433, 216, 0, 1263, 1264, 3, - 447, 223, 0, 1264, 274, 1, 0, 0, 0, 1265, 1266, 3, 437, 218, 0, 1266, 1267, - 3, 413, 206, 0, 1267, 1268, 3, 407, 203, 0, 1268, 1269, 3, 425, 212, 0, - 1269, 276, 1, 0, 0, 0, 1270, 1271, 3, 437, 218, 0, 1271, 1272, 3, 427, - 213, 0, 1272, 278, 1, 0, 0, 0, 1273, 1274, 3, 437, 218, 0, 1274, 1275, - 3, 433, 216, 0, 1275, 1276, 3, 399, 199, 0, 1276, 1277, 3, 425, 212, 0, - 1277, 1278, 3, 435, 217, 0, 1278, 1279, 3, 399, 199, 0, 1279, 1280, 3, - 403, 201, 0, 1280, 1281, 3, 437, 218, 0, 1281, 1282, 3, 415, 207, 0, 1282, - 1283, 3, 427, 213, 0, 1283, 1284, 3, 425, 212, 0, 1284, 280, 1, 0, 0, 0, - 1285, 1286, 3, 437, 218, 0, 1286, 1287, 3, 433, 216, 0, 1287, 1288, 3, - 415, 207, 0, 1288, 1289, 3, 411, 205, 0, 1289, 1290, 3, 411, 205, 0, 1290, - 1291, 3, 407, 203, 0, 1291, 1292, 3, 433, 216, 0, 1292, 282, 1, 0, 0, 0, - 1293, 1294, 3, 439, 219, 0, 1294, 1295, 3, 425, 212, 0, 1295, 1296, 3, - 415, 207, 0, 1296, 1297, 3, 427, 213, 0, 1297, 1298, 3, 425, 212, 0, 1298, - 284, 1, 0, 0, 0, 1299, 1300, 3, 439, 219, 0, 1300, 1301, 3, 425, 212, 0, - 1301, 1302, 3, 415, 207, 0, 1302, 1303, 3, 431, 215, 0, 1303, 1304, 3, - 439, 219, 0, 1304, 1305, 3, 407, 203, 0, 1305, 286, 1, 0, 0, 0, 1306, 1307, - 3, 439, 219, 0, 1307, 1308, 3, 429, 214, 0, 1308, 1309, 3, 405, 202, 0, - 1309, 1310, 3, 399, 199, 0, 1310, 1311, 3, 437, 218, 0, 1311, 1312, 3, - 407, 203, 0, 1312, 288, 1, 0, 0, 0, 1313, 1314, 3, 439, 219, 0, 1314, 1315, - 3, 435, 217, 0, 1315, 1316, 3, 415, 207, 0, 1316, 1317, 3, 425, 212, 0, - 1317, 1318, 3, 411, 205, 0, 1318, 290, 1, 0, 0, 0, 1319, 1320, 3, 441, - 220, 0, 1320, 1321, 3, 399, 199, 0, 1321, 1322, 3, 403, 201, 0, 1322, 1323, - 3, 439, 219, 0, 1323, 1324, 3, 439, 219, 0, 1324, 1325, 3, 423, 211, 0, - 1325, 292, 1, 0, 0, 0, 1326, 1327, 3, 441, 220, 0, 1327, 1328, 3, 399, - 199, 0, 1328, 1329, 3, 421, 210, 0, 1329, 1330, 3, 439, 219, 0, 1330, 1331, - 3, 407, 203, 0, 1331, 1332, 3, 435, 217, 0, 1332, 294, 1, 0, 0, 0, 1333, - 1334, 3, 441, 220, 0, 1334, 1335, 3, 415, 207, 0, 1335, 1336, 3, 407, 203, - 0, 1336, 1337, 3, 443, 221, 0, 1337, 296, 1, 0, 0, 0, 1338, 1339, 3, 441, - 220, 0, 1339, 1340, 3, 415, 207, 0, 1340, 1341, 3, 433, 216, 0, 1341, 1342, - 3, 437, 218, 0, 1342, 1343, 3, 439, 219, 0, 1343, 1344, 3, 399, 199, 0, - 1344, 1345, 3, 421, 210, 0, 1345, 298, 1, 0, 0, 0, 1346, 1347, 3, 443, - 221, 0, 1347, 1348, 3, 413, 206, 0, 1348, 1349, 3, 407, 203, 0, 1349, 1350, - 3, 425, 212, 0, 1350, 300, 1, 0, 0, 0, 1351, 1352, 3, 443, 221, 0, 1352, - 1353, 3, 413, 206, 0, 1353, 1354, 3, 407, 203, 0, 1354, 1355, 3, 433, 216, - 0, 1355, 1356, 3, 407, 203, 0, 1356, 302, 1, 0, 0, 0, 1357, 1358, 3, 443, - 221, 0, 1358, 1359, 3, 415, 207, 0, 1359, 1360, 3, 437, 218, 0, 1360, 1361, - 3, 413, 206, 0, 1361, 304, 1, 0, 0, 0, 1362, 1363, 3, 443, 221, 0, 1363, - 1364, 3, 415, 207, 0, 1364, 1365, 3, 437, 218, 0, 1365, 1366, 3, 413, 206, - 0, 1366, 1367, 3, 427, 213, 0, 1367, 1368, 3, 439, 219, 0, 1368, 1369, - 3, 437, 218, 0, 1369, 306, 1, 0, 0, 0, 1370, 1371, 3, 409, 204, 0, 1371, - 1372, 3, 415, 207, 0, 1372, 1373, 3, 433, 216, 0, 1373, 1374, 3, 435, 217, - 0, 1374, 1375, 3, 437, 218, 0, 1375, 1376, 5, 95, 0, 0, 1376, 1377, 3, - 441, 220, 0, 1377, 1378, 3, 399, 199, 0, 1378, 1379, 3, 421, 210, 0, 1379, - 1380, 3, 439, 219, 0, 1380, 1381, 3, 407, 203, 0, 1381, 308, 1, 0, 0, 0, - 1382, 1383, 3, 427, 213, 0, 1383, 1384, 3, 441, 220, 0, 1384, 1385, 3, - 407, 203, 0, 1385, 1386, 3, 433, 216, 0, 1386, 310, 1, 0, 0, 0, 1387, 1388, - 3, 429, 214, 0, 1388, 1389, 3, 399, 199, 0, 1389, 1390, 3, 433, 216, 0, - 1390, 1391, 3, 437, 218, 0, 1391, 1392, 3, 415, 207, 0, 1392, 1393, 3, - 437, 218, 0, 1393, 1394, 3, 415, 207, 0, 1394, 1395, 3, 427, 213, 0, 1395, - 1396, 3, 425, 212, 0, 1396, 312, 1, 0, 0, 0, 1397, 1398, 3, 433, 216, 0, - 1398, 1399, 3, 399, 199, 0, 1399, 1400, 3, 425, 212, 0, 1400, 1401, 3, - 411, 205, 0, 1401, 1402, 3, 407, 203, 0, 1402, 314, 1, 0, 0, 0, 1403, 1404, - 3, 429, 214, 0, 1404, 1405, 3, 433, 216, 0, 1405, 1406, 3, 407, 203, 0, - 1406, 1407, 3, 403, 201, 0, 1407, 1408, 3, 407, 203, 0, 1408, 1409, 3, - 405, 202, 0, 1409, 1410, 3, 415, 207, 0, 1410, 1411, 3, 425, 212, 0, 1411, - 1412, 3, 411, 205, 0, 1412, 316, 1, 0, 0, 0, 1413, 1414, 3, 439, 219, 0, - 1414, 1415, 3, 425, 212, 0, 1415, 1416, 3, 401, 200, 0, 1416, 1417, 3, - 427, 213, 0, 1417, 1418, 3, 439, 219, 0, 1418, 1419, 3, 425, 212, 0, 1419, - 1420, 3, 405, 202, 0, 1420, 1421, 3, 407, 203, 0, 1421, 1422, 3, 405, 202, - 0, 1422, 318, 1, 0, 0, 0, 1423, 1424, 3, 403, 201, 0, 1424, 1425, 3, 439, - 219, 0, 1425, 1426, 3, 433, 216, 0, 1426, 1427, 3, 433, 216, 0, 1427, 1428, - 3, 407, 203, 0, 1428, 1429, 3, 425, 212, 0, 1429, 1430, 3, 437, 218, 0, - 1430, 320, 1, 0, 0, 0, 1431, 1432, 3, 409, 204, 0, 1432, 1433, 3, 427, - 213, 0, 1433, 1434, 3, 421, 210, 0, 1434, 1435, 3, 421, 210, 0, 1435, 1436, - 3, 427, 213, 0, 1436, 1437, 3, 443, 221, 0, 1437, 1438, 3, 415, 207, 0, - 1438, 1439, 3, 425, 212, 0, 1439, 1440, 3, 411, 205, 0, 1440, 322, 1, 0, - 0, 0, 1441, 1442, 3, 403, 201, 0, 1442, 1443, 3, 439, 219, 0, 1443, 1444, - 3, 423, 211, 0, 1444, 1445, 3, 407, 203, 0, 1445, 1446, 5, 95, 0, 0, 1446, - 1447, 3, 405, 202, 0, 1447, 1448, 3, 415, 207, 0, 1448, 1449, 3, 435, 217, - 0, 1449, 1450, 3, 437, 218, 0, 1450, 324, 1, 0, 0, 0, 1451, 1452, 3, 405, - 202, 0, 1452, 1453, 3, 407, 203, 0, 1453, 1454, 3, 425, 212, 0, 1454, 1455, - 3, 435, 217, 0, 1455, 1456, 3, 407, 203, 0, 1456, 1457, 5, 95, 0, 0, 1457, - 1458, 3, 433, 216, 0, 1458, 1459, 3, 399, 199, 0, 1459, 1460, 3, 425, 212, - 0, 1460, 1461, 3, 419, 209, 0, 1461, 326, 1, 0, 0, 0, 1462, 1463, 3, 421, - 210, 0, 1463, 1464, 3, 399, 199, 0, 1464, 1465, 3, 411, 205, 0, 1465, 328, - 1, 0, 0, 0, 1466, 1467, 3, 421, 210, 0, 1467, 1468, 3, 399, 199, 0, 1468, - 1469, 3, 435, 217, 0, 1469, 1470, 3, 437, 218, 0, 1470, 1471, 5, 95, 0, - 0, 1471, 1472, 3, 441, 220, 0, 1472, 1473, 3, 399, 199, 0, 1473, 1474, - 3, 421, 210, 0, 1474, 1475, 3, 439, 219, 0, 1475, 1476, 3, 407, 203, 0, - 1476, 330, 1, 0, 0, 0, 1477, 1478, 3, 421, 210, 0, 1478, 1479, 3, 407, - 203, 0, 1479, 1480, 3, 399, 199, 0, 1480, 1481, 3, 405, 202, 0, 1481, 332, - 1, 0, 0, 0, 1482, 1483, 3, 425, 212, 0, 1483, 1484, 3, 437, 218, 0, 1484, - 1485, 3, 413, 206, 0, 1485, 1486, 5, 95, 0, 0, 1486, 1487, 3, 441, 220, - 0, 1487, 1488, 3, 399, 199, 0, 1488, 1489, 3, 421, 210, 0, 1489, 1490, - 3, 439, 219, 0, 1490, 1491, 3, 407, 203, 0, 1491, 334, 1, 0, 0, 0, 1492, - 1493, 3, 425, 212, 0, 1493, 1494, 3, 437, 218, 0, 1494, 1495, 3, 415, 207, - 0, 1495, 1496, 3, 421, 210, 0, 1496, 1497, 3, 407, 203, 0, 1497, 336, 1, - 0, 0, 0, 1498, 1499, 3, 429, 214, 0, 1499, 1500, 3, 407, 203, 0, 1500, - 1501, 3, 433, 216, 0, 1501, 1502, 3, 403, 201, 0, 1502, 1503, 3, 407, 203, - 0, 1503, 1504, 3, 425, 212, 0, 1504, 1505, 3, 437, 218, 0, 1505, 1506, - 5, 95, 0, 0, 1506, 1507, 3, 433, 216, 0, 1507, 1508, 3, 399, 199, 0, 1508, - 1509, 3, 425, 212, 0, 1509, 1510, 3, 419, 209, 0, 1510, 338, 1, 0, 0, 0, - 1511, 1512, 3, 433, 216, 0, 1512, 1513, 3, 399, 199, 0, 1513, 1514, 3, - 425, 212, 0, 1514, 1515, 3, 419, 209, 0, 1515, 340, 1, 0, 0, 0, 1516, 1517, - 3, 433, 216, 0, 1517, 1518, 3, 427, 213, 0, 1518, 1519, 3, 443, 221, 0, - 1519, 1520, 5, 95, 0, 0, 1520, 1521, 3, 425, 212, 0, 1521, 1522, 3, 439, - 219, 0, 1522, 1523, 3, 423, 211, 0, 1523, 1524, 3, 401, 200, 0, 1524, 1525, - 3, 407, 203, 0, 1525, 1526, 3, 433, 216, 0, 1526, 342, 1, 0, 0, 0, 1527, - 1528, 3, 411, 205, 0, 1528, 1529, 3, 407, 203, 0, 1529, 1530, 3, 425, 212, - 0, 1530, 1531, 3, 407, 203, 0, 1531, 1532, 3, 433, 216, 0, 1532, 1533, - 3, 399, 199, 0, 1533, 1534, 3, 437, 218, 0, 1534, 1535, 3, 407, 203, 0, - 1535, 1536, 3, 405, 202, 0, 1536, 344, 1, 0, 0, 0, 1537, 1538, 3, 399, - 199, 0, 1538, 1539, 3, 421, 210, 0, 1539, 1540, 3, 443, 221, 0, 1540, 1541, - 3, 399, 199, 0, 1541, 1542, 3, 447, 223, 0, 1542, 1543, 3, 435, 217, 0, - 1543, 346, 1, 0, 0, 0, 1544, 1545, 3, 435, 217, 0, 1545, 1546, 3, 437, - 218, 0, 1546, 1547, 3, 427, 213, 0, 1547, 1548, 3, 433, 216, 0, 1548, 1549, - 3, 407, 203, 0, 1549, 1550, 3, 405, 202, 0, 1550, 348, 1, 0, 0, 0, 1551, - 1552, 3, 437, 218, 0, 1552, 1553, 3, 433, 216, 0, 1553, 1554, 3, 439, 219, - 0, 1554, 1555, 3, 407, 203, 0, 1555, 350, 1, 0, 0, 0, 1556, 1557, 3, 409, - 204, 0, 1557, 1558, 3, 399, 199, 0, 1558, 1559, 3, 421, 210, 0, 1559, 1560, - 3, 435, 217, 0, 1560, 1561, 3, 407, 203, 0, 1561, 352, 1, 0, 0, 0, 1562, - 1563, 3, 443, 221, 0, 1563, 1564, 3, 415, 207, 0, 1564, 1565, 3, 425, 212, - 0, 1565, 1566, 3, 405, 202, 0, 1566, 1567, 3, 427, 213, 0, 1567, 1568, - 3, 443, 221, 0, 1568, 354, 1, 0, 0, 0, 1569, 1570, 3, 425, 212, 0, 1570, - 1571, 3, 439, 219, 0, 1571, 1572, 3, 421, 210, 0, 1572, 1573, 3, 421, 210, - 0, 1573, 1574, 3, 435, 217, 0, 1574, 356, 1, 0, 0, 0, 1575, 1576, 3, 409, - 204, 0, 1576, 1577, 3, 415, 207, 0, 1577, 1578, 3, 433, 216, 0, 1578, 1579, - 3, 435, 217, 0, 1579, 1580, 3, 437, 218, 0, 1580, 358, 1, 0, 0, 0, 1581, - 1582, 3, 421, 210, 0, 1582, 1583, 3, 399, 199, 0, 1583, 1584, 3, 435, 217, - 0, 1584, 1585, 3, 437, 218, 0, 1585, 360, 1, 0, 0, 0, 1586, 1587, 3, 409, - 204, 0, 1587, 1588, 3, 415, 207, 0, 1588, 1589, 3, 421, 210, 0, 1589, 1590, - 3, 437, 218, 0, 1590, 1591, 3, 407, 203, 0, 1591, 1592, 3, 433, 216, 0, - 1592, 362, 1, 0, 0, 0, 1593, 1594, 3, 411, 205, 0, 1594, 1595, 3, 433, - 216, 0, 1595, 1596, 3, 427, 213, 0, 1596, 1597, 3, 439, 219, 0, 1597, 1598, - 3, 429, 214, 0, 1598, 1599, 3, 435, 217, 0, 1599, 364, 1, 0, 0, 0, 1600, - 1601, 3, 407, 203, 0, 1601, 1602, 3, 445, 222, 0, 1602, 1603, 3, 403, 201, - 0, 1603, 1604, 3, 421, 210, 0, 1604, 1605, 3, 439, 219, 0, 1605, 1606, - 3, 405, 202, 0, 1606, 1607, 3, 407, 203, 0, 1607, 366, 1, 0, 0, 0, 1608, - 1609, 3, 437, 218, 0, 1609, 1610, 3, 415, 207, 0, 1610, 1611, 3, 407, 203, - 0, 1611, 1612, 3, 435, 217, 0, 1612, 368, 1, 0, 0, 0, 1613, 1614, 3, 427, - 213, 0, 1614, 1615, 3, 437, 218, 0, 1615, 1616, 3, 413, 206, 0, 1616, 1617, - 3, 407, 203, 0, 1617, 1618, 3, 433, 216, 0, 1618, 1619, 3, 435, 217, 0, - 1619, 370, 1, 0, 0, 0, 1620, 1621, 3, 405, 202, 0, 1621, 1622, 3, 427, - 213, 0, 1622, 372, 1, 0, 0, 0, 1623, 1624, 3, 425, 212, 0, 1624, 1625, - 3, 427, 213, 0, 1625, 1626, 3, 437, 218, 0, 1626, 1627, 3, 413, 206, 0, - 1627, 1628, 3, 415, 207, 0, 1628, 1629, 3, 425, 212, 0, 1629, 1630, 3, - 411, 205, 0, 1630, 374, 1, 0, 0, 0, 1631, 1637, 5, 34, 0, 0, 1632, 1636, - 8, 0, 0, 0, 1633, 1634, 5, 34, 0, 0, 1634, 1636, 5, 34, 0, 0, 1635, 1632, - 1, 0, 0, 0, 1635, 1633, 1, 0, 0, 0, 1636, 1639, 1, 0, 0, 0, 1637, 1635, - 1, 0, 0, 0, 1637, 1638, 1, 0, 0, 0, 1638, 1640, 1, 0, 0, 0, 1639, 1637, - 1, 0, 0, 0, 1640, 1667, 5, 34, 0, 0, 1641, 1647, 5, 96, 0, 0, 1642, 1646, - 8, 1, 0, 0, 1643, 1644, 5, 96, 0, 0, 1644, 1646, 5, 96, 0, 0, 1645, 1642, - 1, 0, 0, 0, 1645, 1643, 1, 0, 0, 0, 1646, 1649, 1, 0, 0, 0, 1647, 1645, - 1, 0, 0, 0, 1647, 1648, 1, 0, 0, 0, 1648, 1650, 1, 0, 0, 0, 1649, 1647, - 1, 0, 0, 0, 1650, 1667, 5, 96, 0, 0, 1651, 1655, 5, 91, 0, 0, 1652, 1654, - 8, 2, 0, 0, 1653, 1652, 1, 0, 0, 0, 1654, 1657, 1, 0, 0, 0, 1655, 1653, - 1, 0, 0, 0, 1655, 1656, 1, 0, 0, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1655, - 1, 0, 0, 0, 1658, 1667, 5, 93, 0, 0, 1659, 1663, 7, 3, 0, 0, 1660, 1662, - 7, 4, 0, 0, 1661, 1660, 1, 0, 0, 0, 1662, 1665, 1, 0, 0, 0, 1663, 1661, - 1, 0, 0, 0, 1663, 1664, 1, 0, 0, 0, 1664, 1667, 1, 0, 0, 0, 1665, 1663, - 1, 0, 0, 0, 1666, 1631, 1, 0, 0, 0, 1666, 1641, 1, 0, 0, 0, 1666, 1651, - 1, 0, 0, 0, 1666, 1659, 1, 0, 0, 0, 1667, 376, 1, 0, 0, 0, 1668, 1670, - 3, 397, 198, 0, 1669, 1668, 1, 0, 0, 0, 1670, 1671, 1, 0, 0, 0, 1671, 1669, - 1, 0, 0, 0, 1671, 1672, 1, 0, 0, 0, 1672, 1680, 1, 0, 0, 0, 1673, 1677, - 5, 46, 0, 0, 1674, 1676, 3, 397, 198, 0, 1675, 1674, 1, 0, 0, 0, 1676, - 1679, 1, 0, 0, 0, 1677, 1675, 1, 0, 0, 0, 1677, 1678, 1, 0, 0, 0, 1678, - 1681, 1, 0, 0, 0, 1679, 1677, 1, 0, 0, 0, 1680, 1673, 1, 0, 0, 0, 1680, - 1681, 1, 0, 0, 0, 1681, 1689, 1, 0, 0, 0, 1682, 1684, 5, 46, 0, 0, 1683, - 1685, 3, 397, 198, 0, 1684, 1683, 1, 0, 0, 0, 1685, 1686, 1, 0, 0, 0, 1686, - 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1689, 1, 0, 0, 0, 1688, - 1669, 1, 0, 0, 0, 1688, 1682, 1, 0, 0, 0, 1689, 1699, 1, 0, 0, 0, 1690, - 1692, 3, 407, 203, 0, 1691, 1693, 7, 5, 0, 0, 1692, 1691, 1, 0, 0, 0, 1692, - 1693, 1, 0, 0, 0, 1693, 1695, 1, 0, 0, 0, 1694, 1696, 3, 397, 198, 0, 1695, - 1694, 1, 0, 0, 0, 1696, 1697, 1, 0, 0, 0, 1697, 1695, 1, 0, 0, 0, 1697, - 1698, 1, 0, 0, 0, 1698, 1700, 1, 0, 0, 0, 1699, 1690, 1, 0, 0, 0, 1699, - 1700, 1, 0, 0, 0, 1700, 1710, 1, 0, 0, 0, 1701, 1702, 5, 48, 0, 0, 1702, - 1703, 5, 120, 0, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1706, 3, 395, 197, 0, - 1705, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1705, 1, 0, 0, 0, - 1707, 1708, 1, 0, 0, 0, 1708, 1710, 1, 0, 0, 0, 1709, 1688, 1, 0, 0, 0, - 1709, 1701, 1, 0, 0, 0, 1710, 378, 1, 0, 0, 0, 1711, 1715, 5, 63, 0, 0, - 1712, 1714, 3, 397, 198, 0, 1713, 1712, 1, 0, 0, 0, 1714, 1717, 1, 0, 0, - 0, 1715, 1713, 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 380, 1, 0, 0, - 0, 1717, 1715, 1, 0, 0, 0, 1718, 1719, 7, 6, 0, 0, 1719, 1720, 3, 375, - 187, 0, 1720, 382, 1, 0, 0, 0, 1721, 1727, 5, 39, 0, 0, 1722, 1726, 8, - 7, 0, 0, 1723, 1724, 5, 39, 0, 0, 1724, 1726, 5, 39, 0, 0, 1725, 1722, - 1, 0, 0, 0, 1725, 1723, 1, 0, 0, 0, 1726, 1729, 1, 0, 0, 0, 1727, 1725, - 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1730, 1, 0, 0, 0, 1729, 1727, - 1, 0, 0, 0, 1730, 1731, 5, 39, 0, 0, 1731, 384, 1, 0, 0, 0, 1732, 1733, - 3, 445, 222, 0, 1733, 1734, 3, 383, 191, 0, 1734, 386, 1, 0, 0, 0, 1735, - 1736, 5, 45, 0, 0, 1736, 1737, 5, 45, 0, 0, 1737, 1741, 1, 0, 0, 0, 1738, - 1740, 8, 8, 0, 0, 1739, 1738, 1, 0, 0, 0, 1740, 1743, 1, 0, 0, 0, 1741, - 1739, 1, 0, 0, 0, 1741, 1742, 1, 0, 0, 0, 1742, 1749, 1, 0, 0, 0, 1743, - 1741, 1, 0, 0, 0, 1744, 1746, 5, 13, 0, 0, 1745, 1744, 1, 0, 0, 0, 1745, - 1746, 1, 0, 0, 0, 1746, 1747, 1, 0, 0, 0, 1747, 1750, 5, 10, 0, 0, 1748, - 1750, 5, 0, 0, 1, 1749, 1745, 1, 0, 0, 0, 1749, 1748, 1, 0, 0, 0, 1750, - 1751, 1, 0, 0, 0, 1751, 1752, 6, 193, 0, 0, 1752, 388, 1, 0, 0, 0, 1753, - 1754, 5, 47, 0, 0, 1754, 1755, 5, 42, 0, 0, 1755, 1759, 1, 0, 0, 0, 1756, - 1758, 9, 0, 0, 0, 1757, 1756, 1, 0, 0, 0, 1758, 1761, 1, 0, 0, 0, 1759, - 1760, 1, 0, 0, 0, 1759, 1757, 1, 0, 0, 0, 1760, 1762, 1, 0, 0, 0, 1761, - 1759, 1, 0, 0, 0, 1762, 1763, 5, 42, 0, 0, 1763, 1764, 5, 47, 0, 0, 1764, - 1765, 1, 0, 0, 0, 1765, 1766, 6, 194, 0, 0, 1766, 390, 1, 0, 0, 0, 1767, - 1768, 7, 9, 0, 0, 1768, 1769, 1, 0, 0, 0, 1769, 1770, 6, 195, 0, 0, 1770, - 392, 1, 0, 0, 0, 1771, 1772, 9, 0, 0, 0, 1772, 394, 1, 0, 0, 0, 1773, 1774, - 7, 10, 0, 0, 1774, 396, 1, 0, 0, 0, 1775, 1776, 7, 11, 0, 0, 1776, 398, - 1, 0, 0, 0, 1777, 1778, 7, 12, 0, 0, 1778, 400, 1, 0, 0, 0, 1779, 1780, - 7, 13, 0, 0, 1780, 402, 1, 0, 0, 0, 1781, 1782, 7, 14, 0, 0, 1782, 404, - 1, 0, 0, 0, 1783, 1784, 7, 15, 0, 0, 1784, 406, 1, 0, 0, 0, 1785, 1786, - 7, 16, 0, 0, 1786, 408, 1, 0, 0, 0, 1787, 1788, 7, 17, 0, 0, 1788, 410, - 1, 0, 0, 0, 1789, 1790, 7, 18, 0, 0, 1790, 412, 1, 0, 0, 0, 1791, 1792, - 7, 19, 0, 0, 1792, 414, 1, 0, 0, 0, 1793, 1794, 7, 20, 0, 0, 1794, 416, - 1, 0, 0, 0, 1795, 1796, 7, 21, 0, 0, 1796, 418, 1, 0, 0, 0, 1797, 1798, - 7, 22, 0, 0, 1798, 420, 1, 0, 0, 0, 1799, 1800, 7, 23, 0, 0, 1800, 422, - 1, 0, 0, 0, 1801, 1802, 7, 24, 0, 0, 1802, 424, 1, 0, 0, 0, 1803, 1804, - 7, 25, 0, 0, 1804, 426, 1, 0, 0, 0, 1805, 1806, 7, 26, 0, 0, 1806, 428, - 1, 0, 0, 0, 1807, 1808, 7, 27, 0, 0, 1808, 430, 1, 0, 0, 0, 1809, 1810, - 7, 28, 0, 0, 1810, 432, 1, 0, 0, 0, 1811, 1812, 7, 29, 0, 0, 1812, 434, - 1, 0, 0, 0, 1813, 1814, 7, 30, 0, 0, 1814, 436, 1, 0, 0, 0, 1815, 1816, - 7, 31, 0, 0, 1816, 438, 1, 0, 0, 0, 1817, 1818, 7, 32, 0, 0, 1818, 440, - 1, 0, 0, 0, 1819, 1820, 7, 33, 0, 0, 1820, 442, 1, 0, 0, 0, 1821, 1822, - 7, 34, 0, 0, 1822, 444, 1, 0, 0, 0, 1823, 1824, 7, 35, 0, 0, 1824, 446, - 1, 0, 0, 0, 1825, 1826, 7, 36, 0, 0, 1826, 448, 1, 0, 0, 0, 1827, 1828, - 7, 37, 0, 0, 1828, 450, 1, 0, 0, 0, 25, 0, 1635, 1637, 1645, 1647, 1655, - 1663, 1666, 1671, 1677, 1680, 1686, 1688, 1692, 1697, 1699, 1707, 1709, - 1715, 1725, 1727, 1741, 1745, 1749, 1759, 1, 0, 1, 0, - } - deserializer := antlr.NewATNDeserializer(nil) - staticData.atn = deserializer.Deserialize(staticData.serializedATN) - atn := staticData.atn - staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) - decisionToDFA := staticData.decisionToDFA - for index, state := range atn.DecisionToState { - decisionToDFA[index] = antlr.NewDFA(state, index) - } -} - -// SQLiteLexerInit initializes any static state used to implement SQLiteLexer. By default the -// static state used to implement the lexer is lazily initialized during the first call to -// NewSQLiteLexer(). You can call this function if you wish to initialize the static state ahead -// of time. -func SQLiteLexerInit() { - staticData := &SQLiteLexerLexerStaticData - staticData.once.Do(sqlitelexerLexerInit) -} - -// NewSQLiteLexer produces a new lexer instance for the optional input antlr.CharStream. -func NewSQLiteLexer(input antlr.CharStream) *SQLiteLexer { - SQLiteLexerInit() - l := new(SQLiteLexer) - l.BaseLexer = antlr.NewBaseLexer(input) - staticData := &SQLiteLexerLexerStaticData - l.Interpreter = antlr.NewLexerATNSimulator(l, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) - l.channelNames = staticData.ChannelNames - l.modeNames = staticData.ModeNames - l.RuleNames = staticData.RuleNames - l.LiteralNames = staticData.LiteralNames - l.SymbolicNames = staticData.SymbolicNames - l.GrammarFileName = "SQLiteLexer.g4" - // TODO: l.EOF = antlr.TokenEOF - - return l -} - -// SQLiteLexer tokens. -const ( - SQLiteLexerSCOL = 1 - SQLiteLexerDOT = 2 - SQLiteLexerOPEN_PAR = 3 - SQLiteLexerCLOSE_PAR = 4 - SQLiteLexerCOMMA = 5 - SQLiteLexerASSIGN = 6 - SQLiteLexerSTAR = 7 - SQLiteLexerPLUS = 8 - SQLiteLexerPTR2 = 9 - SQLiteLexerPTR = 10 - SQLiteLexerMINUS = 11 - SQLiteLexerTILDE = 12 - SQLiteLexerPIPE2 = 13 - SQLiteLexerDIV = 14 - SQLiteLexerMOD = 15 - SQLiteLexerLT2 = 16 - SQLiteLexerGT2 = 17 - SQLiteLexerAMP = 18 - SQLiteLexerPIPE = 19 - SQLiteLexerLT = 20 - SQLiteLexerLT_EQ = 21 - SQLiteLexerGT = 22 - SQLiteLexerGT_EQ = 23 - SQLiteLexerEQ = 24 - SQLiteLexerNOT_EQ1 = 25 - SQLiteLexerNOT_EQ2 = 26 - SQLiteLexerABORT_ = 27 - SQLiteLexerACTION_ = 28 - SQLiteLexerADD_ = 29 - SQLiteLexerAFTER_ = 30 - SQLiteLexerALL_ = 31 - SQLiteLexerALTER_ = 32 - SQLiteLexerANALYZE_ = 33 - SQLiteLexerAND_ = 34 - SQLiteLexerAS_ = 35 - SQLiteLexerASC_ = 36 - SQLiteLexerATTACH_ = 37 - SQLiteLexerAUTOINCREMENT_ = 38 - SQLiteLexerBEFORE_ = 39 - SQLiteLexerBEGIN_ = 40 - SQLiteLexerBETWEEN_ = 41 - SQLiteLexerBY_ = 42 - SQLiteLexerCASCADE_ = 43 - SQLiteLexerCASE_ = 44 - SQLiteLexerCAST_ = 45 - SQLiteLexerCHECK_ = 46 - SQLiteLexerCOLLATE_ = 47 - SQLiteLexerCOLUMN_ = 48 - SQLiteLexerCOMMIT_ = 49 - SQLiteLexerCONFLICT_ = 50 - SQLiteLexerCONSTRAINT_ = 51 - SQLiteLexerCREATE_ = 52 - SQLiteLexerCROSS_ = 53 - SQLiteLexerCURRENT_DATE_ = 54 - SQLiteLexerCURRENT_TIME_ = 55 - SQLiteLexerCURRENT_TIMESTAMP_ = 56 - SQLiteLexerDATABASE_ = 57 - SQLiteLexerDEFAULT_ = 58 - SQLiteLexerDEFERRABLE_ = 59 - SQLiteLexerDEFERRED_ = 60 - SQLiteLexerDELETE_ = 61 - SQLiteLexerDESC_ = 62 - SQLiteLexerDETACH_ = 63 - SQLiteLexerDISTINCT_ = 64 - SQLiteLexerDROP_ = 65 - SQLiteLexerEACH_ = 66 - SQLiteLexerELSE_ = 67 - SQLiteLexerEND_ = 68 - SQLiteLexerESCAPE_ = 69 - SQLiteLexerEXCEPT_ = 70 - SQLiteLexerEXCLUSIVE_ = 71 - SQLiteLexerEXISTS_ = 72 - SQLiteLexerEXPLAIN_ = 73 - SQLiteLexerFAIL_ = 74 - SQLiteLexerFOR_ = 75 - SQLiteLexerFOREIGN_ = 76 - SQLiteLexerFROM_ = 77 - SQLiteLexerFULL_ = 78 - SQLiteLexerGLOB_ = 79 - SQLiteLexerGROUP_ = 80 - SQLiteLexerHAVING_ = 81 - SQLiteLexerIF_ = 82 - SQLiteLexerIGNORE_ = 83 - SQLiteLexerIMMEDIATE_ = 84 - SQLiteLexerIN_ = 85 - SQLiteLexerINDEX_ = 86 - SQLiteLexerINDEXED_ = 87 - SQLiteLexerINITIALLY_ = 88 - SQLiteLexerINNER_ = 89 - SQLiteLexerINSERT_ = 90 - SQLiteLexerINSTEAD_ = 91 - SQLiteLexerINTERSECT_ = 92 - SQLiteLexerINTO_ = 93 - SQLiteLexerIS_ = 94 - SQLiteLexerISNULL_ = 95 - SQLiteLexerJOIN_ = 96 - SQLiteLexerKEY_ = 97 - SQLiteLexerLEFT_ = 98 - SQLiteLexerLIKE_ = 99 - SQLiteLexerLIMIT_ = 100 - SQLiteLexerMATCH_ = 101 - SQLiteLexerNATURAL_ = 102 - SQLiteLexerNO_ = 103 - SQLiteLexerNOT_ = 104 - SQLiteLexerNOTNULL_ = 105 - SQLiteLexerNULL_ = 106 - SQLiteLexerOF_ = 107 - SQLiteLexerOFFSET_ = 108 - SQLiteLexerON_ = 109 - SQLiteLexerOR_ = 110 - SQLiteLexerORDER_ = 111 - SQLiteLexerOUTER_ = 112 - SQLiteLexerPLAN_ = 113 - SQLiteLexerPRAGMA_ = 114 - SQLiteLexerPRIMARY_ = 115 - SQLiteLexerQUERY_ = 116 - SQLiteLexerRAISE_ = 117 - SQLiteLexerRECURSIVE_ = 118 - SQLiteLexerREFERENCES_ = 119 - SQLiteLexerREGEXP_ = 120 - SQLiteLexerREINDEX_ = 121 - SQLiteLexerRELEASE_ = 122 - SQLiteLexerRENAME_ = 123 - SQLiteLexerREPLACE_ = 124 - SQLiteLexerRESTRICT_ = 125 - SQLiteLexerRETURNING_ = 126 - SQLiteLexerRIGHT_ = 127 - SQLiteLexerROLLBACK_ = 128 - SQLiteLexerROW_ = 129 - SQLiteLexerROWS_ = 130 - SQLiteLexerSAVEPOINT_ = 131 - SQLiteLexerSELECT_ = 132 - SQLiteLexerSET_ = 133 - SQLiteLexerSTRICT_ = 134 - SQLiteLexerTABLE_ = 135 - SQLiteLexerTEMP_ = 136 - SQLiteLexerTEMPORARY_ = 137 - SQLiteLexerTHEN_ = 138 - SQLiteLexerTO_ = 139 - SQLiteLexerTRANSACTION_ = 140 - SQLiteLexerTRIGGER_ = 141 - SQLiteLexerUNION_ = 142 - SQLiteLexerUNIQUE_ = 143 - SQLiteLexerUPDATE_ = 144 - SQLiteLexerUSING_ = 145 - SQLiteLexerVACUUM_ = 146 - SQLiteLexerVALUES_ = 147 - SQLiteLexerVIEW_ = 148 - SQLiteLexerVIRTUAL_ = 149 - SQLiteLexerWHEN_ = 150 - SQLiteLexerWHERE_ = 151 - SQLiteLexerWITH_ = 152 - SQLiteLexerWITHOUT_ = 153 - SQLiteLexerFIRST_VALUE_ = 154 - SQLiteLexerOVER_ = 155 - SQLiteLexerPARTITION_ = 156 - SQLiteLexerRANGE_ = 157 - SQLiteLexerPRECEDING_ = 158 - SQLiteLexerUNBOUNDED_ = 159 - SQLiteLexerCURRENT_ = 160 - SQLiteLexerFOLLOWING_ = 161 - SQLiteLexerCUME_DIST_ = 162 - SQLiteLexerDENSE_RANK_ = 163 - SQLiteLexerLAG_ = 164 - SQLiteLexerLAST_VALUE_ = 165 - SQLiteLexerLEAD_ = 166 - SQLiteLexerNTH_VALUE_ = 167 - SQLiteLexerNTILE_ = 168 - SQLiteLexerPERCENT_RANK_ = 169 - SQLiteLexerRANK_ = 170 - SQLiteLexerROW_NUMBER_ = 171 - SQLiteLexerGENERATED_ = 172 - SQLiteLexerALWAYS_ = 173 - SQLiteLexerSTORED_ = 174 - SQLiteLexerTRUE_ = 175 - SQLiteLexerFALSE_ = 176 - SQLiteLexerWINDOW_ = 177 - SQLiteLexerNULLS_ = 178 - SQLiteLexerFIRST_ = 179 - SQLiteLexerLAST_ = 180 - SQLiteLexerFILTER_ = 181 - SQLiteLexerGROUPS_ = 182 - SQLiteLexerEXCLUDE_ = 183 - SQLiteLexerTIES_ = 184 - SQLiteLexerOTHERS_ = 185 - SQLiteLexerDO_ = 186 - SQLiteLexerNOTHING_ = 187 - SQLiteLexerIDENTIFIER = 188 - SQLiteLexerNUMERIC_LITERAL = 189 - SQLiteLexerNUMBERED_BIND_PARAMETER = 190 - SQLiteLexerNAMED_BIND_PARAMETER = 191 - SQLiteLexerSTRING_LITERAL = 192 - SQLiteLexerBLOB_LITERAL = 193 - SQLiteLexerSINGLE_LINE_COMMENT = 194 - SQLiteLexerMULTILINE_COMMENT = 195 - SQLiteLexerSPACES = 196 - SQLiteLexerUNEXPECTED_CHAR = 197 -) diff --git a/internal/engine/sqlite/parser/sqlite_parser.go b/internal/engine/sqlite/parser/sqlite_parser.go deleted file mode 100644 index dba28c22e4..0000000000 --- a/internal/engine/sqlite/parser/sqlite_parser.go +++ /dev/null @@ -1,33084 +0,0 @@ -// Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. - -package parser // SQLiteParser - -import ( - "fmt" - "strconv" - "sync" - - "github.com/antlr4-go/antlr/v4" -) - -// Suppress unused import errors -var _ = fmt.Printf -var _ = strconv.Itoa -var _ = sync.Once{} - -type SQLiteParser struct { - *antlr.BaseParser -} - -var SQLiteParserParserStaticData struct { - once sync.Once - serializedATN []int32 - LiteralNames []string - SymbolicNames []string - RuleNames []string - PredictionContextCache *antlr.PredictionContextCache - atn *antlr.ATN - decisionToDFA []*antlr.DFA -} - -func sqliteparserParserInit() { - staticData := &SQLiteParserParserStaticData - staticData.LiteralNames = []string{ - "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'->>'", - "'->'", "'-'", "'~'", "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", - "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'<>'", - } - staticData.SymbolicNames = []string{ - "", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", - "PLUS", "PTR2", "PTR", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2", - "GT2", "AMP", "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1", - "NOT_EQ2", "ABORT_", "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_", - "ANALYZE_", "AND_", "AS_", "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_", - "BEGIN_", "BETWEEN_", "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_", - "COLLATE_", "COLUMN_", "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_", - "CROSS_", "CURRENT_DATE_", "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_", - "DEFAULT_", "DEFERRABLE_", "DEFERRED_", "DELETE_", "DESC_", "DETACH_", - "DISTINCT_", "DROP_", "EACH_", "ELSE_", "END_", "ESCAPE_", "EXCEPT_", - "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", "FAIL_", "FOR_", "FOREIGN_", "FROM_", - "FULL_", "GLOB_", "GROUP_", "HAVING_", "IF_", "IGNORE_", "IMMEDIATE_", - "IN_", "INDEX_", "INDEXED_", "INITIALLY_", "INNER_", "INSERT_", "INSTEAD_", - "INTERSECT_", "INTO_", "IS_", "ISNULL_", "JOIN_", "KEY_", "LEFT_", "LIKE_", - "LIMIT_", "MATCH_", "NATURAL_", "NO_", "NOT_", "NOTNULL_", "NULL_", - "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", "OUTER_", "PLAN_", "PRAGMA_", - "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", "REFERENCES_", "REGEXP_", - "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", "RESTRICT_", "RETURNING_", - "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", "SELECT_", "SET_", - "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_", "TRANSACTION_", - "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", "VACUUM_", "VALUES_", - "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", "WITHOUT_", "FIRST_VALUE_", - "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", "UNBOUNDED_", "CURRENT_", - "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", "LAG_", "LAST_VALUE_", "LEAD_", - "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", "RANK_", "ROW_NUMBER_", "GENERATED_", - "ALWAYS_", "STORED_", "TRUE_", "FALSE_", "WINDOW_", "NULLS_", "FIRST_", - "LAST_", "FILTER_", "GROUPS_", "EXCLUDE_", "TIES_", "OTHERS_", "DO_", - "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", "NUMBERED_BIND_PARAMETER", - "NAMED_BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT", - "MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR", - } - staticData.RuleNames = []string{ - "parse", "sql_stmt_list", "sql_stmt", "alter_table_stmt", "analyze_stmt", - "attach_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "savepoint_stmt", - "release_stmt", "create_index_stmt", "indexed_column", "table_option", - "create_table_stmt", "column_def", "type_name", "column_constraint", - "signed_number", "table_constraint", "foreign_key_clause", "conflict_clause", - "create_trigger_stmt", "create_view_stmt", "create_virtual_table_stmt", - "with_clause", "cte_table_name", "recursive_cte", "common_table_expression", - "returning_clause", "delete_stmt", "delete_stmt_limited", "detach_stmt", - "drop_stmt", "expr", "raise_function", "literal_value", "insert_stmt", - "upsert_clause", "pragma_stmt", "pragma_value", "reindex_stmt", "select_stmt", - "join_clause", "select_core", "factored_select_stmt", "simple_select_stmt", - "compound_select_stmt", "table_or_subquery", "result_column", "join_operator", - "join_constraint", "compound_operator", "update_stmt", "column_name_list", - "update_stmt_limited", "qualified_table_name", "vacuum_stmt", "filter_clause", - "window_defn", "over_clause", "frame_spec", "frame_clause", "simple_function_invocation", - "aggregate_function_invocation", "window_function_invocation", "common_table_stmt", - "order_by_stmt", "limit_stmt", "ordering_term", "asc_desc", "frame_left", - "frame_right", "frame_single", "window_function", "of_OF_fset", "default_DEFAULT__value", - "partition_by", "order_by_expr", "order_by_expr_asc_desc", "expr_asc_desc", - "initial_select", "recursive__select", "unary_operator", "error_message", - "module_argument", "column_alias", "keyword", "name", "function_name", - "qualified_function_name", "schema_name", "table_name", "table_or_index_name", - "new_table_name", "column_name", "collation_name", "foreign_table", - "index_name", "trigger_name", "view_name", "module_name", "pragma_name", - "savepoint_name", "table_alias", "table_alias_fallback", "transaction_name", - "window_name", "alias", "filename", "base_window_name", "simple_func", - "aggregate_func", "table_function_name", "any_name", - } - staticData.PredictionContextCache = antlr.NewPredictionContextCache() - staticData.serializedATN = []int32{ - 4, 1, 197, 2176, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, - 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, - 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, - 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, - 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, - 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, - 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, - 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, - 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, - 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, - 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, - 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, - 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, - 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, - 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, - 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, - 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, - 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, - 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, - 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, - 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, - 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, - 113, 7, 113, 2, 114, 7, 114, 1, 0, 5, 0, 232, 8, 0, 10, 0, 12, 0, 235, - 9, 0, 1, 0, 1, 0, 1, 1, 5, 1, 240, 8, 1, 10, 1, 12, 1, 243, 9, 1, 1, 1, - 1, 1, 4, 1, 247, 8, 1, 11, 1, 12, 1, 248, 1, 1, 5, 1, 252, 8, 1, 10, 1, - 12, 1, 255, 9, 1, 1, 1, 5, 1, 258, 8, 1, 10, 1, 12, 1, 261, 9, 1, 1, 2, - 1, 2, 1, 2, 3, 2, 266, 8, 2, 3, 2, 268, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, - 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, - 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 294, 8, 2, 1, 3, 1, - 3, 1, 3, 1, 3, 1, 3, 3, 3, 301, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, - 3, 308, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 314, 8, 3, 1, 3, 1, 3, 3, 3, - 318, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 323, 8, 3, 1, 3, 3, 3, 326, 8, 3, 1, - 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 333, 8, 4, 1, 4, 3, 4, 336, 8, 4, 1, 5, - 1, 5, 3, 5, 340, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 3, 6, 348, 8, - 6, 1, 6, 1, 6, 3, 6, 352, 8, 6, 3, 6, 354, 8, 6, 1, 7, 1, 7, 3, 7, 358, - 8, 7, 1, 8, 1, 8, 3, 8, 362, 8, 8, 1, 8, 1, 8, 3, 8, 366, 8, 8, 1, 8, 3, - 8, 369, 8, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 376, 8, 10, 1, 10, - 1, 10, 1, 11, 1, 11, 3, 11, 382, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, - 11, 388, 8, 11, 1, 11, 1, 11, 1, 11, 3, 11, 393, 8, 11, 1, 11, 1, 11, 1, - 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 402, 8, 11, 10, 11, 12, 11, 405, - 9, 11, 1, 11, 1, 11, 1, 11, 3, 11, 410, 8, 11, 1, 12, 1, 12, 3, 12, 414, - 8, 12, 1, 12, 1, 12, 3, 12, 418, 8, 12, 1, 12, 3, 12, 421, 8, 12, 1, 13, - 1, 13, 1, 13, 3, 13, 426, 8, 13, 1, 14, 1, 14, 3, 14, 430, 8, 14, 1, 14, - 1, 14, 1, 14, 1, 14, 3, 14, 436, 8, 14, 1, 14, 1, 14, 1, 14, 3, 14, 441, - 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 448, 8, 14, 10, 14, 12, - 14, 451, 9, 14, 1, 14, 1, 14, 5, 14, 455, 8, 14, 10, 14, 12, 14, 458, 9, - 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 464, 8, 14, 10, 14, 12, 14, 467, - 9, 14, 3, 14, 469, 8, 14, 1, 14, 1, 14, 3, 14, 473, 8, 14, 1, 15, 1, 15, - 3, 15, 477, 8, 15, 1, 15, 5, 15, 480, 8, 15, 10, 15, 12, 15, 483, 9, 15, - 1, 16, 4, 16, 486, 8, 16, 11, 16, 12, 16, 487, 1, 16, 1, 16, 1, 16, 1, - 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 500, 8, 16, 1, 17, - 1, 17, 3, 17, 504, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 509, 8, 17, 1, 17, - 3, 17, 512, 8, 17, 1, 17, 3, 17, 515, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, - 520, 8, 17, 1, 17, 3, 17, 523, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, - 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 537, 8, 17, 1, - 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 544, 8, 17, 1, 17, 1, 17, 1, 17, - 1, 17, 1, 17, 3, 17, 551, 8, 17, 3, 17, 553, 8, 17, 1, 18, 3, 18, 556, - 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 562, 8, 19, 1, 19, 1, 19, 1, - 19, 3, 19, 567, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 573, 8, 19, 10, - 19, 12, 19, 576, 9, 19, 1, 19, 1, 19, 3, 19, 580, 8, 19, 1, 19, 1, 19, - 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 593, - 8, 19, 10, 19, 12, 19, 596, 9, 19, 1, 19, 1, 19, 1, 19, 3, 19, 601, 8, - 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 609, 8, 20, 10, 20, - 12, 20, 612, 9, 20, 1, 20, 1, 20, 3, 20, 616, 8, 20, 1, 20, 1, 20, 1, 20, - 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 626, 8, 20, 1, 20, 1, 20, 5, - 20, 630, 8, 20, 10, 20, 12, 20, 633, 9, 20, 1, 20, 3, 20, 636, 8, 20, 1, - 20, 1, 20, 1, 20, 3, 20, 641, 8, 20, 3, 20, 643, 8, 20, 1, 21, 1, 21, 1, - 21, 1, 21, 1, 22, 1, 22, 3, 22, 651, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, - 3, 22, 657, 8, 22, 1, 22, 1, 22, 1, 22, 3, 22, 662, 8, 22, 1, 22, 1, 22, - 1, 22, 1, 22, 1, 22, 3, 22, 669, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, - 22, 1, 22, 1, 22, 5, 22, 678, 8, 22, 10, 22, 12, 22, 681, 9, 22, 3, 22, - 683, 8, 22, 3, 22, 685, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, - 692, 8, 22, 1, 22, 1, 22, 3, 22, 696, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, - 1, 22, 3, 22, 703, 8, 22, 1, 22, 1, 22, 4, 22, 707, 8, 22, 11, 22, 12, - 22, 708, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 715, 8, 23, 1, 23, 1, 23, 1, - 23, 1, 23, 3, 23, 721, 8, 23, 1, 23, 1, 23, 1, 23, 3, 23, 726, 8, 23, 1, - 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 733, 8, 23, 10, 23, 12, 23, 736, - 9, 23, 1, 23, 1, 23, 3, 23, 740, 8, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, - 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 751, 8, 24, 1, 24, 1, 24, 1, 24, - 3, 24, 756, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, - 24, 765, 8, 24, 10, 24, 12, 24, 768, 9, 24, 1, 24, 1, 24, 3, 24, 772, 8, - 24, 1, 25, 1, 25, 3, 25, 776, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, - 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 790, 8, 25, 10, - 25, 12, 25, 793, 9, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 800, - 8, 26, 10, 26, 12, 26, 803, 9, 26, 1, 26, 1, 26, 3, 26, 807, 8, 26, 1, - 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 815, 8, 27, 1, 27, 1, 27, - 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 825, 8, 28, 10, 28, 12, - 28, 828, 9, 28, 1, 28, 1, 28, 3, 28, 832, 8, 28, 1, 28, 1, 28, 1, 28, 1, - 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 843, 8, 29, 1, 29, 3, 29, - 846, 8, 29, 3, 29, 848, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 854, - 8, 29, 1, 29, 3, 29, 857, 8, 29, 3, 29, 859, 8, 29, 5, 29, 861, 8, 29, - 10, 29, 12, 29, 864, 9, 29, 1, 30, 3, 30, 867, 8, 30, 1, 30, 1, 30, 1, - 30, 1, 30, 1, 30, 3, 30, 874, 8, 30, 1, 30, 3, 30, 877, 8, 30, 1, 31, 3, - 31, 880, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 887, 8, 31, 1, - 31, 3, 31, 890, 8, 31, 1, 31, 3, 31, 893, 8, 31, 1, 31, 3, 31, 896, 8, - 31, 1, 32, 1, 32, 3, 32, 900, 8, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, - 1, 33, 3, 33, 908, 8, 33, 1, 33, 1, 33, 1, 33, 3, 33, 913, 8, 33, 1, 33, - 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 924, 8, - 34, 1, 34, 1, 34, 1, 34, 3, 34, 929, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, - 1, 34, 1, 34, 1, 34, 3, 34, 938, 8, 34, 1, 34, 1, 34, 1, 34, 5, 34, 943, - 8, 34, 10, 34, 12, 34, 946, 9, 34, 1, 34, 3, 34, 949, 8, 34, 1, 34, 1, - 34, 3, 34, 953, 8, 34, 1, 34, 3, 34, 956, 8, 34, 1, 34, 1, 34, 1, 34, 1, - 34, 5, 34, 962, 8, 34, 10, 34, 12, 34, 965, 9, 34, 1, 34, 1, 34, 1, 34, - 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 977, 8, 34, 1, - 34, 3, 34, 980, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, - 988, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 4, 34, 995, 8, 34, 11, 34, - 12, 34, 996, 1, 34, 1, 34, 3, 34, 1001, 8, 34, 1, 34, 1, 34, 1, 34, 3, - 34, 1006, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, - 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1035, - 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1042, 8, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1053, 8, 34, - 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1062, 8, 34, 1, - 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1070, 8, 34, 10, 34, 12, - 34, 1073, 9, 34, 3, 34, 1075, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, - 1081, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1087, 8, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 1, 34, 5, 34, 1094, 8, 34, 10, 34, 12, 34, 1097, 9, 34, - 3, 34, 1099, 8, 34, 1, 34, 1, 34, 3, 34, 1103, 8, 34, 1, 34, 1, 34, 1, - 34, 1, 34, 1, 34, 3, 34, 1110, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, - 1116, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1123, 8, 34, 5, - 34, 1125, 8, 34, 10, 34, 12, 34, 1128, 9, 34, 1, 35, 1, 35, 1, 35, 1, 35, - 1, 35, 1, 35, 3, 35, 1136, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 3, - 37, 1143, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1150, 8, 37, - 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1156, 8, 37, 1, 37, 1, 37, 1, 37, 3, - 37, 1161, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1167, 8, 37, 10, 37, - 12, 37, 1170, 9, 37, 1, 37, 1, 37, 3, 37, 1174, 8, 37, 1, 37, 1, 37, 1, - 37, 1, 37, 1, 37, 5, 37, 1181, 8, 37, 10, 37, 12, 37, 1184, 9, 37, 1, 37, - 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1192, 8, 37, 10, 37, 12, 37, - 1195, 9, 37, 1, 37, 1, 37, 5, 37, 1199, 8, 37, 10, 37, 12, 37, 1202, 9, - 37, 1, 37, 1, 37, 1, 37, 3, 37, 1207, 8, 37, 1, 37, 3, 37, 1210, 8, 37, - 1, 37, 3, 37, 1213, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, - 38, 1221, 8, 38, 10, 38, 12, 38, 1224, 9, 38, 1, 38, 1, 38, 1, 38, 3, 38, - 1229, 8, 38, 3, 38, 1231, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, - 38, 3, 38, 1239, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 1246, - 8, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1251, 8, 38, 10, 38, 12, 38, 1254, 9, - 38, 1, 38, 1, 38, 3, 38, 1258, 8, 38, 3, 38, 1260, 8, 38, 1, 39, 1, 39, - 1, 39, 1, 39, 3, 39, 1266, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, - 39, 1, 39, 3, 39, 1275, 8, 39, 1, 40, 1, 40, 1, 40, 3, 40, 1280, 8, 40, - 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1287, 8, 41, 1, 41, 1, 41, 3, - 41, 1291, 8, 41, 3, 41, 1293, 8, 41, 1, 42, 3, 42, 1296, 8, 42, 1, 42, - 1, 42, 1, 42, 1, 42, 5, 42, 1302, 8, 42, 10, 42, 12, 42, 1305, 9, 42, 1, - 42, 3, 42, 1308, 8, 42, 1, 42, 3, 42, 1311, 8, 42, 1, 43, 1, 43, 1, 43, - 1, 43, 1, 43, 5, 43, 1318, 8, 43, 10, 43, 12, 43, 1321, 9, 43, 1, 44, 1, - 44, 3, 44, 1325, 8, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1330, 8, 44, 10, 44, - 12, 44, 1333, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1339, 8, 44, 10, - 44, 12, 44, 1342, 9, 44, 1, 44, 3, 44, 1345, 8, 44, 3, 44, 1347, 8, 44, - 1, 44, 1, 44, 3, 44, 1351, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, - 44, 1358, 8, 44, 10, 44, 12, 44, 1361, 9, 44, 1, 44, 1, 44, 3, 44, 1365, - 8, 44, 3, 44, 1367, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, - 44, 1, 44, 1, 44, 5, 44, 1378, 8, 44, 10, 44, 12, 44, 1381, 9, 44, 3, 44, - 1383, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1390, 8, 44, 10, - 44, 12, 44, 1393, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, - 1401, 8, 44, 10, 44, 12, 44, 1404, 9, 44, 1, 44, 1, 44, 5, 44, 1408, 8, - 44, 10, 44, 12, 44, 1411, 9, 44, 3, 44, 1413, 8, 44, 1, 45, 1, 45, 1, 46, - 3, 46, 1418, 8, 46, 1, 46, 1, 46, 3, 46, 1422, 8, 46, 1, 46, 3, 46, 1425, - 8, 46, 1, 47, 3, 47, 1428, 8, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1433, 8, - 47, 1, 47, 1, 47, 3, 47, 1437, 8, 47, 1, 47, 4, 47, 1440, 8, 47, 11, 47, - 12, 47, 1441, 1, 47, 3, 47, 1445, 8, 47, 1, 47, 3, 47, 1448, 8, 47, 1, - 48, 1, 48, 1, 48, 3, 48, 1453, 8, 48, 1, 48, 1, 48, 3, 48, 1457, 8, 48, - 1, 48, 3, 48, 1460, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1467, - 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1472, 8, 48, 1, 48, 1, 48, 1, 48, 1, - 48, 1, 48, 5, 48, 1479, 8, 48, 10, 48, 12, 48, 1482, 9, 48, 1, 48, 1, 48, - 3, 48, 1486, 8, 48, 1, 48, 3, 48, 1489, 8, 48, 1, 48, 1, 48, 1, 48, 1, - 48, 5, 48, 1495, 8, 48, 10, 48, 12, 48, 1498, 9, 48, 1, 48, 3, 48, 1501, - 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1509, 8, 48, 1, - 48, 3, 48, 1512, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1517, 8, 48, 1, 48, - 1, 48, 3, 48, 1521, 8, 48, 1, 48, 3, 48, 1524, 8, 48, 1, 48, 1, 48, 1, - 48, 1, 48, 1, 48, 3, 48, 1531, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1536, - 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1543, 8, 48, 10, 48, 12, - 48, 1546, 9, 48, 1, 48, 1, 48, 3, 48, 1550, 8, 48, 1, 48, 3, 48, 1553, - 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1559, 8, 48, 10, 48, 12, 48, - 1562, 9, 48, 1, 48, 3, 48, 1565, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, - 48, 1, 48, 3, 48, 1573, 8, 48, 1, 48, 3, 48, 1576, 8, 48, 3, 48, 1578, - 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1587, 8, - 49, 1, 49, 3, 49, 1590, 8, 49, 3, 49, 1592, 8, 49, 1, 50, 1, 50, 3, 50, - 1596, 8, 50, 1, 50, 1, 50, 3, 50, 1600, 8, 50, 1, 50, 3, 50, 1603, 8, 50, - 1, 50, 1, 50, 1, 50, 3, 50, 1608, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, - 51, 1, 51, 1, 51, 5, 51, 1617, 8, 51, 10, 51, 12, 51, 1620, 9, 51, 1, 51, - 1, 51, 3, 51, 1624, 8, 51, 1, 52, 1, 52, 3, 52, 1628, 8, 52, 1, 52, 1, - 52, 3, 52, 1632, 8, 52, 1, 53, 3, 53, 1635, 8, 53, 1, 53, 1, 53, 1, 53, - 3, 53, 1640, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1646, 8, 53, 1, - 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1653, 8, 53, 1, 53, 1, 53, 1, 53, - 5, 53, 1658, 8, 53, 10, 53, 12, 53, 1661, 9, 53, 1, 53, 1, 53, 3, 53, 1665, - 8, 53, 1, 53, 3, 53, 1668, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 5, 54, 1674, - 8, 54, 10, 54, 12, 54, 1677, 9, 54, 1, 54, 1, 54, 1, 55, 3, 55, 1682, 8, - 55, 1, 55, 1, 55, 1, 55, 3, 55, 1687, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, - 3, 55, 1693, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1700, 8, - 55, 1, 55, 1, 55, 1, 55, 5, 55, 1705, 8, 55, 10, 55, 12, 55, 1708, 9, 55, - 1, 55, 1, 55, 3, 55, 1712, 8, 55, 1, 55, 3, 55, 1715, 8, 55, 1, 55, 3, - 55, 1718, 8, 55, 1, 56, 1, 56, 1, 56, 3, 56, 1723, 8, 56, 1, 56, 1, 56, - 1, 56, 3, 56, 1728, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1735, - 8, 56, 1, 57, 1, 57, 3, 57, 1739, 8, 57, 1, 57, 1, 57, 3, 57, 1743, 8, - 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 3, 59, 1753, - 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1760, 8, 59, 10, 59, 12, - 59, 1763, 9, 59, 3, 59, 1765, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, - 5, 59, 1772, 8, 59, 10, 59, 12, 59, 1775, 9, 59, 1, 59, 3, 59, 1778, 8, - 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1786, 8, 60, 1, 60, - 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1793, 8, 60, 10, 60, 12, 60, 1796, 9, - 60, 3, 60, 1798, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1805, - 8, 60, 10, 60, 12, 60, 1808, 9, 60, 3, 60, 1810, 8, 60, 1, 60, 3, 60, 1813, - 8, 60, 1, 60, 3, 60, 1816, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, - 61, 1, 61, 1, 61, 3, 61, 1826, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, - 1, 62, 1, 62, 3, 62, 1835, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, - 63, 1842, 8, 63, 10, 63, 12, 63, 1845, 9, 63, 1, 63, 3, 63, 1848, 8, 63, - 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 3, 64, 1855, 8, 64, 1, 64, 1, 64, 1, - 64, 5, 64, 1860, 8, 64, 10, 64, 12, 64, 1863, 9, 64, 1, 64, 3, 64, 1866, - 8, 64, 1, 64, 1, 64, 3, 64, 1870, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, - 65, 5, 65, 1877, 8, 65, 10, 65, 12, 65, 1880, 9, 65, 1, 65, 3, 65, 1883, - 8, 65, 1, 65, 1, 65, 3, 65, 1887, 8, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1892, - 8, 65, 1, 66, 1, 66, 3, 66, 1896, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 1901, - 8, 66, 10, 66, 12, 66, 1904, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, - 5, 67, 1911, 8, 67, 10, 67, 12, 67, 1914, 9, 67, 1, 68, 1, 68, 1, 68, 1, - 68, 3, 68, 1920, 8, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1925, 8, 69, 1, 69, - 3, 69, 1928, 8, 69, 1, 69, 1, 69, 3, 69, 1932, 8, 69, 1, 70, 1, 70, 1, - 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, - 1946, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, - 72, 1, 72, 3, 72, 1958, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, - 1, 73, 3, 73, 1967, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, - 74, 3, 74, 1976, 8, 74, 1, 74, 1, 74, 3, 74, 1980, 8, 74, 1, 74, 1, 74, - 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1990, 8, 74, 1, 74, 3, - 74, 1993, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, - 2002, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2011, - 8, 74, 1, 74, 3, 74, 2014, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2020, - 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, - 74, 1, 74, 1, 74, 3, 74, 2034, 8, 74, 1, 74, 1, 74, 3, 74, 2038, 8, 74, - 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2049, - 8, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2054, 8, 74, 1, 75, 1, 75, 1, 75, 1, - 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 4, 77, 2065, 8, 77, 11, 77, 12, - 77, 2066, 1, 78, 1, 78, 1, 78, 4, 78, 2072, 8, 78, 11, 78, 12, 78, 2073, - 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 2082, 8, 80, 1, 80, 1, - 80, 1, 80, 3, 80, 2087, 8, 80, 5, 80, 2089, 8, 80, 10, 80, 12, 80, 2092, - 9, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, - 85, 3, 85, 2104, 8, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, - 1, 89, 1, 90, 1, 90, 1, 90, 3, 90, 2117, 8, 90, 1, 90, 1, 90, 1, 91, 1, - 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, - 1, 97, 1, 97, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 101, 1, 101, - 1, 102, 1, 102, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, - 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, - 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, - 1, 114, 1, 114, 1, 114, 1, 114, 3, 114, 2174, 8, 114, 1, 114, 2, 449, 487, - 1, 68, 115, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, - 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, - 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, - 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, - 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, - 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, - 224, 226, 228, 0, 30, 3, 0, 60, 60, 71, 71, 84, 84, 2, 0, 49, 49, 68, 68, - 1, 0, 136, 137, 2, 0, 149, 149, 174, 174, 2, 0, 8, 8, 11, 11, 2, 0, 61, - 61, 144, 144, 2, 0, 58, 58, 106, 106, 2, 0, 60, 60, 84, 84, 5, 0, 27, 27, - 74, 74, 83, 83, 124, 124, 128, 128, 4, 0, 86, 86, 135, 135, 141, 141, 148, - 148, 1, 0, 9, 10, 2, 0, 7, 7, 14, 15, 1, 0, 16, 19, 1, 0, 20, 23, 4, 0, - 79, 79, 99, 99, 101, 101, 120, 120, 3, 0, 27, 27, 74, 74, 128, 128, 5, - 0, 54, 56, 106, 106, 175, 176, 189, 189, 192, 193, 2, 0, 31, 31, 64, 64, - 3, 0, 78, 78, 98, 98, 127, 127, 3, 0, 130, 130, 157, 157, 182, 182, 2, - 0, 5, 5, 108, 108, 1, 0, 179, 180, 2, 0, 36, 36, 62, 62, 2, 0, 154, 154, - 165, 165, 2, 0, 162, 162, 169, 169, 2, 0, 163, 163, 170, 171, 2, 0, 164, - 164, 166, 166, 3, 0, 8, 8, 11, 12, 104, 104, 2, 0, 188, 188, 192, 192, - 1, 0, 27, 183, 2482, 0, 233, 1, 0, 0, 0, 2, 241, 1, 0, 0, 0, 4, 267, 1, - 0, 0, 0, 6, 295, 1, 0, 0, 0, 8, 327, 1, 0, 0, 0, 10, 337, 1, 0, 0, 0, 12, - 345, 1, 0, 0, 0, 14, 355, 1, 0, 0, 0, 16, 359, 1, 0, 0, 0, 18, 370, 1, - 0, 0, 0, 20, 373, 1, 0, 0, 0, 22, 379, 1, 0, 0, 0, 24, 413, 1, 0, 0, 0, - 26, 425, 1, 0, 0, 0, 28, 427, 1, 0, 0, 0, 30, 474, 1, 0, 0, 0, 32, 485, - 1, 0, 0, 0, 34, 503, 1, 0, 0, 0, 36, 555, 1, 0, 0, 0, 38, 561, 1, 0, 0, - 0, 40, 602, 1, 0, 0, 0, 42, 644, 1, 0, 0, 0, 44, 648, 1, 0, 0, 0, 46, 712, - 1, 0, 0, 0, 48, 744, 1, 0, 0, 0, 50, 773, 1, 0, 0, 0, 52, 794, 1, 0, 0, - 0, 54, 808, 1, 0, 0, 0, 56, 819, 1, 0, 0, 0, 58, 838, 1, 0, 0, 0, 60, 866, - 1, 0, 0, 0, 62, 879, 1, 0, 0, 0, 64, 897, 1, 0, 0, 0, 66, 903, 1, 0, 0, - 0, 68, 1005, 1, 0, 0, 0, 70, 1129, 1, 0, 0, 0, 72, 1139, 1, 0, 0, 0, 74, - 1142, 1, 0, 0, 0, 76, 1214, 1, 0, 0, 0, 78, 1261, 1, 0, 0, 0, 80, 1279, - 1, 0, 0, 0, 82, 1281, 1, 0, 0, 0, 84, 1295, 1, 0, 0, 0, 86, 1312, 1, 0, - 0, 0, 88, 1412, 1, 0, 0, 0, 90, 1414, 1, 0, 0, 0, 92, 1417, 1, 0, 0, 0, - 94, 1427, 1, 0, 0, 0, 96, 1577, 1, 0, 0, 0, 98, 1591, 1, 0, 0, 0, 100, - 1607, 1, 0, 0, 0, 102, 1623, 1, 0, 0, 0, 104, 1631, 1, 0, 0, 0, 106, 1634, - 1, 0, 0, 0, 108, 1669, 1, 0, 0, 0, 110, 1681, 1, 0, 0, 0, 112, 1722, 1, - 0, 0, 0, 114, 1736, 1, 0, 0, 0, 116, 1744, 1, 0, 0, 0, 118, 1750, 1, 0, - 0, 0, 120, 1781, 1, 0, 0, 0, 122, 1817, 1, 0, 0, 0, 124, 1827, 1, 0, 0, - 0, 126, 1836, 1, 0, 0, 0, 128, 1851, 1, 0, 0, 0, 130, 1871, 1, 0, 0, 0, - 132, 1893, 1, 0, 0, 0, 134, 1905, 1, 0, 0, 0, 136, 1915, 1, 0, 0, 0, 138, - 1921, 1, 0, 0, 0, 140, 1933, 1, 0, 0, 0, 142, 1945, 1, 0, 0, 0, 144, 1957, - 1, 0, 0, 0, 146, 1966, 1, 0, 0, 0, 148, 2053, 1, 0, 0, 0, 150, 2055, 1, - 0, 0, 0, 152, 2058, 1, 0, 0, 0, 154, 2061, 1, 0, 0, 0, 156, 2068, 1, 0, - 0, 0, 158, 2075, 1, 0, 0, 0, 160, 2079, 1, 0, 0, 0, 162, 2093, 1, 0, 0, - 0, 164, 2095, 1, 0, 0, 0, 166, 2097, 1, 0, 0, 0, 168, 2099, 1, 0, 0, 0, - 170, 2103, 1, 0, 0, 0, 172, 2105, 1, 0, 0, 0, 174, 2107, 1, 0, 0, 0, 176, - 2109, 1, 0, 0, 0, 178, 2111, 1, 0, 0, 0, 180, 2116, 1, 0, 0, 0, 182, 2120, - 1, 0, 0, 0, 184, 2122, 1, 0, 0, 0, 186, 2124, 1, 0, 0, 0, 188, 2126, 1, - 0, 0, 0, 190, 2128, 1, 0, 0, 0, 192, 2130, 1, 0, 0, 0, 194, 2132, 1, 0, - 0, 0, 196, 2134, 1, 0, 0, 0, 198, 2136, 1, 0, 0, 0, 200, 2138, 1, 0, 0, - 0, 202, 2140, 1, 0, 0, 0, 204, 2142, 1, 0, 0, 0, 206, 2144, 1, 0, 0, 0, - 208, 2146, 1, 0, 0, 0, 210, 2148, 1, 0, 0, 0, 212, 2150, 1, 0, 0, 0, 214, - 2152, 1, 0, 0, 0, 216, 2154, 1, 0, 0, 0, 218, 2156, 1, 0, 0, 0, 220, 2158, - 1, 0, 0, 0, 222, 2160, 1, 0, 0, 0, 224, 2162, 1, 0, 0, 0, 226, 2164, 1, - 0, 0, 0, 228, 2173, 1, 0, 0, 0, 230, 232, 3, 2, 1, 0, 231, 230, 1, 0, 0, - 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, - 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 5, 0, 0, 1, 237, 1, 1, - 0, 0, 0, 238, 240, 5, 1, 0, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, - 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, - 241, 1, 0, 0, 0, 244, 253, 3, 4, 2, 0, 245, 247, 5, 1, 0, 0, 246, 245, - 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, - 0, 0, 249, 250, 1, 0, 0, 0, 250, 252, 3, 4, 2, 0, 251, 246, 1, 0, 0, 0, - 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, - 259, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 258, 5, 1, 0, 0, 257, 256, - 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, - 0, 0, 260, 3, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 262, 265, 5, 73, 0, 0, - 263, 264, 5, 116, 0, 0, 264, 266, 5, 113, 0, 0, 265, 263, 1, 0, 0, 0, 265, - 266, 1, 0, 0, 0, 266, 268, 1, 0, 0, 0, 267, 262, 1, 0, 0, 0, 267, 268, - 1, 0, 0, 0, 268, 293, 1, 0, 0, 0, 269, 294, 3, 6, 3, 0, 270, 294, 3, 8, - 4, 0, 271, 294, 3, 10, 5, 0, 272, 294, 3, 12, 6, 0, 273, 294, 3, 14, 7, - 0, 274, 294, 3, 22, 11, 0, 275, 294, 3, 28, 14, 0, 276, 294, 3, 44, 22, - 0, 277, 294, 3, 46, 23, 0, 278, 294, 3, 48, 24, 0, 279, 294, 3, 60, 30, - 0, 280, 294, 3, 62, 31, 0, 281, 294, 3, 64, 32, 0, 282, 294, 3, 66, 33, - 0, 283, 294, 3, 74, 37, 0, 284, 294, 3, 78, 39, 0, 285, 294, 3, 82, 41, - 0, 286, 294, 3, 20, 10, 0, 287, 294, 3, 16, 8, 0, 288, 294, 3, 18, 9, 0, - 289, 294, 3, 84, 42, 0, 290, 294, 3, 106, 53, 0, 291, 294, 3, 110, 55, - 0, 292, 294, 3, 114, 57, 0, 293, 269, 1, 0, 0, 0, 293, 270, 1, 0, 0, 0, - 293, 271, 1, 0, 0, 0, 293, 272, 1, 0, 0, 0, 293, 273, 1, 0, 0, 0, 293, - 274, 1, 0, 0, 0, 293, 275, 1, 0, 0, 0, 293, 276, 1, 0, 0, 0, 293, 277, - 1, 0, 0, 0, 293, 278, 1, 0, 0, 0, 293, 279, 1, 0, 0, 0, 293, 280, 1, 0, - 0, 0, 293, 281, 1, 0, 0, 0, 293, 282, 1, 0, 0, 0, 293, 283, 1, 0, 0, 0, - 293, 284, 1, 0, 0, 0, 293, 285, 1, 0, 0, 0, 293, 286, 1, 0, 0, 0, 293, - 287, 1, 0, 0, 0, 293, 288, 1, 0, 0, 0, 293, 289, 1, 0, 0, 0, 293, 290, - 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 294, 5, 1, 0, 0, - 0, 295, 296, 5, 32, 0, 0, 296, 300, 5, 135, 0, 0, 297, 298, 3, 182, 91, - 0, 298, 299, 5, 2, 0, 0, 299, 301, 1, 0, 0, 0, 300, 297, 1, 0, 0, 0, 300, - 301, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 325, 3, 184, 92, 0, 303, 313, - 5, 123, 0, 0, 304, 305, 5, 139, 0, 0, 305, 314, 3, 188, 94, 0, 306, 308, - 5, 48, 0, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 1, 0, - 0, 0, 309, 310, 3, 190, 95, 0, 310, 311, 5, 139, 0, 0, 311, 312, 3, 190, - 95, 0, 312, 314, 1, 0, 0, 0, 313, 304, 1, 0, 0, 0, 313, 307, 1, 0, 0, 0, - 314, 326, 1, 0, 0, 0, 315, 317, 5, 29, 0, 0, 316, 318, 5, 48, 0, 0, 317, - 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 326, - 3, 30, 15, 0, 320, 322, 5, 65, 0, 0, 321, 323, 5, 48, 0, 0, 322, 321, 1, - 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 326, 3, 190, - 95, 0, 325, 303, 1, 0, 0, 0, 325, 315, 1, 0, 0, 0, 325, 320, 1, 0, 0, 0, - 326, 7, 1, 0, 0, 0, 327, 335, 5, 33, 0, 0, 328, 336, 3, 182, 91, 0, 329, - 330, 3, 182, 91, 0, 330, 331, 5, 2, 0, 0, 331, 333, 1, 0, 0, 0, 332, 329, - 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 336, 3, 186, - 93, 0, 335, 328, 1, 0, 0, 0, 335, 332, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, - 336, 9, 1, 0, 0, 0, 337, 339, 5, 37, 0, 0, 338, 340, 5, 57, 0, 0, 339, - 338, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, - 3, 68, 34, 0, 342, 343, 5, 35, 0, 0, 343, 344, 3, 182, 91, 0, 344, 11, - 1, 0, 0, 0, 345, 347, 5, 40, 0, 0, 346, 348, 7, 0, 0, 0, 347, 346, 1, 0, - 0, 0, 347, 348, 1, 0, 0, 0, 348, 353, 1, 0, 0, 0, 349, 351, 5, 140, 0, - 0, 350, 352, 3, 212, 106, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, - 352, 354, 1, 0, 0, 0, 353, 349, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, - 13, 1, 0, 0, 0, 355, 357, 7, 1, 0, 0, 356, 358, 5, 140, 0, 0, 357, 356, - 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 15, 1, 0, 0, 0, 359, 361, 5, 128, - 0, 0, 360, 362, 5, 140, 0, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, - 0, 362, 368, 1, 0, 0, 0, 363, 365, 5, 139, 0, 0, 364, 366, 5, 131, 0, 0, - 365, 364, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, - 369, 3, 206, 103, 0, 368, 363, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 17, - 1, 0, 0, 0, 370, 371, 5, 131, 0, 0, 371, 372, 3, 206, 103, 0, 372, 19, - 1, 0, 0, 0, 373, 375, 5, 122, 0, 0, 374, 376, 5, 131, 0, 0, 375, 374, 1, - 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 378, 3, 206, - 103, 0, 378, 21, 1, 0, 0, 0, 379, 381, 5, 52, 0, 0, 380, 382, 5, 143, 0, - 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, - 387, 5, 86, 0, 0, 384, 385, 5, 82, 0, 0, 385, 386, 5, 104, 0, 0, 386, 388, - 5, 72, 0, 0, 387, 384, 1, 0, 0, 0, 387, 388, 1, 0, 0, 0, 388, 392, 1, 0, - 0, 0, 389, 390, 3, 182, 91, 0, 390, 391, 5, 2, 0, 0, 391, 393, 1, 0, 0, - 0, 392, 389, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, - 395, 3, 196, 98, 0, 395, 396, 5, 109, 0, 0, 396, 397, 3, 184, 92, 0, 397, - 398, 5, 3, 0, 0, 398, 403, 3, 24, 12, 0, 399, 400, 5, 5, 0, 0, 400, 402, - 3, 24, 12, 0, 401, 399, 1, 0, 0, 0, 402, 405, 1, 0, 0, 0, 403, 401, 1, - 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, - 0, 406, 409, 5, 4, 0, 0, 407, 408, 5, 151, 0, 0, 408, 410, 3, 68, 34, 0, - 409, 407, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 23, 1, 0, 0, 0, 411, 414, - 3, 190, 95, 0, 412, 414, 3, 68, 34, 0, 413, 411, 1, 0, 0, 0, 413, 412, - 1, 0, 0, 0, 414, 417, 1, 0, 0, 0, 415, 416, 5, 47, 0, 0, 416, 418, 3, 192, - 96, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, - 419, 421, 3, 140, 70, 0, 420, 419, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, - 25, 1, 0, 0, 0, 422, 423, 5, 153, 0, 0, 423, 426, 5, 188, 0, 0, 424, 426, - 5, 134, 0, 0, 425, 422, 1, 0, 0, 0, 425, 424, 1, 0, 0, 0, 426, 27, 1, 0, - 0, 0, 427, 429, 5, 52, 0, 0, 428, 430, 7, 2, 0, 0, 429, 428, 1, 0, 0, 0, - 429, 430, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 435, 5, 135, 0, 0, 432, - 433, 5, 82, 0, 0, 433, 434, 5, 104, 0, 0, 434, 436, 5, 72, 0, 0, 435, 432, - 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 440, 1, 0, 0, 0, 437, 438, 3, 182, - 91, 0, 438, 439, 5, 2, 0, 0, 439, 441, 1, 0, 0, 0, 440, 437, 1, 0, 0, 0, - 440, 441, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 472, 3, 184, 92, 0, 443, - 444, 5, 3, 0, 0, 444, 449, 3, 30, 15, 0, 445, 446, 5, 5, 0, 0, 446, 448, - 3, 30, 15, 0, 447, 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 450, 1, - 0, 0, 0, 449, 447, 1, 0, 0, 0, 450, 456, 1, 0, 0, 0, 451, 449, 1, 0, 0, - 0, 452, 453, 5, 5, 0, 0, 453, 455, 3, 38, 19, 0, 454, 452, 1, 0, 0, 0, - 455, 458, 1, 0, 0, 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, - 459, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 459, 468, 5, 4, 0, 0, 460, 465, - 3, 26, 13, 0, 461, 462, 5, 5, 0, 0, 462, 464, 3, 26, 13, 0, 463, 461, 1, - 0, 0, 0, 464, 467, 1, 0, 0, 0, 465, 463, 1, 0, 0, 0, 465, 466, 1, 0, 0, - 0, 466, 469, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 468, 460, 1, 0, 0, 0, 468, - 469, 1, 0, 0, 0, 469, 473, 1, 0, 0, 0, 470, 471, 5, 35, 0, 0, 471, 473, - 3, 84, 42, 0, 472, 443, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 473, 29, 1, 0, - 0, 0, 474, 476, 3, 190, 95, 0, 475, 477, 3, 32, 16, 0, 476, 475, 1, 0, - 0, 0, 476, 477, 1, 0, 0, 0, 477, 481, 1, 0, 0, 0, 478, 480, 3, 34, 17, - 0, 479, 478, 1, 0, 0, 0, 480, 483, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 481, - 482, 1, 0, 0, 0, 482, 31, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 484, 486, 3, - 176, 88, 0, 485, 484, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, - 0, 0, 487, 485, 1, 0, 0, 0, 488, 499, 1, 0, 0, 0, 489, 490, 5, 3, 0, 0, - 490, 491, 3, 36, 18, 0, 491, 492, 5, 4, 0, 0, 492, 500, 1, 0, 0, 0, 493, - 494, 5, 3, 0, 0, 494, 495, 3, 36, 18, 0, 495, 496, 5, 5, 0, 0, 496, 497, - 3, 36, 18, 0, 497, 498, 5, 4, 0, 0, 498, 500, 1, 0, 0, 0, 499, 489, 1, - 0, 0, 0, 499, 493, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 33, 1, 0, 0, - 0, 501, 502, 5, 51, 0, 0, 502, 504, 3, 176, 88, 0, 503, 501, 1, 0, 0, 0, - 503, 504, 1, 0, 0, 0, 504, 552, 1, 0, 0, 0, 505, 506, 5, 115, 0, 0, 506, - 508, 5, 97, 0, 0, 507, 509, 3, 140, 70, 0, 508, 507, 1, 0, 0, 0, 508, 509, - 1, 0, 0, 0, 509, 511, 1, 0, 0, 0, 510, 512, 3, 42, 21, 0, 511, 510, 1, - 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 514, 1, 0, 0, 0, 513, 515, 5, 38, 0, - 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 553, 1, 0, 0, 0, 516, - 517, 5, 104, 0, 0, 517, 520, 5, 106, 0, 0, 518, 520, 5, 143, 0, 0, 519, - 516, 1, 0, 0, 0, 519, 518, 1, 0, 0, 0, 520, 522, 1, 0, 0, 0, 521, 523, - 3, 42, 21, 0, 522, 521, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 553, 1, - 0, 0, 0, 524, 525, 5, 46, 0, 0, 525, 526, 5, 3, 0, 0, 526, 527, 3, 68, - 34, 0, 527, 528, 5, 4, 0, 0, 528, 553, 1, 0, 0, 0, 529, 536, 5, 58, 0, - 0, 530, 537, 3, 36, 18, 0, 531, 537, 3, 72, 36, 0, 532, 533, 5, 3, 0, 0, - 533, 534, 3, 68, 34, 0, 534, 535, 5, 4, 0, 0, 535, 537, 1, 0, 0, 0, 536, - 530, 1, 0, 0, 0, 536, 531, 1, 0, 0, 0, 536, 532, 1, 0, 0, 0, 537, 553, - 1, 0, 0, 0, 538, 539, 5, 47, 0, 0, 539, 553, 3, 192, 96, 0, 540, 553, 3, - 40, 20, 0, 541, 542, 5, 172, 0, 0, 542, 544, 5, 173, 0, 0, 543, 541, 1, - 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 5, 35, 0, - 0, 546, 547, 5, 3, 0, 0, 547, 548, 3, 68, 34, 0, 548, 550, 5, 4, 0, 0, - 549, 551, 7, 3, 0, 0, 550, 549, 1, 0, 0, 0, 550, 551, 1, 0, 0, 0, 551, - 553, 1, 0, 0, 0, 552, 505, 1, 0, 0, 0, 552, 519, 1, 0, 0, 0, 552, 524, - 1, 0, 0, 0, 552, 529, 1, 0, 0, 0, 552, 538, 1, 0, 0, 0, 552, 540, 1, 0, - 0, 0, 552, 543, 1, 0, 0, 0, 553, 35, 1, 0, 0, 0, 554, 556, 7, 4, 0, 0, - 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, - 558, 5, 189, 0, 0, 558, 37, 1, 0, 0, 0, 559, 560, 5, 51, 0, 0, 560, 562, - 3, 176, 88, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 600, 1, - 0, 0, 0, 563, 564, 5, 115, 0, 0, 564, 567, 5, 97, 0, 0, 565, 567, 5, 143, - 0, 0, 566, 563, 1, 0, 0, 0, 566, 565, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, - 568, 569, 5, 3, 0, 0, 569, 574, 3, 24, 12, 0, 570, 571, 5, 5, 0, 0, 571, - 573, 3, 24, 12, 0, 572, 570, 1, 0, 0, 0, 573, 576, 1, 0, 0, 0, 574, 572, - 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 577, 1, 0, 0, 0, 576, 574, 1, 0, - 0, 0, 577, 579, 5, 4, 0, 0, 578, 580, 3, 42, 21, 0, 579, 578, 1, 0, 0, - 0, 579, 580, 1, 0, 0, 0, 580, 601, 1, 0, 0, 0, 581, 582, 5, 46, 0, 0, 582, - 583, 5, 3, 0, 0, 583, 584, 3, 68, 34, 0, 584, 585, 5, 4, 0, 0, 585, 601, - 1, 0, 0, 0, 586, 587, 5, 76, 0, 0, 587, 588, 5, 97, 0, 0, 588, 589, 5, - 3, 0, 0, 589, 594, 3, 190, 95, 0, 590, 591, 5, 5, 0, 0, 591, 593, 3, 190, - 95, 0, 592, 590, 1, 0, 0, 0, 593, 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, - 594, 595, 1, 0, 0, 0, 595, 597, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, - 598, 5, 4, 0, 0, 598, 599, 3, 40, 20, 0, 599, 601, 1, 0, 0, 0, 600, 566, - 1, 0, 0, 0, 600, 581, 1, 0, 0, 0, 600, 586, 1, 0, 0, 0, 601, 39, 1, 0, - 0, 0, 602, 603, 5, 119, 0, 0, 603, 615, 3, 194, 97, 0, 604, 605, 5, 3, - 0, 0, 605, 610, 3, 190, 95, 0, 606, 607, 5, 5, 0, 0, 607, 609, 3, 190, - 95, 0, 608, 606, 1, 0, 0, 0, 609, 612, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, - 610, 611, 1, 0, 0, 0, 611, 613, 1, 0, 0, 0, 612, 610, 1, 0, 0, 0, 613, - 614, 5, 4, 0, 0, 614, 616, 1, 0, 0, 0, 615, 604, 1, 0, 0, 0, 615, 616, - 1, 0, 0, 0, 616, 631, 1, 0, 0, 0, 617, 618, 5, 109, 0, 0, 618, 625, 7, - 5, 0, 0, 619, 620, 5, 133, 0, 0, 620, 626, 7, 6, 0, 0, 621, 626, 5, 43, - 0, 0, 622, 626, 5, 125, 0, 0, 623, 624, 5, 103, 0, 0, 624, 626, 5, 28, - 0, 0, 625, 619, 1, 0, 0, 0, 625, 621, 1, 0, 0, 0, 625, 622, 1, 0, 0, 0, - 625, 623, 1, 0, 0, 0, 626, 630, 1, 0, 0, 0, 627, 628, 5, 101, 0, 0, 628, - 630, 3, 176, 88, 0, 629, 617, 1, 0, 0, 0, 629, 627, 1, 0, 0, 0, 630, 633, - 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 642, 1, 0, - 0, 0, 633, 631, 1, 0, 0, 0, 634, 636, 5, 104, 0, 0, 635, 634, 1, 0, 0, - 0, 635, 636, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 640, 5, 59, 0, 0, 638, - 639, 5, 88, 0, 0, 639, 641, 7, 7, 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, - 1, 0, 0, 0, 641, 643, 1, 0, 0, 0, 642, 635, 1, 0, 0, 0, 642, 643, 1, 0, - 0, 0, 643, 41, 1, 0, 0, 0, 644, 645, 5, 109, 0, 0, 645, 646, 5, 50, 0, - 0, 646, 647, 7, 8, 0, 0, 647, 43, 1, 0, 0, 0, 648, 650, 5, 52, 0, 0, 649, - 651, 7, 2, 0, 0, 650, 649, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 652, - 1, 0, 0, 0, 652, 656, 5, 141, 0, 0, 653, 654, 5, 82, 0, 0, 654, 655, 5, - 104, 0, 0, 655, 657, 5, 72, 0, 0, 656, 653, 1, 0, 0, 0, 656, 657, 1, 0, - 0, 0, 657, 661, 1, 0, 0, 0, 658, 659, 3, 182, 91, 0, 659, 660, 5, 2, 0, - 0, 660, 662, 1, 0, 0, 0, 661, 658, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, - 663, 1, 0, 0, 0, 663, 668, 3, 198, 99, 0, 664, 669, 5, 39, 0, 0, 665, 669, - 5, 30, 0, 0, 666, 667, 5, 91, 0, 0, 667, 669, 5, 107, 0, 0, 668, 664, 1, - 0, 0, 0, 668, 665, 1, 0, 0, 0, 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, - 0, 669, 684, 1, 0, 0, 0, 670, 685, 5, 61, 0, 0, 671, 685, 5, 90, 0, 0, - 672, 682, 5, 144, 0, 0, 673, 674, 5, 107, 0, 0, 674, 679, 3, 190, 95, 0, - 675, 676, 5, 5, 0, 0, 676, 678, 3, 190, 95, 0, 677, 675, 1, 0, 0, 0, 678, - 681, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 683, - 1, 0, 0, 0, 681, 679, 1, 0, 0, 0, 682, 673, 1, 0, 0, 0, 682, 683, 1, 0, - 0, 0, 683, 685, 1, 0, 0, 0, 684, 670, 1, 0, 0, 0, 684, 671, 1, 0, 0, 0, - 684, 672, 1, 0, 0, 0, 685, 686, 1, 0, 0, 0, 686, 687, 5, 109, 0, 0, 687, - 691, 3, 184, 92, 0, 688, 689, 5, 75, 0, 0, 689, 690, 5, 66, 0, 0, 690, - 692, 5, 129, 0, 0, 691, 688, 1, 0, 0, 0, 691, 692, 1, 0, 0, 0, 692, 695, - 1, 0, 0, 0, 693, 694, 5, 150, 0, 0, 694, 696, 3, 68, 34, 0, 695, 693, 1, - 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 697, 1, 0, 0, 0, 697, 706, 5, 40, 0, - 0, 698, 703, 3, 106, 53, 0, 699, 703, 3, 74, 37, 0, 700, 703, 3, 60, 30, - 0, 701, 703, 3, 84, 42, 0, 702, 698, 1, 0, 0, 0, 702, 699, 1, 0, 0, 0, - 702, 700, 1, 0, 0, 0, 702, 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, - 705, 5, 1, 0, 0, 705, 707, 1, 0, 0, 0, 706, 702, 1, 0, 0, 0, 707, 708, - 1, 0, 0, 0, 708, 706, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 1, 0, - 0, 0, 710, 711, 5, 68, 0, 0, 711, 45, 1, 0, 0, 0, 712, 714, 5, 52, 0, 0, - 713, 715, 7, 2, 0, 0, 714, 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, - 716, 1, 0, 0, 0, 716, 720, 5, 148, 0, 0, 717, 718, 5, 82, 0, 0, 718, 719, - 5, 104, 0, 0, 719, 721, 5, 72, 0, 0, 720, 717, 1, 0, 0, 0, 720, 721, 1, - 0, 0, 0, 721, 725, 1, 0, 0, 0, 722, 723, 3, 182, 91, 0, 723, 724, 5, 2, - 0, 0, 724, 726, 1, 0, 0, 0, 725, 722, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, - 726, 727, 1, 0, 0, 0, 727, 739, 3, 200, 100, 0, 728, 729, 5, 3, 0, 0, 729, - 734, 3, 190, 95, 0, 730, 731, 5, 5, 0, 0, 731, 733, 3, 190, 95, 0, 732, - 730, 1, 0, 0, 0, 733, 736, 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 734, 735, - 1, 0, 0, 0, 735, 737, 1, 0, 0, 0, 736, 734, 1, 0, 0, 0, 737, 738, 5, 4, - 0, 0, 738, 740, 1, 0, 0, 0, 739, 728, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, - 740, 741, 1, 0, 0, 0, 741, 742, 5, 35, 0, 0, 742, 743, 3, 84, 42, 0, 743, - 47, 1, 0, 0, 0, 744, 745, 5, 52, 0, 0, 745, 746, 5, 149, 0, 0, 746, 750, - 5, 135, 0, 0, 747, 748, 5, 82, 0, 0, 748, 749, 5, 104, 0, 0, 749, 751, - 5, 72, 0, 0, 750, 747, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 755, 1, 0, - 0, 0, 752, 753, 3, 182, 91, 0, 753, 754, 5, 2, 0, 0, 754, 756, 1, 0, 0, - 0, 755, 752, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, - 758, 3, 184, 92, 0, 758, 759, 5, 145, 0, 0, 759, 771, 3, 202, 101, 0, 760, - 761, 5, 3, 0, 0, 761, 766, 3, 170, 85, 0, 762, 763, 5, 5, 0, 0, 763, 765, - 3, 170, 85, 0, 764, 762, 1, 0, 0, 0, 765, 768, 1, 0, 0, 0, 766, 764, 1, - 0, 0, 0, 766, 767, 1, 0, 0, 0, 767, 769, 1, 0, 0, 0, 768, 766, 1, 0, 0, - 0, 769, 770, 5, 4, 0, 0, 770, 772, 1, 0, 0, 0, 771, 760, 1, 0, 0, 0, 771, - 772, 1, 0, 0, 0, 772, 49, 1, 0, 0, 0, 773, 775, 5, 152, 0, 0, 774, 776, - 5, 118, 0, 0, 775, 774, 1, 0, 0, 0, 775, 776, 1, 0, 0, 0, 776, 777, 1, - 0, 0, 0, 777, 778, 3, 52, 26, 0, 778, 779, 5, 35, 0, 0, 779, 780, 5, 3, - 0, 0, 780, 781, 3, 84, 42, 0, 781, 791, 5, 4, 0, 0, 782, 783, 5, 5, 0, - 0, 783, 784, 3, 52, 26, 0, 784, 785, 5, 35, 0, 0, 785, 786, 5, 3, 0, 0, - 786, 787, 3, 84, 42, 0, 787, 788, 5, 4, 0, 0, 788, 790, 1, 0, 0, 0, 789, - 782, 1, 0, 0, 0, 790, 793, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 792, - 1, 0, 0, 0, 792, 51, 1, 0, 0, 0, 793, 791, 1, 0, 0, 0, 794, 806, 3, 184, - 92, 0, 795, 796, 5, 3, 0, 0, 796, 801, 3, 190, 95, 0, 797, 798, 5, 5, 0, - 0, 798, 800, 3, 190, 95, 0, 799, 797, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, - 801, 799, 1, 0, 0, 0, 801, 802, 1, 0, 0, 0, 802, 804, 1, 0, 0, 0, 803, - 801, 1, 0, 0, 0, 804, 805, 5, 4, 0, 0, 805, 807, 1, 0, 0, 0, 806, 795, - 1, 0, 0, 0, 806, 807, 1, 0, 0, 0, 807, 53, 1, 0, 0, 0, 808, 809, 3, 52, - 26, 0, 809, 810, 5, 35, 0, 0, 810, 811, 5, 3, 0, 0, 811, 812, 3, 162, 81, - 0, 812, 814, 5, 142, 0, 0, 813, 815, 5, 31, 0, 0, 814, 813, 1, 0, 0, 0, - 814, 815, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 3, 164, 82, 0, 817, - 818, 5, 4, 0, 0, 818, 55, 1, 0, 0, 0, 819, 831, 3, 184, 92, 0, 820, 821, - 5, 3, 0, 0, 821, 826, 3, 190, 95, 0, 822, 823, 5, 5, 0, 0, 823, 825, 3, - 190, 95, 0, 824, 822, 1, 0, 0, 0, 825, 828, 1, 0, 0, 0, 826, 824, 1, 0, - 0, 0, 826, 827, 1, 0, 0, 0, 827, 829, 1, 0, 0, 0, 828, 826, 1, 0, 0, 0, - 829, 830, 5, 4, 0, 0, 830, 832, 1, 0, 0, 0, 831, 820, 1, 0, 0, 0, 831, - 832, 1, 0, 0, 0, 832, 833, 1, 0, 0, 0, 833, 834, 5, 35, 0, 0, 834, 835, - 5, 3, 0, 0, 835, 836, 3, 84, 42, 0, 836, 837, 5, 4, 0, 0, 837, 57, 1, 0, - 0, 0, 838, 847, 5, 126, 0, 0, 839, 848, 5, 7, 0, 0, 840, 845, 3, 68, 34, - 0, 841, 843, 5, 35, 0, 0, 842, 841, 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, - 844, 1, 0, 0, 0, 844, 846, 3, 172, 86, 0, 845, 842, 1, 0, 0, 0, 845, 846, - 1, 0, 0, 0, 846, 848, 1, 0, 0, 0, 847, 839, 1, 0, 0, 0, 847, 840, 1, 0, - 0, 0, 848, 862, 1, 0, 0, 0, 849, 858, 5, 5, 0, 0, 850, 859, 5, 7, 0, 0, - 851, 856, 3, 68, 34, 0, 852, 854, 5, 35, 0, 0, 853, 852, 1, 0, 0, 0, 853, - 854, 1, 0, 0, 0, 854, 855, 1, 0, 0, 0, 855, 857, 3, 172, 86, 0, 856, 853, - 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 859, 1, 0, 0, 0, 858, 850, 1, 0, - 0, 0, 858, 851, 1, 0, 0, 0, 859, 861, 1, 0, 0, 0, 860, 849, 1, 0, 0, 0, - 861, 864, 1, 0, 0, 0, 862, 860, 1, 0, 0, 0, 862, 863, 1, 0, 0, 0, 863, - 59, 1, 0, 0, 0, 864, 862, 1, 0, 0, 0, 865, 867, 3, 50, 25, 0, 866, 865, - 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 1, 0, 0, 0, 868, 869, 5, 61, - 0, 0, 869, 870, 5, 77, 0, 0, 870, 873, 3, 112, 56, 0, 871, 872, 5, 151, - 0, 0, 872, 874, 3, 68, 34, 0, 873, 871, 1, 0, 0, 0, 873, 874, 1, 0, 0, - 0, 874, 876, 1, 0, 0, 0, 875, 877, 3, 58, 29, 0, 876, 875, 1, 0, 0, 0, - 876, 877, 1, 0, 0, 0, 877, 61, 1, 0, 0, 0, 878, 880, 3, 50, 25, 0, 879, - 878, 1, 0, 0, 0, 879, 880, 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 881, 882, - 5, 61, 0, 0, 882, 883, 5, 77, 0, 0, 883, 886, 3, 112, 56, 0, 884, 885, - 5, 151, 0, 0, 885, 887, 3, 68, 34, 0, 886, 884, 1, 0, 0, 0, 886, 887, 1, - 0, 0, 0, 887, 892, 1, 0, 0, 0, 888, 890, 3, 134, 67, 0, 889, 888, 1, 0, - 0, 0, 889, 890, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 893, 3, 136, 68, - 0, 892, 889, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, - 896, 3, 58, 29, 0, 895, 894, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 63, - 1, 0, 0, 0, 897, 899, 5, 63, 0, 0, 898, 900, 5, 57, 0, 0, 899, 898, 1, - 0, 0, 0, 899, 900, 1, 0, 0, 0, 900, 901, 1, 0, 0, 0, 901, 902, 3, 182, - 91, 0, 902, 65, 1, 0, 0, 0, 903, 904, 5, 65, 0, 0, 904, 907, 7, 9, 0, 0, - 905, 906, 5, 82, 0, 0, 906, 908, 5, 72, 0, 0, 907, 905, 1, 0, 0, 0, 907, - 908, 1, 0, 0, 0, 908, 912, 1, 0, 0, 0, 909, 910, 3, 182, 91, 0, 910, 911, - 5, 2, 0, 0, 911, 913, 1, 0, 0, 0, 912, 909, 1, 0, 0, 0, 912, 913, 1, 0, - 0, 0, 913, 914, 1, 0, 0, 0, 914, 915, 3, 228, 114, 0, 915, 67, 1, 0, 0, - 0, 916, 917, 6, 34, -1, 0, 917, 1006, 3, 72, 36, 0, 918, 1006, 5, 190, - 0, 0, 919, 1006, 5, 191, 0, 0, 920, 921, 3, 182, 91, 0, 921, 922, 5, 2, - 0, 0, 922, 924, 1, 0, 0, 0, 923, 920, 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, - 924, 925, 1, 0, 0, 0, 925, 926, 3, 184, 92, 0, 926, 927, 5, 2, 0, 0, 927, - 929, 1, 0, 0, 0, 928, 923, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 930, - 1, 0, 0, 0, 930, 1006, 3, 190, 95, 0, 931, 932, 3, 166, 83, 0, 932, 933, - 3, 68, 34, 21, 933, 1006, 1, 0, 0, 0, 934, 935, 3, 180, 90, 0, 935, 948, - 5, 3, 0, 0, 936, 938, 5, 64, 0, 0, 937, 936, 1, 0, 0, 0, 937, 938, 1, 0, - 0, 0, 938, 939, 1, 0, 0, 0, 939, 944, 3, 68, 34, 0, 940, 941, 5, 5, 0, - 0, 941, 943, 3, 68, 34, 0, 942, 940, 1, 0, 0, 0, 943, 946, 1, 0, 0, 0, - 944, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945, 949, 1, 0, 0, 0, 946, - 944, 1, 0, 0, 0, 947, 949, 5, 7, 0, 0, 948, 937, 1, 0, 0, 0, 948, 947, - 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 952, 5, 4, - 0, 0, 951, 953, 3, 116, 58, 0, 952, 951, 1, 0, 0, 0, 952, 953, 1, 0, 0, - 0, 953, 955, 1, 0, 0, 0, 954, 956, 3, 120, 60, 0, 955, 954, 1, 0, 0, 0, - 955, 956, 1, 0, 0, 0, 956, 1006, 1, 0, 0, 0, 957, 958, 5, 3, 0, 0, 958, - 963, 3, 68, 34, 0, 959, 960, 5, 5, 0, 0, 960, 962, 3, 68, 34, 0, 961, 959, - 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, 1, 0, - 0, 0, 964, 966, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 967, 5, 4, 0, 0, - 967, 1006, 1, 0, 0, 0, 968, 969, 5, 45, 0, 0, 969, 970, 5, 3, 0, 0, 970, - 971, 3, 68, 34, 0, 971, 972, 5, 35, 0, 0, 972, 973, 3, 32, 16, 0, 973, - 974, 5, 4, 0, 0, 974, 1006, 1, 0, 0, 0, 975, 977, 5, 104, 0, 0, 976, 975, - 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 980, 5, 72, - 0, 0, 979, 976, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 981, 1, 0, 0, 0, - 981, 982, 5, 3, 0, 0, 982, 983, 3, 84, 42, 0, 983, 984, 5, 4, 0, 0, 984, - 1006, 1, 0, 0, 0, 985, 987, 5, 44, 0, 0, 986, 988, 3, 68, 34, 0, 987, 986, - 1, 0, 0, 0, 987, 988, 1, 0, 0, 0, 988, 994, 1, 0, 0, 0, 989, 990, 5, 150, - 0, 0, 990, 991, 3, 68, 34, 0, 991, 992, 5, 138, 0, 0, 992, 993, 3, 68, - 34, 0, 993, 995, 1, 0, 0, 0, 994, 989, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, - 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 1000, 1, 0, 0, 0, 998, - 999, 5, 67, 0, 0, 999, 1001, 3, 68, 34, 0, 1000, 998, 1, 0, 0, 0, 1000, - 1001, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 1003, 5, 68, 0, 0, 1003, - 1006, 1, 0, 0, 0, 1004, 1006, 3, 70, 35, 0, 1005, 916, 1, 0, 0, 0, 1005, - 918, 1, 0, 0, 0, 1005, 919, 1, 0, 0, 0, 1005, 928, 1, 0, 0, 0, 1005, 931, - 1, 0, 0, 0, 1005, 934, 1, 0, 0, 0, 1005, 957, 1, 0, 0, 0, 1005, 968, 1, - 0, 0, 0, 1005, 979, 1, 0, 0, 0, 1005, 985, 1, 0, 0, 0, 1005, 1004, 1, 0, - 0, 0, 1006, 1126, 1, 0, 0, 0, 1007, 1008, 10, 20, 0, 0, 1008, 1009, 5, - 13, 0, 0, 1009, 1125, 3, 68, 34, 21, 1010, 1011, 10, 19, 0, 0, 1011, 1012, - 7, 10, 0, 0, 1012, 1125, 3, 68, 34, 20, 1013, 1014, 10, 18, 0, 0, 1014, - 1015, 7, 11, 0, 0, 1015, 1125, 3, 68, 34, 19, 1016, 1017, 10, 17, 0, 0, - 1017, 1018, 7, 4, 0, 0, 1018, 1125, 3, 68, 34, 18, 1019, 1020, 10, 16, - 0, 0, 1020, 1021, 7, 12, 0, 0, 1021, 1125, 3, 68, 34, 17, 1022, 1023, 10, - 15, 0, 0, 1023, 1024, 7, 13, 0, 0, 1024, 1125, 3, 68, 34, 16, 1025, 1041, - 10, 14, 0, 0, 1026, 1042, 5, 6, 0, 0, 1027, 1042, 5, 24, 0, 0, 1028, 1042, - 5, 25, 0, 0, 1029, 1042, 5, 26, 0, 0, 1030, 1042, 5, 94, 0, 0, 1031, 1032, - 5, 94, 0, 0, 1032, 1042, 5, 104, 0, 0, 1033, 1035, 5, 104, 0, 0, 1034, - 1033, 1, 0, 0, 0, 1034, 1035, 1, 0, 0, 0, 1035, 1036, 1, 0, 0, 0, 1036, - 1042, 5, 85, 0, 0, 1037, 1042, 5, 99, 0, 0, 1038, 1042, 5, 79, 0, 0, 1039, - 1042, 5, 101, 0, 0, 1040, 1042, 5, 120, 0, 0, 1041, 1026, 1, 0, 0, 0, 1041, - 1027, 1, 0, 0, 0, 1041, 1028, 1, 0, 0, 0, 1041, 1029, 1, 0, 0, 0, 1041, - 1030, 1, 0, 0, 0, 1041, 1031, 1, 0, 0, 0, 1041, 1034, 1, 0, 0, 0, 1041, - 1037, 1, 0, 0, 0, 1041, 1038, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, - 1040, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1125, 3, 68, 34, 15, 1044, - 1045, 10, 12, 0, 0, 1045, 1046, 5, 34, 0, 0, 1046, 1125, 3, 68, 34, 13, - 1047, 1048, 10, 11, 0, 0, 1048, 1049, 5, 110, 0, 0, 1049, 1125, 3, 68, - 34, 12, 1050, 1052, 10, 4, 0, 0, 1051, 1053, 5, 104, 0, 0, 1052, 1051, - 1, 0, 0, 0, 1052, 1053, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, - 5, 41, 0, 0, 1055, 1056, 3, 68, 34, 0, 1056, 1057, 5, 34, 0, 0, 1057, 1058, - 3, 68, 34, 5, 1058, 1125, 1, 0, 0, 0, 1059, 1061, 10, 13, 0, 0, 1060, 1062, - 5, 104, 0, 0, 1061, 1060, 1, 0, 0, 0, 1061, 1062, 1, 0, 0, 0, 1062, 1063, - 1, 0, 0, 0, 1063, 1102, 5, 85, 0, 0, 1064, 1074, 5, 3, 0, 0, 1065, 1075, - 3, 84, 42, 0, 1066, 1071, 3, 68, 34, 0, 1067, 1068, 5, 5, 0, 0, 1068, 1070, - 3, 68, 34, 0, 1069, 1067, 1, 0, 0, 0, 1070, 1073, 1, 0, 0, 0, 1071, 1069, - 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1071, - 1, 0, 0, 0, 1074, 1065, 1, 0, 0, 0, 1074, 1066, 1, 0, 0, 0, 1074, 1075, - 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1103, 5, 4, 0, 0, 1077, 1078, - 3, 182, 91, 0, 1078, 1079, 5, 2, 0, 0, 1079, 1081, 1, 0, 0, 0, 1080, 1077, - 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1082, 1, 0, 0, 0, 1082, 1103, - 3, 184, 92, 0, 1083, 1084, 3, 182, 91, 0, 1084, 1085, 5, 2, 0, 0, 1085, - 1087, 1, 0, 0, 0, 1086, 1083, 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, - 1088, 1, 0, 0, 0, 1088, 1089, 3, 226, 113, 0, 1089, 1098, 5, 3, 0, 0, 1090, - 1095, 3, 68, 34, 0, 1091, 1092, 5, 5, 0, 0, 1092, 1094, 3, 68, 34, 0, 1093, - 1091, 1, 0, 0, 0, 1094, 1097, 1, 0, 0, 0, 1095, 1093, 1, 0, 0, 0, 1095, - 1096, 1, 0, 0, 0, 1096, 1099, 1, 0, 0, 0, 1097, 1095, 1, 0, 0, 0, 1098, - 1090, 1, 0, 0, 0, 1098, 1099, 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, - 1101, 5, 4, 0, 0, 1101, 1103, 1, 0, 0, 0, 1102, 1064, 1, 0, 0, 0, 1102, - 1080, 1, 0, 0, 0, 1102, 1086, 1, 0, 0, 0, 1103, 1125, 1, 0, 0, 0, 1104, - 1105, 10, 7, 0, 0, 1105, 1106, 5, 47, 0, 0, 1106, 1125, 3, 192, 96, 0, - 1107, 1109, 10, 6, 0, 0, 1108, 1110, 5, 104, 0, 0, 1109, 1108, 1, 0, 0, - 0, 1109, 1110, 1, 0, 0, 0, 1110, 1111, 1, 0, 0, 0, 1111, 1112, 7, 14, 0, - 0, 1112, 1115, 3, 68, 34, 0, 1113, 1114, 5, 69, 0, 0, 1114, 1116, 3, 68, - 34, 0, 1115, 1113, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1125, 1, 0, - 0, 0, 1117, 1122, 10, 5, 0, 0, 1118, 1123, 5, 95, 0, 0, 1119, 1123, 5, - 105, 0, 0, 1120, 1121, 5, 104, 0, 0, 1121, 1123, 5, 106, 0, 0, 1122, 1118, - 1, 0, 0, 0, 1122, 1119, 1, 0, 0, 0, 1122, 1120, 1, 0, 0, 0, 1123, 1125, - 1, 0, 0, 0, 1124, 1007, 1, 0, 0, 0, 1124, 1010, 1, 0, 0, 0, 1124, 1013, - 1, 0, 0, 0, 1124, 1016, 1, 0, 0, 0, 1124, 1019, 1, 0, 0, 0, 1124, 1022, - 1, 0, 0, 0, 1124, 1025, 1, 0, 0, 0, 1124, 1044, 1, 0, 0, 0, 1124, 1047, - 1, 0, 0, 0, 1124, 1050, 1, 0, 0, 0, 1124, 1059, 1, 0, 0, 0, 1124, 1104, - 1, 0, 0, 0, 1124, 1107, 1, 0, 0, 0, 1124, 1117, 1, 0, 0, 0, 1125, 1128, - 1, 0, 0, 0, 1126, 1124, 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 69, 1, - 0, 0, 0, 1128, 1126, 1, 0, 0, 0, 1129, 1130, 5, 117, 0, 0, 1130, 1135, - 5, 3, 0, 0, 1131, 1136, 5, 83, 0, 0, 1132, 1133, 7, 15, 0, 0, 1133, 1134, - 5, 5, 0, 0, 1134, 1136, 3, 168, 84, 0, 1135, 1131, 1, 0, 0, 0, 1135, 1132, - 1, 0, 0, 0, 1136, 1137, 1, 0, 0, 0, 1137, 1138, 5, 4, 0, 0, 1138, 71, 1, - 0, 0, 0, 1139, 1140, 7, 16, 0, 0, 1140, 73, 1, 0, 0, 0, 1141, 1143, 3, - 50, 25, 0, 1142, 1141, 1, 0, 0, 0, 1142, 1143, 1, 0, 0, 0, 1143, 1149, - 1, 0, 0, 0, 1144, 1150, 5, 90, 0, 0, 1145, 1150, 5, 124, 0, 0, 1146, 1147, - 5, 90, 0, 0, 1147, 1148, 5, 110, 0, 0, 1148, 1150, 7, 8, 0, 0, 1149, 1144, - 1, 0, 0, 0, 1149, 1145, 1, 0, 0, 0, 1149, 1146, 1, 0, 0, 0, 1150, 1151, - 1, 0, 0, 0, 1151, 1155, 5, 93, 0, 0, 1152, 1153, 3, 182, 91, 0, 1153, 1154, - 5, 2, 0, 0, 1154, 1156, 1, 0, 0, 0, 1155, 1152, 1, 0, 0, 0, 1155, 1156, - 1, 0, 0, 0, 1156, 1157, 1, 0, 0, 0, 1157, 1160, 3, 184, 92, 0, 1158, 1159, - 5, 35, 0, 0, 1159, 1161, 3, 208, 104, 0, 1160, 1158, 1, 0, 0, 0, 1160, - 1161, 1, 0, 0, 0, 1161, 1173, 1, 0, 0, 0, 1162, 1163, 5, 3, 0, 0, 1163, - 1168, 3, 190, 95, 0, 1164, 1165, 5, 5, 0, 0, 1165, 1167, 3, 190, 95, 0, - 1166, 1164, 1, 0, 0, 0, 1167, 1170, 1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, - 1168, 1169, 1, 0, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1168, 1, 0, 0, 0, - 1171, 1172, 5, 4, 0, 0, 1172, 1174, 1, 0, 0, 0, 1173, 1162, 1, 0, 0, 0, - 1173, 1174, 1, 0, 0, 0, 1174, 1206, 1, 0, 0, 0, 1175, 1176, 5, 147, 0, - 0, 1176, 1177, 5, 3, 0, 0, 1177, 1182, 3, 68, 34, 0, 1178, 1179, 5, 5, - 0, 0, 1179, 1181, 3, 68, 34, 0, 1180, 1178, 1, 0, 0, 0, 1181, 1184, 1, - 0, 0, 0, 1182, 1180, 1, 0, 0, 0, 1182, 1183, 1, 0, 0, 0, 1183, 1185, 1, - 0, 0, 0, 1184, 1182, 1, 0, 0, 0, 1185, 1200, 5, 4, 0, 0, 1186, 1187, 5, - 5, 0, 0, 1187, 1188, 5, 3, 0, 0, 1188, 1193, 3, 68, 34, 0, 1189, 1190, - 5, 5, 0, 0, 1190, 1192, 3, 68, 34, 0, 1191, 1189, 1, 0, 0, 0, 1192, 1195, - 1, 0, 0, 0, 1193, 1191, 1, 0, 0, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1196, - 1, 0, 0, 0, 1195, 1193, 1, 0, 0, 0, 1196, 1197, 5, 4, 0, 0, 1197, 1199, - 1, 0, 0, 0, 1198, 1186, 1, 0, 0, 0, 1199, 1202, 1, 0, 0, 0, 1200, 1198, - 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 1207, 1, 0, 0, 0, 1202, 1200, - 1, 0, 0, 0, 1203, 1207, 3, 84, 42, 0, 1204, 1205, 5, 58, 0, 0, 1205, 1207, - 5, 147, 0, 0, 1206, 1175, 1, 0, 0, 0, 1206, 1203, 1, 0, 0, 0, 1206, 1204, - 1, 0, 0, 0, 1207, 1209, 1, 0, 0, 0, 1208, 1210, 3, 76, 38, 0, 1209, 1208, - 1, 0, 0, 0, 1209, 1210, 1, 0, 0, 0, 1210, 1212, 1, 0, 0, 0, 1211, 1213, - 3, 58, 29, 0, 1212, 1211, 1, 0, 0, 0, 1212, 1213, 1, 0, 0, 0, 1213, 75, - 1, 0, 0, 0, 1214, 1215, 5, 109, 0, 0, 1215, 1230, 5, 50, 0, 0, 1216, 1217, - 5, 3, 0, 0, 1217, 1222, 3, 24, 12, 0, 1218, 1219, 5, 5, 0, 0, 1219, 1221, - 3, 24, 12, 0, 1220, 1218, 1, 0, 0, 0, 1221, 1224, 1, 0, 0, 0, 1222, 1220, - 1, 0, 0, 0, 1222, 1223, 1, 0, 0, 0, 1223, 1225, 1, 0, 0, 0, 1224, 1222, - 1, 0, 0, 0, 1225, 1228, 5, 4, 0, 0, 1226, 1227, 5, 151, 0, 0, 1227, 1229, - 3, 68, 34, 0, 1228, 1226, 1, 0, 0, 0, 1228, 1229, 1, 0, 0, 0, 1229, 1231, - 1, 0, 0, 0, 1230, 1216, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1232, - 1, 0, 0, 0, 1232, 1259, 5, 186, 0, 0, 1233, 1260, 5, 187, 0, 0, 1234, 1235, - 5, 144, 0, 0, 1235, 1238, 5, 133, 0, 0, 1236, 1239, 3, 190, 95, 0, 1237, - 1239, 3, 108, 54, 0, 1238, 1236, 1, 0, 0, 0, 1238, 1237, 1, 0, 0, 0, 1239, - 1240, 1, 0, 0, 0, 1240, 1241, 5, 6, 0, 0, 1241, 1252, 3, 68, 34, 0, 1242, - 1245, 5, 5, 0, 0, 1243, 1246, 3, 190, 95, 0, 1244, 1246, 3, 108, 54, 0, - 1245, 1243, 1, 0, 0, 0, 1245, 1244, 1, 0, 0, 0, 1246, 1247, 1, 0, 0, 0, - 1247, 1248, 5, 6, 0, 0, 1248, 1249, 3, 68, 34, 0, 1249, 1251, 1, 0, 0, - 0, 1250, 1242, 1, 0, 0, 0, 1251, 1254, 1, 0, 0, 0, 1252, 1250, 1, 0, 0, - 0, 1252, 1253, 1, 0, 0, 0, 1253, 1257, 1, 0, 0, 0, 1254, 1252, 1, 0, 0, - 0, 1255, 1256, 5, 151, 0, 0, 1256, 1258, 3, 68, 34, 0, 1257, 1255, 1, 0, - 0, 0, 1257, 1258, 1, 0, 0, 0, 1258, 1260, 1, 0, 0, 0, 1259, 1233, 1, 0, - 0, 0, 1259, 1234, 1, 0, 0, 0, 1260, 77, 1, 0, 0, 0, 1261, 1265, 5, 114, - 0, 0, 1262, 1263, 3, 182, 91, 0, 1263, 1264, 5, 2, 0, 0, 1264, 1266, 1, - 0, 0, 0, 1265, 1262, 1, 0, 0, 0, 1265, 1266, 1, 0, 0, 0, 1266, 1267, 1, - 0, 0, 0, 1267, 1274, 3, 204, 102, 0, 1268, 1269, 5, 6, 0, 0, 1269, 1275, - 3, 80, 40, 0, 1270, 1271, 5, 3, 0, 0, 1271, 1272, 3, 80, 40, 0, 1272, 1273, - 5, 4, 0, 0, 1273, 1275, 1, 0, 0, 0, 1274, 1268, 1, 0, 0, 0, 1274, 1270, - 1, 0, 0, 0, 1274, 1275, 1, 0, 0, 0, 1275, 79, 1, 0, 0, 0, 1276, 1280, 3, - 36, 18, 0, 1277, 1280, 3, 176, 88, 0, 1278, 1280, 5, 192, 0, 0, 1279, 1276, - 1, 0, 0, 0, 1279, 1277, 1, 0, 0, 0, 1279, 1278, 1, 0, 0, 0, 1280, 81, 1, - 0, 0, 0, 1281, 1292, 5, 121, 0, 0, 1282, 1293, 3, 192, 96, 0, 1283, 1284, - 3, 182, 91, 0, 1284, 1285, 5, 2, 0, 0, 1285, 1287, 1, 0, 0, 0, 1286, 1283, - 1, 0, 0, 0, 1286, 1287, 1, 0, 0, 0, 1287, 1290, 1, 0, 0, 0, 1288, 1291, - 3, 184, 92, 0, 1289, 1291, 3, 196, 98, 0, 1290, 1288, 1, 0, 0, 0, 1290, - 1289, 1, 0, 0, 0, 1291, 1293, 1, 0, 0, 0, 1292, 1282, 1, 0, 0, 0, 1292, - 1286, 1, 0, 0, 0, 1292, 1293, 1, 0, 0, 0, 1293, 83, 1, 0, 0, 0, 1294, 1296, - 3, 132, 66, 0, 1295, 1294, 1, 0, 0, 0, 1295, 1296, 1, 0, 0, 0, 1296, 1297, - 1, 0, 0, 0, 1297, 1303, 3, 88, 44, 0, 1298, 1299, 3, 104, 52, 0, 1299, - 1300, 3, 88, 44, 0, 1300, 1302, 1, 0, 0, 0, 1301, 1298, 1, 0, 0, 0, 1302, - 1305, 1, 0, 0, 0, 1303, 1301, 1, 0, 0, 0, 1303, 1304, 1, 0, 0, 0, 1304, - 1307, 1, 0, 0, 0, 1305, 1303, 1, 0, 0, 0, 1306, 1308, 3, 134, 67, 0, 1307, - 1306, 1, 0, 0, 0, 1307, 1308, 1, 0, 0, 0, 1308, 1310, 1, 0, 0, 0, 1309, - 1311, 3, 136, 68, 0, 1310, 1309, 1, 0, 0, 0, 1310, 1311, 1, 0, 0, 0, 1311, - 85, 1, 0, 0, 0, 1312, 1319, 3, 96, 48, 0, 1313, 1314, 3, 100, 50, 0, 1314, - 1315, 3, 96, 48, 0, 1315, 1316, 3, 102, 51, 0, 1316, 1318, 1, 0, 0, 0, - 1317, 1313, 1, 0, 0, 0, 1318, 1321, 1, 0, 0, 0, 1319, 1317, 1, 0, 0, 0, - 1319, 1320, 1, 0, 0, 0, 1320, 87, 1, 0, 0, 0, 1321, 1319, 1, 0, 0, 0, 1322, - 1324, 5, 132, 0, 0, 1323, 1325, 7, 17, 0, 0, 1324, 1323, 1, 0, 0, 0, 1324, - 1325, 1, 0, 0, 0, 1325, 1326, 1, 0, 0, 0, 1326, 1331, 3, 98, 49, 0, 1327, - 1328, 5, 5, 0, 0, 1328, 1330, 3, 98, 49, 0, 1329, 1327, 1, 0, 0, 0, 1330, - 1333, 1, 0, 0, 0, 1331, 1329, 1, 0, 0, 0, 1331, 1332, 1, 0, 0, 0, 1332, - 1346, 1, 0, 0, 0, 1333, 1331, 1, 0, 0, 0, 1334, 1344, 5, 77, 0, 0, 1335, - 1340, 3, 96, 48, 0, 1336, 1337, 5, 5, 0, 0, 1337, 1339, 3, 96, 48, 0, 1338, - 1336, 1, 0, 0, 0, 1339, 1342, 1, 0, 0, 0, 1340, 1338, 1, 0, 0, 0, 1340, - 1341, 1, 0, 0, 0, 1341, 1345, 1, 0, 0, 0, 1342, 1340, 1, 0, 0, 0, 1343, - 1345, 3, 86, 43, 0, 1344, 1335, 1, 0, 0, 0, 1344, 1343, 1, 0, 0, 0, 1345, - 1347, 1, 0, 0, 0, 1346, 1334, 1, 0, 0, 0, 1346, 1347, 1, 0, 0, 0, 1347, - 1350, 1, 0, 0, 0, 1348, 1349, 5, 151, 0, 0, 1349, 1351, 3, 68, 34, 0, 1350, - 1348, 1, 0, 0, 0, 1350, 1351, 1, 0, 0, 0, 1351, 1366, 1, 0, 0, 0, 1352, - 1353, 5, 80, 0, 0, 1353, 1354, 5, 42, 0, 0, 1354, 1359, 3, 68, 34, 0, 1355, - 1356, 5, 5, 0, 0, 1356, 1358, 3, 68, 34, 0, 1357, 1355, 1, 0, 0, 0, 1358, - 1361, 1, 0, 0, 0, 1359, 1357, 1, 0, 0, 0, 1359, 1360, 1, 0, 0, 0, 1360, - 1364, 1, 0, 0, 0, 1361, 1359, 1, 0, 0, 0, 1362, 1363, 5, 81, 0, 0, 1363, - 1365, 3, 68, 34, 0, 1364, 1362, 1, 0, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, - 1367, 1, 0, 0, 0, 1366, 1352, 1, 0, 0, 0, 1366, 1367, 1, 0, 0, 0, 1367, - 1382, 1, 0, 0, 0, 1368, 1369, 5, 177, 0, 0, 1369, 1370, 3, 214, 107, 0, - 1370, 1371, 5, 35, 0, 0, 1371, 1379, 3, 118, 59, 0, 1372, 1373, 5, 5, 0, - 0, 1373, 1374, 3, 214, 107, 0, 1374, 1375, 5, 35, 0, 0, 1375, 1376, 3, - 118, 59, 0, 1376, 1378, 1, 0, 0, 0, 1377, 1372, 1, 0, 0, 0, 1378, 1381, - 1, 0, 0, 0, 1379, 1377, 1, 0, 0, 0, 1379, 1380, 1, 0, 0, 0, 1380, 1383, - 1, 0, 0, 0, 1381, 1379, 1, 0, 0, 0, 1382, 1368, 1, 0, 0, 0, 1382, 1383, - 1, 0, 0, 0, 1383, 1413, 1, 0, 0, 0, 1384, 1385, 5, 147, 0, 0, 1385, 1386, - 5, 3, 0, 0, 1386, 1391, 3, 68, 34, 0, 1387, 1388, 5, 5, 0, 0, 1388, 1390, - 3, 68, 34, 0, 1389, 1387, 1, 0, 0, 0, 1390, 1393, 1, 0, 0, 0, 1391, 1389, - 1, 0, 0, 0, 1391, 1392, 1, 0, 0, 0, 1392, 1394, 1, 0, 0, 0, 1393, 1391, - 1, 0, 0, 0, 1394, 1409, 5, 4, 0, 0, 1395, 1396, 5, 5, 0, 0, 1396, 1397, - 5, 3, 0, 0, 1397, 1402, 3, 68, 34, 0, 1398, 1399, 5, 5, 0, 0, 1399, 1401, - 3, 68, 34, 0, 1400, 1398, 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, 4, 0, 0, 1406, 1408, 1, 0, 0, 0, 1407, 1395, - 1, 0, 0, 0, 1408, 1411, 1, 0, 0, 0, 1409, 1407, 1, 0, 0, 0, 1409, 1410, - 1, 0, 0, 0, 1410, 1413, 1, 0, 0, 0, 1411, 1409, 1, 0, 0, 0, 1412, 1322, - 1, 0, 0, 0, 1412, 1384, 1, 0, 0, 0, 1413, 89, 1, 0, 0, 0, 1414, 1415, 3, - 84, 42, 0, 1415, 91, 1, 0, 0, 0, 1416, 1418, 3, 132, 66, 0, 1417, 1416, - 1, 0, 0, 0, 1417, 1418, 1, 0, 0, 0, 1418, 1419, 1, 0, 0, 0, 1419, 1421, - 3, 88, 44, 0, 1420, 1422, 3, 134, 67, 0, 1421, 1420, 1, 0, 0, 0, 1421, - 1422, 1, 0, 0, 0, 1422, 1424, 1, 0, 0, 0, 1423, 1425, 3, 136, 68, 0, 1424, - 1423, 1, 0, 0, 0, 1424, 1425, 1, 0, 0, 0, 1425, 93, 1, 0, 0, 0, 1426, 1428, - 3, 132, 66, 0, 1427, 1426, 1, 0, 0, 0, 1427, 1428, 1, 0, 0, 0, 1428, 1429, - 1, 0, 0, 0, 1429, 1439, 3, 88, 44, 0, 1430, 1432, 5, 142, 0, 0, 1431, 1433, - 5, 31, 0, 0, 1432, 1431, 1, 0, 0, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1437, - 1, 0, 0, 0, 1434, 1437, 5, 92, 0, 0, 1435, 1437, 5, 70, 0, 0, 1436, 1430, - 1, 0, 0, 0, 1436, 1434, 1, 0, 0, 0, 1436, 1435, 1, 0, 0, 0, 1437, 1438, - 1, 0, 0, 0, 1438, 1440, 3, 88, 44, 0, 1439, 1436, 1, 0, 0, 0, 1440, 1441, - 1, 0, 0, 0, 1441, 1439, 1, 0, 0, 0, 1441, 1442, 1, 0, 0, 0, 1442, 1444, - 1, 0, 0, 0, 1443, 1445, 3, 134, 67, 0, 1444, 1443, 1, 0, 0, 0, 1444, 1445, - 1, 0, 0, 0, 1445, 1447, 1, 0, 0, 0, 1446, 1448, 3, 136, 68, 0, 1447, 1446, - 1, 0, 0, 0, 1447, 1448, 1, 0, 0, 0, 1448, 95, 1, 0, 0, 0, 1449, 1450, 3, - 182, 91, 0, 1450, 1451, 5, 2, 0, 0, 1451, 1453, 1, 0, 0, 0, 1452, 1449, - 1, 0, 0, 0, 1452, 1453, 1, 0, 0, 0, 1453, 1454, 1, 0, 0, 0, 1454, 1459, - 3, 184, 92, 0, 1455, 1457, 5, 35, 0, 0, 1456, 1455, 1, 0, 0, 0, 1456, 1457, - 1, 0, 0, 0, 1457, 1458, 1, 0, 0, 0, 1458, 1460, 3, 208, 104, 0, 1459, 1456, - 1, 0, 0, 0, 1459, 1460, 1, 0, 0, 0, 1460, 1466, 1, 0, 0, 0, 1461, 1462, - 5, 87, 0, 0, 1462, 1463, 5, 42, 0, 0, 1463, 1467, 3, 196, 98, 0, 1464, - 1465, 5, 104, 0, 0, 1465, 1467, 5, 87, 0, 0, 1466, 1461, 1, 0, 0, 0, 1466, - 1464, 1, 0, 0, 0, 1466, 1467, 1, 0, 0, 0, 1467, 1578, 1, 0, 0, 0, 1468, - 1469, 3, 182, 91, 0, 1469, 1470, 5, 2, 0, 0, 1470, 1472, 1, 0, 0, 0, 1471, - 1468, 1, 0, 0, 0, 1471, 1472, 1, 0, 0, 0, 1472, 1473, 1, 0, 0, 0, 1473, - 1474, 3, 226, 113, 0, 1474, 1475, 5, 3, 0, 0, 1475, 1480, 3, 68, 34, 0, - 1476, 1477, 5, 5, 0, 0, 1477, 1479, 3, 68, 34, 0, 1478, 1476, 1, 0, 0, - 0, 1479, 1482, 1, 0, 0, 0, 1480, 1478, 1, 0, 0, 0, 1480, 1481, 1, 0, 0, - 0, 1481, 1483, 1, 0, 0, 0, 1482, 1480, 1, 0, 0, 0, 1483, 1488, 5, 4, 0, - 0, 1484, 1486, 5, 35, 0, 0, 1485, 1484, 1, 0, 0, 0, 1485, 1486, 1, 0, 0, - 0, 1486, 1487, 1, 0, 0, 0, 1487, 1489, 3, 208, 104, 0, 1488, 1485, 1, 0, - 0, 0, 1488, 1489, 1, 0, 0, 0, 1489, 1578, 1, 0, 0, 0, 1490, 1500, 5, 3, - 0, 0, 1491, 1496, 3, 96, 48, 0, 1492, 1493, 5, 5, 0, 0, 1493, 1495, 3, - 96, 48, 0, 1494, 1492, 1, 0, 0, 0, 1495, 1498, 1, 0, 0, 0, 1496, 1494, - 1, 0, 0, 0, 1496, 1497, 1, 0, 0, 0, 1497, 1501, 1, 0, 0, 0, 1498, 1496, - 1, 0, 0, 0, 1499, 1501, 3, 86, 43, 0, 1500, 1491, 1, 0, 0, 0, 1500, 1499, - 1, 0, 0, 0, 1501, 1502, 1, 0, 0, 0, 1502, 1503, 5, 4, 0, 0, 1503, 1578, - 1, 0, 0, 0, 1504, 1505, 5, 3, 0, 0, 1505, 1506, 3, 84, 42, 0, 1506, 1511, - 5, 4, 0, 0, 1507, 1509, 5, 35, 0, 0, 1508, 1507, 1, 0, 0, 0, 1508, 1509, - 1, 0, 0, 0, 1509, 1510, 1, 0, 0, 0, 1510, 1512, 3, 208, 104, 0, 1511, 1508, - 1, 0, 0, 0, 1511, 1512, 1, 0, 0, 0, 1512, 1578, 1, 0, 0, 0, 1513, 1514, - 3, 182, 91, 0, 1514, 1515, 5, 2, 0, 0, 1515, 1517, 1, 0, 0, 0, 1516, 1513, - 1, 0, 0, 0, 1516, 1517, 1, 0, 0, 0, 1517, 1518, 1, 0, 0, 0, 1518, 1523, - 3, 184, 92, 0, 1519, 1521, 5, 35, 0, 0, 1520, 1519, 1, 0, 0, 0, 1520, 1521, - 1, 0, 0, 0, 1521, 1522, 1, 0, 0, 0, 1522, 1524, 3, 210, 105, 0, 1523, 1520, - 1, 0, 0, 0, 1523, 1524, 1, 0, 0, 0, 1524, 1530, 1, 0, 0, 0, 1525, 1526, - 5, 87, 0, 0, 1526, 1527, 5, 42, 0, 0, 1527, 1531, 3, 196, 98, 0, 1528, - 1529, 5, 104, 0, 0, 1529, 1531, 5, 87, 0, 0, 1530, 1525, 1, 0, 0, 0, 1530, - 1528, 1, 0, 0, 0, 1530, 1531, 1, 0, 0, 0, 1531, 1578, 1, 0, 0, 0, 1532, - 1533, 3, 182, 91, 0, 1533, 1534, 5, 2, 0, 0, 1534, 1536, 1, 0, 0, 0, 1535, - 1532, 1, 0, 0, 0, 1535, 1536, 1, 0, 0, 0, 1536, 1537, 1, 0, 0, 0, 1537, - 1538, 3, 226, 113, 0, 1538, 1539, 5, 3, 0, 0, 1539, 1544, 3, 68, 34, 0, - 1540, 1541, 5, 5, 0, 0, 1541, 1543, 3, 68, 34, 0, 1542, 1540, 1, 0, 0, - 0, 1543, 1546, 1, 0, 0, 0, 1544, 1542, 1, 0, 0, 0, 1544, 1545, 1, 0, 0, - 0, 1545, 1547, 1, 0, 0, 0, 1546, 1544, 1, 0, 0, 0, 1547, 1552, 5, 4, 0, - 0, 1548, 1550, 5, 35, 0, 0, 1549, 1548, 1, 0, 0, 0, 1549, 1550, 1, 0, 0, - 0, 1550, 1551, 1, 0, 0, 0, 1551, 1553, 3, 210, 105, 0, 1552, 1549, 1, 0, - 0, 0, 1552, 1553, 1, 0, 0, 0, 1553, 1578, 1, 0, 0, 0, 1554, 1564, 5, 3, - 0, 0, 1555, 1560, 3, 96, 48, 0, 1556, 1557, 5, 5, 0, 0, 1557, 1559, 3, - 96, 48, 0, 1558, 1556, 1, 0, 0, 0, 1559, 1562, 1, 0, 0, 0, 1560, 1558, - 1, 0, 0, 0, 1560, 1561, 1, 0, 0, 0, 1561, 1565, 1, 0, 0, 0, 1562, 1560, - 1, 0, 0, 0, 1563, 1565, 3, 86, 43, 0, 1564, 1555, 1, 0, 0, 0, 1564, 1563, - 1, 0, 0, 0, 1565, 1566, 1, 0, 0, 0, 1566, 1567, 5, 4, 0, 0, 1567, 1578, - 1, 0, 0, 0, 1568, 1569, 5, 3, 0, 0, 1569, 1570, 3, 84, 42, 0, 1570, 1575, - 5, 4, 0, 0, 1571, 1573, 5, 35, 0, 0, 1572, 1571, 1, 0, 0, 0, 1572, 1573, - 1, 0, 0, 0, 1573, 1574, 1, 0, 0, 0, 1574, 1576, 3, 210, 105, 0, 1575, 1572, - 1, 0, 0, 0, 1575, 1576, 1, 0, 0, 0, 1576, 1578, 1, 0, 0, 0, 1577, 1452, - 1, 0, 0, 0, 1577, 1471, 1, 0, 0, 0, 1577, 1490, 1, 0, 0, 0, 1577, 1504, - 1, 0, 0, 0, 1577, 1516, 1, 0, 0, 0, 1577, 1535, 1, 0, 0, 0, 1577, 1554, - 1, 0, 0, 0, 1577, 1568, 1, 0, 0, 0, 1578, 97, 1, 0, 0, 0, 1579, 1592, 5, - 7, 0, 0, 1580, 1581, 3, 184, 92, 0, 1581, 1582, 5, 2, 0, 0, 1582, 1583, - 5, 7, 0, 0, 1583, 1592, 1, 0, 0, 0, 1584, 1589, 3, 68, 34, 0, 1585, 1587, - 5, 35, 0, 0, 1586, 1585, 1, 0, 0, 0, 1586, 1587, 1, 0, 0, 0, 1587, 1588, - 1, 0, 0, 0, 1588, 1590, 3, 172, 86, 0, 1589, 1586, 1, 0, 0, 0, 1589, 1590, - 1, 0, 0, 0, 1590, 1592, 1, 0, 0, 0, 1591, 1579, 1, 0, 0, 0, 1591, 1580, - 1, 0, 0, 0, 1591, 1584, 1, 0, 0, 0, 1592, 99, 1, 0, 0, 0, 1593, 1608, 5, - 5, 0, 0, 1594, 1596, 5, 102, 0, 0, 1595, 1594, 1, 0, 0, 0, 1595, 1596, - 1, 0, 0, 0, 1596, 1602, 1, 0, 0, 0, 1597, 1599, 7, 18, 0, 0, 1598, 1600, - 5, 112, 0, 0, 1599, 1598, 1, 0, 0, 0, 1599, 1600, 1, 0, 0, 0, 1600, 1603, - 1, 0, 0, 0, 1601, 1603, 5, 89, 0, 0, 1602, 1597, 1, 0, 0, 0, 1602, 1601, - 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1604, 1, 0, 0, 0, 1604, 1608, - 5, 96, 0, 0, 1605, 1606, 5, 53, 0, 0, 1606, 1608, 5, 96, 0, 0, 1607, 1593, - 1, 0, 0, 0, 1607, 1595, 1, 0, 0, 0, 1607, 1605, 1, 0, 0, 0, 1608, 101, - 1, 0, 0, 0, 1609, 1610, 5, 109, 0, 0, 1610, 1624, 3, 68, 34, 0, 1611, 1612, - 5, 145, 0, 0, 1612, 1613, 5, 3, 0, 0, 1613, 1618, 3, 190, 95, 0, 1614, - 1615, 5, 5, 0, 0, 1615, 1617, 3, 190, 95, 0, 1616, 1614, 1, 0, 0, 0, 1617, - 1620, 1, 0, 0, 0, 1618, 1616, 1, 0, 0, 0, 1618, 1619, 1, 0, 0, 0, 1619, - 1621, 1, 0, 0, 0, 1620, 1618, 1, 0, 0, 0, 1621, 1622, 5, 4, 0, 0, 1622, - 1624, 1, 0, 0, 0, 1623, 1609, 1, 0, 0, 0, 1623, 1611, 1, 0, 0, 0, 1623, - 1624, 1, 0, 0, 0, 1624, 103, 1, 0, 0, 0, 1625, 1627, 5, 142, 0, 0, 1626, - 1628, 5, 31, 0, 0, 1627, 1626, 1, 0, 0, 0, 1627, 1628, 1, 0, 0, 0, 1628, - 1632, 1, 0, 0, 0, 1629, 1632, 5, 92, 0, 0, 1630, 1632, 5, 70, 0, 0, 1631, - 1625, 1, 0, 0, 0, 1631, 1629, 1, 0, 0, 0, 1631, 1630, 1, 0, 0, 0, 1632, - 105, 1, 0, 0, 0, 1633, 1635, 3, 50, 25, 0, 1634, 1633, 1, 0, 0, 0, 1634, - 1635, 1, 0, 0, 0, 1635, 1636, 1, 0, 0, 0, 1636, 1639, 5, 144, 0, 0, 1637, - 1638, 5, 110, 0, 0, 1638, 1640, 7, 8, 0, 0, 1639, 1637, 1, 0, 0, 0, 1639, - 1640, 1, 0, 0, 0, 1640, 1641, 1, 0, 0, 0, 1641, 1642, 3, 112, 56, 0, 1642, - 1645, 5, 133, 0, 0, 1643, 1646, 3, 190, 95, 0, 1644, 1646, 3, 108, 54, - 0, 1645, 1643, 1, 0, 0, 0, 1645, 1644, 1, 0, 0, 0, 1646, 1647, 1, 0, 0, - 0, 1647, 1648, 5, 6, 0, 0, 1648, 1659, 3, 68, 34, 0, 1649, 1652, 5, 5, - 0, 0, 1650, 1653, 3, 190, 95, 0, 1651, 1653, 3, 108, 54, 0, 1652, 1650, - 1, 0, 0, 0, 1652, 1651, 1, 0, 0, 0, 1653, 1654, 1, 0, 0, 0, 1654, 1655, - 5, 6, 0, 0, 1655, 1656, 3, 68, 34, 0, 1656, 1658, 1, 0, 0, 0, 1657, 1649, - 1, 0, 0, 0, 1658, 1661, 1, 0, 0, 0, 1659, 1657, 1, 0, 0, 0, 1659, 1660, - 1, 0, 0, 0, 1660, 1664, 1, 0, 0, 0, 1661, 1659, 1, 0, 0, 0, 1662, 1663, - 5, 151, 0, 0, 1663, 1665, 3, 68, 34, 0, 1664, 1662, 1, 0, 0, 0, 1664, 1665, - 1, 0, 0, 0, 1665, 1667, 1, 0, 0, 0, 1666, 1668, 3, 58, 29, 0, 1667, 1666, - 1, 0, 0, 0, 1667, 1668, 1, 0, 0, 0, 1668, 107, 1, 0, 0, 0, 1669, 1670, - 5, 3, 0, 0, 1670, 1675, 3, 190, 95, 0, 1671, 1672, 5, 5, 0, 0, 1672, 1674, - 3, 190, 95, 0, 1673, 1671, 1, 0, 0, 0, 1674, 1677, 1, 0, 0, 0, 1675, 1673, - 1, 0, 0, 0, 1675, 1676, 1, 0, 0, 0, 1676, 1678, 1, 0, 0, 0, 1677, 1675, - 1, 0, 0, 0, 1678, 1679, 5, 4, 0, 0, 1679, 109, 1, 0, 0, 0, 1680, 1682, - 3, 50, 25, 0, 1681, 1680, 1, 0, 0, 0, 1681, 1682, 1, 0, 0, 0, 1682, 1683, - 1, 0, 0, 0, 1683, 1686, 5, 144, 0, 0, 1684, 1685, 5, 110, 0, 0, 1685, 1687, - 7, 8, 0, 0, 1686, 1684, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1688, - 1, 0, 0, 0, 1688, 1689, 3, 112, 56, 0, 1689, 1692, 5, 133, 0, 0, 1690, - 1693, 3, 190, 95, 0, 1691, 1693, 3, 108, 54, 0, 1692, 1690, 1, 0, 0, 0, - 1692, 1691, 1, 0, 0, 0, 1693, 1694, 1, 0, 0, 0, 1694, 1695, 5, 6, 0, 0, - 1695, 1706, 3, 68, 34, 0, 1696, 1699, 5, 5, 0, 0, 1697, 1700, 3, 190, 95, - 0, 1698, 1700, 3, 108, 54, 0, 1699, 1697, 1, 0, 0, 0, 1699, 1698, 1, 0, - 0, 0, 1700, 1701, 1, 0, 0, 0, 1701, 1702, 5, 6, 0, 0, 1702, 1703, 3, 68, - 34, 0, 1703, 1705, 1, 0, 0, 0, 1704, 1696, 1, 0, 0, 0, 1705, 1708, 1, 0, - 0, 0, 1706, 1704, 1, 0, 0, 0, 1706, 1707, 1, 0, 0, 0, 1707, 1711, 1, 0, - 0, 0, 1708, 1706, 1, 0, 0, 0, 1709, 1710, 5, 151, 0, 0, 1710, 1712, 3, - 68, 34, 0, 1711, 1709, 1, 0, 0, 0, 1711, 1712, 1, 0, 0, 0, 1712, 1717, - 1, 0, 0, 0, 1713, 1715, 3, 134, 67, 0, 1714, 1713, 1, 0, 0, 0, 1714, 1715, - 1, 0, 0, 0, 1715, 1716, 1, 0, 0, 0, 1716, 1718, 3, 136, 68, 0, 1717, 1714, - 1, 0, 0, 0, 1717, 1718, 1, 0, 0, 0, 1718, 111, 1, 0, 0, 0, 1719, 1720, - 3, 182, 91, 0, 1720, 1721, 5, 2, 0, 0, 1721, 1723, 1, 0, 0, 0, 1722, 1719, - 1, 0, 0, 0, 1722, 1723, 1, 0, 0, 0, 1723, 1724, 1, 0, 0, 0, 1724, 1727, - 3, 184, 92, 0, 1725, 1726, 5, 35, 0, 0, 1726, 1728, 3, 216, 108, 0, 1727, - 1725, 1, 0, 0, 0, 1727, 1728, 1, 0, 0, 0, 1728, 1734, 1, 0, 0, 0, 1729, - 1730, 5, 87, 0, 0, 1730, 1731, 5, 42, 0, 0, 1731, 1735, 3, 196, 98, 0, - 1732, 1733, 5, 104, 0, 0, 1733, 1735, 5, 87, 0, 0, 1734, 1729, 1, 0, 0, - 0, 1734, 1732, 1, 0, 0, 0, 1734, 1735, 1, 0, 0, 0, 1735, 113, 1, 0, 0, - 0, 1736, 1738, 5, 146, 0, 0, 1737, 1739, 3, 182, 91, 0, 1738, 1737, 1, - 0, 0, 0, 1738, 1739, 1, 0, 0, 0, 1739, 1742, 1, 0, 0, 0, 1740, 1741, 5, - 93, 0, 0, 1741, 1743, 3, 218, 109, 0, 1742, 1740, 1, 0, 0, 0, 1742, 1743, - 1, 0, 0, 0, 1743, 115, 1, 0, 0, 0, 1744, 1745, 5, 181, 0, 0, 1745, 1746, - 5, 3, 0, 0, 1746, 1747, 5, 151, 0, 0, 1747, 1748, 3, 68, 34, 0, 1748, 1749, - 5, 4, 0, 0, 1749, 117, 1, 0, 0, 0, 1750, 1752, 5, 3, 0, 0, 1751, 1753, - 3, 220, 110, 0, 1752, 1751, 1, 0, 0, 0, 1752, 1753, 1, 0, 0, 0, 1753, 1764, - 1, 0, 0, 0, 1754, 1755, 5, 156, 0, 0, 1755, 1756, 5, 42, 0, 0, 1756, 1761, - 3, 68, 34, 0, 1757, 1758, 5, 5, 0, 0, 1758, 1760, 3, 68, 34, 0, 1759, 1757, - 1, 0, 0, 0, 1760, 1763, 1, 0, 0, 0, 1761, 1759, 1, 0, 0, 0, 1761, 1762, - 1, 0, 0, 0, 1762, 1765, 1, 0, 0, 0, 1763, 1761, 1, 0, 0, 0, 1764, 1754, - 1, 0, 0, 0, 1764, 1765, 1, 0, 0, 0, 1765, 1766, 1, 0, 0, 0, 1766, 1767, - 5, 111, 0, 0, 1767, 1768, 5, 42, 0, 0, 1768, 1773, 3, 138, 69, 0, 1769, - 1770, 5, 5, 0, 0, 1770, 1772, 3, 138, 69, 0, 1771, 1769, 1, 0, 0, 0, 1772, - 1775, 1, 0, 0, 0, 1773, 1771, 1, 0, 0, 0, 1773, 1774, 1, 0, 0, 0, 1774, - 1777, 1, 0, 0, 0, 1775, 1773, 1, 0, 0, 0, 1776, 1778, 3, 122, 61, 0, 1777, - 1776, 1, 0, 0, 0, 1777, 1778, 1, 0, 0, 0, 1778, 1779, 1, 0, 0, 0, 1779, - 1780, 5, 4, 0, 0, 1780, 119, 1, 0, 0, 0, 1781, 1815, 5, 155, 0, 0, 1782, - 1816, 3, 214, 107, 0, 1783, 1785, 5, 3, 0, 0, 1784, 1786, 3, 220, 110, - 0, 1785, 1784, 1, 0, 0, 0, 1785, 1786, 1, 0, 0, 0, 1786, 1797, 1, 0, 0, - 0, 1787, 1788, 5, 156, 0, 0, 1788, 1789, 5, 42, 0, 0, 1789, 1794, 3, 68, - 34, 0, 1790, 1791, 5, 5, 0, 0, 1791, 1793, 3, 68, 34, 0, 1792, 1790, 1, - 0, 0, 0, 1793, 1796, 1, 0, 0, 0, 1794, 1792, 1, 0, 0, 0, 1794, 1795, 1, - 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1794, 1, 0, 0, 0, 1797, 1787, 1, - 0, 0, 0, 1797, 1798, 1, 0, 0, 0, 1798, 1809, 1, 0, 0, 0, 1799, 1800, 5, - 111, 0, 0, 1800, 1801, 5, 42, 0, 0, 1801, 1806, 3, 138, 69, 0, 1802, 1803, - 5, 5, 0, 0, 1803, 1805, 3, 138, 69, 0, 1804, 1802, 1, 0, 0, 0, 1805, 1808, - 1, 0, 0, 0, 1806, 1804, 1, 0, 0, 0, 1806, 1807, 1, 0, 0, 0, 1807, 1810, - 1, 0, 0, 0, 1808, 1806, 1, 0, 0, 0, 1809, 1799, 1, 0, 0, 0, 1809, 1810, - 1, 0, 0, 0, 1810, 1812, 1, 0, 0, 0, 1811, 1813, 3, 122, 61, 0, 1812, 1811, - 1, 0, 0, 0, 1812, 1813, 1, 0, 0, 0, 1813, 1814, 1, 0, 0, 0, 1814, 1816, - 5, 4, 0, 0, 1815, 1782, 1, 0, 0, 0, 1815, 1783, 1, 0, 0, 0, 1816, 121, - 1, 0, 0, 0, 1817, 1825, 3, 124, 62, 0, 1818, 1819, 5, 183, 0, 0, 1819, - 1820, 5, 103, 0, 0, 1820, 1826, 5, 185, 0, 0, 1821, 1822, 5, 160, 0, 0, - 1822, 1826, 5, 129, 0, 0, 1823, 1826, 5, 80, 0, 0, 1824, 1826, 5, 184, - 0, 0, 1825, 1818, 1, 0, 0, 0, 1825, 1821, 1, 0, 0, 0, 1825, 1823, 1, 0, - 0, 0, 1825, 1824, 1, 0, 0, 0, 1825, 1826, 1, 0, 0, 0, 1826, 123, 1, 0, - 0, 0, 1827, 1834, 7, 19, 0, 0, 1828, 1835, 3, 146, 73, 0, 1829, 1830, 5, - 41, 0, 0, 1830, 1831, 3, 142, 71, 0, 1831, 1832, 5, 34, 0, 0, 1832, 1833, - 3, 144, 72, 0, 1833, 1835, 1, 0, 0, 0, 1834, 1828, 1, 0, 0, 0, 1834, 1829, - 1, 0, 0, 0, 1835, 125, 1, 0, 0, 0, 1836, 1837, 3, 222, 111, 0, 1837, 1847, - 5, 3, 0, 0, 1838, 1843, 3, 68, 34, 0, 1839, 1840, 5, 5, 0, 0, 1840, 1842, - 3, 68, 34, 0, 1841, 1839, 1, 0, 0, 0, 1842, 1845, 1, 0, 0, 0, 1843, 1841, - 1, 0, 0, 0, 1843, 1844, 1, 0, 0, 0, 1844, 1848, 1, 0, 0, 0, 1845, 1843, - 1, 0, 0, 0, 1846, 1848, 5, 7, 0, 0, 1847, 1838, 1, 0, 0, 0, 1847, 1846, - 1, 0, 0, 0, 1848, 1849, 1, 0, 0, 0, 1849, 1850, 5, 4, 0, 0, 1850, 127, - 1, 0, 0, 0, 1851, 1852, 3, 224, 112, 0, 1852, 1865, 5, 3, 0, 0, 1853, 1855, - 5, 64, 0, 0, 1854, 1853, 1, 0, 0, 0, 1854, 1855, 1, 0, 0, 0, 1855, 1856, - 1, 0, 0, 0, 1856, 1861, 3, 68, 34, 0, 1857, 1858, 5, 5, 0, 0, 1858, 1860, - 3, 68, 34, 0, 1859, 1857, 1, 0, 0, 0, 1860, 1863, 1, 0, 0, 0, 1861, 1859, - 1, 0, 0, 0, 1861, 1862, 1, 0, 0, 0, 1862, 1866, 1, 0, 0, 0, 1863, 1861, - 1, 0, 0, 0, 1864, 1866, 5, 7, 0, 0, 1865, 1854, 1, 0, 0, 0, 1865, 1864, - 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1867, 1, 0, 0, 0, 1867, 1869, - 5, 4, 0, 0, 1868, 1870, 3, 116, 58, 0, 1869, 1868, 1, 0, 0, 0, 1869, 1870, - 1, 0, 0, 0, 1870, 129, 1, 0, 0, 0, 1871, 1872, 3, 148, 74, 0, 1872, 1882, - 5, 3, 0, 0, 1873, 1878, 3, 68, 34, 0, 1874, 1875, 5, 5, 0, 0, 1875, 1877, - 3, 68, 34, 0, 1876, 1874, 1, 0, 0, 0, 1877, 1880, 1, 0, 0, 0, 1878, 1876, - 1, 0, 0, 0, 1878, 1879, 1, 0, 0, 0, 1879, 1883, 1, 0, 0, 0, 1880, 1878, - 1, 0, 0, 0, 1881, 1883, 5, 7, 0, 0, 1882, 1873, 1, 0, 0, 0, 1882, 1881, - 1, 0, 0, 0, 1882, 1883, 1, 0, 0, 0, 1883, 1884, 1, 0, 0, 0, 1884, 1886, - 5, 4, 0, 0, 1885, 1887, 3, 116, 58, 0, 1886, 1885, 1, 0, 0, 0, 1886, 1887, - 1, 0, 0, 0, 1887, 1888, 1, 0, 0, 0, 1888, 1891, 5, 155, 0, 0, 1889, 1892, - 3, 118, 59, 0, 1890, 1892, 3, 214, 107, 0, 1891, 1889, 1, 0, 0, 0, 1891, - 1890, 1, 0, 0, 0, 1892, 131, 1, 0, 0, 0, 1893, 1895, 5, 152, 0, 0, 1894, - 1896, 5, 118, 0, 0, 1895, 1894, 1, 0, 0, 0, 1895, 1896, 1, 0, 0, 0, 1896, - 1897, 1, 0, 0, 0, 1897, 1902, 3, 56, 28, 0, 1898, 1899, 5, 5, 0, 0, 1899, - 1901, 3, 56, 28, 0, 1900, 1898, 1, 0, 0, 0, 1901, 1904, 1, 0, 0, 0, 1902, - 1900, 1, 0, 0, 0, 1902, 1903, 1, 0, 0, 0, 1903, 133, 1, 0, 0, 0, 1904, - 1902, 1, 0, 0, 0, 1905, 1906, 5, 111, 0, 0, 1906, 1907, 5, 42, 0, 0, 1907, - 1912, 3, 138, 69, 0, 1908, 1909, 5, 5, 0, 0, 1909, 1911, 3, 138, 69, 0, - 1910, 1908, 1, 0, 0, 0, 1911, 1914, 1, 0, 0, 0, 1912, 1910, 1, 0, 0, 0, - 1912, 1913, 1, 0, 0, 0, 1913, 135, 1, 0, 0, 0, 1914, 1912, 1, 0, 0, 0, - 1915, 1916, 5, 100, 0, 0, 1916, 1919, 3, 68, 34, 0, 1917, 1918, 7, 20, - 0, 0, 1918, 1920, 3, 68, 34, 0, 1919, 1917, 1, 0, 0, 0, 1919, 1920, 1, - 0, 0, 0, 1920, 137, 1, 0, 0, 0, 1921, 1924, 3, 68, 34, 0, 1922, 1923, 5, - 47, 0, 0, 1923, 1925, 3, 192, 96, 0, 1924, 1922, 1, 0, 0, 0, 1924, 1925, - 1, 0, 0, 0, 1925, 1927, 1, 0, 0, 0, 1926, 1928, 3, 140, 70, 0, 1927, 1926, - 1, 0, 0, 0, 1927, 1928, 1, 0, 0, 0, 1928, 1931, 1, 0, 0, 0, 1929, 1930, - 5, 178, 0, 0, 1930, 1932, 7, 21, 0, 0, 1931, 1929, 1, 0, 0, 0, 1931, 1932, - 1, 0, 0, 0, 1932, 139, 1, 0, 0, 0, 1933, 1934, 7, 22, 0, 0, 1934, 141, - 1, 0, 0, 0, 1935, 1936, 3, 68, 34, 0, 1936, 1937, 5, 158, 0, 0, 1937, 1946, - 1, 0, 0, 0, 1938, 1939, 3, 68, 34, 0, 1939, 1940, 5, 161, 0, 0, 1940, 1946, - 1, 0, 0, 0, 1941, 1942, 5, 160, 0, 0, 1942, 1946, 5, 129, 0, 0, 1943, 1944, - 5, 159, 0, 0, 1944, 1946, 5, 158, 0, 0, 1945, 1935, 1, 0, 0, 0, 1945, 1938, - 1, 0, 0, 0, 1945, 1941, 1, 0, 0, 0, 1945, 1943, 1, 0, 0, 0, 1946, 143, - 1, 0, 0, 0, 1947, 1948, 3, 68, 34, 0, 1948, 1949, 5, 158, 0, 0, 1949, 1958, - 1, 0, 0, 0, 1950, 1951, 3, 68, 34, 0, 1951, 1952, 5, 161, 0, 0, 1952, 1958, - 1, 0, 0, 0, 1953, 1954, 5, 160, 0, 0, 1954, 1958, 5, 129, 0, 0, 1955, 1956, - 5, 159, 0, 0, 1956, 1958, 5, 161, 0, 0, 1957, 1947, 1, 0, 0, 0, 1957, 1950, - 1, 0, 0, 0, 1957, 1953, 1, 0, 0, 0, 1957, 1955, 1, 0, 0, 0, 1958, 145, - 1, 0, 0, 0, 1959, 1960, 3, 68, 34, 0, 1960, 1961, 5, 158, 0, 0, 1961, 1967, - 1, 0, 0, 0, 1962, 1963, 5, 159, 0, 0, 1963, 1967, 5, 158, 0, 0, 1964, 1965, - 5, 160, 0, 0, 1965, 1967, 5, 129, 0, 0, 1966, 1959, 1, 0, 0, 0, 1966, 1962, - 1, 0, 0, 0, 1966, 1964, 1, 0, 0, 0, 1967, 147, 1, 0, 0, 0, 1968, 1969, - 7, 23, 0, 0, 1969, 1970, 5, 3, 0, 0, 1970, 1971, 3, 68, 34, 0, 1971, 1972, - 5, 4, 0, 0, 1972, 1973, 5, 155, 0, 0, 1973, 1975, 5, 3, 0, 0, 1974, 1976, - 3, 154, 77, 0, 1975, 1974, 1, 0, 0, 0, 1975, 1976, 1, 0, 0, 0, 1976, 1977, - 1, 0, 0, 0, 1977, 1979, 3, 158, 79, 0, 1978, 1980, 3, 124, 62, 0, 1979, - 1978, 1, 0, 0, 0, 1979, 1980, 1, 0, 0, 0, 1980, 1981, 1, 0, 0, 0, 1981, - 1982, 5, 4, 0, 0, 1982, 2054, 1, 0, 0, 0, 1983, 1984, 7, 24, 0, 0, 1984, - 1985, 5, 3, 0, 0, 1985, 1986, 5, 4, 0, 0, 1986, 1987, 5, 155, 0, 0, 1987, - 1989, 5, 3, 0, 0, 1988, 1990, 3, 154, 77, 0, 1989, 1988, 1, 0, 0, 0, 1989, - 1990, 1, 0, 0, 0, 1990, 1992, 1, 0, 0, 0, 1991, 1993, 3, 156, 78, 0, 1992, - 1991, 1, 0, 0, 0, 1992, 1993, 1, 0, 0, 0, 1993, 1994, 1, 0, 0, 0, 1994, - 2054, 5, 4, 0, 0, 1995, 1996, 7, 25, 0, 0, 1996, 1997, 5, 3, 0, 0, 1997, - 1998, 5, 4, 0, 0, 1998, 1999, 5, 155, 0, 0, 1999, 2001, 5, 3, 0, 0, 2000, - 2002, 3, 154, 77, 0, 2001, 2000, 1, 0, 0, 0, 2001, 2002, 1, 0, 0, 0, 2002, - 2003, 1, 0, 0, 0, 2003, 2004, 3, 158, 79, 0, 2004, 2005, 5, 4, 0, 0, 2005, - 2054, 1, 0, 0, 0, 2006, 2007, 7, 26, 0, 0, 2007, 2008, 5, 3, 0, 0, 2008, - 2010, 3, 68, 34, 0, 2009, 2011, 3, 150, 75, 0, 2010, 2009, 1, 0, 0, 0, - 2010, 2011, 1, 0, 0, 0, 2011, 2013, 1, 0, 0, 0, 2012, 2014, 3, 152, 76, - 0, 2013, 2012, 1, 0, 0, 0, 2013, 2014, 1, 0, 0, 0, 2014, 2015, 1, 0, 0, - 0, 2015, 2016, 5, 4, 0, 0, 2016, 2017, 5, 155, 0, 0, 2017, 2019, 5, 3, - 0, 0, 2018, 2020, 3, 154, 77, 0, 2019, 2018, 1, 0, 0, 0, 2019, 2020, 1, - 0, 0, 0, 2020, 2021, 1, 0, 0, 0, 2021, 2022, 3, 158, 79, 0, 2022, 2023, - 5, 4, 0, 0, 2023, 2054, 1, 0, 0, 0, 2024, 2025, 5, 167, 0, 0, 2025, 2026, - 5, 3, 0, 0, 2026, 2027, 3, 68, 34, 0, 2027, 2028, 5, 5, 0, 0, 2028, 2029, - 3, 36, 18, 0, 2029, 2030, 5, 4, 0, 0, 2030, 2031, 5, 155, 0, 0, 2031, 2033, - 5, 3, 0, 0, 2032, 2034, 3, 154, 77, 0, 2033, 2032, 1, 0, 0, 0, 2033, 2034, - 1, 0, 0, 0, 2034, 2035, 1, 0, 0, 0, 2035, 2037, 3, 158, 79, 0, 2036, 2038, - 3, 124, 62, 0, 2037, 2036, 1, 0, 0, 0, 2037, 2038, 1, 0, 0, 0, 2038, 2039, - 1, 0, 0, 0, 2039, 2040, 5, 4, 0, 0, 2040, 2054, 1, 0, 0, 0, 2041, 2042, - 5, 168, 0, 0, 2042, 2043, 5, 3, 0, 0, 2043, 2044, 3, 68, 34, 0, 2044, 2045, - 5, 4, 0, 0, 2045, 2046, 5, 155, 0, 0, 2046, 2048, 5, 3, 0, 0, 2047, 2049, - 3, 154, 77, 0, 2048, 2047, 1, 0, 0, 0, 2048, 2049, 1, 0, 0, 0, 2049, 2050, - 1, 0, 0, 0, 2050, 2051, 3, 158, 79, 0, 2051, 2052, 5, 4, 0, 0, 2052, 2054, - 1, 0, 0, 0, 2053, 1968, 1, 0, 0, 0, 2053, 1983, 1, 0, 0, 0, 2053, 1995, - 1, 0, 0, 0, 2053, 2006, 1, 0, 0, 0, 2053, 2024, 1, 0, 0, 0, 2053, 2041, - 1, 0, 0, 0, 2054, 149, 1, 0, 0, 0, 2055, 2056, 5, 5, 0, 0, 2056, 2057, - 3, 36, 18, 0, 2057, 151, 1, 0, 0, 0, 2058, 2059, 5, 5, 0, 0, 2059, 2060, - 3, 36, 18, 0, 2060, 153, 1, 0, 0, 0, 2061, 2062, 5, 156, 0, 0, 2062, 2064, - 5, 42, 0, 0, 2063, 2065, 3, 68, 34, 0, 2064, 2063, 1, 0, 0, 0, 2065, 2066, - 1, 0, 0, 0, 2066, 2064, 1, 0, 0, 0, 2066, 2067, 1, 0, 0, 0, 2067, 155, - 1, 0, 0, 0, 2068, 2069, 5, 111, 0, 0, 2069, 2071, 5, 42, 0, 0, 2070, 2072, - 3, 68, 34, 0, 2071, 2070, 1, 0, 0, 0, 2072, 2073, 1, 0, 0, 0, 2073, 2071, - 1, 0, 0, 0, 2073, 2074, 1, 0, 0, 0, 2074, 157, 1, 0, 0, 0, 2075, 2076, - 5, 111, 0, 0, 2076, 2077, 5, 42, 0, 0, 2077, 2078, 3, 158, 79, 0, 2078, - 159, 1, 0, 0, 0, 2079, 2081, 3, 68, 34, 0, 2080, 2082, 3, 140, 70, 0, 2081, - 2080, 1, 0, 0, 0, 2081, 2082, 1, 0, 0, 0, 2082, 2090, 1, 0, 0, 0, 2083, - 2084, 5, 5, 0, 0, 2084, 2086, 3, 68, 34, 0, 2085, 2087, 3, 140, 70, 0, - 2086, 2085, 1, 0, 0, 0, 2086, 2087, 1, 0, 0, 0, 2087, 2089, 1, 0, 0, 0, - 2088, 2083, 1, 0, 0, 0, 2089, 2092, 1, 0, 0, 0, 2090, 2088, 1, 0, 0, 0, - 2090, 2091, 1, 0, 0, 0, 2091, 161, 1, 0, 0, 0, 2092, 2090, 1, 0, 0, 0, - 2093, 2094, 3, 84, 42, 0, 2094, 163, 1, 0, 0, 0, 2095, 2096, 3, 84, 42, - 0, 2096, 165, 1, 0, 0, 0, 2097, 2098, 7, 27, 0, 0, 2098, 167, 1, 0, 0, - 0, 2099, 2100, 5, 192, 0, 0, 2100, 169, 1, 0, 0, 0, 2101, 2104, 3, 68, - 34, 0, 2102, 2104, 3, 30, 15, 0, 2103, 2101, 1, 0, 0, 0, 2103, 2102, 1, - 0, 0, 0, 2104, 171, 1, 0, 0, 0, 2105, 2106, 7, 28, 0, 0, 2106, 173, 1, - 0, 0, 0, 2107, 2108, 7, 29, 0, 0, 2108, 175, 1, 0, 0, 0, 2109, 2110, 3, - 228, 114, 0, 2110, 177, 1, 0, 0, 0, 2111, 2112, 3, 228, 114, 0, 2112, 179, - 1, 0, 0, 0, 2113, 2114, 3, 182, 91, 0, 2114, 2115, 5, 2, 0, 0, 2115, 2117, - 1, 0, 0, 0, 2116, 2113, 1, 0, 0, 0, 2116, 2117, 1, 0, 0, 0, 2117, 2118, - 1, 0, 0, 0, 2118, 2119, 3, 178, 89, 0, 2119, 181, 1, 0, 0, 0, 2120, 2121, - 3, 228, 114, 0, 2121, 183, 1, 0, 0, 0, 2122, 2123, 3, 228, 114, 0, 2123, - 185, 1, 0, 0, 0, 2124, 2125, 3, 228, 114, 0, 2125, 187, 1, 0, 0, 0, 2126, - 2127, 3, 228, 114, 0, 2127, 189, 1, 0, 0, 0, 2128, 2129, 3, 228, 114, 0, - 2129, 191, 1, 0, 0, 0, 2130, 2131, 3, 228, 114, 0, 2131, 193, 1, 0, 0, - 0, 2132, 2133, 3, 228, 114, 0, 2133, 195, 1, 0, 0, 0, 2134, 2135, 3, 228, - 114, 0, 2135, 197, 1, 0, 0, 0, 2136, 2137, 3, 228, 114, 0, 2137, 199, 1, - 0, 0, 0, 2138, 2139, 3, 228, 114, 0, 2139, 201, 1, 0, 0, 0, 2140, 2141, - 3, 228, 114, 0, 2141, 203, 1, 0, 0, 0, 2142, 2143, 3, 228, 114, 0, 2143, - 205, 1, 0, 0, 0, 2144, 2145, 3, 228, 114, 0, 2145, 207, 1, 0, 0, 0, 2146, - 2147, 7, 28, 0, 0, 2147, 209, 1, 0, 0, 0, 2148, 2149, 3, 228, 114, 0, 2149, - 211, 1, 0, 0, 0, 2150, 2151, 3, 228, 114, 0, 2151, 213, 1, 0, 0, 0, 2152, - 2153, 3, 228, 114, 0, 2153, 215, 1, 0, 0, 0, 2154, 2155, 3, 228, 114, 0, - 2155, 217, 1, 0, 0, 0, 2156, 2157, 3, 228, 114, 0, 2157, 219, 1, 0, 0, - 0, 2158, 2159, 3, 228, 114, 0, 2159, 221, 1, 0, 0, 0, 2160, 2161, 3, 228, - 114, 0, 2161, 223, 1, 0, 0, 0, 2162, 2163, 3, 228, 114, 0, 2163, 225, 1, - 0, 0, 0, 2164, 2165, 3, 228, 114, 0, 2165, 227, 1, 0, 0, 0, 2166, 2174, - 5, 188, 0, 0, 2167, 2174, 3, 174, 87, 0, 2168, 2174, 5, 192, 0, 0, 2169, - 2170, 5, 3, 0, 0, 2170, 2171, 3, 228, 114, 0, 2171, 2172, 5, 4, 0, 0, 2172, - 2174, 1, 0, 0, 0, 2173, 2166, 1, 0, 0, 0, 2173, 2167, 1, 0, 0, 0, 2173, - 2168, 1, 0, 0, 0, 2173, 2169, 1, 0, 0, 0, 2174, 229, 1, 0, 0, 0, 313, 233, - 241, 248, 253, 259, 265, 267, 293, 300, 307, 313, 317, 322, 325, 332, 335, - 339, 347, 351, 353, 357, 361, 365, 368, 375, 381, 387, 392, 403, 409, 413, - 417, 420, 425, 429, 435, 440, 449, 456, 465, 468, 472, 476, 481, 487, 499, - 503, 508, 511, 514, 519, 522, 536, 543, 550, 552, 555, 561, 566, 574, 579, - 594, 600, 610, 615, 625, 629, 631, 635, 640, 642, 650, 656, 661, 668, 679, - 682, 684, 691, 695, 702, 708, 714, 720, 725, 734, 739, 750, 755, 766, 771, - 775, 791, 801, 806, 814, 826, 831, 842, 845, 847, 853, 856, 858, 862, 866, - 873, 876, 879, 886, 889, 892, 895, 899, 907, 912, 923, 928, 937, 944, 948, - 952, 955, 963, 976, 979, 987, 996, 1000, 1005, 1034, 1041, 1052, 1061, - 1071, 1074, 1080, 1086, 1095, 1098, 1102, 1109, 1115, 1122, 1124, 1126, - 1135, 1142, 1149, 1155, 1160, 1168, 1173, 1182, 1193, 1200, 1206, 1209, - 1212, 1222, 1228, 1230, 1238, 1245, 1252, 1257, 1259, 1265, 1274, 1279, - 1286, 1290, 1292, 1295, 1303, 1307, 1310, 1319, 1324, 1331, 1340, 1344, - 1346, 1350, 1359, 1364, 1366, 1379, 1382, 1391, 1402, 1409, 1412, 1417, - 1421, 1424, 1427, 1432, 1436, 1441, 1444, 1447, 1452, 1456, 1459, 1466, - 1471, 1480, 1485, 1488, 1496, 1500, 1508, 1511, 1516, 1520, 1523, 1530, - 1535, 1544, 1549, 1552, 1560, 1564, 1572, 1575, 1577, 1586, 1589, 1591, - 1595, 1599, 1602, 1607, 1618, 1623, 1627, 1631, 1634, 1639, 1645, 1652, - 1659, 1664, 1667, 1675, 1681, 1686, 1692, 1699, 1706, 1711, 1714, 1717, - 1722, 1727, 1734, 1738, 1742, 1752, 1761, 1764, 1773, 1777, 1785, 1794, - 1797, 1806, 1809, 1812, 1815, 1825, 1834, 1843, 1847, 1854, 1861, 1865, - 1869, 1878, 1882, 1886, 1891, 1895, 1902, 1912, 1919, 1924, 1927, 1931, - 1945, 1957, 1966, 1975, 1979, 1989, 1992, 2001, 2010, 2013, 2019, 2033, - 2037, 2048, 2053, 2066, 2073, 2081, 2086, 2090, 2103, 2116, 2173, - } - deserializer := antlr.NewATNDeserializer(nil) - staticData.atn = deserializer.Deserialize(staticData.serializedATN) - atn := staticData.atn - staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) - decisionToDFA := staticData.decisionToDFA - for index, state := range atn.DecisionToState { - decisionToDFA[index] = antlr.NewDFA(state, index) - } -} - -// SQLiteParserInit initializes any static state used to implement SQLiteParser. By default the -// static state used to implement the parser is lazily initialized during the first call to -// NewSQLiteParser(). You can call this function if you wish to initialize the static state ahead -// of time. -func SQLiteParserInit() { - staticData := &SQLiteParserParserStaticData - staticData.once.Do(sqliteparserParserInit) -} - -// NewSQLiteParser produces a new parser instance for the optional input antlr.TokenStream. -func NewSQLiteParser(input antlr.TokenStream) *SQLiteParser { - SQLiteParserInit() - this := new(SQLiteParser) - this.BaseParser = antlr.NewBaseParser(input) - staticData := &SQLiteParserParserStaticData - this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache) - this.RuleNames = staticData.RuleNames - this.LiteralNames = staticData.LiteralNames - this.SymbolicNames = staticData.SymbolicNames - this.GrammarFileName = "SQLiteParser.g4" - - return this -} - -// SQLiteParser tokens. -const ( - SQLiteParserEOF = antlr.TokenEOF - SQLiteParserSCOL = 1 - SQLiteParserDOT = 2 - SQLiteParserOPEN_PAR = 3 - SQLiteParserCLOSE_PAR = 4 - SQLiteParserCOMMA = 5 - SQLiteParserASSIGN = 6 - SQLiteParserSTAR = 7 - SQLiteParserPLUS = 8 - SQLiteParserPTR2 = 9 - SQLiteParserPTR = 10 - SQLiteParserMINUS = 11 - SQLiteParserTILDE = 12 - SQLiteParserPIPE2 = 13 - SQLiteParserDIV = 14 - SQLiteParserMOD = 15 - SQLiteParserLT2 = 16 - SQLiteParserGT2 = 17 - SQLiteParserAMP = 18 - SQLiteParserPIPE = 19 - SQLiteParserLT = 20 - SQLiteParserLT_EQ = 21 - SQLiteParserGT = 22 - SQLiteParserGT_EQ = 23 - SQLiteParserEQ = 24 - SQLiteParserNOT_EQ1 = 25 - SQLiteParserNOT_EQ2 = 26 - SQLiteParserABORT_ = 27 - SQLiteParserACTION_ = 28 - SQLiteParserADD_ = 29 - SQLiteParserAFTER_ = 30 - SQLiteParserALL_ = 31 - SQLiteParserALTER_ = 32 - SQLiteParserANALYZE_ = 33 - SQLiteParserAND_ = 34 - SQLiteParserAS_ = 35 - SQLiteParserASC_ = 36 - SQLiteParserATTACH_ = 37 - SQLiteParserAUTOINCREMENT_ = 38 - SQLiteParserBEFORE_ = 39 - SQLiteParserBEGIN_ = 40 - SQLiteParserBETWEEN_ = 41 - SQLiteParserBY_ = 42 - SQLiteParserCASCADE_ = 43 - SQLiteParserCASE_ = 44 - SQLiteParserCAST_ = 45 - SQLiteParserCHECK_ = 46 - SQLiteParserCOLLATE_ = 47 - SQLiteParserCOLUMN_ = 48 - SQLiteParserCOMMIT_ = 49 - SQLiteParserCONFLICT_ = 50 - SQLiteParserCONSTRAINT_ = 51 - SQLiteParserCREATE_ = 52 - SQLiteParserCROSS_ = 53 - SQLiteParserCURRENT_DATE_ = 54 - SQLiteParserCURRENT_TIME_ = 55 - SQLiteParserCURRENT_TIMESTAMP_ = 56 - SQLiteParserDATABASE_ = 57 - SQLiteParserDEFAULT_ = 58 - SQLiteParserDEFERRABLE_ = 59 - SQLiteParserDEFERRED_ = 60 - SQLiteParserDELETE_ = 61 - SQLiteParserDESC_ = 62 - SQLiteParserDETACH_ = 63 - SQLiteParserDISTINCT_ = 64 - SQLiteParserDROP_ = 65 - SQLiteParserEACH_ = 66 - SQLiteParserELSE_ = 67 - SQLiteParserEND_ = 68 - SQLiteParserESCAPE_ = 69 - SQLiteParserEXCEPT_ = 70 - SQLiteParserEXCLUSIVE_ = 71 - SQLiteParserEXISTS_ = 72 - SQLiteParserEXPLAIN_ = 73 - SQLiteParserFAIL_ = 74 - SQLiteParserFOR_ = 75 - SQLiteParserFOREIGN_ = 76 - SQLiteParserFROM_ = 77 - SQLiteParserFULL_ = 78 - SQLiteParserGLOB_ = 79 - SQLiteParserGROUP_ = 80 - SQLiteParserHAVING_ = 81 - SQLiteParserIF_ = 82 - SQLiteParserIGNORE_ = 83 - SQLiteParserIMMEDIATE_ = 84 - SQLiteParserIN_ = 85 - SQLiteParserINDEX_ = 86 - SQLiteParserINDEXED_ = 87 - SQLiteParserINITIALLY_ = 88 - SQLiteParserINNER_ = 89 - SQLiteParserINSERT_ = 90 - SQLiteParserINSTEAD_ = 91 - SQLiteParserINTERSECT_ = 92 - SQLiteParserINTO_ = 93 - SQLiteParserIS_ = 94 - SQLiteParserISNULL_ = 95 - SQLiteParserJOIN_ = 96 - SQLiteParserKEY_ = 97 - SQLiteParserLEFT_ = 98 - SQLiteParserLIKE_ = 99 - SQLiteParserLIMIT_ = 100 - SQLiteParserMATCH_ = 101 - SQLiteParserNATURAL_ = 102 - SQLiteParserNO_ = 103 - SQLiteParserNOT_ = 104 - SQLiteParserNOTNULL_ = 105 - SQLiteParserNULL_ = 106 - SQLiteParserOF_ = 107 - SQLiteParserOFFSET_ = 108 - SQLiteParserON_ = 109 - SQLiteParserOR_ = 110 - SQLiteParserORDER_ = 111 - SQLiteParserOUTER_ = 112 - SQLiteParserPLAN_ = 113 - SQLiteParserPRAGMA_ = 114 - SQLiteParserPRIMARY_ = 115 - SQLiteParserQUERY_ = 116 - SQLiteParserRAISE_ = 117 - SQLiteParserRECURSIVE_ = 118 - SQLiteParserREFERENCES_ = 119 - SQLiteParserREGEXP_ = 120 - SQLiteParserREINDEX_ = 121 - SQLiteParserRELEASE_ = 122 - SQLiteParserRENAME_ = 123 - SQLiteParserREPLACE_ = 124 - SQLiteParserRESTRICT_ = 125 - SQLiteParserRETURNING_ = 126 - SQLiteParserRIGHT_ = 127 - SQLiteParserROLLBACK_ = 128 - SQLiteParserROW_ = 129 - SQLiteParserROWS_ = 130 - SQLiteParserSAVEPOINT_ = 131 - SQLiteParserSELECT_ = 132 - SQLiteParserSET_ = 133 - SQLiteParserSTRICT_ = 134 - SQLiteParserTABLE_ = 135 - SQLiteParserTEMP_ = 136 - SQLiteParserTEMPORARY_ = 137 - SQLiteParserTHEN_ = 138 - SQLiteParserTO_ = 139 - SQLiteParserTRANSACTION_ = 140 - SQLiteParserTRIGGER_ = 141 - SQLiteParserUNION_ = 142 - SQLiteParserUNIQUE_ = 143 - SQLiteParserUPDATE_ = 144 - SQLiteParserUSING_ = 145 - SQLiteParserVACUUM_ = 146 - SQLiteParserVALUES_ = 147 - SQLiteParserVIEW_ = 148 - SQLiteParserVIRTUAL_ = 149 - SQLiteParserWHEN_ = 150 - SQLiteParserWHERE_ = 151 - SQLiteParserWITH_ = 152 - SQLiteParserWITHOUT_ = 153 - SQLiteParserFIRST_VALUE_ = 154 - SQLiteParserOVER_ = 155 - SQLiteParserPARTITION_ = 156 - SQLiteParserRANGE_ = 157 - SQLiteParserPRECEDING_ = 158 - SQLiteParserUNBOUNDED_ = 159 - SQLiteParserCURRENT_ = 160 - SQLiteParserFOLLOWING_ = 161 - SQLiteParserCUME_DIST_ = 162 - SQLiteParserDENSE_RANK_ = 163 - SQLiteParserLAG_ = 164 - SQLiteParserLAST_VALUE_ = 165 - SQLiteParserLEAD_ = 166 - SQLiteParserNTH_VALUE_ = 167 - SQLiteParserNTILE_ = 168 - SQLiteParserPERCENT_RANK_ = 169 - SQLiteParserRANK_ = 170 - SQLiteParserROW_NUMBER_ = 171 - SQLiteParserGENERATED_ = 172 - SQLiteParserALWAYS_ = 173 - SQLiteParserSTORED_ = 174 - SQLiteParserTRUE_ = 175 - SQLiteParserFALSE_ = 176 - SQLiteParserWINDOW_ = 177 - SQLiteParserNULLS_ = 178 - SQLiteParserFIRST_ = 179 - SQLiteParserLAST_ = 180 - SQLiteParserFILTER_ = 181 - SQLiteParserGROUPS_ = 182 - SQLiteParserEXCLUDE_ = 183 - SQLiteParserTIES_ = 184 - SQLiteParserOTHERS_ = 185 - SQLiteParserDO_ = 186 - SQLiteParserNOTHING_ = 187 - SQLiteParserIDENTIFIER = 188 - SQLiteParserNUMERIC_LITERAL = 189 - SQLiteParserNUMBERED_BIND_PARAMETER = 190 - SQLiteParserNAMED_BIND_PARAMETER = 191 - SQLiteParserSTRING_LITERAL = 192 - SQLiteParserBLOB_LITERAL = 193 - SQLiteParserSINGLE_LINE_COMMENT = 194 - SQLiteParserMULTILINE_COMMENT = 195 - SQLiteParserSPACES = 196 - SQLiteParserUNEXPECTED_CHAR = 197 -) - -// SQLiteParser rules. -const ( - SQLiteParserRULE_parse = 0 - SQLiteParserRULE_sql_stmt_list = 1 - SQLiteParserRULE_sql_stmt = 2 - SQLiteParserRULE_alter_table_stmt = 3 - SQLiteParserRULE_analyze_stmt = 4 - SQLiteParserRULE_attach_stmt = 5 - SQLiteParserRULE_begin_stmt = 6 - SQLiteParserRULE_commit_stmt = 7 - SQLiteParserRULE_rollback_stmt = 8 - SQLiteParserRULE_savepoint_stmt = 9 - SQLiteParserRULE_release_stmt = 10 - SQLiteParserRULE_create_index_stmt = 11 - SQLiteParserRULE_indexed_column = 12 - SQLiteParserRULE_table_option = 13 - SQLiteParserRULE_create_table_stmt = 14 - SQLiteParserRULE_column_def = 15 - SQLiteParserRULE_type_name = 16 - SQLiteParserRULE_column_constraint = 17 - SQLiteParserRULE_signed_number = 18 - SQLiteParserRULE_table_constraint = 19 - SQLiteParserRULE_foreign_key_clause = 20 - SQLiteParserRULE_conflict_clause = 21 - SQLiteParserRULE_create_trigger_stmt = 22 - SQLiteParserRULE_create_view_stmt = 23 - SQLiteParserRULE_create_virtual_table_stmt = 24 - SQLiteParserRULE_with_clause = 25 - SQLiteParserRULE_cte_table_name = 26 - SQLiteParserRULE_recursive_cte = 27 - SQLiteParserRULE_common_table_expression = 28 - SQLiteParserRULE_returning_clause = 29 - SQLiteParserRULE_delete_stmt = 30 - SQLiteParserRULE_delete_stmt_limited = 31 - SQLiteParserRULE_detach_stmt = 32 - SQLiteParserRULE_drop_stmt = 33 - SQLiteParserRULE_expr = 34 - SQLiteParserRULE_raise_function = 35 - SQLiteParserRULE_literal_value = 36 - SQLiteParserRULE_insert_stmt = 37 - SQLiteParserRULE_upsert_clause = 38 - SQLiteParserRULE_pragma_stmt = 39 - SQLiteParserRULE_pragma_value = 40 - SQLiteParserRULE_reindex_stmt = 41 - SQLiteParserRULE_select_stmt = 42 - SQLiteParserRULE_join_clause = 43 - SQLiteParserRULE_select_core = 44 - SQLiteParserRULE_factored_select_stmt = 45 - SQLiteParserRULE_simple_select_stmt = 46 - SQLiteParserRULE_compound_select_stmt = 47 - SQLiteParserRULE_table_or_subquery = 48 - SQLiteParserRULE_result_column = 49 - SQLiteParserRULE_join_operator = 50 - SQLiteParserRULE_join_constraint = 51 - SQLiteParserRULE_compound_operator = 52 - SQLiteParserRULE_update_stmt = 53 - SQLiteParserRULE_column_name_list = 54 - SQLiteParserRULE_update_stmt_limited = 55 - SQLiteParserRULE_qualified_table_name = 56 - SQLiteParserRULE_vacuum_stmt = 57 - SQLiteParserRULE_filter_clause = 58 - SQLiteParserRULE_window_defn = 59 - SQLiteParserRULE_over_clause = 60 - SQLiteParserRULE_frame_spec = 61 - SQLiteParserRULE_frame_clause = 62 - SQLiteParserRULE_simple_function_invocation = 63 - SQLiteParserRULE_aggregate_function_invocation = 64 - SQLiteParserRULE_window_function_invocation = 65 - SQLiteParserRULE_common_table_stmt = 66 - SQLiteParserRULE_order_by_stmt = 67 - SQLiteParserRULE_limit_stmt = 68 - SQLiteParserRULE_ordering_term = 69 - SQLiteParserRULE_asc_desc = 70 - SQLiteParserRULE_frame_left = 71 - SQLiteParserRULE_frame_right = 72 - SQLiteParserRULE_frame_single = 73 - SQLiteParserRULE_window_function = 74 - SQLiteParserRULE_of_OF_fset = 75 - SQLiteParserRULE_default_DEFAULT__value = 76 - SQLiteParserRULE_partition_by = 77 - SQLiteParserRULE_order_by_expr = 78 - SQLiteParserRULE_order_by_expr_asc_desc = 79 - SQLiteParserRULE_expr_asc_desc = 80 - SQLiteParserRULE_initial_select = 81 - SQLiteParserRULE_recursive__select = 82 - SQLiteParserRULE_unary_operator = 83 - SQLiteParserRULE_error_message = 84 - SQLiteParserRULE_module_argument = 85 - SQLiteParserRULE_column_alias = 86 - SQLiteParserRULE_keyword = 87 - SQLiteParserRULE_name = 88 - SQLiteParserRULE_function_name = 89 - SQLiteParserRULE_qualified_function_name = 90 - SQLiteParserRULE_schema_name = 91 - SQLiteParserRULE_table_name = 92 - SQLiteParserRULE_table_or_index_name = 93 - SQLiteParserRULE_new_table_name = 94 - SQLiteParserRULE_column_name = 95 - SQLiteParserRULE_collation_name = 96 - SQLiteParserRULE_foreign_table = 97 - SQLiteParserRULE_index_name = 98 - SQLiteParserRULE_trigger_name = 99 - SQLiteParserRULE_view_name = 100 - SQLiteParserRULE_module_name = 101 - SQLiteParserRULE_pragma_name = 102 - SQLiteParserRULE_savepoint_name = 103 - SQLiteParserRULE_table_alias = 104 - SQLiteParserRULE_table_alias_fallback = 105 - SQLiteParserRULE_transaction_name = 106 - SQLiteParserRULE_window_name = 107 - SQLiteParserRULE_alias = 108 - SQLiteParserRULE_filename = 109 - SQLiteParserRULE_base_window_name = 110 - SQLiteParserRULE_simple_func = 111 - SQLiteParserRULE_aggregate_func = 112 - SQLiteParserRULE_table_function_name = 113 - SQLiteParserRULE_any_name = 114 -) - -// IParseContext is an interface to support dynamic dispatch. -type IParseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - EOF() antlr.TerminalNode - AllSql_stmt_list() []ISql_stmt_listContext - Sql_stmt_list(i int) ISql_stmt_listContext - - // IsParseContext differentiates from other interfaces. - IsParseContext() -} - -type ParseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyParseContext() *ParseContext { - var p = new(ParseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_parse - return p -} - -func InitEmptyParseContext(p *ParseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_parse -} - -func (*ParseContext) IsParseContext() {} - -func NewParseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParseContext { - var p = new(ParseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_parse - - return p -} - -func (s *ParseContext) GetParser() antlr.Parser { return s.parser } - -func (s *ParseContext) EOF() antlr.TerminalNode { - return s.GetToken(SQLiteParserEOF, 0) -} - -func (s *ParseContext) AllSql_stmt_list() []ISql_stmt_listContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ISql_stmt_listContext); ok { - len++ - } - } - - tst := make([]ISql_stmt_listContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ISql_stmt_listContext); ok { - tst[i] = t.(ISql_stmt_listContext) - i++ - } - } - - return tst -} - -func (s *ParseContext) Sql_stmt_list(i int) ISql_stmt_listContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISql_stmt_listContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ISql_stmt_listContext) -} - -func (s *ParseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *ParseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *ParseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterParse(s) - } -} - -func (s *ParseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitParse(s) - } -} - -func (p *SQLiteParser) Parse() (localctx IParseContext) { - localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 0, SQLiteParserRULE_parse) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(233) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-6912461228224806910) != 0) || ((int64((_la-65)) & ^0x3f) == 0 && ((int64(1)<<(_la-65))&-8430175552450592503) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&2203651) != 0) { - { - p.SetState(230) - p.Sql_stmt_list() - } - - p.SetState(235) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(236) - p.Match(SQLiteParserEOF) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISql_stmt_listContext is an interface to support dynamic dispatch. -type ISql_stmt_listContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - AllSql_stmt() []ISql_stmtContext - Sql_stmt(i int) ISql_stmtContext - AllSCOL() []antlr.TerminalNode - SCOL(i int) antlr.TerminalNode - - // IsSql_stmt_listContext differentiates from other interfaces. - IsSql_stmt_listContext() -} - -type Sql_stmt_listContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySql_stmt_listContext() *Sql_stmt_listContext { - var p = new(Sql_stmt_listContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_sql_stmt_list - return p -} - -func InitEmptySql_stmt_listContext(p *Sql_stmt_listContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_sql_stmt_list -} - -func (*Sql_stmt_listContext) IsSql_stmt_listContext() {} - -func NewSql_stmt_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_stmt_listContext { - var p = new(Sql_stmt_listContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_sql_stmt_list - - return p -} - -func (s *Sql_stmt_listContext) GetParser() antlr.Parser { return s.parser } - -func (s *Sql_stmt_listContext) AllSql_stmt() []ISql_stmtContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ISql_stmtContext); ok { - len++ - } - } - - tst := make([]ISql_stmtContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ISql_stmtContext); ok { - tst[i] = t.(ISql_stmtContext) - i++ - } - } - - return tst -} - -func (s *Sql_stmt_listContext) Sql_stmt(i int) ISql_stmtContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISql_stmtContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ISql_stmtContext) -} - -func (s *Sql_stmt_listContext) AllSCOL() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserSCOL) -} - -func (s *Sql_stmt_listContext) SCOL(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserSCOL, i) -} - -func (s *Sql_stmt_listContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Sql_stmt_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Sql_stmt_listContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSql_stmt_list(s) - } -} - -func (s *Sql_stmt_listContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSql_stmt_list(s) - } -} - -func (p *SQLiteParser) Sql_stmt_list() (localctx ISql_stmt_listContext) { - localctx = NewSql_stmt_listContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 2, SQLiteParserRULE_sql_stmt_list) - var _la int - - var _alt int - - p.EnterOuterAlt(localctx, 1) - p.SetState(241) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserSCOL { - { - p.SetState(238) - p.Match(SQLiteParserSCOL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(243) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(244) - p.Sql_stmt() - } - p.SetState(253) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { - if _alt == 1 { - p.SetState(246) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for ok := true; ok; ok = _la == SQLiteParserSCOL { - { - p.SetState(245) - p.Match(SQLiteParserSCOL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(248) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(250) - p.Sql_stmt() - } - - } - p.SetState(255) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - } - p.SetState(259) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { - if _alt == 1 { - { - p.SetState(256) - p.Match(SQLiteParserSCOL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - p.SetState(261) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISql_stmtContext is an interface to support dynamic dispatch. -type ISql_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Alter_table_stmt() IAlter_table_stmtContext - Analyze_stmt() IAnalyze_stmtContext - Attach_stmt() IAttach_stmtContext - Begin_stmt() IBegin_stmtContext - Commit_stmt() ICommit_stmtContext - Create_index_stmt() ICreate_index_stmtContext - Create_table_stmt() ICreate_table_stmtContext - Create_trigger_stmt() ICreate_trigger_stmtContext - Create_view_stmt() ICreate_view_stmtContext - Create_virtual_table_stmt() ICreate_virtual_table_stmtContext - Delete_stmt() IDelete_stmtContext - Delete_stmt_limited() IDelete_stmt_limitedContext - Detach_stmt() IDetach_stmtContext - Drop_stmt() IDrop_stmtContext - Insert_stmt() IInsert_stmtContext - Pragma_stmt() IPragma_stmtContext - Reindex_stmt() IReindex_stmtContext - Release_stmt() IRelease_stmtContext - Rollback_stmt() IRollback_stmtContext - Savepoint_stmt() ISavepoint_stmtContext - Select_stmt() ISelect_stmtContext - Update_stmt() IUpdate_stmtContext - Update_stmt_limited() IUpdate_stmt_limitedContext - Vacuum_stmt() IVacuum_stmtContext - EXPLAIN_() antlr.TerminalNode - QUERY_() antlr.TerminalNode - PLAN_() antlr.TerminalNode - - // IsSql_stmtContext differentiates from other interfaces. - IsSql_stmtContext() -} - -type Sql_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySql_stmtContext() *Sql_stmtContext { - var p = new(Sql_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_sql_stmt - return p -} - -func InitEmptySql_stmtContext(p *Sql_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_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 = SQLiteParserRULE_sql_stmt - - return p -} - -func (s *Sql_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Sql_stmtContext) Alter_table_stmt() IAlter_table_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAlter_table_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAlter_table_stmtContext) -} - -func (s *Sql_stmtContext) Analyze_stmt() IAnalyze_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAnalyze_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAnalyze_stmtContext) -} - -func (s *Sql_stmtContext) Attach_stmt() IAttach_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAttach_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAttach_stmtContext) -} - -func (s *Sql_stmtContext) Begin_stmt() IBegin_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IBegin_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IBegin_stmtContext) -} - -func (s *Sql_stmtContext) Commit_stmt() ICommit_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICommit_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICommit_stmtContext) -} - -func (s *Sql_stmtContext) Create_index_stmt() ICreate_index_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICreate_index_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICreate_index_stmtContext) -} - -func (s *Sql_stmtContext) Create_table_stmt() ICreate_table_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICreate_table_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICreate_table_stmtContext) -} - -func (s *Sql_stmtContext) Create_trigger_stmt() ICreate_trigger_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICreate_trigger_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICreate_trigger_stmtContext) -} - -func (s *Sql_stmtContext) Create_view_stmt() ICreate_view_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICreate_view_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICreate_view_stmtContext) -} - -func (s *Sql_stmtContext) Create_virtual_table_stmt() ICreate_virtual_table_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICreate_virtual_table_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICreate_virtual_table_stmtContext) -} - -func (s *Sql_stmtContext) Delete_stmt() IDelete_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IDelete_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IDelete_stmtContext) -} - -func (s *Sql_stmtContext) Delete_stmt_limited() IDelete_stmt_limitedContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IDelete_stmt_limitedContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IDelete_stmt_limitedContext) -} - -func (s *Sql_stmtContext) Detach_stmt() IDetach_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IDetach_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IDetach_stmtContext) -} - -func (s *Sql_stmtContext) Drop_stmt() IDrop_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IDrop_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IDrop_stmtContext) -} - -func (s *Sql_stmtContext) Insert_stmt() IInsert_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IInsert_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IInsert_stmtContext) -} - -func (s *Sql_stmtContext) Pragma_stmt() IPragma_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IPragma_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IPragma_stmtContext) -} - -func (s *Sql_stmtContext) Reindex_stmt() IReindex_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IReindex_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IReindex_stmtContext) -} - -func (s *Sql_stmtContext) Release_stmt() IRelease_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IRelease_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IRelease_stmtContext) -} - -func (s *Sql_stmtContext) Rollback_stmt() IRollback_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IRollback_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IRollback_stmtContext) -} - -func (s *Sql_stmtContext) Savepoint_stmt() ISavepoint_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISavepoint_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISavepoint_stmtContext) -} - -func (s *Sql_stmtContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Sql_stmtContext) Update_stmt() IUpdate_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IUpdate_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IUpdate_stmtContext) -} - -func (s *Sql_stmtContext) Update_stmt_limited() IUpdate_stmt_limitedContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IUpdate_stmt_limitedContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IUpdate_stmt_limitedContext) -} - -func (s *Sql_stmtContext) Vacuum_stmt() IVacuum_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IVacuum_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IVacuum_stmtContext) -} - -func (s *Sql_stmtContext) EXPLAIN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXPLAIN_, 0) -} - -func (s *Sql_stmtContext) QUERY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserQUERY_, 0) -} - -func (s *Sql_stmtContext) PLAN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPLAN_, 0) -} - -func (s *Sql_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Sql_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Sql_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSql_stmt(s) - } -} - -func (s *Sql_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSql_stmt(s) - } -} - -func (p *SQLiteParser) Sql_stmt() (localctx ISql_stmtContext) { - localctx = NewSql_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 4, SQLiteParserRULE_sql_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(267) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserEXPLAIN_ { - { - p.SetState(262) - p.Match(SQLiteParserEXPLAIN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(265) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserQUERY_ { - { - p.SetState(263) - p.Match(SQLiteParserQUERY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(264) - p.Match(SQLiteParserPLAN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - - } - p.SetState(293) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) { - case 1: - { - p.SetState(269) - p.Alter_table_stmt() - } - - case 2: - { - p.SetState(270) - p.Analyze_stmt() - } - - case 3: - { - p.SetState(271) - p.Attach_stmt() - } - - case 4: - { - p.SetState(272) - p.Begin_stmt() - } - - case 5: - { - p.SetState(273) - p.Commit_stmt() - } - - case 6: - { - p.SetState(274) - p.Create_index_stmt() - } - - case 7: - { - p.SetState(275) - p.Create_table_stmt() - } - - case 8: - { - p.SetState(276) - p.Create_trigger_stmt() - } - - case 9: - { - p.SetState(277) - p.Create_view_stmt() - } - - case 10: - { - p.SetState(278) - p.Create_virtual_table_stmt() - } - - case 11: - { - p.SetState(279) - p.Delete_stmt() - } - - case 12: - { - p.SetState(280) - p.Delete_stmt_limited() - } - - case 13: - { - p.SetState(281) - p.Detach_stmt() - } - - case 14: - { - p.SetState(282) - p.Drop_stmt() - } - - case 15: - { - p.SetState(283) - p.Insert_stmt() - } - - case 16: - { - p.SetState(284) - p.Pragma_stmt() - } - - case 17: - { - p.SetState(285) - p.Reindex_stmt() - } - - case 18: - { - p.SetState(286) - p.Release_stmt() - } - - case 19: - { - p.SetState(287) - p.Rollback_stmt() - } - - case 20: - { - p.SetState(288) - p.Savepoint_stmt() - } - - case 21: - { - p.SetState(289) - p.Select_stmt() - } - - case 22: - { - p.SetState(290) - p.Update_stmt() - } - - case 23: - { - p.SetState(291) - p.Update_stmt_limited() - } - - case 24: - { - p.SetState(292) - p.Vacuum_stmt() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAlter_table_stmtContext is an interface to support dynamic dispatch. -type IAlter_table_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // GetOld_column_name returns the old_column_name rule contexts. - GetOld_column_name() IColumn_nameContext - - // GetNew_column_name returns the new_column_name rule contexts. - GetNew_column_name() IColumn_nameContext - - // SetOld_column_name sets the old_column_name rule contexts. - SetOld_column_name(IColumn_nameContext) - - // SetNew_column_name sets the new_column_name rule contexts. - SetNew_column_name(IColumn_nameContext) - - // Getter signatures - ALTER_() antlr.TerminalNode - TABLE_() antlr.TerminalNode - Table_name() ITable_nameContext - RENAME_() antlr.TerminalNode - ADD_() antlr.TerminalNode - Column_def() IColumn_defContext - DROP_() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - TO_() antlr.TerminalNode - New_table_name() INew_table_nameContext - COLUMN_() antlr.TerminalNode - - // IsAlter_table_stmtContext differentiates from other interfaces. - IsAlter_table_stmtContext() -} - -type Alter_table_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser - old_column_name IColumn_nameContext - new_column_name IColumn_nameContext -} - -func NewEmptyAlter_table_stmtContext() *Alter_table_stmtContext { - var p = new(Alter_table_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_alter_table_stmt - return p -} - -func InitEmptyAlter_table_stmtContext(p *Alter_table_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_alter_table_stmt -} - -func (*Alter_table_stmtContext) IsAlter_table_stmtContext() {} - -func NewAlter_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Alter_table_stmtContext { - var p = new(Alter_table_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_alter_table_stmt - - return p -} - -func (s *Alter_table_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Alter_table_stmtContext) GetOld_column_name() IColumn_nameContext { return s.old_column_name } - -func (s *Alter_table_stmtContext) GetNew_column_name() IColumn_nameContext { return s.new_column_name } - -func (s *Alter_table_stmtContext) SetOld_column_name(v IColumn_nameContext) { s.old_column_name = v } - -func (s *Alter_table_stmtContext) SetNew_column_name(v IColumn_nameContext) { s.new_column_name = v } - -func (s *Alter_table_stmtContext) ALTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALTER_, 0) -} - -func (s *Alter_table_stmtContext) TABLE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTABLE_, 0) -} - -func (s *Alter_table_stmtContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Alter_table_stmtContext) RENAME_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRENAME_, 0) -} - -func (s *Alter_table_stmtContext) ADD_() antlr.TerminalNode { - return s.GetToken(SQLiteParserADD_, 0) -} - -func (s *Alter_table_stmtContext) Column_def() IColumn_defContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_defContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IColumn_defContext) -} - -func (s *Alter_table_stmtContext) DROP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDROP_, 0) -} - -func (s *Alter_table_stmtContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Alter_table_stmtContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Alter_table_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Alter_table_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Alter_table_stmtContext) TO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTO_, 0) -} - -func (s *Alter_table_stmtContext) New_table_name() INew_table_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(INew_table_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(INew_table_nameContext) -} - -func (s *Alter_table_stmtContext) COLUMN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOLUMN_, 0) -} - -func (s *Alter_table_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Alter_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Alter_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAlter_table_stmt(s) - } -} - -func (s *Alter_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAlter_table_stmt(s) - } -} - -func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { - localctx = NewAlter_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 6, SQLiteParserRULE_alter_table_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(295) - p.Match(SQLiteParserALTER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(296) - p.Match(SQLiteParserTABLE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(300) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 { - { - p.SetState(297) - p.Schema_name() - } - { - p.SetState(298) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(302) - p.Table_name() - } - p.SetState(325) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserRENAME_: - { - p.SetState(303) - p.Match(SQLiteParserRENAME_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(313) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 10, p.GetParserRuleContext()) { - case 1: - { - p.SetState(304) - p.Match(SQLiteParserTO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(305) - p.New_table_name() - } - - case 2: - p.SetState(307) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 9, p.GetParserRuleContext()) == 1 { - { - p.SetState(306) - p.Match(SQLiteParserCOLUMN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(309) - - var _x = p.Column_name() - - localctx.(*Alter_table_stmtContext).old_column_name = _x - } - { - p.SetState(310) - p.Match(SQLiteParserTO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(311) - - var _x = p.Column_name() - - localctx.(*Alter_table_stmtContext).new_column_name = _x - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - - case SQLiteParserADD_: - { - p.SetState(315) - p.Match(SQLiteParserADD_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(317) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 11, p.GetParserRuleContext()) == 1 { - { - p.SetState(316) - p.Match(SQLiteParserCOLUMN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(319) - p.Column_def() - } - - case SQLiteParserDROP_: - { - p.SetState(320) - p.Match(SQLiteParserDROP_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(322) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 { - { - p.SetState(321) - p.Match(SQLiteParserCOLUMN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(324) - p.Column_name() - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAnalyze_stmtContext is an interface to support dynamic dispatch. -type IAnalyze_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ANALYZE_() antlr.TerminalNode - Schema_name() ISchema_nameContext - Table_or_index_name() ITable_or_index_nameContext - DOT() antlr.TerminalNode - - // IsAnalyze_stmtContext differentiates from other interfaces. - IsAnalyze_stmtContext() -} - -type Analyze_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyAnalyze_stmtContext() *Analyze_stmtContext { - var p = new(Analyze_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_analyze_stmt - return p -} - -func InitEmptyAnalyze_stmtContext(p *Analyze_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_analyze_stmt -} - -func (*Analyze_stmtContext) IsAnalyze_stmtContext() {} - -func NewAnalyze_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Analyze_stmtContext { - var p = new(Analyze_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_analyze_stmt - - return p -} - -func (s *Analyze_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Analyze_stmtContext) ANALYZE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserANALYZE_, 0) -} - -func (s *Analyze_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Analyze_stmtContext) Table_or_index_name() ITable_or_index_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_or_index_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_or_index_nameContext) -} - -func (s *Analyze_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Analyze_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Analyze_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Analyze_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAnalyze_stmt(s) - } -} - -func (s *Analyze_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAnalyze_stmt(s) - } -} - -func (p *SQLiteParser) Analyze_stmt() (localctx IAnalyze_stmtContext) { - localctx = NewAnalyze_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 8, SQLiteParserRULE_analyze_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(327) - p.Match(SQLiteParserANALYZE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(335) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 { - { - p.SetState(328) - p.Schema_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 2 { - p.SetState(332) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 { - { - p.SetState(329) - p.Schema_name() - } - { - p.SetState(330) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(334) - p.Table_or_index_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAttach_stmtContext is an interface to support dynamic dispatch. -type IAttach_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ATTACH_() antlr.TerminalNode - Expr() IExprContext - AS_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DATABASE_() antlr.TerminalNode - - // IsAttach_stmtContext differentiates from other interfaces. - IsAttach_stmtContext() -} - -type Attach_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyAttach_stmtContext() *Attach_stmtContext { - var p = new(Attach_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_attach_stmt - return p -} - -func InitEmptyAttach_stmtContext(p *Attach_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_attach_stmt -} - -func (*Attach_stmtContext) IsAttach_stmtContext() {} - -func NewAttach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Attach_stmtContext { - var p = new(Attach_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_attach_stmt - - return p -} - -func (s *Attach_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Attach_stmtContext) ATTACH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserATTACH_, 0) -} - -func (s *Attach_stmtContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Attach_stmtContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Attach_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Attach_stmtContext) DATABASE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDATABASE_, 0) -} - -func (s *Attach_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Attach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Attach_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAttach_stmt(s) - } -} - -func (s *Attach_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAttach_stmt(s) - } -} - -func (p *SQLiteParser) Attach_stmt() (localctx IAttach_stmtContext) { - localctx = NewAttach_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 10, SQLiteParserRULE_attach_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(337) - p.Match(SQLiteParserATTACH_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(339) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 { - { - p.SetState(338) - p.Match(SQLiteParserDATABASE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(341) - p.expr(0) - } - { - p.SetState(342) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(343) - p.Schema_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IBegin_stmtContext is an interface to support dynamic dispatch. -type IBegin_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - BEGIN_() antlr.TerminalNode - TRANSACTION_() antlr.TerminalNode - DEFERRED_() antlr.TerminalNode - IMMEDIATE_() antlr.TerminalNode - EXCLUSIVE_() antlr.TerminalNode - Transaction_name() ITransaction_nameContext - - // IsBegin_stmtContext differentiates from other interfaces. - IsBegin_stmtContext() -} - -type Begin_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyBegin_stmtContext() *Begin_stmtContext { - var p = new(Begin_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_begin_stmt - return p -} - -func InitEmptyBegin_stmtContext(p *Begin_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_begin_stmt -} - -func (*Begin_stmtContext) IsBegin_stmtContext() {} - -func NewBegin_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Begin_stmtContext { - var p = new(Begin_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_begin_stmt - - return p -} - -func (s *Begin_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Begin_stmtContext) BEGIN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBEGIN_, 0) -} - -func (s *Begin_stmtContext) TRANSACTION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRANSACTION_, 0) -} - -func (s *Begin_stmtContext) DEFERRED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFERRED_, 0) -} - -func (s *Begin_stmtContext) IMMEDIATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIMMEDIATE_, 0) -} - -func (s *Begin_stmtContext) EXCLUSIVE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXCLUSIVE_, 0) -} - -func (s *Begin_stmtContext) Transaction_name() ITransaction_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITransaction_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITransaction_nameContext) -} - -func (s *Begin_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Begin_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Begin_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterBegin_stmt(s) - } -} - -func (s *Begin_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitBegin_stmt(s) - } -} - -func (p *SQLiteParser) Begin_stmt() (localctx IBegin_stmtContext) { - localctx = NewBegin_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 12, SQLiteParserRULE_begin_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(345) - p.Match(SQLiteParserBEGIN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(347) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if (int64((_la-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0 { - { - p.SetState(346) - _la = p.GetTokenStream().LA(1) - - if !((int64((_la-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - p.SetState(353) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserTRANSACTION_ { - { - p.SetState(349) - p.Match(SQLiteParserTRANSACTION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(351) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext()) == 1 { - { - p.SetState(350) - p.Transaction_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICommit_stmtContext is an interface to support dynamic dispatch. -type ICommit_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - COMMIT_() antlr.TerminalNode - END_() antlr.TerminalNode - TRANSACTION_() antlr.TerminalNode - - // IsCommit_stmtContext differentiates from other interfaces. - IsCommit_stmtContext() -} - -type Commit_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCommit_stmtContext() *Commit_stmtContext { - var p = new(Commit_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_commit_stmt - return p -} - -func InitEmptyCommit_stmtContext(p *Commit_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_commit_stmt -} - -func (*Commit_stmtContext) IsCommit_stmtContext() {} - -func NewCommit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Commit_stmtContext { - var p = new(Commit_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_commit_stmt - - return p -} - -func (s *Commit_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Commit_stmtContext) COMMIT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMIT_, 0) -} - -func (s *Commit_stmtContext) END_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEND_, 0) -} - -func (s *Commit_stmtContext) TRANSACTION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRANSACTION_, 0) -} - -func (s *Commit_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Commit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Commit_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCommit_stmt(s) - } -} - -func (s *Commit_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCommit_stmt(s) - } -} - -func (p *SQLiteParser) Commit_stmt() (localctx ICommit_stmtContext) { - localctx = NewCommit_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 14, SQLiteParserRULE_commit_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(355) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserCOMMIT_ || _la == SQLiteParserEND_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - p.SetState(357) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserTRANSACTION_ { - { - p.SetState(356) - p.Match(SQLiteParserTRANSACTION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IRollback_stmtContext is an interface to support dynamic dispatch. -type IRollback_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ROLLBACK_() antlr.TerminalNode - TRANSACTION_() antlr.TerminalNode - TO_() antlr.TerminalNode - Savepoint_name() ISavepoint_nameContext - SAVEPOINT_() antlr.TerminalNode - - // IsRollback_stmtContext differentiates from other interfaces. - IsRollback_stmtContext() -} - -type Rollback_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyRollback_stmtContext() *Rollback_stmtContext { - var p = new(Rollback_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_rollback_stmt - return p -} - -func InitEmptyRollback_stmtContext(p *Rollback_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_rollback_stmt -} - -func (*Rollback_stmtContext) IsRollback_stmtContext() {} - -func NewRollback_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Rollback_stmtContext { - var p = new(Rollback_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_rollback_stmt - - return p -} - -func (s *Rollback_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Rollback_stmtContext) ROLLBACK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROLLBACK_, 0) -} - -func (s *Rollback_stmtContext) TRANSACTION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRANSACTION_, 0) -} - -func (s *Rollback_stmtContext) TO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTO_, 0) -} - -func (s *Rollback_stmtContext) Savepoint_name() ISavepoint_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISavepoint_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISavepoint_nameContext) -} - -func (s *Rollback_stmtContext) SAVEPOINT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSAVEPOINT_, 0) -} - -func (s *Rollback_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Rollback_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Rollback_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterRollback_stmt(s) - } -} - -func (s *Rollback_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitRollback_stmt(s) - } -} - -func (p *SQLiteParser) Rollback_stmt() (localctx IRollback_stmtContext) { - localctx = NewRollback_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 16, SQLiteParserRULE_rollback_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(359) - p.Match(SQLiteParserROLLBACK_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(361) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserTRANSACTION_ { - { - p.SetState(360) - p.Match(SQLiteParserTRANSACTION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - p.SetState(368) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserTO_ { - { - p.SetState(363) - p.Match(SQLiteParserTO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(365) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 22, p.GetParserRuleContext()) == 1 { - { - p.SetState(364) - p.Match(SQLiteParserSAVEPOINT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(367) - p.Savepoint_name() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISavepoint_stmtContext is an interface to support dynamic dispatch. -type ISavepoint_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - SAVEPOINT_() antlr.TerminalNode - Savepoint_name() ISavepoint_nameContext - - // IsSavepoint_stmtContext differentiates from other interfaces. - IsSavepoint_stmtContext() -} - -type Savepoint_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySavepoint_stmtContext() *Savepoint_stmtContext { - var p = new(Savepoint_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_savepoint_stmt - return p -} - -func InitEmptySavepoint_stmtContext(p *Savepoint_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_savepoint_stmt -} - -func (*Savepoint_stmtContext) IsSavepoint_stmtContext() {} - -func NewSavepoint_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_stmtContext { - var p = new(Savepoint_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_savepoint_stmt - - return p -} - -func (s *Savepoint_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Savepoint_stmtContext) SAVEPOINT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSAVEPOINT_, 0) -} - -func (s *Savepoint_stmtContext) Savepoint_name() ISavepoint_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISavepoint_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISavepoint_nameContext) -} - -func (s *Savepoint_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Savepoint_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Savepoint_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSavepoint_stmt(s) - } -} - -func (s *Savepoint_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSavepoint_stmt(s) - } -} - -func (p *SQLiteParser) Savepoint_stmt() (localctx ISavepoint_stmtContext) { - localctx = NewSavepoint_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 18, SQLiteParserRULE_savepoint_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(370) - p.Match(SQLiteParserSAVEPOINT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(371) - p.Savepoint_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IRelease_stmtContext is an interface to support dynamic dispatch. -type IRelease_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - RELEASE_() antlr.TerminalNode - Savepoint_name() ISavepoint_nameContext - SAVEPOINT_() antlr.TerminalNode - - // IsRelease_stmtContext differentiates from other interfaces. - IsRelease_stmtContext() -} - -type Release_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyRelease_stmtContext() *Release_stmtContext { - var p = new(Release_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_release_stmt - return p -} - -func InitEmptyRelease_stmtContext(p *Release_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_release_stmt -} - -func (*Release_stmtContext) IsRelease_stmtContext() {} - -func NewRelease_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Release_stmtContext { - var p = new(Release_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_release_stmt - - return p -} - -func (s *Release_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Release_stmtContext) RELEASE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRELEASE_, 0) -} - -func (s *Release_stmtContext) Savepoint_name() ISavepoint_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISavepoint_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISavepoint_nameContext) -} - -func (s *Release_stmtContext) SAVEPOINT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSAVEPOINT_, 0) -} - -func (s *Release_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Release_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Release_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterRelease_stmt(s) - } -} - -func (s *Release_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitRelease_stmt(s) - } -} - -func (p *SQLiteParser) Release_stmt() (localctx IRelease_stmtContext) { - localctx = NewRelease_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 20, SQLiteParserRULE_release_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(373) - p.Match(SQLiteParserRELEASE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(375) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 24, p.GetParserRuleContext()) == 1 { - { - p.SetState(374) - p.Match(SQLiteParserSAVEPOINT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(377) - p.Savepoint_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICreate_index_stmtContext is an interface to support dynamic dispatch. -type ICreate_index_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - CREATE_() antlr.TerminalNode - INDEX_() antlr.TerminalNode - Index_name() IIndex_nameContext - ON_() antlr.TerminalNode - Table_name() ITable_nameContext - OPEN_PAR() antlr.TerminalNode - AllIndexed_column() []IIndexed_columnContext - Indexed_column(i int) IIndexed_columnContext - CLOSE_PAR() antlr.TerminalNode - UNIQUE_() antlr.TerminalNode - IF_() antlr.TerminalNode - NOT_() antlr.TerminalNode - EXISTS_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - WHERE_() antlr.TerminalNode - Expr() IExprContext - - // IsCreate_index_stmtContext differentiates from other interfaces. - IsCreate_index_stmtContext() -} - -type Create_index_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCreate_index_stmtContext() *Create_index_stmtContext { - var p = new(Create_index_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_index_stmt - return p -} - -func InitEmptyCreate_index_stmtContext(p *Create_index_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_index_stmt -} - -func (*Create_index_stmtContext) IsCreate_index_stmtContext() {} - -func NewCreate_index_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_index_stmtContext { - var p = new(Create_index_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_create_index_stmt - - return p -} - -func (s *Create_index_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Create_index_stmtContext) CREATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCREATE_, 0) -} - -func (s *Create_index_stmtContext) INDEX_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINDEX_, 0) -} - -func (s *Create_index_stmtContext) Index_name() IIndex_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIndex_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IIndex_nameContext) -} - -func (s *Create_index_stmtContext) ON_() antlr.TerminalNode { - return s.GetToken(SQLiteParserON_, 0) -} - -func (s *Create_index_stmtContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Create_index_stmtContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Create_index_stmtContext) AllIndexed_column() []IIndexed_columnContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IIndexed_columnContext); ok { - len++ - } - } - - tst := make([]IIndexed_columnContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IIndexed_columnContext); ok { - tst[i] = t.(IIndexed_columnContext) - i++ - } - } - - return tst -} - -func (s *Create_index_stmtContext) Indexed_column(i int) IIndexed_columnContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIndexed_columnContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IIndexed_columnContext) -} - -func (s *Create_index_stmtContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Create_index_stmtContext) UNIQUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNIQUE_, 0) -} - -func (s *Create_index_stmtContext) IF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIF_, 0) -} - -func (s *Create_index_stmtContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Create_index_stmtContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *Create_index_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Create_index_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Create_index_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Create_index_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Create_index_stmtContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *Create_index_stmtContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Create_index_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Create_index_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Create_index_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCreate_index_stmt(s) - } -} - -func (s *Create_index_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCreate_index_stmt(s) - } -} - -func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) { - localctx = NewCreate_index_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 22, SQLiteParserRULE_create_index_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(379) - p.Match(SQLiteParserCREATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(381) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserUNIQUE_ { - { - p.SetState(380) - p.Match(SQLiteParserUNIQUE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(383) - p.Match(SQLiteParserINDEX_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(387) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 { - { - p.SetState(384) - p.Match(SQLiteParserIF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(385) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(386) - p.Match(SQLiteParserEXISTS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(392) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 { - { - p.SetState(389) - p.Schema_name() - } - { - p.SetState(390) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(394) - p.Index_name() - } - { - p.SetState(395) - p.Match(SQLiteParserON_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(396) - p.Table_name() - } - { - p.SetState(397) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(398) - p.Indexed_column() - } - p.SetState(403) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(399) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(400) - p.Indexed_column() - } - - p.SetState(405) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(406) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(409) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(407) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(408) - p.expr(0) - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IIndexed_columnContext is an interface to support dynamic dispatch. -type IIndexed_columnContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Column_name() IColumn_nameContext - Expr() IExprContext - COLLATE_() antlr.TerminalNode - Collation_name() ICollation_nameContext - Asc_desc() IAsc_descContext - - // IsIndexed_columnContext differentiates from other interfaces. - IsIndexed_columnContext() -} - -type Indexed_columnContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyIndexed_columnContext() *Indexed_columnContext { - var p = new(Indexed_columnContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_indexed_column - return p -} - -func InitEmptyIndexed_columnContext(p *Indexed_columnContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_indexed_column -} - -func (*Indexed_columnContext) IsIndexed_columnContext() {} - -func NewIndexed_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Indexed_columnContext { - var p = new(Indexed_columnContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_indexed_column - - return p -} - -func (s *Indexed_columnContext) GetParser() antlr.Parser { return s.parser } - -func (s *Indexed_columnContext) Column_name() IColumn_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Indexed_columnContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Indexed_columnContext) COLLATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOLLATE_, 0) -} - -func (s *Indexed_columnContext) Collation_name() ICollation_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollation_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICollation_nameContext) -} - -func (s *Indexed_columnContext) Asc_desc() IAsc_descContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAsc_descContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAsc_descContext) -} - -func (s *Indexed_columnContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Indexed_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Indexed_columnContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterIndexed_column(s) - } -} - -func (s *Indexed_columnContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitIndexed_column(s) - } -} - -func (p *SQLiteParser) Indexed_column() (localctx IIndexed_columnContext) { - localctx = NewIndexed_columnContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 24, SQLiteParserRULE_indexed_column) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(413) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) { - case 1: - { - p.SetState(411) - p.Column_name() - } - - case 2: - { - p.SetState(412) - p.expr(0) - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - p.SetState(417) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserCOLLATE_ { - { - p.SetState(415) - p.Match(SQLiteParserCOLLATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(416) - p.Collation_name() - } - - } - p.SetState(420) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { - { - p.SetState(419) - p.Asc_desc() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_optionContext is an interface to support dynamic dispatch. -type ITable_optionContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // GetRow_ROW_ID returns the row_ROW_ID token. - GetRow_ROW_ID() antlr.Token - - // SetRow_ROW_ID sets the row_ROW_ID token. - SetRow_ROW_ID(antlr.Token) - - // Getter signatures - WITHOUT_() antlr.TerminalNode - IDENTIFIER() antlr.TerminalNode - STRICT_() antlr.TerminalNode - - // IsTable_optionContext differentiates from other interfaces. - IsTable_optionContext() -} - -type Table_optionContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser - row_ROW_ID antlr.Token -} - -func NewEmptyTable_optionContext() *Table_optionContext { - var p = new(Table_optionContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_option - return p -} - -func InitEmptyTable_optionContext(p *Table_optionContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_option -} - -func (*Table_optionContext) IsTable_optionContext() {} - -func NewTable_optionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_optionContext { - var p = new(Table_optionContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_option - - return p -} - -func (s *Table_optionContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_optionContext) GetRow_ROW_ID() antlr.Token { return s.row_ROW_ID } - -func (s *Table_optionContext) SetRow_ROW_ID(v antlr.Token) { s.row_ROW_ID = v } - -func (s *Table_optionContext) WITHOUT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWITHOUT_, 0) -} - -func (s *Table_optionContext) IDENTIFIER() antlr.TerminalNode { - return s.GetToken(SQLiteParserIDENTIFIER, 0) -} - -func (s *Table_optionContext) STRICT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRICT_, 0) -} - -func (s *Table_optionContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_optionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_optionContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_option(s) - } -} - -func (s *Table_optionContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_option(s) - } -} - -func (p *SQLiteParser) Table_option() (localctx ITable_optionContext) { - localctx = NewTable_optionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 26, SQLiteParserRULE_table_option) - p.SetState(425) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserWITHOUT_: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(422) - p.Match(SQLiteParserWITHOUT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(423) - - var _m = p.Match(SQLiteParserIDENTIFIER) - - localctx.(*Table_optionContext).row_ROW_ID = _m - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserSTRICT_: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(424) - p.Match(SQLiteParserSTRICT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICreate_table_stmtContext is an interface to support dynamic dispatch. -type ICreate_table_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - CREATE_() antlr.TerminalNode - TABLE_() antlr.TerminalNode - Table_name() ITable_nameContext - OPEN_PAR() antlr.TerminalNode - AllColumn_def() []IColumn_defContext - Column_def(i int) IColumn_defContext - CLOSE_PAR() antlr.TerminalNode - AS_() antlr.TerminalNode - Select_stmt() ISelect_stmtContext - IF_() antlr.TerminalNode - NOT_() antlr.TerminalNode - EXISTS_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - TEMP_() antlr.TerminalNode - TEMPORARY_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - AllTable_constraint() []ITable_constraintContext - Table_constraint(i int) ITable_constraintContext - AllTable_option() []ITable_optionContext - Table_option(i int) ITable_optionContext - - // IsCreate_table_stmtContext differentiates from other interfaces. - IsCreate_table_stmtContext() -} - -type Create_table_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCreate_table_stmtContext() *Create_table_stmtContext { - var p = new(Create_table_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_table_stmt - return p -} - -func InitEmptyCreate_table_stmtContext(p *Create_table_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_table_stmt -} - -func (*Create_table_stmtContext) IsCreate_table_stmtContext() {} - -func NewCreate_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_table_stmtContext { - var p = new(Create_table_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_create_table_stmt - - return p -} - -func (s *Create_table_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Create_table_stmtContext) CREATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCREATE_, 0) -} - -func (s *Create_table_stmtContext) TABLE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTABLE_, 0) -} - -func (s *Create_table_stmtContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Create_table_stmtContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Create_table_stmtContext) AllColumn_def() []IColumn_defContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_defContext); ok { - len++ - } - } - - tst := make([]IColumn_defContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_defContext); ok { - tst[i] = t.(IColumn_defContext) - i++ - } - } - - return tst -} - -func (s *Create_table_stmtContext) Column_def(i int) IColumn_defContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_defContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_defContext) -} - -func (s *Create_table_stmtContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Create_table_stmtContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Create_table_stmtContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Create_table_stmtContext) IF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIF_, 0) -} - -func (s *Create_table_stmtContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Create_table_stmtContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *Create_table_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Create_table_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Create_table_stmtContext) TEMP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMP_, 0) -} - -func (s *Create_table_stmtContext) TEMPORARY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMPORARY_, 0) -} - -func (s *Create_table_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Create_table_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Create_table_stmtContext) AllTable_constraint() []ITable_constraintContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ITable_constraintContext); ok { - len++ - } - } - - tst := make([]ITable_constraintContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ITable_constraintContext); ok { - tst[i] = t.(ITable_constraintContext) - i++ - } - } - - return tst -} - -func (s *Create_table_stmtContext) Table_constraint(i int) ITable_constraintContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_constraintContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ITable_constraintContext) -} - -func (s *Create_table_stmtContext) AllTable_option() []ITable_optionContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ITable_optionContext); ok { - len++ - } - } - - tst := make([]ITable_optionContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ITable_optionContext); ok { - tst[i] = t.(ITable_optionContext) - i++ - } - } - - return tst -} - -func (s *Create_table_stmtContext) Table_option(i int) ITable_optionContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_optionContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ITable_optionContext) -} - -func (s *Create_table_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Create_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Create_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCreate_table_stmt(s) - } -} - -func (s *Create_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCreate_table_stmt(s) - } -} - -func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) { - localctx = NewCreate_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 28, SQLiteParserRULE_create_table_stmt) - var _la int - - var _alt int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(427) - p.Match(SQLiteParserCREATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(429) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ { - { - p.SetState(428) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - { - p.SetState(431) - p.Match(SQLiteParserTABLE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(435) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 35, p.GetParserRuleContext()) == 1 { - { - p.SetState(432) - p.Match(SQLiteParserIF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(433) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(434) - p.Match(SQLiteParserEXISTS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(440) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext()) == 1 { - { - p.SetState(437) - p.Schema_name() - } - { - p.SetState(438) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(442) - p.Table_name() - } - p.SetState(472) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserOPEN_PAR: - { - p.SetState(443) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(444) - p.Column_def() - } - p.SetState(449) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 37, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - for _alt != 1 && _alt != antlr.ATNInvalidAltNumber { - if _alt == 1+1 { - { - p.SetState(445) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(446) - p.Column_def() - } - - } - p.SetState(451) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 37, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - } - p.SetState(456) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(452) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(453) - p.Table_constraint() - } - - p.SetState(458) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(459) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(468) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserSTRICT_ || _la == SQLiteParserWITHOUT_ { - { - p.SetState(460) - p.Table_option() - } - p.SetState(465) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(461) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(462) - p.Table_option() - } - - p.SetState(467) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } - - case SQLiteParserAS_: - { - p.SetState(470) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(471) - p.Select_stmt() - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IColumn_defContext is an interface to support dynamic dispatch. -type IColumn_defContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Column_name() IColumn_nameContext - Type_name() IType_nameContext - AllColumn_constraint() []IColumn_constraintContext - Column_constraint(i int) IColumn_constraintContext - - // IsColumn_defContext differentiates from other interfaces. - IsColumn_defContext() -} - -type Column_defContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyColumn_defContext() *Column_defContext { - var p = new(Column_defContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_def - return p -} - -func InitEmptyColumn_defContext(p *Column_defContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_def -} - -func (*Column_defContext) IsColumn_defContext() {} - -func NewColumn_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_defContext { - var p = new(Column_defContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_column_def - - return p -} - -func (s *Column_defContext) GetParser() antlr.Parser { return s.parser } - -func (s *Column_defContext) Column_name() IColumn_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Column_defContext) Type_name() IType_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IType_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IType_nameContext) -} - -func (s *Column_defContext) AllColumn_constraint() []IColumn_constraintContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_constraintContext); ok { - len++ - } - } - - tst := make([]IColumn_constraintContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_constraintContext); ok { - tst[i] = t.(IColumn_constraintContext) - i++ - } - } - - return tst -} - -func (s *Column_defContext) Column_constraint(i int) IColumn_constraintContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_constraintContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_constraintContext) -} - -func (s *Column_defContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Column_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Column_defContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterColumn_def(s) - } -} - -func (s *Column_defContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitColumn_def(s) - } -} - -func (p *SQLiteParser) Column_def() (localctx IColumn_defContext) { - localctx = NewColumn_defContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 30, SQLiteParserRULE_column_def) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(474) - p.Column_name() - } - p.SetState(476) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 42, p.GetParserRuleContext()) == 1 { - { - p.SetState(475) - p.Type_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(481) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&290693316557668352) != 0) || ((int64((_la-104)) & ^0x3f) == 0 && ((int64(1)<<(_la-104))&549755848705) != 0) || _la == SQLiteParserGENERATED_ { - { - p.SetState(478) - p.Column_constraint() - } - - p.SetState(483) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IType_nameContext is an interface to support dynamic dispatch. -type IType_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - AllName() []INameContext - Name(i int) INameContext - OPEN_PAR() antlr.TerminalNode - AllSigned_number() []ISigned_numberContext - Signed_number(i int) ISigned_numberContext - CLOSE_PAR() antlr.TerminalNode - COMMA() antlr.TerminalNode - - // IsType_nameContext differentiates from other interfaces. - IsType_nameContext() -} - -type Type_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyType_nameContext() *Type_nameContext { - var p = new(Type_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_type_name - return p -} - -func InitEmptyType_nameContext(p *Type_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_type_name -} - -func (*Type_nameContext) IsType_nameContext() {} - -func NewType_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_nameContext { - var p = new(Type_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_type_name - - return p -} - -func (s *Type_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Type_nameContext) AllName() []INameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(INameContext); ok { - len++ - } - } - - tst := make([]INameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(INameContext); ok { - tst[i] = t.(INameContext) - i++ - } - } - - return tst -} - -func (s *Type_nameContext) Name(i int) INameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(INameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(INameContext) -} - -func (s *Type_nameContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Type_nameContext) AllSigned_number() []ISigned_numberContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ISigned_numberContext); ok { - len++ - } - } - - tst := make([]ISigned_numberContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ISigned_numberContext); ok { - tst[i] = t.(ISigned_numberContext) - i++ - } - } - - return tst -} - -func (s *Type_nameContext) Signed_number(i int) ISigned_numberContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISigned_numberContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ISigned_numberContext) -} - -func (s *Type_nameContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Type_nameContext) COMMA() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, 0) -} - -func (s *Type_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Type_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Type_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterType_name(s) - } -} - -func (s *Type_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitType_name(s) - } -} - -func (p *SQLiteParser) Type_name() (localctx IType_nameContext) { - localctx = NewType_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 32, SQLiteParserRULE_type_name) - var _alt int - - p.EnterOuterAlt(localctx, 1) - p.SetState(485) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = 1 + 1 - for ok := true; ok; ok = _alt != 1 && _alt != antlr.ATNInvalidAltNumber { - switch _alt { - case 1 + 1: - { - p.SetState(484) - p.Name() - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - - p.SetState(487) - p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 44, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - } - p.SetState(499) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 45, p.GetParserRuleContext()) == 1 { - { - p.SetState(489) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(490) - p.Signed_number() - } - { - p.SetState(491) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 45, p.GetParserRuleContext()) == 2 { - { - p.SetState(493) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(494) - p.Signed_number() - } - { - p.SetState(495) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(496) - p.Signed_number() - } - { - p.SetState(497) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IColumn_constraintContext is an interface to support dynamic dispatch. -type IColumn_constraintContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - CHECK_() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - Expr() IExprContext - CLOSE_PAR() antlr.TerminalNode - DEFAULT_() antlr.TerminalNode - COLLATE_() antlr.TerminalNode - Collation_name() ICollation_nameContext - Foreign_key_clause() IForeign_key_clauseContext - AS_() antlr.TerminalNode - CONSTRAINT_() antlr.TerminalNode - Name() INameContext - PRIMARY_() antlr.TerminalNode - KEY_() antlr.TerminalNode - NOT_() antlr.TerminalNode - NULL_() antlr.TerminalNode - UNIQUE_() antlr.TerminalNode - Signed_number() ISigned_numberContext - Literal_value() ILiteral_valueContext - Conflict_clause() IConflict_clauseContext - GENERATED_() antlr.TerminalNode - ALWAYS_() antlr.TerminalNode - STORED_() antlr.TerminalNode - VIRTUAL_() antlr.TerminalNode - Asc_desc() IAsc_descContext - AUTOINCREMENT_() antlr.TerminalNode - - // IsColumn_constraintContext differentiates from other interfaces. - IsColumn_constraintContext() -} - -type Column_constraintContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyColumn_constraintContext() *Column_constraintContext { - var p = new(Column_constraintContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_constraint - return p -} - -func InitEmptyColumn_constraintContext(p *Column_constraintContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_constraint -} - -func (*Column_constraintContext) IsColumn_constraintContext() {} - -func NewColumn_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_constraintContext { - var p = new(Column_constraintContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_column_constraint - - return p -} - -func (s *Column_constraintContext) GetParser() antlr.Parser { return s.parser } - -func (s *Column_constraintContext) CHECK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCHECK_, 0) -} - -func (s *Column_constraintContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Column_constraintContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Column_constraintContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Column_constraintContext) DEFAULT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFAULT_, 0) -} - -func (s *Column_constraintContext) COLLATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOLLATE_, 0) -} - -func (s *Column_constraintContext) Collation_name() ICollation_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollation_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICollation_nameContext) -} - -func (s *Column_constraintContext) Foreign_key_clause() IForeign_key_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IForeign_key_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IForeign_key_clauseContext) -} - -func (s *Column_constraintContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Column_constraintContext) CONSTRAINT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCONSTRAINT_, 0) -} - -func (s *Column_constraintContext) Name() INameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(INameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(INameContext) -} - -func (s *Column_constraintContext) PRIMARY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRIMARY_, 0) -} - -func (s *Column_constraintContext) KEY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserKEY_, 0) -} - -func (s *Column_constraintContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Column_constraintContext) NULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNULL_, 0) -} - -func (s *Column_constraintContext) UNIQUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNIQUE_, 0) -} - -func (s *Column_constraintContext) Signed_number() ISigned_numberContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISigned_numberContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISigned_numberContext) -} - -func (s *Column_constraintContext) Literal_value() ILiteral_valueContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILiteral_valueContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ILiteral_valueContext) -} - -func (s *Column_constraintContext) Conflict_clause() IConflict_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IConflict_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IConflict_clauseContext) -} - -func (s *Column_constraintContext) GENERATED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGENERATED_, 0) -} - -func (s *Column_constraintContext) ALWAYS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALWAYS_, 0) -} - -func (s *Column_constraintContext) STORED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTORED_, 0) -} - -func (s *Column_constraintContext) VIRTUAL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVIRTUAL_, 0) -} - -func (s *Column_constraintContext) Asc_desc() IAsc_descContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAsc_descContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAsc_descContext) -} - -func (s *Column_constraintContext) AUTOINCREMENT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAUTOINCREMENT_, 0) -} - -func (s *Column_constraintContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Column_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Column_constraintContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterColumn_constraint(s) - } -} - -func (s *Column_constraintContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitColumn_constraint(s) - } -} - -func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { - localctx = NewColumn_constraintContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 34, SQLiteParserRULE_column_constraint) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(503) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserCONSTRAINT_ { - { - p.SetState(501) - p.Match(SQLiteParserCONSTRAINT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(502) - p.Name() - } - - } - p.SetState(552) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserPRIMARY_: - { - p.SetState(505) - p.Match(SQLiteParserPRIMARY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(506) - p.Match(SQLiteParserKEY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(508) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { - { - p.SetState(507) - p.Asc_desc() - } - - } - p.SetState(511) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserON_ { - { - p.SetState(510) - p.Conflict_clause() - } - - } - p.SetState(514) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAUTOINCREMENT_ { - { - p.SetState(513) - p.Match(SQLiteParserAUTOINCREMENT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - - case SQLiteParserNOT_, SQLiteParserUNIQUE_: - p.SetState(519) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserNOT_: - { - p.SetState(516) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(517) - p.Match(SQLiteParserNULL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserUNIQUE_: - { - p.SetState(518) - p.Match(SQLiteParserUNIQUE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - p.SetState(522) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserON_ { - { - p.SetState(521) - p.Conflict_clause() - } - - } - - case SQLiteParserCHECK_: - { - p.SetState(524) - p.Match(SQLiteParserCHECK_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(525) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(526) - p.expr(0) - } - { - p.SetState(527) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserDEFAULT_: - { - p.SetState(529) - p.Match(SQLiteParserDEFAULT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(536) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 52, p.GetParserRuleContext()) { - case 1: - { - p.SetState(530) - p.Signed_number() - } - - case 2: - { - p.SetState(531) - p.Literal_value() - } - - case 3: - { - p.SetState(532) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(533) - p.expr(0) - } - { - p.SetState(534) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - - case SQLiteParserCOLLATE_: - { - p.SetState(538) - p.Match(SQLiteParserCOLLATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(539) - p.Collation_name() - } - - case SQLiteParserREFERENCES_: - { - p.SetState(540) - p.Foreign_key_clause() - } - - case SQLiteParserAS_, SQLiteParserGENERATED_: - p.SetState(543) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserGENERATED_ { - { - p.SetState(541) - p.Match(SQLiteParserGENERATED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(542) - p.Match(SQLiteParserALWAYS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(545) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(546) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(547) - p.expr(0) - } - { - p.SetState(548) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(550) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserVIRTUAL_ || _la == SQLiteParserSTORED_ { - { - p.SetState(549) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserVIRTUAL_ || _la == SQLiteParserSTORED_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISigned_numberContext is an interface to support dynamic dispatch. -type ISigned_numberContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - NUMERIC_LITERAL() antlr.TerminalNode - PLUS() antlr.TerminalNode - MINUS() antlr.TerminalNode - - // IsSigned_numberContext differentiates from other interfaces. - IsSigned_numberContext() -} - -type Signed_numberContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySigned_numberContext() *Signed_numberContext { - var p = new(Signed_numberContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_signed_number - return p -} - -func InitEmptySigned_numberContext(p *Signed_numberContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_signed_number -} - -func (*Signed_numberContext) IsSigned_numberContext() {} - -func NewSigned_numberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Signed_numberContext { - var p = new(Signed_numberContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_signed_number - - return p -} - -func (s *Signed_numberContext) GetParser() antlr.Parser { return s.parser } - -func (s *Signed_numberContext) NUMERIC_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserNUMERIC_LITERAL, 0) -} - -func (s *Signed_numberContext) PLUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserPLUS, 0) -} - -func (s *Signed_numberContext) MINUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserMINUS, 0) -} - -func (s *Signed_numberContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Signed_numberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Signed_numberContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSigned_number(s) - } -} - -func (s *Signed_numberContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSigned_number(s) - } -} - -func (p *SQLiteParser) Signed_number() (localctx ISigned_numberContext) { - localctx = NewSigned_numberContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 36, SQLiteParserRULE_signed_number) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(555) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPLUS || _la == SQLiteParserMINUS { - { - p.SetState(554) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - { - p.SetState(557) - p.Match(SQLiteParserNUMERIC_LITERAL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_constraintContext is an interface to support dynamic dispatch. -type ITable_constraintContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - OPEN_PAR() antlr.TerminalNode - AllIndexed_column() []IIndexed_columnContext - Indexed_column(i int) IIndexed_columnContext - CLOSE_PAR() antlr.TerminalNode - CHECK_() antlr.TerminalNode - Expr() IExprContext - FOREIGN_() antlr.TerminalNode - KEY_() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - Foreign_key_clause() IForeign_key_clauseContext - CONSTRAINT_() antlr.TerminalNode - Name() INameContext - PRIMARY_() antlr.TerminalNode - UNIQUE_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - Conflict_clause() IConflict_clauseContext - - // IsTable_constraintContext differentiates from other interfaces. - IsTable_constraintContext() -} - -type Table_constraintContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTable_constraintContext() *Table_constraintContext { - var p = new(Table_constraintContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_constraint - return p -} - -func InitEmptyTable_constraintContext(p *Table_constraintContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_constraint -} - -func (*Table_constraintContext) IsTable_constraintContext() {} - -func NewTable_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_constraintContext { - var p = new(Table_constraintContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_constraint - - return p -} - -func (s *Table_constraintContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_constraintContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Table_constraintContext) AllIndexed_column() []IIndexed_columnContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IIndexed_columnContext); ok { - len++ - } - } - - tst := make([]IIndexed_columnContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IIndexed_columnContext); ok { - tst[i] = t.(IIndexed_columnContext) - i++ - } - } - - return tst -} - -func (s *Table_constraintContext) Indexed_column(i int) IIndexed_columnContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIndexed_columnContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IIndexed_columnContext) -} - -func (s *Table_constraintContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Table_constraintContext) CHECK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCHECK_, 0) -} - -func (s *Table_constraintContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Table_constraintContext) FOREIGN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFOREIGN_, 0) -} - -func (s *Table_constraintContext) KEY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserKEY_, 0) -} - -func (s *Table_constraintContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Table_constraintContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Table_constraintContext) Foreign_key_clause() IForeign_key_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IForeign_key_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IForeign_key_clauseContext) -} - -func (s *Table_constraintContext) CONSTRAINT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCONSTRAINT_, 0) -} - -func (s *Table_constraintContext) Name() INameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(INameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(INameContext) -} - -func (s *Table_constraintContext) PRIMARY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRIMARY_, 0) -} - -func (s *Table_constraintContext) UNIQUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNIQUE_, 0) -} - -func (s *Table_constraintContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Table_constraintContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Table_constraintContext) Conflict_clause() IConflict_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IConflict_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IConflict_clauseContext) -} - -func (s *Table_constraintContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_constraintContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_constraint(s) - } -} - -func (s *Table_constraintContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_constraint(s) - } -} - -func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { - localctx = NewTable_constraintContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 38, SQLiteParserRULE_table_constraint) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(561) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserCONSTRAINT_ { - { - p.SetState(559) - p.Match(SQLiteParserCONSTRAINT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(560) - p.Name() - } - - } - p.SetState(600) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserPRIMARY_, SQLiteParserUNIQUE_: - p.SetState(566) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserPRIMARY_: - { - p.SetState(563) - p.Match(SQLiteParserPRIMARY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(564) - p.Match(SQLiteParserKEY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserUNIQUE_: - { - p.SetState(565) - p.Match(SQLiteParserUNIQUE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - { - p.SetState(568) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(569) - p.Indexed_column() - } - p.SetState(574) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(570) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(571) - p.Indexed_column() - } - - p.SetState(576) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(577) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(579) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserON_ { - { - p.SetState(578) - p.Conflict_clause() - } - - } - - case SQLiteParserCHECK_: - { - p.SetState(581) - p.Match(SQLiteParserCHECK_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(582) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(583) - p.expr(0) - } - { - p.SetState(584) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserFOREIGN_: - { - p.SetState(586) - p.Match(SQLiteParserFOREIGN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(587) - p.Match(SQLiteParserKEY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(588) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(589) - p.Column_name() - } - p.SetState(594) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(590) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(591) - p.Column_name() - } - - p.SetState(596) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(597) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(598) - p.Foreign_key_clause() - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IForeign_key_clauseContext is an interface to support dynamic dispatch. -type IForeign_key_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - REFERENCES_() antlr.TerminalNode - Foreign_table() IForeign_tableContext - OPEN_PAR() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - CLOSE_PAR() antlr.TerminalNode - AllON_() []antlr.TerminalNode - ON_(i int) antlr.TerminalNode - AllMATCH_() []antlr.TerminalNode - MATCH_(i int) antlr.TerminalNode - AllName() []INameContext - Name(i int) INameContext - DEFERRABLE_() antlr.TerminalNode - AllDELETE_() []antlr.TerminalNode - DELETE_(i int) antlr.TerminalNode - AllUPDATE_() []antlr.TerminalNode - UPDATE_(i int) antlr.TerminalNode - AllSET_() []antlr.TerminalNode - SET_(i int) antlr.TerminalNode - AllCASCADE_() []antlr.TerminalNode - CASCADE_(i int) antlr.TerminalNode - AllRESTRICT_() []antlr.TerminalNode - RESTRICT_(i int) antlr.TerminalNode - AllNO_() []antlr.TerminalNode - NO_(i int) antlr.TerminalNode - AllACTION_() []antlr.TerminalNode - ACTION_(i int) antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - AllNULL_() []antlr.TerminalNode - NULL_(i int) antlr.TerminalNode - AllDEFAULT_() []antlr.TerminalNode - DEFAULT_(i int) antlr.TerminalNode - NOT_() antlr.TerminalNode - INITIALLY_() antlr.TerminalNode - DEFERRED_() antlr.TerminalNode - IMMEDIATE_() antlr.TerminalNode - - // IsForeign_key_clauseContext differentiates from other interfaces. - IsForeign_key_clauseContext() -} - -type Foreign_key_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyForeign_key_clauseContext() *Foreign_key_clauseContext { - var p = new(Foreign_key_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_foreign_key_clause - return p -} - -func InitEmptyForeign_key_clauseContext(p *Foreign_key_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_foreign_key_clause -} - -func (*Foreign_key_clauseContext) IsForeign_key_clauseContext() {} - -func NewForeign_key_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_key_clauseContext { - var p = new(Foreign_key_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_foreign_key_clause - - return p -} - -func (s *Foreign_key_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Foreign_key_clauseContext) REFERENCES_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREFERENCES_, 0) -} - -func (s *Foreign_key_clauseContext) Foreign_table() IForeign_tableContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IForeign_tableContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IForeign_tableContext) -} - -func (s *Foreign_key_clauseContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Foreign_key_clauseContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Foreign_key_clauseContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Foreign_key_clauseContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Foreign_key_clauseContext) AllON_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserON_) -} - -func (s *Foreign_key_clauseContext) ON_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserON_, i) -} - -func (s *Foreign_key_clauseContext) AllMATCH_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserMATCH_) -} - -func (s *Foreign_key_clauseContext) MATCH_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserMATCH_, i) -} - -func (s *Foreign_key_clauseContext) AllName() []INameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(INameContext); ok { - len++ - } - } - - tst := make([]INameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(INameContext); ok { - tst[i] = t.(INameContext) - i++ - } - } - - return tst -} - -func (s *Foreign_key_clauseContext) Name(i int) INameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(INameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(INameContext) -} - -func (s *Foreign_key_clauseContext) DEFERRABLE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFERRABLE_, 0) -} - -func (s *Foreign_key_clauseContext) AllDELETE_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserDELETE_) -} - -func (s *Foreign_key_clauseContext) DELETE_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserDELETE_, i) -} - -func (s *Foreign_key_clauseContext) AllUPDATE_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserUPDATE_) -} - -func (s *Foreign_key_clauseContext) UPDATE_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserUPDATE_, i) -} - -func (s *Foreign_key_clauseContext) AllSET_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserSET_) -} - -func (s *Foreign_key_clauseContext) SET_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserSET_, i) -} - -func (s *Foreign_key_clauseContext) AllCASCADE_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCASCADE_) -} - -func (s *Foreign_key_clauseContext) CASCADE_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCASCADE_, i) -} - -func (s *Foreign_key_clauseContext) AllRESTRICT_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserRESTRICT_) -} - -func (s *Foreign_key_clauseContext) RESTRICT_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserRESTRICT_, i) -} - -func (s *Foreign_key_clauseContext) AllNO_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserNO_) -} - -func (s *Foreign_key_clauseContext) NO_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserNO_, i) -} - -func (s *Foreign_key_clauseContext) AllACTION_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserACTION_) -} - -func (s *Foreign_key_clauseContext) ACTION_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserACTION_, i) -} - -func (s *Foreign_key_clauseContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Foreign_key_clauseContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Foreign_key_clauseContext) AllNULL_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserNULL_) -} - -func (s *Foreign_key_clauseContext) NULL_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserNULL_, i) -} - -func (s *Foreign_key_clauseContext) AllDEFAULT_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserDEFAULT_) -} - -func (s *Foreign_key_clauseContext) DEFAULT_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFAULT_, i) -} - -func (s *Foreign_key_clauseContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Foreign_key_clauseContext) INITIALLY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINITIALLY_, 0) -} - -func (s *Foreign_key_clauseContext) DEFERRED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFERRED_, 0) -} - -func (s *Foreign_key_clauseContext) IMMEDIATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIMMEDIATE_, 0) -} - -func (s *Foreign_key_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Foreign_key_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Foreign_key_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterForeign_key_clause(s) - } -} - -func (s *Foreign_key_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitForeign_key_clause(s) - } -} - -func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext) { - localctx = NewForeign_key_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 40, SQLiteParserRULE_foreign_key_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(602) - p.Match(SQLiteParserREFERENCES_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(603) - p.Foreign_table() - } - p.SetState(615) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOPEN_PAR { - { - p.SetState(604) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(605) - p.Column_name() - } - p.SetState(610) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(606) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(607) - p.Column_name() - } - - p.SetState(612) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(613) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - p.SetState(631) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserMATCH_ || _la == SQLiteParserON_ { - p.SetState(629) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserON_: - { - p.SetState(617) - p.Match(SQLiteParserON_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(618) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserDELETE_ || _la == SQLiteParserUPDATE_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - p.SetState(625) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserSET_: - { - p.SetState(619) - p.Match(SQLiteParserSET_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(620) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserDEFAULT_ || _la == SQLiteParserNULL_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - case SQLiteParserCASCADE_: - { - p.SetState(621) - p.Match(SQLiteParserCASCADE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserRESTRICT_: - { - p.SetState(622) - p.Match(SQLiteParserRESTRICT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserNO_: - { - p.SetState(623) - p.Match(SQLiteParserNO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(624) - p.Match(SQLiteParserACTION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - - case SQLiteParserMATCH_: - { - p.SetState(627) - p.Match(SQLiteParserMATCH_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(628) - p.Name() - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - - p.SetState(633) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(642) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 70, p.GetParserRuleContext()) == 1 { - p.SetState(635) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNOT_ { - { - p.SetState(634) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(637) - p.Match(SQLiteParserDEFERRABLE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(640) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserINITIALLY_ { - { - p.SetState(638) - p.Match(SQLiteParserINITIALLY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(639) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserDEFERRED_ || _la == SQLiteParserIMMEDIATE_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - - } else if p.HasError() { // JIM - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IConflict_clauseContext is an interface to support dynamic dispatch. -type IConflict_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ON_() antlr.TerminalNode - CONFLICT_() antlr.TerminalNode - ROLLBACK_() antlr.TerminalNode - ABORT_() antlr.TerminalNode - FAIL_() antlr.TerminalNode - IGNORE_() antlr.TerminalNode - REPLACE_() antlr.TerminalNode - - // IsConflict_clauseContext differentiates from other interfaces. - IsConflict_clauseContext() -} - -type Conflict_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyConflict_clauseContext() *Conflict_clauseContext { - var p = new(Conflict_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_conflict_clause - return p -} - -func InitEmptyConflict_clauseContext(p *Conflict_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_conflict_clause -} - -func (*Conflict_clauseContext) IsConflict_clauseContext() {} - -func NewConflict_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Conflict_clauseContext { - var p = new(Conflict_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_conflict_clause - - return p -} - -func (s *Conflict_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Conflict_clauseContext) ON_() antlr.TerminalNode { - return s.GetToken(SQLiteParserON_, 0) -} - -func (s *Conflict_clauseContext) CONFLICT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCONFLICT_, 0) -} - -func (s *Conflict_clauseContext) ROLLBACK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROLLBACK_, 0) -} - -func (s *Conflict_clauseContext) ABORT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserABORT_, 0) -} - -func (s *Conflict_clauseContext) FAIL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFAIL_, 0) -} - -func (s *Conflict_clauseContext) IGNORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIGNORE_, 0) -} - -func (s *Conflict_clauseContext) REPLACE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREPLACE_, 0) -} - -func (s *Conflict_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Conflict_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Conflict_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterConflict_clause(s) - } -} - -func (s *Conflict_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitConflict_clause(s) - } -} - -func (p *SQLiteParser) Conflict_clause() (localctx IConflict_clauseContext) { - localctx = NewConflict_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 42, SQLiteParserRULE_conflict_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(644) - p.Match(SQLiteParserON_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(645) - p.Match(SQLiteParserCONFLICT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(646) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICreate_trigger_stmtContext is an interface to support dynamic dispatch. -type ICreate_trigger_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - CREATE_() antlr.TerminalNode - TRIGGER_() antlr.TerminalNode - Trigger_name() ITrigger_nameContext - ON_() antlr.TerminalNode - Table_name() ITable_nameContext - BEGIN_() antlr.TerminalNode - END_() antlr.TerminalNode - DELETE_() antlr.TerminalNode - INSERT_() antlr.TerminalNode - UPDATE_() antlr.TerminalNode - IF_() antlr.TerminalNode - NOT_() antlr.TerminalNode - EXISTS_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - BEFORE_() antlr.TerminalNode - AFTER_() antlr.TerminalNode - INSTEAD_() antlr.TerminalNode - AllOF_() []antlr.TerminalNode - OF_(i int) antlr.TerminalNode - FOR_() antlr.TerminalNode - EACH_() antlr.TerminalNode - ROW_() antlr.TerminalNode - WHEN_() antlr.TerminalNode - Expr() IExprContext - AllSCOL() []antlr.TerminalNode - SCOL(i int) antlr.TerminalNode - TEMP_() antlr.TerminalNode - TEMPORARY_() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - AllUpdate_stmt() []IUpdate_stmtContext - Update_stmt(i int) IUpdate_stmtContext - AllInsert_stmt() []IInsert_stmtContext - Insert_stmt(i int) IInsert_stmtContext - AllDelete_stmt() []IDelete_stmtContext - Delete_stmt(i int) IDelete_stmtContext - AllSelect_stmt() []ISelect_stmtContext - Select_stmt(i int) ISelect_stmtContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsCreate_trigger_stmtContext differentiates from other interfaces. - IsCreate_trigger_stmtContext() -} - -type Create_trigger_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCreate_trigger_stmtContext() *Create_trigger_stmtContext { - var p = new(Create_trigger_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_trigger_stmt - return p -} - -func InitEmptyCreate_trigger_stmtContext(p *Create_trigger_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_trigger_stmt -} - -func (*Create_trigger_stmtContext) IsCreate_trigger_stmtContext() {} - -func NewCreate_trigger_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_trigger_stmtContext { - var p = new(Create_trigger_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_create_trigger_stmt - - return p -} - -func (s *Create_trigger_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Create_trigger_stmtContext) CREATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCREATE_, 0) -} - -func (s *Create_trigger_stmtContext) TRIGGER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRIGGER_, 0) -} - -func (s *Create_trigger_stmtContext) Trigger_name() ITrigger_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITrigger_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITrigger_nameContext) -} - -func (s *Create_trigger_stmtContext) ON_() antlr.TerminalNode { - return s.GetToken(SQLiteParserON_, 0) -} - -func (s *Create_trigger_stmtContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Create_trigger_stmtContext) BEGIN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBEGIN_, 0) -} - -func (s *Create_trigger_stmtContext) END_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEND_, 0) -} - -func (s *Create_trigger_stmtContext) DELETE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDELETE_, 0) -} - -func (s *Create_trigger_stmtContext) INSERT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINSERT_, 0) -} - -func (s *Create_trigger_stmtContext) UPDATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUPDATE_, 0) -} - -func (s *Create_trigger_stmtContext) IF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIF_, 0) -} - -func (s *Create_trigger_stmtContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Create_trigger_stmtContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *Create_trigger_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Create_trigger_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Create_trigger_stmtContext) BEFORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBEFORE_, 0) -} - -func (s *Create_trigger_stmtContext) AFTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAFTER_, 0) -} - -func (s *Create_trigger_stmtContext) INSTEAD_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINSTEAD_, 0) -} - -func (s *Create_trigger_stmtContext) AllOF_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserOF_) -} - -func (s *Create_trigger_stmtContext) OF_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserOF_, i) -} - -func (s *Create_trigger_stmtContext) FOR_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFOR_, 0) -} - -func (s *Create_trigger_stmtContext) EACH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEACH_, 0) -} - -func (s *Create_trigger_stmtContext) ROW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_, 0) -} - -func (s *Create_trigger_stmtContext) WHEN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHEN_, 0) -} - -func (s *Create_trigger_stmtContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Create_trigger_stmtContext) AllSCOL() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserSCOL) -} - -func (s *Create_trigger_stmtContext) SCOL(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserSCOL, i) -} - -func (s *Create_trigger_stmtContext) TEMP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMP_, 0) -} - -func (s *Create_trigger_stmtContext) TEMPORARY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMPORARY_, 0) -} - -func (s *Create_trigger_stmtContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Create_trigger_stmtContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Create_trigger_stmtContext) AllUpdate_stmt() []IUpdate_stmtContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IUpdate_stmtContext); ok { - len++ - } - } - - tst := make([]IUpdate_stmtContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IUpdate_stmtContext); ok { - tst[i] = t.(IUpdate_stmtContext) - i++ - } - } - - return tst -} - -func (s *Create_trigger_stmtContext) Update_stmt(i int) IUpdate_stmtContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IUpdate_stmtContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IUpdate_stmtContext) -} - -func (s *Create_trigger_stmtContext) AllInsert_stmt() []IInsert_stmtContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IInsert_stmtContext); ok { - len++ - } - } - - tst := make([]IInsert_stmtContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IInsert_stmtContext); ok { - tst[i] = t.(IInsert_stmtContext) - i++ - } - } - - return tst -} - -func (s *Create_trigger_stmtContext) Insert_stmt(i int) IInsert_stmtContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IInsert_stmtContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IInsert_stmtContext) -} - -func (s *Create_trigger_stmtContext) AllDelete_stmt() []IDelete_stmtContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IDelete_stmtContext); ok { - len++ - } - } - - tst := make([]IDelete_stmtContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IDelete_stmtContext); ok { - tst[i] = t.(IDelete_stmtContext) - i++ - } - } - - return tst -} - -func (s *Create_trigger_stmtContext) Delete_stmt(i int) IDelete_stmtContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IDelete_stmtContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IDelete_stmtContext) -} - -func (s *Create_trigger_stmtContext) AllSelect_stmt() []ISelect_stmtContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ISelect_stmtContext); ok { - len++ - } - } - - tst := make([]ISelect_stmtContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ISelect_stmtContext); ok { - tst[i] = t.(ISelect_stmtContext) - i++ - } - } - - return tst -} - -func (s *Create_trigger_stmtContext) Select_stmt(i int) ISelect_stmtContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Create_trigger_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Create_trigger_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Create_trigger_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Create_trigger_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Create_trigger_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCreate_trigger_stmt(s) - } -} - -func (s *Create_trigger_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCreate_trigger_stmt(s) - } -} - -func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtContext) { - localctx = NewCreate_trigger_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 44, SQLiteParserRULE_create_trigger_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(648) - p.Match(SQLiteParserCREATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(650) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ { - { - p.SetState(649) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - { - p.SetState(652) - p.Match(SQLiteParserTRIGGER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(656) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 72, p.GetParserRuleContext()) == 1 { - { - p.SetState(653) - p.Match(SQLiteParserIF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(654) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(655) - p.Match(SQLiteParserEXISTS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(661) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 73, p.GetParserRuleContext()) == 1 { - { - p.SetState(658) - p.Schema_name() - } - { - p.SetState(659) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(663) - p.Trigger_name() - } - p.SetState(668) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserBEFORE_: - { - p.SetState(664) - p.Match(SQLiteParserBEFORE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserAFTER_: - { - p.SetState(665) - p.Match(SQLiteParserAFTER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserINSTEAD_: - { - p.SetState(666) - p.Match(SQLiteParserINSTEAD_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(667) - p.Match(SQLiteParserOF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserDELETE_, SQLiteParserINSERT_, SQLiteParserUPDATE_: - - default: - } - p.SetState(684) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserDELETE_: - { - p.SetState(670) - p.Match(SQLiteParserDELETE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserINSERT_: - { - p.SetState(671) - p.Match(SQLiteParserINSERT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserUPDATE_: - { - p.SetState(672) - p.Match(SQLiteParserUPDATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(682) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOF_ { - { - p.SetState(673) - p.Match(SQLiteParserOF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(674) - p.Column_name() - } - p.SetState(679) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(675) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(676) - p.Column_name() - } - - p.SetState(681) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - { - p.SetState(686) - p.Match(SQLiteParserON_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(687) - p.Table_name() - } - p.SetState(691) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserFOR_ { - { - p.SetState(688) - p.Match(SQLiteParserFOR_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(689) - p.Match(SQLiteParserEACH_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(690) - p.Match(SQLiteParserROW_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - p.SetState(695) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHEN_ { - { - p.SetState(693) - p.Match(SQLiteParserWHEN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(694) - p.expr(0) - } - - } - { - p.SetState(697) - p.Match(SQLiteParserBEGIN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(706) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for ok := true; ok; ok = _la == SQLiteParserDELETE_ || ((int64((_la-90)) & ^0x3f) == 0 && ((int64(1)<<(_la-90))&4773820020239106049) != 0) { - p.SetState(702) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 80, p.GetParserRuleContext()) { - case 1: - { - p.SetState(698) - p.Update_stmt() - } - - case 2: - { - p.SetState(699) - p.Insert_stmt() - } - - case 3: - { - p.SetState(700) - p.Delete_stmt() - } - - case 4: - { - p.SetState(701) - p.Select_stmt() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(704) - p.Match(SQLiteParserSCOL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(708) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(710) - p.Match(SQLiteParserEND_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICreate_view_stmtContext is an interface to support dynamic dispatch. -type ICreate_view_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - CREATE_() antlr.TerminalNode - VIEW_() antlr.TerminalNode - View_name() IView_nameContext - AS_() antlr.TerminalNode - Select_stmt() ISelect_stmtContext - IF_() antlr.TerminalNode - NOT_() antlr.TerminalNode - EXISTS_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - CLOSE_PAR() antlr.TerminalNode - TEMP_() antlr.TerminalNode - TEMPORARY_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsCreate_view_stmtContext differentiates from other interfaces. - IsCreate_view_stmtContext() -} - -type Create_view_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCreate_view_stmtContext() *Create_view_stmtContext { - var p = new(Create_view_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_view_stmt - return p -} - -func InitEmptyCreate_view_stmtContext(p *Create_view_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_view_stmt -} - -func (*Create_view_stmtContext) IsCreate_view_stmtContext() {} - -func NewCreate_view_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_view_stmtContext { - var p = new(Create_view_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_create_view_stmt - - return p -} - -func (s *Create_view_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Create_view_stmtContext) CREATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCREATE_, 0) -} - -func (s *Create_view_stmtContext) VIEW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVIEW_, 0) -} - -func (s *Create_view_stmtContext) View_name() IView_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IView_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IView_nameContext) -} - -func (s *Create_view_stmtContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Create_view_stmtContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Create_view_stmtContext) IF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIF_, 0) -} - -func (s *Create_view_stmtContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Create_view_stmtContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *Create_view_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Create_view_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Create_view_stmtContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Create_view_stmtContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Create_view_stmtContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Create_view_stmtContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Create_view_stmtContext) TEMP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMP_, 0) -} - -func (s *Create_view_stmtContext) TEMPORARY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMPORARY_, 0) -} - -func (s *Create_view_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Create_view_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Create_view_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Create_view_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Create_view_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCreate_view_stmt(s) - } -} - -func (s *Create_view_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCreate_view_stmt(s) - } -} - -func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { - localctx = NewCreate_view_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 46, SQLiteParserRULE_create_view_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(712) - p.Match(SQLiteParserCREATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(714) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ { - { - p.SetState(713) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - { - p.SetState(716) - p.Match(SQLiteParserVIEW_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(720) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 83, p.GetParserRuleContext()) == 1 { - { - p.SetState(717) - p.Match(SQLiteParserIF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(718) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(719) - p.Match(SQLiteParserEXISTS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(725) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 84, p.GetParserRuleContext()) == 1 { - { - p.SetState(722) - p.Schema_name() - } - { - p.SetState(723) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(727) - p.View_name() - } - p.SetState(739) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOPEN_PAR { - { - p.SetState(728) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(729) - p.Column_name() - } - p.SetState(734) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(730) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(731) - p.Column_name() - } - - p.SetState(736) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(737) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(741) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(742) - p.Select_stmt() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICreate_virtual_table_stmtContext is an interface to support dynamic dispatch. -type ICreate_virtual_table_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - CREATE_() antlr.TerminalNode - VIRTUAL_() antlr.TerminalNode - TABLE_() antlr.TerminalNode - Table_name() ITable_nameContext - USING_() antlr.TerminalNode - Module_name() IModule_nameContext - IF_() antlr.TerminalNode - NOT_() antlr.TerminalNode - EXISTS_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - AllModule_argument() []IModule_argumentContext - Module_argument(i int) IModule_argumentContext - CLOSE_PAR() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsCreate_virtual_table_stmtContext differentiates from other interfaces. - IsCreate_virtual_table_stmtContext() -} - -type Create_virtual_table_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCreate_virtual_table_stmtContext() *Create_virtual_table_stmtContext { - var p = new(Create_virtual_table_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt - return p -} - -func InitEmptyCreate_virtual_table_stmtContext(p *Create_virtual_table_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt -} - -func (*Create_virtual_table_stmtContext) IsCreate_virtual_table_stmtContext() {} - -func NewCreate_virtual_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_virtual_table_stmtContext { - var p = new(Create_virtual_table_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt - - return p -} - -func (s *Create_virtual_table_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Create_virtual_table_stmtContext) CREATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCREATE_, 0) -} - -func (s *Create_virtual_table_stmtContext) VIRTUAL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVIRTUAL_, 0) -} - -func (s *Create_virtual_table_stmtContext) TABLE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTABLE_, 0) -} - -func (s *Create_virtual_table_stmtContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Create_virtual_table_stmtContext) USING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUSING_, 0) -} - -func (s *Create_virtual_table_stmtContext) Module_name() IModule_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IModule_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IModule_nameContext) -} - -func (s *Create_virtual_table_stmtContext) IF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIF_, 0) -} - -func (s *Create_virtual_table_stmtContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Create_virtual_table_stmtContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *Create_virtual_table_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Create_virtual_table_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Create_virtual_table_stmtContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Create_virtual_table_stmtContext) AllModule_argument() []IModule_argumentContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IModule_argumentContext); ok { - len++ - } - } - - tst := make([]IModule_argumentContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IModule_argumentContext); ok { - tst[i] = t.(IModule_argumentContext) - i++ - } - } - - return tst -} - -func (s *Create_virtual_table_stmtContext) Module_argument(i int) IModule_argumentContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IModule_argumentContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IModule_argumentContext) -} - -func (s *Create_virtual_table_stmtContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Create_virtual_table_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Create_virtual_table_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Create_virtual_table_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Create_virtual_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Create_virtual_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCreate_virtual_table_stmt(s) - } -} - -func (s *Create_virtual_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCreate_virtual_table_stmt(s) - } -} - -func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_table_stmtContext) { - localctx = NewCreate_virtual_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 48, SQLiteParserRULE_create_virtual_table_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(744) - p.Match(SQLiteParserCREATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(745) - p.Match(SQLiteParserVIRTUAL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(746) - p.Match(SQLiteParserTABLE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(750) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 87, p.GetParserRuleContext()) == 1 { - { - p.SetState(747) - p.Match(SQLiteParserIF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(748) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(749) - p.Match(SQLiteParserEXISTS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(755) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 88, p.GetParserRuleContext()) == 1 { - { - p.SetState(752) - p.Schema_name() - } - { - p.SetState(753) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(757) - p.Table_name() - } - { - p.SetState(758) - p.Match(SQLiteParserUSING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(759) - p.Module_name() - } - p.SetState(771) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOPEN_PAR { - { - p.SetState(760) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(761) - p.Module_argument() - } - p.SetState(766) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(762) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(763) - p.Module_argument() - } - - p.SetState(768) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(769) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IWith_clauseContext is an interface to support dynamic dispatch. -type IWith_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - WITH_() antlr.TerminalNode - AllCte_table_name() []ICte_table_nameContext - Cte_table_name(i int) ICte_table_nameContext - AllAS_() []antlr.TerminalNode - AS_(i int) antlr.TerminalNode - AllOPEN_PAR() []antlr.TerminalNode - OPEN_PAR(i int) antlr.TerminalNode - AllSelect_stmt() []ISelect_stmtContext - Select_stmt(i int) ISelect_stmtContext - AllCLOSE_PAR() []antlr.TerminalNode - CLOSE_PAR(i int) antlr.TerminalNode - RECURSIVE_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsWith_clauseContext differentiates from other interfaces. - IsWith_clauseContext() -} - -type With_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyWith_clauseContext() *With_clauseContext { - var p = new(With_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_with_clause - return p -} - -func InitEmptyWith_clauseContext(p *With_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_with_clause -} - -func (*With_clauseContext) IsWith_clauseContext() {} - -func NewWith_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *With_clauseContext { - var p = new(With_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_with_clause - - return p -} - -func (s *With_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *With_clauseContext) WITH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWITH_, 0) -} - -func (s *With_clauseContext) AllCte_table_name() []ICte_table_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ICte_table_nameContext); ok { - len++ - } - } - - tst := make([]ICte_table_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ICte_table_nameContext); ok { - tst[i] = t.(ICte_table_nameContext) - i++ - } - } - - return tst -} - -func (s *With_clauseContext) Cte_table_name(i int) ICte_table_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICte_table_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ICte_table_nameContext) -} - -func (s *With_clauseContext) AllAS_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserAS_) -} - -func (s *With_clauseContext) AS_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, i) -} - -func (s *With_clauseContext) AllOPEN_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserOPEN_PAR) -} - -func (s *With_clauseContext) OPEN_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, i) -} - -func (s *With_clauseContext) AllSelect_stmt() []ISelect_stmtContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ISelect_stmtContext); ok { - len++ - } - } - - tst := make([]ISelect_stmtContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ISelect_stmtContext); ok { - tst[i] = t.(ISelect_stmtContext) - i++ - } - } - - return tst -} - -func (s *With_clauseContext) Select_stmt(i int) ISelect_stmtContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *With_clauseContext) AllCLOSE_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCLOSE_PAR) -} - -func (s *With_clauseContext) CLOSE_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, i) -} - -func (s *With_clauseContext) RECURSIVE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRECURSIVE_, 0) -} - -func (s *With_clauseContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *With_clauseContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *With_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *With_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *With_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterWith_clause(s) - } -} - -func (s *With_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitWith_clause(s) - } -} - -func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) { - localctx = NewWith_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 50, SQLiteParserRULE_with_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(773) - p.Match(SQLiteParserWITH_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(775) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 91, p.GetParserRuleContext()) == 1 { - { - p.SetState(774) - p.Match(SQLiteParserRECURSIVE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(777) - p.Cte_table_name() - } - { - p.SetState(778) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(779) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(780) - p.Select_stmt() - } - { - p.SetState(781) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(791) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(782) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(783) - p.Cte_table_name() - } - { - p.SetState(784) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(785) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(786) - p.Select_stmt() - } - { - p.SetState(787) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(793) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICte_table_nameContext is an interface to support dynamic dispatch. -type ICte_table_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Table_name() ITable_nameContext - OPEN_PAR() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - CLOSE_PAR() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsCte_table_nameContext differentiates from other interfaces. - IsCte_table_nameContext() -} - -type Cte_table_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCte_table_nameContext() *Cte_table_nameContext { - var p = new(Cte_table_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_cte_table_name - return p -} - -func InitEmptyCte_table_nameContext(p *Cte_table_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_cte_table_name -} - -func (*Cte_table_nameContext) IsCte_table_nameContext() {} - -func NewCte_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Cte_table_nameContext { - var p = new(Cte_table_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_cte_table_name - - return p -} - -func (s *Cte_table_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Cte_table_nameContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Cte_table_nameContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Cte_table_nameContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Cte_table_nameContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Cte_table_nameContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Cte_table_nameContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Cte_table_nameContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Cte_table_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Cte_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Cte_table_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCte_table_name(s) - } -} - -func (s *Cte_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCte_table_name(s) - } -} - -func (p *SQLiteParser) Cte_table_name() (localctx ICte_table_nameContext) { - localctx = NewCte_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 52, SQLiteParserRULE_cte_table_name) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(794) - p.Table_name() - } - p.SetState(806) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOPEN_PAR { - { - p.SetState(795) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(796) - p.Column_name() - } - p.SetState(801) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(797) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(798) - p.Column_name() - } - - p.SetState(803) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(804) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IRecursive_cteContext is an interface to support dynamic dispatch. -type IRecursive_cteContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Cte_table_name() ICte_table_nameContext - AS_() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - Initial_select() IInitial_selectContext - UNION_() antlr.TerminalNode - Recursive__select() IRecursive__selectContext - CLOSE_PAR() antlr.TerminalNode - ALL_() antlr.TerminalNode - - // IsRecursive_cteContext differentiates from other interfaces. - IsRecursive_cteContext() -} - -type Recursive_cteContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyRecursive_cteContext() *Recursive_cteContext { - var p = new(Recursive_cteContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_recursive_cte - return p -} - -func InitEmptyRecursive_cteContext(p *Recursive_cteContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_recursive_cte -} - -func (*Recursive_cteContext) IsRecursive_cteContext() {} - -func NewRecursive_cteContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive_cteContext { - var p = new(Recursive_cteContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_recursive_cte - - return p -} - -func (s *Recursive_cteContext) GetParser() antlr.Parser { return s.parser } - -func (s *Recursive_cteContext) Cte_table_name() ICte_table_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICte_table_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICte_table_nameContext) -} - -func (s *Recursive_cteContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Recursive_cteContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Recursive_cteContext) Initial_select() IInitial_selectContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IInitial_selectContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IInitial_selectContext) -} - -func (s *Recursive_cteContext) UNION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNION_, 0) -} - -func (s *Recursive_cteContext) Recursive__select() IRecursive__selectContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IRecursive__selectContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IRecursive__selectContext) -} - -func (s *Recursive_cteContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Recursive_cteContext) ALL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALL_, 0) -} - -func (s *Recursive_cteContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Recursive_cteContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Recursive_cteContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterRecursive_cte(s) - } -} - -func (s *Recursive_cteContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitRecursive_cte(s) - } -} - -func (p *SQLiteParser) Recursive_cte() (localctx IRecursive_cteContext) { - localctx = NewRecursive_cteContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 54, SQLiteParserRULE_recursive_cte) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(808) - p.Cte_table_name() - } - { - p.SetState(809) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(810) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(811) - p.Initial_select() - } - { - p.SetState(812) - p.Match(SQLiteParserUNION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(814) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserALL_ { - { - p.SetState(813) - p.Match(SQLiteParserALL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(816) - p.Recursive__select() - } - { - p.SetState(817) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICommon_table_expressionContext is an interface to support dynamic dispatch. -type ICommon_table_expressionContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Table_name() ITable_nameContext - AS_() antlr.TerminalNode - AllOPEN_PAR() []antlr.TerminalNode - OPEN_PAR(i int) antlr.TerminalNode - Select_stmt() ISelect_stmtContext - AllCLOSE_PAR() []antlr.TerminalNode - CLOSE_PAR(i int) antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsCommon_table_expressionContext differentiates from other interfaces. - IsCommon_table_expressionContext() -} - -type Common_table_expressionContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCommon_table_expressionContext() *Common_table_expressionContext { - var p = new(Common_table_expressionContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_common_table_expression - return p -} - -func InitEmptyCommon_table_expressionContext(p *Common_table_expressionContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_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 = SQLiteParserRULE_common_table_expression - - return p -} - -func (s *Common_table_expressionContext) GetParser() antlr.Parser { return s.parser } - -func (s *Common_table_expressionContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Common_table_expressionContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Common_table_expressionContext) AllOPEN_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserOPEN_PAR) -} - -func (s *Common_table_expressionContext) OPEN_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, i) -} - -func (s *Common_table_expressionContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Common_table_expressionContext) AllCLOSE_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCLOSE_PAR) -} - -func (s *Common_table_expressionContext) CLOSE_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, i) -} - -func (s *Common_table_expressionContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Common_table_expressionContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Common_table_expressionContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Common_table_expressionContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Common_table_expressionContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Common_table_expressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Common_table_expressionContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCommon_table_expression(s) - } -} - -func (s *Common_table_expressionContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCommon_table_expression(s) - } -} - -func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_expressionContext) { - localctx = NewCommon_table_expressionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 56, SQLiteParserRULE_common_table_expression) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(819) - p.Table_name() - } - p.SetState(831) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOPEN_PAR { - { - p.SetState(820) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(821) - p.Column_name() - } - p.SetState(826) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(822) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(823) - p.Column_name() - } - - p.SetState(828) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(829) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(833) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(834) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(835) - p.Select_stmt() - } - { - p.SetState(836) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IReturning_clauseContext is an interface to support dynamic dispatch. -type IReturning_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - RETURNING_() antlr.TerminalNode - AllSTAR() []antlr.TerminalNode - STAR(i int) antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - AllColumn_alias() []IColumn_aliasContext - Column_alias(i int) IColumn_aliasContext - AllAS_() []antlr.TerminalNode - AS_(i int) antlr.TerminalNode - - // IsReturning_clauseContext differentiates from other interfaces. - IsReturning_clauseContext() -} - -type Returning_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyReturning_clauseContext() *Returning_clauseContext { - var p = new(Returning_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_returning_clause - return p -} - -func InitEmptyReturning_clauseContext(p *Returning_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_returning_clause -} - -func (*Returning_clauseContext) IsReturning_clauseContext() {} - -func NewReturning_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Returning_clauseContext { - var p = new(Returning_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_returning_clause - - return p -} - -func (s *Returning_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Returning_clauseContext) RETURNING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRETURNING_, 0) -} - -func (s *Returning_clauseContext) AllSTAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserSTAR) -} - -func (s *Returning_clauseContext) STAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, i) -} - -func (s *Returning_clauseContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Returning_clauseContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Returning_clauseContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Returning_clauseContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Returning_clauseContext) AllColumn_alias() []IColumn_aliasContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_aliasContext); ok { - len++ - } - } - - tst := make([]IColumn_aliasContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_aliasContext); ok { - tst[i] = t.(IColumn_aliasContext) - i++ - } - } - - return tst -} - -func (s *Returning_clauseContext) Column_alias(i int) IColumn_aliasContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_aliasContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_aliasContext) -} - -func (s *Returning_clauseContext) AllAS_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserAS_) -} - -func (s *Returning_clauseContext) AS_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, i) -} - -func (s *Returning_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Returning_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Returning_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterReturning_clause(s) - } -} - -func (s *Returning_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitReturning_clause(s) - } -} - -func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) { - localctx = NewReturning_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 58, SQLiteParserRULE_returning_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(838) - p.Match(SQLiteParserRETURNING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(847) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserSTAR: - { - p.SetState(839) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: - { - p.SetState(840) - p.expr(0) - } - p.SetState(845) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(842) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(841) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(844) - p.Column_alias() - } - - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - p.SetState(862) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(849) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(858) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserSTAR: - { - p.SetState(850) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: - { - p.SetState(851) - p.expr(0) - } - p.SetState(856) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(853) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(852) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(855) - p.Column_alias() - } - - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - - p.SetState(864) - 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 -} - -// IDelete_stmtContext is an interface to support dynamic dispatch. -type IDelete_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - DELETE_() antlr.TerminalNode - FROM_() antlr.TerminalNode - Qualified_table_name() IQualified_table_nameContext - With_clause() IWith_clauseContext - WHERE_() antlr.TerminalNode - Expr() IExprContext - Returning_clause() IReturning_clauseContext - - // IsDelete_stmtContext differentiates from other interfaces. - IsDelete_stmtContext() -} - -type Delete_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyDelete_stmtContext() *Delete_stmtContext { - var p = new(Delete_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_delete_stmt - return p -} - -func InitEmptyDelete_stmtContext(p *Delete_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_delete_stmt -} - -func (*Delete_stmtContext) IsDelete_stmtContext() {} - -func NewDelete_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmtContext { - var p = new(Delete_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_delete_stmt - - return p -} - -func (s *Delete_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Delete_stmtContext) DELETE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDELETE_, 0) -} - -func (s *Delete_stmtContext) FROM_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFROM_, 0) -} - -func (s *Delete_stmtContext) Qualified_table_name() IQualified_table_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IQualified_table_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IQualified_table_nameContext) -} - -func (s *Delete_stmtContext) With_clause() IWith_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWith_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWith_clauseContext) -} - -func (s *Delete_stmtContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *Delete_stmtContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Delete_stmtContext) Returning_clause() IReturning_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IReturning_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IReturning_clauseContext) -} - -func (s *Delete_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Delete_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Delete_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterDelete_stmt(s) - } -} - -func (s *Delete_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitDelete_stmt(s) - } -} - -func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) { - localctx = NewDelete_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 60, SQLiteParserRULE_delete_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(866) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(865) - p.With_clause() - } - - } - { - p.SetState(868) - p.Match(SQLiteParserDELETE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(869) - p.Match(SQLiteParserFROM_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(870) - p.Qualified_table_name() - } - p.SetState(873) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(871) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(872) - p.expr(0) - } - - } - p.SetState(876) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserRETURNING_ { - { - p.SetState(875) - p.Returning_clause() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IDelete_stmt_limitedContext is an interface to support dynamic dispatch. -type IDelete_stmt_limitedContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - DELETE_() antlr.TerminalNode - FROM_() antlr.TerminalNode - Qualified_table_name() IQualified_table_nameContext - With_clause() IWith_clauseContext - WHERE_() antlr.TerminalNode - Expr() IExprContext - Limit_stmt() ILimit_stmtContext - Returning_clause() IReturning_clauseContext - Order_by_stmt() IOrder_by_stmtContext - - // IsDelete_stmt_limitedContext differentiates from other interfaces. - IsDelete_stmt_limitedContext() -} - -type Delete_stmt_limitedContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyDelete_stmt_limitedContext() *Delete_stmt_limitedContext { - var p = new(Delete_stmt_limitedContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_delete_stmt_limited - return p -} - -func InitEmptyDelete_stmt_limitedContext(p *Delete_stmt_limitedContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_delete_stmt_limited -} - -func (*Delete_stmt_limitedContext) IsDelete_stmt_limitedContext() {} - -func NewDelete_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmt_limitedContext { - var p = new(Delete_stmt_limitedContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_delete_stmt_limited - - return p -} - -func (s *Delete_stmt_limitedContext) GetParser() antlr.Parser { return s.parser } - -func (s *Delete_stmt_limitedContext) DELETE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDELETE_, 0) -} - -func (s *Delete_stmt_limitedContext) FROM_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFROM_, 0) -} - -func (s *Delete_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IQualified_table_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IQualified_table_nameContext) -} - -func (s *Delete_stmt_limitedContext) With_clause() IWith_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWith_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWith_clauseContext) -} - -func (s *Delete_stmt_limitedContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *Delete_stmt_limitedContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Delete_stmt_limitedContext) Limit_stmt() ILimit_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILimit_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ILimit_stmtContext) -} - -func (s *Delete_stmt_limitedContext) Returning_clause() IReturning_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IReturning_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IReturning_clauseContext) -} - -func (s *Delete_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_stmtContext) -} - -func (s *Delete_stmt_limitedContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Delete_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Delete_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterDelete_stmt_limited(s) - } -} - -func (s *Delete_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitDelete_stmt_limited(s) - } -} - -func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedContext) { - localctx = NewDelete_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 62, SQLiteParserRULE_delete_stmt_limited) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(879) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(878) - p.With_clause() - } - - } - { - p.SetState(881) - p.Match(SQLiteParserDELETE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(882) - p.Match(SQLiteParserFROM_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(883) - p.Qualified_table_name() - } - p.SetState(886) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(884) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(885) - p.expr(0) - } - - } - p.SetState(892) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserLIMIT_ || _la == SQLiteParserORDER_ { - p.SetState(889) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserORDER_ { - { - p.SetState(888) - p.Order_by_stmt() - } - - } - { - p.SetState(891) - p.Limit_stmt() - } - - } - p.SetState(895) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserRETURNING_ { - { - p.SetState(894) - p.Returning_clause() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IDetach_stmtContext is an interface to support dynamic dispatch. -type IDetach_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - DETACH_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DATABASE_() antlr.TerminalNode - - // IsDetach_stmtContext differentiates from other interfaces. - IsDetach_stmtContext() -} - -type Detach_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyDetach_stmtContext() *Detach_stmtContext { - var p = new(Detach_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_detach_stmt - return p -} - -func InitEmptyDetach_stmtContext(p *Detach_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_detach_stmt -} - -func (*Detach_stmtContext) IsDetach_stmtContext() {} - -func NewDetach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Detach_stmtContext { - var p = new(Detach_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_detach_stmt - - return p -} - -func (s *Detach_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Detach_stmtContext) DETACH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDETACH_, 0) -} - -func (s *Detach_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Detach_stmtContext) DATABASE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDATABASE_, 0) -} - -func (s *Detach_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Detach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Detach_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterDetach_stmt(s) - } -} - -func (s *Detach_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitDetach_stmt(s) - } -} - -func (p *SQLiteParser) Detach_stmt() (localctx IDetach_stmtContext) { - localctx = NewDetach_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 64, SQLiteParserRULE_detach_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(897) - p.Match(SQLiteParserDETACH_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(899) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 113, p.GetParserRuleContext()) == 1 { - { - p.SetState(898) - p.Match(SQLiteParserDATABASE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(901) - p.Schema_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IDrop_stmtContext is an interface to support dynamic dispatch. -type IDrop_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // GetObject returns the object token. - GetObject() antlr.Token - - // SetObject sets the object token. - SetObject(antlr.Token) - - // Getter signatures - DROP_() antlr.TerminalNode - Any_name() IAny_nameContext - INDEX_() antlr.TerminalNode - TABLE_() antlr.TerminalNode - TRIGGER_() antlr.TerminalNode - VIEW_() antlr.TerminalNode - IF_() antlr.TerminalNode - EXISTS_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - - // IsDrop_stmtContext differentiates from other interfaces. - IsDrop_stmtContext() -} - -type Drop_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser - object antlr.Token -} - -func NewEmptyDrop_stmtContext() *Drop_stmtContext { - var p = new(Drop_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_drop_stmt - return p -} - -func InitEmptyDrop_stmtContext(p *Drop_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_drop_stmt -} - -func (*Drop_stmtContext) IsDrop_stmtContext() {} - -func NewDrop_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Drop_stmtContext { - var p = new(Drop_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_drop_stmt - - return p -} - -func (s *Drop_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Drop_stmtContext) GetObject() antlr.Token { return s.object } - -func (s *Drop_stmtContext) SetObject(v antlr.Token) { s.object = v } - -func (s *Drop_stmtContext) DROP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDROP_, 0) -} - -func (s *Drop_stmtContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Drop_stmtContext) INDEX_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINDEX_, 0) -} - -func (s *Drop_stmtContext) TABLE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTABLE_, 0) -} - -func (s *Drop_stmtContext) TRIGGER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRIGGER_, 0) -} - -func (s *Drop_stmtContext) VIEW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVIEW_, 0) -} - -func (s *Drop_stmtContext) IF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIF_, 0) -} - -func (s *Drop_stmtContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *Drop_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Drop_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Drop_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Drop_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Drop_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterDrop_stmt(s) - } -} - -func (s *Drop_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitDrop_stmt(s) - } -} - -func (p *SQLiteParser) Drop_stmt() (localctx IDrop_stmtContext) { - localctx = NewDrop_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 66, SQLiteParserRULE_drop_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(903) - p.Match(SQLiteParserDROP_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(904) - - var _lt = p.GetTokenStream().LT(1) - - localctx.(*Drop_stmtContext).object = _lt - - _la = p.GetTokenStream().LA(1) - - if !((int64((_la-86)) & ^0x3f) == 0 && ((int64(1)<<(_la-86))&4648277765399773185) != 0) { - var _ri = p.GetErrorHandler().RecoverInline(p) - - localctx.(*Drop_stmtContext).object = _ri - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - p.SetState(907) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 114, p.GetParserRuleContext()) == 1 { - { - p.SetState(905) - p.Match(SQLiteParserIF_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(906) - p.Match(SQLiteParserEXISTS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(912) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 115, p.GetParserRuleContext()) == 1 { - { - p.SetState(909) - p.Schema_name() - } - { - p.SetState(910) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(914) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IExprContext is an interface to support dynamic dispatch. -type IExprContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - // IsExprContext differentiates from other interfaces. - IsExprContext() -} - -type ExprContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyExprContext() *ExprContext { - var p = new(ExprContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_expr - return p -} - -func InitEmptyExprContext(p *ExprContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_expr -} - -func (*ExprContext) IsExprContext() {} - -func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext { - var p = new(ExprContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_expr - - return p -} - -func (s *ExprContext) GetParser() antlr.Parser { return s.parser } - -func (s *ExprContext) CopyAll(ctx *ExprContext) { - s.CopyFrom(&ctx.BaseParserRuleContext) -} - -func (s *ExprContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -type Expr_caseContext struct { - ExprContext -} - -func NewExpr_caseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_caseContext { - var p = new(Expr_caseContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_caseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_caseContext) CASE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCASE_, 0) -} - -func (s *Expr_caseContext) END_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEND_, 0) -} - -func (s *Expr_caseContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_caseContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_caseContext) AllWHEN_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserWHEN_) -} - -func (s *Expr_caseContext) WHEN_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserWHEN_, i) -} - -func (s *Expr_caseContext) AllTHEN_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserTHEN_) -} - -func (s *Expr_caseContext) THEN_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserTHEN_, i) -} - -func (s *Expr_caseContext) ELSE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserELSE_, 0) -} - -func (s *Expr_caseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_case(s) - } -} - -func (s *Expr_caseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_case(s) - } -} - -type Expr_raiseContext struct { - ExprContext -} - -func NewExpr_raiseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_raiseContext { - var p = new(Expr_raiseContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_raiseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_raiseContext) Raise_function() IRaise_functionContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IRaise_functionContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IRaise_functionContext) -} - -func (s *Expr_raiseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_raise(s) - } -} - -func (s *Expr_raiseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_raise(s) - } -} - -type Expr_functionContext struct { - ExprContext -} - -func NewExpr_functionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_functionContext { - var p = new(Expr_functionContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_functionContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_functionContext) Qualified_function_name() IQualified_function_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IQualified_function_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IQualified_function_nameContext) -} - -func (s *Expr_functionContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Expr_functionContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Expr_functionContext) STAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, 0) -} - -func (s *Expr_functionContext) Filter_clause() IFilter_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFilter_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFilter_clauseContext) -} - -func (s *Expr_functionContext) Over_clause() IOver_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOver_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOver_clauseContext) -} - -func (s *Expr_functionContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_functionContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_functionContext) DISTINCT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDISTINCT_, 0) -} - -func (s *Expr_functionContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Expr_functionContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Expr_functionContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_function(s) - } -} - -func (s *Expr_functionContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_function(s) - } -} - -type Expr_comparisonContext struct { - ExprContext -} - -func NewExpr_comparisonContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_comparisonContext { - var p = new(Expr_comparisonContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_comparisonContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_comparisonContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_comparisonContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_comparisonContext) LT2() antlr.TerminalNode { - return s.GetToken(SQLiteParserLT2, 0) -} - -func (s *Expr_comparisonContext) GT2() antlr.TerminalNode { - return s.GetToken(SQLiteParserGT2, 0) -} - -func (s *Expr_comparisonContext) AMP() antlr.TerminalNode { - return s.GetToken(SQLiteParserAMP, 0) -} - -func (s *Expr_comparisonContext) PIPE() antlr.TerminalNode { - return s.GetToken(SQLiteParserPIPE, 0) -} - -func (s *Expr_comparisonContext) LT() antlr.TerminalNode { - return s.GetToken(SQLiteParserLT, 0) -} - -func (s *Expr_comparisonContext) LT_EQ() antlr.TerminalNode { - return s.GetToken(SQLiteParserLT_EQ, 0) -} - -func (s *Expr_comparisonContext) GT() antlr.TerminalNode { - return s.GetToken(SQLiteParserGT, 0) -} - -func (s *Expr_comparisonContext) GT_EQ() antlr.TerminalNode { - return s.GetToken(SQLiteParserGT_EQ, 0) -} - -func (s *Expr_comparisonContext) ASSIGN() antlr.TerminalNode { - return s.GetToken(SQLiteParserASSIGN, 0) -} - -func (s *Expr_comparisonContext) EQ() antlr.TerminalNode { - return s.GetToken(SQLiteParserEQ, 0) -} - -func (s *Expr_comparisonContext) NOT_EQ1() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_EQ1, 0) -} - -func (s *Expr_comparisonContext) NOT_EQ2() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_EQ2, 0) -} - -func (s *Expr_comparisonContext) IS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIS_, 0) -} - -func (s *Expr_comparisonContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Expr_comparisonContext) IN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIN_, 0) -} - -func (s *Expr_comparisonContext) LIKE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLIKE_, 0) -} - -func (s *Expr_comparisonContext) GLOB_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGLOB_, 0) -} - -func (s *Expr_comparisonContext) MATCH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserMATCH_, 0) -} - -func (s *Expr_comparisonContext) REGEXP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREGEXP_, 0) -} - -func (s *Expr_comparisonContext) ESCAPE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserESCAPE_, 0) -} - -func (s *Expr_comparisonContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_comparison(s) - } -} - -func (s *Expr_comparisonContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_comparison(s) - } -} - -type Expr_boolContext struct { - ExprContext -} - -func NewExpr_boolContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_boolContext { - var p = new(Expr_boolContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_boolContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_boolContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_boolContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_boolContext) AND_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAND_, 0) -} - -func (s *Expr_boolContext) OR_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOR_, 0) -} - -func (s *Expr_boolContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_bool(s) - } -} - -func (s *Expr_boolContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_bool(s) - } -} - -type Expr_binaryContext struct { - ExprContext -} - -func NewExpr_binaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_binaryContext { - var p = new(Expr_binaryContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_binaryContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_binaryContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_binaryContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_binaryContext) PIPE2() antlr.TerminalNode { - return s.GetToken(SQLiteParserPIPE2, 0) -} - -func (s *Expr_binaryContext) PTR() antlr.TerminalNode { - return s.GetToken(SQLiteParserPTR, 0) -} - -func (s *Expr_binaryContext) PTR2() antlr.TerminalNode { - return s.GetToken(SQLiteParserPTR2, 0) -} - -func (s *Expr_binaryContext) STAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, 0) -} - -func (s *Expr_binaryContext) DIV() antlr.TerminalNode { - return s.GetToken(SQLiteParserDIV, 0) -} - -func (s *Expr_binaryContext) MOD() antlr.TerminalNode { - return s.GetToken(SQLiteParserMOD, 0) -} - -func (s *Expr_binaryContext) PLUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserPLUS, 0) -} - -func (s *Expr_binaryContext) MINUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserMINUS, 0) -} - -func (s *Expr_binaryContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_binary(s) - } -} - -func (s *Expr_binaryContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_binary(s) - } -} - -type Expr_literalContext struct { - ExprContext -} - -func NewExpr_literalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_literalContext { - var p = new(Expr_literalContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_literalContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_literalContext) Literal_value() ILiteral_valueContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILiteral_valueContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ILiteral_valueContext) -} - -func (s *Expr_literalContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_literal(s) - } -} - -func (s *Expr_literalContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_literal(s) - } -} - -type Expr_castContext struct { - ExprContext -} - -func NewExpr_castContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_castContext { - var p = new(Expr_castContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_castContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_castContext) CAST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCAST_, 0) -} - -func (s *Expr_castContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Expr_castContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_castContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Expr_castContext) Type_name() IType_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IType_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IType_nameContext) -} - -func (s *Expr_castContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Expr_castContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_cast(s) - } -} - -func (s *Expr_castContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_cast(s) - } -} - -type Expr_in_selectContext struct { - ExprContext -} - -func NewExpr_in_selectContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_in_selectContext { - var p = new(Expr_in_selectContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_in_selectContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_in_selectContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Expr_in_selectContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Expr_in_selectContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Expr_in_selectContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *Expr_in_selectContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Expr_in_selectContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_in_selectContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_in_selectContext) IN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIN_, 0) -} - -func (s *Expr_in_selectContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Expr_in_selectContext) Table_function_name() ITable_function_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_function_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_function_nameContext) -} - -func (s *Expr_in_selectContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Expr_in_selectContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Expr_in_selectContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Expr_in_selectContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Expr_in_selectContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_in_select(s) - } -} - -func (s *Expr_in_selectContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_in_select(s) - } -} - -type Expr_listContext struct { - ExprContext -} - -func NewExpr_listContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_listContext { - var p = new(Expr_listContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_listContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_listContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Expr_listContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_listContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_listContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Expr_listContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Expr_listContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Expr_listContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_list(s) - } -} - -func (s *Expr_listContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_list(s) - } -} - -type Expr_betweenContext struct { - ExprContext -} - -func NewExpr_betweenContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_betweenContext { - var p = new(Expr_betweenContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_betweenContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_betweenContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_betweenContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_betweenContext) BETWEEN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBETWEEN_, 0) -} - -func (s *Expr_betweenContext) AND_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAND_, 0) -} - -func (s *Expr_betweenContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Expr_betweenContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_between(s) - } -} - -func (s *Expr_betweenContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_between(s) - } -} - -type Expr_collateContext struct { - ExprContext -} - -func NewExpr_collateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_collateContext { - var p = new(Expr_collateContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_collateContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_collateContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_collateContext) COLLATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOLLATE_, 0) -} - -func (s *Expr_collateContext) Collation_name() ICollation_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollation_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICollation_nameContext) -} - -func (s *Expr_collateContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_collate(s) - } -} - -func (s *Expr_collateContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_collate(s) - } -} - -type Expr_qualified_column_nameContext struct { - ExprContext -} - -func NewExpr_qualified_column_nameContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_qualified_column_nameContext { - var p = new(Expr_qualified_column_nameContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_qualified_column_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_qualified_column_nameContext) Column_name() IColumn_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Expr_qualified_column_nameContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Expr_qualified_column_nameContext) AllDOT() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserDOT) -} - -func (s *Expr_qualified_column_nameContext) DOT(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, i) -} - -func (s *Expr_qualified_column_nameContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Expr_qualified_column_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_qualified_column_name(s) - } -} - -func (s *Expr_qualified_column_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_qualified_column_name(s) - } -} - -type Expr_unaryContext struct { - ExprContext -} - -func NewExpr_unaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_unaryContext { - var p = new(Expr_unaryContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_unaryContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_unaryContext) Unary_operator() IUnary_operatorContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IUnary_operatorContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IUnary_operatorContext) -} - -func (s *Expr_unaryContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_unaryContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_unary(s) - } -} - -func (s *Expr_unaryContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_unary(s) - } -} - -type Expr_null_compContext struct { - ExprContext -} - -func NewExpr_null_compContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_null_compContext { - var p = new(Expr_null_compContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_null_compContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_null_compContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_null_compContext) ISNULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserISNULL_, 0) -} - -func (s *Expr_null_compContext) NOTNULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOTNULL_, 0) -} - -func (s *Expr_null_compContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Expr_null_compContext) NULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNULL_, 0) -} - -func (s *Expr_null_compContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_null_comp(s) - } -} - -func (s *Expr_null_compContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_null_comp(s) - } -} - -type Expr_bindContext struct { - ExprContext -} - -func NewExpr_bindContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_bindContext { - var p = new(Expr_bindContext) - - InitEmptyExprContext(&p.ExprContext) - p.parser = parser - p.CopyAll(ctx.(*ExprContext)) - - return p -} - -func (s *Expr_bindContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_bindContext) NUMBERED_BIND_PARAMETER() antlr.TerminalNode { - return s.GetToken(SQLiteParserNUMBERED_BIND_PARAMETER, 0) -} - -func (s *Expr_bindContext) NAMED_BIND_PARAMETER() antlr.TerminalNode { - return s.GetToken(SQLiteParserNAMED_BIND_PARAMETER, 0) -} - -func (s *Expr_bindContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_bind(s) - } -} - -func (s *Expr_bindContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_bind(s) - } -} - -func (p *SQLiteParser) Expr() (localctx IExprContext) { - return p.expr(0) -} - -func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { - var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() - - _parentState := p.GetState() - localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState) - var _prevctx IExprContext = localctx - var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. - _startState := 68 - p.EnterRecursionRule(localctx, 68, SQLiteParserRULE_expr, _p) - var _la int - - var _alt int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1005) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 129, p.GetParserRuleContext()) { - case 1: - localctx = NewExpr_literalContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - - { - p.SetState(917) - p.Literal_value() - } - - case 2: - localctx = NewExpr_bindContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(918) - p.Match(SQLiteParserNUMBERED_BIND_PARAMETER) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 3: - localctx = NewExpr_bindContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(919) - p.Match(SQLiteParserNAMED_BIND_PARAMETER) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 4: - localctx = NewExpr_qualified_column_nameContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - p.SetState(928) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 117, p.GetParserRuleContext()) == 1 { - p.SetState(923) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 116, p.GetParserRuleContext()) == 1 { - { - p.SetState(920) - p.Schema_name() - } - { - p.SetState(921) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(925) - p.Table_name() - } - { - p.SetState(926) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(930) - p.Column_name() - } - - case 5: - localctx = NewExpr_unaryContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(931) - p.Unary_operator() - } - { - p.SetState(932) - p.expr(21) - } - - case 6: - localctx = NewExpr_functionContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(934) - p.Qualified_function_name() - } - { - p.SetState(935) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(948) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: - p.SetState(937) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 118, p.GetParserRuleContext()) == 1 { - { - p.SetState(936) - p.Match(SQLiteParserDISTINCT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(939) - p.expr(0) - } - p.SetState(944) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(940) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(941) - p.expr(0) - } - - p.SetState(946) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case SQLiteParserSTAR: - { - p.SetState(947) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserCLOSE_PAR: - - default: - } - { - p.SetState(950) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(952) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 121, p.GetParserRuleContext()) == 1 { - { - p.SetState(951) - p.Filter_clause() - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(955) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 122, p.GetParserRuleContext()) == 1 { - { - p.SetState(954) - p.Over_clause() - } - - } else if p.HasError() { // JIM - goto errorExit - } - - case 7: - localctx = NewExpr_listContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(957) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(958) - p.expr(0) - } - p.SetState(963) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(959) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(960) - p.expr(0) - } - - p.SetState(965) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(966) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 8: - localctx = NewExpr_castContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(968) - p.Match(SQLiteParserCAST_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(969) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(970) - p.expr(0) - } - { - p.SetState(971) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(972) - p.Type_name() - } - { - p.SetState(973) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 9: - localctx = NewExpr_in_selectContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - p.SetState(979) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserEXISTS_ || _la == SQLiteParserNOT_ { - p.SetState(976) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNOT_ { - { - p.SetState(975) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(978) - p.Match(SQLiteParserEXISTS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(981) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(982) - p.Select_stmt() - } - { - p.SetState(983) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 10: - localctx = NewExpr_caseContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(985) - p.Match(SQLiteParserCASE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(987) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 126, p.GetParserRuleContext()) == 1 { - { - p.SetState(986) - p.expr(0) - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(994) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for ok := true; ok; ok = _la == SQLiteParserWHEN_ { - { - p.SetState(989) - p.Match(SQLiteParserWHEN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(990) - p.expr(0) - } - { - p.SetState(991) - p.Match(SQLiteParserTHEN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(992) - p.expr(0) - } - - p.SetState(996) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(1000) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserELSE_ { - { - p.SetState(998) - p.Match(SQLiteParserELSE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(999) - p.expr(0) - } - - } - { - p.SetState(1002) - p.Match(SQLiteParserEND_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 11: - localctx = NewExpr_raiseContext(p, localctx) - p.SetParserRuleContext(localctx) - _prevctx = localctx - { - p.SetState(1004) - p.Raise_function() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(1126) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 145, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { - if _alt == 1 { - if p.GetParseListeners() != nil { - p.TriggerExitRuleEvent() - } - _prevctx = localctx - p.SetState(1124) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 144, p.GetParserRuleContext()) { - case 1: - localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1007) - - if !(p.Precpred(p.GetParserRuleContext(), 20)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", "")) - goto errorExit - } - { - p.SetState(1008) - p.Match(SQLiteParserPIPE2) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1009) - p.expr(21) - } - - case 2: - localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1010) - - if !(p.Precpred(p.GetParserRuleContext(), 19)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", "")) - goto errorExit - } - { - p.SetState(1011) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserPTR2 || _la == SQLiteParserPTR) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1012) - p.expr(20) - } - - case 3: - localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1013) - - if !(p.Precpred(p.GetParserRuleContext(), 18)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) - goto errorExit - } - { - p.SetState(1014) - _la = p.GetTokenStream().LA(1) - - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&49280) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1015) - p.expr(19) - } - - case 4: - localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1016) - - if !(p.Precpred(p.GetParserRuleContext(), 17)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) - goto errorExit - } - { - p.SetState(1017) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1018) - p.expr(18) - } - - case 5: - localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1019) - - if !(p.Precpred(p.GetParserRuleContext(), 16)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", "")) - goto errorExit - } - { - p.SetState(1020) - _la = p.GetTokenStream().LA(1) - - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&983040) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1021) - p.expr(17) - } - - case 6: - localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1022) - - if !(p.Precpred(p.GetParserRuleContext(), 15)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) - goto errorExit - } - { - p.SetState(1023) - _la = p.GetTokenStream().LA(1) - - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&15728640) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1024) - p.expr(16) - } - - case 7: - localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1025) - - if !(p.Precpred(p.GetParserRuleContext(), 14)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) - goto errorExit - } - p.SetState(1041) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 131, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1026) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 2: - { - p.SetState(1027) - p.Match(SQLiteParserEQ) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 3: - { - p.SetState(1028) - p.Match(SQLiteParserNOT_EQ1) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 4: - { - p.SetState(1029) - p.Match(SQLiteParserNOT_EQ2) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 5: - { - p.SetState(1030) - p.Match(SQLiteParserIS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 6: - { - p.SetState(1031) - p.Match(SQLiteParserIS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1032) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 7: - p.SetState(1034) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNOT_ { - { - p.SetState(1033) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1036) - p.Match(SQLiteParserIN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 8: - { - p.SetState(1037) - p.Match(SQLiteParserLIKE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 9: - { - p.SetState(1038) - p.Match(SQLiteParserGLOB_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 10: - { - p.SetState(1039) - p.Match(SQLiteParserMATCH_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 11: - { - p.SetState(1040) - p.Match(SQLiteParserREGEXP_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1043) - p.expr(15) - } - - case 8: - localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1044) - - if !(p.Precpred(p.GetParserRuleContext(), 12)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) - goto errorExit - } - { - p.SetState(1045) - p.Match(SQLiteParserAND_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1046) - p.expr(13) - } - - case 9: - localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1047) - - if !(p.Precpred(p.GetParserRuleContext(), 11)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) - goto errorExit - } - { - p.SetState(1048) - p.Match(SQLiteParserOR_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1049) - p.expr(12) - } - - case 10: - localctx = NewExpr_betweenContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1050) - - if !(p.Precpred(p.GetParserRuleContext(), 4)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) - goto errorExit - } - p.SetState(1052) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNOT_ { - { - p.SetState(1051) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1054) - p.Match(SQLiteParserBETWEEN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1055) - p.expr(0) - } - { - p.SetState(1056) - p.Match(SQLiteParserAND_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1057) - p.expr(5) - } - - case 11: - localctx = NewExpr_in_selectContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1059) - - if !(p.Precpred(p.GetParserRuleContext(), 13)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", "")) - goto errorExit - } - p.SetState(1061) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNOT_ { - { - p.SetState(1060) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1063) - p.Match(SQLiteParserIN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1102) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 140, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1064) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1074) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) == 1 { - { - p.SetState(1065) - p.Select_stmt() - } - - } else if p.HasError() { // JIM - goto errorExit - } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) == 2 { - { - p.SetState(1066) - p.expr(0) - } - p.SetState(1071) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1067) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1068) - p.expr(0) - } - - p.SetState(1073) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1076) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 2: - p.SetState(1080) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 136, p.GetParserRuleContext()) == 1 { - { - p.SetState(1077) - p.Schema_name() - } - { - p.SetState(1078) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1082) - p.Table_name() - } - - case 3: - p.SetState(1086) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 137, p.GetParserRuleContext()) == 1 { - { - p.SetState(1083) - p.Schema_name() - } - { - p.SetState(1084) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1088) - p.Table_function_name() - } - { - p.SetState(1089) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1098) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-16776415) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&-1) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&9088264048033660927) != 0) { - { - p.SetState(1090) - p.expr(0) - } - p.SetState(1095) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1091) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1092) - p.expr(0) - } - - p.SetState(1097) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } - { - p.SetState(1100) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - - case 12: - localctx = NewExpr_collateContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1104) - - if !(p.Precpred(p.GetParserRuleContext(), 7)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) - goto errorExit - } - { - p.SetState(1105) - p.Match(SQLiteParserCOLLATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1106) - p.Collation_name() - } - - case 13: - localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1107) - - if !(p.Precpred(p.GetParserRuleContext(), 6)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) - goto errorExit - } - p.SetState(1109) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNOT_ { - { - p.SetState(1108) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1111) - _la = p.GetTokenStream().LA(1) - - if !((int64((_la-79)) & ^0x3f) == 0 && ((int64(1)<<(_la-79))&2199028498433) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1112) - p.expr(0) - } - p.SetState(1115) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 142, p.GetParserRuleContext()) == 1 { - { - p.SetState(1113) - p.Match(SQLiteParserESCAPE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1114) - p.expr(0) - } - - } else if p.HasError() { // JIM - goto errorExit - } - - case 14: - localctx = NewExpr_null_compContext(p, NewExprContext(p, _parentctx, _parentState)) - p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) - p.SetState(1117) - - if !(p.Precpred(p.GetParserRuleContext(), 5)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) - goto errorExit - } - p.SetState(1122) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserISNULL_: - { - p.SetState(1118) - p.Match(SQLiteParserISNULL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserNOTNULL_: - { - p.SetState(1119) - p.Match(SQLiteParserNOTNULL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserNOT_: - { - p.SetState(1120) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1121) - p.Match(SQLiteParserNULL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - - } - p.SetState(1128) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 145, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.UnrollRecursionContexts(_parentctx) - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IRaise_functionContext is an interface to support dynamic dispatch. -type IRaise_functionContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - RAISE_() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - CLOSE_PAR() antlr.TerminalNode - IGNORE_() antlr.TerminalNode - COMMA() antlr.TerminalNode - Error_message() IError_messageContext - ROLLBACK_() antlr.TerminalNode - ABORT_() antlr.TerminalNode - FAIL_() antlr.TerminalNode - - // IsRaise_functionContext differentiates from other interfaces. - IsRaise_functionContext() -} - -type Raise_functionContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyRaise_functionContext() *Raise_functionContext { - var p = new(Raise_functionContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_raise_function - return p -} - -func InitEmptyRaise_functionContext(p *Raise_functionContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_raise_function -} - -func (*Raise_functionContext) IsRaise_functionContext() {} - -func NewRaise_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Raise_functionContext { - var p = new(Raise_functionContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_raise_function - - return p -} - -func (s *Raise_functionContext) GetParser() antlr.Parser { return s.parser } - -func (s *Raise_functionContext) RAISE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRAISE_, 0) -} - -func (s *Raise_functionContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Raise_functionContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Raise_functionContext) IGNORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIGNORE_, 0) -} - -func (s *Raise_functionContext) COMMA() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, 0) -} - -func (s *Raise_functionContext) Error_message() IError_messageContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IError_messageContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IError_messageContext) -} - -func (s *Raise_functionContext) ROLLBACK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROLLBACK_, 0) -} - -func (s *Raise_functionContext) ABORT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserABORT_, 0) -} - -func (s *Raise_functionContext) FAIL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFAIL_, 0) -} - -func (s *Raise_functionContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Raise_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Raise_functionContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterRaise_function(s) - } -} - -func (s *Raise_functionContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitRaise_function(s) - } -} - -func (p *SQLiteParser) Raise_function() (localctx IRaise_functionContext) { - localctx = NewRaise_functionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 70, SQLiteParserRULE_raise_function) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1129) - p.Match(SQLiteParserRAISE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1130) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1135) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserIGNORE_: - { - p.SetState(1131) - p.Match(SQLiteParserIGNORE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserABORT_, SQLiteParserFAIL_, SQLiteParserROLLBACK_: - { - p.SetState(1132) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserABORT_ || _la == SQLiteParserFAIL_ || _la == SQLiteParserROLLBACK_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1133) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1134) - p.Error_message() - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - { - p.SetState(1137) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ILiteral_valueContext is an interface to support dynamic dispatch. -type ILiteral_valueContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - NUMERIC_LITERAL() antlr.TerminalNode - STRING_LITERAL() antlr.TerminalNode - BLOB_LITERAL() antlr.TerminalNode - NULL_() antlr.TerminalNode - TRUE_() antlr.TerminalNode - FALSE_() antlr.TerminalNode - CURRENT_TIME_() antlr.TerminalNode - CURRENT_DATE_() antlr.TerminalNode - CURRENT_TIMESTAMP_() antlr.TerminalNode - - // IsLiteral_valueContext differentiates from other interfaces. - IsLiteral_valueContext() -} - -type Literal_valueContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyLiteral_valueContext() *Literal_valueContext { - var p = new(Literal_valueContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_literal_value - return p -} - -func InitEmptyLiteral_valueContext(p *Literal_valueContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_literal_value -} - -func (*Literal_valueContext) IsLiteral_valueContext() {} - -func NewLiteral_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Literal_valueContext { - var p = new(Literal_valueContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_literal_value - - return p -} - -func (s *Literal_valueContext) GetParser() antlr.Parser { return s.parser } - -func (s *Literal_valueContext) NUMERIC_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserNUMERIC_LITERAL, 0) -} - -func (s *Literal_valueContext) STRING_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRING_LITERAL, 0) -} - -func (s *Literal_valueContext) BLOB_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserBLOB_LITERAL, 0) -} - -func (s *Literal_valueContext) NULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNULL_, 0) -} - -func (s *Literal_valueContext) TRUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRUE_, 0) -} - -func (s *Literal_valueContext) FALSE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFALSE_, 0) -} - -func (s *Literal_valueContext) CURRENT_TIME_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_TIME_, 0) -} - -func (s *Literal_valueContext) CURRENT_DATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_DATE_, 0) -} - -func (s *Literal_valueContext) CURRENT_TIMESTAMP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_TIMESTAMP_, 0) -} - -func (s *Literal_valueContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Literal_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Literal_valueContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterLiteral_value(s) - } -} - -func (s *Literal_valueContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitLiteral_value(s) - } -} - -func (p *SQLiteParser) Literal_value() (localctx ILiteral_valueContext) { - localctx = NewLiteral_valueContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 72, SQLiteParserRULE_literal_value) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1139) - _la = p.GetTokenStream().LA(1) - - if !(((int64((_la-54)) & ^0x3f) == 0 && ((int64(1)<<(_la-54))&4503599627370503) != 0) || ((int64((_la-175)) & ^0x3f) == 0 && ((int64(1)<<(_la-175))&409603) != 0)) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IInsert_stmtContext is an interface to support dynamic dispatch. -type IInsert_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - INTO_() antlr.TerminalNode - Table_name() ITable_nameContext - INSERT_() antlr.TerminalNode - REPLACE_() antlr.TerminalNode - OR_() antlr.TerminalNode - With_clause() IWith_clauseContext - ROLLBACK_() antlr.TerminalNode - ABORT_() antlr.TerminalNode - FAIL_() antlr.TerminalNode - IGNORE_() antlr.TerminalNode - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - AS_() antlr.TerminalNode - Table_alias() ITable_aliasContext - AllOPEN_PAR() []antlr.TerminalNode - OPEN_PAR(i int) antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - AllCLOSE_PAR() []antlr.TerminalNode - CLOSE_PAR(i int) antlr.TerminalNode - VALUES_() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - Select_stmt() ISelect_stmtContext - DEFAULT_() antlr.TerminalNode - Upsert_clause() IUpsert_clauseContext - Returning_clause() IReturning_clauseContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsInsert_stmtContext differentiates from other interfaces. - IsInsert_stmtContext() -} - -type Insert_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyInsert_stmtContext() *Insert_stmtContext { - var p = new(Insert_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_insert_stmt - return p -} - -func InitEmptyInsert_stmtContext(p *Insert_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_insert_stmt -} - -func (*Insert_stmtContext) IsInsert_stmtContext() {} - -func NewInsert_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Insert_stmtContext { - var p = new(Insert_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_insert_stmt - - return p -} - -func (s *Insert_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Insert_stmtContext) INTO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINTO_, 0) -} - -func (s *Insert_stmtContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Insert_stmtContext) INSERT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINSERT_, 0) -} - -func (s *Insert_stmtContext) REPLACE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREPLACE_, 0) -} - -func (s *Insert_stmtContext) OR_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOR_, 0) -} - -func (s *Insert_stmtContext) With_clause() IWith_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWith_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWith_clauseContext) -} - -func (s *Insert_stmtContext) ROLLBACK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROLLBACK_, 0) -} - -func (s *Insert_stmtContext) ABORT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserABORT_, 0) -} - -func (s *Insert_stmtContext) FAIL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFAIL_, 0) -} - -func (s *Insert_stmtContext) IGNORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIGNORE_, 0) -} - -func (s *Insert_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Insert_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Insert_stmtContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Insert_stmtContext) Table_alias() ITable_aliasContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_aliasContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_aliasContext) -} - -func (s *Insert_stmtContext) AllOPEN_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserOPEN_PAR) -} - -func (s *Insert_stmtContext) OPEN_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, i) -} - -func (s *Insert_stmtContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Insert_stmtContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Insert_stmtContext) AllCLOSE_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCLOSE_PAR) -} - -func (s *Insert_stmtContext) CLOSE_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, i) -} - -func (s *Insert_stmtContext) VALUES_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVALUES_, 0) -} - -func (s *Insert_stmtContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Insert_stmtContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Insert_stmtContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Insert_stmtContext) DEFAULT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFAULT_, 0) -} - -func (s *Insert_stmtContext) Upsert_clause() IUpsert_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IUpsert_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IUpsert_clauseContext) -} - -func (s *Insert_stmtContext) Returning_clause() IReturning_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IReturning_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IReturning_clauseContext) -} - -func (s *Insert_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Insert_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Insert_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Insert_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Insert_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterInsert_stmt(s) - } -} - -func (s *Insert_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitInsert_stmt(s) - } -} - -func (p *SQLiteParser) Insert_stmt() (localctx IInsert_stmtContext) { - localctx = NewInsert_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 74, SQLiteParserRULE_insert_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1142) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(1141) - p.With_clause() - } - - } - p.SetState(1149) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 148, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1144) - p.Match(SQLiteParserINSERT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 2: - { - p.SetState(1145) - p.Match(SQLiteParserREPLACE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 3: - { - p.SetState(1146) - p.Match(SQLiteParserINSERT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1147) - p.Match(SQLiteParserOR_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1148) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1151) - p.Match(SQLiteParserINTO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1155) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 149, p.GetParserRuleContext()) == 1 { - { - p.SetState(1152) - p.Schema_name() - } - { - p.SetState(1153) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1157) - p.Table_name() - } - p.SetState(1160) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(1158) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1159) - p.Table_alias() - } - - } - p.SetState(1173) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOPEN_PAR { - { - p.SetState(1162) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1163) - p.Column_name() - } - p.SetState(1168) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1164) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1165) - p.Column_name() - } - - p.SetState(1170) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1171) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - - p.SetState(1206) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 156, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1175) - p.Match(SQLiteParserVALUES_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1176) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1177) - p.expr(0) - } - p.SetState(1182) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1178) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1179) - p.expr(0) - } - - p.SetState(1184) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1185) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1200) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1186) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1187) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1188) - p.expr(0) - } - p.SetState(1193) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1189) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1190) - p.expr(0) - } - - p.SetState(1195) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1196) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(1202) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case 2: - { - p.SetState(1203) - p.Select_stmt() - } - - case 3: - { - p.SetState(1204) - p.Match(SQLiteParserDEFAULT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1205) - p.Match(SQLiteParserVALUES_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - p.SetState(1209) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserON_ { - { - p.SetState(1208) - p.Upsert_clause() - } - - } - p.SetState(1212) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserRETURNING_ { - { - p.SetState(1211) - p.Returning_clause() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IUpsert_clauseContext is an interface to support dynamic dispatch. -type IUpsert_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ON_() antlr.TerminalNode - CONFLICT_() antlr.TerminalNode - DO_() antlr.TerminalNode - NOTHING_() antlr.TerminalNode - UPDATE_() antlr.TerminalNode - SET_() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - AllIndexed_column() []IIndexed_columnContext - Indexed_column(i int) IIndexed_columnContext - CLOSE_PAR() antlr.TerminalNode - AllASSIGN() []antlr.TerminalNode - ASSIGN(i int) antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - AllWHERE_() []antlr.TerminalNode - WHERE_(i int) antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - AllColumn_name_list() []IColumn_name_listContext - Column_name_list(i int) IColumn_name_listContext - - // IsUpsert_clauseContext differentiates from other interfaces. - IsUpsert_clauseContext() -} - -type Upsert_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyUpsert_clauseContext() *Upsert_clauseContext { - var p = new(Upsert_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_upsert_clause - return p -} - -func InitEmptyUpsert_clauseContext(p *Upsert_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_upsert_clause -} - -func (*Upsert_clauseContext) IsUpsert_clauseContext() {} - -func NewUpsert_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Upsert_clauseContext { - var p = new(Upsert_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_upsert_clause - - return p -} - -func (s *Upsert_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Upsert_clauseContext) ON_() antlr.TerminalNode { - return s.GetToken(SQLiteParserON_, 0) -} - -func (s *Upsert_clauseContext) CONFLICT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCONFLICT_, 0) -} - -func (s *Upsert_clauseContext) DO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDO_, 0) -} - -func (s *Upsert_clauseContext) NOTHING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOTHING_, 0) -} - -func (s *Upsert_clauseContext) UPDATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUPDATE_, 0) -} - -func (s *Upsert_clauseContext) SET_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSET_, 0) -} - -func (s *Upsert_clauseContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Upsert_clauseContext) AllIndexed_column() []IIndexed_columnContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IIndexed_columnContext); ok { - len++ - } - } - - tst := make([]IIndexed_columnContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IIndexed_columnContext); ok { - tst[i] = t.(IIndexed_columnContext) - i++ - } - } - - return tst -} - -func (s *Upsert_clauseContext) Indexed_column(i int) IIndexed_columnContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIndexed_columnContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IIndexed_columnContext) -} - -func (s *Upsert_clauseContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Upsert_clauseContext) AllASSIGN() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserASSIGN) -} - -func (s *Upsert_clauseContext) ASSIGN(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserASSIGN, i) -} - -func (s *Upsert_clauseContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Upsert_clauseContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Upsert_clauseContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Upsert_clauseContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Upsert_clauseContext) AllWHERE_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserWHERE_) -} - -func (s *Upsert_clauseContext) WHERE_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, i) -} - -func (s *Upsert_clauseContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Upsert_clauseContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Upsert_clauseContext) AllColumn_name_list() []IColumn_name_listContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_name_listContext); ok { - len++ - } - } - - tst := make([]IColumn_name_listContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_name_listContext); ok { - tst[i] = t.(IColumn_name_listContext) - i++ - } - } - - return tst -} - -func (s *Upsert_clauseContext) Column_name_list(i int) IColumn_name_listContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_name_listContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_name_listContext) -} - -func (s *Upsert_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Upsert_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Upsert_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterUpsert_clause(s) - } -} - -func (s *Upsert_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitUpsert_clause(s) - } -} - -func (p *SQLiteParser) Upsert_clause() (localctx IUpsert_clauseContext) { - localctx = NewUpsert_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 76, SQLiteParserRULE_upsert_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1214) - p.Match(SQLiteParserON_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1215) - p.Match(SQLiteParserCONFLICT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1230) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOPEN_PAR { - { - p.SetState(1216) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1217) - p.Indexed_column() - } - p.SetState(1222) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1218) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1219) - p.Indexed_column() - } - - p.SetState(1224) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1225) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1228) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(1226) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1227) - p.expr(0) - } - - } - - } - { - p.SetState(1232) - p.Match(SQLiteParserDO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1259) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserNOTHING_: - { - p.SetState(1233) - p.Match(SQLiteParserNOTHING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserUPDATE_: - { - p.SetState(1234) - p.Match(SQLiteParserUPDATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1235) - p.Match(SQLiteParserSET_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(1238) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 162, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1236) - p.Column_name() - } - - case 2: - { - p.SetState(1237) - p.Column_name_list() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1240) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1241) - p.expr(0) - } - p.SetState(1252) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1242) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1245) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 163, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1243) - p.Column_name() - } - - case 2: - { - p.SetState(1244) - p.Column_name_list() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1247) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1248) - p.expr(0) - } - - p.SetState(1254) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(1257) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(1255) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1256) - p.expr(0) - } - - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IPragma_stmtContext is an interface to support dynamic dispatch. -type IPragma_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - PRAGMA_() antlr.TerminalNode - Pragma_name() IPragma_nameContext - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - ASSIGN() antlr.TerminalNode - Pragma_value() IPragma_valueContext - OPEN_PAR() antlr.TerminalNode - CLOSE_PAR() antlr.TerminalNode - - // IsPragma_stmtContext differentiates from other interfaces. - IsPragma_stmtContext() -} - -type Pragma_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyPragma_stmtContext() *Pragma_stmtContext { - var p = new(Pragma_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_pragma_stmt - return p -} - -func InitEmptyPragma_stmtContext(p *Pragma_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_pragma_stmt -} - -func (*Pragma_stmtContext) IsPragma_stmtContext() {} - -func NewPragma_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_stmtContext { - var p = new(Pragma_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_pragma_stmt - - return p -} - -func (s *Pragma_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Pragma_stmtContext) PRAGMA_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRAGMA_, 0) -} - -func (s *Pragma_stmtContext) Pragma_name() IPragma_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IPragma_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IPragma_nameContext) -} - -func (s *Pragma_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Pragma_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Pragma_stmtContext) ASSIGN() antlr.TerminalNode { - return s.GetToken(SQLiteParserASSIGN, 0) -} - -func (s *Pragma_stmtContext) Pragma_value() IPragma_valueContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IPragma_valueContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IPragma_valueContext) -} - -func (s *Pragma_stmtContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Pragma_stmtContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Pragma_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Pragma_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Pragma_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterPragma_stmt(s) - } -} - -func (s *Pragma_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitPragma_stmt(s) - } -} - -func (p *SQLiteParser) Pragma_stmt() (localctx IPragma_stmtContext) { - localctx = NewPragma_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 78, SQLiteParserRULE_pragma_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1261) - p.Match(SQLiteParserPRAGMA_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1265) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 167, p.GetParserRuleContext()) == 1 { - { - p.SetState(1262) - p.Schema_name() - } - { - p.SetState(1263) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1267) - p.Pragma_name() - } - p.SetState(1274) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserASSIGN: - { - p.SetState(1268) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1269) - p.Pragma_value() - } - - case SQLiteParserOPEN_PAR: - { - p.SetState(1270) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1271) - p.Pragma_value() - } - { - p.SetState(1272) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWITH_: - - default: - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IPragma_valueContext is an interface to support dynamic dispatch. -type IPragma_valueContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Signed_number() ISigned_numberContext - Name() INameContext - STRING_LITERAL() antlr.TerminalNode - - // IsPragma_valueContext differentiates from other interfaces. - IsPragma_valueContext() -} - -type Pragma_valueContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyPragma_valueContext() *Pragma_valueContext { - var p = new(Pragma_valueContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_pragma_value - return p -} - -func InitEmptyPragma_valueContext(p *Pragma_valueContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_pragma_value -} - -func (*Pragma_valueContext) IsPragma_valueContext() {} - -func NewPragma_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_valueContext { - var p = new(Pragma_valueContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_pragma_value - - return p -} - -func (s *Pragma_valueContext) GetParser() antlr.Parser { return s.parser } - -func (s *Pragma_valueContext) Signed_number() ISigned_numberContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISigned_numberContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISigned_numberContext) -} - -func (s *Pragma_valueContext) Name() INameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(INameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(INameContext) -} - -func (s *Pragma_valueContext) STRING_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRING_LITERAL, 0) -} - -func (s *Pragma_valueContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Pragma_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Pragma_valueContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterPragma_value(s) - } -} - -func (s *Pragma_valueContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitPragma_value(s) - } -} - -func (p *SQLiteParser) Pragma_value() (localctx IPragma_valueContext) { - localctx = NewPragma_valueContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 80, SQLiteParserRULE_pragma_value) - p.SetState(1279) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 169, p.GetParserRuleContext()) { - case 1: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1276) - p.Signed_number() - } - - case 2: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1277) - p.Name() - } - - case 3: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1278) - p.Match(SQLiteParserSTRING_LITERAL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IReindex_stmtContext is an interface to support dynamic dispatch. -type IReindex_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - REINDEX_() antlr.TerminalNode - Collation_name() ICollation_nameContext - Table_name() ITable_nameContext - Index_name() IIndex_nameContext - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - - // IsReindex_stmtContext differentiates from other interfaces. - IsReindex_stmtContext() -} - -type Reindex_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyReindex_stmtContext() *Reindex_stmtContext { - var p = new(Reindex_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_reindex_stmt - return p -} - -func InitEmptyReindex_stmtContext(p *Reindex_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_reindex_stmt -} - -func (*Reindex_stmtContext) IsReindex_stmtContext() {} - -func NewReindex_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Reindex_stmtContext { - var p = new(Reindex_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_reindex_stmt - - return p -} - -func (s *Reindex_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Reindex_stmtContext) REINDEX_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREINDEX_, 0) -} - -func (s *Reindex_stmtContext) Collation_name() ICollation_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollation_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICollation_nameContext) -} - -func (s *Reindex_stmtContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Reindex_stmtContext) Index_name() IIndex_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIndex_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IIndex_nameContext) -} - -func (s *Reindex_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Reindex_stmtContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Reindex_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Reindex_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Reindex_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterReindex_stmt(s) - } -} - -func (s *Reindex_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitReindex_stmt(s) - } -} - -func (p *SQLiteParser) Reindex_stmt() (localctx IReindex_stmtContext) { - localctx = NewReindex_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 82, SQLiteParserRULE_reindex_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1281) - p.Match(SQLiteParserREINDEX_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1292) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 172, p.GetParserRuleContext()) == 1 { - { - p.SetState(1282) - p.Collation_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 172, p.GetParserRuleContext()) == 2 { - p.SetState(1286) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 170, p.GetParserRuleContext()) == 1 { - { - p.SetState(1283) - p.Schema_name() - } - { - p.SetState(1284) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(1290) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 171, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1288) - p.Table_name() - } - - case 2: - { - p.SetState(1289) - p.Index_name() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - - } else if p.HasError() { // JIM - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISelect_stmtContext is an interface to support dynamic dispatch. -type ISelect_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - AllSelect_core() []ISelect_coreContext - Select_core(i int) ISelect_coreContext - Common_table_stmt() ICommon_table_stmtContext - AllCompound_operator() []ICompound_operatorContext - Compound_operator(i int) ICompound_operatorContext - Order_by_stmt() IOrder_by_stmtContext - Limit_stmt() ILimit_stmtContext - - // IsSelect_stmtContext differentiates from other interfaces. - IsSelect_stmtContext() -} - -type Select_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySelect_stmtContext() *Select_stmtContext { - var p = new(Select_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_select_stmt - return p -} - -func InitEmptySelect_stmtContext(p *Select_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_select_stmt -} - -func (*Select_stmtContext) IsSelect_stmtContext() {} - -func NewSelect_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_stmtContext { - var p = new(Select_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_select_stmt - - return p -} - -func (s *Select_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Select_stmtContext) AllSelect_core() []ISelect_coreContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ISelect_coreContext); ok { - len++ - } - } - - tst := make([]ISelect_coreContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ISelect_coreContext); ok { - tst[i] = t.(ISelect_coreContext) - i++ - } - } - - return tst -} - -func (s *Select_stmtContext) Select_core(i int) ISelect_coreContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_coreContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ISelect_coreContext) -} - -func (s *Select_stmtContext) Common_table_stmt() ICommon_table_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICommon_table_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICommon_table_stmtContext) -} - -func (s *Select_stmtContext) AllCompound_operator() []ICompound_operatorContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ICompound_operatorContext); ok { - len++ - } - } - - tst := make([]ICompound_operatorContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ICompound_operatorContext); ok { - tst[i] = t.(ICompound_operatorContext) - i++ - } - } - - return tst -} - -func (s *Select_stmtContext) Compound_operator(i int) ICompound_operatorContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICompound_operatorContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ICompound_operatorContext) -} - -func (s *Select_stmtContext) Order_by_stmt() IOrder_by_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_stmtContext) -} - -func (s *Select_stmtContext) Limit_stmt() ILimit_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILimit_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ILimit_stmtContext) -} - -func (s *Select_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSelect_stmt(s) - } -} - -func (s *Select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSelect_stmt(s) - } -} - -func (p *SQLiteParser) Select_stmt() (localctx ISelect_stmtContext) { - localctx = NewSelect_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 84, SQLiteParserRULE_select_stmt) - var _la int - - var _alt int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1295) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(1294) - p.Common_table_stmt() - } - - } - { - p.SetState(1297) - p.Select_core() - } - p.SetState(1303) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 174, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { - if _alt == 1 { - { - p.SetState(1298) - p.Compound_operator() - } - { - p.SetState(1299) - p.Select_core() - } - - } - p.SetState(1305) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 174, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - } - p.SetState(1307) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserORDER_ { - { - p.SetState(1306) - p.Order_by_stmt() - } - - } - p.SetState(1310) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserLIMIT_ { - { - p.SetState(1309) - p.Limit_stmt() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IJoin_clauseContext is an interface to support dynamic dispatch. -type IJoin_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - AllTable_or_subquery() []ITable_or_subqueryContext - Table_or_subquery(i int) ITable_or_subqueryContext - AllJoin_operator() []IJoin_operatorContext - Join_operator(i int) IJoin_operatorContext - AllJoin_constraint() []IJoin_constraintContext - Join_constraint(i int) IJoin_constraintContext - - // IsJoin_clauseContext differentiates from other interfaces. - IsJoin_clauseContext() -} - -type Join_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyJoin_clauseContext() *Join_clauseContext { - var p = new(Join_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_join_clause - return p -} - -func InitEmptyJoin_clauseContext(p *Join_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_join_clause -} - -func (*Join_clauseContext) IsJoin_clauseContext() {} - -func NewJoin_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_clauseContext { - var p = new(Join_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_join_clause - - return p -} - -func (s *Join_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Join_clauseContext) AllTable_or_subquery() []ITable_or_subqueryContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ITable_or_subqueryContext); ok { - len++ - } - } - - tst := make([]ITable_or_subqueryContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ITable_or_subqueryContext); ok { - tst[i] = t.(ITable_or_subqueryContext) - i++ - } - } - - return tst -} - -func (s *Join_clauseContext) Table_or_subquery(i int) ITable_or_subqueryContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_or_subqueryContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ITable_or_subqueryContext) -} - -func (s *Join_clauseContext) AllJoin_operator() []IJoin_operatorContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IJoin_operatorContext); ok { - len++ - } - } - - tst := make([]IJoin_operatorContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IJoin_operatorContext); ok { - tst[i] = t.(IJoin_operatorContext) - i++ - } - } - - return tst -} - -func (s *Join_clauseContext) Join_operator(i int) IJoin_operatorContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IJoin_operatorContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IJoin_operatorContext) -} - -func (s *Join_clauseContext) AllJoin_constraint() []IJoin_constraintContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IJoin_constraintContext); ok { - len++ - } - } - - tst := make([]IJoin_constraintContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IJoin_constraintContext); ok { - tst[i] = t.(IJoin_constraintContext) - i++ - } - } - - return tst -} - -func (s *Join_clauseContext) Join_constraint(i int) IJoin_constraintContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IJoin_constraintContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IJoin_constraintContext) -} - -func (s *Join_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Join_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Join_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterJoin_clause(s) - } -} - -func (s *Join_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitJoin_clause(s) - } -} - -func (p *SQLiteParser) Join_clause() (localctx IJoin_clauseContext) { - localctx = NewJoin_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 86, SQLiteParserRULE_join_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1312) - p.Table_or_subquery() - } - p.SetState(1319) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA || _la == SQLiteParserCROSS_ || ((int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&562949971511297) != 0) { - { - p.SetState(1313) - p.Join_operator() - } - { - p.SetState(1314) - p.Table_or_subquery() - } - { - p.SetState(1315) - p.Join_constraint() - } - - p.SetState(1321) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISelect_coreContext is an interface to support dynamic dispatch. -type ISelect_coreContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - SELECT_() antlr.TerminalNode - AllResult_column() []IResult_columnContext - Result_column(i int) IResult_columnContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - FROM_() antlr.TerminalNode - WHERE_() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - GROUP_() antlr.TerminalNode - BY_() antlr.TerminalNode - WINDOW_() antlr.TerminalNode - AllWindow_name() []IWindow_nameContext - Window_name(i int) IWindow_nameContext - AllAS_() []antlr.TerminalNode - AS_(i int) antlr.TerminalNode - AllWindow_defn() []IWindow_defnContext - Window_defn(i int) IWindow_defnContext - DISTINCT_() antlr.TerminalNode - ALL_() antlr.TerminalNode - AllTable_or_subquery() []ITable_or_subqueryContext - Table_or_subquery(i int) ITable_or_subqueryContext - Join_clause() IJoin_clauseContext - HAVING_() antlr.TerminalNode - VALUES_() antlr.TerminalNode - AllOPEN_PAR() []antlr.TerminalNode - OPEN_PAR(i int) antlr.TerminalNode - AllCLOSE_PAR() []antlr.TerminalNode - CLOSE_PAR(i int) antlr.TerminalNode - - // IsSelect_coreContext differentiates from other interfaces. - IsSelect_coreContext() -} - -type Select_coreContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySelect_coreContext() *Select_coreContext { - var p = new(Select_coreContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_select_core - return p -} - -func InitEmptySelect_coreContext(p *Select_coreContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_select_core -} - -func (*Select_coreContext) IsSelect_coreContext() {} - -func NewSelect_coreContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_coreContext { - var p = new(Select_coreContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_select_core - - return p -} - -func (s *Select_coreContext) GetParser() antlr.Parser { return s.parser } - -func (s *Select_coreContext) SELECT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSELECT_, 0) -} - -func (s *Select_coreContext) AllResult_column() []IResult_columnContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IResult_columnContext); ok { - len++ - } - } - - tst := make([]IResult_columnContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IResult_columnContext); ok { - tst[i] = t.(IResult_columnContext) - i++ - } - } - - return tst -} - -func (s *Select_coreContext) Result_column(i int) IResult_columnContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IResult_columnContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IResult_columnContext) -} - -func (s *Select_coreContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Select_coreContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Select_coreContext) FROM_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFROM_, 0) -} - -func (s *Select_coreContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *Select_coreContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Select_coreContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Select_coreContext) GROUP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGROUP_, 0) -} - -func (s *Select_coreContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *Select_coreContext) WINDOW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWINDOW_, 0) -} - -func (s *Select_coreContext) AllWindow_name() []IWindow_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IWindow_nameContext); ok { - len++ - } - } - - tst := make([]IWindow_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IWindow_nameContext); ok { - tst[i] = t.(IWindow_nameContext) - i++ - } - } - - return tst -} - -func (s *Select_coreContext) Window_name(i int) IWindow_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWindow_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IWindow_nameContext) -} - -func (s *Select_coreContext) AllAS_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserAS_) -} - -func (s *Select_coreContext) AS_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, i) -} - -func (s *Select_coreContext) AllWindow_defn() []IWindow_defnContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IWindow_defnContext); ok { - len++ - } - } - - tst := make([]IWindow_defnContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IWindow_defnContext); ok { - tst[i] = t.(IWindow_defnContext) - i++ - } - } - - return tst -} - -func (s *Select_coreContext) Window_defn(i int) IWindow_defnContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWindow_defnContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IWindow_defnContext) -} - -func (s *Select_coreContext) DISTINCT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDISTINCT_, 0) -} - -func (s *Select_coreContext) ALL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALL_, 0) -} - -func (s *Select_coreContext) AllTable_or_subquery() []ITable_or_subqueryContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ITable_or_subqueryContext); ok { - len++ - } - } - - tst := make([]ITable_or_subqueryContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ITable_or_subqueryContext); ok { - tst[i] = t.(ITable_or_subqueryContext) - i++ - } - } - - return tst -} - -func (s *Select_coreContext) Table_or_subquery(i int) ITable_or_subqueryContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_or_subqueryContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ITable_or_subqueryContext) -} - -func (s *Select_coreContext) Join_clause() IJoin_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IJoin_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IJoin_clauseContext) -} - -func (s *Select_coreContext) HAVING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserHAVING_, 0) -} - -func (s *Select_coreContext) VALUES_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVALUES_, 0) -} - -func (s *Select_coreContext) AllOPEN_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserOPEN_PAR) -} - -func (s *Select_coreContext) OPEN_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, i) -} - -func (s *Select_coreContext) AllCLOSE_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCLOSE_PAR) -} - -func (s *Select_coreContext) CLOSE_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, i) -} - -func (s *Select_coreContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Select_coreContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Select_coreContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSelect_core(s) - } -} - -func (s *Select_coreContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSelect_core(s) - } -} - -func (p *SQLiteParser) Select_core() (localctx ISelect_coreContext) { - localctx = NewSelect_coreContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 88, SQLiteParserRULE_select_core) - var _la int - - p.SetState(1412) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserSELECT_: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1322) - p.Match(SQLiteParserSELECT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1324) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 178, p.GetParserRuleContext()) == 1 { - { - p.SetState(1323) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserALL_ || _la == SQLiteParserDISTINCT_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1326) - p.Result_column() - } - p.SetState(1331) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1327) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1328) - p.Result_column() - } - - p.SetState(1333) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(1346) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserFROM_ { - { - p.SetState(1334) - p.Match(SQLiteParserFROM_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1344) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 181, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1335) - p.Table_or_subquery() - } - p.SetState(1340) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1336) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1337) - p.Table_or_subquery() - } - - p.SetState(1342) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case 2: - { - p.SetState(1343) - p.Join_clause() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - - } - p.SetState(1350) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(1348) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1349) - p.expr(0) - } - - } - p.SetState(1366) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserGROUP_ { - { - p.SetState(1352) - p.Match(SQLiteParserGROUP_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1353) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1354) - p.expr(0) - } - p.SetState(1359) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1355) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1356) - p.expr(0) - } - - p.SetState(1361) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(1364) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserHAVING_ { - { - p.SetState(1362) - p.Match(SQLiteParserHAVING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1363) - p.expr(0) - } - - } - - } - p.SetState(1382) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWINDOW_ { - { - p.SetState(1368) - p.Match(SQLiteParserWINDOW_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1369) - p.Window_name() - } - { - p.SetState(1370) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1371) - p.Window_defn() - } - p.SetState(1379) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1372) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1373) - p.Window_name() - } - { - p.SetState(1374) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1375) - p.Window_defn() - } - - p.SetState(1381) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } - - case SQLiteParserVALUES_: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1384) - p.Match(SQLiteParserVALUES_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1385) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1386) - p.expr(0) - } - p.SetState(1391) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1387) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1388) - p.expr(0) - } - - p.SetState(1393) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1394) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1409) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1395) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1396) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1397) - p.expr(0) - } - p.SetState(1402) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1398) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1399) - p.expr(0) - } - - p.SetState(1404) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1405) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - p.SetState(1411) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFactored_select_stmtContext is an interface to support dynamic dispatch. -type IFactored_select_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Select_stmt() ISelect_stmtContext - - // IsFactored_select_stmtContext differentiates from other interfaces. - IsFactored_select_stmtContext() -} - -type Factored_select_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFactored_select_stmtContext() *Factored_select_stmtContext { - var p = new(Factored_select_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_factored_select_stmt - return p -} - -func InitEmptyFactored_select_stmtContext(p *Factored_select_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_factored_select_stmt -} - -func (*Factored_select_stmtContext) IsFactored_select_stmtContext() {} - -func NewFactored_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Factored_select_stmtContext { - var p = new(Factored_select_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_factored_select_stmt - - return p -} - -func (s *Factored_select_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Factored_select_stmtContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Factored_select_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Factored_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Factored_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFactored_select_stmt(s) - } -} - -func (s *Factored_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFactored_select_stmt(s) - } -} - -func (p *SQLiteParser) Factored_select_stmt() (localctx IFactored_select_stmtContext) { - localctx = NewFactored_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 90, SQLiteParserRULE_factored_select_stmt) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1414) - p.Select_stmt() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISimple_select_stmtContext is an interface to support dynamic dispatch. -type ISimple_select_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Select_core() ISelect_coreContext - Common_table_stmt() ICommon_table_stmtContext - Order_by_stmt() IOrder_by_stmtContext - Limit_stmt() ILimit_stmtContext - - // IsSimple_select_stmtContext differentiates from other interfaces. - IsSimple_select_stmtContext() -} - -type Simple_select_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySimple_select_stmtContext() *Simple_select_stmtContext { - var p = new(Simple_select_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_simple_select_stmt - return p -} - -func InitEmptySimple_select_stmtContext(p *Simple_select_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_simple_select_stmt -} - -func (*Simple_select_stmtContext) IsSimple_select_stmtContext() {} - -func NewSimple_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_select_stmtContext { - var p = new(Simple_select_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_simple_select_stmt - - return p -} - -func (s *Simple_select_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Simple_select_stmtContext) Select_core() ISelect_coreContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_coreContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_coreContext) -} - -func (s *Simple_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICommon_table_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICommon_table_stmtContext) -} - -func (s *Simple_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_stmtContext) -} - -func (s *Simple_select_stmtContext) Limit_stmt() ILimit_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILimit_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ILimit_stmtContext) -} - -func (s *Simple_select_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Simple_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Simple_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSimple_select_stmt(s) - } -} - -func (s *Simple_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSimple_select_stmt(s) - } -} - -func (p *SQLiteParser) Simple_select_stmt() (localctx ISimple_select_stmtContext) { - localctx = NewSimple_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 92, SQLiteParserRULE_simple_select_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1417) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(1416) - p.Common_table_stmt() - } - - } - { - p.SetState(1419) - p.Select_core() - } - p.SetState(1421) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserORDER_ { - { - p.SetState(1420) - p.Order_by_stmt() - } - - } - p.SetState(1424) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserLIMIT_ { - { - p.SetState(1423) - p.Limit_stmt() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICompound_select_stmtContext is an interface to support dynamic dispatch. -type ICompound_select_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - AllSelect_core() []ISelect_coreContext - Select_core(i int) ISelect_coreContext - Common_table_stmt() ICommon_table_stmtContext - Order_by_stmt() IOrder_by_stmtContext - Limit_stmt() ILimit_stmtContext - AllUNION_() []antlr.TerminalNode - UNION_(i int) antlr.TerminalNode - AllINTERSECT_() []antlr.TerminalNode - INTERSECT_(i int) antlr.TerminalNode - AllEXCEPT_() []antlr.TerminalNode - EXCEPT_(i int) antlr.TerminalNode - AllALL_() []antlr.TerminalNode - ALL_(i int) antlr.TerminalNode - - // IsCompound_select_stmtContext differentiates from other interfaces. - IsCompound_select_stmtContext() -} - -type Compound_select_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCompound_select_stmtContext() *Compound_select_stmtContext { - var p = new(Compound_select_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_compound_select_stmt - return p -} - -func InitEmptyCompound_select_stmtContext(p *Compound_select_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_compound_select_stmt -} - -func (*Compound_select_stmtContext) IsCompound_select_stmtContext() {} - -func NewCompound_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_select_stmtContext { - var p = new(Compound_select_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_compound_select_stmt - - return p -} - -func (s *Compound_select_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Compound_select_stmtContext) AllSelect_core() []ISelect_coreContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ISelect_coreContext); ok { - len++ - } - } - - tst := make([]ISelect_coreContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ISelect_coreContext); ok { - tst[i] = t.(ISelect_coreContext) - i++ - } - } - - return tst -} - -func (s *Compound_select_stmtContext) Select_core(i int) ISelect_coreContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_coreContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ISelect_coreContext) -} - -func (s *Compound_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICommon_table_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICommon_table_stmtContext) -} - -func (s *Compound_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_stmtContext) -} - -func (s *Compound_select_stmtContext) Limit_stmt() ILimit_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILimit_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ILimit_stmtContext) -} - -func (s *Compound_select_stmtContext) AllUNION_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserUNION_) -} - -func (s *Compound_select_stmtContext) UNION_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserUNION_, i) -} - -func (s *Compound_select_stmtContext) AllINTERSECT_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserINTERSECT_) -} - -func (s *Compound_select_stmtContext) INTERSECT_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserINTERSECT_, i) -} - -func (s *Compound_select_stmtContext) AllEXCEPT_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserEXCEPT_) -} - -func (s *Compound_select_stmtContext) EXCEPT_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserEXCEPT_, i) -} - -func (s *Compound_select_stmtContext) AllALL_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserALL_) -} - -func (s *Compound_select_stmtContext) ALL_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserALL_, i) -} - -func (s *Compound_select_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Compound_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Compound_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCompound_select_stmt(s) - } -} - -func (s *Compound_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCompound_select_stmt(s) - } -} - -func (p *SQLiteParser) Compound_select_stmt() (localctx ICompound_select_stmtContext) { - localctx = NewCompound_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 94, SQLiteParserRULE_compound_select_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1427) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(1426) - p.Common_table_stmt() - } - - } - { - p.SetState(1429) - p.Select_core() - } - p.SetState(1439) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for ok := true; ok; ok = _la == SQLiteParserEXCEPT_ || _la == SQLiteParserINTERSECT_ || _la == SQLiteParserUNION_ { - p.SetState(1436) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserUNION_: - { - p.SetState(1430) - p.Match(SQLiteParserUNION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1432) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserALL_ { - { - p.SetState(1431) - p.Match(SQLiteParserALL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - - case SQLiteParserINTERSECT_: - { - p.SetState(1434) - p.Match(SQLiteParserINTERSECT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserEXCEPT_: - { - p.SetState(1435) - p.Match(SQLiteParserEXCEPT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - { - p.SetState(1438) - p.Select_core() - } - - p.SetState(1441) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(1444) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserORDER_ { - { - p.SetState(1443) - p.Order_by_stmt() - } - - } - p.SetState(1447) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserLIMIT_ { - { - p.SetState(1446) - p.Limit_stmt() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_or_subqueryContext is an interface to support dynamic dispatch. -type ITable_or_subqueryContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Table_name() ITable_nameContext - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - Table_alias() ITable_aliasContext - INDEXED_() antlr.TerminalNode - BY_() antlr.TerminalNode - Index_name() IIndex_nameContext - NOT_() antlr.TerminalNode - AS_() antlr.TerminalNode - Table_function_name() ITable_function_nameContext - OPEN_PAR() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - CLOSE_PAR() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - AllTable_or_subquery() []ITable_or_subqueryContext - Table_or_subquery(i int) ITable_or_subqueryContext - Join_clause() IJoin_clauseContext - Select_stmt() ISelect_stmtContext - Table_alias_fallback() ITable_alias_fallbackContext - - // IsTable_or_subqueryContext differentiates from other interfaces. - IsTable_or_subqueryContext() -} - -type Table_or_subqueryContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTable_or_subqueryContext() *Table_or_subqueryContext { - var p = new(Table_or_subqueryContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_or_subquery - return p -} - -func InitEmptyTable_or_subqueryContext(p *Table_or_subqueryContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_or_subquery -} - -func (*Table_or_subqueryContext) IsTable_or_subqueryContext() {} - -func NewTable_or_subqueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_subqueryContext { - var p = new(Table_or_subqueryContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_or_subquery - - return p -} - -func (s *Table_or_subqueryContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_or_subqueryContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Table_or_subqueryContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Table_or_subqueryContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Table_or_subqueryContext) Table_alias() ITable_aliasContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_aliasContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_aliasContext) -} - -func (s *Table_or_subqueryContext) INDEXED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINDEXED_, 0) -} - -func (s *Table_or_subqueryContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *Table_or_subqueryContext) Index_name() IIndex_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIndex_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IIndex_nameContext) -} - -func (s *Table_or_subqueryContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Table_or_subqueryContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Table_or_subqueryContext) Table_function_name() ITable_function_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_function_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_function_nameContext) -} - -func (s *Table_or_subqueryContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Table_or_subqueryContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Table_or_subqueryContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Table_or_subqueryContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Table_or_subqueryContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Table_or_subqueryContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Table_or_subqueryContext) AllTable_or_subquery() []ITable_or_subqueryContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ITable_or_subqueryContext); ok { - len++ - } - } - - tst := make([]ITable_or_subqueryContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ITable_or_subqueryContext); ok { - tst[i] = t.(ITable_or_subqueryContext) - i++ - } - } - - return tst -} - -func (s *Table_or_subqueryContext) Table_or_subquery(i int) ITable_or_subqueryContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_or_subqueryContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ITable_or_subqueryContext) -} - -func (s *Table_or_subqueryContext) Join_clause() IJoin_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IJoin_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IJoin_clauseContext) -} - -func (s *Table_or_subqueryContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Table_or_subqueryContext) Table_alias_fallback() ITable_alias_fallbackContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_alias_fallbackContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_alias_fallbackContext) -} - -func (s *Table_or_subqueryContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_or_subqueryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_or_subqueryContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_or_subquery(s) - } -} - -func (s *Table_or_subqueryContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_or_subquery(s) - } -} - -func (p *SQLiteParser) Table_or_subquery() (localctx ITable_or_subqueryContext) { - localctx = NewTable_or_subqueryContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 96, SQLiteParserRULE_table_or_subquery) - var _la int - - p.SetState(1577) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 226, p.GetParserRuleContext()) { - case 1: - p.EnterOuterAlt(localctx, 1) - p.SetState(1452) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 202, p.GetParserRuleContext()) == 1 { - { - p.SetState(1449) - p.Schema_name() - } - { - p.SetState(1450) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1454) - p.Table_name() - } - p.SetState(1459) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1456) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(1455) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1458) - p.Table_alias() - } - - } - p.SetState(1466) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserINDEXED_: - { - p.SetState(1461) - p.Match(SQLiteParserINDEXED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1462) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1463) - p.Index_name() - } - - case SQLiteParserNOT_: - { - p.SetState(1464) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1465) - p.Match(SQLiteParserINDEXED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_: - - default: - } - - case 2: - p.EnterOuterAlt(localctx, 2) - p.SetState(1471) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 206, p.GetParserRuleContext()) == 1 { - { - p.SetState(1468) - p.Schema_name() - } - { - p.SetState(1469) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1473) - p.Table_function_name() - } - { - p.SetState(1474) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1475) - p.expr(0) - } - p.SetState(1480) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1476) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1477) - p.expr(0) - } - - p.SetState(1482) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1483) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1488) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1485) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(1484) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1487) - p.Table_alias() - } - - } - - case 3: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1490) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1500) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 211, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1491) - p.Table_or_subquery() - } - p.SetState(1496) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1492) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1493) - p.Table_or_subquery() - } - - p.SetState(1498) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case 2: - { - p.SetState(1499) - p.Join_clause() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1502) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 4: - p.EnterOuterAlt(localctx, 4) - { - p.SetState(1504) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1505) - p.Select_stmt() - } - { - p.SetState(1506) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1511) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1508) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(1507) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1510) - p.Table_alias() - } - - } - - case 5: - p.EnterOuterAlt(localctx, 5) - p.SetState(1516) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 214, p.GetParserRuleContext()) == 1 { - { - p.SetState(1513) - p.Schema_name() - } - { - p.SetState(1514) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1518) - p.Table_name() - } - p.SetState(1523) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 216, p.GetParserRuleContext()) == 1 { - p.SetState(1520) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 215, p.GetParserRuleContext()) == 1 { - { - p.SetState(1519) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1522) - p.Table_alias_fallback() - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(1530) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserINDEXED_: - { - p.SetState(1525) - p.Match(SQLiteParserINDEXED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1526) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1527) - p.Index_name() - } - - case SQLiteParserNOT_: - { - p.SetState(1528) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1529) - p.Match(SQLiteParserINDEXED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_: - - default: - } - - case 6: - p.EnterOuterAlt(localctx, 6) - p.SetState(1535) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 218, p.GetParserRuleContext()) == 1 { - { - p.SetState(1532) - p.Schema_name() - } - { - p.SetState(1533) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1537) - p.Table_function_name() - } - { - p.SetState(1538) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1539) - p.expr(0) - } - p.SetState(1544) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1540) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1541) - p.expr(0) - } - - p.SetState(1546) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1547) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1552) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 221, p.GetParserRuleContext()) == 1 { - p.SetState(1549) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 220, p.GetParserRuleContext()) == 1 { - { - p.SetState(1548) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1551) - p.Table_alias_fallback() - } - - } else if p.HasError() { // JIM - goto errorExit - } - - case 7: - p.EnterOuterAlt(localctx, 7) - { - p.SetState(1554) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1564) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 223, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1555) - p.Table_or_subquery() - } - p.SetState(1560) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1556) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1557) - p.Table_or_subquery() - } - - p.SetState(1562) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case 2: - { - p.SetState(1563) - p.Join_clause() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1566) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 8: - p.EnterOuterAlt(localctx, 8) - { - p.SetState(1568) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1569) - p.Select_stmt() - } - { - p.SetState(1570) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1575) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 225, p.GetParserRuleContext()) == 1 { - p.SetState(1572) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 224, p.GetParserRuleContext()) == 1 { - { - p.SetState(1571) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1574) - p.Table_alias_fallback() - } - - } else if p.HasError() { // JIM - goto errorExit - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IResult_columnContext is an interface to support dynamic dispatch. -type IResult_columnContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - STAR() antlr.TerminalNode - Table_name() ITable_nameContext - DOT() antlr.TerminalNode - Expr() IExprContext - Column_alias() IColumn_aliasContext - AS_() antlr.TerminalNode - - // IsResult_columnContext differentiates from other interfaces. - IsResult_columnContext() -} - -type Result_columnContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyResult_columnContext() *Result_columnContext { - var p = new(Result_columnContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_result_column - return p -} - -func InitEmptyResult_columnContext(p *Result_columnContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_result_column -} - -func (*Result_columnContext) IsResult_columnContext() {} - -func NewResult_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Result_columnContext { - var p = new(Result_columnContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_result_column - - return p -} - -func (s *Result_columnContext) GetParser() antlr.Parser { return s.parser } - -func (s *Result_columnContext) STAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, 0) -} - -func (s *Result_columnContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Result_columnContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Result_columnContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Result_columnContext) Column_alias() IColumn_aliasContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_aliasContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IColumn_aliasContext) -} - -func (s *Result_columnContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Result_columnContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Result_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Result_columnContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterResult_column(s) - } -} - -func (s *Result_columnContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitResult_column(s) - } -} - -func (p *SQLiteParser) Result_column() (localctx IResult_columnContext) { - localctx = NewResult_columnContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 98, SQLiteParserRULE_result_column) - var _la int - - p.SetState(1591) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 229, p.GetParserRuleContext()) { - case 1: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1579) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 2: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1580) - p.Table_name() - } - { - p.SetState(1581) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1582) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 3: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1584) - p.expr(0) - } - p.SetState(1589) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL { - p.SetState(1586) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(1585) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - { - p.SetState(1588) - p.Column_alias() - } - - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IJoin_operatorContext is an interface to support dynamic dispatch. -type IJoin_operatorContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - COMMA() antlr.TerminalNode - JOIN_() antlr.TerminalNode - NATURAL_() antlr.TerminalNode - INNER_() antlr.TerminalNode - LEFT_() antlr.TerminalNode - RIGHT_() antlr.TerminalNode - FULL_() antlr.TerminalNode - OUTER_() antlr.TerminalNode - CROSS_() antlr.TerminalNode - - // IsJoin_operatorContext differentiates from other interfaces. - IsJoin_operatorContext() -} - -type Join_operatorContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyJoin_operatorContext() *Join_operatorContext { - var p = new(Join_operatorContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_join_operator - return p -} - -func InitEmptyJoin_operatorContext(p *Join_operatorContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_join_operator -} - -func (*Join_operatorContext) IsJoin_operatorContext() {} - -func NewJoin_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_operatorContext { - var p = new(Join_operatorContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_join_operator - - return p -} - -func (s *Join_operatorContext) GetParser() antlr.Parser { return s.parser } - -func (s *Join_operatorContext) COMMA() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, 0) -} - -func (s *Join_operatorContext) JOIN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserJOIN_, 0) -} - -func (s *Join_operatorContext) NATURAL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNATURAL_, 0) -} - -func (s *Join_operatorContext) INNER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINNER_, 0) -} - -func (s *Join_operatorContext) LEFT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLEFT_, 0) -} - -func (s *Join_operatorContext) RIGHT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRIGHT_, 0) -} - -func (s *Join_operatorContext) FULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFULL_, 0) -} - -func (s *Join_operatorContext) OUTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOUTER_, 0) -} - -func (s *Join_operatorContext) CROSS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCROSS_, 0) -} - -func (s *Join_operatorContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Join_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Join_operatorContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterJoin_operator(s) - } -} - -func (s *Join_operatorContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitJoin_operator(s) - } -} - -func (p *SQLiteParser) Join_operator() (localctx IJoin_operatorContext) { - localctx = NewJoin_operatorContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 100, SQLiteParserRULE_join_operator) - var _la int - - p.SetState(1607) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserCOMMA: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1593) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserFULL_, SQLiteParserINNER_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserNATURAL_, SQLiteParserRIGHT_: - p.EnterOuterAlt(localctx, 2) - p.SetState(1595) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNATURAL_ { - { - p.SetState(1594) - p.Match(SQLiteParserNATURAL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - p.SetState(1602) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserFULL_, SQLiteParserLEFT_, SQLiteParserRIGHT_: - { - p.SetState(1597) - _la = p.GetTokenStream().LA(1) - - if !((int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&562949954469889) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - p.SetState(1599) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserOUTER_ { - { - p.SetState(1598) - p.Match(SQLiteParserOUTER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - - case SQLiteParserINNER_: - { - p.SetState(1601) - p.Match(SQLiteParserINNER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserJOIN_: - - default: - } - { - p.SetState(1604) - p.Match(SQLiteParserJOIN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserCROSS_: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1605) - p.Match(SQLiteParserCROSS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1606) - p.Match(SQLiteParserJOIN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IJoin_constraintContext is an interface to support dynamic dispatch. -type IJoin_constraintContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ON_() antlr.TerminalNode - Expr() IExprContext - USING_() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - CLOSE_PAR() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsJoin_constraintContext differentiates from other interfaces. - IsJoin_constraintContext() -} - -type Join_constraintContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyJoin_constraintContext() *Join_constraintContext { - var p = new(Join_constraintContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_join_constraint - return p -} - -func InitEmptyJoin_constraintContext(p *Join_constraintContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_join_constraint -} - -func (*Join_constraintContext) IsJoin_constraintContext() {} - -func NewJoin_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_constraintContext { - var p = new(Join_constraintContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_join_constraint - - return p -} - -func (s *Join_constraintContext) GetParser() antlr.Parser { return s.parser } - -func (s *Join_constraintContext) ON_() antlr.TerminalNode { - return s.GetToken(SQLiteParserON_, 0) -} - -func (s *Join_constraintContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Join_constraintContext) USING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUSING_, 0) -} - -func (s *Join_constraintContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Join_constraintContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Join_constraintContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Join_constraintContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Join_constraintContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Join_constraintContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Join_constraintContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Join_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Join_constraintContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterJoin_constraint(s) - } -} - -func (s *Join_constraintContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitJoin_constraint(s) - } -} - -func (p *SQLiteParser) Join_constraint() (localctx IJoin_constraintContext) { - localctx = NewJoin_constraintContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 102, SQLiteParserRULE_join_constraint) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1623) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 235, p.GetParserRuleContext()) == 1 { - { - p.SetState(1609) - p.Match(SQLiteParserON_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1610) - p.expr(0) - } - - } else if p.HasError() { // JIM - goto errorExit - } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 235, p.GetParserRuleContext()) == 2 { - { - p.SetState(1611) - p.Match(SQLiteParserUSING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1612) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1613) - p.Column_name() - } - p.SetState(1618) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1614) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1615) - p.Column_name() - } - - p.SetState(1620) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1621) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICompound_operatorContext is an interface to support dynamic dispatch. -type ICompound_operatorContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - UNION_() antlr.TerminalNode - ALL_() antlr.TerminalNode - INTERSECT_() antlr.TerminalNode - EXCEPT_() antlr.TerminalNode - - // IsCompound_operatorContext differentiates from other interfaces. - IsCompound_operatorContext() -} - -type Compound_operatorContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCompound_operatorContext() *Compound_operatorContext { - var p = new(Compound_operatorContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_compound_operator - return p -} - -func InitEmptyCompound_operatorContext(p *Compound_operatorContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_compound_operator -} - -func (*Compound_operatorContext) IsCompound_operatorContext() {} - -func NewCompound_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_operatorContext { - var p = new(Compound_operatorContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_compound_operator - - return p -} - -func (s *Compound_operatorContext) GetParser() antlr.Parser { return s.parser } - -func (s *Compound_operatorContext) UNION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNION_, 0) -} - -func (s *Compound_operatorContext) ALL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALL_, 0) -} - -func (s *Compound_operatorContext) INTERSECT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINTERSECT_, 0) -} - -func (s *Compound_operatorContext) EXCEPT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXCEPT_, 0) -} - -func (s *Compound_operatorContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Compound_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Compound_operatorContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCompound_operator(s) - } -} - -func (s *Compound_operatorContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCompound_operator(s) - } -} - -func (p *SQLiteParser) Compound_operator() (localctx ICompound_operatorContext) { - localctx = NewCompound_operatorContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 104, SQLiteParserRULE_compound_operator) - var _la int - - p.SetState(1631) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserUNION_: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1625) - p.Match(SQLiteParserUNION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1627) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserALL_ { - { - p.SetState(1626) - p.Match(SQLiteParserALL_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } - - case SQLiteParserINTERSECT_: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1629) - p.Match(SQLiteParserINTERSECT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserEXCEPT_: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1630) - p.Match(SQLiteParserEXCEPT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IUpdate_stmtContext is an interface to support dynamic dispatch. -type IUpdate_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - UPDATE_() antlr.TerminalNode - Qualified_table_name() IQualified_table_nameContext - SET_() antlr.TerminalNode - AllASSIGN() []antlr.TerminalNode - ASSIGN(i int) antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - AllColumn_name_list() []IColumn_name_listContext - Column_name_list(i int) IColumn_name_listContext - With_clause() IWith_clauseContext - OR_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - WHERE_() antlr.TerminalNode - Returning_clause() IReturning_clauseContext - ROLLBACK_() antlr.TerminalNode - ABORT_() antlr.TerminalNode - REPLACE_() antlr.TerminalNode - FAIL_() antlr.TerminalNode - IGNORE_() antlr.TerminalNode - - // IsUpdate_stmtContext differentiates from other interfaces. - IsUpdate_stmtContext() -} - -type Update_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyUpdate_stmtContext() *Update_stmtContext { - var p = new(Update_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_update_stmt - return p -} - -func InitEmptyUpdate_stmtContext(p *Update_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_update_stmt -} - -func (*Update_stmtContext) IsUpdate_stmtContext() {} - -func NewUpdate_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmtContext { - var p = new(Update_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_update_stmt - - return p -} - -func (s *Update_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Update_stmtContext) UPDATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUPDATE_, 0) -} - -func (s *Update_stmtContext) Qualified_table_name() IQualified_table_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IQualified_table_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IQualified_table_nameContext) -} - -func (s *Update_stmtContext) SET_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSET_, 0) -} - -func (s *Update_stmtContext) AllASSIGN() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserASSIGN) -} - -func (s *Update_stmtContext) ASSIGN(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserASSIGN, i) -} - -func (s *Update_stmtContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Update_stmtContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Update_stmtContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Update_stmtContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Update_stmtContext) AllColumn_name_list() []IColumn_name_listContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_name_listContext); ok { - len++ - } - } - - tst := make([]IColumn_name_listContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_name_listContext); ok { - tst[i] = t.(IColumn_name_listContext) - i++ - } - } - - return tst -} - -func (s *Update_stmtContext) Column_name_list(i int) IColumn_name_listContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_name_listContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_name_listContext) -} - -func (s *Update_stmtContext) With_clause() IWith_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWith_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWith_clauseContext) -} - -func (s *Update_stmtContext) OR_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOR_, 0) -} - -func (s *Update_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Update_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Update_stmtContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *Update_stmtContext) Returning_clause() IReturning_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IReturning_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IReturning_clauseContext) -} - -func (s *Update_stmtContext) ROLLBACK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROLLBACK_, 0) -} - -func (s *Update_stmtContext) ABORT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserABORT_, 0) -} - -func (s *Update_stmtContext) REPLACE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREPLACE_, 0) -} - -func (s *Update_stmtContext) FAIL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFAIL_, 0) -} - -func (s *Update_stmtContext) IGNORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIGNORE_, 0) -} - -func (s *Update_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Update_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Update_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterUpdate_stmt(s) - } -} - -func (s *Update_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitUpdate_stmt(s) - } -} - -func (p *SQLiteParser) Update_stmt() (localctx IUpdate_stmtContext) { - localctx = NewUpdate_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 106, SQLiteParserRULE_update_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1634) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(1633) - p.With_clause() - } - - } - { - p.SetState(1636) - p.Match(SQLiteParserUPDATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1639) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 239, p.GetParserRuleContext()) == 1 { - { - p.SetState(1637) - p.Match(SQLiteParserOR_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1638) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1641) - p.Qualified_table_name() - } - { - p.SetState(1642) - p.Match(SQLiteParserSET_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1645) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 240, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1643) - p.Column_name() - } - - case 2: - { - p.SetState(1644) - p.Column_name_list() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1647) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1648) - p.expr(0) - } - p.SetState(1659) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1649) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1652) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 241, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1650) - p.Column_name() - } - - case 2: - { - p.SetState(1651) - p.Column_name_list() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1654) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1655) - p.expr(0) - } - - p.SetState(1661) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(1664) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(1662) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1663) - p.expr(0) - } - - } - p.SetState(1667) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserRETURNING_ { - { - p.SetState(1666) - p.Returning_clause() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IColumn_name_listContext is an interface to support dynamic dispatch. -type IColumn_name_listContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - OPEN_PAR() antlr.TerminalNode - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - CLOSE_PAR() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsColumn_name_listContext differentiates from other interfaces. - IsColumn_name_listContext() -} - -type Column_name_listContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyColumn_name_listContext() *Column_name_listContext { - var p = new(Column_name_listContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_name_list - return p -} - -func InitEmptyColumn_name_listContext(p *Column_name_listContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_name_list -} - -func (*Column_name_listContext) IsColumn_name_listContext() {} - -func NewColumn_name_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_name_listContext { - var p = new(Column_name_listContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_column_name_list - - return p -} - -func (s *Column_name_listContext) GetParser() antlr.Parser { return s.parser } - -func (s *Column_name_listContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Column_name_listContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Column_name_listContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Column_name_listContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Column_name_listContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Column_name_listContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Column_name_listContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Column_name_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Column_name_listContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterColumn_name_list(s) - } -} - -func (s *Column_name_listContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitColumn_name_list(s) - } -} - -func (p *SQLiteParser) Column_name_list() (localctx IColumn_name_listContext) { - localctx = NewColumn_name_listContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 108, SQLiteParserRULE_column_name_list) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1669) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1670) - p.Column_name() - } - p.SetState(1675) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1671) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1672) - p.Column_name() - } - - p.SetState(1677) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - { - p.SetState(1678) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IUpdate_stmt_limitedContext is an interface to support dynamic dispatch. -type IUpdate_stmt_limitedContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - UPDATE_() antlr.TerminalNode - Qualified_table_name() IQualified_table_nameContext - SET_() antlr.TerminalNode - AllASSIGN() []antlr.TerminalNode - ASSIGN(i int) antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - AllColumn_name() []IColumn_nameContext - Column_name(i int) IColumn_nameContext - AllColumn_name_list() []IColumn_name_listContext - Column_name_list(i int) IColumn_name_listContext - With_clause() IWith_clauseContext - OR_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - WHERE_() antlr.TerminalNode - Limit_stmt() ILimit_stmtContext - ROLLBACK_() antlr.TerminalNode - ABORT_() antlr.TerminalNode - REPLACE_() antlr.TerminalNode - FAIL_() antlr.TerminalNode - IGNORE_() antlr.TerminalNode - Order_by_stmt() IOrder_by_stmtContext - - // IsUpdate_stmt_limitedContext differentiates from other interfaces. - IsUpdate_stmt_limitedContext() -} - -type Update_stmt_limitedContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyUpdate_stmt_limitedContext() *Update_stmt_limitedContext { - var p = new(Update_stmt_limitedContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_update_stmt_limited - return p -} - -func InitEmptyUpdate_stmt_limitedContext(p *Update_stmt_limitedContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_update_stmt_limited -} - -func (*Update_stmt_limitedContext) IsUpdate_stmt_limitedContext() {} - -func NewUpdate_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmt_limitedContext { - var p = new(Update_stmt_limitedContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_update_stmt_limited - - return p -} - -func (s *Update_stmt_limitedContext) GetParser() antlr.Parser { return s.parser } - -func (s *Update_stmt_limitedContext) UPDATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUPDATE_, 0) -} - -func (s *Update_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IQualified_table_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IQualified_table_nameContext) -} - -func (s *Update_stmt_limitedContext) SET_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSET_, 0) -} - -func (s *Update_stmt_limitedContext) AllASSIGN() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserASSIGN) -} - -func (s *Update_stmt_limitedContext) ASSIGN(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserASSIGN, i) -} - -func (s *Update_stmt_limitedContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Update_stmt_limitedContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Update_stmt_limitedContext) AllColumn_name() []IColumn_nameContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_nameContext); ok { - len++ - } - } - - tst := make([]IColumn_nameContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_nameContext); ok { - tst[i] = t.(IColumn_nameContext) - i++ - } - } - - return tst -} - -func (s *Update_stmt_limitedContext) Column_name(i int) IColumn_nameContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_nameContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_nameContext) -} - -func (s *Update_stmt_limitedContext) AllColumn_name_list() []IColumn_name_listContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IColumn_name_listContext); ok { - len++ - } - } - - tst := make([]IColumn_name_listContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IColumn_name_listContext); ok { - tst[i] = t.(IColumn_name_listContext) - i++ - } - } - - return tst -} - -func (s *Update_stmt_limitedContext) Column_name_list(i int) IColumn_name_listContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_name_listContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IColumn_name_listContext) -} - -func (s *Update_stmt_limitedContext) With_clause() IWith_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWith_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWith_clauseContext) -} - -func (s *Update_stmt_limitedContext) OR_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOR_, 0) -} - -func (s *Update_stmt_limitedContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Update_stmt_limitedContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Update_stmt_limitedContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *Update_stmt_limitedContext) Limit_stmt() ILimit_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ILimit_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ILimit_stmtContext) -} - -func (s *Update_stmt_limitedContext) ROLLBACK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROLLBACK_, 0) -} - -func (s *Update_stmt_limitedContext) ABORT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserABORT_, 0) -} - -func (s *Update_stmt_limitedContext) REPLACE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREPLACE_, 0) -} - -func (s *Update_stmt_limitedContext) FAIL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFAIL_, 0) -} - -func (s *Update_stmt_limitedContext) IGNORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIGNORE_, 0) -} - -func (s *Update_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_stmtContext) -} - -func (s *Update_stmt_limitedContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Update_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Update_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterUpdate_stmt_limited(s) - } -} - -func (s *Update_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitUpdate_stmt_limited(s) - } -} - -func (p *SQLiteParser) Update_stmt_limited() (localctx IUpdate_stmt_limitedContext) { - localctx = NewUpdate_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 110, SQLiteParserRULE_update_stmt_limited) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1681) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWITH_ { - { - p.SetState(1680) - p.With_clause() - } - - } - { - p.SetState(1683) - p.Match(SQLiteParserUPDATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1686) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 247, p.GetParserRuleContext()) == 1 { - { - p.SetState(1684) - p.Match(SQLiteParserOR_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1685) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1688) - p.Qualified_table_name() - } - { - p.SetState(1689) - p.Match(SQLiteParserSET_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1692) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 248, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1690) - p.Column_name() - } - - case 2: - { - p.SetState(1691) - p.Column_name_list() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1694) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1695) - p.expr(0) - } - p.SetState(1706) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1696) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1699) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 249, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1697) - p.Column_name() - } - - case 2: - { - p.SetState(1698) - p.Column_name_list() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - { - p.SetState(1701) - p.Match(SQLiteParserASSIGN) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1702) - p.expr(0) - } - - p.SetState(1708) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - p.SetState(1711) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserWHERE_ { - { - p.SetState(1709) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1710) - p.expr(0) - } - - } - p.SetState(1717) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserLIMIT_ || _la == SQLiteParserORDER_ { - p.SetState(1714) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserORDER_ { - { - p.SetState(1713) - p.Order_by_stmt() - } - - } - { - p.SetState(1716) - p.Limit_stmt() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IQualified_table_nameContext is an interface to support dynamic dispatch. -type IQualified_table_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Table_name() ITable_nameContext - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - AS_() antlr.TerminalNode - Alias() IAliasContext - INDEXED_() antlr.TerminalNode - BY_() antlr.TerminalNode - Index_name() IIndex_nameContext - NOT_() antlr.TerminalNode - - // IsQualified_table_nameContext differentiates from other interfaces. - IsQualified_table_nameContext() -} - -type Qualified_table_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyQualified_table_nameContext() *Qualified_table_nameContext { - var p = new(Qualified_table_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_qualified_table_name - return p -} - -func InitEmptyQualified_table_nameContext(p *Qualified_table_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_qualified_table_name -} - -func (*Qualified_table_nameContext) IsQualified_table_nameContext() {} - -func NewQualified_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Qualified_table_nameContext { - var p = new(Qualified_table_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_qualified_table_name - - return p -} - -func (s *Qualified_table_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Qualified_table_nameContext) Table_name() ITable_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ITable_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ITable_nameContext) -} - -func (s *Qualified_table_nameContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Qualified_table_nameContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Qualified_table_nameContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *Qualified_table_nameContext) Alias() IAliasContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAliasContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAliasContext) -} - -func (s *Qualified_table_nameContext) INDEXED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINDEXED_, 0) -} - -func (s *Qualified_table_nameContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *Qualified_table_nameContext) Index_name() IIndex_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIndex_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IIndex_nameContext) -} - -func (s *Qualified_table_nameContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Qualified_table_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Qualified_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Qualified_table_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterQualified_table_name(s) - } -} - -func (s *Qualified_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitQualified_table_name(s) - } -} - -func (p *SQLiteParser) Qualified_table_name() (localctx IQualified_table_nameContext) { - localctx = NewQualified_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 112, SQLiteParserRULE_qualified_table_name) - var _la int - - p.EnterOuterAlt(localctx, 1) - p.SetState(1722) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 254, p.GetParserRuleContext()) == 1 { - { - p.SetState(1719) - p.Schema_name() - } - { - p.SetState(1720) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1724) - p.Table_name() - } - p.SetState(1727) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserAS_ { - { - p.SetState(1725) - p.Match(SQLiteParserAS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1726) - p.Alias() - } - - } - p.SetState(1734) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserINDEXED_: - { - p.SetState(1729) - p.Match(SQLiteParserINDEXED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1730) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1731) - p.Index_name() - } - - case SQLiteParserNOT_: - { - p.SetState(1732) - p.Match(SQLiteParserNOT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1733) - p.Match(SQLiteParserINDEXED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserLIMIT_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_: - - default: - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IVacuum_stmtContext is an interface to support dynamic dispatch. -type IVacuum_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - VACUUM_() antlr.TerminalNode - Schema_name() ISchema_nameContext - INTO_() antlr.TerminalNode - Filename() IFilenameContext - - // IsVacuum_stmtContext differentiates from other interfaces. - IsVacuum_stmtContext() -} - -type Vacuum_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyVacuum_stmtContext() *Vacuum_stmtContext { - var p = new(Vacuum_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_vacuum_stmt - return p -} - -func InitEmptyVacuum_stmtContext(p *Vacuum_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_vacuum_stmt -} - -func (*Vacuum_stmtContext) IsVacuum_stmtContext() {} - -func NewVacuum_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Vacuum_stmtContext { - var p = new(Vacuum_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_vacuum_stmt - - return p -} - -func (s *Vacuum_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Vacuum_stmtContext) VACUUM_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVACUUM_, 0) -} - -func (s *Vacuum_stmtContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Vacuum_stmtContext) INTO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINTO_, 0) -} - -func (s *Vacuum_stmtContext) Filename() IFilenameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFilenameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFilenameContext) -} - -func (s *Vacuum_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Vacuum_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Vacuum_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterVacuum_stmt(s) - } -} - -func (s *Vacuum_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitVacuum_stmt(s) - } -} - -func (p *SQLiteParser) Vacuum_stmt() (localctx IVacuum_stmtContext) { - localctx = NewVacuum_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 114, SQLiteParserRULE_vacuum_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1736) - p.Match(SQLiteParserVACUUM_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1738) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 257, p.GetParserRuleContext()) == 1 { - { - p.SetState(1737) - p.Schema_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(1742) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserINTO_ { - { - p.SetState(1740) - p.Match(SQLiteParserINTO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1741) - p.Filename() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFilter_clauseContext is an interface to support dynamic dispatch. -type IFilter_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - FILTER_() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - WHERE_() antlr.TerminalNode - Expr() IExprContext - CLOSE_PAR() antlr.TerminalNode - - // IsFilter_clauseContext differentiates from other interfaces. - IsFilter_clauseContext() -} - -type Filter_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFilter_clauseContext() *Filter_clauseContext { - var p = new(Filter_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_filter_clause - return p -} - -func InitEmptyFilter_clauseContext(p *Filter_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_filter_clause -} - -func (*Filter_clauseContext) IsFilter_clauseContext() {} - -func NewFilter_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Filter_clauseContext { - var p = new(Filter_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_filter_clause - - return p -} - -func (s *Filter_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Filter_clauseContext) FILTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFILTER_, 0) -} - -func (s *Filter_clauseContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Filter_clauseContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *Filter_clauseContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Filter_clauseContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Filter_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Filter_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Filter_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFilter_clause(s) - } -} - -func (s *Filter_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFilter_clause(s) - } -} - -func (p *SQLiteParser) Filter_clause() (localctx IFilter_clauseContext) { - localctx = NewFilter_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 116, SQLiteParserRULE_filter_clause) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1744) - p.Match(SQLiteParserFILTER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1745) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1746) - p.Match(SQLiteParserWHERE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1747) - p.expr(0) - } - { - p.SetState(1748) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IWindow_defnContext is an interface to support dynamic dispatch. -type IWindow_defnContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - OPEN_PAR() antlr.TerminalNode - CLOSE_PAR() antlr.TerminalNode - ORDER_() antlr.TerminalNode - AllBY_() []antlr.TerminalNode - BY_(i int) antlr.TerminalNode - AllOrdering_term() []IOrdering_termContext - Ordering_term(i int) IOrdering_termContext - Base_window_name() IBase_window_nameContext - PARTITION_() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - Frame_spec() IFrame_specContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsWindow_defnContext differentiates from other interfaces. - IsWindow_defnContext() -} - -type Window_defnContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyWindow_defnContext() *Window_defnContext { - var p = new(Window_defnContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_defn - return p -} - -func InitEmptyWindow_defnContext(p *Window_defnContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_defn -} - -func (*Window_defnContext) IsWindow_defnContext() {} - -func NewWindow_defnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_defnContext { - var p = new(Window_defnContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_window_defn - - return p -} - -func (s *Window_defnContext) GetParser() antlr.Parser { return s.parser } - -func (s *Window_defnContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Window_defnContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Window_defnContext) ORDER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserORDER_, 0) -} - -func (s *Window_defnContext) AllBY_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserBY_) -} - -func (s *Window_defnContext) BY_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, i) -} - -func (s *Window_defnContext) AllOrdering_term() []IOrdering_termContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IOrdering_termContext); ok { - len++ - } - } - - tst := make([]IOrdering_termContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IOrdering_termContext); ok { - tst[i] = t.(IOrdering_termContext) - i++ - } - } - - return tst -} - -func (s *Window_defnContext) Ordering_term(i int) IOrdering_termContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrdering_termContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IOrdering_termContext) -} - -func (s *Window_defnContext) Base_window_name() IBase_window_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IBase_window_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IBase_window_nameContext) -} - -func (s *Window_defnContext) PARTITION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPARTITION_, 0) -} - -func (s *Window_defnContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Window_defnContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Window_defnContext) Frame_spec() IFrame_specContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFrame_specContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFrame_specContext) -} - -func (s *Window_defnContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Window_defnContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Window_defnContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Window_defnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Window_defnContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterWindow_defn(s) - } -} - -func (s *Window_defnContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitWindow_defn(s) - } -} - -func (p *SQLiteParser) Window_defn() (localctx IWindow_defnContext) { - localctx = NewWindow_defnContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 118, SQLiteParserRULE_window_defn) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1750) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1752) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 259, p.GetParserRuleContext()) == 1 { - { - p.SetState(1751) - p.Base_window_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(1764) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(1754) - p.Match(SQLiteParserPARTITION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1755) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1756) - p.expr(0) - } - p.SetState(1761) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1757) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1758) - p.expr(0) - } - - p.SetState(1763) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } - - { - p.SetState(1766) - p.Match(SQLiteParserORDER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1767) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1768) - p.Ordering_term() - } - p.SetState(1773) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1769) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1770) - p.Ordering_term() - } - - p.SetState(1775) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - p.SetState(1777) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { - { - p.SetState(1776) - p.Frame_spec() - } - - } - { - p.SetState(1779) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IOver_clauseContext is an interface to support dynamic dispatch. -type IOver_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - OVER_() antlr.TerminalNode - Window_name() IWindow_nameContext - OPEN_PAR() antlr.TerminalNode - CLOSE_PAR() antlr.TerminalNode - Base_window_name() IBase_window_nameContext - PARTITION_() antlr.TerminalNode - AllBY_() []antlr.TerminalNode - BY_(i int) antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - ORDER_() antlr.TerminalNode - AllOrdering_term() []IOrdering_termContext - Ordering_term(i int) IOrdering_termContext - Frame_spec() IFrame_specContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsOver_clauseContext differentiates from other interfaces. - IsOver_clauseContext() -} - -type Over_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyOver_clauseContext() *Over_clauseContext { - var p = new(Over_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_over_clause - return p -} - -func InitEmptyOver_clauseContext(p *Over_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_over_clause -} - -func (*Over_clauseContext) IsOver_clauseContext() {} - -func NewOver_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Over_clauseContext { - var p = new(Over_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_over_clause - - return p -} - -func (s *Over_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Over_clauseContext) OVER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOVER_, 0) -} - -func (s *Over_clauseContext) Window_name() IWindow_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWindow_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWindow_nameContext) -} - -func (s *Over_clauseContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Over_clauseContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Over_clauseContext) Base_window_name() IBase_window_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IBase_window_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IBase_window_nameContext) -} - -func (s *Over_clauseContext) PARTITION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPARTITION_, 0) -} - -func (s *Over_clauseContext) AllBY_() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserBY_) -} - -func (s *Over_clauseContext) BY_(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, i) -} - -func (s *Over_clauseContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Over_clauseContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Over_clauseContext) ORDER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserORDER_, 0) -} - -func (s *Over_clauseContext) AllOrdering_term() []IOrdering_termContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IOrdering_termContext); ok { - len++ - } - } - - tst := make([]IOrdering_termContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IOrdering_termContext); ok { - tst[i] = t.(IOrdering_termContext) - i++ - } - } - - return tst -} - -func (s *Over_clauseContext) Ordering_term(i int) IOrdering_termContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrdering_termContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IOrdering_termContext) -} - -func (s *Over_clauseContext) Frame_spec() IFrame_specContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFrame_specContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFrame_specContext) -} - -func (s *Over_clauseContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Over_clauseContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Over_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Over_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Over_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterOver_clause(s) - } -} - -func (s *Over_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitOver_clause(s) - } -} - -func (p *SQLiteParser) Over_clause() (localctx IOver_clauseContext) { - localctx = NewOver_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 120, SQLiteParserRULE_over_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1781) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1815) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 270, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1782) - p.Window_name() - } - - case 2: - { - p.SetState(1783) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1785) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 264, p.GetParserRuleContext()) == 1 { - { - p.SetState(1784) - p.Base_window_name() - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(1797) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(1787) - p.Match(SQLiteParserPARTITION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1788) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1789) - p.expr(0) - } - p.SetState(1794) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1790) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1791) - p.expr(0) - } - - p.SetState(1796) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } - p.SetState(1809) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserORDER_ { - { - p.SetState(1799) - p.Match(SQLiteParserORDER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1800) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1801) - p.Ordering_term() - } - p.SetState(1806) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1802) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1803) - p.Ordering_term() - } - - p.SetState(1808) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - } - p.SetState(1812) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { - { - p.SetState(1811) - p.Frame_spec() - } - - } - { - p.SetState(1814) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFrame_specContext is an interface to support dynamic dispatch. -type IFrame_specContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Frame_clause() IFrame_clauseContext - EXCLUDE_() antlr.TerminalNode - CURRENT_() antlr.TerminalNode - ROW_() antlr.TerminalNode - GROUP_() antlr.TerminalNode - TIES_() antlr.TerminalNode - NO_() antlr.TerminalNode - OTHERS_() antlr.TerminalNode - - // IsFrame_specContext differentiates from other interfaces. - IsFrame_specContext() -} - -type Frame_specContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFrame_specContext() *Frame_specContext { - var p = new(Frame_specContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_spec - return p -} - -func InitEmptyFrame_specContext(p *Frame_specContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_spec -} - -func (*Frame_specContext) IsFrame_specContext() {} - -func NewFrame_specContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_specContext { - var p = new(Frame_specContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_frame_spec - - return p -} - -func (s *Frame_specContext) GetParser() antlr.Parser { return s.parser } - -func (s *Frame_specContext) Frame_clause() IFrame_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFrame_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFrame_clauseContext) -} - -func (s *Frame_specContext) EXCLUDE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXCLUDE_, 0) -} - -func (s *Frame_specContext) CURRENT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_, 0) -} - -func (s *Frame_specContext) ROW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_, 0) -} - -func (s *Frame_specContext) GROUP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGROUP_, 0) -} - -func (s *Frame_specContext) TIES_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTIES_, 0) -} - -func (s *Frame_specContext) NO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNO_, 0) -} - -func (s *Frame_specContext) OTHERS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOTHERS_, 0) -} - -func (s *Frame_specContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Frame_specContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Frame_specContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFrame_spec(s) - } -} - -func (s *Frame_specContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFrame_spec(s) - } -} - -func (p *SQLiteParser) Frame_spec() (localctx IFrame_specContext) { - localctx = NewFrame_specContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 122, SQLiteParserRULE_frame_spec) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1817) - p.Frame_clause() - } - p.SetState(1825) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserEXCLUDE_: - { - p.SetState(1818) - p.Match(SQLiteParserEXCLUDE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - { - p.SetState(1819) - p.Match(SQLiteParserNO_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1820) - p.Match(SQLiteParserOTHERS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserCURRENT_: - { - p.SetState(1821) - p.Match(SQLiteParserCURRENT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1822) - p.Match(SQLiteParserROW_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserGROUP_: - { - p.SetState(1823) - p.Match(SQLiteParserGROUP_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserTIES_: - { - p.SetState(1824) - p.Match(SQLiteParserTIES_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserCLOSE_PAR: - - default: - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFrame_clauseContext is an interface to support dynamic dispatch. -type IFrame_clauseContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - RANGE_() antlr.TerminalNode - ROWS_() antlr.TerminalNode - GROUPS_() antlr.TerminalNode - Frame_single() IFrame_singleContext - BETWEEN_() antlr.TerminalNode - Frame_left() IFrame_leftContext - AND_() antlr.TerminalNode - Frame_right() IFrame_rightContext - - // IsFrame_clauseContext differentiates from other interfaces. - IsFrame_clauseContext() -} - -type Frame_clauseContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFrame_clauseContext() *Frame_clauseContext { - var p = new(Frame_clauseContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_clause - return p -} - -func InitEmptyFrame_clauseContext(p *Frame_clauseContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_clause -} - -func (*Frame_clauseContext) IsFrame_clauseContext() {} - -func NewFrame_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_clauseContext { - var p = new(Frame_clauseContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_frame_clause - - return p -} - -func (s *Frame_clauseContext) GetParser() antlr.Parser { return s.parser } - -func (s *Frame_clauseContext) RANGE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRANGE_, 0) -} - -func (s *Frame_clauseContext) ROWS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROWS_, 0) -} - -func (s *Frame_clauseContext) GROUPS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGROUPS_, 0) -} - -func (s *Frame_clauseContext) Frame_single() IFrame_singleContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFrame_singleContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFrame_singleContext) -} - -func (s *Frame_clauseContext) BETWEEN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBETWEEN_, 0) -} - -func (s *Frame_clauseContext) Frame_left() IFrame_leftContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFrame_leftContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFrame_leftContext) -} - -func (s *Frame_clauseContext) AND_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAND_, 0) -} - -func (s *Frame_clauseContext) Frame_right() IFrame_rightContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFrame_rightContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFrame_rightContext) -} - -func (s *Frame_clauseContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Frame_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Frame_clauseContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFrame_clause(s) - } -} - -func (s *Frame_clauseContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFrame_clause(s) - } -} - -func (p *SQLiteParser) Frame_clause() (localctx IFrame_clauseContext) { - localctx = NewFrame_clauseContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 124, SQLiteParserRULE_frame_clause) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1827) - _la = p.GetTokenStream().LA(1) - - if !((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - p.SetState(1834) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 272, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1828) - p.Frame_single() - } - - case 2: - { - p.SetState(1829) - p.Match(SQLiteParserBETWEEN_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1830) - p.Frame_left() - } - { - p.SetState(1831) - p.Match(SQLiteParserAND_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1832) - p.Frame_right() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISimple_function_invocationContext is an interface to support dynamic dispatch. -type ISimple_function_invocationContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Simple_func() ISimple_funcContext - OPEN_PAR() antlr.TerminalNode - CLOSE_PAR() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - STAR() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsSimple_function_invocationContext differentiates from other interfaces. - IsSimple_function_invocationContext() -} - -type Simple_function_invocationContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySimple_function_invocationContext() *Simple_function_invocationContext { - var p = new(Simple_function_invocationContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_simple_function_invocation - return p -} - -func InitEmptySimple_function_invocationContext(p *Simple_function_invocationContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_simple_function_invocation -} - -func (*Simple_function_invocationContext) IsSimple_function_invocationContext() {} - -func NewSimple_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_function_invocationContext { - var p = new(Simple_function_invocationContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_simple_function_invocation - - return p -} - -func (s *Simple_function_invocationContext) GetParser() antlr.Parser { return s.parser } - -func (s *Simple_function_invocationContext) Simple_func() ISimple_funcContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISimple_funcContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISimple_funcContext) -} - -func (s *Simple_function_invocationContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Simple_function_invocationContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Simple_function_invocationContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Simple_function_invocationContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Simple_function_invocationContext) STAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, 0) -} - -func (s *Simple_function_invocationContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Simple_function_invocationContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Simple_function_invocationContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Simple_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Simple_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSimple_function_invocation(s) - } -} - -func (s *Simple_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSimple_function_invocation(s) - } -} - -func (p *SQLiteParser) Simple_function_invocation() (localctx ISimple_function_invocationContext) { - localctx = NewSimple_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 126, SQLiteParserRULE_simple_function_invocation) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1836) - p.Simple_func() - } - { - p.SetState(1837) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1847) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: - { - p.SetState(1838) - p.expr(0) - } - p.SetState(1843) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1839) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1840) - p.expr(0) - } - - p.SetState(1845) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case SQLiteParserSTAR: - { - p.SetState(1846) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - { - p.SetState(1849) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAggregate_function_invocationContext is an interface to support dynamic dispatch. -type IAggregate_function_invocationContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Aggregate_func() IAggregate_funcContext - OPEN_PAR() antlr.TerminalNode - CLOSE_PAR() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - STAR() antlr.TerminalNode - Filter_clause() IFilter_clauseContext - DISTINCT_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsAggregate_function_invocationContext differentiates from other interfaces. - IsAggregate_function_invocationContext() -} - -type Aggregate_function_invocationContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyAggregate_function_invocationContext() *Aggregate_function_invocationContext { - var p = new(Aggregate_function_invocationContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation - return p -} - -func InitEmptyAggregate_function_invocationContext(p *Aggregate_function_invocationContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation -} - -func (*Aggregate_function_invocationContext) IsAggregate_function_invocationContext() {} - -func NewAggregate_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_function_invocationContext { - var p = new(Aggregate_function_invocationContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation - - return p -} - -func (s *Aggregate_function_invocationContext) GetParser() antlr.Parser { return s.parser } - -func (s *Aggregate_function_invocationContext) Aggregate_func() IAggregate_funcContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAggregate_funcContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAggregate_funcContext) -} - -func (s *Aggregate_function_invocationContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Aggregate_function_invocationContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Aggregate_function_invocationContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Aggregate_function_invocationContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Aggregate_function_invocationContext) STAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, 0) -} - -func (s *Aggregate_function_invocationContext) Filter_clause() IFilter_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFilter_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFilter_clauseContext) -} - -func (s *Aggregate_function_invocationContext) DISTINCT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDISTINCT_, 0) -} - -func (s *Aggregate_function_invocationContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Aggregate_function_invocationContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Aggregate_function_invocationContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Aggregate_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Aggregate_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAggregate_function_invocation(s) - } -} - -func (s *Aggregate_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAggregate_function_invocation(s) - } -} - -func (p *SQLiteParser) Aggregate_function_invocation() (localctx IAggregate_function_invocationContext) { - localctx = NewAggregate_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 128, SQLiteParserRULE_aggregate_function_invocation) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1851) - p.Aggregate_func() - } - { - p.SetState(1852) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1865) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: - p.SetState(1854) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 275, p.GetParserRuleContext()) == 1 { - { - p.SetState(1853) - p.Match(SQLiteParserDISTINCT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1856) - p.expr(0) - } - p.SetState(1861) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1857) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1858) - p.expr(0) - } - - p.SetState(1863) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case SQLiteParserSTAR: - { - p.SetState(1864) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserCLOSE_PAR: - - default: - } - { - p.SetState(1867) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1869) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserFILTER_ { - { - p.SetState(1868) - p.Filter_clause() - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IWindow_function_invocationContext is an interface to support dynamic dispatch. -type IWindow_function_invocationContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Window_function() IWindow_functionContext - OPEN_PAR() antlr.TerminalNode - CLOSE_PAR() antlr.TerminalNode - OVER_() antlr.TerminalNode - Window_defn() IWindow_defnContext - Window_name() IWindow_nameContext - AllExpr() []IExprContext - Expr(i int) IExprContext - STAR() antlr.TerminalNode - Filter_clause() IFilter_clauseContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsWindow_function_invocationContext differentiates from other interfaces. - IsWindow_function_invocationContext() -} - -type Window_function_invocationContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyWindow_function_invocationContext() *Window_function_invocationContext { - var p = new(Window_function_invocationContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_function_invocation - return p -} - -func InitEmptyWindow_function_invocationContext(p *Window_function_invocationContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_function_invocation -} - -func (*Window_function_invocationContext) IsWindow_function_invocationContext() {} - -func NewWindow_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_function_invocationContext { - var p = new(Window_function_invocationContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_window_function_invocation - - return p -} - -func (s *Window_function_invocationContext) GetParser() antlr.Parser { return s.parser } - -func (s *Window_function_invocationContext) Window_function() IWindow_functionContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWindow_functionContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWindow_functionContext) -} - -func (s *Window_function_invocationContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Window_function_invocationContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Window_function_invocationContext) OVER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOVER_, 0) -} - -func (s *Window_function_invocationContext) Window_defn() IWindow_defnContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWindow_defnContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWindow_defnContext) -} - -func (s *Window_function_invocationContext) Window_name() IWindow_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IWindow_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IWindow_nameContext) -} - -func (s *Window_function_invocationContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Window_function_invocationContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Window_function_invocationContext) STAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTAR, 0) -} - -func (s *Window_function_invocationContext) Filter_clause() IFilter_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFilter_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFilter_clauseContext) -} - -func (s *Window_function_invocationContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Window_function_invocationContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Window_function_invocationContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Window_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Window_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterWindow_function_invocation(s) - } -} - -func (s *Window_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitWindow_function_invocation(s) - } -} - -func (p *SQLiteParser) Window_function_invocation() (localctx IWindow_function_invocationContext) { - localctx = NewWindow_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 130, SQLiteParserRULE_window_function_invocation) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1871) - p.Window_function() - } - { - p.SetState(1872) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1882) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - switch p.GetTokenStream().LA(1) { - case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL: - { - p.SetState(1873) - p.expr(0) - } - p.SetState(1878) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1874) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1875) - p.expr(0) - } - - p.SetState(1880) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - - case SQLiteParserSTAR: - { - p.SetState(1881) - p.Match(SQLiteParserSTAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserCLOSE_PAR: - - default: - } - { - p.SetState(1884) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1886) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserFILTER_ { - { - p.SetState(1885) - p.Filter_clause() - } - - } - { - p.SetState(1888) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1891) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 282, p.GetParserRuleContext()) { - case 1: - { - p.SetState(1889) - p.Window_defn() - } - - case 2: - { - p.SetState(1890) - p.Window_name() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICommon_table_stmtContext is an interface to support dynamic dispatch. -type ICommon_table_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - WITH_() antlr.TerminalNode - AllCommon_table_expression() []ICommon_table_expressionContext - Common_table_expression(i int) ICommon_table_expressionContext - RECURSIVE_() antlr.TerminalNode - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsCommon_table_stmtContext differentiates from other interfaces. - IsCommon_table_stmtContext() -} - -type Common_table_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCommon_table_stmtContext() *Common_table_stmtContext { - var p = new(Common_table_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_common_table_stmt - return p -} - -func InitEmptyCommon_table_stmtContext(p *Common_table_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_common_table_stmt -} - -func (*Common_table_stmtContext) IsCommon_table_stmtContext() {} - -func NewCommon_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_stmtContext { - var p = new(Common_table_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_common_table_stmt - - return p -} - -func (s *Common_table_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Common_table_stmtContext) WITH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWITH_, 0) -} - -func (s *Common_table_stmtContext) AllCommon_table_expression() []ICommon_table_expressionContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(ICommon_table_expressionContext); ok { - len++ - } - } - - tst := make([]ICommon_table_expressionContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(ICommon_table_expressionContext); ok { - tst[i] = t.(ICommon_table_expressionContext) - i++ - } - } - - return tst -} - -func (s *Common_table_stmtContext) Common_table_expression(i int) ICommon_table_expressionContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICommon_table_expressionContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(ICommon_table_expressionContext) -} - -func (s *Common_table_stmtContext) RECURSIVE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRECURSIVE_, 0) -} - -func (s *Common_table_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Common_table_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Common_table_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Common_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Common_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCommon_table_stmt(s) - } -} - -func (s *Common_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCommon_table_stmt(s) - } -} - -func (p *SQLiteParser) Common_table_stmt() (localctx ICommon_table_stmtContext) { - localctx = NewCommon_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 132, SQLiteParserRULE_common_table_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1893) - p.Match(SQLiteParserWITH_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1895) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 283, p.GetParserRuleContext()) == 1 { - { - p.SetState(1894) - p.Match(SQLiteParserRECURSIVE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(1897) - p.Common_table_expression() - } - p.SetState(1902) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1898) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1899) - p.Common_table_expression() - } - - p.SetState(1904) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IOrder_by_stmtContext is an interface to support dynamic dispatch. -type IOrder_by_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ORDER_() antlr.TerminalNode - BY_() antlr.TerminalNode - AllOrdering_term() []IOrdering_termContext - Ordering_term(i int) IOrdering_termContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsOrder_by_stmtContext differentiates from other interfaces. - IsOrder_by_stmtContext() -} - -type Order_by_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyOrder_by_stmtContext() *Order_by_stmtContext { - var p = new(Order_by_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_order_by_stmt - return p -} - -func InitEmptyOrder_by_stmtContext(p *Order_by_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_order_by_stmt -} - -func (*Order_by_stmtContext) IsOrder_by_stmtContext() {} - -func NewOrder_by_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_stmtContext { - var p = new(Order_by_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_order_by_stmt - - return p -} - -func (s *Order_by_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Order_by_stmtContext) ORDER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserORDER_, 0) -} - -func (s *Order_by_stmtContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *Order_by_stmtContext) AllOrdering_term() []IOrdering_termContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IOrdering_termContext); ok { - len++ - } - } - - tst := make([]IOrdering_termContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IOrdering_termContext); ok { - tst[i] = t.(IOrdering_termContext) - i++ - } - } - - return tst -} - -func (s *Order_by_stmtContext) Ordering_term(i int) IOrdering_termContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrdering_termContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IOrdering_termContext) -} - -func (s *Order_by_stmtContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Order_by_stmtContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Order_by_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Order_by_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Order_by_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterOrder_by_stmt(s) - } -} - -func (s *Order_by_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitOrder_by_stmt(s) - } -} - -func (p *SQLiteParser) Order_by_stmt() (localctx IOrder_by_stmtContext) { - localctx = NewOrder_by_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 134, SQLiteParserRULE_order_by_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1905) - p.Match(SQLiteParserORDER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1906) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1907) - p.Ordering_term() - } - p.SetState(1912) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(1908) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1909) - p.Ordering_term() - } - - p.SetState(1914) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ILimit_stmtContext is an interface to support dynamic dispatch. -type ILimit_stmtContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - LIMIT_() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - OFFSET_() antlr.TerminalNode - COMMA() antlr.TerminalNode - - // IsLimit_stmtContext differentiates from other interfaces. - IsLimit_stmtContext() -} - -type Limit_stmtContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyLimit_stmtContext() *Limit_stmtContext { - var p = new(Limit_stmtContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_limit_stmt - return p -} - -func InitEmptyLimit_stmtContext(p *Limit_stmtContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_limit_stmt -} - -func (*Limit_stmtContext) IsLimit_stmtContext() {} - -func NewLimit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Limit_stmtContext { - var p = new(Limit_stmtContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_limit_stmt - - return p -} - -func (s *Limit_stmtContext) GetParser() antlr.Parser { return s.parser } - -func (s *Limit_stmtContext) LIMIT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLIMIT_, 0) -} - -func (s *Limit_stmtContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Limit_stmtContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Limit_stmtContext) OFFSET_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOFFSET_, 0) -} - -func (s *Limit_stmtContext) COMMA() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, 0) -} - -func (s *Limit_stmtContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Limit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Limit_stmtContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterLimit_stmt(s) - } -} - -func (s *Limit_stmtContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitLimit_stmt(s) - } -} - -func (p *SQLiteParser) Limit_stmt() (localctx ILimit_stmtContext) { - localctx = NewLimit_stmtContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 136, SQLiteParserRULE_limit_stmt) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1915) - p.Match(SQLiteParserLIMIT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1916) - p.expr(0) - } - p.SetState(1919) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_ { - { - p.SetState(1917) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1918) - p.expr(0) - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IOrdering_termContext is an interface to support dynamic dispatch. -type IOrdering_termContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Expr() IExprContext - COLLATE_() antlr.TerminalNode - Collation_name() ICollation_nameContext - Asc_desc() IAsc_descContext - NULLS_() antlr.TerminalNode - FIRST_() antlr.TerminalNode - LAST_() antlr.TerminalNode - - // IsOrdering_termContext differentiates from other interfaces. - IsOrdering_termContext() -} - -type Ordering_termContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyOrdering_termContext() *Ordering_termContext { - var p = new(Ordering_termContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_ordering_term - return p -} - -func InitEmptyOrdering_termContext(p *Ordering_termContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_ordering_term -} - -func (*Ordering_termContext) IsOrdering_termContext() {} - -func NewOrdering_termContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ordering_termContext { - var p = new(Ordering_termContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_ordering_term - - return p -} - -func (s *Ordering_termContext) GetParser() antlr.Parser { return s.parser } - -func (s *Ordering_termContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Ordering_termContext) COLLATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOLLATE_, 0) -} - -func (s *Ordering_termContext) Collation_name() ICollation_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ICollation_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ICollation_nameContext) -} - -func (s *Ordering_termContext) Asc_desc() IAsc_descContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAsc_descContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAsc_descContext) -} - -func (s *Ordering_termContext) NULLS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNULLS_, 0) -} - -func (s *Ordering_termContext) FIRST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFIRST_, 0) -} - -func (s *Ordering_termContext) LAST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLAST_, 0) -} - -func (s *Ordering_termContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Ordering_termContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Ordering_termContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterOrdering_term(s) - } -} - -func (s *Ordering_termContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitOrdering_term(s) - } -} - -func (p *SQLiteParser) Ordering_term() (localctx IOrdering_termContext) { - localctx = NewOrdering_termContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 138, SQLiteParserRULE_ordering_term) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1921) - p.expr(0) - } - p.SetState(1924) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserCOLLATE_ { - { - p.SetState(1922) - p.Match(SQLiteParserCOLLATE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1923) - p.Collation_name() - } - - } - p.SetState(1927) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { - { - p.SetState(1926) - p.Asc_desc() - } - - } - p.SetState(1931) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserNULLS_ { - { - p.SetState(1929) - p.Match(SQLiteParserNULLS_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1930) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserFIRST_ || _la == SQLiteParserLAST_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAsc_descContext is an interface to support dynamic dispatch. -type IAsc_descContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ASC_() antlr.TerminalNode - DESC_() antlr.TerminalNode - - // IsAsc_descContext differentiates from other interfaces. - IsAsc_descContext() -} - -type Asc_descContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyAsc_descContext() *Asc_descContext { - var p = new(Asc_descContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_asc_desc - return p -} - -func InitEmptyAsc_descContext(p *Asc_descContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_asc_desc -} - -func (*Asc_descContext) IsAsc_descContext() {} - -func NewAsc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Asc_descContext { - var p = new(Asc_descContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_asc_desc - - return p -} - -func (s *Asc_descContext) GetParser() antlr.Parser { return s.parser } - -func (s *Asc_descContext) ASC_() antlr.TerminalNode { - return s.GetToken(SQLiteParserASC_, 0) -} - -func (s *Asc_descContext) DESC_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDESC_, 0) -} - -func (s *Asc_descContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Asc_descContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAsc_desc(s) - } -} - -func (s *Asc_descContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAsc_desc(s) - } -} - -func (p *SQLiteParser) Asc_desc() (localctx IAsc_descContext) { - localctx = NewAsc_descContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 140, SQLiteParserRULE_asc_desc) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1933) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserASC_ || _la == SQLiteParserDESC_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFrame_leftContext is an interface to support dynamic dispatch. -type IFrame_leftContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Expr() IExprContext - PRECEDING_() antlr.TerminalNode - FOLLOWING_() antlr.TerminalNode - CURRENT_() antlr.TerminalNode - ROW_() antlr.TerminalNode - UNBOUNDED_() antlr.TerminalNode - - // IsFrame_leftContext differentiates from other interfaces. - IsFrame_leftContext() -} - -type Frame_leftContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFrame_leftContext() *Frame_leftContext { - var p = new(Frame_leftContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_left - return p -} - -func InitEmptyFrame_leftContext(p *Frame_leftContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_left -} - -func (*Frame_leftContext) IsFrame_leftContext() {} - -func NewFrame_leftContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_leftContext { - var p = new(Frame_leftContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_frame_left - - return p -} - -func (s *Frame_leftContext) GetParser() antlr.Parser { return s.parser } - -func (s *Frame_leftContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Frame_leftContext) PRECEDING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRECEDING_, 0) -} - -func (s *Frame_leftContext) FOLLOWING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFOLLOWING_, 0) -} - -func (s *Frame_leftContext) CURRENT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_, 0) -} - -func (s *Frame_leftContext) ROW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_, 0) -} - -func (s *Frame_leftContext) UNBOUNDED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNBOUNDED_, 0) -} - -func (s *Frame_leftContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Frame_leftContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Frame_leftContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFrame_left(s) - } -} - -func (s *Frame_leftContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFrame_left(s) - } -} - -func (p *SQLiteParser) Frame_left() (localctx IFrame_leftContext) { - localctx = NewFrame_leftContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 142, SQLiteParserRULE_frame_left) - p.SetState(1945) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 290, p.GetParserRuleContext()) { - case 1: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1935) - p.expr(0) - } - { - p.SetState(1936) - p.Match(SQLiteParserPRECEDING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 2: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1938) - p.expr(0) - } - { - p.SetState(1939) - p.Match(SQLiteParserFOLLOWING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 3: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1941) - p.Match(SQLiteParserCURRENT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1942) - p.Match(SQLiteParserROW_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 4: - p.EnterOuterAlt(localctx, 4) - { - p.SetState(1943) - p.Match(SQLiteParserUNBOUNDED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1944) - p.Match(SQLiteParserPRECEDING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFrame_rightContext is an interface to support dynamic dispatch. -type IFrame_rightContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Expr() IExprContext - PRECEDING_() antlr.TerminalNode - FOLLOWING_() antlr.TerminalNode - CURRENT_() antlr.TerminalNode - ROW_() antlr.TerminalNode - UNBOUNDED_() antlr.TerminalNode - - // IsFrame_rightContext differentiates from other interfaces. - IsFrame_rightContext() -} - -type Frame_rightContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFrame_rightContext() *Frame_rightContext { - var p = new(Frame_rightContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_right - return p -} - -func InitEmptyFrame_rightContext(p *Frame_rightContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_right -} - -func (*Frame_rightContext) IsFrame_rightContext() {} - -func NewFrame_rightContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_rightContext { - var p = new(Frame_rightContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_frame_right - - return p -} - -func (s *Frame_rightContext) GetParser() antlr.Parser { return s.parser } - -func (s *Frame_rightContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Frame_rightContext) PRECEDING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRECEDING_, 0) -} - -func (s *Frame_rightContext) FOLLOWING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFOLLOWING_, 0) -} - -func (s *Frame_rightContext) CURRENT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_, 0) -} - -func (s *Frame_rightContext) ROW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_, 0) -} - -func (s *Frame_rightContext) UNBOUNDED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNBOUNDED_, 0) -} - -func (s *Frame_rightContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Frame_rightContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Frame_rightContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFrame_right(s) - } -} - -func (s *Frame_rightContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFrame_right(s) - } -} - -func (p *SQLiteParser) Frame_right() (localctx IFrame_rightContext) { - localctx = NewFrame_rightContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 144, SQLiteParserRULE_frame_right) - p.SetState(1957) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 291, p.GetParserRuleContext()) { - case 1: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1947) - p.expr(0) - } - { - p.SetState(1948) - p.Match(SQLiteParserPRECEDING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 2: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1950) - p.expr(0) - } - { - p.SetState(1951) - p.Match(SQLiteParserFOLLOWING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 3: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1953) - p.Match(SQLiteParserCURRENT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1954) - p.Match(SQLiteParserROW_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 4: - p.EnterOuterAlt(localctx, 4) - { - p.SetState(1955) - p.Match(SQLiteParserUNBOUNDED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1956) - p.Match(SQLiteParserFOLLOWING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFrame_singleContext is an interface to support dynamic dispatch. -type IFrame_singleContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Expr() IExprContext - PRECEDING_() antlr.TerminalNode - UNBOUNDED_() antlr.TerminalNode - CURRENT_() antlr.TerminalNode - ROW_() antlr.TerminalNode - - // IsFrame_singleContext differentiates from other interfaces. - IsFrame_singleContext() -} - -type Frame_singleContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFrame_singleContext() *Frame_singleContext { - var p = new(Frame_singleContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_single - return p -} - -func InitEmptyFrame_singleContext(p *Frame_singleContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_frame_single -} - -func (*Frame_singleContext) IsFrame_singleContext() {} - -func NewFrame_singleContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_singleContext { - var p = new(Frame_singleContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_frame_single - - return p -} - -func (s *Frame_singleContext) GetParser() antlr.Parser { return s.parser } - -func (s *Frame_singleContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Frame_singleContext) PRECEDING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRECEDING_, 0) -} - -func (s *Frame_singleContext) UNBOUNDED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNBOUNDED_, 0) -} - -func (s *Frame_singleContext) CURRENT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_, 0) -} - -func (s *Frame_singleContext) ROW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_, 0) -} - -func (s *Frame_singleContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Frame_singleContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Frame_singleContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFrame_single(s) - } -} - -func (s *Frame_singleContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFrame_single(s) - } -} - -func (p *SQLiteParser) Frame_single() (localctx IFrame_singleContext) { - localctx = NewFrame_singleContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 146, SQLiteParserRULE_frame_single) - p.SetState(1966) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 292, p.GetParserRuleContext()) { - case 1: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1959) - p.expr(0) - } - { - p.SetState(1960) - p.Match(SQLiteParserPRECEDING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 2: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1962) - p.Match(SQLiteParserUNBOUNDED_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1963) - p.Match(SQLiteParserPRECEDING_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case 3: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1964) - p.Match(SQLiteParserCURRENT_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1965) - p.Match(SQLiteParserROW_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IWindow_functionContext is an interface to support dynamic dispatch. -type IWindow_functionContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - AllOPEN_PAR() []antlr.TerminalNode - OPEN_PAR(i int) antlr.TerminalNode - Expr() IExprContext - AllCLOSE_PAR() []antlr.TerminalNode - CLOSE_PAR(i int) antlr.TerminalNode - OVER_() antlr.TerminalNode - Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext - FIRST_VALUE_() antlr.TerminalNode - LAST_VALUE_() antlr.TerminalNode - Partition_by() IPartition_byContext - Frame_clause() IFrame_clauseContext - CUME_DIST_() antlr.TerminalNode - PERCENT_RANK_() antlr.TerminalNode - Order_by_expr() IOrder_by_exprContext - DENSE_RANK_() antlr.TerminalNode - RANK_() antlr.TerminalNode - ROW_NUMBER_() antlr.TerminalNode - LAG_() antlr.TerminalNode - LEAD_() antlr.TerminalNode - Of_OF_fset() IOf_OF_fsetContext - Default_DEFAULT__value() IDefault_DEFAULT__valueContext - NTH_VALUE_() antlr.TerminalNode - COMMA() antlr.TerminalNode - Signed_number() ISigned_numberContext - NTILE_() antlr.TerminalNode - - // IsWindow_functionContext differentiates from other interfaces. - IsWindow_functionContext() -} - -type Window_functionContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyWindow_functionContext() *Window_functionContext { - var p = new(Window_functionContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_function - return p -} - -func InitEmptyWindow_functionContext(p *Window_functionContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_function -} - -func (*Window_functionContext) IsWindow_functionContext() {} - -func NewWindow_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_functionContext { - var p = new(Window_functionContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_window_function - - return p -} - -func (s *Window_functionContext) GetParser() antlr.Parser { return s.parser } - -func (s *Window_functionContext) AllOPEN_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserOPEN_PAR) -} - -func (s *Window_functionContext) OPEN_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, i) -} - -func (s *Window_functionContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Window_functionContext) AllCLOSE_PAR() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCLOSE_PAR) -} - -func (s *Window_functionContext) CLOSE_PAR(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, i) -} - -func (s *Window_functionContext) OVER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOVER_, 0) -} - -func (s *Window_functionContext) Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_expr_asc_descContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_expr_asc_descContext) -} - -func (s *Window_functionContext) FIRST_VALUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFIRST_VALUE_, 0) -} - -func (s *Window_functionContext) LAST_VALUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLAST_VALUE_, 0) -} - -func (s *Window_functionContext) Partition_by() IPartition_byContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IPartition_byContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IPartition_byContext) -} - -func (s *Window_functionContext) Frame_clause() IFrame_clauseContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFrame_clauseContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFrame_clauseContext) -} - -func (s *Window_functionContext) CUME_DIST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCUME_DIST_, 0) -} - -func (s *Window_functionContext) PERCENT_RANK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPERCENT_RANK_, 0) -} - -func (s *Window_functionContext) Order_by_expr() IOrder_by_exprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_exprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_exprContext) -} - -func (s *Window_functionContext) DENSE_RANK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDENSE_RANK_, 0) -} - -func (s *Window_functionContext) RANK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRANK_, 0) -} - -func (s *Window_functionContext) ROW_NUMBER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_NUMBER_, 0) -} - -func (s *Window_functionContext) LAG_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLAG_, 0) -} - -func (s *Window_functionContext) LEAD_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLEAD_, 0) -} - -func (s *Window_functionContext) Of_OF_fset() IOf_OF_fsetContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOf_OF_fsetContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOf_OF_fsetContext) -} - -func (s *Window_functionContext) Default_DEFAULT__value() IDefault_DEFAULT__valueContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IDefault_DEFAULT__valueContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IDefault_DEFAULT__valueContext) -} - -func (s *Window_functionContext) NTH_VALUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNTH_VALUE_, 0) -} - -func (s *Window_functionContext) COMMA() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, 0) -} - -func (s *Window_functionContext) Signed_number() ISigned_numberContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISigned_numberContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISigned_numberContext) -} - -func (s *Window_functionContext) NTILE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNTILE_, 0) -} - -func (s *Window_functionContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Window_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Window_functionContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterWindow_function(s) - } -} - -func (s *Window_functionContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitWindow_function(s) - } -} - -func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) { - localctx = NewWindow_functionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 148, SQLiteParserRULE_window_function) - var _la int - - p.SetState(2053) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserFIRST_VALUE_, SQLiteParserLAST_VALUE_: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(1968) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserFIRST_VALUE_ || _la == SQLiteParserLAST_VALUE_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1969) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1970) - p.expr(0) - } - { - p.SetState(1971) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1972) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1973) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1975) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(1974) - p.Partition_by() - } - - } - { - p.SetState(1977) - p.Order_by_expr_asc_desc() - } - p.SetState(1979) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { - { - p.SetState(1978) - p.Frame_clause() - } - - } - { - p.SetState(1981) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserCUME_DIST_, SQLiteParserPERCENT_RANK_: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(1983) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserCUME_DIST_ || _la == SQLiteParserPERCENT_RANK_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1984) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1985) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1986) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1987) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(1989) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(1988) - p.Partition_by() - } - - } - p.SetState(1992) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserORDER_ { - { - p.SetState(1991) - p.Order_by_expr() - } - - } - { - p.SetState(1994) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserDENSE_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(1995) - _la = p.GetTokenStream().LA(1) - - if !((int64((_la-163)) & ^0x3f) == 0 && ((int64(1)<<(_la-163))&385) != 0) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(1996) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1997) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1998) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(1999) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(2001) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(2000) - p.Partition_by() - } - - } - { - p.SetState(2003) - p.Order_by_expr_asc_desc() - } - { - p.SetState(2004) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserLAG_, SQLiteParserLEAD_: - p.EnterOuterAlt(localctx, 4) - { - p.SetState(2006) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserLAG_ || _la == SQLiteParserLEAD_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - { - p.SetState(2007) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2008) - p.expr(0) - } - p.SetState(2010) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 298, p.GetParserRuleContext()) == 1 { - { - p.SetState(2009) - p.Of_OF_fset() - } - - } else if p.HasError() { // JIM - goto errorExit - } - p.SetState(2013) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserCOMMA { - { - p.SetState(2012) - p.Default_DEFAULT__value() - } - - } - { - p.SetState(2015) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2016) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2017) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(2019) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(2018) - p.Partition_by() - } - - } - { - p.SetState(2021) - p.Order_by_expr_asc_desc() - } - { - p.SetState(2022) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserNTH_VALUE_: - p.EnterOuterAlt(localctx, 5) - { - p.SetState(2024) - p.Match(SQLiteParserNTH_VALUE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2025) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2026) - p.expr(0) - } - { - p.SetState(2027) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2028) - p.Signed_number() - } - { - p.SetState(2029) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2030) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2031) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(2033) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(2032) - p.Partition_by() - } - - } - { - p.SetState(2035) - p.Order_by_expr_asc_desc() - } - p.SetState(2037) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { - { - p.SetState(2036) - p.Frame_clause() - } - - } - { - p.SetState(2039) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserNTILE_: - p.EnterOuterAlt(localctx, 6) - { - p.SetState(2041) - p.Match(SQLiteParserNTILE_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2042) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2043) - p.expr(0) - } - { - p.SetState(2044) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2045) - p.Match(SQLiteParserOVER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2046) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(2048) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserPARTITION_ { - { - p.SetState(2047) - p.Partition_by() - } - - } - { - p.SetState(2050) - p.Order_by_expr_asc_desc() - } - { - p.SetState(2051) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IOf_OF_fsetContext is an interface to support dynamic dispatch. -type IOf_OF_fsetContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - COMMA() antlr.TerminalNode - Signed_number() ISigned_numberContext - - // IsOf_OF_fsetContext differentiates from other interfaces. - IsOf_OF_fsetContext() -} - -type Of_OF_fsetContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyOf_OF_fsetContext() *Of_OF_fsetContext { - var p = new(Of_OF_fsetContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_of_OF_fset - return p -} - -func InitEmptyOf_OF_fsetContext(p *Of_OF_fsetContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_of_OF_fset -} - -func (*Of_OF_fsetContext) IsOf_OF_fsetContext() {} - -func NewOf_OF_fsetContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Of_OF_fsetContext { - var p = new(Of_OF_fsetContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_of_OF_fset - - return p -} - -func (s *Of_OF_fsetContext) GetParser() antlr.Parser { return s.parser } - -func (s *Of_OF_fsetContext) COMMA() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, 0) -} - -func (s *Of_OF_fsetContext) Signed_number() ISigned_numberContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISigned_numberContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISigned_numberContext) -} - -func (s *Of_OF_fsetContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Of_OF_fsetContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Of_OF_fsetContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterOf_OF_fset(s) - } -} - -func (s *Of_OF_fsetContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitOf_OF_fset(s) - } -} - -func (p *SQLiteParser) Of_OF_fset() (localctx IOf_OF_fsetContext) { - localctx = NewOf_OF_fsetContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 150, SQLiteParserRULE_of_OF_fset) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2055) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2056) - p.Signed_number() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IDefault_DEFAULT__valueContext is an interface to support dynamic dispatch. -type IDefault_DEFAULT__valueContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - COMMA() antlr.TerminalNode - Signed_number() ISigned_numberContext - - // IsDefault_DEFAULT__valueContext differentiates from other interfaces. - IsDefault_DEFAULT__valueContext() -} - -type Default_DEFAULT__valueContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyDefault_DEFAULT__valueContext() *Default_DEFAULT__valueContext { - var p = new(Default_DEFAULT__valueContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value - return p -} - -func InitEmptyDefault_DEFAULT__valueContext(p *Default_DEFAULT__valueContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value -} - -func (*Default_DEFAULT__valueContext) IsDefault_DEFAULT__valueContext() {} - -func NewDefault_DEFAULT__valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Default_DEFAULT__valueContext { - var p = new(Default_DEFAULT__valueContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value - - return p -} - -func (s *Default_DEFAULT__valueContext) GetParser() antlr.Parser { return s.parser } - -func (s *Default_DEFAULT__valueContext) COMMA() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, 0) -} - -func (s *Default_DEFAULT__valueContext) Signed_number() ISigned_numberContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISigned_numberContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISigned_numberContext) -} - -func (s *Default_DEFAULT__valueContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Default_DEFAULT__valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Default_DEFAULT__valueContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterDefault_DEFAULT__value(s) - } -} - -func (s *Default_DEFAULT__valueContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitDefault_DEFAULT__value(s) - } -} - -func (p *SQLiteParser) Default_DEFAULT__value() (localctx IDefault_DEFAULT__valueContext) { - localctx = NewDefault_DEFAULT__valueContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 152, SQLiteParserRULE_default_DEFAULT__value) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2058) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2059) - p.Signed_number() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IPartition_byContext is an interface to support dynamic dispatch. -type IPartition_byContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - PARTITION_() antlr.TerminalNode - BY_() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - - // IsPartition_byContext differentiates from other interfaces. - IsPartition_byContext() -} - -type Partition_byContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyPartition_byContext() *Partition_byContext { - var p = new(Partition_byContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_partition_by - return p -} - -func InitEmptyPartition_byContext(p *Partition_byContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_partition_by -} - -func (*Partition_byContext) IsPartition_byContext() {} - -func NewPartition_byContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Partition_byContext { - var p = new(Partition_byContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_partition_by - - return p -} - -func (s *Partition_byContext) GetParser() antlr.Parser { return s.parser } - -func (s *Partition_byContext) PARTITION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPARTITION_, 0) -} - -func (s *Partition_byContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *Partition_byContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Partition_byContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Partition_byContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Partition_byContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Partition_byContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterPartition_by(s) - } -} - -func (s *Partition_byContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitPartition_by(s) - } -} - -func (p *SQLiteParser) Partition_by() (localctx IPartition_byContext) { - localctx = NewPartition_byContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 154, SQLiteParserRULE_partition_by) - var _alt int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2061) - p.Match(SQLiteParserPARTITION_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2062) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(2064) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _alt = 1 - for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber { - switch _alt { - case 1: - { - p.SetState(2063) - p.expr(0) - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - - p.SetState(2066) - p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 305, p.GetParserRuleContext()) - if p.HasError() { - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IOrder_by_exprContext is an interface to support dynamic dispatch. -type IOrder_by_exprContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ORDER_() antlr.TerminalNode - BY_() antlr.TerminalNode - AllExpr() []IExprContext - Expr(i int) IExprContext - - // IsOrder_by_exprContext differentiates from other interfaces. - IsOrder_by_exprContext() -} - -type Order_by_exprContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyOrder_by_exprContext() *Order_by_exprContext { - var p = new(Order_by_exprContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_order_by_expr - return p -} - -func InitEmptyOrder_by_exprContext(p *Order_by_exprContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_order_by_expr -} - -func (*Order_by_exprContext) IsOrder_by_exprContext() {} - -func NewOrder_by_exprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_exprContext { - var p = new(Order_by_exprContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_order_by_expr - - return p -} - -func (s *Order_by_exprContext) GetParser() antlr.Parser { return s.parser } - -func (s *Order_by_exprContext) ORDER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserORDER_, 0) -} - -func (s *Order_by_exprContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *Order_by_exprContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Order_by_exprContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Order_by_exprContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Order_by_exprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Order_by_exprContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterOrder_by_expr(s) - } -} - -func (s *Order_by_exprContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitOrder_by_expr(s) - } -} - -func (p *SQLiteParser) Order_by_expr() (localctx IOrder_by_exprContext) { - localctx = NewOrder_by_exprContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 156, SQLiteParserRULE_order_by_expr) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2068) - p.Match(SQLiteParserORDER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2069) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - p.SetState(2071) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for ok := true; ok; ok = ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-16776415) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&-1) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&9088264048033660927) != 0) { - { - p.SetState(2070) - p.expr(0) - } - - p.SetState(2073) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IOrder_by_expr_asc_descContext is an interface to support dynamic dispatch. -type IOrder_by_expr_asc_descContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ORDER_() antlr.TerminalNode - BY_() antlr.TerminalNode - Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext - - // IsOrder_by_expr_asc_descContext differentiates from other interfaces. - IsOrder_by_expr_asc_descContext() -} - -type Order_by_expr_asc_descContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyOrder_by_expr_asc_descContext() *Order_by_expr_asc_descContext { - var p = new(Order_by_expr_asc_descContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc - return p -} - -func InitEmptyOrder_by_expr_asc_descContext(p *Order_by_expr_asc_descContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc -} - -func (*Order_by_expr_asc_descContext) IsOrder_by_expr_asc_descContext() {} - -func NewOrder_by_expr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_expr_asc_descContext { - var p = new(Order_by_expr_asc_descContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc - - return p -} - -func (s *Order_by_expr_asc_descContext) GetParser() antlr.Parser { return s.parser } - -func (s *Order_by_expr_asc_descContext) ORDER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserORDER_, 0) -} - -func (s *Order_by_expr_asc_descContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *Order_by_expr_asc_descContext) Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IOrder_by_expr_asc_descContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IOrder_by_expr_asc_descContext) -} - -func (s *Order_by_expr_asc_descContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Order_by_expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Order_by_expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterOrder_by_expr_asc_desc(s) - } -} - -func (s *Order_by_expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitOrder_by_expr_asc_desc(s) - } -} - -func (p *SQLiteParser) Order_by_expr_asc_desc() (localctx IOrder_by_expr_asc_descContext) { - localctx = NewOrder_by_expr_asc_descContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 158, SQLiteParserRULE_order_by_expr_asc_desc) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2075) - p.Match(SQLiteParserORDER_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2076) - p.Match(SQLiteParserBY_) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2077) - p.Order_by_expr_asc_desc() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IExpr_asc_descContext is an interface to support dynamic dispatch. -type IExpr_asc_descContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - AllExpr() []IExprContext - Expr(i int) IExprContext - AllAsc_desc() []IAsc_descContext - Asc_desc(i int) IAsc_descContext - AllCOMMA() []antlr.TerminalNode - COMMA(i int) antlr.TerminalNode - - // IsExpr_asc_descContext differentiates from other interfaces. - IsExpr_asc_descContext() -} - -type Expr_asc_descContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyExpr_asc_descContext() *Expr_asc_descContext { - var p = new(Expr_asc_descContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_expr_asc_desc - return p -} - -func InitEmptyExpr_asc_descContext(p *Expr_asc_descContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_expr_asc_desc -} - -func (*Expr_asc_descContext) IsExpr_asc_descContext() {} - -func NewExpr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Expr_asc_descContext { - var p = new(Expr_asc_descContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_expr_asc_desc - - return p -} - -func (s *Expr_asc_descContext) GetParser() antlr.Parser { return s.parser } - -func (s *Expr_asc_descContext) AllExpr() []IExprContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IExprContext); ok { - len++ - } - } - - tst := make([]IExprContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IExprContext); ok { - tst[i] = t.(IExprContext) - i++ - } - } - - return tst -} - -func (s *Expr_asc_descContext) Expr(i int) IExprContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Expr_asc_descContext) AllAsc_desc() []IAsc_descContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IAsc_descContext); ok { - len++ - } - } - - tst := make([]IAsc_descContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IAsc_descContext); ok { - tst[i] = t.(IAsc_descContext) - i++ - } - } - - return tst -} - -func (s *Expr_asc_descContext) Asc_desc(i int) IAsc_descContext { - var t antlr.RuleContext - j := 0 - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAsc_descContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ - } - } - - if t == nil { - return nil - } - - return t.(IAsc_descContext) -} - -func (s *Expr_asc_descContext) AllCOMMA() []antlr.TerminalNode { - return s.GetTokens(SQLiteParserCOMMA) -} - -func (s *Expr_asc_descContext) COMMA(i int) antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMA, i) -} - -func (s *Expr_asc_descContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterExpr_asc_desc(s) - } -} - -func (s *Expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitExpr_asc_desc(s) - } -} - -func (p *SQLiteParser) Expr_asc_desc() (localctx IExpr_asc_descContext) { - localctx = NewExpr_asc_descContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 160, SQLiteParserRULE_expr_asc_desc) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2079) - p.expr(0) - } - p.SetState(2081) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { - { - p.SetState(2080) - p.Asc_desc() - } - - } - p.SetState(2090) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - for _la == SQLiteParserCOMMA { - { - p.SetState(2083) - p.Match(SQLiteParserCOMMA) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2084) - p.expr(0) - } - p.SetState(2086) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { - { - p.SetState(2085) - p.Asc_desc() - } - - } - - p.SetState(2092) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IInitial_selectContext is an interface to support dynamic dispatch. -type IInitial_selectContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Select_stmt() ISelect_stmtContext - - // IsInitial_selectContext differentiates from other interfaces. - IsInitial_selectContext() -} - -type Initial_selectContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyInitial_selectContext() *Initial_selectContext { - var p = new(Initial_selectContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_initial_select - return p -} - -func InitEmptyInitial_selectContext(p *Initial_selectContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_initial_select -} - -func (*Initial_selectContext) IsInitial_selectContext() {} - -func NewInitial_selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Initial_selectContext { - var p = new(Initial_selectContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_initial_select - - return p -} - -func (s *Initial_selectContext) GetParser() antlr.Parser { return s.parser } - -func (s *Initial_selectContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Initial_selectContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Initial_selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Initial_selectContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterInitial_select(s) - } -} - -func (s *Initial_selectContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitInitial_select(s) - } -} - -func (p *SQLiteParser) Initial_select() (localctx IInitial_selectContext) { - localctx = NewInitial_selectContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 162, SQLiteParserRULE_initial_select) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2093) - p.Select_stmt() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IRecursive__selectContext is an interface to support dynamic dispatch. -type IRecursive__selectContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Select_stmt() ISelect_stmtContext - - // IsRecursive__selectContext differentiates from other interfaces. - IsRecursive__selectContext() -} - -type Recursive__selectContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyRecursive__selectContext() *Recursive__selectContext { - var p = new(Recursive__selectContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_recursive__select - return p -} - -func InitEmptyRecursive__selectContext(p *Recursive__selectContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_recursive__select -} - -func (*Recursive__selectContext) IsRecursive__selectContext() {} - -func NewRecursive__selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive__selectContext { - var p = new(Recursive__selectContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_recursive__select - - return p -} - -func (s *Recursive__selectContext) GetParser() antlr.Parser { return s.parser } - -func (s *Recursive__selectContext) Select_stmt() ISelect_stmtContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISelect_stmtContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISelect_stmtContext) -} - -func (s *Recursive__selectContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Recursive__selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Recursive__selectContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterRecursive__select(s) - } -} - -func (s *Recursive__selectContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitRecursive__select(s) - } -} - -func (p *SQLiteParser) Recursive__select() (localctx IRecursive__selectContext) { - localctx = NewRecursive__selectContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 164, SQLiteParserRULE_recursive__select) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2095) - p.Select_stmt() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IUnary_operatorContext is an interface to support dynamic dispatch. -type IUnary_operatorContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - MINUS() antlr.TerminalNode - PLUS() antlr.TerminalNode - TILDE() antlr.TerminalNode - NOT_() antlr.TerminalNode - - // IsUnary_operatorContext differentiates from other interfaces. - IsUnary_operatorContext() -} - -type Unary_operatorContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyUnary_operatorContext() *Unary_operatorContext { - var p = new(Unary_operatorContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_unary_operator - return p -} - -func InitEmptyUnary_operatorContext(p *Unary_operatorContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_unary_operator -} - -func (*Unary_operatorContext) IsUnary_operatorContext() {} - -func NewUnary_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Unary_operatorContext { - var p = new(Unary_operatorContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_unary_operator - - return p -} - -func (s *Unary_operatorContext) GetParser() antlr.Parser { return s.parser } - -func (s *Unary_operatorContext) MINUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserMINUS, 0) -} - -func (s *Unary_operatorContext) PLUS() antlr.TerminalNode { - return s.GetToken(SQLiteParserPLUS, 0) -} - -func (s *Unary_operatorContext) TILDE() antlr.TerminalNode { - return s.GetToken(SQLiteParserTILDE, 0) -} - -func (s *Unary_operatorContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *Unary_operatorContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Unary_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Unary_operatorContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterUnary_operator(s) - } -} - -func (s *Unary_operatorContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitUnary_operator(s) - } -} - -func (p *SQLiteParser) Unary_operator() (localctx IUnary_operatorContext) { - localctx = NewUnary_operatorContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 166, SQLiteParserRULE_unary_operator) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2097) - _la = p.GetTokenStream().LA(1) - - if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&6400) != 0) || _la == SQLiteParserNOT_) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IError_messageContext is an interface to support dynamic dispatch. -type IError_messageContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - STRING_LITERAL() antlr.TerminalNode - - // IsError_messageContext differentiates from other interfaces. - IsError_messageContext() -} - -type Error_messageContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyError_messageContext() *Error_messageContext { - var p = new(Error_messageContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_error_message - return p -} - -func InitEmptyError_messageContext(p *Error_messageContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_error_message -} - -func (*Error_messageContext) IsError_messageContext() {} - -func NewError_messageContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Error_messageContext { - var p = new(Error_messageContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_error_message - - return p -} - -func (s *Error_messageContext) GetParser() antlr.Parser { return s.parser } - -func (s *Error_messageContext) STRING_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRING_LITERAL, 0) -} - -func (s *Error_messageContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Error_messageContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Error_messageContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterError_message(s) - } -} - -func (s *Error_messageContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitError_message(s) - } -} - -func (p *SQLiteParser) Error_message() (localctx IError_messageContext) { - localctx = NewError_messageContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 168, SQLiteParserRULE_error_message) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2099) - p.Match(SQLiteParserSTRING_LITERAL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IModule_argumentContext is an interface to support dynamic dispatch. -type IModule_argumentContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Expr() IExprContext - Column_def() IColumn_defContext - - // IsModule_argumentContext differentiates from other interfaces. - IsModule_argumentContext() -} - -type Module_argumentContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyModule_argumentContext() *Module_argumentContext { - var p = new(Module_argumentContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_module_argument - return p -} - -func InitEmptyModule_argumentContext(p *Module_argumentContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_module_argument -} - -func (*Module_argumentContext) IsModule_argumentContext() {} - -func NewModule_argumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_argumentContext { - var p = new(Module_argumentContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_module_argument - - return p -} - -func (s *Module_argumentContext) GetParser() antlr.Parser { return s.parser } - -func (s *Module_argumentContext) Expr() IExprContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IExprContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IExprContext) -} - -func (s *Module_argumentContext) Column_def() IColumn_defContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IColumn_defContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IColumn_defContext) -} - -func (s *Module_argumentContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Module_argumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Module_argumentContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterModule_argument(s) - } -} - -func (s *Module_argumentContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitModule_argument(s) - } -} - -func (p *SQLiteParser) Module_argument() (localctx IModule_argumentContext) { - localctx = NewModule_argumentContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 170, SQLiteParserRULE_module_argument) - p.SetState(2103) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 310, p.GetParserRuleContext()) { - case 1: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2101) - p.expr(0) - } - - case 2: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(2102) - p.Column_def() - } - - case antlr.ATNInvalidAltNumber: - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IColumn_aliasContext is an interface to support dynamic dispatch. -type IColumn_aliasContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - IDENTIFIER() antlr.TerminalNode - STRING_LITERAL() antlr.TerminalNode - - // IsColumn_aliasContext differentiates from other interfaces. - IsColumn_aliasContext() -} - -type Column_aliasContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyColumn_aliasContext() *Column_aliasContext { - var p = new(Column_aliasContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_alias - return p -} - -func InitEmptyColumn_aliasContext(p *Column_aliasContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_alias -} - -func (*Column_aliasContext) IsColumn_aliasContext() {} - -func NewColumn_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_aliasContext { - var p = new(Column_aliasContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_column_alias - - return p -} - -func (s *Column_aliasContext) GetParser() antlr.Parser { return s.parser } - -func (s *Column_aliasContext) IDENTIFIER() antlr.TerminalNode { - return s.GetToken(SQLiteParserIDENTIFIER, 0) -} - -func (s *Column_aliasContext) STRING_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRING_LITERAL, 0) -} - -func (s *Column_aliasContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Column_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Column_aliasContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterColumn_alias(s) - } -} - -func (s *Column_aliasContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitColumn_alias(s) - } -} - -func (p *SQLiteParser) Column_alias() (localctx IColumn_aliasContext) { - localctx = NewColumn_aliasContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 172, SQLiteParserRULE_column_alias) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2105) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IKeywordContext is an interface to support dynamic dispatch. -type IKeywordContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - ABORT_() antlr.TerminalNode - ACTION_() antlr.TerminalNode - ADD_() antlr.TerminalNode - AFTER_() antlr.TerminalNode - ALL_() antlr.TerminalNode - ALTER_() antlr.TerminalNode - ANALYZE_() antlr.TerminalNode - AND_() antlr.TerminalNode - AS_() antlr.TerminalNode - ASC_() antlr.TerminalNode - ATTACH_() antlr.TerminalNode - AUTOINCREMENT_() antlr.TerminalNode - BEFORE_() antlr.TerminalNode - BEGIN_() antlr.TerminalNode - BETWEEN_() antlr.TerminalNode - BY_() antlr.TerminalNode - CASCADE_() antlr.TerminalNode - CASE_() antlr.TerminalNode - CAST_() antlr.TerminalNode - CHECK_() antlr.TerminalNode - COLLATE_() antlr.TerminalNode - COLUMN_() antlr.TerminalNode - COMMIT_() antlr.TerminalNode - CONFLICT_() antlr.TerminalNode - CONSTRAINT_() antlr.TerminalNode - CREATE_() antlr.TerminalNode - CROSS_() antlr.TerminalNode - CURRENT_DATE_() antlr.TerminalNode - CURRENT_TIME_() antlr.TerminalNode - CURRENT_TIMESTAMP_() antlr.TerminalNode - DATABASE_() antlr.TerminalNode - DEFAULT_() antlr.TerminalNode - DEFERRABLE_() antlr.TerminalNode - DEFERRED_() antlr.TerminalNode - DELETE_() antlr.TerminalNode - DESC_() antlr.TerminalNode - DETACH_() antlr.TerminalNode - DISTINCT_() antlr.TerminalNode - DROP_() antlr.TerminalNode - EACH_() antlr.TerminalNode - ELSE_() antlr.TerminalNode - END_() antlr.TerminalNode - ESCAPE_() antlr.TerminalNode - EXCEPT_() antlr.TerminalNode - EXCLUSIVE_() antlr.TerminalNode - EXISTS_() antlr.TerminalNode - EXPLAIN_() antlr.TerminalNode - FAIL_() antlr.TerminalNode - FOR_() antlr.TerminalNode - FOREIGN_() antlr.TerminalNode - FROM_() antlr.TerminalNode - FULL_() antlr.TerminalNode - GLOB_() antlr.TerminalNode - GROUP_() antlr.TerminalNode - HAVING_() antlr.TerminalNode - IF_() antlr.TerminalNode - IGNORE_() antlr.TerminalNode - IMMEDIATE_() antlr.TerminalNode - IN_() antlr.TerminalNode - INDEX_() antlr.TerminalNode - INDEXED_() antlr.TerminalNode - INITIALLY_() antlr.TerminalNode - INNER_() antlr.TerminalNode - INSERT_() antlr.TerminalNode - INSTEAD_() antlr.TerminalNode - INTERSECT_() antlr.TerminalNode - INTO_() antlr.TerminalNode - IS_() antlr.TerminalNode - ISNULL_() antlr.TerminalNode - JOIN_() antlr.TerminalNode - KEY_() antlr.TerminalNode - LEFT_() antlr.TerminalNode - LIKE_() antlr.TerminalNode - LIMIT_() antlr.TerminalNode - MATCH_() antlr.TerminalNode - NATURAL_() antlr.TerminalNode - NO_() antlr.TerminalNode - NOT_() antlr.TerminalNode - NOTNULL_() antlr.TerminalNode - NULL_() antlr.TerminalNode - OF_() antlr.TerminalNode - OFFSET_() antlr.TerminalNode - ON_() antlr.TerminalNode - OR_() antlr.TerminalNode - ORDER_() antlr.TerminalNode - OUTER_() antlr.TerminalNode - PLAN_() antlr.TerminalNode - PRAGMA_() antlr.TerminalNode - PRIMARY_() antlr.TerminalNode - QUERY_() antlr.TerminalNode - RAISE_() antlr.TerminalNode - RECURSIVE_() antlr.TerminalNode - REFERENCES_() antlr.TerminalNode - REGEXP_() antlr.TerminalNode - REINDEX_() antlr.TerminalNode - RELEASE_() antlr.TerminalNode - RENAME_() antlr.TerminalNode - REPLACE_() antlr.TerminalNode - RESTRICT_() antlr.TerminalNode - RETURNING_() antlr.TerminalNode - RIGHT_() antlr.TerminalNode - ROLLBACK_() antlr.TerminalNode - ROW_() antlr.TerminalNode - ROWS_() antlr.TerminalNode - SAVEPOINT_() antlr.TerminalNode - SELECT_() antlr.TerminalNode - SET_() antlr.TerminalNode - STRICT_() antlr.TerminalNode - TABLE_() antlr.TerminalNode - TEMP_() antlr.TerminalNode - TEMPORARY_() antlr.TerminalNode - THEN_() antlr.TerminalNode - TO_() antlr.TerminalNode - TRANSACTION_() antlr.TerminalNode - TRIGGER_() antlr.TerminalNode - UNION_() antlr.TerminalNode - UNIQUE_() antlr.TerminalNode - UPDATE_() antlr.TerminalNode - USING_() antlr.TerminalNode - VACUUM_() antlr.TerminalNode - VALUES_() antlr.TerminalNode - VIEW_() antlr.TerminalNode - VIRTUAL_() antlr.TerminalNode - WHEN_() antlr.TerminalNode - WHERE_() antlr.TerminalNode - WITH_() antlr.TerminalNode - WITHOUT_() antlr.TerminalNode - FIRST_VALUE_() antlr.TerminalNode - OVER_() antlr.TerminalNode - PARTITION_() antlr.TerminalNode - RANGE_() antlr.TerminalNode - PRECEDING_() antlr.TerminalNode - UNBOUNDED_() antlr.TerminalNode - CURRENT_() antlr.TerminalNode - FOLLOWING_() antlr.TerminalNode - CUME_DIST_() antlr.TerminalNode - DENSE_RANK_() antlr.TerminalNode - LAG_() antlr.TerminalNode - LAST_VALUE_() antlr.TerminalNode - LEAD_() antlr.TerminalNode - NTH_VALUE_() antlr.TerminalNode - NTILE_() antlr.TerminalNode - PERCENT_RANK_() antlr.TerminalNode - RANK_() antlr.TerminalNode - ROW_NUMBER_() antlr.TerminalNode - GENERATED_() antlr.TerminalNode - ALWAYS_() antlr.TerminalNode - STORED_() antlr.TerminalNode - TRUE_() antlr.TerminalNode - FALSE_() antlr.TerminalNode - WINDOW_() antlr.TerminalNode - NULLS_() antlr.TerminalNode - FIRST_() antlr.TerminalNode - LAST_() antlr.TerminalNode - FILTER_() antlr.TerminalNode - GROUPS_() antlr.TerminalNode - EXCLUDE_() antlr.TerminalNode - - // IsKeywordContext differentiates from other interfaces. - IsKeywordContext() -} - -type KeywordContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyKeywordContext() *KeywordContext { - var p = new(KeywordContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_keyword - return p -} - -func InitEmptyKeywordContext(p *KeywordContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_keyword -} - -func (*KeywordContext) IsKeywordContext() {} - -func NewKeywordContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *KeywordContext { - var p = new(KeywordContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_keyword - - return p -} - -func (s *KeywordContext) GetParser() antlr.Parser { return s.parser } - -func (s *KeywordContext) ABORT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserABORT_, 0) -} - -func (s *KeywordContext) ACTION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserACTION_, 0) -} - -func (s *KeywordContext) ADD_() antlr.TerminalNode { - return s.GetToken(SQLiteParserADD_, 0) -} - -func (s *KeywordContext) AFTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAFTER_, 0) -} - -func (s *KeywordContext) ALL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALL_, 0) -} - -func (s *KeywordContext) ALTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALTER_, 0) -} - -func (s *KeywordContext) ANALYZE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserANALYZE_, 0) -} - -func (s *KeywordContext) AND_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAND_, 0) -} - -func (s *KeywordContext) AS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAS_, 0) -} - -func (s *KeywordContext) ASC_() antlr.TerminalNode { - return s.GetToken(SQLiteParserASC_, 0) -} - -func (s *KeywordContext) ATTACH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserATTACH_, 0) -} - -func (s *KeywordContext) AUTOINCREMENT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserAUTOINCREMENT_, 0) -} - -func (s *KeywordContext) BEFORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBEFORE_, 0) -} - -func (s *KeywordContext) BEGIN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBEGIN_, 0) -} - -func (s *KeywordContext) BETWEEN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBETWEEN_, 0) -} - -func (s *KeywordContext) BY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserBY_, 0) -} - -func (s *KeywordContext) CASCADE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCASCADE_, 0) -} - -func (s *KeywordContext) CASE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCASE_, 0) -} - -func (s *KeywordContext) CAST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCAST_, 0) -} - -func (s *KeywordContext) CHECK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCHECK_, 0) -} - -func (s *KeywordContext) COLLATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOLLATE_, 0) -} - -func (s *KeywordContext) COLUMN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOLUMN_, 0) -} - -func (s *KeywordContext) COMMIT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCOMMIT_, 0) -} - -func (s *KeywordContext) CONFLICT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCONFLICT_, 0) -} - -func (s *KeywordContext) CONSTRAINT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCONSTRAINT_, 0) -} - -func (s *KeywordContext) CREATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCREATE_, 0) -} - -func (s *KeywordContext) CROSS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCROSS_, 0) -} - -func (s *KeywordContext) CURRENT_DATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_DATE_, 0) -} - -func (s *KeywordContext) CURRENT_TIME_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_TIME_, 0) -} - -func (s *KeywordContext) CURRENT_TIMESTAMP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_TIMESTAMP_, 0) -} - -func (s *KeywordContext) DATABASE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDATABASE_, 0) -} - -func (s *KeywordContext) DEFAULT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFAULT_, 0) -} - -func (s *KeywordContext) DEFERRABLE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFERRABLE_, 0) -} - -func (s *KeywordContext) DEFERRED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDEFERRED_, 0) -} - -func (s *KeywordContext) DELETE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDELETE_, 0) -} - -func (s *KeywordContext) DESC_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDESC_, 0) -} - -func (s *KeywordContext) DETACH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDETACH_, 0) -} - -func (s *KeywordContext) DISTINCT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDISTINCT_, 0) -} - -func (s *KeywordContext) DROP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDROP_, 0) -} - -func (s *KeywordContext) EACH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEACH_, 0) -} - -func (s *KeywordContext) ELSE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserELSE_, 0) -} - -func (s *KeywordContext) END_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEND_, 0) -} - -func (s *KeywordContext) ESCAPE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserESCAPE_, 0) -} - -func (s *KeywordContext) EXCEPT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXCEPT_, 0) -} - -func (s *KeywordContext) EXCLUSIVE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXCLUSIVE_, 0) -} - -func (s *KeywordContext) EXISTS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXISTS_, 0) -} - -func (s *KeywordContext) EXPLAIN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXPLAIN_, 0) -} - -func (s *KeywordContext) FAIL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFAIL_, 0) -} - -func (s *KeywordContext) FOR_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFOR_, 0) -} - -func (s *KeywordContext) FOREIGN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFOREIGN_, 0) -} - -func (s *KeywordContext) FROM_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFROM_, 0) -} - -func (s *KeywordContext) FULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFULL_, 0) -} - -func (s *KeywordContext) GLOB_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGLOB_, 0) -} - -func (s *KeywordContext) GROUP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGROUP_, 0) -} - -func (s *KeywordContext) HAVING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserHAVING_, 0) -} - -func (s *KeywordContext) IF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIF_, 0) -} - -func (s *KeywordContext) IGNORE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIGNORE_, 0) -} - -func (s *KeywordContext) IMMEDIATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIMMEDIATE_, 0) -} - -func (s *KeywordContext) IN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIN_, 0) -} - -func (s *KeywordContext) INDEX_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINDEX_, 0) -} - -func (s *KeywordContext) INDEXED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINDEXED_, 0) -} - -func (s *KeywordContext) INITIALLY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINITIALLY_, 0) -} - -func (s *KeywordContext) INNER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINNER_, 0) -} - -func (s *KeywordContext) INSERT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINSERT_, 0) -} - -func (s *KeywordContext) INSTEAD_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINSTEAD_, 0) -} - -func (s *KeywordContext) INTERSECT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINTERSECT_, 0) -} - -func (s *KeywordContext) INTO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserINTO_, 0) -} - -func (s *KeywordContext) IS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserIS_, 0) -} - -func (s *KeywordContext) ISNULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserISNULL_, 0) -} - -func (s *KeywordContext) JOIN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserJOIN_, 0) -} - -func (s *KeywordContext) KEY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserKEY_, 0) -} - -func (s *KeywordContext) LEFT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLEFT_, 0) -} - -func (s *KeywordContext) LIKE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLIKE_, 0) -} - -func (s *KeywordContext) LIMIT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLIMIT_, 0) -} - -func (s *KeywordContext) MATCH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserMATCH_, 0) -} - -func (s *KeywordContext) NATURAL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNATURAL_, 0) -} - -func (s *KeywordContext) NO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNO_, 0) -} - -func (s *KeywordContext) NOT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOT_, 0) -} - -func (s *KeywordContext) NOTNULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNOTNULL_, 0) -} - -func (s *KeywordContext) NULL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNULL_, 0) -} - -func (s *KeywordContext) OF_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOF_, 0) -} - -func (s *KeywordContext) OFFSET_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOFFSET_, 0) -} - -func (s *KeywordContext) ON_() antlr.TerminalNode { - return s.GetToken(SQLiteParserON_, 0) -} - -func (s *KeywordContext) OR_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOR_, 0) -} - -func (s *KeywordContext) ORDER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserORDER_, 0) -} - -func (s *KeywordContext) OUTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOUTER_, 0) -} - -func (s *KeywordContext) PLAN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPLAN_, 0) -} - -func (s *KeywordContext) PRAGMA_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRAGMA_, 0) -} - -func (s *KeywordContext) PRIMARY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRIMARY_, 0) -} - -func (s *KeywordContext) QUERY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserQUERY_, 0) -} - -func (s *KeywordContext) RAISE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRAISE_, 0) -} - -func (s *KeywordContext) RECURSIVE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRECURSIVE_, 0) -} - -func (s *KeywordContext) REFERENCES_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREFERENCES_, 0) -} - -func (s *KeywordContext) REGEXP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREGEXP_, 0) -} - -func (s *KeywordContext) REINDEX_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREINDEX_, 0) -} - -func (s *KeywordContext) RELEASE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRELEASE_, 0) -} - -func (s *KeywordContext) RENAME_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRENAME_, 0) -} - -func (s *KeywordContext) REPLACE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserREPLACE_, 0) -} - -func (s *KeywordContext) RESTRICT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRESTRICT_, 0) -} - -func (s *KeywordContext) RETURNING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRETURNING_, 0) -} - -func (s *KeywordContext) RIGHT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRIGHT_, 0) -} - -func (s *KeywordContext) ROLLBACK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROLLBACK_, 0) -} - -func (s *KeywordContext) ROW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_, 0) -} - -func (s *KeywordContext) ROWS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROWS_, 0) -} - -func (s *KeywordContext) SAVEPOINT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSAVEPOINT_, 0) -} - -func (s *KeywordContext) SELECT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSELECT_, 0) -} - -func (s *KeywordContext) SET_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSET_, 0) -} - -func (s *KeywordContext) STRICT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRICT_, 0) -} - -func (s *KeywordContext) TABLE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTABLE_, 0) -} - -func (s *KeywordContext) TEMP_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMP_, 0) -} - -func (s *KeywordContext) TEMPORARY_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTEMPORARY_, 0) -} - -func (s *KeywordContext) THEN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTHEN_, 0) -} - -func (s *KeywordContext) TO_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTO_, 0) -} - -func (s *KeywordContext) TRANSACTION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRANSACTION_, 0) -} - -func (s *KeywordContext) TRIGGER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRIGGER_, 0) -} - -func (s *KeywordContext) UNION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNION_, 0) -} - -func (s *KeywordContext) UNIQUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNIQUE_, 0) -} - -func (s *KeywordContext) UPDATE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUPDATE_, 0) -} - -func (s *KeywordContext) USING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUSING_, 0) -} - -func (s *KeywordContext) VACUUM_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVACUUM_, 0) -} - -func (s *KeywordContext) VALUES_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVALUES_, 0) -} - -func (s *KeywordContext) VIEW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVIEW_, 0) -} - -func (s *KeywordContext) VIRTUAL_() antlr.TerminalNode { - return s.GetToken(SQLiteParserVIRTUAL_, 0) -} - -func (s *KeywordContext) WHEN_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHEN_, 0) -} - -func (s *KeywordContext) WHERE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWHERE_, 0) -} - -func (s *KeywordContext) WITH_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWITH_, 0) -} - -func (s *KeywordContext) WITHOUT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWITHOUT_, 0) -} - -func (s *KeywordContext) FIRST_VALUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFIRST_VALUE_, 0) -} - -func (s *KeywordContext) OVER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserOVER_, 0) -} - -func (s *KeywordContext) PARTITION_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPARTITION_, 0) -} - -func (s *KeywordContext) RANGE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRANGE_, 0) -} - -func (s *KeywordContext) PRECEDING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPRECEDING_, 0) -} - -func (s *KeywordContext) UNBOUNDED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserUNBOUNDED_, 0) -} - -func (s *KeywordContext) CURRENT_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCURRENT_, 0) -} - -func (s *KeywordContext) FOLLOWING_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFOLLOWING_, 0) -} - -func (s *KeywordContext) CUME_DIST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserCUME_DIST_, 0) -} - -func (s *KeywordContext) DENSE_RANK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserDENSE_RANK_, 0) -} - -func (s *KeywordContext) LAG_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLAG_, 0) -} - -func (s *KeywordContext) LAST_VALUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLAST_VALUE_, 0) -} - -func (s *KeywordContext) LEAD_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLEAD_, 0) -} - -func (s *KeywordContext) NTH_VALUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNTH_VALUE_, 0) -} - -func (s *KeywordContext) NTILE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNTILE_, 0) -} - -func (s *KeywordContext) PERCENT_RANK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserPERCENT_RANK_, 0) -} - -func (s *KeywordContext) RANK_() antlr.TerminalNode { - return s.GetToken(SQLiteParserRANK_, 0) -} - -func (s *KeywordContext) ROW_NUMBER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserROW_NUMBER_, 0) -} - -func (s *KeywordContext) GENERATED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGENERATED_, 0) -} - -func (s *KeywordContext) ALWAYS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserALWAYS_, 0) -} - -func (s *KeywordContext) STORED_() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTORED_, 0) -} - -func (s *KeywordContext) TRUE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserTRUE_, 0) -} - -func (s *KeywordContext) FALSE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFALSE_, 0) -} - -func (s *KeywordContext) WINDOW_() antlr.TerminalNode { - return s.GetToken(SQLiteParserWINDOW_, 0) -} - -func (s *KeywordContext) NULLS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserNULLS_, 0) -} - -func (s *KeywordContext) FIRST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFIRST_, 0) -} - -func (s *KeywordContext) LAST_() antlr.TerminalNode { - return s.GetToken(SQLiteParserLAST_, 0) -} - -func (s *KeywordContext) FILTER_() antlr.TerminalNode { - return s.GetToken(SQLiteParserFILTER_, 0) -} - -func (s *KeywordContext) GROUPS_() antlr.TerminalNode { - return s.GetToken(SQLiteParserGROUPS_, 0) -} - -func (s *KeywordContext) EXCLUDE_() antlr.TerminalNode { - return s.GetToken(SQLiteParserEXCLUDE_, 0) -} - -func (s *KeywordContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *KeywordContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *KeywordContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterKeyword(s) - } -} - -func (s *KeywordContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitKeyword(s) - } -} - -func (p *SQLiteParser) Keyword() (localctx IKeywordContext) { - localctx = NewKeywordContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 174, SQLiteParserRULE_keyword) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2107) - _la = p.GetTokenStream().LA(1) - - if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-134217728) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&72057594037927935) != 0)) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// INameContext is an interface to support dynamic dispatch. -type INameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsNameContext differentiates from other interfaces. - IsNameContext() -} - -type NameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyNameContext() *NameContext { - var p = new(NameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_name - return p -} - -func InitEmptyNameContext(p *NameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_name -} - -func (*NameContext) IsNameContext() {} - -func NewNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NameContext { - var p = new(NameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_name - - return p -} - -func (s *NameContext) GetParser() antlr.Parser { return s.parser } - -func (s *NameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *NameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *NameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *NameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterName(s) - } -} - -func (s *NameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitName(s) - } -} - -func (p *SQLiteParser) Name() (localctx INameContext) { - localctx = NewNameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 176, SQLiteParserRULE_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2109) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFunction_nameContext is an interface to support dynamic dispatch. -type IFunction_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsFunction_nameContext differentiates from other interfaces. - IsFunction_nameContext() -} - -type Function_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFunction_nameContext() *Function_nameContext { - var p = new(Function_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_function_name - return p -} - -func InitEmptyFunction_nameContext(p *Function_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_function_name -} - -func (*Function_nameContext) IsFunction_nameContext() {} - -func NewFunction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Function_nameContext { - var p = new(Function_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_function_name - - return p -} - -func (s *Function_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Function_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Function_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Function_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFunction_name(s) - } -} - -func (s *Function_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFunction_name(s) - } -} - -func (p *SQLiteParser) Function_name() (localctx IFunction_nameContext) { - localctx = NewFunction_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 178, SQLiteParserRULE_function_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2111) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IQualified_function_nameContext is an interface to support dynamic dispatch. -type IQualified_function_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Function_name() IFunction_nameContext - Schema_name() ISchema_nameContext - DOT() antlr.TerminalNode - - // IsQualified_function_nameContext differentiates from other interfaces. - IsQualified_function_nameContext() -} - -type Qualified_function_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyQualified_function_nameContext() *Qualified_function_nameContext { - var p = new(Qualified_function_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_qualified_function_name - return p -} - -func InitEmptyQualified_function_nameContext(p *Qualified_function_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_qualified_function_name -} - -func (*Qualified_function_nameContext) IsQualified_function_nameContext() {} - -func NewQualified_function_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Qualified_function_nameContext { - var p = new(Qualified_function_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_qualified_function_name - - return p -} - -func (s *Qualified_function_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Qualified_function_nameContext) Function_name() IFunction_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IFunction_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IFunction_nameContext) -} - -func (s *Qualified_function_nameContext) Schema_name() ISchema_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(ISchema_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(ISchema_nameContext) -} - -func (s *Qualified_function_nameContext) DOT() antlr.TerminalNode { - return s.GetToken(SQLiteParserDOT, 0) -} - -func (s *Qualified_function_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Qualified_function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Qualified_function_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterQualified_function_name(s) - } -} - -func (s *Qualified_function_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitQualified_function_name(s) - } -} - -func (p *SQLiteParser) Qualified_function_name() (localctx IQualified_function_nameContext) { - localctx = NewQualified_function_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 180, SQLiteParserRULE_qualified_function_name) - p.EnterOuterAlt(localctx, 1) - p.SetState(2116) - p.GetErrorHandler().Sync(p) - - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 311, p.GetParserRuleContext()) == 1 { - { - p.SetState(2113) - p.Schema_name() - } - { - p.SetState(2114) - p.Match(SQLiteParserDOT) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } else if p.HasError() { // JIM - goto errorExit - } - { - p.SetState(2118) - p.Function_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISchema_nameContext is an interface to support dynamic dispatch. -type ISchema_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsSchema_nameContext differentiates from other interfaces. - IsSchema_nameContext() -} - -type Schema_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySchema_nameContext() *Schema_nameContext { - var p = new(Schema_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_schema_name - return p -} - -func InitEmptySchema_nameContext(p *Schema_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_schema_name -} - -func (*Schema_nameContext) IsSchema_nameContext() {} - -func NewSchema_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Schema_nameContext { - var p = new(Schema_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_schema_name - - return p -} - -func (s *Schema_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Schema_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Schema_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Schema_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Schema_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSchema_name(s) - } -} - -func (s *Schema_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSchema_name(s) - } -} - -func (p *SQLiteParser) Schema_name() (localctx ISchema_nameContext) { - localctx = NewSchema_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 182, SQLiteParserRULE_schema_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2120) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_nameContext is an interface to support dynamic dispatch. -type ITable_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsTable_nameContext differentiates from other interfaces. - IsTable_nameContext() -} - -type Table_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTable_nameContext() *Table_nameContext { - var p = new(Table_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_name - return p -} - -func InitEmptyTable_nameContext(p *Table_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_name -} - -func (*Table_nameContext) IsTable_nameContext() {} - -func NewTable_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_nameContext { - var p = new(Table_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_name - - return p -} - -func (s *Table_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Table_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_name(s) - } -} - -func (s *Table_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_name(s) - } -} - -func (p *SQLiteParser) Table_name() (localctx ITable_nameContext) { - localctx = NewTable_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 184, SQLiteParserRULE_table_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2122) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_or_index_nameContext is an interface to support dynamic dispatch. -type ITable_or_index_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsTable_or_index_nameContext differentiates from other interfaces. - IsTable_or_index_nameContext() -} - -type Table_or_index_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTable_or_index_nameContext() *Table_or_index_nameContext { - var p = new(Table_or_index_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_or_index_name - return p -} - -func InitEmptyTable_or_index_nameContext(p *Table_or_index_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_or_index_name -} - -func (*Table_or_index_nameContext) IsTable_or_index_nameContext() {} - -func NewTable_or_index_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_index_nameContext { - var p = new(Table_or_index_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_or_index_name - - return p -} - -func (s *Table_or_index_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_or_index_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Table_or_index_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_or_index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_or_index_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_or_index_name(s) - } -} - -func (s *Table_or_index_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_or_index_name(s) - } -} - -func (p *SQLiteParser) Table_or_index_name() (localctx ITable_or_index_nameContext) { - localctx = NewTable_or_index_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 186, SQLiteParserRULE_table_or_index_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2124) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// INew_table_nameContext is an interface to support dynamic dispatch. -type INew_table_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsNew_table_nameContext differentiates from other interfaces. - IsNew_table_nameContext() -} - -type New_table_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyNew_table_nameContext() *New_table_nameContext { - var p = new(New_table_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_new_table_name - return p -} - -func InitEmptyNew_table_nameContext(p *New_table_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_new_table_name -} - -func (*New_table_nameContext) IsNew_table_nameContext() {} - -func NewNew_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *New_table_nameContext { - var p = new(New_table_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_new_table_name - - return p -} - -func (s *New_table_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *New_table_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *New_table_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *New_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *New_table_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterNew_table_name(s) - } -} - -func (s *New_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitNew_table_name(s) - } -} - -func (p *SQLiteParser) New_table_name() (localctx INew_table_nameContext) { - localctx = NewNew_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 188, SQLiteParserRULE_new_table_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2126) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IColumn_nameContext is an interface to support dynamic dispatch. -type IColumn_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsColumn_nameContext differentiates from other interfaces. - IsColumn_nameContext() -} - -type Column_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyColumn_nameContext() *Column_nameContext { - var p = new(Column_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_name - return p -} - -func InitEmptyColumn_nameContext(p *Column_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_column_name -} - -func (*Column_nameContext) IsColumn_nameContext() {} - -func NewColumn_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_nameContext { - var p = new(Column_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_column_name - - return p -} - -func (s *Column_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Column_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Column_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Column_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Column_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterColumn_name(s) - } -} - -func (s *Column_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitColumn_name(s) - } -} - -func (p *SQLiteParser) Column_name() (localctx IColumn_nameContext) { - localctx = NewColumn_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 190, SQLiteParserRULE_column_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2128) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ICollation_nameContext is an interface to support dynamic dispatch. -type ICollation_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsCollation_nameContext differentiates from other interfaces. - IsCollation_nameContext() -} - -type Collation_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyCollation_nameContext() *Collation_nameContext { - var p = new(Collation_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_collation_name - return p -} - -func InitEmptyCollation_nameContext(p *Collation_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_collation_name -} - -func (*Collation_nameContext) IsCollation_nameContext() {} - -func NewCollation_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Collation_nameContext { - var p = new(Collation_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_collation_name - - return p -} - -func (s *Collation_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Collation_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Collation_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Collation_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Collation_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterCollation_name(s) - } -} - -func (s *Collation_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitCollation_name(s) - } -} - -func (p *SQLiteParser) Collation_name() (localctx ICollation_nameContext) { - localctx = NewCollation_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 192, SQLiteParserRULE_collation_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2130) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IForeign_tableContext is an interface to support dynamic dispatch. -type IForeign_tableContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsForeign_tableContext differentiates from other interfaces. - IsForeign_tableContext() -} - -type Foreign_tableContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyForeign_tableContext() *Foreign_tableContext { - var p = new(Foreign_tableContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_foreign_table - return p -} - -func InitEmptyForeign_tableContext(p *Foreign_tableContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_foreign_table -} - -func (*Foreign_tableContext) IsForeign_tableContext() {} - -func NewForeign_tableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_tableContext { - var p = new(Foreign_tableContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_foreign_table - - return p -} - -func (s *Foreign_tableContext) GetParser() antlr.Parser { return s.parser } - -func (s *Foreign_tableContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Foreign_tableContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Foreign_tableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Foreign_tableContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterForeign_table(s) - } -} - -func (s *Foreign_tableContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitForeign_table(s) - } -} - -func (p *SQLiteParser) Foreign_table() (localctx IForeign_tableContext) { - localctx = NewForeign_tableContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 194, SQLiteParserRULE_foreign_table) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2132) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IIndex_nameContext is an interface to support dynamic dispatch. -type IIndex_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsIndex_nameContext differentiates from other interfaces. - IsIndex_nameContext() -} - -type Index_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyIndex_nameContext() *Index_nameContext { - var p = new(Index_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_index_name - return p -} - -func InitEmptyIndex_nameContext(p *Index_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_index_name -} - -func (*Index_nameContext) IsIndex_nameContext() {} - -func NewIndex_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Index_nameContext { - var p = new(Index_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_index_name - - return p -} - -func (s *Index_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Index_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Index_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Index_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterIndex_name(s) - } -} - -func (s *Index_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitIndex_name(s) - } -} - -func (p *SQLiteParser) Index_name() (localctx IIndex_nameContext) { - localctx = NewIndex_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 196, SQLiteParserRULE_index_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2134) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITrigger_nameContext is an interface to support dynamic dispatch. -type ITrigger_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsTrigger_nameContext differentiates from other interfaces. - IsTrigger_nameContext() -} - -type Trigger_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTrigger_nameContext() *Trigger_nameContext { - var p = new(Trigger_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_trigger_name - return p -} - -func InitEmptyTrigger_nameContext(p *Trigger_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_trigger_name -} - -func (*Trigger_nameContext) IsTrigger_nameContext() {} - -func NewTrigger_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Trigger_nameContext { - var p = new(Trigger_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_trigger_name - - return p -} - -func (s *Trigger_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Trigger_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Trigger_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Trigger_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Trigger_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTrigger_name(s) - } -} - -func (s *Trigger_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTrigger_name(s) - } -} - -func (p *SQLiteParser) Trigger_name() (localctx ITrigger_nameContext) { - localctx = NewTrigger_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 198, SQLiteParserRULE_trigger_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2136) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IView_nameContext is an interface to support dynamic dispatch. -type IView_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsView_nameContext differentiates from other interfaces. - IsView_nameContext() -} - -type View_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyView_nameContext() *View_nameContext { - var p = new(View_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_view_name - return p -} - -func InitEmptyView_nameContext(p *View_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_view_name -} - -func (*View_nameContext) IsView_nameContext() {} - -func NewView_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *View_nameContext { - var p = new(View_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_view_name - - return p -} - -func (s *View_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *View_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *View_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *View_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *View_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterView_name(s) - } -} - -func (s *View_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitView_name(s) - } -} - -func (p *SQLiteParser) View_name() (localctx IView_nameContext) { - localctx = NewView_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 200, SQLiteParserRULE_view_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2138) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IModule_nameContext is an interface to support dynamic dispatch. -type IModule_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsModule_nameContext differentiates from other interfaces. - IsModule_nameContext() -} - -type Module_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyModule_nameContext() *Module_nameContext { - var p = new(Module_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_module_name - return p -} - -func InitEmptyModule_nameContext(p *Module_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_module_name -} - -func (*Module_nameContext) IsModule_nameContext() {} - -func NewModule_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_nameContext { - var p = new(Module_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_module_name - - return p -} - -func (s *Module_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Module_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Module_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Module_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Module_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterModule_name(s) - } -} - -func (s *Module_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitModule_name(s) - } -} - -func (p *SQLiteParser) Module_name() (localctx IModule_nameContext) { - localctx = NewModule_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 202, SQLiteParserRULE_module_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2140) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IPragma_nameContext is an interface to support dynamic dispatch. -type IPragma_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsPragma_nameContext differentiates from other interfaces. - IsPragma_nameContext() -} - -type Pragma_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyPragma_nameContext() *Pragma_nameContext { - var p = new(Pragma_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_pragma_name - return p -} - -func InitEmptyPragma_nameContext(p *Pragma_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_pragma_name -} - -func (*Pragma_nameContext) IsPragma_nameContext() {} - -func NewPragma_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_nameContext { - var p = new(Pragma_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_pragma_name - - return p -} - -func (s *Pragma_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Pragma_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Pragma_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Pragma_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Pragma_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterPragma_name(s) - } -} - -func (s *Pragma_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitPragma_name(s) - } -} - -func (p *SQLiteParser) Pragma_name() (localctx IPragma_nameContext) { - localctx = NewPragma_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 204, SQLiteParserRULE_pragma_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2142) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISavepoint_nameContext is an interface to support dynamic dispatch. -type ISavepoint_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsSavepoint_nameContext differentiates from other interfaces. - IsSavepoint_nameContext() -} - -type Savepoint_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySavepoint_nameContext() *Savepoint_nameContext { - var p = new(Savepoint_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_savepoint_name - return p -} - -func InitEmptySavepoint_nameContext(p *Savepoint_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_savepoint_name -} - -func (*Savepoint_nameContext) IsSavepoint_nameContext() {} - -func NewSavepoint_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_nameContext { - var p = new(Savepoint_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_savepoint_name - - return p -} - -func (s *Savepoint_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Savepoint_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Savepoint_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Savepoint_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Savepoint_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSavepoint_name(s) - } -} - -func (s *Savepoint_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSavepoint_name(s) - } -} - -func (p *SQLiteParser) Savepoint_name() (localctx ISavepoint_nameContext) { - localctx = NewSavepoint_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 206, SQLiteParserRULE_savepoint_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2144) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_aliasContext is an interface to support dynamic dispatch. -type ITable_aliasContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - IDENTIFIER() antlr.TerminalNode - STRING_LITERAL() antlr.TerminalNode - - // IsTable_aliasContext differentiates from other interfaces. - IsTable_aliasContext() -} - -type Table_aliasContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTable_aliasContext() *Table_aliasContext { - var p = new(Table_aliasContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_alias - return p -} - -func InitEmptyTable_aliasContext(p *Table_aliasContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_alias -} - -func (*Table_aliasContext) IsTable_aliasContext() {} - -func NewTable_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_aliasContext { - var p = new(Table_aliasContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_alias - - return p -} - -func (s *Table_aliasContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_aliasContext) IDENTIFIER() antlr.TerminalNode { - return s.GetToken(SQLiteParserIDENTIFIER, 0) -} - -func (s *Table_aliasContext) STRING_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRING_LITERAL, 0) -} - -func (s *Table_aliasContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_aliasContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_alias(s) - } -} - -func (s *Table_aliasContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_alias(s) - } -} - -func (p *SQLiteParser) Table_alias() (localctx ITable_aliasContext) { - localctx = NewTable_aliasContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 208, SQLiteParserRULE_table_alias) - var _la int - - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2146) - _la = p.GetTokenStream().LA(1) - - if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() - } - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_alias_fallbackContext is an interface to support dynamic dispatch. -type ITable_alias_fallbackContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsTable_alias_fallbackContext differentiates from other interfaces. - IsTable_alias_fallbackContext() -} - -type Table_alias_fallbackContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTable_alias_fallbackContext() *Table_alias_fallbackContext { - var p = new(Table_alias_fallbackContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_alias_fallback - return p -} - -func InitEmptyTable_alias_fallbackContext(p *Table_alias_fallbackContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_alias_fallback -} - -func (*Table_alias_fallbackContext) IsTable_alias_fallbackContext() {} - -func NewTable_alias_fallbackContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_alias_fallbackContext { - var p = new(Table_alias_fallbackContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_alias_fallback - - return p -} - -func (s *Table_alias_fallbackContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_alias_fallbackContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Table_alias_fallbackContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_alias_fallbackContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_alias_fallbackContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_alias_fallback(s) - } -} - -func (s *Table_alias_fallbackContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_alias_fallback(s) - } -} - -func (p *SQLiteParser) Table_alias_fallback() (localctx ITable_alias_fallbackContext) { - localctx = NewTable_alias_fallbackContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 210, SQLiteParserRULE_table_alias_fallback) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2148) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITransaction_nameContext is an interface to support dynamic dispatch. -type ITransaction_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsTransaction_nameContext differentiates from other interfaces. - IsTransaction_nameContext() -} - -type Transaction_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTransaction_nameContext() *Transaction_nameContext { - var p = new(Transaction_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_transaction_name - return p -} - -func InitEmptyTransaction_nameContext(p *Transaction_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_transaction_name -} - -func (*Transaction_nameContext) IsTransaction_nameContext() {} - -func NewTransaction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Transaction_nameContext { - var p = new(Transaction_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_transaction_name - - return p -} - -func (s *Transaction_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Transaction_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Transaction_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Transaction_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Transaction_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTransaction_name(s) - } -} - -func (s *Transaction_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTransaction_name(s) - } -} - -func (p *SQLiteParser) Transaction_name() (localctx ITransaction_nameContext) { - localctx = NewTransaction_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 212, SQLiteParserRULE_transaction_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2150) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IWindow_nameContext is an interface to support dynamic dispatch. -type IWindow_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsWindow_nameContext differentiates from other interfaces. - IsWindow_nameContext() -} - -type Window_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyWindow_nameContext() *Window_nameContext { - var p = new(Window_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_name - return p -} - -func InitEmptyWindow_nameContext(p *Window_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_window_name -} - -func (*Window_nameContext) IsWindow_nameContext() {} - -func NewWindow_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_nameContext { - var p = new(Window_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_window_name - - return p -} - -func (s *Window_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Window_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Window_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Window_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterWindow_name(s) - } -} - -func (s *Window_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitWindow_name(s) - } -} - -func (p *SQLiteParser) Window_name() (localctx IWindow_nameContext) { - localctx = NewWindow_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 214, SQLiteParserRULE_window_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2152) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAliasContext is an interface to support dynamic dispatch. -type IAliasContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsAliasContext differentiates from other interfaces. - IsAliasContext() -} - -type AliasContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyAliasContext() *AliasContext { - var p = new(AliasContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_alias - return p -} - -func InitEmptyAliasContext(p *AliasContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_alias -} - -func (*AliasContext) IsAliasContext() {} - -func NewAliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AliasContext { - var p = new(AliasContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_alias - - return p -} - -func (s *AliasContext) GetParser() antlr.Parser { return s.parser } - -func (s *AliasContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *AliasContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *AliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *AliasContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAlias(s) - } -} - -func (s *AliasContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAlias(s) - } -} - -func (p *SQLiteParser) Alias() (localctx IAliasContext) { - localctx = NewAliasContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 216, SQLiteParserRULE_alias) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2154) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IFilenameContext is an interface to support dynamic dispatch. -type IFilenameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsFilenameContext differentiates from other interfaces. - IsFilenameContext() -} - -type FilenameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyFilenameContext() *FilenameContext { - var p = new(FilenameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_filename - return p -} - -func InitEmptyFilenameContext(p *FilenameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_filename -} - -func (*FilenameContext) IsFilenameContext() {} - -func NewFilenameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FilenameContext { - var p = new(FilenameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_filename - - return p -} - -func (s *FilenameContext) GetParser() antlr.Parser { return s.parser } - -func (s *FilenameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *FilenameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *FilenameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *FilenameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterFilename(s) - } -} - -func (s *FilenameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitFilename(s) - } -} - -func (p *SQLiteParser) Filename() (localctx IFilenameContext) { - localctx = NewFilenameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 218, SQLiteParserRULE_filename) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2156) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IBase_window_nameContext is an interface to support dynamic dispatch. -type IBase_window_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsBase_window_nameContext differentiates from other interfaces. - IsBase_window_nameContext() -} - -type Base_window_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyBase_window_nameContext() *Base_window_nameContext { - var p = new(Base_window_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_base_window_name - return p -} - -func InitEmptyBase_window_nameContext(p *Base_window_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_base_window_name -} - -func (*Base_window_nameContext) IsBase_window_nameContext() {} - -func NewBase_window_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Base_window_nameContext { - var p = new(Base_window_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_base_window_name - - return p -} - -func (s *Base_window_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Base_window_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Base_window_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Base_window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Base_window_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterBase_window_name(s) - } -} - -func (s *Base_window_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitBase_window_name(s) - } -} - -func (p *SQLiteParser) Base_window_name() (localctx IBase_window_nameContext) { - localctx = NewBase_window_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 220, SQLiteParserRULE_base_window_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2158) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ISimple_funcContext is an interface to support dynamic dispatch. -type ISimple_funcContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsSimple_funcContext differentiates from other interfaces. - IsSimple_funcContext() -} - -type Simple_funcContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptySimple_funcContext() *Simple_funcContext { - var p = new(Simple_funcContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_simple_func - return p -} - -func InitEmptySimple_funcContext(p *Simple_funcContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_simple_func -} - -func (*Simple_funcContext) IsSimple_funcContext() {} - -func NewSimple_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_funcContext { - var p = new(Simple_funcContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_simple_func - - return p -} - -func (s *Simple_funcContext) GetParser() antlr.Parser { return s.parser } - -func (s *Simple_funcContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Simple_funcContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Simple_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Simple_funcContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterSimple_func(s) - } -} - -func (s *Simple_funcContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitSimple_func(s) - } -} - -func (p *SQLiteParser) Simple_func() (localctx ISimple_funcContext) { - localctx = NewSimple_funcContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 222, SQLiteParserRULE_simple_func) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2160) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAggregate_funcContext is an interface to support dynamic dispatch. -type IAggregate_funcContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsAggregate_funcContext differentiates from other interfaces. - IsAggregate_funcContext() -} - -type Aggregate_funcContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyAggregate_funcContext() *Aggregate_funcContext { - var p = new(Aggregate_funcContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_aggregate_func - return p -} - -func InitEmptyAggregate_funcContext(p *Aggregate_funcContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_aggregate_func -} - -func (*Aggregate_funcContext) IsAggregate_funcContext() {} - -func NewAggregate_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_funcContext { - var p = new(Aggregate_funcContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_aggregate_func - - return p -} - -func (s *Aggregate_funcContext) GetParser() antlr.Parser { return s.parser } - -func (s *Aggregate_funcContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Aggregate_funcContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Aggregate_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Aggregate_funcContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAggregate_func(s) - } -} - -func (s *Aggregate_funcContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAggregate_func(s) - } -} - -func (p *SQLiteParser) Aggregate_func() (localctx IAggregate_funcContext) { - localctx = NewAggregate_funcContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 224, SQLiteParserRULE_aggregate_func) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2162) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// ITable_function_nameContext is an interface to support dynamic dispatch. -type ITable_function_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - Any_name() IAny_nameContext - - // IsTable_function_nameContext differentiates from other interfaces. - IsTable_function_nameContext() -} - -type Table_function_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyTable_function_nameContext() *Table_function_nameContext { - var p = new(Table_function_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_function_name - return p -} - -func InitEmptyTable_function_nameContext(p *Table_function_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_table_function_name -} - -func (*Table_function_nameContext) IsTable_function_nameContext() {} - -func NewTable_function_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_function_nameContext { - var p = new(Table_function_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_table_function_name - - return p -} - -func (s *Table_function_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Table_function_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Table_function_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Table_function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Table_function_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterTable_function_name(s) - } -} - -func (s *Table_function_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitTable_function_name(s) - } -} - -func (p *SQLiteParser) Table_function_name() (localctx ITable_function_nameContext) { - localctx = NewTable_function_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 226, SQLiteParserRULE_table_function_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2164) - p.Any_name() - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -// IAny_nameContext is an interface to support dynamic dispatch. -type IAny_nameContext interface { - antlr.ParserRuleContext - - // GetParser returns the parser. - GetParser() antlr.Parser - - // Getter signatures - IDENTIFIER() antlr.TerminalNode - Keyword() IKeywordContext - STRING_LITERAL() antlr.TerminalNode - OPEN_PAR() antlr.TerminalNode - Any_name() IAny_nameContext - CLOSE_PAR() antlr.TerminalNode - - // IsAny_nameContext differentiates from other interfaces. - IsAny_nameContext() -} - -type Any_nameContext struct { - antlr.BaseParserRuleContext - parser antlr.Parser -} - -func NewEmptyAny_nameContext() *Any_nameContext { - var p = new(Any_nameContext) - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_any_name - return p -} - -func InitEmptyAny_nameContext(p *Any_nameContext) { - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1) - p.RuleIndex = SQLiteParserRULE_any_name -} - -func (*Any_nameContext) IsAny_nameContext() {} - -func NewAny_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Any_nameContext { - var p = new(Any_nameContext) - - antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) - - p.parser = parser - p.RuleIndex = SQLiteParserRULE_any_name - - return p -} - -func (s *Any_nameContext) GetParser() antlr.Parser { return s.parser } - -func (s *Any_nameContext) IDENTIFIER() antlr.TerminalNode { - return s.GetToken(SQLiteParserIDENTIFIER, 0) -} - -func (s *Any_nameContext) Keyword() IKeywordContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IKeywordContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IKeywordContext) -} - -func (s *Any_nameContext) STRING_LITERAL() antlr.TerminalNode { - return s.GetToken(SQLiteParserSTRING_LITERAL, 0) -} - -func (s *Any_nameContext) OPEN_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserOPEN_PAR, 0) -} - -func (s *Any_nameContext) Any_name() IAny_nameContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IAny_nameContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IAny_nameContext) -} - -func (s *Any_nameContext) CLOSE_PAR() antlr.TerminalNode { - return s.GetToken(SQLiteParserCLOSE_PAR, 0) -} - -func (s *Any_nameContext) GetRuleContext() antlr.RuleContext { - return s -} - -func (s *Any_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) -} - -func (s *Any_nameContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.EnterAny_name(s) - } -} - -func (s *Any_nameContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(SQLiteParserListener); ok { - listenerT.ExitAny_name(s) - } -} - -func (p *SQLiteParser) Any_name() (localctx IAny_nameContext) { - localctx = NewAny_nameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 228, SQLiteParserRULE_any_name) - p.SetState(2173) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - - switch p.GetTokenStream().LA(1) { - case SQLiteParserIDENTIFIER: - p.EnterOuterAlt(localctx, 1) - { - p.SetState(2166) - p.Match(SQLiteParserIDENTIFIER) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_: - p.EnterOuterAlt(localctx, 2) - { - p.SetState(2167) - p.Keyword() - } - - case SQLiteParserSTRING_LITERAL: - p.EnterOuterAlt(localctx, 3) - { - p.SetState(2168) - p.Match(SQLiteParserSTRING_LITERAL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - case SQLiteParserOPEN_PAR: - p.EnterOuterAlt(localctx, 4) - { - p.SetState(2169) - p.Match(SQLiteParserOPEN_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(2170) - p.Any_name() - } - { - p.SetState(2171) - p.Match(SQLiteParserCLOSE_PAR) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - default: - p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) - goto errorExit - } - -errorExit: - if p.HasError() { - v := p.GetError() - localctx.SetException(v) - p.GetErrorHandler().ReportError(p, v) - p.GetErrorHandler().Recover(p, v) - p.SetError(nil) - } - p.ExitRule() - return localctx - goto errorExit // Trick to prevent compiler error if the label is not used -} - -func (p *SQLiteParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { - switch ruleIndex { - case 34: - var t *ExprContext = nil - if localctx != nil { - t = localctx.(*ExprContext) - } - return p.Expr_Sempred(t, predIndex) - - default: - panic("No predicate with index: " + fmt.Sprint(ruleIndex)) - } -} - -func (p *SQLiteParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool { - switch predIndex { - case 0: - return p.Precpred(p.GetParserRuleContext(), 20) - - case 1: - return p.Precpred(p.GetParserRuleContext(), 19) - - case 2: - return p.Precpred(p.GetParserRuleContext(), 18) - - case 3: - return p.Precpred(p.GetParserRuleContext(), 17) - - case 4: - return p.Precpred(p.GetParserRuleContext(), 16) - - case 5: - return p.Precpred(p.GetParserRuleContext(), 15) - - case 6: - return p.Precpred(p.GetParserRuleContext(), 14) - - case 7: - return p.Precpred(p.GetParserRuleContext(), 12) - - case 8: - return p.Precpred(p.GetParserRuleContext(), 11) - - case 9: - return p.Precpred(p.GetParserRuleContext(), 4) - - case 10: - return p.Precpred(p.GetParserRuleContext(), 13) - - case 11: - return p.Precpred(p.GetParserRuleContext(), 7) - - case 12: - return p.Precpred(p.GetParserRuleContext(), 6) - - case 13: - return p.Precpred(p.GetParserRuleContext(), 5) - - default: - panic("No predicate with index: " + fmt.Sprint(predIndex)) - } -} diff --git a/internal/engine/sqlite/parser/sqliteparser_base_listener.go b/internal/engine/sqlite/parser/sqliteparser_base_listener.go deleted file mode 100644 index 1480f105f7..0000000000 --- a/internal/engine/sqlite/parser/sqliteparser_base_listener.go +++ /dev/null @@ -1,814 +0,0 @@ -// Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. - -package parser // SQLiteParser - -import "github.com/antlr4-go/antlr/v4" - -// BaseSQLiteParserListener is a complete listener for a parse tree produced by SQLiteParser. -type BaseSQLiteParserListener struct{} - -var _ SQLiteParserListener = &BaseSQLiteParserListener{} - -// VisitTerminal is called when a terminal node is visited. -func (s *BaseSQLiteParserListener) VisitTerminal(node antlr.TerminalNode) {} - -// VisitErrorNode is called when an error node is visited. -func (s *BaseSQLiteParserListener) VisitErrorNode(node antlr.ErrorNode) {} - -// EnterEveryRule is called when any rule is entered. -func (s *BaseSQLiteParserListener) EnterEveryRule(ctx antlr.ParserRuleContext) {} - -// ExitEveryRule is called when any rule is exited. -func (s *BaseSQLiteParserListener) ExitEveryRule(ctx antlr.ParserRuleContext) {} - -// EnterParse is called when production parse is entered. -func (s *BaseSQLiteParserListener) EnterParse(ctx *ParseContext) {} - -// ExitParse is called when production parse is exited. -func (s *BaseSQLiteParserListener) ExitParse(ctx *ParseContext) {} - -// EnterSql_stmt_list is called when production sql_stmt_list is entered. -func (s *BaseSQLiteParserListener) EnterSql_stmt_list(ctx *Sql_stmt_listContext) {} - -// ExitSql_stmt_list is called when production sql_stmt_list is exited. -func (s *BaseSQLiteParserListener) ExitSql_stmt_list(ctx *Sql_stmt_listContext) {} - -// EnterSql_stmt is called when production sql_stmt is entered. -func (s *BaseSQLiteParserListener) EnterSql_stmt(ctx *Sql_stmtContext) {} - -// ExitSql_stmt is called when production sql_stmt is exited. -func (s *BaseSQLiteParserListener) ExitSql_stmt(ctx *Sql_stmtContext) {} - -// EnterAlter_table_stmt is called when production alter_table_stmt is entered. -func (s *BaseSQLiteParserListener) EnterAlter_table_stmt(ctx *Alter_table_stmtContext) {} - -// ExitAlter_table_stmt is called when production alter_table_stmt is exited. -func (s *BaseSQLiteParserListener) ExitAlter_table_stmt(ctx *Alter_table_stmtContext) {} - -// EnterAnalyze_stmt is called when production analyze_stmt is entered. -func (s *BaseSQLiteParserListener) EnterAnalyze_stmt(ctx *Analyze_stmtContext) {} - -// ExitAnalyze_stmt is called when production analyze_stmt is exited. -func (s *BaseSQLiteParserListener) ExitAnalyze_stmt(ctx *Analyze_stmtContext) {} - -// EnterAttach_stmt is called when production attach_stmt is entered. -func (s *BaseSQLiteParserListener) EnterAttach_stmt(ctx *Attach_stmtContext) {} - -// ExitAttach_stmt is called when production attach_stmt is exited. -func (s *BaseSQLiteParserListener) ExitAttach_stmt(ctx *Attach_stmtContext) {} - -// EnterBegin_stmt is called when production begin_stmt is entered. -func (s *BaseSQLiteParserListener) EnterBegin_stmt(ctx *Begin_stmtContext) {} - -// ExitBegin_stmt is called when production begin_stmt is exited. -func (s *BaseSQLiteParserListener) ExitBegin_stmt(ctx *Begin_stmtContext) {} - -// EnterCommit_stmt is called when production commit_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCommit_stmt(ctx *Commit_stmtContext) {} - -// ExitCommit_stmt is called when production commit_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCommit_stmt(ctx *Commit_stmtContext) {} - -// EnterRollback_stmt is called when production rollback_stmt is entered. -func (s *BaseSQLiteParserListener) EnterRollback_stmt(ctx *Rollback_stmtContext) {} - -// ExitRollback_stmt is called when production rollback_stmt is exited. -func (s *BaseSQLiteParserListener) ExitRollback_stmt(ctx *Rollback_stmtContext) {} - -// EnterSavepoint_stmt is called when production savepoint_stmt is entered. -func (s *BaseSQLiteParserListener) EnterSavepoint_stmt(ctx *Savepoint_stmtContext) {} - -// ExitSavepoint_stmt is called when production savepoint_stmt is exited. -func (s *BaseSQLiteParserListener) ExitSavepoint_stmt(ctx *Savepoint_stmtContext) {} - -// EnterRelease_stmt is called when production release_stmt is entered. -func (s *BaseSQLiteParserListener) EnterRelease_stmt(ctx *Release_stmtContext) {} - -// ExitRelease_stmt is called when production release_stmt is exited. -func (s *BaseSQLiteParserListener) ExitRelease_stmt(ctx *Release_stmtContext) {} - -// EnterCreate_index_stmt is called when production create_index_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCreate_index_stmt(ctx *Create_index_stmtContext) {} - -// ExitCreate_index_stmt is called when production create_index_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCreate_index_stmt(ctx *Create_index_stmtContext) {} - -// EnterIndexed_column is called when production indexed_column is entered. -func (s *BaseSQLiteParserListener) EnterIndexed_column(ctx *Indexed_columnContext) {} - -// ExitIndexed_column is called when production indexed_column is exited. -func (s *BaseSQLiteParserListener) ExitIndexed_column(ctx *Indexed_columnContext) {} - -// EnterTable_option is called when production table_option is entered. -func (s *BaseSQLiteParserListener) EnterTable_option(ctx *Table_optionContext) {} - -// ExitTable_option is called when production table_option is exited. -func (s *BaseSQLiteParserListener) ExitTable_option(ctx *Table_optionContext) {} - -// EnterCreate_table_stmt is called when production create_table_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCreate_table_stmt(ctx *Create_table_stmtContext) {} - -// ExitCreate_table_stmt is called when production create_table_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCreate_table_stmt(ctx *Create_table_stmtContext) {} - -// EnterColumn_def is called when production column_def is entered. -func (s *BaseSQLiteParserListener) EnterColumn_def(ctx *Column_defContext) {} - -// ExitColumn_def is called when production column_def is exited. -func (s *BaseSQLiteParserListener) ExitColumn_def(ctx *Column_defContext) {} - -// EnterType_name is called when production type_name is entered. -func (s *BaseSQLiteParserListener) EnterType_name(ctx *Type_nameContext) {} - -// ExitType_name is called when production type_name is exited. -func (s *BaseSQLiteParserListener) ExitType_name(ctx *Type_nameContext) {} - -// EnterColumn_constraint is called when production column_constraint is entered. -func (s *BaseSQLiteParserListener) EnterColumn_constraint(ctx *Column_constraintContext) {} - -// ExitColumn_constraint is called when production column_constraint is exited. -func (s *BaseSQLiteParserListener) ExitColumn_constraint(ctx *Column_constraintContext) {} - -// EnterSigned_number is called when production signed_number is entered. -func (s *BaseSQLiteParserListener) EnterSigned_number(ctx *Signed_numberContext) {} - -// ExitSigned_number is called when production signed_number is exited. -func (s *BaseSQLiteParserListener) ExitSigned_number(ctx *Signed_numberContext) {} - -// EnterTable_constraint is called when production table_constraint is entered. -func (s *BaseSQLiteParserListener) EnterTable_constraint(ctx *Table_constraintContext) {} - -// ExitTable_constraint is called when production table_constraint is exited. -func (s *BaseSQLiteParserListener) ExitTable_constraint(ctx *Table_constraintContext) {} - -// EnterForeign_key_clause is called when production foreign_key_clause is entered. -func (s *BaseSQLiteParserListener) EnterForeign_key_clause(ctx *Foreign_key_clauseContext) {} - -// ExitForeign_key_clause is called when production foreign_key_clause is exited. -func (s *BaseSQLiteParserListener) ExitForeign_key_clause(ctx *Foreign_key_clauseContext) {} - -// EnterConflict_clause is called when production conflict_clause is entered. -func (s *BaseSQLiteParserListener) EnterConflict_clause(ctx *Conflict_clauseContext) {} - -// ExitConflict_clause is called when production conflict_clause is exited. -func (s *BaseSQLiteParserListener) ExitConflict_clause(ctx *Conflict_clauseContext) {} - -// EnterCreate_trigger_stmt is called when production create_trigger_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCreate_trigger_stmt(ctx *Create_trigger_stmtContext) {} - -// ExitCreate_trigger_stmt is called when production create_trigger_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCreate_trigger_stmt(ctx *Create_trigger_stmtContext) {} - -// EnterCreate_view_stmt is called when production create_view_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCreate_view_stmt(ctx *Create_view_stmtContext) {} - -// ExitCreate_view_stmt is called when production create_view_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCreate_view_stmt(ctx *Create_view_stmtContext) {} - -// EnterCreate_virtual_table_stmt is called when production create_virtual_table_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCreate_virtual_table_stmt(ctx *Create_virtual_table_stmtContext) { -} - -// ExitCreate_virtual_table_stmt is called when production create_virtual_table_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCreate_virtual_table_stmt(ctx *Create_virtual_table_stmtContext) { -} - -// EnterWith_clause is called when production with_clause is entered. -func (s *BaseSQLiteParserListener) EnterWith_clause(ctx *With_clauseContext) {} - -// ExitWith_clause is called when production with_clause is exited. -func (s *BaseSQLiteParserListener) ExitWith_clause(ctx *With_clauseContext) {} - -// EnterCte_table_name is called when production cte_table_name is entered. -func (s *BaseSQLiteParserListener) EnterCte_table_name(ctx *Cte_table_nameContext) {} - -// ExitCte_table_name is called when production cte_table_name is exited. -func (s *BaseSQLiteParserListener) ExitCte_table_name(ctx *Cte_table_nameContext) {} - -// EnterRecursive_cte is called when production recursive_cte is entered. -func (s *BaseSQLiteParserListener) EnterRecursive_cte(ctx *Recursive_cteContext) {} - -// ExitRecursive_cte is called when production recursive_cte is exited. -func (s *BaseSQLiteParserListener) ExitRecursive_cte(ctx *Recursive_cteContext) {} - -// EnterCommon_table_expression is called when production common_table_expression is entered. -func (s *BaseSQLiteParserListener) EnterCommon_table_expression(ctx *Common_table_expressionContext) { -} - -// ExitCommon_table_expression is called when production common_table_expression is exited. -func (s *BaseSQLiteParserListener) ExitCommon_table_expression(ctx *Common_table_expressionContext) {} - -// EnterReturning_clause is called when production returning_clause is entered. -func (s *BaseSQLiteParserListener) EnterReturning_clause(ctx *Returning_clauseContext) {} - -// ExitReturning_clause is called when production returning_clause is exited. -func (s *BaseSQLiteParserListener) ExitReturning_clause(ctx *Returning_clauseContext) {} - -// EnterDelete_stmt is called when production delete_stmt is entered. -func (s *BaseSQLiteParserListener) EnterDelete_stmt(ctx *Delete_stmtContext) {} - -// ExitDelete_stmt is called when production delete_stmt is exited. -func (s *BaseSQLiteParserListener) ExitDelete_stmt(ctx *Delete_stmtContext) {} - -// EnterDelete_stmt_limited is called when production delete_stmt_limited is entered. -func (s *BaseSQLiteParserListener) EnterDelete_stmt_limited(ctx *Delete_stmt_limitedContext) {} - -// ExitDelete_stmt_limited is called when production delete_stmt_limited is exited. -func (s *BaseSQLiteParserListener) ExitDelete_stmt_limited(ctx *Delete_stmt_limitedContext) {} - -// EnterDetach_stmt is called when production detach_stmt is entered. -func (s *BaseSQLiteParserListener) EnterDetach_stmt(ctx *Detach_stmtContext) {} - -// ExitDetach_stmt is called when production detach_stmt is exited. -func (s *BaseSQLiteParserListener) ExitDetach_stmt(ctx *Detach_stmtContext) {} - -// EnterDrop_stmt is called when production drop_stmt is entered. -func (s *BaseSQLiteParserListener) EnterDrop_stmt(ctx *Drop_stmtContext) {} - -// ExitDrop_stmt is called when production drop_stmt is exited. -func (s *BaseSQLiteParserListener) ExitDrop_stmt(ctx *Drop_stmtContext) {} - -// EnterExpr_case is called when production expr_case is entered. -func (s *BaseSQLiteParserListener) EnterExpr_case(ctx *Expr_caseContext) {} - -// ExitExpr_case is called when production expr_case is exited. -func (s *BaseSQLiteParserListener) ExitExpr_case(ctx *Expr_caseContext) {} - -// EnterExpr_raise is called when production expr_raise is entered. -func (s *BaseSQLiteParserListener) EnterExpr_raise(ctx *Expr_raiseContext) {} - -// ExitExpr_raise is called when production expr_raise is exited. -func (s *BaseSQLiteParserListener) ExitExpr_raise(ctx *Expr_raiseContext) {} - -// EnterExpr_function is called when production expr_function is entered. -func (s *BaseSQLiteParserListener) EnterExpr_function(ctx *Expr_functionContext) {} - -// ExitExpr_function is called when production expr_function is exited. -func (s *BaseSQLiteParserListener) ExitExpr_function(ctx *Expr_functionContext) {} - -// EnterExpr_comparison is called when production expr_comparison is entered. -func (s *BaseSQLiteParserListener) EnterExpr_comparison(ctx *Expr_comparisonContext) {} - -// ExitExpr_comparison is called when production expr_comparison is exited. -func (s *BaseSQLiteParserListener) ExitExpr_comparison(ctx *Expr_comparisonContext) {} - -// EnterExpr_bool is called when production expr_bool is entered. -func (s *BaseSQLiteParserListener) EnterExpr_bool(ctx *Expr_boolContext) {} - -// ExitExpr_bool is called when production expr_bool is exited. -func (s *BaseSQLiteParserListener) ExitExpr_bool(ctx *Expr_boolContext) {} - -// EnterExpr_binary is called when production expr_binary is entered. -func (s *BaseSQLiteParserListener) EnterExpr_binary(ctx *Expr_binaryContext) {} - -// ExitExpr_binary is called when production expr_binary is exited. -func (s *BaseSQLiteParserListener) ExitExpr_binary(ctx *Expr_binaryContext) {} - -// EnterExpr_literal is called when production expr_literal is entered. -func (s *BaseSQLiteParserListener) EnterExpr_literal(ctx *Expr_literalContext) {} - -// ExitExpr_literal is called when production expr_literal is exited. -func (s *BaseSQLiteParserListener) ExitExpr_literal(ctx *Expr_literalContext) {} - -// EnterExpr_cast is called when production expr_cast is entered. -func (s *BaseSQLiteParserListener) EnterExpr_cast(ctx *Expr_castContext) {} - -// ExitExpr_cast is called when production expr_cast is exited. -func (s *BaseSQLiteParserListener) ExitExpr_cast(ctx *Expr_castContext) {} - -// EnterExpr_in_select is called when production expr_in_select is entered. -func (s *BaseSQLiteParserListener) EnterExpr_in_select(ctx *Expr_in_selectContext) {} - -// ExitExpr_in_select is called when production expr_in_select is exited. -func (s *BaseSQLiteParserListener) ExitExpr_in_select(ctx *Expr_in_selectContext) {} - -// EnterExpr_list is called when production expr_list is entered. -func (s *BaseSQLiteParserListener) EnterExpr_list(ctx *Expr_listContext) {} - -// ExitExpr_list is called when production expr_list is exited. -func (s *BaseSQLiteParserListener) ExitExpr_list(ctx *Expr_listContext) {} - -// EnterExpr_between is called when production expr_between is entered. -func (s *BaseSQLiteParserListener) EnterExpr_between(ctx *Expr_betweenContext) {} - -// ExitExpr_between is called when production expr_between is exited. -func (s *BaseSQLiteParserListener) ExitExpr_between(ctx *Expr_betweenContext) {} - -// EnterExpr_collate is called when production expr_collate is entered. -func (s *BaseSQLiteParserListener) EnterExpr_collate(ctx *Expr_collateContext) {} - -// ExitExpr_collate is called when production expr_collate is exited. -func (s *BaseSQLiteParserListener) ExitExpr_collate(ctx *Expr_collateContext) {} - -// EnterExpr_qualified_column_name is called when production expr_qualified_column_name is entered. -func (s *BaseSQLiteParserListener) EnterExpr_qualified_column_name(ctx *Expr_qualified_column_nameContext) { -} - -// ExitExpr_qualified_column_name is called when production expr_qualified_column_name is exited. -func (s *BaseSQLiteParserListener) ExitExpr_qualified_column_name(ctx *Expr_qualified_column_nameContext) { -} - -// EnterExpr_unary is called when production expr_unary is entered. -func (s *BaseSQLiteParserListener) EnterExpr_unary(ctx *Expr_unaryContext) {} - -// ExitExpr_unary is called when production expr_unary is exited. -func (s *BaseSQLiteParserListener) ExitExpr_unary(ctx *Expr_unaryContext) {} - -// EnterExpr_null_comp is called when production expr_null_comp is entered. -func (s *BaseSQLiteParserListener) EnterExpr_null_comp(ctx *Expr_null_compContext) {} - -// ExitExpr_null_comp is called when production expr_null_comp is exited. -func (s *BaseSQLiteParserListener) ExitExpr_null_comp(ctx *Expr_null_compContext) {} - -// EnterExpr_bind is called when production expr_bind is entered. -func (s *BaseSQLiteParserListener) EnterExpr_bind(ctx *Expr_bindContext) {} - -// ExitExpr_bind is called when production expr_bind is exited. -func (s *BaseSQLiteParserListener) ExitExpr_bind(ctx *Expr_bindContext) {} - -// EnterRaise_function is called when production raise_function is entered. -func (s *BaseSQLiteParserListener) EnterRaise_function(ctx *Raise_functionContext) {} - -// ExitRaise_function is called when production raise_function is exited. -func (s *BaseSQLiteParserListener) ExitRaise_function(ctx *Raise_functionContext) {} - -// EnterLiteral_value is called when production literal_value is entered. -func (s *BaseSQLiteParserListener) EnterLiteral_value(ctx *Literal_valueContext) {} - -// ExitLiteral_value is called when production literal_value is exited. -func (s *BaseSQLiteParserListener) ExitLiteral_value(ctx *Literal_valueContext) {} - -// EnterInsert_stmt is called when production insert_stmt is entered. -func (s *BaseSQLiteParserListener) EnterInsert_stmt(ctx *Insert_stmtContext) {} - -// ExitInsert_stmt is called when production insert_stmt is exited. -func (s *BaseSQLiteParserListener) ExitInsert_stmt(ctx *Insert_stmtContext) {} - -// EnterUpsert_clause is called when production upsert_clause is entered. -func (s *BaseSQLiteParserListener) EnterUpsert_clause(ctx *Upsert_clauseContext) {} - -// ExitUpsert_clause is called when production upsert_clause is exited. -func (s *BaseSQLiteParserListener) ExitUpsert_clause(ctx *Upsert_clauseContext) {} - -// EnterPragma_stmt is called when production pragma_stmt is entered. -func (s *BaseSQLiteParserListener) EnterPragma_stmt(ctx *Pragma_stmtContext) {} - -// ExitPragma_stmt is called when production pragma_stmt is exited. -func (s *BaseSQLiteParserListener) ExitPragma_stmt(ctx *Pragma_stmtContext) {} - -// EnterPragma_value is called when production pragma_value is entered. -func (s *BaseSQLiteParserListener) EnterPragma_value(ctx *Pragma_valueContext) {} - -// ExitPragma_value is called when production pragma_value is exited. -func (s *BaseSQLiteParserListener) ExitPragma_value(ctx *Pragma_valueContext) {} - -// EnterReindex_stmt is called when production reindex_stmt is entered. -func (s *BaseSQLiteParserListener) EnterReindex_stmt(ctx *Reindex_stmtContext) {} - -// ExitReindex_stmt is called when production reindex_stmt is exited. -func (s *BaseSQLiteParserListener) ExitReindex_stmt(ctx *Reindex_stmtContext) {} - -// EnterSelect_stmt is called when production select_stmt is entered. -func (s *BaseSQLiteParserListener) EnterSelect_stmt(ctx *Select_stmtContext) {} - -// ExitSelect_stmt is called when production select_stmt is exited. -func (s *BaseSQLiteParserListener) ExitSelect_stmt(ctx *Select_stmtContext) {} - -// EnterJoin_clause is called when production join_clause is entered. -func (s *BaseSQLiteParserListener) EnterJoin_clause(ctx *Join_clauseContext) {} - -// ExitJoin_clause is called when production join_clause is exited. -func (s *BaseSQLiteParserListener) ExitJoin_clause(ctx *Join_clauseContext) {} - -// EnterSelect_core is called when production select_core is entered. -func (s *BaseSQLiteParserListener) EnterSelect_core(ctx *Select_coreContext) {} - -// ExitSelect_core is called when production select_core is exited. -func (s *BaseSQLiteParserListener) ExitSelect_core(ctx *Select_coreContext) {} - -// EnterFactored_select_stmt is called when production factored_select_stmt is entered. -func (s *BaseSQLiteParserListener) EnterFactored_select_stmt(ctx *Factored_select_stmtContext) {} - -// ExitFactored_select_stmt is called when production factored_select_stmt is exited. -func (s *BaseSQLiteParserListener) ExitFactored_select_stmt(ctx *Factored_select_stmtContext) {} - -// EnterSimple_select_stmt is called when production simple_select_stmt is entered. -func (s *BaseSQLiteParserListener) EnterSimple_select_stmt(ctx *Simple_select_stmtContext) {} - -// ExitSimple_select_stmt is called when production simple_select_stmt is exited. -func (s *BaseSQLiteParserListener) ExitSimple_select_stmt(ctx *Simple_select_stmtContext) {} - -// EnterCompound_select_stmt is called when production compound_select_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCompound_select_stmt(ctx *Compound_select_stmtContext) {} - -// ExitCompound_select_stmt is called when production compound_select_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCompound_select_stmt(ctx *Compound_select_stmtContext) {} - -// EnterTable_or_subquery is called when production table_or_subquery is entered. -func (s *BaseSQLiteParserListener) EnterTable_or_subquery(ctx *Table_or_subqueryContext) {} - -// ExitTable_or_subquery is called when production table_or_subquery is exited. -func (s *BaseSQLiteParserListener) ExitTable_or_subquery(ctx *Table_or_subqueryContext) {} - -// EnterResult_column is called when production result_column is entered. -func (s *BaseSQLiteParserListener) EnterResult_column(ctx *Result_columnContext) {} - -// ExitResult_column is called when production result_column is exited. -func (s *BaseSQLiteParserListener) ExitResult_column(ctx *Result_columnContext) {} - -// EnterJoin_operator is called when production join_operator is entered. -func (s *BaseSQLiteParserListener) EnterJoin_operator(ctx *Join_operatorContext) {} - -// ExitJoin_operator is called when production join_operator is exited. -func (s *BaseSQLiteParserListener) ExitJoin_operator(ctx *Join_operatorContext) {} - -// EnterJoin_constraint is called when production join_constraint is entered. -func (s *BaseSQLiteParserListener) EnterJoin_constraint(ctx *Join_constraintContext) {} - -// ExitJoin_constraint is called when production join_constraint is exited. -func (s *BaseSQLiteParserListener) ExitJoin_constraint(ctx *Join_constraintContext) {} - -// EnterCompound_operator is called when production compound_operator is entered. -func (s *BaseSQLiteParserListener) EnterCompound_operator(ctx *Compound_operatorContext) {} - -// ExitCompound_operator is called when production compound_operator is exited. -func (s *BaseSQLiteParserListener) ExitCompound_operator(ctx *Compound_operatorContext) {} - -// EnterUpdate_stmt is called when production update_stmt is entered. -func (s *BaseSQLiteParserListener) EnterUpdate_stmt(ctx *Update_stmtContext) {} - -// ExitUpdate_stmt is called when production update_stmt is exited. -func (s *BaseSQLiteParserListener) ExitUpdate_stmt(ctx *Update_stmtContext) {} - -// EnterColumn_name_list is called when production column_name_list is entered. -func (s *BaseSQLiteParserListener) EnterColumn_name_list(ctx *Column_name_listContext) {} - -// ExitColumn_name_list is called when production column_name_list is exited. -func (s *BaseSQLiteParserListener) ExitColumn_name_list(ctx *Column_name_listContext) {} - -// EnterUpdate_stmt_limited is called when production update_stmt_limited is entered. -func (s *BaseSQLiteParserListener) EnterUpdate_stmt_limited(ctx *Update_stmt_limitedContext) {} - -// ExitUpdate_stmt_limited is called when production update_stmt_limited is exited. -func (s *BaseSQLiteParserListener) ExitUpdate_stmt_limited(ctx *Update_stmt_limitedContext) {} - -// EnterQualified_table_name is called when production qualified_table_name is entered. -func (s *BaseSQLiteParserListener) EnterQualified_table_name(ctx *Qualified_table_nameContext) {} - -// ExitQualified_table_name is called when production qualified_table_name is exited. -func (s *BaseSQLiteParserListener) ExitQualified_table_name(ctx *Qualified_table_nameContext) {} - -// EnterVacuum_stmt is called when production vacuum_stmt is entered. -func (s *BaseSQLiteParserListener) EnterVacuum_stmt(ctx *Vacuum_stmtContext) {} - -// ExitVacuum_stmt is called when production vacuum_stmt is exited. -func (s *BaseSQLiteParserListener) ExitVacuum_stmt(ctx *Vacuum_stmtContext) {} - -// EnterFilter_clause is called when production filter_clause is entered. -func (s *BaseSQLiteParserListener) EnterFilter_clause(ctx *Filter_clauseContext) {} - -// ExitFilter_clause is called when production filter_clause is exited. -func (s *BaseSQLiteParserListener) ExitFilter_clause(ctx *Filter_clauseContext) {} - -// EnterWindow_defn is called when production window_defn is entered. -func (s *BaseSQLiteParserListener) EnterWindow_defn(ctx *Window_defnContext) {} - -// ExitWindow_defn is called when production window_defn is exited. -func (s *BaseSQLiteParserListener) ExitWindow_defn(ctx *Window_defnContext) {} - -// EnterOver_clause is called when production over_clause is entered. -func (s *BaseSQLiteParserListener) EnterOver_clause(ctx *Over_clauseContext) {} - -// ExitOver_clause is called when production over_clause is exited. -func (s *BaseSQLiteParserListener) ExitOver_clause(ctx *Over_clauseContext) {} - -// EnterFrame_spec is called when production frame_spec is entered. -func (s *BaseSQLiteParserListener) EnterFrame_spec(ctx *Frame_specContext) {} - -// ExitFrame_spec is called when production frame_spec is exited. -func (s *BaseSQLiteParserListener) ExitFrame_spec(ctx *Frame_specContext) {} - -// EnterFrame_clause is called when production frame_clause is entered. -func (s *BaseSQLiteParserListener) EnterFrame_clause(ctx *Frame_clauseContext) {} - -// ExitFrame_clause is called when production frame_clause is exited. -func (s *BaseSQLiteParserListener) ExitFrame_clause(ctx *Frame_clauseContext) {} - -// EnterSimple_function_invocation is called when production simple_function_invocation is entered. -func (s *BaseSQLiteParserListener) EnterSimple_function_invocation(ctx *Simple_function_invocationContext) { -} - -// ExitSimple_function_invocation is called when production simple_function_invocation is exited. -func (s *BaseSQLiteParserListener) ExitSimple_function_invocation(ctx *Simple_function_invocationContext) { -} - -// EnterAggregate_function_invocation is called when production aggregate_function_invocation is entered. -func (s *BaseSQLiteParserListener) EnterAggregate_function_invocation(ctx *Aggregate_function_invocationContext) { -} - -// ExitAggregate_function_invocation is called when production aggregate_function_invocation is exited. -func (s *BaseSQLiteParserListener) ExitAggregate_function_invocation(ctx *Aggregate_function_invocationContext) { -} - -// EnterWindow_function_invocation is called when production window_function_invocation is entered. -func (s *BaseSQLiteParserListener) EnterWindow_function_invocation(ctx *Window_function_invocationContext) { -} - -// ExitWindow_function_invocation is called when production window_function_invocation is exited. -func (s *BaseSQLiteParserListener) ExitWindow_function_invocation(ctx *Window_function_invocationContext) { -} - -// EnterCommon_table_stmt is called when production common_table_stmt is entered. -func (s *BaseSQLiteParserListener) EnterCommon_table_stmt(ctx *Common_table_stmtContext) {} - -// ExitCommon_table_stmt is called when production common_table_stmt is exited. -func (s *BaseSQLiteParserListener) ExitCommon_table_stmt(ctx *Common_table_stmtContext) {} - -// EnterOrder_by_stmt is called when production order_by_stmt is entered. -func (s *BaseSQLiteParserListener) EnterOrder_by_stmt(ctx *Order_by_stmtContext) {} - -// ExitOrder_by_stmt is called when production order_by_stmt is exited. -func (s *BaseSQLiteParserListener) ExitOrder_by_stmt(ctx *Order_by_stmtContext) {} - -// EnterLimit_stmt is called when production limit_stmt is entered. -func (s *BaseSQLiteParserListener) EnterLimit_stmt(ctx *Limit_stmtContext) {} - -// ExitLimit_stmt is called when production limit_stmt is exited. -func (s *BaseSQLiteParserListener) ExitLimit_stmt(ctx *Limit_stmtContext) {} - -// EnterOrdering_term is called when production ordering_term is entered. -func (s *BaseSQLiteParserListener) EnterOrdering_term(ctx *Ordering_termContext) {} - -// ExitOrdering_term is called when production ordering_term is exited. -func (s *BaseSQLiteParserListener) ExitOrdering_term(ctx *Ordering_termContext) {} - -// EnterAsc_desc is called when production asc_desc is entered. -func (s *BaseSQLiteParserListener) EnterAsc_desc(ctx *Asc_descContext) {} - -// ExitAsc_desc is called when production asc_desc is exited. -func (s *BaseSQLiteParserListener) ExitAsc_desc(ctx *Asc_descContext) {} - -// EnterFrame_left is called when production frame_left is entered. -func (s *BaseSQLiteParserListener) EnterFrame_left(ctx *Frame_leftContext) {} - -// ExitFrame_left is called when production frame_left is exited. -func (s *BaseSQLiteParserListener) ExitFrame_left(ctx *Frame_leftContext) {} - -// EnterFrame_right is called when production frame_right is entered. -func (s *BaseSQLiteParserListener) EnterFrame_right(ctx *Frame_rightContext) {} - -// ExitFrame_right is called when production frame_right is exited. -func (s *BaseSQLiteParserListener) ExitFrame_right(ctx *Frame_rightContext) {} - -// EnterFrame_single is called when production frame_single is entered. -func (s *BaseSQLiteParserListener) EnterFrame_single(ctx *Frame_singleContext) {} - -// ExitFrame_single is called when production frame_single is exited. -func (s *BaseSQLiteParserListener) ExitFrame_single(ctx *Frame_singleContext) {} - -// EnterWindow_function is called when production window_function is entered. -func (s *BaseSQLiteParserListener) EnterWindow_function(ctx *Window_functionContext) {} - -// ExitWindow_function is called when production window_function is exited. -func (s *BaseSQLiteParserListener) ExitWindow_function(ctx *Window_functionContext) {} - -// EnterOf_OF_fset is called when production of_OF_fset is entered. -func (s *BaseSQLiteParserListener) EnterOf_OF_fset(ctx *Of_OF_fsetContext) {} - -// ExitOf_OF_fset is called when production of_OF_fset is exited. -func (s *BaseSQLiteParserListener) ExitOf_OF_fset(ctx *Of_OF_fsetContext) {} - -// EnterDefault_DEFAULT__value is called when production default_DEFAULT__value is entered. -func (s *BaseSQLiteParserListener) EnterDefault_DEFAULT__value(ctx *Default_DEFAULT__valueContext) {} - -// ExitDefault_DEFAULT__value is called when production default_DEFAULT__value is exited. -func (s *BaseSQLiteParserListener) ExitDefault_DEFAULT__value(ctx *Default_DEFAULT__valueContext) {} - -// EnterPartition_by is called when production partition_by is entered. -func (s *BaseSQLiteParserListener) EnterPartition_by(ctx *Partition_byContext) {} - -// ExitPartition_by is called when production partition_by is exited. -func (s *BaseSQLiteParserListener) ExitPartition_by(ctx *Partition_byContext) {} - -// EnterOrder_by_expr is called when production order_by_expr is entered. -func (s *BaseSQLiteParserListener) EnterOrder_by_expr(ctx *Order_by_exprContext) {} - -// ExitOrder_by_expr is called when production order_by_expr is exited. -func (s *BaseSQLiteParserListener) ExitOrder_by_expr(ctx *Order_by_exprContext) {} - -// EnterOrder_by_expr_asc_desc is called when production order_by_expr_asc_desc is entered. -func (s *BaseSQLiteParserListener) EnterOrder_by_expr_asc_desc(ctx *Order_by_expr_asc_descContext) {} - -// ExitOrder_by_expr_asc_desc is called when production order_by_expr_asc_desc is exited. -func (s *BaseSQLiteParserListener) ExitOrder_by_expr_asc_desc(ctx *Order_by_expr_asc_descContext) {} - -// EnterExpr_asc_desc is called when production expr_asc_desc is entered. -func (s *BaseSQLiteParserListener) EnterExpr_asc_desc(ctx *Expr_asc_descContext) {} - -// ExitExpr_asc_desc is called when production expr_asc_desc is exited. -func (s *BaseSQLiteParserListener) ExitExpr_asc_desc(ctx *Expr_asc_descContext) {} - -// EnterInitial_select is called when production initial_select is entered. -func (s *BaseSQLiteParserListener) EnterInitial_select(ctx *Initial_selectContext) {} - -// ExitInitial_select is called when production initial_select is exited. -func (s *BaseSQLiteParserListener) ExitInitial_select(ctx *Initial_selectContext) {} - -// EnterRecursive__select is called when production recursive__select is entered. -func (s *BaseSQLiteParserListener) EnterRecursive__select(ctx *Recursive__selectContext) {} - -// ExitRecursive__select is called when production recursive__select is exited. -func (s *BaseSQLiteParserListener) ExitRecursive__select(ctx *Recursive__selectContext) {} - -// EnterUnary_operator is called when production unary_operator is entered. -func (s *BaseSQLiteParserListener) EnterUnary_operator(ctx *Unary_operatorContext) {} - -// ExitUnary_operator is called when production unary_operator is exited. -func (s *BaseSQLiteParserListener) ExitUnary_operator(ctx *Unary_operatorContext) {} - -// EnterError_message is called when production error_message is entered. -func (s *BaseSQLiteParserListener) EnterError_message(ctx *Error_messageContext) {} - -// ExitError_message is called when production error_message is exited. -func (s *BaseSQLiteParserListener) ExitError_message(ctx *Error_messageContext) {} - -// EnterModule_argument is called when production module_argument is entered. -func (s *BaseSQLiteParserListener) EnterModule_argument(ctx *Module_argumentContext) {} - -// ExitModule_argument is called when production module_argument is exited. -func (s *BaseSQLiteParserListener) ExitModule_argument(ctx *Module_argumentContext) {} - -// EnterColumn_alias is called when production column_alias is entered. -func (s *BaseSQLiteParserListener) EnterColumn_alias(ctx *Column_aliasContext) {} - -// ExitColumn_alias is called when production column_alias is exited. -func (s *BaseSQLiteParserListener) ExitColumn_alias(ctx *Column_aliasContext) {} - -// EnterKeyword is called when production keyword is entered. -func (s *BaseSQLiteParserListener) EnterKeyword(ctx *KeywordContext) {} - -// ExitKeyword is called when production keyword is exited. -func (s *BaseSQLiteParserListener) ExitKeyword(ctx *KeywordContext) {} - -// EnterName is called when production name is entered. -func (s *BaseSQLiteParserListener) EnterName(ctx *NameContext) {} - -// ExitName is called when production name is exited. -func (s *BaseSQLiteParserListener) ExitName(ctx *NameContext) {} - -// EnterFunction_name is called when production function_name is entered. -func (s *BaseSQLiteParserListener) EnterFunction_name(ctx *Function_nameContext) {} - -// ExitFunction_name is called when production function_name is exited. -func (s *BaseSQLiteParserListener) ExitFunction_name(ctx *Function_nameContext) {} - -// EnterQualified_function_name is called when production qualified_function_name is entered. -func (s *BaseSQLiteParserListener) EnterQualified_function_name(ctx *Qualified_function_nameContext) { -} - -// ExitQualified_function_name is called when production qualified_function_name is exited. -func (s *BaseSQLiteParserListener) ExitQualified_function_name(ctx *Qualified_function_nameContext) {} - -// EnterSchema_name is called when production schema_name is entered. -func (s *BaseSQLiteParserListener) EnterSchema_name(ctx *Schema_nameContext) {} - -// ExitSchema_name is called when production schema_name is exited. -func (s *BaseSQLiteParserListener) ExitSchema_name(ctx *Schema_nameContext) {} - -// EnterTable_name is called when production table_name is entered. -func (s *BaseSQLiteParserListener) EnterTable_name(ctx *Table_nameContext) {} - -// ExitTable_name is called when production table_name is exited. -func (s *BaseSQLiteParserListener) ExitTable_name(ctx *Table_nameContext) {} - -// EnterTable_or_index_name is called when production table_or_index_name is entered. -func (s *BaseSQLiteParserListener) EnterTable_or_index_name(ctx *Table_or_index_nameContext) {} - -// ExitTable_or_index_name is called when production table_or_index_name is exited. -func (s *BaseSQLiteParserListener) ExitTable_or_index_name(ctx *Table_or_index_nameContext) {} - -// EnterNew_table_name is called when production new_table_name is entered. -func (s *BaseSQLiteParserListener) EnterNew_table_name(ctx *New_table_nameContext) {} - -// ExitNew_table_name is called when production new_table_name is exited. -func (s *BaseSQLiteParserListener) ExitNew_table_name(ctx *New_table_nameContext) {} - -// EnterColumn_name is called when production column_name is entered. -func (s *BaseSQLiteParserListener) EnterColumn_name(ctx *Column_nameContext) {} - -// ExitColumn_name is called when production column_name is exited. -func (s *BaseSQLiteParserListener) ExitColumn_name(ctx *Column_nameContext) {} - -// EnterCollation_name is called when production collation_name is entered. -func (s *BaseSQLiteParserListener) EnterCollation_name(ctx *Collation_nameContext) {} - -// ExitCollation_name is called when production collation_name is exited. -func (s *BaseSQLiteParserListener) ExitCollation_name(ctx *Collation_nameContext) {} - -// EnterForeign_table is called when production foreign_table is entered. -func (s *BaseSQLiteParserListener) EnterForeign_table(ctx *Foreign_tableContext) {} - -// ExitForeign_table is called when production foreign_table is exited. -func (s *BaseSQLiteParserListener) ExitForeign_table(ctx *Foreign_tableContext) {} - -// EnterIndex_name is called when production index_name is entered. -func (s *BaseSQLiteParserListener) EnterIndex_name(ctx *Index_nameContext) {} - -// ExitIndex_name is called when production index_name is exited. -func (s *BaseSQLiteParserListener) ExitIndex_name(ctx *Index_nameContext) {} - -// EnterTrigger_name is called when production trigger_name is entered. -func (s *BaseSQLiteParserListener) EnterTrigger_name(ctx *Trigger_nameContext) {} - -// ExitTrigger_name is called when production trigger_name is exited. -func (s *BaseSQLiteParserListener) ExitTrigger_name(ctx *Trigger_nameContext) {} - -// EnterView_name is called when production view_name is entered. -func (s *BaseSQLiteParserListener) EnterView_name(ctx *View_nameContext) {} - -// ExitView_name is called when production view_name is exited. -func (s *BaseSQLiteParserListener) ExitView_name(ctx *View_nameContext) {} - -// EnterModule_name is called when production module_name is entered. -func (s *BaseSQLiteParserListener) EnterModule_name(ctx *Module_nameContext) {} - -// ExitModule_name is called when production module_name is exited. -func (s *BaseSQLiteParserListener) ExitModule_name(ctx *Module_nameContext) {} - -// EnterPragma_name is called when production pragma_name is entered. -func (s *BaseSQLiteParserListener) EnterPragma_name(ctx *Pragma_nameContext) {} - -// ExitPragma_name is called when production pragma_name is exited. -func (s *BaseSQLiteParserListener) ExitPragma_name(ctx *Pragma_nameContext) {} - -// EnterSavepoint_name is called when production savepoint_name is entered. -func (s *BaseSQLiteParserListener) EnterSavepoint_name(ctx *Savepoint_nameContext) {} - -// ExitSavepoint_name is called when production savepoint_name is exited. -func (s *BaseSQLiteParserListener) ExitSavepoint_name(ctx *Savepoint_nameContext) {} - -// EnterTable_alias is called when production table_alias is entered. -func (s *BaseSQLiteParserListener) EnterTable_alias(ctx *Table_aliasContext) {} - -// ExitTable_alias is called when production table_alias is exited. -func (s *BaseSQLiteParserListener) ExitTable_alias(ctx *Table_aliasContext) {} - -// EnterTable_alias_fallback is called when production table_alias_fallback is entered. -func (s *BaseSQLiteParserListener) EnterTable_alias_fallback(ctx *Table_alias_fallbackContext) {} - -// ExitTable_alias_fallback is called when production table_alias_fallback is exited. -func (s *BaseSQLiteParserListener) ExitTable_alias_fallback(ctx *Table_alias_fallbackContext) {} - -// EnterTransaction_name is called when production transaction_name is entered. -func (s *BaseSQLiteParserListener) EnterTransaction_name(ctx *Transaction_nameContext) {} - -// ExitTransaction_name is called when production transaction_name is exited. -func (s *BaseSQLiteParserListener) ExitTransaction_name(ctx *Transaction_nameContext) {} - -// EnterWindow_name is called when production window_name is entered. -func (s *BaseSQLiteParserListener) EnterWindow_name(ctx *Window_nameContext) {} - -// ExitWindow_name is called when production window_name is exited. -func (s *BaseSQLiteParserListener) ExitWindow_name(ctx *Window_nameContext) {} - -// EnterAlias is called when production alias is entered. -func (s *BaseSQLiteParserListener) EnterAlias(ctx *AliasContext) {} - -// ExitAlias is called when production alias is exited. -func (s *BaseSQLiteParserListener) ExitAlias(ctx *AliasContext) {} - -// EnterFilename is called when production filename is entered. -func (s *BaseSQLiteParserListener) EnterFilename(ctx *FilenameContext) {} - -// ExitFilename is called when production filename is exited. -func (s *BaseSQLiteParserListener) ExitFilename(ctx *FilenameContext) {} - -// EnterBase_window_name is called when production base_window_name is entered. -func (s *BaseSQLiteParserListener) EnterBase_window_name(ctx *Base_window_nameContext) {} - -// ExitBase_window_name is called when production base_window_name is exited. -func (s *BaseSQLiteParserListener) ExitBase_window_name(ctx *Base_window_nameContext) {} - -// EnterSimple_func is called when production simple_func is entered. -func (s *BaseSQLiteParserListener) EnterSimple_func(ctx *Simple_funcContext) {} - -// ExitSimple_func is called when production simple_func is exited. -func (s *BaseSQLiteParserListener) ExitSimple_func(ctx *Simple_funcContext) {} - -// EnterAggregate_func is called when production aggregate_func is entered. -func (s *BaseSQLiteParserListener) EnterAggregate_func(ctx *Aggregate_funcContext) {} - -// ExitAggregate_func is called when production aggregate_func is exited. -func (s *BaseSQLiteParserListener) ExitAggregate_func(ctx *Aggregate_funcContext) {} - -// EnterTable_function_name is called when production table_function_name is entered. -func (s *BaseSQLiteParserListener) EnterTable_function_name(ctx *Table_function_nameContext) {} - -// ExitTable_function_name is called when production table_function_name is exited. -func (s *BaseSQLiteParserListener) ExitTable_function_name(ctx *Table_function_nameContext) {} - -// EnterAny_name is called when production any_name is entered. -func (s *BaseSQLiteParserListener) EnterAny_name(ctx *Any_nameContext) {} - -// ExitAny_name is called when production any_name is exited. -func (s *BaseSQLiteParserListener) ExitAny_name(ctx *Any_nameContext) {} diff --git a/internal/engine/sqlite/parser/sqliteparser_listener.go b/internal/engine/sqlite/parser/sqliteparser_listener.go deleted file mode 100644 index 4dfcb9632f..0000000000 --- a/internal/engine/sqlite/parser/sqliteparser_listener.go +++ /dev/null @@ -1,790 +0,0 @@ -// Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. - -package parser // SQLiteParser - -import "github.com/antlr4-go/antlr/v4" - -// SQLiteParserListener is a complete listener for a parse tree produced by SQLiteParser. -type SQLiteParserListener interface { - antlr.ParseTreeListener - - // EnterParse is called when entering the parse production. - EnterParse(c *ParseContext) - - // EnterSql_stmt_list is called when entering the sql_stmt_list production. - EnterSql_stmt_list(c *Sql_stmt_listContext) - - // EnterSql_stmt is called when entering the sql_stmt production. - EnterSql_stmt(c *Sql_stmtContext) - - // EnterAlter_table_stmt is called when entering the alter_table_stmt production. - EnterAlter_table_stmt(c *Alter_table_stmtContext) - - // EnterAnalyze_stmt is called when entering the analyze_stmt production. - EnterAnalyze_stmt(c *Analyze_stmtContext) - - // EnterAttach_stmt is called when entering the attach_stmt production. - EnterAttach_stmt(c *Attach_stmtContext) - - // EnterBegin_stmt is called when entering the begin_stmt production. - EnterBegin_stmt(c *Begin_stmtContext) - - // EnterCommit_stmt is called when entering the commit_stmt production. - EnterCommit_stmt(c *Commit_stmtContext) - - // EnterRollback_stmt is called when entering the rollback_stmt production. - EnterRollback_stmt(c *Rollback_stmtContext) - - // EnterSavepoint_stmt is called when entering the savepoint_stmt production. - EnterSavepoint_stmt(c *Savepoint_stmtContext) - - // EnterRelease_stmt is called when entering the release_stmt production. - EnterRelease_stmt(c *Release_stmtContext) - - // EnterCreate_index_stmt is called when entering the create_index_stmt production. - EnterCreate_index_stmt(c *Create_index_stmtContext) - - // EnterIndexed_column is called when entering the indexed_column production. - EnterIndexed_column(c *Indexed_columnContext) - - // EnterTable_option is called when entering the table_option production. - EnterTable_option(c *Table_optionContext) - - // EnterCreate_table_stmt is called when entering the create_table_stmt production. - EnterCreate_table_stmt(c *Create_table_stmtContext) - - // EnterColumn_def is called when entering the column_def production. - EnterColumn_def(c *Column_defContext) - - // EnterType_name is called when entering the type_name production. - EnterType_name(c *Type_nameContext) - - // EnterColumn_constraint is called when entering the column_constraint production. - EnterColumn_constraint(c *Column_constraintContext) - - // EnterSigned_number is called when entering the signed_number production. - EnterSigned_number(c *Signed_numberContext) - - // EnterTable_constraint is called when entering the table_constraint production. - EnterTable_constraint(c *Table_constraintContext) - - // EnterForeign_key_clause is called when entering the foreign_key_clause production. - EnterForeign_key_clause(c *Foreign_key_clauseContext) - - // EnterConflict_clause is called when entering the conflict_clause production. - EnterConflict_clause(c *Conflict_clauseContext) - - // EnterCreate_trigger_stmt is called when entering the create_trigger_stmt production. - EnterCreate_trigger_stmt(c *Create_trigger_stmtContext) - - // EnterCreate_view_stmt is called when entering the create_view_stmt production. - EnterCreate_view_stmt(c *Create_view_stmtContext) - - // EnterCreate_virtual_table_stmt is called when entering the create_virtual_table_stmt production. - EnterCreate_virtual_table_stmt(c *Create_virtual_table_stmtContext) - - // EnterWith_clause is called when entering the with_clause production. - EnterWith_clause(c *With_clauseContext) - - // EnterCte_table_name is called when entering the cte_table_name production. - EnterCte_table_name(c *Cte_table_nameContext) - - // EnterRecursive_cte is called when entering the recursive_cte production. - EnterRecursive_cte(c *Recursive_cteContext) - - // EnterCommon_table_expression is called when entering the common_table_expression production. - EnterCommon_table_expression(c *Common_table_expressionContext) - - // EnterReturning_clause is called when entering the returning_clause production. - EnterReturning_clause(c *Returning_clauseContext) - - // EnterDelete_stmt is called when entering the delete_stmt production. - EnterDelete_stmt(c *Delete_stmtContext) - - // EnterDelete_stmt_limited is called when entering the delete_stmt_limited production. - EnterDelete_stmt_limited(c *Delete_stmt_limitedContext) - - // EnterDetach_stmt is called when entering the detach_stmt production. - EnterDetach_stmt(c *Detach_stmtContext) - - // EnterDrop_stmt is called when entering the drop_stmt production. - EnterDrop_stmt(c *Drop_stmtContext) - - // EnterExpr_case is called when entering the expr_case production. - EnterExpr_case(c *Expr_caseContext) - - // EnterExpr_raise is called when entering the expr_raise production. - EnterExpr_raise(c *Expr_raiseContext) - - // EnterExpr_function is called when entering the expr_function production. - EnterExpr_function(c *Expr_functionContext) - - // EnterExpr_comparison is called when entering the expr_comparison production. - EnterExpr_comparison(c *Expr_comparisonContext) - - // EnterExpr_bool is called when entering the expr_bool production. - EnterExpr_bool(c *Expr_boolContext) - - // EnterExpr_binary is called when entering the expr_binary production. - EnterExpr_binary(c *Expr_binaryContext) - - // EnterExpr_literal is called when entering the expr_literal production. - EnterExpr_literal(c *Expr_literalContext) - - // EnterExpr_cast is called when entering the expr_cast production. - EnterExpr_cast(c *Expr_castContext) - - // EnterExpr_in_select is called when entering the expr_in_select production. - EnterExpr_in_select(c *Expr_in_selectContext) - - // EnterExpr_list is called when entering the expr_list production. - EnterExpr_list(c *Expr_listContext) - - // EnterExpr_between is called when entering the expr_between production. - EnterExpr_between(c *Expr_betweenContext) - - // EnterExpr_collate is called when entering the expr_collate production. - EnterExpr_collate(c *Expr_collateContext) - - // EnterExpr_qualified_column_name is called when entering the expr_qualified_column_name production. - EnterExpr_qualified_column_name(c *Expr_qualified_column_nameContext) - - // EnterExpr_unary is called when entering the expr_unary production. - EnterExpr_unary(c *Expr_unaryContext) - - // EnterExpr_null_comp is called when entering the expr_null_comp production. - EnterExpr_null_comp(c *Expr_null_compContext) - - // EnterExpr_bind is called when entering the expr_bind production. - EnterExpr_bind(c *Expr_bindContext) - - // EnterRaise_function is called when entering the raise_function production. - EnterRaise_function(c *Raise_functionContext) - - // EnterLiteral_value is called when entering the literal_value production. - EnterLiteral_value(c *Literal_valueContext) - - // EnterInsert_stmt is called when entering the insert_stmt production. - EnterInsert_stmt(c *Insert_stmtContext) - - // EnterUpsert_clause is called when entering the upsert_clause production. - EnterUpsert_clause(c *Upsert_clauseContext) - - // EnterPragma_stmt is called when entering the pragma_stmt production. - EnterPragma_stmt(c *Pragma_stmtContext) - - // EnterPragma_value is called when entering the pragma_value production. - EnterPragma_value(c *Pragma_valueContext) - - // EnterReindex_stmt is called when entering the reindex_stmt production. - EnterReindex_stmt(c *Reindex_stmtContext) - - // EnterSelect_stmt is called when entering the select_stmt production. - EnterSelect_stmt(c *Select_stmtContext) - - // EnterJoin_clause is called when entering the join_clause production. - EnterJoin_clause(c *Join_clauseContext) - - // EnterSelect_core is called when entering the select_core production. - EnterSelect_core(c *Select_coreContext) - - // EnterFactored_select_stmt is called when entering the factored_select_stmt production. - EnterFactored_select_stmt(c *Factored_select_stmtContext) - - // EnterSimple_select_stmt is called when entering the simple_select_stmt production. - EnterSimple_select_stmt(c *Simple_select_stmtContext) - - // EnterCompound_select_stmt is called when entering the compound_select_stmt production. - EnterCompound_select_stmt(c *Compound_select_stmtContext) - - // EnterTable_or_subquery is called when entering the table_or_subquery production. - EnterTable_or_subquery(c *Table_or_subqueryContext) - - // EnterResult_column is called when entering the result_column production. - EnterResult_column(c *Result_columnContext) - - // EnterJoin_operator is called when entering the join_operator production. - EnterJoin_operator(c *Join_operatorContext) - - // EnterJoin_constraint is called when entering the join_constraint production. - EnterJoin_constraint(c *Join_constraintContext) - - // EnterCompound_operator is called when entering the compound_operator production. - EnterCompound_operator(c *Compound_operatorContext) - - // EnterUpdate_stmt is called when entering the update_stmt production. - EnterUpdate_stmt(c *Update_stmtContext) - - // EnterColumn_name_list is called when entering the column_name_list production. - EnterColumn_name_list(c *Column_name_listContext) - - // EnterUpdate_stmt_limited is called when entering the update_stmt_limited production. - EnterUpdate_stmt_limited(c *Update_stmt_limitedContext) - - // EnterQualified_table_name is called when entering the qualified_table_name production. - EnterQualified_table_name(c *Qualified_table_nameContext) - - // EnterVacuum_stmt is called when entering the vacuum_stmt production. - EnterVacuum_stmt(c *Vacuum_stmtContext) - - // EnterFilter_clause is called when entering the filter_clause production. - EnterFilter_clause(c *Filter_clauseContext) - - // EnterWindow_defn is called when entering the window_defn production. - EnterWindow_defn(c *Window_defnContext) - - // EnterOver_clause is called when entering the over_clause production. - EnterOver_clause(c *Over_clauseContext) - - // EnterFrame_spec is called when entering the frame_spec production. - EnterFrame_spec(c *Frame_specContext) - - // EnterFrame_clause is called when entering the frame_clause production. - EnterFrame_clause(c *Frame_clauseContext) - - // EnterSimple_function_invocation is called when entering the simple_function_invocation production. - EnterSimple_function_invocation(c *Simple_function_invocationContext) - - // EnterAggregate_function_invocation is called when entering the aggregate_function_invocation production. - EnterAggregate_function_invocation(c *Aggregate_function_invocationContext) - - // EnterWindow_function_invocation is called when entering the window_function_invocation production. - EnterWindow_function_invocation(c *Window_function_invocationContext) - - // EnterCommon_table_stmt is called when entering the common_table_stmt production. - EnterCommon_table_stmt(c *Common_table_stmtContext) - - // EnterOrder_by_stmt is called when entering the order_by_stmt production. - EnterOrder_by_stmt(c *Order_by_stmtContext) - - // EnterLimit_stmt is called when entering the limit_stmt production. - EnterLimit_stmt(c *Limit_stmtContext) - - // EnterOrdering_term is called when entering the ordering_term production. - EnterOrdering_term(c *Ordering_termContext) - - // EnterAsc_desc is called when entering the asc_desc production. - EnterAsc_desc(c *Asc_descContext) - - // EnterFrame_left is called when entering the frame_left production. - EnterFrame_left(c *Frame_leftContext) - - // EnterFrame_right is called when entering the frame_right production. - EnterFrame_right(c *Frame_rightContext) - - // EnterFrame_single is called when entering the frame_single production. - EnterFrame_single(c *Frame_singleContext) - - // EnterWindow_function is called when entering the window_function production. - EnterWindow_function(c *Window_functionContext) - - // EnterOf_OF_fset is called when entering the of_OF_fset production. - EnterOf_OF_fset(c *Of_OF_fsetContext) - - // EnterDefault_DEFAULT__value is called when entering the default_DEFAULT__value production. - EnterDefault_DEFAULT__value(c *Default_DEFAULT__valueContext) - - // EnterPartition_by is called when entering the partition_by production. - EnterPartition_by(c *Partition_byContext) - - // EnterOrder_by_expr is called when entering the order_by_expr production. - EnterOrder_by_expr(c *Order_by_exprContext) - - // EnterOrder_by_expr_asc_desc is called when entering the order_by_expr_asc_desc production. - EnterOrder_by_expr_asc_desc(c *Order_by_expr_asc_descContext) - - // EnterExpr_asc_desc is called when entering the expr_asc_desc production. - EnterExpr_asc_desc(c *Expr_asc_descContext) - - // EnterInitial_select is called when entering the initial_select production. - EnterInitial_select(c *Initial_selectContext) - - // EnterRecursive__select is called when entering the recursive__select production. - EnterRecursive__select(c *Recursive__selectContext) - - // EnterUnary_operator is called when entering the unary_operator production. - EnterUnary_operator(c *Unary_operatorContext) - - // EnterError_message is called when entering the error_message production. - EnterError_message(c *Error_messageContext) - - // EnterModule_argument is called when entering the module_argument production. - EnterModule_argument(c *Module_argumentContext) - - // EnterColumn_alias is called when entering the column_alias production. - EnterColumn_alias(c *Column_aliasContext) - - // EnterKeyword is called when entering the keyword production. - EnterKeyword(c *KeywordContext) - - // EnterName is called when entering the name production. - EnterName(c *NameContext) - - // EnterFunction_name is called when entering the function_name production. - EnterFunction_name(c *Function_nameContext) - - // EnterQualified_function_name is called when entering the qualified_function_name production. - EnterQualified_function_name(c *Qualified_function_nameContext) - - // EnterSchema_name is called when entering the schema_name production. - EnterSchema_name(c *Schema_nameContext) - - // EnterTable_name is called when entering the table_name production. - EnterTable_name(c *Table_nameContext) - - // EnterTable_or_index_name is called when entering the table_or_index_name production. - EnterTable_or_index_name(c *Table_or_index_nameContext) - - // EnterNew_table_name is called when entering the new_table_name production. - EnterNew_table_name(c *New_table_nameContext) - - // EnterColumn_name is called when entering the column_name production. - EnterColumn_name(c *Column_nameContext) - - // EnterCollation_name is called when entering the collation_name production. - EnterCollation_name(c *Collation_nameContext) - - // EnterForeign_table is called when entering the foreign_table production. - EnterForeign_table(c *Foreign_tableContext) - - // EnterIndex_name is called when entering the index_name production. - EnterIndex_name(c *Index_nameContext) - - // EnterTrigger_name is called when entering the trigger_name production. - EnterTrigger_name(c *Trigger_nameContext) - - // EnterView_name is called when entering the view_name production. - EnterView_name(c *View_nameContext) - - // EnterModule_name is called when entering the module_name production. - EnterModule_name(c *Module_nameContext) - - // EnterPragma_name is called when entering the pragma_name production. - EnterPragma_name(c *Pragma_nameContext) - - // EnterSavepoint_name is called when entering the savepoint_name production. - EnterSavepoint_name(c *Savepoint_nameContext) - - // EnterTable_alias is called when entering the table_alias production. - EnterTable_alias(c *Table_aliasContext) - - // EnterTable_alias_fallback is called when entering the table_alias_fallback production. - EnterTable_alias_fallback(c *Table_alias_fallbackContext) - - // EnterTransaction_name is called when entering the transaction_name production. - EnterTransaction_name(c *Transaction_nameContext) - - // EnterWindow_name is called when entering the window_name production. - EnterWindow_name(c *Window_nameContext) - - // EnterAlias is called when entering the alias production. - EnterAlias(c *AliasContext) - - // EnterFilename is called when entering the filename production. - EnterFilename(c *FilenameContext) - - // EnterBase_window_name is called when entering the base_window_name production. - EnterBase_window_name(c *Base_window_nameContext) - - // EnterSimple_func is called when entering the simple_func production. - EnterSimple_func(c *Simple_funcContext) - - // EnterAggregate_func is called when entering the aggregate_func production. - EnterAggregate_func(c *Aggregate_funcContext) - - // EnterTable_function_name is called when entering the table_function_name production. - EnterTable_function_name(c *Table_function_nameContext) - - // EnterAny_name is called when entering the any_name production. - EnterAny_name(c *Any_nameContext) - - // ExitParse is called when exiting the parse production. - ExitParse(c *ParseContext) - - // ExitSql_stmt_list is called when exiting the sql_stmt_list production. - ExitSql_stmt_list(c *Sql_stmt_listContext) - - // ExitSql_stmt is called when exiting the sql_stmt production. - ExitSql_stmt(c *Sql_stmtContext) - - // ExitAlter_table_stmt is called when exiting the alter_table_stmt production. - ExitAlter_table_stmt(c *Alter_table_stmtContext) - - // ExitAnalyze_stmt is called when exiting the analyze_stmt production. - ExitAnalyze_stmt(c *Analyze_stmtContext) - - // ExitAttach_stmt is called when exiting the attach_stmt production. - ExitAttach_stmt(c *Attach_stmtContext) - - // ExitBegin_stmt is called when exiting the begin_stmt production. - ExitBegin_stmt(c *Begin_stmtContext) - - // ExitCommit_stmt is called when exiting the commit_stmt production. - ExitCommit_stmt(c *Commit_stmtContext) - - // ExitRollback_stmt is called when exiting the rollback_stmt production. - ExitRollback_stmt(c *Rollback_stmtContext) - - // ExitSavepoint_stmt is called when exiting the savepoint_stmt production. - ExitSavepoint_stmt(c *Savepoint_stmtContext) - - // ExitRelease_stmt is called when exiting the release_stmt production. - ExitRelease_stmt(c *Release_stmtContext) - - // ExitCreate_index_stmt is called when exiting the create_index_stmt production. - ExitCreate_index_stmt(c *Create_index_stmtContext) - - // ExitIndexed_column is called when exiting the indexed_column production. - ExitIndexed_column(c *Indexed_columnContext) - - // ExitTable_option is called when exiting the table_option production. - ExitTable_option(c *Table_optionContext) - - // ExitCreate_table_stmt is called when exiting the create_table_stmt production. - ExitCreate_table_stmt(c *Create_table_stmtContext) - - // ExitColumn_def is called when exiting the column_def production. - ExitColumn_def(c *Column_defContext) - - // ExitType_name is called when exiting the type_name production. - ExitType_name(c *Type_nameContext) - - // ExitColumn_constraint is called when exiting the column_constraint production. - ExitColumn_constraint(c *Column_constraintContext) - - // ExitSigned_number is called when exiting the signed_number production. - ExitSigned_number(c *Signed_numberContext) - - // ExitTable_constraint is called when exiting the table_constraint production. - ExitTable_constraint(c *Table_constraintContext) - - // ExitForeign_key_clause is called when exiting the foreign_key_clause production. - ExitForeign_key_clause(c *Foreign_key_clauseContext) - - // ExitConflict_clause is called when exiting the conflict_clause production. - ExitConflict_clause(c *Conflict_clauseContext) - - // ExitCreate_trigger_stmt is called when exiting the create_trigger_stmt production. - ExitCreate_trigger_stmt(c *Create_trigger_stmtContext) - - // ExitCreate_view_stmt is called when exiting the create_view_stmt production. - ExitCreate_view_stmt(c *Create_view_stmtContext) - - // ExitCreate_virtual_table_stmt is called when exiting the create_virtual_table_stmt production. - ExitCreate_virtual_table_stmt(c *Create_virtual_table_stmtContext) - - // ExitWith_clause is called when exiting the with_clause production. - ExitWith_clause(c *With_clauseContext) - - // ExitCte_table_name is called when exiting the cte_table_name production. - ExitCte_table_name(c *Cte_table_nameContext) - - // ExitRecursive_cte is called when exiting the recursive_cte production. - ExitRecursive_cte(c *Recursive_cteContext) - - // ExitCommon_table_expression is called when exiting the common_table_expression production. - ExitCommon_table_expression(c *Common_table_expressionContext) - - // ExitReturning_clause is called when exiting the returning_clause production. - ExitReturning_clause(c *Returning_clauseContext) - - // ExitDelete_stmt is called when exiting the delete_stmt production. - ExitDelete_stmt(c *Delete_stmtContext) - - // ExitDelete_stmt_limited is called when exiting the delete_stmt_limited production. - ExitDelete_stmt_limited(c *Delete_stmt_limitedContext) - - // ExitDetach_stmt is called when exiting the detach_stmt production. - ExitDetach_stmt(c *Detach_stmtContext) - - // ExitDrop_stmt is called when exiting the drop_stmt production. - ExitDrop_stmt(c *Drop_stmtContext) - - // ExitExpr_case is called when exiting the expr_case production. - ExitExpr_case(c *Expr_caseContext) - - // ExitExpr_raise is called when exiting the expr_raise production. - ExitExpr_raise(c *Expr_raiseContext) - - // ExitExpr_function is called when exiting the expr_function production. - ExitExpr_function(c *Expr_functionContext) - - // ExitExpr_comparison is called when exiting the expr_comparison production. - ExitExpr_comparison(c *Expr_comparisonContext) - - // ExitExpr_bool is called when exiting the expr_bool production. - ExitExpr_bool(c *Expr_boolContext) - - // ExitExpr_binary is called when exiting the expr_binary production. - ExitExpr_binary(c *Expr_binaryContext) - - // ExitExpr_literal is called when exiting the expr_literal production. - ExitExpr_literal(c *Expr_literalContext) - - // ExitExpr_cast is called when exiting the expr_cast production. - ExitExpr_cast(c *Expr_castContext) - - // ExitExpr_in_select is called when exiting the expr_in_select production. - ExitExpr_in_select(c *Expr_in_selectContext) - - // ExitExpr_list is called when exiting the expr_list production. - ExitExpr_list(c *Expr_listContext) - - // ExitExpr_between is called when exiting the expr_between production. - ExitExpr_between(c *Expr_betweenContext) - - // ExitExpr_collate is called when exiting the expr_collate production. - ExitExpr_collate(c *Expr_collateContext) - - // ExitExpr_qualified_column_name is called when exiting the expr_qualified_column_name production. - ExitExpr_qualified_column_name(c *Expr_qualified_column_nameContext) - - // ExitExpr_unary is called when exiting the expr_unary production. - ExitExpr_unary(c *Expr_unaryContext) - - // ExitExpr_null_comp is called when exiting the expr_null_comp production. - ExitExpr_null_comp(c *Expr_null_compContext) - - // ExitExpr_bind is called when exiting the expr_bind production. - ExitExpr_bind(c *Expr_bindContext) - - // ExitRaise_function is called when exiting the raise_function production. - ExitRaise_function(c *Raise_functionContext) - - // ExitLiteral_value is called when exiting the literal_value production. - ExitLiteral_value(c *Literal_valueContext) - - // ExitInsert_stmt is called when exiting the insert_stmt production. - ExitInsert_stmt(c *Insert_stmtContext) - - // ExitUpsert_clause is called when exiting the upsert_clause production. - ExitUpsert_clause(c *Upsert_clauseContext) - - // ExitPragma_stmt is called when exiting the pragma_stmt production. - ExitPragma_stmt(c *Pragma_stmtContext) - - // ExitPragma_value is called when exiting the pragma_value production. - ExitPragma_value(c *Pragma_valueContext) - - // ExitReindex_stmt is called when exiting the reindex_stmt production. - ExitReindex_stmt(c *Reindex_stmtContext) - - // ExitSelect_stmt is called when exiting the select_stmt production. - ExitSelect_stmt(c *Select_stmtContext) - - // ExitJoin_clause is called when exiting the join_clause production. - ExitJoin_clause(c *Join_clauseContext) - - // ExitSelect_core is called when exiting the select_core production. - ExitSelect_core(c *Select_coreContext) - - // ExitFactored_select_stmt is called when exiting the factored_select_stmt production. - ExitFactored_select_stmt(c *Factored_select_stmtContext) - - // ExitSimple_select_stmt is called when exiting the simple_select_stmt production. - ExitSimple_select_stmt(c *Simple_select_stmtContext) - - // ExitCompound_select_stmt is called when exiting the compound_select_stmt production. - ExitCompound_select_stmt(c *Compound_select_stmtContext) - - // ExitTable_or_subquery is called when exiting the table_or_subquery production. - ExitTable_or_subquery(c *Table_or_subqueryContext) - - // ExitResult_column is called when exiting the result_column production. - ExitResult_column(c *Result_columnContext) - - // ExitJoin_operator is called when exiting the join_operator production. - ExitJoin_operator(c *Join_operatorContext) - - // ExitJoin_constraint is called when exiting the join_constraint production. - ExitJoin_constraint(c *Join_constraintContext) - - // ExitCompound_operator is called when exiting the compound_operator production. - ExitCompound_operator(c *Compound_operatorContext) - - // ExitUpdate_stmt is called when exiting the update_stmt production. - ExitUpdate_stmt(c *Update_stmtContext) - - // ExitColumn_name_list is called when exiting the column_name_list production. - ExitColumn_name_list(c *Column_name_listContext) - - // ExitUpdate_stmt_limited is called when exiting the update_stmt_limited production. - ExitUpdate_stmt_limited(c *Update_stmt_limitedContext) - - // ExitQualified_table_name is called when exiting the qualified_table_name production. - ExitQualified_table_name(c *Qualified_table_nameContext) - - // ExitVacuum_stmt is called when exiting the vacuum_stmt production. - ExitVacuum_stmt(c *Vacuum_stmtContext) - - // ExitFilter_clause is called when exiting the filter_clause production. - ExitFilter_clause(c *Filter_clauseContext) - - // ExitWindow_defn is called when exiting the window_defn production. - ExitWindow_defn(c *Window_defnContext) - - // ExitOver_clause is called when exiting the over_clause production. - ExitOver_clause(c *Over_clauseContext) - - // ExitFrame_spec is called when exiting the frame_spec production. - ExitFrame_spec(c *Frame_specContext) - - // ExitFrame_clause is called when exiting the frame_clause production. - ExitFrame_clause(c *Frame_clauseContext) - - // ExitSimple_function_invocation is called when exiting the simple_function_invocation production. - ExitSimple_function_invocation(c *Simple_function_invocationContext) - - // ExitAggregate_function_invocation is called when exiting the aggregate_function_invocation production. - ExitAggregate_function_invocation(c *Aggregate_function_invocationContext) - - // ExitWindow_function_invocation is called when exiting the window_function_invocation production. - ExitWindow_function_invocation(c *Window_function_invocationContext) - - // ExitCommon_table_stmt is called when exiting the common_table_stmt production. - ExitCommon_table_stmt(c *Common_table_stmtContext) - - // ExitOrder_by_stmt is called when exiting the order_by_stmt production. - ExitOrder_by_stmt(c *Order_by_stmtContext) - - // ExitLimit_stmt is called when exiting the limit_stmt production. - ExitLimit_stmt(c *Limit_stmtContext) - - // ExitOrdering_term is called when exiting the ordering_term production. - ExitOrdering_term(c *Ordering_termContext) - - // ExitAsc_desc is called when exiting the asc_desc production. - ExitAsc_desc(c *Asc_descContext) - - // ExitFrame_left is called when exiting the frame_left production. - ExitFrame_left(c *Frame_leftContext) - - // ExitFrame_right is called when exiting the frame_right production. - ExitFrame_right(c *Frame_rightContext) - - // ExitFrame_single is called when exiting the frame_single production. - ExitFrame_single(c *Frame_singleContext) - - // ExitWindow_function is called when exiting the window_function production. - ExitWindow_function(c *Window_functionContext) - - // ExitOf_OF_fset is called when exiting the of_OF_fset production. - ExitOf_OF_fset(c *Of_OF_fsetContext) - - // ExitDefault_DEFAULT__value is called when exiting the default_DEFAULT__value production. - ExitDefault_DEFAULT__value(c *Default_DEFAULT__valueContext) - - // ExitPartition_by is called when exiting the partition_by production. - ExitPartition_by(c *Partition_byContext) - - // ExitOrder_by_expr is called when exiting the order_by_expr production. - ExitOrder_by_expr(c *Order_by_exprContext) - - // ExitOrder_by_expr_asc_desc is called when exiting the order_by_expr_asc_desc production. - ExitOrder_by_expr_asc_desc(c *Order_by_expr_asc_descContext) - - // ExitExpr_asc_desc is called when exiting the expr_asc_desc production. - ExitExpr_asc_desc(c *Expr_asc_descContext) - - // ExitInitial_select is called when exiting the initial_select production. - ExitInitial_select(c *Initial_selectContext) - - // ExitRecursive__select is called when exiting the recursive__select production. - ExitRecursive__select(c *Recursive__selectContext) - - // ExitUnary_operator is called when exiting the unary_operator production. - ExitUnary_operator(c *Unary_operatorContext) - - // ExitError_message is called when exiting the error_message production. - ExitError_message(c *Error_messageContext) - - // ExitModule_argument is called when exiting the module_argument production. - ExitModule_argument(c *Module_argumentContext) - - // ExitColumn_alias is called when exiting the column_alias production. - ExitColumn_alias(c *Column_aliasContext) - - // ExitKeyword is called when exiting the keyword production. - ExitKeyword(c *KeywordContext) - - // ExitName is called when exiting the name production. - ExitName(c *NameContext) - - // ExitFunction_name is called when exiting the function_name production. - ExitFunction_name(c *Function_nameContext) - - // ExitQualified_function_name is called when exiting the qualified_function_name production. - ExitQualified_function_name(c *Qualified_function_nameContext) - - // ExitSchema_name is called when exiting the schema_name production. - ExitSchema_name(c *Schema_nameContext) - - // ExitTable_name is called when exiting the table_name production. - ExitTable_name(c *Table_nameContext) - - // ExitTable_or_index_name is called when exiting the table_or_index_name production. - ExitTable_or_index_name(c *Table_or_index_nameContext) - - // ExitNew_table_name is called when exiting the new_table_name production. - ExitNew_table_name(c *New_table_nameContext) - - // ExitColumn_name is called when exiting the column_name production. - ExitColumn_name(c *Column_nameContext) - - // ExitCollation_name is called when exiting the collation_name production. - ExitCollation_name(c *Collation_nameContext) - - // ExitForeign_table is called when exiting the foreign_table production. - ExitForeign_table(c *Foreign_tableContext) - - // ExitIndex_name is called when exiting the index_name production. - ExitIndex_name(c *Index_nameContext) - - // ExitTrigger_name is called when exiting the trigger_name production. - ExitTrigger_name(c *Trigger_nameContext) - - // ExitView_name is called when exiting the view_name production. - ExitView_name(c *View_nameContext) - - // ExitModule_name is called when exiting the module_name production. - ExitModule_name(c *Module_nameContext) - - // ExitPragma_name is called when exiting the pragma_name production. - ExitPragma_name(c *Pragma_nameContext) - - // ExitSavepoint_name is called when exiting the savepoint_name production. - ExitSavepoint_name(c *Savepoint_nameContext) - - // ExitTable_alias is called when exiting the table_alias production. - ExitTable_alias(c *Table_aliasContext) - - // ExitTable_alias_fallback is called when exiting the table_alias_fallback production. - ExitTable_alias_fallback(c *Table_alias_fallbackContext) - - // ExitTransaction_name is called when exiting the transaction_name production. - ExitTransaction_name(c *Transaction_nameContext) - - // ExitWindow_name is called when exiting the window_name production. - ExitWindow_name(c *Window_nameContext) - - // ExitAlias is called when exiting the alias production. - ExitAlias(c *AliasContext) - - // ExitFilename is called when exiting the filename production. - ExitFilename(c *FilenameContext) - - // ExitBase_window_name is called when exiting the base_window_name production. - ExitBase_window_name(c *Base_window_nameContext) - - // ExitSimple_func is called when exiting the simple_func production. - ExitSimple_func(c *Simple_funcContext) - - // ExitAggregate_func is called when exiting the aggregate_func production. - ExitAggregate_func(c *Aggregate_funcContext) - - // ExitTable_function_name is called when exiting the table_function_name production. - ExitTable_function_name(c *Table_function_nameContext) - - // ExitAny_name is called when exiting the any_name production. - ExitAny_name(c *Any_nameContext) -} diff --git a/internal/engine/sqlite/reserved.go b/internal/engine/sqlite/reserved.go index d1d5105934..eb6ed2fd17 100644 --- a/internal/engine/sqlite/reserved.go +++ b/internal/engine/sqlite/reserved.go @@ -1,157 +1,10 @@ package sqlite -import "strings" +import "github.com/sqlc-dev/meyer/token" -// https://sqlite.org/lang_keywords.html +// IsReservedKeyword reports whether s is a keyword in SQLite; see +// https://sqlite.org/lang_keywords.html. The table lives in meyer, which +// transcribes it from SQLite's own aKeywordTable. func (p *Parser) IsReservedKeyword(s string) bool { - switch strings.ToLower(s) { - case "abort": - case "action": - case "add": - case "after": - case "all": - case "alter": - case "always": - case "analyze": - case "and": - case "as": - case "asc": - case "attach": - case "autoincrement": - case "before": - case "begin": - case "between": - case "by": - case "cascade": - case "case": - case "cast": - case "check": - case "collate": - case "column": - case "commit": - case "conflict": - case "constraint": - case "create": - case "cross": - case "current": - case "current_date": - case "current_time": - case "current_timestamp": - case "database": - case "default": - case "deferrable": - case "deferred": - case "delete": - case "desc": - case "detach": - case "distinct": - case "do": - case "drop": - case "each": - case "else": - case "end": - case "escape": - case "except": - case "exclude": - case "exclusive": - case "exists": - case "explain": - case "fail": - case "filter": - case "first": - case "following": - case "for": - case "foreign": - case "from": - case "full": - case "generated": - case "glob": - case "group": - case "groups": - case "having": - case "if": - case "ignore": - case "immediate": - case "in": - case "index": - case "indexed": - case "initially": - case "inner": - case "insert": - case "instead": - case "intersect": - case "into": - case "is": - case "isnull": - case "join": - case "key": - case "last": - case "left": - case "like": - case "limit": - case "match": - case "natural": - case "no": - case "not": - case "nothing": - case "notnull": - case "null": - case "nulls": - case "of": - case "offset": - case "on": - case "or": - case "order": - case "others": - case "outer": - case "over": - case "partition": - case "plan": - case "pragma": - case "preceding": - case "primary": - case "query": - case "raise": - case "range": - case "recursive": - case "references": - case "regexp": - case "reindex": - case "release": - case "rename": - case "replace": - case "restrict": - case "right": - case "rollback": - case "row": - case "rows": - case "savepoint": - case "select": - case "set": - case "table": - case "temp": - case "temporary": - case "then": - case "ties": - case "to": - case "transaction": - case "trigger": - case "unbounded": - case "union": - case "unique": - case "update": - case "using": - case "vacuum": - case "values": - case "view": - case "virtual": - case "when": - case "where": - case "window": - case "with": - case "without": - default: - return false - } - return true + return token.Lookup(s) != token.ID } diff --git a/internal/engine/sqlite/utils.go b/internal/engine/sqlite/utils.go index 874d53ab41..e81b6f3fa7 100644 --- a/internal/engine/sqlite/utils.go +++ b/internal/engine/sqlite/utils.go @@ -1,35 +1,88 @@ package sqlite import ( - "github.com/sqlc-dev/sqlc/internal/engine/sqlite/parser" + "strings" + + meyer "github.com/sqlc-dev/meyer/ast" + "github.com/sqlc-dev/sqlc/internal/sql/ast" ) -type tableNamer interface { - Table_name() parser.ITable_nameContext - Schema_name() parser.ISchema_nameContext +// identifier folds a name the way SQLite resolves one: an unquoted name is +// case-insensitive and normalizes to lower case, while a quoted name keeps +// the spelling that appeared between the quotes. +func identifier(n *meyer.Ident) string { + if n == nil { + return "" + } + if n.Quote == meyer.QuoteNone { + return strings.ToLower(n.Name) + } + return n.Name } -func parseTableName(c tableNamer) *ast.TableName { - name := ast.TableName{ - Name: identifier(c.Table_name().GetText()), +// NewIdentifier returns the folded name of id as an ast.String, the shape +// sqlc uses for the parts of a ColumnRef or a function name. +func NewIdentifier(id *meyer.Ident) *ast.String { + return &ast.String{Str: identifier(id)} +} + +func parseTableName(n *meyer.QualifiedName) *ast.TableName { + if n == nil { + return &ast.TableName{} } - if c.Schema_name() != nil { - name.Schema = c.Schema_name().GetText() + return &ast.TableName{ + Schema: identifier(n.Schema), + Name: identifier(n.Name), } - return &name } -func hasNotNullConstraint(checks []parser.IColumn_constraintContext) bool { - for i := range checks { - constraint, ok := checks[i].(*parser.Column_constraintContext) - if !ok { - continue - } - if constraint.PRIMARY_() != nil && constraint.KEY_() != nil { - return true - } - if constraint.NOT_() != nil && constraint.NULL_() != nil { +// parseRangeVar builds the relation reference sqlc expects for a table named +// in a FROM, INSERT, UPDATE or DELETE clause. +func parseRangeVar(n *meyer.QualifiedName, alias *meyer.Ident) *ast.RangeVar { + rv := &ast.RangeVar{} + if n == nil { + return rv + } + rv.Location = n.Pos() + name := identifier(n.Name) + rv.Relname = &name + if n.Schema != nil { + schema := identifier(n.Schema) + rv.Schemaname = &schema + } + if alias != nil { + aliasName := identifier(alias) + rv.Alias = &ast.Alias{Aliasname: &aliasName} + } + return rv +} + +// typeName renders a type the way sqlc's type resolution expects to see it: +// the tokens joined without separators, matching what the ANTLR parser's +// GetText produced. "UNSIGNED BIG INT" becomes "UNSIGNEDBIGINT" and +// "DECIMAL(10, 5)" becomes "DECIMAL(10,5)". +func typeName(n *meyer.TypeName) string { + if n == nil { + return "" + } + var sb strings.Builder + sb.WriteString(strings.ReplaceAll(n.Name, " ", "")) + if len(n.Args) > 0 { + sb.WriteString("(") + sb.WriteString(strings.Join(n.Args, ",")) + sb.WriteString(")") + } + return sb.String() +} + +// hasNotNullConstraint reports whether a column definition guarantees a +// value. A PRIMARY KEY implies NOT NULL for the purposes of code +// generation, matching the behavior of the previous parser. +func hasNotNullConstraint(constraints []*meyer.ColumnConstraint) bool { + for _, constraint := range constraints { + switch constraint.Kind { + case meyer.ColumnNotNull, meyer.ColumnPrimaryKey: return true } } diff --git a/internal/sql/lang/operator.go b/internal/sql/lang/operator.go index cd5ef50e38..c1ece1d290 100644 --- a/internal/sql/lang/operator.go +++ b/internal/sql/lang/operator.go @@ -9,8 +9,28 @@ func IsComparisonOperator(s string) bool { case "<=": case ">=": case "=": + case "==": case "<>": case "!=": + // Comparisons an engine spells as a keyword rather than as punctuation. + // They are written upper case, which is how SQLite's parser records + // them; PostgreSQL and MySQL use distinct node types or their own + // operator names for these, so the spellings do not overlap. + case "IS": + case "IS NOT": + case "IS DISTINCT FROM": + case "IS NOT DISTINCT FROM": + case "ISNULL": + case "NOTNULL": + case "NOT NULL": + case "LIKE": + case "NOT LIKE": + case "GLOB": + case "NOT GLOB": + case "REGEXP": + case "NOT REGEXP": + case "MATCH": + case "NOT MATCH": default: return false }