From dc6a1bd42f8bc6b8f9d114311df98def2f398f32 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Mon, 2 Sep 2024 15:19:38 -0400 Subject: [PATCH] build: update bindings --- .editorconfig | 10 +- .gitattributes | 2 +- .gitignore | 37 +- Cargo.toml | 8 +- Makefile | 28 +- Package.resolved | 16 - Package.swift | 73 +- README.md | 18 +- binding.gyp | 1 - bindings/c/tree-sitter-ql_dbscheme.pc.in | 2 +- bindings/go/binding_test.go | 4 +- bindings/node/binding.cc | 2 +- .../tree_sitter_ql_dbscheme/__init__.py | 26 +- .../tree_sitter_ql_dbscheme/__init__.pyi | 2 +- bindings/rust/build.rs | 7 - bindings/rust/lib.rs | 18 +- .../TreeSitterDbschemeTests.swift | 12 - .../TreeSitterTestTests.swift | 12 - .../TreeSitterQlDbschemeTests.swift | 2 +- go.mod | 2 + package-lock.json | 40 +- package.json | 41 +- pyproject.toml | 6 +- setup.py | 9 +- src/parser.c | 1096 ++++++++--------- 25 files changed, 746 insertions(+), 728 deletions(-) delete mode 100644 Package.resolved delete mode 100644 bindings/swift/TreeSitterDbschemeTests/TreeSitterDbschemeTests.swift delete mode 100644 bindings/swift/TreeSitterDbschemeTests/TreeSitterTestTests.swift diff --git a/.editorconfig b/.editorconfig index d3a8b5b..f363cc5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,9 +2,6 @@ root = true [*] charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true [*.{json,toml,yml,gyp}] indent_style = space @@ -14,11 +11,11 @@ indent_size = 2 indent_style = space indent_size = 2 -[*.rs] +[*.{c,cc,h}] indent_style = space indent_size = 4 -[*.{c,cc,h}] +[*.rs] indent_style = space indent_size = 4 @@ -37,3 +34,6 @@ indent_size = 8 [Makefile] indent_style = tab indent_size = 8 + +[parser.c] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes index ffb52ab..4cb1058 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -* text eol=lf +* text=auto eol=lf src/*.json linguist-generated src/parser.c linguist-generated diff --git a/.gitignore b/.gitignore index e721622..2fd9dac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,37 @@ -node_modules/ -build/ +# Rust artifacts target/ + +# Node artifacts +build/ +prebuilds/ +node_modules/ +*.tgz + +# Swift artifacts .build/ +Package.resolved + +# Go artifacts +_obj/ + +# Python artifacts +.venv/ +dist/ +*.egg-info +*.whl + +# C artifacts +*.a +*.so +*.so.* +*.dylib +*.dll +*.pc + +# Example dirs +/examples/*/ + +# Grammar volatiles +*.wasm +*.obj +*.o diff --git a/Cargo.toml b/Cargo.toml index e70b29d..432e45b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tree-sitter-ql-dbscheme" -description = "QlDbscheme grammar for tree-sitter" +description = "QL DBScheme grammar for tree-sitter" version = "0.0.1" license = "MIT" readme = "README.md" @@ -18,7 +18,9 @@ path = "bindings/rust/lib.rs" [dependencies] tree-sitter-language = "0.1.0" -tree-sitter = "0.23.0" [build-dependencies] -cc = "1.0.87" +cc = "1.1.15" + +[dev-dependencies] +tree-sitter = "0.23" diff --git a/Makefile b/Makefile index 86ac402..65b12b1 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +ifeq ($(OS),Windows_NT) +$(error Windows is not supported) +endif + VERSION := 0.0.1 LANGUAGE_NAME := tree-sitter-ql_dbscheme @@ -17,10 +21,6 @@ endif TS ?= tree-sitter -# ABI versioning -SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) -SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) - # install directory layout PREFIX ?= /usr/local INCLUDEDIR ?= $(PREFIX)/include @@ -36,27 +36,29 @@ OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS)) ARFLAGS ?= rcs override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC +# ABI versioning +SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) +SONAME_MINOR := $(shell sed -n 's/#define LANGUAGE_VERSION //p' $(PARSER)) + # OS-specific bits -ifeq ($(OS),Windows_NT) - $(error "Windows is not supported") -else ifeq ($(shell uname),Darwin) +ifeq ($(shell uname),Darwin) SOEXT = dylib - SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib - SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT) + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT) LINKSHARED := $(LINKSHARED)-dynamiclib -Wl, ifneq ($(ADDITIONAL_LIBS),) LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS), endif - LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SONAME_MAJOR).dylib,-rpath,@executable_path/../Frameworks + LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SOEXTVER),-rpath,@executable_path/../Frameworks else SOEXT = so - SOEXTVER_MAJOR = so.$(SONAME_MAJOR) - SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) + SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR) + SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) LINKSHARED := $(LINKSHARED)-shared -Wl, ifneq ($(ADDITIONAL_LIBS),) LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS) endif - LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).so.$(SONAME_MAJOR) + LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).$(SOEXTVER) endif ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) PCLIBDIR := $(PREFIX)/libdata/pkgconfig diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index 9e0a023..0000000 --- a/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "SwiftTreeSitter", - "repositoryURL": "https://github.com/ChimeHQ/SwiftTreeSitter", - "state": { - "branch": null, - "revision": "2599e95310b3159641469d8a21baf2d3d200e61f", - "version": "0.8.0" - } - } - ] - }, - "version": 1 -} diff --git a/Package.swift b/Package.swift index 7149ea1..c9bbf23 100644 --- a/Package.swift +++ b/Package.swift @@ -10,48 +10,49 @@ let package = Package( .package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", from: "0.8.0"), ], targets: [ - .target(name: "TreeSitterQlDbscheme", - path: ".", - exclude: [ - "Cargo.toml", - "Makefile", - "binding.gyp", - "bindings/c", - "bindings/go", - "bindings/node", - "bindings/python", - "bindings/rust", - "prebuilds", - "grammar.js", - "package.json", - "package-lock.json", - "pyproject.toml", - "setup.py", - "test", - "examples", - ".editorconfig", - ".github", - ".gitignore", - ".gitattributes", - ".gitmodules", - ], - sources: [ - "src/parser.c", - // NOTE: if your language has an external scanner, add it here. - ], - resources: [ - .copy("queries") - ], - publicHeadersPath: "bindings/swift", - cSettings: [.headerSearchPath("src")] + .target( + name: "TreeSitterQlDbscheme", + dependencies: [], + path: ".", + exclude: [ + "Cargo.toml", + "Makefile", + "binding.gyp", + "bindings/c", + "bindings/go", + "bindings/node", + "bindings/python", + "bindings/rust", + "prebuilds", + "grammar.js", + "package.json", + "package-lock.json", + "pyproject.toml", + "setup.py", + "test", + "examples", + ".editorconfig", + ".github", + ".gitignore", + ".gitattributes", + ".gitmodules", + ], + sources: [ + "src/parser.c", + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")] ), .testTarget( - name: "TreeSitterDbschemeTests", + name: "TreeSitterQlDbschemeTests", dependencies: [ "SwiftTreeSitter", "TreeSitterQlDbscheme", ], - path: "bindings/swift/TreeSitterDbschemeTests" + path: "bindings/swift/TreeSitterQlDbschemeTests" ) ], cLanguageStandard: .c11 diff --git a/README.md b/README.md index 19831c9..5dc3379 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,18 @@ # tree-sitter-ql-dbscheme -tree-sitter support for `.dbscheme` files (as used in CodeQL). + +[![CI][ci]](https://github.com/tree-sitter/tree-sitter-ql-dbscheme/actions/workflows/ci.yml) +[![discord][discord]](https://discord.gg/w7nTvsVJhm) +[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org) +[![crates][crates]](https://crates.io/crates/tree-sitter-ql-dbscheme) +[![npm][npm]](https://www.npmjs.com/package/tree-sitter-ql-dbscheme) +[![pypi][pypi]](https://pypi.org/project/tree-sitter-ql-dbscheme) + +`.dbscheme` grammar for [tree-sitter][] (as used in CodeQL). + +[tree-sitter]: https://github.com/tree-sitter/tree-sitter +[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-ql-dbscheme/ci.yml?logo=github&label=CI +[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord +[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix +[npm]: https://img.shields.io/npm/v/tree-sitter-ql-dbscheme?logo=npm +[crates]: https://img.shields.io/crates/v/tree-sitter-ql-dbscheme?logo=rust +[pypi]: https://img.shields.io/pypi/v/tree-sitter-ql-dbscheme?logo=pypi&logoColor=ffd242 diff --git a/binding.gyp b/binding.gyp index 453e638..419fdb9 100644 --- a/binding.gyp +++ b/binding.gyp @@ -11,7 +11,6 @@ "sources": [ "bindings/node/binding.cc", "src/parser.c", - # NOTE: if your language has an external scanner, add it here. ], "conditions": [ ["OS!='win'", { diff --git a/bindings/c/tree-sitter-ql_dbscheme.pc.in b/bindings/c/tree-sitter-ql_dbscheme.pc.in index a7c139d..df2671a 100644 --- a/bindings/c/tree-sitter-ql_dbscheme.pc.in +++ b/bindings/c/tree-sitter-ql_dbscheme.pc.in @@ -3,7 +3,7 @@ libdir=@LIBDIR@ includedir=@INCLUDEDIR@ Name: tree-sitter-ql_dbscheme -Description: QlDbscheme grammar for tree-sitter +Description: QL DBScheme grammar for tree-sitter URL: @URL@ Version: @VERSION@ Requires: @REQUIRES@ diff --git a/bindings/go/binding_test.go b/bindings/go/binding_test.go index 3c9bf97..fdc9bd2 100644 --- a/bindings/go/binding_test.go +++ b/bindings/go/binding_test.go @@ -4,12 +4,12 @@ import ( "testing" tree_sitter "github.com/tree-sitter/go-tree-sitter" - tree_sitter_ql_dbscheme "github.com/tree-sitter/tree-sitter-ql_dbscheme/bindings/go" + tree_sitter_ql_dbscheme "github.com/tree-sitter/tree-sitter-ql-dbscheme/bindings/go" ) func TestCanLoadGrammar(t *testing.T) { language := tree_sitter.NewLanguage(tree_sitter_ql_dbscheme.Language()) if language == nil { - t.Errorf("Error loading QlDbscheme grammar") + t.Errorf("Error loading QL DBScheme grammar") } } diff --git a/bindings/node/binding.cc b/bindings/node/binding.cc index 48712c7..4051d8b 100644 --- a/bindings/node/binding.cc +++ b/bindings/node/binding.cc @@ -6,7 +6,7 @@ extern "C" TSLanguage *tree_sitter_ql_dbscheme(); // "tree-sitter", "language" hashed with BLAKE2 const napi_type_tag LANGUAGE_TYPE_TAG = { - 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 }; Napi::Object Init(Napi::Env env, Napi::Object exports) { diff --git a/bindings/python/tree_sitter_ql_dbscheme/__init__.py b/bindings/python/tree_sitter_ql_dbscheme/__init__.py index 6094857..50907cd 100644 --- a/bindings/python/tree_sitter_ql_dbscheme/__init__.py +++ b/bindings/python/tree_sitter_ql_dbscheme/__init__.py @@ -1,5 +1,27 @@ -"QlDbscheme grammar for tree-sitter" +"""QL DBScheme grammar for tree-sitter""" + +from importlib.resources import files as _files from ._binding import language -__all__ = ["language"] + +def _get_query(name, file): + query = _files(f"{__package__}.queries") / file + globals()[name] = query.read_text() + return globals()[name] + + +def __getattr__(name): + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") + + +__all__ = [ + "language", +] + + +def __dir__(): + return sorted(__all__ + [ + "__all__", "__builtins__", "__cached__", "__doc__", "__file__", + "__loader__", "__name__", "__package__", "__path__", "__spec__", + ]) diff --git a/bindings/python/tree_sitter_ql_dbscheme/__init__.pyi b/bindings/python/tree_sitter_ql_dbscheme/__init__.pyi index 5416666..3cca9bb 100644 --- a/bindings/python/tree_sitter_ql_dbscheme/__init__.pyi +++ b/bindings/python/tree_sitter_ql_dbscheme/__init__.pyi @@ -1 +1 @@ -def language() -> int: ... +def language() -> object: ... diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index ceb006d..9b1e476 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -11,12 +11,5 @@ fn main() { c_config.file(&parser_path); println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); - // NOTE: if your language uses an external scanner, uncomment this block: - /* - let scanner_path = src_dir.join("scanner.c"); - c_config.file(&scanner_path); - println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); - */ - c_config.compile("tree-sitter-ql_dbscheme"); } diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index 0b33375..443f7bb 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -1,16 +1,19 @@ -//! This crate provides QlDbscheme language support for the [tree-sitter][] parsing library. +//! This crate provides QL DBScheme language support for the [tree-sitter][] parsing library. //! //! Typically, you will use the [language][language func] function to add this language to a //! tree-sitter [Parser][], and then use the parser to parse some code: //! //! ``` +//! use tree_sitter::Parser; +//! //! let code = r#" +//! @container = @folder | @file; //! "#; -//! let mut parser = tree_sitter::Parser::new(); +//! let mut parser = Parser::new(); //! let language = tree_sitter_ql_dbscheme::LANGUAGE; //! parser //! .set_language(&language.into()) -//! .expect("Error loading QlDbscheme parser"); +//! .expect("Error loading QL DBScheme parser"); //! let tree = parser.parse(code, None).unwrap(); //! assert!(!tree.root_node().has_error()); //! ``` @@ -34,13 +37,6 @@ pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_ql_db /// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); -// NOTE: uncomment these to include any queries that this grammar contains: - -// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); -// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); -// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); -// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm"); - #[cfg(test)] mod tests { #[test] @@ -48,6 +44,6 @@ mod tests { let mut parser = tree_sitter::Parser::new(); parser .set_language(&super::LANGUAGE.into()) - .expect("Error loading QlDbscheme parser"); + .expect("Error loading QL DBScheme parser"); } } diff --git a/bindings/swift/TreeSitterDbschemeTests/TreeSitterDbschemeTests.swift b/bindings/swift/TreeSitterDbschemeTests/TreeSitterDbschemeTests.swift deleted file mode 100644 index 277479e..0000000 --- a/bindings/swift/TreeSitterDbschemeTests/TreeSitterDbschemeTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import XCTest -import SwiftTreeSitter -import TreeSitterDbscheme - -final class TreeSitterDbschemeTests: XCTestCase { - func testCanLoadGrammar() throws { - let parser = Parser() - let language = Language(language: tree_sitter_dbscheme()) - XCTAssertNoThrow(try parser.setLanguage(language), - "Error loading Dbscheme grammar") - } -} diff --git a/bindings/swift/TreeSitterDbschemeTests/TreeSitterTestTests.swift b/bindings/swift/TreeSitterDbschemeTests/TreeSitterTestTests.swift deleted file mode 100644 index 3126948..0000000 --- a/bindings/swift/TreeSitterDbschemeTests/TreeSitterTestTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import XCTest -import SwiftTreeSitter -import TreeSitterQlDbscheme - -final class TreeSitterTestTests: XCTestCase { - func testCanLoadGrammar() throws { - let parser = Parser() - let language = Language(language: tree_sitter_ql_dbscheme()) - XCTAssertNoThrow(try parser.setLanguage(language), - "Error loading Test grammar") - } -} diff --git a/bindings/swift/TreeSitterQlDbschemeTests/TreeSitterQlDbschemeTests.swift b/bindings/swift/TreeSitterQlDbschemeTests/TreeSitterQlDbschemeTests.swift index c7bbaac..c632b4c 100644 --- a/bindings/swift/TreeSitterQlDbschemeTests/TreeSitterQlDbschemeTests.swift +++ b/bindings/swift/TreeSitterQlDbschemeTests/TreeSitterQlDbschemeTests.swift @@ -7,6 +7,6 @@ final class TreeSitterQlDbschemeTests: XCTestCase { let parser = Parser() let language = Language(language: tree_sitter_ql_dbscheme()) XCTAssertNoThrow(try parser.setLanguage(language), - "Error loading QlDbscheme grammar") + "Error loading QL DBScheme grammar") } } diff --git a/go.mod b/go.mod index c32eb04..c35a88b 100644 --- a/go.mod +++ b/go.mod @@ -3,3 +3,5 @@ module github.com/tree-sitter/tree-sitter-dbscheme go 1.23 require github.com/tree-sitter/go-tree-sitter v0.23 + +require github.com/mattn/go-pointer v0.0.1 // indirect diff --git a/package-lock.json b/package-lock.json index ecf3186..21dbdb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,20 +8,20 @@ "name": "tree-sitter-ql-dbscheme", "version": "0.0.1", "hasInstallScript": true, + "license": "MIT", "dependencies": { - "node-addon-api": "^7.1.0", - "node-gyp-build": "^4.8.1", - "tree-sitter": "^0.21.1" + "node-addon-api": "^8.1.0", + "node-gyp-build": "^4.8.2" }, "devDependencies": { - "prebuildify": "^6.0.0", + "prebuildify": "^6.0.1", "tree-sitter-cli": "^0.23.0" }, "peerDependencies": { "tree-sitter": "^0.21.1" }, "peerDependenciesMeta": { - "tree_sitter": { + "tree-sitter": { "optional": true } } @@ -133,8 +133,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/minimist": { "version": "1.2.8", @@ -167,16 +166,17 @@ } }, "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "license": "MIT" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.1.0.tgz", + "integrity": "sha512-yBY+qqWSv3dWKGODD6OGE6GnTX7Q2r+4+DfpqxHSHh8x0B4EKP9+wVGLS6U/AM1vxSNNmUEuIV5EGhYwPpfOwQ==", + "engines": { + "node": "^18 || ^20 || >= 21" + } }, "node_modules/node-gyp-build": { "version": "4.8.2", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", - "license": "MIT", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -286,7 +286,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -339,7 +338,8 @@ "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.21.1.tgz", "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", "hasInstallScript": true, - "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "node-addon-api": "^8.0.0", "node-gyp-build": "^4.8.0" @@ -359,15 +359,6 @@ "node": ">=12.0.0" } }, - "node_modules/tree-sitter/node_modules/node-addon-api": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.1.0.tgz", - "integrity": "sha512-yBY+qqWSv3dWKGODD6OGE6GnTX7Q2r+4+DfpqxHSHh8x0B4EKP9+wVGLS6U/AM1vxSNNmUEuIV5EGhYwPpfOwQ==", - "license": "MIT", - "engines": { - "node": "^18 || ^20 || >= 21" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -379,8 +370,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" + "dev": true } } } diff --git a/package.json b/package.json index a0cf235..4b3307b 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,16 @@ { "name": "tree-sitter-ql-dbscheme", "version": "0.0.1", - "description": "ql dbscheme grammar for tree-sitter", + "description": "QL DBScheme grammar for tree-sitter", + "repository": "github:tree-sitter/tree-sitter-ql-dbscheme", + "license": "MIT", "main": "bindings/node", "types": "bindings/node", "keywords": [ + "incremental", "parsing", - "incremental" + "tree-sitter", + "ql-dbscheme" ], "files": [ "grammar.js", @@ -16,38 +20,35 @@ "queries/*", "src/**" ], - "repository": { - "type": "git", - "url": "git+https://github.com/tree-sitter/tree-sitter-ql-dbscheme.git" - }, "dependencies": { - "tree-sitter": "^0.21.1", - "node-addon-api": "^7.1.0", - "node-gyp-build": "^4.8.1" + "node-addon-api": "^8.1.0", + "node-gyp-build": "^4.8.2" }, "devDependencies": { - "prebuildify": "^6.0.0", - "tree-sitter-cli": "^0.23.0" + "tree-sitter-cli": "^0.23.0", + "prebuildify": "^6.0.1" }, "peerDependencies": { "tree-sitter": "^0.21.1" }, "peerDependenciesMeta": { - "tree_sitter": { + "tree-sitter": { "optional": true } }, - "tree-sitter": [ - { - "file-types": [ - "dbscheme" - ] - } - ], "scripts": { "install": "node-gyp-build", "prestart": "tree-sitter build --wasm", "start": "tree-sitter playground", "test": "node --test bindings/node/*_test.js" - } + }, + "tree-sitter": [ + { + "scope": "source.dbscheme", + "file-types": [ + "dbscheme" + ], + "injection-regex": "dbscheme" + } + ] } diff --git a/pyproject.toml b/pyproject.toml index c5366fd..139f5c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "tree-sitter-ql-dbscheme" -description = "QlDbscheme grammar for tree-sitter" +description = "QL DBScheme grammar for tree-sitter" version = "0.0.1" keywords = ["incremental", "parsing", "tree-sitter", "ql-dbscheme"] classifiers = [ @@ -14,7 +14,7 @@ classifiers = [ "Topic :: Text Processing :: Linguistic", "Typing :: Typed" ] -requires-python = ">=3.8" +requires-python = ">=3.9" license.text = "MIT" readme = "README.md" @@ -25,5 +25,5 @@ Homepage = "https://github.com/tree-sitter/tree-sitter-ql-dbscheme" core = ["tree-sitter~=0.21"] [tool.cibuildwheel] -build = "cp38-*" +build = "cp39-*" build-frontend = "build" diff --git a/setup.py b/setup.py index fcff189..16a1026 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ class BdistWheel(bdist_wheel): def get_tag(self): python, abi, platform = super().get_tag() if python.startswith("cp"): - python, abi = "cp38", "abi3" + python, abi = "cp39", "abi3" return python, abi, platform @@ -36,17 +36,18 @@ def get_tag(self): sources=[ "bindings/python/tree_sitter_ql_dbscheme/binding.c", "src/parser.c", - # NOTE: if your language uses an external scanner, add it here. ], extra_compile_args=[ "-std=c11", + "-fvisibility=hidden", ] if system() != "Windows" else [ "/std:c11", "/utf-8", ], define_macros=[ - ("Py_LIMITED_API", "0x03080000"), - ("PY_SSIZE_T_CLEAN", None) + ("Py_LIMITED_API", "0x03090000"), + ("PY_SSIZE_T_CLEAN", None), + ("TREE_SITTER_HIDE_SYMBOLS", None), ], include_dirs=["src"], py_limited_api=True, diff --git a/src/parser.c b/src/parser.c index 001f46d..51bddaa 100644 --- a/src/parser.c +++ b/src/parser.c @@ -977,26 +977,26 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [15] = {.lex_state = 0}, [16] = {.lex_state = 0}, [17] = {.lex_state = 0}, - [18] = {.lex_state = 12}, - [19] = {.lex_state = 0}, + [18] = {.lex_state = 0}, + [19] = {.lex_state = 12}, [20] = {.lex_state = 0}, [21] = {.lex_state = 0}, [22] = {.lex_state = 12}, - [23] = {.lex_state = 12}, - [24] = {.lex_state = 0}, - [25] = {.lex_state = 12}, - [26] = {.lex_state = 12}, + [23] = {.lex_state = 0}, + [24] = {.lex_state = 12}, + [25] = {.lex_state = 0}, + [26] = {.lex_state = 0}, [27] = {.lex_state = 12}, - [28] = {.lex_state = 0}, - [29] = {.lex_state = 12}, + [28] = {.lex_state = 12}, + [29] = {.lex_state = 0}, [30] = {.lex_state = 0}, [31] = {.lex_state = 0}, [32] = {.lex_state = 0}, - [33] = {.lex_state = 0}, - [34] = {.lex_state = 12}, - [35] = {.lex_state = 0}, + [33] = {.lex_state = 12}, + [34] = {.lex_state = 0}, + [35] = {.lex_state = 12}, [36] = {.lex_state = 0}, - [37] = {.lex_state = 0}, + [37] = {.lex_state = 12}, [38] = {.lex_state = 12}, [39] = {.lex_state = 12}, [40] = {.lex_state = 12}, @@ -1004,20 +1004,20 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [42] = {.lex_state = 12}, [43] = {.lex_state = 12}, [44] = {.lex_state = 12}, - [45] = {.lex_state = 12}, + [45] = {.lex_state = 0}, [46] = {.lex_state = 12}, [47] = {.lex_state = 12}, [48] = {.lex_state = 12}, - [49] = {.lex_state = 0}, + [49] = {.lex_state = 12}, [50] = {.lex_state = 12}, [51] = {.lex_state = 12}, [52] = {.lex_state = 12}, [53] = {.lex_state = 12}, [54] = {.lex_state = 12}, [55] = {.lex_state = 12}, - [56] = {.lex_state = 0}, + [56] = {.lex_state = 12}, [57] = {.lex_state = 12}, - [58] = {.lex_state = 12}, + [58] = {.lex_state = 0}, [59] = {.lex_state = 12}, [60] = {.lex_state = 12}, [61] = {.lex_state = 12}, @@ -1094,17 +1094,17 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym_block_comment] = ACTIONS(5), }, [1] = { - [sym_dbscheme] = STATE(92), + [sym_dbscheme] = STATE(81), [sym_entry] = STATE(3), [sym_table] = STATE(36), - [sym_annotation] = STATE(18), - [sym_argsAnnotation] = STATE(50), - [sym_tableName] = STATE(89), + [sym_annotation] = STATE(19), + [sym_argsAnnotation] = STATE(46), + [sym_tableName] = STATE(93), [sym_unionDecl] = STATE(36), [sym_caseDecl] = STATE(36), - [sym_simpleId] = STATE(78), + [sym_simpleId] = STATE(88), [aux_sym_dbscheme_repeat1] = STATE(3), - [aux_sym_table_repeat1] = STATE(18), + [aux_sym_table_repeat1] = STATE(19), [ts_builtin_sym_end] = ACTIONS(7), [sym__lower_id] = ACTIONS(9), [anon_sym_POUND] = ACTIONS(11), @@ -1137,16 +1137,16 @@ static const uint16_t ts_small_parse_table[] = { sym_dbtype, ACTIONS(38), 1, sym_qldoc, - STATE(50), 1, + STATE(46), 1, sym_argsAnnotation, - STATE(78), 1, + STATE(88), 1, sym_simpleId, - STATE(89), 1, + STATE(93), 1, sym_tableName, STATE(2), 2, sym_entry, aux_sym_dbscheme_repeat1, - STATE(18), 2, + STATE(19), 2, sym_annotation, aux_sym_table_repeat1, STATE(36), 3, @@ -1172,103 +1172,145 @@ static const uint16_t ts_small_parse_table[] = { sym_qldoc, ACTIONS(41), 1, ts_builtin_sym_end, - STATE(50), 1, + STATE(46), 1, sym_argsAnnotation, - STATE(78), 1, + STATE(88), 1, sym_simpleId, - STATE(89), 1, + STATE(93), 1, sym_tableName, STATE(2), 2, sym_entry, aux_sym_dbscheme_repeat1, - STATE(18), 2, + STATE(19), 2, sym_annotation, aux_sym_table_repeat1, STATE(36), 3, sym_table, sym_unionDecl, sym_caseDecl, - [100] = 8, + [100] = 7, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(45), 1, - sym_varchar, ACTIONS(47), 1, - sym_unique, + anon_sym_SEMI, ACTIONS(49), 1, + anon_sym_PIPE, + STATE(8), 1, + aux_sym_unionDecl_repeat1, + ACTIONS(45), 2, + anon_sym_case, + sym__lower_id, + ACTIONS(43), 5, + ts_builtin_sym_end, + anon_sym_POUND, + sym__upper_id, + sym_dbtype, sym_qldoc, - STATE(64), 1, - sym_reprType, - STATE(76), 1, + [127] = 8, + ACTIONS(3), 1, + sym_line_comment, + ACTIONS(5), 1, + sym_block_comment, + ACTIONS(53), 1, + sym_varchar, + ACTIONS(55), 1, + sym_unique, + ACTIONS(57), 1, + sym_qldoc, + STATE(48), 1, sym_column, - ACTIONS(43), 5, + STATE(56), 1, + sym_reprType, + ACTIONS(51), 5, sym_int, sym_float, sym_boolean, sym_date, sym_string, - [129] = 7, + [156] = 8, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, + ACTIONS(53), 1, + sym_varchar, ACTIONS(55), 1, - anon_sym_SEMI, + sym_unique, ACTIONS(57), 1, - anon_sym_PIPE, - STATE(7), 1, - aux_sym_unionDecl_repeat1, - ACTIONS(53), 2, - anon_sym_case, - sym__lower_id, + sym_qldoc, + STATE(56), 1, + sym_reprType, + STATE(67), 1, + sym_column, ACTIONS(51), 5, - ts_builtin_sym_end, - anon_sym_POUND, - sym__upper_id, - sym_dbtype, + sym_int, + sym_float, + sym_boolean, + sym_date, + sym_string, + [185] = 8, + ACTIONS(3), 1, + sym_line_comment, + ACTIONS(5), 1, + sym_block_comment, + ACTIONS(53), 1, + sym_varchar, + ACTIONS(55), 1, + sym_unique, + ACTIONS(57), 1, sym_qldoc, - [156] = 6, + STATE(56), 1, + sym_reprType, + STATE(73), 1, + sym_column, + ACTIONS(51), 5, + sym_int, + sym_float, + sym_boolean, + sym_date, + sym_string, + [214] = 7, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(63), 1, + ACTIONS(49), 1, anon_sym_PIPE, - STATE(6), 1, + ACTIONS(63), 1, + anon_sym_SEMI, + STATE(9), 1, aux_sym_unionDecl_repeat1, ACTIONS(61), 2, anon_sym_case, sym__lower_id, - ACTIONS(59), 6, + ACTIONS(59), 5, ts_builtin_sym_end, - anon_sym_SEMI, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [181] = 7, + [241] = 6, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(57), 1, + ACTIONS(69), 1, anon_sym_PIPE, - ACTIONS(70), 1, - anon_sym_SEMI, - STATE(6), 1, + STATE(9), 1, aux_sym_unionDecl_repeat1, - ACTIONS(68), 2, + ACTIONS(67), 2, anon_sym_case, sym__lower_id, - ACTIONS(66), 5, + ACTIONS(65), 6, ts_builtin_sym_end, + anon_sym_SEMI, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [208] = 7, + [266] = 7, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, @@ -1277,7 +1319,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SEMI, ACTIONS(78), 1, anon_sym_PIPE, - STATE(10), 1, + STATE(12), 1, aux_sym_caseDecl_repeat1, ACTIONS(74), 2, anon_sym_case, @@ -1288,83 +1330,41 @@ static const uint16_t ts_small_parse_table[] = { sym__upper_id, sym_dbtype, sym_qldoc, - [235] = 8, - ACTIONS(3), 1, - sym_line_comment, - ACTIONS(5), 1, - sym_block_comment, - ACTIONS(45), 1, - sym_varchar, - ACTIONS(47), 1, - sym_unique, - ACTIONS(49), 1, - sym_qldoc, - STATE(61), 1, - sym_column, - STATE(64), 1, - sym_reprType, - ACTIONS(43), 5, - sym_int, - sym_float, - sym_boolean, - sym_date, - sym_string, - [264] = 6, + [293] = 7, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(84), 1, + ACTIONS(78), 1, anon_sym_PIPE, + ACTIONS(84), 1, + anon_sym_SEMI, STATE(10), 1, aux_sym_caseDecl_repeat1, ACTIONS(82), 2, anon_sym_case, sym__lower_id, - ACTIONS(80), 6, + ACTIONS(80), 5, ts_builtin_sym_end, - anon_sym_SEMI, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [289] = 8, + [320] = 6, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(45), 1, - sym_varchar, - ACTIONS(47), 1, - sym_unique, - ACTIONS(49), 1, - sym_qldoc, - STATE(46), 1, - sym_column, - STATE(64), 1, - sym_reprType, - ACTIONS(43), 5, - sym_int, - sym_float, - sym_boolean, - sym_date, - sym_string, - [318] = 7, - ACTIONS(3), 1, - sym_line_comment, - ACTIONS(5), 1, - sym_block_comment, - ACTIONS(78), 1, + ACTIONS(90), 1, anon_sym_PIPE, - ACTIONS(91), 1, - anon_sym_SEMI, - STATE(8), 1, + STATE(12), 1, aux_sym_caseDecl_repeat1, - ACTIONS(89), 2, + ACTIONS(88), 2, anon_sym_case, sym__lower_id, - ACTIONS(87), 5, + ACTIONS(86), 6, ts_builtin_sym_end, + anon_sym_SEMI, anon_sym_POUND, sym__upper_id, sym_dbtype, @@ -1374,10 +1374,10 @@ static const uint16_t ts_small_parse_table[] = { sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(61), 2, + ACTIONS(67), 2, anon_sym_case, sym__lower_id, - ACTIONS(59), 7, + ACTIONS(65), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_POUND, @@ -1390,10 +1390,10 @@ static const uint16_t ts_small_parse_table[] = { sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(82), 2, + ACTIONS(95), 2, anon_sym_case, sym__lower_id, - ACTIONS(80), 7, + ACTIONS(93), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_POUND, @@ -1406,10 +1406,10 @@ static const uint16_t ts_small_parse_table[] = { sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(95), 2, + ACTIONS(88), 2, anon_sym_case, sym__lower_id, - ACTIONS(93), 7, + ACTIONS(86), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_POUND, @@ -1449,25 +1449,7 @@ static const uint16_t ts_small_parse_table[] = { sym__upper_id, sym_dbtype, sym_qldoc, - [446] = 7, - ACTIONS(11), 1, - anon_sym_POUND, - STATE(50), 1, - sym_argsAnnotation, - STATE(78), 1, - sym_simpleId, - STATE(81), 1, - sym_tableName, - ACTIONS(3), 2, - sym_line_comment, - sym_block_comment, - ACTIONS(15), 2, - sym__lower_id, - sym__upper_id, - STATE(38), 2, - sym_annotation, - aux_sym_table_repeat1, - [471] = 5, + [446] = 5, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, @@ -1483,6 +1465,24 @@ static const uint16_t ts_small_parse_table[] = { sym__upper_id, sym_dbtype, sym_qldoc, + [467] = 7, + ACTIONS(11), 1, + anon_sym_POUND, + STATE(46), 1, + sym_argsAnnotation, + STATE(82), 1, + sym_tableName, + STATE(88), 1, + sym_simpleId, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + ACTIONS(15), 2, + sym__lower_id, + sym__upper_id, + STATE(38), 2, + sym_annotation, + aux_sym_table_repeat1, [492] = 5, ACTIONS(3), 1, sym_line_comment, @@ -1516,200 +1516,172 @@ static const uint16_t ts_small_parse_table[] = { sym_dbtype, sym_qldoc, [534] = 5, - ACTIONS(45), 1, + ACTIONS(53), 1, sym_varchar, ACTIONS(125), 1, sym_unique, - STATE(51), 1, + STATE(63), 1, sym_reprType, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(43), 5, - sym_int, - sym_float, - sym_boolean, - sym_date, - sym_string, - [555] = 3, - STATE(45), 1, - sym_colType, - ACTIONS(3), 2, - sym_line_comment, - sym_block_comment, - ACTIONS(127), 6, + ACTIONS(51), 5, sym_int, sym_float, sym_boolean, sym_date, sym_string, - sym_dbtype, - [571] = 4, + [555] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(131), 2, + ACTIONS(129), 2, anon_sym_case, sym__lower_id, - ACTIONS(129), 5, + ACTIONS(127), 5, ts_builtin_sym_end, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [589] = 3, - STATE(53), 1, + [573] = 3, + STATE(55), 1, sym_colType, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(127), 6, + ACTIONS(131), 6, sym_int, sym_float, sym_boolean, sym_date, sym_string, sym_dbtype, - [605] = 4, - ACTIONS(45), 1, - sym_varchar, - STATE(52), 1, - sym_reprType, - ACTIONS(3), 2, - sym_line_comment, - sym_block_comment, - ACTIONS(43), 5, - sym_int, - sym_float, - sym_boolean, - sym_date, - sym_string, - [623] = 3, - STATE(44), 1, - sym_colType, - ACTIONS(3), 2, + [589] = 4, + ACTIONS(3), 1, sym_line_comment, + ACTIONS(5), 1, sym_block_comment, - ACTIONS(127), 6, - sym_int, - sym_float, - sym_boolean, - sym_date, - sym_string, + ACTIONS(109), 2, + anon_sym_case, + sym__lower_id, + ACTIONS(107), 5, + ts_builtin_sym_end, + anon_sym_POUND, + sym__upper_id, sym_dbtype, - [639] = 4, + sym_qldoc, + [607] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(121), 2, + ACTIONS(61), 2, anon_sym_case, sym__lower_id, - ACTIONS(119), 5, + ACTIONS(59), 5, ts_builtin_sym_end, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [657] = 3, - STATE(58), 1, + [625] = 3, + STATE(60), 1, + sym_colType, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + ACTIONS(131), 6, + sym_int, + sym_float, + sym_boolean, + sym_date, + sym_string, + sym_dbtype, + [641] = 3, + STATE(61), 1, sym_colType, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(127), 6, + ACTIONS(131), 6, sym_int, sym_float, sym_boolean, sym_date, sym_string, sym_dbtype, - [673] = 4, + [657] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(74), 2, + ACTIONS(135), 2, anon_sym_case, sym__lower_id, - ACTIONS(72), 5, + ACTIONS(133), 5, ts_builtin_sym_end, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [691] = 4, + [675] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(68), 2, + ACTIONS(121), 2, anon_sym_case, sym__lower_id, - ACTIONS(66), 5, + ACTIONS(119), 5, ts_builtin_sym_end, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [709] = 4, + [693] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(109), 2, + ACTIONS(74), 2, anon_sym_case, sym__lower_id, - ACTIONS(107), 5, + ACTIONS(72), 5, ts_builtin_sym_end, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [727] = 4, + [711] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(135), 2, + ACTIONS(139), 2, anon_sym_case, sym__lower_id, - ACTIONS(133), 5, + ACTIONS(137), 5, ts_builtin_sym_end, anon_sym_POUND, sym__upper_id, sym_dbtype, sym_qldoc, - [745] = 4, - ACTIONS(45), 1, - sym_varchar, - STATE(55), 1, - sym_reprType, + [729] = 3, + STATE(66), 1, + sym_colType, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(43), 5, + ACTIONS(131), 6, sym_int, sym_float, sym_boolean, sym_date, sym_string, - [763] = 4, - ACTIONS(3), 1, - sym_line_comment, - ACTIONS(5), 1, - sym_block_comment, - ACTIONS(139), 2, - anon_sym_case, - sym__lower_id, - ACTIONS(137), 5, - ts_builtin_sym_end, - anon_sym_POUND, - sym__upper_id, sym_dbtype, - sym_qldoc, - [781] = 4, + [745] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, @@ -1723,7 +1695,21 @@ static const uint16_t ts_small_parse_table[] = { sym__upper_id, sym_dbtype, sym_qldoc, - [799] = 4, + [763] = 4, + ACTIONS(53), 1, + sym_varchar, + STATE(47), 1, + sym_reprType, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + ACTIONS(51), 5, + sym_int, + sym_float, + sym_boolean, + sym_date, + sym_string, + [781] = 4, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, @@ -1737,10 +1723,24 @@ static const uint16_t ts_small_parse_table[] = { sym__upper_id, sym_dbtype, sym_qldoc, + [799] = 4, + ACTIONS(53), 1, + sym_varchar, + STATE(65), 1, + sym_reprType, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + ACTIONS(51), 5, + sym_int, + sym_float, + sym_boolean, + sym_date, + sym_string, [817] = 5, ACTIONS(151), 1, anon_sym_POUND, - STATE(50), 1, + STATE(46), 1, sym_argsAnnotation, ACTIONS(3), 2, sym_line_comment, @@ -1761,25 +1761,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RBRACK, anon_sym_COLON, anon_sym_of, - [848] = 4, - ACTIONS(156), 1, - anon_sym_RBRACK, - STATE(62), 1, - sym_simpleId, + [848] = 3, + ACTIONS(158), 1, + anon_sym_LBRACK, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(15), 2, + ACTIONS(156), 3, + anon_sym_POUND, sym__lower_id, sym__upper_id, - [863] = 3, + [861] = 4, ACTIONS(160), 1, - anon_sym_LBRACK, + anon_sym_RBRACK, + STATE(59), 1, + sym_simpleId, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(158), 3, - anon_sym_POUND, + ACTIONS(15), 2, sym__lower_id, sym__upper_id, [876] = 2, @@ -1791,82 +1791,45 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, sym__lower_id, sym__upper_id, - [887] = 4, - ACTIONS(164), 1, - anon_sym_COMMA, - ACTIONS(166), 1, - anon_sym_RBRACK, - STATE(66), 1, - aux_sym_argsAnnotation_repeat1, - ACTIONS(3), 2, - sym_line_comment, - sym_block_comment, - [901] = 3, - ACTIONS(170), 1, - sym_ref, - ACTIONS(3), 2, - sym_line_comment, - sym_block_comment, - ACTIONS(168), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [913] = 3, - ACTIONS(174), 1, - sym_ref, + [887] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(172), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [925] = 4, - ACTIONS(176), 1, - anon_sym_COMMA, - ACTIONS(178), 1, - anon_sym_RPAREN, - STATE(63), 1, - aux_sym_table_repeat2, - ACTIONS(3), 2, - sym_line_comment, - sym_block_comment, - [939] = 3, - STATE(71), 1, - sym_simpleId, - ACTIONS(3), 2, - sym_line_comment, - sym_block_comment, - ACTIONS(15), 2, + ACTIONS(164), 3, + anon_sym_POUND, sym__lower_id, sym__upper_id, - [951] = 2, + [897] = 4, + ACTIONS(166), 1, + anon_sym_COMMA, + ACTIONS(168), 1, + anon_sym_RBRACK, + STATE(52), 1, + aux_sym_argsAnnotation_repeat1, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(180), 3, - anon_sym_POUND, - sym__lower_id, - sym__upper_id, - [961] = 5, + [911] = 5, ACTIONS(3), 1, sym_line_comment, ACTIONS(5), 1, sym_block_comment, - ACTIONS(182), 1, + ACTIONS(170), 1, sym_integer, - ACTIONS(184), 1, + ACTIONS(172), 1, sym_qldoc, - STATE(12), 1, + STATE(11), 1, sym_branch, - [977] = 2, + [927] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(186), 3, + ACTIONS(174), 3, anon_sym_POUND, sym__lower_id, sym__upper_id, - [987] = 3, - STATE(77), 1, + [937] = 3, + STATE(89), 1, sym_simpleId, ACTIONS(3), 2, sym_line_comment, @@ -1874,8 +1837,18 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, sym__lower_id, sym__upper_id, - [999] = 3, - STATE(84), 1, + [949] = 4, + ACTIONS(176), 1, + anon_sym_COMMA, + ACTIONS(178), 1, + anon_sym_RPAREN, + STATE(51), 1, + aux_sym_table_repeat2, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + [963] = 3, + STATE(85), 1, sym_simpleId, ACTIONS(3), 2, sym_line_comment, @@ -1883,47 +1856,65 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, sym__lower_id, sym__upper_id, - [1011] = 3, - ACTIONS(190), 1, - sym_ref, + [975] = 4, + ACTIONS(180), 1, + anon_sym_COMMA, + ACTIONS(183), 1, + anon_sym_RPAREN, + STATE(50), 1, + aux_sym_table_repeat2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(188), 2, + [989] = 4, + ACTIONS(176), 1, anon_sym_COMMA, + ACTIONS(185), 1, anon_sym_RPAREN, - [1023] = 4, + STATE(50), 1, + aux_sym_table_repeat2, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + [1003] = 4, + ACTIONS(187), 1, + anon_sym_COMMA, + ACTIONS(190), 1, + anon_sym_RBRACK, + STATE(52), 1, + aux_sym_argsAnnotation_repeat1, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + [1017] = 4, ACTIONS(176), 1, anon_sym_COMMA, ACTIONS(192), 1, anon_sym_RPAREN, - STATE(60), 1, + STATE(50), 1, aux_sym_table_repeat2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - [1037] = 3, - STATE(98), 1, - sym_simpleId, + [1031] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(15), 2, - sym__lower_id, - sym__upper_id, - [1049] = 5, - ACTIONS(3), 1, + ACTIONS(194), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + sym_ref, + [1041] = 3, + ACTIONS(198), 1, + sym_ref, + ACTIONS(3), 2, sym_line_comment, - ACTIONS(5), 1, sym_block_comment, - ACTIONS(182), 1, - sym_integer, - ACTIONS(184), 1, - sym_qldoc, - STATE(14), 1, - sym_branch, - [1065] = 3, - STATE(96), 1, + ACTIONS(196), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [1053] = 3, + STATE(87), 1, sym_simpleId, ACTIONS(3), 2, sym_line_comment, @@ -1931,65 +1922,64 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, sym__lower_id, sym__upper_id, - [1077] = 3, - ACTIONS(196), 1, - sym_ref, + [1065] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(194), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [1089] = 2, - ACTIONS(3), 2, + ACTIONS(200), 3, + anon_sym_POUND, + sym__lower_id, + sym__upper_id, + [1075] = 5, + ACTIONS(3), 1, sym_line_comment, + ACTIONS(5), 1, sym_block_comment, - ACTIONS(198), 3, - anon_sym_COMMA, - anon_sym_RPAREN, - sym_ref, - [1099] = 4, - ACTIONS(200), 1, + ACTIONS(170), 1, + sym_integer, + ACTIONS(172), 1, + sym_qldoc, + STATE(15), 1, + sym_branch, + [1091] = 4, + ACTIONS(166), 1, anon_sym_COMMA, - ACTIONS(203), 1, - anon_sym_RPAREN, - STATE(60), 1, - aux_sym_table_repeat2, + ACTIONS(202), 1, + anon_sym_RBRACK, + STATE(44), 1, + aux_sym_argsAnnotation_repeat1, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - [1113] = 4, - ACTIONS(176), 1, - anon_sym_COMMA, - ACTIONS(205), 1, - anon_sym_RPAREN, - STATE(54), 1, - aux_sym_table_repeat2, + [1105] = 3, + ACTIONS(206), 1, + sym_ref, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - [1127] = 4, - ACTIONS(164), 1, + ACTIONS(204), 2, anon_sym_COMMA, - ACTIONS(207), 1, - anon_sym_RBRACK, - STATE(43), 1, - aux_sym_argsAnnotation_repeat1, + anon_sym_RPAREN, + [1117] = 3, + ACTIONS(210), 1, + sym_ref, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - [1141] = 4, - ACTIONS(176), 1, + ACTIONS(208), 2, anon_sym_COMMA, - ACTIONS(209), 1, anon_sym_RPAREN, - STATE(60), 1, - aux_sym_table_repeat2, + [1129] = 3, + STATE(75), 1, + sym_simpleId, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - [1155] = 3, - STATE(95), 1, + ACTIONS(15), 2, + sym__lower_id, + sym__upper_id, + [1141] = 3, + STATE(96), 1, sym_simpleId, ACTIONS(3), 2, sym_line_comment, @@ -1997,39 +1987,49 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(15), 2, sym__lower_id, sym__upper_id, - [1167] = 2, + [1153] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(211), 3, + ACTIONS(212), 3, anon_sym_POUND, sym__lower_id, sym__upper_id, - [1177] = 4, - ACTIONS(213), 1, - anon_sym_COMMA, + [1163] = 3, + STATE(94), 1, + sym_simpleId, + ACTIONS(3), 2, + sym_line_comment, + sym_block_comment, + ACTIONS(15), 2, + sym__lower_id, + sym__upper_id, + [1175] = 3, ACTIONS(216), 1, - anon_sym_RBRACK, - STATE(66), 1, - aux_sym_argsAnnotation_repeat1, + sym_ref, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - [1191] = 2, + ACTIONS(214), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [1187] = 4, + ACTIONS(176), 1, + anon_sym_COMMA, + ACTIONS(218), 1, + anon_sym_RPAREN, + STATE(53), 1, + aux_sym_table_repeat2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(218), 3, - anon_sym_POUND, - sym__lower_id, - sym__upper_id, [1201] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, ACTIONS(220), 2, - sym__lower_id, - sym__upper_id, + anon_sym_COMMA, + anon_sym_RPAREN, [1210] = 2, ACTIONS(3), 2, sym_line_comment, @@ -2048,54 +2048,54 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(216), 2, - anon_sym_COMMA, - anon_sym_RBRACK, - [1237] = 2, + ACTIONS(226), 2, + sym__lower_id, + sym__upper_id, + [1237] = 3, + ACTIONS(228), 1, + sym__lower_id, + STATE(40), 1, + sym_annotName, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(226), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [1246] = 2, + [1248] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(228), 2, + ACTIONS(183), 2, anon_sym_COMMA, anon_sym_RPAREN, - [1255] = 3, - ACTIONS(230), 1, - sym__lower_id, - STATE(41), 1, - sym_annotName, + [1257] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, + ACTIONS(230), 2, + anon_sym_COMMA, + anon_sym_RPAREN, [1266] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(232), 2, + ACTIONS(190), 2, anon_sym_COMMA, - anon_sym_RPAREN, + anon_sym_RBRACK, [1275] = 2, ACTIONS(3), 2, sym_line_comment, sym_block_comment, - ACTIONS(203), 2, + ACTIONS(232), 2, anon_sym_COMMA, anon_sym_RPAREN, [1284] = 2, ACTIONS(234), 1, - anon_sym_COLON, + sym_dbtype, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1292] = 2, ACTIONS(236), 1, - anon_sym_LPAREN, + sym_dbtype, ACTIONS(3), 2, sym_line_comment, sym_block_comment, @@ -2113,55 +2113,55 @@ static const uint16_t ts_small_parse_table[] = { sym_block_comment, [1316] = 2, ACTIONS(242), 1, - anon_sym_LPAREN, + ts_builtin_sym_end, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1324] = 2, ACTIONS(244), 1, - sym_integer, + anon_sym_LPAREN, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1332] = 2, ACTIONS(246), 1, - sym_dbtype, + anon_sym_EQ, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1340] = 2, ACTIONS(248), 1, - anon_sym_COLON, + sym_integer, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1348] = 2, ACTIONS(250), 1, - anon_sym_DOT, + anon_sym_of, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1356] = 2, ACTIONS(252), 1, - anon_sym_RPAREN, + anon_sym_LPAREN, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1364] = 2, ACTIONS(254), 1, - anon_sym_EQ, + anon_sym_COLON, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1372] = 2, ACTIONS(256), 1, - sym_integer, + anon_sym_LPAREN, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1380] = 2, ACTIONS(258), 1, - anon_sym_LPAREN, + anon_sym_COLON, ACTIONS(3), 2, sym_line_comment, sym_block_comment, @@ -2173,49 +2173,49 @@ static const uint16_t ts_small_parse_table[] = { sym_block_comment, [1396] = 2, ACTIONS(262), 1, - sym_dbtype, + anon_sym_RPAREN, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1404] = 2, ACTIONS(264), 1, - ts_builtin_sym_end, + sym_integer, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1412] = 2, ACTIONS(266), 1, - anon_sym_EQ, + anon_sym_LPAREN, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1420] = 2, ACTIONS(268), 1, - anon_sym_LPAREN, + anon_sym_COLON, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1428] = 2, ACTIONS(270), 1, - anon_sym_COLON, + sym_dbtype, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1436] = 2, ACTIONS(272), 1, - anon_sym_of, + anon_sym_COLON, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1444] = 2, ACTIONS(274), 1, - sym_dbtype, + anon_sym_DOT, ACTIONS(3), 2, sym_line_comment, sym_block_comment, [1452] = 2, ACTIONS(276), 1, - anon_sym_COLON, + anon_sym_EQ, ACTIONS(3), 2, sym_line_comment, sym_block_comment, @@ -2225,35 +2225,35 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, [SMALL_STATE(3)] = 50, [SMALL_STATE(4)] = 100, - [SMALL_STATE(5)] = 129, + [SMALL_STATE(5)] = 127, [SMALL_STATE(6)] = 156, - [SMALL_STATE(7)] = 181, - [SMALL_STATE(8)] = 208, - [SMALL_STATE(9)] = 235, - [SMALL_STATE(10)] = 264, - [SMALL_STATE(11)] = 289, - [SMALL_STATE(12)] = 318, + [SMALL_STATE(7)] = 185, + [SMALL_STATE(8)] = 214, + [SMALL_STATE(9)] = 241, + [SMALL_STATE(10)] = 266, + [SMALL_STATE(11)] = 293, + [SMALL_STATE(12)] = 320, [SMALL_STATE(13)] = 345, [SMALL_STATE(14)] = 365, [SMALL_STATE(15)] = 385, [SMALL_STATE(16)] = 405, [SMALL_STATE(17)] = 425, [SMALL_STATE(18)] = 446, - [SMALL_STATE(19)] = 471, + [SMALL_STATE(19)] = 467, [SMALL_STATE(20)] = 492, [SMALL_STATE(21)] = 513, [SMALL_STATE(22)] = 534, [SMALL_STATE(23)] = 555, - [SMALL_STATE(24)] = 571, + [SMALL_STATE(24)] = 573, [SMALL_STATE(25)] = 589, - [SMALL_STATE(26)] = 605, - [SMALL_STATE(27)] = 623, - [SMALL_STATE(28)] = 639, + [SMALL_STATE(26)] = 607, + [SMALL_STATE(27)] = 625, + [SMALL_STATE(28)] = 641, [SMALL_STATE(29)] = 657, - [SMALL_STATE(30)] = 673, - [SMALL_STATE(31)] = 691, - [SMALL_STATE(32)] = 709, - [SMALL_STATE(33)] = 727, + [SMALL_STATE(30)] = 675, + [SMALL_STATE(31)] = 693, + [SMALL_STATE(32)] = 711, + [SMALL_STATE(33)] = 729, [SMALL_STATE(34)] = 745, [SMALL_STATE(35)] = 763, [SMALL_STATE(36)] = 781, @@ -2261,40 +2261,40 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(38)] = 817, [SMALL_STATE(39)] = 836, [SMALL_STATE(40)] = 848, - [SMALL_STATE(41)] = 863, + [SMALL_STATE(41)] = 861, [SMALL_STATE(42)] = 876, [SMALL_STATE(43)] = 887, - [SMALL_STATE(44)] = 901, - [SMALL_STATE(45)] = 913, - [SMALL_STATE(46)] = 925, - [SMALL_STATE(47)] = 939, - [SMALL_STATE(48)] = 951, - [SMALL_STATE(49)] = 961, - [SMALL_STATE(50)] = 977, - [SMALL_STATE(51)] = 987, - [SMALL_STATE(52)] = 999, - [SMALL_STATE(53)] = 1011, - [SMALL_STATE(54)] = 1023, - [SMALL_STATE(55)] = 1037, - [SMALL_STATE(56)] = 1049, + [SMALL_STATE(44)] = 897, + [SMALL_STATE(45)] = 911, + [SMALL_STATE(46)] = 927, + [SMALL_STATE(47)] = 937, + [SMALL_STATE(48)] = 949, + [SMALL_STATE(49)] = 963, + [SMALL_STATE(50)] = 975, + [SMALL_STATE(51)] = 989, + [SMALL_STATE(52)] = 1003, + [SMALL_STATE(53)] = 1017, + [SMALL_STATE(54)] = 1031, + [SMALL_STATE(55)] = 1041, + [SMALL_STATE(56)] = 1053, [SMALL_STATE(57)] = 1065, - [SMALL_STATE(58)] = 1077, - [SMALL_STATE(59)] = 1089, - [SMALL_STATE(60)] = 1099, - [SMALL_STATE(61)] = 1113, - [SMALL_STATE(62)] = 1127, + [SMALL_STATE(58)] = 1075, + [SMALL_STATE(59)] = 1091, + [SMALL_STATE(60)] = 1105, + [SMALL_STATE(61)] = 1117, + [SMALL_STATE(62)] = 1129, [SMALL_STATE(63)] = 1141, - [SMALL_STATE(64)] = 1155, - [SMALL_STATE(65)] = 1167, - [SMALL_STATE(66)] = 1177, - [SMALL_STATE(67)] = 1191, + [SMALL_STATE(64)] = 1153, + [SMALL_STATE(65)] = 1163, + [SMALL_STATE(66)] = 1175, + [SMALL_STATE(67)] = 1187, [SMALL_STATE(68)] = 1201, [SMALL_STATE(69)] = 1210, [SMALL_STATE(70)] = 1219, [SMALL_STATE(71)] = 1228, [SMALL_STATE(72)] = 1237, - [SMALL_STATE(73)] = 1246, - [SMALL_STATE(74)] = 1255, + [SMALL_STATE(73)] = 1248, + [SMALL_STATE(74)] = 1257, [SMALL_STATE(75)] = 1266, [SMALL_STATE(76)] = 1275, [SMALL_STATE(77)] = 1284, @@ -2328,134 +2328,134 @@ static const TSParseActionEntry ts_parse_actions[] = { [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dbscheme, 0, 0, 0), [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), [23] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(39), - [26] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(74), - [29] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(97), + [26] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(72), + [29] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(95), [32] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(39), - [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(93), + [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(98), [38] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dbscheme_repeat1, 2, 0, 0), SHIFT_REPEAT(36), [41] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dbscheme, 1, 0, 0), - [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 3, 0, 3), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 3, 0, 3), [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 3, 0, 3), - [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 3, 0, 3), - [55] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [57] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0), - [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0), - [63] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0), SHIFT_REPEAT(91), - [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 4, 0, 3), - [68] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 4, 0, 3), - [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [55] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [57] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [59] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 4, 0, 3), + [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 4, 0, 3), + [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [65] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0), + [67] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0), + [69] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_unionDecl_repeat1, 2, 0, 0), SHIFT_REPEAT(77), [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 7, 0, 7), [74] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 7, 0, 7), - [76] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [78] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0), - [82] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0), - [84] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0), SHIFT_REPEAT(56), - [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 6, 0, 7), - [89] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 6, 0, 7), - [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [76] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [78] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 6, 0, 7), + [82] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 6, 0, 7), + [84] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0), + [88] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0), + [90] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_caseDecl_repeat1, 2, 0, 0), SHIFT_REPEAT(58), [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_branch, 3, 0, 0), [95] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_branch, 3, 0, 0), [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_branch, 4, 0, 15), [99] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_branch, 4, 0, 15), [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 4, 0, 5), [103] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 4, 0, 5), - [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), [107] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 5, 0, 5), [109] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 5, 0, 5), - [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), [113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 5, 0, 6), [115] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 5, 0, 6), - [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), [119] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 6, 0, 6), [121] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 6, 0, 6), - [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [129] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 6, 0, 5), - [131] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 6, 0, 5), - [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 5, 0, 3), - [135] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 5, 0, 3), - [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 7, 0, 6), - [139] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 7, 0, 6), - [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_entry, 1, 0, 0), - [143] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_entry, 1, 0, 0), - [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 8, 0, 7), - [147] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 8, 0, 7), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unionDecl, 5, 0, 3), + [129] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unionDecl, 5, 0, 3), + [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 6, 0, 5), + [135] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 6, 0, 5), + [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_caseDecl, 8, 0, 7), + [139] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_caseDecl, 8, 0, 7), + [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 7, 0, 6), + [143] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 7, 0, 6), + [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_entry, 1, 0, 0), + [147] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_entry, 1, 0, 0), [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_table_repeat1, 2, 0, 0), - [151] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_table_repeat1, 2, 0, 0), SHIFT_REPEAT(74), + [151] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_table_repeat1, 2, 0, 0), SHIFT_REPEAT(72), [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_simpleId, 1, 0, 0), - [156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [158] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 2, 0, 2), - [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 2, 0, 2), + [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotName, 1, 0, 0), - [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 9), - [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 13), - [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [176] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 6, 0, 4), + [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 1, 0, 1), + [176] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [180] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 5, 0, 4), - [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), - [184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [186] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 1, 0, 1), - [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 10), - [190] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), - [192] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 4, 0, 8), - [196] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), - [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_colType, 1, 0, 0), - [200] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_table_repeat2, 2, 0, 0), SHIFT_REPEAT(4), - [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_table_repeat2, 2, 0, 0), - [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 6, 0, 4), - [213] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_argsAnnotation_repeat1, 2, 0, 0), SHIFT_REPEAT(47), - [216] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argsAnnotation_repeat1, 2, 0, 0), - [218] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 4, 0, 4), - [220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reprType, 1, 0, 0), - [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 7, 0, 16), - [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reprType, 4, 0, 0), - [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 14), - [228] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 12), - [230] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 11), - [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tableName, 1, 0, 0), - [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [180] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_table_repeat2, 2, 0, 0), SHIFT_REPEAT(7), + [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_table_repeat2, 2, 0, 0), + [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [187] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_argsAnnotation_repeat1, 2, 0, 0), SHIFT_REPEAT(62), + [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argsAnnotation_repeat1, 2, 0, 0), + [192] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_colType, 1, 0, 0), + [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 4, 0, 8), + [198] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 4, 0, 4), + [202] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 9), + [206] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 10), + [210] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argsAnnotation, 5, 0, 4), + [214] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 13), + [216] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 7, 0, 16), + [222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 5, 0, 11), + [224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reprType, 1, 0, 0), + [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reprType, 4, 0, 0), + [228] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 12), + [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column, 6, 0, 14), + [234] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [236] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [238] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), - [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), - [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), - [256] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), - [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [242] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [244] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [248] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [250] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [252] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [254] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [256] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tableName, 1, 0, 0), + [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), [260] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [262] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [264] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [266] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [268] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [276] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [262] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [264] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [266] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [268] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [274] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [276] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), }; #ifdef __cplusplus