[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] Re: bugs in regexp.c
From: |
Paul Eggert |
Subject: |
[bug-gnulib] Re: bugs in regexp.c |
Date: |
Thu, 10 Mar 2005 16:29:50 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Sam Steingold <address@hidden> writes:
>>> 3. regcomp("$*"): "Invalid preceding regular expression"
>>> 8. regcomp("[[:xdigit]+") works, but when the result is matched against
>>> "0[x:dig", it matches just "[", not "[x:dig"
>
> what's wrong with 8?
POSIX says:
The character sequences "[.", "[=", and "[:" (left-bracket followed
by a period, equals-sign, or colon) shall be special inside a bracket
expression and are used to delimit collating symbols, equivalence
class expressions, and character class expressions. These symbols
shall be followed by a valid expression and the matching terminating
sequence ".]", "=]", or ":]", as described in the following items.
(8) violates a "shall" so it's not a good test case.
>> From the current gnulib code, I don't see how (3) could happen, so I'm
>> at a bit of a loss about how that bug occurs.
>
> well, it _does_ occur.
I agree, it's just that I don't see how it happens, and I don't know
how to reproduce it easily.