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.0b12.tar.gz (374.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: tree_sitter_usfm3-3.0.0b12.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.0b12.tar.gz
Algorithm Hash digest
SHA256 d4c91e7660f1c0581e6c33f244f5fda07e454925785a11db36bea794077dbdb0
MD5 b7d58325b47c640473ac4757f2d13f3b
BLAKE2b-256 a87130cf8b93e9cd31b00ec92b77c277e688aff60d4d6a74470981978191e621

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