Skip to main content

Usfm3 grammar for tree-sitter

Project description

Tree-sitter-usfm3

Tree sitter implementation of the USFM language.

Installation

pip install tree=sitter
pip install tree-sitter-usfm3

Usage

import tree_sitter_usfm3 as tsusfm
from tree_sitter import Language, Parser

USFM_LANGUAGE = Language(tsusfm.language())
parser = Parser(USFM_LANGUAGE)

source_code = '\\id GEN\n\\c 1\n\\p\n\\v 1 In the begining..'.encode('utf-8')
tree = parser.parse(source_code)

print(str(tree.root_node))

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_usfm3-3.0.0b16.tar.gz (374.7 kB view details)

Uploaded Source

File details

Details for the file tree_sitter_usfm3-3.0.0b16.tar.gz.

File metadata

  • Download URL: tree_sitter_usfm3-3.0.0b16.tar.gz
  • Upload date:
  • Size: 374.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tree_sitter_usfm3-3.0.0b16.tar.gz
Algorithm Hash digest
SHA256 1802fa3f580789488ced6e21fd1719f509c9eab9b2fd2866dd6a6eb99b1cf846
MD5 4e78a3c392fa11d1eb1ae564b29c9fee
BLAKE2b-256 954503bc991154fd6d9627b065c183f5ce602329509abc495ccb41d73ee074b4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page