compiler
共 2 篇文章
(An ((Even Better) Lisp) Interpreter (in Python))
(An ((Even Better) Lisp) Interpreter (in Python)) In a previous essay I showed how to write a simple Lisp interpreter in 90 lines of Python: lis.py . In this essay I make the implementation, lispy.py , three times more complicated, but more complete. Each section handles an addition. (1) New data t…
2015-05-05 20:31 · Python · lisp · compiler · interpreter
Lispy: Scheme Interpreter in Python
################ Lispy: Scheme Interpreter in Python ## (c) Peter Norvig, 2010-14; See http://norvig.com/lispy.html ################ Types from __future__ import division Symbol = str # A Lisp Symbol is implemented as a Python str List = list # A Lisp List is implemented as a Python list Number = (…
2015-05-05 20:28 · lisp python · lisp · compiler · interpreter