Re: Renaming

Some notes interleaved.

Norm Tovey-Walsh <norm@saxonica.com> writes:

>> Steven Pemberton <steven.pemberton@cwi.nl> writes:
>>> Since we have agreed on a change that means that certain XML names
>>> are no longer possible in serialisations,
>>
>> ...
>
> The change is “.” at the end of a name.

>>> and an additional
>>>
>>>  name>"string"
>>>
>>> it means we unbind the syntax of names used in the grammar from
>>> those used in the serialisation.

Er, the syntax of names used in the grammar has for a long time not been
the same as the syntax of XML names.  That is one of the reasons we have
to have a rule saying that it's an error if a grammar specifies a
serialization that would not be well-formed XML (two attributes of the
same name, nonterminal or alias not an XML name, etc.).

It was not a design decision I favored at the time -- for some users
(including me) things would be far simpler if ixml's nonterminals were
just defined as strings conforming to the definition of Name in the XML
spec -- and the experience of the last few years has not shown me any
advantages to our decision not to align with XML on the matter.  But I
acceded to the decision.

I now have two questions:

(1) From Steven's word choice, I infer that he believes it would be a
good idea to separate the syntax of nonterminals further from the syntax
of XML names.  Why would it be a good idea?

(2) The proposal to make the right-hand operand of ">" a quoted string
seems to allow wider freedom in the wrong operand.  If we want to allow
things in nonterminals that are not allowed in XML names, then it's the
left operand that needs to be changed, not the right operand, surely?
Suppose we decide, in hommage to van Wijngaarden's practice, to allow
blanks in nonterminals.  Then 

  n_block > "nested block"

is, as far as I can see, copmletely backwards.  We would need to write

  "nested block" > block2

or something similar.  So my second question is:  why does the proposal
make the alias, instead of the nonterminal, a quoted string?

>>> (This also means we *could* simplify the definition of names used in
>>> grammars).

>>
>> I don’t see much benefit to moving away from XML names for grammar
>> symbol names. I’m afraid it will just cause confusion by requiring
>> renaming (which is already a complication in the grammar for users).
>
> He also said:
>
> We've just done it. But I'm OK with keeping what we now have as is. 

No, we have not "just done it".  It was done quite a long time ago,
measured in the lifespan of ixml. 

Like Norm, I don't see much benefit to moving nonterminals further away
from XML names -- or more generally moving ixml further away from XML
and related technologies.  Since every other grammar notation I have
used over the years is far more restrictive than ixml in how
nonterminals may be named, I have not been chafing under the
restrictions of ixml's definition of name.  Perhaps others have had
different experiences.

Michael

-- 
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
http://blackmesatech.com

Received on Wednesday, 29 May 2024 14:36:50 UTC