chevrotain-allstar
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

Chevrotain Allstar

This is a lookahead plugin package for the Chevrotain parser library. It implements the ALL(*) lookahead algorithm introduced for ANTLR4. The algorithm features unbounded lookahead, compared to the normal LL(k) behavior of Chevrotain.

Usage

When creating your parser, pass an instance of the LLStarLookaheadStrategy to the lookaheadStrategy property of the base parser constructor options.

import { LLStarLookaheadStrategy } from "chevrotain-allstar";

class Parser extends EmbeddedActionsParser {
    constructor() {
        super(tokens, {
            lookaheadStrategy: new LLStarLookaheadStrategy()
        });
        this.performSelfAnalysis()
    }
}

Package Sidebar

Install

npm i chevrotain-allstar

Weekly Downloads

45,043

Version

0.3.1

License

MIT

Unpacked Size

139 kB

Total Files

24

Last publish

Collaborators

  • msujew