-
Notifications
You must be signed in to change notification settings - Fork 316
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
With ONIG_SYNTAX_DEFAULT pattern '(?s)ABC' fails with 'undefined group option'. #297
Comments
Please use
Line 155 in 1b37592
Lines 520 to 528 in 1b37592
Lines 172 to 183 in 1b37592
|
Thank you for replying. I would gladly follow your advice if it was possible. We are migrating from Presto Java to Presto Native (C++) with the latter using Velox library. So, we are looking/investigating at adopting Oni instead. Would it be possible to also support We could, potentially, scan and rewrite the pattern before using it with Oni, however in such cases how can we sure that we can safely rewrite any Thank you! |
Sorry, I'm an end user so I don't know the details. I think you can add an option ' Lines 146 to 169 in fd33056
I think #296 is very helpful. This adds These options are documented in SYNTAX.md . Or do you want to use ONIG_SYNTAX_DEFAULT? |
Is the syntax you used "Syntax Java" in JONI ? JONI : options of "Syntax Java" I did a test to add "ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP" to oniguruma's "ONIG_SYNTAX_JAVA". I think it would be good to make the syntax options of JONI and oniguruma similar.
This is a question that should be answered by the Owner so I cannot answer it, sorry.
This is very difficult and not recommended. Please try "ONIG_SYNTAX_PERL_NG" of oniguruma. |
This seems useful. Thank you. To confirm (or disprove) that I understand it right: Does it mean that we can build our own Or, as you suggested, if Thank you! |
We use Java syntax, it seems:
However, we are most likely be using a forked repo and not the master JONI. The path to the JONI jar is like that:
JONI repo does not have such version in the list of tags. I agree the syntax should be the same, if possible, however, already there are some serious differences, like the named capture group. I'll try ONIG_SYNTAX_PERL_NG syntax too, thank you! |
I ported the options from JONI-2.1.5.3 's "
SYNTAX.md I tested using this syntax and it was successful.
Sorry, I don't have the knowledge to answer these questions. |
Sorry for keeping you waiting.
The answer to all of these questions is "yes". If you want to write code based on " If you want to use Line 79 in f2f9c69
Please exchange " SYNTAX.md : SYNTAX.md : However, this swap makes If you want to change only Lines 8281 to 8302 in f2f9c69
Below is an explanation of " Lines 79 to 80 in f2f9c69
But such a change may be confusing to users. If I were a user, I would like to be able to choose between the JONI and oniguruma syntax. And oniguruma can do that. If you want to replace the default syntax, please change the following: Line 164 in f2f9c69
Line 281 in f2f9c69
If you want to create your own syntax, please refer to the following. oniguruma.h Line 427 in f2f9c69
Line 441 in f2f9c69
onigposix.h Line 134 in f2f9c69
Line 145 in f2f9c69
regsyntax.c Line 146 in f2f9c69
|
@tonco-miyazawa I'm sorry that I wasn't able to reply here earlier - was busy implementing the remaining regex functions based on Oni and testing them, collecting issues I can find. |
I'm glad I could be of help to you. Don't worry about the reply. I think the next problem will be that I will close this thread as it has served its purpose. Thank you. EDIT: I can't seem to close this thread. |
@tonco-miyazawa The code:
where Somewhat relevant:
To treat string as a single line, which |
Congratulations! Good job!
I have tested this and found that this option works correctly. " " " So I created a test to check if the option is valid or Invalid.
Below is the command for testing above.
Also, please check your Lines 76 to 104 in bcfbab2
Also, see below for the values of " Line 372 in bcfbab2
You can also check " Line 85 in bcfbab2
I hope your work goes well. Thank you. |
We are trying to use Oni as Regex library in Velox for Presto Native Execution.
Another issue we've encountered is:
With
ONIG_SYNTAX_DEFAULT
pattern(?s)ABC
fails withundefined group option
.I confirmed that group option
's'
works withONIG_SYNTAX_JAVA
, however the latter does not support named capture groups like?<digit>
, which is also critical for us.I was wondering if it is possible to add support of
's'
toONIG_SYNTAX_DEFAULT
.Thank you!
The text was updated successfully, but these errors were encountered: