Reputation: 2071
I have the following grammar defined in XText.
Object:
"object" (name=INT)? ("extends" superType=[Object|INT] "{"
(comps+=Component)*
"}"
;
I'm having problems defining the cross-reference since apparently INT
does not return an ecore::EString
object.
I tried defining an STRINT
terminal:
STRINT returns ecore::EString:
INT
;
However this hides the INT terminal previously defined, which is another problem.
Questions:
ecore::Estring
issue, because I want to use an integer for crosslinking.Upvotes: 0
Views: 186
Reputation: 6729
If you define STRINT as a data type rule, it'll not hide another terminal. So basically what you described will work:
STRINT:
INT
;
Upvotes: 1