Skip to content
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

Support for _Generic #559

Open
edbennett opened this issue Nov 20, 2024 · 1 comment
Open

Support for _Generic #559

edbennett opened this issue Nov 20, 2024 · 1 comment

Comments

@edbennett
Copy link

Support for C11's _Generic has been discussed in #63 and #438, but doesn't appear to have been written yet.

I find myself with a need to use pycparser on a codebase that makes significant use of _Generics.

Are there any plans to add this support, please? Or any pointers on where I would start looking if I wanted to implement it (with the caveat that it may be beyond my skill level or time I have available to allocate to it)?

@eliben
Copy link
Owner

eliben commented Nov 21, 2024

I personally don't have plans to add it, but will welcome PRs implementing it.

The place to start would be to understand how the spec defines the feature (formal grammar) and translate it into pycparser grammar rules. This typically isn't hard, but requires some understanding of parsing languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants