Re: modified interpreter

new topic     » goto parent     » topic index » view thread      » older message » newer message

Kat wrote:
> 
> Has anyone else built a Eu modified interpreter which implements a 
> restricted goto like D, or Xbasic, or QWbasic, or mirc ? 
> 
> wanted:
> goto label
> goto variable 
> goto computed label -- goto 5 + variable
> 
> restrict:
> no goto into loops
> no goto into/outof proc/functions

Haven't done this yet, although after implementing the 'continue' statement,
I think it shouldn't be too difficult.  I implemented continue using the 
EXIT IL code, which is basically just a goto.  The most challenging part 
would be to implement the label mechanism itself.  Could you elaborate on 
'goto variable' and 'goto computed label'?  I'm guessing that the 
'goto variable' might be something like this:
:some_label
   puts(1, "Some label\n" )

   :another_label
   puts(1, "Another label\n" )

   g = "some_label"
   goto g -- same as goto "some_label"

I think that if I were implementing this, I'd make the argument for goto
be some sort of value (i.e., not a label bareword).  I'm not sure what
'goto 5 + variable' means, though.

> While you are at it, perhaps string execution?
> 
> This has nothing to do with OO.

OOEU has string execution (OOEU is really more than OO, even though that's 
the name I chose).  The latest release (v1.6.0) is at:
http://prdownloads.sourceforge.net/wxeuphoria/ooeu-src-1-6-0.zip?download

You don't need wxEuphoria unless you want to use the debugger.

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu