realbasic-nug
[Top] [All Lists]

Re: More On BASIC interpreter

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: More On BASIC interpreter
From: Noah Desch <noahdesch at erols dot com>
Date: Tue, 29 May 2001 17:37:18 -0400

On Tuesday, May 29, 2001, at 01:21  AM, Chris Dillman wrote:

Im thinking of doing more preprocessing and or possibly
turning the tokens into a kind of byte code of numbers....

aka IF would equal 1 etc.

I could modify the interpreter to use only numbers
this would cut out all the string comparisions...

Trade off the code would get kind of ugly fast
with out a lot of comments.

This would probably offer your best solution. The code would not need to get ugly, just define a bunch of constants. Make a module called ScriptingConstants or something and make a bunch of integers. For example:

kCmd_If = 1
kCmd_Else = 2
kCmd_Endif = 3
etc.


-Noah Desch
Wireframe Software
http://wireframe.virtualave.net



<Prev in Thread] Current Thread [Next in Thread>