Skip to content

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

Notifications You must be signed in to change notification settings

nextorigin/js_antlr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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 YourLexer, YourParser, options

string        = "someNum > 3"
sexpParseTree = parser.parse string

License

EPL-1.0 adopted from clj-antlr

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published