Re: Translating from lagugae which allows Goto's

vbdis@aol.com (VBDis)
17 Jul 2003 00:35:45 -0400

          From comp.compilers

Related articles
[4 earlier articles]
Re: Translating from lagugae which allows Goto's bsheff2@yahoo.com (Bob Sheff) (2003-07-15)
Re: Translating from lagugae which allows Goto's postmaster@paul.washington.dc.us (Paul Robinson) (2003-07-15)
Re: Translating from lagugae which allows Goto's genew@mail.ocis.net (2003-07-15)
Re: Translating from lagugae which allows Goto's lex@cc.gatech.edu (Lex Spoon) (2003-07-17)
Re: Translating from lagugae which allows Goto's nmm1@cus.cam.ac.uk (2003-07-17)
Re: Translating from lagugae which allows Goto's joachim.durchholz@web.de (Joachim Durchholz) (2003-07-17)
Re: Translating from lagugae which allows Goto's vbdis@aol.com (2003-07-17)
Re: Translating from lagugae which allows Goto's Martin.Ward@durham.ac.uk (Martin Ward) (2003-07-21)
Re: Translating from lagugae which allows Goto's strohm@airmail.net (John R. Strohm) (2003-07-21)
| List of all articles for this month |

From: vbdis@aol.com (VBDis)
Newsgroups: comp.compilers
Date: 17 Jul 2003 00:35:45 -0400
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
References: 03-07-042
Keywords: analysis
Posted-Date: 17 Jul 2003 00:35:45 EDT

  "Dana Freer" <dana.subscriptions@virgin.net> schreibt:


>I am not a compiler writer but have the task of writing a tranlslator to
>convert from a language which allows GOTO, GOSUB, RETURN into a language
>(like VbScript) which does not alllow GOTO etc.


Have a look at the thesis of Cristina Cifuentes, about
decompilation. A cross compiler is very similar to a decompiler, with
only different kind of input. The interesting part is the
construction and usage of Control Flow Graphs. If a CFG is reducible,
then it can be rewritten without GOTO, without human
intervention. There exist techniques to make an CFG reducible, like
node splitting and moving the affected nodes into subroutines.


A language without subroutines is not a very appropriate target for
cross compilation, when the source uses subroutines and calls each
from more than one place. Then the translated code will at least
become unreadable, as already outlined by other contributors.


DoDi


Post a followup to this message

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