Using Xtext and Xtend [message #816120] |
Thu, 08 March 2012 07:54  |
Eclipse User |
|
|
|
Hi,
I read Xtend User Guide and examine Xtend examples but I could not decide where to start. I defined my own DSL with Xtext. Now I want to complete a textual editor. With the help of defined Xtext a grammer a user can create an instance model. I want to put some constraints to this model. For example, there is an element with type type1. I want to constraint the user to create only two instance elementes of type1.
For example:
main: (type1|type2)*
type1: name=ID;
type2: name=ID;
instance model:
type1instance1;
type1instance2;
If the user creates one more type, the editor must give an error.
I want to do such constraints and I could not decide what must I do. Can I supply it with Xtend. If yes how? Is there any documentation except Xtend User Guide?
Thank you very much.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08357 seconds