2016-12-17 00:15:27 +02:00
|
|
|
require_relative "../helper"
|
2017-01-19 09:02:29 +02:00
|
|
|
require "risc/interpreter"
|
2015-09-27 22:39:10 +03:00
|
|
|
|
2017-01-19 09:02:29 +02:00
|
|
|
module Risc
|
2017-01-03 22:42:40 +02:00
|
|
|
module Ticker
|
2017-01-16 17:43:39 +02:00
|
|
|
include InterpreterHelpers
|
2018-03-23 11:36:20 +02:00
|
|
|
include CompilerHelper
|
2015-11-08 14:30:28 +02:00
|
|
|
|
2017-01-03 22:42:40 +02:00
|
|
|
def setup
|
2017-01-19 09:02:29 +02:00
|
|
|
Risc.machine.boot
|
2017-01-03 22:42:40 +02:00
|
|
|
do_clean_compile
|
2018-03-22 18:54:40 +02:00
|
|
|
Vool::VoolCompiler.ruby_to_vool( @string_input )
|
2017-01-04 21:35:50 +02:00
|
|
|
Collector.collect_space
|
|
|
|
@interpreter = Interpreter.new
|
2018-03-25 19:36:00 +03:00
|
|
|
@interpreter.start Risc.machine.risc_init
|
2017-01-03 22:42:40 +02:00
|
|
|
end
|
2016-12-21 22:35:36 +02:00
|
|
|
|
2017-01-03 22:42:40 +02:00
|
|
|
# must be after boot, but before main compile, to define method
|
|
|
|
def do_clean_compile
|
2015-11-08 14:30:28 +02:00
|
|
|
end
|
|
|
|
|
2015-10-16 19:04:17 +03:00
|
|
|
end
|
2015-09-27 22:39:10 +03:00
|
|
|
end
|