[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.tmf] Cross reference
|
Hi all ,
this is my grammar :
Root: (root+=Model)* ;
Class: "class" name=ID (elt+=Element)* ;
Element : Attribute | Ref ;
Attribute : "var" name=ID ;
Ref : "ref" name=[Attribute|ID] ;
the attribute "name" in the element "Ref" references all the elements "Attribute" in the model
How I can restrict this reference to reference only the "Attributres " which exists in then same "Class"
for instance in this model :
class class1
var var1
var var2
class class 2
var var3
var var4
ref var1
the reference to var1 from class2 must not work because var1 must be in class1.