Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DSL syntax changed - how to provide conversion-on-load?
DSL syntax changed - how to provide conversion-on-load? [message #890507] Fri, 22 June 2012 13:04 Go to next message
Klaus Birken is currently offline Klaus BirkenFriend
Messages: 25
Registered: December 2009
Junior Member
Hi all,

let's assume an Xtext-based DSL has been rolled out to the users. Now, due to some unexpected reasons the DSL's syntax has to be changed in an incompatible way - but without changing the underlying EMF model.

Is there a mechanism to provide a syntax conversion "behind the scenes"? I.e., if the latest parser cannot read the file an older parser for the previous syntax version will be used. If this is successful, both serializer and formatter are used to provide the user with the updated version. And, this should work transparently for IDE and standalone environments.

Thanks in advance, regards,
Klaus
Re: DSL syntax changed - how to provide conversion-on-load? [message #890689 is a reply to message #890507] Fri, 22 June 2012 21:01 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Funny question, because usually it's the other way around: The syntax
stays the same (its api to the end user) but the model changes.

No, we don't have OOTB support for this. You'd have to build it
yourself. Note that it will be very inefficient deciding on each parse
fail whether that was a previous version or just an erroneous file. I'd
rather have some heuristical approach to detect (find certain patterns)
old projects at startup and then ask the user to convert all models at
once. You could also use project properties/settings to store language
version information.


Am 22.06.12 15:04, schrieb Klaus Birken:
> Hi all,
>
> let's assume an Xtext-based DSL has been rolled out to the users. Now,
> due to some unexpected reasons the DSL's syntax has to be changed in an
> incompatible way - but without changing the underlying EMF model.
> Is there a mechanism to provide a syntax conversion "behind the scenes"?
> I.e., if the latest parser cannot read the file an older parser for the
> previous syntax version will be used. If this is successful, both
> serializer and formatter are used to provide the user with the updated
> version. And, this should work transparently for IDE and standalone
> environments.
>
> Thanks in advance, regards,
> Klaus
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Find References
Next Topic:AutoConpletion and validation strange behaviour
Goto Forum:
  


Current Time: Thu Apr 25 03:32:28 GMT 2024

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

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

Back to the top