Just another user here. I'm not a fan of Python and I don't want it added as a dependency to my favorite compiler. If I would build a minimal system with a toolchain, I wouldn't want Python to be a mandatory component, so please don't. Thanks.
P.S. I don't mind Perl. It's a legacy tool next to Awk. On Tue, Jul 17, 2018, 8:49 PM Martin Liška <mli...@suse.cz> wrote: > Hi. > > I've recently touched AWK option generate machinery and it's quite > unpleasant > to make any adjustments. My question is simple: can we starting using a > scripting > language like Python and replace usage of the AWK scripts? It's probably > question > for Steering committee, but I would like to see feedback from community. > > There are some bulletins why I would like to replace current AWK scripts: > > 1) gcc/optc-save-gen.awk is full of copy&pasted code, due to lack of flags > type classes multiple > global variables are created (var_opt_char, var_opt_string, ...) > > 2) similar happens in gcc/opth-gen.awk > > 3) we do very many regex matches (mainly in gcc/opt-functions.awk), I > believe > we should come up with a structured option format that will make > parsing and > processing much simpler. > > 4) we can come up with new sanity checks of options: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81397 > > 5) there are various targets that generate *.opt files, one example is ARM: > gcc/config/arm/parsecpu.awk > > where transforms: > ./gcc/config/arm/arm-cpus.in > > I guess having a well-defined structured format for *.opt files will make > it easier to write generated opt files? > > I'm attaching a prototype that can transform optionlist into options-save.c > that can be compiled and works. > > I'm looking forward to a feedback. > Martin >