-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
eggex 'a'{N *} crashes, needs a proper error #1895
Comments
Looks like this is simply unimplemented. Line 646 in 3aa3839
Also representing something like "term repeating 1 ~ 4 times non-greedily" doesn't seem to have an elegant solution for now. |
If there'll be a refactor I guess it would be nice to have something like https://docs.raku.org/language/grammars |
In Oils, we use libc regcomp() / regexec() which only supports POSIX ERE, which doesn't have greedy like Perl/Python So this should definitely not crash, but it will still be a parse error. Or we can parse it, and allow people to export to the AST, so they can translate it to Python/Perl syntax |
I think at least user should be able to use eggex to match in a if statement. |
Rather than an assertion. Perl-style operators can't be translated to POSIX ERE (implemented by libc) This is issue #1895.
This is now a proper parse error Not sure what you mean, the problem here is that Oils uses libc, which supports POSIX ERE, not Perl-style repetition
In theory eggex can be translated to Perl-style engines, but we don't have that |
Oils 0.21.0 https://www.oilshell.org/
git commit = cc2f683
The text was updated successfully, but these errors were encountered: