pascalkuthe / regex-cursor

Port of the regex crate for use with ropes
Apache License 2.0
35 stars 5 forks source link

Porting to Fancy regex? #1

Open CeleritasCelery opened 11 months ago

CeleritasCelery commented 11 months ago

I wanted to get an understand of what if would take to port a crate like fancy-regex to use this "streaming regex" API? I would assume it would be high effort because that crate is based on regex, and it would have to be ported to the modified regex-automata API.

pascalkuthe commented 11 months ago

My understanding is that that crate contains itw own regex engine/vm that only delegates to the regex crate in some cases.

Replacing the regex usage would probably be quite easy. The endgoal for this crate (it's not there yet) is to essentially offer the same APi as regex.

It should be possible to port that crates vm as well but it's hard to tell how much effort that would be. Probably a lot more ebut its likely reasoable. The VM doesn't look too complex. Ths would require an input that allow backwards iteration tough (for the backtracking). It should also likely be a separate project that would just depend on this crate (same relationship the original crate has to regex)