Universal Turing machine: Difference between revisions
m
→Control language
Cyril Nocton (talk | contribs) |
Cyril Nocton (talk | contribs) |
||
Line 2,395:
The simpler the better.
<lang lisp>
;; ask cyril.nocton:gmail.com▼
(defun run (table input state halt blank)
(let (l (r input) rule op exec)
(loop until (eql state halt) do
(setf rule (cdr (assoc state table)) op 'null
(dolist (symbol rule)
(case symbol
(= (setf
(% (when
(< (when
(> (when
(@ (when
(t (setf op symbol)))
(unless (car r) (pop r) (push blank r))))
Line 2,432 ⟶ 2,433:
That's all Folks !
=={{header|Cowgol}}==
|