Re: Translating from language which allows Goto's

"norm@plumpirate.com" <channahr@comcast.net>
25 Jul 2003 21:20:12 -0400

          From comp.compilers

Related articles
Translating from lagugae which allows Goto's dana.subscriptions@virgin.net (Dana Freer) (2003-07-04)
Re: Translating from language which allows Goto's Thomas.Schneider@donauland.at (2003-07-13)
Re: Translating from language which allows Goto's mcintosh@mc-pc.research.telcordia.com (2003-07-13)
Re: Translating from language which allows Goto's dmr@bell-labs.com (Dennis Ritchie) (2003-07-15)
Re: Translating from language which allows Goto's nmm1@cus.cam.ac.uk (2003-07-21)
Re: Translating from lagugae which allows Goto's Martin.Ward@durham.ac.uk (Martin Ward) (2003-07-21)
Re: Translating from language which allows Goto's bettini@dsi.unifi.it (Lorenzo Bettini) (2003-07-21)
Re: Translating from language which allows Goto's channahr@comcast.net (norm@plumpirate.com) (2003-07-25)
| List of all articles for this month |

From: "norm@plumpirate.com" <channahr@comcast.net>
Newsgroups: comp.compilers
Date: 25 Jul 2003 21:20:12 -0400
Organization: Comcast Online
References: 03-07-042 03-07-142
Keywords: analysis
Posted-Date: 25 Jul 2003 21:20:12 EDT

> It is always possible to remove GOTOs by adding a flag variable (which
> records which statement is to be executed next) and turning the whole
> program into a giant finite state machine. But I imagine that what
> you want is nice structured code, but with the GOTOs removed! ...


I would suggest the simple algorithm given in:


http://citeseer.nj.nec.com/erosa95gotoelimination.html


Of all the assorted schemes that translate gotos this one has always seemed
to me to be the simplest to implement
You will need to set up the some data structures , like a control flow
graph.



Post a followup to this message

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