TangentFoxy / LuaFuck

(ON HOLD) Translation program to run Brainfuck code in Lua.
MIT License
2 stars 2 forks source link

Valid Brainfuck will not always compile to valid Lua! #14

Open TangentFoxy opened 8 years ago

TangentFoxy commented 8 years ago

Example: [[] is a perfectly valid Brainfuck program, but the compilation will currently turn this into two while loops opened and one closed, which will be invalid.

Now a user shouldn't be pulling shit like that anyhow...BUT there is the concept of comments in Brainfuck by placing any comment text immediate after a loop in its own loop (because that loop will automatically be skipped). These should be handled properly!

TangentFoxy commented 6 years ago

Easy fix that also should improve execution: Instead of converting BF to Lua, just output an interpreter w embedded BF.