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

Add Case-Insensitive Mode #28

Closed
SicroAtGit opened this issue Jan 9, 2022 · 0 comments
Closed

Add Case-Insensitive Mode #28

SicroAtGit opened this issue Jan 9, 2022 · 0 comments
Assignees
Labels
feature New feature
Milestone

Comments

@SicroAtGit
Copy link
Owner

SicroAtGit commented Jan 9, 2022

Discussed in #27

New Syntax:

  • (?i) means that everything after that is case-insensitive.
  • (?-i) means that everything after that is case-sensitive.

New Parameter

  • AddNfa(..., regExModes = 0)
    • AddNfa(..., "a", #RegExMode_NoCase) is the same as AddNfa(..., "(?i)a")

Groups inherit the active modes of the context outside. Mode changes within a group has no effect on the context outside this group.

The implementation will use Unicode's Simple Case Folding variant (single character code point to single character code point), but in reverse: Instead of mapping all character variations to a single character (folding), a single character is mapped to all character variations (unfolding). This is necessary because the DFA must know all valid characters.

The source file from which the translation table will be created:
https://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt

@SicroAtGit SicroAtGit added the feature New feature label Jan 9, 2022
@SicroAtGit SicroAtGit added this to the v1.0.0-beta milestone Jan 9, 2022
@SicroAtGit SicroAtGit self-assigned this Jan 9, 2022
@SicroAtGit SicroAtGit reopened this Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant