[Top][All Lists]

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

Re: How to modularize bison files?

From: Akim Demaille
Subject: Re: How to modularize bison files?
Date: Mon, 7 Jan 2019 19:42:03 +0100


> Le 6 janv. 2019 à 16:24, Peng Yu <address@hidden> a écrit :
>> So far, there's no way to get a modular description of the grammar.
>> There is definitely interest for it, but a clean solution remains
>> to be designed.
> Why is it so? Is because the grammar spec usually is not a DAG?

It's straightforward to do something "dumb" (just pasting chunks
of files together, a la #include), but I would like to explore
better approaches.  Bison is 30 years old, it can wait a bit more :)

>> I'm worried though: this file is has plenty of K&R C, yet Bison
>> generates parsers in ANSI C.  Am I missing something?
> The rest code of bash seem to be in K&R style. Maybe the authors want the
> style to be consistent?

My point is: what's the point of keeping K&R if in practice ISO-C
is required because of Bison.  My worry being: maybe they don't want
to use recent features of Bison but limit themselves to what older
versions of Bison, that generate K&R compliant code, supported.

reply via email to

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