Skip to main content

Tree-sitter grammar for Yarn Spinner

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.7.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.7-cp310-abi3-win_arm64.whl (22.6 kB view details)

Uploaded CPython 3.10+Windows ARM64

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

Uploaded CPython 3.10+Windows x86-64

tree_sitter_yarn_spinner-0.0.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7-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.7.tar.gz.

File metadata

  • Download URL: tree_sitter_yarn_spinner-0.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 7672ce26f3998cba8a40c8972692c8ff5b023febf1b17057596eda966ad8d42a
MD5 95cabd16ab76810a59d7ed8ceda7907b
BLAKE2b-256 d60c3714ed9d736eef5fc9db1675c95b409f5117d15dcc54bac03f7354319c0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7.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.7-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 8575ae7709569c97bec873ec3c810ff57cab9459aa059035c0913ce6d4c11602
MD5 eb6fef5c9a2724da421f7e2ab26d64fc
BLAKE2b-256 4d3089b95ebd0d5742499e46562694549cdabab4a3a5fc25f360a51cb5360e5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0b25998539abca8ea8c18eb536a82c8249ef4ba60b43a942506e84ff37b87bf5
MD5 91c32b690e300f706f8dc4ad807cf029
BLAKE2b-256 2155ca91269be730f63d3d8e3b3bf83057153f0c7a2b15110e16d0e15869c126

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9229517fa6702486d47986194b9b55685a76408ca4b2016a9326be2339316271
MD5 c22815efe4eb5df30b9e2dacb9a8d265
BLAKE2b-256 cb2e3f8f00701086bd17136a8fe9ff64d07336885c0b719959a3fecaed27cf24

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-cp310-abi3-musllinux_1_2_s390x.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-musllinux_1_2_s390x.whl
Algorithm Hash digest
SHA256 7c4fe86b3f696d1125651162faa4690c184f45d0e9d7cae7f7e61ee8d28d55e3
MD5 bfd8a9219527ff83298024da886e6f43
BLAKE2b-256 5a8c78c9bd08a943770cf6249bfcf0945e6eb2314a622a52132169bb245039ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-cp310-abi3-musllinux_1_2_ppc64le.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 08d8c3a8baa36f2f9b3d991a21a552853a1f339a9bc8df9bebfe58a5eb4f8e0a
MD5 4557a35f1cb27a04c3e69625132901b3
BLAKE2b-256 180a7dfc79b223047d887d2307dbe38f5c5ebefb5bc79473d872682d10d00eaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 bdefc375320dbd91e415eae217626d907934b1ffd5851121913eb28a1a9bc0f7
MD5 8e2fb6077370619dcb4b4134fafd80c3
BLAKE2b-256 5e44a2c694f0d4075c8e1eb5f42434fc50d4b2fd35b689e7e05dcb58610e1786

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-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.7-cp310-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl
Algorithm Hash digest
SHA256 8b2578101e5962ea5387011fabada7e289072fb0629aff5d250ee6005b9c9270
MD5 0f39e9a871f964f749dbbdc53e26c951
BLAKE2b-256 6e15a2dd10b4336c14f31fe5a1e6c3b79bab6aebb49ced121047d1ac2c3a3eb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-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.7-cp310-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 1fb19b28a43a3c309029abf90d18c34a366c29baf4ec3e6404a6a08209e78558
MD5 afe623f3ffc86d6c3ea68135fb92a106
BLAKE2b-256 683ae68874d70860062a44dd3cb6038fe48d9d53f3174b7f48385936fb9eaac3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-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.7-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cc73ff4e6979dbdf10dcc6ad26bd4d029d3e6969e3c03c7a8c98f4a6398f19c5
MD5 42134af082180ee259338ac1e4b37b82
BLAKE2b-256 fe7174ccf811d930b7a4fadcd187f375b1cef18bab4fb5f2f2858380fb859598

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-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.7-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c1ae93022321397f7f53df20c8ce5054f6d90283a7a6423e38c5d8e56fd58082
MD5 467d422ae9c02591e36ceb2cac229ced
BLAKE2b-256 d2d4414d9cea0196827c660a794b89423a72d52d2e303f7a248af305c7596fce

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8d6a8dc2d574fe98b34ce5151f9dffe489c7b55e8a0794fbc2338412070290d
MD5 9df65a3c1a9817fba9eeba56a6c5e1ad
BLAKE2b-256 ea91be7f05e71621bdc1f54838543df2a5c92cdc24a6055e8b13b0f7b3caad57

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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.7-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_yarn_spinner-0.0.7-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6df155a1d8cfcf1cd71124083d97a8c0f951a1ed1a1e89a4c8776fefab374428
MD5 94b804a57d71c8064335cabd05a509bc
BLAKE2b-256 2b9cd6635fc7302d8375d99e4b2559f8b7a03d656630f13df29b2b1f84957c8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_yarn_spinner-0.0.7-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