Re: Properties of the ixml grammar

Steven Pemberton <steven.pemberton@cwi.nl> writes:
> If I were to ask you what were the properties of the ixml grammar that
> are interesting, what would you answer?
> Here is my list, but have I omitted anything that you have noticed?

I’m not sure I really understand what you’re looking for.

> * All meaningful characters are in attributes.

Okay, this seems to be about the XML serialization of an ixml grammar,
in particular. Yes, that’s interesting.

> * All non-meaningful characters are deleted.

Aside from whitespace, there aren’t any non-meaningful characters, so I
might have drafted this as “irrelevant whitespace is removed” or
something like that.

> * 'Whitespace' includes both space characters and comments, and while
>   spaces are deleted in the output, comments are not. This means that
>   the placing of the space rules has to make sure that comments do not
>   end up in attributes.

I guess that’s interesting.

> * The marks for a rule are always on the definition; they are never
>   overridden in use.

I’m not sure I follow. Given:

  ^S = a | @b.
  ^a = "a" .
  ^b = "b" .

It sure looks like the mark on the “b” rule, “^” is being overridden in
use in the “S” rule.

> * Understandably, it is strict and not permissive.
> * The way that double quotes in a string are reduced to a single quote
>   is mildly noteworthy.

Yes.

> * Some syntactic structures are identified by the presence of an
>   attribute rather than having their own element, such as <literal
>   string="..."/>  <literal hex="..."/>

Yes.

I have sometimes been puzzled by the way the <alts> element is sometimes
present and sometimes not, but I can’t point to an example off the top
of my head.

Hope that’s helpful.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Monday, 17 October 2022 17:10:51 UTC