So I've been making a grammar in Eclipse with ANTLR v3.4 and I've made one that works and I want to make sure when I edit it everything still works. I can go into the interpretter everytime but that seems like a huge waste of time.
Questions: I've read about gunit but the link it gives to download gUnit: ( http://antlr.org/hudson/job/gUnit/org.antlr$gunit/lastSuccessfulBuild/ ) doesn't work. How can I get gUnit. What is the best way to test grammars? Is it actually gUnit or should I just do java tests like jUnit tests?
I recently completed two ANTLR3 assignments (I'm working on my Master's in Computer Science) using Eclipse. I found no single document that had a process for installing, configuring, writing, and debugging a grammar in Eclipse. So, after working through various issues, I found the easiest thing to do was to stay in Eclipse for testing.
To use the process I have come to use (outlined below) you must first have the ANTLR IDE v2.1.2 installed. Add it right from inside Eclipse Indigo: http://antlrv3ide.sourceforge.net/updates. This site also has some useful doc on using the ANTLR IDE. Once installed, the IDE has to be configured. Video tutorials are a bit out of date but helpful. See a detailed how to guide on configuring ANTLR IDE in Eclipse. The main configuration item is the java output folder. Do this in Eclipse by going to Windows, Preferences, ANTLR, Code Generator, check Project relative folder and in the Output folder name box type a folder name (mine is called "antlr-java", others use "generated").
Test/Debug Process for ANTLR in Eclipse Indigo with ANTLR IDE