Open nnabuuu opened 8 years ago
Yes.
The %{...%}
block where you set up those values is invoked every time at the start of a rule reduction. In other words: think of that code chunk as being prefixed before every rule action code block.
As other rules will be 'reduced' (~ their action code chunks will be executed) after rule c: A
gets reduced and before the parse finishes, you will effectively execute that %{...%}
code chunk at the top a few more times, producing exactly the result you are seeing in your example.
Thanks for the explanation.
Here is a very simple example to re-produce this issue:
When using this to parse "aaaaaaabb", the response is:
Here you see, yy.someArray3 and yy.someValue2 is set back to the defined values.
Is this the expected behavior?