C parser and AST generator written in pure Python
C parser in Python
pycparser$ pycparser example.c$ python -c "from pycparser import parse_file; ast = parse_file('code.c', use_cpp=True)"$ python -c "from pycparser import c_parser; parser = c_parser.CParser(); ast = parser.parse('int x = 5;'); ast.show()"