|
Re: leaving model to parse ocl sentence. [message #541015 is a reply to message #540961] |
Fri, 18 June 2010 05:09 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
On 17/06/2010 20:38, Victorino wrote:
> I found one page is too late,
> that page is :
> " http://www.eclipse.org/forums/index.php?t=msg&&th=17 085&goto=54993 ",
> because I meet the same problem for a few months ago,
> and I still can not solve.
> I write the code belowed:
> ============================================================ ===
> OCL<?,EClassifier,?,?,?,?,?,?,?,Constraint,EClass,EObject> ocl;
> ocl=OCL.newInstance(env);//EcoreEnvironmentFactory.INSTANCE) ;
> OCLInput input=new OCLInput("inv: size>0");
> List<Constraint> constraints=ocl.parse(input);
> ============================================================ ===
> but I always got an SemanticException.
> It says "expected parser to return PackageDeclarationCS but got InvCS"
>
> if I changed input to "pre: size>0" or "post: size>0",
> It says "expected parser to return PackageDeclarationCS but got
> PrePostOrBodyDeclCS"
>
> And how can I use the parser result to continued my work ???
> I am almost newer to OCL,
> and found it can improve diagrams (either Ecore or UML),
> but I am stuck at parse.
> Please help me ! Please ~~~
This seems to be the same message that you posted hour an hour
previously and which I have already answered.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03376 seconds