- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Mon, 08 Nov 2021 10:29:02 +0000
- To: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
- Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, ixml <public-ixml@w3.org>
Fine, first nonterminal it is then. By the way, if anyone wants a special syntax to determine the root: -root: html. will work fine. Steven PS My code is not yet publicly visible. Cleaning it up now in preparation for the C version. On Monday 08 November 2021 00:28:26 (+01:00), C. M. Sperberg-McQueen wrote: > Since I frequently write grammars in which the start symbol can > appear recursively, I think ’not used on any RHS’ is not a good way > to identify the start symbol. Example: here is one of the grammars > I used in demos in my Declarative Amsterdam talk: > > S: S; ‘a’. > > (I think this may have been the grammar that your ABC parser > was unhappy with, and if it’s looking for a rule that appears on no > RHS to use as the start symbol, I can understand why this grammar > might make it unhappy.) > > Also, as John Lumley’s example of the other day shows, sometimes > people write collections of productions not all of which are reachable, > in which case there is more than one rule which appears on no > right-hand sides. > > So I think that the start symbol should be identified in some other > way. Having a new piece of syntax to identify the start symbol would > work, but I have come to like the minimalism of having it just be the > first nonterminal listed. > > Michael > > p.s. Speaking if your implementation - is your code publicly visible > anywhere? > > > > On 7,Nov2021, at 2:57 PM, Steven Pemberton <steven.pemberton@cwi.nl> wrote: > > > > The spec currently says > > "The root symbol of the grammar is the name of the first rule in the grammar. " > > > > while my implementation instead identifies the single rule that is not used on any RHS. > > > > Any opinions on the desirability of either approach? > > > > Steven > > > > >
Received on Monday, 8 November 2021 10:29:23 UTC