help-bison
[Top][All Lists]
Advanced

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

Re: How to modularize bison files?


From: Peng Yu
Subject: Re: How to modularize bison files?
Date: Sun, 6 Jan 2019 09:03:04 -0600

On Sun, Jan 6, 2019 at 8:45 AM John P. Hartmann <address@hidden>
wrote:

> Your concern is with managing such a large grammar, right?


Yes. Mainly for testing.

There is no law against splitting the larger productions into separate
> files and use the C preprocessor before passing the file to Bison.  You
> would likely write skeleton grammars to process specific productions.
>
> Another tack is to #include [parts of] semantic large routines that do
> not require expansion of $n or @n; or you could put those functions in a
> separate file and #include that (my preference)--the compiler will know
> when to inline those functions.


Do you know where I can find some examples showing the above thing that you
mentioned? Thanks.
-- 
Regards,
Peng


reply via email to

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