[antlr-interest] Re: Antlr CLASSPATH in Gentoo Linux?

edcjones edcjones at yahoo.com
Sat Sep 13 13:21:29 PDT 2003


--- In antlr-interest at yahoogroups.com, "edcjones" <edcjones at y...> wrote:
> Does anyone use Antlr as installed in Gentoo Linux? Any useful pointers?
> 
> "antlr.jar" is in "/usr/share/antlr/lib" so I set the CLASSPATH as
> 
> CLASSPATH=/usr/share/antlr/lib
> CLASSPATH=$CLASSPATH:/home/edcjones/cvlib/antlr/cgram/grammars
> CLASSPATH=$CLASSPATH:.
> export CLASSPATH
> 
> in my ".bash_profile". I get the well-known message
> "NoClassDefFoundError: antlr/Tool". Any suggestions?

I set CLASSPATH in ".bashrc" (not ".bash_profile") as

CLASSPATH=.:/usr/share/antlr/lib/antlr.jar
CLASSPATH=$CLASSPATH:/home/edcjones/cvlib/antlr/cgram/grammars
export CLASSPATH

Does the following completely define the process of setting the
CLASSPATH?

     In your ".bashrc" file include the lines:

     CLASSPATH=.:/path-to-antlr.jar-file/antlr.jar
     export CLASSPATH

     Add to the CLASSPATH any directories containing java programs 
     that need to be visible.

     Logout and logon again.

I have noted two things about Gentoo's version of antlr. First, Gentoo
creates a directory /usr/share/antlr/lib containing the three files
     antlr.debug.jar  antlr.jar  antlrall.jar
Second, Gentoo includes a patch named :antlr-2.7.2-gcc3-gentoo.patch":

diff -ur antlr-2.7.2a2~/lib/cpp/antlr/CharScanner.hpp
antlr-2.7.2a2/lib/cpp/antlr/CharScanner.hpp
--- antlr-2.7.2a2~/lib/cpp/antlr/CharScanner.hpp        2002-01-03
20:03:43.000000000 -0600
+++ antlr-2.7.2a2/lib/cpp/antlr/CharScanner.hpp 2003-01-12
11:41:51.000000000 -0600
@@ -44,6 +44,8 @@
 #include <antlr/LexerSharedInputState.hpp>
 #include <map>

+#include <ctype.h>
+
 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
 namespace antlr {
 #endif


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list