forth-stuff/ForthMachine.tl

22 lines
700 B
Plaintext
Raw Normal View History

local istream = require("InputStream")
local helpers = require("CoreHelpers")
local interpreters = require("Interpreters")
local standardInputRefill = helpers.standardInputRefill
local CoreWords = require("CoreWords")
2021-05-20 03:04:04 +00:00
local oneReadInputStream = helpers.oneReadInputStream
2021-05-29 03:50:58 +00:00
local fileStream = helpers.fileStream
local Environment = require("DataStructures").Environment
2021-05-20 03:04:04 +00:00
--interpreters.start(fileStream("codetest.txt"))
local core_dicts = {CoreWords}
2021-05-29 07:12:29 +00:00
local env = Environment:new(istream:new(standardInputRefill), core_dicts)
--local env = Environment:new(fileStream("codetest.forth"), core_dicts)
2021-05-24 03:22:27 +00:00
--local env = Environment:new(oneReadInputStream("14 11 + ."), core_dicts)
2021-05-12 08:32:25 +00:00
interpreters.start(env)
2021-05-12 08:32:25 +00:00