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

Uploaded CPython 3.9+Windows ARM64

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

Uploaded CPython 3.9+Windows x86-64

tree_sitter_gram-0.2.1-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.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: tree_sitter_gram-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6811c33a746cdb192ebba18f9d54940d41a2c96d66a3e08c3af3bbda75140b77
MD5 3086d8fa83c2f704946ac762641edb2f
BLAKE2b-256 f18dd5bf1ed9cad87972b15f660640e5c4563c87982a709b5e52530d66fd61b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.1-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 0d1e420c5f0d89205970afea97526c9cfc2b5b7ff20faf7d690c6a3f58599b8a
MD5 c64488f475b762f261d86f04bd090a81
BLAKE2b-256 5067a2d84dbac46b5ae90688e14e3c264fdb5c166b9e68cebf041ae380930635

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.1-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4c6cb9d9e54ec89545658299b270298a077988e271ca56f1ed1fdf42fa5354bb
MD5 44e3f41e3527a416b2fef73383c7dab8
BLAKE2b-256 f1b614b1f60c7f9b11ec7df895227843a325fff73b66f2c74d6503200793cb00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 62ea2f8474ed5b484f74e3b1314a5a10d5756ae93e643785fb475df5f776fb98
MD5 f617bcbff489151a4b5d19de781eedc9
BLAKE2b-256 721abfcc2f58dbd31b32b2f7c7973e4e87fa93306c47ce581fbee4a2304bb19a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 51cc2b4b462b9d7d0611e3e9842efadf17d229c8698c849d9251b15d82ca98a4
MD5 6f9d6d87f208898f2b89f02cb6da991a
BLAKE2b-256 79f09f34696536042882646adff2600b1a96922c8f8ed3689cc2f33a595cea3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6e702071c256e85ab32a1d0903de64ff92099f297281fcf51f45112722a8ddda
MD5 c16dea3ed2765ae03df5336c85e3fef0
BLAKE2b-256 203b0f6b2615553dcd4f436e465c3a293ffd5c9aa133c4dc06de098637211c26

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.1-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.1-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 49036778b97a045daf27599182917832d49d213926b2164dd2d01a8420d3d319
MD5 6b24119a945760ff945607d20f2400df
BLAKE2b-256 23bcb7dc6eb45a7079d73413f1fa6ec570ce5a0677f2f21f638be6dc41b1cb43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a23f9e0c98b4758481d1fafa34b00151c787a22f9f001e9010f7c283e9647cd3
MD5 d9867d15d81ab84597427f6cb708516e
BLAKE2b-256 8e07bc1e314715374270192771bdd31d9bebe30d281f9c08314b90853d3eb9c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.1-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4cbba8a8f03ce913f5732b7362d28927159c30e9f308c5554062561aa552c780
MD5 0f4d72eb734dde2126d52d6eb6c352cf
BLAKE2b-256 116b6d4ffb230cf157a1568fbfeaa5caf5f1311b4274a873a8266eb506647e9a

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