help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceeded limits of %dprec/%merge?


From: Derek M Jones
Subject: Re: Exceeded limits of %dprec/%merge?
Date: Wed, 17 May 2006 13:48:06 +0100
User-agent: Thunderbird 1.5 (Windows/20051201)

Joel,

time using static precedence instead. However, static precedence is made for shift-reduce conflicts, so you'll need to convert your reduce-reduce to shift-reduce.

I might give this a go just to play with the new, to me anyway,
functionality below.  I can change the grammar slightly to make the
problem go away without using this technique.

Try something like this in the definitions section:

  %nonassoc IDENT
  %nonassoc PREC

Add this rule:

  prec: %prec PREC { } ;

Now, before every IDENT, place more occurrences of prec to increase the precedence of that rule. This:

  direct_declarator:
               prec prec IDENT

Wow, seems that my knowledge of Bison functionality is way out
of date.  I have not read the complete manual for years, looks
like I should reread it.

Thanks for this excellent description of the functionality.

> Does that help?

I was hoping to dynamically catch all the ambiguities so they
could be counted and analyzed in more detail (I plan to turn
all by %dprecs into %merge).

Thanks for looking at the problem.  I will probably stick with
my slight grammar change solution for the time being.

--
Derek M. Jones                              tel: +44 (0) 1252 520 667
Knowledge Software Ltd                      mailto:address@hidden
Applications Standards Conformance Testing    http://www.knosof.co.uk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]