jlex 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,9 +8,18 @@
8
8
  ## Usage
9
9
 
10
10
  ```
11
- npx jlex <package name>
12
- ```
11
+ npx jlex --help
12
+ Usage: jlex [options] <filename>
13
+
14
+ A tiny wrapper around jison-lex that allows you to use jison-lex as a standalone (flex like) processor.
13
15
 
16
+ Options:
17
+ -V, --version output the version number
18
+ -o, --output <fileName> Output file name
19
+ -v, --verbose Enable verbose output
20
+ -h, --help display help for command
21
+ See https://github.com/ULL-ESIT-PL/jlex/blob/main/README.md for more help
22
+ ```
14
23
 
15
24
  ## Example
16
25
 
@@ -32,7 +41,13 @@ comment [/][*](.|[\r\n])*?[*][/]
32
41
  Compile it with:
33
42
 
34
43
  ```
35
- npx jlex examples/example.l
44
+ ➜ jlex git:(main) ./jlex.js examples/example.l -v -o examples/example.js
45
+ 📖 Reading lexer grammar from: examples/example.l
46
+ 📝 Generated 11340 characters of lexer code
47
+ 🔄 Applied transformation pattern: /var\s+lexer\s*=/
48
+ 📝 Writing file: examples/example.js
49
+ ✅ Successfully processed examples/example.l → examples/example.js
50
+ 📊 Output size: 11.1KB
36
51
  ```
37
52
 
38
53
  This produces a Common.JS module `examples/example.js` you can use with a simple `require` like in the file [main.js](examples/main.js) below:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jlex",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A wrapper around jison-lex to make it work as a standalone program like Flex",
5
5
  "keywords": [
6
6
  "jison-lex",