view contrib/filter_params.pl @ 8:5066dc73ff8f

xxx
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 20 Aug 2009 19:10:35 +0900
parents a06113de4d67
children
line wrap: on
line source

#!/usr/bin/perl

# Filters out some of the #defines used throughout the GCC sources:
# - GTY(()) marks declarations for gengtype.c
# - PARAMS(()) is used for K&R compatibility. See ansidecl.h.

while (<>) {
    s/^\/\* /\/\*\* \@verbatim /;
    s/\*\// \@endverbatim \*\//;
    s/GTY[ \t]*\(\(.*\)\)//g;
    s/[ \t]ATTRIBUTE_UNUSED//g;
    s/PARAMS[ \t]*\(\((.*?)\)\)/\($1\)/sg;
    print;
}