- From: Michael Kay <mhk@mhk.me.uk>
- Date: Mon, 16 Feb 2004 21:44:23 -0000
- To: "'Stephen Buxton'" <Stephen.Buxton@oracle.com>, <public-qt-comments@w3.org>
> It will help to augment the example like this: > "4 + / * 5" is a parse error, because the slash, although it > appears following the + operator, is still the first operand > of the * operator. On the other hand, "4 * / + 5" is not a > parse error, because it is equivalent to "(4 * /) + 5", > meaning that the slash is not the first operand of an > operator. This works for the wrong reasons. The suggestion above is that it works because "+" has lower precedence than "*", but it actually works because "+" is unambiguously an operator. For example, "union", like "+", has lower precedence than "*", but 4 * / union /* parses as 4 * ( /union/* ) and therefore 4 * / union 5 is a parse error. Michael Kay
Received on Monday, 16 February 2004 16:43:42 UTC