[Top][All Lists]

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

Re: bison 2.6.2 generates incompatible header file

From: Frank Heckenbach
Subject: Re: bison 2.6.2 generates incompatible header file
Date: Thu, 18 Oct 2012 23:22:59 +0200

Bill Allombert wrote:

> On Thu, Oct 18, 2012 at 06:52:41PM +0200, Frank Heckenbach wrote:
> > Bill Allombert wrote:
> > 
> > We do compile our Bison output with g++ (yes, we should probably use
> > the C++ skeleton, but we haven't gotten around to it yet), and we
> > don't use extern "C" -- in fact we use two different parsers in one
> > executable and we put them in different C++ namespaces to avoid
> > conflicts. (After the recent changes, this may no more be necessary
> > as I understand, we'll have to check this after an upgrade ...)
> How do you put them in separate namespace ?



#define IN_BISON

#include "foo.h"

namespace foo

// some declarations, including yyerror


// grammar and everything



#include <...>

namespace foo

// various other declarations

#ifndef IN_BISON
int yyparse (...);


Not sure if it's supposed to work like this, but currently it does. :)


reply via email to

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