Xtext Tip: How to change the default delimiter of your FQNs
In a previous tip I showed how to add FQN support to your Xtext DSL. In this tip, we are going to customize our FQN to have a different separator. The full code for this example can be found here.
The basic block language
I am using the block language of the previous tip, but this time we are using the characters -> as separator
block Block1 {
field field1
field field2
block SubBlock {
field field2
}
alias field3 aliases field2
}
block Block2 {
alias field1 aliases Block1->SubBlock->field2 // this is an FQN with a -> as separator
}
Customize the FQN separator
First we change the grammar. The new grammar looks like this:
Continue Reading
