Installing ANTLR
How do you install ANTLR?
These are the steps I took:
1.) Downloaded ANTLR 3.0.1
2.) Unarchive it, copy it into /usr/local
3.) Add it to my class path by opening ~/.bash_profile with textmate, and appending:
Now, when I try to run it on commandline:
Terminal spits this back at me:
Which I googled, and it means that I haven't added antlr to my class path...
[See http://www.antlr.org/wiki/pages/viewpage...ageId=728]
What do I need to do to add it to my class path?
These are the steps I took:
1.) Downloaded ANTLR 3.0.1
2.) Unarchive it, copy it into /usr/local
3.) Add it to my class path by opening ~/.bash_profile with textmate, and appending:
Code:
export CLASSPATH="/usr/local/antlr/lib/antlr-3.0.1.jar"
export CLASSPATH="$CLASSPATH:/usr/local/antlr/lib/antlr-2.7.7.jar"
export CLASSPATH="$CLASSPATH:/usr/local/antlr/lib/antlr-runtime-3.0.1.jar"
export CLASSPATH="$CLASSPATH:/usr/local/antlr/lib/stringtemplate-3.1b1.jar"Now, when I try to run it on commandline:
Code:
java org.antlr.Tool MyGrammer.gCode:
va org.antlr.Tool Shader.g
Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/stringtemplate/StringTemplateErrorListener
at org.antlr.Tool.main(Tool.java:67)[See http://www.antlr.org/wiki/pages/viewpage...ageId=728]
What do I need to do to add it to my class path?
I've never installed it, always just run it from the download directory...
First, make sure you get "ANTLR 3.0.1 source distribution" (antlr-3.0.1.tar.gz) since it includes all the language runtimes.
Then you can run like this:
Dunno what you have to do to "install" it, but that at least appears to work.
First, make sure you get "ANTLR 3.0.1 source distribution" (antlr-3.0.1.tar.gz) since it includes all the language runtimes.
Then you can run like this:
Code:
cd antlr-3.0.1
java -cp `ls lib/*.jar | tr '\n' ':'` org.antlr.Tool <Grammar FIle>Dunno what you have to do to "install" it, but that at least appears to work.

