bison-patches
[Top][All Lists]
Advanced

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

Re: Initial %include implementation


From: Akim Demaille
Subject: Re: Initial %include implementation
Date: Sat, 10 Nov 2018 12:10:56 +0100

Hi Egor,

> Le 8 nov. 2018 à 23:24, Egor Pugin <address@hidden> a écrit :
> 
> Hi,
> 
> I’d like to send initial %include implementation.

Nice job!

> For some reason I did not succeed in inserting %include into the
> grammar part - so I commented %empty block in epiloque.opt.
> Error was:
> parse-gram.y:779.3-8: error: rule useless in parser due to conflicts
> [-Werror=other]
>   %empty
>   ^^^^^^
> 
> This is not right, maybe someone could help me or fix it in further patches.
> 
> I did couple of fast tests locally, but did not include any in the patch yet.
> Also I disable some caret code which becomes incorrect with this dummy
> implementation.
> (I'm very new to C and bison internals. My primary OS is Windows, so

Personally, I’m not fond of %include, that’s not what I would like to
have in Bison.  Let '#include' die, welcome ‘import'.

That’s not just a change of keyword, that’s a different goal:

- be able to scope symbol names and export selectively what the
  subgrammar wants to expose

- a means to avoid accidental precedence ordering because a
  file was loaded before another

There are probably other issues to consider.

So your attempt is very interesting, it explores something we’ve not
done already, but IMHO, that’s not the track we should follow.


reply via email to

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