[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[xtext-dev] Problems with Scoping
|
Hi everybody.
I am trying to find a possibility to access elements over different modules.
My xText grammar looks like this:
---------------------------------------------
Model :
(imports+=Import)*
(modules+=Module)*
;
Import :
'import' importURI=STRING
;
Module:
'module' name=ID
(statements+=Statement)*
'end'
;
[...]
---------------------------------------------
A test example which should run looks like this:
---------------------------------------------
module General
statement GeneralStatement
end
end
module Module01
application myApplication
statement Module01Statement
statement MyGeneralStatement
end
statement Module01Statement
end
end
---------------------------------------------
By default I my project is using AbstractDeclarativeScopeProvider.
This does not work (it says, that Module01Statement can not be found).
I also tried to use DefaultGlobalScopeProvider. That results in all
Statements marked as not been found.
The xText-User-Guide didn't help me in what I was looking for. (Nevertheless
it is a very good Guide!)
Could you give me some hint what to do? Use another ScopeProvider? Write my
own?
Hope you can help me.
Best regards,
Michael