Localized precedence declarations

2009-06-23 Thread Michiel Helvensteijn
Hi, I'm designing a language with, among other things, unary and binary operators. I use the Bison precedence declarations for operator precedence. I'm also using the precedence declarations together with %prec to resolve some other shift/reduce conflicts, such as the dangling else. It makes fo

Re: Localized precedence declarations

2009-06-23 Thread Hans Aberg
On 21 Jun 2009, at 22:46, Michiel Helvensteijn wrote: I'm designing a language with, among other things, unary and binary operators. I use the Bison precedence declarations for operator precedence. I'm also using the precedence declarations together with %prec to resolve some other shift/r

Re: Localized precedence declarations

2009-06-23 Thread Akim Demaille
Le 21 juin 09 à 22:46, Michiel Helvensteijn a écrit : It's now 6 years and a bit later. Has this problem been solved in Bison in the mean time? Because I can not even find a mention of this in the manual. Not, it has not been solved, and that is still a todo. But there are currently man

Re: Localized precedence declarations

2009-06-23 Thread Michiel Helvensteijn
On Tuesday 23 June 2009, Hans Aberg wrote: > The problem has not been resolved, and the type of grammar constraint > precedences I made are not implemented. > > One way to implement it is to not resolve the operator precedences in > the grammar, but in the actions. This is the only way in the case

Re: Localized precedence declarations

2009-06-23 Thread Michiel Helvensteijn
On Tuesday 23 June 2009, you wrote: > > It's now 6 years and a bit later. Has this problem been solved in > > Bison in the > > mean time? Because I can not even find a mention of this in the > > manual. > > Not, it has not been solved, and that is still a todo. But there are > currently many on-g

Re: Localized precedence declarations

2009-06-23 Thread Akim Demaille
Le 23 juin 09 à 20:18, Akim Demaille a écrit : Le 21 juin 09 à 22:46, Michiel Helvensteijn a écrit : It's now 6 years and a bit later. Has this problem been solved in Bison in the mean time? Because I can not even find a mention of this in the manual. Not, it has not been solved, and th

Re: Localized precedence declarations

2009-06-23 Thread Michiel Helvensteijn
On Tuesday 23 June 2009, Akim Demaille wrote: > I should have pointed out two changes that might help you: > > - %no-default-prec disables the automatic assignment of a default > precedence to rules. This is a nice feature, and I don't understand > today what I had cold feet about it. The featur

Re: Unable to compile in Visual C++

2009-06-23 Thread Luca
Joel E. Denny ha scritto: On Fri, 19 Jun 2009, Ewa Rom wrote: %{ int yylex(); void yyerror(char *s); #include "stdafx.h" #include #include #include #include #include #include #include #include #include "parser.hpp" #include "resource.h" nodeType *v(char s); nodeType *in(i

Re: Localized precedence declarations

2009-06-23 Thread Hans Aberg
On 23 Jun 2009, at 20:29, Michiel Helvensteijn wrote: The operator precedences in my language are static. I just need a way to isolate the different groupings of precedence declarations, so that no shift/reduce conflict is resolved by two declarations from different groupings. My method ca