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

Michael Kay mhk at mhk.me.uk
Mon Jan 17 09:34:45 PST 2005


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