Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ANTLR and Eclipse (or any decent IDE)

I have been using ANTLR with Eclipse for some time using the ANTLRv3IDE plugin. While it is not perfect, and a bit outdated, it does its job reasonably well.

Now I am looking to switch to ANTLRv4 for another DSL that I am creating. However, Eclipse support seems to be extremely thin. I decided to try out ANTLRWorks, which is a NetBeans plugin, but I could not get it to install (it seems to be locked to specific dated versions (201302132200 while I have something newer, still 7.3 as docs say) of dependencies).

So, the question: Has anyone set up any Java IDE (preferably Eclipse, but I could be persuaded to switch if support is good for something else) to integrate with ANTLR? With integrate, I mean: code generate on save/keyboard shortcut and syntax coloring (at the very least). Code completion and other features are of course nice to have, but I could live without them for now.

I am well aware of Xtext and I have had great success using it for some projects, but unfortunately it does not fit the needs here (need no IDE support, need my own DSL model not based on ECore, etc).

I know ANTLRWorks can be run as a standalone application without a Java IDE, but that I consider to be a last-resort solution as it is extremely cumbersome to work this way (switch between application, files out of sync, no VCS support etc). I tried the other way around: to install the Java parts into ANTLRworks (which itself is a NetBeans distro), but it did not end well (it seems basic project support etc was stripped out of ANTLRworks).

like image 403
Krumelur Avatar asked Jun 22 '13 20:06

Krumelur


1 Answers

Antlr4 plugin for Eclipse is here:

https://github.com/jknack/antlr4ide

like image 118
Kevin Avatar answered Sep 18 '22 17:09

Kevin