Universal Turing machine: Difference between revisions
→Control language version
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Cyril Nocton (talk | contribs) |
||
Line 2,375:
Tmcl is a tiny Turing machine control language.
Tmcl uses postfix notation.
Line 2,386:
<symbol> : op <- symbol</pre>
Tape is split into two stacks.
<pre>T = reverse (left) . right where right is the scanned symbol.
<sub>0</sub></pre>
<syntaxhighlight lang="lisp">;; 22.06.26
Line 2,413 ⟶ 2,411:
(format t "Q = <~a ~{~a~}.~{~a~}>~%" state (reverse left) right)))</syntaxhighlight>
====Code====
<syntaxhighlight lang="lisp">(defconstant +incrementer+ '((q0 . (1 = > q0 @ b = 1 % qf @))))
(defconstant +three-states-buzy-beaver+ '((a . (0 = 1 % > b @ 1 = < c @))
(
{{out}}
|