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 the > operator precedences are set dynamically. One program that uses (or so > I remember) this approach is Hugs <http://haskell.org/>.
That is far too drastic a measure. 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. Take this example: %nonassoc IF_THEN_RULE %nonassoc "else" %left '+' '-' %left '*' It generates the following relative orders: IF_THEN_RULE < "else" IF_THEN_RULE < '+' IF_THEN_RULE < '-' IF_THEN_RULE < '*' "else" < '+' "else" < '-' "else" < '*' '+' < '*' '- < '*' But I would prefer if only the following relations were understood: IF_THEN_RULE < "else" '+' < '*' '- < '*' All the others were unintentional, and might silently (and badly) resolve a shift/reduce conflict that I introduced by accident. -- Michiel Helvensteijn m.helvenste...@gmail.com _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison