A simple BASIC interpreter for Roblox
The process of compiling the source is separated in two stages (top to bottom):
- Tokenizer (AKA lexer)
- Parser
- Compiler
- Virtual Machine (VM)
The tokenizer AKA lexer. Transforms the source code into a series of "tokens", which the parser will use as an input.
The parser will generate a AST.
The compiler will generate a bytecode, constants table and jump table.
The VM will interpret the bytecode using constants table and jump table.