[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21486: [PATCH 3/3] dfa: cache transition from a state with dot expre
From: |
Paul Eggert |
Subject: |
bug#21486: [PATCH 3/3] dfa: cache transition from a state with dot expression in non-UTF8 multibyte locales |
Date: |
Tue, 16 Aug 2016 00:51:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Thanks for writing that patch. I installed it in grep master (after tweaking the
commit message a bit) and am marking this bug report as done.
I noticed what appears to be a problem in the patch, in the code:
d->mb_trans[s][mb_index & ~0] = state;
I expect the "0" was intended to be a "1". I attempted to fix this by installing
the attached patch 1, using + rather than & and |, as this was easier for me to
follow and is likely a tiny bit faster anyway.
I also installed the attached patch 2, which ports the resulting dfa.c to C90;
as I understand it Gawk still needs this.
I also installed the attached patch 3, which does some minor refactoring and
cleanup and commentary fixes. As you can see, I am a fan of Leibniz-style
comparison (preferring < to > and <= to >=).
Thanks again for the patch.
0001-dfa-fix-context-newline-confusion.patch
Description: Text Data
0002-dfa-port-to-C90.patch
Description: Text Data
0003-dfa-minor-refactoring-and-doc-fixes.patch
Description: Text Data
- bug#21486: [PATCH 3/3] dfa: cache transition from a state with dot expression in non-UTF8 multibyte locales,
Paul Eggert <=