eliben / pycparser

:snake: Complete C99 parser in pure Python
Other
3.21k stars 612 forks source link

New example to generate AST from scratch #507

Closed Andree37 closed 1 year ago

Andree37 commented 1 year ago

As I was doing some research and I came along this

I found there was no example on how to create an AST from scratch and print out the target C code.

I purpose something of this sort as an initial example. As I am a beginner of the module, please don't be afraid to suggest changes :)

Andree37 commented 1 year ago

Corrected :)

eliben commented 1 year ago

Some of the builders are failing - check out other examples to see how to set up the import path to work properly.

Andree37 commented 1 year ago

Some of the builders are failing - check out other examples to see how to set up the import path to work properly.

I believe I have corrected it now, unless I also needed to import platform