On 03/17/2017 02:51 AM, David Malcolm wrote: Hello.
I've just tested you patches and I can confirm that they work :) I've got couple of related questions: > It's possible to run GCC's sources through Doxygen by setting > INPUT_FILTER = contrib/filter_gcc_for_doxygen > within contrib/gcc.doxy and invoking doxygen on the latter file. Why do we not make a default for OUTPUT_DIRECTORY and INPUT_FILTER ? I would expect people are running doxygen from GCC root folder. > > The script filters out various preprocessor constructs from GCC > sources before Doxygen tries to parse them (e.g. GTY tags). > > As-is, the script has some limitations, so as enabling work for > fixing them, this patch reimplements the support script > contrib/filter_params.pl in Python, effectively using the same > regexes, but porting them from Perl to Python syntax, adding comments, > and a unit-test suite. You were not brave enough to port remaining pattern in contrib/filter_knr2ansi.pl, right :) ? Thanks for that, I've got 2 follow-up patches that I'll link to this thread. Martin > > This is a revised version of a patch I posted ~3.5 years ago: > https://gcc.gnu.org/ml/gcc-patches/2013-10/msg02728.html > with the difference that in this patch I'm attempting to > faithfully reimplement the behavior of the Perl script, leaving > bugfixes to followups (in the earlier version I combined the > port with some behavior changes). > > I've tested it by running some source files through both scripts > and manually verifying that the output was identical for both > implementations. apart from the Python implementation adding a > harmless trailing newline at the end of the file. > > The unit tests pass for both Python 2 and Python 3 (tested > with 2.7.5 and 3.3.2). > > OK for trunk?