automake
[Top][All Lists]
Advanced

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

Re: How to build several bison/flex parsers in one project?


From: Bob Rossi
Subject: Re: How to build several bison/flex parsers in one project?
Date: Sun, 10 Dec 2006 15:08:52 -0500
User-agent: Mutt/1.5.12-2006-07-14

On Sun, Dec 10, 2006 at 04:26:40PM +0100, Peter Simons wrote:
> Hi,
> 
> I'm having trouble figuring out how to build more than one
> flex/bison parser into the same binary without running into
> symbol conflicts. Originally, I used the "-p <prefix>" flag to
> bison and the "-P<prefix>" flag to flex to avoid this kind of
> problem, but Automake doesn't want me to use those flags.
> 
> So what else can I do?
> 
> The documentation provides a list of #defines that supposedly
> re-define all yy-style symbols to something else, but where do I
> put those defines if I want to build a parser that's based on
> flex? The example seems to assume I'm using only bison.
> 
> Any hints or illustrative Makefile.am snippets would be highly
> appreciated.

I don't think I did anything special in my Makefile.am. Instead, I put
something like this
  %option prefix="ada_"
and
  %option prefix="c_"
in my lexer files.

Bob Rossi




reply via email to

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