2019-01-24 13:50:55 +00:00
|
|
|
# re2-js-generator
|
|
|
|
|
2019-01-29 10:14:23 +00:00
|
|
|
## Requires
|
2019-01-30 12:23:55 +00:00
|
|
|
|
2019-01-29 10:14:23 +00:00
|
|
|
- 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-30 11:59:00 +00:00
|
|
|
cd re2-js-generator
|
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
|
|
|
|
./build_example.sh
|
2019-01-30 11:59:00 +00:00
|
|
|
cd example/
|
2019-01-30 11:21:40 +00:00
|
|
|
node lexme.js
|
|
|
|
```
|
|
|
|
|
2019-01-24 15:20:50 +00:00
|
|
|
|
2019-01-29 10:06:27 +00:00
|
|
|
## Start
|
|
|
|
```bash
|
2019-01-31 08:18:26 +00:00
|
|
|
node main.js -inp=<input_file> -o=<output_path> -t=<web|node> <-nb|--no-beautify> -logs -web-template=<web_template_file>
|
2019-01-30 12:44:12 +00:00
|
|
|
# or
|
2019-01-29 10:06:27 +00:00
|
|
|
./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-31 08:18:26 +00:00
|
|
|
-web-template=<web_template_file>
|
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
|
|
|
|
2019-01-30 12:43:01 +00:00
|
|
|
Report for bugs: rolahd@yandex.ru
|
|
|
|
|
|
|
|
## Links
|
2019-01-30 12:43:25 +00:00
|
|
|
- Used js-beautify-node from: [https://github.com/rwaldron/js-beautify-node](https://github.com/rwaldron/js-beautify-node)
|
|
|
|
- Used args-parser from: [https://www.npmjs.com/package/args-parser](https://www.npmjs.com/package/args-parser)
|