streaming data back from the regexoid before it is completely matched is kind of...

@kimapr@ublog.kimapr.net

streaming data back from the regexoid before it is completely matched is kind of problematic because it may be possible for it to backtrack in an any(...) or rep(...)

which, i’m not sure what to do about this

i could either make it somehow make sure it’s not possible for it to backtrack after a “yield-with-value”, either by analyzing the regexoid and making it a compile error to yield data from a backtrackable path, or checking it at runtime (and then what, throw an error? or make the regex fail to match? the latter seems more surprising)

or i could include a “hello your regex backtracked so this and that data we previously returned is now invalid” message in the return value. this sounds annoying to handle for the user

maybe i just say it’s Undefined Behavior and do nothing. that seems simplest to implement

RE: https://ublog.kimapr.net/objects/31f289a8-1a51-4900-9f77-0a549d286a4c