bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <reductions>


From: Joel E. Denny
Subject: Re: <reductions>
Date: Wed, 17 Oct 2007 22:21:25 -0400 (EDT)

On Sun, 30 Sep 2007, Joel E. Denny wrote:

> > In fact, I might even suggest that
> > the grammar section itself annotates rules unused rules instead
> >
> > of using another separate sections.
> > Similarly, IMHO, there should be only one section about terminals
> > including both their description (name, number, "string" etc.),
> > whether they are unused, useless etc.  I don't see the point of
> > separating them at the XML level.
> > 
> > That would solve your "reduction" section naming problem, as
> > there would be no such section :)
> 
> I agree with all those comments.
> 
> What about something like the following?  Under grammar, we could have 
> rules/useless, rules/never-used, nonterminals/useless, and 

That should be "never-reduced" instead of "never-used".

> terminals/unused.  For example, for nonterminals:

Wojciech, what do you think of all of this?  Here's the example I gave 
before but revised a little:

  <grammar>
    ...
    <nonterminals>
      <nonterminal number="9" name="$accept" />
      <nonterminal number="10" name="exp" />
      <useless>
        <nonterminal name="x" />
        <nonterminal name="y" />
      </useless>
    </nonterminals>
  </grammar>

Or should "useless", "never-reduced", and "unused" be attributes instead?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]