by dandare · 11y ago · 0 comments
For example, 4+5×3 is a garden path, where reading left-to-right you may think to yourself, "four plus five is nine, then nine times... wait, I have to backtrack and handle five times three first..."
Whereas + 4 × 5 3 can't be confused. (Or 4 5 3 × + in RPN)
I'm not a (good) speaker of any other language than English, but I can see how adjective/verb/noun ordering in different languages can prevent this problem.
The girl the boy the dog hit bit cried.
measures the depth of the stack in human brains.Some of those verbs are binary operators (transitive), others are unary (intransitive).
The girl the boy the dog bit hit cried.
I tried parenthesising it; I tried Lisp syntax (you're right; it's the mix of direct and indirect objects that complicates things); nothing worked. It's a diabolical sentence. The best I could come up with was this:In step 1, the dog bit the boy.
In step 2, the boy hit the girl.
In step 3, the girl cried.
The details of the grammar of the languages makes the methods one can use to achieve the initially ambiguous parse different, though.