Xtext and Xtend [message #849468] |
Thu, 19 April 2012 07:16 |
terry tonery Messages: 34 Registered: February 2012 |
Member |
|
|
Hi,
I want to develop a DSL and I wrote some rules in Xtext. I want my DSL has a ArrayList function. A part of my DSL is like this:
Car:
'car' name=ID |
'{'(wheel+=Wheel)*
(window+=Window)* '}';
Wheel:
'Wheel' name=ID description=STRING ';' | c=[Car] '.' 'includes' '(' w=[Wheel]* ')';
Window: name=ID description=STRING ';' | c=[Car] ('has' win=[Window] )*;
The instance model will be like this:
Line 1: BMW.includes(Wheel1,Wheel2,Wheel3)
When user will add another Wheel he must go to Line 1 and add ", Wheel4"
I want to do it with BMW.includes.Wheel4 command.
Is it possible to do it with Xtext or Xtend??
|
|
|
Powered by
FUDForum. Page generated in 0.03095 seconds