- From: Norm Tovey-Walsh <norm@saxonica.com>
- Date: Mon, 10 Feb 2025 12:47:54 +0000
- To: "Liam R. E. Quin" <liam@fromoldbooks.org>
- Cc: ixml <public-ixml@w3.org>
"Liam R. E. Quin" <liam@fromoldbooks.org> writes: > If the answer is, a pragma within a rule must not have any effect after the end of that rule (in purely lexical terms), so that i can't do > > name: {# start mode case-insensitive #} letter+. > > identifier: name | {# end mode case-insensitive #} keyword. Two things: first, there are no use cases that suggest that pragmas need to start somewhere in the grammar, apply for some sequence of tokens, and then end. I’m not saying that it’s impossible to construct one, but it would have to be very, very compelling to be worth considering, IMHO. Second, the implied semantics of your pragma, that it makes letter matches case insensitive, is a clear violation of the foundational rules. You have to put that in your grammar proper for interoperability reasons. With respect to the scope of a pragma, I think there are good use cases for pragmas that apply to grammars, rules, and nonterminals. It seems clear and obvious to me that this can be easily supported by adjusting the specification grammar so that those pragmas appear as children of the construct to which they apply. Be seeing you, norm -- Norm Tovey-Walsh Saxonica
Received on Monday, 10 February 2025 12:48:02 UTC