Re: IfExpr has a mandatory else clause

Michael Dyck <[email protected]>
Newsgroups gmane.comp.web.query-languages
Message-ID <[email protected]>
TAN Kuan Hui wrote:
> 
> Hi,
> 
> I am puzzled as to why the "else" clause must be made mandatory
> in the IfExpr ? Aside from plausible grammar ambiguity which IMO can
> be easily resolved, the production should not make "else" mandatory
> in every ifExpr.
> 
> [54]   IfExpr   ::=   <"if" "("> Expr ")" "then" ExprSingle "else"
> ExprSingle
> 
> It seems that the above is deliberate by design, would appreciate any
> clarifications.

How would you resolve the ambiguity?

-Michael Dyck
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.