3 ms·
Show HN: Jison Debugger – A visual editor for JavaScript parsers and lexers
- vittore 12y agoQuestion , is there a plugin for any text editor like ACE to generate autocomplete based on jison rules?
- nilliams 12y agoNot aware of one based on jison. There is Tern [0], which is based on acorn [1] by the same author. (Sorry if you knew about this already, but others may be interested). [0] http://ternjs.net/doc/demo.html http://ternjs.net/doc/demo.html [1] https://www.npmjs.com/package/acorn https://www.npmjs.com/package/acorn
- nolanl 12y agoThat 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. :)
- fiatjaf 12y agoI'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.
- fiatjaf 12y agoThis 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/ http://pegjs.org/