5 comments

[ 2.6 ms ] story [ 24.6 ms ] thread
Question , is there a plugin for any text editor like ACE to generate autocomplete based on jison rules?
That would be my #1 desired feature to add to this app - syntax highlighting for the Jison grammar.

Since CoffeeScript and Handlebars are written in Jison, you'd think someone would have done this already, but I couldn't wrap my head around the Ace highlighter implementation for those languages. It didn't seem to be as simple as "plug in this Jison grammar and get a highlighter." If that were the case, it would be easy, because Jison itself is written in Jison. :)

I'm currently maintaining a custom PEGjs grammar along with a custom CodeMirror mode for syntax highlighting and autocomplete.

This would be a dream if happened (with PEGjs and CodeMirror instead of Jison and ACE), but it is probably too difficult. I think it is easier to write a new Javascript text editor which bases itself on PEGjs.

This is great and necessary, because Jison is a big undocumented mess. That's why I stopped using it and started using PEG: http://pegjs.org/