js_antlr

1.0.0 • Public • Published

js_antlr

Partial port of aphyr/clj-antlr bindings for ANTLR 4 parser library, returning a tree or sexpr-formatted tree

Installation

npm install --save js_antlr

Usage

Compile your Grammar to a JS lexer and parser.

{YourLexer}  = require "./YourLexer"
{YourParser} = require "./YourParser"
 
options =
  format: "sexp"
  root:   null
 
parser = new Parser YourLexerYourParseroptions
 
string        = "someNum > 3"
sexpParseTree = parser.parse string

License

EPL-1.0 adopted from clj-antlr

/js_antlr/

    Package Sidebar

    Install

    npm i js_antlr

    Weekly Downloads

    5

    Version

    1.0.0

    License

    EPL-1.0

    Last publish

    Collaborators

    • doublerebel