Calculator
This example
demonstrates how hierarchical state structure
alows to economize on the state machine
description and simplify implementation of
behavior of this surprisingly complex
application. Please note that it correctly
handles negative and fractional numbers. Note
also that one button is used in different
contexts: negation and subtraction.
Try to implement the same
functionality with a standard FSM pattern! Will
your code be as concise and maintainable? How
about adding some new functionality? Will it be
as simple as with LabHSM?