MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Advice for writing small Scheme interpreter

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74522] Re: Advice for writing small Scheme interpreter
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 23 Mar 2007 19:20:20 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ett6c9$gba$1@smc.vnet.net>

wooks wrote:
> I need to write a very small Scheme interpreter in Mathematica to
> complete my project.
> 
> How can I stop Mathematica from evaluating statements so that they can
> be parsed in their raw form by the interpreter code.
> 
> For example I don't want (+ 7 8) converted into 56 before I can parse
> it.
> 
> 

What you want is to modify Mathematica main evaluation loop. The 
following section of the Mathematica book should explain it all.
See section "2.14.1 The Main Loop" at 
http://documents.wolfram.com/mathematica/book/section-2.14.1

Also, check the documentation for $Pre and the like.

Regards,
Jean-Marc


  • Prev by Date: Superimposing 3D plots with different colours
  • Next by Date: Special Projects Associates
  • Previous by thread: Re: Advice for writing small Scheme interpreter
  • Next by thread: Re: Advice for writing small Scheme interpreter