|Re: Installing multiple versions of a DSL [message #999239 is a reply to message #998577]
||Fri, 11 January 2013 16:05
| Stephan Herrmann
Registered: July 2009
This is an interesting question. I keep postponing to think about this, but the scenario of language evolution is very relevant indeed.|
- At OSGi level we could have different versions of the plug-ins installed, provided none of the plug-ins is a singleton, which precludes using any extension points. Not great.
- Xtext recognizes languages by file extension. I don't think it would be easy to further influence the selection of a parser etc.
From an organizational point of view, the easist solution would be to evolve the grammar in a way that previous language versions are still accepted. It's then a matter of different validators to recognize stuff that's not legal in a given language version. That's basically what, e.g., JDT is doing. For a single language it is possible to even let the parser reject certain constructs that are not available in a given language version. But for a generated parser this is difficult.
Xtext could possibly help in this scenario if grammar rules could be attributed with a range of language versions where the given rule is legal.
Of course, evolving a language in this way works best when only new syntax is added. When syntax is changed in arbitrary ways, things can get messy.
A related issue is: can we actually hook syntactic validators into Xtext? How can we tell if a (legal) model was created correctly or using a syntax that is illegal wrt the given language version?
I wish I had better answers,
Powered by FUDForum
. Page generated in 0.02309 seconds