Re: %prec doesn't seem to work?

2013-04-04 Thread Akim Demaille
Le 5 avr. 2013 à 01:25, Adam Smalin a écrit : > I believe %prec is what I want but it DOESN'T do what I want. I don't > understand what it actually does. Why isn't it making the below the same? > > | rval '<' '<' rval %prec LSHIFT > | rval LSHIFT' rval > > It doesn't seem to change the precede

Re: %prec doesn't seem to work?

2013-04-04 Thread Adam Smalin
Still wrong. I can do >> and << in the lexer but the problem is... lets take this for example List>Foo. I need to see >> as two > so it can reduce twice. However listVar>Foo This needs to do intVar3>>Foo before comparing with intVar2 to be correct so precedence difference between >> and > is neede

Re: %prec doesn't seem to work?

2013-04-04 Thread Hans Aberg
On 4 Apr 2013, at 14:48, Akim Demaille wrote: > Le 3 avr. 2013 à 20:28, Hans Aberg a écrit : > >> On 3 Apr 2013, at 04:52, Adam Smalin wrote: >> >>> ... I have no idea how i can fix this without rewriting it all. >> >> Have you tried getting the lexer to emit two '>' when it sees a ">>", say

Re: %prec doesn't seem to work?

2013-04-04 Thread Akim Demaille
Le 3 avr. 2013 à 20:28, Hans Aberg a écrit : > On 3 Apr 2013, at 04:52, Adam Smalin wrote: > >> ... I have no idea how i can fix this without rewriting it all. > > > Have you tried getting the lexer to emit two '>' when it sees a ">>", say by > using an parenthesis-matching integer count?

Re: %prec doesn't seem to work?

2013-04-04 Thread Hans Aberg
On 4 Apr 2013, at 01:49, Adam Smalin wrote: > The problem is my bison file having different precedence for '>' '>' than '>' > even though they are right next to eachother its still incorrect to treat >> > the same precedence as > It will be fixed by the lexer, so the precedence problem will no