Is this possible to include libraries in .langium file? #977
-
Hi, I already have a Xtext file with grammar rule which imports an Ecore and several libraries from Eclipse. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @LockedAwya, so for one, importing other grammars can be done through a simple import mechanism. See here for an example. We have also added a type declaration format similar to Ecore back in v0.3. However, it is not as extensive as Ecore/EMF is. This is by design to keep the library simple. The two features above can obviously be combined. So you can build a By the way, we have also released a tool to automatically migrate from Xtext grammars to Langium. It might not do a full migration for complex setups though: https://github.com/TypeFox/xtext2langium |
Beta Was this translation helpful? Give feedback.
Hey @LockedAwya,
so for one, importing other grammars can be done through a simple import mechanism. See here for an example.
We have also added a type declaration format similar to Ecore back in v0.3. However, it is not as extensive as Ecore/EMF is. This is by design to keep the library simple.
The two features above can obviously be combined. So you can build a
.langium
file purely consisting of interfaces, while another implements the grammar rules for these elements.By the way, we have also released a tool to automatically migrate from Xtext grammars to Langium. It might not do a full migration for complex setups though: https://github.com/TypeFox/xtext2langium