Overview of @lezer/generator
main@lezer/generator is an LR(1) parser generator (specifically pseudo-LALR, with opt-in GLR support) designed to produce grammars for the Lezer parser. It provides two primary ways to use it:
- Command-line tool:
lezer-generatorfor building grammars from files. - Programming interface: An API for programmatic grammar generation.
The tool accepts a specific grammar format. For real-world examples, you can examine lezer-javascript or the test/cases/ directory in the source.