[Top][All Lists]

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

Re: Enable experimental report features?

From: Hans Aberg
Subject: Re: Enable experimental report features?
Date: Sun, 5 May 2002 19:56:43 +0200

At 14:01 +0200 2002/05/05, Akim Demaille wrote:
>There is an item of TODO about which I'd appreciate the input of
>others.  It is included below (it might help people who don't know the
>gory details of LR that I explain `core item set': when there is an
>item, say `$axiom -> . input $', where the current point is before a
>nonterminal, then you have to add all the rhs of the rules deriving
>`input' (transitivily).  For sake of memory saving, bison stores (and
>displays) only the core items, but when computing the automaton, it
>completes the core item set with the others, which are easily deducible):

The "core and others" are in Aho et al, and also in Waite & Goose called
the "closure" of a non-terminal.

>so decide whether this should be an option, or always enabled.  I'm in
>favor of making it the default, but maybe we should tune the output to
>distinguish core item sets from non core:

On the one hand, the closure is essential for the computations of the LR
algorithms, on the other hand, these are easily computed from the "core
set", and may be viewed as a nuisance due to unnecessary information

So perhaps this should be a special "show closures" operation: It should
perhaps be turned off, but I figure in debugging and for comments on the
Bison Help list one should be able to turn it on.

If it is turned off, the mathematically correct way would be to somehow
indicate that, i.e., one would write either (option off)
        state 0
            closure($axiom  ->  . input $   (rule 0))
or perhaps
        state 0
           $axiom  ->  . input $   (rule 0)

And when option on, perhaps:
        state 0
            Core: $axiom  ->  . input $   (rule 0))

            input  ->  . exp   (rule 1)
            input  ->  . input exp   (rule 2)

  Hans Aberg

reply via email to

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