An adapter between irregex and ropes
This Chicken Scheme extension, rope-irregex, provides two chunkers for irregex's chunked API compatible with ropes from the ropes egg.
One is called rope-chunker, which is directly compatible with ropes, and the other saves a lot of CPU and memory, it's called flat-chunker, and you get a rope->flat to wrap your rope with.
In other words, these two are equivalent:
(irregex-search/chunked "ana" rope-chunker (rope "banana")) (irregex-search/chunked "ana" flat-chunker (rope->flat (rope "banana")))
The second way is faster than the first and also saves memory.
Either way, irregex-match-subchunk will return a flat list of rope leaves.
For source code,
git clone https://idiomdrottning.org/rope-irregex