www.vakos.nl/programming/
P R O G R A M M I N G

VAKos's hobby
C/C++ programming, with focus on reusability
www.vakos.nl/programming/docstate/
DOCSTATE


STATEMAC describes a way to implement statemachines in C.

This command-line tool reverse-engineers a statachine written in STATEMAC from a source-file and produces a dot-drawing representing that statemachine.

You can download the under GPL 3 licensed (local copy) sources on this page. Any remarks, comments, bug-reports, improvement and/or suggestions are greatly appreciated via email to programming at vakos dot nl.
docstate.yacc
docstate.lex
flex_bison.h
The main of this command-line tool. docstate.yacc checks the given options and asks flex / bison pair to fetch the statemachine from the given source file.
docstate.yacc contains the semantic rules for source-code containing a STATEMAC statemachine, resulting in a Do...() function called when parts of the statemachine are recognized.
File docstate.lex contains the syntax rules to recognize the STATEMAC keywords.
do.c
do.h
Implements the Do...() functions and calls the dot and/or printf output generator.
dot.c
dot.h
The dot output generator. The resulting output can be piped into dot to generate a picture.
indent.c
indent.h
print.c
print.h
The printf output generator. The resulting output can be used to check the source-code parsing.
design.dot
Makefile
Documentation and code-building files.

www.vakos.nl/programming/
P R O G R A M M I N G

VAKos's hobby
C/C++ programming, with focus on reusability