|Re: expressing inheritance in xtext [message #987021 is a reply to message #987012]
||Thu, 22 November 2012 22:35
| Henrik Lindberg
Registered: July 2009
On 2012-22-11 22:09, Robert Wild wrote:|
> I'm not actually building a Java-like language. I've just used this as
> an example to illustrate the semantics I need. These semantics cover
> most of what I need plus a few variations.
I would use Xbase/Xtend as the base for a new language just to avoid
having to do all the work even if my language did not expose all of the
functionality of Xtend.
Your language does not have to be Java like at all; but you benefit
greatly from having a comprehensive implementation of a language that
has all the java concepts even if your language has a different concrete
> As I understood it, Xbase/Xtend is just for using jvm types in xtext,
> right? Or would it help it in any way. I've actually no clue for what I
> could use Jvm types in my dsl. Or is there more to it? But maybe it just
> doesn't help my particular problem...
Well, what do you overload on? Only name (like Ruby), or name and
argument types (like Java). Is your language object oriented? How do you
bind instance to method; on actual type, or declared type, how do you do
the same if using parameter overloading? (Just to mention a few things
where you can decide to use Xtend's semantics for this rather that
figuring out a working scheme of your own).
> Btw. I found a Project called FJ-eclipse that has a DSL that's basically
> a simple Java. I haven't looked very deeply into it yet, but their
> validator, contentAssist and ScopeProvider don't contain all that much
If you have a simple enough language, it is not that difficult to do it
on your own. If you find that you need a type system; then I can highly
recommend using Xbase/Xtend.
Powered by FUDForum
. Page generated in 0.03047 seconds