How do I build a left derivation tree from an expression including right-to-left associativity? Suppose I want to make a left derivation tree of an expression, but the expression includes operators that are right-to-left associative. Would I still expand the left-most variable first in my tree? For example, the expression a + b ** c ** d where ** is right-to-left associative, and + is left-to-right associative.
In a leftmost derivation, you always expand the leftmost non-terminal, by definition. The question is, what do you expand it to, since you usually have more than one choice.