Related articles |
---|
LR(1) resolving SLR(1) reduce/reduce conflict haberg@math.su.se (2003-03-30) |
Re: LR(1) resolving SLR(1) reduce/reduce conflict gvcormac@speedy.uwaterloo.ca (2003-03-30) |
Re: LR(1) resolving SLR(1) reduce/reduce conflict haberg@math.su.se (2003-03-31) |
Re: LR(1) resolving SLR(1) reduce/reduce conflict gvcormac@speedy.uwaterloo.ca (2003-04-05) |
Re: LR(1) resolving SLR(1) reduce/reduce conflict haberg@math.su.se (2003-04-07) |
From: | gvcormac@speedy.uwaterloo.ca (Gordon Cormack) |
Newsgroups: | comp.compilers |
Date: | 5 Apr 2003 14:47:31 -0500 |
Organization: | Compilers Central |
References: | 03-03-203 |
Keywords: | parse, LR(1) |
Posted-Date: | 05 Apr 2003 14:47:31 EST |
>I got three LR(1) states:
> 1. A -> w . {x}
> B -> w . {y}
>
> 2. A -> w . {y}
>
> 3. B -> w . {x}
>
>Somehow, you have merged states 2 and 3 above. Perhaps that is what
>happens in LALR(1)?
>
>In SLR, just drop the {..} lookaheads.
Of course you are right, so the grammar is LALR, contrary to what I
I claimed.
There is still an SLR conflict in state 1.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.