

From C to AST and back to C with pycparser - signa11
http://eli.thegreenplace.net/2011/03/07/from-c-to-ast-and-back-to-c-with-pycparser/

======
baltcode
Can the same be used for regular python AST's? i.e., to generate legible C
code from Python? I know PyPy's RPython already does this, but I don't think
the code is this clear. Or is it?

~~~
koenigdavidmj
Well, things would get tricky, because even stuff like "foo.bar" gets turned
into a dictionary lookup.

In short, you could do it, but it would hardly qualify as readable in the
general case. It is easier to do this to RPython since all the dynamic parts
are gone (foo.bar just becomes a struct lookup).

