/meta-chevrotain

DSL for generating chevrotain parser code and cst typing

Primary LanguageTypeScriptMIT LicenseMIT

npm

meta-chevrotain

DSL for generating chevrotain parser code and cst typing

Warning

This is a improvisational project and is NOT TESTED AT ALL. It might be improved in the future.

Examples

Rail Diagram

Bootstrapping Definition

Generated Parser

Generated Typing

Requires

Install

yarn add meta-chevrotain

Usage

Bootstrapping (in this project directory)

yarn bootstrapping

Read file and output parser code to console

yarn meta-chev -i input.txt -pl

Read file and output typing code to console

yarn meta-chev -i input.txt -tl

Read file and output to files

yarn meta-chev -i input.txt -p parser.ts -t typing.d.ts

Read file and output to files with extra typing entries

yarn meta-chev -i input.txt -p parser.ts -t typing.d.ts -e index:number