readme - Statemachine code generation

readme - Statemachine code generation

Inhalt


Topic:.readme_StateMGen.

This application of Zmake is used to convert a texual description of state machine behavior to C-code and a documentation topic file.

State machines are manual programmed in C/C++- or other line code languages sometimes. It were be better to use a graphical tool to show the states and to edit the transitions and actions, but a graphical tool is not standardized for all users independent of a special vendor. There are some UML tools, MathWorks Simulink etc. which supports state machines but all of them are different in usage and some of them are expensive of license costs.

There is a common appreciation for state machines, driven by UML, defined by the http://www.omg.org/spec/UML/2.2/Superstructure/PDF. This appreciation includes nested states, parallel states and an event model. For manual written programs - it is too complex - and not necessary, for the time being.

You have the choice: Using a special tool with license costs - your neighbour has another tool, or manual written. Both is'nt the best choice.

This example offers a special language to write state behavior. The language supports nested states and parallel states. The ZBNF parser parses this language, the JZcmd-text-generator generates C-code and documentation.topic which can converted to html etc.

See an example: src/exampleSimple.stateM.

The script zmakeState.jz.bat translate it:

to C-code, like shown in result/exampleSimple.c.