> Le 3 juil. 2018 à 01:39, Egor Pugin <egor.pu...@gmail.com> a écrit : > > Hi,
Hi Egor, > I'm looking for something like C includes but for bison files before > any m4 procesing or expanding. > Is there any such facilities currently or could it be implemented? > How do you like the idea? > I could manually prepocess files, but wanted something more builtin. > > I have several bison parsers which could be included partly into each other. > For example, there are many common terminals and non-terminal that > later form different grammars. > I'd like to reuse them instead of manually changing two or more files. > > I imagine this as like there %include declaration which is processed > before other parts and behave like C/C++ #incudes. > > In big.yy: > ... > %% > file: ... EOQ > ... > %include "common_parts.yy" // any ext > ... > %% > > And we invoke bison with something like > bison … -Ipath/to/dir/with/includes big.yy This is definitely something that we wanted for years. What we lack is time to implement it. Or someone willing to do it (read my mind ;-). _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison