1

Recently I tried to write ANTLR grammar file (.g) using the ANTLR Editor for eclipse available at http://antlreclipse.sourceforge.net/updates/.

I found this editor to be useful only for highlighting the syntax (unless I always keep compiling manually).

Is there any eclipse based ANTLR editor equivalent to ANTLR Works and compatible with ANTLR 3?

ronak.patel
  • 273
  • 1
  • 2
  • 9

2 Answers2

1

You can try AntrDT also recommended on Antlr3 web site. For Antlr4 there is also antlr4ide.

Eugene Kuleshov
  • 31,461
  • 5
  • 66
  • 67
  • Wow...Perfect! This is exactly what I wanted to do. Thank you. – ronak.patel Jul 19 '12 at 15:25
  • As [XText](http://www.eclipse.org/Xtext/) is gaining a rapid acceptance as DSL writer, I was curious whether it provides editor for developing ANTLR grammers as well. – ronak.patel Jul 19 '12 at 15:31
0

I've been using ANTLR in Eclipse for about six weeks now. It works quite well once you get the process down. You definitely shouldn't have to compile manually so check your ANTLR IDE configuration here. If that's all good, then take a look at the ANTLR test/debug process in Eclipse. Hope these help.

Community
  • 1
  • 1
cb4
  • 6,689
  • 7
  • 45
  • 57
  • AntlrDT looks like a more comprehensive editor than what's in the ANTLR IDE and I certainly like the AST viewer. But per their website it's version-specific to v3.2 so using v3.4 and string templates v4 is out. I plan on doing some testing and will report back. – cb4 Jul 19 '12 at 15:54
  • Yes @cb4 AntlrDT seems more comprehensive...For v3.4 we can depend on ANTLRWorks till your test results :-) above links for ANTLR IDE will be useful in case V4 is the limitation for AntlrDT. Thanks! – ronak.patel Jul 20 '12 at 07:13
  • I did manage to get some parts of AntlrDT working in Indigo after a few hours of fiddling with Eclipse plug-in locations and different versions of required components. The editor works and ANTLRWorks can be run by right-clicking a .g file so you could use it that way. I got no farther - the AntlrDT launcher always errors out. Too bad they don't keep it updated or release the source... Looks like the ANTLR IDE is your best bet. It makes for a very usable and fully functional environment with latest Eclipse, Java7, and graphviz for viewing antlr ASTs. – cb4 Jul 21 '12 at 00:19