[racket] Simple Scheme Interpreter written in Drracket

From: Peter Breitsprecher (pkbreits at lakeheadu.ca)
Date: Tue Nov 9 14:48:37 EST 2010

I am in the process of writing a simple scheme interpreter for a class I
have.  I am running into an issue with regards to parsing the input
properly.  I will try and explain what I want to do and tell me if I am way
off base or not.  I have a procedure set up to read the input from the
user.  Which is just a simple display read function.  I want to pass that
read value in, and then read it character by character.  If it is a "(" then
up a counter(to make sure there is an equal number of ")", if it is a
number, i want to read the number and store it into a variable, and if it is
an operator I want to pass the variables to the proper functions I have
written to evaluate the input.

I'm really stuck at step 2...  I can read the input, however I can't seem to
pass that input to another function and then break it down character by
character.. I thought read-char should do it, but it only seems to work if
it is in the function to read the input..  and it doesn't seem to work if
passed to another function..

Anyone have any ideas?

BTW for extra information it just has to be a very simple interpreter that
will evaluate True, False, Car, Cdr, Cons, atom, eq, null, int, plus, minus,
times, less, greater cond, quote and define...

And help would be appreciated

-- 
Kurt Breitsprecher
(807) 474-9601
pkbreits at lakeheadu.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101109/71b1bd5f/attachment.html>

Posted on the users mailing list.