SimpleRegex / SRL-Python

Python implementation of SRL.
MIT License
78 stars 8 forks source link

Parse regex to SimpleRegex #7

Open soasme opened 7 years ago

soasme commented 7 years ago

The proposal here is to parse and analyse the structure of regex expression to SimpleRegex expression. It was enlightened an email sent by Adalbert Arsen. I endorse this plan because it's quite educative for regex learners & sounds like a good tool to debug complicated regex expression.

Clara-Brandt commented 3 years ago

I see that this issue is about 4 years old now, and I'm not sure if anyone is currently working on this project, but I've written some python and javascript code that does essentially this (it's kind've like a simple compiler). It works in most simple cases (there's just a couple of SRL flags and keywords that aren't implemented) but sometimes has to resort to using the "raw" method where certain meanings can't be translated. There are also cases where I had to translate to a more complicated SRL expression because a simple translation wasn't possible (character classes with a mix of ranges and elements.) Since I've been exploring a lot of potential regex cases I've come across some SRL bugs along the way, I'll open a separate issue for those. Please let me know if you have any interest in collaborating!