[Top][All Lists]
[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
- TODO update, Akim Demaille, 2002/07/09
- Re: TODO update, Paul Hilfinger, 2002/07/21
- Re: TODO update, Akim Demaille, 2002/07/22
- Re: TODO update, Paul Hilfinger, 2002/07/22
- Re: TODO update, Akim Demaille, 2002/07/23
- Re: TODO update,
Paul Hilfinger <=
- Re: TODO update, Akim Demaille, 2002/07/24
- Re: TODO update, Paul Hilfinger, 2002/07/24
- Re: TODO update, Akim Demaille, 2002/07/25
- Re: TODO update, Paul Hilfinger, 2002/07/25
- Re: TODO update, Akim Demaille, 2002/07/26
- Re: TODO update, Paul Hilfinger, 2002/07/28