Miros: a hierarchical state machine module in Lua
A Python implementation is also available. See Python Projects.
Miros for Lua can be found here.
Miros is a module that implements a Hierarchical State Machine (HSM) class (i.e. one that implements behavioral inheritance).
It is based on the excellent work of Miro Samek (hence the module name "miros"). This implementation closely follows an older C/C++ implementation published in the 8/00 edition of "Embedded Systems" magazine by Miro Samek and Paul Montgomery under the title "State Oriented Programming". The article and code can be found here: http://www.embedded.com/2000/0008.
A wealth of more current information can be found at Miro's well kept site: http://www.state-machine.com/. As far as I know this is the first implementation of Samek's HSM in Lua. It was tested with Lua 5.1.4.
It is licensed under the same terms as Lua itself.
An update to Lunar
There is an update to lunar here. It includes batch files to build with MS VC.