[antlr-interest] compiling output

ronald.petty at milliman.com ronald.petty at milliman.com
Fri Apr 2 08:35:14 PST 2004


If Antlr produces a lexer/parser, is it ok to expect it will compile 
without errors?  I am probably doing something wrong, so here is a 
description.

Download Antrl (tar) for cygwin (v 2.7.2)
extract to c:\antlr-2.7.2
open cygwin bash
cd /cygdrive/c/antlr-2.7.2
export CLASSPATH=.
find | grep java.g
./examples/cpp/java/java.g
cp ./examples/cpp/java/java.g .
java antlr.Tool java.g
gcc *.cpp
... 
millions of lines fly by (errors)
try
gcc *.cpp >& errors
head errors
$ head errors
In file included from JavaLexer.cpp:2:
JavaLexer.hpp:4:28: antlr/config.hpp: No such file or directory
JavaLexer.hpp:6:33: antlr/CommonToken.hpp: No such file or directory
JavaLexer.hpp:7:33: antlr/InputBuffer.hpp: No such file or directory
JavaLexer.hpp:8:28: antlr/BitSet.hpp: No such file or directory
JavaLexer.hpp:10:33: antlr/CharScanner.hpp: No such file or directory
In file included from JavaLexer.cpp:2:
JavaLexer.hpp:11: parse error before `antlr'
JavaLexer.hpp:24: `antlr' was not declared in this scope
JavaLexer.hpp:24: parse error before `&' token
.....
I assume I am not using gcc correctly (assuming I didn't incorrectly use 
Antlr).

Does that sound correct?  I have never had a working lexer, so I don't 
know?

Thanks
Ron


**************************************************************************************
This communication is intended solely for the addressee and is
confidential. If you are not the intended recipient, any disclosure, 
copying, distribution or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. Unless indicated
to the contrary: it does not constitute professional advice or 
opinions upon which reliance may be made by the addressee or any
other party, and it should be considered to be a work in progress.
**************************************************************************************



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list