Taras wrote:
I might be the only person out there who likes GTY annotations. The fact that gengtype has a separate parser is highly inconvenient. Why not use the GCC C/C++ parser on gengtype? It seems that with some refactoring, it should be possible to bootstrap just the C++ parser( without memory management or maybe some minimal handwritten stuff).


It is even simpler (and I do similar tricks in the MELT branch).

If we do use the GCC parser in replacement of gengtype (I also wish that change) we just have to permanently store the generated stuff into our SVN repository. (where configure scripts are also big generated stuff).

I do exactly this in my MELT branch:

the warm-basilys-0.c is machine generated (and is compiled into warm-basilys-0.so plugin at build time) and inside the SVN repository. It is probably the biggest C file there...

the warm-basilys-1.c is produced from warm-basilys.bysl using warm-basilys-0.so at build time and compiles to warm-basilys-1.so

Likewise, warm-basilys-2.c produced from warm-basilys.bysl using warm-basilys-1.so

And so forth, for warm-basilys-3.c (using warm-basilys-2.so) warm-basilys-4.c & warm-basilys-5.c

a special make target (upgrade-warm-basilys) copies warm-basilys-4.c into warm-basilys-0.c in the source tree.

Right now, I am splitting warm-basilys.bysl into several files, to have several (but each smaller) generated files.


So to use GCC for replacement of gengtype:

the somehow hard part is to code the stuff (perhaps a plugin?) taking the role on gengtype.

No particular bootstrap problem, just store the generated file in the repository (like configure scripts are already).

Regards.
--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to