Skip to main content



      Home
Home » Modeling » TMF (Xtext) » DSL Generation and Validation
DSL Generation and Validation [message #813584] Mon, 05 March 2012 08:18 Go to next message
Eclipse UserFriend
Hi!

I have a DSL where elements have indices which can be
* statically parametrized, like "element[1,3]" or
* dynamically parametrized, like "element[n]", where n is only known at runtime or when the whole DSL specification is available (only then the paramater can be resolved).

The DSL can be generated into a DSL with same grammar, for example if the parameter n is known (for example n==3), then "element[3]" will be generated out of "element[n]".

Now I want to split the validation of the DSL into two parts:
1. a part which can be validated statically
2. a part which can be validated after transformation

Is it possible to split the validation process in these two parts? If yes, how can I do it? So, after transformation I want to have a kind of "call-backs" to the original DSL model.

Thank you in advance!
Alex.
Re: DSL Generation and Validation [message #813587 is a reply to message #813584] Mon, 05 March 2012 08:23 Go to previous messageGo to next message
Eclipse UserFriend
The precise nature of the transformation and runtime characteristics are unclear to me, so I'm guessing here a bit.

Validation part 1 is something you'd do in the Xtext Validator.
Validation part 2 needs information that's not available to the Xtext DSL editor so can't be done at that point. In any case, you're going to need a runtime validation of sorts. You could (e.g.) make messages coming from that "callbacks" by using the same type of links that you see for Java classes in the console. Xtext's NodeModel can provide you with the right locations in the model files.
Re: DSL Generation and Validation [message #820518 is a reply to message #813587] Wed, 14 March 2012 04:26 Go to previous message
Eclipse UserFriend
Ok, thank you. I'll give it a try.
Previous Topic:Xtend with Tycho ?
Next Topic:Comparison!!!
Goto Forum:
  


Current Time: Thu Jul 03 13:05:36 EDT 2025

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

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

Back to the top