diff --git a/a.out b/a.out deleted file mode 100755 index c22e652..0000000 Binary files a/a.out and /dev/null differ diff --git a/main.c b/main.c deleted file mode 100644 index 34e5faf..0000000 --- a/main.c +++ /dev/null @@ -1,7 +0,0 @@ - #include - - int main(int argc, const char** argv) { - printf("your mom: %i\n",2); - - } - \ No newline at end of file diff --git a/main.funny b/main.funny deleted file mode 100644 index 6fe1e88..0000000 --- a/main.funny +++ /dev/null @@ -1,3 +0,0 @@ -TELL 1 -TELL 2 -TELL 3 diff --git a/mainc.lua b/mainc.lua deleted file mode 100644 index 585fa3e..0000000 --- a/mainc.lua +++ /dev/null @@ -1,65 +0,0 @@ -local result = "" - -local function compile_and_run(source) - source = string.format([[ - #include - #include - - int main(int argc, const char** argv) { - %s - } - ]],source) - print(source.."\n") - local file = io.open("main.c","w") - file:write(source) - file:close() - os.execute("gcc main.c") - os.execute("./a.out") -end - -local instructions = { - ["add (%d+) (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["sub (%d+) (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["mul (%d+) (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["shl (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["shr (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["bor (%d+) (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["band (%d+) (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["li (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["li (%d+) (%d+)"] = function(l,d,a,b) - - end, - ["li (%d+) (%d+)"] = function(l,d,a,b) - - end -} - -local source = {string.format("int32_t registers = {%s}",string.rep("0",0,","))} - -local input = io.open("main.funny") -local index = 1 -for line in input:read("a"):gmatch("[^\n\r]") do - table.insert(string.format("instruction%i:",index)) -- add the goto label for the line - instruction = instruction + 1 - local target - for pattern,callback in pairs(instructions) do - line:match(pattern) - end -end -compile_and_run(table.concat(source,"\n")) diff --git a/start.funny b/start.funny deleted file mode 100644 index 9b733d1..0000000 --- a/start.funny +++ /dev/null @@ -1,5 +0,0 @@ -PUT welcome to the funnycore -li 0 10 -li 1 20 -PUT i have updated registers -HALT