Reference does not work [message #1386469] |
Tue, 17 June 2014 14:03  |
Eclipse User |
|
|
|
Hi,
I have a parseRule named ElementSyntax which can provide this form of element : {e1}, {e2,e12,e9}.
What I want is to get the reference of ElementSyntax. Below, you will see how I wrote my grammar but it's not working.
ElementSyntax :
'{' elt=ElementID (',' eltIDs+=ElementID)* '}' ;
ElementID:
name=ID ;
ExcludeDecision:
'and' 'exclude' rule=[Rule] 'for' elementID=[ElementSyntax] ;
Any help is greatly appreciated.
Best Regards,
Felix
|
|
|
|
|
|
|
|
Re: Reference does not work [message #1386492 is a reply to message #1386480] |
Tue, 17 June 2014 16:28   |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05416 seconds