Building an Interpreter from scratch

Course

Online

£ 10 + VAT

Description

  • Type

    Course

  • Methodology

    Online

  • Start date

    Different dates available

Course OverviewHow do programming languages work under the hood? What’s the difference between compiler and interpreter? What is a virtual machine, and JIT-compiler? And what about the difference between functional and imperative programming?There are so many questions when it comes to implementing a programming language!The problem with “compiler classes” in school is they usually are presented as some “hardcore rocket science” which is only for advanced engineers.Moreover, classic compiler books start from the least significant topic, such as Lexical analysis, going right away deep down to the theoretical aspects of formal grammars. And by the time of implementing a first Tokenizer module, students simply lose interest in the topic, not having a chance to actually start implementing a programing language itself. And all this is spread to a whole semester of messing with tokenizers and BNF grammars, without understanding the actual semantics of programming languages.I believe we should be able to build and understand a full programming language semantics, end-to-end, in 4-6 hours — with content going straight to the point, showed in live coding sessions as pair-programming, and described in a comprehensible way.In the Essentials of Interpretations class, we focus specifically on runtime semantics and build an interpreter for a programming language very similar to JavaScript or Python.Implementing a programing language would also make your practical usage level of other programming languages more professional.Who this class is for?This class is for any curious engineer, who would like to gain skills in building complex systems (and building a programming language is really a pretty advanced engineering task!), and obtain transferable knowledge for building such systems.
If you are interested specifically in compilers, interpreters, and source code transformation tools, then this class is also for you. ilers, talk about what is a...

Facilities

Location

Start date

Online

Start date

Different dates availableEnrolment now open

About this course

Build a programing language from scratch
Interpreters and Compilers
AOT, JIT-compilers and Transpilers
AST-interpreters and Virtual Machines
Bytecode, LLVM, Stack-machines
First-class functions, Lambdas and Closures
Call-stack and Activation Records
OOP: Classes, Instances and Prototypes
Modules and Abstractions

Questions & Answers

Add your question

Our advisors and other users will be able to reply to you

Who would you like to address this question to?

Fill in your details to get a reply

We will only publish your name and question

Reviews

This centre's achievements

2021

All courses are up to date

The average rating is higher than 3.7

More than 50 reviews in the last 12 months

This centre has featured on Emagister for 4 years

Subjects

  • Programming
  • Systems
  • Project
  • Global
  • Syntax
  • Semantics
  • Javascript
  • Java
  • Javascript training
  • Evaluation

Course programme

Compilers crash course 3 lectures 36:27 Lecture 1: Parsers, ASTs, Interpreters and Compilers preview Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Lecture 2: AST Interpreters and Virtual Machines You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
Lecture 3: Compilers: AOT, JIT, Transpiler preview You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
Compilers crash course 3 lectures 36:27 Lecture 1: Parsers, ASTs, Interpreters and Compilers preview Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Lecture 2: AST Interpreters and Virtual Machines You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
Lecture 3: Compilers: AOT, JIT, Transpiler preview You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
Lecture 1: Parsers, ASTs, Interpreters and Compilers preview Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Lecture 1: Parsers, ASTs, Interpreters and Compilers preview Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Lecture 1: Parsers, ASTs, Interpreters and Compilers preview Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Lecture 1: Parsers, ASTs, Interpreters and Compilers preview Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Project repo: this lecture:
  • Introduction and course overview
  • Parsing pipeline
  • Tokenizer, tokens
  • Abstract Syntax Trees (AST)
  • Static/Compile time vs. Runtime
  • Interpreters vs. Compilers
  • AST-interpreters (recursive)
  • Bytecode-interpreters
  • Ahead-of-time (AOT) compilers
  • Just-in-time (JIT) compilers
  • Transpilers
Lecture 2: AST Interpreters and Virtual Machines You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
Lecture 2: AST Interpreters and Virtual Machines You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
Lecture 2: AST Interpreters and Virtual Machines You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
Lecture 2: AST Interpreters and Virtual Machines You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
You will learn:
  • AST interpreters
  • AST explorer
  • JavaScript AST example
  • Bytecode interpreters
  • Stack machine vs. Register machine
  • Stack VM bytecode evaluation example
  • Compiler explorer
  • Java bytecode example
  • Python bytecode example
  • Register VM bytecode evaluation example
Lecture 3: Compilers: AOT, JIT, Transpiler preview You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
Lecture 3: Compilers: AOT, JIT, Transpiler preview You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
Lecture 3: Compilers: AOT, JIT, Transpiler preview You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
Lecture 3: Compilers: AOT, JIT, Transpiler preview You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
You will learn:
  • Ahead-of-time (AOT) compiler
  • Just-in-time (JIT) compiler
  • LLVM
  • Intermediate representation (IR)
  • Bytecode
  • Clang
  • x64 Assembly
  • AST-transformer (Transpiler)
Interpreters: Basic expressions and Variables 6 lectures 59:07 Lecture 4: Eva programming language preview You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs. Expression
  • Closures
  • Lambda functions
  • IILE: Immediately-invoked lambda expressions
Lecture 5: Self-evaluating expressions preview You will learn:
  • Eval -- the core of an interpreter
  • Self-evaluating expressions
  • Numbers and Strings
  • TDD (Test-driven development)
  • Addition operation
Project source code: Lecture 6: Variables and Environments You will learn:
  • Recursive nature of the interpreter
  • Environment: repository of variables
  • Environment Record
  • Define, Assign, Lookup
  • The Global Environment
Example: environments in JavaScript: source code: Lecture 7: Blocks: expression groups and Nested Scopes You will learn:
  • Blocks: groups of expressions
  • Block scope
  • Identifier resolution
  • Scope chain traversal
  • Variable assignment
Project source code: Lecture 8: Control flow: If and While expressions You will learn:
  • Program control-flow
  • Branches: if-expression
  • Cycles: while-loops
Project source code: Lecture 9: Back to parsers: S-expression to AST You will learn:
  • S-expressions
  • BNF (Backus-Naur form) grammars
  • Syntax tool: language-agnostic parser generator
  • Atoms and Lists
  • LALR(1) parser creation
Project source code: Interpreters: Basic expressions and Variables. 6 lectures 59:07 Lecture 4: Eva programming language preview You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs. Expression
  • Closures
  • Lambda functions
  • IILE: Immediately-invoked lambda expressions
Lecture 5: Self-evaluating expressions preview You will learn:
  • Eval -- the core of an interpreter
  • Self-evaluating expressions
  • Numbers and Strings
  • TDD (Test-driven development)
  • Addition operation
Project source code: Lecture 6: Variables and Environments You will learn:
  • Recursive nature of the interpreter
  • Environment: repository of variables
  • Environment Record
  • Define, Assign, Lookup
  • The Global Environment
Example: environments in JavaScript: source code: Lecture 7: Blocks: expression groups and Nested Scopes You will learn:
  • Blocks: groups of expressions
  • Block scope
  • Identifier resolution
  • Scope chain traversal
  • Variable assignment
Project source code: Lecture 8: Control flow: If and While expressions You will learn:
  • Program control-flow
  • Branches: if-expression
  • Cycles: while-loops
Project source code: Lecture 9: Back to parsers: S-expression to AST You will learn:
  • S-expressions
  • BNF (Backus-Naur form) grammars
  • Syntax tool: language-agnostic parser generator
  • Atoms and Lists
  • LALR(1) parser creation
Project source code: Lecture 4: Eva programming language preview You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs. Expression
  • Closures
  • Lambda functions
  • IILE: Immediately-invoked lambda expressions
Lecture 4: Eva programming language preview You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs. Expression
  • Closures
  • Lambda functions
  • IILE: Immediately-invoked lambda expressions
Lecture 4: Eva programming language preview You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs. Expression
  • Closures
  • Lambda functions
  • IILE: Immediately-invoked lambda expressions
Lecture 4: Eva programming language preview You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs. Expression
  • Closures
  • Lambda functions
  • IILE: Immediately-invoked lambda expressions
You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs. Expression
  • Closures
  • Lambda functions
  • IILE: Immediately-invoked lambda expressions
You will learn:
  • AST formats
  • S-expression
  • Eva programming language
  • Eval -- the core of an interpreter
  • Statement vs rong You will learn:
    • Built-in functions
    • Native functions
    • Function calls
    • Global environment
    Project source code: will learn:
    • Built-in functions
    • Native functions
    • Function calls
    • Global environment
    Project source code: will...

Additional information

Basic data structures and algorithms Graphs, trees, traversal

Building an Interpreter from scratch

£ 10 + VAT