-
Notifications
You must be signed in to change notification settings - Fork 30
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
octal and hex escapes in char and string declarations require further support #15
Comments
markjenkins
added a commit
to markjenkins/PyCParser
that referenced
this issue
Aug 9, 2018
markjenkins
added a commit
to markjenkins/PyCParser
that referenced
this issue
Aug 9, 2018
markjenkins
added a commit
to markjenkins/PyCParser
that referenced
this issue
Aug 10, 2018
markjenkins
added a commit
to markjenkins/PyCParser
that referenced
this issue
Aug 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Octal (\NNN) and hex escape (\xNN) sequences in char and string declarations require further support.
Test C code:
For hex escape sequences this leads to cparser.simple_escape_char being invoked by cpre2_parse() with 'x' as an argument. Hex escape sequences are not of the simple kind that simple_escape_char is designed for. Handling for '\0' and "\0" doesn't recognize that these particular sequences are octal escapes.
Additional states are required in cpre2_parse().
The output of the above should be:
I have some initial code to address the hex escapes in double quoated strings. After this issue is opened I'll reference the issue number.
The text was updated successfully, but these errors were encountered: