4 ms·
To be honest I wouldn't bother with an existing code generator. However I would definitely consider modelling your state machine and generating code from that.
by rwmj 6y ago
To be honest I wouldn't bother with an existing code generator. However I would definitely consider modelling your state machine and generating code from that. Also model your state machine hierarchically, especially if it has any kind of complexity. We did that with our NBD client, which has 96 states in 17 groups, generating C code: https://github.com/libguestfs/libnbd/tree/master/generator https://github.com/libguestfs/libnbd/tree/master/generator