|Interpreted Basic control-flow analysis firstname.lastname@example.org (Arthur J. O'Dwyer) (2006-07-05)|
|Re: Interpreted Basic control-flow analysis DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-07-06)|
|Re: Interpreted Basic control-flow analysis email@example.com (Chris Dollin) (2006-07-06)|
|Re: Interpreted Basic control-flow analysis firstname.lastname@example.org (Arthur J. O'Dwyer) (2006-07-06)|
|From:||Chris Dollin <email@example.com>|
|Date:||6 Jul 2006 08:58:14 -0400|
|Organization:||HP labs, Bristol|
Hans-Peter Diettrich wrote:
> "Arthur J. O'Dwyer" wrote:
>> The runtime nesting of control structures isn't
>> necessarily reflected by a lexical nesting.
> How that?
> AFAIK most BASIC interpreters embed links to related code places,
> whenever a jump is required (at the end of a loop, before an ELSE...),
> and do not rely on any kind of control stack. These references are
> updated before the start of a program, based on a static analysis of the
The BBC Basic interpreters (both the original Beeb ones and the
ARM-based ones) used dynamic control stacks for at least some of the
control structures. You could, for example, exit a procedure (with
ENDPROC) but still be "inside" a FOR loop.
So maybe /most/ Basic interpreters do it by static analysis, but /some/
don't, and presumably Arthur's  Basic is one of those.
 A highly appropriate name in this context!
Chris "once an Arc user" Dollin
"People are part of the design. It's dangerous to forget that." /Star Cops/
Return to the
Search the comp.compilers archives again.