The fundamental misunderstanding here is how we relate our parsing of mathematical expressions to the way a compiler parses expressions:<p>While we can parse the following expression properly:<p><pre><code>    a &#60; b &#60; c
</code></pre>
parses to:<p><pre><code>    (a &#60; b) AND (b &#60; c)
</code></pre>
obviously most compilers don't do that. As others have pointed out, the &#60; operator should not be associative.<p>The misunderstanding, though, is that the original expression<p><pre><code>    a &#60; b &#60; c
</code></pre>
actually could be parsed (I'm making a bunch of assumptions about the grammar and parser type here) by treating ..&#60;..&#60;.. as a <i>ternary</i> operator, like ?: in C++.<p>Then, in the syntax tree, the compiler could re-organize the expression to be the correct an unambiguous:<p><pre><code>    (a &#60; b) AND (b &#60; c)</code></pre>