1 Answers
Option 1 : $ has higher precedence and is left associative; # is right associative.
Highest Precedence Operator is at the lowest level in the expression tree so that it is evaluated first.
For unambiguous grammar, we can get precedence and associativity directly from production or expression tree.
Left Associativity => Left Linear Grammar or in expression, tree it should expand on left child for the same operator and vice versa.
Here at the lowest level, we have $ so it has the highest precedence.
# is right associative and $ is left associative.
4 views
Answered