Re: On pragmas…

I agree with much of what Liam writes (even though I am not from an
Anglican background).  I do have some notes on isolated points.

Liam R. E. Quin writes:

> I still think the answer is to allow pragmas anywhere people want to
> put them (at least between tokens) and not to worry about it further.
> The people who do nasty things with them will do them anyway.

My only reservation about this is that ixml grammars have both an ixml
and an XML representation.  How whitespace is handled in the grammar
(specifically: which production the space between two tokens is part of)
has no effect on the XML (since the whitespace is suppressed in the XML)
and is a matter of indifference in practice, as long as the grammar
manages to allow whitespace where it should and avoid ambiguity.

It is somewhat less convenient that comments are allowed in some places
where I have dificulty imagining I would want a comment element in the
XML, and forbidden in places where I know I want comment elements in the
XML (I know it because I put them there, before I had a schema for VXML
grammars), but it's bearable.

For the use cases we have been able to imagine for pragmas, using the
existing locations of s as the possible locations for pragmas would be
very inconvenient: many of the locations that look as if they are where
you would want a pragma that applies to a particular token will place
the pragma somewhere else, not as a child of that token in the XML.  See
mail from Norm on this topic sometime in the last couple of weeks.

For people who only work with ixml grammars in ixml form, and not in XML
form, this question is likely to feel unimportant.  I am not one of
those people.

> Is there a taxonomy of pragmas? (prgamata?)

Not an exhaustive one; in the nature of things, non-standardized
information is likely to resist exhaustive categorization.

It is observable, however, that all of the actual use cases people have
thought of can be handled by pragmas relating to grammars, to rules, or
to individual symbols.  In one case, it would be convenient if pragmas
could relate to top-level alt elements. Tom and I were unable to make
that work well in the grammar and we gave it up; if I remember
correctly, Norm has an idea that could make it work (it involves
wrapping each top-level alt that wants a pragma in parentheses, which
produces an alt/alts/alt nesting in the XML; that may be a price worth
paying).

Michael


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

Received on Wednesday, 30 March 2022 04:13:44 UTC