Cross-referencing only if object exists [message #716240] |
Tue, 16 August 2011 14:25  |
Eclipse User |
|
|
|
Hi, I'm having a hard time trying to do this:
Model:
(def+=Def)+
ref=Ref
;
Def:
'def:' name=QualifiedName
;
QualifiedName:
'*'ID
;
Ref:
'ref:' ref=RefVar
;
RefVar:
crossRef=[Def|QualifiedName] | newValue=QualifiedName
;
Of course, if I try to generate the artifacts for my dsl, I will get:
Decision can match input such as "'*' RULE_ID" using multiple alternatives: 1, 2
What I am trying to do is to let the programmer do two things:
1. Define a variable and then, use it.
2. Use a variable which was never defined.
If the variable was defined, a cross-reference should be made to the definition.
If the variavle was not defined, a name '*'ID should be used without trying to resolve any cross-reference.
I have no hints at all about how to do this.
How could I achieve this?
Thanks!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.45651 seconds