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.4.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.4-cp39-abi3-win_arm64.whl (16.6 kB view details)

Uploaded CPython 3.9+Windows ARM64

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

Uploaded CPython 3.9+Windows x86-64

tree_sitter_gram-0.2.4-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.4-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.4-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.4-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (28.0 kB view details)

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

tree_sitter_gram-0.2.4-cp39-abi3-macosx_11_0_arm64.whl (16.1 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

tree_sitter_gram-0.2.4-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.4.tar.gz.

File metadata

  • Download URL: tree_sitter_gram-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 346a140b4e80cf48075fe125bb3061ed7f2c5133ab9001f4312e9a8408683c17
MD5 8ea9c9104185f066399ef729a1396702
BLAKE2b-256 ad812514d9a01fb51742875269208ed1e9c6394061b1591463323f1381655350

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.4-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 8d2396683ab295c6ef276b20b9112a1d4300285315db39b71065d65dd6cd039a
MD5 32863ec0a5aca7ed7b370892431621c9
BLAKE2b-256 e6d79c589fd65911242932b23f9f6887106dab076e05d5504f34511fec5433bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b466c80edf4ab95e5284ecc57a743d0b88b608567231ef164431a91d9421b846
MD5 a3dd8b63abb92e310a8c788948b6a436
BLAKE2b-256 9a36fa0f6eb7224ff50c3880a1c4a35d62e10ede289ec6a2401c66f5c7f4eb18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.4-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7571d4b61bcd04a5b6eb7da2c836a300c46d421be2d4a244ba4ab320137345f4
MD5 0c2113986e8c79cb9a8686497708f4e5
BLAKE2b-256 20cba1a1caa92fbdcabe26582daf8234bec184f0b56a5113b74999d26cd5c28f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.4-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 26f2d8c345e1d9738c8aa589c675aa0a97bb019d841dd4c4ea13cbe04e829780
MD5 0e1f5f4f7eb232a7a0b562e70367d087
BLAKE2b-256 f4ca1071db2d657d7a99a33014bf24e348df0293db11a8248de2a03db756dd79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.4-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d20c2e77af02d011cdc01df59b38c08eb37ac689159317382b4aba95d371fa24
MD5 c8cec476d97495a5a0687e43e32e491e
BLAKE2b-256 aefdc7df8ec0cc6cf12ee90d871c6d81d89cc37c1225cea88d71c4033e077309

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.4-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.4-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fc3987e6712952b8b510e8f15d0d167fddf3802b3c1d114c2957c3a803a4142f
MD5 72a587df7e8f3e1f016ca32d8be55288
BLAKE2b-256 2fa8eba5092f8468a95b03a3e024cec5121b192cd4f0c68188b9d9af42396bed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.4-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dafd317f25e727805f1c3425d557706084becb077710dad744c6e9fb3a25a56f
MD5 3228b2be955c7a896dad0f0df91236a7
BLAKE2b-256 3d1cf0249eb6831b8d4fddc03c347c43d80982c1ba9fa2330d9e22bcd10efe78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.4-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a8e8f71bd66adcf6501895e55fa2b305d844988afc07599eeb53b0f6083fee5b
MD5 bb50d1688e0be248a6f704b843d1248e
BLAKE2b-256 7e8fda8581c4d1552a5ce88cf437663c93b1a58ad4b60fea5a6e1315580f867e

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