This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Advanced diff with gcc...


Fabrizio Morbini <fabrizio.morbini@libero.it> writes:

> Hi, I write you for post an ideaa: what do you think about adding an
> option (for example --diff) to the gcc compiler that can do an
> advanced diff (and very specializzed to the language of the files to
> compare).
> 
> For example a command like this "gcc --diff file1.c file2.c" run the
> gcc parser on the two files and use the tree computed by the parser
> to print a very intelligent diff to the .
> 
> Thank you very much for any answer and Best Regards.

A more general purpose tool would include modifying gcc to emit the
parse tree in some standard format, say XML with a well defined
schema.

The parse trees of two files could then be compared with another tool
which parsed and compared the XML parse tree output.

-- 
Ricardo Anguiano
http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]