help-bison
[Top][All Lists]
Advanced

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

Re: %left is not working


From: Hans Aberg
Subject: Re: %left is not working
Date: Tue, 3 Aug 2010 22:49:01 +0200

On 3 Aug 2010, at 18:54, Sasan Forghani wrote:

| ( expr)

as long as there isn't ( expr ) in the input input move up without problem. However once input does have an ( expr) part, $<blIdentifier>1 at the ADDOP level has the value of $<blIdentifier>1 at the ASSIGNMENT level. When I add the following action to the ( expr ) production- {strcpy($<blIdentifier>1, $<blIdentifier>2);}, $<blIdentifier>1 at the ADDOP level has the correct value but then the $<blIdentifier>1 at the ASSIGNMENT level value is what I changed $<blIdentifier>1 to be at the ( expr ) level. I'm very confused.

If you do not write out an action, { $$ = $1; } will be added implicitly. SO if you have something special that must be done, it must be written out explicitly.





reply via email to

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