Is there any way to generate a final parser file, nevertheless? Or somehow bundle it up?
Is there any way to generate a final parser file, nevertheless? Or somehow bundle it up?
There is no way to generate a "parser file". Because no source is ever generated (not even "in memory").
If you want to bundle with the rest of your application. Your grammar is just another javascript file. Which will be packaged normally as you would bundle other web applications. (webpack/uglify/...)
* Note that due to Implementation details (using Function.toString) you may have to play around with minification options regarding name mangling. Example: https://github.com/SAP/chevrotain/blob/master/gruntfile.js#L...
I will document this clearly in an FAQ...
If you are referring to the Chevrotain runtime itself. It is available As a single bundled file (minified) on bower/npm for ease of consumption in a web application.