title: Constructing a simple interpreter
body: <p>I’m starting a project where I need to implement a light-weight interpreter.
  The interpreter is used to execute simple scientific algorithms.
  The programming language that this interpreter will use should be simple, since it is targeting non- software developers (for example, mathematicians.)</p>
  
  <p>The interpreter should support basic programming languages features:</p>
  
  <ul>
  <li>Real numbers, variables, multi-dimensional arrays</li>
  <li>Binary (+, -, *, /, %) and Boolean (==, !=, &lt;, >, &lt;=, >=) operations</li>
  <li>Loops (for, while), Conditional expressions (if)</li>
  <li>Functions</li>
  </ul>
  
  <p><a href="http://www.mathworks.com/" rel="noreferrer">MathWorks MatLab</a> is a good example of where I’m heading, just much simpler.
  The interpreter will be used as an environment to demonstrate algorithms; simple algorithms such as finding the average of a dataset/array, or slightly more complicated algorithms such as <a href="http://en.wikipedia.org/wiki/Gaussian_elimination" rel="noreferrer">Gaussian elimination</a> or <a href="http://en.wikipedia.org/wiki/RSA" rel="noreferrer">RSA</a>.</p>
  
  <p>Best/Most practical resource I found on the subject is Ron Ayoub’s entry on Code Project (<a href="http://www.codeproject.com/KB/architecture/InterpreterPatternParsing.aspx" rel="noreferrer">Parsing Algebraic Expressions Using the Interpreter Pattern</a>) - a perfect example of a minified version of my problem.</p>
  
  <p>The Purple Dragon Book seems to be too much, anything more practical?</p>
  
  <p>The interpreter will be implemented as a .NET library, using C#. However, resources for any platform are welcome, since the design-architecture part of this problem is the most challenging.</p>
  
  <p>Any practical resources?</p>
  
  <p>(please avoid “this is not trivial” or “why re-invent the wheel” responses)</p>