diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d3a8b5b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,39 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{json,toml,yml,gyp}] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.rs] +indent_style = space +indent_size = 4 + +[*.{c,cc,h}] +indent_style = space +indent_size = 4 + +[*.{py,pyi}] +indent_style = space +indent_size = 4 + +[*.swift] +indent_style = space +indent_size = 4 + +[*.go] +indent_style = tab +indent_size = 8 + +[Makefile] +indent_style = tab +indent_size = 8 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ffb52ab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +* text eol=lf + +src/*.json linguist-generated +src/parser.c linguist-generated +src/tree_sitter/* linguist-generated + +bindings/** linguist-generated +binding.gyp linguist-generated +setup.py linguist-generated +Makefile linguist-generated +Package.swift linguist-generated diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..cb143b9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,56 @@ +name: CI + +on: + push: + branches: [master] + paths: + - grammar.js + - src/** + - test/** + - bindings/** + - binding.gyp + pull_request: + paths: + - grammar.js + - src/** + - test/** + - bindings/** + - binding.gyp + +concurrency: + group: ${{github.workflow}}-${{github.ref}} + cancel-in-progress: true + +jobs: + test: + name: Test parser + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-14] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up tree-sitter + uses: tree-sitter/setup-action/cli@v1 + - name: Clone nvim-treesitter corpus + uses: actions/checkout@v4 + with: + repository: nvim-treesitter/nvim-treesitter + path: .tests/nvim-treesitter + sparse-checkout: queries/ + - name: Clone nvim-treesitter-textobjects corpus + uses: actions/checkout@v4 + with: + repository: nvim-treesitter/nvim-treesitter-textobjects + path: .tests/nvim-treesitter-textobjects + sparse-checkout: queries/ + - name: Run tests + uses: tree-sitter/parser-test-action@v2 + with: + test-rust: ${{runner.os == 'Linux'}} + - name: Parse files + uses: tree-sitter/parse-action@v4 + with: + files: .tests/*/queries/*/*.scm diff --git a/.gitignore b/.gitignore index a6b239c..a3635cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,40 @@ -.local -node_modules +# Rust artifacts +Cargo.lock +target/ + +# Node artifacts +build/ +node_modules/ +*.tgz + +# Swift artifacts +.build/ + +# Go artifacts +go.sum +_obj/ + +# Python artifacts +.venv/ +dist/ +*.egg-info +*.whl + +# C artifacts +*.a +*.so +*.so.* +*.dylib +*.dll +*.pc + +# Grammar volatiles +dsl.d.ts +*.wasm +*.obj +*.o + +# Other dirs +.tests/ +.local/ +parser/ diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..1640ef2 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,71 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "cc" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723" + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "regex" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "tree-sitter" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705bf7c0958d0171dd7d3a6542f2f4f21d87ed5f1dc8db52919d3a6bed9a359a" +dependencies = [ + "cc", + "regex", +] + +[[package]] +name = "tree-sitter-query" +version = "0.2.0" +dependencies = [ + "cc", + "tree-sitter", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4133b1b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "tree-sitter-query" +description = "TS query grammar for tree-sitter" +version = "0.3.0" +license = "Apache-2.0" +readme = "README.md" +keywords = ["incremental", "parsing", "tree-sitter", "query"] +categories = ["parsing", "text-editors"] +repository = "https://github.com/tree-sitter-grammars/tree-sitter-query" +authors = ["Steven Sojka", "Stephan Seitz"] +edition = "2021" +autoexamples = false + +build = "bindings/rust/build.rs" +include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter = ">=0.21.0" + +[build-dependencies] +cc = "^1.0.89" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b9b196a --- /dev/null +++ b/Makefile @@ -0,0 +1,127 @@ +VERSION := 0.3.0 + +LANGUAGE_NAME := tree-sitter-query + +# repository +SRC_DIR := src + +PARSER_REPO_URL := $(shell git -C $(SRC_DIR) remote get-url origin 2>/dev/null) + +ifeq ($(PARSER_URL),) + PARSER_URL := $(subst .git,,$(PARSER_REPO_URL)) +ifeq ($(shell echo $(PARSER_URL) | grep '^[a-z][-+.0-9a-z]*://'),) + PARSER_URL := $(subst :,/,$(PARSER_URL)) + PARSER_URL := $(subst git@,https://,$(PARSER_URL)) +endif +endif + +TS ?= tree-sitter + +# ABI versioning +SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) +SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) + +# install directory layout +PREFIX ?= /usr/local +INCLUDEDIR ?= $(PREFIX)/include +LIBDIR ?= $(PREFIX)/lib +PCLIBDIR ?= $(LIBDIR)/pkgconfig + +# source/object files +PARSER := $(SRC_DIR)/parser.c +OBJS := $(PARSER:.c=.o) + +# flags +ARFLAGS := rcs +override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC + +# OS-specific bits +ifeq ($(OS),Windows_NT) + $(error "Windows is not supported") +else ifeq ($(shell uname),Darwin) + SOEXT = dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib + LINKSHARED := $(LINKSHARED)-dynamiclib -Wl, + ifneq ($(ADDITIONAL_LIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS), + endif + LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SONAME_MAJOR).dylib,-rpath,@executable_path/../Frameworks +else + SOEXT = so + SOEXTVER_MAJOR = so.$(SONAME_MAJOR) + SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED := $(LINKSHARED)-shared -Wl, + ifneq ($(ADDITIONAL_LIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS) + endif + LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).so.$(SONAME_MAJOR) +endif +ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig +endif + +all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc + +lib$(LANGUAGE_NAME).a: $(OBJS) + $(AR) $(ARFLAGS) $@ $^ + +lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS) + $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ +ifneq ($(STRIP),) + $(STRIP) $@ +endif + +$(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in + sed -e 's|@URL@|$(PARSER_URL)|' \ + -e 's|@VERSION@|$(VERSION)|' \ + -e 's|@LIBDIR@|$(LIBDIR)|' \ + -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ + -e 's|@REQUIRES@|$(REQUIRES)|' \ + -e 's|@ADDITIONAL_LIBS@|$(ADDITIONAL_LIBS)|' \ + -e 's|=$(PREFIX)|=$${prefix}|' \ + -e 's|@PREFIX@|$(PREFIX)|' $< > $@ + +$(PARSER): $(SRC_DIR)/grammar.json + $(TS) generate --no-bindings $^ + +install: all + install -Dm644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h + install -Dm644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + install -Dm755 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a + install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) + +uninstall: + $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ + '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ + '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + +clean: + $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) + $(RM) -r parser/ .tests/ + +test: .tests/nvim-treesitter .tests/nvim-treesitter-textobjects + $(TS) test + $(TS) parse -q -s .tests/*/queries/*/*.scm + +parser/query.so: $(PARSER) + @mkdir -p parser + $(TS) build -o $@ + +.tests/%: + git clone --sparse --single-branch https://github.com/nvim-treesitter/$(@F) $@ + git -C $@ sparse-checkout set queries + +update: VERSION := $(shell awk -F '"' '/^ "version"/{print $$4}' package.json) +update: + sed -i Makefile -e 's/^VERSION := .*/VERSION := $(VERSION)/' + sed -i Cargo.toml -e 's/^version = .*/version = "$(VERSION)"/' + sed -i pyproject.toml -e 's/^version = .*/version = "$(VERSION)"/' + git add package.json package-lock.json Cargo.toml pyproject.toml Makefile + +.PHONY: all install uninstall clean test update diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..9b1694b --- /dev/null +++ b/Package.swift @@ -0,0 +1,45 @@ +// swift-tools-version:5.3 + +import PackageDescription + +let package = Package( + name: "TreeSitterQuery", + platforms: [.macOS(.v10_13), .iOS(.v11)], + products: [ + .library(name: "TreeSitterQuery", targets: ["TreeSitterQuery"]), + ], + dependencies: [], + targets: [ + .target(name: "TreeSitterQuery", + path: ".", + exclude: [ + "Cargo.toml", + "Makefile", + "binding.gyp", + "bindings/c", + "bindings/go", + "bindings/node", + "bindings/python", + "bindings/rust", + "examples", + "grammar.js", + "package.json", + "package-lock.json", + "pyproject.toml", + "setup.py", + "test", + "types", + ".tests", + ".editorconfig", + ".github", + ".gitignore", + ".gitattributes", + ], + sources: [ + "src/parser.c", + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")]) + ], + cLanguageStandard: .c11 +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..0797144 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# tree-sitter-query + +[![CI][ci]](https://github.com/tree-sitter-grammars/tree-sitter-query/actions/workflows/ci.yaml) +[![discord][discord]](https://discord.gg/w7nTvsVJhm) +[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org) + +A tree-sitter parser for tree-sitter query files (scheme-like). + +## References + +* [Queries](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#queries) + +[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter-grammars/tree-sitter-query/ci.yaml?logo=github&label=CI +[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord +[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix diff --git a/binding.gyp b/binding.gyp index ec4d6b5..c821f17 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,18 +1,20 @@ { "targets": [ { - "target_name": "tree_sitter_scheme_binding", + "target_name": "tree_sitter_query_binding", + "dependencies": [ + " + +typedef struct TSLanguage TSLanguage; + +extern "C" TSLanguage *tree_sitter_query(); + +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; + +Napi::Object Init(Napi::Env env, Napi::Object exports) { + exports["name"] = Napi::String::New(env, "query"); + auto language = Napi::External::New(env, tree_sitter_query()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; +} + +NODE_API_MODULE(tree_sitter_query_binding, Init) diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts new file mode 100644 index 0000000..efe259e --- /dev/null +++ b/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/bindings/node/index.js b/bindings/node/index.js new file mode 100644 index 0000000..6657bcf --- /dev/null +++ b/bindings/node/index.js @@ -0,0 +1,7 @@ +const root = require("path").join(__dirname, "..", ".."); + +module.exports = require("node-gyp-build")(root); + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} diff --git a/bindings/python/tree_sitter_query/__init__.py b/bindings/python/tree_sitter_query/__init__.py new file mode 100644 index 0000000..d262b9f --- /dev/null +++ b/bindings/python/tree_sitter_query/__init__.py @@ -0,0 +1,3 @@ +"Query grammar for tree-sitter" + +from ._binding import language diff --git a/bindings/python/tree_sitter_query/__init__.pyi b/bindings/python/tree_sitter_query/__init__.pyi new file mode 100644 index 0000000..5416666 --- /dev/null +++ b/bindings/python/tree_sitter_query/__init__.pyi @@ -0,0 +1 @@ +def language() -> int: ... diff --git a/bindings/python/tree_sitter_query/binding.c b/bindings/python/tree_sitter_query/binding.c new file mode 100644 index 0000000..a4e5abc --- /dev/null +++ b/bindings/python/tree_sitter_query/binding.c @@ -0,0 +1,27 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_query(void); + +static PyObject* _binding_language(PyObject *self, PyObject *args) { + return PyLong_FromVoidPtr(tree_sitter_query()); +} + +static PyMethodDef methods[] = { + {"language", _binding_language, METH_NOARGS, + "Get the tree-sitter language for this grammar."}, + {NULL, NULL, 0, NULL} +}; + +static struct PyModuleDef module = { + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "_binding", + .m_doc = NULL, + .m_size = -1, + .m_methods = methods +}; + +PyMODINIT_FUNC PyInit__binding(void) { + return PyModule_Create(&module); +} diff --git a/bindings/python/tree_sitter_query/py.typed b/bindings/python/tree_sitter_query/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs new file mode 100644 index 0000000..9230267 --- /dev/null +++ b/bindings/rust/build.rs @@ -0,0 +1,15 @@ +fn main() { + let src_dir = std::path::Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.include(src_dir); + + #[cfg(target_env = "msvc")] + c_config.flag("-utf-8"); + + 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("query"); +} diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs new file mode 100644 index 0000000..e4c375d --- /dev/null +++ b/bindings/rust/lib.rs @@ -0,0 +1,56 @@ +//! This crate provides query language support for the [tree-sitter][] parsing library. +//! +//! Typically, you will use the [language][language func] function to add this language to a +//! tree-sitter [Parser][], and then use the parser to parse some code: +//! +//! ``` +//! let code = r#" +//! (program +//! (named_node +//! name: (identifier))) +//! "#; +//! let mut parser = tree_sitter::Parser::new(); +//! parser.set_language(&tree_sitter_query::language()).expect("Error loading query grammar"); +//! 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 +//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter::Language; + +extern "C" { + fn tree_sitter_query() -> Language; +} + +/// 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_query() } +} + +/// 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"); + +/// The syntax highlight queries for this grammar. +pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/query/highlights.scm"); + +/// The language injection queries for this grammar. +pub const INJECTIONS_QUERY: &str = include_str!("../../queries/query/injections.scm"); + +#[cfg(test)] +mod tests { + #[test] + fn test_can_load_grammar() { + let mut parser = tree_sitter::Parser::new(); + parser + .set_language(&super::language()) + .expect("Error loading query language"); + } +} diff --git a/bindings/swift/TreeSitterQuery/query.h b/bindings/swift/TreeSitterQuery/query.h new file mode 100644 index 0000000..52404d7 --- /dev/null +++ b/bindings/swift/TreeSitterQuery/query.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_QUERY_H_ +#define TREE_SITTER_QUERY_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_query(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_QUERY_H_ diff --git a/corpus/statements.txt b/corpus/statements.txt deleted file mode 100644 index db30b77..0000000 --- a/corpus/statements.txt +++ /dev/null @@ -1,166 +0,0 @@ -=========== -Named nodes -=========== - -(program) - ---- - -(program - (named_node - name: (identifier))) - -=============== -Anonymous nodes -=============== - -(program) -"it" - ---- - -(program - (named_node - name: (identifier)) - (anonymous_node)) - -=============== -Field names -=============== - -(program - name: (identifier)) - ---- - -(program - (named_node - name: (identifier) - (field_definition - name: (identifier) - (named_node - name: (identifier))))) - -=============== -Quantifiers (+) -=============== - -(program - (identifier)+) - ---- - -(program - (named_node - name: (identifier) - (named_node - name: (identifier) - quantifier: (quantifier)))) - -=============== -Quantifiers (?) -=============== - -(program - (identifier)?) - ---- - -(program - (named_node - name: (identifier) - (named_node - name: (identifier) - quantifier: (quantifier)))) - -=============== -Quantifiers (*) -=============== - -(program - (identifier)*) - ---- - -(program - (named_node - name: (identifier) - (named_node - name: (identifier) - quantifier: (quantifier)))) - -====== -Groups -====== - -( - (comment) - (function_declaration) -) - ---- - -(program - (grouping - (named_node name: (identifier)) - (named_node name: (identifier)))) - -======== -Captures -======== - -(class_declaration - body: (class_body) @class.body @test) @blorg - ---- - -(program - (named_node name: (identifier) - (field_definition name: (identifier) - (named_node - name: (identifier) - (capture name: (identifier)) - (capture name: (identifier)))) - (capture name: (identifier)))) - -===== -Lists -===== - -[ - "?" - "+" - "-" -] @ops - ---- - -(program - (list - (anonymous_node) - (anonymous_node) - (anonymous_node) - (capture name: (identifier)))) - -========== -Predicates -========== - -( - (identifier) @v - (eq? @v "test") -) - ---- - -(program - (grouping - (named_node - name: (identifier) - (capture name: (identifier))) - (predicate - name: (identifier) - type: (predicate_type) - parameters: (parameters - (capture name: (identifier)) - (string))))) diff --git a/grammar.js b/grammar.js index 21a5e7e..3f3be91 100644 --- a/grammar.js +++ b/grammar.js @@ -1,53 +1,148 @@ +/// + +const PREC = { + IMMEDIATE_CHILD: 1, + + // Prefer a string over a comment + COMMENT: 1, + STRING: 2, + + WILDCARD_NODE: 1, +}; + +const IDENTIFIER = /[a-zA-Z0-9.\-_\$]+/; + module.exports = grammar({ - name: "scheme", + name: "query", + + extras: $ => [ + $.comment, + /\s+/, + ], + + supertypes: $ => [ + $.definition, + ], + rules: { - program: $ => repeat($._definition), - _definition: $ => + program: $ => repeat($.definition), + + definition: $ => choice( + $.named_node, + $.anonymous_node, + $.grouping, + $.predicate, + $.alternation, + $.field_definition, + ), + + // Expressions that are valid inside a group. + _group_expression: $ => choice( + $.definition, + immediate_child($._group_expression), + ), + + // Expressions that are valid inside a named node. + _named_node_expression: $ => choice( + $.definition, + $.negated_field, + immediate_child($._named_node_expression), + ), + + // Taken from https://github.com/tree-sitter/tree-sitter-javascript/blob/3f8b62f9befd3cb3b4cb0de22f6595a0aadf76ca/grammar.js#L827 + escape_sequence: _ => token.immediate(seq( + '\\', choice( - $.named_node, - $.anonymous_node, - $.grouping, - $.predicate, - $.list, - $.comment + /[^xu0-7]/, + /[0-7]{1,3}/, + /x[0-9a-fA-F]{2}/, + /u[0-9a-fA-F]{4}/, + /u\{[0-9a-fA-F]+\}/ + ) + )), + + quantifier: _ => choice("*", "+", "?"), + + identifier: _ => IDENTIFIER, + _immediate_identifier: $ => alias(token.immediate(IDENTIFIER), $.identifier), + _node_identifier: $ => choice($.identifier, prec(PREC.WILDCARD_NODE, "_")), + capture: $ => seq("@", field("name", $._immediate_identifier)), + string: $ => seq( + '"', + optional($.string_content), + '"', + ), + string_content: $ => repeat1(choice(token.immediate(prec(PREC.STRING, /[^"\\]+/)), $.escape_sequence)), + parameters: $ => repeat1(choice($.capture, $.string, $._node_identifier)), + comment: _ => token(prec(PREC.COMMENT, seq(";", /.*/))), + alternation: $ => seq("[", repeat($.definition), "]", quantifier($), captures($)), + + grouping: $ => seq( + "(", + repeat(seq($._group_expression, optional("."))), + ")", + quantifier($), + captures($), + ), + + anonymous_node: $ => seq( + field("name", choice($.string, "_")), + quantifier($), + captures($), + ), + + named_node: $ => seq( + "(", + choice( + field("name", $._node_identifier), + seq(field("supertype", $.identifier), token.immediate('/'), field("name", $._immediate_identifier)), ), - _field_name: $ => seq($.identifier, ":"), - predicate_type: $ => choice("?", "!"), - quantifier: $ => choice("*", "+", "?"), - field_definition: $ => seq(field("name", $._field_name), $._definition), - identifier: $ => /[a-zA-Z0-9.\-_\$#]+/, - capture: $ => seq("@", field("name", $.identifier)), - string: $ => /".*"/, - parameters: $ => repeat1(choice($.capture, $.string)), - comment: $ => seq(";", /.*/), - list: $ => seq("[", repeat($._definition), "]", quantifier($), captures($)), - grouping: $ => - seq("(", repeat($._definition), ")", quantifier($), captures($)), - anonymous_node: $ => - seq(/".*"/, optional(field("quantifier", $.quantifier)), captures($)), - named_node: $ => - seq( - "(", - field("name", $.identifier), - repeat(choice($._definition, $.field_definition)), - ")", - quantifier($), - captures($) + optional( + seq( + optional("."), + choice( + repeat1($._named_node_expression), + seq( + repeat($._named_node_expression), + seq($._named_node_expression, "."), + ) + ), + ), ), + ")", + quantifier($), + captures($), + ), + _field_name: $ => seq($.identifier, ":"), + field_definition: $ => seq( + field("name", $._field_name), + $.definition, + ), + + negated_field: $ => seq("!", $.identifier), + predicate: $ => seq( "(", - field("name", seq($.identifier, field("type", $.predicate_type))), + field("name", seq("#", $._immediate_identifier, field("type", $.predicate_type))), field("parameters", $.parameters), ")" - ) + ), + predicate_type: _ => token.immediate(choice("?", "!")), } }); function captures($) { - return optional(repeat($.capture)); + return repeat($.capture); } function quantifier($) { return optional(field("quantifier", $.quantifier)); } + +function immediate_child(expression) { + return prec.left( + PREC.IMMEDIATE_CHILD, + seq(expression, ".", expression), + ); +} diff --git a/index.js b/index.js deleted file mode 100644 index adecfac..0000000 --- a/index.js +++ /dev/null @@ -1,13 +0,0 @@ -try { - module.exports = require("./build/Release/tree_sitter_scheme_binding"); -} catch (error) { - try { - module.exports = require("./build/Debug/tree_sitter_scheme_binding"); - } catch (_) { - throw error - } -} - -try { - module.exports.nodeTypeInfo = require("./src/node-types.json"); -} catch (_) {} diff --git a/package-lock.json b/package-lock.json index 73c2f05..d9f0836 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,646 @@ { - "name": "tree-sitter-scheme", - "version": "1.0.0", - "lockfileVersion": 1, + "name": "tree-sitter-query", + "version": "0.3.0", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "tree-sitter-query", + "version": "0.3.0", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" + }, + "devDependencies": { + "prebuildify": "^6.0.0", + "tree-sitter-cli": "^0.22.6" + }, + "peerDependencies": { + "tree-sitter": "^0.21.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" + } + ] + }, + "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, + "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" + } + ], + "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 + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/execspawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/execspawn/-/execspawn-1.0.1.tgz", + "integrity": "sha512-s2k06Jy9i8CUkYe0+DxRlvtkZoOkwwfhB+Xxo5HGUtrISVW2m98jO2tr67DGRFxZwkjQqloA3v/tNtjhBRBieg==", + "dev": true, + "dependencies": { + "util-extend": "^1.0.1" + } + }, + "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 + }, + "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" + } + ] + }, + "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 + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "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 + }, + "node_modules/node-abi": { + "version": "3.56.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.56.0.tgz", + "integrity": "sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.0.0.tgz", + "integrity": "sha512-ipO7rsHEBqa9STO5C5T10fj732ml+5kLN1cAG8/jdHd56ldQeGj3Q7+scUS+VHK/qy1zLEwC4wMK5+yM0btPvw==", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "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, + "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, + "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, + "engines": { + "node": ">=8" + } + }, + "node_modules/prebuildify": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/prebuildify/-/prebuildify-6.0.0.tgz", + "integrity": "sha512-DEvK4C3tcimIp7Pzqbs036n9i6CTKGp1XVEpMnr4wV3enKU5sBogPP+lP3KZw7993i42bXnsd5eIxAXQ566Cqw==", + "dev": true, + "dependencies": { + "execspawn": "^1.0.1", + "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.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "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, + "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" + } + ] + }, + "node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "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, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "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, + "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": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.21.0.tgz", + "integrity": "sha512-WDhpLxQdW7wsmmnBsf4NGqnEKs+Kxljk/CfbJJxgzZiinfA1gAWnhi/GirQjClw+woXhYsNq930BlskFulMMBQ==", + "hasInstallScript": true, + "peer": true, + "dependencies": { + "node-addon-api": "^7.1.0", + "node-gyp-build": "^4.8.0" + } + }, + "node_modules/tree-sitter-cli": { + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.22.2.tgz", + "integrity": "sha512-ecqccEp27XMFXgjLMEEU71vK9JCWAC7fqSTTxcs5P1tnEnaaf4GkHz/wfo4lJ9l3rfxcTDPxN84tHAoitIQqdA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "tree-sitter": "cli.js" + } + }, + "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 + }, + "node_modules/util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", + "dev": true + }, + "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 + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + }, "dependencies": { - "nan": { - "version": "2.14.1", - "resolved": "https://artifactory.associatesys.local/artifactory/api/npm/npm-virtual/nan/-/nan-2.14.1.tgz", - "integrity": "sha1-174036MQW5FJTDFHCJMV7/iHSwE=" + "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 + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "execspawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/execspawn/-/execspawn-1.0.1.tgz", + "integrity": "sha512-s2k06Jy9i8CUkYe0+DxRlvtkZoOkwwfhB+Xxo5HGUtrISVW2m98jO2tr67DGRFxZwkjQqloA3v/tNtjhBRBieg==", + "dev": true, + "requires": { + "util-extend": "^1.0.1" + } + }, + "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 + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "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 + }, + "node-abi": { + "version": "3.56.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.56.0.tgz", + "integrity": "sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==", + "dev": true, + "requires": { + "semver": "^7.3.5" + } + }, + "node-addon-api": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.0.0.tgz", + "integrity": "sha512-ipO7rsHEBqa9STO5C5T10fj732ml+5kLN1cAG8/jdHd56ldQeGj3Q7+scUS+VHK/qy1zLEwC4wMK5+yM0btPvw==" + }, + "node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==" + }, + "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, + "requires": { + "path-key": "^3.0.0" + } + }, + "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, + "requires": { + "wrappy": "1" + } + }, + "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 + }, + "prebuildify": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/prebuildify/-/prebuildify-6.0.0.tgz", + "integrity": "sha512-DEvK4C3tcimIp7Pzqbs036n9i6CTKGp1XVEpMnr4wV3enKU5sBogPP+lP3KZw7993i42bXnsd5eIxAXQ566Cqw==", + "dev": true, + "requires": { + "execspawn": "^1.0.1", + "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" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "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, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "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 + }, + "semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "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, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "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, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "tree-sitter": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.21.0.tgz", + "integrity": "sha512-WDhpLxQdW7wsmmnBsf4NGqnEKs+Kxljk/CfbJJxgzZiinfA1gAWnhi/GirQjClw+woXhYsNq930BlskFulMMBQ==", + "peer": true, + "requires": { + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" + } }, "tree-sitter-cli": { - "version": "0.16.9", - "resolved": "https://artifactory.associatesys.local/artifactory/api/npm/npm-virtual/tree-sitter-cli/-/tree-sitter-cli-0.16.9.tgz", - "integrity": "sha1-5w8DOJppQRmyc8xi9FeiV7Ix6ts=", + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.22.2.tgz", + "integrity": "sha512-ecqccEp27XMFXgjLMEEU71vK9JCWAC7fqSTTxcs5P1tnEnaaf4GkHz/wfo4lJ9l3rfxcTDPxN84tHAoitIQqdA==", + "dev": true + }, + "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 + }, + "util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", + "dev": true + }, + "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 + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } diff --git a/package.json b/package.json index a1e7bcd..924db8c 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,68 @@ { - "name": "tree-sitter-scheme", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", + "name": "tree-sitter-query", + "version": "0.3.0", + "description": "TS query grammar for tree-sitter", + "repository": "tree-sitter-grammars/tree-sitter-query", + "author": "Steven Sojka", + "maintainers": [ + "Stephan Seitz" + ], + "license": "Apache-2.0", + "main": "bindings/node", + "types": "bindings/node", + "keywords": [ + "incremental", + "parsing", + "tree-sitter", + "query" + ], + "files": [ + "grammar.js", + "binding.gyp", + "types/dsl.d.ts", + "bindings/node/*", + "queries/**", + "src/**" + ], "dependencies": { - "nan": "^2.14.1" + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" + }, + "peerDependencies": { + "tree-sitter": "^0.21.0" + }, + "peerDependenciesMeta": { + "tree_sitter": { + "optional": true + } }, "devDependencies": { - "tree-sitter-cli": "^0.16.9" - } + "tree-sitter-cli": "^0.22.6", + "prebuildify": "^6.0.0" + }, + "overrides": { + "tree-sitter": { + "node-addon-api": "$node-addon-api" + } + }, + "scripts": { + "build": "prebuildify --napi --strip", + "install": "node-gyp-build", + "prestart": "tree-sitter build --wasm -o tree-sitter-query.wasm", + "start": "tree-sitter playground", + "test": "make test", + "version": "make -s update", + "prebuildify": "prebuildify --napi --strip" + }, + "tree-sitter": [ + { + "scope": "source.query", + "injection-regex": "^query$", + "highlights": "queries/query/highlights.scm", + "injections": "queries/query/injections.scm", + "file-types": [ + "scm" + ] + } + ] } diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9746971 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-query" +description = "Query grammar for tree-sitter" +version = "0.3.0" +keywords = ["incremental", "parsing", "tree-sitter", "query"] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed" +] +requires-python = ">=3.8" +license.text = "Apache-2.0" +readme = "README.md" + +[project.urls] +Homepage = "https://github.com/tree-sitter-grammars/tree-sitter-query" + +[project.optional-dependencies] +core = ["tree-sitter~=0.22"] + +[tool.cibuildwheel] +build = "cp38-*" +build-frontend = "build" diff --git a/queries/query/folds.scm b/queries/query/folds.scm new file mode 100644 index 0000000..47dd965 --- /dev/null +++ b/queries/query/folds.scm @@ -0,0 +1,6 @@ +[ + (named_node) + (predicate) + (grouping) + (list) +] @fold diff --git a/queries/query/highlights.scm b/queries/query/highlights.scm new file mode 100644 index 0000000..d909df1 --- /dev/null +++ b/queries/query/highlights.scm @@ -0,0 +1,87 @@ +(string) @string + +(escape_sequence) @string.escape + +(capture + (identifier) @type) + +(anonymous_node + (string) @string) + +(predicate + name: (identifier) @function.call) + +(named_node + name: (identifier) @variable) + +(field_definition + name: (identifier) @property) + +(negated_field + "!" @operator + (identifier) @property) + +(comment) @comment @spell + +(quantifier) @operator + +(predicate_type) @punctuation.special + +"." @operator + +[ + "[" + "]" + "(" + ")" +] @punctuation.bracket + +":" @punctuation.delimiter + +[ + "@" + "#" +] @punctuation.special + +"_" @constant + +((parameters + (identifier) @number) + (#match? @number "^[-+]?[0-9]+(.[0-9]+)?$")) + +((program + . + (comment)* + . + (comment) @keyword.import) + (#lua-match? @keyword.import "^;+ *inherits *:")) + +((program + . + (comment)* + . + (comment) @keyword.directive) + (#lua-match? @keyword.directive "^;+ *extends *$")) + +((comment) @keyword.directive + (#lua-match? @keyword.directive "^;+%s*format%-ignore%s*$")) + +((predicate + name: (identifier) @_name + parameters: + (parameters + (string + "\"" @string + "\"" @string) @string.regexp)) + (#any-of? @_name "match" "not-match" "vim-match" "not-vim-match" "lua-match" "not-lua-match")) + +((predicate + name: (identifier) @_name + parameters: + (parameters + (string + "\"" @string + "\"" @string) @string.regexp + . + (string) .)) + (#any-of? @_name "gsub" "not-gsub")) diff --git a/queries/query/injections.scm b/queries/query/injections.scm new file mode 100644 index 0000000..dd1a855 --- /dev/null +++ b/queries/query/injections.scm @@ -0,0 +1,31 @@ +((predicate + name: (identifier) @_name + parameters: + (parameters + (string) @injection.content)) + (#any-of? @_name "match" "not-match" "vim-match" "not-vim-match") + (#set! injection.language "regex") + (#offset! @injection.content 0 1 0 -1)) + +((predicate + name: (identifier) @_name + parameters: + (parameters + (string) @injection.content)) + (#any-of? @_name "lua-match" "not-lua-match") + (#set! injection.language "luap") + (#offset! @injection.content 0 1 0 -1)) + +((predicate + name: (identifier) @_name + parameters: + (parameters + (string) @injection.content + . + (string) .)) + (#any-of? @_name "gsub" "not-gsub") + (#set! injection.language "luap") + (#offset! @injection.content 0 1 0 -1)) + +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e568b11 --- /dev/null +++ b/setup.py @@ -0,0 +1,56 @@ +from os.path import isdir, join +from platform import system + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from wheel.bdist_wheel import bdist_wheel + + +class Build(build): + def run(self): + if isdir("queries"): + dest = join(self.build_lib, "tree_sitter_query", "queries") + self.copy_tree("queries", dest) + super().run() + + +class BdistWheel(bdist_wheel): + def get_tag(self): + python, abi, platform = super().get_tag() + if python.startswith("cp"): + python, abi = "cp38", "abi3" + return python, abi, platform + + +setup( + packages=find_packages("bindings/python"), + package_dir={"": "bindings/python"}, + package_data={ + "tree_sitter_query": ["*.pyi", "py.typed"], + "tree_sitter_query.queries": ["*.scm"], + }, + ext_package="tree_sitter_query", + ext_modules=[ + Extension( + name="_binding", + sources=[ + "bindings/python/tree_sitter_query/binding.c", + "src/parser.c", + ], + extra_compile_args=( + ["-std=c11"] if system() != 'Windows' else [] + ), + define_macros=[ + ("Py_LIMITED_API", "0x03080000"), + ("PY_SSIZE_T_CLEAN", None) + ], + include_dirs=["src"], + py_limited_api=True, + ) + ], + cmdclass={ + "build": Build, + "bdist_wheel": BdistWheel + }, + zip_safe=False +) diff --git a/src/binding.cc b/src/binding.cc deleted file mode 100644 index 8c61391..0000000 --- a/src/binding.cc +++ /dev/null @@ -1,28 +0,0 @@ -#include "tree_sitter/parser.h" -#include -#include "nan.h" - -using namespace v8; - -extern "C" TSLanguage * tree_sitter_scheme(); - -namespace { - -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_scheme()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("scheme").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); -} - -NODE_MODULE(tree_sitter_scheme_binding, Init) - -} // namespace diff --git a/src/grammar.json b/src/grammar.json index af05427..be3476b 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,14 +1,14 @@ { - "name": "scheme", + "name": "query", "rules": { "program": { "type": "REPEAT", "content": { "type": "SYMBOL", - "name": "_definition" + "name": "definition" } }, - "_definition": { + "definition": { "type": "CHOICE", "members": [ { @@ -29,40 +29,115 @@ }, { "type": "SYMBOL", - "name": "list" + "name": "alternation" }, { "type": "SYMBOL", - "name": "comment" + "name": "field_definition" } ] }, - "_field_name": { - "type": "SEQ", + "_group_expression": { + "type": "CHOICE", "members": [ { "type": "SYMBOL", - "name": "identifier" + "name": "definition" }, { - "type": "STRING", - "value": ":" + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_group_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_group_expression" + } + ] + } } ] }, - "predicate_type": { + "_named_node_expression": { "type": "CHOICE", "members": [ { - "type": "STRING", - "value": "?" + "type": "SYMBOL", + "name": "definition" }, { - "type": "STRING", - "value": "!" + "type": "SYMBOL", + "name": "negated_field" + }, + { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_named_node_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_named_node_expression" + } + ] + } } ] }, + "escape_sequence": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^xu0-7]" + }, + { + "type": "PATTERN", + "value": "[0-7]{1,3}" + }, + { + "type": "PATTERN", + "value": "x[0-9a-fA-F]{2}" + }, + { + "type": "PATTERN", + "value": "u[0-9a-fA-F]{4}" + }, + { + "type": "PATTERN", + "value": "u\\{[0-9a-fA-F]+\\}" + } + ] + } + ] + } + }, "quantifier": { "type": "CHOICE", "members": [ @@ -80,27 +155,39 @@ } ] }, - "field_definition": { - "type": "SEQ", + "identifier": { + "type": "PATTERN", + "value": "[a-zA-Z0-9.\\-_\\$]+" + }, + "_immediate_identifier": { + "type": "ALIAS", + "content": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[a-zA-Z0-9.\\-_\\$]+" + } + }, + "named": true, + "value": "identifier" + }, + "_node_identifier": { + "type": "CHOICE", "members": [ { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "_field_name" - } + "type": "SYMBOL", + "name": "identifier" }, { - "type": "SYMBOL", - "name": "_definition" + "type": "PREC", + "value": 1, + "content": { + "type": "STRING", + "value": "_" + } } ] }, - "identifier": { - "type": "PATTERN", - "value": "[a-zA-Z0-9.\\-_\\$#]+" - }, "capture": { "type": "SEQ", "members": [ @@ -113,14 +200,58 @@ "name": "name", "content": { "type": "SYMBOL", - "name": "identifier" + "name": "_immediate_identifier" } } ] }, "string": { - "type": "PATTERN", - "value": "\".*\"" + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_content" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + "string_content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 2, + "content": { + "type": "PATTERN", + "value": "[^\"\\\\]+" + } + } + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + } + ] + } }, "parameters": { "type": "REPEAT1", @@ -134,24 +265,35 @@ { "type": "SYMBOL", "name": "string" + }, + { + "type": "SYMBOL", + "name": "_node_identifier" } ] } }, "comment": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": ";" - }, - { - "type": "PATTERN", - "value": ".*" + "type": "TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "PATTERN", + "value": ".*" + } + ] } - ] + } }, - "list": { + "alternation": { "type": "SEQ", "members": [ { @@ -162,7 +304,7 @@ "type": "REPEAT", "content": { "type": "SYMBOL", - "name": "_definition" + "name": "definition" } }, { @@ -186,19 +328,11 @@ ] }, { - "type": "CHOICE", - "members": [ - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "capture" - } - }, - { - "type": "BLANK" - } - ] + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "capture" + } } ] }, @@ -212,8 +346,25 @@ { "type": "REPEAT", "content": { - "type": "SYMBOL", - "name": "_definition" + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_group_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "BLANK" + } + ] + } + ] } }, { @@ -236,128 +387,239 @@ } ] }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "capture" + } + } + ] + }, + "anonymous_node": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "STRING", + "value": "_" + } + ] + } + }, { "type": "CHOICE", "members": [ { - "type": "REPEAT", + "type": "FIELD", + "name": "quantifier", "content": { "type": "SYMBOL", - "name": "capture" + "name": "quantifier" } }, { "type": "BLANK" } ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "capture" + } } ] }, - "anonymous_node": { + "named_node": { "type": "SEQ", "members": [ { - "type": "PATTERN", - "value": "\".*\"" + "type": "STRING", + "value": "(" }, { "type": "CHOICE", "members": [ { "type": "FIELD", - "name": "quantifier", + "name": "name", "content": { "type": "SYMBOL", - "name": "quantifier" + "name": "_node_identifier" } }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "supertype", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "/" + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_immediate_identifier" + } + } + ] + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_named_node_expression" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_named_node_expression" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_named_node_expression" + }, + { + "type": "STRING", + "value": "." + } + ] + } + ] + } + ] + } + ] + }, { "type": "BLANK" } ] }, + { + "type": "STRING", + "value": ")" + }, { "type": "CHOICE", "members": [ { - "type": "REPEAT", + "type": "FIELD", + "name": "quantifier", "content": { "type": "SYMBOL", - "name": "capture" + "name": "quantifier" } }, { "type": "BLANK" } ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "capture" + } } ] }, - "named_node": { + "_field_name": { "type": "SEQ", "members": [ { - "type": "STRING", - "value": "(" + "type": "SYMBOL", + "name": "identifier" }, + { + "type": "STRING", + "value": ":" + } + ] + }, + "field_definition": { + "type": "SEQ", + "members": [ { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", - "name": "identifier" + "name": "_field_name" } }, { - "type": "REPEAT", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_definition" - }, - { - "type": "SYMBOL", - "name": "field_definition" - } - ] - } - }, + "type": "SYMBOL", + "name": "definition" + } + ] + }, + "negated_field": { + "type": "SEQ", + "members": [ { "type": "STRING", - "value": ")" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "FIELD", - "name": "quantifier", - "content": { - "type": "SYMBOL", - "name": "quantifier" - } - }, - { - "type": "BLANK" - } - ] + "value": "!" }, { - "type": "CHOICE", - "members": [ - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "capture" - } - }, - { - "type": "BLANK" - } - ] + "type": "SYMBOL", + "name": "identifier" } ] }, @@ -374,9 +636,13 @@ "content": { "type": "SEQ", "members": [ + { + "type": "STRING", + "value": "#" + }, { "type": "SYMBOL", - "name": "identifier" + "name": "_immediate_identifier" }, { "type": "FIELD", @@ -402,17 +668,39 @@ "value": ")" } ] + }, + "predicate_type": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "STRING", + "value": "!" + } + ] + } } }, "extras": [ + { + "type": "SYMBOL", + "name": "comment" + }, { "type": "PATTERN", - "value": "\\s" + "value": "\\s+" } ], "conflicts": [], + "precedences": [], "externals": [], "inline": [], - "supertypes": [] + "supertypes": [ + "definition" + ] } - diff --git a/src/node-types.json b/src/node-types.json index b46d67d..86a6e37 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1,6 +1,36 @@ [ { - "type": "anonymous_node", + "type": "definition", + "named": true, + "subtypes": [ + { + "type": "alternation", + "named": true + }, + { + "type": "anonymous_node", + "named": true + }, + { + "type": "field_definition", + "named": true + }, + { + "type": "grouping", + "named": true + }, + { + "type": "named_node", + "named": true + }, + { + "type": "predicate", + "named": true + } + ] + }, + { + "type": "alternation", "named": true, "fields": { "quantifier": { @@ -21,12 +51,16 @@ { "type": "capture", "named": true + }, + { + "type": "definition", + "named": true } ] } }, { - "type": "capture", + "type": "anonymous_node", "named": true, "fields": { "name": { @@ -34,17 +68,52 @@ "required": true, "types": [ { - "type": "identifier", + "type": "_", + "named": false + }, + { + "type": "string", + "named": true + } + ] + }, + "quantifier": { + "multiple": false, + "required": false, + "types": [ + { + "type": "quantifier", "named": true } ] } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "capture", + "named": true + } + ] } }, { - "type": "comment", + "type": "capture", "named": true, - "fields": {} + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } }, { "type": "field_definition", @@ -70,27 +139,7 @@ "required": true, "types": [ { - "type": "anonymous_node", - "named": true - }, - { - "type": "comment", - "named": true - }, - { - "type": "grouping", - "named": true - }, - { - "type": "list", - "named": true - }, - { - "type": "named_node", - "named": true - }, - { - "type": "predicate", + "type": "definition", "named": true } ] @@ -115,82 +164,12 @@ "multiple": true, "required": false, "types": [ - { - "type": "anonymous_node", - "named": true - }, - { - "type": "capture", - "named": true - }, - { - "type": "comment", - "named": true - }, - { - "type": "grouping", - "named": true - }, - { - "type": "list", - "named": true - }, - { - "type": "named_node", - "named": true - }, - { - "type": "predicate", - "named": true - } - ] - } - }, - { - "type": "list", - "named": true, - "fields": { - "quantifier": { - "multiple": false, - "required": false, - "types": [ - { - "type": "quantifier", - "named": true - } - ] - } - }, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "anonymous_node", - "named": true - }, { "type": "capture", "named": true }, { - "type": "comment", - "named": true - }, - { - "type": "grouping", - "named": true - }, - { - "type": "list", - "named": true - }, - { - "type": "named_node", - "named": true - }, - { - "type": "predicate", + "type": "definition", "named": true } ] @@ -204,6 +183,10 @@ "multiple": false, "required": true, "types": [ + { + "type": "_", + "named": false + }, { "type": "identifier", "named": true @@ -219,42 +202,47 @@ "named": true } ] + }, + "supertype": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] } }, "children": { "multiple": true, "required": false, "types": [ - { - "type": "anonymous_node", - "named": true - }, { "type": "capture", "named": true }, { - "type": "comment", - "named": true - }, - { - "type": "field_definition", + "type": "definition", "named": true }, { - "type": "grouping", + "type": "negated_field", "named": true - }, - { - "type": "list", - "named": true - }, - { - "type": "named_node", - "named": true - }, + } + ] + } + }, + { + "type": "negated_field", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ { - "type": "predicate", + "type": "identifier", "named": true } ] @@ -266,12 +254,16 @@ "fields": {}, "children": { "multiple": true, - "required": true, + "required": false, "types": [ { "type": "capture", "named": true }, + { + "type": "identifier", + "named": true + }, { "type": "string", "named": true @@ -284,9 +276,13 @@ "named": true, "fields": { "name": { - "multiple": false, + "multiple": true, "required": true, "types": [ + { + "type": "#", + "named": false + }, { "type": "identifier", "named": true @@ -315,11 +311,6 @@ } } }, - { - "type": "predicate_type", - "named": true, - "fields": {} - }, { "type": "program", "named": true, @@ -329,27 +320,7 @@ "required": false, "types": [ { - "type": "anonymous_node", - "named": true - }, - { - "type": "comment", - "named": true - }, - { - "type": "grouping", - "named": true - }, - { - "type": "list", - "named": true - }, - { - "type": "named_node", - "named": true - }, - { - "type": "predicate", + "type": "definition", "named": true } ] @@ -363,12 +334,45 @@ { "type": "string", "named": true, - "fields": {} + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "string_content", + "named": true + } + ] + } + }, + { + "type": "string_content", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + } + ] + } }, { "type": "!", "named": false }, + { + "type": "\"", + "named": false + }, + { + "type": "#", + "named": false + }, { "type": "(", "named": false @@ -386,11 +390,15 @@ "named": false }, { - "type": ":", + "type": ".", + "named": false + }, + { + "type": "/", "named": false }, { - "type": ";", + "type": ":", "named": false }, { @@ -409,8 +417,24 @@ "type": "]", "named": false }, + { + "type": "_", + "named": false + }, + { + "type": "comment", + "named": true + }, + { + "type": "escape_sequence", + "named": true + }, { "type": "identifier", "named": true + }, + { + "type": "predicate_type", + "named": true } ] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c index 420376d..4b42c12 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,127 +1,166 @@ -#include +#include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif -#define LANGUAGE_VERSION 11 -#define STATE_COUNT 57 -#define LARGE_STATE_COUNT 3 -#define SYMBOL_COUNT 34 +#define LANGUAGE_VERSION 14 +#define STATE_COUNT 329 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 47 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 15 +#define TOKEN_COUNT 22 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 4 -#define MAX_ALIAS_SEQUENCE_LENGTH 6 +#define FIELD_COUNT 5 +#define MAX_ALIAS_SEQUENCE_LENGTH 11 +#define PRODUCTION_ID_COUNT 18 -enum { - anon_sym_COLON = 1, - anon_sym_QMARK = 2, - anon_sym_BANG = 3, - anon_sym_STAR = 4, - anon_sym_PLUS = 5, +enum ts_symbol_identifiers { + anon_sym_DOT = 1, + sym_escape_sequence = 2, + anon_sym_STAR = 3, + anon_sym_PLUS = 4, + anon_sym_QMARK = 5, sym_identifier = 6, - anon_sym_AT = 7, - aux_sym_string_token1 = 8, - anon_sym_SEMI = 9, - aux_sym_comment_token1 = 10, - anon_sym_LBRACK = 11, - anon_sym_RBRACK = 12, - anon_sym_LPAREN = 13, - anon_sym_RPAREN = 14, - sym_program = 15, - sym__definition = 16, - sym__field_name = 17, - sym_predicate_type = 18, - sym_quantifier = 19, - sym_field_definition = 20, - sym_capture = 21, - sym_string = 22, - sym_parameters = 23, - sym_comment = 24, - sym_list = 25, - sym_grouping = 26, - sym_anonymous_node = 27, - sym_named_node = 28, - sym_predicate = 29, - aux_sym_program_repeat1 = 30, - aux_sym_parameters_repeat1 = 31, - aux_sym_list_repeat1 = 32, - aux_sym_named_node_repeat1 = 33, + aux_sym__immediate_identifier_token1 = 7, + anon_sym__ = 8, + anon_sym_AT = 9, + anon_sym_DQUOTE = 10, + aux_sym_string_content_token1 = 11, + sym_comment = 12, + anon_sym_LBRACK = 13, + anon_sym_RBRACK = 14, + anon_sym_LPAREN = 15, + anon_sym_RPAREN = 16, + anon_sym_SLASH = 17, + anon_sym_COLON = 18, + anon_sym_BANG = 19, + anon_sym_POUND = 20, + sym_predicate_type = 21, + sym_program = 22, + sym_definition = 23, + sym__group_expression = 24, + sym__named_node_expression = 25, + sym_quantifier = 26, + sym__immediate_identifier = 27, + sym__node_identifier = 28, + sym_capture = 29, + sym_string = 30, + sym_string_content = 31, + sym_parameters = 32, + sym_alternation = 33, + sym_grouping = 34, + sym_anonymous_node = 35, + sym_named_node = 36, + sym__field_name = 37, + sym_field_definition = 38, + sym_negated_field = 39, + sym_predicate = 40, + aux_sym_program_repeat1 = 41, + aux_sym_string_content_repeat1 = 42, + aux_sym_parameters_repeat1 = 43, + aux_sym_alternation_repeat1 = 44, + aux_sym_grouping_repeat1 = 45, + aux_sym_named_node_repeat1 = 46, }; -static const char *ts_symbol_names[] = { +static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", - [anon_sym_COLON] = ":", - [anon_sym_QMARK] = "?", - [anon_sym_BANG] = "!", + [anon_sym_DOT] = ".", + [sym_escape_sequence] = "escape_sequence", [anon_sym_STAR] = "*", [anon_sym_PLUS] = "+", + [anon_sym_QMARK] = "\?", [sym_identifier] = "identifier", + [aux_sym__immediate_identifier_token1] = "identifier", + [anon_sym__] = "_", [anon_sym_AT] = "@", - [aux_sym_string_token1] = "string_token1", - [anon_sym_SEMI] = ";", - [aux_sym_comment_token1] = "comment_token1", + [anon_sym_DQUOTE] = "\"", + [aux_sym_string_content_token1] = "string_content_token1", + [sym_comment] = "comment", [anon_sym_LBRACK] = "[", [anon_sym_RBRACK] = "]", [anon_sym_LPAREN] = "(", [anon_sym_RPAREN] = ")", - [sym_program] = "program", - [sym__definition] = "_definition", - [sym__field_name] = "_field_name", + [anon_sym_SLASH] = "/", + [anon_sym_COLON] = ":", + [anon_sym_BANG] = "!", + [anon_sym_POUND] = "#", [sym_predicate_type] = "predicate_type", + [sym_program] = "program", + [sym_definition] = "definition", + [sym__group_expression] = "_group_expression", + [sym__named_node_expression] = "_named_node_expression", [sym_quantifier] = "quantifier", - [sym_field_definition] = "field_definition", + [sym__immediate_identifier] = "_immediate_identifier", + [sym__node_identifier] = "_node_identifier", [sym_capture] = "capture", [sym_string] = "string", + [sym_string_content] = "string_content", [sym_parameters] = "parameters", - [sym_comment] = "comment", - [sym_list] = "list", + [sym_alternation] = "alternation", [sym_grouping] = "grouping", [sym_anonymous_node] = "anonymous_node", [sym_named_node] = "named_node", + [sym__field_name] = "_field_name", + [sym_field_definition] = "field_definition", + [sym_negated_field] = "negated_field", [sym_predicate] = "predicate", [aux_sym_program_repeat1] = "program_repeat1", + [aux_sym_string_content_repeat1] = "string_content_repeat1", [aux_sym_parameters_repeat1] = "parameters_repeat1", - [aux_sym_list_repeat1] = "list_repeat1", + [aux_sym_alternation_repeat1] = "alternation_repeat1", + [aux_sym_grouping_repeat1] = "grouping_repeat1", [aux_sym_named_node_repeat1] = "named_node_repeat1", }; -static TSSymbol ts_symbol_map[] = { +static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, - [anon_sym_COLON] = anon_sym_COLON, - [anon_sym_QMARK] = anon_sym_QMARK, - [anon_sym_BANG] = anon_sym_BANG, + [anon_sym_DOT] = anon_sym_DOT, + [sym_escape_sequence] = sym_escape_sequence, [anon_sym_STAR] = anon_sym_STAR, [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_QMARK] = anon_sym_QMARK, [sym_identifier] = sym_identifier, + [aux_sym__immediate_identifier_token1] = sym_identifier, + [anon_sym__] = anon_sym__, [anon_sym_AT] = anon_sym_AT, - [aux_sym_string_token1] = aux_sym_string_token1, - [anon_sym_SEMI] = anon_sym_SEMI, - [aux_sym_comment_token1] = aux_sym_comment_token1, + [anon_sym_DQUOTE] = anon_sym_DQUOTE, + [aux_sym_string_content_token1] = aux_sym_string_content_token1, + [sym_comment] = sym_comment, [anon_sym_LBRACK] = anon_sym_LBRACK, [anon_sym_RBRACK] = anon_sym_RBRACK, [anon_sym_LPAREN] = anon_sym_LPAREN, [anon_sym_RPAREN] = anon_sym_RPAREN, - [sym_program] = sym_program, - [sym__definition] = sym__definition, - [sym__field_name] = sym__field_name, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_BANG] = anon_sym_BANG, + [anon_sym_POUND] = anon_sym_POUND, [sym_predicate_type] = sym_predicate_type, + [sym_program] = sym_program, + [sym_definition] = sym_definition, + [sym__group_expression] = sym__group_expression, + [sym__named_node_expression] = sym__named_node_expression, [sym_quantifier] = sym_quantifier, - [sym_field_definition] = sym_field_definition, + [sym__immediate_identifier] = sym__immediate_identifier, + [sym__node_identifier] = sym__node_identifier, [sym_capture] = sym_capture, [sym_string] = sym_string, + [sym_string_content] = sym_string_content, [sym_parameters] = sym_parameters, - [sym_comment] = sym_comment, - [sym_list] = sym_list, + [sym_alternation] = sym_alternation, [sym_grouping] = sym_grouping, [sym_anonymous_node] = sym_anonymous_node, [sym_named_node] = sym_named_node, + [sym__field_name] = sym__field_name, + [sym_field_definition] = sym_field_definition, + [sym_negated_field] = sym_negated_field, [sym_predicate] = sym_predicate, [aux_sym_program_repeat1] = aux_sym_program_repeat1, + [aux_sym_string_content_repeat1] = aux_sym_string_content_repeat1, [aux_sym_parameters_repeat1] = aux_sym_parameters_repeat1, - [aux_sym_list_repeat1] = aux_sym_list_repeat1, + [aux_sym_alternation_repeat1] = aux_sym_alternation_repeat1, + [aux_sym_grouping_repeat1] = aux_sym_grouping_repeat1, [aux_sym_named_node_repeat1] = aux_sym_named_node_repeat1, }; @@ -130,23 +169,23 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, - [anon_sym_COLON] = { + [anon_sym_DOT] = { .visible = true, .named = false, }, - [anon_sym_QMARK] = { + [sym_escape_sequence] = { .visible = true, - .named = false, + .named = true, }, - [anon_sym_BANG] = { + [anon_sym_STAR] = { .visible = true, .named = false, }, - [anon_sym_STAR] = { + [anon_sym_PLUS] = { .visible = true, .named = false, }, - [anon_sym_PLUS] = { + [anon_sym_QMARK] = { .visible = true, .named = false, }, @@ -154,22 +193,30 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [anon_sym_AT] = { + [aux_sym__immediate_identifier_token1] = { + .visible = true, + .named = true, + }, + [anon_sym__] = { .visible = true, .named = false, }, - [aux_sym_string_token1] = { - .visible = false, + [anon_sym_AT] = { + .visible = true, .named = false, }, - [anon_sym_SEMI] = { + [anon_sym_DQUOTE] = { .visible = true, .named = false, }, - [aux_sym_comment_token1] = { + [aux_sym_string_content_token1] = { .visible = false, .named = false, }, + [sym_comment] = { + .visible = true, + .named = true, + }, [anon_sym_LBRACK] = { .visible = true, .named = false, @@ -186,28 +233,53 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG] = { + .visible = true, + .named = false, + }, + [anon_sym_POUND] = { + .visible = true, + .named = false, + }, + [sym_predicate_type] = { + .visible = true, + .named = true, + }, [sym_program] = { .visible = true, .named = true, }, - [sym__definition] = { + [sym_definition] = { .visible = false, .named = true, + .supertype = true, }, - [sym__field_name] = { + [sym__group_expression] = { .visible = false, .named = true, }, - [sym_predicate_type] = { - .visible = true, + [sym__named_node_expression] = { + .visible = false, .named = true, }, [sym_quantifier] = { .visible = true, .named = true, }, - [sym_field_definition] = { - .visible = true, + [sym__immediate_identifier] = { + .visible = false, + .named = true, + }, + [sym__node_identifier] = { + .visible = false, .named = true, }, [sym_capture] = { @@ -218,15 +290,15 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_parameters] = { + [sym_string_content] = { .visible = true, .named = true, }, - [sym_comment] = { + [sym_parameters] = { .visible = true, .named = true, }, - [sym_list] = { + [sym_alternation] = { .visible = true, .named = true, }, @@ -242,6 +314,18 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym__field_name] = { + .visible = false, + .named = true, + }, + [sym_field_definition] = { + .visible = true, + .named = true, + }, + [sym_negated_field] = { + .visible = true, + .named = true, + }, [sym_predicate] = { .visible = true, .named = true, @@ -250,11 +334,19 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, + [aux_sym_string_content_repeat1] = { + .visible = false, + .named = false, + }, [aux_sym_parameters_repeat1] = { .visible = false, .named = false, }, - [aux_sym_list_repeat1] = { + [aux_sym_alternation_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_grouping_repeat1] = { .visible = false, .named = false, }, @@ -264,1231 +356,8142 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { }, }; -enum { +enum ts_field_identifiers { field_name = 1, field_parameters = 2, field_quantifier = 3, - field_type = 4, + field_supertype = 4, + field_type = 5, }; -static const char *ts_field_names[] = { +static const char * const ts_field_names[] = { [0] = NULL, [field_name] = "name", [field_parameters] = "parameters", [field_quantifier] = "quantifier", + [field_supertype] = "supertype", [field_type] = "type", }; -static const TSFieldMapSlice ts_field_map_slices[9] = { +static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [1] = {.index = 0, .length = 1}, - [2] = {.index = 1, .length = 1}, - [3] = {.index = 2, .length = 1}, - [4] = {.index = 3, .length = 1}, - [5] = {.index = 4, .length = 2}, - [6] = {.index = 6, .length = 1}, - [7] = {.index = 7, .length = 3}, + [2] = {.index = 1, .length = 2}, + [3] = {.index = 3, .length = 1}, + [4] = {.index = 4, .length = 1}, + [5] = {.index = 5, .length = 1}, + [6] = {.index = 6, .length = 2}, + [7] = {.index = 8, .length = 2}, [8] = {.index = 10, .length = 2}, + [9] = {.index = 12, .length = 3}, + [10] = {.index = 15, .length = 4}, + [11] = {.index = 19, .length = 2}, + [12] = {.index = 21, .length = 3}, + [13] = {.index = 24, .length = 2}, + [14] = {.index = 26, .length = 3}, + [15] = {.index = 29, .length = 2}, + [16] = {.index = 31, .length = 3}, + [17] = {.index = 34, .length = 3}, }; static const TSFieldMapEntry ts_field_map_entries[] = { [0] = - {field_quantifier, 1}, + {field_name, 0}, [1] = - {field_name, 1}, - [2] = - {field_quantifier, 2}, + {field_name, 0}, + {field_quantifier, 1}, [3] = - {field_quantifier, 3}, - [4] = {field_name, 1}, + [4] = + {field_quantifier, 2}, + [5] = {field_quantifier, 3}, [6] = - {field_name, 0}, - [7] = {field_name, 1}, - {field_parameters, 3}, - {field_type, 2}, + {field_quantifier, 3}, + [8] = + {field_name, 3}, + {field_supertype, 1}, [10] = {field_name, 1}, {field_quantifier, 4}, + [12] = + {field_name, 3}, + {field_quantifier, 5}, + {field_supertype, 1}, + [15] = + {field_name, 1}, + {field_name, 2}, + {field_parameters, 4}, + {field_type, 3}, + [19] = + {field_name, 1}, + {field_quantifier, 5}, + [21] = + {field_name, 3}, + {field_quantifier, 6}, + {field_supertype, 1}, + [24] = + {field_name, 1}, + {field_quantifier, 6}, + [26] = + {field_name, 3}, + {field_quantifier, 7}, + {field_supertype, 1}, + [29] = + {field_name, 1}, + {field_quantifier, 7}, + [31] = + {field_name, 3}, + {field_quantifier, 8}, + {field_supertype, 1}, + [34] = + {field_name, 3}, + {field_quantifier, 9}, + {field_supertype, 1}, }; -static TSSymbol ts_alias_sequences[9][MAX_ALIAS_SEQUENCE_LENGTH] = { +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] = 3, + [5] = 2, + [6] = 2, + [7] = 3, + [8] = 8, + [9] = 9, + [10] = 10, + [11] = 9, + [12] = 12, + [13] = 13, + [14] = 12, + [15] = 10, + [16] = 13, + [17] = 17, + [18] = 12, + [19] = 10, + [20] = 8, + [21] = 13, + [22] = 8, + [23] = 9, + [24] = 24, + [25] = 24, + [26] = 24, + [27] = 27, + [28] = 27, + [29] = 29, + [30] = 30, + [31] = 30, + [32] = 30, + [33] = 33, + [34] = 34, + [35] = 35, + [36] = 29, + [37] = 34, + [38] = 33, + [39] = 39, + [40] = 35, + [41] = 27, + [42] = 33, + [43] = 39, + [44] = 34, + [45] = 29, + [46] = 35, + [47] = 39, + [48] = 48, + [49] = 49, + [50] = 48, + [51] = 48, + [52] = 52, + [53] = 53, + [54] = 53, + [55] = 55, + [56] = 56, + [57] = 57, + [58] = 55, + [59] = 56, + [60] = 60, + [61] = 55, + [62] = 53, + [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] = 79, + [81] = 79, + [82] = 74, + [83] = 65, + [84] = 68, + [85] = 64, + [86] = 63, + [87] = 63, + [88] = 69, + [89] = 67, + [90] = 78, + [91] = 75, + [92] = 76, + [93] = 65, + [94] = 71, + [95] = 75, + [96] = 73, + [97] = 70, + [98] = 78, + [99] = 72, + [100] = 71, + [101] = 70, + [102] = 67, + [103] = 68, + [104] = 64, + [105] = 74, + [106] = 72, + [107] = 73, + [108] = 69, + [109] = 76, + [110] = 66, + [111] = 66, + [112] = 112, + [113] = 113, + [114] = 114, + [115] = 115, + [116] = 116, + [117] = 117, + [118] = 118, + [119] = 119, + [120] = 120, + [121] = 121, + [122] = 122, + [123] = 123, + [124] = 124, + [125] = 125, + [126] = 126, + [127] = 127, + [128] = 128, + [129] = 129, + [130] = 113, + [131] = 131, + [132] = 132, + [133] = 133, + [134] = 134, + [135] = 135, + [136] = 136, + [137] = 137, + [138] = 112, + [139] = 139, + [140] = 140, + [141] = 141, + [142] = 142, + [143] = 143, + [144] = 144, + [145] = 145, + [146] = 146, + [147] = 147, + [148] = 148, + [149] = 149, + [150] = 150, + [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] = 112, + [164] = 162, + [165] = 113, + [166] = 162, + [167] = 143, + [168] = 168, + [169] = 141, + [170] = 145, + [171] = 144, + [172] = 172, + [173] = 134, + [174] = 126, + [175] = 125, + [176] = 120, + [177] = 119, + [178] = 118, + [179] = 115, + [180] = 132, + [181] = 139, + [182] = 137, + [183] = 131, + [184] = 124, + [185] = 150, + [186] = 114, + [187] = 151, + [188] = 152, + [189] = 154, + [190] = 156, + [191] = 157, + [192] = 159, + [193] = 160, + [194] = 161, + [195] = 153, + [196] = 172, + [197] = 197, + [198] = 158, + [199] = 117, + [200] = 121, + [201] = 122, + [202] = 123, + [203] = 155, + [204] = 204, + [205] = 127, + [206] = 128, + [207] = 129, + [208] = 133, + [209] = 135, + [210] = 136, + [211] = 140, + [212] = 142, + [213] = 146, + [214] = 147, + [215] = 148, + [216] = 149, + [217] = 149, + [218] = 148, + [219] = 155, + [220] = 158, + [221] = 147, + [222] = 146, + [223] = 153, + [224] = 161, + [225] = 160, + [226] = 159, + [227] = 157, + [228] = 156, + [229] = 154, + [230] = 152, + [231] = 151, + [232] = 114, + [233] = 150, + [234] = 142, + [235] = 124, + [236] = 131, + [237] = 137, + [238] = 139, + [239] = 132, + [240] = 115, + [241] = 118, + [242] = 119, + [243] = 120, + [244] = 140, + [245] = 125, + [246] = 126, + [247] = 134, + [248] = 116, + [249] = 136, + [250] = 143, + [251] = 144, + [252] = 135, + [253] = 145, + [254] = 133, + [255] = 141, + [256] = 116, + [257] = 129, + [258] = 117, + [259] = 172, + [260] = 260, + [261] = 128, + [262] = 127, + [263] = 123, + [264] = 121, + [265] = 122, + [266] = 266, + [267] = 267, + [268] = 268, + [269] = 269, + [270] = 266, + [271] = 267, + [272] = 272, + [273] = 204, + [274] = 267, + [275] = 275, + [276] = 266, + [277] = 277, + [278] = 268, + [279] = 272, + [280] = 280, + [281] = 281, + [282] = 281, + [283] = 268, + [284] = 280, + [285] = 285, + [286] = 281, + [287] = 287, + [288] = 280, + [289] = 272, + [290] = 290, + [291] = 197, + [292] = 197, + [293] = 293, + [294] = 204, + [295] = 295, + [296] = 287, + [297] = 285, + [298] = 287, + [299] = 290, + [300] = 285, + [301] = 290, + [302] = 302, + [303] = 302, + [304] = 302, + [305] = 305, + [306] = 306, + [307] = 307, + [308] = 308, + [309] = 308, + [310] = 308, + [311] = 311, + [312] = 312, + [313] = 312, + [314] = 311, + [315] = 312, + [316] = 311, + [317] = 317, + [318] = 318, + [319] = 319, + [320] = 320, + [321] = 320, + [322] = 317, + [323] = 323, + [324] = 318, + [325] = 317, + [326] = 318, + [327] = 327, + [328] = 320, +}; + static bool ts_lex(TSLexer *lexer, TSStateId state) { START_LEXER(); eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(2); - if (lookahead == '!') ADVANCE(5); - if (lookahead == '"') ADVANCE(1); - if (lookahead == '(') ADVANCE(16); - if (lookahead == ')') ADVANCE(17); - if (lookahead == '*') ADVANCE(6); - if (lookahead == '+') ADVANCE(7); - if (lookahead == ':') ADVANCE(3); - if (lookahead == ';') ADVANCE(11); - if (lookahead == '?') ADVANCE(4); - if (lookahead == '@') ADVANCE(9); - if (lookahead == '[') ADVANCE(14); - if (lookahead == ']') ADVANCE(15); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(0) - if (lookahead == '#' || - lookahead == '$' || - lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || + if (eof) ADVANCE(16); + ADVANCE_MAP( + '!', 39, + '"', 28, + '#', 40, + '(', 35, + ')', 36, + '*', 21, + '+', 22, + '.', 17, + '/', 37, + ':', 38, + ';', 32, + '?', 23, + '@', 27, + '[', 33, + '\\', 7, + ']', 34, + '_', 26, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(14); + if (lookahead == '$' || + ('-' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(8); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); END_STATE(); case 1: - if (lookahead == '"') ADVANCE(10); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(1); + ADVANCE_MAP( + '!', 39, + '"', 28, + '(', 35, + ')', 36, + '*', 21, + '+', 22, + '.', 17, + '/', 37, + ':', 38, + ';', 32, + '?', 23, + '@', 27, + '[', 33, + '_', 26, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(2); + if (lookahead == '$' || + ('-' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); END_STATE(); case 2: - ACCEPT_TOKEN(ts_builtin_sym_end); + ADVANCE_MAP( + '!', 39, + '"', 28, + '(', 35, + ')', 36, + '*', 21, + '+', 22, + '.', 17, + ':', 38, + ';', 32, + '?', 23, + '@', 27, + '[', 33, + '_', 26, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(2); + if (lookahead == '$' || + lookahead == '-' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); END_STATE(); case 3: - ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == '"') ADVANCE(28); + if (lookahead == ';') ADVANCE(29); + if (lookahead == '\\') ADVANCE(7); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(30); + if (lookahead != 0) ADVANCE(31); END_STATE(); case 4: - ACCEPT_TOKEN(anon_sym_QMARK); + if (lookahead == ';') ADVANCE(32); + if (lookahead == '!' || + lookahead == '?') ADVANCE(41); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(5); + if (lookahead == '$' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(25); END_STATE(); case 5: - ACCEPT_TOKEN(anon_sym_BANG); + if (lookahead == ';') ADVANCE(32); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(5); END_STATE(); case 6: - ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == ';') ADVANCE(32); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(6); + if (lookahead == '$' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); END_STATE(); case 7: - ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == 'u') ADVANCE(8); + if (lookahead == 'x') ADVANCE(13); + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(20); + if (lookahead != 0) ADVANCE(18); END_STATE(); case 8: + if (lookahead == '{') ADVANCE(12); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(10); + END_STATE(); + case 9: + if (lookahead == '}') ADVANCE(18); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(9); + END_STATE(); + case 10: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(13); + END_STATE(); + case 11: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(18); + END_STATE(); + case 12: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(9); + END_STATE(); + case 13: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(11); + END_STATE(); + case 14: + if (eof) ADVANCE(16); + ADVANCE_MAP( + '!', 39, + '"', 28, + '#', 40, + '(', 35, + ')', 36, + '*', 21, + '+', 22, + '.', 17, + ':', 38, + ';', 32, + '?', 23, + '@', 27, + '[', 33, + ']', 34, + '_', 26, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(14); + if (lookahead == '$' || + lookahead == '-' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); + END_STATE(); + case 15: + if (eof) ADVANCE(16); + ADVANCE_MAP( + '!', 39, + '"', 28, + '#', 40, + '(', 35, + ')', 36, + '*', 21, + '+', 22, + ';', 32, + '?', 23, + '@', 27, + '[', 33, + ']', 34, + '_', 26, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(15); + if (lookahead == '$' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); + END_STATE(); + case 16: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 17: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '$' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); + END_STATE(); + case 18: + ACCEPT_TOKEN(sym_escape_sequence); + END_STATE(); + case 19: + ACCEPT_TOKEN(sym_escape_sequence); + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(18); + END_STATE(); + case 20: + ACCEPT_TOKEN(sym_escape_sequence); + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(19); + END_STATE(); + case 21: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 22: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 23: + ACCEPT_TOKEN(anon_sym_QMARK); + END_STATE(); + case 24: ACCEPT_TOKEN(sym_identifier); - if (lookahead == '#' || - lookahead == '$' || + if (lookahead == '$' || lookahead == '-' || lookahead == '.' || ('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(8); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); END_STATE(); - case 9: + case 25: + ACCEPT_TOKEN(aux_sym__immediate_identifier_token1); + if (lookahead == '$' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(25); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym__); + if (lookahead == '$' || + lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(24); + END_STATE(); + case 27: ACCEPT_TOKEN(anon_sym_AT); END_STATE(); - case 10: - ACCEPT_TOKEN(aux_sym_string_token1); - if (lookahead == '"') ADVANCE(10); + case 28: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 29: + ACCEPT_TOKEN(aux_sym_string_content_token1); + if (lookahead == '\n') ADVANCE(31); if (lookahead != 0 && - lookahead != '\n') ADVANCE(1); + lookahead != '"' && + lookahead != '\\') ADVANCE(29); END_STATE(); - case 11: - ACCEPT_TOKEN(anon_sym_SEMI); + case 30: + ACCEPT_TOKEN(aux_sym_string_content_token1); + if (lookahead == ';') ADVANCE(29); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(30); + if (lookahead != 0 && + lookahead != '"' && + lookahead != '\\') ADVANCE(31); END_STATE(); - case 12: - ACCEPT_TOKEN(aux_sym_comment_token1); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(12); + case 31: + ACCEPT_TOKEN(aux_sym_string_content_token1); if (lookahead != 0 && - lookahead != '\n') ADVANCE(13); + lookahead != '"' && + lookahead != '\\') ADVANCE(31); END_STATE(); - case 13: - ACCEPT_TOKEN(aux_sym_comment_token1); + case 32: + ACCEPT_TOKEN(sym_comment); if (lookahead != 0 && - lookahead != '\n') ADVANCE(13); + lookahead != '\n') ADVANCE(32); END_STATE(); - case 14: + case 33: ACCEPT_TOKEN(anon_sym_LBRACK); END_STATE(); - case 15: + case 34: ACCEPT_TOKEN(anon_sym_RBRACK); END_STATE(); - case 16: + case 35: ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); - case 17: + case 36: ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_SLASH); + END_STATE(); + case 38: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 39: + ACCEPT_TOKEN(anon_sym_BANG); + END_STATE(); + case 40: + ACCEPT_TOKEN(anon_sym_POUND); + END_STATE(); + case 41: + ACCEPT_TOKEN(sym_predicate_type); + END_STATE(); default: return false; } } -static TSLexMode ts_lex_modes[STATE_COUNT] = { +static const TSLexMode 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 = 0}, - [7] = {.lex_state = 0}, - [8] = {.lex_state = 0}, - [9] = {.lex_state = 0}, - [10] = {.lex_state = 0}, - [11] = {.lex_state = 0}, - [12] = {.lex_state = 0}, - [13] = {.lex_state = 0}, - [14] = {.lex_state = 0}, - [15] = {.lex_state = 0}, - [16] = {.lex_state = 0}, - [17] = {.lex_state = 0}, - [18] = {.lex_state = 0}, - [19] = {.lex_state = 0}, - [20] = {.lex_state = 0}, - [21] = {.lex_state = 0}, - [22] = {.lex_state = 0}, - [23] = {.lex_state = 0}, - [24] = {.lex_state = 0}, - [25] = {.lex_state = 0}, - [26] = {.lex_state = 0}, - [27] = {.lex_state = 0}, - [28] = {.lex_state = 0}, - [29] = {.lex_state = 0}, - [30] = {.lex_state = 0}, - [31] = {.lex_state = 0}, - [32] = {.lex_state = 0}, - [33] = {.lex_state = 0}, - [34] = {.lex_state = 0}, - [35] = {.lex_state = 0}, - [36] = {.lex_state = 0}, - [37] = {.lex_state = 0}, - [38] = {.lex_state = 0}, - [39] = {.lex_state = 0}, - [40] = {.lex_state = 0}, - [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 = 12}, + [1] = {.lex_state = 15}, + [2] = {.lex_state = 1}, + [3] = {.lex_state = 1}, + [4] = {.lex_state = 1}, + [5] = {.lex_state = 1}, + [6] = {.lex_state = 1}, + [7] = {.lex_state = 1}, + [8] = {.lex_state = 15}, + [9] = {.lex_state = 15}, + [10] = {.lex_state = 15}, + [11] = {.lex_state = 15}, + [12] = {.lex_state = 15}, + [13] = {.lex_state = 15}, + [14] = {.lex_state = 15}, + [15] = {.lex_state = 15}, + [16] = {.lex_state = 15}, + [17] = {.lex_state = 15}, + [18] = {.lex_state = 15}, + [19] = {.lex_state = 15}, + [20] = {.lex_state = 15}, + [21] = {.lex_state = 15}, + [22] = {.lex_state = 15}, + [23] = {.lex_state = 15}, + [24] = {.lex_state = 15}, + [25] = {.lex_state = 15}, + [26] = {.lex_state = 15}, + [27] = {.lex_state = 15}, + [28] = {.lex_state = 15}, + [29] = {.lex_state = 15}, + [30] = {.lex_state = 15}, + [31] = {.lex_state = 15}, + [32] = {.lex_state = 15}, + [33] = {.lex_state = 15}, + [34] = {.lex_state = 15}, + [35] = {.lex_state = 15}, + [36] = {.lex_state = 15}, + [37] = {.lex_state = 15}, + [38] = {.lex_state = 15}, + [39] = {.lex_state = 15}, + [40] = {.lex_state = 15}, + [41] = {.lex_state = 15}, + [42] = {.lex_state = 15}, + [43] = {.lex_state = 15}, + [44] = {.lex_state = 15}, + [45] = {.lex_state = 15}, + [46] = {.lex_state = 15}, + [47] = {.lex_state = 15}, + [48] = {.lex_state = 15}, + [49] = {.lex_state = 15}, + [50] = {.lex_state = 15}, + [51] = {.lex_state = 15}, + [52] = {.lex_state = 15}, + [53] = {.lex_state = 15}, + [54] = {.lex_state = 15}, + [55] = {.lex_state = 15}, + [56] = {.lex_state = 15}, + [57] = {.lex_state = 15}, + [58] = {.lex_state = 15}, + [59] = {.lex_state = 15}, + [60] = {.lex_state = 15}, + [61] = {.lex_state = 15}, + [62] = {.lex_state = 15}, + [63] = {.lex_state = 1}, + [64] = {.lex_state = 1}, + [65] = {.lex_state = 1}, + [66] = {.lex_state = 1}, + [67] = {.lex_state = 1}, + [68] = {.lex_state = 1}, + [69] = {.lex_state = 1}, + [70] = {.lex_state = 1}, + [71] = {.lex_state = 1}, + [72] = {.lex_state = 1}, + [73] = {.lex_state = 1}, + [74] = {.lex_state = 1}, + [75] = {.lex_state = 1}, + [76] = {.lex_state = 1}, + [77] = {.lex_state = 1}, + [78] = {.lex_state = 1}, + [79] = {.lex_state = 15}, + [80] = {.lex_state = 15}, + [81] = {.lex_state = 15}, + [82] = {.lex_state = 15}, + [83] = {.lex_state = 15}, + [84] = {.lex_state = 15}, + [85] = {.lex_state = 15}, + [86] = {.lex_state = 15}, + [87] = {.lex_state = 15}, + [88] = {.lex_state = 15}, + [89] = {.lex_state = 15}, + [90] = {.lex_state = 15}, + [91] = {.lex_state = 15}, + [92] = {.lex_state = 15}, + [93] = {.lex_state = 15}, + [94] = {.lex_state = 15}, + [95] = {.lex_state = 15}, + [96] = {.lex_state = 15}, + [97] = {.lex_state = 15}, + [98] = {.lex_state = 15}, + [99] = {.lex_state = 15}, + [100] = {.lex_state = 15}, + [101] = {.lex_state = 15}, + [102] = {.lex_state = 15}, + [103] = {.lex_state = 15}, + [104] = {.lex_state = 15}, + [105] = {.lex_state = 15}, + [106] = {.lex_state = 15}, + [107] = {.lex_state = 15}, + [108] = {.lex_state = 15}, + [109] = {.lex_state = 15}, + [110] = {.lex_state = 15}, + [111] = {.lex_state = 15}, + [112] = {.lex_state = 1}, + [113] = {.lex_state = 1}, + [114] = {.lex_state = 1}, + [115] = {.lex_state = 1}, + [116] = {.lex_state = 1}, + [117] = {.lex_state = 1}, + [118] = {.lex_state = 1}, + [119] = {.lex_state = 1}, + [120] = {.lex_state = 1}, + [121] = {.lex_state = 1}, + [122] = {.lex_state = 1}, + [123] = {.lex_state = 1}, + [124] = {.lex_state = 1}, + [125] = {.lex_state = 1}, + [126] = {.lex_state = 1}, + [127] = {.lex_state = 1}, + [128] = {.lex_state = 1}, + [129] = {.lex_state = 1}, + [130] = {.lex_state = 15}, + [131] = {.lex_state = 1}, + [132] = {.lex_state = 1}, + [133] = {.lex_state = 1}, + [134] = {.lex_state = 1}, + [135] = {.lex_state = 1}, + [136] = {.lex_state = 1}, + [137] = {.lex_state = 1}, + [138] = {.lex_state = 15}, + [139] = {.lex_state = 1}, + [140] = {.lex_state = 1}, + [141] = {.lex_state = 1}, + [142] = {.lex_state = 1}, + [143] = {.lex_state = 1}, + [144] = {.lex_state = 1}, + [145] = {.lex_state = 1}, + [146] = {.lex_state = 1}, + [147] = {.lex_state = 1}, + [148] = {.lex_state = 1}, + [149] = {.lex_state = 1}, + [150] = {.lex_state = 1}, + [151] = {.lex_state = 1}, + [152] = {.lex_state = 1}, + [153] = {.lex_state = 1}, + [154] = {.lex_state = 1}, + [155] = {.lex_state = 1}, + [156] = {.lex_state = 1}, + [157] = {.lex_state = 1}, + [158] = {.lex_state = 1}, + [159] = {.lex_state = 1}, + [160] = {.lex_state = 1}, + [161] = {.lex_state = 1}, + [162] = {.lex_state = 1}, + [163] = {.lex_state = 15}, + [164] = {.lex_state = 1}, + [165] = {.lex_state = 15}, + [166] = {.lex_state = 1}, + [167] = {.lex_state = 15}, + [168] = {.lex_state = 15}, + [169] = {.lex_state = 15}, + [170] = {.lex_state = 15}, + [171] = {.lex_state = 15}, + [172] = {.lex_state = 15}, + [173] = {.lex_state = 15}, + [174] = {.lex_state = 15}, + [175] = {.lex_state = 15}, + [176] = {.lex_state = 15}, + [177] = {.lex_state = 15}, + [178] = {.lex_state = 15}, + [179] = {.lex_state = 15}, + [180] = {.lex_state = 15}, + [181] = {.lex_state = 15}, + [182] = {.lex_state = 15}, + [183] = {.lex_state = 15}, + [184] = {.lex_state = 15}, + [185] = {.lex_state = 15}, + [186] = {.lex_state = 15}, + [187] = {.lex_state = 15}, + [188] = {.lex_state = 15}, + [189] = {.lex_state = 15}, + [190] = {.lex_state = 15}, + [191] = {.lex_state = 15}, + [192] = {.lex_state = 15}, + [193] = {.lex_state = 15}, + [194] = {.lex_state = 15}, + [195] = {.lex_state = 15}, + [196] = {.lex_state = 15}, + [197] = {.lex_state = 1}, + [198] = {.lex_state = 15}, + [199] = {.lex_state = 15}, + [200] = {.lex_state = 15}, + [201] = {.lex_state = 15}, + [202] = {.lex_state = 15}, + [203] = {.lex_state = 15}, + [204] = {.lex_state = 1}, + [205] = {.lex_state = 15}, + [206] = {.lex_state = 15}, + [207] = {.lex_state = 15}, + [208] = {.lex_state = 15}, + [209] = {.lex_state = 15}, + [210] = {.lex_state = 15}, + [211] = {.lex_state = 15}, + [212] = {.lex_state = 15}, + [213] = {.lex_state = 15}, + [214] = {.lex_state = 15}, + [215] = {.lex_state = 15}, + [216] = {.lex_state = 15}, + [217] = {.lex_state = 15}, + [218] = {.lex_state = 15}, + [219] = {.lex_state = 15}, + [220] = {.lex_state = 15}, + [221] = {.lex_state = 15}, + [222] = {.lex_state = 15}, + [223] = {.lex_state = 15}, + [224] = {.lex_state = 15}, + [225] = {.lex_state = 15}, + [226] = {.lex_state = 15}, + [227] = {.lex_state = 15}, + [228] = {.lex_state = 15}, + [229] = {.lex_state = 15}, + [230] = {.lex_state = 15}, + [231] = {.lex_state = 15}, + [232] = {.lex_state = 15}, + [233] = {.lex_state = 15}, + [234] = {.lex_state = 15}, + [235] = {.lex_state = 15}, + [236] = {.lex_state = 15}, + [237] = {.lex_state = 15}, + [238] = {.lex_state = 15}, + [239] = {.lex_state = 15}, + [240] = {.lex_state = 15}, + [241] = {.lex_state = 15}, + [242] = {.lex_state = 15}, + [243] = {.lex_state = 15}, + [244] = {.lex_state = 15}, + [245] = {.lex_state = 15}, + [246] = {.lex_state = 15}, + [247] = {.lex_state = 15}, + [248] = {.lex_state = 15}, + [249] = {.lex_state = 15}, + [250] = {.lex_state = 15}, + [251] = {.lex_state = 15}, + [252] = {.lex_state = 15}, + [253] = {.lex_state = 15}, + [254] = {.lex_state = 15}, + [255] = {.lex_state = 15}, + [256] = {.lex_state = 15}, + [257] = {.lex_state = 15}, + [258] = {.lex_state = 15}, + [259] = {.lex_state = 15}, + [260] = {.lex_state = 15}, + [261] = {.lex_state = 15}, + [262] = {.lex_state = 15}, + [263] = {.lex_state = 15}, + [264] = {.lex_state = 15}, + [265] = {.lex_state = 15}, + [266] = {.lex_state = 1}, + [267] = {.lex_state = 1}, + [268] = {.lex_state = 1}, + [269] = {.lex_state = 1}, + [270] = {.lex_state = 1}, + [271] = {.lex_state = 1}, + [272] = {.lex_state = 1}, + [273] = {.lex_state = 15}, + [274] = {.lex_state = 1}, + [275] = {.lex_state = 1}, + [276] = {.lex_state = 1}, + [277] = {.lex_state = 1}, + [278] = {.lex_state = 1}, + [279] = {.lex_state = 1}, + [280] = {.lex_state = 1}, + [281] = {.lex_state = 1}, + [282] = {.lex_state = 1}, + [283] = {.lex_state = 1}, + [284] = {.lex_state = 1}, + [285] = {.lex_state = 1}, + [286] = {.lex_state = 1}, + [287] = {.lex_state = 1}, + [288] = {.lex_state = 1}, + [289] = {.lex_state = 1}, + [290] = {.lex_state = 1}, + [291] = {.lex_state = 15}, + [292] = {.lex_state = 15}, + [293] = {.lex_state = 0}, + [294] = {.lex_state = 15}, + [295] = {.lex_state = 0}, + [296] = {.lex_state = 15}, + [297] = {.lex_state = 15}, + [298] = {.lex_state = 15}, + [299] = {.lex_state = 15}, + [300] = {.lex_state = 15}, + [301] = {.lex_state = 15}, + [302] = {.lex_state = 3}, + [303] = {.lex_state = 3}, + [304] = {.lex_state = 3}, + [305] = {.lex_state = 15}, + [306] = {.lex_state = 3}, + [307] = {.lex_state = 3}, + [308] = {.lex_state = 4}, + [309] = {.lex_state = 4}, + [310] = {.lex_state = 4}, + [311] = {.lex_state = 4}, + [312] = {.lex_state = 4}, + [313] = {.lex_state = 4}, + [314] = {.lex_state = 4}, + [315] = {.lex_state = 4}, + [316] = {.lex_state = 4}, + [317] = {.lex_state = 0}, + [318] = {.lex_state = 4}, + [319] = {.lex_state = 6}, + [320] = {.lex_state = 0}, + [321] = {.lex_state = 0}, + [322] = {.lex_state = 0}, + [323] = {.lex_state = 0}, + [324] = {.lex_state = 4}, + [325] = {.lex_state = 0}, + [326] = {.lex_state = 4}, + [327] = {.lex_state = 0}, + [328] = {.lex_state = 0}, }; -static uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { [ts_builtin_sym_end] = ACTIONS(1), - [anon_sym_COLON] = ACTIONS(1), - [anon_sym_QMARK] = ACTIONS(1), - [anon_sym_BANG] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [sym_escape_sequence] = ACTIONS(1), [anon_sym_STAR] = ACTIONS(1), [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_QMARK] = ACTIONS(1), [sym_identifier] = ACTIONS(1), + [anon_sym__] = ACTIONS(1), [anon_sym_AT] = ACTIONS(1), - [aux_sym_string_token1] = ACTIONS(1), - [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_DQUOTE] = ACTIONS(1), + [sym_comment] = ACTIONS(3), [anon_sym_LBRACK] = ACTIONS(1), [anon_sym_RBRACK] = ACTIONS(1), [anon_sym_LPAREN] = ACTIONS(1), [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_BANG] = ACTIONS(1), + [anon_sym_POUND] = ACTIONS(1), + [sym_predicate_type] = ACTIONS(1), }, [1] = { - [sym_program] = STATE(53), - [sym__definition] = STATE(15), - [sym_comment] = STATE(15), - [sym_list] = STATE(15), - [sym_grouping] = STATE(15), - [sym_anonymous_node] = STATE(15), - [sym_named_node] = STATE(15), - [sym_predicate] = STATE(15), - [aux_sym_program_repeat1] = STATE(15), - [ts_builtin_sym_end] = ACTIONS(3), - [aux_sym_string_token1] = ACTIONS(5), - [anon_sym_SEMI] = ACTIONS(7), - [anon_sym_LBRACK] = ACTIONS(9), - [anon_sym_LPAREN] = ACTIONS(11), - }, - [2] = { - [sym__definition] = STATE(4), - [sym__field_name] = STATE(18), - [sym_predicate_type] = STATE(47), - [sym_field_definition] = STATE(4), - [sym_comment] = STATE(4), - [sym_list] = STATE(4), - [sym_grouping] = STATE(4), - [sym_anonymous_node] = STATE(4), - [sym_named_node] = STATE(4), - [sym_predicate] = STATE(4), - [aux_sym_named_node_repeat1] = STATE(4), - [anon_sym_QMARK] = ACTIONS(13), - [anon_sym_BANG] = ACTIONS(13), - [sym_identifier] = ACTIONS(15), - [aux_sym_string_token1] = ACTIONS(5), - [anon_sym_SEMI] = ACTIONS(7), - [anon_sym_LBRACK] = ACTIONS(9), - [anon_sym_LPAREN] = ACTIONS(11), - [anon_sym_RPAREN] = ACTIONS(17), + [sym_program] = STATE(323), + [sym_definition] = STATE(57), + [sym_string] = STATE(84), + [sym_alternation] = STATE(301), + [sym_grouping] = STATE(301), + [sym_anonymous_node] = STATE(301), + [sym_named_node] = STATE(301), + [sym__field_name] = STATE(80), + [sym_field_definition] = STATE(301), + [sym_predicate] = STATE(301), + [aux_sym_program_repeat1] = STATE(57), + [ts_builtin_sym_end] = ACTIONS(5), + [sym_identifier] = ACTIONS(7), + [anon_sym__] = ACTIONS(9), + [anon_sym_DQUOTE] = ACTIONS(11), + [sym_comment] = ACTIONS(3), + [anon_sym_LBRACK] = ACTIONS(13), + [anon_sym_LPAREN] = ACTIONS(15), }, }; -static uint16_t ts_small_parse_table[] = { - [0] = 8, - ACTIONS(19), 1, +static const uint16_t ts_small_parse_table[] = { + [0] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, sym_identifier, - ACTIONS(22), 1, - aux_sym_string_token1, - ACTIONS(25), 1, - anon_sym_SEMI, - ACTIONS(28), 1, + ACTIONS(17), 1, + anon_sym_DOT, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, anon_sym_LBRACK, - ACTIONS(31), 1, + ACTIONS(25), 1, anon_sym_LPAREN, - ACTIONS(34), 1, + ACTIONS(27), 1, anon_sym_RPAREN, - STATE(18), 1, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(13), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, sym__field_name, - STATE(3), 9, - sym__definition, - sym_field_definition, - sym_comment, - sym_list, + STATE(266), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, sym_grouping, sym_anonymous_node, sym_named_node, + sym_field_definition, sym_predicate, - aux_sym_named_node_repeat1, - [33] = 8, - ACTIONS(5), 1, - aux_sym_string_token1, + [50] = 14, + ACTIONS(3), 1, + sym_comment, ACTIONS(7), 1, - anon_sym_SEMI, - ACTIONS(9), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, anon_sym_LBRACK, - ACTIONS(11), 1, + ACTIONS(25), 1, anon_sym_LPAREN, - ACTIONS(15), 1, - sym_identifier, - ACTIONS(36), 1, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(31), 1, + anon_sym_DOT, + ACTIONS(33), 1, anon_sym_RPAREN, - STATE(18), 1, + STATE(19), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, sym__field_name, - STATE(3), 9, - sym__definition, - sym_field_definition, - sym_comment, - sym_list, + STATE(286), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, sym_grouping, sym_anonymous_node, sym_named_node, + sym_field_definition, sym_predicate, - aux_sym_named_node_repeat1, - [66] = 6, - ACTIONS(40), 1, - aux_sym_string_token1, - ACTIONS(43), 1, - anon_sym_SEMI, - ACTIONS(46), 1, + [100] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, anon_sym_LBRACK, - ACTIONS(49), 1, + ACTIONS(25), 1, anon_sym_LPAREN, - ACTIONS(38), 3, - ts_builtin_sym_end, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(35), 1, + anon_sym_DOT, + ACTIONS(37), 1, + anon_sym_RPAREN, + STATE(15), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(281), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [150] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(39), 1, + anon_sym_DOT, + ACTIONS(41), 1, + anon_sym_RPAREN, + STATE(21), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(270), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [200] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(43), 1, + anon_sym_DOT, + ACTIONS(45), 1, + anon_sym_RPAREN, + STATE(16), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(276), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [250] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(47), 1, + anon_sym_DOT, + ACTIONS(49), 1, + anon_sym_RPAREN, + STATE(10), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(282), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [300] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(51), 1, + sym_identifier, + ACTIONS(53), 1, + anon_sym__, + ACTIONS(55), 1, + anon_sym_RPAREN, + ACTIONS(57), 1, + anon_sym_POUND, + STATE(4), 1, + sym__node_identifier, + STATE(51), 1, + aux_sym_grouping_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(295), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [349] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(59), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(274), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [396] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(61), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(289), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [443] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(63), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(267), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [490] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(65), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(284), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [537] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(67), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(283), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [584] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(69), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(288), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [631] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(71), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(272), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [678] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(73), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(268), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [725] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(75), 1, + sym_identifier, + ACTIONS(78), 1, + anon_sym__, + ACTIONS(81), 1, + anon_sym_DQUOTE, + ACTIONS(84), 1, + anon_sym_LBRACK, + ACTIONS(87), 1, + anon_sym_LPAREN, + ACTIONS(90), 1, + anon_sym_RPAREN, + ACTIONS(92), 1, + anon_sym_BANG, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(277), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [772] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(95), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(280), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [819] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(97), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(279), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [866] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(53), 1, + anon_sym__, + ACTIONS(99), 1, + sym_identifier, + ACTIONS(101), 1, + anon_sym_RPAREN, + ACTIONS(103), 1, + anon_sym_POUND, + STATE(7), 1, + sym__node_identifier, + STATE(48), 1, + aux_sym_grouping_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(295), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [915] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(105), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(278), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [962] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(53), 1, + anon_sym__, + ACTIONS(107), 1, + sym_identifier, + ACTIONS(109), 1, + anon_sym_RPAREN, + ACTIONS(111), 1, + anon_sym_POUND, + STATE(3), 1, + sym__node_identifier, + STATE(50), 1, + aux_sym_grouping_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(295), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1011] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(113), 1, + anon_sym_RPAREN, + STATE(17), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(271), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1058] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(65), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1102] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(69), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1146] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(95), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1190] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(115), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1234] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(117), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1278] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(119), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1322] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(121), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1366] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(123), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1410] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(125), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1454] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(113), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1498] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(12), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(278), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1542] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(127), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1586] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(129), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1630] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(18), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(268), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1674] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(59), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1718] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(23), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(279), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1762] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(131), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1806] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(133), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1850] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(63), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1894] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(9), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(272), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1938] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(14), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(283), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [1982] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(135), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2026] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + ACTIONS(137), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2070] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(11), 1, + aux_sym_named_node_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(289), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2114] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(139), 1, + anon_sym_RPAREN, + STATE(49), 1, + aux_sym_grouping_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(295), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2157] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(141), 1, + sym_identifier, + ACTIONS(144), 1, + anon_sym__, + ACTIONS(147), 1, + anon_sym_DQUOTE, + ACTIONS(150), 1, + anon_sym_LBRACK, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(156), 1, + anon_sym_RPAREN, + STATE(49), 1, + aux_sym_grouping_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(295), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2200] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(158), 1, + anon_sym_RPAREN, + STATE(49), 1, + aux_sym_grouping_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(295), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2243] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(160), 1, + anon_sym_RPAREN, + STATE(49), 1, + aux_sym_grouping_repeat1, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(295), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2286] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(29), 1, + anon_sym_BANG, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(275), 3, + sym_definition, + sym__named_node_expression, + sym_negated_field, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2327] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(162), 1, + anon_sym__, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(166), 1, + anon_sym_LBRACK, + ACTIONS(168), 1, + anon_sym_RBRACK, + ACTIONS(170), 1, + anon_sym_LPAREN, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(58), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2367] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(162), 1, + anon_sym__, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(166), 1, + anon_sym_LBRACK, + ACTIONS(170), 1, + anon_sym_LPAREN, + ACTIONS(172), 1, + anon_sym_RBRACK, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(61), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2407] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(162), 1, + anon_sym__, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(166), 1, + anon_sym_LBRACK, + ACTIONS(170), 1, + anon_sym_LPAREN, + ACTIONS(174), 1, + anon_sym_RBRACK, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(59), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2447] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(176), 1, + ts_builtin_sym_end, + ACTIONS(178), 1, + sym_identifier, + ACTIONS(181), 1, + anon_sym__, + ACTIONS(184), 1, + anon_sym_DQUOTE, + ACTIONS(187), 1, + anon_sym_LBRACK, + ACTIONS(190), 1, + anon_sym_LPAREN, + STATE(80), 1, + sym__field_name, + STATE(84), 1, + sym_string, + STATE(56), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(301), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2487] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym__, + ACTIONS(11), 1, + anon_sym_DQUOTE, + ACTIONS(13), 1, + anon_sym_LBRACK, + ACTIONS(15), 1, + anon_sym_LPAREN, + ACTIONS(193), 1, + ts_builtin_sym_end, + STATE(80), 1, + sym__field_name, + STATE(84), 1, + sym_string, + STATE(56), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(301), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2527] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(162), 1, + anon_sym__, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(166), 1, + anon_sym_LBRACK, + ACTIONS(170), 1, + anon_sym_LPAREN, + ACTIONS(195), 1, + anon_sym_RBRACK, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(59), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2567] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(176), 1, + anon_sym_RBRACK, + ACTIONS(178), 1, + sym_identifier, + ACTIONS(197), 1, + anon_sym__, + ACTIONS(200), 1, + anon_sym_DQUOTE, + ACTIONS(203), 1, + anon_sym_LBRACK, + ACTIONS(206), 1, + anon_sym_LPAREN, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(59), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2607] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + ACTIONS(156), 1, + anon_sym_RPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(293), 2, + sym_definition, + sym__group_expression, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2647] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(162), 1, + anon_sym__, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(166), 1, + anon_sym_LBRACK, + ACTIONS(170), 1, + anon_sym_LPAREN, + ACTIONS(209), 1, + anon_sym_RBRACK, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(59), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2687] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(162), 1, + anon_sym__, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(166), 1, + anon_sym_LBRACK, + ACTIONS(170), 1, + anon_sym_LPAREN, + ACTIONS(211), 1, + anon_sym_RBRACK, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(55), 2, + sym_definition, + aux_sym_program_repeat1, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [2727] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(119), 1, + sym_quantifier, + STATE(118), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(213), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(219), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2758] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(123), 1, + sym_quantifier, + STATE(122), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(221), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(223), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2789] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(137), 1, + sym_quantifier, + STATE(131), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(225), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(227), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2820] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(135), 1, + sym_quantifier, + STATE(133), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(229), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(231), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2851] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(134), 1, + sym_quantifier, + STATE(126), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(233), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(235), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2882] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(158), 1, + sym_quantifier, + STATE(155), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(237), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(239), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2913] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(115), 1, + sym_quantifier, + STATE(132), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(241), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(243), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2944] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(116), 1, + sym_quantifier, + STATE(141), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(245), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(247), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [2975] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(160), 1, + sym_quantifier, + STATE(161), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(249), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(251), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3006] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(147), 1, + sym_quantifier, + STATE(146), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(253), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(255), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3037] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(142), 1, + sym_quantifier, + STATE(140), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(257), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(259), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3068] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(152), 1, + sym_quantifier, + STATE(154), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(261), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(263), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3099] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(114), 1, + sym_quantifier, + STATE(151), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(265), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(267), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3130] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(128), 1, + sym_quantifier, + STATE(127), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(269), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(271), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3161] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(158), 1, + sym_quantifier, + STATE(155), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(273), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(275), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3192] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(144), 1, + sym_quantifier, + STATE(143), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(215), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(277), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(279), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [3223] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym__, + ACTIONS(21), 1, + anon_sym_DQUOTE, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(25), 1, + anon_sym_LPAREN, + STATE(68), 1, + sym_string, + STATE(79), 1, + sym__field_name, + STATE(287), 1, + sym_definition, + STATE(290), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [3259] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym__, + ACTIONS(11), 1, + anon_sym_DQUOTE, + ACTIONS(13), 1, + anon_sym_LBRACK, + ACTIONS(15), 1, + anon_sym_LPAREN, + STATE(80), 1, + sym__field_name, + STATE(84), 1, + sym_string, + STATE(296), 1, + sym_definition, + STATE(301), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [3295] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(162), 1, + anon_sym__, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(166), 1, + anon_sym_LBRACK, + ACTIONS(170), 1, + anon_sym_LPAREN, + STATE(81), 1, + sym__field_name, + STATE(103), 1, + sym_string, + STATE(298), 1, + sym_definition, + STATE(299), 6, + sym_alternation, + sym_grouping, + sym_anonymous_node, + sym_named_node, + sym_field_definition, + sym_predicate, + [3331] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(230), 1, + sym_quantifier, + ACTIONS(261), 2, + sym_identifier, + anon_sym__, + STATE(229), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(263), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3360] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(182), 1, + sym_quantifier, + ACTIONS(225), 2, + sym_identifier, + anon_sym__, + STATE(183), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(227), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3389] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(198), 1, + sym_quantifier, + ACTIONS(237), 2, + sym_identifier, + anon_sym__, + STATE(203), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(239), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3418] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(202), 1, + sym_quantifier, + ACTIONS(221), 2, + sym_identifier, + anon_sym__, + STATE(201), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(223), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3447] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(242), 1, + sym_quantifier, + ACTIONS(213), 2, + sym_identifier, + anon_sym__, + STATE(241), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(219), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3476] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(177), 1, + sym_quantifier, + ACTIONS(213), 2, + sym_identifier, + anon_sym__, + STATE(178), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(219), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3505] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(240), 1, + sym_quantifier, + ACTIONS(241), 2, + sym_identifier, + anon_sym__, + STATE(239), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(243), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3534] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(247), 1, + sym_quantifier, + ACTIONS(233), 2, + sym_identifier, + anon_sym__, + STATE(246), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(235), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3563] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(251), 1, + sym_quantifier, + ACTIONS(277), 2, + sym_identifier, + anon_sym__, + STATE(250), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(279), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3592] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(186), 1, + sym_quantifier, + ACTIONS(265), 2, + sym_identifier, + anon_sym__, + STATE(187), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(267), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3621] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(206), 1, + sym_quantifier, + ACTIONS(269), 2, + sym_identifier, + anon_sym__, + STATE(205), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(271), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3650] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(237), 1, + sym_quantifier, + ACTIONS(225), 2, + sym_identifier, + anon_sym__, + STATE(236), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(227), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3679] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(193), 1, + sym_quantifier, + ACTIONS(249), 2, + sym_identifier, + anon_sym__, + STATE(194), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(251), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3708] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(232), 1, + sym_quantifier, + ACTIONS(265), 2, + sym_identifier, + anon_sym__, + STATE(231), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(267), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3737] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(234), 1, + sym_quantifier, + ACTIONS(257), 2, + sym_identifier, + anon_sym__, + STATE(244), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(259), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3766] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(248), 1, + sym_quantifier, + ACTIONS(245), 2, + sym_identifier, + anon_sym__, + STATE(169), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(247), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3795] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(171), 1, + sym_quantifier, + ACTIONS(277), 2, + sym_identifier, + anon_sym__, + STATE(167), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(279), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3824] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(221), 1, + sym_quantifier, + ACTIONS(253), 2, + sym_identifier, + anon_sym__, + STATE(222), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(255), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3853] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(225), 1, + sym_quantifier, + ACTIONS(249), 2, + sym_identifier, + anon_sym__, + STATE(224), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(251), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3882] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(256), 1, + sym_quantifier, + ACTIONS(245), 2, + sym_identifier, + anon_sym__, + STATE(255), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(247), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3911] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(173), 1, + sym_quantifier, + ACTIONS(233), 2, + sym_identifier, + anon_sym__, + STATE(174), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(235), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3940] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(220), 1, + sym_quantifier, + ACTIONS(237), 2, + sym_identifier, + anon_sym__, + STATE(219), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(239), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [3969] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(263), 1, + sym_quantifier, + ACTIONS(221), 2, + sym_identifier, + anon_sym__, + STATE(265), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(223), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [3998] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(188), 1, + sym_quantifier, + ACTIONS(261), 2, + sym_identifier, + anon_sym__, + STATE(189), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(263), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [4027] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(214), 1, + sym_quantifier, + ACTIONS(253), 2, + sym_identifier, + anon_sym__, + STATE(213), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(255), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [4056] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(212), 1, + sym_quantifier, + ACTIONS(257), 2, + sym_identifier, + anon_sym__, + STATE(211), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(259), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [4085] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(179), 1, + sym_quantifier, + ACTIONS(241), 2, + sym_identifier, + anon_sym__, + STATE(180), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(243), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [4114] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(261), 1, + sym_quantifier, + ACTIONS(269), 2, + sym_identifier, + anon_sym__, + STATE(262), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(271), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [4143] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + STATE(252), 1, + sym_quantifier, + ACTIONS(229), 2, + sym_identifier, + anon_sym__, + STATE(254), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(281), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(231), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [4172] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + STATE(209), 1, + sym_quantifier, + ACTIONS(229), 2, + sym_identifier, + anon_sym__, + STATE(208), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(285), 3, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + ACTIONS(231), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [4201] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(291), 9, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4221] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(293), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(295), 9, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4241] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(157), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(297), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(299), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4264] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(150), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(301), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(303), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4287] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(125), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(305), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(307), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4310] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(309), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(311), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4333] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(225), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(227), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4356] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(124), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(313), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(315), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4379] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(317), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(319), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4402] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(321), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(323), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4425] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(325), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(327), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4448] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(145), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(329), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(331), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4471] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(333), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(335), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4494] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(337), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(339), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4517] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(241), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(243), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4540] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(245), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(247), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4563] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(117), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(341), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(343), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4586] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(345), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(347), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4609] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(293), 2, + sym_identifier, + anon_sym__, + ACTIONS(295), 9, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + [4628] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(261), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(263), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4651] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(265), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(267), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4674] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(349), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(351), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4697] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(139), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(353), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(355), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4720] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(121), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(357), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(359), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4743] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(361), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(363), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4766] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(156), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(365), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(367), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4789] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 2, + sym_identifier, + anon_sym__, + ACTIONS(291), 9, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + [4808] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(369), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(371), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4831] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(221), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(223), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4854] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(233), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(235), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4877] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(129), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(373), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(375), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4900] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(213), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(219), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4923] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(120), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(377), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(379), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4946] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(381), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(383), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4969] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(229), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(231), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [4992] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(136), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(385), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(387), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5015] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(391), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(389), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(394), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5038] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(396), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(398), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5061] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(400), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(402), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5084] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(404), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(406), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5107] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(159), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(408), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(410), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5130] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(412), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(414), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5153] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(249), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(251), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5176] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(416), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(418), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5199] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(420), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(422), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5222] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(424), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(426), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5245] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(149), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(428), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(430), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5268] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(432), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(434), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5291] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(153), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(436), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(438), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5314] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 1, + anon_sym_AT, + STATE(148), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(440), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(442), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5337] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(444), 1, + anon_sym_SLASH, + ACTIONS(446), 1, + anon_sym_COLON, + ACTIONS(273), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(275), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5359] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 2, + sym_identifier, + anon_sym__, + ACTIONS(291), 8, + ts_builtin_sym_end, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [5377] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(446), 1, + anon_sym_COLON, + ACTIONS(448), 1, + anon_sym_SLASH, + ACTIONS(273), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(275), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5399] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(293), 2, + sym_identifier, + anon_sym__, + ACTIONS(295), 8, + ts_builtin_sym_end, + anon_sym_STAR, + anon_sym_PLUS, + anon_sym_QMARK, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [5417] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(446), 1, + anon_sym_COLON, + ACTIONS(450), 1, + anon_sym_SLASH, + ACTIONS(273), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(275), 5, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [5439] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(213), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(219), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5460] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(455), 1, + anon_sym_AT, + ACTIONS(458), 1, + anon_sym_DQUOTE, + ACTIONS(461), 1, + anon_sym_RPAREN, + ACTIONS(452), 2, + sym_identifier, + anon_sym__, + STATE(168), 4, + sym__node_identifier, + sym_capture, + sym_string, + aux_sym_parameters_repeat1, + [5483] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(233), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(235), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5504] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(381), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(383), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5525] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(377), 2, + sym_identifier, + anon_sym__, + STATE(176), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(379), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5546] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(287), 1, + anon_sym_AT, + STATE(328), 1, + sym_parameters, + ACTIONS(463), 2, + sym_identifier, + anon_sym__, + STATE(260), 4, + sym__node_identifier, + sym_capture, + sym_string, + aux_sym_parameters_repeat1, + [5569] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(353), 2, + sym_identifier, + anon_sym__, + STATE(181), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(355), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5590] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(241), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(243), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5611] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(337), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(339), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5632] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(317), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(319), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5653] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(313), 2, + sym_identifier, + anon_sym__, + STATE(184), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(315), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5674] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(225), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(227), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5695] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(301), 2, + sym_identifier, + anon_sym__, + STATE(185), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(303), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5716] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(265), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(267), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5737] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(369), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(371), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5758] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(365), 2, + sym_identifier, + anon_sym__, + STATE(190), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(367), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5779] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(261), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(263), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5800] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(333), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(335), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5821] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(400), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(402), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5842] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(297), 2, + sym_identifier, + anon_sym__, + STATE(191), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(299), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5863] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(404), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(406), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5884] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(408), 2, + sym_identifier, + anon_sym__, + STATE(192), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(410), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5905] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(249), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(251), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5926] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(420), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(422), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5947] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(424), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(426), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5968] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(432), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(434), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [5989] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(436), 2, + sym_identifier, + anon_sym__, + STATE(195), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(438), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, anon_sym_RBRACK, + anon_sym_LPAREN, + [6010] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(440), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(442), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6031] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(412), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(414), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6052] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(287), 1, + anon_sym_AT, + STATE(320), 1, + sym_parameters, + ACTIONS(463), 2, + sym_identifier, + anon_sym__, + STATE(260), 4, + sym__node_identifier, + sym_capture, + sym_string, + aux_sym_parameters_repeat1, + [6075] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(465), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(467), 6, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_BANG, + [6092] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(428), 2, + sym_identifier, + anon_sym__, + STATE(217), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(430), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6113] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(309), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(311), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6134] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(321), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(323), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6155] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(325), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(327), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6176] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(329), 2, + sym_identifier, + anon_sym__, + STATE(170), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(331), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6197] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(416), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(418), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6218] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(469), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(471), 6, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, anon_sym_RPAREN, - STATE(5), 8, - sym__definition, + anon_sym_BANG, + [6235] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(245), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(247), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6256] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(341), 2, + sym_identifier, + anon_sym__, + STATE(199), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(343), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6277] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(345), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(347), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6298] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(349), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(351), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6319] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(357), 2, + sym_identifier, + anon_sym__, + STATE(200), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(359), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6340] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(361), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(363), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6361] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(221), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(223), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6382] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(373), 2, + sym_identifier, + anon_sym__, + STATE(207), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(375), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6403] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(229), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(231), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6424] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(385), 2, + sym_identifier, + anon_sym__, + STATE(210), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(387), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6445] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(473), 1, + anon_sym_AT, + ACTIONS(389), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(394), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6466] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(396), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(398), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6487] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(396), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(398), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6508] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(476), 1, + anon_sym_AT, + ACTIONS(389), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(394), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6529] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(416), 2, + sym_identifier, + anon_sym__, + STATE(215), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(418), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6550] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(428), 2, + sym_identifier, + anon_sym__, + STATE(216), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(430), 4, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LPAREN, + [6571] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(385), 2, + sym_identifier, + anon_sym__, + STATE(249), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(387), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6592] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(229), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(231), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6613] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(412), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(414), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6634] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(440), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(442), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6655] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(436), 2, + sym_identifier, + anon_sym__, + STATE(223), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(438), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6676] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(432), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(434), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6697] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(424), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(426), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6718] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(420), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(422), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6739] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(249), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(251), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6760] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(408), 2, + sym_identifier, + anon_sym__, + STATE(226), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(410), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6781] = 5, + ACTIONS(3), 1, sym_comment, - sym_list, - sym_grouping, - sym_anonymous_node, - sym_named_node, - sym_predicate, - aux_sym_program_repeat1, - [94] = 5, - ACTIONS(56), 1, + ACTIONS(283), 1, anon_sym_AT, - STATE(30), 1, - sym_quantifier, - STATE(28), 2, + ACTIONS(404), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, sym_capture, - aux_sym_list_repeat1, - ACTIONS(54), 3, - anon_sym_QMARK, - anon_sym_STAR, - anon_sym_PLUS, - ACTIONS(52), 8, + aux_sym_alternation_repeat1, + ACTIONS(406), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6802] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(297), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + STATE(227), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(299), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [120] = 5, - ACTIONS(56), 1, + [6823] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, anon_sym_AT, - STATE(27), 1, - sym_quantifier, - STATE(26), 2, + ACTIONS(400), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, sym_capture, - aux_sym_list_repeat1, - ACTIONS(54), 3, - anon_sym_QMARK, - anon_sym_STAR, - anon_sym_PLUS, - ACTIONS(58), 8, + aux_sym_alternation_repeat1, + ACTIONS(402), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6844] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(373), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + STATE(257), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(375), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [146] = 5, - ACTIONS(56), 1, + [6865] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, anon_sym_AT, - STATE(40), 1, - sym_quantifier, - STATE(37), 2, + ACTIONS(333), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, sym_capture, - aux_sym_list_repeat1, - ACTIONS(54), 3, - anon_sym_QMARK, - anon_sym_STAR, - anon_sym_PLUS, - ACTIONS(60), 8, + aux_sym_alternation_repeat1, + ACTIONS(335), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6886] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(261), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(263), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [172] = 5, - ACTIONS(56), 1, + [6907] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, anon_sym_AT, - STATE(38), 1, - sym_quantifier, - STATE(39), 2, + ACTIONS(365), 2, + sym_identifier, + anon_sym__, + STATE(228), 2, sym_capture, - aux_sym_list_repeat1, - ACTIONS(54), 3, - anon_sym_QMARK, - anon_sym_STAR, - anon_sym_PLUS, - ACTIONS(62), 8, + aux_sym_alternation_repeat1, + ACTIONS(367), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6928] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(369), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(371), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [198] = 5, - ACTIONS(56), 1, + [6949] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, anon_sym_AT, - STATE(35), 1, - sym_quantifier, - STATE(36), 2, + ACTIONS(265), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, sym_capture, - aux_sym_list_repeat1, - ACTIONS(54), 3, - anon_sym_QMARK, - anon_sym_STAR, - anon_sym_PLUS, - ACTIONS(64), 8, + aux_sym_alternation_repeat1, + ACTIONS(267), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [6970] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(301), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + STATE(233), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(303), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [224] = 5, - ACTIONS(56), 1, + [6991] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, anon_sym_AT, - STATE(22), 1, - sym_quantifier, - STATE(23), 2, + ACTIONS(225), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, sym_capture, - aux_sym_list_repeat1, - ACTIONS(54), 3, - anon_sym_QMARK, - anon_sym_STAR, - anon_sym_PLUS, - ACTIONS(66), 8, + aux_sym_alternation_repeat1, + ACTIONS(227), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7012] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(313), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + STATE(235), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(315), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [250] = 5, - ACTIONS(56), 1, + [7033] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, anon_sym_AT, - STATE(31), 1, - sym_quantifier, - STATE(32), 2, + ACTIONS(317), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, sym_capture, - aux_sym_list_repeat1, - ACTIONS(54), 3, - anon_sym_QMARK, - anon_sym_STAR, - anon_sym_PLUS, - ACTIONS(68), 8, + aux_sym_alternation_repeat1, + ACTIONS(319), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7054] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(221), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(223), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7075] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(337), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(339), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7096] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(241), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(243), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7117] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(353), 2, + sym_identifier, + anon_sym__, + STATE(238), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(355), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7138] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(305), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + STATE(175), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(307), 4, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [276] = 7, - ACTIONS(5), 1, - aux_sym_string_token1, - ACTIONS(7), 1, - anon_sym_SEMI, - ACTIONS(9), 1, + [7159] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(361), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(363), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7180] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(213), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(219), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7201] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(377), 2, + sym_identifier, + anon_sym__, + STATE(243), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(379), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7222] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(357), 2, + sym_identifier, + anon_sym__, + STATE(264), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(359), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7243] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(381), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(383), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7264] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(349), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(351), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7285] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(233), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(235), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7306] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(305), 2, + sym_identifier, + anon_sym__, + STATE(245), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(307), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7327] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(345), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(347), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7348] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(309), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(311), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, - ACTIONS(11), 1, anon_sym_LPAREN, - ACTIONS(70), 1, + [7369] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(287), 1, + anon_sym_AT, + STATE(321), 1, + sym_parameters, + ACTIONS(463), 2, sym_identifier, - ACTIONS(72), 1, + anon_sym__, + STATE(260), 4, + sym__node_identifier, + sym_capture, + sym_string, + aux_sym_parameters_repeat1, + [7392] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(164), 1, + anon_sym_DQUOTE, + ACTIONS(287), 1, + anon_sym_AT, + ACTIONS(481), 1, anon_sym_RPAREN, - STATE(17), 8, - sym__definition, + ACTIONS(479), 2, + sym_identifier, + anon_sym__, + STATE(168), 4, + sym__node_identifier, + sym_capture, + sym_string, + aux_sym_parameters_repeat1, + [7415] = 5, + ACTIONS(3), 1, sym_comment, - sym_list, - sym_grouping, - sym_anonymous_node, - sym_named_node, - sym_predicate, - aux_sym_program_repeat1, - [305] = 6, - ACTIONS(5), 1, - aux_sym_string_token1, - ACTIONS(7), 1, - anon_sym_SEMI, - ACTIONS(9), 1, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(341), 2, + sym_identifier, + anon_sym__, + STATE(258), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(343), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7436] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(245), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(247), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7457] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(329), 2, + sym_identifier, + anon_sym__, + STATE(253), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(331), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7478] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(321), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(323), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7499] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + anon_sym_AT, + ACTIONS(325), 2, + sym_identifier, + anon_sym__, + STATE(218), 2, + sym_capture, + aux_sym_alternation_repeat1, + ACTIONS(327), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7520] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(483), 1, + anon_sym_DOT, + ACTIONS(485), 2, + sym_identifier, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - ACTIONS(11), 1, anon_sym_LPAREN, - ACTIONS(74), 1, - anon_sym_RBRACK, - STATE(16), 8, - sym__definition, + anon_sym_RPAREN, + anon_sym_BANG, + [7538] = 4, + ACTIONS(3), 1, sym_comment, - sym_list, - sym_grouping, - sym_anonymous_node, - sym_named_node, - sym_predicate, - aux_sym_program_repeat1, - [331] = 6, - ACTIONS(5), 1, - aux_sym_string_token1, - ACTIONS(7), 1, - anon_sym_SEMI, - ACTIONS(9), 1, + ACTIONS(489), 1, + anon_sym_DOT, + ACTIONS(485), 2, + sym_identifier, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - ACTIONS(11), 1, anon_sym_LPAREN, - ACTIONS(76), 1, - ts_builtin_sym_end, - STATE(5), 8, - sym__definition, + anon_sym_RPAREN, + anon_sym_BANG, + [7556] = 4, + ACTIONS(3), 1, sym_comment, - sym_list, - sym_grouping, - sym_anonymous_node, - sym_named_node, - sym_predicate, - aux_sym_program_repeat1, - [357] = 6, - ACTIONS(5), 1, - aux_sym_string_token1, - ACTIONS(7), 1, - anon_sym_SEMI, - ACTIONS(9), 1, + ACTIONS(491), 1, + anon_sym_DOT, + ACTIONS(485), 2, + sym_identifier, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - ACTIONS(11), 1, anon_sym_LPAREN, - ACTIONS(78), 1, - anon_sym_RBRACK, - STATE(5), 8, - sym__definition, + anon_sym_RPAREN, + anon_sym_BANG, + [7574] = 3, + ACTIONS(3), 1, sym_comment, - sym_list, - sym_grouping, - sym_anonymous_node, - sym_named_node, - sym_predicate, - aux_sym_program_repeat1, - [383] = 6, - ACTIONS(5), 1, - aux_sym_string_token1, - ACTIONS(7), 1, - anon_sym_SEMI, - ACTIONS(9), 1, + ACTIONS(493), 3, + anon_sym_DOT, + sym_identifier, + anon_sym__, + ACTIONS(495), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - ACTIONS(11), 1, anon_sym_LPAREN, - ACTIONS(80), 1, anon_sym_RPAREN, - STATE(5), 8, - sym__definition, + anon_sym_BANG, + [7590] = 4, + ACTIONS(3), 1, sym_comment, - sym_list, - sym_grouping, - sym_anonymous_node, - sym_named_node, - sym_predicate, - aux_sym_program_repeat1, - [409] = 5, - ACTIONS(5), 1, - aux_sym_string_token1, - ACTIONS(7), 1, - anon_sym_SEMI, - ACTIONS(9), 1, + ACTIONS(497), 1, + anon_sym_DOT, + ACTIONS(485), 2, + sym_identifier, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - ACTIONS(11), 1, anon_sym_LPAREN, - STATE(46), 7, - sym__definition, + anon_sym_RPAREN, + anon_sym_BANG, + [7608] = 4, + ACTIONS(3), 1, sym_comment, - sym_list, - sym_grouping, - sym_anonymous_node, - sym_named_node, - sym_predicate, - [431] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(82), 8, - ts_builtin_sym_end, + ACTIONS(499), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [449] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(84), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7626] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(501), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [467] = 3, - ACTIONS(88), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(86), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7644] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(469), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(471), 6, + anon_sym_AT, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [485] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(34), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(91), 8, - ts_builtin_sym_end, + [7660] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(503), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [503] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(64), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7678] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(505), 3, + anon_sym_DOT, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(507), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [521] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(93), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7694] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(509), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [539] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(95), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7712] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(511), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [557] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(97), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7730] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(513), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [575] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(24), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(99), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7748] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(515), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [593] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(101), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7766] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(517), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [611] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(103), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7784] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(519), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [629] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(20), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(105), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7802] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(521), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [647] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(19), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(107), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7820] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(523), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [665] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(60), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7838] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(525), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [683] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(109), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7856] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(527), 3, + anon_sym_DOT, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(529), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [701] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(111), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7872] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(531), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [719] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(33), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(113), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7890] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(533), 3, + anon_sym_DOT, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(535), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [737] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(115), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7906] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(537), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [755] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(117), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7924] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 1, + anon_sym_DOT, + ACTIONS(485), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(487), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [773] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(29), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(119), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7942] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 3, + anon_sym_DOT, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(543), 5, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [791] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(21), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(58), 8, - ts_builtin_sym_end, + anon_sym_BANG, + [7958] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(465), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(467), 5, + anon_sym_AT, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [809] = 3, - ACTIONS(56), 1, - anon_sym_AT, - STATE(25), 2, - sym_capture, - aux_sym_list_repeat1, - ACTIONS(121), 8, + [7973] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(465), 2, + sym_identifier, + anon_sym__, + ACTIONS(467), 5, ts_builtin_sym_end, + anon_sym_AT, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [7988] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(545), 3, + anon_sym_DOT, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(547), 4, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [827] = 1, - ACTIONS(123), 9, - ts_builtin_sym_end, + [8003] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(469), 2, sym_identifier, + anon_sym__, + ACTIONS(471), 5, + ts_builtin_sym_end, anon_sym_AT, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [8018] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(549), 1, + anon_sym_DOT, + ACTIONS(551), 2, + sym_identifier, + anon_sym__, + ACTIONS(553), 4, + anon_sym_DQUOTE, anon_sym_LBRACK, - anon_sym_RBRACK, anon_sym_LPAREN, anon_sym_RPAREN, - [839] = 1, - ACTIONS(125), 9, + [8035] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(533), 2, + sym_identifier, + anon_sym__, + ACTIONS(535), 4, ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [8049] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(527), 2, sym_identifier, - anon_sym_AT, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(529), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, + anon_sym_LBRACK, + anon_sym_LPAREN, + [8063] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(533), 2, + sym_identifier, + anon_sym__, + ACTIONS(535), 4, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [851] = 1, - ACTIONS(127), 8, - ts_builtin_sym_end, + [8077] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(543), 4, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [862] = 1, - ACTIONS(129), 8, - ts_builtin_sym_end, + [8091] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(527), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(529), 4, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_RBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [873] = 4, - ACTIONS(56), 1, - anon_sym_AT, - ACTIONS(131), 1, - aux_sym_string_token1, - ACTIONS(133), 1, - anon_sym_RPAREN, - STATE(48), 3, - sym_capture, - sym_string, - aux_sym_parameters_repeat1, - [888] = 1, - ACTIONS(135), 6, + [8105] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 2, sym_identifier, - aux_sym_string_token1, - anon_sym_SEMI, + anon_sym__, + ACTIONS(543), 4, + ts_builtin_sym_end, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_LPAREN, - anon_sym_RPAREN, - [897] = 4, - ACTIONS(56), 1, - anon_sym_AT, - ACTIONS(131), 1, - aux_sym_string_token1, - STATE(52), 1, - sym_parameters, - STATE(45), 3, - sym_capture, - sym_string, - aux_sym_parameters_repeat1, - [912] = 4, - ACTIONS(137), 1, - anon_sym_AT, - ACTIONS(140), 1, - aux_sym_string_token1, - ACTIONS(143), 1, - anon_sym_RPAREN, - STATE(48), 3, - sym_capture, - sym_string, - aux_sym_parameters_repeat1, - [927] = 1, - ACTIONS(145), 4, - aux_sym_string_token1, - anon_sym_SEMI, + [8119] = 5, + ACTIONS(557), 1, + anon_sym_DQUOTE, + ACTIONS(559), 1, + sym_comment, + STATE(306), 1, + aux_sym_string_content_repeat1, + STATE(322), 1, + sym_string_content, + ACTIONS(555), 2, + sym_escape_sequence, + aux_sym_string_content_token1, + [8136] = 5, + ACTIONS(559), 1, + sym_comment, + ACTIONS(561), 1, + anon_sym_DQUOTE, + STATE(306), 1, + aux_sym_string_content_repeat1, + STATE(317), 1, + sym_string_content, + ACTIONS(555), 2, + sym_escape_sequence, + aux_sym_string_content_token1, + [8153] = 5, + ACTIONS(559), 1, + sym_comment, + ACTIONS(563), 1, + anon_sym_DQUOTE, + STATE(306), 1, + aux_sym_string_content_repeat1, + STATE(325), 1, + sym_string_content, + ACTIONS(555), 2, + sym_escape_sequence, + aux_sym_string_content_token1, + [8170] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(565), 2, + sym_identifier, + anon_sym__, + ACTIONS(567), 3, + anon_sym_DQUOTE, anon_sym_LBRACK, anon_sym_LPAREN, - [934] = 1, - ACTIONS(147), 3, - anon_sym_AT, - aux_sym_string_token1, + [8183] = 4, + ACTIONS(559), 1, + sym_comment, + ACTIONS(571), 1, + anon_sym_DQUOTE, + STATE(307), 1, + aux_sym_string_content_repeat1, + ACTIONS(569), 2, + sym_escape_sequence, + aux_sym_string_content_token1, + [8197] = 4, + ACTIONS(559), 1, + sym_comment, + ACTIONS(576), 1, + anon_sym_DQUOTE, + STATE(307), 1, + aux_sym_string_content_repeat1, + ACTIONS(573), 2, + sym_escape_sequence, + aux_sym_string_content_token1, + [8211] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(578), 1, + aux_sym__immediate_identifier_token1, + STATE(318), 1, + sym__immediate_identifier, + [8221] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(580), 1, + aux_sym__immediate_identifier_token1, + STATE(326), 1, + sym__immediate_identifier, + [8231] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(582), 1, + aux_sym__immediate_identifier_token1, + STATE(324), 1, + sym__immediate_identifier, + [8241] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(584), 1, + aux_sym__immediate_identifier_token1, + STATE(2), 1, + sym__immediate_identifier, + [8251] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(586), 1, + aux_sym__immediate_identifier_token1, + STATE(294), 1, + sym__immediate_identifier, + [8261] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(588), 1, + aux_sym__immediate_identifier_token1, + STATE(273), 1, + sym__immediate_identifier, + [8271] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(590), 1, + aux_sym__immediate_identifier_token1, + STATE(5), 1, + sym__immediate_identifier, + [8281] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(592), 1, + aux_sym__immediate_identifier_token1, + STATE(204), 1, + sym__immediate_identifier, + [8291] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(594), 1, + aux_sym__immediate_identifier_token1, + STATE(6), 1, + sym__immediate_identifier, + [8301] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(596), 1, + anon_sym_DQUOTE, + [8308] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(598), 1, + sym_predicate_type, + [8315] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(600), 1, + sym_identifier, + [8322] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(602), 1, anon_sym_RPAREN, - [940] = 1, - ACTIONS(149), 2, - anon_sym_AT, - aux_sym_string_token1, - [945] = 1, - ACTIONS(151), 1, + [8329] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(604), 1, anon_sym_RPAREN, - [949] = 1, - ACTIONS(153), 1, + [8336] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(606), 1, + anon_sym_DQUOTE, + [8343] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(608), 1, ts_builtin_sym_end, - [953] = 1, - ACTIONS(155), 1, - sym_identifier, - [957] = 1, - ACTIONS(157), 1, + [8350] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(610), 1, + sym_predicate_type, + [8357] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(612), 1, + anon_sym_DQUOTE, + [8364] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(614), 1, + sym_predicate_type, + [8371] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(446), 1, anon_sym_COLON, - [961] = 1, - ACTIONS(159), 1, - aux_sym_comment_token1, + [8378] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(616), 1, + anon_sym_RPAREN, }; -static uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(3)] = 0, - [SMALL_STATE(4)] = 33, - [SMALL_STATE(5)] = 66, - [SMALL_STATE(6)] = 94, - [SMALL_STATE(7)] = 120, - [SMALL_STATE(8)] = 146, - [SMALL_STATE(9)] = 172, - [SMALL_STATE(10)] = 198, - [SMALL_STATE(11)] = 224, - [SMALL_STATE(12)] = 250, - [SMALL_STATE(13)] = 276, - [SMALL_STATE(14)] = 305, - [SMALL_STATE(15)] = 331, - [SMALL_STATE(16)] = 357, - [SMALL_STATE(17)] = 383, - [SMALL_STATE(18)] = 409, - [SMALL_STATE(19)] = 431, - [SMALL_STATE(20)] = 449, - [SMALL_STATE(21)] = 467, - [SMALL_STATE(22)] = 485, - [SMALL_STATE(23)] = 503, - [SMALL_STATE(24)] = 521, - [SMALL_STATE(25)] = 539, - [SMALL_STATE(26)] = 557, - [SMALL_STATE(27)] = 575, - [SMALL_STATE(28)] = 593, - [SMALL_STATE(29)] = 611, - [SMALL_STATE(30)] = 629, - [SMALL_STATE(31)] = 647, - [SMALL_STATE(32)] = 665, - [SMALL_STATE(33)] = 683, - [SMALL_STATE(34)] = 701, - [SMALL_STATE(35)] = 719, - [SMALL_STATE(36)] = 737, - [SMALL_STATE(37)] = 755, - [SMALL_STATE(38)] = 773, - [SMALL_STATE(39)] = 791, - [SMALL_STATE(40)] = 809, - [SMALL_STATE(41)] = 827, - [SMALL_STATE(42)] = 839, - [SMALL_STATE(43)] = 851, - [SMALL_STATE(44)] = 862, - [SMALL_STATE(45)] = 873, - [SMALL_STATE(46)] = 888, - [SMALL_STATE(47)] = 897, - [SMALL_STATE(48)] = 912, - [SMALL_STATE(49)] = 927, - [SMALL_STATE(50)] = 934, - [SMALL_STATE(51)] = 940, - [SMALL_STATE(52)] = 945, - [SMALL_STATE(53)] = 949, - [SMALL_STATE(54)] = 953, - [SMALL_STATE(55)] = 957, - [SMALL_STATE(56)] = 961, +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 50, + [SMALL_STATE(4)] = 100, + [SMALL_STATE(5)] = 150, + [SMALL_STATE(6)] = 200, + [SMALL_STATE(7)] = 250, + [SMALL_STATE(8)] = 300, + [SMALL_STATE(9)] = 349, + [SMALL_STATE(10)] = 396, + [SMALL_STATE(11)] = 443, + [SMALL_STATE(12)] = 490, + [SMALL_STATE(13)] = 537, + [SMALL_STATE(14)] = 584, + [SMALL_STATE(15)] = 631, + [SMALL_STATE(16)] = 678, + [SMALL_STATE(17)] = 725, + [SMALL_STATE(18)] = 772, + [SMALL_STATE(19)] = 819, + [SMALL_STATE(20)] = 866, + [SMALL_STATE(21)] = 915, + [SMALL_STATE(22)] = 962, + [SMALL_STATE(23)] = 1011, + [SMALL_STATE(24)] = 1058, + [SMALL_STATE(25)] = 1102, + [SMALL_STATE(26)] = 1146, + [SMALL_STATE(27)] = 1190, + [SMALL_STATE(28)] = 1234, + [SMALL_STATE(29)] = 1278, + [SMALL_STATE(30)] = 1322, + [SMALL_STATE(31)] = 1366, + [SMALL_STATE(32)] = 1410, + [SMALL_STATE(33)] = 1454, + [SMALL_STATE(34)] = 1498, + [SMALL_STATE(35)] = 1542, + [SMALL_STATE(36)] = 1586, + [SMALL_STATE(37)] = 1630, + [SMALL_STATE(38)] = 1674, + [SMALL_STATE(39)] = 1718, + [SMALL_STATE(40)] = 1762, + [SMALL_STATE(41)] = 1806, + [SMALL_STATE(42)] = 1850, + [SMALL_STATE(43)] = 1894, + [SMALL_STATE(44)] = 1938, + [SMALL_STATE(45)] = 1982, + [SMALL_STATE(46)] = 2026, + [SMALL_STATE(47)] = 2070, + [SMALL_STATE(48)] = 2114, + [SMALL_STATE(49)] = 2157, + [SMALL_STATE(50)] = 2200, + [SMALL_STATE(51)] = 2243, + [SMALL_STATE(52)] = 2286, + [SMALL_STATE(53)] = 2327, + [SMALL_STATE(54)] = 2367, + [SMALL_STATE(55)] = 2407, + [SMALL_STATE(56)] = 2447, + [SMALL_STATE(57)] = 2487, + [SMALL_STATE(58)] = 2527, + [SMALL_STATE(59)] = 2567, + [SMALL_STATE(60)] = 2607, + [SMALL_STATE(61)] = 2647, + [SMALL_STATE(62)] = 2687, + [SMALL_STATE(63)] = 2727, + [SMALL_STATE(64)] = 2758, + [SMALL_STATE(65)] = 2789, + [SMALL_STATE(66)] = 2820, + [SMALL_STATE(67)] = 2851, + [SMALL_STATE(68)] = 2882, + [SMALL_STATE(69)] = 2913, + [SMALL_STATE(70)] = 2944, + [SMALL_STATE(71)] = 2975, + [SMALL_STATE(72)] = 3006, + [SMALL_STATE(73)] = 3037, + [SMALL_STATE(74)] = 3068, + [SMALL_STATE(75)] = 3099, + [SMALL_STATE(76)] = 3130, + [SMALL_STATE(77)] = 3161, + [SMALL_STATE(78)] = 3192, + [SMALL_STATE(79)] = 3223, + [SMALL_STATE(80)] = 3259, + [SMALL_STATE(81)] = 3295, + [SMALL_STATE(82)] = 3331, + [SMALL_STATE(83)] = 3360, + [SMALL_STATE(84)] = 3389, + [SMALL_STATE(85)] = 3418, + [SMALL_STATE(86)] = 3447, + [SMALL_STATE(87)] = 3476, + [SMALL_STATE(88)] = 3505, + [SMALL_STATE(89)] = 3534, + [SMALL_STATE(90)] = 3563, + [SMALL_STATE(91)] = 3592, + [SMALL_STATE(92)] = 3621, + [SMALL_STATE(93)] = 3650, + [SMALL_STATE(94)] = 3679, + [SMALL_STATE(95)] = 3708, + [SMALL_STATE(96)] = 3737, + [SMALL_STATE(97)] = 3766, + [SMALL_STATE(98)] = 3795, + [SMALL_STATE(99)] = 3824, + [SMALL_STATE(100)] = 3853, + [SMALL_STATE(101)] = 3882, + [SMALL_STATE(102)] = 3911, + [SMALL_STATE(103)] = 3940, + [SMALL_STATE(104)] = 3969, + [SMALL_STATE(105)] = 3998, + [SMALL_STATE(106)] = 4027, + [SMALL_STATE(107)] = 4056, + [SMALL_STATE(108)] = 4085, + [SMALL_STATE(109)] = 4114, + [SMALL_STATE(110)] = 4143, + [SMALL_STATE(111)] = 4172, + [SMALL_STATE(112)] = 4201, + [SMALL_STATE(113)] = 4221, + [SMALL_STATE(114)] = 4241, + [SMALL_STATE(115)] = 4264, + [SMALL_STATE(116)] = 4287, + [SMALL_STATE(117)] = 4310, + [SMALL_STATE(118)] = 4333, + [SMALL_STATE(119)] = 4356, + [SMALL_STATE(120)] = 4379, + [SMALL_STATE(121)] = 4402, + [SMALL_STATE(122)] = 4425, + [SMALL_STATE(123)] = 4448, + [SMALL_STATE(124)] = 4471, + [SMALL_STATE(125)] = 4494, + [SMALL_STATE(126)] = 4517, + [SMALL_STATE(127)] = 4540, + [SMALL_STATE(128)] = 4563, + [SMALL_STATE(129)] = 4586, + [SMALL_STATE(130)] = 4609, + [SMALL_STATE(131)] = 4628, + [SMALL_STATE(132)] = 4651, + [SMALL_STATE(133)] = 4674, + [SMALL_STATE(134)] = 4697, + [SMALL_STATE(135)] = 4720, + [SMALL_STATE(136)] = 4743, + [SMALL_STATE(137)] = 4766, + [SMALL_STATE(138)] = 4789, + [SMALL_STATE(139)] = 4808, + [SMALL_STATE(140)] = 4831, + [SMALL_STATE(141)] = 4854, + [SMALL_STATE(142)] = 4877, + [SMALL_STATE(143)] = 4900, + [SMALL_STATE(144)] = 4923, + [SMALL_STATE(145)] = 4946, + [SMALL_STATE(146)] = 4969, + [SMALL_STATE(147)] = 4992, + [SMALL_STATE(148)] = 5015, + [SMALL_STATE(149)] = 5038, + [SMALL_STATE(150)] = 5061, + [SMALL_STATE(151)] = 5084, + [SMALL_STATE(152)] = 5107, + [SMALL_STATE(153)] = 5130, + [SMALL_STATE(154)] = 5153, + [SMALL_STATE(155)] = 5176, + [SMALL_STATE(156)] = 5199, + [SMALL_STATE(157)] = 5222, + [SMALL_STATE(158)] = 5245, + [SMALL_STATE(159)] = 5268, + [SMALL_STATE(160)] = 5291, + [SMALL_STATE(161)] = 5314, + [SMALL_STATE(162)] = 5337, + [SMALL_STATE(163)] = 5359, + [SMALL_STATE(164)] = 5377, + [SMALL_STATE(165)] = 5399, + [SMALL_STATE(166)] = 5417, + [SMALL_STATE(167)] = 5439, + [SMALL_STATE(168)] = 5460, + [SMALL_STATE(169)] = 5483, + [SMALL_STATE(170)] = 5504, + [SMALL_STATE(171)] = 5525, + [SMALL_STATE(172)] = 5546, + [SMALL_STATE(173)] = 5569, + [SMALL_STATE(174)] = 5590, + [SMALL_STATE(175)] = 5611, + [SMALL_STATE(176)] = 5632, + [SMALL_STATE(177)] = 5653, + [SMALL_STATE(178)] = 5674, + [SMALL_STATE(179)] = 5695, + [SMALL_STATE(180)] = 5716, + [SMALL_STATE(181)] = 5737, + [SMALL_STATE(182)] = 5758, + [SMALL_STATE(183)] = 5779, + [SMALL_STATE(184)] = 5800, + [SMALL_STATE(185)] = 5821, + [SMALL_STATE(186)] = 5842, + [SMALL_STATE(187)] = 5863, + [SMALL_STATE(188)] = 5884, + [SMALL_STATE(189)] = 5905, + [SMALL_STATE(190)] = 5926, + [SMALL_STATE(191)] = 5947, + [SMALL_STATE(192)] = 5968, + [SMALL_STATE(193)] = 5989, + [SMALL_STATE(194)] = 6010, + [SMALL_STATE(195)] = 6031, + [SMALL_STATE(196)] = 6052, + [SMALL_STATE(197)] = 6075, + [SMALL_STATE(198)] = 6092, + [SMALL_STATE(199)] = 6113, + [SMALL_STATE(200)] = 6134, + [SMALL_STATE(201)] = 6155, + [SMALL_STATE(202)] = 6176, + [SMALL_STATE(203)] = 6197, + [SMALL_STATE(204)] = 6218, + [SMALL_STATE(205)] = 6235, + [SMALL_STATE(206)] = 6256, + [SMALL_STATE(207)] = 6277, + [SMALL_STATE(208)] = 6298, + [SMALL_STATE(209)] = 6319, + [SMALL_STATE(210)] = 6340, + [SMALL_STATE(211)] = 6361, + [SMALL_STATE(212)] = 6382, + [SMALL_STATE(213)] = 6403, + [SMALL_STATE(214)] = 6424, + [SMALL_STATE(215)] = 6445, + [SMALL_STATE(216)] = 6466, + [SMALL_STATE(217)] = 6487, + [SMALL_STATE(218)] = 6508, + [SMALL_STATE(219)] = 6529, + [SMALL_STATE(220)] = 6550, + [SMALL_STATE(221)] = 6571, + [SMALL_STATE(222)] = 6592, + [SMALL_STATE(223)] = 6613, + [SMALL_STATE(224)] = 6634, + [SMALL_STATE(225)] = 6655, + [SMALL_STATE(226)] = 6676, + [SMALL_STATE(227)] = 6697, + [SMALL_STATE(228)] = 6718, + [SMALL_STATE(229)] = 6739, + [SMALL_STATE(230)] = 6760, + [SMALL_STATE(231)] = 6781, + [SMALL_STATE(232)] = 6802, + [SMALL_STATE(233)] = 6823, + [SMALL_STATE(234)] = 6844, + [SMALL_STATE(235)] = 6865, + [SMALL_STATE(236)] = 6886, + [SMALL_STATE(237)] = 6907, + [SMALL_STATE(238)] = 6928, + [SMALL_STATE(239)] = 6949, + [SMALL_STATE(240)] = 6970, + [SMALL_STATE(241)] = 6991, + [SMALL_STATE(242)] = 7012, + [SMALL_STATE(243)] = 7033, + [SMALL_STATE(244)] = 7054, + [SMALL_STATE(245)] = 7075, + [SMALL_STATE(246)] = 7096, + [SMALL_STATE(247)] = 7117, + [SMALL_STATE(248)] = 7138, + [SMALL_STATE(249)] = 7159, + [SMALL_STATE(250)] = 7180, + [SMALL_STATE(251)] = 7201, + [SMALL_STATE(252)] = 7222, + [SMALL_STATE(253)] = 7243, + [SMALL_STATE(254)] = 7264, + [SMALL_STATE(255)] = 7285, + [SMALL_STATE(256)] = 7306, + [SMALL_STATE(257)] = 7327, + [SMALL_STATE(258)] = 7348, + [SMALL_STATE(259)] = 7369, + [SMALL_STATE(260)] = 7392, + [SMALL_STATE(261)] = 7415, + [SMALL_STATE(262)] = 7436, + [SMALL_STATE(263)] = 7457, + [SMALL_STATE(264)] = 7478, + [SMALL_STATE(265)] = 7499, + [SMALL_STATE(266)] = 7520, + [SMALL_STATE(267)] = 7538, + [SMALL_STATE(268)] = 7556, + [SMALL_STATE(269)] = 7574, + [SMALL_STATE(270)] = 7590, + [SMALL_STATE(271)] = 7608, + [SMALL_STATE(272)] = 7626, + [SMALL_STATE(273)] = 7644, + [SMALL_STATE(274)] = 7660, + [SMALL_STATE(275)] = 7678, + [SMALL_STATE(276)] = 7694, + [SMALL_STATE(277)] = 7712, + [SMALL_STATE(278)] = 7730, + [SMALL_STATE(279)] = 7748, + [SMALL_STATE(280)] = 7766, + [SMALL_STATE(281)] = 7784, + [SMALL_STATE(282)] = 7802, + [SMALL_STATE(283)] = 7820, + [SMALL_STATE(284)] = 7838, + [SMALL_STATE(285)] = 7856, + [SMALL_STATE(286)] = 7872, + [SMALL_STATE(287)] = 7890, + [SMALL_STATE(288)] = 7906, + [SMALL_STATE(289)] = 7924, + [SMALL_STATE(290)] = 7942, + [SMALL_STATE(291)] = 7958, + [SMALL_STATE(292)] = 7973, + [SMALL_STATE(293)] = 7988, + [SMALL_STATE(294)] = 8003, + [SMALL_STATE(295)] = 8018, + [SMALL_STATE(296)] = 8035, + [SMALL_STATE(297)] = 8049, + [SMALL_STATE(298)] = 8063, + [SMALL_STATE(299)] = 8077, + [SMALL_STATE(300)] = 8091, + [SMALL_STATE(301)] = 8105, + [SMALL_STATE(302)] = 8119, + [SMALL_STATE(303)] = 8136, + [SMALL_STATE(304)] = 8153, + [SMALL_STATE(305)] = 8170, + [SMALL_STATE(306)] = 8183, + [SMALL_STATE(307)] = 8197, + [SMALL_STATE(308)] = 8211, + [SMALL_STATE(309)] = 8221, + [SMALL_STATE(310)] = 8231, + [SMALL_STATE(311)] = 8241, + [SMALL_STATE(312)] = 8251, + [SMALL_STATE(313)] = 8261, + [SMALL_STATE(314)] = 8271, + [SMALL_STATE(315)] = 8281, + [SMALL_STATE(316)] = 8291, + [SMALL_STATE(317)] = 8301, + [SMALL_STATE(318)] = 8308, + [SMALL_STATE(319)] = 8315, + [SMALL_STATE(320)] = 8322, + [SMALL_STATE(321)] = 8329, + [SMALL_STATE(322)] = 8336, + [SMALL_STATE(323)] = 8343, + [SMALL_STATE(324)] = 8350, + [SMALL_STATE(325)] = 8357, + [SMALL_STATE(326)] = 8364, + [SMALL_STATE(327)] = 8371, + [SMALL_STATE(328)] = 8378, }; -static TSParseActionEntry ts_parse_actions[] = { +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}}, REDUCE(sym_program, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [19] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2), SHIFT_REPEAT(55), - [22] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2), SHIFT_REPEAT(6), - [25] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2), SHIFT_REPEAT(56), - [28] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2), SHIFT_REPEAT(14), - [31] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2), SHIFT_REPEAT(13), - [34] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2), - [36] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), - [40] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(6), - [43] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(56), - [46] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(14), - [49] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(13), - [52] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 1), - [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [58] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 4, .production_id = 2), - [60] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 3), - [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 3, .production_id = 2), - [64] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3), - [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 2), - [68] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 2), - [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [74] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 1), - [78] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [80] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 4, .production_id = 3), - [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 3, .production_id = 1), - [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), - [88] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_repeat1, 2), SHIFT_REPEAT(54), - [91] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3, .production_id = 3), - [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 6, .production_id = 8), - [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 5, .production_id = 4), - [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 5, .production_id = 2), - [99] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 5, .production_id = 8), - [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 2), - [103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 5, .production_id = 5), - [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 2, .production_id = 1), - [107] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 3, .production_id = 3), - [109] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 5, .production_id = 4), - [111] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 4, .production_id = 3), - [113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 4, .production_id = 4), - [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 4), - [117] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 4), - [119] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 4, .production_id = 5), - [121] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 4, .production_id = 4), - [123] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quantifier, 1), - [125] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_capture, 2, .production_id = 2), - [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_predicate, 5, .production_id = 7), - [129] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2), - [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 1), - [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_definition, 2, .production_id = 6), - [137] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2), SHIFT_REPEAT(54), - [140] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2), SHIFT_REPEAT(50), - [143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2), - [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_name, 2), - [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 1), - [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_predicate_type, 1), - [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [153] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 0, 0, 0), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(327), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), + [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [47] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(164), + [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [55] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [57] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [59] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [61] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [67] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [69] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [71] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [73] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [75] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_named_node_repeat1, 2, 0, 0), SHIFT_REPEAT(327), + [78] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_named_node_repeat1, 2, 0, 0), SHIFT_REPEAT(68), + [81] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2, 0, 0), SHIFT_REPEAT(304), + [84] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2, 0, 0), SHIFT_REPEAT(53), + [87] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2, 0, 0), SHIFT_REPEAT(22), + [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2, 0, 0), + [92] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 2, 0, 0), SHIFT_REPEAT(319), + [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(166), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), + [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(162), + [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [141] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_grouping_repeat1, 2, 0, 0), SHIFT_REPEAT(327), + [144] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_grouping_repeat1, 2, 0, 0), SHIFT_REPEAT(68), + [147] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_grouping_repeat1, 2, 0, 0), SHIFT_REPEAT(304), + [150] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_grouping_repeat1, 2, 0, 0), SHIFT_REPEAT(53), + [153] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_grouping_repeat1, 2, 0, 0), SHIFT_REPEAT(22), + [156] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_grouping_repeat1, 2, 0, 0), + [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), + [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103), + [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), + [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), + [178] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(327), + [181] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(84), + [184] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(302), + [187] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(62), + [190] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(8), + [193] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 1, 0, 0), + [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [197] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(103), + [200] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(303), + [203] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(54), + [206] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(20), + [209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 6, 0, 7), + [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 6, 0, 7), + [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_grouping, 3, 0, 0), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 3, 0, 0), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 7, 0, 7), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 7, 0, 7), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alternation, 3, 0, 0), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alternation, 3, 0, 0), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 5, 0, 3), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 5, 0, 3), + [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_anonymous_node, 1, 0, 1), + [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 1, 0, 1), + [241] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 6, 0, 3), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 6, 0, 3), + [245] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 4, 0, 3), + [247] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 4, 0, 3), + [249] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 9, 0, 7), + [251] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 9, 0, 7), + [253] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alternation, 2, 0, 0), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alternation, 2, 0, 0), + [257] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_grouping, 2, 0, 0), + [259] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 2, 0, 0), + [261] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 8, 0, 7), + [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 8, 0, 7), + [265] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 7, 0, 3), + [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 7, 0, 3), + [269] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 3, 0, 3), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 3, 0, 3), + [273] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__node_identifier, 1, 0, 0), + [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__node_identifier, 1, 0, 0), + [277] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 5, 0, 7), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 5, 0, 7), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), + [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313), + [289] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, 0, 0), + [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, 0, 0), + [293] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 2, 0, 0), + [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 2, 0, 0), + [297] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 8, 0, 15), + [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 8, 0, 15), + [301] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 7, 0, 13), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 7, 0, 13), + [305] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 5, 0, 8), + [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 5, 0, 8), + [309] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 5, 0, 6), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 5, 0, 6), + [313] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 7, 0, 12), + [315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 7, 0, 12), + [317] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 7, 0, 9), + [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 7, 0, 9), + [321] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alternation, 5, 0, 5), + [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alternation, 5, 0, 5), + [325] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_grouping, 4, 0, 0), + [327] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 4, 0, 0), + [329] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_grouping, 4, 0, 5), + [331] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 4, 0, 5), + [333] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 8, 0, 12), + [335] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 8, 0, 12), + [337] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 6, 0, 8), + [339] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 6, 0, 8), + [341] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 4, 0, 6), + [343] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 4, 0, 6), + [345] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_grouping, 4, 0, 4), + [347] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 4, 0, 4), + [349] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alternation, 4, 0, 0), + [351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alternation, 4, 0, 0), + [353] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 6, 0, 11), + [355] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 6, 0, 11), + [357] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alternation, 4, 0, 5), + [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alternation, 4, 0, 5), + [361] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alternation, 4, 0, 4), + [363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alternation, 4, 0, 4), + [365] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 8, 0, 14), + [367] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 8, 0, 14), + [369] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 7, 0, 11), + [371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 7, 0, 11), + [373] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_grouping, 3, 0, 4), + [375] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 3, 0, 4), + [377] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 6, 0, 9), + [379] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 6, 0, 9), + [381] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_grouping, 5, 0, 5), + [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_grouping, 5, 0, 5), + [385] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alternation, 3, 0, 4), + [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alternation, 3, 0, 4), + [389] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_alternation_repeat1, 2, 0, 0), + [391] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_alternation_repeat1, 2, 0, 0), SHIFT_REPEAT(315), + [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_alternation_repeat1, 2, 0, 0), + [396] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_anonymous_node, 3, 0, 2), + [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 3, 0, 2), + [400] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 8, 0, 13), + [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 8, 0, 13), + [404] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 8, 0, 3), + [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 8, 0, 3), + [408] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 9, 0, 16), + [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 9, 0, 16), + [412] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 11, 0, 17), + [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 11, 0, 17), + [416] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_anonymous_node, 2, 0, 1), + [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 2, 0, 1), + [420] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 9, 0, 14), + [422] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 9, 0, 14), + [424] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 9, 0, 15), + [426] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 9, 0, 15), + [428] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_anonymous_node, 2, 0, 2), + [430] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_anonymous_node, 2, 0, 2), + [432] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 10, 0, 16), + [434] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 10, 0, 16), + [436] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 10, 0, 17), + [438] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 10, 0, 17), + [440] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_node, 10, 0, 7), + [442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_node, 10, 0, 7), + [444] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), + [446] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [448] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), + [450] = {.entry = {.count = 1, .reusable = true}}, SHIFT(311), + [452] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_parameters_repeat1, 2, 0, 0), SHIFT_REPEAT(168), + [455] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, 0, 0), SHIFT_REPEAT(313), + [458] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, 0, 0), SHIFT_REPEAT(303), + [461] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameters_repeat1, 2, 0, 0), + [463] = {.entry = {.count = 1, .reusable = false}}, SHIFT(260), + [465] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quantifier, 1, 0, 0), + [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quantifier, 1, 0, 0), + [469] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_capture, 2, 0, 3), + [471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_capture, 2, 0, 3), + [473] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_alternation_repeat1, 2, 0, 0), SHIFT_REPEAT(313), + [476] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_alternation_repeat1, 2, 0, 0), SHIFT_REPEAT(312), + [479] = {.entry = {.count = 1, .reusable = false}}, SHIFT(168), + [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 1, 0, 0), + [483] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), + [485] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_named_node_repeat1, 1, 0, 0), + [487] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_named_node_repeat1, 1, 0, 0), + [489] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), + [491] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [493] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_negated_field, 2, 0, 0), + [495] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_negated_field, 2, 0, 0), + [497] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), + [499] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), + [501] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), + [503] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [505] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__named_node_expression, 3, 0, 0), + [507] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__named_node_expression, 3, 0, 0), + [509] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [511] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), + [513] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [515] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [517] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), + [519] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [521] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), + [523] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [525] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), + [527] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_predicate, 6, 0, 10), + [529] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_predicate, 6, 0, 10), + [531] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [533] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_definition, 2, 0, 1), + [535] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_definition, 2, 0, 1), + [537] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [539] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [541] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_definition, 1, 0, 0), + [543] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_definition, 1, 0, 0), + [545] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__group_expression, 3, 0, 0), + [547] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_expression, 3, 0, 0), + [549] = {.entry = {.count = 1, .reusable = false}}, SHIFT(60), + [551] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_grouping_repeat1, 1, 0, 0), + [553] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_grouping_repeat1, 1, 0, 0), + [555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [557] = {.entry = {.count = 1, .reusable = false}}, SHIFT(165), + [559] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [561] = {.entry = {.count = 1, .reusable = false}}, SHIFT(130), + [563] = {.entry = {.count = 1, .reusable = false}}, SHIFT(113), + [565] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__field_name, 2, 0, 0), + [567] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_name, 2, 0, 0), + [569] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), + [571] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_content, 1, 0, 0), + [573] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_content_repeat1, 2, 0, 0), SHIFT_REPEAT(307), + [576] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_content_repeat1, 2, 0, 0), + [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), + [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(326), + [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324), + [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), + [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), + [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), + [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), + [608] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), + [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [614] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), + [616] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), }; #ifdef __cplusplus extern "C" { #endif -#ifdef _WIN32 -#define extern __declspec(dllexport) +#ifdef TREE_SITTER_HIDE_SYMBOLS +#define TS_PUBLIC +#elif defined(_WIN32) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) #endif -extern const TSLanguage *tree_sitter_scheme(void) { - static TSLanguage language = { +TS_PUBLIC const TSLanguage *tree_sitter_query(void) { + static const TSLanguage language = { .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, - .symbol_metadata = ts_symbol_metadata, - .parse_table = (const unsigned short *)ts_parse_table, - .small_parse_table = (const uint16_t *)ts_small_parse_table, - .small_parse_table_map = (const uint32_t *)ts_small_parse_table_map, + .production_id_count = PRODUCTION_ID_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, - .lex_modes = ts_lex_modes, .symbol_names = ts_symbol_names, - .public_symbol_map = ts_symbol_map, - .alias_sequences = (const TSSymbol *)ts_alias_sequences, - .field_count = FIELD_COUNT, .field_names = ts_field_names, - .field_map_slices = (const TSFieldMapSlice *)ts_field_map_slices, - .field_map_entries = (const TSFieldMapEntry *)ts_field_map_entries, - .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .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 = ts_lex_modes, .lex_fn = ts_lex, - .external_token_count = EXTERNAL_TOKEN_COUNT, + .primary_state_ids = ts_primary_state_ids, }; return &language; } diff --git a/src/tree_sitter/alloc.h b/src/tree_sitter/alloc.h new file mode 100644 index 0000000..1f4466d --- /dev/null +++ b/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); +extern void *(*ts_current_calloc)(size_t, size_t); +extern void *(*ts_current_realloc)(void *, size_t); +extern void (*ts_current_free)(void *); + +#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/src/tree_sitter/array.h b/src/tree_sitter/array.h new file mode 100644 index 0000000..15a3b23 --- /dev/null +++ b/src/tree_sitter/array.h @@ -0,0 +1,290 @@ +#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(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) \ + _array__reserve((Array *)(self), 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) _array__delete((Array *)(self)) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + (_array__grow((Array *)(self), 1, array_elem_size(self)), \ + (self)->contents[(self)->size++] = (element)) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + do { \ + if ((count) == 0) break; \ + _array__grow((Array *)(self), 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, contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), (self)->size, \ + 0, count, 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) \ + _array__splice( \ + (Array *)(self), 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) \ + _array__splice((Array *)(self), 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((Array *)(self), 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) \ + _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) + +/// Swap one array with another +#define array_swap(self, other) \ + _array__swap((Array *)(self), (Array *)(other)) + +/// 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 + +typedef Array(void) Array; + +/// This is not what you're looking for, see `array_delete`. +static inline void _array__delete(Array *self) { + if (self->contents) { + ts_free(self->contents); + self->contents = NULL; + self->size = 0; + self->capacity = 0; + } +} + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(Array *self, size_t element_size, + uint32_t index) { + assert(index < self->size); + char *contents = (char *)self->contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (self->size - index - 1) * element_size); + self->size--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { + if (new_capacity > self->capacity) { + if (self->contents) { + self->contents = ts_realloc(self->contents, new_capacity * element_size); + } else { + self->contents = ts_malloc(new_capacity * element_size); + } + self->capacity = new_capacity; + } +} + +/// This is not what you're looking for, see `array_assign`. +static inline void _array__assign(Array *self, const Array *other, size_t element_size) { + _array__reserve(self, element_size, other->size); + self->size = other->size; + memcpy(self->contents, other->contents, self->size * element_size); +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(Array *self, Array *other) { + Array swap = *other; + *other = *self; + *self = swap; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { + uint32_t new_size = self->size + count; + if (new_size > self->capacity) { + uint32_t new_capacity = self->capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + _array__reserve(self, element_size, new_capacity); + } +} + +/// This is not what you're looking for, see `array_splice`. +static inline void _array__splice(Array *self, size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = self->size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= self->size); + + _array__reserve(self, element_size, new_size); + + char *contents = (char *)self->contents; + if (self->size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (self->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 + ); + } + } + self->size += new_count - old_count; +} + +/// 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(default : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h index 11bf4fc..17f0e94 100644 --- a/src/tree_sitter/parser.h +++ b/src/tree_sitter/parser.h @@ -14,6 +14,7 @@ extern "C" { #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; @@ -30,11 +31,10 @@ typedef struct { uint16_t length; } TSFieldMapSlice; -typedef uint16_t TSStateId; - typedef struct { - bool visible : 1; - bool named : 1; + bool visible; + bool named; + bool supertype; } TSSymbolMetadata; typedef struct TSLexer TSLexer; @@ -56,21 +56,21 @@ typedef enum { TSParseActionTypeRecover, } TSParseActionType; -typedef struct { - union { - struct { - TSStateId state; - bool extra : 1; - bool repetition : 1; - } shift; - struct { - TSSymbol symbol; - int16_t dynamic_precedence; - uint8_t child_count; - uint8_t production_id; - } reduce; - } params; - TSParseActionType type : 4; +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 { @@ -82,23 +82,39 @@ typedef union { TSParseAction action; struct { uint8_t count; - bool reusable : 1; + bool reusable; } entry; } TSParseActionEntry; +typedef struct { + int32_t start; + int32_t end; +} TSCharacterRange; + struct TSLanguage { uint32_t version; uint32_t symbol_count; uint32_t alias_count; uint32_t token_count; uint32_t external_token_count; - const char **symbol_names; - const TSSymbolMetadata *symbol_metadata; + 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 TSLexMode *lex_modes; + const char * const *symbol_names; + const char * const *field_names; + const TSFieldMapSlice *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; - uint16_t max_alias_sequence_length; + const TSLexMode *lex_modes; bool (*lex_fn)(TSLexer *, TSStateId); bool (*keyword_lex_fn)(TSLexer *, TSStateId); TSSymbol keyword_capture_token; @@ -111,23 +127,41 @@ struct TSLanguage { unsigned (*serialize)(void *, char *); void (*deserialize)(void *, const char *, unsigned); } external_scanner; - uint32_t field_count; - const TSFieldMapSlice *field_map_slices; - const TSFieldMapEntry *field_map_entries; - const char **field_names; - uint32_t large_state_count; - const uint16_t *small_parse_table; - const uint32_t *small_parse_table_map; - const TSSymbol *public_symbol_map; + const TSStateId *primary_state_ids; }; +static inline bool set_contains(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; + 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; + } + 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; \ @@ -143,6 +177,17 @@ struct TSLanguage { 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; \ @@ -161,72 +206,57 @@ struct TSLanguage { * Parse Table Macros */ -#define SMALL_STATE(id) id - LARGE_STATE_COUNT +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) #define STATE(id) id #define ACTIONS(id) id -#define SHIFT(state_value) \ - { \ - { \ - .params = { \ - .shift = { \ - .state = state_value \ - } \ - }, \ - .type = TSParseActionTypeShift \ - } \ - } +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value) \ + } \ + }} #define SHIFT_REPEAT(state_value) \ - { \ - { \ - .params = { \ - .shift = { \ - .state = state_value, \ - .repetition = true \ - } \ - }, \ - .type = TSParseActionTypeShift \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value), \ + .repetition = true \ } \ - } - -#define RECOVER() \ - { \ - { .type = TSParseActionTypeRecover } \ - } + }} #define SHIFT_EXTRA() \ - { \ - { \ - .params = { \ - .shift = { \ - .extra = true \ - } \ - }, \ - .type = TSParseActionTypeShift \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ } \ - } - -#define REDUCE(symbol_val, child_count_val, ...) \ - { \ - { \ - .params = { \ - .reduce = { \ - .symbol = symbol_val, \ - .child_count = child_count_val, \ - __VA_ARGS__ \ - }, \ - }, \ - .type = TSParseActionTypeReduce \ - } \ - } - -#define ACCEPT_INPUT() \ - { \ - { .type = TSParseActionTypeAccept } \ - } + }} + +#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 } diff --git a/test/corpus/statements.txt b/test/corpus/statements.txt new file mode 100644 index 0000000..aac52e1 --- /dev/null +++ b/test/corpus/statements.txt @@ -0,0 +1,742 @@ +================================================================================ +Named nodes +================================================================================ + +(program) + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier))) + +================================================================================ +Anonymous nodes +================================================================================ + +(program) +"it" + +";" + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content))) + (anonymous_node + name: (string + (string_content)))) + +================================================================================ +Anonymous nodes (series) +================================================================================ + +("it" "blorg") + +-------------------------------------------------------------------------------- + +(program + (grouping + (anonymous_node + name: (string + (string_content))) + (anonymous_node + name: (string + (string_content))))) + +================================================================================ +Wildcard nodes +================================================================================ + +_ @wildcard + +(_) @wildcard + +(node _ @wildcard) + +(program + name: (_)) + +(program + name: _) + +-------------------------------------------------------------------------------- + +(program + (anonymous_node + (capture + (identifier))) + (named_node + (capture + (identifier))) + (named_node + (identifier) + (anonymous_node + (capture + (identifier)))) + (named_node + (identifier) + (field_definition + (identifier) + (named_node))) + (named_node + (identifier) + (field_definition + (identifier) + (anonymous_node)))) + +================================================================================ +Field names +================================================================================ + +(program + name: (identifier)) + +name: (identifier) + +name: [ + (identifier) + (expression) +] + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (field_definition + name: (identifier) + (list + (named_node + name: (identifier)) + (named_node + name: (identifier))))) + +================================================================================ +Negated fields +================================================================================ + +(program + field: (identifier) @capture + !negated-field) + +(program + (identifier) @capture + !negated-field) + +-------------------------------------------------------------------------------- + +(program + (named_node + (identifier) + (field_definition + (identifier) + (named_node + (identifier) + (capture + (identifier)))) + (negated_field + (identifier))) + (named_node + (identifier) + (named_node + (identifier) + (capture + (identifier))) + (negated_field + (identifier)))) + +================================================================================ +Quantifiers (+) +================================================================================ + +(program + (identifier)+) + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier) + (named_node + name: (identifier) + quantifier: (quantifier)))) + +================================================================================ +Quantifiers (?) +================================================================================ + +(program + (identifier)?) + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier) + (named_node + name: (identifier) + quantifier: (quantifier)))) + +================================================================================ +Quantifiers (*) +================================================================================ + +(program + (identifier)*) + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier) + (named_node + name: (identifier) + quantifier: (quantifier)))) + +================================================================================ +Groups +================================================================================ + +((comment) (function_declaration)) + +((node) [(node) "test"]) + +-------------------------------------------------------------------------------- + +(program + (grouping + (named_node + name: (identifier)) + (named_node + name: (identifier))) + (grouping + (named_node + name: (identifier)) + (list + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content)))))) + +================================================================================ +Captures +================================================================================ + +(class_declaration + body: (class_body) @class.body @test) @blorg + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier) + (capture + name: (identifier)) + (capture + name: (identifier)))) + (capture + name: (identifier)))) + +================================================================================ +Lists +================================================================================ + +[ + "?" + "+" + "-" +] @ops + +(if_statement + [ + condition: (_) + consequence: (_) + alternative: (_)? + ] @conditional.inner) @conditional.outer + +-------------------------------------------------------------------------------- + +(program + (list + (anonymous_node + name: (string + (string_content))) + (anonymous_node + name: (string + (string_content))) + (anonymous_node + name: (string + (string_content))) + (capture + name: (identifier))) + (named_node + name: (identifier) + (list + (field_definition + name: (identifier) + (named_node)) + (field_definition + name: (identifier) + (named_node)) + (field_definition + name: (identifier) + (named_node + quantifier: (quantifier))) + (capture + name: (identifier))) + (capture + name: (identifier)))) + +================================================================================ +Predicates +================================================================================ + +((identifier) @v + (#eq? @v "test" local)) + +-------------------------------------------------------------------------------- + +(program + (grouping + (named_node + name: (identifier) + (capture + name: (identifier))) + (predicate + name: (identifier) + type: (predicate_type) + parameters: (parameters + (capture + name: (identifier)) + (string + (string_content)) + (identifier))))) + +================================================================================ +Anchor Operator +================================================================================ + +((comment) . (function_declaration)) +((identifier) . "and" . (identifier)) + +("test" . "test") +((identifier) . "test") +("test" . (identifier)) + +((node) . [(node) "test"] . (node)) +((node) [(node) "test"] . (node)) +((node) . [(node) "test"] (node)) + +((node) . [(node) "test"] [(node)]) +((node) . [(node) "test"] . [(node)]) + +(array . (identifier)) +(array (identifier) .) +(array . (identifier) .) + +(string . "'") +(string "'" .) +(string . "'" . "'" .) + +(node (a) . "b" . (c)) +(node . (a) . "b" . (c)) +(node (a) . "b" . (c) .) +(node . (a) . "b" . (c) .) + +(node . name: (identifier)) +(node name: (identifier) .) +(node . name: (identifier) .) + +(node . name: (identifier) (identifier)) +(node name: (identifier) . (identifier)) +(node . name: (identifier) . (identifier) .) + +(node . name: (identifier) . another: (identifier) .) +(node . name: (identifier) . another: (identifier)) +(node name: (identifier) . another: (identifier) .) +(node name: (identifier) . another: (identifier)) + +(trailing_anchor ((grouping_anchor) .) .) + +-------------------------------------------------------------------------------- + +(program + (grouping + (named_node + name: (identifier)) + (named_node + name: (identifier))) + (grouping + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content))) + (named_node + name: (identifier))) + (grouping + (anonymous_node + name: (string + (string_content))) + (anonymous_node + name: (string + (string_content)))) + (grouping + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content)))) + (grouping + (anonymous_node + name: (string + (string_content))) + (named_node + name: (identifier))) + (grouping + (named_node + name: (identifier)) + (list + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content)))) + (named_node + name: (identifier))) + (grouping + (named_node + name: (identifier)) + (list + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content)))) + (named_node + name: (identifier))) + (grouping + (named_node + name: (identifier)) + (list + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content)))) + (named_node + name: (identifier))) + (grouping + (named_node + name: (identifier)) + (list + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content)))) + (list + (named_node + name: (identifier)))) + (grouping + (named_node + name: (identifier)) + (list + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content)))) + (list + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (anonymous_node + name: (string + (string_content)))) + (named_node + name: (identifier) + (anonymous_node + name: (string + (string_content)))) + (named_node + name: (identifier) + (anonymous_node + name: (string + (string_content))) + (anonymous_node + name: (string + (string_content)))) + (named_node + name: (identifier) + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content))) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content))) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content))) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (named_node + name: (identifier)) + (anonymous_node + name: (string + (string_content))) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (named_node + name: (identifier))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (grouping + (named_node + name: (identifier))))) + +================================================================================ +Strings +================================================================================ + +((identifier) @v + (#eq? @v "I'm a string; not a comment") + (#eq? @v "test\"") + (#eq? @v "tes\"\"ting") + (#eq? @v "\"test")) + +-------------------------------------------------------------------------------- + +(program + (grouping + (named_node + name: (identifier) + (capture + name: (identifier))) + (predicate + name: (identifier) + type: (predicate_type) + parameters: (parameters + (capture + name: (identifier)) + (string + (string_content)))) + (predicate + name: (identifier) + type: (predicate_type) + parameters: (parameters + (capture + name: (identifier)) + (string + (string_content + (escape_sequence))))) + (predicate + name: (identifier) + type: (predicate_type) + parameters: (parameters + (capture + name: (identifier)) + (string + (string_content + (escape_sequence) + (escape_sequence))))) + (predicate + name: (identifier) + type: (predicate_type) + parameters: (parameters + (capture + name: (identifier)) + (string + (string_content + (escape_sequence))))))) + +================================================================================ +Comments +================================================================================ + +(#match? + @foo + ; bar + "foo") + +(node + ; Capture the name + name: (string)) + +(string + ; wild comment! + ) + +-------------------------------------------------------------------------------- + +(program + (predicate + name: (identifier) + type: (predicate_type) + parameters: (parameters + (capture + name: (identifier)) + (comment) + (string + (string_content)))) + (named_node + name: (identifier) + (comment) + (field_definition + name: (identifier) + (named_node + name: (identifier)))) + (named_node + name: (identifier) + (comment))) + +================================================================================ +Supertypes +================================================================================ + +(program + (named_node + name: (identifier) + (supertype/subtype))) + +-------------------------------------------------------------------------------- + +(program + (named_node + name: (identifier) + (named_node + name: (identifier) + (field_definition + name: (identifier) + (named_node + name: (identifier))) + (named_node + supertype: (identifier) + name: (identifier))))) diff --git a/test/highlight/statements.scm b/test/highlight/statements.scm new file mode 100644 index 0000000..fd3239a --- /dev/null +++ b/test/highlight/statements.scm @@ -0,0 +1,51 @@ +(program) +; <- @punctuation.bracket +; ^ @variable +; ^ @punctuation.bracket + +";" +; <- @string + +(node _ @wildcard) +; ^ @punctuation.special +; ^ @type + +name: (identifier) +; <- @property +; ^ @punctuation.delimiter + +(program + name: (_)) +; ^ @constant + +(program + name: _) +; ^ @constant + +(program + field: (identifier) @capture + !negated-field) +; ^ @operator +; ^ @property + +(program + (identifier)+) +; ^ @operator + +((node) [(node) "test"]) +; ^ @punctuation.bracket +; ^ @punctuation.bracket + +((identifier) @v + (#eq? @v "test" local)) +; ^ @punctuation.special +; ^ @function.call +; ^ @punctuation.special +; ^ @type +; ^ @string +; ^ @punctuation.special + +((comment) . (function_declaration)) +; ^ @operator + +; vim:ft=query: