Skip to main content

Gram grammar for tree-sitter

Project description

tree-sitter-gram

A tree-sitter grammar for gram notation.

Gram is a subject-based notation for structured data.

If this is an object:

{
  "name":"Andreas",
  "roles":["author"]
}

Implicitly the object is a person. To become a subject, the implicit information can be explicit.

As a subject:

(:Person {
  name: "Andreas",
  roles: ["author"]
})

Gram files support comments using // syntax for line-based and end-of-line comments:

// This is a line comment
(hello)-->(world)  // End-of-line comment

Learn more about gram at the gram-data github org notation.

Editor Support

This repository includes editor integrations for syntax highlighting and language support:

  • Zed Editor - Full syntax highlighting and language support
  • More editors coming soon! Contributions welcome.

See editors/README.md for installation instructions and available features.

Language Bindings

Tree-sitter bindings are available for multiple languages:

  • Node.js: npm install @gram-data/tree-sitter-gram
  • Rust: Available via Cargo.toml
  • Python: Install via pip install .
  • Go: Import from this repository
  • Swift: Available via Swift Package Manager
  • C: Build with included Makefile

Development

Generate the parser after grammar changes:

npx tree-sitter generate
npx tree-sitter test

Run language binding tests:

npm test                    # Node.js bindings
cargo test                  # Rust bindings
python -m pytest           # Python bindings
make test                   # C bindings

See DEVELOP.md for detailed development guidelines.

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_gram-0.2.5.tar.gz (19.5 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_gram-0.2.5-cp39-abi3-win_arm64.whl (16.6 kB view details)

Uploaded CPython 3.9+Windows ARM64

tree_sitter_gram-0.2.5-cp39-abi3-win_amd64.whl (17.7 kB view details)

Uploaded CPython 3.9+Windows x86-64

tree_sitter_gram-0.2.5-cp39-abi3-musllinux_1_2_x86_64.whl (27.9 kB view details)

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

tree_sitter_gram-0.2.5-cp39-abi3-musllinux_1_2_aarch64.whl (28.8 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

tree_sitter_gram-0.2.5-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (29.8 kB view details)

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

tree_sitter_gram-0.2.5-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (28.1 kB view details)

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

tree_sitter_gram-0.2.5-cp39-abi3-macosx_11_0_arm64.whl (16.2 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

tree_sitter_gram-0.2.5-cp39-abi3-macosx_10_9_x86_64.whl (15.8 kB view details)

Uploaded CPython 3.9+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_gram-0.2.5.tar.gz.

File metadata

  • Download URL: tree_sitter_gram-0.2.5.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tree_sitter_gram-0.2.5.tar.gz
Algorithm Hash digest
SHA256 32367ece10f0e15b84c3e2c3e0725cbeed62d2f01d8e56a6076b97b9c1a4dc89
MD5 0c8ed3624359a0f5bacbd1bf3a43dc50
BLAKE2b-256 0c045110b14f81fbf92364bf6ea964b22401c7c98a94633cab360f18ed5e1e6a

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 2ddc271a6b95005de4b70593c48794104d716f653db6b0f38668564d5bb7177f
MD5 fddbdb97e52cca78db3fceaba4950ce7
BLAKE2b-256 11327f92ddc7679f13fd17564310330cc364b310e80587167f33df666d478144

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a164e0c5c68fc0c0dddeede0fbfda832b70da00f325df865cbc29fbd9037c7ef
MD5 0d98001d281db280d45c109dfaf957ec
BLAKE2b-256 641214561445a6687dfb24334df3f7dd255e79ea68405b643eac7c5df71a3d93

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b1676900614dd7e3a5ee77c2303dc24b5d19eb2cc00b3b7551c9437740f5cd28
MD5 19b0272dcec975568172543b25b2e7f3
BLAKE2b-256 fac3580982a8f111cacbefd081b059f1b6be0581262abbaf3e526d9bb9fbe5b3

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f757d9baad358638bc6bd72f33a4e9ad8a92b4104b2abc1462b854d793dd72f5
MD5 ea11be15d0ed9fd8b76fbd5b72931dab
BLAKE2b-256 047e8123ad182daca7887efb602069251155a999925207a1416317bb16193155

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d9414aaaed117510476e153a2b0093ed46de37e9579ae5ff939c224dad7f14db
MD5 f72f3b9407f8db94a01f420d7115db36
BLAKE2b-256 aa003e6b2dc80306399378210b50e26d20ac1b966ba4ce00a336898b714a1dd3

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f1522275455f69d266867140cff312c7ea7ca1c3f9fcbd8a98b0f7e02e758201
MD5 7ae09c1d036dae6dd11a17a2b8862ff9
BLAKE2b-256 495053a04924eb3cab85b4ec96101630813e4c4a8433428db38fcac67a71627e

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76e81bbbcb7ace46575cb1fb08c5ad581d3f9780c519e828e1e3db7fdb577c49
MD5 2a0d817585e7858c2099dae34e61c405
BLAKE2b-256 fcf7aeb1a0aaf20570556a49c74e80ece7b7f9fd202d729e60e48932a570e2f3

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.5-cp39-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.5-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ea992e3316e54cce4315109bf7a7388d0ea6d7a0ade746a0515f52de9d72e824
MD5 5431f3c17d0ab46ab6f62105b3e2e0fb
BLAKE2b-256 2af11050e740ddf55ba379ffdaabdd5c8197bdb06fc820bdc7b0043c7e700fce

See more details on using hashes here.

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