Yes--I've used both ANTLR and JavaCC, and for new projects, ANTLR4 seems to be the best alternative these days. That may not always have been the case, but ANTLR is now very mature and generally a pleasure to work with.
Note that to use ANTLR with the NetBeans language infrastructure, an adapter class is needed between org.antlr.v4.runtime.CharStream and org.netbeans.spi.lexer.LexerInput . A ready-to-use adapter is available here: https://gist.github.com/eirikbakke/fdda0e6b43ed1b2d54eb -- Eirik On 6/16/17, 4:11 AM, "Christian Lenz" <[email protected]<mailto:[email protected]>> wrote: An alternative could be ANTLR. Only as a hint. Gesendet von Mail für Windows 10 Von: Peter Blemel Gesendet: Freitag, 16. Juni 2017 06:57 An: [email protected]<mailto:[email protected]> Betreff: Re: Introductory Email Hi Ross, I have written two JavaCC based language editors on the NetBeans platform (for AI applications). There used to be a plugin (see http://plugins.netbeans.org/plugin/20277/javacc), but once I had my basic language support in place I didn't have much need to go back and edit my grammars so I've lost track of it. I don't know if it works in recent versions of NetBeans. I would be happy to contribute to a grammar editor, either based on that project or something new. In my opinion a user should never see the JavaCC grammar implementation if it can be avoided (unless they really want to), favoring autocoding from some kind of model instead. I have some ideas about using the visual API and wizards to assist in the development process. Given a model, maybe Rule based, we can graph the structure, identify problems, analyze lookahead, etc to help develop and debug new grammars without getting bogged down in JavaCC specific issues (not to mention debugging problems in the grammar). Such a system could be re-targeted to other parsers and language implementations. I don't know how big the user community for such an editor might be (small, I imagine), so it might be a good first step to dust off that other project first and use it to look at auto-coded JavaCC grammars from a rapid prototype before deciding if we want to put in any more effort. Drop me a line and we'll see about getting something started. Best, Peter Blemel ________________________________ From: Ross Lamont <[email protected]<mailto:[email protected]>> Sent: Thursday, June 15, 2017 9:32 PM To: [email protected]<mailto:[email protected]> Subject: Introductory Email Hi everyone, I am an independent developer, previously architect at genbook.com and other places. I’ve been developing software for over 20 years, and using netbeans since around 2003. I have dabbled with plugins from time to time, but I’m now hoping to make a serious contribution in the XML space. I’ve been working on some RelaxNG editing plugins, as well as looking into improving the general XML validation approach as it looks like it hasn’t been touched in a while. I’m also going to have a crack at a javaCC editor, as it will assist others writing other language support for Netbeans. Best Regards Ross
