问题
Is there a way to execute code after each Terminal?
So that something like this is possible:
a : B { code } C { some code }
Any help would really be appreciated!
回答1:
The example you gave should work as is.
回答2:
You are right. I some how didn't get that C is $3 after inserting the code and not $2... really odd.
来源:https://stackoverflow.com/questions/393104/yacc-code-after-each-non-terminal