Architecture of Various Interpreters - oils-for-unix/oils GitHub Wiki
-
Bash and all shells I've looked at: lexer/parser -> AST -> tree interpreter.
- (but note that they do dynamic parsing too)
-
CPython: parser -> parse tree -> "transformer" -> AST -> compiler -> graph of bytecode objects -> bytecode assembler ->
.pyc
files -> bytecode interpreter. -
Lua: No tree representation! It constructs bytecode for a register machine while parsing. I believe this style came from Pascal compilers.
-
R: It was a tree interpreter, but they added bytecode around 2011.
-
Ruby: I believe the same is true; it was a tree interpreter, but they added bytecode.
-
Next Generation Shell: PEG parser -> AST -> bytecode