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

Uploaded CPython 3.9+Windows ARM64

tree_sitter_gram-0.2.2-cp39-abi3-win_amd64.whl (17.8 kB view details)

Uploaded CPython 3.9+Windows x86-64

tree_sitter_gram-0.2.2-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.2-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.2-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.2-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.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: tree_sitter_gram-0.2.2.tar.gz
  • Upload date:
  • Size: 19.6 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.2.tar.gz
Algorithm Hash digest
SHA256 571ea0009fc859c83ec9905cfe29d557ad7816f2856202b684114b99de264c49
MD5 ea5dd4a124c8a4a34748bb88f8990207
BLAKE2b-256 95f367a81ecf9dc03965d9f18beb0dc48e615a2e8dd13801966d8fa34e57d55c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.2-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 068500137d97e0cf836dfee94496baf1dd4892007f5b9fb0f6f485adc497b35d
MD5 fa1982242685299846e8f14df2f8850e
BLAKE2b-256 ca911c76dc2e43eede9e0160ffb555f011151a69e7ee8c2b5bbc5d0f05af407c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5040eb0340a303af004b6e5c808f538730d2cbe78ac87ffa1e775301605db2ba
MD5 e37388ace1f8fb6ff47be2c7bffca0ec
BLAKE2b-256 ebb21e300c77bda468782a5570d5bbd79c760bdde1b4105f7790cdb04f5528dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 17246b49e83b809f99dc506134ab1a12f53e330dd78dcc0c972d235295d5eb9b
MD5 f970ac42aeb14d09693be70d8959cfdb
BLAKE2b-256 7dec1f3b60dbfa6db65e46dcd37885f2a9f4f651cd9b63ce91f268830e1e61eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0592ad94b1ede74242cf41162117c9bd65663d1fa0c659dd58d7d7f91a854761
MD5 de7c5e2e56e0a7aeedafa6988f2ab440
BLAKE2b-256 ed9c46efc85661faf093a6662d85467b8a0950751191b20b8cf39774b1c22f07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c075146ea9f17405ddc96e6661faacdbb85a4753326651d62c568df9eefbac68
MD5 24487e847ea4c5231d5f18f85e3d26ec
BLAKE2b-256 febf581579bcac724a4caf876ae4f430a49afa18e3cb7595327bb208c9890405

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.2-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.2-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 77475b6e62e615d5257fa82838d774b2ae0520aaf475c61530938d2abffa78c0
MD5 5a7559f2c2b224c6ce242cde23ba8392
BLAKE2b-256 871339c7c38d70c821696a5eeaf17217597dc0a59391bf5a40f5bd518f6193cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a90800131d255859f3aa0ec6d15b01ff42eedb1abee0df1a647944737e981a84
MD5 80b6da9b0eefde627f3e2e757ce85d03
BLAKE2b-256 eee09600f930904e252ced5bd5ac3b72db20b24b91c7c4b1d59d46cc816dadb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.2-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f79f889e37290cecdb068b2748d681297499f2c1872df81ba05e060657b90e3c
MD5 fef1e15705de274ade303364553d87d4
BLAKE2b-256 436be25f48607dcc2a8c386310ce877e90cc80e1912403aa67ffe52bda294ef2

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