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.2.0b1.tar.gz (424.1 kB view details)

Uploaded Source

File details

Details for the file tree_sitter_usfm3-3.2.0b1.tar.gz.

File metadata

  • Download URL: tree_sitter_usfm3-3.2.0b1.tar.gz
  • Upload date:
  • Size: 424.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_usfm3-3.2.0b1.tar.gz
Algorithm Hash digest
SHA256 ab78bef6eaace5b0eb6cf52e4388a70d575511e288e9bdc23870eb8430cb5395
MD5 ecaaf5f963ca1db689500b3b5cbd8c8e
BLAKE2b-256 fbedad72fcb084c0dee6b2960e3ed7be49d8c19ce8c29f2f2d9e36153921c128

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