I'm reading:
相手が動くのを待つ。
which is translated as "Wait for the opponent to move."
How do I know this sentence doesn't mean "the opponent waits to move"?
I'm guessing it has to do with the precedence (borrowing programming language terminology) of the の?
I.e if the の binds together 動く and 待 then we get "the opponent waits to move"
but 相手が動く is evaluated first as "the opponent moves" (which is then noun-ified to "opponent to move") then we get "wait for the opponent to move"
TL;DR - how do I determine the precedence of の in a sentence?