Execute Brain****/Common Lisp: Difference between revisions
Content added Content deleted
(Renamed "places" to "stack" and moved stack into state struct. ELT to AREF changes. Implemented compiler.) |
m (Fixed syntax highlighting.) |
||
Line 3: | Line 3: | ||
This is an implementation of [[Brainf***]] written in [[Common Lisp]]. |
This is an implementation of [[Brainf***]] written in [[Common Lisp]]. |
||
< |
<syntaxhighlight lang="lisp">(defstruct bf-state |
||
(program) |
(program) |
||
(program-counter 0) |
(program-counter 0) |
||
Line 101: | Line 101: | ||
(loop do (fresh-line) |
(loop do (fresh-line) |
||
(princ "BRAINFUCK> ") |
(princ "BRAINFUCK> ") |
||
(bf (read-line))))</ |
(bf (read-line))))</syntaxhighlight> |