prog8/tinyvm/main.py

14 lines
235 B
Python
Raw Normal View History

2018-02-25 15:43:00 +00:00
import sys
from .parse import Parser
from .core import Program
from .vm import VM
source = open(sys.argv[1]).read()
parser = Parser(source)
program = parser.parse()
timerprogram = Program([])
vm = VM(program, timerprogram)
vm.run()