[tree-ssa] Re: Doxy for tree-optimize.c

Daniel Berlin dberlin@dberlin.org
Wed Dec 11 20:18:00 GMT 2002


On Wednesday, December 11, 2002, at 10:59  PM, Bosscher Steven Civ 
USAFA/DFAN wrote:

>
> On Wednesday, December 11, 2002, Daniel Berlin wrote:
>
>> On Wednesday, December 11, 2002, at 07:42  PM, Diego Novillo wrote:
>>
>>> On Tue, 10 Dec 2002, Steven Bosscher wrote:
>>>
>>>> [ patches for tree-ssa.c and tree-cfg.c sent off-list to Diego. ]
>>>>
>>>>
>>> Thanks Steven.  It's really too bad that doxygen can't cope with
>>> K&R function declarations.
>>>
>>> Does anybody know how we could deal with this problem?  Doxygen
>>> refuses to add documentation for some of the functions.  We could
>>> fix this with a k&r to ansi filter, but a quick search hasn't
>>> produced anything useful.
>>
>> Err I sent you one that works fine for our purposes.  I've tried it on
>> all the tree* files, and it works.
>> Let me know if you need the latest version.
>
> Your filter works for me for K&R style function declarations. The 
> things
> that don't work for me are PARAMS(*) macros that span multiple lines, 
> such
> as in tree-dfa.c. I'm not a perl/sed hero, so if you have a quick fix 
> for
> that as well, would be appreciated ;-)

These are done with the sed part diego had done.
Unless i misread the sed manpage when i went to solve the same problem, 
there is no way to do multiline regexes in sed.
Since my filter works line by line, treating the file as an array, it's 
probably cleaner to just add another perl filter that removes the 
multiline params with the regex: s/<the params regex with all \( 
changed to (, all ( changed to \()>/sg (I *think* that's the way to 
tell perl to search and globally replace, and let . include newline)

undef $/ at the top of the file.

IE something like

undef $/
$a = <>;
$a =~ s/<the params regex ...>/sg;
print $a;
will probably do

>
> Also, Doxygen doesn't inline the whole function body in the HTML
> documentation with my configurarion. It leaves out all closing 
> brackets (}).
>
I have Diego's doxygen file, maybe we should add it to the branch?

> Greetz
> Steven
>



More information about the Gcc-patches mailing list