-
Notifications
You must be signed in to change notification settings - Fork 8
PushdownAutomata
Inherit from StateMachine
A StateMachine that possess a history, represented by a queue.
You can navigate its history using the methods go_to_previous_state() and go_to_next_state().
Array state_queue
An array that contains the state history.
int state_index
The index the of the current_state in the state_queue.
int state_queue_max_size
Defines the max size of the state_queue.
void set_state(state)
Override of the method of the StateMachine class.
Sets the state with the given one (either by State reference, or by name), then append it to the queue.
void _append_state_to_queue(Object state)
Append the given state at the end of the state_queue then update the state_index.
void _print_queue()
Prints the queue
void go_to_queued_state_by_index(int id)
Sets the state with the state at the id position of the queue.
void go_to_previous_state()
Sets the state to the previous one in the queue.
void go_to_next_state()
Sets the state to the next one in the queue