All commands are separated by comma
,
Declare machine's initial state
Use the initial
keyword.
Eg: initial q0
declares q0 as the initial state.
Declare accept state
Use the accept
keyword.
Eg: accept qa
declares qa as the accept state.
Declare reject state
Use the reject
keyword.
Eg: reject qr
declares qr as the reject state.
Tuples
A tuple consists of the following:
- current state
- input - truncated to the first character
- next state
- output - truncated to the first character
- direction -
l
or -1
means left, r
or 1
means right
Multiple Machines
You can create multiple machines and call the one machine from the other.
- Create a new machine with the "New Machine" button and program that machine as you like.
- Give that machine a name e.g. machineB
- Now to call machineB from another machine, use
state0 input0 exec machineB
which will execute
machineB when it encounters state0 and input0.
For example, if you want machineB to be called when you are at state q1
and you read 0
you should use q1 0 exec machineB
.