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

Proposal: change regexp backend #306

Open
leque opened this issue Nov 8, 2021 · 2 comments · May be fixed by #315
Open

Proposal: change regexp backend #306

leque opened this issue Nov 8, 2021 · 2 comments · May be fixed by #315

Comments

@leque
Copy link
Contributor

leque commented Nov 8, 2021

Currently, SATySFi uses OCaml's Str module as the regexp backend. But it has some drawbacks:

So, how about changing the regexp backend from Str to, say, ocaml-re? It supports large subsets of PCRE, has nice performance, and has no global states. Or, pcre-ocaml? It might be another choice not to have regexp primitives in the core, and use a library-implemented regexp engine, such as satysfi-base's.

@puripuri2100
Copy link
Contributor

The regexp engine implemented by the SATySFi library has the disadvantage of "Slow".

@leque
Copy link
Contributor Author

leque commented Dec 29, 2021

After some investigation, I realized that ocaml-re does not support Unicode (ocaml/ocaml-re#24). So pcre-ocaml + `UTF8 flag would be a preferred choice. Unicode support is also required to fix a problem that regexp primitives (string-scan (regexp `.`) `あいう` etc.) may generate a invalid string (cf. #56).

leque added a commit to leque/SATySFi that referenced this issue Dec 29, 2021
@leque leque linked a pull request Dec 29, 2021 that will close this issue
leque added a commit to leque/SATySFi that referenced this issue Dec 29, 2021
leque added a commit to leque/SATySFi that referenced this issue Dec 29, 2021
leque added a commit to leque/SATySFi that referenced this issue Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants