10000 warn for unicode escapes that are too long by lsf37 · Pull Request #1042 · jflex-de/jflex · GitHub
[go: up one dir, main page]

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

warn for unicode escapes that are too long #1042

Merged
merged 3 commits into from
Jan 21, 2023
Merged

warn for unicode escapes that are too long #1042

merged 3 commits into from
Jan 21, 2023

Conversation

lsf37
Copy link
Member
@lsf37 lsf37 commented Jan 20, 2023

\u with more than 4 or \U with more than 6 hex digits previously were silently split into the legal 4 or 6 unicode escape, followed by normal character matches. Usually these occurrences are errors, but there may be specifications that rely on this behaviour, so instead of an error we produce a warning that can be suppressed.

Fixes #183

\u with more than 4 or \U with more than 6 hex digits previously were
silently split into the legal 4 or 6 unicode escape, followed by normal
character matches. Usually these occurrences are errors, but there may
be specifications that rely on this behaviour, so instead of an error
we produce a warning that can be suppressed.

Fixes #183
@lsf37 lsf37 self-assigned this Jan 20, 2023
@lsf37 lsf37 added the enhancement Feature requests label Jan 20, 2023
@lsf37 lsf37 added this to the 1.9.0 milestone Jan 20, 2023
lsf37 added 2 commits January 21, 2023 11:31
After previous refactorings unicodeProperties can be null in
LexScan.flex. Initialise to default if no unicode directive has been
encountered yet.
@lsf37 lsf37 merged commit 2c828ba into master Jan 21, 2023
@lsf37 lsf37 deleted the warning branch January 21, 2023 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn for probably wrong unicode escapes such as \u0ffff
1 participant
0