- pylite pylite是一个用于编译原理教学的python解释器,通过学习它的源代码可以了解python编译器和虚拟机是如何工作的。
pycom是编译器,由5000行代码构成。pyvm是虚拟机,由6000行代码构成。
version 0.1.1
build-in function:
print
:>>> print, 'hello\npeter' ... hello . peter
quit
:>>> $quit
Run the command to test at the root of this project (the sign $
means the
prompt of Linux
):
$ make test
if your computer do not have the command make
, please click
here for more infomations.
-
command
print
:>>> print, "this", "that", " ", 1 + 5 * 10 ... thisthat 51
-
add a test for
AST/string
-
command
if-elif-else
if n > 1: do something elif n < 1: do something else: do something
-
command
type
type: text number bool var int\float\...
-
on C++