# Demonstration example that Craig DeLancey made up all by himself. # # This stuff with a hashtag is all comments, where you can # explain how your machine's tape should be set. For example # I might write: # # This addition machine adds two numbers represented in unary # as a series of 1s, separated by a single space. The machine # starts on the leftmost 1 of the left number. The machine ends # under the the leftmost 1 of the answer number. It is designed # only to handle two numbers greater than zero. # # What you write here with the hashtag to the left is # ignored by Tursi. Programmers call this a "comment." # # The rules below (at the bottom) are listed always in the order: # In-State Reading-Symbol Write-state Move-Direction Go-Into-State # # So, that first line means: in state 0, reading 1 on the tape, # write a 1 on the tape, and move right, and go into state 0. # # Remember that you can put something on the tape in Tursi # by writing in that box below the word "Tape", and then hit return. # # These lines immediately below, with hash-tag and exclamation point # to the left, allow one to tell the machine which state to start # with, and which state to end on. # #! start 0 #! end H 0 1 0 R 1 1 1 1 R 1 1 0 1 L 2 2 1 1 L 2 2 0 0 R H