2021-05-13 05:23:42 +00:00
|
|
|
local istream = require("InputStream")
|
2021-05-13 09:19:54 +00:00
|
|
|
local helpers = require("CoreHelpers")
|
2021-05-19 03:43:19 +00:00
|
|
|
local interpreters = require("Interpreters")
|
|
|
|
local standardInputRefill = helpers.standardInputRefill
|
2021-05-23 11:59:36 +00:00
|
|
|
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
|
2021-05-23 11:59:36 +00:00
|
|
|
local Environment = require("DataStructures").Environment
|
2021-05-19 03:43:19 +00:00
|
|
|
|
2021-05-20 03:04:04 +00:00
|
|
|
--interpreters.start(fileStream("codetest.txt"))
|
2021-05-23 11:59:36 +00:00
|
|
|
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
|
|
|
|
2021-05-23 11:59:36 +00:00
|
|
|
interpreters.start(env)
|
2021-05-13 05:23:42 +00:00
|
|
|
|
2021-05-19 03:43:19 +00:00
|
|
|
|
2021-05-12 08:32:25 +00:00
|
|
|
|
2021-05-19 03:43:19 +00:00
|
|
|
|
2021-05-13 05:23:42 +00:00
|
|
|
|