Re: C -> C Compiler

"Ira D. Baxter" <>
6 Mar 2000 23:40:07 -0500

          From comp.compilers

Related articles
C -> C Compiler (Dominic Morris) (2000-03-06)
Re: C -> C Compiler (Ira D. Baxter) (2000-03-06)
| List of all articles for this month |

From: "Ira D. Baxter" <>
Newsgroups: comp.compilers
Date: 6 Mar 2000 23:40:07 -0500
Organization: Posted via Supernews,
References: 00-03-020
Keywords: C

The DMS Reengineering Toolkit
( can be used
for this purpose. You can write many transforms directly in the
surface syntax of "C", that are applied to a parse tree; the result is
prettyprinted. For a very simple example, to fold nested if
statements together, you can write a rule (untested) as follows:

default base domain Cpp. // says we are working in the C++ domain

rule fold_nested_if(c1:condition,c2:condition,s:statement)
selection_statement -> selection_statement
        = "if (\c1) if{\c2) \s;" rewrites to "if (\c1 && \c2) \s;"

Ira Baxter, Ph.D., CTO 512-250-1018x140
Semantic Designs, Inc., FAX 512-250-1191
12636 Research Blvd #C214, Austin, Texas 78759

Dominic Morris <> wrote in message
> Would someone point me in the direction of an optimizing C -> C
> compiler i.e. one that takes in a source file and then emits an
> optimized source file, assuming that such a program is freely
> available.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.