bug-bison
[Top][All Lists]
Advanced

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

GNU bison suggestion: some include directive.


From: Basile Starynkevitch
Subject: GNU bison suggestion: some include directive.
Date: Wed, 9 Aug 2023 12:36:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Hello all,


In some cases, a GNU bison input grammar might be a too big file, and it would be convenient to have some include directive (à la GNU cpp) in it.


Spliting a large grammar file into several pieces is convenient, for software engineering reasons (exactly for the same reason, C and C++ have #include....)


My suggestion is to add some new feature to the GNU bison syntax:

If an input line starts with %+ followed by a file path, the content of that file is included at that place.

I would even like to include a popen-ed output, if explicitly allowed by a --popen-allowed program option. Then %| would popen the command and include it.

Is that suggestion interesting someone?

(it would be very useful in the RefPerSys open source -GPLv3+ licensed- inference engine project on https://github.com/RefPerSys/RefPerSys/ ....)


Regards

--
Basile Starynkevitch                  <basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/




reply via email to

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