Re: How to make C++-generated parser call yylex in some polymorphic way?

2013-12-23 Thread Oleksii Taran
Wow, thanks, John, I didn't think about using %parse-param in that way. On Dec 22, 2013, at 8:05 PM, John Horigan wrote: > I have used the technique described here: > http://panthema.net/2007/flex-bison-cpp-example/ > > It works with vanilla Bison from 2.3 (maybe earlier) up through 3.0. > >

Re: Tell a rule to shift instead of reduce?

2013-12-23 Thread Adam Smalin
Oh crap! It's looking at the token ',' and not the other rules (rule 12). FF I want to rule 12 to trump rule 15. Rule 15 precedence should definitely stay the same. F! So it's impossible for me to ask bison to shift during rule 12 when possible?

Re: Tell a rule to shift instead of reduce?

2013-12-23 Thread Akim Demaille
Le 22 déc. 2013 à 21:17, Adam Smalin a écrit : > > Please, post a self contained and minimal example. > > Ok. I didn't test it by parsing actual code. I only looked at the conflict > %left ',' > %right '=' > %left '.' > > %% > > program: > newline_many global_loop newline_many > global_l