On Mon, Feb 26, 2007 at 12:19:18AM +0100, Hans Aberg wrote:
> On 25 Feb 2007, at 19:47, Bob Rossi wrote:
> >I see the problem now. I #include OutGrammar.h into Lexer.l.
> >OutGrammar.h has the C++ type (std::string) information in it.
> >
> >This causes a compile error when the C lexer (Lexer.c) is being
> >compiled. Is there a standard work around for this? I don't see any
> >obvious way to make Lexer.l turn into Lexer.cxx using automake.
> >Anyone know how?
> 
> Does file OutGrammar.h have '#include <string>' in it?

No, it does not. OutGrammar.h is generated from the %union in the
OutGrammar.y file. I figured out that if I changed the lexer file from
Lexer.l to Lexer.ll that it generates Lexer.cc instead of Lexer.c.

This solves my problem.

Thanks for your help,
Bob Rossi


_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to