Go to file
2019-01-31 11:55:06 +03:00
example readme 2019-01-31 11:55:06 +03:00
libs no dependencies 2019-01-30 15:43:01 +03:00
build_example.sh readme 2019-01-31 11:55:06 +03:00
lexer.l remove russians symbols from lexer.l 2019-01-30 15:23:55 +03:00
LICENSE Initial commit 2019-01-24 13:50:55 +00:00
main.js add -web-template=<web_template_file> 2019-01-31 11:18:26 +03:00
package.json no dependencies 2019-01-30 15:43:01 +03:00
README.md readme 2019-01-31 11:55:06 +03:00
run.sh change to main and add package 2019-01-24 18:36:19 +03:00
test.js fix replasing 2019-01-30 16:53:12 +03:00

re2-js-generator

Requires

  • node
  • npm
  • re2c

Install

git clone -- http://git.macaw.me:3000/chichenkov/re2-js-generator.git
cd re2-js-generator

One Minute Guide

You can fast use example:

./build_example.sh
cd example/
node lexme.js

Start

node main.js -inp=<input_file> -o=<output_path> -t=<web|node> <-nb|--no-beautify> -logs -web-template=<web_template_file>
# or
./run.sh

Result fill write in <lexer.js> file.

Flags

-inp=<input_file.l>
-o=<output_path>
-t=<web|node>
-nb|--no-beautify
-logs
-web-template=<web_template_file>

Web template example

You can create template file for simplify web develop

(function(){
    var deps = [];
    define(deps, function(){
        <%%LEXER%%>
        return Lexer;
    });
})();

Test

node test.js

Manual

Read re2c manual: http://re2c.org/manual/manual.html

Report for bugs: rolahd@yandex.ru