Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext and Xtend
Xtext and Xtend [message #849468] Thu, 19 April 2012 07:16
terry tonery is currently offline terry toneryFriend
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??
Previous Topic:xtext project from existing ecore model don´t generate the grammar well
Next Topic:Simple Xtext Interpreter Example (for the real world)
Goto Forum:
  


Current Time: Fri Apr 26 15:51:08 GMT 2024

Powered by FUDForum. Page generated in 0.03095 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top