https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209116

Kyle Evans <bsdpo...@kyle-evans.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bsdpo...@kyle-evans.net

--- Comment #1 from Kyle Evans <bsdpo...@kyle-evans.net> ---
Created attachment 179160
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179160&action=edit
WIP patch for poor matching behavior

Hi,

So the way this works now, if I understand correctly, is it basically ends up
matching each successive pattern against a shorter and shorter subset of the
string based on the last match that was made rather than comparing each pattern
to the full length of the line that we're processing. This feels wrong, and
indeed it ends up being wrong.

I'm attaching a WIP patch for fixing this. It's still not quite right -- the
'nst' variable that I've added will generally advance the start of future
matching to either the end of the line or the end of the last matched pattern,
depending on how things work out.

Do note that I've not yet checked any specifications on this to figure out
whether it's expected that we would process again at the end of the shortest
match or the end of the longest match, though intuition tells me we likely want
to start processing again at the end of the shortest match.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to