cfsm is a finite state machine compiler. It
converts a high-level text description of a state
machine into a C source and header file, and
optionally a Graphviz dot graph. The generated
code ensures that only explicitly permitted state
transitions are possible, and supports optional
precondition and transition callbacks.