|
|
|
|
|
|
|
|
|
Re: Can not gen emf-gen from ecore file [message #1848729 is a reply to message #1848712] |
Wed, 15 December 2021 03:44  |
Eclipse User |
|
|
|
Hi
There is a certain amount of documentation in the OCL documentation, but it is a while since I gave it a comprehensive review so many minor details may have evolved.
For the most part the xxxCS models correspond to the xxx.xtext grammar. Unfortunately the OCL grammar was badly designed, neglecting to use a yacc-like tool to detect ambiguities, consequently the tooling has to work very hard to accommodate the ambiguities. This is done by parsing to more general concepts such as NameExpCS and RoundBracketClauseCS so that the determination of the appropriate syntax can be deferred from the parser to the 'linker' where Containment, PreOrder, PostOrder,and LeftToRight CS Visitors elaborate the AS in a resolveable order. The parsing of the expressions handles the unpleasant precedence change for and/xor between OCL 2.0 and 2.2. Expressions are therefore parsed as a precedence free syntax tree that is re-interpreted once the modelled precedences of each node are known.
You have probably seen enough to see that there is considerable capability available, but that it is not easily available. Making it easy is one of my many Utopian roundtuits.
It is probably time to sit back and consider whether the pain of continuing to use the frame work is more or less than the pain of doing something else.
It is worth noting that Xbase is much better integrated with Xtext and provides Java-like rather than OCL-like expressions. Unless you really want the strong side-effect-free OCL semantics, you might give Xbase a try. However both Xbase and Eclipse OCL are now on the critical list in regards to their long term future.
Regards
Ed Willink
[Updated on: Wed, 15 December 2021 03:47] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04156 seconds