help-bison
[Top][All Lists]
Advanced

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

Re: Problems with multithreading and slow compilation


From: Hans Aberg
Subject: Re: Problems with multithreading and slow compilation
Date: Wed, 7 Jul 2004 19:01:48 +0200

At 01:41 +0200 2004/07/07, Laurence Finston wrote:
>I'm also having problems with having to wait a long time while the
>C++ file generated by Bison compiles.

What C++ file are you speaking about: The C one compiled as C++, the one
that comes with the distribution, the one I wrote, or someone else.

>  I've been meaning to try to put
>more code for the actions into functions to see if this will help,
>but since the return values of the functions must be tested in the rules,
>it makes things more complicated and interferes with hacking.

I am not sure what you mean here: Under C++, I try to put as much action
code as possible into functions. As long as you do not change the header
files of the functions and classes you call, the parser unit need only know
these prototypes.

>What I'd like is a way of breaking up the actions for the rules into
>multiple compilation units, so that only the parts that have changed
>will need to be recompiled.  Is this something the Bison developers
>might consider implementing?

This is not possible, as the main portion of the parser actions is one
gigantic switch statement. If you do not want a lot of compilation, put a
function in each action instead.

>Have other users been having similar problems?

It sounds as though you have put too much code into the actions. As an
alternative, get hold of a faster computer. :-)

  Hans Aberg






reply via email to

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