bison-patches
[Top][All Lists]
Advanced

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

Re: TODO update


From: Paul Hilfinger
Subject: Re: TODO update
Date: Tue, 23 Jul 2002 13:51:14 -0700

 > There is something which remains unclear to me: you seem to say we
 > should not display them as $default, but they are.  They are because
 > conflrow and others are not used to generate .output.  

Well, no, but the change I introduced for the benefit of GLR affects
'actrow', and thus prevents it from being set to the 'default' marker
(0), and therefore from being compressed away.  Take a look at the
output you provided:

 > | State 5 contains 1 shift/reduce conflict and 2 reduce/reduce conflicts.
 > | 
 > | 
 > | Grammar
 > | 
 > |     0 $axiom: exp $
 > | 
 > |     1 exp: exp '+' exp
 > |     2    | exp '+' exp
 > |     3    | '0'
 > | 
 ...
 > | state 5
 > | 
 > |     1 exp: exp . '+' exp  [$, '+']
 > |     1    | exp '+' exp .  [$, '+']
 > |     2    | exp . '+' exp  [$, '+']
 > |     2    | exp '+' exp .  [$, '+']
 > | 
 > |     '+'  shift, and go to state 4
 > | 
 > |     $         reduce using rule 1 (exp)
 > |     $         [reduce using rule 2 (exp)]
 > |     '+'       [reduce using rule 1 (exp)]
 > |     '+'       [reduce using rule 2 (exp)]
 > |     $default  reduce using rule 1 (exp)

This says there are conflicts on $ and '+'.  For $, it gives the two
reductions; for '+', it gives the two possible reductions and the shift.

 > The presentation of this state is very confusing.

I'm not sure why you say so.  The one potentially confusing thing is
that the first $ rule (since there is no S/R conflict) is not
bracketed, even though it is, in fact, treated identically to the 
other $ rule (which is bracketed).   This is an artifact of bison's
reporting of the OTHER sense of 'default' reduction---i.e., the
reduction taken by default when there is a R/R conflict for the
ordinary LALR(1) parser.

Paul




reply via email to

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