filter_params.pl 392 B

123456789101112131415
  1. #!/usr/bin/perl
  2. # Filters out some of the #defines used throughout the GCC sources:
  3. # - GTY(()) marks declarations for gengtype.c
  4. # - PARAMS(()) is used for K&R compatibility. See ansidecl.h.
  5. while (<>) {
  6. s/^\/\* /\/\*\* \@verbatim /;
  7. s/\*\// \@endverbatim \*\//;
  8. s/GTY[ \t]*\(\(.*\)\)//g;
  9. s/[ \t]ATTRIBUTE_UNUSED//g;
  10. s/PARAMS[ \t]*\(\((.*?)\)\)/\($1\)/sg;
  11. print;
  12. }