Skip to main content

Yarn Spinner grammar for tree-sitter

Project description

tree-sitter-yarn-spinner

A tree-sitter grammar for Yarn Spinner, a dialogue system for interactive fiction and games.

⚠️ This tree-sitter parser is in early development and might have incomplete or incorrect grammar rules.

The grammar rules are based on the Yarn Spinner ANTLR 4 grammar files YarnSpinnerLexer.g4 and YarnSpinnerParser.g4 from the Yarn Spinner repository.

The grammar file in this repository is grammar.js with the external scanner in src/scanner.c and a generated src/grammar.json file.

Bindings

This parser can be used with various programming languages that support tree-sitter. Here are some examples:

Rust:

cargo add tree-sitter-yarn-spinner

JavaScript / TypeScript / Node.js:

pnpm install tree-sitter-yarn-spinner

Python:

uv add tree-sitter-yarn-spinner

Build

To build the parser, you need to have a JavaScript runtime like Node.js and a C compiler (like gcc, clang, or MSVC on Windows) installed.

Then, run the following command in the root directory of this repository, to install dependencies and generate the parser:

pnpm install
tree-sitter generate

To test the parser, you can run:

tree-sitter parse YOUR_FILE.yarn

Details can be found in the tree-sitter documentation.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_yarn_spinner-0.0.6.tar.gz (38.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_arm64.whl (22.6 kB view details)

Uploaded CPython 3.10+Windows ARM64

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_amd64.whl (23.9 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl (43.6 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_s390x.whl (46.7 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ s390x

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_ppc64le.whl (45.5 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ppc64le

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl (44.7 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl (47.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390xmanylinux: glibc 2.28+ s390x

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl (46.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64lemanylinux: glibc 2.28+ ppc64le

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (46.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (44.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_11_0_arm64.whl (22.3 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_10_9_x86_64.whl (21.8 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_yarn_spinner-0.0.6.tar.gz.

File metadata

  • Download URL: tree_sitter_yarn_spinner-0.0.6.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7db8ffc87513238bbebc925ce69bb82a941dde31f581202d90f1bb4fe7fc4975
MD5 708619e058ccaf110df95631033af60f
BLAKE2b-256 343bb3f9d05a639f591eb66d16f5358e5d61279407b6f44555108fc1fb6791a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6.tar.gz:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c2fb9de44909a8baa65461177e53aac43db4519f6d393a74038de1daeb8b9e82
MD5 8f9b08af7644c2bbbfe6baebe6ff2c78
BLAKE2b-256 b75fdace09b54663a672d229fcbf2463e1168e02e900cf91c4ba8b59255dabb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_arm64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5f94b1309df55ec765c19c2993b2fbac110ac2ba4e2610844eba89f627c5be5e
MD5 f98a5d387b894a667386d97eabf13d64
BLAKE2b-256 7b9d41f5da548594f45988eed90b711437bea6c8e048961019e9bfd1407b27b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-win_amd64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ce2d80a7fa040d00f2e063d8253dfa6fa219b790d771cde362c3b6f6e50b39b5
MD5 9b8ac4ce1ce4b60a1b6dbde96c93e991
BLAKE2b-256 a39ddba455111c7aad6bb829d5b81767a3e2eafc8e7f8996879c118c17d7feb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_s390x.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 39bd8957d614568bc4fe5c8792210b5ea2561e0d82bafa29833829bbc033e54d
MD5 bbc0b9c7adc39ca1e4649d19d27d7b83
BLAKE2b-256 d61590a1aff134bf3538245d083cd68ec01f9a8548b43ca265f667e76c43f8f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_s390x.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_ppc64le.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 604ecf7dceabac441d5331c231e0ae1f85dd3940abc07c0e7034d8e70d06724e
MD5 f88f94e72b1a0b0be7bfbedad5751bec
BLAKE2b-256 e92b11a46e43a879867afa4c95c3fe092cd698873484fbf97aa64d84ef911685

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_ppc64le.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1d38a080797fcacfbb8514af8aa87e9a745886709ab1fc19c27f0b6c0176ec05
MD5 c862947f615d80ad59e346bba28e04b9
BLAKE2b-256 9a25bc83a2884bcc61678600c1448f828c196ef4cbb6295a926d8d772b8af82f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 2c85798ed3da99ae5b597ac3f29e0d8d389033e8211fc1e8c3114975f2e39c11
MD5 50a29d8ff34ab622ad75098593d5038b
BLAKE2b-256 222d1d96ee3a584e20a2697497fb93dcca74079ad4fa665cb6654154ed3709da

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 58a3e6739b5906a7ccf6a76d32650425716162d17b1bbd8a80102517961a4148
MD5 22b03f7e3161f9932cceff15cb0e92f4
BLAKE2b-256 179deababb91111ca70d86e55483f861eef5cfb1e2a5a68dd80c063ddf172598

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d327e073b22ac6f9b37e6bbd5845f8298a73cb1e8946654d1bb98212896730e4
MD5 e17eac64d5a572c4bc2f1059ebc2235a
BLAKE2b-256 d1764c9bf68e93ce4ef14763627b3f57f915fb7b82d5131f1774066f70e6c9b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9a278c7062edbaf90008c35ddf8b7d6478410d8472b8df1083395c09b3353648
MD5 c633a72e3830f34cbbabd6c79e008cf0
BLAKE2b-256 4d06601c3843b72f66c3daef628a22b66d04d503e1a931afaa141bd4da30e816

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5f50799c76c6465dbc254e5d83643a9c8dda6b23d84bb3f8b92f810b6ad4e511
MD5 7b4a8e99a033ac07093bd9c0e6b25dd5
BLAKE2b-256 ff5581f5dddbe24031977fcb9b56a19f28e7856ed6c78d13ce6e7c31e43d9efd

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c4ab061d335c4a4ba3c4ab35fd3598422041e2bfe02bdf7c144d83d64d671783
MD5 c66de1a507d1d2cc17a845eb2b6de33c
BLAKE2b-256 4ef2098758d42ffcecc58eb4073cc5b52438f255c30943710c181fd0ab61b3cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.6-cp310-abi3-macosx_10_9_x86_64.whl:

Publisher: pypi-publish.yml on yuna0x0/tree-sitter-yarn-spinner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page