Thank you Chris for the information. However, I think you are right in
saying that I am confused in regards to how Bison is working. After making
the modifications you suggested, nothing has changed. Here is the output
and below is the code snippets with the changes. Also, the input is a := (b
Below is some thinking I've done on the %left problem not working. I'm
hoping that someone will see what is wrong and point it out to me so I can
get the behavior I want. If input is a := b + c + d, Bison is adding c + d
and then adding b. Since add is %left, it should add b + c and then d.
Than
In the ref_name production, I have the following statement: $$
= strdup(varLocation). varLocation is local buffer. In the ( expr )
production, I have the statement $$ = $2. Am I
correct in thinking that I shouldn't have to use strdup() here since expr in
( expr ) will be getting its value from t
It seems that my code was somehow effecting how Bison was parsing. Or at
least this is the assumption I am left making. After deleting all the code
that had anything to do with the %left issue, the Bison parse is correct. Or
at least it is according to the printf statements. Using the printf
state
After the %left issue, the issue left is how to send data up the stack.
Once a production such as expr : expr + expr is reduced and the actions
performed how can I send data to the next reduction?
___
help-bison@gnu.org http://lists.gnu.org/mailman/listin