grammargen

command
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Command grammargen generates tree-sitter parser artifacts from grammar definitions.

Usage:

grammargen [flags] <grammar-name-or-file>

Input sources:

<name>        Built-in grammar (json, calc, glr, keyword, ext, alias)
-js <path>    Import a tree-sitter grammar.js file

Output formats:

-bin <path>    Write gotreesitter .bin blob
-c <path>      Write tree-sitter parser.c

Other flags:

-validate      Check grammar for issues without generating
-report        Show generation report with conflict diagnostics
-list          List available built-in grammars

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL