bison-patches
[Top][All Lists]
Advanced

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

Re: <reductions>


From: Akim Demaille
Subject: Re: <reductions>
Date: Sun, 30 Sep 2007 08:05:18 +0200


Le 30 sept. 07 à 01:11, Joel E. Denny a écrit :

The XML output has two different elements named "reductions". One reports
reduce actions in the sense of productions performed by a bottom-up

I guess you meant actions, or is this a meaning of
production I don't know?

parser. The other reports useless/unused symbols and rules that are found
by the grammar reductions of reduce.c.

Perhaps we can choose a better name for the latter case.
"grammar_reductions", "redundancies", any other suggestions?

Maye "simplifications" is too general, but it may fit.

Or perhaps
the "useless" and "unused" elements don't need to be grouped together
inside a parent element.  There's only one of each anyway.  Here's an
example from Wojciech's web page:

  <reductions>
    <useless>
      <nonterminals>
        <nonterminal>useless</nonterminal>
      </nonterminals>
      <rules>

I'm a bit surprised by the order that was chosen: it seems
more logical (to me) to start with the various categories
(nterm, rule, term) and inside each group to report useless,
unused etc.  WDYT?

        <rule number="6">
          <lhs>useless</lhs>
          <rhs>
            <symbol class="terminal">STR</symbol>
          </rhs>
        </rule>

Should we really repeat the rules then?  Its number suffice:
the grammar is defined elsewhere.  BTW, maybe the grammar should
be defined first, and then the rest of the information.  The
order should be chosen to please tools, not humans.

      </rules>
    </useless>
    <unused>
      <terminals>
        <terminal>STR</terminal>
      </terminals>
    </unused>
  </reductions>

What do you think?







reply via email to

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