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

SECTION 3.2: path expressions

Seventh para (excluding rules [69] and [70]), last sentence 
says "In general it is best to use parentheses when "/" is used 
as the first operand of an operator, e.g., (/) * 5."

And in "grammar-note: leading-lone-slash" in A.1.1 we find:
"The "/" presents an issue because it occurs both in a leading position and an operator position in expressions. Thus, expressions such as "/ * 5" can easily be confused with the path expression "/*". Therefore, a stand-alone slash, in a leading position, that is followed by an operator, will need to be parenthesized in order to stand alone, as in "(/) * 5". "5 * /", on the other hand, is fine.
"

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.

In "4*/*5", is the "/" a "leading slash" ?
Is "/div 2" legal ?

We recommend using "Should, Must or May" in place of e.g. "will need to be".


- Steve B.

Received on Monday, 16 February 2004 15:00:27 UTC