Use a finite State
machine instead of a stack
#5458
Closed
State
machine instead of a stack
#5458