2019-01-24 13:50:55 +00:00
|
|
|
# re2-js-generator
|
|
|
|
|
2019-01-29 10:14:23 +00:00
|
|
|
## Requires
|
|
|
|
- node
|
|
|
|
- npm
|
|
|
|
- re2c
|
|
|
|
|
2019-01-29 10:06:27 +00:00
|
|
|
## Install
|
|
|
|
```bash
|
2019-01-30 11:53:25 +00:00
|
|
|
git clone -- http://git.macaw.me:3000/chichenkov/re2-js-generator.git
|
2019-01-24 15:36:19 +00:00
|
|
|
npm install
|
2019-01-29 10:06:27 +00:00
|
|
|
```
|
2019-01-30 11:21:40 +00:00
|
|
|
## One Minute Guide
|
|
|
|
You can fast use example:
|
|
|
|
```bash
|
|
|
|
npm install
|
|
|
|
./build_example.sh
|
|
|
|
cd examples/
|
|
|
|
node lexme.js
|
|
|
|
```
|
|
|
|
|
2019-01-24 15:20:50 +00:00
|
|
|
|
2019-01-29 10:06:27 +00:00
|
|
|
## Start
|
|
|
|
```bash
|
2019-01-30 11:21:40 +00:00
|
|
|
node main.js -inp=<input_file> -o=<output_path> -t=<web|node> <-nb|--no-beautify> <-logs>
|
2019-01-29 10:06:27 +00:00
|
|
|
```
|
2019-01-24 15:20:50 +00:00
|
|
|
or
|
2019-01-29 10:06:27 +00:00
|
|
|
```bash
|
|
|
|
./run.sh
|
|
|
|
```
|
2019-01-25 11:25:21 +00:00
|
|
|
Result fill write in <lexer.js> file.
|
|
|
|
|
2019-01-29 10:06:27 +00:00
|
|
|
## Flags
|
|
|
|
```bash
|
2019-01-30 11:21:40 +00:00
|
|
|
-inp=<input_file.l>
|
2019-01-29 10:06:27 +00:00
|
|
|
-o=<output_path>
|
|
|
|
-t=<web|node>
|
|
|
|
-nb|--no-beautify
|
2019-01-30 11:21:40 +00:00
|
|
|
-logs
|
2019-01-29 10:06:27 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Test
|
|
|
|
```bash
|
|
|
|
node test.js
|
|
|
|
```
|
2019-01-24 15:20:50 +00:00
|
|
|
|
2019-01-29 10:06:27 +00:00
|
|
|
## Manual
|
|
|
|
Read re2c manual: http://re2c.org/manual/manual.html
|
2019-01-24 15:20:50 +00:00
|
|
|
|
|
|
|
Report for bugs: rolahd@yandex.ru
|