Re: [racket] How to create 'Internal Definitions' in a scheme interpreter.

2010-07-24 Thread Matthias Felleisen
Let me propose this: 1. Define the grammar properly. In particular, distinguish the grammar for expressions from those for definitions. For example, Expr is one of: -- Variable -- (+ Expr Expr) -- (local (Definition*) Expr) -- ... Definition is one of: -- (define

[racket] How to create 'Internal Definitions' in a scheme interpreter.

2010-07-24 Thread Pedro Del Gallego
Hi, I am writing my first interpreter, but I am struggling with the definitions of 'define', 'let' and 'letrec'. Here is the source code intrepreter (> 100 loc) . http://gist.github.com/487501 The problem is that 'define' requires access to the enviroment. I as understand define is equivalent