Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » CompleteOCL parser problem
CompleteOCL parser problem [message #1001803] Thu, 17 January 2013 11:54 Go to next message
Faiez Zalila is currently offline Faiez ZalilaFriend
Messages: 235
Registered: March 2010
Senior Member
Hi all,
I try to use to atl query to generate a very simple text form a parsed OCL document
conforms to CompleteOCLCST metamodel proposed by OCL MDT community.
I use this Java Parser
package Parser;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.ocl.examples.pivot.model.OCLstdlib;
import org.eclipse.ocl.examples.xtext.completeocl.CompleteOCLStandaloneSetup;
import org.eclipse.ocl.examples.xtext.oclinecore.OCLinEcoreStandaloneSetup;

public class Parser {

	public static void main(String[] args) throws IOException {

		ResourceSet resourceSet = new ResourceSetImpl();
		Resource resource = resourceSet.createResource(URI.createURI(args[0]));
		Resource resourceAsXmi = resourceSet.createResource(URI.createURI(args[0]+".xmi"));


an XMI file is generated.
when I use ATL transformation, An error is generated which is
Error loading platform:/resource/CompleteOCL/Test.xmi: The class 'VisitableCS' is not a valid classifier

Note: the problem is in the java parser, and I don't find how can I extend it to generate an appropriate xmi file.
if someone wants to help me, I am truly grateful because I spent a lot of time to try to extend this parser but I don't find anything Sad
This topic is a continuation of this one
Best regards,
Fy Za
Re: CompleteOCL parser problem [message #1006003 is a reply to message #1001803] Tue, 29 January 2013 14:20 Go to previous message
Faiez Zalila is currently offline Faiez ZalilaFriend
Messages: 235
Registered: March 2010
Senior Member
In order to resolve my problem,
I identify two different subjects
I 'd like verify if I am in the good way to resolve my problem.
And If there are the appropriate elements to generate AST in order to be used after by model transformations
Previous Topic:Accessing parent
Next Topic:PIVOT model and method overriding bug
Goto Forum:

Current Time: Tue May 22 18:07:12 GMT 2018

Powered by FUDForum. Page generated in 0.02163 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top