![]() |
![]() |
|
home—info—lectures—exams—archive
We discuss hw06—Writing a Simple Interpreter.
Some differences between the Scheme and Java versions for L0:
| Java version | Scheme version |
| Expr.parse(String) | parse-string(a-string) (can also read matching round-parens) |
| Expr.parse(Scanner) | parse(an-sexpr) (it gets the entire list-of-(list-of)-symbols all at once) |
| toString() | expr->string |
| expr->tokens converts to an s-expression | |
| toString returns exactly the syntax | expr->string returns a string using round-parens |
home—info—lectures—exams—archive
| ©2008, Ian Barland, Radford University Last modified 2008.Dec.03 (Wed) |
Please mail any suggestions (incl. typos, broken links) to ibarland |
![]() |