- The file consists of space-separated strings.
- The first line has 4 columns. It represents in order
[blank symbol] [initial state] [accept state] [reject state]
- All the following lines contain 5 columns. They represent in order
[current state] [current symbol(s)] [next state] [next symbol] [direction (L/R)]
- Put a
.
as the next symbol to keep the current symbol unchanged. You can also
have multiple comma-seperated current symbols in the 2nd column. For example:
q5 0 q3 0 L
q5 1 q3 1 L === q5 0,1,x q3 . L
q5 x q3 x L
- An empty line signifies the end of the transitions, and the rest of the file is ignored. Also any
text after the 5th column is ignored. Comments can be added in these locations if needed.
- Transitions to the reject state need not be explicitly given. The program defaults to these.
Example 1
Example 2