3 ms·
Thanks for sharing! I was looking for something like this the last weeks. I especially like that it doesn't use a DSL, but JavaScript itself, so it's easier to
by Fannon 11y ago
Thanks for sharing! I was looking for something like this the last weeks. I especially like that it doesn't use a DSL, but JavaScript itself, so it's easier to debug and inspect.
Is there any way to generate a final parser file, nevertheless? Or somehow bundle it up?
- bd82 11y agoThanks for the feedback. :) 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#L423 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.