Open Inc0n opened 5 years ago
Thank you for the issue. However, ^+
is an invalid expression of POSIX Extended Reuglar Exression. You could check it with grep like this.
$ grep -E '^+' <(echo '+')
grep: repetition-operator operand invalid
We follow the syntax of grep with -E
option that is the Extended Reuglar Exression.
Cheers.
I think the mistake is that the regex should be “^+”, should some type of check be implemented into the syntax check? For this type of issue.
On 14 Mar 2019, at 09:09, TANIGUCHI Masaya notifications@github.com wrote:
Thank you for the issue. However, ^+ is an invalid expression of POSIX Extended Reuglar Exression. You could check it with grep like this.
$ grep -E '^+' <(echo '+') grep: repetition-operator operand invalid We follow the syntax of grep with -E option that is the Extended Reuglar Exression. Cheers.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Yes, I agree that we should implemented into the syntax check, then the better way is reimplementing the parser with full-futured parser generators such as esrap
because we could expect that these parser generators can inform errors and suggestions to correct the syntax.
Of couse we could add the validator for these errors with this engine but the syntax is not in the regular grammar, thus the validator is incomplete to check all errors.
trying regex string "^+" or "^+" to match '+' at start would hang
but this would work