Skip to content

Incorrect Upper Bound in POSIX "graph" Character Class Definition #67

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

Merged
merged 2 commits into from
May 9, 2025

Conversation

c000
Copy link
Contributor

@c000 c000 commented May 6, 2025

This PR fixes the upper limit for the graph character class as outlined in issue #66.

@@ -201,7 +201,7 @@ decodeCharacterClass (PatternSetCharacterClass s) =
"digit" -> ['0'..'9']
"punct" -> ['\33'..'\47']++['\58'..'\64']++['\91'..'\96']++['\123'..'\126']
"alpha" -> ['A'..'Z']++['a'..'z']
"graph" -> ['\41'..'\126']
"graph" -> ['\33'..'\126']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have been wrong by accident, since octal 41 is decimal 33.

In general, it would be good to have some tests.

@andreasabel
Copy link
Member

It seems that only [[:lower:]] and [[:upper:]] are tested so far:

37 [[:lower:]]+ `az{ (1,3)
38 [[:upper:]]+ @AZ[ (1,3)

@andreasabel andreasabel merged commit 5be26bd into haskell-hvr:master May 9, 2025
13 checks passed
@andreasabel andreasabel linked an issue May 9, 2025 that may be closed by this pull request
@andreasabel andreasabel added this to the 1.3.2.4 milestone May 9, 2025
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.

Incorrect Upper Bound in POSIX "graph" Character Class Definition
2 participants