diff --git a/.gitattributes b/.gitattributes index 7e2cae0..79475a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,7 +6,7 @@ src/parser.c linguist-generated src/tree_sitter/* linguist-generated # C bindings -bindings/c/* linguist-generated +bindings/c/** linguist-generated CMakeLists.txt linguist-generated Makefile linguist-generated @@ -35,3 +35,7 @@ go.sum linguist-generated bindings/swift/** linguist-generated Package.swift linguist-generated Package.resolved linguist-generated + +# Zig bindings +build.zig linguist-generated +build.zig.zon linguist-generated diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..cc44d05 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: sunday + commit-message: + prefix: ci + labels: [dependencies] + open-pull-requests-limit: 1 + groups: + actions: + patterns: ["*"] + + - package-ecosystem: gitsubmodule + directory: / + schedule: + interval: monthly + day: friday + commit-message: + prefix: build + labels: [dependencies] + open-pull-requests-limit: 1 + groups: + submodules: + patterns: ["*"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a9e0be..fbb9dee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,14 +8,14 @@ on: - src/** - test/** - bindings/** - - binding.gyp + - tree-sitter.json pull_request: paths: - grammar.js - src/** - test/** - bindings/** - - binding.gyp + - tree-sitter.json concurrency: group: ${{github.workflow}}-${{github.ref}} @@ -28,16 +28,18 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-14] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: true - name: Set up tree-sitter - uses: tree-sitter/setup-action/cli@v1 + uses: tree-sitter/setup-action/cli@v2 - name: Run parser and binding tests uses: tree-sitter/parser-test-action@v2 + with: + generate: false - name: Parse sample files uses: tree-sitter/parse-action@v4 id: parse-files diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bef73aa..29f0c82 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,8 +7,12 @@ on: jobs: release: uses: tree-sitter/workflows/.github/workflows/release.yml@main + with: + attestations: true permissions: contents: write + id-token: write + attestations: write npm: uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main secrets: @@ -17,3 +21,7 @@ jobs: uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main secrets: CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}} + pypi: + uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main + secrets: + PYPI_API_TOKEN: ${{secrets.PYPI_TOKEN}} diff --git a/.gitignore b/.gitignore index 308fcab..bc9e191 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,13 @@ dist/ *.dylib *.dll *.pc +*.exp +*.lib + +# Zig artifacts +.zig-cache/ +zig-cache/ +zig-out/ # Example dirs /examples/*/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 2341f1a..46523db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,10 +25,13 @@ add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c" COMMENT "Generating parser.c") add_library(tree-sitter-gitattributes src/parser.c) -if(EXISTS src/scanner.c) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c) target_sources(tree-sitter-gitattributes PRIVATE src/scanner.c) endif() -target_include_directories(tree-sitter-gitattributes PRIVATE src) +target_include_directories(tree-sitter-gitattributes + PRIVATE src + INTERFACE $ + $) target_compile_definitions(tree-sitter-gitattributes PRIVATE $<$:TREE_SITTER_REUSE_ALLOCATOR> @@ -46,13 +49,18 @@ configure_file(bindings/c/tree-sitter-gitattributes.pc.in include(GNUInstallDirs) -install(FILES bindings/c/tree-sitter-gitattributes.h - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/tree_sitter") +install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree_sitter" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + FILES_MATCHING PATTERN "*.h") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-gitattributes.pc" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig") install(TARGETS tree-sitter-gitattributes LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") +file(GLOB QUERIES queries/*.scm) +install(FILES ${QUERIES} + DESTINATION "${CMAKE_INSTALL_DATADIR}/tree-sitter/queries/gitattributes") + add_custom_target(ts-test "${TREE_SITTER_CLI}" test WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "tree-sitter test") diff --git a/Cargo.lock b/Cargo.lock index 4892f6f..ef2c3c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,19 +13,65 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.34" +version = "1.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9" +checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7" dependencies = [ "shlex", ] +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "hashbrown" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" + +[[package]] +name = "indexmap" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + [[package]] name = "regex" version = "1.11.1" @@ -40,9 +86,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -55,6 +101,45 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "indexmap", + "itoa", + "memchr", + "ryu", + "serde", +] + [[package]] name = "shlex" version = "1.3.0" @@ -67,15 +152,27 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" +[[package]] +name = "syn" +version = "2.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tree-sitter" -version = "0.24.3" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9871f16d6cf5c4757dcf30d5d2172a2df6987c510c017bbb7abfb7f9aa24d06" +checksum = "ac5fff5c47490dfdf473b5228039bfacad9d765d9b6939d26bf7cc064c1c7822" dependencies = [ "cc", "regex", "regex-syntax", + "serde_json", "streaming-iterator", "tree-sitter-language", ] @@ -91,6 +188,12 @@ dependencies = [ [[package]] name = "tree-sitter-language" -version = "0.1.2" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4013970217383f67b18aef68f6fb2e8d409bc5755227092d32efb0422ba24b8" + +[[package]] +name = "unicode-ident" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ddffe35a0e5eeeadf13ff7350af564c6e73993a24db62caee1822b185c2600" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" diff --git a/Cargo.toml b/Cargo.toml index e68c198..72d7ee1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,14 @@ edition = "2021" autoexamples = false build = "bindings/rust/build.rs" -include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] +include = [ + "bindings/rust/*", + "grammar.js", + "queries/*", + "src/*", + "tree-sitter.json", + "LICENSE", +] [lib] path = "bindings/rust/lib.rs" @@ -21,7 +28,7 @@ path = "bindings/rust/lib.rs" tree-sitter-language = "0.1" [build-dependencies] -cc = "1.1.22" +cc = "1.2" [dev-dependencies] -tree-sitter = "0.24.3" +tree-sitter = "0.25.4" diff --git a/Makefile b/Makefile index 19f7817..88eabd7 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ TS ?= tree-sitter # install directory layout PREFIX ?= /usr/local +DATADIR ?= $(PREFIX)/share INCLUDEDIR ?= $(PREFIX)/include LIBDIR ?= $(PREFIX)/lib PCLIBDIR ?= $(LIBDIR)/pkgconfig @@ -69,13 +70,16 @@ $(PARSER): $(SRC_DIR)/grammar.json $(TS) generate $^ install: all - install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' - install -m644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h + install -d '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/gitattributes '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' + install -m644 bindings/c/tree_sitter/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc install -m644 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) +ifneq ($(wildcard queries/*.scm),) + install -m644 queries/*.scm '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/gitattributes +endif uninstall: $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ @@ -84,6 +88,7 @@ uninstall: '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + $(RM) -r '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/gitattributes clean: $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) diff --git a/Package.resolved b/Package.resolved index 9e0a023..5a834cd 100644 --- a/Package.resolved +++ b/Package.resolved @@ -3,11 +3,20 @@ "pins": [ { "package": "SwiftTreeSitter", - "repositoryURL": "https://github.com/ChimeHQ/SwiftTreeSitter", + "repositoryURL": "https://github.com/tree-sitter/swift-tree-sitter", "state": { "branch": null, - "revision": "2599e95310b3159641469d8a21baf2d3d200e61f", - "version": "0.8.0" + "revision": "36aa61d1b531f744f35229f010efba9c6d6cbbdd", + "version": "0.9.0" + } + }, + { + "package": "TreeSitter", + "repositoryURL": "https://github.com/tree-sitter/tree-sitter", + "state": { + "branch": null, + "revision": "d97db6d63507eb62c536bcb2c4ac7d70c8ec665e", + "version": "0.23.2" } } ] diff --git a/Package.swift b/Package.swift index 0b1b543..a6518cb 100644 --- a/Package.swift +++ b/Package.swift @@ -14,7 +14,7 @@ let package = Package( .library(name: "TreeSitterGitAttributes", targets: ["TreeSitterGitAttributes"]), ], dependencies: [ - .package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", from: "0.8.0"), + .package(name: "SwiftTreeSitter", url: "https://github.com/tree-sitter/swift-tree-sitter", from: "0.9.0"), ], targets: [ .target( diff --git a/README.md b/README.md index 6dba9a9..a46d2d8 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org) [![npm][npm]](https://www.npmjs.com/package/tree-sitter-gitattributes) [![crates][crates]](https://crates.io/crates/tree-sitter-gitattributes) +[![pypi][pypi]](https://pypi.org/project/tree-sitter-gitattributes/) A tree-sitter parser for `.gitattributes` files. @@ -29,3 +30,4 @@ A tree-sitter parser for `.gitattributes` files. [matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix [npm]: https://img.shields.io/npm/v/tree-sitter-gitattributes?logo=npm [crates]: https://img.shields.io/crates/v/tree-sitter-gitattributes?logo=rust +[pypi]: https://img.shields.io/pypi/v/tree-sitter-gitattributes?logo=pypi&logoColor=ffd242 diff --git a/bindings/c/tree-sitter-gitattributes.h b/bindings/c/tree_sitter/tree-sitter-gitattributes.h similarity index 100% rename from bindings/c/tree-sitter-gitattributes.h rename to bindings/c/tree_sitter/tree-sitter-gitattributes.h diff --git a/bindings/node/index.js b/bindings/node/index.js index 6657bcf..e7e2d5f 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,6 +1,10 @@ const root = require("path").join(__dirname, "..", ".."); -module.exports = require("node-gyp-build")(root); +module.exports = + typeof process.versions.bun === "string" + // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time + ? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-gitattributes.node`) + : require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); diff --git a/bindings/python/tests/test_binding.py b/bindings/python/tests/test_binding.py index 5afc3c7..1500566 100644 --- a/bindings/python/tests/test_binding.py +++ b/bindings/python/tests/test_binding.py @@ -1,6 +1,7 @@ from unittest import TestCase -import tree_sitter, tree_sitter_gitattributes +import tree_sitter +import tree_sitter_gitattributes class TestLanguage(TestCase): diff --git a/bindings/python/tree_sitter_gitattributes/__init__.py b/bindings/python/tree_sitter_gitattributes/__init__.py index d48caf6..af0d9d6 100644 --- a/bindings/python/tree_sitter_gitattributes/__init__.py +++ b/bindings/python/tree_sitter_gitattributes/__init__.py @@ -14,7 +14,6 @@ def _get_query(name, file): def __getattr__(name): if name == "HIGHLIGHTS_QUERY": return _get_query("HIGHLIGHTS_QUERY", "highlights.scm") - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/bindings/python/tree_sitter_gitattributes/binding.c b/bindings/python/tree_sitter_gitattributes/binding.c index 6950182..4a6b472 100644 --- a/bindings/python/tree_sitter_gitattributes/binding.c +++ b/bindings/python/tree_sitter_gitattributes/binding.c @@ -8,6 +8,13 @@ static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSE return PyCapsule_New(tree_sitter_gitattributes(), "tree_sitter.Language", NULL); } +static struct PyModuleDef_Slot slots[] = { +#ifdef Py_GIL_DISABLED + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, +#endif + {0, NULL} +}; + static PyMethodDef methods[] = { {"language", _binding_language, METH_NOARGS, "Get the tree-sitter language for this grammar."}, @@ -18,10 +25,11 @@ static struct PyModuleDef module = { .m_base = PyModuleDef_HEAD_INIT, .m_name = "_binding", .m_doc = NULL, - .m_size = -1, - .m_methods = methods + .m_size = 0, + .m_methods = methods, + .m_slots = slots, }; PyMODINIT_FUNC PyInit__binding(void) { - return PyModule_Create(&module); + return PyModuleDef_Init(&module); } diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index ff2539c..6dd2cec 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -1,7 +1,7 @@ -//! This crate provides gitattributes language support for the [tree-sitter][] parsing library. +//! This crate provides gitattributes language support for the [tree-sitter] parsing library. //! -//! Typically, you will use the [LANGUAGE][] constant to add this language to a -//! tree-sitter [Parser][], and then use the parser to parse some code: +//! Typically, you will use the [`LANGUAGE`] constant to add this language to a +//! tree-sitter [`Parser`], and then use the parser to parse some code: //! //! ``` //! let code = r#" @@ -16,7 +16,7 @@ //! assert!(!tree.root_node().has_error()); //! ``` //! -//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [`Parser`]: https://docs.rs/tree-sitter/0.25.4/tree_sitter/struct.Parser.html //! [tree-sitter]: https://tree-sitter.github.io/ use tree_sitter_language::LanguageFn; @@ -25,17 +25,15 @@ extern "C" { fn tree_sitter_gitattributes() -> *const (); } -/// The tree-sitter [`LanguageFn`][LanguageFn] for this grammar. -/// -/// [LanguageFn]: https://docs.rs/tree-sitter-language/*/tree_sitter_language/struct.LanguageFn.html +/// The tree-sitter [`LanguageFn`] for this grammar. pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_gitattributes) }; -/// The content of the [`node-types.json`][] file for this grammar. +/// 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 +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); -/// The syntax highlighting queries. +/// The syntax highlighting queries for this grammar. pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); #[cfg(test)] diff --git a/package-lock.json b/package-lock.json index 7e354b1..774be9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,23 +10,19 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "node-addon-api": "^8.2.1", - "node-gyp-build": "^4.8.2" + "node-addon-api": "^8.3.1", + "node-gyp-build": "^4.8.4" }, "devDependencies": { "prebuildify": "^6.0.1", - "tree-sitter-cli": "^0.24.3" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ObserverOfTime" + "tree-sitter-cli": "^0.25.4" }, "peerDependencies": { - "tree-sitter": "^0.21.1" + "tree-sitter": "^0.22.4" }, "peerDependenciesMeta": { "tree-sitter": { - "optional": true + "optional": false } } }, @@ -158,9 +154,9 @@ "license": "MIT" }, "node_modules/node-abi": { - "version": "3.71.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", - "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", + "version": "3.75.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz", + "integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==", "dev": true, "license": "MIT", "dependencies": { @@ -171,18 +167,18 @@ } }, "node_modules/node-addon-api": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.2.1.tgz", - "integrity": "sha512-vmEOvxwiH8tlOcv4SyE8RH34rI5/nWVaigUeAUPawC6f0+HoDthwI0vkMu4tbtsZrXq6QXFfrkhjofzKEs5tpA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.3.1.tgz", + "integrity": "sha512-lytcDEdxKjGJPTLEfW4mYMigRezMlyJY8W4wxJK8zE533Jlb8L8dRuObJFWg2P+AuOIxoCgKF+2Oq4d4Zd0OUA==", "license": "MIT", "engines": { "node": "^18 || ^20 || >= 21" } }, "node_modules/node-gyp-build": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", - "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "license": "MIT", "bin": { "node-gyp-build": "bin.js", @@ -289,9 +285,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -312,9 +308,9 @@ } }, "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==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", + "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", "dev": true, "license": "MIT", "dependencies": { @@ -341,10 +337,22 @@ "node": ">=6" } }, + "node_modules/tree-sitter": { + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.22.4.tgz", + "integrity": "sha512-usbHZP9/oxNsUY65MQUsduGRqDHQOou1cagUSwjhoSYAmSahjQDAVsh9s+SlZkn8X8+O1FULRGwHu7AFP3kjzg==", + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "node-addon-api": "^8.3.0", + "node-gyp-build": "^4.8.4" + } + }, "node_modules/tree-sitter-cli": { - "version": "0.24.3", - "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.24.3.tgz", - "integrity": "sha512-5vS0SiJf31tMTn9CYLsu5l18qXaw5MLFka3cuGxOB5f4TtgoUSK1Sog6rKmqBc7PvFJq37YcQBjj9giNy2cJPw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.25.5.tgz", + "integrity": "sha512-aLAyf+T3Y5psFZPgd7bUovhhJtplD1hk1mIwMsSZGwoEa6iGgqeGYmV9zgjatT5bMPUfcKX9x1xZfYim7aItjQ==", "dev": true, "hasInstallScript": true, "license": "MIT", diff --git a/package.json b/package.json index b136efd..7920c9a 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,6 @@ "name": "ObserverOfTime", "email": "chronobserver@disroot.org" }, - "funding": { - "url": "https://github.com/sponsors/ObserverOfTime", - "type": "github" - }, "main": "bindings/node", "types": "bindings/node", "keywords": [ @@ -22,6 +18,7 @@ ], "files": [ "grammar.js", + "tree-sitter.json", "binding.gyp", "prebuilds/**", "bindings/node/*", @@ -30,15 +27,15 @@ "*.wasm" ], "dependencies": { - "node-addon-api": "^8.2.1", - "node-gyp-build": "^4.8.2" + "node-addon-api": "^8.3.1", + "node-gyp-build": "^4.8.4" }, "devDependencies": { "prebuildify": "^6.0.1", - "tree-sitter-cli": "^0.24.3" + "tree-sitter-cli": "^0.25.4" }, "peerDependencies": { - "tree-sitter": "^0.21.1" + "tree-sitter": "^0.22.4" }, "peerDependenciesMeta": { "tree-sitter": { diff --git a/pyproject.toml b/pyproject.toml index 3a16d66..f29c4b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = [ "Typing :: Typed", ] authors = [{ name = "ObserverOfTime", email = "chronobserver@disroot.org" }] -requires-python = ">=3.9" +requires-python = ">=3.10" license.text = "MIT" readme = "README.md" @@ -22,8 +22,8 @@ readme = "README.md" Homepage = "https://github.com/tree-sitter-grammars/tree-sitter-gitattributes" [project.optional-dependencies] -core = ["tree-sitter~=0.22"] +core = ["tree-sitter~=0.24"] [tool.cibuildwheel] -build = "cp39-*" +build = "cp310-*" build-frontend = "build" diff --git a/setup.py b/setup.py index 3f2ff32..63a758c 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,9 @@ -from os import path -from platform import system +from os import name, path +from sysconfig import get_config_var from setuptools import Extension, find_packages, setup from setuptools.command.build import build +from setuptools.command.egg_info import egg_info from wheel.bdist_wheel import bdist_wheel sources = [ @@ -10,9 +11,16 @@ "src/parser.c", ] if path.exists("src/scanner.c"): - sources.extend("src/scanner.c") + sources.append("src/scanner.c") -if system() != "Windows": +macros: list[tuple[str, str | None]] = [ + ("PY_SSIZE_T_CLEAN", None), + ("TREE_SITTER_HIDE_SYMBOLS", None), +] +if limited_api := not get_config_var("Py_GIL_DISABLED"): + macros.append(("Py_LIMITED_API", "0x030A0000")) + +if name != "nt": cflags = ["-std=c11", "-fvisibility=hidden"] else: cflags = ["/std:c11", "/utf-8"] @@ -30,10 +38,17 @@ class BdistWheel(bdist_wheel): def get_tag(self): python, abi, platform = super().get_tag() if python.startswith("cp"): - python, abi = "cp39", "abi3" + python, abi = "cp310", "abi3" return python, abi, platform +class EggInfo(egg_info): + def find_sources(self): + super().find_sources() + self.filelist.recursive_include("queries", "*.scm") + self.filelist.include("src/tree_sitter/*.h") + + setup( packages=find_packages("bindings/python"), package_dir={"": "bindings/python"}, @@ -47,18 +62,15 @@ def get_tag(self): name="_binding", sources=sources, extra_compile_args=cflags, - define_macros=[ - ("Py_LIMITED_API", "0x03090000"), - ("PY_SSIZE_T_CLEAN", None), - ("TREE_SITTER_HIDE_SYMBOLS", None), - ], + define_macros=macros, include_dirs=["src"], - py_limited_api=True, + py_limited_api=limited_api, ) ], cmdclass={ "build": Build, - "bdist_wheel": BdistWheel + "bdist_wheel": BdistWheel, + "egg_info": EggInfo, }, zip_safe=False ) diff --git a/src/grammar.json b/src/grammar.json index 937bd16..2cb8cf9 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -972,5 +972,6 @@ "precedences": [], "externals": [], "inline": [], - "supertypes": [] -} + "supertypes": [], + "reserved": {} +} \ No newline at end of file diff --git a/src/parser.c b/src/parser.c index dab536f..ae23164 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,3 +1,5 @@ +/* Automatically @generated by tree-sitter v0.25.4 (be292b9913ed0cbde2188a48ac8ee95e8122385b) */ + #include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) @@ -13,7 +15,9 @@ #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 3 #define MAX_ALIAS_SEQUENCE_LENGTH 7 +#define MAX_RESERVED_WORD_SET_SIZE 0 #define PRODUCTION_ID_COUNT 30 +#define SUPERTYPE_COUNT 0 enum ts_symbol_identifiers { sym_attr_name = 1, @@ -557,7 +561,7 @@ static const char * const ts_field_names[] = { [field_relative] = "relative", }; -static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { +static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [1] = {.index = 0, .length = 1}, [3] = {.index = 1, .length = 1}, [4] = {.index = 2, .length = 1}, @@ -696,15 +700,15 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [16] = 16, [17] = 17, [18] = 18, - [19] = 17, + [19] = 15, [20] = 20, - [21] = 18, - [22] = 20, + [21] = 14, + [22] = 18, [23] = 23, [24] = 24, - [25] = 23, + [25] = 25, [26] = 26, - [27] = 27, + [27] = 25, [28] = 28, [29] = 29, [30] = 30, @@ -712,8 +716,8 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [32] = 32, [33] = 33, [34] = 34, - [35] = 35, - [36] = 30, + [35] = 30, + [36] = 36, [37] = 37, [38] = 38, [39] = 39, @@ -740,11 +744,11 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [60] = 60, [61] = 61, [62] = 62, - [63] = 62, + [63] = 61, [64] = 64, [65] = 65, - [66] = 61, - [67] = 67, + [66] = 66, + [67] = 65, [68] = 64, [69] = 69, [70] = 70, @@ -765,7 +769,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [85] = 85, [86] = 86, [87] = 87, - [88] = 82, + [88] = 88, [89] = 89, [90] = 90, [91] = 91, @@ -775,7 +779,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [95] = 95, [96] = 96, [97] = 97, - [98] = 98, + [98] = 88, [99] = 99, [100] = 100, [101] = 101, @@ -798,7 +802,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [118] = 118, }; -static TSCharacterRange sym__special_char_character_set_1[] = { +static const TSCharacterRange sym__special_char_character_set_1[] = { {'"', '"'}, {'\'', '\''}, {'?', '?'}, {'E', 'E'}, {'\\', '\\'}, {'a', 'b'}, {'e', 'f'}, {'n', 'n'}, {'r', 'r'}, {'t', 't'}, {'v', 'v'}, }; @@ -1745,24 +1749,24 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [7] = {.lex_state = 76}, [8] = {.lex_state = 6}, [9] = {.lex_state = 6}, - [10] = {.lex_state = 1}, - [11] = {.lex_state = 6}, - [12] = {.lex_state = 1}, - [13] = {.lex_state = 6}, - [14] = {.lex_state = 8}, - [15] = {.lex_state = 4}, - [16] = {.lex_state = 6}, - [17] = {.lex_state = 8}, + [10] = {.lex_state = 6}, + [11] = {.lex_state = 1}, + [12] = {.lex_state = 6}, + [13] = {.lex_state = 1}, + [14] = {.lex_state = 9}, + [15] = {.lex_state = 8}, + [16] = {.lex_state = 4}, + [17] = {.lex_state = 6}, [18] = {.lex_state = 8}, [19] = {.lex_state = 8}, - [20] = {.lex_state = 9}, - [21] = {.lex_state = 8}, - [22] = {.lex_state = 9}, - [23] = {.lex_state = 8}, - [24] = {.lex_state = 76}, + [20] = {.lex_state = 8}, + [21] = {.lex_state = 9}, + [22] = {.lex_state = 8}, + [23] = {.lex_state = 76}, + [24] = {.lex_state = 10}, [25] = {.lex_state = 8}, [26] = {.lex_state = 76}, - [27] = {.lex_state = 10}, + [27] = {.lex_state = 8}, [28] = {.lex_state = 10}, [29] = {.lex_state = 10}, [30] = {.lex_state = 6}, @@ -1770,20 +1774,20 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [32] = {.lex_state = 8}, [33] = {.lex_state = 8}, [34] = {.lex_state = 7}, - [35] = {.lex_state = 7}, + [35] = {.lex_state = 8}, [36] = {.lex_state = 8}, [37] = {.lex_state = 7}, - [38] = {.lex_state = 8}, - [39] = {.lex_state = 7}, + [38] = {.lex_state = 7}, + [39] = {.lex_state = 5}, [40] = {.lex_state = 7}, [41] = {.lex_state = 5}, - [42] = {.lex_state = 5}, + [42] = {.lex_state = 7}, [43] = {.lex_state = 5}, - [44] = {.lex_state = 7}, - [45] = {.lex_state = 5}, - [46] = {.lex_state = 16}, - [47] = {.lex_state = 7}, - [48] = {.lex_state = 5}, + [44] = {.lex_state = 5}, + [45] = {.lex_state = 16}, + [46] = {.lex_state = 7}, + [47] = {.lex_state = 5}, + [48] = {.lex_state = 7}, [49] = {.lex_state = 7}, [50] = {.lex_state = 5}, [51] = {.lex_state = 5}, @@ -1793,25 +1797,25 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [55] = {.lex_state = 7}, [56] = {.lex_state = 7}, [57] = {.lex_state = 7}, - [58] = {.lex_state = 5}, + [58] = {.lex_state = 7}, [59] = {.lex_state = 5}, - [60] = {.lex_state = 7}, + [60] = {.lex_state = 5}, [61] = {.lex_state = 7}, [62] = {.lex_state = 7}, - [63] = {.lex_state = 5}, - [64] = {.lex_state = 5}, + [63] = {.lex_state = 7}, + [64] = {.lex_state = 7}, [65] = {.lex_state = 7}, [66] = {.lex_state = 7}, - [67] = {.lex_state = 7}, - [68] = {.lex_state = 7}, + [67] = {.lex_state = 5}, + [68] = {.lex_state = 5}, [69] = {.lex_state = 76}, - [70] = {.lex_state = 76}, + [70] = {.lex_state = 1}, [71] = {.lex_state = 1}, - [72] = {.lex_state = 1}, + [72] = {.lex_state = 76}, [73] = {.lex_state = 1}, [74] = {.lex_state = 76}, - [75] = {.lex_state = 2}, - [76] = {.lex_state = 1}, + [75] = {.lex_state = 1}, + [76] = {.lex_state = 2}, [77] = {.lex_state = 2}, [78] = {.lex_state = 2}, [79] = {.lex_state = 76}, @@ -1844,20 +1848,20 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [106] = {.lex_state = 76}, [107] = {.lex_state = 76}, [108] = {.lex_state = 76}, - [109] = {.lex_state = 76}, + [109] = {.lex_state = 0}, [110] = {.lex_state = 76}, [111] = {.lex_state = 76}, - [112] = {.lex_state = 76}, + [112] = {.lex_state = 1}, [113] = {.lex_state = 76}, [114] = {.lex_state = 76}, - [115] = {.lex_state = 0}, + [115] = {.lex_state = 76}, [116] = {.lex_state = 76}, [117] = {.lex_state = 76}, - [118] = {.lex_state = 1}, + [118] = {.lex_state = 76}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { - [0] = { + [STATE(0)] = { [ts_builtin_sym_end] = ACTIONS(1), [sym_attr_name] = ACTIONS(1), [anon_sym_BANG] = ACTIONS(1), @@ -1890,19 +1894,19 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [sym__eol] = ACTIONS(1), [anon_sym_NULL] = ACTIONS(1), }, - [1] = { - [sym_file] = STATE(115), - [sym__line] = STATE(3), - [sym__attr_list] = STATE(83), - [sym_pattern] = STATE(91), + [STATE(1)] = { + [sym_file] = STATE(109), + [sym__line] = STATE(2), + [sym__attr_list] = STATE(79), + [sym_pattern] = STATE(92), [aux_sym__pattern] = STATE(37), - [sym_quoted_pattern] = STATE(91), + [sym_quoted_pattern] = STATE(92), [sym_range_notation] = STATE(37), - [sym_macro_def] = STATE(83), - [sym_comment] = STATE(83), + [sym_macro_def] = STATE(79), + [sym_comment] = STATE(79), [sym__space] = STATE(7), - [sym__eof] = STATE(3), - [aux_sym_file_repeat1] = STATE(3), + [sym__eof] = STATE(2), + [aux_sym_file_repeat1] = STATE(2), [ts_builtin_sym_end] = ACTIONS(3), [anon_sym_BANG] = ACTIONS(5), [anon_sym_BSLASH] = ACTIONS(7), @@ -1922,86 +1926,86 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { static const uint16_t ts_small_parse_table[] = { [0] = 16, - ACTIONS(25), 1, - ts_builtin_sym_end, - ACTIONS(27), 1, + ACTIONS(5), 1, anon_sym_BANG, - ACTIONS(33), 1, + ACTIONS(9), 1, anon_sym_DQUOTE, - ACTIONS(39), 1, + ACTIONS(13), 1, anon_sym_LBRACK, - ACTIONS(42), 1, + ACTIONS(15), 1, sym_dir_sep, - ACTIONS(45), 1, + ACTIONS(17), 1, anon_sym_LBRACKattr_RBRACK, - ACTIONS(48), 1, + ACTIONS(19), 1, anon_sym_POUND, - ACTIONS(51), 1, + ACTIONS(21), 1, aux_sym__space_token1, + ACTIONS(25), 1, + ts_builtin_sym_end, STATE(7), 1, sym__space, - ACTIONS(30), 2, + ACTIONS(7), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(36), 2, + ACTIONS(11), 2, sym_escaped_char, sym_wildcard, - ACTIONS(54), 2, + ACTIONS(27), 2, sym__eol, anon_sym_NULL, STATE(37), 2, aux_sym__pattern, sym_range_notation, - STATE(91), 2, + STATE(92), 2, sym_pattern, sym_quoted_pattern, - STATE(2), 3, + STATE(3), 3, sym__line, sym__eof, aux_sym_file_repeat1, - STATE(83), 3, + STATE(79), 3, sym__attr_list, sym_macro_def, sym_comment, [58] = 16, - ACTIONS(5), 1, + ACTIONS(29), 1, + ts_builtin_sym_end, + ACTIONS(31), 1, anon_sym_BANG, - ACTIONS(9), 1, + ACTIONS(37), 1, anon_sym_DQUOTE, - ACTIONS(13), 1, + ACTIONS(43), 1, anon_sym_LBRACK, - ACTIONS(15), 1, + ACTIONS(46), 1, sym_dir_sep, - ACTIONS(17), 1, + ACTIONS(49), 1, anon_sym_LBRACKattr_RBRACK, - ACTIONS(19), 1, + ACTIONS(52), 1, anon_sym_POUND, - ACTIONS(21), 1, + ACTIONS(55), 1, aux_sym__space_token1, - ACTIONS(57), 1, - ts_builtin_sym_end, STATE(7), 1, sym__space, - ACTIONS(7), 2, + ACTIONS(34), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(11), 2, + ACTIONS(40), 2, sym_escaped_char, sym_wildcard, - ACTIONS(59), 2, + ACTIONS(58), 2, sym__eol, anon_sym_NULL, STATE(37), 2, aux_sym__pattern, sym_range_notation, - STATE(91), 2, + STATE(92), 2, sym_pattern, sym_quoted_pattern, - STATE(2), 3, + STATE(3), 3, sym__line, sym__eof, aux_sym_file_repeat1, - STATE(83), 3, + STATE(79), 3, sym__attr_list, sym_macro_def, sym_comment, @@ -2012,11 +2016,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANG, ACTIONS(65), 1, anon_sym_DASH, - STATE(71), 1, + STATE(73), 1, sym_builtin_attr, - STATE(92), 1, + STATE(80), 1, sym_attribute, - STATE(99), 1, + STATE(81), 1, sym__prefixed_attr, ACTIONS(69), 2, sym__eol, @@ -2043,11 +2047,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANG, ACTIONS(65), 1, anon_sym_DASH, - STATE(71), 1, + STATE(73), 1, sym_builtin_attr, - STATE(92), 1, + STATE(80), 1, sym_attribute, - STATE(99), 1, + STATE(81), 1, sym__prefixed_attr, ACTIONS(71), 2, sym__eol, @@ -2074,11 +2078,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BANG, ACTIONS(65), 1, anon_sym_DASH, - STATE(71), 1, + STATE(73), 1, sym_builtin_attr, - STATE(92), 1, + STATE(80), 1, sym_attribute, - STATE(99), 1, + STATE(81), 1, sym__prefixed_attr, ACTIONS(67), 14, anon_sym_text, @@ -2108,7 +2112,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACKattr_RBRACK, ACTIONS(19), 1, anon_sym_POUND, - STATE(26), 1, + STATE(23), 1, sym__eof, ACTIONS(7), 2, anon_sym_BSLASH, @@ -2122,10 +2126,10 @@ static const uint16_t ts_small_parse_table[] = { STATE(37), 2, aux_sym__pattern, sym_range_notation, - STATE(91), 2, + STATE(92), 2, sym_pattern, sym_quoted_pattern, - STATE(89), 3, + STATE(84), 3, sym__attr_list, sym_macro_def, sym_comment, @@ -2138,12 +2142,12 @@ static const uint16_t ts_small_parse_table[] = { sym__special_char, ACTIONS(85), 1, sym_dir_sep, - STATE(86), 1, + STATE(99), 1, aux_sym_pattern_repeat1, ACTIONS(75), 2, anon_sym_BSLASH, aux_sym__quoted_pattern_token1, - STATE(16), 2, + STATE(17), 2, aux_sym__quoted_pattern, sym_ansi_c_escape, STATE(30), 2, @@ -2164,12 +2168,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DQUOTE, ACTIONS(89), 1, sym_dir_sep, - STATE(80), 1, + STATE(96), 1, aux_sym_pattern_repeat1, ACTIONS(75), 2, anon_sym_BSLASH, aux_sym__quoted_pattern_token1, - STATE(16), 2, + STATE(17), 2, aux_sym__quoted_pattern, sym_ansi_c_escape, STATE(30), 2, @@ -2181,10 +2185,36 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [346] = 3, + [346] = 9, + ACTIONS(79), 1, + sym_escaped_char, + ACTIONS(81), 1, + sym__special_char, ACTIONS(91), 1, + anon_sym_DQUOTE, + ACTIONS(93), 1, + sym_dir_sep, + STATE(85), 1, + aux_sym_pattern_repeat1, + ACTIONS(75), 2, + anon_sym_BSLASH, + aux_sym__quoted_pattern_token1, + STATE(17), 2, + aux_sym__quoted_pattern, + sym_ansi_c_escape, + STATE(30), 2, + sym__char_code, + sym__unicode_code, + ACTIONS(83), 5, + sym__octal_code, + sym__hex_code, + aux_sym__unicode_code_token1, + aux_sym__unicode_code_token2, + sym__control_code, + [381] = 3, + ACTIONS(95), 1, sym_attr_name, - STATE(73), 1, + STATE(71), 1, sym_builtin_attr, ACTIONS(67), 14, anon_sym_text, @@ -2201,21 +2231,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_delta, anon_sym_encoding, anon_sym_binary, - [369] = 9, + [404] = 9, ACTIONS(79), 1, sym_escaped_char, ACTIONS(81), 1, sym__special_char, - ACTIONS(93), 1, + ACTIONS(97), 1, anon_sym_DQUOTE, - ACTIONS(95), 1, + ACTIONS(99), 1, sym_dir_sep, - STATE(81), 1, + STATE(87), 1, aux_sym_pattern_repeat1, ACTIONS(75), 2, anon_sym_BSLASH, aux_sym__quoted_pattern_token1, - STATE(16), 2, + STATE(17), 2, aux_sym__quoted_pattern, sym_ansi_c_escape, STATE(30), 2, @@ -2227,10 +2257,10 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [404] = 3, - ACTIONS(97), 1, + [439] = 3, + ACTIONS(101), 1, sym_attr_name, - STATE(72), 1, + STATE(70), 1, sym_builtin_attr, ACTIONS(67), 14, anon_sym_text, @@ -2247,56 +2277,53 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_delta, anon_sym_encoding, anon_sym_binary, - [427] = 9, - ACTIONS(79), 1, - sym_escaped_char, - ACTIONS(81), 1, + [462] = 7, + ACTIONS(103), 1, sym__special_char, - ACTIONS(99), 1, - anon_sym_DQUOTE, - ACTIONS(101), 1, - sym_dir_sep, - STATE(79), 1, - aux_sym_pattern_repeat1, - ACTIONS(75), 2, - anon_sym_BSLASH, - aux_sym__quoted_pattern_token1, - STATE(16), 2, - aux_sym__quoted_pattern, - sym_ansi_c_escape, - STATE(30), 2, + ACTIONS(107), 1, + aux_sym_range_notation_token1, + ACTIONS(111), 1, + sym__class_char, + ACTIONS(109), 2, + anon_sym_DASH, + sym_character_class, + STATE(36), 2, sym__char_code, sym__unicode_code, - ACTIONS(83), 5, + STATE(15), 3, + sym_ansi_c_escape, + sym_class_range, + aux_sym_range_notation_repeat1, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [462] = 7, + [492] = 7, ACTIONS(103), 1, sym__special_char, - ACTIONS(112), 1, - anon_sym_RBRACK, - ACTIONS(114), 1, + ACTIONS(111), 1, sym__class_char, - ACTIONS(109), 2, + ACTIONS(115), 1, + anon_sym_RBRACK, + ACTIONS(113), 2, anon_sym_DASH, sym_character_class, - STATE(32), 2, + STATE(36), 2, sym__char_code, sym__unicode_code, - STATE(14), 3, + STATE(20), 3, sym_ansi_c_escape, sym_class_range, aux_sym_range_notation_repeat1, - ACTIONS(106), 5, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [492] = 8, + [522] = 8, ACTIONS(81), 1, sym__special_char, ACTIONS(117), 1, @@ -2308,7 +2335,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(119), 2, anon_sym_BSLASH, aux_sym__quoted_pattern_token1, - STATE(11), 2, + STATE(10), 2, aux_sym__quoted_pattern, sym_ansi_c_escape, STATE(30), 2, @@ -2320,7 +2347,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [524] = 7, + [554] = 7, ACTIONS(130), 1, sym_escaped_char, ACTIONS(133), 1, @@ -2331,7 +2358,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(128), 2, anon_sym_DQUOTE, sym_dir_sep, - STATE(16), 2, + STATE(17), 2, aux_sym__quoted_pattern, sym_ansi_c_escape, STATE(30), 2, @@ -2343,171 +2370,127 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [554] = 7, - ACTIONS(139), 1, - sym__special_char, - ACTIONS(145), 1, - anon_sym_RBRACK, - ACTIONS(147), 1, - sym__class_char, - ACTIONS(143), 2, - anon_sym_DASH, - sym_character_class, - STATE(32), 2, - sym__char_code, - sym__unicode_code, - STATE(14), 3, - sym_ansi_c_escape, - sym_class_range, - aux_sym_range_notation_repeat1, - ACTIONS(141), 5, - sym__octal_code, - sym__hex_code, - aux_sym__unicode_code_token1, - aux_sym__unicode_code_token2, - sym__control_code, [584] = 7, - ACTIONS(139), 1, + ACTIONS(103), 1, sym__special_char, - ACTIONS(147), 1, + ACTIONS(111), 1, sym__class_char, - ACTIONS(149), 1, + ACTIONS(139), 1, anon_sym_RBRACK, - ACTIONS(143), 2, + ACTIONS(113), 2, anon_sym_DASH, sym_character_class, - STATE(32), 2, + STATE(36), 2, sym__char_code, sym__unicode_code, - STATE(14), 3, + STATE(20), 3, sym_ansi_c_escape, sym_class_range, aux_sym_range_notation_repeat1, - ACTIONS(141), 5, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, [614] = 7, - ACTIONS(139), 1, + ACTIONS(103), 1, sym__special_char, - ACTIONS(147), 1, + ACTIONS(111), 1, sym__class_char, - ACTIONS(151), 1, + ACTIONS(141), 1, anon_sym_RBRACK, - ACTIONS(143), 2, + ACTIONS(113), 2, anon_sym_DASH, sym_character_class, - STATE(32), 2, + STATE(36), 2, sym__char_code, sym__unicode_code, - STATE(14), 3, + STATE(20), 3, sym_ansi_c_escape, sym_class_range, aux_sym_range_notation_repeat1, - ACTIONS(141), 5, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, [644] = 7, - ACTIONS(139), 1, + ACTIONS(143), 1, sym__special_char, - ACTIONS(147), 1, + ACTIONS(152), 1, + anon_sym_RBRACK, + ACTIONS(154), 1, sym__class_char, - ACTIONS(153), 1, - aux_sym_range_notation_token1, - ACTIONS(155), 2, + ACTIONS(149), 2, anon_sym_DASH, sym_character_class, - STATE(32), 2, + STATE(36), 2, sym__char_code, sym__unicode_code, - STATE(18), 3, + STATE(20), 3, sym_ansi_c_escape, sym_class_range, aux_sym_range_notation_repeat1, - ACTIONS(141), 5, + ACTIONS(146), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, [674] = 7, - ACTIONS(139), 1, + ACTIONS(103), 1, sym__special_char, - ACTIONS(147), 1, + ACTIONS(111), 1, sym__class_char, ACTIONS(157), 1, - anon_sym_RBRACK, - ACTIONS(143), 2, - anon_sym_DASH, - sym_character_class, - STATE(32), 2, - sym__char_code, - sym__unicode_code, - STATE(14), 3, - sym_ansi_c_escape, - sym_class_range, - aux_sym_range_notation_repeat1, - ACTIONS(141), 5, - sym__octal_code, - sym__hex_code, - aux_sym__unicode_code_token1, - aux_sym__unicode_code_token2, - sym__control_code, - [704] = 7, - ACTIONS(139), 1, - sym__special_char, - ACTIONS(147), 1, - sym__class_char, - ACTIONS(159), 1, aux_sym_range_notation_token1, - ACTIONS(161), 2, + ACTIONS(159), 2, anon_sym_DASH, sym_character_class, - STATE(32), 2, + STATE(36), 2, sym__char_code, sym__unicode_code, - STATE(21), 3, + STATE(19), 3, sym_ansi_c_escape, sym_class_range, aux_sym_range_notation_repeat1, - ACTIONS(141), 5, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [734] = 6, - ACTIONS(139), 1, + [704] = 7, + ACTIONS(103), 1, sym__special_char, - ACTIONS(147), 1, + ACTIONS(111), 1, sym__class_char, - ACTIONS(163), 2, + ACTIONS(161), 1, + anon_sym_RBRACK, + ACTIONS(113), 2, anon_sym_DASH, sym_character_class, - STATE(32), 2, + STATE(36), 2, sym__char_code, sym__unicode_code, - STATE(17), 3, + STATE(20), 3, sym_ansi_c_escape, sym_class_range, aux_sym_range_notation_repeat1, - ACTIONS(141), 5, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [761] = 2, - ACTIONS(167), 3, + [734] = 2, + ACTIONS(165), 3, anon_sym_BSLASH, sym__pattern_char, anon_sym_LBRACK, - ACTIONS(165), 11, + ACTIONS(163), 11, ts_builtin_sym_end, anon_sym_BANG, anon_sym_DQUOTE, @@ -2519,33 +2502,55 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__space_token1, sym__eol, anon_sym_NULL, - [780] = 6, - ACTIONS(139), 1, + [753] = 7, + ACTIONS(81), 1, + sym__special_char, + ACTIONS(169), 1, + sym_escaped_char, + ACTIONS(171), 1, + sym_dir_sep, + ACTIONS(167), 2, + anon_sym_BSLASH, + aux_sym__quoted_pattern_token1, + STATE(9), 2, + aux_sym__quoted_pattern, + sym_ansi_c_escape, + STATE(30), 2, + sym__char_code, + sym__unicode_code, + ACTIONS(83), 5, + sym__octal_code, + sym__hex_code, + aux_sym__unicode_code_token1, + aux_sym__unicode_code_token2, + sym__control_code, + [782] = 6, + ACTIONS(103), 1, sym__special_char, - ACTIONS(147), 1, + ACTIONS(111), 1, sym__class_char, - ACTIONS(169), 2, + ACTIONS(173), 2, anon_sym_DASH, sym_character_class, - STATE(32), 2, + STATE(36), 2, sym__char_code, sym__unicode_code, - STATE(19), 3, + STATE(18), 3, sym_ansi_c_escape, sym_class_range, aux_sym_range_notation_repeat1, - ACTIONS(141), 5, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, - [807] = 2, - ACTIONS(173), 3, + [809] = 2, + ACTIONS(177), 3, anon_sym_BSLASH, sym__pattern_char, anon_sym_LBRACK, - ACTIONS(171), 11, + ACTIONS(175), 11, ts_builtin_sym_end, anon_sym_BANG, anon_sym_DQUOTE, @@ -2557,23 +2562,22 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__space_token1, sym__eol, anon_sym_NULL, - [826] = 7, - ACTIONS(81), 1, + [828] = 6, + ACTIONS(103), 1, sym__special_char, - ACTIONS(177), 1, - sym_escaped_char, - ACTIONS(179), 1, - sym_dir_sep, - ACTIONS(175), 2, - anon_sym_BSLASH, - aux_sym__quoted_pattern_token1, - STATE(13), 2, - aux_sym__quoted_pattern, - sym_ansi_c_escape, - STATE(30), 2, + ACTIONS(111), 1, + sym__class_char, + ACTIONS(179), 2, + anon_sym_DASH, + sym_character_class, + STATE(36), 2, sym__char_code, sym__unicode_code, - ACTIONS(83), 5, + STATE(22), 3, + sym_ansi_c_escape, + sym_class_range, + aux_sym_range_notation_repeat1, + ACTIONS(105), 5, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, @@ -2587,7 +2591,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(181), 2, anon_sym_BSLASH, aux_sym__quoted_pattern_token1, - STATE(8), 2, + STATE(12), 2, aux_sym__quoted_pattern, sym_ansi_c_escape, STATE(30), 2, @@ -2607,7 +2611,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(185), 2, anon_sym_BSLASH, aux_sym__quoted_pattern_token1, - STATE(9), 2, + STATE(8), 2, aux_sym__quoted_pattern, sym_ansi_c_escape, STATE(30), 2, @@ -2640,7 +2644,7 @@ static const uint16_t ts_small_parse_table[] = { sym_dir_sep, ACTIONS(201), 1, aux_sym__space_token1, - STATE(90), 1, + STATE(94), 1, aux_sym_pattern_repeat1, ACTIONS(193), 2, anon_sym_BSLASH, @@ -2648,15 +2652,15 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(195), 2, sym_escaped_char, sym_wildcard, - STATE(40), 2, + STATE(42), 2, aux_sym__pattern, sym_range_notation, [948] = 3, - ACTIONS(189), 1, - sym__class_char, - ACTIONS(203), 1, + ACTIONS(205), 1, anon_sym_DASH, - ACTIONS(191), 8, + ACTIONS(207), 1, + sym__class_char, + ACTIONS(203), 8, sym__special_char, sym__octal_code, sym__hex_code, @@ -2665,46 +2669,27 @@ static const uint16_t ts_small_parse_table[] = { sym__control_code, anon_sym_RBRACK, sym_character_class, - [965] = 3, - ACTIONS(203), 1, - anon_sym_DASH, - ACTIONS(207), 1, + [965] = 2, + ACTIONS(211), 1, sym__class_char, - ACTIONS(205), 8, + ACTIONS(209), 9, sym__special_char, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, + anon_sym_DASH, anon_sym_RBRACK, sym_character_class, - [982] = 7, - ACTIONS(197), 1, - anon_sym_LBRACK, - ACTIONS(209), 1, - sym_dir_sep, - ACTIONS(211), 1, - aux_sym__space_token1, - STATE(94), 1, - aux_sym_pattern_repeat1, - ACTIONS(193), 2, - anon_sym_BSLASH, - sym__pattern_char, - ACTIONS(195), 2, - sym_escaped_char, - sym_wildcard, - STATE(40), 2, - aux_sym__pattern, - sym_range_notation, - [1007] = 7, + [980] = 7, ACTIONS(197), 1, anon_sym_LBRACK, ACTIONS(213), 1, sym_dir_sep, ACTIONS(215), 1, aux_sym__space_token1, - STATE(87), 1, + STATE(95), 1, aux_sym_pattern_repeat1, ACTIONS(193), 2, anon_sym_BSLASH, @@ -2712,10 +2697,10 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(195), 2, sym_escaped_char, sym_wildcard, - STATE(40), 2, + STATE(42), 2, aux_sym__pattern, sym_range_notation, - [1032] = 2, + [1005] = 2, ACTIONS(189), 1, sym__class_char, ACTIONS(191), 9, @@ -2728,14 +2713,28 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_DASH, anon_sym_RBRACK, sym_character_class, - [1047] = 7, + [1020] = 3, + ACTIONS(189), 1, + sym__class_char, + ACTIONS(205), 1, + anon_sym_DASH, + ACTIONS(191), 8, + sym__special_char, + sym__octal_code, + sym__hex_code, + aux_sym__unicode_code_token1, + aux_sym__unicode_code_token2, + sym__control_code, + anon_sym_RBRACK, + sym_character_class, + [1037] = 7, ACTIONS(197), 1, anon_sym_LBRACK, ACTIONS(217), 1, sym_dir_sep, ACTIONS(219), 1, aux_sym__space_token1, - STATE(93), 1, + STATE(82), 1, aux_sym_pattern_repeat1, ACTIONS(193), 2, anon_sym_BSLASH, @@ -2743,54 +2742,59 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(195), 2, sym_escaped_char, sym_wildcard, - STATE(40), 2, + STATE(42), 2, aux_sym__pattern, sym_range_notation, - [1072] = 2, + [1062] = 7, + ACTIONS(197), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + sym_dir_sep, ACTIONS(223), 1, - sym__class_char, - ACTIONS(221), 9, - sym__special_char, - sym__octal_code, - sym__hex_code, - aux_sym__unicode_code_token1, - aux_sym__unicode_code_token2, - sym__control_code, - anon_sym_DASH, - anon_sym_RBRACK, - sym_character_class, - [1087] = 5, - ACTIONS(197), 1, - anon_sym_LBRACK, + aux_sym__space_token1, + STATE(93), 1, + aux_sym_pattern_repeat1, ACTIONS(193), 2, anon_sym_BSLASH, sym__pattern_char, ACTIONS(195), 2, sym_escaped_char, sym_wildcard, + STATE(42), 2, + aux_sym__pattern, + sym_range_notation, + [1087] = 5, + ACTIONS(233), 1, + anon_sym_LBRACK, ACTIONS(225), 2, + anon_sym_BSLASH, + sym__pattern_char, + ACTIONS(228), 2, + anon_sym_DQUOTE, sym_dir_sep, - aux_sym__space_token1, - STATE(40), 2, + ACTIONS(230), 2, + sym_escaped_char, + sym_wildcard, + STATE(39), 2, aux_sym__pattern, sym_range_notation, [1107] = 5, - ACTIONS(233), 1, + ACTIONS(197), 1, anon_sym_LBRACK, - ACTIONS(227), 2, + ACTIONS(193), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(230), 2, + ACTIONS(195), 2, sym_escaped_char, sym_wildcard, ACTIONS(236), 2, sym_dir_sep, aux_sym__space_token1, - STATE(40), 2, + STATE(42), 2, aux_sym__pattern, sym_range_notation, [1127] = 5, - ACTIONS(244), 1, + ACTIONS(242), 1, anon_sym_LBRACK, ACTIONS(236), 2, anon_sym_DQUOTE, @@ -2798,29 +2802,29 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(238), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(241), 2, + ACTIONS(240), 2, sym_escaped_char, sym_wildcard, - STATE(41), 2, + STATE(39), 2, aux_sym__pattern, sym_range_notation, [1147] = 5, - ACTIONS(251), 1, + ACTIONS(250), 1, anon_sym_LBRACK, - ACTIONS(225), 2, - anon_sym_DQUOTE, + ACTIONS(228), 2, sym_dir_sep, - ACTIONS(247), 2, + aux_sym__space_token1, + ACTIONS(244), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(249), 2, + ACTIONS(247), 2, sym_escaped_char, sym_wildcard, - STATE(41), 2, + STATE(42), 2, aux_sym__pattern, sym_range_notation, [1167] = 5, - ACTIONS(251), 1, + ACTIONS(242), 1, anon_sym_LBRACK, ACTIONS(255), 1, anon_sym_DQUOTE, @@ -2830,27 +2834,13 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, [1186] = 5, - ACTIONS(197), 1, - anon_sym_LBRACK, - ACTIONS(263), 1, - aux_sym__space_token1, - ACTIONS(259), 2, - anon_sym_BSLASH, - sym__pattern_char, - ACTIONS(261), 2, - sym_escaped_char, - sym_wildcard, - STATE(39), 2, - aux_sym__pattern, - sym_range_notation, - [1205] = 5, - ACTIONS(251), 1, + ACTIONS(242), 1, anon_sym_LBRACK, - ACTIONS(265), 1, + ACTIONS(259), 1, anon_sym_DQUOTE, ACTIONS(253), 2, anon_sym_BSLASH, @@ -2858,38 +2848,38 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, - [1224] = 2, - STATE(38), 2, + [1205] = 2, + STATE(33), 2, sym__char_code, sym__unicode_code, - ACTIONS(267), 6, + ACTIONS(261), 6, sym__octal_code, sym__hex_code, aux_sym__unicode_code_token1, aux_sym__unicode_code_token2, sym__control_code, sym__class_char, - [1237] = 5, + [1218] = 5, ACTIONS(197), 1, anon_sym_LBRACK, - ACTIONS(269), 1, + ACTIONS(267), 1, aux_sym__space_token1, - ACTIONS(259), 2, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(40), 2, aux_sym__pattern, sym_range_notation, - [1256] = 5, - ACTIONS(251), 1, + [1237] = 5, + ACTIONS(242), 1, anon_sym_LBRACK, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_DQUOTE, ACTIONS(253), 2, anon_sym_BSLASH, @@ -2897,27 +2887,41 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, - [1275] = 5, + [1256] = 5, ACTIONS(197), 1, anon_sym_LBRACK, - ACTIONS(273), 1, + ACTIONS(271), 1, aux_sym__space_token1, - ACTIONS(259), 2, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(40), 2, + aux_sym__pattern, + sym_range_notation, + [1275] = 5, + ACTIONS(197), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + sym_dir_sep, + ACTIONS(273), 2, + anon_sym_BSLASH, + sym__pattern_char, + ACTIONS(275), 2, + sym_escaped_char, + sym_wildcard, + STATE(31), 2, aux_sym__pattern, sym_range_notation, [1294] = 5, - ACTIONS(251), 1, + ACTIONS(242), 1, anon_sym_LBRACK, - ACTIONS(275), 1, + ACTIONS(279), 1, anon_sym_DQUOTE, ACTIONS(253), 2, anon_sym_BSLASH, @@ -2925,13 +2929,13 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, [1313] = 5, - ACTIONS(251), 1, + ACTIONS(242), 1, anon_sym_LBRACK, - ACTIONS(277), 1, + ACTIONS(281), 1, anon_sym_DQUOTE, ACTIONS(253), 2, anon_sym_BSLASH, @@ -2939,13 +2943,13 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, [1332] = 5, - ACTIONS(251), 1, + ACTIONS(242), 1, anon_sym_LBRACK, - ACTIONS(279), 1, + ACTIONS(283), 1, anon_sym_DQUOTE, ACTIONS(253), 2, anon_sym_BSLASH, @@ -2953,35 +2957,35 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, [1351] = 5, ACTIONS(197), 1, anon_sym_LBRACK, - ACTIONS(281), 1, + ACTIONS(285), 1, aux_sym__space_token1, - ACTIONS(259), 2, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(40), 2, aux_sym__pattern, sym_range_notation, [1370] = 5, ACTIONS(197), 1, anon_sym_LBRACK, ACTIONS(287), 1, - sym_dir_sep, - ACTIONS(283), 2, + aux_sym__space_token1, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(285), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(35), 2, + STATE(40), 2, aux_sym__pattern, sym_range_notation, [1389] = 5, @@ -2989,13 +2993,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(289), 1, aux_sym__space_token1, - ACTIONS(259), 2, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(40), 2, aux_sym__pattern, sym_range_notation, [1408] = 5, @@ -3003,13 +3007,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(291), 1, aux_sym__space_token1, - ACTIONS(259), 2, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(40), 2, aux_sym__pattern, sym_range_notation, [1427] = 5, @@ -3017,31 +3021,31 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(293), 1, aux_sym__space_token1, - ACTIONS(259), 2, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(40), 2, aux_sym__pattern, sym_range_notation, [1446] = 5, - ACTIONS(251), 1, + ACTIONS(197), 1, anon_sym_LBRACK, ACTIONS(295), 1, - anon_sym_DQUOTE, - ACTIONS(253), 2, + aux_sym__space_token1, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(257), 2, + ACTIONS(265), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(40), 2, aux_sym__pattern, sym_range_notation, [1465] = 5, - ACTIONS(251), 1, + ACTIONS(242), 1, anon_sym_LBRACK, ACTIONS(297), 1, anon_sym_DQUOTE, @@ -3051,90 +3055,80 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(42), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, [1484] = 5, - ACTIONS(197), 1, + ACTIONS(242), 1, anon_sym_LBRACK, ACTIONS(299), 1, - aux_sym__space_token1, - ACTIONS(259), 2, + anon_sym_DQUOTE, + ACTIONS(253), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, [1503] = 4, - ACTIONS(197), 1, + ACTIONS(242), 1, anon_sym_LBRACK, - ACTIONS(259), 2, + ACTIONS(253), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(261), 2, + ACTIONS(257), 2, sym_escaped_char, sym_wildcard, - STATE(39), 2, + STATE(41), 2, aux_sym__pattern, sym_range_notation, - [1519] = 2, + [1519] = 4, + ACTIONS(197), 1, + anon_sym_LBRACK, ACTIONS(301), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(303), 5, + ACTIONS(303), 2, sym_escaped_char, - anon_sym_LBRACK, sym_wildcard, - sym_dir_sep, - aux_sym__space_token1, - [1531] = 2, - ACTIONS(301), 2, + STATE(38), 2, + aux_sym__pattern, + sym_range_notation, + [1535] = 4, + ACTIONS(197), 1, + anon_sym_LBRACK, + ACTIONS(263), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(303), 5, - anon_sym_DQUOTE, + ACTIONS(265), 2, sym_escaped_char, - anon_sym_LBRACK, sym_wildcard, - sym_dir_sep, - [1543] = 2, + STATE(40), 2, + aux_sym__pattern, + sym_range_notation, + [1551] = 2, ACTIONS(305), 2, anon_sym_BSLASH, sym__pattern_char, ACTIONS(307), 5, - anon_sym_DQUOTE, sym_escaped_char, anon_sym_LBRACK, sym_wildcard, sym_dir_sep, - [1555] = 4, - ACTIONS(197), 1, - anon_sym_LBRACK, + aux_sym__space_token1, + [1563] = 2, ACTIONS(309), 2, anon_sym_BSLASH, sym__pattern_char, - ACTIONS(311), 2, + ACTIONS(311), 5, sym_escaped_char, - sym_wildcard, - STATE(34), 2, - aux_sym__pattern, - sym_range_notation, - [1571] = 4, - ACTIONS(251), 1, anon_sym_LBRACK, - ACTIONS(253), 2, - anon_sym_BSLASH, - sym__pattern_char, - ACTIONS(257), 2, - sym_escaped_char, sym_wildcard, - STATE(42), 2, - aux_sym__pattern, - sym_range_notation, - [1587] = 4, + sym_dir_sep, + aux_sym__space_token1, + [1575] = 4, ACTIONS(197), 1, anon_sym_LBRACK, ACTIONS(313), 2, @@ -3143,94 +3137,104 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(315), 2, sym_escaped_char, sym_wildcard, - STATE(31), 2, + STATE(34), 2, aux_sym__pattern, sym_range_notation, + [1591] = 2, + ACTIONS(309), 2, + anon_sym_BSLASH, + sym__pattern_char, + ACTIONS(311), 5, + anon_sym_DQUOTE, + sym_escaped_char, + anon_sym_LBRACK, + sym_wildcard, + sym_dir_sep, [1603] = 2, ACTIONS(305), 2, anon_sym_BSLASH, sym__pattern_char, ACTIONS(307), 5, + anon_sym_DQUOTE, sym_escaped_char, anon_sym_LBRACK, sym_wildcard, sym_dir_sep, - aux_sym__space_token1, [1615] = 4, ACTIONS(317), 1, aux_sym__space_token1, - STATE(6), 1, - sym__space, - STATE(69), 1, - aux_sym__attr_list_repeat1, - ACTIONS(320), 2, - sym__eol, - anon_sym_NULL, - [1629] = 4, - ACTIONS(322), 1, - aux_sym__space_token1, STATE(4), 1, sym__space, - STATE(69), 1, + STATE(74), 1, aux_sym__attr_list_repeat1, - ACTIONS(324), 2, + ACTIONS(319), 2, sym__eol, anon_sym_NULL, - [1643] = 3, - ACTIONS(326), 1, + [1629] = 3, + ACTIONS(321), 1, anon_sym_EQ, - STATE(85), 1, + STATE(97), 1, sym__attr_value, - ACTIONS(328), 3, + ACTIONS(323), 3, aux_sym__space_token1, sym__eol, anon_sym_NULL, - [1655] = 3, - ACTIONS(326), 1, + [1641] = 3, + ACTIONS(321), 1, anon_sym_EQ, - STATE(96), 1, + STATE(89), 1, sym__attr_value, - ACTIONS(330), 3, + ACTIONS(325), 3, aux_sym__space_token1, sym__eol, anon_sym_NULL, + [1653] = 4, + ACTIONS(327), 1, + aux_sym__space_token1, + STATE(5), 1, + sym__space, + STATE(74), 1, + aux_sym__attr_list_repeat1, + ACTIONS(329), 2, + sym__eol, + anon_sym_NULL, [1667] = 3, - ACTIONS(326), 1, + ACTIONS(321), 1, anon_sym_EQ, - STATE(95), 1, + STATE(83), 1, sym__attr_value, - ACTIONS(332), 3, + ACTIONS(331), 3, aux_sym__space_token1, sym__eol, anon_sym_NULL, [1679] = 4, - ACTIONS(334), 1, + ACTIONS(333), 1, aux_sym__space_token1, - STATE(5), 1, + STATE(6), 1, sym__space, - STATE(69), 1, + STATE(74), 1, aux_sym__attr_list_repeat1, ACTIONS(336), 2, sym__eol, anon_sym_NULL, - [1693] = 3, - ACTIONS(338), 1, - aux_sym_comment_token1, - STATE(78), 1, - aux_sym_comment_repeat1, - ACTIONS(340), 2, - sym__eol, - anon_sym_NULL, - [1704] = 1, - ACTIONS(342), 4, + [1693] = 1, + ACTIONS(338), 4, anon_sym_EQ, aux_sym__space_token1, sym__eol, anon_sym_NULL, + [1700] = 3, + ACTIONS(340), 1, + aux_sym_comment_token1, + STATE(77), 1, + aux_sym_comment_repeat1, + ACTIONS(342), 2, + sym__eol, + anon_sym_NULL, [1711] = 3, ACTIONS(344), 1, aux_sym_comment_token1, - STATE(75), 1, + STATE(78), 1, aux_sym_comment_repeat1, ACTIONS(346), 2, sym__eol, @@ -3243,137 +3247,137 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(351), 2, sym__eol, anon_sym_NULL, - [1733] = 3, - ACTIONS(353), 1, - anon_sym_DQUOTE, + [1733] = 2, + STATE(23), 1, + sym__eof, + ACTIONS(73), 2, + sym__eol, + anon_sym_NULL, + [1741] = 1, + ACTIONS(336), 3, + aux_sym__space_token1, + sym__eol, + anon_sym_NULL, + [1747] = 1, + ACTIONS(353), 3, + aux_sym__space_token1, + sym__eol, + anon_sym_NULL, + [1753] = 3, ACTIONS(355), 1, sym_dir_sep, - STATE(88), 1, - aux_sym_pattern_repeat1, - [1743] = 3, ACTIONS(357), 1, - anon_sym_DQUOTE, - ACTIONS(359), 1, - sym_dir_sep, - STATE(88), 1, - aux_sym_pattern_repeat1, - [1753] = 3, - ACTIONS(361), 1, - anon_sym_DQUOTE, - ACTIONS(363), 1, - sym_dir_sep, + aux_sym__space_token1, STATE(88), 1, aux_sym_pattern_repeat1, - [1763] = 3, - ACTIONS(365), 1, - sym_dir_sep, - ACTIONS(368), 1, + [1763] = 1, + ACTIONS(359), 3, aux_sym__space_token1, - STATE(82), 1, - aux_sym_pattern_repeat1, - [1773] = 2, + sym__eol, + anon_sym_NULL, + [1769] = 2, STATE(26), 1, sym__eof, - ACTIONS(73), 2, + ACTIONS(361), 2, sym__eol, anon_sym_NULL, - [1781] = 3, - ACTIONS(370), 1, + [1777] = 3, + ACTIONS(363), 1, + anon_sym_DQUOTE, + ACTIONS(365), 1, + sym_dir_sep, + STATE(98), 1, + aux_sym_pattern_repeat1, + [1787] = 3, + ACTIONS(367), 1, aux_sym__space_token1, STATE(6), 1, sym__space, - STATE(74), 1, + STATE(69), 1, aux_sym__attr_list_repeat1, - [1791] = 1, - ACTIONS(372), 3, - aux_sym__space_token1, - sym__eol, - anon_sym_NULL, [1797] = 3, - ACTIONS(374), 1, + ACTIONS(369), 1, anon_sym_DQUOTE, - ACTIONS(376), 1, + ACTIONS(371), 1, sym_dir_sep, - STATE(88), 1, + STATE(98), 1, aux_sym_pattern_repeat1, [1807] = 3, - ACTIONS(378), 1, + ACTIONS(373), 1, sym_dir_sep, - ACTIONS(380), 1, + ACTIONS(376), 1, aux_sym__space_token1, - STATE(82), 1, - aux_sym_pattern_repeat1, - [1817] = 3, - ACTIONS(368), 1, - anon_sym_DQUOTE, - ACTIONS(382), 1, - sym_dir_sep, STATE(88), 1, aux_sym_pattern_repeat1, - [1827] = 2, - STATE(24), 1, - sym__eof, - ACTIONS(385), 2, + [1817] = 1, + ACTIONS(378), 3, + aux_sym__space_token1, sym__eol, anon_sym_NULL, - [1835] = 3, - ACTIONS(387), 1, - sym_dir_sep, - ACTIONS(389), 1, + [1823] = 1, + ACTIONS(380), 3, aux_sym__space_token1, - STATE(82), 1, - aux_sym_pattern_repeat1, - [1845] = 3, - ACTIONS(370), 1, + sym__eol, + anon_sym_NULL, + [1829] = 1, + ACTIONS(380), 3, + aux_sym__space_token1, + sym__eol, + anon_sym_NULL, + [1835] = 3, + ACTIONS(367), 1, aux_sym__space_token1, STATE(6), 1, sym__space, - STATE(70), 1, + STATE(72), 1, aux_sym__attr_list_repeat1, - [1855] = 1, - ACTIONS(320), 3, - aux_sym__space_token1, - sym__eol, - anon_sym_NULL, - [1861] = 3, - ACTIONS(391), 1, + [1845] = 3, + ACTIONS(382), 1, sym_dir_sep, - ACTIONS(393), 1, + ACTIONS(384), 1, aux_sym__space_token1, - STATE(82), 1, + STATE(88), 1, aux_sym_pattern_repeat1, - [1871] = 3, - ACTIONS(395), 1, + [1855] = 3, + ACTIONS(386), 1, sym_dir_sep, - ACTIONS(397), 1, + ACTIONS(388), 1, aux_sym__space_token1, - STATE(82), 1, + STATE(88), 1, aux_sym_pattern_repeat1, - [1881] = 1, - ACTIONS(399), 3, - aux_sym__space_token1, - sym__eol, - anon_sym_NULL, - [1887] = 1, - ACTIONS(401), 3, - aux_sym__space_token1, - sym__eol, - anon_sym_NULL, - [1893] = 1, - ACTIONS(403), 3, - aux_sym__space_token1, - sym__eol, - anon_sym_NULL, - [1899] = 1, - ACTIONS(403), 3, + [1865] = 3, + ACTIONS(390), 1, + sym_dir_sep, + ACTIONS(392), 1, aux_sym__space_token1, - sym__eol, - anon_sym_NULL, - [1905] = 1, - ACTIONS(405), 3, + STATE(88), 1, + aux_sym_pattern_repeat1, + [1875] = 3, + ACTIONS(394), 1, + anon_sym_DQUOTE, + ACTIONS(396), 1, + sym_dir_sep, + STATE(98), 1, + aux_sym_pattern_repeat1, + [1885] = 1, + ACTIONS(398), 3, aux_sym__space_token1, sym__eol, anon_sym_NULL, + [1891] = 3, + ACTIONS(376), 1, + anon_sym_DQUOTE, + ACTIONS(400), 1, + sym_dir_sep, + STATE(98), 1, + aux_sym_pattern_repeat1, + [1901] = 3, + ACTIONS(403), 1, + anon_sym_DQUOTE, + ACTIONS(405), 1, + sym_dir_sep, + STATE(98), 1, + aux_sym_pattern_repeat1, [1911] = 2, ACTIONS(407), 1, aux_sym__attr_value_token1, @@ -3405,7 +3409,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__space_token1, [1950] = 1, ACTIONS(427), 1, - aux_sym__space_token1, + ts_builtin_sym_end, [1954] = 1, ACTIONS(429), 1, aux_sym__space_token1, @@ -3414,7 +3418,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__space_token1, [1962] = 1, ACTIONS(433), 1, - aux_sym__space_token1, + sym_attr_name, [1966] = 1, ACTIONS(435), 1, aux_sym__space_token1, @@ -3423,7 +3427,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__space_token1, [1974] = 1, ACTIONS(439), 1, - ts_builtin_sym_end, + aux_sym__space_token1, [1978] = 1, ACTIONS(441), 1, aux_sym__space_token1, @@ -3432,7 +3436,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym__space_token1, [1986] = 1, ACTIONS(445), 1, - sym_attr_name, + aux_sym__space_token1, }; static const uint32_t ts_small_parse_table_map[] = { @@ -3445,12 +3449,12 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(8)] = 276, [SMALL_STATE(9)] = 311, [SMALL_STATE(10)] = 346, - [SMALL_STATE(11)] = 369, + [SMALL_STATE(11)] = 381, [SMALL_STATE(12)] = 404, - [SMALL_STATE(13)] = 427, + [SMALL_STATE(13)] = 439, [SMALL_STATE(14)] = 462, [SMALL_STATE(15)] = 492, - [SMALL_STATE(16)] = 524, + [SMALL_STATE(16)] = 522, [SMALL_STATE(17)] = 554, [SMALL_STATE(18)] = 584, [SMALL_STATE(19)] = 614, @@ -3458,21 +3462,21 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(21)] = 674, [SMALL_STATE(22)] = 704, [SMALL_STATE(23)] = 734, - [SMALL_STATE(24)] = 761, - [SMALL_STATE(25)] = 780, - [SMALL_STATE(26)] = 807, - [SMALL_STATE(27)] = 826, + [SMALL_STATE(24)] = 753, + [SMALL_STATE(25)] = 782, + [SMALL_STATE(26)] = 809, + [SMALL_STATE(27)] = 828, [SMALL_STATE(28)] = 855, [SMALL_STATE(29)] = 881, [SMALL_STATE(30)] = 907, [SMALL_STATE(31)] = 923, [SMALL_STATE(32)] = 948, [SMALL_STATE(33)] = 965, - [SMALL_STATE(34)] = 982, - [SMALL_STATE(35)] = 1007, - [SMALL_STATE(36)] = 1032, - [SMALL_STATE(37)] = 1047, - [SMALL_STATE(38)] = 1072, + [SMALL_STATE(34)] = 980, + [SMALL_STATE(35)] = 1005, + [SMALL_STATE(36)] = 1020, + [SMALL_STATE(37)] = 1037, + [SMALL_STATE(38)] = 1062, [SMALL_STATE(39)] = 1087, [SMALL_STATE(40)] = 1107, [SMALL_STATE(41)] = 1127, @@ -3480,7 +3484,7 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(43)] = 1167, [SMALL_STATE(44)] = 1186, [SMALL_STATE(45)] = 1205, - [SMALL_STATE(46)] = 1224, + [SMALL_STATE(46)] = 1218, [SMALL_STATE(47)] = 1237, [SMALL_STATE(48)] = 1256, [SMALL_STATE(49)] = 1275, @@ -3497,43 +3501,43 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(60)] = 1484, [SMALL_STATE(61)] = 1503, [SMALL_STATE(62)] = 1519, - [SMALL_STATE(63)] = 1531, - [SMALL_STATE(64)] = 1543, - [SMALL_STATE(65)] = 1555, - [SMALL_STATE(66)] = 1571, - [SMALL_STATE(67)] = 1587, + [SMALL_STATE(63)] = 1535, + [SMALL_STATE(64)] = 1551, + [SMALL_STATE(65)] = 1563, + [SMALL_STATE(66)] = 1575, + [SMALL_STATE(67)] = 1591, [SMALL_STATE(68)] = 1603, [SMALL_STATE(69)] = 1615, [SMALL_STATE(70)] = 1629, - [SMALL_STATE(71)] = 1643, - [SMALL_STATE(72)] = 1655, + [SMALL_STATE(71)] = 1641, + [SMALL_STATE(72)] = 1653, [SMALL_STATE(73)] = 1667, [SMALL_STATE(74)] = 1679, [SMALL_STATE(75)] = 1693, - [SMALL_STATE(76)] = 1704, + [SMALL_STATE(76)] = 1700, [SMALL_STATE(77)] = 1711, [SMALL_STATE(78)] = 1722, [SMALL_STATE(79)] = 1733, - [SMALL_STATE(80)] = 1743, - [SMALL_STATE(81)] = 1753, - [SMALL_STATE(82)] = 1763, - [SMALL_STATE(83)] = 1773, - [SMALL_STATE(84)] = 1781, - [SMALL_STATE(85)] = 1791, - [SMALL_STATE(86)] = 1797, - [SMALL_STATE(87)] = 1807, - [SMALL_STATE(88)] = 1817, - [SMALL_STATE(89)] = 1827, - [SMALL_STATE(90)] = 1835, - [SMALL_STATE(91)] = 1845, - [SMALL_STATE(92)] = 1855, - [SMALL_STATE(93)] = 1861, - [SMALL_STATE(94)] = 1871, - [SMALL_STATE(95)] = 1881, - [SMALL_STATE(96)] = 1887, - [SMALL_STATE(97)] = 1893, - [SMALL_STATE(98)] = 1899, - [SMALL_STATE(99)] = 1905, + [SMALL_STATE(80)] = 1741, + [SMALL_STATE(81)] = 1747, + [SMALL_STATE(82)] = 1753, + [SMALL_STATE(83)] = 1763, + [SMALL_STATE(84)] = 1769, + [SMALL_STATE(85)] = 1777, + [SMALL_STATE(86)] = 1787, + [SMALL_STATE(87)] = 1797, + [SMALL_STATE(88)] = 1807, + [SMALL_STATE(89)] = 1817, + [SMALL_STATE(90)] = 1823, + [SMALL_STATE(91)] = 1829, + [SMALL_STATE(92)] = 1835, + [SMALL_STATE(93)] = 1845, + [SMALL_STATE(94)] = 1855, + [SMALL_STATE(95)] = 1865, + [SMALL_STATE(96)] = 1875, + [SMALL_STATE(97)] = 1885, + [SMALL_STATE(98)] = 1891, + [SMALL_STATE(99)] = 1901, [SMALL_STATE(100)] = 1911, [SMALL_STATE(101)] = 1918, [SMALL_STATE(102)] = 1922, @@ -3559,213 +3563,213 @@ 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_file, 0, 0, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [25] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), - [27] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(54), - [30] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(37), - [33] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(15), - [36] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(37), - [39] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(22), - [42] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(67), - [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(118), - [48] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(77), - [51] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(7), - [54] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(2), - [57] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file, 1, 0, 0), - [59] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), - [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__attr_list, 3, 0, 0), - [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_macro_def, 4, 0, 9), - [73] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [75] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), - [77] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [25] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file, 1, 0, 0), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), + [31] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(49), + [34] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(37), + [37] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(16), + [40] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(37), + [43] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(14), + [46] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(66), + [49] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(112), + [52] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(76), + [55] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(7), + [58] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2, 0, 0), SHIFT_REPEAT(3), + [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_macro_def, 4, 0, 9), + [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__attr_list, 3, 0, 0), + [73] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [75] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [77] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), - [89] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [91] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), - [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), - [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(72), - [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), - [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [103] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(36), - [106] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(32), - [109] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(14), - [112] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), - [114] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(33), - [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), - [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [125] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__quoted_pattern, 2, 0, 0), SHIFT_REPEAT(16), + [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [89] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [95] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [101] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), + [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [125] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__quoted_pattern, 2, 0, 0), SHIFT_REPEAT(17), [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__quoted_pattern, 2, 0, 0), - [130] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__quoted_pattern, 2, 0, 0), SHIFT_REPEAT(16), + [130] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__quoted_pattern, 2, 0, 0), SHIFT_REPEAT(17), [133] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__quoted_pattern, 2, 0, 0), SHIFT_REPEAT(30), [136] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__quoted_pattern, 2, 0, 0), SHIFT_REPEAT(30), - [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), - [147] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), - [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__line, 3, 0, 0), - [167] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__line, 3, 0, 0), - [169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__line, 2, 0, 0), - [173] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__line, 2, 0, 0), - [175] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), - [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [181] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), - [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [185] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), - [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [143] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(35), + [146] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(36), + [149] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(20), + [152] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), + [154] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_range_notation_repeat1, 2, 0, 0), SHIFT_REPEAT(32), + [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__line, 2, 0, 0), + [165] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__line, 2, 0, 0), + [167] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__line, 3, 0, 0), + [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__line, 3, 0, 0), + [179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [181] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12), + [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [185] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), + [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), [189] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ansi_c_escape, 1, 0, 0), [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ansi_c_escape, 1, 0, 0), - [193] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 1), - [203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [205] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 1, 0, 0), + [193] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), + [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 0), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_range_notation_repeat1, 1, 0, 0), + [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), [207] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_range_notation_repeat1, 1, 0, 0), - [209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 4), + [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_range, 3, 0, 0), + [211] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_range, 3, 0, 0), [213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 0), - [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 1), + [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 1, 0, 0), - [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_range, 3, 0, 0), - [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_range, 3, 0, 0), - [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 10), - [227] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(40), - [230] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(40), - [233] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(22), - [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), - [238] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(41), - [241] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(41), - [244] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(20), - [247] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [253] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), - [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), - [259] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 16), - [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), - [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 5, 0, 20), - [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), - [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 7), - [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), - [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), - [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 5), - [283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), - [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 2), - [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 15), - [293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 13), - [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), - [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), - [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 11), - [301] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_range_notation, 3, 0, 0), - [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_range_notation, 3, 0, 0), + [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 4), + [225] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(39), + [228] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), + [230] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(39), + [233] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(21), + [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 10), + [238] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), + [240] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [242] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [244] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(42), + [247] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(42), + [250] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__pattern, 2, 0, 0), SHIFT_REPEAT(14), + [253] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [263] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 16), + [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 5, 0, 20), + [273] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 7), + [287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 11), + [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 5), + [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 13), + [293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 15), + [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 2), + [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), + [301] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), [305] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_range_notation, 4, 0, 0), [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_range_notation, 4, 0, 0), - [309] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [313] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [317] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(6), - [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__attr_list_repeat1, 2, 0, 0), - [322] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), - [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__attr_list, 2, 0, 0), - [326] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), - [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 1, 0, 0), - [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 2, 0, 18), - [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 2, 0, 17), - [334] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_macro_def, 3, 0, 9), - [338] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), - [340] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, 0, 0), - [342] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_builtin_attr, 1, 0, 0), - [344] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), - [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 1, 0, 0), + [309] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_range_notation, 3, 0, 0), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_range_notation, 3, 0, 0), + [313] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_macro_def, 3, 0, 9), + [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 2, 0, 17), + [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 2, 0, 18), + [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [329] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__attr_list, 2, 0, 0), + [331] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 1, 0, 0), + [333] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(6), + [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__attr_list_repeat1, 2, 0, 0), + [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_builtin_attr, 1, 0, 0), + [340] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [342] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 1, 0, 0), + [344] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), + [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, 0, 0), [348] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_comment_repeat1, 2, 0, 0), SHIFT_REPEAT(78), [351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_comment_repeat1, 2, 0, 0), - [353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), - [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), - [359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [365] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 12), SHIFT_REPEAT(61), - [368] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 12), - [370] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 2, 0, 0), - [374] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), - [376] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [378] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [380] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 6), - [382] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 12), SHIFT_REPEAT(66), - [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 8), - [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 3), - [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [397] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 14), - [399] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 3, 0, 24), - [401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 3, 0, 25), - [403] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__attr_value, 2, 0, 0), - [405] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 1, 0, 0), - [407] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), - [409] = {.entry = {.count = 1, .reusable = false}}, SHIFT(98), - [411] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 5), + [353] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 1, 0, 0), + [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [357] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 2, 0, 3), + [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 2, 0, 0), + [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [373] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 12), SHIFT_REPEAT(63), + [376] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 12), + [378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 3, 0, 25), + [380] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__attr_value, 2, 0, 0), + [382] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [384] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 4, 0, 14), + [386] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [388] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 6), + [390] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [392] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 3, 0, 8), + [394] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [396] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [398] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefixed_attr, 3, 0, 24), + [400] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_pattern_repeat1, 2, 0, 12), SHIFT_REPEAT(61), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [407] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), + [409] = {.entry = {.count = 1, .reusable = false}}, SHIFT(91), + [411] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 0), [413] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 6, 0, 26), [415] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 6, 0, 27), [417] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 13), [419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 6, 0, 28), [421] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 6, 0, 20), [423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 7, 0, 29), - [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 15), - [427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 14), - [429] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 0), - [431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 23), - [433] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 22), - [435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 21), - [437] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 3, 0, 0), - [439] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [441] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 6), - [443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 4), - [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 14), + [427] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [429] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 15), + [431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 6), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 3, 0, 0), + [437] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 4), + [439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 22), + [441] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 23), + [443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 5, 0, 21), + [445] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_pattern, 4, 0, 5), }; #ifdef __cplusplus @@ -3781,7 +3785,7 @@ extern "C" { TS_PUBLIC const TSLanguage *tree_sitter_gitattributes(void) { static const TSLanguage language = { - .version = LANGUAGE_VERSION, + .abi_version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT, .alias_count = ALIAS_COUNT, .token_count = TOKEN_COUNT, @@ -3803,7 +3807,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_gitattributes(void) { .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_modes = (const void*)ts_lex_modes, .lex_fn = ts_lex, .keyword_lex_fn = ts_lex_keywords, .keyword_capture_token = sym_attr_name, diff --git a/src/tree_sitter/array.h b/src/tree_sitter/array.h index 15a3b23..a17a574 100644 --- a/src/tree_sitter/array.h +++ b/src/tree_sitter/array.h @@ -14,6 +14,7 @@ extern "C" { #include #ifdef _MSC_VER +#pragma warning(push) #pragma warning(disable : 4101) #elif defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic push @@ -278,7 +279,7 @@ static inline void _array__splice(Array *self, size_t element_size, #define _compare_int(a, b) ((int)*(a) - (int)(b)) #ifdef _MSC_VER -#pragma warning(default : 4101) +#pragma warning(pop) #elif defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop #endif diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h index 799f599..858107d 100644 --- a/src/tree_sitter/parser.h +++ b/src/tree_sitter/parser.h @@ -18,6 +18,11 @@ typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; +typedef struct TSLanguageMetadata { + uint8_t major_version; + uint8_t minor_version; + uint8_t patch_version; +} TSLanguageMetadata; #endif typedef struct { @@ -26,10 +31,11 @@ typedef struct { bool inherited; } TSFieldMapEntry; +// Used to index the field and supertype maps. typedef struct { uint16_t index; uint16_t length; -} TSFieldMapSlice; +} TSMapSlice; typedef struct { bool visible; @@ -79,6 +85,12 @@ typedef struct { uint16_t external_lex_state; } TSLexMode; +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; + uint16_t reserved_word_set_id; +} TSLexerMode; + typedef union { TSParseAction action; struct { @@ -93,7 +105,7 @@ typedef struct { } TSCharacterRange; struct TSLanguage { - uint32_t version; + uint32_t abi_version; uint32_t symbol_count; uint32_t alias_count; uint32_t token_count; @@ -109,13 +121,13 @@ struct TSLanguage { const TSParseActionEntry *parse_actions; const char * const *symbol_names; const char * const *field_names; - const TSFieldMapSlice *field_map_slices; + const TSMapSlice *field_map_slices; const TSFieldMapEntry *field_map_entries; const TSSymbolMetadata *symbol_metadata; const TSSymbol *public_symbol_map; const uint16_t *alias_map; const TSSymbol *alias_sequences; - const TSLexMode *lex_modes; + const TSLexerMode *lex_modes; bool (*lex_fn)(TSLexer *, TSStateId); bool (*keyword_lex_fn)(TSLexer *, TSStateId); TSSymbol keyword_capture_token; @@ -129,15 +141,23 @@ struct TSLanguage { void (*deserialize)(void *, const char *, unsigned); } external_scanner; const TSStateId *primary_state_ids; + const char *name; + const TSSymbol *reserved_words; + uint16_t max_reserved_word_set_size; + uint32_t supertype_count; + const TSSymbol *supertype_symbols; + const TSMapSlice *supertype_map_slices; + const TSSymbol *supertype_map_entries; + TSLanguageMetadata metadata; }; -static inline bool set_contains(TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { +static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { uint32_t index = 0; uint32_t size = len - index; while (size > 1) { uint32_t half_size = size / 2; uint32_t mid_index = index + half_size; - TSCharacterRange *range = &ranges[mid_index]; + const TSCharacterRange *range = &ranges[mid_index]; if (lookahead >= range->start && lookahead <= range->end) { return true; } else if (lookahead > range->end) { @@ -145,7 +165,7 @@ static inline bool set_contains(TSCharacterRange *ranges, uint32_t len, int32_t } size -= half_size; } - TSCharacterRange *range = &ranges[index]; + const TSCharacterRange *range = &ranges[index]; return (lookahead >= range->start && lookahead <= range->end); } diff --git a/tree-sitter.json b/tree-sitter.json index a1afb20..f5c8bda 100644 --- a/tree-sitter.json +++ b/tree-sitter.json @@ -4,12 +4,14 @@ "name": "gitattributes", "path": ".", "camelcase": "GitAttributes", + "title": "gitattributes", "scope": "source.gitattributes", "highlights": "queries/highlights.scm", "file-types": [ "gitattributes", ".gitattributes" - ] + ], + "class-name": "TreeSitterGitAttributes" } ], "metadata": {