|
From: | Julian Foad |
Subject: | Re: Fix dfa generation for interval expressions |
Date: | Wed, 08 Feb 2006 17:24:26 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 |
Andreas Schwab wrote:
This fixes the dfa generation when creating copies of MBCSET tokens, where addtok assumes the corresponding multibyte cset is the last one added. This is wrong when duplicating a group consisting of multiple MBCSETs.
Thank you very much for the patch. Could you possibly provide a test for this bug, or a reproduction recipe that demonstrates it, or a link to an existing bug report?
- Julian
Andreas. 2006-02-08 Andreas Schwab <address@hidden> * src/dfa.c (copytoks): Adjust index into multibyte csets when copying a MBCSET token. --- src/dfa.c.~1.36.~ 2005-09-08 15:09:22.000000000 +0200 +++ src/dfa.c 2006-02-08 12:12:25.000000000 +0100 @@ -1338,7 +1338,14 @@ copytoks (int tindex, int ntokens) int i;for (i = 0; i < ntokens; ++i)- addtok(dfa->tokens[tindex + i]); + { + addtok(dfa->tokens[tindex + i]); +#ifdef MBS_SUPPORT + /* Update index into multibyte csets. */ + if (MB_CUR_MAX > 1 && dfa->tokens[tindex + i] == MBCSET) + dfa->multibyte_prop[dfa->tindex - 1] = dfa->multibyte_prop[tindex + i]; +#endif + } }
[Prev in Thread] | Current Thread | [Next in Thread] |