This article describes in some details our interpreter which we have created during the course Essentials of interpretation. We summarize intermediate results and the main parts of the evaluator making notes which were omitted in the code articles. Continue reading

# Interpreter

There are 3 posts tagged **Interpreter**.

# Essentials of interpretation. Intro.

“Essentials of interpretation” is a new series which consists of small lessons on interpretation of computer programs. The lessons are implemented in JavaScript and contain detailed comments. The sources can be found on the appropriate GitHub repository.

`Available lessons:`

- Lesson 1. The simplest arithmetic expressions (AE) evaluator
- Lesson 2. Parsing. Lexer of AE in math infix notation
- Lesson 3. Parsing. Parser of AE in math infix notation
- Lesson 4. Working with environments. Variables and built-in functions
- Lesson 5. Simple user-defined functions
- Lesson 6. Inner functions, lambdas and closures
- Lesson 7. Derived expressions (“Syntactic sugar”)

`Notes:`

# Note 3. CoffeeScript. Scheme on Coffee.

After the recent ECMAScript article on lexical environments, I wanted to provide some practical implementation of the general scope theory and variables look-up in the environment.

A good candidate for that became a toy Scheme interpreter written in the new and excellent language CoffeeScript. Also, beside the environment features, this task is quite interesting to play with interpreters themselves and their theory. Continue reading