[antlr-interest] Advice on using Antlr in Eclipse

Johan Cockx johan at sikanda.be
Tue May 12 08:22:32 PDT 2009


Hello,

I need to use Antlr from the Eclipse IDE (under Windows XP) and I am trying
to figure out what the best approach is.

There seem to be at least three Eclipse plug-ins for Antlr:

1. AntlrEclipse ( http://antlreclipse.sourceforge.net/ )

2. AntlrDT ( http://www.certiv.net/downloads/antlrdtdownload.html )

3. Antlr IDE

I may have missed some,  but three seems more than enough for anyone.

My first goal is very basic: I want to integrate Antlr in the Eclipse build
process.  I did not look at the extra featues yet.

 AntlrEclipse is no longer supported,  and I was not able to install the
other two.  Details below.

All advice is welcome.

*1. AntlrEclipse*

This can be installed by following the procedure at
http://antlreclipse.sourceforge.net/ .

I have tried all three with the SimpleCalc example from
http://www.antlr.org/wiki/display/ANTLR3/Five+minute+introduction+to+ANTLR+3.


There are three errors,  the first one on the first line of the grammar
("grammar SimpleCalc;"): it says "Unexpected token: grammar".  The weird
thing is that this error persists even when I completely remove the first
line and do a clean build (Project>clean...  ).

The problem is that the most recent version of Antlr Eclipse (4.1.1) uses an
old version of Antlr (2.7.6) that does not have a "grammar" keyword.  The
last update of AntlrEclipse seem to date from 2006 and the project doesn't
seem to be actively maintained anymore.

*2. AntlrDT*

This seems to be actively maintained;  the most recent version is only three
days old at the time of writing.  It is developed by Certiv Analytics (
http://www.certiv.net).

*Installation*

I was not able to succesfully install AntlrDT.  This is what I did:

I started from a freshly downloaded Eclipse Classic
3.4.2<http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.4.2-200902111700/eclipse-SDK-3.4.2-win32.zip>
.

Then I loaded DLTK (Dynamic Languages Toolkit) which is required by
AntlrDT.  I installed it by doing Help -> Software Updates, then selecting
Ganymede -> Enabling Features, then selecting Dynamic Languages Toolkit -
Core Frameworks. The most recent version is currently 0.95.1.  This adds a
"Dynamic Languages" entry to the Eclipse Preferences.

Another requirement mentioned by Certiv Analytics is Zest Visualization
Toolkit 1.0.  Is this needed and where can I find it?

I could not find an update site to install AntlrDT itself through Eclipse's
software update mechanism,  so I tried a manual install.  I downloaded
certiv-antlrdt-0.8.0.zip from the certiv website and unzipped it.  It
contains a plugin folder with a number of jar files.  I copied all the jar
files to the plugin folder of my Eclipse installation and restarted Eclipse.

Nothing changed.  There was no AntlrDT entry in the Eclipse Preferences
menu.  Does manual plugin installation require any additional actions?  I am
not an Eclipse expert and I have no clue what went wrong.

Btw,  I also tried AntlrDT version 0.7.0 with the same (=no) result.

I sent a mail to support at certiv.net for help and I am waiting for a reply.

*3. Antlr IDE*

This also seems to be actively developed;  version 1.3.1 was released on
2009-04-06.

I tried to install it via the Eclipse Update Manager from
http://antlrv3ide.sourceforge.net/updates but got the following error: "An
error ocurred while collecting items to be installed: No repository found
containing org.eclipse.draw2d/osgi.bundle/3.4.1.v20080910-1351".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090512/7cb8a1bb/attachment.html 


More information about the antlr-interest mailing list