Xtext grammar repository? [message #1036418] |
Mon, 08 April 2013 06:56  |
Eclipse User |
|
|
|
Hi,
The ANTLR grammar list is a great resource, it immediately conveys the range and complexity of projects that have undertaken with ANTLR. Grammars exist for many mainstream languages.
http://www.antlr3.org/grammar/list.html
As XText has been around for a while now I'd have expected to see an Xtext equivalent but all I can find are trivial examples.
Does a similar list exist for XText or is its scope more limited?
Cheers, Steve
|
|
|
|
|
|
|
Re: Xtext grammar repository? [message #1037214 is a reply to message #1036511] |
Tue, 09 April 2013 05:49  |
Eclipse User |
|
|
|
Hi,
there are several concerns that are hard to answer in general. Here are some brief thoughts.
1. Xtext would not transform your files to byte code out of the box. You have to implement that. It sounds like the language already exists, so you might already have a compiler. In this case, you would use Xtext to build a user friendly IDE for the language and you would make your existing compiler a builder participant (i.e. you have a component that is informed if a file is changed and that component would simply call the existing compiler).
2. The costs of creating the IDE for an existing language are hard to estimate. They depend heavily on the complexity of the grammar and the kind of features you expect to work. The more your needs deviate from Xtext's defaults, the more you have to do yourself and it does not hurt to understand the underlying concepts.
3. As to memory. When a model file is parsed, a semantic model is created in memory as well as a internal representation of the file content (offsets and much more). These internal representations are very general. An optimised custom implementation would use less space of course. A further point is the "index". In order to make cross referencing work properly (with all its features like find references, rename refactoring etc), all models found need to be instantiated, linked, indexed etc. This process needs memory.
4. My suggestion would be. Don't start with the full language. Write a prototype for a very restricted sub-language to get a feeling for Xtext at all. Then pick features that would be blockers if they did not work. Try to make them work.
Alex
|
|
|
Powered by
FUDForum. Page generated in 0.05246 seconds