These are really nice - also a great example of using the clang parser from python. Thanks for sharing this! On Wed, Aug 21, 2013 at 3:38 PM, Paul Colomiets <paul@xxxxxxxxxxxxxx> wrote: > Hi, > > I've just made a proof of concept prototype for drawing state diagrams > for nanomsg. > > The code is currently here: > > https://github.com/tailhook/nanomsg/blob/state_diagrams/utils/diag.py > > It's a simple python script that scans C code (using clang's parser) > and produces dot file for whatever it found. It doesn't understand > everything, but most of the transitions does. > > You may look at generated pictures here: > > > https://drive.google.com/folderview?id=0Byd_FTQksoKLM3ExekJMVnZJU0U&usp=sharing > > So what all of you think about this? :) > > It seems that shutdown code is handled by a bunch of if statements at > the start of handlers, instead of switches. Why it's handled in a > special way? > > -- > Paul > >