Lec28-Calculator
Contents
Calculator
Exception
|
|
|
|
见java try-catch 😏
|
|
Programming Languages
- Programs are trees… and the way interpreters work is through a tree recursion.
Parsing
把文本转化为抽象语法树(Abstract Syntax Tree,AST)
base case: only symbols and numbers
recursive case: expressions and statements
Scheme-Syntax Calculator
using Python Pair
to describe pairs of expressions and statements
the eval function
|
|
interactive cli
Read-Eval-Print-Loop (REPL) 😮