Regexp in E?
Hi, is there a regular expression module in E? I don't even know if there is some library ready to use in Amiga.
How difficult would be porting this to Amiga?
Thx
I don't know of anything that exists but porting something like this https://github.com/kokke/tiny-regex-c shouldn't be too difficult. Basically just an exercise in transcribing it in E syntax.
Yes, it looks good this tiny-regex but seems to lack branching and grouping. But with 500 lines of code it's great
This also seems to be a good candidate
SLRE is smaller and more advanced than Tiny Regex C. Could a total rewrite avoid GPL? I think it could.
I successfully compiled SLRE with SAS/C. Instead of rewriting the full code maybe the code can be changed to generate a .library and then generate a small .m with EVO in order to use it, after opening the lib.
Sorry, but I am newbie and I can't answer myself these questions
FD2Module is the converter that makes modules out of the FD file that SAS/C generates. That should work.
I've ported the SLRE code to E and added it into the E-VO repo..
Great Darren. Thanks a lot
As a complement to the work of Darren I've built a shared library to use slre from any language
Online Status
I know of none specific to E. Are you looking to filter EStrings? I have an experimental branch of an E framework where one could be added. It's in the filter branch at https://github.com/EEC-Developers/framework
The more I think about it, a PEG parser generator would be more suitable to the task of processing RegExes in E because parsing expression grammars (PEGs) are a superset of regular expressions. Unlike standard RegEx libraries, PEG parsers need no JIT compilation because they translate into E syntax and compile to a custom module. What do you think?