[TRE-general] libtre capture nonsense

Ville Laurikari ville at laurikari.net
Sun Jan 28 10:31:15 EET 2007


On Mon, Jan 15, 2007 at 08:45:33PM +0000, Chris Kuklewicz wrote:
> Specifically, this behavior from libtre seems like nonsense:
>
> > let r = makeRegex "(b*|c(c*))*" :: Text.Regex.TRE.Regex
>   in match r "cbb" :: MatchArray
>
> array (0,2) [(0,(0,3)),(1,(1,2)),(2,(1,2))]
> But \2 is (c*) so this is nonsense.

This is definitely a bug in TRE.  I added this test case in the
regression tests and did some debugging.  The bug seems to be in the
part which adds tags in the syntax tree.  It's probably easy enough to
fix, I'll see what I can do about it.

--
http://www.iki.fi/vl/


More information about the TRE-general mailing list