oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.25k stars 1.62k forks source link

Package TRegex for regular Java program consumption #709

Open rednaxelafx opened 5 years ago

rednaxelafx commented 5 years ago

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:

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 commented 1 year ago

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 commented 1 year ago

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