Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
bf-asm compiler test 2
-- \ -- Compiler -- compiler = {} -- Tokens process -- compiler.tokens = function(code) -- Get tokens local length = #code local tokens = {} local token = "" local function addToken(mlToken) if #mlToken > 0 then table.insert(tokens, #tokens + 1, mlToken) end end for i = 1, length do local letter = string.sub(code, i, i) local byte = string.byte(letter) if not (byte == 13) then if byte == 10 or letter == " " then addToken(token) token = "" else token = token .. letter if i == length then addToken(token) token = "" end end end end end -- Analization procces -- compiler.analysis = function(code) -- Do an analysis to the code end -- Compilation process -- compiler.compiled = function(code) -- Compile the code end -- Decorative stuff -- print("=====================") print(" BF-ASM:8 Compiler ") print("=====================") print(" Input was read ") print(" as code ") print(" ") -- Output -- print("========") print(" Code ") print("========") local function getInput() -- Gets input local input = true local output = "" while input do input = io.read() if input then output = output .. "\n" .. input end end return output end local input = getInput() print("Input:") print(input) print("\nCompiled:\n") compiler.tokens(input)
run
|
edit
|
history
|
help
0
PAID HACK PuBG
lua5.3: ...Desktop/rextester_linux_2.0/usercode/68368288/source.lua:166: unexpected symbol near '}'
Show current system clock
aaa
Creating habits. Lua
Convert MySQL 'framed' table into CSV
quick sort
For your YouTube comment section. (updated)
5+5 == 10
hack