Need reference to good ABNF for \uXXXX syntax

Kent Karlsson kent.b.karlsson at bahnhof.se
Fri Apr 16 15:09:27 CDT 2021



> 16 apr. 2021 kl. 17:25 skrev Doug Ewell via Unicode <unicode at unicode.org>:
> 
> Martin J. Dürst wrote:
> 
>> What bothers me in this grammar is that the first "\u" isn't anywhere
>> in sight, but the second one is there. It would be much clearer if
>> either the first "\u" is at the start of hexchar, i.e.
> 
> Sorry, I neglected to include this line, which precedes everything I did quote:
> 
> SESC = "\" ( %x22 / %x2F / %x5C / %x62 / %x66 / %x6E / %x72 / %x74 /
>             (%x75 hexchar) )

1) Why are some ”very plain letters in ASCII” given as hex escapes here? Esp. since the not so plain (it is used as an escape, which is the point here…) ”\” has not warranted a hex escape. (The grammar even uses it to escape ”, which is a bit ironic).

2) Apart from the second line there, these have nothing to do with ”\u” escapes, and in addition the set of these other escapes vary (a bit) by programming language (or other context), and technically aren’t needed when \u escapes are allowed (though still practical).

/Kent K


> SESC incorporates all the other backslash-escaped characters. It, not hexchar, is the real entity referenced by everything else.
> 
> --
> Doug Ewell, CC, ALB | Lakewood, CO, US | ewellic.org
> 
> 
> 




More information about the Unicode mailing list