bison-patches
[Top][All Lists]
Advanced

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

Re: extra lookahead sets in report


From: Akim Demaille
Subject: Re: extra lookahead sets in report
Date: Thu, 18 Oct 2007 12:18:54 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

>>> "JED" == Joel E Denny <address@hidden> writes:

 > I committed this.  Is it significant enough for NEWS?

I would say so.

 > +# Within a single state, Bison used to print a reduction's lookahead set 
 > next
 > +# to all items of the associated rule.  Instead, it should only print it 
 > next
 > +# to the item that is of the associated rule and whose dot is at the end of 
 > the
 > +# RHS.  Printing it next to items whose dot is not at the end of the RHS is
 > +# sometimes redundant and, as in this test case, is sometimes incorrect.

I don't remember the details, but are you saying that the lookahead
set is not computed for each item, but rather for a single rule?

I found it quite convenient to have all the lookahead sets when trying
to understand some conflicts but following the lookaheads starting
from $start (more LR(1) than LALR(1), but still useful to understand
what's going on).

Even if the result is incorrect (excuse my Bison's French ;)

  état 1
  
      2 start: 'a' . a 'a'
      3 a: . 'a'  [$end]
      3  | 'a' .  [$end]
  
      'a'  décalage et aller à l'état 4
  
      $défaut  réduction par utilisation de la règle 3 (a)
  
      a  aller à l'état 5

it does faithfully reflect the automaton, right?




reply via email to

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