Closed llonchj closed 3 years ago
@maja42 possibly more tests are required and have no previous goyacc experience. Can you please help me understand how to get it working for cases other than bool?
Thanks for your pull-request. I finished ternary-support which is now available in the new v1.2.+.
Note: Your pull-request contained a bug in the operator-ordering. The ternary-operator has the highest precedence of all operators (see http://en.cppreference.com/w/c/language/operator_precedence, also referenced in the source-code).
Therefore, the %left '?' ':'
has to stay at the top.
In addition to that, the associativity should be right-to-left (as in C / C++), not left-to-right.
I also added the relevant tests and readme.
Thanks
fixes #8