|QualifiedName resolving [message #886841]
||Fri, 15 June 2012 18:00
| Jean-Michel Syrotas
Registered: June 2012
I am trying to make a (very) simple grammar with ecore files, and reference resolving, but even since I read so many documents and tried so many times, I cannot make it works.
Here is my problem:
The project contains some folders (that correspond to the "packages", but every single folder contains a file named package.mydsl that contains the definition of the package.
A package is simply defined as If the package is inside a package, the file only begins with
With the same way, we can define some models, with the same principle: if the model is inside a package, the file begins with and the model is defined like
The problem in my example, is when I want to create something in a package within another package like NAME1.NAME2
So, I have actually 2 problems:
- pack1.pack2 cannot be resolved...
- I can define 2 models called ModelA in the same package pack1... why?
Here is my grammar:
Program returns program::Program:
( withinClause=Within ';')?
( clazzes+=ClazzDefinition ';')*
Within returns within::Within:
ClazzDefinition returns clazz::Clazz:
ModelDefinition | PackageDefinition
ModelDefinition returns clazz::Model:
PackageDefinition returns clazz::Package:
ID ('.' ID)*;
Is my problem because of the grammar? the scope? the mwe2 file?
I am kinda lost right now... any help will be much appreciated!!!
(Size: 78.36KB, Downloaded 273 times)
(Size: 77.62KB, Downloaded 253 times)
(Size: 72.56KB, Downloaded 243 times)
Powered by FUDForum
. Page generated in 0.01502 seconds