---------------------------------------
This Turing Machine program reads and run .tm files.
A .tm file consists of two parts.  
   1. The initial symbols on the tape, which are used as the program's input data.  
   2. The turing machine program code, which defines the states, triggers, and tape head instructions


---- The input data ----

Use the keyword "input" followed by a string to set the initial tape data.  Some examples:
		input 101101
		input This is my input string



---- The program code ----

A Turing Machine is a Finite State Machine (FSM).  Thus it is a collection of States.
Each State specifies a list of Trigger Symbols, and for each Trigger Symbol
there is an associated set of Instructions to perform, which are to (optionally) write 
a Symbol, (optionally) move the tape head, and (optionally) change to a new State.

The program code syntax captures the above setup in rows, with each row mapping a
State and Trigger Symbol pair to a set of Instructions.  

A single row is specified using these value types in this order:

    [CurrState]  [Trigger]  [Write]  [Move]  [NextState]

with the types defined as follows:

    CurrState  -  The name of the state the Turing Machine is currently in.
                  The name can be any single word, with no spaces.  It is NOT case sensitive.
                  If '"' (double quote) is specified as the name, then the most recently parsed state name is assumed.
                  The first state listed in the program code is considered the starting state.

    Trigger    -  A symbol.  Case sensitive.  If this matches the value currently under the "tape head" then 
                  execute the associated Write, Move, and NextState Instructions.
                  The symbol must be a single character, except for:
                      the string "\0", which indicates integer 0 (instead of the ascii character 0).
                      the string "default", which means "use this trigger, if no other matching trigger is found".  
                          It is a "catch all" that works like the "default" keyword in a C++ switch statement.
                      the string "***" which does the same thing as "default"

    Write      -  A symbol.  Case sensitive.  This gets written to the Tape when CurrState and Trigger conditions are both met.
                  Must be a single character.  
                  If '=' is specified, nothing is written.

    Move       -  The direction to move the Tape Head when CurrState and Trigger conditions are both met.
                      <, L, l  each mean, "move left"
                      >, R, r  each mean, "move right"
                      =, N, n  each mean, "don't move"

    NextState  -  The name of the State to transition into when CurrState and Trigger conditions are both met.
                  The name can be any single word, with no spaces.  It is NOT case sensitive.
                  If the specified state does not exist, the program will give a warning and automatically halt.  
                  If '=' is specified, the next state is the current state (ie, no state change occurs).
                  If 'HALT', is specified, the program will halt.

With all this then, a valid 1-State Turing Machine program might look like:

          State0    1    =      >     =         
            "       0    1      >     =         
            "      \0    =      =     Halt

Additionally, the syntax allows for some special characters to help make .tm files and
their code within made more readable.  The special characters are:

     "//"      -  this specifies a comment.  Like C++, once this string is encountered, any following text on the same line is ignored.
     +, -, |   -  these characters are always ignored.  This makes it possible to use Emacs to draw tables around the code.

Thus, the example program above can be equivalently specifed as:

         |----+-----------+---------+-------+------+-----------|
         | // | CurrState | Trigger | Write | Move | NextState |
         |----+-----------+---------+-------+------+-----------|
         |    | State0    |       1 | =     | >    | =         |
         |    | "         |       0 | 1     | >    | =         |
         |    | "         |      \0 | =     | =    | Halt      |
         |----+-----------+---------+-------+------+-----------|

Since all the Emacs table stuff is invisible to the compiler, rows of the program can be organized into separate tables as needed.
That is, a single .tm program can be visually presented as many different tables, (which is useful for oranization and
readability), but internally, all tables in a single .tm are part of a single program.
---------------------------------------

