Cross references Issues in Xtext [message #1455191] |
Wed, 29 October 2014 05:37 |
|
HI all,
An example of my DSL is:
In model1.dsl :
myNode ABC {
description "---"
type someID
property1 DEF
}
In model2.dsl :
myNode BCD {
description "---"
type someID
property1 NOT_NEEDED
}
myNode DEF {
description "---"
type someID
property1 NOT_NEEDED
}
Both DSLs are written using the same grammar as you can see the file extensions are also same.
Observe property1 DEF and property1 NOT_NEEDED.
The value for property1 can be either a myNode reference (DEF in this example) or an enum element (NOT_NEEDED in this example.)
All the fields are mandatory in the grammar.
Now suppose I change my model2.dsl to :
myNode BCD {
description "---"
// type someID
// property1 NOT_NEEDED
}
myNode DEF {
description "---"
type someID
property1 NOT_NEEDED
}
So now the model2.dsl has syntax errors and parsing doesn't continue.
At this point of time, I get an error in model1.dsl at property1 DEF, which says "Couldn't resolve reference to........".
We observe this problem whenever the grammar is updated.
Is there a way to avoid this problem and cross linking still exists if the other file has problems.
Note: Suppose If I have 10 myNodes in model2.dsl and there is a problem in 6th myNode then parsing will be successfully done upto the 5th myNode and I am able to cross link it but no myNode can be referred after 6th.
Is there a way where I can only avoid 6th and still be able to refer other 9 or all 10 ?
Thanks for any help !
Regards,
Arshad
Arshad
[Updated on: Wed, 29 October 2014 05:38] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.43945 seconds