[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix dfa generation for interval expressions
From: |
Andreas Schwab |
Subject: |
Fix dfa generation for interval expressions |
Date: |
Wed, 08 Feb 2006 12:46:07 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
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.
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
+ }
}
static void
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- Fix dfa generation for interval expressions,
Andreas Schwab <=