LZ-Adv: Re: ZShell Adv.


[Prev][Next][Index][Thread]

LZ-Adv: Re: ZShell Adv.



I finally read this message, and being the stickler for details that I 
sometimes am, I'd like to point out an inaccuracy. A parser does not run a 
program. It prepares it for compiling or interpreting/evaluating. Essentially, 


it goes through the code and turns it into a binary tree.


Simple example in pseudobasic (I hope this doesn't get butchered):
A semicolon is being used as a statement separator. Basic usually uses a 
newline for this.


	Clearscreen;
	Print "Hi";
	End;


Would be turned into:


      Separator
      /             \
Clearscreen   Separator
   /   \              /         \
                  Print      Separator
                    /  \           /    \
                  "Hi"         End


Writing a parser can be tricky, but not terrible. Afterwards, writing an 
interpreter/evaluator is somewhat simple, in comparison. I've never tried to 
make a compiler.
--Micah




----------
From: 	owner-lz-adv@lists.ticalc.org on behalf of Jason C. Wenger
Sent: 	Sunday, October 20, 1996 2:20 PM
To: 	lz-adv@lists.ticalc.org
Subject: 	LZ-Adv: Re: ZShell Adv.


>A parser is a program that searches through code and
>converts/compiles/assembles it.  A basic parser would take a basic
program
>and run it.  It would output when it saw 'print' etc.


Sounds tough.  Tokenization would cause some problems, too.


I wonder if ther's a way to call the ROM code for this?




>I have never seen this 'ZSHELL.DOC' file before, can you email it to
>me?  Thanks a lot!  My address is cjo@pobox.com.


It's in the ZSHELL40.ZIP file.




Jason "Thursday" Wenger
jwenger@juno.com
Illegitimi no carborundum


References: