Re: Source to source compiling

Robert Bernecky <bernecky@eecg.toronto.edu>
Sun, 18 Sep 1994 04:14:39 GMT

          From comp.compilers

Related articles
Source to source compiling casper@snakemail.hut.fi (Casper Gripenberg) (1994-09-11)
Re: Source to source compiling eanders+@CMU.EDU (Eric A. Anderson) (1994-09-12)
Re: Source to source compiling norman@flaubert.bellcore.com (1994-09-14)
Re: Source to source compiling mabp@bga.com (1994-09-13)
Re: Source to source compiling f1rederc@iia.org (1994-09-13)
Re: source to source compiling ghiya@vani.cs.mcgill.ca (1994-09-18)
Re: Source to source compiling bernecky@eecg.toronto.edu (Robert Bernecky) (1994-09-18)
Re: Source to source compiling toconnor@vcd.hp.com (1994-09-18)
Re: Source to source compiling pjj@cs.man.ac.uk (1994-09-16)
Re: Source to source compiling rgg@tidos.tid.es (1994-09-19)
Re: Source to source compiling lexa@adam.botik.yaroslavl.su (1994-09-22)
Re: Source to source compiling md@pact.srf.ac.uk (1994-09-22)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Robert Bernecky <bernecky@eecg.toronto.edu>
Keywords: translator, optimize
Organization: University of Toronto, Computer Engineering
References: 94-09-031 94-09-057
Date: Sun, 18 Sep 1994 04:14:39 GMT

Casper Gripenberg <casper@snakemail.hut.fi> wrote:
>Now the problem is that I don't know how to convert these conditional goto
>statements in the source language to while/if-then-else constructs in the
>destination language.


Another well-written, clear article is:


Taming Control Flow: A Structured Approach to Eliminating GOTO
Statements.


Ana M. Erosa and Laurie J. Hendren


ACAPS Technical Memo 76


McGill University


{part of abstract}
    ...we present a straight-forward algorithm to structure C programs
    by eliminating all GOTO statements. The method works directly on
    the high-level abstract syntax tree representation of the program
    and could be easily integrated into any compiler that uses an
    AST-based intermediate representation. The actual algorithm works
    by eliminating each GOTO by first applying a sequence of "goto-movement"
    transformations followed by the appropriate "goto-elimination"
    transformation.


    ... the method is both efficient and effective.




/rbe
--


Post a followup to this message

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