chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Fix #1066


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Fix #1066
Date: Sun, 17 Nov 2013 11:45:48 +0100
User-agent: Mutt/1.4.2.3i

Hi all,

I've asked Alex about CHICKEN bug #1066 and he came up with a patch for
it in the upstream Irregex repo, so here is the ported version to
CHICKEN.  It adds several extra regression tests for lookahead and
lookbehind (both positive and negative).

The problem was that submatches create extraction entries in the vector
which return the matching chunk.  However, the chunking type is
user-defined and may be an entirely different representation from
the simple string chunking that's used by default.  When doing negative
lookbehind, it created a simple string chunker over the prefix string,
which caused simple string chunks to end up in the matchresult vector.

This patch creates a wrapped chunker instead, which operates directly
on the user's chosen representation but refuses to continue after the
given point.  This means that the chunks are returned in the user's
representation and these will end up in the matchvector.

Sorry if I'm not explaining this too well; I don't fully grok the
chunking stuff yet (but I'm slowly starting to).

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-Irregex-Fix-1066-submatches-in-negative-look-behind-.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]