building a modified GNU bison on Debian

Basile STARYNKEVITCH <[email protected]> Fri, 18 Oct 2024 10:19:52 +0200
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hello all (from France)

FWIW, I have been many years ago a contributor to GCC. 
https://gcc.gnu.org/legacy-ml/gcc/2006-12/msg00008.html

Now I am retired (part time teaching Ocaml at Univ Paris 6) but still 
coding smaller open source projects. My current one is the RefPerSys 
<http://refpersys.org/> inference engine (GPLv3+) on github 
<https://github.com/RefPerSys/RefPerSys/>. It is developed on my 
Debian/Trixie/x86-64 desktop at home. I have a few informal contributors.

(RefPerSys is not yet funded and aims to become a better than CLIPSrules 
inference engine)

So I git cloned GNU bison to 
https://github.com/bstarynk/misc-basile/tree/master/bison-refpersys

Perhaps I was wrong in copying it in some existing repository 
https://github.com/bstarynk/misc-basile ? If that is the case please tell!

I am simply adding (to bison-refpersys/src/print.h) a few C macros 
emitting comments:

>
> #define PRINT_FROM_COMMENT(Fil) do{fprintf(Fil,"//§ from %s@%s:%d\n", \
>     __FUNC__, __FILE__, __LINE__);} while(0)
>
> #define OBSTACK_PRINT_FROM_COMMENT(Obs) do{obstack_fprintf(Obs,    \
>     "//§ from %s@%s:%d\n",                       \
>     __FUNC__, __FILE__, __LINE__);} while(0)

and patched also the bison-refpersys/src/print.c and 
bison-refpersys/src/output.c and bison-refpersys/src/print.h files to 
use them.

With the hope that emitting useless C (or C++) comments won't harm that 
bison-refpersys.

But I am unable to build that modified bison-refpersys on my Debian laptop?

In RefPerSys we have a precise garbage collector and runtime generation 
of C++ code (taking ideas from https://arxiv.org/pdf/1109.0779 ...) so I 
think we need to improve GNU bison to generate C++ code compatible with 
our garbage collector.

Your help is appreciated.

Regards.

-- 
Basile STARYNKEVITCH<[email protected]>
8 rue de la Faïencerie
92340 Bourg-la-Reine           mobile: +33 6 8501 2359
Francehttp://starynkevitch.net/Basile/