bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bracket matching edge cases


From: Chet Ramey
Subject: Re: [PATCH] bracket matching edge cases
Date: Fri, 17 Oct 2025 09:12:31 -0400
User-agent: Mozilla Thunderbird

On 10/11/25 12:32 AM, Grisha Levit wrote:
When using single-byte strings, invalid collating symbols and invalid
equivalence classes are treated as the character 0xFF:


--

Without FNM_NOESCAPE, escaping a `[' within a bracket expression usually
prevents it from acting as the start of a collating symbol, equivalence
class, or character class. However, when parsing the ending point (only)
of a range expression, an escaped `[' does not lose its special meaning
and can still act as the start of a collating symbol:

--

Another edge case concerns equivalence classes and character classes in
a position where they could act as a starting point or ending point of
a range expression. In neither case do they actally serve as a range end
(as expected). However, there is a difference in behavior depending on
their being encountered at the start of or at the end of (what looks
like) a range:
Thanks for the detailed analysis and patch.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]