Writing an Interpreter
Contents of this page is mostly pending.
See also: DELI, the programming language that is being implemented.
What sets this book apart:
- Symbol handling
- Easier operator sequence parsing with the shunting yard algorithm
- Module system
- String interpolation
Preliminary outline
- Preface
- A bird’s-eye view
- DELI
- Lexing
- Parsing simple expressions
- Evaluating simple expressions
- Handling errors
- State
- Conditionals
- Tracking symbols
- Loops
- Operators
- Functions
- Functional programming
- Structures
- Collection types
- Strings
- Object orientation
- The standard library
- Module systems
- Exceptions
Original idea
From the Ideas list.
Write a “build a programming language” article.
Tree-walking interpreter. Touch on most of the core concepts (lexer/tokenizer, parser, symbol resolver, evaluator). At the end of the article, there would be a functioning programming language, even if only basic.
This could also be a talk: In about 30 minutes, this talk would run through creating a programming language and writing a simple interpreter for it.
This could also become a book. This might be a huge challenge, but opens up the opportunity of writing the programming language in the programming language itself.