LALR(1) Parser for LALR grammar
Tokenizer can be installed from NPM by running the lines below in your working directory containing package.json file for use in NodeJS, browserify or webpack.
npm install libcore-lalr --save
The following lines defines a parser declaring grammar rules composed of tokens (RegExp), recursion of rules, and a combination of both.
var lalr = ;var parser = lalr;
You can set parse subject to the iterator before you can parse. The following lines defines default iterator and parse the String subject.
var iterator = parser;var lexeme;// set string subject to parseiterator;// iteratefor lexeme = iteratornext; lexeme; lexeme = iteratornextconsole;
For supported Regex operators for tokenizer, please refer to libcore-tokenizer
This Project is fully Open Source MIT licensed.