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

Unable to parse through comments and can't support directives #534

Closed
aerah8 opened this issue Apr 23, 2024 · 2 comments
Closed

Unable to parse through comments and can't support directives #534

aerah8 opened this issue Apr 23, 2024 · 2 comments

Comments

@aerah8
Copy link

aerah8 commented Apr 23, 2024

The following c file will generate a pycparser.plyparser.ParseError

#include <stdio.h> 
int main(void) 
{     
  //comments
  printf("Executing critical code...\n");
  return 0;
}
@aerah8
Copy link
Author

aerah8 commented Apr 23, 2024

I have attempted to solve this issue here: https://github.com/aerah8/pycparser/blob/main/pycparser/preprocessing.py

@eliben
Copy link
Owner

eliben commented Apr 23, 2024

@eliben eliben closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants