-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Friendly project #9
Comments
Hi Windel, This project just came out of a dormancy. CI will be coming soon. Thanks for test fixture link, that'll be a huge help. If you'd like to contribute, PRs are always welcome. I may look into adding macro support at some point. To make that work the parser needs to be updated to include an a actual lexer capable of look ahead matching. Anyway, if you'd like to help let me know. |
For what its worth, when looking into macro's, the way I did it in ppci is located here: https://github.com/windelbouwman/ppci-mirror/blob/master/ppci/lang/c/preprocessor.py Anyway, good luck! We really need python preprocessors that are full standard compliant! |
@windelbouwman @evanplaice Nice work, but I would really like to see the macro component of the self described c-style macro preprocessor. Actually, what I really want is to be able to still use:
In python 3. Which admittedly couldn't be done with a C #define macro as they require brackets :) And if I am being honest, C #define macros often end up being kludge-ridden in order to achieve anything truly useful. Given you are using python, being able to write the macros in python too would be easier and more powerful.
result: "Hello" Sorry -- just thinking aloud really. But if you believe it wouldn't be terribly difficult to modify your project to support a non-functional (non-bracket requiring) |
Hi Evan!
Cool project! I also recently started with a C preprocessor in python, can be seen here: https://github.com/windelbouwman/ppci-mirror/blob/master/examples/c/hello/demo_pycparser.py
Maybe it is a good idea to add some travis integration to your project? I also can recommend the test suite from mcpp to test the preprocessor, especially the test snippet directory is very handy: https://github.com/h8liu/mcpp/tree/master/test-t
Regards,
Windel
The text was updated successfully, but these errors were encountered: