Null source transformer for C

Jon Leech jon at oddhack.Caltech.Edu
Sat Nov 1 11:37:28 AEST 1986


In article <5058 at brl-smoke.ARPA> jrv at MITRE-BEDFORD.ARPA (James R. Van Zandt) writes:
>Several times I've wanted to make a change to some C source code that
>would be minor, but requires parsing it.  Some examples are:
>
>       Remove all the comments.
>
>       Add a diagnostic printout at the beginning of each function.
>

>       replace the operators + - * / with equivalent function calls.
	
	Another example that I badly needed recently is a 'diff'-like program
driven by syntax rather than text; I had two divergent versions of a large
program with differing indentations, preprocessor usage, etc. The idea is
to build parse trees for two sets of source code and compare them function
by function at the syntax level, then reconstruct source code for the 


    -- Jon Leech (jon at csvax.caltech.edu || ...seismo!cit-vax!jon)
    Caltech Computer Science Graphics Group
    __@/



More information about the Comp.lang.c mailing list