Community
Participate
Working Groups
Implemented. EBNF section of the spec is clear about the body of ComputeExp - it says it must be a block of expressions (in braces '{' and '}'). However, the spec contains numerouos examples of ComputeExp syntax where the body is a simple OCL expression used without braces. An attempt to implement the latter variant leads to multiple shift-reduce conflicts. For example: 1. compute (a : String = 'a') return - b; -- (compute (a : String = 'a') return) - b; -- compute (a : String = 'a') return (- b); 2. compute (a : String = 'a') var b : String := a; -- (compute (a : String = 'a') var b : String) := a; -- compute (a : String = 'a') (var b : String := a); Thus, the only consistent variant (with block expression) was implemented.