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

Improve optimal-quantifier-concatenation #278

Closed
RunDevelopment opened this issue Jul 23, 2021 · 0 comments · Fixed by #279
Closed

Improve optimal-quantifier-concatenation #278

RunDevelopment opened this issue Jul 23, 2021 · 0 comments · Fixed by #279
Assignees
Labels
enhancement New feature or request

Comments

@RunDevelopment
Copy link
Collaborator

There is a whole class of fixable problems optimal-quantifier-concatenation (OQC) can't detect yet. Right now, OQC can only detect (and fix) the concatenation of single-character quantifier (e.g. \d*\w*). It's can't detect anything else.

OQC should also be able to detect (and fix) (?:foo)?\w+ == \w+.

More generally, if we have a single-character quantifier A{n,∞} and a quantifier B{p,q}, we will be able to simplify B{p,q} to B{p} if all possible consumed characters of B are a subset of A (getConsumedCharacters(B) ⊆ getConsumedCharacters(A)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant