Execute Brain****/Lua: Difference between revisions

m
Fixed syntax highlighting.
(fixed missing then)
m (Fixed syntax highlighting.)
 
(One intermediate revision by one other user not shown)
Line 2:
 
An implementation of a Brainf*** interpreter in [[Lua]].
<langsyntaxhighlight lang="lua">memory = {0} --memory is bounded on one side, at 1
 
program = io.read("*all") --loads an entire program at once, must not contain newlines
 
pointer = 1
Line 66:
if instr then instr() end
instruction = instruction + 1
end</langsyntaxhighlight>
9,476

edits