ISO 10303-14: issues resolution - another grammar issue?

Peter Denno peter.denno at nist.gov
Wed Nov 13 11:29:13 EST 2002


Jochen,

Yes. I agree. 

I am surprised that my parser didn't pick this up as a shift/reduce problem.


On Wednesday 13 November 2002 11:26, Peter Denno wrote:
> Dear P14 ballot comment resolvers,
>
> there seems to be an error in the grammar of P14 that is not reported,
> yet!?!
>
> Summarized, the problem is that the current P14 grammar can interpret the
> following:
>
>                 ==>  a := FOR EACH x in Agg1 RETURN x.att + y
>
>                 as either
>
>                 ==>  a := (FOR EACH x in Agg1 RETURN x.att) + y
>
>                 or
>
>                 ==>  a := FOR EACH x in Agg1 RETURN (x.att + y)
>
> What indicates the end of the return expression?
>
> To resolve the conflict the grammar probably needs to be changed, e.g. in
> the following way:
>
>                 original:
>
>                 81 foreach_expr = EACH var_id IN expression [where_clause]
> RETURN expression.
>                 82 forloop_expr = repeat_control RETURN expression .
>                 85 for_expr = FOR (foreach_expr | forloop_expr ) .
>
>                 corrected variant:
>
>                 81 foreach_expr = EACH var_id IN expression [where_clause]
> RETURN '('expression ')' .
>                 82 forloop_expr = repeat_control RETURN '(' expression ')'
> . 85 for_expr = FOR (foreach_expr | forloop_expr ) .
>
> Do you agree?
>
> Best regards, Jochen.
> ____________________________________________________________
> Jochen Haenisch                 E-mail: Jochen.Haenisch at epmtech.jotne.com
> EPM Technology AS               Home of the EXPRESS Data Manager
> P.O Box 6629 Etterstad          Tel: Int + 47 23 17 17 26; mobile: Int + 47

-- 
Best Regards, 
- Peter 

Peter Denno 
National Institute of Standards and Technology, 
Manufacturing System Integration Division, 
100 Bureau Drive, Mail Stop 8264             Tel: +1 301-975-3595 
Gaithersburg, MD, USA 20899-8264          FAX: +1 301-975-4694



More information about the wg11 mailing list