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

Package TRegex for regular Java program consumption #709

Open
rednaxelafx opened this issue Oct 3, 2018 · 2 comments
Open

Package TRegex for regular Java program consumption #709

rednaxelafx opened this issue Oct 3, 2018 · 2 comments
Assignees

Comments

@rednaxelafx
Copy link

rednaxelafx commented Oct 3, 2018

TRegex looks like a very nice regular expression engine implementation. Thanks a lot to the Graal/Truffle team for making it available!

It would be a pity to be confined to just the Truffle languages' world. It'd be really cool to allow regular Java programs to be able to use it as well.

A few features that would be nice-to-have in this scenario would be:

  • Accept Java regular expression syntax (to the extent that the DFA can support)
  • Wrap TRegex into a familiar Pattern / Matcher API similar to the one in the JDK
  • Make package available on popular package managers (e.g. Maven?)
  • Maybe compile the package into SVM-style native image to reduce initial overhead?

The API wrapper was done in an NFA-based RE2/J as well. RE2/J doesn't support all features that java.util.regex does, but by wrapping the engine into a familiar API, it eases the migration, so that regular expressions that happen to be supported can switch from using the JDK one to RE2/J by simply changing the import statements.

@wirthi
Copy link
Member

wirthi commented Oct 3, 2022

Hi,

we currently have a student investigating that area. We might be able to publish that as an experimental feature (at least your points #1, #2 and #4; not sure about #3).

Maybe @djoooooe can give you a quick update here once this is merged.

Christian

@rednaxelafx
Copy link
Author

Great news! Thank you @wirthi and @djoooooe for picking up this idea, still looking forward to having a fast DFA RE impl for Java ^_^

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

No branches or pull requests

3 participants