You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To build the site, as well as the Browserified web version of Jison, run:
57
57
58
58
make site
59
-
59
+
60
60
Then you can also preview the site by doing:
61
61
62
62
make preview
63
-
63
+
64
64
Note that you will need `nanoc` and `adsf` in order to build/preview the site. `gem install` them if you haven't.
65
65
66
66
> ### Note
67
67
>
68
-
> The `make site` build command will print a WARNING message when `nanoc` is not available,
68
+
> The `make site` build command will print a WARNING message when `nanoc` is not available,
69
69
> but WILL NOT fail the `site` build task. This behaviour has been specifically chosen to
70
70
> allow (pre)release build runs to complete and deliver a new jison revision when everything
71
71
> but the web pages has compiled successfully.
72
-
>
72
+
>
73
73
74
74
75
75
## Building a new (beta-)release
@@ -82,7 +82,7 @@ which will patch all `package.json` files.
82
82
83
83
You can now run
84
84
85
-
make
85
+
make
86
86
make site
87
87
88
88
to build all files, but when you want to be absolute sure and/or need to update some of the core files using your latest jison compiler, then push jison and all its submodules to github and run
Copy file name to clipboardexpand all lines: README.md
+36-36
Original file line number
Diff line number
Diff line change
@@ -64,55 +64,55 @@ lexfile file containing a lexical grammar
64
64
65
65
Where the available `options` are:
66
66
67
-
: -j, --json
67
+
: -j, --json
68
68
force jison to expect a grammar in JSON format \[false\]
69
69
70
-
: -o FILE, --outfile FILE
70
+
: -o FILE, --outfile FILE
71
71
Filepath and base module name of the generated parser; when terminated with a / \(dir separator\) it is treated as the destination directory where the generated output will be stored
72
72
73
-
: -t, --debug
73
+
: -t, --debug
74
74
Debug mode \[false\]
75
75
76
-
: -I, --info
76
+
: -I, --info
77
77
Report some statistics about the generated parser \[false\]
78
78
79
-
: -m TYPE, --module-type TYPE
79
+
: -m TYPE, --module-type TYPE
80
80
The type of module to generate \(commonjs, amd, es, js\)\[commonjs\]
81
81
82
-
: -n NAME, --module-name NAME
82
+
: -n NAME, --module-name NAME
83
83
The name of the generated parser object, namespace supported
84
84
85
-
: -p TYPE, --parser-type TYPE
85
+
: -p TYPE, --parser-type TYPE
86
86
The type of algorithm to use for the parser \(lr0, slr, lalr, lr, ll\)\[lalr\]
87
87
88
-
: -c, --compress-tables
88
+
: -c, --compress-tables
89
89
Output compressed parser tables in generated modules \(0 = no compression, 1 = default compression, 2 = deep compression\)\[2\]
90
90
91
-
: -T, --output-debug-tables
91
+
: -T, --output-debug-tables
92
92
Output extra parser tables \(rules list + look-ahead analysis\) in generated modules to assist debugging / diagnostics purposes \[false\]
93
93
94
-
: -X, --no-default-resolve
94
+
: -X, --no-default-resolve
95
95
Act another way when a conflict is found in the grammar \[false\]
96
96
97
-
: --no-default-action
97
+
: --no-default-action
98
98
Generate a parser which does NOT include the default "$$ = $1" action for every rule. This produces a slightly faster parser but now you are solely reponsible for propagating rule action "$$" results. \[false\]
99
99
100
-
: --no-try-catch
100
+
: --no-try-catch
101
101
Generate a parser which does NOT try/catch exceptions \(from the grammar action code or parseError error reporting calls. This produces a slightly faster parser at the cost of enhanced code safety. \[false\]
102
102
103
-
: -Q, --error-recovery-token-discard-count
103
+
: -Q, --error-recovery-token-discard-count
104
104
Set the number of lexed tokens that may be gobbled by an error recovery process before we cry wolf \(default: 3\)\[3\]
105
105
106
-
: -E, --export-all-tables
106
+
: -E, --export-all-tables
107
107
Next to producing a grammar source file, also export the symbols, terminals, grammar and parse tables to separate JSON files for further use by other tools. The files' names will be derived from the outputFile name by appending a suffix. \[false\]
108
108
109
-
: -x, --main
109
+
: -x, --main
110
110
Include .main\(\) entry point in generated commonjs module \[false\]
111
111
112
-
: -y NAME, --module-main NAME
112
+
: -y NAME, --module-main NAME
113
113
The main module function definition
114
114
115
-
: -V, --version
115
+
: -V, --version
116
116
print version and exit
117
117
118
118
## Usage from a CommonJS module
@@ -183,7 +183,7 @@ Here's a comprehensive list of features and fixes compared to the [original](htt
183
183
184
184
* EBNF LR/LALR/SLR/LR0 grammars are correctly rewritten to BNF grammars, allowing your action code blocks to access all elements of the grammar rule at hand. See also [the wiki section about EBNF](https://github.com/zaach/jison/wiki/Deviations-From-Flex-Bison#user-content-extended-bnf).
185
185
186
-
***Parser engine optimization**: jison analyzes not just your grammar, but also your action code and will strip any feature you don't use \(such as [location tracking](https://github.com/zaach/jison/wiki/Deviations-From-Flex-Bison#user-content-accessing-values-and-location-information) via
186
+
***Parser engine optimization**: jison analyzes not just your grammar, but also your action code and will strip any feature you don't use \(such as [location tracking](https://github.com/zaach/jison/wiki/Deviations-From-Flex-Bison#user-content-accessing-values-and-location-information) via
187
187
`@element` references and `yylloc`\) from the parser kernel, which will benefit your parser run-time performance. The fastest parsers are obtained when you do not include error recovery \(`error` tokens in your grammar\), nor any lexer location tracking: this can potentially result in run-time execution cost reductions of over 70% \(hence your parser executes more than 3 times as fast\)!
188
188
189
189
* generated grammar / lexer source files carry a full API and internals documentation in the code comments to help you to read and debug a grammar. For example, every grammar rule is printed above its action code so that stepping through the parser when debugging hard-to-find problems makes it quite obvious which rule the engine is currently 'reducing'.
@@ -228,28 +228,28 @@ Here's a comprehensive list of features and fixes compared to the [original](htt
228
228
229
229
> Copyright \(c\) 2009-2016 Zachary Carter
230
230
>
231
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the "Software"\), to deal in the Software without restriction, including without
232
-
> limitation the rights to use, copy, modify, merge, publish, distribute,
233
-
> sublicense, and/or sell copies of the
234
-
> Software, and to permit persons to
235
-
> whom the Software is furnished to do
236
-
> so, subject to the following
231
+
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the "Software"\), to deal in the Software without restriction, including without
232
+
> limitation the rights to use, copy, modify, merge, publish, distribute,
233
+
> sublicense, and/or sell copies of the
234
+
> Software, and to permit persons to
235
+
> whom the Software is furnished to do
236
+
> so, subject to the following
237
237
> conditions:
238
238
>
239
-
> The above copyright notice and this
240
-
> permission notice shall be included
241
-
> in all copies or substantial portions
239
+
> The above copyright notice and this
240
+
> permission notice shall be included
241
+
> in all copies or substantial portions
242
242
> of the Software.
243
243
>
244
-
> THE SOFTWARE IS PROVIDED "AS IS",
245
-
> WITHOUT WARRANTY OF ANY KIND, EXPRESS
246
-
> OR IMPLIED, INCLUDING BUT NOT LIMITED
247
-
> TO THE WARRANTIES OF MERCHANTABILITY,
248
-
> FITNESS FOR A PARTICULAR PURPOSE AND
249
-
> NONINFRINGEMENT. IN NO EVENT SHALL THE
250
-
> AUTHORS OR COPYRIGHT HOLDERS BE
251
-
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
252
-
> LIABILITY, WHETHER IN AN ACTION OF
244
+
> THE SOFTWARE IS PROVIDED "AS IS",
245
+
> WITHOUT WARRANTY OF ANY KIND, EXPRESS
246
+
> OR IMPLIED, INCLUDING BUT NOT LIMITED
247
+
> TO THE WARRANTIES OF MERCHANTABILITY,
248
+
> FITNESS FOR A PARTICULAR PURPOSE AND
249
+
> NONINFRINGEMENT. IN NO EVENT SHALL THE
250
+
> AUTHORS OR COPYRIGHT HOLDERS BE
251
+
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
252
+
> LIABILITY, WHETHER IN AN ACTION OF
253
253
> CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 commit comments