Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!hsdndev!spdcc!iecc!compilers-sender From: sharma@sp30.csrd.uiuc.edu (Sanjay Sharma) Newsgroups: comp.compilers Subject: A source to source Instrumenter Keywords: Fortran, C, question Message-ID: <91-05-090@comp.compilers> Date: 20 May 91 16:59:39 GMT Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: sharma@sp30.csrd.uiuc.edu (Sanjay Sharma) Organization: Center for Supercomputing Research and Development Lines: 22 Approved: compilers@iecc.cambridge.ma.us 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.