1.0.1 • Published 8 months ago

@markw65/peggy-optimizer v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Peggy Optimizer Plugin

This package provides a peggy plugin that produces an optimized parser that will typically outperform a parser generated by peggy alone.

Installation

npm install @markw65/peggy-optimizer

Command line usage

Just add --plugin @markw65/peggy-optimizer to your normal peggy command line

npx peggy --plugin @markw65/peggy-optimizer [other options...] grammar.peggy

Peggy API

const peggyOptimizer = require("@markw65/peggy-optimizer");
const peggy = require("peggy");
...
const parser = peggy.generate(source, {
    grammarSource: "grammar.peggy",
    plugins: [peggyOptimizer],
    ...otherOptions
});
1.0.1

8 months ago

1.0.0

9 months ago