![]() ![]() The fourth group of parentheses can be referenced later in the expression with \4. (?=(.*\r\n)*^>\4\.\2:()((0)|1)(.*\r\n))Įverything contained within parentheses in the regular expression is called a group. This is an example of a tape with one instruction set named INST Note: For the machine to work properly, make sure to add at least one newline after your instruction set. N the name of the next instruction to be executed at the new tape position.A 0 moves the head one position to the left. M the movement of the read/write head.W the output to be written to the tape at the current position.Each instruction has execution parameters for both inputs. I the input from the current tape position. ![]() The instruction sets are the remaining lines, formatted like >C.I:WMN.The current instruction is a line beginning with a # and followed by the name of the current instruction.The read/write head is a line beginning with a [ followed by a preset amount of whitespace and ending with a ^.The tape is a line beginning with a ! followed by a string of 0s and 1s.The machine consists of the tape, the read/write head, the current instruction, and the instruction sets. Take a look at busybeaver.txt in Notepad or (almost) any other text editor with a regex find/replace option. I created a functioning Turing Machine using Notepad and its Find/Replace regular expression engine. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |