RE: ORA-XQ-112-C: "leading slash" issue not well defined

> 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