bug-bison
[Top][All Lists]
Advanced

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

Re: Precedence declarations applied to rules


From: Frank Heckenbach
Subject: Re: Precedence declarations applied to rules
Date: Sun, 18 May 2003 20:41:50 +0200

Hans Aberg wrote:

> But if one should implement a precedence system for rules into Bison,
> instead of the old one using tokens, then it might look like this:
>   %precedence {
>   ...
>   %left E: E_1 ... E_k
>   ...
>   }
> This should mean that the precedence rules only apply to what is quoted
> within each %precedence group.

A minor problem IMHO is that it's a little redundant having to
repeat the complete rules for the precedence declaration. I'd prefer
a way to, say, name certain rules and refer to their names. But
that's only a syntactic detail, of course.

Another syntactic observation: If %precedence forms a "{}" section
as in your example, it would lend itself neatly to allowing for
several independent groups of precendences, as in my first
suggestion. (Which does not mean that I plan to implement it now;
for me, the no-default-precedence should be enough.)

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)




reply via email to

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