Re: Further thoughts on delimiter choices

On Tuesday 18 January 2022 14:51:52 (+01:00), Norm Tovey-Walsh wrote:

> Steven Pemberton <steven.pemberton@cwi.nl> writes:
> > You can already add colons to names without changing anything else. It
> > doesn't make the language ambiguous.
> >
> > I just tried it by adding colon to namefollower, and then parsing:
> >
> > abc:thing: abc:thing1, abc:thing2, abc:thing3;
> > abc:thing3, abc:thing2, abc:thing1.
> > abc:thing1: "a".
> > abc:thing2: "b".
> > abc:thing3: "c".
>
> Now try
>
> abc:thing:thing1: abc:thing2
Done.

abc:def:ing: abc:def:thing1, abc:def:thing2, abc:def:thing3;
    abc:def:thing3, abc:def:thing2, abc:def:thing1.
abc:def:thing1: "a".
abc:def:thing2: "b".
abc:def:thing3: "c".


<ixml>
   <rule name='abc:def:ing'>
      <alt>
         <nonterminal name='abc:def:thing1'/>
         <nonterminal name='abc:def:thing2'/>
         <nonterminal name='abc:def:thing3'/>
      </alt>
      <alt>
         <nonterminal name='abc:def:thing3'/>
         <nonterminal name='abc:def:thing2'/>
         <nonterminal name='abc:def:thing1'/>
      </alt>
   </rule>
   <rule name='abc:def:thing1'>
      <alt>
         <literal dstring='a'/>
      </alt>
   </rule>
   <rule name='abc:def:thing2'>
      <alt>
         <literal dstring='b'/>
      </alt>
   </rule>
   <rule name='abc:def:thing3'>
      <alt>
         <literal dstring='c'/>
      </alt>
   </rule>
</ixml>


Steven

Received on Tuesday, 18 January 2022 14:36:13 UTC