Merging Xtext code blocks into Xtend

46 views
Skip to first unread message

Christian Vogel

unread,
Nov 22, 2015, 7:47:21 AM11/22/15
to Xtend Programming Language
Please allow the use of other Xtext languages inside of Xtend!

I don't know what is necessary to make this work. Perhaps there should be restrictions or contracts or bridges necessary for Xtend to understand how to place Xtext code into context? For the feature to be exploited it would be nice to be able to have an example project that is Xtend-ready, so you can build your own DSL that connects with Xtend. Of course ideally, Xtend itself works just like the Xtext code that is being plugged in... "eating your own dogmeat" as they say.

It has been mentioned before, but I'd like to make this a topic into itself, since I can imagine it is no small task. 
However It would elevate Xtend above all other JVM languages, allowing everyone to plug in their own DSL features into the language. I can think of many uses right off the bat.

Christian Dietrich

unread,
Nov 22, 2015, 9:12:37 AM11/22/15
to Xtend Programming Language
the main disadvantage of parser based languages is that composition of different languages suck at the point of integration lexers and parsers in a conflict free manner. thus i dont think this is possible on embedding level as long as xtext uses antlr 3. what works of course is that if your dsl uses xbase the interop is the same as it is with java  

Erick Hagstrom

unread,
Nov 24, 2015, 7:43:26 AM11/24/15
to Xtend Programming Language
dogfood. Eating your own dogfood. :-)

Christian Vogel

unread,
Nov 24, 2015, 7:44:43 AM11/24/15
to xtend...@googlegroups.com
Whoops! Too much Fallout 4!

-- 
Christian Vogel
Sent with Airmail
--
You received this message because you are subscribed to a topic in the Google Groups "Xtend Programming Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xtend-lang/WrfqGDowTTk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Vogel

unread,
Nov 30, 2015, 9:10:29 AM11/30/15
to Xtend Programming Language
Hi, is it possible to have any other language you create in Xtext to use Xbase?

In other words, is it possible to create custom languages that are Xtend-compatible and would be allowed to be plugged in? (as a code block)

Efftinge, Sven

unread,
Nov 30, 2015, 10:49:25 AM11/30/15
to xtend...@googlegroups.com
I'm not entirely sure what you mean by 'Xtend-compatible'. But I'll try to answer nonetheless :-)
Yes, you can build an Xtext language and use (inlined) the expressions known from Xtend. We call this expression-part Xbase.
The integration layer is Java, so any language that translates to Java types and members can be used from these code blocks (incl. Xtend and other Xtext languages).

Does that answer the question?


--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.

Sebastian Zarnekow

unread,
Nov 30, 2015, 10:54:50 AM11/30/15
to xtend...@googlegroups.com
Hi Christian,

you can create languages that use the Xbase expressions and those languages can point to Xtend classes and vice versa, but you cannot define an Xbase syntax and use that in Xtend methods or Xtend classes. So all Xbase languages co-exist, but cannot be syntax-mixed in one and the same file.

Best,
Sebastian

--

Christian Vogel

unread,
Nov 30, 2015, 11:22:18 AM11/30/15
to xtend...@googlegroups.com
Hi Sebastian,

Would it not be an incredible opportunity to allow that syntax mixing?

It would allow people to leverage the platform you guys have built and it is a step over every other language.

-- 
Christian Vogel
Sent with Airmail

You received this message because you are subscribed to a topic in the Google Groups "Xtend Programming Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xtend-lang/WrfqGDowTTk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xtend-lang+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages