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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tree_sitter_gram-0.2.3.tar.gz.
File metadata
- Download URL: tree_sitter_gram-0.2.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5526fbac05a67cf20418cf6e87958f2367576bde1d466f7a3e392d39c96fecf8
|
|
| MD5 |
58b8d5aefd8bc9d8f019c61a40caccd2
|
|
| BLAKE2b-256 |
62947acd57bee754f05e2fee74560ce3e9436a86614dccdd320c16f59b1f7b82
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-win_arm64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-win_arm64.whl
- Upload date:
- Size: 16.6 kB
- Tags: CPython 3.9+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0577f5d924bc3393fcdd4f9d9197f0878a2b3b3414c1d288c85e618b283f9d64
|
|
| MD5 |
0c78a730c3b180fc94e78f8e0b19ac65
|
|
| BLAKE2b-256 |
1bf2e0820d63444c4d30b6dd1c6bce92f6bce347c632e189664aa6330e1f9eec
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 17.8 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73f7201d7f343a832896315a062b969ce88c1a3a4092fcb83b83cb1f0bd1aa7b
|
|
| MD5 |
5a42a1a7259a5793f0d06aee752b4728
|
|
| BLAKE2b-256 |
0e2cce7aedfb314e8ddbeb35fde3da71e37e44f286dc71fabab01373fc3705af
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 27.9 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dc21d0aebb823e0c9d247997df41989abec7498f37f2607b32e55d3f089bce4
|
|
| MD5 |
84fd5c50f173f5cd3b4feea28b3362b1
|
|
| BLAKE2b-256 |
1529dbad7d4c7d0565697f443ddf301751e88880f5e2daa33decea7f816958d4
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 28.8 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a48b2bcdadab9316dc9e33b892d2d63eccd6f8b5c95be29870e1c03ebf145240
|
|
| MD5 |
aa190815a1e53f558fb84d1053bd9ab8
|
|
| BLAKE2b-256 |
41d696aafd0bdc9c74599afb91f952dc191c5f8f402a62244b63a57a7e9a97b2
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 29.8 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c30c7124969d10e75795ef2d1b27d89c8de9be835d0d3686cbca0333667729a3
|
|
| MD5 |
d8218a605c199836fd55534ecf0839dc
|
|
| BLAKE2b-256 |
c744b20a709a2fe3ca3c4395b6e80d2891c2594a99b2984df852a638f03a7d93
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 28.1 kB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d39aacb270a62b2444580590ea4e0db42c403169756a3ab8b7f5f990a4e1588e
|
|
| MD5 |
d2d489548e7adc629f3eb03c501e99b6
|
|
| BLAKE2b-256 |
cf4d8483c9d5d68c7f6971f9f43ec6c39a49bf01822a0bb6a59eed7da3ada0e6
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 16.2 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3205b7af478efbf537da10696ad02f267050306c9380195842007b2ca6e01029
|
|
| MD5 |
a1e54b745c34914e2883b6fdc745e501
|
|
| BLAKE2b-256 |
c1d16f7332778c3cc3e86c500d4a11956be5c32809554d4fe7d16611ec58d319
|
File details
Details for the file tree_sitter_gram-0.2.3-cp39-abi3-macosx_10_9_x86_64.whl.
File metadata
- Download URL: tree_sitter_gram-0.2.3-cp39-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 15.8 kB
- Tags: CPython 3.9+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f3720727e7ac23736987e1d5c38f870029c2ffb27f8d08b4c6e42e56e14160a
|
|
| MD5 |
ce3df8d2c005713d34ec363acdbcba5c
|
|
| BLAKE2b-256 |
d0941e4d766cb5cbbc65b612e41f5be7bf4031a73c837b4dd383f3d9f5683bdc
|