|
|
|
|
Re: Reference does not work [message #1386478 is a reply to message #1386477] |
Tue, 17 June 2014 18:32 |
|
Still the question,
what is the semantic meaning of
ElementSyntax :
'{' elt=ElementID (',' eltIDs+=ElementID)* '}' ;
and that is the name of an ElementSyntax
the grammar says:
a ElementSyntax has a elt of type ElementID and a list of ElementID named eltIDs
so why not
ElementSyntax :
'{' name=ID (',' eltIDs+=ElementID)* '}' ;
or as i said adapt IQualifiedNameProvider
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Re: Reference does not work [message #1386492 is a reply to message #1386480] |
Tue, 17 June 2014 20:28 |
Félix SILINOU KAMDEM Messages: 96 Registered: April 2013 |
Member |
|
|
Hi Christian,
I did what you said but from
ElementSyntax :
'{' elt=ElementID (',' eltIDs+=ElementID)* '}' ;
I can retreive elt and not all ElementSyntax (elt + eltIDs + identifier).
I am saying that because as you can see in the snapshot, {E1,E2, E112} isn't {E1,E2,E3} so I should have get an error.
How to make a reference to the exact object ElementSyntax ({E1} or {E1,E2,E3} in my example).
Thank,
Felix
|
|
|
Re: Reference does not work [message #1386493 is a reply to message #1386492] |
Tue, 17 June 2014 20:36 |
|
Hi,
i still do no get your semantics. to you say the ElementSyntax
has the the names E1 E2 and E3????
if so you have to adapt the IDefaultResourceDescriptionStrategy or rethink your grammar to
ElementSyntaxContainer :
'{' syntaxes+=ElementSyntax* (',' syntaxes+=ElementSyntax)* '}' ;
ElementSyntax: name=ID;
... 'for' elementID=ElementSyntaxContainer ; /
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Re: Reference does not work [message #1386498 is a reply to message #1386495] |
Tue, 17 June 2014 20:59 |
|
P.S: which Element Syntaxes shall be visible in a Select?
only the ones from the rule? if you you definitively have to adapt scoping
Select:
'select' rule=[Rule] 'for' elementID=[ElementSyntax] ; //
@Inject IQualifiedNameProvider nameProvider
IScope scope_Select_elementID(Select ctx, EReference r) {
ruleElements = ctx.getRule().getAllElements() //your logic, with partial grammar not to tell.
Scopes.scopeFor(ruleElments,nameProvider,IScope.NULLSCOPE)
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Re: Reference does not work [message #1386597 is a reply to message #1386592] |
Wed, 18 June 2014 14:10 |
|
Hi,
you what you actually want to have is:
the name of an ElementSyntax is the whole thing???? {E1,E2,E3}
ElementSyntax:
name=ElementSyntaxName
;
ElementSyntaxName: '{' ID (',' ID)* '}';
.... 'for' element=[ElementSyntax|ElementSyntaxName];
[ElementSyntax|ElementSyntaxName] means ElementSyntax by ElementSyntaxName
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.04771 seconds