help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use C++ types in '%union declaration'


From: Hans Aberg
Subject: Re: How to use C++ types in '%union declaration'
Date: Mon, 26 Feb 2007 00:19:18 +0100

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?

Also type std::string is template. Some compilers (particularly in the past) may cause error if there has been no use of the type before used as a pointer, due to poor template expansion. So then one try yo put in a declaration of some sort.

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]