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.6.tar.gz (18.1 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.6-cp39-abi3-win_arm64.whl (16.0 kB view details)

Uploaded CPython 3.9+Windows ARM64

tree_sitter_gram-0.2.6-cp39-abi3-win_amd64.whl (17.1 kB view details)

Uploaded CPython 3.9+Windows x86-64

tree_sitter_gram-0.2.6-cp39-abi3-musllinux_1_2_x86_64.whl (27.3 kB view details)

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

tree_sitter_gram-0.2.6-cp39-abi3-musllinux_1_2_aarch64.whl (28.1 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

tree_sitter_gram-0.2.6-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (29.1 kB view details)

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

tree_sitter_gram-0.2.6-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (27.5 kB view details)

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

tree_sitter_gram-0.2.6-cp39-abi3-macosx_11_0_arm64.whl (15.5 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

tree_sitter_gram-0.2.6-cp39-abi3-macosx_10_9_x86_64.whl (15.2 kB view details)

Uploaded CPython 3.9+macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: tree_sitter_gram-0.2.6.tar.gz
  • Upload date:
  • Size: 18.1 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.6.tar.gz
Algorithm Hash digest
SHA256 d29efab51ec8510fd84bd5ec04907fd2a58b2c9e0fda9364ac3bc6bcd1b33341
MD5 c55444e3f228cd4aa833776b7e8cbb52
BLAKE2b-256 357feb08e4330794913e4635e99c9b75d2baefbaa25514a295cf944092088b90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.6-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 fd5d3e889f58aa7250493b4cdbfe84524727ca809f29800994f9ce85c2ab8137
MD5 d432dbe39e64725a11a21335c6d0b636
BLAKE2b-256 cf1030ccbd892b70d74d0e082a8f2fd5205d85cfcb5899a13a26b4e443c53fd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.6-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 71c567adf35e60e7c40104ec5c6294385433299ec522bab09c0f241ad433c9d5
MD5 4969070d94f0f23288c4e86a0d0f42f9
BLAKE2b-256 8122e5d99ff9c8cb673a83ea640d5e5a58ed00e7f8efcabfc08d3c9b658e86fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.6-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b420d14e5516437de53f86488f4624a267e4054c419802710a70a15645904e71
MD5 02cac99aad1ed8f2a2705c79b6987ce6
BLAKE2b-256 cf31c13eb0c413e3099db349ef6f43f5a19dd8d6d38dbe99fe9b8225502336e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.6-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0507ef6b986b91521e09090a3220006ce97b8cd4c83606290bd5429ad8cf7877
MD5 e5ca62e48afe2fed45ed5cbc83684a51
BLAKE2b-256 4fb3b01232d6a02b13490d86916311bb0656489fc8e87084457986d4c4634e4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.6-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fe4f638900c145be2aa1c4621c79e15b6f5c21936a9481e531dac7fb3d269af4
MD5 1f35a3deb2d1779b6d0721d3f2e9ba1a
BLAKE2b-256 e631a43346b005e92a5260280533ed6073b9785b3658e4b0b4ed47eb9a2c749b

See more details on using hashes here.

File details

Details for the file tree_sitter_gram-0.2.6-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.6-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c7467dc29ac4c249bb469766483f68ddf0375fe712d6d87b27f788e89d137d21
MD5 93761f6ecf80017fb8394e9fdb9681a6
BLAKE2b-256 ddc286deeb9e7356842d274975b0bc2b54d8e8add0f52e89d6eac67346cec440

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.6-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 677a439695b89e463b9712d452f240dba210fe51ce8e2184fca126621d2e5e39
MD5 fe7ac0830a9f578c7050c6104f8fc690
BLAKE2b-256 08985badc42957362fafb17d8df300d6280896e78e6a8b3c1a9eb54e84c02e4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_gram-0.2.6-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1d231bc9f0dd74926fb90d44321d6161dccba14c2b51d1e60a044ceeb03d6e60
MD5 972958125ff300b4cc167ae2369a2d93
BLAKE2b-256 8f40355c2fb2a78ecc3ce7413d46f8d11c555390360c2fec695efe5bae480de0

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