Disambiguation of expressions with neighboring operators of different associativity and same precedence
问题 Say I have an expression as follows (where ⨁ and ⨂ are binary operators which have the same precedence level but not the same associativity): x ⨁ y ⨂ z Would y belong to ⨁ or ⨂ , and based on what criteria? 回答1: According to the Edsgar Dijkstra's Shunting-yard algorithm if neighboring two operators in an expressions have the same precedence level then the expression is disambiguated based on the associativity of the second operator. If the second operator is left associative then the operand