[antlr-interest] gunit in Kubuntu
Stefan Mätje
Stefan.Maetje at esd-electronics.com
Tue Sep 11 01:19:11 PDT 2012
Am 11.09.2012 09:35, schrieb Guus Bonnema:
> Hi All,
>
> I want to start using gunit to test my grammar, but none of the
> jar-files for antlr3 appear to contain gunit. However, when I download
> the source (apt-get source antlr3) I do find sources for gunit.
>
> I downloaded all units containing antlr in their name, but none of the
> libraries appear to have gunit.
>
> Anyone in this list using kubuntu and know how to get and use gunit?
>
Hi Guus,
well I'm not using Kubuntu but Ubuntu and therefore it should be nearly
the same. I downloaded an ANTLR jar file that contains the gUnit test
framework. How to call shows this wiki page:
http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing
But perhaps a snippet of my Makefile would make this more clear (also
attached to this email):
# Where to find the ANTLR tool stuff.
ANTLRBASE:=../../antlr
# Which version to use.
ANTLR:=antlr-3.4-complete.jar
# Tell javac where to put the compiled classes.
CLASSES:=classes
# Tell the java VM where to find any needed classes.
CLASSPATH="$(ANTLRBASE)/$(ANTLR):$(CLASSES)"
# gUnit run depends on list of parser classes $(LP_CLASS)
gunit.out: Pearl90.gunit $(LP_CLASS)
java -cp $(CLASSPATH) org.antlr.gunit.Interp $(<) | tee $(@)
I hope that helps,
Stefan
-------------- next part --------------
# Where to find the ANTLR tool stuff.
ANTLRBASE:=../../antlr
# Which version to use.
ANTLR:=antlr-3.4-complete.jar
# Tell javac where to put the compiled classes.
CLASSES:=classes
# Tell the java VM where to find any needed classes.
CLASSPATH="$(ANTLRBASE)/$(ANTLR):$(CLASSES)"
# gUnit run depends on list of parser classes $(LP_CLASS)
gunit.out: Pearl90.gunit $(LP_CLASS)
java -cp $(CLASSPATH) org.antlr.gunit.Interp $(<) | tee $(@)
More information about the antlr-interest
mailing list