Issue 12362: Section: 8.4.7 (qvt-rtf) Source: (, ) Nature: Revision Severity: Minor Summary: The grammar rule used to produce a forExp doesn't coincide with the notation specified in the abstract syntax section for it (Pag 89, Section 8.2.2.6). The rule production in the grammar is wrong. Suggestion: Change the production rule: <for_exp> ::= ('forEach' | 'forOne') '(' <iter_declarator_list> ('|' <expression> )? ')' <expression_block> Resolution: Revised Text: Revised Text: In Section 8.2.2.6, at the end of the "Notation" sub-section add the following text. """ When using a forEach expression in conjunction with a compute expression the following shorthand can be used: mylist->forEach(i;x:X=...|cond) { … } This is equivalent to: compute (x:X=...) mylist->forEach(i|cond) { … } This is similar to the shorthand notation for while expression (see 8.2.2.4). """ Actions taken: April 1, 2008: received issue April 26, 2010: closed issue Discussion: The intent of syntax rule: <for_exp> ::= ('forEach' | 'forOne') '(' <iter_declarator_list> (';' <declarator>)? ('|' <expression>)? ')' <expression_block> was to allow shorthand with the computeExp compute (x:X) mylist->forEach(i|cond) { … } <==> mylist->forEach(i;x|cond) { … } Similarly with what happens with While expression. However the explanation was missing in the notation sub-section. End of Annotations:===== m: webmaster@omg.org Date: 01 Apr 2008 04:49:14 -0500 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Adolfo Sánchez-Barbudo Herrera Company: Open Canarias S.L. mailFrom: adolfosbh@opencanarias.com Notification: Yes Specification: : MOF. Query / Views / Transformations Section: 8.4.7 FormalNumber: qvt-rtf Version: QVT 1.1 RTF RevisionDate: 07/07/07 Page: 125 Nature: Revision Severity: Minor HTTP User Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.8.1.13) Gecko/20080325 Ubuntu/7.10 (gutsy) Firefox/2.0.0.13 Description The grammar rule used to produce a forExp doesn't coincide with the notation specified in the abstract syntax section for it (Pag 89, Section 8.2.2.6). The rule production in the grammar is wrong. Suggestion: Change the production rule: ::= ('forEach' | 'forOne') '(' ('|' )? ')'