Re: What about this grammar?

On Sat, Sep 10, 2022 at 02:10:40PM +0100, Norm Tovey-Walsh scripsit:
> Assuming that ‘^S’ in what follows represents the single character #13,
> is an implementation required to, allowed to, or forbidden from
> accepting this grammar:
> 
>   S = -'^S', 'a'.
> 
> parsing “^Sa” to produce <S>a</S>?

My take is that it's forbidden.

If I type U+0013, it looks like  but searching for ^S does not find
it.  I can make the visual distinction because the editor I'm using
displays U+0013  using a different colour.  Another editor might not
do that; some other process operating on the file might turn it into ^S,
U+005E U+0053, before it gets to the ixml parser.

I'm not seeing much upside to allowing literal control characters not
permitted in XML in the grammar via some additional notational
mechanism.

> (The problem, in case it’s not immediately obvious, is that the grammar
> cannot be represented in XML because a #13 isn’t allowed.)

I don't think it's unreasonable to have a consisent codepoint
representation mechansim in ixml.

-- 
Graydon Saunders  | graydonish@gmail.com
Þæs oferéode, ðisses swá mæg.
-- Deor  ("That passed, so may this.")

Received on Sunday, 11 September 2022 00:07:49 UTC