|eliminating GOTOs P.G.Hamer@bnr.co.uk (1993-05-27)|
|Re: eliminating GOTOs email@example.com (1993-05-27)|
|Re: eliminating GOTOs firstname.lastname@example.org (1993-05-27)|
|Re: eliminating GOTOs email@example.com (1993-05-28)|
|Re: eliminating GOTOs firstname.lastname@example.org (1993-05-28)|
|Re: eliminating GOTOs email@example.com (1993-05-28)|
|Re: eliminating GOTOs firstname.lastname@example.org (1993-05-29)|
|[1 later articles]|
|From:||P.G.Hamer@bnr.co.uk (Peter Hamer)|
|Keywords:||theory, design, question|
|Organization:||BNR Europe Ltd, London Road, Harlow, England.|
|Date:||Thu, 27 May 1993 10:54:50 GMT|
Can anybody point me at algorithms for removing GOTOs from programs?
Sounds a bit silly, but it has come up when converting some algorithms
from an intermediate format into a proprietary language with "structured
constructs" and "exit" but no GOTO.
Obviously Djikstra's algorithm serves as an existence proof; loop round
one big case statement indexed by a variable representing the program
Identifying simple "structured" situations is obviously easy. More
difficult cases where code may need to be duplicated (or moved into
procedures) probably aren't too difficult *in isolation*. But I would
really like to find an algorithm that would handle the general case (ie
Return to the
Search the comp.compilers archives again.