[comp.compilers] A source to source Instrumenter

sharma@sp30.csrd.uiuc.edu (Sanjay Sharma) (05/20/91)

	I am not sure that this is the right group to post this note.  I am
looking for a tool which wiil take a fortran application written in fortran
77 and will annotate the code marking all loops, conditional statements and
function/subroutine entry/exit statements preserving the user comments as
well. I would like to do the same for a 'C' application.  The platform will
be a machine running UNIX OS. I think the tool would be based on "lex and/or
yacc".

	Do any of you know about such a tool/tools in public domain, or if 
you folks can suggest some pointers.

Any help would be greatly appreciated.

--sanajy sharma
[There are several C and Fortran parsers available.  See the comp.compilers
monthly posting for details.  I wouldn't think it'd be hard to have them
dump out naive flow analysis, though discovering loops constructed from
GOTOs and mapping that back to the source would be somewhat harder. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.