/rollup-plugin-jison

Jison loader for rollup

Primary LanguageJavaScriptMIT LicenseMIT

rollup-plugin-jison

Build Status NPM Version License

A rollup plugin allowing you to import Jison grammars as parsers directly in your code.

import { parse } from "grammar.jison";
console.log(parse("language to parse"));

Install

npm install --save-dev rollup-plugin-jison

Usage

import { rollup } from "rollup";
import jison from "rollup-plugin-jison";

rollup({
  entry: "main.js",
  plugins: [
    jison({
      type: "lalr" // algorithm to use for the parser (lr0, slr,lalr, lr), default lalr
    })
  ]
});