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

lexer: fixes for regex literal parsing #113

Merged
merged 1 commit into from
Oct 7, 2022
Merged

Conversation

jow-
Copy link
Owner

@jow- jow- commented Oct 5, 2022

  • Ensure that regexp extension escapes are consistently handled; substitute \d, \D, \s, \S, \w and \W with [[:digit:]], [^[:digit:]], [[:space:]], [^[:space:]], [[:alnum:]_] and [^[:alnum:]_] character classes respectively since not all POSIX regexp implementations implement all of those extensions
  • Preserve \b, \B, \< and \> boundary matches

Fixes: a45f2a3 ("lexer: improve regex literal handling")
Signed-off-by: Jo-Philipp Wich [email protected]

 - Ensure that regexp extension escapes are consistently handled;
   substitute `\d`, `\D`, `\s`, `\S`, `\w` and `\W` with `[[:digit:]]`,
   `[^[:digit:]]`, `[[:space:]]`, `[^[:space:]]`, `[[:alnum:]_]` and
   `[^[:alnum:]_]` character classes respectively since not all POSIX
   regexp implementations implement all of those extensions
 - Preserve `\b`, `\B`, `\<` and `\>` boundary matches

Fixes: a45f2a3 ("lexer: improve regex literal handling")
Signed-off-by: Jo-Philipp Wich <[email protected]>
@jow- jow- force-pushed the fix-regex-literal-parsing branch from 1fe9cb0 to 21ace5e Compare October 5, 2022 21:01
@jow- jow- merged commit 1712e77 into master Oct 7, 2022
@jow- jow- deleted the fix-regex-literal-parsing branch October 7, 2022 23:15
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

Successfully merging this pull request may close these issues.

1 participant