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 14:07:08 +0100

On 26 Feb 2007, at 02:02, Bob Rossi wrote:

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.

I think the normal thing would be to have '#include <string>' somewhere in the code parts of the Flex (.l) or Bison (.y) input files.

  Hans Aberg






reply via email to

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