[racket] Code Error Creating List
On Wed, May 18, 2011 at 5:50 PM, Todd Dobmeyer <dobmeyer.2 at wright.edu> wrote:
>
> As far as Marco's comments earlier, I should have one function to handle
> parsing the list, and upon finding an expression, pass it to the procedure
> that handles expressions instead of trying to handle it all in the same
> procedure. This makes sense.
>
No, that is not what I said. Parse first and then another function can
manipulate the parse tree. Perhaps it is easier to think of it this
way: every function should have a clear purpose. I would strongly
suggest having a function for parsing your input program. Once you
have an abstract syntax tree, you could have a function to evaluate
the abstract syntax tree (e.g. value-of in EOPL). I suspect you need
to make changes to this evaluation function to make the environment
stored in closures smaller. Remember to "follow the grammar."
--
Cheers,
Marco