[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tell a rule to shift instead of reduce?
From: |
Hans Aberg |
Subject: |
Re: Tell a rule to shift instead of reduce? |
Date: |
Wed, 18 Dec 2013 23:52:26 +0100 |
[Please cc the list.]
On 18 Dec 2013, at 23:45, Adam Smalin <address@hidden> wrote:
> >The token precedences apply to the tokens immediately before and after the
> >parsing ā.ā (as in the .output file) in the shift/reduce conflicting rules.
> >The grammar must be written so that the tokens appear in such a position.
>
>
> | rval '=' rval %prec '.' ',' rval
>
> conflict file:
>
> rval '=' rval . ',' rval
> Conflict between rule 343 and token ',' resolved as reduce (',' < '=').
>
> Shouldn't it have worked? I tried putting %prec at the end of the line and
> after the ',' as well and it failed. I tried multiple places at once and got
> an error saying only one %prec per line.
>
Iām not sure what you want to achieve: I just set the precedence of "," lower
than "=" the way I indicated.
Re: Tell a rule to shift instead of reduce?, Akim Demaille, 2013/12/22
- Re: Tell a rule to shift instead of reduce?, Adam Smalin, 2013/12/22
- Re: Tell a rule to shift instead of reduce?, Adam Smalin, 2013/12/22
- Re: Tell a rule to shift instead of reduce?, Akim Demaille, 2013/12/22
- Re: Tell a rule to shift instead of reduce?, Akim Demaille, 2013/12/22
- Re: Tell a rule to shift instead of reduce?, Adam Smalin, 2013/12/22
- Re: Tell a rule to shift instead of reduce?, Akim Demaille, 2013/12/23
- Re: Tell a rule to shift instead of reduce?, Adam Smalin, 2013/12/23
- Re: Tell a rule to shift instead of reduce?, Akim Demaille, 2013/12/24
Re: Tell a rule to shift instead of reduce?, Akim Demaille, 2013/12/22