1- # semble-grammars
1+ <h1 align =" center " >
2+ semble-grammars<br />
3+ <sub >Prebuilt tree-sitter grammars for Semble</sub >
4+ </h1 >
5+
6+ <div align =" center " >
7+ <h2 >
8+ <a href="https://pypi.org/project/semble-grammars/"><img src="https://img.shields.io/pypi/v/semble-grammars?color=%23007ec6&label=pypi%20package" alt="Package version"></a>
9+ <a href="https://github.com/MinishLab/semble-grammars/blob/main/LICENSE">
10+ <img src="https://img.shields.io/badge/license-MIT-green" alt="License - MIT">
11+ </a>
12+ </h2 >
13+ </div >
214
315Compiled [ tree-sitter] ( https://tree-sitter.github.io/tree-sitter/ ) grammars for
416[ Semble] ( https://github.com/MinishLab/semble ) .
@@ -7,6 +19,14 @@ The package installs a platform-specific grammar archive and extracts individual
719libraries to a local cache on first use. It does not access the network at
820runtime.
921
22+ ## Installation
23+
24+ ``` bash
25+ pip install semble-grammars
26+ ```
27+
28+ ## Usage
29+
1030``` python
1131from semble_grammars import get_parser
1232
@@ -18,24 +38,33 @@ tree = parser.parse(b"def hello(): pass")
1838macOS arm64 and x86-64, Linux arm64 and x86-64, and Windows arm64 and x86-64.
1939
2040<details >
21- <summary >Included grammars (75 )</summary >
41+ <summary >Included grammars (77 )</summary >
2242
2343The canonical names accepted by ` get_parser() ` are:
2444
25- ` asciidoc ` , ` astro ` , ` bash ` , ` c ` , ` clojure ` , ` cmake ` , ` cpp ` , ` csharp ` , ` css ` ,
26- ` dart ` , ` dockerfile ` , ` dtd ` , ` elixir ` , ` embedded_template ` , ` erlang ` , ` fortran ` ,
27- ` gitignore ` , ` go ` , ` gotmpl ` , ` graphql ` , ` groovy ` , ` haskell ` , ` hcl ` , ` html ` ,
28- ` ini ` , ` java ` , ` javascript ` , ` jinja2 ` , ` json ` , ` json5 ` , ` jsonc ` , ` jsonnet ` ,
29- ` julia ` , ` just ` , ` kdl ` , ` kotlin ` , ` latex ` , ` lua ` , ` make ` , ` markdown ` ,
30- ` markdown_inline ` , ` nix ` , ` objc ` , ` ocaml ` , ` org ` , ` perl ` , ` php ` , ` php_only ` ,
31- ` powershell ` , ` properties ` , ` proto ` , ` python ` , ` r ` , ` racket ` , ` rst ` , ` ruby ` ,
32- ` rust ` , ` scala ` , ` scheme ` , ` scss ` , ` solidity ` , ` sql ` , ` starlark ` , ` svelte ` ,
33- ` swift ` , ` toml ` , ` tsx ` , ` typescript ` , ` typst ` , ` vim ` , ` vue ` , ` wat ` , ` xml ` ,
34- ` yaml ` , ` zig ` .
35-
36- ` py ` is an alias for ` python ` , and ` terraform ` is an alias for ` hcl ` .
45+ ` asciidoc ` , ` astro ` , ` bash ` , ` batch ` , ` c ` , ` clojure ` , ` cmake ` , ` cpp ` ,
46+ ` csharp ` , ` css ` , ` dart ` , ` dockerfile ` , ` dtd ` , ` elixir ` , ` embedded_template ` ,
47+ ` erlang ` , ` fortran ` , ` gitignore ` , ` go ` , ` gotmpl ` , ` graphql ` , ` groovy ` ,
48+ ` haskell ` , ` hcl ` , ` heex ` , ` html ` , ` ini ` , ` java ` , ` javascript ` , ` jinja2 ` ,
49+ ` json ` , ` json5 ` , ` jsonc ` , ` jsonnet ` , ` julia ` , ` just ` , ` kdl ` , ` kotlin ` ,
50+ ` latex ` , ` lua ` , ` make ` , ` markdown ` , ` markdown_inline ` , ` nix ` , ` objc ` ,
51+ ` ocaml ` , ` org ` , ` perl ` , ` php ` , ` php_only ` , ` powershell ` , ` properties ` ,
52+ ` proto ` , ` python ` , ` r ` , ` racket ` , ` rst ` , ` ruby ` , ` rust ` , ` scala ` , ` scheme ` ,
53+ ` scss ` , ` solidity ` , ` sql ` , ` starlark ` , ` svelte ` , ` swift ` , ` toml ` , ` tsx ` ,
54+ ` typescript ` , ` typst ` , ` vim ` , ` vue ` , ` wat ` , ` xml ` , ` yaml ` , ` zig ` .
55+
56+ ` py ` is an alias for ` python ` , ` terraform ` is an alias for ` hcl ` ,
57+ ` embeddedtemplate ` is an alias for ` embedded_template ` , and ` zsh ` is an alias
58+ for ` bash ` .
3759</details >
3860
61+ The MIT license above covers ` semble-grammars ` ' own code. Each bundled grammar is a
62+ separate upstream work with its own license; see
63+ [ ` THIRD_PARTY_NOTICES.md ` ] ( src/semble_grammars/grammars/THIRD_PARTY_NOTICES.md ) for the
64+ full list.
65+
66+ ## Building from source
67+
3968Build grammars from the pinned sources in
4069[ ` sources.json ` ] ( src/semble_grammars/grammars/sources.json ) :
4170
0 commit comments