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
Click to show internal directories.
Click to hide internal directories.