[Top][All Lists]

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

Re: %include

From: Akim Demaille
Subject: Re: %include
Date: Sun, 30 Sep 2018 09:01:48 +0200

Hi Bruce,

> Le 29 sept. 2018 à 18:47, Bruce Mardle <address@hidden> a écrit :
> Hi, Akim (or anyone!). Since you’re on a bison-altering binge,

Learning English every day :)

> would it be possible to implement a ‘%include' directive?
> It would make my most recent bison-using project less confusing.

It’s been on my todo list for years…  Yes, it would be good
to have something like that.  However, as a C/C++ programmer,
I have learnt to hate the concept of include, waiting eagerly
for import.

For instance I would be happier if we had some form of scoping.
For instance, maybe not all the nonterminals should be exposed
from the imported grammar file to the importing one.  Maybe
too we should try to see if we can keep the precedence/associativity
directives local to each subgrammar (currently there’s a single
’scale’ of precedences and precedences of the subgrammars would
have ’naturally’ more precedence than that of the including

I have not really started to thinking about this, but I’d prefer
that we explore the idea a bit before committing ourselves to yet
another #include.

> Other 'yaccs' have it.

It would be interesting to see how others have done this: what
tools are you thinking about?

PS/ I do not intend to work on this right now.  I want to finish
3.2 first, which is about (i) move semantics in C++, (ii) clean
up the handling of the generated files in C++, and (iii) I should
also improve the documentation.

Minor features could embark in 3.2, but not something as exploratory
as include/import.

reply via email to

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