We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there any way to simplify having to qualify greedy operators so a proper match occurs:
.* <--- Matches everything .* 'x' <--- Matches everything 'x' is pointless as .* consumes all x's (!'x' .)* <--- qualified to only match on non-'x'
The qualification is necessary but overcomplicates things.
It would be nice if one could write
.* 'x'
and the next rule(group if or'ed) is checked automatically.
This is a common occurrence because most greedy matches have some type of termination(e.g., "'s for strings, brackets for arrays, etc).
If Pegged can't do this easily maybe a new operator symbol could be created to handle it?
.** 'x'
would match all characters and terminating when 'x' is found.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there any way to simplify having to qualify greedy operators so a proper match occurs:
.* <--- Matches everything
.* 'x' <--- Matches everything 'x' is pointless as .* consumes all x's
(!'x' .)* <--- qualified to only match on non-'x'
The qualification is necessary but overcomplicates things.
It would be nice if one could write
.* 'x'
and the next rule(group if or'ed) is checked automatically.
This is a common occurrence because most greedy matches have some type of termination(e.g., "'s for strings, brackets for arrays, etc).
If Pegged can't do this easily maybe a new operator symbol could be created to handle it?
.** 'x'
would match all characters and terminating when 'x' is found.
The text was updated successfully, but these errors were encountered: