Re: Refactor of ixml grammar

Well the default for a terminal is to include it in the output. So

 date: day, " ", month, " ", year.
and
 date: day, ^" ", month, ^" ", year.

are equivalent. You need ^ for nonterminals because their default can be 
hidden or attribute, and so you need to be able to override it. But there 
is nothing to override for terminals, and I can't imagine anyone ever 
feeling the need to use the ^ form for terminals.

Steven

On Thu, 04 Nov 2021 15:15:20 +0100, C. M. Sperberg-McQueen 
<cmsmcq@blackmesatech.com> wrote:

 > Oh, er, ah. I am always uncomfortable when there is no explicit
 > specification whose meaning is the default behavior.
 >
 > (An early influence on me, I guess, was an article by Harlan Mills of
 > IBM on how to use System 360 JCL with fewer errors; the basic idea
 > was that many errors were caused by the complicated system of
 > defaults, which changed depending on various partial specifications.
 > His remedy: write JCL as if it had no default values. That way, you
 > never needed to learn the rules for defaults. I do still do that when
 > learning new languages; it helps. I also decline to learn more than
 > one or two levels of operator priorities.)
 >
 > Michael
 >
 >
 >> On 4,Nov2021, at 4:34 AM, Steven Pemberton <steven.pemberton@cwi.nl>
 >> wrote:
 >>
 >> Another change I think worth making:
 >> A tmark is either ^ and -, since @ is completely meaningless for
 >> terminals.
 >>
 >> However, ^ also has no use, since that is the default anyway, and there
 >> is no usecase where you need it to override anything.
 >> So I propose making:
 >>
 >> @tmark: "-".
 >>
 >> Steven
 >>
 >> On Thursday 04 November 2021 00:02:54 (+01:00), Steven Pemberton wrote:
 >>
 >> > In an idle moment, I refactored the grammar. Comments gladly 
received.
 >> > Changes: * I hid all nonessential terminals. I know above all Tom was
 >> asking for this.
 >> > * I moved the spaces from the rule for ixml into the rule for rule.
 >> Tidier and more consistent.
 >> > * I renamed S to s.
 >> > * I simplified 'namestart', since I realised class L covered all the
 >> cases.
 >> >
 >> > I think that's all.
 >> >
 >> > See attachment.
 >> >
 >> > Steven
 >>
 >

On Thursday 04 November 2021 15:15:20 (+01:00), C. M. Sperberg-McQueen 
wrote:

 > Oh, er, ah. I am always uncomfortable when there is no explicit
 > specification whose meaning is the default behavior.
 >
 > (An early influence on me, I guess, was an article by Harlan Mills of
 > IBM on how to use System 360 JCL with fewer errors; the basic idea
 > was that many errors were caused by the complicated system of
 > defaults, which changed depending on various partial specifications.
 > His remedy: write JCL as if it had no default values. That way, you
 > never needed to learn the rules for defaults. I do still do that when
 > learning new languages; it helps. I also decline to learn more than
 > one or two levels of operator priorities.)
 >
 > Michael
 >
 >
 > > On 4,Nov2021, at 4:34 AM, Steven Pemberton <steven.pemberton@cwi.nl> 
wrote:
 > >
 > > Another change I think worth making:
 > > A tmark is either ^ and -, since @ is completely meaningless for 
terminals.
 > >
 > > However, ^ also has no use, since that is the default anyway, and 
there is no usecase where you need it to override anything.
 > > So I propose making:
 > >
 > > @tmark: "-".
 > >
 > > Steven
 > >
 > > On Thursday 04 November 2021 00:02:54 (+01:00), Steven Pemberton 
wrote:
 > >
 > > > In an idle moment, I refactored the grammar. Comments gladly 
received.
 > > > Changes: * I hid all nonessential terminals. I know above all Tom 
was asking for this.
 > > > * I moved the spaces from the rule for ixml into the rule for rule. 
Tidier and more consistent.
 > > > * I renamed S to s.
 > > > * I simplified 'namestart', since I realised class L covered all the 
cases.
 > > >
 > > > I think that's all.
 > > >
 > > > See attachment.
 > > >
 > > > Steven
 > >
 >
 >
 >

Received on Saturday, 6 November 2021 14:45:36 UTC