- From: Norm Tovey-Walsh <norm@saxonica.com>
- Date: Mon, 11 Nov 2024 11:36:15 +0000
- To: ixml <public-ixml@w3.org>
- Message-ID: <m25xoukno0.fsf@saxonica.com>
Hello, Last time we talked about pragmas, we agreed to think some more about the scoping of pragmas. As background, the Balisage proposal[1] is a good starting place. I think there are three requirements for pragma scope: 1. The pragma applies to the entire grammar 2. The pragma applies to a particular rule 3. The pragma applies to a particular terminal or non-terminal on the right hand side of a rule There are more places where a pragma *could* apply, for example, to a term, or an insertion, or only one part of a character set. But despite several years of experimentation and some thought on the matter, no plausible use case has ever been proposed that would benefit from pragmas in these additional places. Let’s not complicate our lives unnecessarily! I think the syntax proposed in the Balisage paper satisfies these requirements and I propose that we adopt it. It describes a syntax for pragmas that “hides” them in comments for non-pragma aware processors and tackles the problem of pragma scoping by distinguishing between pragmas in the prolog (that apply to the whole grammar) and pragmas elsehwere that are more tightly scoped. Be seeing you, norm [1] https://balisage.net/Proceedings/vol27/html/Sperberg-McQueen01/BalisageVol27-Sperberg-McQueen01.html -- Norm Tovey-Walsh Saxonica
Received on Monday, 11 November 2024 11:36:21 UTC