|
|
Re: XText - Cannot load model in standalone setup [message #1420253 is a reply to message #1420245] |
Tue, 09 September 2014 18:41 |
C Tran Messages: 15 Registered: July 2014 |
Junior Member |
|
|
Christian,
Thanks for your reply. My language is actually simple.
Here is my language definition:
grammar uk.ac.man.xman.dsl.ConditionDSL with org.eclipse.xtext.common.Terminals
generate conditionDSL "www.ac.uk/xman/dsl/ConditionDSL"
Model:
expression=Expression;
Expression:
CompositeExpression;
CompositeExpression returns Expression:
PrimaryExpression (({AND.left=current} '&&' | {OR.left=current} '||') right=PrimaryExpression)*;
PrimaryExpression returns Expression:
{PrimaryExpression} ('(' e=Expression ')' |
name=ID Operator INT | FLOAT | STRING) |
Constant;
Constant:
value = '.';
FLOAT:
INT '.' INT;
Operator:
('>' | '<' | '==' | '!=' | '<=' | '>=');
Is this enough for inspection? I could even upload my projects if it helps.
You seemed to suggest the exception has relation to my language. But the (generated) editor runs fine though.
My test was placed in the test project which was automatically created when I started my DSL project (using Wizard).
I also tried parseHelper and ...injectorprovider but I encountered similar exception.
[Updated on: Tue, 09 September 2014 18:41] Report message to a moderator
|
|
|
|
|
|
Re: XText - Cannot load model in standalone setup [message #1421987 is a reply to message #1420261] |
Fri, 12 September 2014 06:33 |
C Tran Messages: 15 Registered: July 2014 |
Junior Member |
|
|
Hi Christian,
I actually had tried what you suggested before reading your reply. Surprisingly (to me at least), it worked. I think the problem was caused by my own mistake when I chose to run Generate XText artefacts. I used Kepler with Xtext 2.4.3 to create my language and although the MWE2 workflow (to generate artifacts) completed, there was an error (see below).
error(10): internal error: Can't get property indirectDelegates using method get/isIndirectDelegates from org.antlr.tool.Grammar instance : java.lang.NullPointerException
I thought the generated artifacts were unusable and looked for a solution to get rid of the above error. I read somewhere this error exists in old Xtext (2.4.x) and hence I decided to use Luna with Xtext 2.6.x to generate Xtext artifacts. Generation was successful without errors. So, I went on using those generated stuff in Kepler because I also use Spray that requires Xtext 2.4.x.
Today, I used Kepler and ignored the error and discovered everything was ok.
Many thanks to you (Christian) for your time and support anyway. Hope my experience will help someone.
[Updated on: Fri, 12 September 2014 06:34] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03202 seconds