Closed eclipse-ocl-bot closed 1 month ago
By Christian Damus on Apr 20, 2007 08:22
Committed changes to remove the support for usage of OCL keywords as identifiers.\ Support for the '_' escape syntax to follow.
By Christian Damus on Apr 20, 2007 18:52
Committed support for the '_' prefix to escape names that clash with OCL reserved words. Changes to internal API only, and that only additions of static operations.
Added JUnits to test, for both Ecore and UML environments, resolution of underscored names in:
By Ed Willink on Apr 21, 2007 02:12
Removal of package and context is correct. I suspect that body/derive/init should stay.
I'm not sure why you split operationCS. It doesn't affect me but it doesn't look like the spec anymore.
By Christian Damus on Apr 23, 2007 08:53
The body, derive, and init keywords look like omissions from the list of reserved words in 7.4.9. The inv, pre, and post are there; why not these? And what is 'attr', anyway? That doesn't occur in the language. I guess it's a question of the spirit and the letter of the spec ...
The reason for splitting oclExpressionCS is that only the form with the leading "pathname '::'" is valid in operation context declarations (according to chapters 7 and 12), and this form is not valid in operation def expressions. It looks like the spec forgot to specify for what purpose productions A and B are intended for, as it does for other constructs.
By Christian Damus on Apr 23, 2007 09:13
If the spec's list of keywords needs to be fixed, then it should be fixed in the spec, not in the tool. Spirit is nice, but other tools must be assumed to follow the letter, and for the sake of OCL portability, 'body', 'derive', and 'init' should not require underscores and 'attr' should.
By Christian Damus on Apr 24, 2007 19:29
Now, 'attr' and 'oper' are reserved words as per 7.4.9 (although they are not used in the concrete syntax) and 'body', 'derive', and 'init' are not reserved (although they are used in the concrete syntax).
By Nick Boldt on Jan 28, 2008 16:37
Move to verified as per bug 206558.
By Ed Willink on May 27, 2011 02:38
Closing after over a year in verified state.
By Ed Willink on May 27, 2011 02:41
Closing after over a year in verified state.
| --- | --- | | Bugzilla Link | 183362 | | Status | CLOSED FIXED | | Importance | P1 normal | | Reported | Apr 20, 2007 07:34 EDT | | Modified | May 27, 2011 02:41 EDT | | Version | 1.1.0 | | Reporter | Christian Damus |
Description
The concrete syntax specification for OCL 2.0 provides an underscore prefix to escape names that collide with OCL keywords.
The MDT OCL parser should remove its support for usage of keywords such as 'package', 'context', and 'body' as identifiers and implement the underscore mechanism, instead.