[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 09:50:50 +0100 |
[Please avoid styled text.]
On 18 Dec 2013, at 02:05, Adam Smalin <address@hidden> wrote:
> I don't believe that works. According to my rules and the conflict files it
> REFUSES to shift. "var, var = var" I think will work but "var = var, var"
> will be seen as rval ',' rval which isn't legal. I'm not sure where I can
> make rval ',' rval legal and have my code work because doing it in rval: will
> mean func(1,2) can be func(rval) instead of func(rval ',' rval). I could do
> extra work to check for these things but EVERYTHING would be more simple if I
> can just tell it not to reduce when it sees that rule
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.
Hans
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