[xquery-talk] What does ``UnaryExpr ::= ( <UnaryMinus> | <UnaryPlus> )* ValueExpr'' mean?

Zhimao Guo 021021090 at fudan.edu.cn
Mon Jan 17 19:10:29 PST 2005


Thanks for all help from you. :-)

zhimao
----- Original Message ----- 
From: "Michael Kay" <mhk at mhk.me.uk>
To: "'Zhimao Guo'" <021021090 at fudan.edu.cn>; <talk at xquery.com>
Sent: Monday, January 17, 2005 5:34 PM
Subject: RE: [xquery-talk] What does ``UnaryExpr ::= ( <UnaryMinus> | <UnaryPlus> )* ValueExpr'' mean?


Since the grammar allows

$x + -1

it also allows 

--1

Not something that's especially useful, just there for consistency and
generality, on the principle of "no needless restrictions". It was in XPath
1.0 so it's been retained.

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: talk-bounces at xquery.com 
> [mailto:talk-bounces at xquery.com] On Behalf Of Zhimao Guo
> Sent: 17 January 2005 08:40
> To: talk at xquery.com
> Subject: [xquery-talk] What does ``UnaryExpr ::= ( 
> <UnaryMinus> | <UnaryPlus> )* ValueExpr'' mean?
> 
> Dear all,
> 
> I am reading XGrammar from W3C released in Oct. 2004.
> I am confused by this production rule. What does 
> ( <UnaryMinus> | <UnaryPlus> )*
> mean? Why does the symbol ``*'' occur here?
> 
> best regards,
> Zhimao Guo
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
> 


More information about the talk mailing list