help-bison
[Top][All Lists]
Advanced

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

Re: Operator precedence with empty operator


From: Hans Aberg
Subject: Re: Operator precedence with empty operator
Date: Tue, 23 Mar 2010 22:38:18 +0100


On 23 Mar 2010, at 22:32, Пётр Прохоренков wrote:

Thanks for the quick reply!

You are welcome.

Hugs code hepled. (That is weird how they never use bison precedence annotations and just use multiple levels of non-terminals.)

Think of isn't the function expression rule a bit too general.

In
expr: expr '+' expr
  | expr '-' expr
// Other operators...
  | expr expr
  | const
  | id
  ;

instead have
  expr: func expr
so that not every expression can serve as function identifier.

  Hans






reply via email to

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