I'm trying to build a grammar for a subset of the C language. In some of my rules I have the following (pNode
being a pointer defined in the union
):
rule : { $<pNode>$ = $<pNode>0; } the rest
However, after reading the Bison docs, it seems that the action could be omitted, because $<pNode>0
already refers to the previous symbol in the stack. Am I right?
It would be great to be able to omit the action, because it's causing some shift/reduce conflicts that would otherwise not appear.