From be620bfdc90ec0980dc10dbaabfec07e29f9baf9 Mon Sep 17 00:00:00 2001 From: Matt Stavola Date: Fri, 17 Apr 2026 07:46:20 -0400 Subject: [PATCH] Update tree-sitter to 0.26 --- Cargo.lock | 29 +- justfile | 14 +- tree-sitter-mlf/.gitignore | 2 - tree-sitter-mlf/Cargo.toml | 21 +- tree-sitter-mlf/README.md | 7 +- tree-sitter-mlf/binding.gyp | 13 +- tree-sitter-mlf/bindings/node/binding.cc | 36 +- tree-sitter-mlf/bindings/node/index.d.ts | 28 + tree-sitter-mlf/bindings/node/index.js | 22 +- tree-sitter-mlf/bindings/rust/build.rs | 23 +- tree-sitter-mlf/bindings/rust/lib.rs | 44 +- tree-sitter-mlf/package-lock.json | 369 + tree-sitter-mlf/package.json | 33 +- tree-sitter-mlf/src/parser.c | 7819 ++++++++++++++++++++++ tree-sitter-mlf/src/tree_sitter/alloc.h | 54 + tree-sitter-mlf/src/tree_sitter/array.h | 330 + tree-sitter-mlf/src/tree_sitter/parser.h | 286 + tree-sitter-mlf/tree-sitter.json | 34 + 18 files changed, 9051 insertions(+), 113 deletions(-) create mode 100644 tree-sitter-mlf/bindings/node/index.d.ts create mode 100644 tree-sitter-mlf/package-lock.json create mode 100644 tree-sitter-mlf/src/parser.c create mode 100644 tree-sitter-mlf/src/tree_sitter/alloc.h create mode 100644 tree-sitter-mlf/src/tree_sitter/array.h create mode 100644 tree-sitter-mlf/src/tree_sitter/parser.h create mode 100644 tree-sitter-mlf/tree-sitter.json diff --git a/Cargo.lock b/Cargo.lock index 5a1ef16..b8de3c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,9 +272,9 @@ checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" [[package]] name = "cc" -version = "1.2.40" +version = "1.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d05d92f4b1fd76aad469d46cdd858ca761576082cd37df81416691e50199fb" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" dependencies = [ "find-msvc-tools", "shlex", @@ -584,9 +584,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "find-msvc-tools" -version = "0.1.3" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0399f9d26e5191ce32c498bebd31e7a3ceabc2745f0ac54af3f335126c3f24b3" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fnv" @@ -2286,6 +2286,12 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" + [[package]] name = "strsim" version = "0.11.1" @@ -2779,20 +2785,31 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.22.6" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7cc499ceadd4dcdf7ec6d4cbc34ece92c3fa07821e287aedecd4416c516dca" +checksum = "887bd495d0582c5e3e0d8ece2233666169fa56a9644d172fc22ad179ab2d0538" dependencies = [ "cc", "regex", + "regex-syntax", + "serde_json", + "streaming-iterator", + "tree-sitter-language", ] +[[package]] +name = "tree-sitter-language" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" + [[package]] name = "tree-sitter-mlf" version = "0.1.0" dependencies = [ "cc", "tree-sitter", + "tree-sitter-language", ] [[package]] diff --git a/justfile b/justfile index dd0aa94..a674c0f 100644 --- a/justfile +++ b/justfile @@ -18,12 +18,12 @@ install-tools: # `just test-fast` to skip network-dependent real-world tests. test: @echo "Running all workspace tests..." - cargo nextest run --workspace --exclude tree-sitter-mlf --exclude mlf-wasm + cargo nextest run --workspace --exclude mlf-wasm # Run everything except network-dependent real-world roundtrip tests test-fast: @echo "Running workspace tests (excluding real-world)..." - cargo nextest run --workspace --exclude tree-sitter-mlf --exclude mlf-wasm -E 'not binary(real_world_roundtrip)' + cargo nextest run --workspace --exclude mlf-wasm -E 'not binary(real_world_roundtrip)' # Run only language tests (mlf-lang crate) test-lang: @@ -71,11 +71,11 @@ review: # Run tests with verbose output (stdout streamed live, tests run serially) test-verbose: - cargo nextest run --workspace --exclude tree-sitter-mlf --exclude mlf-wasm --no-capture + cargo nextest run --workspace --exclude mlf-wasm --no-capture # Quick check without running tests check: - cargo check --workspace --exclude tree-sitter-mlf + cargo check --workspace # Format code fmt: @@ -83,15 +83,15 @@ fmt: # Run clippy lint: - cargo clippy --workspace --exclude tree-sitter-mlf + cargo clippy --workspace # Build everything build: - cargo build --workspace --exclude tree-sitter-mlf + cargo build --workspace # Build release build-release: - cargo build --workspace --exclude tree-sitter-mlf --release + cargo build --workspace --release # Clean build artifacts clean: diff --git a/tree-sitter-mlf/.gitignore b/tree-sitter-mlf/.gitignore index 3f372c3..1875e77 100644 --- a/tree-sitter-mlf/.gitignore +++ b/tree-sitter-mlf/.gitignore @@ -4,5 +4,3 @@ build/ .DS_Store Cargo.lock target/ -src/parser.c -src/tree_sitter/ diff --git a/tree-sitter-mlf/Cargo.toml b/tree-sitter-mlf/Cargo.toml index 37e7a60..854d5c4 100644 --- a/tree-sitter-mlf/Cargo.toml +++ b/tree-sitter-mlf/Cargo.toml @@ -2,16 +2,29 @@ name = "tree-sitter-mlf" version = "0.1.0" description = "MLF grammar for tree-sitter" -keywords = ["tree-sitter", "parser", "mlf"] +keywords = ["tree-sitter", "parser", "mlf", "lexicon", "atproto"] categories = ["parsing", "text-editors"] license = "MIT" -edition = "2021" +edition = "2024" +autoexamples = false +build = "bindings/rust/build.rs" +include = [ + "bindings/rust/*", + "grammar.js", + "queries/*", + "src/*", + "src/tree_sitter/*", + "tree-sitter.json", +] [lib] path = "bindings/rust/lib.rs" [dependencies] -tree-sitter = "~0.22" +tree-sitter-language = "0.1" [build-dependencies] -cc = "1.0" +cc = "1.1" + +[dev-dependencies] +tree-sitter = "0.26" diff --git a/tree-sitter-mlf/README.md b/tree-sitter-mlf/README.md index 7715f4a..4410597 100644 --- a/tree-sitter-mlf/README.md +++ b/tree-sitter-mlf/README.md @@ -29,11 +29,12 @@ record post { text: string constrained { maxLength: 300, }, -}; +} "#; let mut parser = Parser::new(); -parser.set_language(&tree_sitter_mlf::language()).unwrap(); +let language = tree_sitter_mlf::LANGUAGE; +parser.set_language(&language.into()).unwrap(); let tree = parser.parse(code, None).unwrap(); ``` @@ -49,7 +50,7 @@ parser.setLanguage(MLF); const code = ` record post { text: string, -}; +} `; const tree = parser.parse(code); diff --git a/tree-sitter-mlf/binding.gyp b/tree-sitter-mlf/binding.gyp index bc66745..08bc6c2 100644 --- a/tree-sitter-mlf/binding.gyp +++ b/tree-sitter-mlf/binding.gyp @@ -12,8 +12,17 @@ "bindings/node/binding.cc", "src/parser.c" ], - "cflags_c": [ - "-std=c11" + "conditions": [ + ["OS!='win'", { + "cflags_c": [ + "-std=c11" + ] + }, { + "cflags_c": [ + "/std:c11", + "/utf-8" + ] + }] ] } ] diff --git a/tree-sitter-mlf/bindings/node/binding.cc b/tree-sitter-mlf/bindings/node/binding.cc index 6812e05..1d1dad9 100644 --- a/tree-sitter-mlf/bindings/node/binding.cc +++ b/tree-sitter-mlf/bindings/node/binding.cc @@ -1,28 +1,20 @@ -#include "tree_sitter/parser.h" -#include -#include "nan.h" +#include -using namespace v8; +typedef struct TSLanguage TSLanguage; -extern "C" TSLanguage * tree_sitter_mlf(); +extern "C" TSLanguage *tree_sitter_mlf(); -namespace { +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; -NAN_METHOD(New) {} - -void Init(Local exports, Local module) { - Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Language").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); - Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_mlf()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("mlf").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +Napi::Object Init(Napi::Env env, Napi::Object exports) { + exports["name"] = Napi::String::New(env, "mlf"); + auto language = Napi::External::New(env, tree_sitter_mlf()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; } -NODE_MODULE(tree_sitter_mlf_binding, Init) - -} // namespace +NODE_API_MODULE(tree_sitter_mlf_binding, Init) diff --git a/tree-sitter-mlf/bindings/node/index.d.ts b/tree-sitter-mlf/bindings/node/index.d.ts new file mode 100644 index 0000000..efe259e --- /dev/null +++ b/tree-sitter-mlf/bindings/node/index.d.ts @@ -0,0 +1,28 @@ +type BaseNode = { + type: string; + named: boolean; +}; + +type ChildNode = { + multiple: boolean; + required: boolean; + types: BaseNode[]; +}; + +type NodeInfo = + | (BaseNode & { + subtypes: BaseNode[]; + }) + | (BaseNode & { + fields: { [name: string]: ChildNode }; + children: ChildNode[]; + }); + +type Language = { + name: string; + language: unknown; + nodeTypeInfo: NodeInfo[]; +}; + +declare const language: Language; +export = language; diff --git a/tree-sitter-mlf/bindings/node/index.js b/tree-sitter-mlf/bindings/node/index.js index 0761eab..9e88e28 100644 --- a/tree-sitter-mlf/bindings/node/index.js +++ b/tree-sitter-mlf/bindings/node/index.js @@ -1,18 +1,10 @@ -try { - module.exports = require("../../build/Release/tree_sitter_mlf_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_mlf_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} +const root = require("path").join(__dirname, "..", ".."); + +module.exports = + typeof process.versions.bun === "string" + // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time + ? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-mlf.node`) + : require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); diff --git a/tree-sitter-mlf/bindings/rust/build.rs b/tree-sitter-mlf/bindings/rust/build.rs index fe8ba98..678c4cf 100644 --- a/tree-sitter-mlf/bindings/rust/build.rs +++ b/tree-sitter-mlf/bindings/rust/build.rs @@ -1,24 +1,15 @@ fn main() { - let src_dir = std::path::Path::new("../../src"); + let src_dir = std::path::Path::new("src"); let mut c_config = cc::Build::new(); - c_config.include(src_dir); - c_config - .flag_if_supported("-Wno-unused-parameter") - .flag_if_supported("-Wno-unused-but-set-variable") - .flag_if_supported("-Wno-trigraphs"); - let parser_path = src_dir.join("parser.c"); - c_config.file(&parser_path); + c_config.std("c11").include(src_dir); - // If your language uses an external scanner written in C, - // then include this block of code: + #[cfg(target_env = "msvc")] + c_config.flag("-utf-8"); - /* - let scanner_path = src_dir.join("scanner.c"); - c_config.file(&scanner_path); - println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); - */ + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); c_config.compile("tree-sitter-mlf"); - println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); } diff --git a/tree-sitter-mlf/bindings/rust/lib.rs b/tree-sitter-mlf/bindings/rust/lib.rs index 01236ba..5cd5cda 100644 --- a/tree-sitter-mlf/bindings/rust/lib.rs +++ b/tree-sitter-mlf/bindings/rust/lib.rs @@ -1,48 +1,46 @@ -//! This crate provides MLF language support for the [tree-sitter][] parsing library. +//! This crate provides MLF (Matt's Lexicon Format) language support for the +//! [tree-sitter][] parsing library. //! -//! Typically, you will use the [language][language func] function to add this language to a +//! Typically, you will use the [LANGUAGE][] constant 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#" //! record post { //! text: string, -//! }; +//! } //! "#; -//! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(&tree_sitter_mlf::language()).expect("Error loading MLF grammar"); +//! let mut parser = Parser::new(); +//! let language = tree_sitter_mlf::LANGUAGE; +//! parser +//! .set_language(&language.into()) +//! .expect("Error loading MLF parser"); //! let tree = parser.parse(code, None).unwrap(); //! assert!(!tree.root_node().has_error()); //! ``` //! -//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -//! [language func]: fn.language.html +//! [LANGUAGE]: https://docs.rs/tree-sitter-language/*/tree_sitter_language/struct.LanguageFn.html //! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html //! [tree-sitter]: https://tree-sitter.github.io/ -use tree_sitter::Language; +use tree_sitter_language::LanguageFn; -extern "C" { - fn tree_sitter_mlf() -> Language; +unsafe extern "C" { + fn tree_sitter_mlf() -> *const (); } -/// Get the tree-sitter [Language][] for this grammar. -/// -/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -pub fn language() -> Language { - unsafe { tree_sitter_mlf() } -} +/// The tree-sitter [`LanguageFn`] for this grammar. +pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_mlf) }; /// The content of the [`node-types.json`][] file for this grammar. /// /// [`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"); -// Uncomment these to include any queries that your 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"); +/// The syntax highlighting query for this language. +pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); #[cfg(test)] mod tests { @@ -50,7 +48,7 @@ mod tests { fn test_can_load_grammar() { let mut parser = tree_sitter::Parser::new(); parser - .set_language(&super::language()) - .expect("Error loading MLF language"); + .set_language(&super::LANGUAGE.into()) + .expect("Error loading MLF parser"); } } diff --git a/tree-sitter-mlf/package-lock.json b/tree-sitter-mlf/package-lock.json new file mode 100644 index 0000000..057af19 --- /dev/null +++ b/tree-sitter-mlf/package-lock.json @@ -0,0 +1,369 @@ +{ + "name": "tree-sitter-mlf", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "tree-sitter-mlf", + "version": "0.1.0", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^8.2.2", + "node-gyp-build": "^4.8.4" + }, + "devDependencies": { + "prebuildify": "^6.0.1", + "tree-sitter-cli": "^0.26.7" + }, + "peerDependencies": { + "tree-sitter": "^0.25.0" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "license": "ISC" + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "license": "MIT" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "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" + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-abi": { + "version": "3.89.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.89.0.tgz", + "integrity": "sha512-6u9UwL0HlAl21+agMN3YAMXcKByMqwGx+pq+P76vii5f7hTPtKDp08/H9py6DY+cfDw7kQNTGEj/rly3IgbNQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.7.0.tgz", + "integrity": "sha512-9MdFxmkKaOYVTV+XVRG8ArDwwQ77XIgIPyKASB1k3JPq3M8fGQQQE3YpMOrKm6g//Ktx8ivZr8xo1Qmtqub+GA==", + "license": "MIT", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/npm-run-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", + "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/prebuildify": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/prebuildify/-/prebuildify-6.0.1.tgz", + "integrity": "sha512-8Y2oOOateom/s8dNBsGIcnm6AxPmLH4/nanQzL5lQMU+sC0CMhzARZHizwr36pUPLdvBnOkCNQzxg4djuFSgIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "mkdirp-classic": "^0.5.3", + "node-abi": "^3.3.0", + "npm-run-path": "^3.1.0", + "pump": "^3.0.0", + "tar-fs": "^2.1.0" + }, + "bin": { + "prebuildify": "bin.js" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tree-sitter-cli": { + "version": "0.26.8", + "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.26.8.tgz", + "integrity": "sha512-teQFMF5V/g8aIdakZ0M/eZoedCM3MuBt1JuDOICLloA2hy7QfeOInb99U6wiML4qXcBHWREwf0U1TWzw7p67YA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "tree-sitter": "cli.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrappy": { + "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" + } + } +} diff --git a/tree-sitter-mlf/package.json b/tree-sitter-mlf/package.json index d99e1cc..0bb65c7 100644 --- a/tree-sitter-mlf/package.json +++ b/tree-sitter-mlf/package.json @@ -13,28 +13,35 @@ ], "author": "Matt", "license": "MIT", + "files": [ + "grammar.js", + "tree-sitter.json", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**" + ], "dependencies": { - "node-addon-api": "^7.1.0", - "node-gyp-build": "^4.8.0" + "node-addon-api": "^8.2.2", + "node-gyp-build": "^4.8.4" }, "devDependencies": { - "tree-sitter-cli": "^0.22.6", - "prebuildify": "^6.0.0" + "prebuildify": "^6.0.1", + "tree-sitter-cli": "^0.26.7" }, "peerDependencies": { - "tree-sitter": "^0.21.0" + "tree-sitter": "^0.25.0" }, "peerDependenciesMeta": { "tree-sitter": { "optional": true } }, - "tree-sitter": [ - { - "scope": "source.mlf", - "file-types": [ - "mlf" - ] - } - ] + "scripts": { + "install": "node-gyp-build", + "prestart": "tree-sitter build --wasm", + "start": "tree-sitter playground", + "test": "node --test bindings/node/*_test.js" + } } diff --git a/tree-sitter-mlf/src/parser.c b/tree-sitter-mlf/src/parser.c new file mode 100644 index 0000000..886c68a --- /dev/null +++ b/tree-sitter-mlf/src/parser.c @@ -0,0 +1,7819 @@ +/* Automatically @generated by tree-sitter */ + +#include "tree_sitter/parser.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 15 +#define STATE_COUNT 314 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 103 +#define ALIAS_COUNT 0 +#define TOKEN_COUNT 46 +#define EXTERNAL_TOKEN_COUNT 0 +#define FIELD_COUNT 16 +#define MAX_ALIAS_SEQUENCE_LENGTH 7 +#define MAX_RESERVED_WORD_SET_SIZE 0 +#define PRODUCTION_ID_COUNT 29 +#define SUPERTYPE_COUNT 0 + +enum ts_symbol_identifiers { + anon_sym_self = 1, + anon_sym_LBRACE = 2, + anon_sym_RBRACE = 3, + sym_doc_comment = 4, + sym_comment = 5, + anon_sym_AT = 6, + anon_sym_COMMA = 7, + anon_sym_COLON = 8, + anon_sym_LPAREN = 9, + anon_sym_RPAREN = 10, + anon_sym_null = 11, + anon_sym_LBRACK = 12, + anon_sym_RBRACK = 13, + anon_sym_use = 14, + anon_sym_as = 15, + anon_sym_DOT = 16, + anon_sym_STAR = 17, + anon_sym_SEMI = 18, + anon_sym_main = 19, + anon_sym_record = 20, + anon_sym_BANG = 21, + anon_sym_inline = 22, + anon_sym_type = 23, + anon_sym_EQ = 24, + anon_sym_def = 25, + anon_sym_token = 26, + anon_sym_query = 27, + anon_sym_procedure = 28, + anon_sym_subscription = 29, + anon_sym_PIPE = 30, + anon_sym_error = 31, + anon_sym_boolean = 32, + anon_sym_integer = 33, + anon_sym_string = 34, + anon_sym_bytes = 35, + anon_sym_blob = 36, + anon_sym_unknown = 37, + anon_sym_constrained = 38, + aux_sym_identifier_token1 = 39, + anon_sym_BQUOTE = 40, + aux_sym_identifier_token2 = 41, + sym_number = 42, + sym_string = 43, + anon_sym_true = 44, + anon_sym_false = 45, + sym_source_file = 46, + sym_item = 47, + sym_self_definition = 48, + sym_annotation = 49, + sym_annotation_selectors = 50, + sym_annotation_args = 51, + sym_annotation_arg = 52, + sym_annotation_value = 53, + sym_null_literal = 54, + sym_annotation_array = 55, + sym_annotation_object = 56, + sym_annotation_object_entry = 57, + sym_use_statement = 58, + sym_import_block = 59, + sym_import_item = 60, + sym_record_definition = 61, + sym_record_body = 62, + sym_field = 63, + sym_inline_type_definition = 64, + sym_def_type_definition = 65, + sym_token_definition = 66, + sym_query_definition = 67, + sym_procedure_definition = 68, + sym_subscription_definition = 69, + sym_parameter_list = 70, + sym_parameter = 71, + sym_return_type = 72, + sym_error_definition = 73, + sym_type = 74, + sym_non_union_type = 75, + sym_primitive_type = 76, + sym_reference_type = 77, + sym_type_path = 78, + sym_array_type = 79, + sym_union_type = 80, + sym_object_type = 81, + sym_constrained_type = 82, + sym_constraint_block = 83, + sym_constraint = 84, + sym_constraint_value = 85, + sym_array_literal = 86, + sym_identifier = 87, + sym_boolean = 88, + aux_sym_source_file_repeat1 = 89, + aux_sym_self_definition_repeat1 = 90, + aux_sym_annotation_selectors_repeat1 = 91, + aux_sym_annotation_args_repeat1 = 92, + aux_sym_annotation_array_repeat1 = 93, + aux_sym_annotation_object_repeat1 = 94, + aux_sym_import_block_repeat1 = 95, + aux_sym_record_body_repeat1 = 96, + aux_sym_parameter_list_repeat1 = 97, + aux_sym_return_type_repeat1 = 98, + aux_sym_type_path_repeat1 = 99, + aux_sym_union_type_repeat1 = 100, + aux_sym_constraint_block_repeat1 = 101, + aux_sym_array_literal_repeat1 = 102, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [anon_sym_self] = "self", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [sym_doc_comment] = "doc_comment", + [sym_comment] = "comment", + [anon_sym_AT] = "@", + [anon_sym_COMMA] = ",", + [anon_sym_COLON] = ":", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_null] = "null", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_use] = "use", + [anon_sym_as] = "as", + [anon_sym_DOT] = ".", + [anon_sym_STAR] = "*", + [anon_sym_SEMI] = ";", + [anon_sym_main] = "main", + [anon_sym_record] = "record", + [anon_sym_BANG] = "!", + [anon_sym_inline] = "inline", + [anon_sym_type] = "type", + [anon_sym_EQ] = "=", + [anon_sym_def] = "def", + [anon_sym_token] = "token", + [anon_sym_query] = "query", + [anon_sym_procedure] = "procedure", + [anon_sym_subscription] = "subscription", + [anon_sym_PIPE] = "|", + [anon_sym_error] = "error", + [anon_sym_boolean] = "boolean", + [anon_sym_integer] = "integer", + [anon_sym_string] = "string", + [anon_sym_bytes] = "bytes", + [anon_sym_blob] = "blob", + [anon_sym_unknown] = "unknown", + [anon_sym_constrained] = "constrained", + [aux_sym_identifier_token1] = "identifier_token1", + [anon_sym_BQUOTE] = "`", + [aux_sym_identifier_token2] = "identifier_token2", + [sym_number] = "number", + [sym_string] = "string", + [anon_sym_true] = "true", + [anon_sym_false] = "false", + [sym_source_file] = "source_file", + [sym_item] = "item", + [sym_self_definition] = "self_definition", + [sym_annotation] = "annotation", + [sym_annotation_selectors] = "annotation_selectors", + [sym_annotation_args] = "annotation_args", + [sym_annotation_arg] = "annotation_arg", + [sym_annotation_value] = "annotation_value", + [sym_null_literal] = "null_literal", + [sym_annotation_array] = "annotation_array", + [sym_annotation_object] = "annotation_object", + [sym_annotation_object_entry] = "annotation_object_entry", + [sym_use_statement] = "use_statement", + [sym_import_block] = "import_block", + [sym_import_item] = "import_item", + [sym_record_definition] = "record_definition", + [sym_record_body] = "record_body", + [sym_field] = "field", + [sym_inline_type_definition] = "inline_type_definition", + [sym_def_type_definition] = "def_type_definition", + [sym_token_definition] = "token_definition", + [sym_query_definition] = "query_definition", + [sym_procedure_definition] = "procedure_definition", + [sym_subscription_definition] = "subscription_definition", + [sym_parameter_list] = "parameter_list", + [sym_parameter] = "parameter", + [sym_return_type] = "return_type", + [sym_error_definition] = "error_definition", + [sym_type] = "type", + [sym_non_union_type] = "non_union_type", + [sym_primitive_type] = "primitive_type", + [sym_reference_type] = "reference_type", + [sym_type_path] = "type_path", + [sym_array_type] = "array_type", + [sym_union_type] = "union_type", + [sym_object_type] = "object_type", + [sym_constrained_type] = "constrained_type", + [sym_constraint_block] = "constraint_block", + [sym_constraint] = "constraint", + [sym_constraint_value] = "constraint_value", + [sym_array_literal] = "array_literal", + [sym_identifier] = "identifier", + [sym_boolean] = "boolean", + [aux_sym_source_file_repeat1] = "source_file_repeat1", + [aux_sym_self_definition_repeat1] = "self_definition_repeat1", + [aux_sym_annotation_selectors_repeat1] = "annotation_selectors_repeat1", + [aux_sym_annotation_args_repeat1] = "annotation_args_repeat1", + [aux_sym_annotation_array_repeat1] = "annotation_array_repeat1", + [aux_sym_annotation_object_repeat1] = "annotation_object_repeat1", + [aux_sym_import_block_repeat1] = "import_block_repeat1", + [aux_sym_record_body_repeat1] = "record_body_repeat1", + [aux_sym_parameter_list_repeat1] = "parameter_list_repeat1", + [aux_sym_return_type_repeat1] = "return_type_repeat1", + [aux_sym_type_path_repeat1] = "type_path_repeat1", + [aux_sym_union_type_repeat1] = "union_type_repeat1", + [aux_sym_constraint_block_repeat1] = "constraint_block_repeat1", + [aux_sym_array_literal_repeat1] = "array_literal_repeat1", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [anon_sym_self] = anon_sym_self, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [sym_doc_comment] = sym_doc_comment, + [sym_comment] = sym_comment, + [anon_sym_AT] = anon_sym_AT, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_null] = anon_sym_null, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_use] = anon_sym_use, + [anon_sym_as] = anon_sym_as, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_SEMI] = anon_sym_SEMI, + [anon_sym_main] = anon_sym_main, + [anon_sym_record] = anon_sym_record, + [anon_sym_BANG] = anon_sym_BANG, + [anon_sym_inline] = anon_sym_inline, + [anon_sym_type] = anon_sym_type, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_def] = anon_sym_def, + [anon_sym_token] = anon_sym_token, + [anon_sym_query] = anon_sym_query, + [anon_sym_procedure] = anon_sym_procedure, + [anon_sym_subscription] = anon_sym_subscription, + [anon_sym_PIPE] = anon_sym_PIPE, + [anon_sym_error] = anon_sym_error, + [anon_sym_boolean] = anon_sym_boolean, + [anon_sym_integer] = anon_sym_integer, + [anon_sym_string] = anon_sym_string, + [anon_sym_bytes] = anon_sym_bytes, + [anon_sym_blob] = anon_sym_blob, + [anon_sym_unknown] = anon_sym_unknown, + [anon_sym_constrained] = anon_sym_constrained, + [aux_sym_identifier_token1] = aux_sym_identifier_token1, + [anon_sym_BQUOTE] = anon_sym_BQUOTE, + [aux_sym_identifier_token2] = aux_sym_identifier_token2, + [sym_number] = sym_number, + [sym_string] = sym_string, + [anon_sym_true] = anon_sym_true, + [anon_sym_false] = anon_sym_false, + [sym_source_file] = sym_source_file, + [sym_item] = sym_item, + [sym_self_definition] = sym_self_definition, + [sym_annotation] = sym_annotation, + [sym_annotation_selectors] = sym_annotation_selectors, + [sym_annotation_args] = sym_annotation_args, + [sym_annotation_arg] = sym_annotation_arg, + [sym_annotation_value] = sym_annotation_value, + [sym_null_literal] = sym_null_literal, + [sym_annotation_array] = sym_annotation_array, + [sym_annotation_object] = sym_annotation_object, + [sym_annotation_object_entry] = sym_annotation_object_entry, + [sym_use_statement] = sym_use_statement, + [sym_import_block] = sym_import_block, + [sym_import_item] = sym_import_item, + [sym_record_definition] = sym_record_definition, + [sym_record_body] = sym_record_body, + [sym_field] = sym_field, + [sym_inline_type_definition] = sym_inline_type_definition, + [sym_def_type_definition] = sym_def_type_definition, + [sym_token_definition] = sym_token_definition, + [sym_query_definition] = sym_query_definition, + [sym_procedure_definition] = sym_procedure_definition, + [sym_subscription_definition] = sym_subscription_definition, + [sym_parameter_list] = sym_parameter_list, + [sym_parameter] = sym_parameter, + [sym_return_type] = sym_return_type, + [sym_error_definition] = sym_error_definition, + [sym_type] = sym_type, + [sym_non_union_type] = sym_non_union_type, + [sym_primitive_type] = sym_primitive_type, + [sym_reference_type] = sym_reference_type, + [sym_type_path] = sym_type_path, + [sym_array_type] = sym_array_type, + [sym_union_type] = sym_union_type, + [sym_object_type] = sym_object_type, + [sym_constrained_type] = sym_constrained_type, + [sym_constraint_block] = sym_constraint_block, + [sym_constraint] = sym_constraint, + [sym_constraint_value] = sym_constraint_value, + [sym_array_literal] = sym_array_literal, + [sym_identifier] = sym_identifier, + [sym_boolean] = sym_boolean, + [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, + [aux_sym_self_definition_repeat1] = aux_sym_self_definition_repeat1, + [aux_sym_annotation_selectors_repeat1] = aux_sym_annotation_selectors_repeat1, + [aux_sym_annotation_args_repeat1] = aux_sym_annotation_args_repeat1, + [aux_sym_annotation_array_repeat1] = aux_sym_annotation_array_repeat1, + [aux_sym_annotation_object_repeat1] = aux_sym_annotation_object_repeat1, + [aux_sym_import_block_repeat1] = aux_sym_import_block_repeat1, + [aux_sym_record_body_repeat1] = aux_sym_record_body_repeat1, + [aux_sym_parameter_list_repeat1] = aux_sym_parameter_list_repeat1, + [aux_sym_return_type_repeat1] = aux_sym_return_type_repeat1, + [aux_sym_type_path_repeat1] = aux_sym_type_path_repeat1, + [aux_sym_union_type_repeat1] = aux_sym_union_type_repeat1, + [aux_sym_constraint_block_repeat1] = aux_sym_constraint_block_repeat1, + [aux_sym_array_literal_repeat1] = aux_sym_array_literal_repeat1, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [anon_sym_self] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [sym_doc_comment] = { + .visible = true, + .named = true, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [anon_sym_AT] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_null] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_use] = { + .visible = true, + .named = false, + }, + [anon_sym_as] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_SEMI] = { + .visible = true, + .named = false, + }, + [anon_sym_main] = { + .visible = true, + .named = false, + }, + [anon_sym_record] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG] = { + .visible = true, + .named = false, + }, + [anon_sym_inline] = { + .visible = true, + .named = false, + }, + [anon_sym_type] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_def] = { + .visible = true, + .named = false, + }, + [anon_sym_token] = { + .visible = true, + .named = false, + }, + [anon_sym_query] = { + .visible = true, + .named = false, + }, + [anon_sym_procedure] = { + .visible = true, + .named = false, + }, + [anon_sym_subscription] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_error] = { + .visible = true, + .named = false, + }, + [anon_sym_boolean] = { + .visible = true, + .named = false, + }, + [anon_sym_integer] = { + .visible = true, + .named = false, + }, + [anon_sym_string] = { + .visible = true, + .named = false, + }, + [anon_sym_bytes] = { + .visible = true, + .named = false, + }, + [anon_sym_blob] = { + .visible = true, + .named = false, + }, + [anon_sym_unknown] = { + .visible = true, + .named = false, + }, + [anon_sym_constrained] = { + .visible = true, + .named = false, + }, + [aux_sym_identifier_token1] = { + .visible = false, + .named = false, + }, + [anon_sym_BQUOTE] = { + .visible = true, + .named = false, + }, + [aux_sym_identifier_token2] = { + .visible = false, + .named = false, + }, + [sym_number] = { + .visible = true, + .named = true, + }, + [sym_string] = { + .visible = true, + .named = true, + }, + [anon_sym_true] = { + .visible = true, + .named = false, + }, + [anon_sym_false] = { + .visible = true, + .named = false, + }, + [sym_source_file] = { + .visible = true, + .named = true, + }, + [sym_item] = { + .visible = true, + .named = true, + }, + [sym_self_definition] = { + .visible = true, + .named = true, + }, + [sym_annotation] = { + .visible = true, + .named = true, + }, + [sym_annotation_selectors] = { + .visible = true, + .named = true, + }, + [sym_annotation_args] = { + .visible = true, + .named = true, + }, + [sym_annotation_arg] = { + .visible = true, + .named = true, + }, + [sym_annotation_value] = { + .visible = true, + .named = true, + }, + [sym_null_literal] = { + .visible = true, + .named = true, + }, + [sym_annotation_array] = { + .visible = true, + .named = true, + }, + [sym_annotation_object] = { + .visible = true, + .named = true, + }, + [sym_annotation_object_entry] = { + .visible = true, + .named = true, + }, + [sym_use_statement] = { + .visible = true, + .named = true, + }, + [sym_import_block] = { + .visible = true, + .named = true, + }, + [sym_import_item] = { + .visible = true, + .named = true, + }, + [sym_record_definition] = { + .visible = true, + .named = true, + }, + [sym_record_body] = { + .visible = true, + .named = true, + }, + [sym_field] = { + .visible = true, + .named = true, + }, + [sym_inline_type_definition] = { + .visible = true, + .named = true, + }, + [sym_def_type_definition] = { + .visible = true, + .named = true, + }, + [sym_token_definition] = { + .visible = true, + .named = true, + }, + [sym_query_definition] = { + .visible = true, + .named = true, + }, + [sym_procedure_definition] = { + .visible = true, + .named = true, + }, + [sym_subscription_definition] = { + .visible = true, + .named = true, + }, + [sym_parameter_list] = { + .visible = true, + .named = true, + }, + [sym_parameter] = { + .visible = true, + .named = true, + }, + [sym_return_type] = { + .visible = true, + .named = true, + }, + [sym_error_definition] = { + .visible = true, + .named = true, + }, + [sym_type] = { + .visible = true, + .named = true, + }, + [sym_non_union_type] = { + .visible = true, + .named = true, + }, + [sym_primitive_type] = { + .visible = true, + .named = true, + }, + [sym_reference_type] = { + .visible = true, + .named = true, + }, + [sym_type_path] = { + .visible = true, + .named = true, + }, + [sym_array_type] = { + .visible = true, + .named = true, + }, + [sym_union_type] = { + .visible = true, + .named = true, + }, + [sym_object_type] = { + .visible = true, + .named = true, + }, + [sym_constrained_type] = { + .visible = true, + .named = true, + }, + [sym_constraint_block] = { + .visible = true, + .named = true, + }, + [sym_constraint] = { + .visible = true, + .named = true, + }, + [sym_constraint_value] = { + .visible = true, + .named = true, + }, + [sym_array_literal] = { + .visible = true, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [sym_boolean] = { + .visible = true, + .named = true, + }, + [aux_sym_source_file_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_self_definition_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_annotation_selectors_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_annotation_args_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_annotation_array_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_annotation_object_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_import_block_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_record_body_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_parameter_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_return_type_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_type_path_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_union_type_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_constraint_block_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_array_literal_repeat1] = { + .visible = false, + .named = false, + }, +}; + +enum ts_field_identifiers { + field_alias = 1, + field_args = 2, + field_base = 3, + field_body = 4, + field_constraints = 5, + field_element = 6, + field_imports = 7, + field_key = 8, + field_messages = 9, + field_name = 10, + field_params = 11, + field_path = 12, + field_return = 13, + field_selectors = 14, + field_type = 15, + field_value = 16, +}; + +static const char * const ts_field_names[] = { + [0] = NULL, + [field_alias] = "alias", + [field_args] = "args", + [field_base] = "base", + [field_body] = "body", + [field_constraints] = "constraints", + [field_element] = "element", + [field_imports] = "imports", + [field_key] = "key", + [field_messages] = "messages", + [field_name] = "name", + [field_params] = "params", + [field_path] = "path", + [field_return] = "return", + [field_selectors] = "selectors", + [field_type] = "type", + [field_value] = "value", +}; + +static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { + [1] = {.index = 0, .length = 1}, + [2] = {.index = 1, .length = 2}, + [3] = {.index = 3, .length = 2}, + [4] = {.index = 5, .length = 1}, + [5] = {.index = 6, .length = 2}, + [6] = {.index = 8, .length = 3}, + [7] = {.index = 11, .length = 1}, + [8] = {.index = 12, .length = 2}, + [9] = {.index = 14, .length = 1}, + [10] = {.index = 15, .length = 2}, + [11] = {.index = 17, .length = 1}, + [12] = {.index = 18, .length = 2}, + [13] = {.index = 20, .length = 2}, + [14] = {.index = 22, .length = 2}, + [15] = {.index = 24, .length = 2}, + [16] = {.index = 26, .length = 3}, + [17] = {.index = 29, .length = 3}, + [18] = {.index = 32, .length = 2}, + [19] = {.index = 34, .length = 2}, + [20] = {.index = 36, .length = 1}, + [21] = {.index = 37, .length = 2}, + [22] = {.index = 39, .length = 2}, + [23] = {.index = 41, .length = 2}, + [24] = {.index = 43, .length = 2}, + [25] = {.index = 45, .length = 3}, + [26] = {.index = 48, .length = 3}, + [27] = {.index = 51, .length = 2}, + [28] = {.index = 53, .length = 2}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_name, 1}, + [1] = + {field_name, 2}, + {field_selectors, 1}, + [3] = + {field_args, 2}, + {field_name, 1}, + [5] = + {field_path, 1}, + [6] = + {field_body, 2}, + {field_name, 1}, + [8] = + {field_args, 3}, + {field_name, 2}, + {field_selectors, 1}, + [11] = + {field_value, 0}, + [12] = + {field_body, 3}, + {field_name, 2}, + [14] = + {field_name, 2}, + [15] = + {field_alias, 3}, + {field_path, 1}, + [17] = + {field_name, 0}, + [18] = + {field_imports, 3}, + {field_path, 1}, + [20] = + {field_name, 0}, + {field_value, 2}, + [22] = + {field_name, 2}, + {field_type, 4}, + [24] = + {field_name, 0}, + {field_type, 2}, + [26] = + {field_name, 1}, + {field_params, 2}, + {field_return, 4}, + [29] = + {field_messages, 4}, + {field_name, 1}, + {field_params, 2}, + [32] = + {field_key, 0}, + {field_value, 2}, + [34] = + {field_alias, 2}, + {field_name, 0}, + [36] = + {field_element, 1}, + [37] = + {field_base, 0}, + {field_constraints, 2}, + [39] = + {field_name, 0}, + {field_type, 3}, + [41] = + {field_name, 1}, + {field_type, 3}, + [43] = + {field_name, 3}, + {field_type, 5}, + [45] = + {field_name, 2}, + {field_params, 3}, + {field_return, 5}, + [48] = + {field_messages, 5}, + {field_name, 2}, + {field_params, 3}, + [51] = + {field_name, 1}, + {field_type, 4}, + [53] = + {field_name, 2}, + {field_type, 5}, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + 0, +}; + +static const TSStateId ts_primary_state_ids[STATE_COUNT] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 4, + [5] = 5, + [6] = 6, + [7] = 7, + [8] = 8, + [9] = 9, + [10] = 10, + [11] = 11, + [12] = 12, + [13] = 13, + [14] = 14, + [15] = 15, + [16] = 16, + [17] = 17, + [18] = 18, + [19] = 19, + [20] = 20, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 26, + [27] = 27, + [28] = 28, + [29] = 29, + [30] = 29, + [31] = 31, + [32] = 28, + [33] = 31, + [34] = 34, + [35] = 35, + [36] = 36, + [37] = 37, + [38] = 38, + [39] = 39, + [40] = 40, + [41] = 41, + [42] = 42, + [43] = 43, + [44] = 44, + [45] = 45, + [46] = 46, + [47] = 47, + [48] = 48, + [49] = 49, + [50] = 50, + [51] = 51, + [52] = 52, + [53] = 53, + [54] = 54, + [55] = 55, + [56] = 56, + [57] = 57, + [58] = 58, + [59] = 59, + [60] = 60, + [61] = 61, + [62] = 62, + [63] = 63, + [64] = 64, + [65] = 65, + [66] = 66, + [67] = 67, + [68] = 68, + [69] = 69, + [70] = 70, + [71] = 71, + [72] = 72, + [73] = 73, + [74] = 74, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 80, + [81] = 81, + [82] = 82, + [83] = 83, + [84] = 84, + [85] = 85, + [86] = 86, + [87] = 87, + [88] = 88, + [89] = 89, + [90] = 90, + [91] = 41, + [92] = 92, + [93] = 93, + [94] = 94, + [95] = 95, + [96] = 96, + [97] = 97, + [98] = 98, + [99] = 99, + [100] = 100, + [101] = 101, + [102] = 102, + [103] = 103, + [104] = 104, + [105] = 105, + [106] = 106, + [107] = 107, + [108] = 108, + [109] = 109, + [110] = 110, + [111] = 111, + [112] = 112, + [113] = 113, + [114] = 114, + [115] = 115, + [116] = 116, + [117] = 117, + [118] = 4, + [119] = 119, + [120] = 5, + [121] = 121, + [122] = 122, + [123] = 123, + [124] = 56, + [125] = 64, + [126] = 126, + [127] = 127, + [128] = 128, + [129] = 83, + [130] = 130, + [131] = 131, + [132] = 132, + [133] = 133, + [134] = 134, + [135] = 135, + [136] = 136, + [137] = 137, + [138] = 138, + [139] = 139, + [140] = 79, + [141] = 141, + [142] = 142, + [143] = 143, + [144] = 144, + [145] = 93, + [146] = 132, + [147] = 147, + [148] = 148, + [149] = 149, + [150] = 75, + [151] = 151, + [152] = 152, + [153] = 153, + [154] = 154, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 158, + [159] = 159, + [160] = 160, + [161] = 161, + [162] = 162, + [163] = 163, + [164] = 164, + [165] = 165, + [166] = 166, + [167] = 167, + [168] = 168, + [169] = 169, + [170] = 170, + [171] = 171, + [172] = 172, + [173] = 173, + [174] = 174, + [175] = 175, + [176] = 176, + [177] = 177, + [178] = 178, + [179] = 179, + [180] = 180, + [181] = 181, + [182] = 182, + [183] = 151, + [184] = 184, + [185] = 185, + [186] = 186, + [187] = 187, + [188] = 188, + [189] = 189, + [190] = 190, + [191] = 191, + [192] = 192, + [193] = 193, + [194] = 194, + [195] = 195, + [196] = 196, + [197] = 187, + [198] = 198, + [199] = 199, + [200] = 85, + [201] = 201, + [202] = 84, + [203] = 72, + [204] = 69, + [205] = 112, + [206] = 70, + [207] = 162, + [208] = 208, + [209] = 209, + [210] = 210, + [211] = 211, + [212] = 212, + [213] = 213, + [214] = 214, + [215] = 215, + [216] = 216, + [217] = 217, + [218] = 218, + [219] = 219, + [220] = 220, + [221] = 221, + [222] = 222, + [223] = 223, + [224] = 224, + [225] = 225, + [226] = 226, + [227] = 227, + [228] = 228, + [229] = 229, + [230] = 230, + [231] = 231, + [232] = 232, + [233] = 233, + [234] = 234, + [235] = 235, + [236] = 236, + [237] = 237, + [238] = 238, + [239] = 239, + [240] = 240, + [241] = 241, + [242] = 242, + [243] = 243, + [244] = 244, + [245] = 245, + [246] = 246, + [247] = 247, + [248] = 248, + [249] = 249, + [250] = 250, + [251] = 251, + [252] = 252, + [253] = 253, + [254] = 254, + [255] = 255, + [256] = 256, + [257] = 257, + [258] = 258, + [259] = 259, + [260] = 260, + [261] = 261, + [262] = 262, + [263] = 263, + [264] = 264, + [265] = 265, + [266] = 266, + [267] = 267, + [268] = 268, + [269] = 269, + [270] = 270, + [271] = 271, + [272] = 272, + [273] = 273, + [274] = 274, + [275] = 275, + [276] = 276, + [277] = 277, + [278] = 278, + [279] = 279, + [280] = 280, + [281] = 281, + [282] = 282, + [283] = 283, + [284] = 284, + [285] = 285, + [286] = 286, + [287] = 287, + [288] = 288, + [289] = 289, + [290] = 290, + [291] = 291, + [292] = 292, + [293] = 293, + [294] = 294, + [295] = 295, + [296] = 296, + [297] = 297, + [298] = 298, + [299] = 299, + [300] = 300, + [301] = 301, + [302] = 302, + [303] = 303, + [304] = 304, + [305] = 305, + [306] = 255, + [307] = 307, + [308] = 308, + [309] = 309, + [310] = 310, + [311] = 311, + [312] = 258, + [313] = 313, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(107); + ADVANCE_MAP( + '!', 134, + '"', 3, + '(', 120, + ')', 121, + '*', 129, + ',', 118, + '-', 104, + '.', 128, + '/', 6, + ':', 119, + ';', 130, + '=', 137, + '@', 117, + '[', 124, + ']', 125, + '`', 200, + 'a', 90, + 'b', 50, + 'c', 70, + 'd', 20, + 'e', 87, + 'f', 8, + 'i', 56, + 'm', 9, + 'n', 98, + 'p', 84, + 'q', 99, + 'r', 21, + 's', 31, + 't', 68, + 'u', 63, + '{', 109, + '|', 143, + '}', 110, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(204); + END_STATE(); + case 1: + ADVANCE_MAP( + '!', 134, + '/', 6, + '[', 124, + '`', 200, + 'b', 173, + 'i', 183, + 'n', 196, + 's', 193, + 'u', 178, + '{', 109, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(1); + if (('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 2: + ADVANCE_MAP( + '"', 3, + ')', 121, + '-', 104, + '/', 6, + '[', 124, + ']', 125, + '`', 200, + 'f', 158, + 'n', 196, + 't', 190, + '{', 109, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(2); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(204); + if (('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 3: + if (lookahead == '"') ADVANCE(206); + if (lookahead == '\\') ADVANCE(106); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(3); + END_STATE(); + case 4: + ADVANCE_MAP( + '(', 120, + ')', 121, + ',', 118, + '/', 6, + ':', 119, + '@', 117, + '`', 200, + '}', 110, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(4); + if (('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 5: + if (lookahead == '/') ADVANCE(6); + if (lookahead == '`') ADVANCE(200); + if (lookahead == 'm') ADVANCE(160); + if (lookahead == '}') ADVANCE(110); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(5); + if (('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 6: + if (lookahead == '/') ADVANCE(115); + END_STATE(); + case 7: + if (lookahead == '/') ADVANCE(202); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(201); + if (lookahead != 0 && + lookahead != '`') ADVANCE(203); + END_STATE(); + case 8: + if (lookahead == 'a') ADVANCE(52); + END_STATE(); + case 9: + if (lookahead == 'a') ADVANCE(42); + END_STATE(); + case 10: + if (lookahead == 'a') ADVANCE(59); + END_STATE(); + case 11: + if (lookahead == 'a') ADVANCE(46); + END_STATE(); + case 12: + if (lookahead == 'b') ADVANCE(153); + END_STATE(); + case 13: + if (lookahead == 'b') ADVANCE(93); + END_STATE(); + case 14: + if (lookahead == 'c') ADVANCE(82); + END_STATE(); + case 15: + if (lookahead == 'c') ADVANCE(27); + END_STATE(); + case 16: + if (lookahead == 'c') ADVANCE(75); + END_STATE(); + case 17: + if (lookahead == 'd') ADVANCE(133); + END_STATE(); + case 18: + if (lookahead == 'd') ADVANCE(157); + END_STATE(); + case 19: + if (lookahead == 'd') ADVANCE(101); + END_STATE(); + case 20: + if (lookahead == 'e') ADVANCE(37); + END_STATE(); + case 21: + if (lookahead == 'e') ADVANCE(16); + END_STATE(); + case 22: + if (lookahead == 'e') ADVANCE(126); + END_STATE(); + case 23: + if (lookahead == 'e') ADVANCE(40); + END_STATE(); + case 24: + if (lookahead == 'e') ADVANCE(207); + END_STATE(); + case 25: + if (lookahead == 'e') ADVANCE(136); + END_STATE(); + case 26: + if (lookahead == 'e') ADVANCE(209); + END_STATE(); + case 27: + if (lookahead == 'e') ADVANCE(19); + END_STATE(); + case 28: + if (lookahead == 'e') ADVANCE(135); + END_STATE(); + case 29: + if (lookahead == 'e') ADVANCE(141); + END_STATE(); + case 30: + if (lookahead == 'e') ADVANCE(10); + END_STATE(); + case 31: + if (lookahead == 'e') ADVANCE(51); + if (lookahead == 't') ADVANCE(89); + if (lookahead == 'u') ADVANCE(13); + END_STATE(); + case 32: + if (lookahead == 'e') ADVANCE(18); + END_STATE(); + case 33: + if (lookahead == 'e') ADVANCE(79); + END_STATE(); + case 34: + if (lookahead == 'e') ADVANCE(91); + END_STATE(); + case 35: + if (lookahead == 'e') ADVANCE(58); + END_STATE(); + case 36: + if (lookahead == 'e') ADVANCE(81); + END_STATE(); + case 37: + if (lookahead == 'f') ADVANCE(138); + END_STATE(); + case 38: + if (lookahead == 'f') ADVANCE(108); + END_STATE(); + case 39: + if (lookahead == 'g') ADVANCE(149); + END_STATE(); + case 40: + if (lookahead == 'g') ADVANCE(36); + END_STATE(); + case 41: + if (lookahead == 'i') ADVANCE(77); + END_STATE(); + case 42: + if (lookahead == 'i') ADVANCE(57); + END_STATE(); + case 43: + if (lookahead == 'i') ADVANCE(66); + END_STATE(); + case 44: + if (lookahead == 'i') ADVANCE(64); + END_STATE(); + case 45: + if (lookahead == 'i') ADVANCE(76); + END_STATE(); + case 46: + if (lookahead == 'i') ADVANCE(67); + END_STATE(); + case 47: + if (lookahead == 'k') ADVANCE(65); + END_STATE(); + case 48: + if (lookahead == 'k') ADVANCE(35); + END_STATE(); + case 49: + if (lookahead == 'l') ADVANCE(122); + END_STATE(); + case 50: + if (lookahead == 'l') ADVANCE(72); + if (lookahead == 'o') ADVANCE(73); + if (lookahead == 'y') ADVANCE(96); + END_STATE(); + case 51: + if (lookahead == 'l') ADVANCE(38); + END_STATE(); + case 52: + if (lookahead == 'l') ADVANCE(94); + END_STATE(); + case 53: + if (lookahead == 'l') ADVANCE(49); + END_STATE(); + case 54: + if (lookahead == 'l') ADVANCE(30); + END_STATE(); + case 55: + if (lookahead == 'l') ADVANCE(43); + if (lookahead == 't') ADVANCE(23); + END_STATE(); + case 56: + if (lookahead == 'n') ADVANCE(55); + END_STATE(); + case 57: + if (lookahead == 'n') ADVANCE(131); + END_STATE(); + case 58: + if (lookahead == 'n') ADVANCE(139); + END_STATE(); + case 59: + if (lookahead == 'n') ADVANCE(145); + END_STATE(); + case 60: + if (lookahead == 'n') ADVANCE(155); + END_STATE(); + case 61: + if (lookahead == 'n') ADVANCE(142); + END_STATE(); + case 62: + if (lookahead == 'n') ADVANCE(92); + END_STATE(); + case 63: + if (lookahead == 'n') ADVANCE(47); + if (lookahead == 's') ADVANCE(22); + END_STATE(); + case 64: + if (lookahead == 'n') ADVANCE(39); + END_STATE(); + case 65: + if (lookahead == 'n') ADVANCE(69); + END_STATE(); + case 66: + if (lookahead == 'n') ADVANCE(28); + END_STATE(); + case 67: + if (lookahead == 'n') ADVANCE(32); + END_STATE(); + case 68: + if (lookahead == 'o') ADVANCE(48); + if (lookahead == 'r') ADVANCE(100); + if (lookahead == 'y') ADVANCE(78); + END_STATE(); + case 69: + if (lookahead == 'o') ADVANCE(102); + END_STATE(); + case 70: + if (lookahead == 'o') ADVANCE(62); + END_STATE(); + case 71: + if (lookahead == 'o') ADVANCE(15); + END_STATE(); + case 72: + if (lookahead == 'o') ADVANCE(12); + END_STATE(); + case 73: + if (lookahead == 'o') ADVANCE(54); + END_STATE(); + case 74: + if (lookahead == 'o') ADVANCE(80); + END_STATE(); + case 75: + if (lookahead == 'o') ADVANCE(83); + END_STATE(); + case 76: + if (lookahead == 'o') ADVANCE(61); + END_STATE(); + case 77: + if (lookahead == 'p') ADVANCE(95); + END_STATE(); + case 78: + if (lookahead == 'p') ADVANCE(25); + END_STATE(); + case 79: + if (lookahead == 'r') ADVANCE(103); + END_STATE(); + case 80: + if (lookahead == 'r') ADVANCE(144); + END_STATE(); + case 81: + if (lookahead == 'r') ADVANCE(147); + END_STATE(); + case 82: + if (lookahead == 'r') ADVANCE(41); + END_STATE(); + case 83: + if (lookahead == 'r') ADVANCE(17); + END_STATE(); + case 84: + if (lookahead == 'r') ADVANCE(71); + END_STATE(); + case 85: + if (lookahead == 'r') ADVANCE(74); + END_STATE(); + case 86: + if (lookahead == 'r') ADVANCE(29); + END_STATE(); + case 87: + if (lookahead == 'r') ADVANCE(85); + END_STATE(); + case 88: + if (lookahead == 'r') ADVANCE(11); + END_STATE(); + case 89: + if (lookahead == 'r') ADVANCE(44); + END_STATE(); + case 90: + if (lookahead == 's') ADVANCE(127); + END_STATE(); + case 91: + if (lookahead == 's') ADVANCE(151); + END_STATE(); + case 92: + if (lookahead == 's') ADVANCE(97); + END_STATE(); + case 93: + if (lookahead == 's') ADVANCE(14); + END_STATE(); + case 94: + if (lookahead == 's') ADVANCE(26); + END_STATE(); + case 95: + if (lookahead == 't') ADVANCE(45); + END_STATE(); + case 96: + if (lookahead == 't') ADVANCE(34); + END_STATE(); + case 97: + if (lookahead == 't') ADVANCE(88); + END_STATE(); + case 98: + if (lookahead == 'u') ADVANCE(53); + END_STATE(); + case 99: + if (lookahead == 'u') ADVANCE(33); + END_STATE(); + case 100: + if (lookahead == 'u') ADVANCE(24); + END_STATE(); + case 101: + if (lookahead == 'u') ADVANCE(86); + END_STATE(); + case 102: + if (lookahead == 'w') ADVANCE(60); + END_STATE(); + case 103: + if (lookahead == 'y') ADVANCE(140); + END_STATE(); + case 104: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(204); + END_STATE(); + case 105: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(205); + END_STATE(); + case 106: + if (lookahead != 0 && + lookahead != '\n') ADVANCE(3); + END_STATE(); + case 107: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 108: + ACCEPT_TOKEN(anon_sym_self); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 110: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 111: + ACCEPT_TOKEN(sym_doc_comment); + if (lookahead == '\n') ADVANCE(203); + if (lookahead == '`') ADVANCE(112); + if (lookahead != 0) ADVANCE(111); + END_STATE(); + case 112: + ACCEPT_TOKEN(sym_doc_comment); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(112); + END_STATE(); + case 113: + ACCEPT_TOKEN(sym_comment); + if (lookahead == '\n') ADVANCE(203); + if (lookahead == '/') ADVANCE(111); + if (lookahead == '`') ADVANCE(116); + if (lookahead != 0) ADVANCE(114); + END_STATE(); + case 114: + ACCEPT_TOKEN(sym_comment); + if (lookahead == '\n') ADVANCE(203); + if (lookahead == '`') ADVANCE(116); + if (lookahead != 0) ADVANCE(114); + END_STATE(); + case 115: + ACCEPT_TOKEN(sym_comment); + if (lookahead == '/') ADVANCE(112); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(116); + END_STATE(); + case 116: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(116); + END_STATE(); + case 117: + ACCEPT_TOKEN(anon_sym_AT); + END_STATE(); + case 118: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 120: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 121: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 122: + ACCEPT_TOKEN(anon_sym_null); + END_STATE(); + case 123: + ACCEPT_TOKEN(anon_sym_null); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 124: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 125: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 126: + ACCEPT_TOKEN(anon_sym_use); + END_STATE(); + case 127: + ACCEPT_TOKEN(anon_sym_as); + END_STATE(); + case 128: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 129: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 130: + ACCEPT_TOKEN(anon_sym_SEMI); + END_STATE(); + case 131: + ACCEPT_TOKEN(anon_sym_main); + END_STATE(); + case 132: + ACCEPT_TOKEN(anon_sym_main); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 133: + ACCEPT_TOKEN(anon_sym_record); + END_STATE(); + case 134: + ACCEPT_TOKEN(anon_sym_BANG); + END_STATE(); + case 135: + ACCEPT_TOKEN(anon_sym_inline); + END_STATE(); + case 136: + ACCEPT_TOKEN(anon_sym_type); + END_STATE(); + case 137: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 138: + ACCEPT_TOKEN(anon_sym_def); + END_STATE(); + case 139: + ACCEPT_TOKEN(anon_sym_token); + END_STATE(); + case 140: + ACCEPT_TOKEN(anon_sym_query); + END_STATE(); + case 141: + ACCEPT_TOKEN(anon_sym_procedure); + END_STATE(); + case 142: + ACCEPT_TOKEN(anon_sym_subscription); + END_STATE(); + case 143: + ACCEPT_TOKEN(anon_sym_PIPE); + END_STATE(); + case 144: + ACCEPT_TOKEN(anon_sym_error); + END_STATE(); + case 145: + ACCEPT_TOKEN(anon_sym_boolean); + END_STATE(); + case 146: + ACCEPT_TOKEN(anon_sym_boolean); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 147: + ACCEPT_TOKEN(anon_sym_integer); + END_STATE(); + case 148: + ACCEPT_TOKEN(anon_sym_integer); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 149: + ACCEPT_TOKEN(anon_sym_string); + END_STATE(); + case 150: + ACCEPT_TOKEN(anon_sym_string); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 151: + ACCEPT_TOKEN(anon_sym_bytes); + END_STATE(); + case 152: + ACCEPT_TOKEN(anon_sym_bytes); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 153: + ACCEPT_TOKEN(anon_sym_blob); + END_STATE(); + case 154: + ACCEPT_TOKEN(anon_sym_blob); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 155: + ACCEPT_TOKEN(anon_sym_unknown); + END_STATE(); + case 156: + ACCEPT_TOKEN(anon_sym_unknown); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 157: + ACCEPT_TOKEN(anon_sym_constrained); + END_STATE(); + case 158: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'a') ADVANCE(175); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 159: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'a') ADVANCE(179); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 160: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'a') ADVANCE(171); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 161: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'b') ADVANCE(154); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 162: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'e') ADVANCE(191); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 163: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'e') ADVANCE(169); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 164: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'e') ADVANCE(159); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 165: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'e') ADVANCE(208); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 166: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'e') ADVANCE(210); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 167: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'e') ADVANCE(189); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 168: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'g') ADVANCE(150); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 169: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'g') ADVANCE(167); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 170: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'i') ADVANCE(182); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 171: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'i') ADVANCE(181); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 172: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'k') ADVANCE(184); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 173: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'l') ADVANCE(185); + if (lookahead == 'o') ADVANCE(187); + if (lookahead == 'y') ADVANCE(194); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 174: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'l') ADVANCE(123); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 175: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'l') ADVANCE(192); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 176: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'l') ADVANCE(174); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 177: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'l') ADVANCE(164); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 178: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'n') ADVANCE(172); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 179: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'n') ADVANCE(146); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 180: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'n') ADVANCE(156); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 181: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'n') ADVANCE(132); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 182: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'n') ADVANCE(168); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 183: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'n') ADVANCE(195); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 184: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'n') ADVANCE(186); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 185: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'o') ADVANCE(161); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 186: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'o') ADVANCE(198); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 187: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'o') ADVANCE(177); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 188: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'r') ADVANCE(170); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 189: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'r') ADVANCE(148); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 190: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'r') ADVANCE(197); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 191: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 's') ADVANCE(152); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 192: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 's') ADVANCE(166); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 193: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 't') ADVANCE(188); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 194: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 't') ADVANCE(162); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 195: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 't') ADVANCE(163); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 196: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'u') ADVANCE(176); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 197: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'u') ADVANCE(165); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 198: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (lookahead == 'w') ADVANCE(180); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 199: + ACCEPT_TOKEN(aux_sym_identifier_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 200: + ACCEPT_TOKEN(anon_sym_BQUOTE); + END_STATE(); + case 201: + ACCEPT_TOKEN(aux_sym_identifier_token2); + if (lookahead == '/') ADVANCE(202); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(201); + if (lookahead != 0 && + lookahead != '`') ADVANCE(203); + END_STATE(); + case 202: + ACCEPT_TOKEN(aux_sym_identifier_token2); + if (lookahead == '/') ADVANCE(113); + if (lookahead != 0 && + lookahead != '`') ADVANCE(203); + END_STATE(); + case 203: + ACCEPT_TOKEN(aux_sym_identifier_token2); + if (lookahead != 0 && + lookahead != '`') ADVANCE(203); + END_STATE(); + case 204: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(105); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(204); + END_STATE(); + case 205: + ACCEPT_TOKEN(sym_number); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(205); + END_STATE(); + case 206: + ACCEPT_TOKEN(sym_string); + END_STATE(); + case 207: + ACCEPT_TOKEN(anon_sym_true); + END_STATE(); + case 208: + ACCEPT_TOKEN(anon_sym_true); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + case 209: + ACCEPT_TOKEN(anon_sym_false); + END_STATE(); + case 210: + ACCEPT_TOKEN(anon_sym_false); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(199); + END_STATE(); + default: + return false; + } +} + +static const TSLexerMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 0}, + [2] = {.lex_state = 0}, + [3] = {.lex_state = 0}, + [4] = {.lex_state = 0}, + [5] = {.lex_state = 0}, + [6] = {.lex_state = 1}, + [7] = {.lex_state = 1}, + [8] = {.lex_state = 1}, + [9] = {.lex_state = 1}, + [10] = {.lex_state = 1}, + [11] = {.lex_state = 1}, + [12] = {.lex_state = 1}, + [13] = {.lex_state = 1}, + [14] = {.lex_state = 1}, + [15] = {.lex_state = 1}, + [16] = {.lex_state = 1}, + [17] = {.lex_state = 1}, + [18] = {.lex_state = 1}, + [19] = {.lex_state = 1}, + [20] = {.lex_state = 1}, + [21] = {.lex_state = 1}, + [22] = {.lex_state = 1}, + [23] = {.lex_state = 1}, + [24] = {.lex_state = 1}, + [25] = {.lex_state = 1}, + [26] = {.lex_state = 1}, + [27] = {.lex_state = 1}, + [28] = {.lex_state = 2}, + [29] = {.lex_state = 2}, + [30] = {.lex_state = 2}, + [31] = {.lex_state = 2}, + [32] = {.lex_state = 2}, + [33] = {.lex_state = 2}, + [34] = {.lex_state = 2}, + [35] = {.lex_state = 2}, + [36] = {.lex_state = 2}, + [37] = {.lex_state = 2}, + [38] = {.lex_state = 2}, + [39] = {.lex_state = 2}, + [40] = {.lex_state = 2}, + [41] = {.lex_state = 0}, + [42] = {.lex_state = 0}, + [43] = {.lex_state = 0}, + [44] = {.lex_state = 0}, + [45] = {.lex_state = 0}, + [46] = {.lex_state = 0}, + [47] = {.lex_state = 0}, + [48] = {.lex_state = 0}, + [49] = {.lex_state = 0}, + [50] = {.lex_state = 0}, + [51] = {.lex_state = 0}, + [52] = {.lex_state = 0}, + [53] = {.lex_state = 0}, + [54] = {.lex_state = 0}, + [55] = {.lex_state = 0}, + [56] = {.lex_state = 0}, + [57] = {.lex_state = 0}, + [58] = {.lex_state = 0}, + [59] = {.lex_state = 0}, + [60] = {.lex_state = 0}, + [61] = {.lex_state = 0}, + [62] = {.lex_state = 0}, + [63] = {.lex_state = 0}, + [64] = {.lex_state = 0}, + [65] = {.lex_state = 0}, + [66] = {.lex_state = 0}, + [67] = {.lex_state = 0}, + [68] = {.lex_state = 0}, + [69] = {.lex_state = 0}, + [70] = {.lex_state = 0}, + [71] = {.lex_state = 4}, + [72] = {.lex_state = 0}, + [73] = {.lex_state = 0}, + [74] = {.lex_state = 4}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 4}, + [77] = {.lex_state = 4}, + [78] = {.lex_state = 4}, + [79] = {.lex_state = 0}, + [80] = {.lex_state = 0}, + [81] = {.lex_state = 0}, + [82] = {.lex_state = 0}, + [83] = {.lex_state = 0}, + [84] = {.lex_state = 0}, + [85] = {.lex_state = 0}, + [86] = {.lex_state = 4}, + [87] = {.lex_state = 4}, + [88] = {.lex_state = 4}, + [89] = {.lex_state = 0}, + [90] = {.lex_state = 0}, + [91] = {.lex_state = 4}, + [92] = {.lex_state = 4}, + [93] = {.lex_state = 0}, + [94] = {.lex_state = 0}, + [95] = {.lex_state = 4}, + [96] = {.lex_state = 5}, + [97] = {.lex_state = 5}, + [98] = {.lex_state = 0}, + [99] = {.lex_state = 0}, + [100] = {.lex_state = 0}, + [101] = {.lex_state = 0}, + [102] = {.lex_state = 4}, + [103] = {.lex_state = 0}, + [104] = {.lex_state = 0}, + [105] = {.lex_state = 5}, + [106] = {.lex_state = 4}, + [107] = {.lex_state = 0}, + [108] = {.lex_state = 0}, + [109] = {.lex_state = 0}, + [110] = {.lex_state = 4}, + [111] = {.lex_state = 4}, + [112] = {.lex_state = 0}, + [113] = {.lex_state = 0}, + [114] = {.lex_state = 4}, + [115] = {.lex_state = 4}, + [116] = {.lex_state = 4}, + [117] = {.lex_state = 4}, + [118] = {.lex_state = 4}, + [119] = {.lex_state = 4}, + [120] = {.lex_state = 4}, + [121] = {.lex_state = 0}, + [122] = {.lex_state = 5}, + [123] = {.lex_state = 0}, + [124] = {.lex_state = 4}, + [125] = {.lex_state = 4}, + [126] = {.lex_state = 0}, + [127] = {.lex_state = 4}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 0}, + [130] = {.lex_state = 4}, + [131] = {.lex_state = 4}, + [132] = {.lex_state = 4}, + [133] = {.lex_state = 0}, + [134] = {.lex_state = 0}, + [135] = {.lex_state = 4}, + [136] = {.lex_state = 4}, + [137] = {.lex_state = 0}, + [138] = {.lex_state = 0}, + [139] = {.lex_state = 0}, + [140] = {.lex_state = 0}, + [141] = {.lex_state = 0}, + [142] = {.lex_state = 4}, + [143] = {.lex_state = 4}, + [144] = {.lex_state = 0}, + [145] = {.lex_state = 0}, + [146] = {.lex_state = 4}, + [147] = {.lex_state = 0}, + [148] = {.lex_state = 0}, + [149] = {.lex_state = 0}, + [150] = {.lex_state = 4}, + [151] = {.lex_state = 0}, + [152] = {.lex_state = 4}, + [153] = {.lex_state = 0}, + [154] = {.lex_state = 0}, + [155] = {.lex_state = 0}, + [156] = {.lex_state = 4}, + [157] = {.lex_state = 4}, + [158] = {.lex_state = 0}, + [159] = {.lex_state = 0}, + [160] = {.lex_state = 4}, + [161] = {.lex_state = 0}, + [162] = {.lex_state = 0}, + [163] = {.lex_state = 0}, + [164] = {.lex_state = 4}, + [165] = {.lex_state = 0}, + [166] = {.lex_state = 4}, + [167] = {.lex_state = 4}, + [168] = {.lex_state = 0}, + [169] = {.lex_state = 0}, + [170] = {.lex_state = 4}, + [171] = {.lex_state = 4}, + [172] = {.lex_state = 0}, + [173] = {.lex_state = 4}, + [174] = {.lex_state = 0}, + [175] = {.lex_state = 0}, + [176] = {.lex_state = 4}, + [177] = {.lex_state = 4}, + [178] = {.lex_state = 0}, + [179] = {.lex_state = 0}, + [180] = {.lex_state = 0}, + [181] = {.lex_state = 4}, + [182] = {.lex_state = 0}, + [183] = {.lex_state = 0}, + [184] = {.lex_state = 4}, + [185] = {.lex_state = 0}, + [186] = {.lex_state = 0}, + [187] = {.lex_state = 4}, + [188] = {.lex_state = 4}, + [189] = {.lex_state = 4}, + [190] = {.lex_state = 0}, + [191] = {.lex_state = 4}, + [192] = {.lex_state = 0}, + [193] = {.lex_state = 4}, + [194] = {.lex_state = 4}, + [195] = {.lex_state = 0}, + [196] = {.lex_state = 0}, + [197] = {.lex_state = 4}, + [198] = {.lex_state = 4}, + [199] = {.lex_state = 4}, + [200] = {.lex_state = 4}, + [201] = {.lex_state = 0}, + [202] = {.lex_state = 4}, + [203] = {.lex_state = 4}, + [204] = {.lex_state = 4}, + [205] = {.lex_state = 0}, + [206] = {.lex_state = 4}, + [207] = {.lex_state = 0}, + [208] = {.lex_state = 4}, + [209] = {.lex_state = 0}, + [210] = {.lex_state = 0}, + [211] = {.lex_state = 0}, + [212] = {.lex_state = 0}, + [213] = {.lex_state = 0}, + [214] = {.lex_state = 0}, + [215] = {.lex_state = 0}, + [216] = {.lex_state = 0}, + [217] = {.lex_state = 4}, + [218] = {.lex_state = 0}, + [219] = {.lex_state = 0}, + [220] = {.lex_state = 4}, + [221] = {.lex_state = 0}, + [222] = {.lex_state = 0}, + [223] = {.lex_state = 0}, + [224] = {.lex_state = 0}, + [225] = {.lex_state = 0}, + [226] = {.lex_state = 0}, + [227] = {.lex_state = 0}, + [228] = {.lex_state = 0}, + [229] = {.lex_state = 0}, + [230] = {.lex_state = 0}, + [231] = {.lex_state = 0}, + [232] = {.lex_state = 0}, + [233] = {.lex_state = 0}, + [234] = {.lex_state = 0}, + [235] = {.lex_state = 0}, + [236] = {.lex_state = 0}, + [237] = {.lex_state = 0}, + [238] = {.lex_state = 0}, + [239] = {.lex_state = 0}, + [240] = {.lex_state = 0}, + [241] = {.lex_state = 0}, + [242] = {.lex_state = 0}, + [243] = {.lex_state = 0}, + [244] = {.lex_state = 0}, + [245] = {.lex_state = 0}, + [246] = {.lex_state = 0}, + [247] = {.lex_state = 0}, + [248] = {.lex_state = 0}, + [249] = {.lex_state = 0}, + [250] = {.lex_state = 0}, + [251] = {.lex_state = 0}, + [252] = {.lex_state = 0}, + [253] = {.lex_state = 0}, + [254] = {.lex_state = 0}, + [255] = {.lex_state = 0}, + [256] = {.lex_state = 0}, + [257] = {.lex_state = 0}, + [258] = {.lex_state = 7}, + [259] = {.lex_state = 0}, + [260] = {.lex_state = 0}, + [261] = {.lex_state = 0}, + [262] = {.lex_state = 0}, + [263] = {.lex_state = 0}, + [264] = {.lex_state = 0}, + [265] = {.lex_state = 0}, + [266] = {.lex_state = 0}, + [267] = {.lex_state = 0}, + [268] = {.lex_state = 0}, + [269] = {.lex_state = 0}, + [270] = {.lex_state = 0}, + [271] = {.lex_state = 0}, + [272] = {.lex_state = 0}, + [273] = {.lex_state = 0}, + [274] = {.lex_state = 0}, + [275] = {.lex_state = 0}, + [276] = {.lex_state = 0}, + [277] = {.lex_state = 0}, + [278] = {.lex_state = 0}, + [279] = {.lex_state = 0}, + [280] = {.lex_state = 0}, + [281] = {.lex_state = 0}, + [282] = {.lex_state = 0}, + [283] = {.lex_state = 0}, + [284] = {.lex_state = 0}, + [285] = {.lex_state = 0}, + [286] = {.lex_state = 0}, + [287] = {.lex_state = 0}, + [288] = {.lex_state = 0}, + [289] = {.lex_state = 0}, + [290] = {.lex_state = 0}, + [291] = {.lex_state = 0}, + [292] = {.lex_state = 0}, + [293] = {.lex_state = 0}, + [294] = {.lex_state = 0}, + [295] = {.lex_state = 0}, + [296] = {.lex_state = 0}, + [297] = {.lex_state = 0}, + [298] = {.lex_state = 0}, + [299] = {.lex_state = 0}, + [300] = {.lex_state = 0}, + [301] = {.lex_state = 0}, + [302] = {.lex_state = 0}, + [303] = {.lex_state = 0}, + [304] = {.lex_state = 0}, + [305] = {.lex_state = 0}, + [306] = {.lex_state = 0}, + [307] = {.lex_state = 0}, + [308] = {.lex_state = 0}, + [309] = {.lex_state = 0}, + [310] = {.lex_state = 0}, + [311] = {.lex_state = 0}, + [312] = {.lex_state = 7}, + [313] = {.lex_state = 0}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [STATE(0)] = { + [ts_builtin_sym_end] = ACTIONS(1), + [anon_sym_self] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [sym_doc_comment] = ACTIONS(3), + [sym_comment] = ACTIONS(5), + [anon_sym_AT] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_null] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_use] = ACTIONS(1), + [anon_sym_as] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_main] = ACTIONS(1), + [anon_sym_record] = ACTIONS(1), + [anon_sym_BANG] = ACTIONS(1), + [anon_sym_inline] = ACTIONS(1), + [anon_sym_type] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_def] = ACTIONS(1), + [anon_sym_token] = ACTIONS(1), + [anon_sym_query] = ACTIONS(1), + [anon_sym_procedure] = ACTIONS(1), + [anon_sym_subscription] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_error] = ACTIONS(1), + [anon_sym_boolean] = ACTIONS(1), + [anon_sym_integer] = ACTIONS(1), + [anon_sym_string] = ACTIONS(1), + [anon_sym_bytes] = ACTIONS(1), + [anon_sym_blob] = ACTIONS(1), + [anon_sym_unknown] = ACTIONS(1), + [anon_sym_constrained] = ACTIONS(1), + [anon_sym_BQUOTE] = ACTIONS(1), + [sym_number] = ACTIONS(1), + [sym_string] = ACTIONS(1), + [anon_sym_true] = ACTIONS(1), + [anon_sym_false] = ACTIONS(1), + }, + [STATE(1)] = { + [sym_source_file] = STATE(310), + [sym_item] = STATE(2), + [sym_self_definition] = STATE(47), + [sym_annotation] = STATE(55), + [sym_use_statement] = STATE(47), + [sym_record_definition] = STATE(47), + [sym_inline_type_definition] = STATE(47), + [sym_def_type_definition] = STATE(47), + [sym_token_definition] = STATE(47), + [sym_query_definition] = STATE(47), + [sym_procedure_definition] = STATE(47), + [sym_subscription_definition] = STATE(47), + [aux_sym_source_file_repeat1] = STATE(2), + [aux_sym_self_definition_repeat1] = STATE(55), + [ts_builtin_sym_end] = ACTIONS(7), + [anon_sym_self] = ACTIONS(9), + [sym_doc_comment] = ACTIONS(3), + [sym_comment] = ACTIONS(5), + [anon_sym_AT] = ACTIONS(11), + [anon_sym_use] = ACTIONS(13), + [anon_sym_record] = ACTIONS(15), + [anon_sym_inline] = ACTIONS(17), + [anon_sym_def] = ACTIONS(19), + [anon_sym_token] = ACTIONS(21), + [anon_sym_query] = ACTIONS(23), + [anon_sym_procedure] = ACTIONS(25), + [anon_sym_subscription] = ACTIONS(27), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 16, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(9), 1, + anon_sym_self, + ACTIONS(11), 1, + anon_sym_AT, + ACTIONS(13), 1, + anon_sym_use, + ACTIONS(15), 1, + anon_sym_record, + ACTIONS(17), 1, + anon_sym_inline, + ACTIONS(19), 1, + anon_sym_def, + ACTIONS(21), 1, + anon_sym_token, + ACTIONS(23), 1, + anon_sym_query, + ACTIONS(25), 1, + anon_sym_procedure, + ACTIONS(27), 1, + anon_sym_subscription, + ACTIONS(29), 1, + ts_builtin_sym_end, + STATE(3), 2, + sym_item, + aux_sym_source_file_repeat1, + STATE(55), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + STATE(47), 9, + sym_self_definition, + sym_use_statement, + sym_record_definition, + sym_inline_type_definition, + sym_def_type_definition, + sym_token_definition, + sym_query_definition, + sym_procedure_definition, + sym_subscription_definition, + [59] = 16, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(31), 1, + ts_builtin_sym_end, + ACTIONS(33), 1, + anon_sym_self, + ACTIONS(36), 1, + anon_sym_AT, + ACTIONS(39), 1, + anon_sym_use, + ACTIONS(42), 1, + anon_sym_record, + ACTIONS(45), 1, + anon_sym_inline, + ACTIONS(48), 1, + anon_sym_def, + ACTIONS(51), 1, + anon_sym_token, + ACTIONS(54), 1, + anon_sym_query, + ACTIONS(57), 1, + anon_sym_procedure, + ACTIONS(60), 1, + anon_sym_subscription, + STATE(3), 2, + sym_item, + aux_sym_source_file_repeat1, + STATE(55), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + STATE(47), 9, + sym_self_definition, + sym_use_statement, + sym_record_definition, + sym_inline_type_definition, + sym_def_type_definition, + sym_token_definition, + sym_query_definition, + sym_procedure_definition, + sym_subscription_definition, + [118] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(63), 23, + anon_sym_self, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_as, + anon_sym_DOT, + anon_sym_SEMI, + anon_sym_record, + anon_sym_BANG, + anon_sym_inline, + anon_sym_EQ, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + anon_sym_PIPE, + anon_sym_constrained, + [150] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(65), 23, + anon_sym_self, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_as, + anon_sym_DOT, + anon_sym_SEMI, + anon_sym_record, + anon_sym_BANG, + anon_sym_inline, + anon_sym_EQ, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + anon_sym_PIPE, + anon_sym_constrained, + [182] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(145), 1, + sym_non_union_type, + STATE(244), 1, + sym_type, + STATE(311), 1, + sym_return_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [235] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(145), 1, + sym_non_union_type, + STATE(244), 1, + sym_type, + STATE(307), 1, + sym_return_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [288] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(145), 1, + sym_non_union_type, + STATE(244), 1, + sym_type, + STATE(294), 1, + sym_return_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [341] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(145), 1, + sym_non_union_type, + STATE(244), 1, + sym_type, + STATE(295), 1, + sym_return_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [394] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(285), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [444] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(293), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [494] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(273), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [544] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(265), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [594] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(303), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [644] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(228), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [694] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(290), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [744] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(292), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [794] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(313), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [844] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(283), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [894] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(297), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [944] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(219), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [994] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(218), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [1044] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(249), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [1094] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(225), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [1144] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(250), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [1194] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + STATE(83), 1, + sym_identifier, + STATE(93), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(123), 1, + sym_union_type, + STATE(260), 1, + sym_type, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [1244] = 12, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_LBRACE, + ACTIONS(71), 1, + anon_sym_LBRACK, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(77), 1, + anon_sym_BANG, + STATE(83), 1, + sym_identifier, + STATE(101), 1, + sym_non_union_type, + STATE(108), 1, + sym_type_path, + STATE(107), 5, + sym_primitive_type, + sym_reference_type, + sym_array_type, + sym_object_type, + sym_constrained_type, + ACTIONS(69), 7, + anon_sym_null, + anon_sym_boolean, + anon_sym_integer, + anon_sym_string, + anon_sym_bytes, + anon_sym_blob, + anon_sym_unknown, + [1291] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + anon_sym_RPAREN, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + STATE(126), 1, + sym_identifier, + STATE(215), 1, + sym_annotation_value, + STATE(223), 1, + sym_annotation_arg, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1340] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(91), 1, + anon_sym_RPAREN, + STATE(126), 1, + sym_identifier, + STATE(215), 1, + sym_annotation_value, + STATE(223), 1, + sym_annotation_arg, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1389] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(93), 1, + anon_sym_RPAREN, + STATE(126), 1, + sym_identifier, + STATE(215), 1, + sym_annotation_value, + STATE(223), 1, + sym_annotation_arg, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1438] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(95), 1, + anon_sym_RPAREN, + STATE(126), 1, + sym_identifier, + STATE(162), 1, + sym_annotation_arg, + STATE(215), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1487] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(97), 1, + anon_sym_RPAREN, + STATE(126), 1, + sym_identifier, + STATE(215), 1, + sym_annotation_value, + STATE(223), 1, + sym_annotation_arg, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1536] = 14, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(99), 1, + anon_sym_RPAREN, + STATE(126), 1, + sym_identifier, + STATE(207), 1, + sym_annotation_arg, + STATE(215), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1585] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(101), 1, + anon_sym_RBRACK, + STATE(83), 1, + sym_identifier, + STATE(245), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1631] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(103), 1, + anon_sym_RBRACK, + STATE(83), 1, + sym_identifier, + STATE(180), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1677] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + STATE(126), 1, + sym_identifier, + STATE(215), 1, + sym_annotation_value, + STATE(223), 1, + sym_annotation_arg, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1723] = 13, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + ACTIONS(105), 1, + anon_sym_RBRACK, + STATE(83), 1, + sym_identifier, + STATE(245), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1769] = 12, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + STATE(83), 1, + sym_identifier, + STATE(245), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1812] = 12, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + STATE(83), 1, + sym_identifier, + STATE(238), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1855] = 12, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(79), 1, + anon_sym_LBRACE, + ACTIONS(83), 1, + anon_sym_null, + ACTIONS(85), 1, + anon_sym_LBRACK, + STATE(83), 1, + sym_identifier, + STATE(239), 1, + sym_annotation_value, + ACTIONS(87), 2, + sym_number, + sym_string, + ACTIONS(89), 2, + anon_sym_true, + anon_sym_false, + STATE(138), 5, + sym_null_literal, + sym_annotation_array, + sym_annotation_object, + sym_type_path, + sym_boolean, + [1898] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(109), 1, + anon_sym_COMMA, + ACTIONS(111), 1, + anon_sym_COLON, + ACTIONS(113), 1, + anon_sym_LPAREN, + STATE(85), 1, + sym_annotation_args, + STATE(179), 1, + aux_sym_annotation_selectors_repeat1, + ACTIONS(107), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [1931] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(115), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [1951] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(117), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [1971] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(119), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [1991] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(121), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2011] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(123), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2031] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(125), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2051] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(127), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2071] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(129), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2091] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(131), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2111] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(133), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2131] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(135), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2151] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(137), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2171] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(139), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2191] = 12, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(11), 1, + anon_sym_AT, + ACTIONS(141), 1, + anon_sym_self, + ACTIONS(143), 1, + anon_sym_record, + ACTIONS(145), 1, + anon_sym_inline, + ACTIONS(147), 1, + anon_sym_def, + ACTIONS(149), 1, + anon_sym_token, + ACTIONS(151), 1, + anon_sym_query, + ACTIONS(153), 1, + anon_sym_procedure, + ACTIONS(155), 1, + anon_sym_subscription, + STATE(56), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2229] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(159), 1, + anon_sym_AT, + STATE(56), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + ACTIONS(157), 8, + anon_sym_self, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2253] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(162), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2273] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(164), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2293] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(166), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2313] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(168), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2333] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(170), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2353] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(172), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2373] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(174), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2393] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(113), 1, + anon_sym_LPAREN, + STATE(84), 1, + sym_annotation_args, + ACTIONS(176), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2417] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(178), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2437] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(180), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2457] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(182), 11, + ts_builtin_sym_end, + anon_sym_self, + anon_sym_AT, + anon_sym_use, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2477] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(186), 1, + anon_sym_DOT, + STATE(68), 1, + aux_sym_type_path_repeat1, + ACTIONS(184), 8, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_as, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [2500] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(189), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2518] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(191), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2536] = 9, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(193), 1, + anon_sym_RBRACE, + ACTIONS(195), 1, + sym_doc_comment, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(235), 1, + sym_identifier, + STATE(78), 2, + sym_field, + aux_sym_record_body_repeat1, + STATE(116), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2566] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(201), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2584] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(184), 9, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_as, + anon_sym_DOT, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [2602] = 9, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(195), 1, + sym_doc_comment, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(203), 1, + anon_sym_RBRACE, + STATE(235), 1, + sym_identifier, + STATE(76), 2, + sym_field, + aux_sym_record_body_repeat1, + STATE(116), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2632] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(205), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2650] = 9, + ACTIONS(5), 1, + sym_comment, + ACTIONS(207), 1, + anon_sym_RBRACE, + ACTIONS(209), 1, + sym_doc_comment, + ACTIONS(212), 1, + anon_sym_AT, + ACTIONS(215), 1, + aux_sym_identifier_token1, + ACTIONS(218), 1, + anon_sym_BQUOTE, + STATE(235), 1, + sym_identifier, + STATE(76), 2, + sym_field, + aux_sym_record_body_repeat1, + STATE(116), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2680] = 9, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(195), 1, + sym_doc_comment, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(221), 1, + anon_sym_RBRACE, + STATE(235), 1, + sym_identifier, + STATE(74), 2, + sym_field, + aux_sym_record_body_repeat1, + STATE(116), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2710] = 9, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(195), 1, + sym_doc_comment, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(223), 1, + anon_sym_RBRACE, + STATE(235), 1, + sym_identifier, + STATE(76), 2, + sym_field, + aux_sym_record_body_repeat1, + STATE(116), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2740] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(227), 1, + anon_sym_DOT, + STATE(68), 1, + aux_sym_type_path_repeat1, + ACTIONS(225), 7, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [2762] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_LBRACK, + ACTIONS(231), 1, + anon_sym_RBRACK, + STATE(192), 1, + sym_constraint_value, + ACTIONS(233), 2, + sym_number, + sym_string, + ACTIONS(235), 2, + anon_sym_true, + anon_sym_false, + STATE(229), 2, + sym_array_literal, + sym_boolean, + [2790] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_LBRACK, + ACTIONS(237), 1, + anon_sym_RBRACK, + STATE(234), 1, + sym_constraint_value, + ACTIONS(233), 2, + sym_number, + sym_string, + ACTIONS(235), 2, + anon_sym_true, + anon_sym_false, + STATE(229), 2, + sym_array_literal, + sym_boolean, + [2818] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_LBRACK, + ACTIONS(239), 1, + anon_sym_RBRACK, + STATE(234), 1, + sym_constraint_value, + ACTIONS(233), 2, + sym_number, + sym_string, + ACTIONS(235), 2, + anon_sym_true, + anon_sym_false, + STATE(229), 2, + sym_array_literal, + sym_boolean, + [2846] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(227), 1, + anon_sym_DOT, + STATE(79), 1, + aux_sym_type_path_repeat1, + ACTIONS(241), 7, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [2868] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(243), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2886] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(245), 9, + anon_sym_self, + anon_sym_AT, + anon_sym_record, + anon_sym_inline, + anon_sym_def, + anon_sym_token, + anon_sym_query, + anon_sym_procedure, + anon_sym_subscription, + [2904] = 9, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(247), 1, + anon_sym_RPAREN, + STATE(214), 1, + sym_identifier, + STATE(224), 1, + sym_parameter, + STATE(119), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2933] = 9, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(249), 1, + anon_sym_RPAREN, + STATE(174), 1, + sym_parameter, + STATE(214), 1, + sym_identifier, + STATE(119), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2962] = 9, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(251), 1, + anon_sym_RPAREN, + STATE(214), 1, + sym_identifier, + STATE(224), 1, + sym_parameter, + STATE(119), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [2991] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_LBRACK, + STATE(271), 1, + sym_constraint_value, + ACTIONS(233), 2, + sym_number, + sym_string, + ACTIONS(235), 2, + anon_sym_true, + anon_sym_false, + STATE(229), 2, + sym_array_literal, + sym_boolean, + [3016] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_LBRACK, + STATE(234), 1, + sym_constraint_value, + ACTIONS(233), 2, + sym_number, + sym_string, + ACTIONS(235), 2, + anon_sym_true, + anon_sym_false, + STATE(229), 2, + sym_array_literal, + sym_boolean, + [3041] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(109), 1, + anon_sym_COMMA, + ACTIONS(111), 1, + anon_sym_COLON, + ACTIONS(253), 1, + anon_sym_LPAREN, + STATE(179), 1, + aux_sym_annotation_selectors_repeat1, + STATE(200), 1, + sym_annotation_args, + ACTIONS(107), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3068] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(214), 1, + sym_identifier, + STATE(224), 1, + sym_parameter, + STATE(119), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [3094] = 6, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(257), 1, + anon_sym_PIPE, + ACTIONS(259), 1, + anon_sym_constrained, + STATE(112), 1, + aux_sym_union_type_repeat1, + ACTIONS(255), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + [3116] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(261), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3131] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(213), 1, + sym_identifier, + STATE(124), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [3154] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(263), 1, + anon_sym_RBRACE, + ACTIONS(265), 1, + anon_sym_main, + STATE(185), 1, + sym_identifier, + STATE(212), 1, + sym_import_item, + [3179] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(265), 1, + anon_sym_main, + ACTIONS(267), 1, + anon_sym_RBRACE, + STATE(185), 1, + sym_identifier, + STATE(186), 1, + sym_import_item, + [3204] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(269), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3219] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(271), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3234] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(273), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3249] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(259), 1, + anon_sym_constrained, + ACTIONS(275), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + [3266] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(277), 1, + anon_sym_RBRACE, + STATE(254), 1, + sym_identifier, + STATE(110), 2, + sym_constraint, + aux_sym_constraint_block_repeat1, + [3289] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(279), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3304] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(281), 1, + anon_sym_PIPE, + STATE(104), 1, + aux_sym_union_type_repeat1, + ACTIONS(275), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + [3323] = 8, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(265), 1, + anon_sym_main, + ACTIONS(284), 1, + anon_sym_RBRACE, + STATE(185), 1, + sym_identifier, + STATE(212), 1, + sym_import_item, + [3348] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(226), 1, + sym_identifier, + STATE(95), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [3371] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(286), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3386] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(288), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3401] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(290), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3416] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(292), 1, + anon_sym_RBRACE, + STATE(254), 1, + sym_identifier, + STATE(114), 2, + sym_constraint, + aux_sym_constraint_block_repeat1, + [3439] = 7, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(294), 1, + anon_sym_RBRACE, + ACTIONS(296), 1, + sym_doc_comment, + STATE(266), 1, + sym_identifier, + STATE(115), 2, + sym_error_definition, + aux_sym_return_type_repeat1, + [3462] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(257), 1, + anon_sym_PIPE, + STATE(104), 1, + aux_sym_union_type_repeat1, + ACTIONS(298), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + [3481] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(300), 6, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + anon_sym_constrained, + [3496] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(302), 1, + anon_sym_RBRACE, + ACTIONS(304), 1, + aux_sym_identifier_token1, + ACTIONS(307), 1, + anon_sym_BQUOTE, + STATE(254), 1, + sym_identifier, + STATE(114), 2, + sym_constraint, + aux_sym_constraint_block_repeat1, + [3519] = 7, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + ACTIONS(296), 1, + sym_doc_comment, + ACTIONS(310), 1, + anon_sym_RBRACE, + STATE(266), 1, + sym_identifier, + STATE(117), 2, + sym_error_definition, + aux_sym_return_type_repeat1, + [3542] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(226), 1, + sym_identifier, + STATE(124), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [3565] = 7, + ACTIONS(5), 1, + sym_comment, + ACTIONS(312), 1, + anon_sym_RBRACE, + ACTIONS(314), 1, + sym_doc_comment, + ACTIONS(317), 1, + aux_sym_identifier_token1, + ACTIONS(320), 1, + anon_sym_BQUOTE, + STATE(266), 1, + sym_identifier, + STATE(117), 2, + sym_error_definition, + aux_sym_return_type_repeat1, + [3588] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(63), 6, + anon_sym_AT, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_LPAREN, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3603] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(197), 1, + anon_sym_AT, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(242), 1, + sym_identifier, + STATE(124), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [3626] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(65), 6, + anon_sym_AT, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_LPAREN, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3641] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(275), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + [3655] = 7, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(73), 1, + aux_sym_identifier_token1, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(265), 1, + anon_sym_main, + STATE(185), 1, + sym_identifier, + STATE(212), 1, + sym_import_item, + [3677] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(255), 5, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_SEMI, + anon_sym_PIPE, + [3691] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(323), 1, + anon_sym_AT, + ACTIONS(157), 2, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + STATE(124), 2, + sym_annotation, + aux_sym_self_definition_repeat1, + [3709] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(253), 1, + anon_sym_LPAREN, + STATE(202), 1, + sym_annotation_args, + ACTIONS(176), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3727] = 6, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(227), 1, + anon_sym_DOT, + ACTIONS(326), 1, + anon_sym_COLON, + STATE(79), 1, + aux_sym_type_path_repeat1, + ACTIONS(241), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [3747] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(328), 5, + anon_sym_RBRACE, + sym_doc_comment, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3758] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(330), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3771] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(332), 1, + anon_sym_DOT, + STATE(140), 1, + aux_sym_type_path_repeat1, + ACTIONS(241), 2, + anon_sym_as, + anon_sym_SEMI, + [3788] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(335), 5, + anon_sym_RBRACE, + sym_doc_comment, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3799] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(337), 5, + anon_sym_RBRACE, + sym_doc_comment, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3810] = 6, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(41), 1, + sym_identifier, + STATE(187), 1, + sym_annotation_selectors, + [3829] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(339), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3842] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(341), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3855] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(343), 5, + anon_sym_RBRACE, + sym_doc_comment, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3866] = 6, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(129), 1, + sym_identifier, + STATE(190), 1, + sym_type_path, + [3885] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(345), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3898] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(347), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3911] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(349), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3924] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(351), 1, + anon_sym_DOT, + STATE(68), 1, + aux_sym_type_path_repeat1, + ACTIONS(225), 2, + anon_sym_as, + anon_sym_SEMI, + [3941] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(354), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3954] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(356), 5, + anon_sym_RBRACE, + sym_doc_comment, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3965] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(358), 5, + anon_sym_RBRACE, + sym_doc_comment, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [3976] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(360), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [3989] = 6, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(255), 1, + anon_sym_SEMI, + ACTIONS(259), 1, + anon_sym_constrained, + ACTIONS(362), 1, + anon_sym_PIPE, + STATE(205), 1, + aux_sym_union_type_repeat1, + [4008] = 6, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(365), 1, + aux_sym_identifier_token1, + ACTIONS(367), 1, + anon_sym_BQUOTE, + STATE(91), 1, + sym_identifier, + STATE(197), 1, + sym_annotation_selectors, + [4027] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(369), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [4040] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(371), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [4053] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(373), 4, + anon_sym_RBRACE, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [4066] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(205), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4078] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(91), 1, + anon_sym_RPAREN, + ACTIONS(375), 1, + anon_sym_COMMA, + STATE(159), 1, + aux_sym_annotation_args_repeat1, + [4094] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(227), 1, + sym_identifier, + [4110] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(377), 1, + anon_sym_RBRACE, + ACTIONS(379), 1, + sym_string, + STATE(178), 1, + sym_annotation_object_entry, + [4126] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(379), 1, + sym_string, + ACTIONS(381), 1, + anon_sym_RBRACE, + STATE(240), 1, + sym_annotation_object_entry, + [4142] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(381), 1, + anon_sym_RBRACE, + ACTIONS(383), 1, + anon_sym_COMMA, + STATE(169), 1, + aux_sym_annotation_object_repeat1, + [4158] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(262), 1, + sym_identifier, + [4174] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(267), 1, + sym_identifier, + [4190] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(101), 1, + anon_sym_RBRACK, + ACTIONS(385), 1, + anon_sym_COMMA, + STATE(172), 1, + aux_sym_annotation_array_repeat1, + [4206] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(387), 1, + anon_sym_COMMA, + ACTIONS(390), 1, + anon_sym_RPAREN, + STATE(159), 1, + aux_sym_annotation_args_repeat1, + [4222] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(246), 1, + sym_identifier, + [4238] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(284), 1, + anon_sym_RBRACE, + ACTIONS(392), 1, + anon_sym_COMMA, + STATE(175), 1, + aux_sym_import_block_repeat1, + [4254] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(394), 1, + anon_sym_COMMA, + ACTIONS(396), 1, + anon_sym_RPAREN, + STATE(183), 1, + aux_sym_annotation_args_repeat1, + [4270] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(398), 1, + anon_sym_COMMA, + ACTIONS(401), 1, + anon_sym_COLON, + STATE(163), 1, + aux_sym_annotation_selectors_repeat1, + [4286] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(243), 1, + sym_identifier, + [4302] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(403), 1, + anon_sym_COMMA, + ACTIONS(406), 1, + anon_sym_RPAREN, + STATE(165), 1, + aux_sym_parameter_list_repeat1, + [4318] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(237), 1, + sym_identifier, + [4334] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(300), 1, + sym_identifier, + [4350] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(379), 1, + sym_string, + ACTIONS(408), 1, + anon_sym_RBRACE, + STATE(240), 1, + sym_annotation_object_entry, + [4366] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(410), 1, + anon_sym_RBRACE, + ACTIONS(412), 1, + anon_sym_COMMA, + STATE(169), 1, + aux_sym_annotation_object_repeat1, + [4382] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(209), 1, + sym_identifier, + [4398] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(210), 1, + sym_identifier, + [4414] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(415), 1, + anon_sym_COMMA, + ACTIONS(418), 1, + anon_sym_RBRACK, + STATE(172), 1, + aux_sym_annotation_array_repeat1, + [4430] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(211), 1, + sym_identifier, + [4446] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(420), 1, + anon_sym_COMMA, + ACTIONS(422), 1, + anon_sym_RPAREN, + STATE(201), 1, + aux_sym_parameter_list_repeat1, + [4462] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(424), 1, + anon_sym_RBRACE, + ACTIONS(426), 1, + anon_sym_COMMA, + STATE(175), 1, + aux_sym_import_block_repeat1, + [4478] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(216), 1, + sym_identifier, + [4494] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(241), 1, + sym_identifier, + [4510] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(429), 1, + anon_sym_RBRACE, + ACTIONS(431), 1, + anon_sym_COMMA, + STATE(155), 1, + aux_sym_annotation_object_repeat1, + [4526] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(109), 1, + anon_sym_COMMA, + ACTIONS(433), 1, + anon_sym_COLON, + STATE(163), 1, + aux_sym_annotation_selectors_repeat1, + [4542] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(435), 1, + anon_sym_COMMA, + ACTIONS(437), 1, + anon_sym_RBRACK, + STATE(158), 1, + aux_sym_annotation_array_repeat1, + [4558] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(309), 1, + sym_identifier, + [4574] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(439), 1, + anon_sym_LBRACE, + ACTIONS(441), 1, + anon_sym_STAR, + STATE(261), 1, + sym_import_block, + [4590] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(93), 1, + anon_sym_RPAREN, + ACTIONS(443), 1, + anon_sym_COMMA, + STATE(159), 1, + aux_sym_annotation_args_repeat1, + [4606] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(73), 1, + sym_identifier, + [4622] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(447), 1, + anon_sym_as, + ACTIONS(445), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [4636] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(449), 1, + anon_sym_RBRACE, + ACTIONS(451), 1, + anon_sym_COMMA, + STATE(161), 1, + aux_sym_import_block_repeat1, + [4652] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(64), 1, + sym_identifier, + [4668] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(272), 1, + sym_identifier, + [4684] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(305), 1, + sym_identifier, + [4700] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(453), 1, + anon_sym_as, + ACTIONS(455), 1, + anon_sym_DOT, + ACTIONS(457), 1, + anon_sym_SEMI, + [4716] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(459), 4, + anon_sym_RBRACE, + sym_doc_comment, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4726] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(461), 1, + anon_sym_COMMA, + ACTIONS(463), 1, + anon_sym_RBRACK, + STATE(195), 1, + aux_sym_array_literal_repeat1, + [4742] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(465), 3, + anon_sym_RBRACE, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4754] = 2, + ACTIONS(5), 1, + sym_comment, + ACTIONS(467), 4, + anon_sym_RBRACE, + sym_doc_comment, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4764] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(237), 1, + anon_sym_RBRACK, + ACTIONS(469), 1, + anon_sym_COMMA, + STATE(196), 1, + aux_sym_array_literal_repeat1, + [4780] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(471), 1, + anon_sym_COMMA, + ACTIONS(474), 1, + anon_sym_RBRACK, + STATE(196), 1, + aux_sym_array_literal_repeat1, + [4796] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(365), 1, + aux_sym_identifier_token1, + ACTIONS(367), 1, + anon_sym_BQUOTE, + STATE(125), 1, + sym_identifier, + [4812] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(268), 1, + sym_identifier, + [4828] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(270), 1, + sym_identifier, + [4844] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(245), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4856] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(247), 1, + anon_sym_RPAREN, + ACTIONS(476), 1, + anon_sym_COMMA, + STATE(165), 1, + aux_sym_parameter_list_repeat1, + [4872] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(243), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4884] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(201), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4896] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(189), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4908] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + STATE(104), 1, + aux_sym_union_type_repeat1, + ACTIONS(298), 2, + anon_sym_SEMI, + anon_sym_PIPE, + [4922] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(191), 3, + anon_sym_AT, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [4934] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(478), 1, + anon_sym_COMMA, + ACTIONS(480), 1, + anon_sym_RPAREN, + STATE(151), 1, + aux_sym_annotation_args_repeat1, + [4950] = 5, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(75), 1, + anon_sym_BQUOTE, + ACTIONS(199), 1, + aux_sym_identifier_token1, + STATE(230), 1, + sym_identifier, + [4966] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_LPAREN, + STATE(281), 1, + sym_parameter_list, + [4979] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_LPAREN, + STATE(286), 1, + sym_parameter_list, + [4992] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_LPAREN, + STATE(291), 1, + sym_parameter_list, + [5005] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(424), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [5016] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(484), 1, + anon_sym_COLON, + ACTIONS(486), 1, + anon_sym_BANG, + [5029] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(488), 1, + anon_sym_COLON, + ACTIONS(490), 1, + anon_sym_BANG, + [5042] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(492), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5053] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_LPAREN, + STATE(288), 1, + sym_parameter_list, + [5066] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(494), 2, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [5077] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(496), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5088] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(498), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5099] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(500), 2, + aux_sym_identifier_token1, + anon_sym_BQUOTE, + [5110] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(379), 1, + sym_string, + STATE(240), 1, + sym_annotation_object_entry, + [5123] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(502), 1, + anon_sym_LBRACE, + STATE(103), 1, + sym_constraint_block, + [5136] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(390), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5147] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(406), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5158] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(504), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5169] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(506), 1, + anon_sym_COLON, + ACTIONS(508), 1, + anon_sym_BANG, + [5182] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_LPAREN, + STATE(275), 1, + sym_parameter_list, + [5195] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(510), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5206] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(512), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [5217] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(514), 1, + anon_sym_LBRACE, + STATE(54), 1, + sym_record_body, + [5230] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(516), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [5241] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(518), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [5252] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(520), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [5263] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(474), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [5274] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(522), 1, + anon_sym_COLON, + ACTIONS(524), 1, + anon_sym_BANG, + [5287] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(526), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [5298] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(514), 1, + anon_sym_LBRACE, + STATE(43), 1, + sym_record_body, + [5311] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(528), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [5322] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(530), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [5333] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(410), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [5344] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(401), 2, + anon_sym_COMMA, + anon_sym_COLON, + [5355] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(532), 1, + anon_sym_COLON, + ACTIONS(534), 1, + anon_sym_BANG, + [5368] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_LPAREN, + STATE(280), 1, + sym_parameter_list, + [5381] = 4, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(536), 1, + anon_sym_SEMI, + ACTIONS(538), 1, + anon_sym_PIPE, + [5394] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(418), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [5405] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(540), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [5416] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(542), 1, + anon_sym_type, + [5426] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(544), 1, + anon_sym_RBRACE, + [5436] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(546), 1, + anon_sym_COMMA, + [5446] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(548), 1, + anon_sym_COMMA, + [5456] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(550), 1, + anon_sym_SEMI, + [5466] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(552), 1, + anon_sym_SEMI, + [5476] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(554), 1, + anon_sym_COLON, + [5486] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(556), 1, + anon_sym_COLON, + [5496] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(558), 1, + anon_sym_BQUOTE, + [5506] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(560), 1, + anon_sym_LBRACE, + [5516] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(562), 1, + anon_sym_type, + [5526] = 2, + ACTIONS(564), 1, + aux_sym_identifier_token2, + ACTIONS(5), 2, + sym_doc_comment, + sym_comment, + [5534] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(566), 1, + anon_sym_COLON, + [5544] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(568), 1, + anon_sym_COMMA, + [5554] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(570), 1, + anon_sym_SEMI, + [5564] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(572), 1, + anon_sym_EQ, + [5574] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(574), 1, + anon_sym_COLON, + [5584] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(576), 1, + anon_sym_SEMI, + [5594] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(578), 1, + anon_sym_COMMA, + [5604] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(580), 1, + anon_sym_COMMA, + [5614] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(582), 1, + anon_sym_EQ, + [5624] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(584), 1, + anon_sym_EQ, + [5634] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(586), 1, + anon_sym_LBRACE, + [5644] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(588), 1, + anon_sym_EQ, + [5654] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(590), 1, + anon_sym_COMMA, + [5664] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(592), 1, + anon_sym_COMMA, + [5674] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(594), 1, + anon_sym_SEMI, + [5684] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(596), 1, + anon_sym_SEMI, + [5694] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(598), 1, + anon_sym_COLON, + [5704] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(600), 1, + anon_sym_COLON, + [5714] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(602), 1, + anon_sym_COLON, + [5724] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(604), 1, + anon_sym_type, + [5734] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(606), 1, + anon_sym_error, + [5744] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(608), 1, + anon_sym_COLON, + [5754] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(610), 1, + anon_sym_COLON, + [5764] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(612), 1, + anon_sym_SEMI, + [5774] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(614), 1, + anon_sym_COMMA, + [5784] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(616), 1, + anon_sym_SEMI, + [5794] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(618), 1, + anon_sym_SEMI, + [5804] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(620), 1, + anon_sym_COLON, + [5814] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(622), 1, + anon_sym_LBRACE, + [5824] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_COLON, + [5834] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(626), 1, + anon_sym_RBRACE, + [5844] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(628), 1, + anon_sym_SEMI, + [5854] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(630), 1, + anon_sym_COLON, + [5864] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(632), 1, + anon_sym_SEMI, + [5874] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(634), 1, + anon_sym_SEMI, + [5884] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(636), 1, + anon_sym_SEMI, + [5894] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(638), 1, + anon_sym_SEMI, + [5904] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(640), 1, + anon_sym_COLON, + [5914] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(642), 1, + anon_sym_SEMI, + [5924] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(644), 1, + anon_sym_type, + [5934] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(646), 1, + anon_sym_COLON, + [5944] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(648), 1, + anon_sym_SEMI, + [5954] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(650), 1, + anon_sym_COLON, + [5964] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(652), 1, + anon_sym_COLON, + [5974] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(654), 1, + anon_sym_RBRACK, + [5984] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(656), 1, + anon_sym_SEMI, + [5994] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(658), 1, + anon_sym_SEMI, + [6004] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(660), 1, + anon_sym_BQUOTE, + [6014] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(662), 1, + anon_sym_SEMI, + [6024] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(664), 1, + anon_sym_COLON, + [6034] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(666), 1, + anon_sym_SEMI, + [6044] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(668), 1, + ts_builtin_sym_end, + [6054] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(670), 1, + anon_sym_SEMI, + [6064] = 2, + ACTIONS(672), 1, + aux_sym_identifier_token2, + ACTIONS(5), 2, + sym_doc_comment, + sym_comment, + [6072] = 3, + ACTIONS(3), 1, + sym_doc_comment, + ACTIONS(5), 1, + sym_comment, + ACTIONS(674), 1, + anon_sym_COMMA, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 59, + [SMALL_STATE(4)] = 118, + [SMALL_STATE(5)] = 150, + [SMALL_STATE(6)] = 182, + [SMALL_STATE(7)] = 235, + [SMALL_STATE(8)] = 288, + [SMALL_STATE(9)] = 341, + [SMALL_STATE(10)] = 394, + [SMALL_STATE(11)] = 444, + [SMALL_STATE(12)] = 494, + [SMALL_STATE(13)] = 544, + [SMALL_STATE(14)] = 594, + [SMALL_STATE(15)] = 644, + [SMALL_STATE(16)] = 694, + [SMALL_STATE(17)] = 744, + [SMALL_STATE(18)] = 794, + [SMALL_STATE(19)] = 844, + [SMALL_STATE(20)] = 894, + [SMALL_STATE(21)] = 944, + [SMALL_STATE(22)] = 994, + [SMALL_STATE(23)] = 1044, + [SMALL_STATE(24)] = 1094, + [SMALL_STATE(25)] = 1144, + [SMALL_STATE(26)] = 1194, + [SMALL_STATE(27)] = 1244, + [SMALL_STATE(28)] = 1291, + [SMALL_STATE(29)] = 1340, + [SMALL_STATE(30)] = 1389, + [SMALL_STATE(31)] = 1438, + [SMALL_STATE(32)] = 1487, + [SMALL_STATE(33)] = 1536, + [SMALL_STATE(34)] = 1585, + [SMALL_STATE(35)] = 1631, + [SMALL_STATE(36)] = 1677, + [SMALL_STATE(37)] = 1723, + [SMALL_STATE(38)] = 1769, + [SMALL_STATE(39)] = 1812, + [SMALL_STATE(40)] = 1855, + [SMALL_STATE(41)] = 1898, + [SMALL_STATE(42)] = 1931, + [SMALL_STATE(43)] = 1951, + [SMALL_STATE(44)] = 1971, + [SMALL_STATE(45)] = 1991, + [SMALL_STATE(46)] = 2011, + [SMALL_STATE(47)] = 2031, + [SMALL_STATE(48)] = 2051, + [SMALL_STATE(49)] = 2071, + [SMALL_STATE(50)] = 2091, + [SMALL_STATE(51)] = 2111, + [SMALL_STATE(52)] = 2131, + [SMALL_STATE(53)] = 2151, + [SMALL_STATE(54)] = 2171, + [SMALL_STATE(55)] = 2191, + [SMALL_STATE(56)] = 2229, + [SMALL_STATE(57)] = 2253, + [SMALL_STATE(58)] = 2273, + [SMALL_STATE(59)] = 2293, + [SMALL_STATE(60)] = 2313, + [SMALL_STATE(61)] = 2333, + [SMALL_STATE(62)] = 2353, + [SMALL_STATE(63)] = 2373, + [SMALL_STATE(64)] = 2393, + [SMALL_STATE(65)] = 2417, + [SMALL_STATE(66)] = 2437, + [SMALL_STATE(67)] = 2457, + [SMALL_STATE(68)] = 2477, + [SMALL_STATE(69)] = 2500, + [SMALL_STATE(70)] = 2518, + [SMALL_STATE(71)] = 2536, + [SMALL_STATE(72)] = 2566, + [SMALL_STATE(73)] = 2584, + [SMALL_STATE(74)] = 2602, + [SMALL_STATE(75)] = 2632, + [SMALL_STATE(76)] = 2650, + [SMALL_STATE(77)] = 2680, + [SMALL_STATE(78)] = 2710, + [SMALL_STATE(79)] = 2740, + [SMALL_STATE(80)] = 2762, + [SMALL_STATE(81)] = 2790, + [SMALL_STATE(82)] = 2818, + [SMALL_STATE(83)] = 2846, + [SMALL_STATE(84)] = 2868, + [SMALL_STATE(85)] = 2886, + [SMALL_STATE(86)] = 2904, + [SMALL_STATE(87)] = 2933, + [SMALL_STATE(88)] = 2962, + [SMALL_STATE(89)] = 2991, + [SMALL_STATE(90)] = 3016, + [SMALL_STATE(91)] = 3041, + [SMALL_STATE(92)] = 3068, + [SMALL_STATE(93)] = 3094, + [SMALL_STATE(94)] = 3116, + [SMALL_STATE(95)] = 3131, + [SMALL_STATE(96)] = 3154, + [SMALL_STATE(97)] = 3179, + [SMALL_STATE(98)] = 3204, + [SMALL_STATE(99)] = 3219, + [SMALL_STATE(100)] = 3234, + [SMALL_STATE(101)] = 3249, + [SMALL_STATE(102)] = 3266, + [SMALL_STATE(103)] = 3289, + [SMALL_STATE(104)] = 3304, + [SMALL_STATE(105)] = 3323, + [SMALL_STATE(106)] = 3348, + [SMALL_STATE(107)] = 3371, + [SMALL_STATE(108)] = 3386, + [SMALL_STATE(109)] = 3401, + [SMALL_STATE(110)] = 3416, + [SMALL_STATE(111)] = 3439, + [SMALL_STATE(112)] = 3462, + [SMALL_STATE(113)] = 3481, + [SMALL_STATE(114)] = 3496, + [SMALL_STATE(115)] = 3519, + [SMALL_STATE(116)] = 3542, + [SMALL_STATE(117)] = 3565, + [SMALL_STATE(118)] = 3588, + [SMALL_STATE(119)] = 3603, + [SMALL_STATE(120)] = 3626, + [SMALL_STATE(121)] = 3641, + [SMALL_STATE(122)] = 3655, + [SMALL_STATE(123)] = 3677, + [SMALL_STATE(124)] = 3691, + [SMALL_STATE(125)] = 3709, + [SMALL_STATE(126)] = 3727, + [SMALL_STATE(127)] = 3747, + [SMALL_STATE(128)] = 3758, + [SMALL_STATE(129)] = 3771, + [SMALL_STATE(130)] = 3788, + [SMALL_STATE(131)] = 3799, + [SMALL_STATE(132)] = 3810, + [SMALL_STATE(133)] = 3829, + [SMALL_STATE(134)] = 3842, + [SMALL_STATE(135)] = 3855, + [SMALL_STATE(136)] = 3866, + [SMALL_STATE(137)] = 3885, + [SMALL_STATE(138)] = 3898, + [SMALL_STATE(139)] = 3911, + [SMALL_STATE(140)] = 3924, + [SMALL_STATE(141)] = 3941, + [SMALL_STATE(142)] = 3954, + [SMALL_STATE(143)] = 3965, + [SMALL_STATE(144)] = 3976, + [SMALL_STATE(145)] = 3989, + [SMALL_STATE(146)] = 4008, + [SMALL_STATE(147)] = 4027, + [SMALL_STATE(148)] = 4040, + [SMALL_STATE(149)] = 4053, + [SMALL_STATE(150)] = 4066, + [SMALL_STATE(151)] = 4078, + [SMALL_STATE(152)] = 4094, + [SMALL_STATE(153)] = 4110, + [SMALL_STATE(154)] = 4126, + [SMALL_STATE(155)] = 4142, + [SMALL_STATE(156)] = 4158, + [SMALL_STATE(157)] = 4174, + [SMALL_STATE(158)] = 4190, + [SMALL_STATE(159)] = 4206, + [SMALL_STATE(160)] = 4222, + [SMALL_STATE(161)] = 4238, + [SMALL_STATE(162)] = 4254, + [SMALL_STATE(163)] = 4270, + [SMALL_STATE(164)] = 4286, + [SMALL_STATE(165)] = 4302, + [SMALL_STATE(166)] = 4318, + [SMALL_STATE(167)] = 4334, + [SMALL_STATE(168)] = 4350, + [SMALL_STATE(169)] = 4366, + [SMALL_STATE(170)] = 4382, + [SMALL_STATE(171)] = 4398, + [SMALL_STATE(172)] = 4414, + [SMALL_STATE(173)] = 4430, + [SMALL_STATE(174)] = 4446, + [SMALL_STATE(175)] = 4462, + [SMALL_STATE(176)] = 4478, + [SMALL_STATE(177)] = 4494, + [SMALL_STATE(178)] = 4510, + [SMALL_STATE(179)] = 4526, + [SMALL_STATE(180)] = 4542, + [SMALL_STATE(181)] = 4558, + [SMALL_STATE(182)] = 4574, + [SMALL_STATE(183)] = 4590, + [SMALL_STATE(184)] = 4606, + [SMALL_STATE(185)] = 4622, + [SMALL_STATE(186)] = 4636, + [SMALL_STATE(187)] = 4652, + [SMALL_STATE(188)] = 4668, + [SMALL_STATE(189)] = 4684, + [SMALL_STATE(190)] = 4700, + [SMALL_STATE(191)] = 4716, + [SMALL_STATE(192)] = 4726, + [SMALL_STATE(193)] = 4742, + [SMALL_STATE(194)] = 4754, + [SMALL_STATE(195)] = 4764, + [SMALL_STATE(196)] = 4780, + [SMALL_STATE(197)] = 4796, + [SMALL_STATE(198)] = 4812, + [SMALL_STATE(199)] = 4828, + [SMALL_STATE(200)] = 4844, + [SMALL_STATE(201)] = 4856, + [SMALL_STATE(202)] = 4872, + [SMALL_STATE(203)] = 4884, + [SMALL_STATE(204)] = 4896, + [SMALL_STATE(205)] = 4908, + [SMALL_STATE(206)] = 4922, + [SMALL_STATE(207)] = 4934, + [SMALL_STATE(208)] = 4950, + [SMALL_STATE(209)] = 4966, + [SMALL_STATE(210)] = 4979, + [SMALL_STATE(211)] = 4992, + [SMALL_STATE(212)] = 5005, + [SMALL_STATE(213)] = 5016, + [SMALL_STATE(214)] = 5029, + [SMALL_STATE(215)] = 5042, + [SMALL_STATE(216)] = 5053, + [SMALL_STATE(217)] = 5066, + [SMALL_STATE(218)] = 5077, + [SMALL_STATE(219)] = 5088, + [SMALL_STATE(220)] = 5099, + [SMALL_STATE(221)] = 5110, + [SMALL_STATE(222)] = 5123, + [SMALL_STATE(223)] = 5136, + [SMALL_STATE(224)] = 5147, + [SMALL_STATE(225)] = 5158, + [SMALL_STATE(226)] = 5169, + [SMALL_STATE(227)] = 5182, + [SMALL_STATE(228)] = 5195, + [SMALL_STATE(229)] = 5206, + [SMALL_STATE(230)] = 5217, + [SMALL_STATE(231)] = 5230, + [SMALL_STATE(232)] = 5241, + [SMALL_STATE(233)] = 5252, + [SMALL_STATE(234)] = 5263, + [SMALL_STATE(235)] = 5274, + [SMALL_STATE(236)] = 5287, + [SMALL_STATE(237)] = 5298, + [SMALL_STATE(238)] = 5311, + [SMALL_STATE(239)] = 5322, + [SMALL_STATE(240)] = 5333, + [SMALL_STATE(241)] = 5344, + [SMALL_STATE(242)] = 5355, + [SMALL_STATE(243)] = 5368, + [SMALL_STATE(244)] = 5381, + [SMALL_STATE(245)] = 5394, + [SMALL_STATE(246)] = 5405, + [SMALL_STATE(247)] = 5416, + [SMALL_STATE(248)] = 5426, + [SMALL_STATE(249)] = 5436, + [SMALL_STATE(250)] = 5446, + [SMALL_STATE(251)] = 5456, + [SMALL_STATE(252)] = 5466, + [SMALL_STATE(253)] = 5476, + [SMALL_STATE(254)] = 5486, + [SMALL_STATE(255)] = 5496, + [SMALL_STATE(256)] = 5506, + [SMALL_STATE(257)] = 5516, + [SMALL_STATE(258)] = 5526, + [SMALL_STATE(259)] = 5534, + [SMALL_STATE(260)] = 5544, + [SMALL_STATE(261)] = 5554, + [SMALL_STATE(262)] = 5564, + [SMALL_STATE(263)] = 5574, + [SMALL_STATE(264)] = 5584, + [SMALL_STATE(265)] = 5594, + [SMALL_STATE(266)] = 5604, + [SMALL_STATE(267)] = 5614, + [SMALL_STATE(268)] = 5624, + [SMALL_STATE(269)] = 5634, + [SMALL_STATE(270)] = 5644, + [SMALL_STATE(271)] = 5654, + [SMALL_STATE(272)] = 5664, + [SMALL_STATE(273)] = 5674, + [SMALL_STATE(274)] = 5684, + [SMALL_STATE(275)] = 5694, + [SMALL_STATE(276)] = 5704, + [SMALL_STATE(277)] = 5714, + [SMALL_STATE(278)] = 5724, + [SMALL_STATE(279)] = 5734, + [SMALL_STATE(280)] = 5744, + [SMALL_STATE(281)] = 5754, + [SMALL_STATE(282)] = 5764, + [SMALL_STATE(283)] = 5774, + [SMALL_STATE(284)] = 5784, + [SMALL_STATE(285)] = 5794, + [SMALL_STATE(286)] = 5804, + [SMALL_STATE(287)] = 5814, + [SMALL_STATE(288)] = 5824, + [SMALL_STATE(289)] = 5834, + [SMALL_STATE(290)] = 5844, + [SMALL_STATE(291)] = 5854, + [SMALL_STATE(292)] = 5864, + [SMALL_STATE(293)] = 5874, + [SMALL_STATE(294)] = 5884, + [SMALL_STATE(295)] = 5894, + [SMALL_STATE(296)] = 5904, + [SMALL_STATE(297)] = 5914, + [SMALL_STATE(298)] = 5924, + [SMALL_STATE(299)] = 5934, + [SMALL_STATE(300)] = 5944, + [SMALL_STATE(301)] = 5954, + [SMALL_STATE(302)] = 5964, + [SMALL_STATE(303)] = 5974, + [SMALL_STATE(304)] = 5984, + [SMALL_STATE(305)] = 5994, + [SMALL_STATE(306)] = 6004, + [SMALL_STATE(307)] = 6014, + [SMALL_STATE(308)] = 6024, + [SMALL_STATE(309)] = 6034, + [SMALL_STATE(310)] = 6044, + [SMALL_STATE(311)] = 6054, + [SMALL_STATE(312)] = 6064, + [SMALL_STATE(313)] = 6072, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(136), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(257), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(176), + [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [33] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(256), + [36] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(132), + [39] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(136), + [42] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(208), + [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(298), + [48] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(257), + [51] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(189), + [54] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(152), + [57] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(164), + [60] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(176), + [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1, 0, 0), + [65] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 3, 0, 0), + [67] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(100), + [71] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [75] = {.entry = {.count = 1, .reusable = true}}, SHIFT(258), + [77] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(153), + [81] = {.entry = {.count = 1, .reusable = true}}, SHIFT(206), + [83] = {.entry = {.count = 1, .reusable = false}}, SHIFT(133), + [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [89] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), + [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), + [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), + [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), + [107] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 2, 0, 1), + [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(177), + [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(217), + [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_self_definition, 3, 0, 0), + [117] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_definition, 4, 0, 8), + [119] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_use_statement, 5, 0, 12), + [121] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_body, 3, 0, 0), + [123] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_inline_type_definition, 6, 0, 14), + [125] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_item, 1, 0, 0), + [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_def_type_definition, 6, 0, 14), + [129] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_body, 2, 0, 0), + [131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_query_definition, 6, 0, 16), + [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_procedure_definition, 6, 0, 16), + [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscription_definition, 6, 0, 17), + [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_use_statement, 3, 0, 4), + [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_definition, 3, 0, 5), + [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(166), + [145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), + [147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(247), + [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), + [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(170), + [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), + [157] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_self_definition_repeat1, 2, 0, 0), + [159] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_self_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(132), + [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_self_definition, 4, 0, 0), + [164] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_inline_type_definition, 7, 0, 24), + [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_def_type_definition, 7, 0, 24), + [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_query_definition, 7, 0, 25), + [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_procedure_definition, 7, 0, 25), + [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscription_definition, 7, 0, 26), + [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_token_definition, 3, 0, 1), + [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 3, 0, 2), + [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_token_definition, 4, 0, 9), + [180] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_use_statement, 5, 0, 10), + [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_use_statement, 5, 0, 4), + [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_path_repeat1, 2, 0, 0), + [186] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_type_path_repeat1, 2, 0, 0), SHIFT_REPEAT(184), + [189] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_args, 4, 0, 0), + [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_args, 5, 0, 0), + [193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_args, 2, 0, 0), + [203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [205] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_args, 3, 0, 0), + [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_body_repeat1, 2, 0, 0), + [209] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_body_repeat1, 2, 0, 0), SHIFT_REPEAT(106), + [212] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_body_repeat1, 2, 0, 0), SHIFT_REPEAT(146), + [215] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_body_repeat1, 2, 0, 0), SHIFT_REPEAT(4), + [218] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_body_repeat1, 2, 0, 0), SHIFT_REPEAT(258), + [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [223] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_path, 2, 0, 0), + [227] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [231] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), + [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(229), + [235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), + [237] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), + [239] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), + [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_path, 1, 0, 0), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 4, 0, 6), + [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 3, 0, 3), + [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), + [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), + [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 1, 0, 0), + [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), + [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_object_type, 2, 0, 0), + [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [265] = {.entry = {.count = 1, .reusable = false}}, SHIFT(185), + [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), + [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_object_type, 3, 0, 0), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_type, 3, 0, 20), + [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_type, 1, 0, 0), + [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_union_type_repeat1, 2, 0, 0), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constrained_type, 3, 0, 21), + [281] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_union_type_repeat1, 2, 0, 0), SHIFT_REPEAT(27), + [284] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), + [286] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_non_union_type, 1, 0, 0), + [288] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reference_type, 1, 0, 0), + [290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_block, 2, 0, 0), + [292] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), + [298] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_type, 2, 0, 0), + [300] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_block, 3, 0, 0), + [302] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_constraint_block_repeat1, 2, 0, 0), + [304] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_constraint_block_repeat1, 2, 0, 0), SHIFT_REPEAT(4), + [307] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_constraint_block_repeat1, 2, 0, 0), SHIFT_REPEAT(258), + [310] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [312] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_return_type_repeat1, 2, 0, 0), + [314] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_type_repeat1, 2, 0, 0), SHIFT_REPEAT(188), + [317] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_type_repeat1, 2, 0, 0), SHIFT_REPEAT(4), + [320] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_type_repeat1, 2, 0, 0), SHIFT_REPEAT(258), + [323] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_self_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(146), + [326] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 5, 0, 23), + [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_object, 3, 0, 0), + [332] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_type_path, 1, 0, 0), SHIFT(184), + [335] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 4, 0, 15), + [337] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 7, 0, 28), + [339] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_null_literal, 1, 0, 0), + [341] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_array, 2, 0, 0), + [343] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 5, 0, 22), + [345] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_array, 3, 0, 0), + [347] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_value, 1, 0, 0), + [349] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1, 0, 0), + [351] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_type_path, 2, 0, 0), SHIFT(184), + [354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_object, 2, 0, 0), + [356] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 6, 0, 27), + [358] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 6, 0, 14), + [360] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_object, 4, 0, 0), + [362] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_type, 1, 0, 0), SHIFT(27), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [369] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_array, 4, 0, 0), + [371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_object, 5, 0, 0), + [373] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_array, 5, 0, 0), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(141), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [387] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_annotation_args_repeat1, 2, 0, 0), SHIFT_REPEAT(36), + [390] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_annotation_args_repeat1, 2, 0, 0), + [392] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [394] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [396] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [398] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_annotation_selectors_repeat1, 2, 0, 0), SHIFT_REPEAT(177), + [401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_annotation_selectors_repeat1, 2, 0, 0), + [403] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2, 0, 0), SHIFT_REPEAT(92), + [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2, 0, 0), + [408] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), + [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_annotation_object_repeat1, 2, 0, 0), + [412] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_annotation_object_repeat1, 2, 0, 0), SHIFT_REPEAT(221), + [415] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_annotation_array_repeat1, 2, 0, 0), SHIFT_REPEAT(38), + [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_annotation_array_repeat1, 2, 0, 0), + [420] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [422] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), + [424] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_import_block_repeat1, 2, 0, 0), + [426] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_import_block_repeat1, 2, 0, 0), SHIFT_REPEAT(122), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [445] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_item, 1, 0, 11), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(160), + [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(181), + [455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(182), + [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [459] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_error_definition, 2, 0, 11), + [461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(232), + [465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint, 4, 0, 13), + [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_error_definition, 3, 0, 1), + [469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [471] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_array_literal_repeat1, 2, 0, 0), SHIFT_REPEAT(90), + [474] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_array_literal_repeat1, 2, 0, 0), + [476] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [478] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [480] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), + [482] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [484] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [486] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [488] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [490] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), + [492] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_arg, 1, 0, 7), + [494] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_selectors, 2, 0, 0), + [496] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter, 4, 0, 22), + [498] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter, 4, 0, 23), + [500] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_selectors, 3, 0, 0), + [502] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [504] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter, 5, 0, 27), + [506] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [508] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [510] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter, 3, 0, 15), + [512] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constraint_value, 1, 0, 0), + [514] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [516] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_literal, 2, 0, 0), + [518] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_literal, 3, 0, 0), + [520] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_literal, 4, 0, 0), + [522] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [524] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), + [526] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_literal, 5, 0, 0), + [528] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_object_entry, 3, 0, 18), + [530] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation_arg, 3, 0, 13), + [532] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [534] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [536] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_type, 1, 0, 0), + [538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), + [540] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_item, 3, 0, 19), + [542] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [544] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [546] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), + [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [552] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_block, 2, 0, 0), + [554] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 4, 0, 0), + [556] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [558] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), + [562] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [564] = {.entry = {.count = 1, .reusable = false}}, SHIFT(255), + [566] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [568] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), + [570] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [572] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [576] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_type, 5, 0, 0), + [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), + [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [596] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_type, 6, 0, 0), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [600] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 5, 0, 0), + [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), + [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [612] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_block, 5, 0, 0), + [614] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [616] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_block, 4, 0, 0), + [618] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [626] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [636] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [640] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 3, 0, 0), + [642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [652] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 2, 0, 0), + [654] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [656] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_block, 3, 0, 0), + [658] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [660] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [662] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [664] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [666] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [668] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [670] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [672] = {.entry = {.count = 1, .reusable = false}}, SHIFT(306), + [674] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), +}; + +#ifdef __cplusplus +extern "C" { +#endif +#ifdef TREE_SITTER_HIDE_SYMBOLS +#define TS_PUBLIC +#elif defined(_WIN32) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) +#endif + +TS_PUBLIC const TSLanguage *tree_sitter_mlf(void) { + static const TSLanguage language = { + .abi_version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .supertype_count = SUPERTYPE_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .field_names = ts_field_names, + .field_map_slices = ts_field_map_slices, + .field_map_entries = ts_field_map_entries, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = (const void*)ts_lex_modes, + .lex_fn = ts_lex, + .primary_state_ids = ts_primary_state_ids, + .name = "mlf", + .max_reserved_word_set_size = 0, + .metadata = { + .major_version = 0, + .minor_version = 1, + .patch_version = 0, + }, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/tree-sitter-mlf/src/tree_sitter/alloc.h b/tree-sitter-mlf/src/tree_sitter/alloc.h new file mode 100644 index 0000000..1abdd12 --- /dev/null +++ b/tree-sitter-mlf/src/tree_sitter/alloc.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +// Allow clients to override allocation functions +#ifdef TREE_SITTER_REUSE_ALLOCATOR + +extern void *(*ts_current_malloc)(size_t size); +extern void *(*ts_current_calloc)(size_t count, size_t size); +extern void *(*ts_current_realloc)(void *ptr, size_t size); +extern void (*ts_current_free)(void *ptr); + +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#else + +#ifndef ts_malloc +#define ts_malloc malloc +#endif +#ifndef ts_calloc +#define ts_calloc calloc +#endif +#ifndef ts_realloc +#define ts_realloc realloc +#endif +#ifndef ts_free +#define ts_free free +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/tree-sitter-mlf/src/tree_sitter/array.h b/tree-sitter-mlf/src/tree_sitter/array.h new file mode 100644 index 0000000..56fc8cd --- /dev/null +++ b/tree-sitter-mlf/src/tree_sitter/array.h @@ -0,0 +1,330 @@ +#ifndef TREE_SITTER_ARRAY_H_ +#define TREE_SITTER_ARRAY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./alloc.h" + +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + +#define Array(T) \ + struct { \ + T *contents; \ + uint32_t size; \ + uint32_t capacity; \ + } + +/// Initialize an array. +#define array_init(self) \ + ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) + +/// Create an empty array. +#define array_new() \ + { NULL, 0, 0 } + +/// Get a pointer to the element at a given `index` in the array. +#define array_get(self, _index) \ + (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) + +/// Get a pointer to the first element in the array. +#define array_front(self) array_get(self, 0) + +/// Get a pointer to the last element in the array. +#define array_back(self) array_get(self, (self)->size - 1) + +/// Clear the array, setting its size to zero. Note that this does not free any +/// memory allocated for the array's contents. +#define array_clear(self) ((self)->size = 0) + +/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is +/// less than the array's current capacity, this function has no effect. +#define array_reserve(self, new_capacity) \ + ((self)->contents = _array__reserve( \ + (void *)(self)->contents, &(self)->capacity, \ + array_elem_size(self), new_capacity) \ + ) + +/// Free any memory allocated for this array. Note that this does not free any +/// memory allocated for the array's contents. +#define array_delete(self) \ + do { \ + if ((self)->contents) ts_free((self)->contents); \ + (self)->contents = NULL; \ + (self)->size = 0; \ + (self)->capacity = 0; \ + } while (0) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + do { \ + (self)->contents = _array__grow( \ + (void *)(self)->contents, (self)->size, &(self)->capacity, \ + 1, array_elem_size(self) \ + ); \ + (self)->contents[(self)->size++] = (element); \ + } while(0) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + do { \ + if ((count) == 0) break; \ + (self)->contents = _array__grow( \ + (self)->contents, (self)->size, &(self)->capacity, \ + count, array_elem_size(self) \ + ); \ + memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \ + (self)->size += (count); \ + } while (0) + +/// Append all elements from one array to the end of another. +#define array_push_all(self, other) \ + array_extend((self), (other)->size, (other)->contents) + +/// Append `count` elements to the end of the array, reading their values from the +/// `contents` pointer. +#define array_extend(self, count, other_contents) \ + (self)->contents = _array__splice( \ + (void*)(self)->contents, &(self)->size, &(self)->capacity, \ + array_elem_size(self), (self)->size, 0, count, other_contents \ + ) + +/// Remove `old_count` elements from the array starting at the given `index`. At +/// the same index, insert `new_count` new elements, reading their values from the +/// `new_contents` pointer. +#define array_splice(self, _index, old_count, new_count, new_contents) \ + (self)->contents = _array__splice( \ + (void *)(self)->contents, &(self)->size, &(self)->capacity, \ + array_elem_size(self), _index, old_count, new_count, new_contents \ + ) + +/// Insert one `element` into the array at the given `index`. +#define array_insert(self, _index, element) \ + (self)->contents = _array__splice( \ + (void *)(self)->contents, &(self)->size, &(self)->capacity, \ + array_elem_size(self), _index, 0, 1, &(element) \ + ) + +/// Remove one element from the array at the given `index`. +#define array_erase(self, _index) \ + _array__erase((void *)(self)->contents, &(self)->size, array_elem_size(self), _index) + +/// Pop the last element off the array, returning the element by value. +#define array_pop(self) ((self)->contents[--(self)->size]) + +/// Assign the contents of one array to another, reallocating if necessary. +#define array_assign(self, other) \ + (self)->contents = _array__assign( \ + (void *)(self)->contents, &(self)->size, &(self)->capacity, \ + (const void *)(other)->contents, (other)->size, array_elem_size(self) \ + ) + +/// Swap one array with another +#define array_swap(self, other) \ + do { \ + void *_array_swap_tmp = (void *)(self)->contents; \ + (self)->contents = (other)->contents; \ + (other)->contents = _array_swap_tmp; \ + _array__swap(&(self)->size, &(self)->capacity, \ + &(other)->size, &(other)->capacity); \ + } while (0) + +/// Get the size of the array contents +#define array_elem_size(self) (sizeof *(self)->contents) + +/// Search a sorted array for a given `needle` value, using the given `compare` +/// callback to determine the order. +/// +/// If an existing element is found to be equal to `needle`, then the `index` +/// out-parameter is set to the existing value's index, and the `exists` +/// out-parameter is set to true. Otherwise, `index` is set to an index where +/// `needle` should be inserted in order to preserve the sorting, and `exists` +/// is set to false. +#define array_search_sorted_with(self, compare, needle, _index, _exists) \ + _array__search_sorted(self, 0, compare, , needle, _index, _exists) + +/// Search a sorted array for a given `needle` value, using integer comparisons +/// of a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_with`. +#define array_search_sorted_by(self, field, needle, _index, _exists) \ + _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) + +/// Insert a given `value` into a sorted array, using the given `compare` +/// callback to determine the order. +#define array_insert_sorted_with(self, compare, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +/// Insert a given `value` into a sorted array, using integer comparisons of +/// a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_by`. +#define array_insert_sorted_by(self, field, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +// Private + +// Pointers to individual `Array` fields (rather than the entire `Array` itself) +// are passed to the various `_array__*` functions below to address strict aliasing +// violations that arises when the _entire_ `Array` struct is passed as `Array(void)*`. +// +// The `Array` type itself was not altered as a solution in order to avoid breakage +// with existing consumers (in particular, parsers with external scanners). + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(void* self_contents, uint32_t *size, + size_t element_size, uint32_t index) { + assert(index < *size); + char *contents = (char *)self_contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (*size - index - 1) * element_size); + (*size)--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void *_array__reserve(void *contents, uint32_t *capacity, + size_t element_size, uint32_t new_capacity) { + void *new_contents = contents; + if (new_capacity > *capacity) { + if (contents) { + new_contents = ts_realloc(contents, new_capacity * element_size); + } else { + new_contents = ts_malloc(new_capacity * element_size); + } + *capacity = new_capacity; + } + return new_contents; +} + +/// This is not what you're looking for, see `array_assign`. +static inline void *_array__assign(void* self_contents, uint32_t *self_size, uint32_t *self_capacity, + const void *other_contents, uint32_t other_size, size_t element_size) { + void *new_contents = _array__reserve(self_contents, self_capacity, element_size, other_size); + *self_size = other_size; + memcpy(new_contents, other_contents, *self_size * element_size); + return new_contents; +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(uint32_t *self_size, uint32_t *self_capacity, + uint32_t *other_size, uint32_t *other_capacity) { + uint32_t tmp_size = *self_size; + uint32_t tmp_capacity = *self_capacity; + *self_size = *other_size; + *self_capacity = *other_capacity; + *other_size = tmp_size; + *other_capacity = tmp_capacity; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void *_array__grow(void *contents, uint32_t size, uint32_t *capacity, + uint32_t count, size_t element_size) { + void *new_contents = contents; + uint32_t new_size = size + count; + if (new_size > *capacity) { + uint32_t new_capacity = *capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + new_contents = _array__reserve(contents, capacity, element_size, new_capacity); + } + return new_contents; +} + +/// This is not what you're looking for, see `array_splice`. +static inline void *_array__splice(void *self_contents, uint32_t *size, uint32_t *capacity, + size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = *size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= *size); + + void *new_contents = _array__reserve(self_contents, capacity, element_size, new_size); + + char *contents = (char *)new_contents; + if (*size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (*size - old_end) * element_size + ); + } + if (new_count > 0) { + if (elements) { + memcpy( + (contents + index * element_size), + elements, + new_count * element_size + ); + } else { + memset( + (contents + index * element_size), + 0, + new_count * element_size + ); + } + } + *size += new_count - old_count; + + return new_contents; +} + +/// A binary search routine, based on Rust's `std::slice::binary_search_by`. +/// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. +#define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ + do { \ + *(_index) = start; \ + *(_exists) = false; \ + uint32_t size = (self)->size - *(_index); \ + if (size == 0) break; \ + int comparison; \ + while (size > 1) { \ + uint32_t half_size = size / 2; \ + uint32_t mid_index = *(_index) + half_size; \ + comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ + if (comparison <= 0) *(_index) = mid_index; \ + size -= half_size; \ + } \ + comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ + if (comparison == 0) *(_exists) = true; \ + else if (comparison < 0) *(_index) += 1; \ + } while (0) + +/// Helper macro for the `_sorted_by` routines below. This takes the left (existing) +/// parameter by reference in order to work with the generic sorting function above. +#define _compare_int(a, b) ((int)*(a) - (int)(b)) + +#ifdef _MSC_VER +#pragma warning(pop) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/tree-sitter-mlf/src/tree_sitter/parser.h b/tree-sitter-mlf/src/tree_sitter/parser.h new file mode 100644 index 0000000..858107d --- /dev/null +++ b/tree-sitter-mlf/src/tree_sitter/parser.h @@ -0,0 +1,286 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +typedef struct TSLanguageMetadata { + uint8_t major_version; + uint8_t minor_version; + uint8_t patch_version; +} TSLanguageMetadata; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +// Used to index the field and supertype maps. +typedef struct { + uint16_t index; + uint16_t length; +} TSMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); + void (*log)(const TSLexer *, const char *, ...); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; + uint16_t reserved_word_set_id; +} TSLexerMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +typedef struct { + int32_t start; + int32_t end; +} TSCharacterRange; + +struct TSLanguage { + uint32_t abi_version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexerMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; + const char *name; + const TSSymbol *reserved_words; + uint16_t max_reserved_word_set_size; + uint32_t supertype_count; + const TSSymbol *supertype_symbols; + const TSMapSlice *supertype_map_slices; + const TSSymbol *supertype_map_entries; + TSLanguageMetadata metadata; +}; + +static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { + uint32_t index = 0; + uint32_t size = len - index; + while (size > 1) { + uint32_t half_size = size / 2; + uint32_t mid_index = index + half_size; + const TSCharacterRange *range = &ranges[mid_index]; + if (lookahead >= range->start && lookahead <= range->end) { + return true; + } else if (lookahead > range->end) { + index = mid_index; + } + size -= half_size; + } + const TSCharacterRange *range = &ranges[index]; + return (lookahead >= range->start && lookahead <= range->end); +} + +/* + * Lexer Macros + */ + +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + UNUSED \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define ADVANCE_MAP(...) \ + { \ + static const uint16_t map[] = { __VA_ARGS__ }; \ + for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ + if (map[i] == lookahead) { \ + state = map[i + 1]; \ + goto next_state; \ + } \ + } \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value) \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value), \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_name, children, precedence, prod_id) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_name, \ + .child_count = children, \ + .dynamic_precedence = precedence, \ + .production_id = prod_id \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/tree-sitter-mlf/tree-sitter.json b/tree-sitter-mlf/tree-sitter.json new file mode 100644 index 0000000..1dbddd0 --- /dev/null +++ b/tree-sitter-mlf/tree-sitter.json @@ -0,0 +1,34 @@ +{ + "grammars": [ + { + "name": "mlf", + "camelcase": "Mlf", + "scope": "source.mlf", + "path": ".", + "file-types": [ + "mlf" + ], + "highlights": [ + "queries/highlights.scm" + ] + } + ], + "metadata": { + "version": "0.1.0", + "license": "MIT", + "description": "MLF (Matt's Lexicon Format) grammar for tree-sitter", + "authors": [ + { + "name": "Matt" + } + ] + }, + "bindings": { + "c": false, + "go": false, + "node": true, + "python": false, + "rust": true, + "swift": false + } +} -- knotmirror 0.0.1