C syntax question

Marc Pawlowsky marcap at concour.CS.Concordia.CA
Mon May 22 15:14:53 AEST 1989


I am looking for a public-domain trace utility for C. e.g. say when a
statement is about to execute.  The normal way of doing this of course
is to insert fprintf statements where appropriate.  I also want to know
which sections of code have or have not been entered.

I am constructing my own tool to do this but have run into a problem.
How can I tell where the first executable statement is in a complex
statement.

e.g.

    ....
    void foo(int a)
    {
      declaration list     
      statement list
    }

How do I know where the statement list begins?  In PASCAL it would be
after a BEGIN.  

Is there a quick way of doing this, other than to write the first
pass of a compiler?



More information about the Comp.lang.c mailing list