I want to call variables declared in another file. The include of the file is done using cross referencing. and the call of the declared too. this is the grammar:
Script:
includes+=(Include)* assignments+=(Assignment)* g=GetLog? clock=Clock? tests+=Test*
;
Assignment:
Config |Cosem ;
Include:
'INCLUDE' includedScript=[Script|STRING];
Cosem:
name=ID '=' 'COSEM' '(' classid=INT ',' version=INT ',' obis=STRING ')' ;
AttributeRef:
name=[Cosem] "." attributeRef =IDValue
;
the declaration is the Cosem rule.
from the documentation I understand that I must do something in the IResourceDescription but I don't know what exactly
EDIT
public class MyDslQNP extends DefaultDeclarativeQualifiedNameProvider {
QualifiedName qualifiedName(Script script) {
return QualifiedName.create(script.eResource().getURI().trimFileExtension().lastSegment(), script.eResource().getURI().fileExtension());
}
}