>>>> "Ben" == Ben Wing <ben(a)666.com>
writes:
but i got so annoyed to find out about this bug and the horrendously
messed up pseudo-implementation of shy groups that we had that i spent
a few hours tonight that should have gone elsewhere fixing the bug.
Your patch looks good, but it just works around the bug ;-(
The fix I coded up for Emacs actually fixes the stupid unsafe optimization
instead. The main advantage is that \(?:...\) is free again (i.e.
"\\(?:a\\)" generates the same compiled regexp as "a") and that the
code
is "simpler" (at least the file size is reduced). But the patch is
about the same size as the file.
Stefan
PS: \(?:...\) is still not 100% free, of course: "a\\(?:b\\)c" does not
generate the same compiled regexp as "abc", for example.