Java application that parses text to model [message #655003] |
Thu, 17 February 2011 23:08 |
No real name Messages: 1 Registered: February 2011 |
Junior Member |
|
|
Hello,
I am trying to use xtext parser, for parsing files, in a eclipse java application (my intention is to parse end user files bases in mydsl grammar). With this code:
public static void main(String [] args){
String t = "files/mydsl.mydsl";
Injector sInjector;
ResourceSet rs = new ResourceSetImpl();
sInjector = new mydslStandaloneSetup().createInjectorAndDoEMFRegistration();
Resource resource = rs.getResource( URI.createURI(t),true);
EObject eobject = resource.getContents().get(0);
Model domainModel = (Model) eobject;
}
I get the error :
exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
what does that mean?
any help ????
|
|
|
Powered by
FUDForum. Page generated in 0.03177 seconds